| 1 |
|
| 2 |
|
| 3 |
#include <device/pci_ops.h> |
| 4 |
#include <static_devices.h> |
| 5 |
#include <arch/bootblock.h> |
| 6 |
|
| 7 |
#define MISC_CONFIG_1 0x94 |
| 8 |
#define SMBUS_CLOCK_SELECT (1 << 7) |
| 9 |
|
| 10 |
#define GP2_GP3_TIMER_CONTROL 0x98 |
| 11 |
#define GP3_TIMER_TICK_SELECT (3 << 4) |
| 12 |
|
| 13 |
#define SMBUS_IO_BASE 0xd0 |
| 14 |
#define SMBUS_HOST_CONFIG 0xd2 |
| 15 |
#define SMBUS_CLOCK_FROM_128K (1 << 2) |
| 16 |
#define SMBUS_ENABLE (1 << 0) |
| 17 |
|
| 18 |
void bootblock_early_northbridge_init(void) |
| 19 |
{ |
| 20 |
pci_and_config8(_sdev_lpc, GP2_GP3_TIMER_CONTROL, ~GP3_TIMER_TICK_SELECT); |
| 21 |
|
| 22 |
pci_and_config8(_sdev_lpc, MISC_CONFIG_1, (u8)~SMBUS_CLOCK_SELECT); |
| 23 |
pci_write_config16(_sdev_lpc, SMBUS_IO_BASE, CONFIG_FIXED_SMBUS_IO_BASE); |
| 24 |
pci_or_config8(_sdev_lpc, SMBUS_HOST_CONFIG, SMBUS_CLOCK_FROM_128K | SMBUS_ENABLE); |
| 25 |
} |