summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorManali Kumar <mkkumar@us.ibm.com>2015-09-24 18:52:00 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-12-08 10:24:35 -0600
commit1fbe5e7bf5042ee9e7353a169d13eec54c270f04 (patch)
tree3cb9fc58e569fa0d22f7f16a6d8b32900e9de2da /src/include
parentdee70f6f25fb4ed099942b1b3b0a340bd643ff06 (diff)
downloadtalos-hostboot-1fbe5e7bf5042ee9e7353a169d13eec54c270f04.tar.gz
talos-hostboot-1fbe5e7bf5042ee9e7353a169d13eec54c270f04.zip
superio driver to control accesss to SIO registers
The SuperIO driver makes accesses to the SIO chip from the console and pnor module thread safe. Change-Id: Ib07dea2867d14684806c56cd965b26c95810f7f3 RTC:115576 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/20928 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: PRACHI GUPTA <pragupta@us.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/devicefw/userif.H17
-rw-r--r--src/include/usr/hbotcompid.H8
-rw-r--r--src/include/usr/sio/sio.H51
3 files changed, 76 insertions, 0 deletions
diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H
index 55751d97d..e30595e40 100644
--- a/src/include/usr/devicefw/userif.H
+++ b/src/include/usr/devicefw/userif.H
@@ -63,6 +63,8 @@ namespace DeviceFW
IPMIBT, // As opposed to other phy's
PVPD,
TPM,
+ SIO,
+ AHB_SIO,
LAST_ACCESS_TYPE,
};
@@ -214,6 +216,21 @@ namespace DeviceFW
DeviceFW::LPC, static_cast<uint64_t>(( i_trans_type )),\
static_cast<uint64_t>(( i_address ))
+ /**
+ * Construct the device addressing parameters for the SIO device ops.
+ * @param[i] i_device - SIO device to operate on
+ * @param[i] i_address - SIO address to operate on
+ */
+ #define DEVICE_SIO_ADDRESS(i_device, i_address)\
+ DeviceFW::SIO, static_cast<uint64_t>((i_device)),\
+ static_cast<uint64_t>((i_address))
+
+ /**
+ * Construct the device addressing parameters for the AHB_SIO device ops.
+ * @param[i] i_address - AHB_SIO address to operate on
+ */
+ #define DEVICE_AHB_SIO_ADDRESS(i_address)\
+ DeviceFW::AHB_SIO, static_cast<uint64_t>((i_address))
/**
* Construct the device addressing parameters for the EEPROM device ops.
diff --git a/src/include/usr/hbotcompid.H b/src/include/usr/hbotcompid.H
index 88cd49dbd..dc5b79d41 100644
--- a/src/include/usr/hbotcompid.H
+++ b/src/include/usr/hbotcompid.H
@@ -383,6 +383,14 @@ const compId_t FIPS_ERRL_COMP_ID = 0x3100;
const char FIPS_ERRL_COMP_NAME[] = "hb-trace";
//@}
+/** @name SIO
+ * SIO driver
+ */
+//@{
+const compId_t SIO_COMP_ID = 0x3200;
+const char SIO_COMP_NAME[] = "sio";
+//@}
+
/** @name PRDF
* PRDF component
* @Note PRDF_COMP_ID=0xE500 matches with what
diff --git a/src/include/usr/sio/sio.H b/src/include/usr/sio/sio.H
new file mode 100644
index 000000000..52f752da7
--- /dev/null
+++ b/src/include/usr/sio/sio.H
@@ -0,0 +1,51 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/sio/sio.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2015 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef __SIO_SIO_H
+#define __SIO_SIO_H
+
+namespace SIO
+{
+ /**
+ * SIO constants
+ */
+ enum{
+ SIO_DEVICE_SELECT_REG = 0x07, /**< Regsiter to select SIO device */
+ SIO_ADDR_REG_2E = 0x2E, /**< SuperIO address register */
+ SIO_DATA_REG_2F = 0x2F, /**< SuperIO data register */
+ SIO_PASSWORD_REG = 0xA5, /**< SuperIO password register (to be unlocked to access SIO) */
+ SUART1 = 0x02, /**< SIO device */
+ iLPC2AHB = 0x0D, /**< SIO device */
+ KBC = 0x05, /**< SIO device: Keyboard Controller */
+ MB = 0x0E, /**< SIO device: Mailbox */
+ DONT_CARE = 0x02, /**< SIO device: Don't care for boot flags version */
+ ENABLE_DEVICE = 0x01, /**< Enable SIO device by writing 1 to reg 30 of device */
+ DISABLE_DEVICE = 0x00, /**< Disable SIO device by writing 0 to reg 30 of device */
+ SIO_iLPC2AHB_LENGTH = 0x02, /**< SIO to iLPC2AHB length */
+ SIO_ILPC2AHB_TRIGGER = 0xCF, /**< Read/Write 0xCF to reg FE of iLPC2AHB to trigger read/write for SIO/iLPC2AHB */
+ SIO_SCRATCH_REG1 = 0x21, /**< Scratch Reg */
+ SIO_SCRATCH_REG2 = 0x22, /**< Scratch Reg */
+ };
+}
+#endif
OpenPOWER on IntegriCloud