From 77fee09509807f17d2d8a638b3e72cacb5bcdbc4 Mon Sep 17 00:00:00 2001 From: Richard Spiegel Date: Fri, 10 Nov 2017 08:33:57 -0700 Subject: soc/amd/stoneyridge: Use uint8_t as type for SPD address SPD address is currenty int. It should be uint8_t. BUG=b:62200225 Change-Id: Ia11c5994c41849ba01ecae3cee6fa97c527134d0 Signed-off-by: Richard Spiegel Reviewed-on: https://review.coreboot.org/22300 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/soc/amd/stoneyridge/smbus_spd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/soc/amd/stoneyridge/smbus_spd.c') diff --git a/src/soc/amd/stoneyridge/smbus_spd.c b/src/soc/amd/stoneyridge/smbus_spd.c index a2763357f4..0b0876074f 100644 --- a/src/soc/amd/stoneyridge/smbus_spd.c +++ b/src/soc/amd/stoneyridge/smbus_spd.c @@ -30,10 +30,10 @@ * sending offset for every byte. * Reads 128 bytes in 7-8 ms at 400 KHz. */ -static int readspd(uint16_t iobase, int SmbusSlaveAddress, +static int readspd(uint16_t iobase, uint8_t SmbusSlaveAddress, char *buffer, size_t count) { - u8 dev_addr; + uint8_t dev_addr; size_t index; int error; char *pbuf = buffer; @@ -90,7 +90,7 @@ static void setupFch(uint16_t ioBase) outb(SMBSLV_STAT_CLEAR, ioBase + SMBSLVSTAT); } -int sb_readSpd(int spdAddress, char *buf, size_t len) +int sb_readSpd(uint8_t spdAddress, char *buf, size_t len) { uint16_t ioBase = SMB_BASE_ADDR; setupFch(ioBase); -- cgit v1.2.3