summaryrefslogtreecommitdiff
path: root/src/southbridge/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/southbridge/intel')
-rw-r--r--src/southbridge/intel/i82801ax/Makefile.inc2
-rw-r--r--src/southbridge/intel/i82801ax/i82801ax_early_smbus.c10
-rw-r--r--src/southbridge/intel/i82801ax/i82801ax_smbus.h6
-rw-r--r--src/southbridge/intel/i82801bx/Makefile.inc2
-rw-r--r--src/southbridge/intel/i82801bx/i82801bx_early_smbus.c10
-rw-r--r--src/southbridge/intel/i82801bx/i82801bx_smbus.h5
6 files changed, 27 insertions, 8 deletions
diff --git a/src/southbridge/intel/i82801ax/Makefile.inc b/src/southbridge/intel/i82801ax/Makefile.inc
index 6d253f01fe..a282dd1e36 100644
--- a/src/southbridge/intel/i82801ax/Makefile.inc
+++ b/src/southbridge/intel/i82801ax/Makefile.inc
@@ -29,3 +29,5 @@ driver-y += i82801ax_usb.c
ramstage-y += i82801ax_reset.c
ramstage-y += i82801ax_watchdog.c
+romstage-y += i82801ax_early_smbus.c
+
diff --git a/src/southbridge/intel/i82801ax/i82801ax_early_smbus.c b/src/southbridge/intel/i82801ax/i82801ax_early_smbus.c
index e51e6afb6a..d30ed57e07 100644
--- a/src/southbridge/intel/i82801ax/i82801ax_early_smbus.c
+++ b/src/southbridge/intel/i82801ax/i82801ax_early_smbus.c
@@ -20,11 +20,17 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <arch/io.h>
+#include <arch/romcc_io.h>
+#include <console/console.h>
#include <device/pci_ids.h>
+#include <device/pci_def.h>
#include "i82801ax.h"
#include "i82801ax_smbus.h"
-static void enable_smbus(void)
+int smbus_read_byte(u8 device, u8 address);
+
+void enable_smbus(void)
{
device_t dev;
@@ -50,7 +56,7 @@ static void enable_smbus(void)
print_debug("SMBus controller enabled\n");
}
-static inline int smbus_read_byte(unsigned device, unsigned address)
+int smbus_read_byte(u8 device, u8 address)
{
return do_smbus_read_byte(SMBUS_IO_BASE, device, address);
}
diff --git a/src/southbridge/intel/i82801ax/i82801ax_smbus.h b/src/southbridge/intel/i82801ax/i82801ax_smbus.h
index 312d0b7812..bf7a479a49 100644
--- a/src/southbridge/intel/i82801ax/i82801ax_smbus.h
+++ b/src/southbridge/intel/i82801ax/i82801ax_smbus.h
@@ -20,6 +20,9 @@
#include <device/smbus_def.h>
+void enable_smbus(void);
+int do_smbus_read_byte(u16 smbus_io_base, u8 device, u8 address);
+
static void smbus_delay(void)
{
inb(0x80);
@@ -51,8 +54,7 @@ static int smbus_wait_until_done(u16 smbus_io_base)
return loops ? 0 : -1;
}
-static int do_smbus_read_byte(u16 smbus_io_base, unsigned device,
- unsigned address)
+int do_smbus_read_byte(u16 smbus_io_base, u8 device, u8 address)
{
unsigned char global_status_register;
unsigned char byte;
diff --git a/src/southbridge/intel/i82801bx/Makefile.inc b/src/southbridge/intel/i82801bx/Makefile.inc
index cd9c1574a2..313a0896df 100644
--- a/src/southbridge/intel/i82801bx/Makefile.inc
+++ b/src/southbridge/intel/i82801bx/Makefile.inc
@@ -30,3 +30,5 @@ driver-y += i82801bx_usb.c
ramstage-y += i82801bx_reset.c
ramstage-y += i82801bx_watchdog.c
+romstage-y += i82801bx_early_smbus.c
+
diff --git a/src/southbridge/intel/i82801bx/i82801bx_early_smbus.c b/src/southbridge/intel/i82801bx/i82801bx_early_smbus.c
index b7597716e7..92a5403edd 100644
--- a/src/southbridge/intel/i82801bx/i82801bx_early_smbus.c
+++ b/src/southbridge/intel/i82801bx/i82801bx_early_smbus.c
@@ -20,11 +20,17 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <arch/io.h>
+#include <arch/romcc_io.h>
+#include <console/console.h>
#include <device/pci_ids.h>
+#include <device/pci_def.h>
#include "i82801bx.h"
#include "i82801bx_smbus.h"
-static void enable_smbus(void)
+int smbus_read_byte(u8 device, u8 address);
+
+void enable_smbus(void)
{
device_t dev;
@@ -50,7 +56,7 @@ static void enable_smbus(void)
print_debug("SMBus controller enabled\n");
}
-static inline int smbus_read_byte(unsigned device, unsigned address)
+int smbus_read_byte(u8 device, u8 address)
{
return do_smbus_read_byte(SMBUS_IO_BASE, device, address);
}
diff --git a/src/southbridge/intel/i82801bx/i82801bx_smbus.h b/src/southbridge/intel/i82801bx/i82801bx_smbus.h
index 24c08cd357..066feade07 100644
--- a/src/southbridge/intel/i82801bx/i82801bx_smbus.h
+++ b/src/southbridge/intel/i82801bx/i82801bx_smbus.h
@@ -20,6 +20,8 @@
#include <device/smbus_def.h>
+void enable_smbus(void);
+
static void smbus_delay(void)
{
inb(0x80);
@@ -51,8 +53,7 @@ static int smbus_wait_until_done(u16 smbus_io_base)
return loops ? 0 : -1;
}
-static int do_smbus_read_byte(u16 smbus_io_base, unsigned device,
- unsigned address)
+static int do_smbus_read_byte(u16 smbus_io_base, u8 device, u8 address)
{
unsigned char global_status_register;
unsigned char byte;