diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2010-04-25 18:06:32 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2010-04-25 18:06:32 +0000 |
commit | bcb8c97af94c9fc814fdbdafe5361666bf81d442 (patch) | |
tree | d3a121678b32d7436787975292432c4975bb9f6d /src/southbridge | |
parent | 14b62da01ded297e12db6ed3b41778202e9aae41 (diff) | |
download | coreboot-bcb8c97af94c9fc814fdbdafe5361666bf81d442.tar.xz |
try to unify timing initialization across those boards that need it...
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5496 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/southbridge')
-rw-r--r-- | src/southbridge/intel/esb6300/esb6300_smbus.c | 11 | ||||
-rw-r--r-- | src/southbridge/intel/esb6300/esb6300_smbus.h | 4 | ||||
-rw-r--r-- | src/southbridge/nvidia/mcp55/mcp55_early_setup_car.c | 3 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/southbridge/intel/esb6300/esb6300_smbus.c b/src/southbridge/intel/esb6300/esb6300_smbus.c index 9be4a4a37e..5b1940f93e 100644 --- a/src/southbridge/intel/esb6300/esb6300_smbus.c +++ b/src/southbridge/intel/esb6300/esb6300_smbus.c @@ -8,11 +8,16 @@ #include "esb6300.h" #include "esb6300_smbus.h" -static int lsmbus_read_byte(device_t dev, uint8_t address) +static int lsmbus_read_byte(device_t dev, u8 address) { + u16 device; struct resource *res; - res = find_resource(dev, 0x20); - + struct bus *pbus; + + device = dev->path.i2c.device; + pbus = get_pbus_smbus(dev); + res = find_resource(pbus->dev, 0x20); + return do_smbus_read_byte(res->base, device, address); } diff --git a/src/southbridge/intel/esb6300/esb6300_smbus.h b/src/southbridge/intel/esb6300/esb6300_smbus.h index 439b8fc586..0b793c37f9 100644 --- a/src/southbridge/intel/esb6300/esb6300_smbus.h +++ b/src/southbridge/intel/esb6300/esb6300_smbus.h @@ -40,8 +40,7 @@ static int smbus_wait_until_done(unsigned smbus_io_base) return loops?0:-1; } -#ifdef UNUSED_CODE -static int smbus_wait_until_blk_done(unsigned smbus_io_base) +static inline int smbus_wait_until_blk_done(unsigned smbus_io_base) { unsigned loops = SMBUS_TIMEOUT; unsigned char byte; @@ -53,7 +52,6 @@ static int smbus_wait_until_blk_done(unsigned smbus_io_base) } while((byte&(1<<7)) == 0); return loops?0:-1; } -#endif static int do_smbus_read_byte(unsigned smbus_io_base, unsigned device, unsigned address) { diff --git a/src/southbridge/nvidia/mcp55/mcp55_early_setup_car.c b/src/southbridge/nvidia/mcp55/mcp55_early_setup_car.c index 3a178b8e74..60337d1635 100644 --- a/src/southbridge/nvidia/mcp55/mcp55_early_setup_car.c +++ b/src/southbridge/nvidia/mcp55/mcp55_early_setup_car.c @@ -134,9 +134,6 @@ static void mcp55_early_clear_port(unsigned mcp55_num, unsigned *busn, unsigned } -#include "src/pc80/udelay_io.c" -#include "src/lib/delay.c" - static void mcp55_early_pcie_setup(unsigned busnx, unsigned devnx, unsigned anactrl_io_base, unsigned pci_e_x) { uint32_t tgio_ctrl; |