summaryrefslogtreecommitdiffstats
path: root/src/include/usr/devicefw
diff options
context:
space:
mode:
authoraalugore <aalugore@us.ibm.com>2016-01-22 13:36:14 -0600
committerStephen Cprek <smcprek@us.ibm.com>2016-04-21 13:51:43 -0500
commit4f4f097d65e919bcc8bd5706f50ea0f413b8bfef (patch)
tree90030301032f3a87e952e5c161763bab0ad812be /src/include/usr/devicefw
parent18e7af4cee8e4a9b88dee257edffb528b969ecd3 (diff)
downloadtalos-hostboot-4f4f097d65e919bcc8bd5706f50ea0f413b8bfef.tar.gz
talos-hostboot-4f4f097d65e919bcc8bd5706f50ea0f413b8bfef.zip
DDR4 - Allow SPD writes
-DDR4 has 512-byte EEPROM with 2 256-byte pages. This commit contains the necessary page switching logic to support this. Change-Id: Iaa8e3e344def98b71d6a9e9387c5e0d9137a0397 RTC:137707 ForwardPort: yes Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/797 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Jenkins OP Build CI Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/871
Diffstat (limited to 'src/include/usr/devicefw')
-rw-r--r--src/include/usr/devicefw/driverif.H27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/include/usr/devicefw/driverif.H b/src/include/usr/devicefw/driverif.H
index 0842f734d..a148725b5 100644
--- a/src/include/usr/devicefw/driverif.H
+++ b/src/include/usr/devicefw/driverif.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2014 */
+/* Contributors Listed Below - COPYRIGHT 2011,2016 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -132,6 +132,31 @@ namespace DeviceFW
#define DEVICE_I2C_ADDRESS_OFFSET( i_port, i_engine, i_devAddr, i_offset_len, i_offset)\
DeviceFW::I2C, DEVICE_I2C_PARMS(i_port, i_engine, i_devAddr, i_offset_len, i_offset)
+
+ /**
+ * Construct the device addressing parameters for locking the page
+ * attribute of an I2C master target
+ *
+ * @param[in] i_port - Which port to use from the I2C master.
+ * @param[in] i_engine - Which I2C master engine to use.
+ * @param[in] i_shouldLock - bool to determine whether we are
+ * attempting to lock or unlock the page.
+ * @param[in] i_desired_page - The EEPROM page we want to switch to
+ * iff a page switch is needed.
+ * @param[in] i_lockMutex - bool to determine whether we actually
+ * want to lock the page mutex or not. This bool allows
+ * us to switch pages mid read without hitting a deadlock.
+ */
+#define DEVICE_I2C_CONTROL_PAGE_OP( i_port, i_engine, i_shouldLock, i_desired_page, i_lockMutex )\
+ DeviceFW::I2C,\
+ static_cast<uint64_t>(i_port),\
+ static_cast<uint64_t>(i_engine),\
+ 0xffffffff,\
+ static_cast<uint64_t>(i_shouldLock),\
+ static_cast<uint64_t>(i_desiredPage),\
+ static_cast<uint64_t>(i_lockMutex)
+
+
/**
* Construct the device addressing parameters for the Host I2C device ops.
* @param[in] i_port - Which port to use from the I2C master.
OpenPOWER on IntegriCloud