<p>Richard Spiegel has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22300">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/amd/stoneyridge: Fix SPD code<br><br>SPD address should be uint8_t. Remove unused smbus_readSpd prototype<br>from dimmSpd.h.<br><br>BUG=b:62200225<br><br>Change-Id: Ia11c5994c41849ba01ecae3cee6fa97c527134d0<br>Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com><br>---<br>M src/soc/amd/common/dimmSpd.h<br>M src/soc/amd/stoneyridge/dimmSpd.c<br>M src/soc/amd/stoneyridge/smbus_spd.c<br>3 files changed, 5 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/00/22300/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/soc/amd/common/dimmSpd.h b/src/soc/amd/common/dimmSpd.h<br>index cdcdb73..2206b0c 100644<br>--- a/src/soc/amd/common/dimmSpd.h<br>+++ b/src/soc/amd/common/dimmSpd.h<br>@@ -20,7 +20,6 @@<br> AmdMemoryReadSPD(IN UINT32 Func, IN UINTN Data,<br>                          IN OUT AGESA_READ_SPD_PARAMS *SpdData);<br> <br>-int sb_readSpd(int spdAddress, char *buf, size_t len);<br>-int smbus_readSpd(int spdAddress, char *buf, size_t len);<br>+int sb_readSpd(uint8_t spdAddress, char *buf, size_t len);<br> <br> #endif<br>diff --git a/src/soc/amd/stoneyridge/dimmSpd.c b/src/soc/amd/stoneyridge/dimmSpd.c<br>index ace22bb..a821036 100644<br>--- a/src/soc/amd/stoneyridge/dimmSpd.c<br>+++ b/src/soc/amd/stoneyridge/dimmSpd.c<br>@@ -27,7 +27,7 @@<br> AGESA_STATUS AmdMemoryReadSPD(UINT32 unused1, UINTN unused2,<br>                                               AGESA_READ_SPD_PARAMS *info)<br> {<br>-     int spdAddress;<br>+      uint8_t spdAddress;<br>   DEVTREE_CONST struct device *dev = dev_find_slot(0, PCI_DEVFN(0x18, 2));<br>      DEVTREE_CONST struct soc_amd_stoneyridge_config *conf = dev->chip_info;<br> <br>diff --git a/src/soc/amd/stoneyridge/smbus_spd.c b/src/soc/amd/stoneyridge/smbus_spd.c<br>index 4e3e293..a8a5b37 100644<br>--- a/src/soc/amd/stoneyridge/smbus_spd.c<br>+++ b/src/soc/amd/stoneyridge/smbus_spd.c<br>@@ -33,10 +33,10 @@<br>  *           sending offset for every byte.<br>  *          Reads 128 bytes in 7-8 ms at 400 KHz.<br>  */<br>-static int readspd(uint16_t iobase, int SmbusSlaveAddress,<br>+static int readspd(uint16_t iobase, uint8_t SmbusSlaveAddress,<br>                         char *buffer, size_t count)<br> {<br>-      u8 dev_addr;<br>+ uint8_t dev_addr;<br>     size_t index;<br>         int error;<br>    char *pbuf = buffer;<br>@@ -93,7 +93,7 @@<br>       outb(SMBSLV_STAT_CLEAR, ioBase + SMBSLVSTAT);<br> }<br> <br>-int sb_readSpd(int spdAddress, char *buf, size_t len)<br>+int sb_readSpd(uint8_t spdAddress, char *buf, size_t len)<br> {<br>  uint16_t ioBase = SMB_BASE_ADDR;<br>      setupFch(ioBase);<br></pre><p>To view, visit <a href="https://review.coreboot.org/22300">change 22300</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/22300"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ia11c5994c41849ba01ecae3cee6fa97c527134d0 </div>
<div style="display:none"> Gerrit-Change-Number: 22300 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Spiegel <richard.spiegel@silverbackltd.com> </div>