summaryrefslogtreecommitdiff
path: root/src/southbridge
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2017-05-05 21:08:00 +0200
committerMartin Roth <martinroth@google.com>2017-08-06 23:26:37 +0000
commitad29ec351e52b9d326d50c558c3af4b54a2e61d4 (patch)
treedca9feff2fbc4fcfb6d01630d14f354388b9c6d9 /src/southbridge
parent16fe79048f5254661ff2342aa481cbb44657b7ff (diff)
sb/intel/i82801gx: Implement smbus block r/w functions
Uses common hardware access functions to make smbus block read and write available in romstage. Those are needed to reconfigure the clockgen on smbus offset 0x69, which is sometimes needed for things like CPU C-states or analog display out to work properly. Change-Id: I0a06178d2474ce65972de157cb437b42f3354da0 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/19594 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Damien Zammit <damien@zamaudio.com> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/southbridge')
-rw-r--r--src/southbridge/intel/i82801gx/early_smbus.c11
-rw-r--r--src/southbridge/intel/i82801gx/i82801gx.h3
2 files changed, 14 insertions, 0 deletions
diff --git a/src/southbridge/intel/i82801gx/early_smbus.c b/src/southbridge/intel/i82801gx/early_smbus.c
index 5d204e9527..bb5caf5ca0 100644
--- a/src/southbridge/intel/i82801gx/early_smbus.c
+++ b/src/southbridge/intel/i82801gx/early_smbus.c
@@ -59,3 +59,14 @@ int i2c_block_read(unsigned int device, unsigned int offset, u32 bytes, u8 *buf)
{
return do_i2c_block_read(SMBUS_IO_BASE, device, offset, bytes, buf);
}
+
+int smbus_block_read(unsigned int device, unsigned int cmd, u8 bytes, u8 *buf)
+{
+ return do_smbus_block_read(SMBUS_IO_BASE, device, cmd, bytes, buf);
+}
+
+int smbus_block_write(unsigned int device, unsigned int cmd, u8 bytes,
+ const u8 *buf)
+{
+ return do_smbus_block_write(SMBUS_IO_BASE, device, cmd, bytes, buf);
+}
diff --git a/src/southbridge/intel/i82801gx/i82801gx.h b/src/southbridge/intel/i82801gx/i82801gx.h
index d1c861ddeb..b3c1b48ec2 100644
--- a/src/southbridge/intel/i82801gx/i82801gx.h
+++ b/src/southbridge/intel/i82801gx/i82801gx.h
@@ -52,6 +52,9 @@ void enable_smbus(void);
int smbus_read_byte(unsigned int device, unsigned int address);
int i2c_block_read(unsigned int device, unsigned int cmd, unsigned int bytes,
u8 *buf);
+int smbus_block_read(unsigned int device, unsigned int cmd, u8 bytes, u8 *buf);
+int smbus_block_write(unsigned int device, unsigned int cmd, u8 bytes,
+ const u8 *buf);
int southbridge_detect_s3_resume(void);
#endif
#endif