summaryrefslogtreecommitdiff
path: root/src/southbridge/intel/i82801ix/smbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/southbridge/intel/i82801ix/smbus.c')
-rw-r--r--src/southbridge/intel/i82801ix/smbus.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/southbridge/intel/i82801ix/smbus.c b/src/southbridge/intel/i82801ix/smbus.c
index 4f46217a2a..8daaf2ecf1 100644
--- a/src/southbridge/intel/i82801ix/smbus.c
+++ b/src/southbridge/intel/i82801ix/smbus.c
@@ -38,13 +38,38 @@ static int lsmbus_write_byte(struct device *dev, u8 address, u8 data)
device = dev->path.i2c.device;
pbus = get_pbus_smbus(dev);
res = find_resource(pbus->dev, PCI_BASE_ADDRESS_4);
-
return do_smbus_write_byte(res->base, device, address, data);
}
+static int lsmbus_block_write(struct device *dev, u8 cmd, u8 bytes, const u8 *buf)
+{
+ u16 device;
+ struct resource *res;
+ struct bus *pbus;
+
+ device = dev->path.i2c.device;
+ pbus = get_pbus_smbus(dev);
+ res = find_resource(pbus->dev, PCI_BASE_ADDRESS_4);
+ return do_smbus_block_write(res->base, device, cmd, bytes, buf);
+}
+
+static int lsmbus_block_read(struct device *dev, u8 cmd, u8 bytes, u8 *buf)
+{
+ u16 device;
+ struct resource *res;
+ struct bus *pbus;
+
+ device = dev->path.i2c.device;
+ pbus = get_pbus_smbus(dev);
+ res = find_resource(pbus->dev, PCI_BASE_ADDRESS_4);
+ return do_smbus_block_read(res->base, device, cmd, bytes, buf);
+}
+
static struct smbus_bus_operations lops_smbus_bus = {
.read_byte = lsmbus_read_byte,
.write_byte = lsmbus_write_byte,
+ .block_read = lsmbus_block_read,
+ .block_write = lsmbus_block_write,
};
static void smbus_read_resources(struct device *dev)