#define SERIAL_DEV PNP_DEV(0x3f0, W83977TF_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
#define SERIAL_DEV PNP_DEV(0x3f0, W83627HF_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
/* FIXME: It's a Winbond W83977EF, actually. */
#define SERIAL_DEV PNP_DEV(0x3f0, W83977TF_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
#include "northbridge/amd/amdfam10/reset_test.c"
#include <console/loglevel.h>
#include "cpu/x86/bist.h"
-static int smbus_read_byte(u32 device, u32 address);
#include "superio/ite/it8718f/it8718f_early_serial.c"
#include <usbdebug.h>
#include "cpu/x86/mtrr/earlymtrr.c"
#include "northbridge/amd/amdfam10/reset_test.c"
#include <console/loglevel.h>
#include "cpu/x86/bist.h"
-static int smbus_read_byte(u32 device, u32 address);
#include "superio/ite/it8718f/it8718f_early_serial.c"
#include <usbdebug.h>
#include "cpu/x86/mtrr/earlymtrr.c"
#include "northbridge/amd/amdfam10/reset_test.c"
#include <console/loglevel.h>
#include "cpu/x86/bist.h"
-static int smbus_read_byte(u32 device, u32 address);
#include "superio/ite/it8712f/it8712f_early_serial.c"
#include <usbdebug.h>
#include "cpu/x86/mtrr/earlymtrr.c"
#include "northbridge/amd/amdfam10/reset_test.c"
#include <console/loglevel.h>
#include "cpu/x86/bist.h"
-static int smbus_read_byte(u32 device, u32 address);
#include "superio/ite/it8712f/it8712f_early_serial.c"
#include <usbdebug.h>
#include "cpu/x86/mtrr/earlymtrr.c"
#define SERIAL_DEV PNP_DEV(0x2e, SMSCSUPERIO_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
void main(unsigned long bist)
{
smscsuperio_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
#define SERIAL_DEV PNP_DEV(0x2e, LPC47B272_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
void main(unsigned long bist)
{
lpc47b272_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
#define SERIAL_DEV PNP_DEV(0x3f0, W83977TF_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
#define SERIAL_DEV PNP_DEV(0x3f0, W83977TF_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
/* FIXME: The ASUS P2B-F has a Winbond W83977EF, actually. */
#define SERIAL_DEV PNP_DEV(0x3f0, W83977TF_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
#define SERIAL_DEV PNP_DEV(0x3f0, W83977TF_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
#define SERIAL_DEV PNP_DEV(0x3f0, W83977TF_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
#include "superio/winbond/w83977tf/w83977tf_early_serial.c"
#include <lib.h>
-void enable_pm(void);
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
/* FIXME: The ASUS P3B-F has a Winbond W83977EF, actually. */
#define SERIAL_DEV PNP_DEV(0x3f0, W83977TF_SP1)
/* FIXME: It's a Winbond W83977EF, actually. */
#define SERIAL_DEV PNP_DEV(0x3f0, W83977TF_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
#define SERIAL_DEV PNP_DEV(0x3f0, SMSCSUPERIO_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
/* FIXME: This should be PC97307 (but it's buggy at the moment)! */
#define SERIAL_DEV PNP_DEV(0x15c, PC97317_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
#include "superio/ite/it8712f/it8712f_early_serial.c"
#include <lib.h>
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
void main(unsigned long bist)
{
it8712f_24mhz_clkin();
#include "northbridge/intel/i945/raminit.h"
#include "southbridge/intel/i82801gx/i82801gx.h"
-void enable_smbus(void);
-
void setup_ich7_gpios(void)
{
u32 gpios;
#define SERIAL_DEV PNP_DEV(0x3f0, IT8671F_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
#define SERIAL_DEV PNP_DEV(0x3f0, IT8671F_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
#include "northbridge/amd/amdfam10/reset_test.c"
#include <console/loglevel.h>
#include "cpu/x86/bist.h"
-static int smbus_read_byte(u32 device, u32 address);
#include "superio/ite/it8718f/it8718f_early_serial.c"
#include <usbdebug.h>
#include "cpu/x86/mtrr/earlymtrr.c"
#include "northbridge/amd/amdfam10/reset_test.c"
#include <console/loglevel.h>
#include "cpu/x86/bist.h"
-static int smbus_read_byte(u32 device, u32 address);
#include "superio/ite/it8718f/it8718f_early_serial.c"
#include <usbdebug.h>
#include "cpu/x86/mtrr/earlymtrr.c"
/* TODO: It's a PC87364 actually! */
#define SERIAL_DEV PNP_DEV(0x2e, PC87360_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
void main(unsigned long bist)
{
/* TODO: It's a PC87364 actually! */
#define SERIAL_DEV PNP_DEV(0x4e, W83627EHG_SP1)
#define DUMMY_DEV PNP_DEV(0x4e, 0)
-void enable_smbus(void);
-
void setup_ich7_gpios(void)
{
printk(BIOS_DEBUG, " GPIOS...");
#include "northbridge/amd/amdfam10/reset_test.c"
#include <console/loglevel.h>
#include "cpu/x86/bist.h"
-static int smbus_read_byte(u32 device, u32 address);
#include "superio/fintek/f71859/f71859_early_serial.c"
#include <usbdebug.h>
#include "cpu/x86/mtrr/earlymtrr.c"
#define SERIAL_DEV PNP_DEV(0x4e, SMSCSUPERIO_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
void main(unsigned long bist)
{
/* Set southbridge and Super I/O GPIOs. */
#define SERIAL_DEV PNP_DEV(0x2e, W83627THG_SP1)
-void enable_smbus(void);
-
void setup_ich7_gpios(void)
{
/* TODO: This is highly board specific and should be moved */
#include "northbridge/amd/amdfam10/reset_test.c"
#include <console/loglevel.h>
#include "cpu/x86/bist.h"
-static int smbus_read_byte(u32 device, u32 address);
#include "superio/fintek/f71863fg/f71863fg_early_serial.c"
#include <usbdebug.h>
#include "cpu/x86/mtrr/earlymtrr.c"
#include <console/console.h>
#include <cpu/x86/bist.h>
#include "superio/winbond/w83627thg/w83627thg_early_serial.c"
-void enable_smbus(void);
#include "northbridge/intel/i945/i945.h"
#include "northbridge/intel/i945/raminit.h"
#include "southbridge/intel/i82801gx/i82801gx.h"
#define SERIAL_DEV PNP_DEV(0x4e, SMSCSUPERIO_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
void main(unsigned long bist)
{
smscsuperio_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
#define SERIAL_DEV PNP_DEV(0x3f0, W83977TF_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
#define SERIAL_DEV PNP_DEV(0x3f0, W83977TF_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
#define SERIAL_DEV PNP_DEV(0x3f0, W83977TF_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
#define SERIAL_DEV PNP_DEV(0x2e, W83627HF_SP1)
#define DUMMY_DEV PNP_DEV(0x2e, 0)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
void main(unsigned long bist)
{
w83627hf_set_clksel_48(DUMMY_DEV);
#define SERIAL_DEV PNP_DEV(0x2e, SMSCSUPERIO_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
void main(unsigned long bist)
{
smscsuperio_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
#define SERIAL_DEV PNP_DEV(0x3f0, SMSCSUPERIO_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
#include "northbridge/intel/i945/raminit.h"
#include "southbridge/intel/i82801gx/i82801gx.h"
-void enable_smbus(void);
-
void setup_ich7_gpios(void)
{
printk(BIOS_DEBUG, " GPIOS...");
#define SERIAL_DEV PNP_DEV(0x370, IT8671F_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
#define SERIAL_DEV PNP_DEV(0x2e, PC87309_SP1)
-void enable_smbus(void);
-int smbus_read_byte(u8 device, u8 address);
-
int spd_read_byte(unsigned int device, unsigned int address)
{
return smbus_read_byte(device, address);
void i945_early_initialization(void);
void i945_late_initialization(void);
-/* provided by southbridge code */
-int smbus_read_byte(unsigned device, unsigned address);
-
/* provided by mainboard code */
void setup_ich7_gpios(void);
#endif
#endif
+#if defined(__PRE_RAM__) && !defined(__ROMCC__)
+void enable_smbus(void);
+int smbus_read_byte(u8 device, u8 address);
+void enable_pm(void);
+#endif
+
/* If 'cond' is true this macro sets the bit(s) specified by 'bits' in the
* 'reg' variable, otherwise it clears those bits.
*
#include <console/console.h>
#include "i82371eb.h"
-void enable_pm(void);
-
void enable_pm(void)
{
device_t dev;
#include "i82371eb.h"
#include "i82371eb_smbus.h"
-int smbus_read_byte(u8 device, u8 address);
-
void enable_smbus(void)
{
device_t dev;
#include <device/smbus_def.h>
+#include "i82371eb.h"
#define SMBHST_STATUS 0x0
#define SMBHST_CTL 0x2
#define SMBUS_STATUS_MASK 0x1e
#define SMBUS_ERROR_FLAG (1<<2)
-void enable_smbus(void);
int do_smbus_read_byte(unsigned smbus_io_base, unsigned device, unsigned address);
static inline void smbus_delay(void)
#if !defined(__PRE_RAM__)
#include "chip.h"
-extern void i82801ax_enable(device_t dev);
+void i82801ax_enable(device_t dev);
+#endif
+
+#if defined(__PRE_RAM__) && !defined(__ROMCC__)
+void enable_smbus(void);
+int smbus_read_byte(u8 device, u8 address);
#endif
#define SMBUS_IO_BASE 0x0f00
#include "i82801ax.h"
#include "i82801ax_smbus.h"
-int smbus_read_byte(u8 device, u8 address);
-
void enable_smbus(void)
{
device_t dev;
*/
#include <device/smbus_def.h>
+#include "i82801ax.h"
-void enable_smbus(void);
int do_smbus_read_byte(u16 smbus_io_base, u8 device, u8 address);
static void smbus_delay(void)
extern void i82801bx_enable(device_t dev);
#endif
+#if defined(__PRE_RAM__) && !defined(__ROMCC__)
+void enable_smbus(void);
+int smbus_read_byte(u8 device, u8 address);
+#endif
+
#define SMBUS_IO_BASE 0x0f00
#define PMBASE_ADDR 0x0400
#define GPIO_BASE_ADDR 0x0500
#include "i82801bx.h"
#include "i82801bx_smbus.h"
-int smbus_read_byte(u8 device, u8 address);
-
void enable_smbus(void)
{
device_t dev;
#include <device/smbus_def.h>
-void enable_smbus(void);
-
static void smbus_delay(void)
{
inb(0x80);
void i82801gx_enable_usbdebug(unsigned int port);
#endif
+#if defined(__PRE_RAM__) && !defined(__ROMCC__) && !defined(ASSEMBLY)
+void enable_smbus(void);
+int smbus_read_byte(unsigned device, unsigned address);
+#endif
+
#define MAINBOARD_POWER_OFF 0
#define MAINBOARD_POWER_ON 1
#define MAINBOARD_POWER_KEEP 2
#include "i82801gx.h"
#include "i82801gx_smbus.h"
-int smbus_read_byte(unsigned device, unsigned address);
-
void enable_smbus(void)
{
device_t dev;
*/
#include <device/smbus_def.h>
-
-void enable_smbus(void);
+#include "i82801gx.h"
static void smbus_delay(void)
{