Simplify spd_read_byte() functions (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2670 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Uwe Hermann 2007-05-15 10:26:16 +00:00
parent f1ff2c38d2
commit 4c0d39fc59
5 changed files with 5 additions and 17 deletions

View File

@ -57,12 +57,9 @@ static void enable_shadow_ram(void)
pci_write_config8(0, 0x59, shadowreg); pci_write_config8(0, 0x59, shadowreg);
} }
/* TODO: fix raminit.c to use smbus_read_byte */
static inline int spd_read_byte(unsigned device, unsigned address) static inline int spd_read_byte(unsigned device, unsigned address)
{ {
uint8_t c; return smbus_read_byte(device, address);
c = smbus_read_byte(device, address);
return c;
} }
#include "northbridge/intel/i440bx/raminit.c" #include "northbridge/intel/i440bx/raminit.c"

View File

@ -37,12 +37,9 @@ static void enable_shadow_ram(void)
pci_write_config8(0, 0x59, shadowreg); pci_write_config8(0, 0x59, shadowreg);
} }
/* TODO: fix raminit.c to use smbus_read_byte */
static inline int spd_read_byte(unsigned device, unsigned address) static inline int spd_read_byte(unsigned device, unsigned address)
{ {
uint8_t c; return smbus_read_byte(device, address);
c = smbus_read_byte(device, address);
return c;
} }
#include "northbridge/intel/i440bx/raminit.c" #include "northbridge/intel/i440bx/raminit.c"

View File

@ -35,9 +35,7 @@ void udelay(int usecs)
#include "southbridge/via/vt8231/vt8231_early_serial.c" #include "southbridge/via/vt8231/vt8231_early_serial.c"
static inline int spd_read_byte(unsigned device, unsigned address) static inline int spd_read_byte(unsigned device, unsigned address)
{ {
unsigned char c; return smbus_read_byte(device, address);
c = smbus_read_byte(device, address);
return c;
} }
#include "northbridge/via/vt8601/raminit.c" #include "northbridge/via/vt8601/raminit.c"

View File

@ -39,9 +39,7 @@ static void memreset_setup(void)
static inline int spd_read_byte(unsigned device, unsigned address) static inline int spd_read_byte(unsigned device, unsigned address)
{ {
unsigned char c; return smbus_read_byte(device, address);
c = smbus_read_byte(device, address);
return c;
} }
#include "northbridge/via/vt8623/raminit.c" #include "northbridge/via/vt8623/raminit.c"

View File

@ -31,9 +31,7 @@ void udelay(int usecs)
static inline int spd_read_byte(unsigned device, unsigned address) static inline int spd_read_byte(unsigned device, unsigned address)
{ {
unsigned char c; return smbus_read_byte(device, address);
c = smbus_read_byte(device, address);
return c;
} }
#include "northbridge/via/vt8601/raminit.c" #include "northbridge/via/vt8601/raminit.c"