summaryrefslogtreecommitdiffstats
path: root/src/usr/vpd/spd.C
diff options
context:
space:
mode:
authorCorey Swenson <cswenson@us.ibm.com>2014-06-18 16:09:55 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-07-01 13:34:57 -0500
commit2cc1c594ad2b05919d1742625de0da83ffd7f01d (patch)
tree57bbbe923325245e809ea51a96c60ffe79b18600 /src/usr/vpd/spd.C
parent3bcf5b7982bb8a2d9227dbff7be4ff2ce5fec05c (diff)
downloadtalos-hostboot-2cc1c594ad2b05919d1742625de0da83ffd7f01d.tar.gz
talos-hostboot-2cc1c594ad2b05919d1742625de0da83ffd7f01d.zip
Merge VPD commits from Stradale
Change-Id: I95aa2bb30299c9d22563068741ffbeda48d2d84b RTC: 97488 Origin: Google Shared Technology Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11661 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/vpd/spd.C')
-rwxr-xr-xsrc/usr/vpd/spd.C20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/usr/vpd/spd.C b/src/usr/vpd/spd.C
index 15e53e9fa..4480b507c 100755
--- a/src/usr/vpd/spd.C
+++ b/src/usr/vpd/spd.C
@@ -5,7 +5,10 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2014 */
+/* [+] Google Inc. */
+/* [+] 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. */
@@ -36,6 +39,8 @@
#include <errl/errludtarget.H>
#include <targeting/common/targetservice.H>
#include <devicefw/driverif.H>
+#include <devicefw/userif.H>
+#include <i2c/eepromif.H>
#include <vfs/vfs.H>
#include <pnor/pnorif.H>
#include <vpd/vpdreasoncodes.H>
@@ -45,6 +50,7 @@
#include "spdDDR3.H"
#include "spdDDR4.H"
#include "errlud_vpd.H"
+#include <config.h>
// ----------------------------------------------
// Trace definitions
@@ -389,6 +395,16 @@ errlHndl_t spdFetchData ( uint64_t i_byteAddr,
{
if( likely( g_usePNOR ) )
{
+#ifdef CONFIG_DJVPD_READ_FROM_HW
+ // Need to read directly from target's EEPROM.
+ err = DeviceFW::deviceOp( DeviceFW::READ,
+ i_target,
+ o_data,
+ i_numBytes,
+ DEVICE_EEPROM_ADDRESS(
+ EEPROM::VPD_PRIMARY,
+ i_byteAddr ) );
+#elif CONFIG_DJVPD_READ_FROM_PNOR
// Setup info needed to read from PNOR
VPD::pnorInformation info;
info.segmentSize = DIMM_SPD_SECTION_SIZE;
@@ -401,7 +417,7 @@ errlHndl_t spdFetchData ( uint64_t i_byteAddr,
info,
g_spdPnorAddr,
&g_spdMutex );
-
+#endif // CONFIG_DJVPD_READ_FROM_PNOR
if( err )
{
break;
OpenPOWER on IntegriCloud