diff options
Diffstat (limited to 'src/southbridge/intel/i82801ex')
-rw-r--r-- | src/southbridge/intel/i82801ex/i82801ex_lpc.c | 2 | ||||
-rw-r--r-- | src/southbridge/intel/i82801ex/i82801ex_pci.c | 2 | ||||
-rw-r--r-- | src/southbridge/intel/i82801ex/i82801ex_sata.c | 5 | ||||
-rw-r--r-- | src/southbridge/intel/i82801ex/i82801ex_smbus.c | 12 | ||||
-rw-r--r-- | src/southbridge/intel/i82801ex/i82801ex_smbus.h | 2 |
5 files changed, 12 insertions, 11 deletions
diff --git a/src/southbridge/intel/i82801ex/i82801ex_lpc.c b/src/southbridge/intel/i82801ex/i82801ex_lpc.c index 6cf8124c50..39e5343fd9 100644 --- a/src/southbridge/intel/i82801ex/i82801ex_lpc.c +++ b/src/southbridge/intel/i82801ex/i82801ex_lpc.c @@ -232,7 +232,7 @@ const unsigned long hpet_address = 0xfed0000; dword &= ~(3 << 15); /* clear it */ dword |= (code<<15); - printk_debug("enabling HPET @0x%x\n", hpet_address | (code <<12) ); + printk_debug("enabling HPET @0x%lx\n", hpet_address | (code <<12) ); } static void lpc_init(struct device *dev) diff --git a/src/southbridge/intel/i82801ex/i82801ex_pci.c b/src/southbridge/intel/i82801ex/i82801ex_pci.c index 650628b5e5..2394844ba4 100644 --- a/src/southbridge/intel/i82801ex/i82801ex_pci.c +++ b/src/southbridge/intel/i82801ex/i82801ex_pci.c @@ -7,7 +7,6 @@ static void pci_init(struct device *dev) { - uint32_t dword; uint16_t word; /* Clear system errors */ @@ -17,6 +16,7 @@ static void pci_init(struct device *dev) #if 0 /* System error enable */ + uint32_t dword; dword = pci_read_config32(dev, 0x04); dword |= (1<<8); /* SERR# Enable */ dword |= (1<<6); /* Parity Error Response */ diff --git a/src/southbridge/intel/i82801ex/i82801ex_sata.c b/src/southbridge/intel/i82801ex/i82801ex_sata.c index 98431edc78..73f5773fd5 100644 --- a/src/southbridge/intel/i82801ex/i82801ex_sata.c +++ b/src/southbridge/intel/i82801ex/i82801ex_sata.c @@ -7,10 +7,7 @@ static void sata_init(struct device *dev) { - - uint16_t word; - - printk_debug("SATA init\n"); + printk_debug("SATA init\n"); /* SATA configuration */ pci_write_config8(dev, 0x04, 0x07); pci_write_config8(dev, 0x09, 0x8f); diff --git a/src/southbridge/intel/i82801ex/i82801ex_smbus.c b/src/southbridge/intel/i82801ex/i82801ex_smbus.c index adfbcb7cc9..377df11cd0 100644 --- a/src/southbridge/intel/i82801ex/i82801ex_smbus.c +++ b/src/southbridge/intel/i82801ex/i82801ex_smbus.c @@ -8,24 +8,28 @@ #include "i82801ex.h" #include "i82801ex_smbus.h" -static int lsmbus_read_byte(struct bus *bus, device_t dev, uint8_t address) +static int lsmbus_read_byte(device_t dev, u8 address) { - unsigned device; + u16 device; struct resource *res; + struct bus *pbus; device = dev->path.i2c.device; - res = find_resource(bus->dev, 0x20); - + pbus = get_pbus_smbus(dev); + res = find_resource(pbus->dev, 0x20); + return do_smbus_read_byte(res->base, device, 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/i82801ex/i82801ex_smbus.h b/src/southbridge/intel/i82801ex/i82801ex_smbus.h index 861230e130..27acca494f 100644 --- a/src/southbridge/intel/i82801ex/i82801ex_smbus.h +++ b/src/southbridge/intel/i82801ex/i82801ex_smbus.h @@ -46,7 +46,7 @@ static int smbus_wait_until_done(unsigned smbus_io_base) return loops?0:-1; } -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; |