[coreboot-gerrit] Change in coreboot[master]: sb/intel/i82801jx: Add smbus block operations

Arthur Heymans (Code Review) gerrit at coreboot.org
Thu Sep 7 17:07:41 CEST 2017


Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/21439


Change subject: sb/intel/i82801jx: Add smbus block operations
......................................................................

sb/intel/i82801jx: Add smbus block operations

Change-Id: I1a84b4451efe25c1c3b0ce33ddbcb6ed06c29f9e
Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
M src/southbridge/intel/i82801jx/smbus.c
1 file changed, 26 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/39/21439/1

diff --git a/src/southbridge/intel/i82801jx/smbus.c b/src/southbridge/intel/i82801jx/smbus.c
index bc735a3..9ccff41 100644
--- a/src/southbridge/intel/i82801jx/smbus.c
+++ b/src/southbridge/intel/i82801jx/smbus.c
@@ -61,9 +61,35 @@
 	return do_smbus_write_byte(res->base, device, address, val);
 }
 
+static int lsmbus_block_write(device_t 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, 0x20);
+	return do_smbus_block_write(res->base, device, cmd, bytes, buf);
+}
+
+static int lsmbus_block_read(device_t 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, 0x20);
+	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_set_subsystem(device_t dev, unsigned vendor, unsigned device)

-- 
To view, visit https://review.coreboot.org/21439
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a84b4451efe25c1c3b0ce33ddbcb6ed06c29f9e
Gerrit-Change-Number: 21439
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur at aheymans.xyz>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170907/d315b2e6/attachment-0001.html>


More information about the coreboot-gerrit mailing list