summaryrefslogtreecommitdiff
path: root/src/southbridge/intel/esb6300
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-04-25 14:37:18 +0000
committerStefan Reinauer <stepan@openbios.org>2010-04-25 14:37:18 +0000
commit467a065384f0d50cbf2d100b55b58168ec98f0d3 (patch)
treeca04ca9ad8d9ad716bbd3f787dad0b8d50a36b22 /src/southbridge/intel/esb6300
parentd55e26f1b1efe50aa013ad32bdf3e2b58101a64f (diff)
downloadcoreboot-467a065384f0d50cbf2d100b55b58168ec98f0d3.tar.xz
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/esb6300')
-rw-r--r--src/southbridge/intel/esb6300/esb6300_smbus.c9
-rw-r--r--src/southbridge/intel/esb6300/esb6300_smbus.h14
2 files changed, 9 insertions, 14 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)
{