This patch converts the Geode GX2 boards to CAR.
[coreboot.git] / src / southbridge / amd / cs5535 / cs5535_early_smbus.c
1 #include "cs5535_smbus.h"
2
3 #define SMBUS_IO_BASE 0x6000
4
5 /* initialization for SMBus Controller */
6 static void cs5535_enable_smbus(void)
7 {
8         unsigned char val;
9
10         /* reset SMBUS controller */
11         outb(0, SMBUS_IO_BASE + SMB_CTRL2);
12
13         /* Set SCL freq and enable SMB controller */
14         val = inb(SMBUS_IO_BASE + SMB_CTRL2);
15         val |= ((0x20 << 1) | SMB_CTRL2_ENABLE);
16         outb(val, SMBUS_IO_BASE + SMB_CTRL2);
17
18         /* Setup SMBus host controller address to 0xEF */
19         val = inb(SMBUS_IO_BASE + SMB_ADD);
20         val |= (0xEF | SMB_ADD_SAEN);
21         outb(val, SMBUS_IO_BASE + SMB_ADD);
22 }