diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2010-04-25 14:37:18 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2010-04-25 14:37:18 +0000 |
commit | 467a065384f0d50cbf2d100b55b58168ec98f0d3 (patch) | |
tree | ca04ca9ad8d9ad716bbd3f787dad0b8d50a36b22 /src/southbridge/intel | |
parent | d55e26f1b1efe50aa013ad32bdf3e2b58101a64f (diff) |
no warnings days.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5493 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/southbridge/intel')
-rw-r--r-- | src/southbridge/intel/esb6300/esb6300_smbus.c | 9 | ||||
-rw-r--r-- | src/southbridge/intel/esb6300/esb6300_smbus.h | 14 | ||||
-rw-r--r-- | src/southbridge/intel/i82801cx/i82801cx.h | 4 | ||||
-rw-r--r-- | src/southbridge/intel/i82801cx/i82801cx_reset.c | 1 |
4 files changed, 13 insertions, 15 deletions
diff --git a/src/southbridge/intel/esb6300/esb6300_smbus.c b/src/southbridge/intel/esb6300/esb6300_smbus.c index 3aa507070d..9be4a4a37e 100644 --- a/src/southbridge/intel/esb6300/esb6300_smbus.c +++ b/src/southbridge/intel/esb6300/esb6300_smbus.c @@ -8,13 +8,10 @@ #include "esb6300.h" #include "esb6300_smbus.h" -static int lsmbus_read_byte(struct bus *bus, device_t dev, uint8_t address) +static int lsmbus_read_byte(device_t dev, uint8_t address) { - unsigned device; struct resource *res; - - device = dev->path.i2c.device; - res = find_resource(bus->dev, 0x20); + res = find_resource(dev, 0x20); return do_smbus_read_byte(res->base, device, address); } @@ -22,10 +19,12 @@ static int lsmbus_read_byte(struct bus *bus, device_t dev, uint8_t address) static struct smbus_bus_operations lops_smbus_bus = { .read_byte = lsmbus_read_byte, }; + static struct pci_operations lops_pci = { /* The subsystem id follows the ide controller */ .set_subsystem = 0, }; + static struct device_operations smbus_ops = { .read_resources = pci_dev_read_resources, .set_resources = pci_dev_set_resources, diff --git a/src/southbridge/intel/esb6300/esb6300_smbus.h b/src/southbridge/intel/esb6300/esb6300_smbus.h index 861230e130..439b8fc586 100644 --- a/src/southbridge/intel/esb6300/esb6300_smbus.h +++ b/src/southbridge/intel/esb6300/esb6300_smbus.h @@ -14,18 +14,12 @@ #define SMBUS_TIMEOUT (100*1000*10) - -static void smbus_delay(void) -{ - outb(0x80, 0x80); -} - static int smbus_wait_until_ready(unsigned smbus_io_base) { unsigned loops = SMBUS_TIMEOUT; unsigned char byte; do { - smbus_delay(); + udelay(100); if (--loops == 0) break; byte = inb(smbus_io_base + SMBHSTSTAT); @@ -38,7 +32,7 @@ static int smbus_wait_until_done(unsigned smbus_io_base) unsigned loops = SMBUS_TIMEOUT; unsigned char byte; do { - smbus_delay(); + udelay(100); if (--loops == 0) break; byte = inb(smbus_io_base + SMBHSTSTAT); @@ -46,18 +40,20 @@ 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) { unsigned loops = SMBUS_TIMEOUT; unsigned char byte; do { - smbus_delay(); + udelay(100); if (--loops == 0) break; byte = inb(smbus_io_base + SMBHSTSTAT); } 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/intel/i82801cx/i82801cx.h b/src/southbridge/intel/i82801cx/i82801cx.h index 4cb215efbb..ea7d858d14 100644 --- a/src/southbridge/intel/i82801cx/i82801cx.h +++ b/src/southbridge/intel/i82801cx/i82801cx.h @@ -2,8 +2,10 @@ #define I82801CX_H #if !defined(__PRE_RAM__) +#include <device/device.h> #include "chip.h" -extern void i82801cx_enable(device_t dev); +void i82801cx_enable(device_t dev); +void i82801cx_hard_reset(void); #endif diff --git a/src/southbridge/intel/i82801cx/i82801cx_reset.c b/src/southbridge/intel/i82801cx/i82801cx_reset.c index 20e8530c54..bd479de758 100644 --- a/src/southbridge/intel/i82801cx/i82801cx_reset.c +++ b/src/southbridge/intel/i82801cx/i82801cx_reset.c @@ -1,4 +1,5 @@ #include <arch/io.h> +#include "i82801cx.h" void i82801cx_hard_reset(void) { |