e0d377a9cdc75cc7d1de3f567f029c72aebdd753
[coreboot.git] / src / southbridge / intel / i82801cx / i82801cx.h
1 #ifndef I82801CX_H
2 #define I82801CX_H
3
4 #if !defined(__PRE_RAM__)
5 #include <device/device.h>
6 #include "chip.h"
7 void i82801cx_enable(device_t dev);
8 void i82801cx_hard_reset(void);
9 #endif
10
11
12 #define PCI_DMA_CFG     0x90
13 #define SERIRQ_CNTL     0x64
14 #define GEN_CNTL        0xd0
15 #define GEN_STS         0xd4
16 #define RTC_CONF        0xd8
17 #define GEN_PMCON_3     0xa4
18
19 #define PMBASE          0x40
20 #define ACPI_CNTL       0x44
21 #define BIOS_CNTL       0x4E
22 #define GPIO_BASE       0x58
23 #define GPIO_CNTL       0x5C
24 #define PIRQA_ROUT      0x60
25 #define PIRQE_ROUT      0x68
26 #define COM_DEC         0xE0
27 #define LPC_EN          0xE6
28 #define FUNC_DIS        0xF2
29
30 // GEN_PMCON_3 bits
31 #define RTC_BATTERY_DEAD                (1<<2)
32 #define RTC_POWER_FAILED                (1<<1)
33 #define SLEEP_AFTER_POWER_FAIL  (1<<0)
34
35 /********************************************************************/
36 /*                                                      IDE Controller                          */
37 /********************************************************************/
38
39 // PCI Configuration Space (D31:F1)
40 #define IDE_TIM_PRI             0x40            // IDE timings, primary
41 #define IDE_TIM_SEC             0x42            // IDE timings, secondary
42
43
44 // IDE_TIM bits
45 #define IDE_DECODE_ENABLE       (1<<15)
46
47 /********************************************************************/
48 /*                                                              SMBus                               */
49 /********************************************************************/
50
51 // PCI Configuration Space (D31:F3)
52 #define SMB_BASE        0x20
53 #define HOSTC           0x40
54
55 // HOSTC bits
56 #define I2C_EN          (1<<2)
57 #define SMB_SMI_EN      (1<<1)
58 #define HST_EN          (1<<0)
59
60 #define SMBUS_IO_BASE 0x1000
61
62 // I/O registers (relative to SMBUS_IO_BASE)
63 #define SMBHSTSTAT              0
64 #define SMBHSTCTL               2
65 #define SMBHSTCMD               3
66 #define SMBXMITADD              4
67 #define SMBHSTDAT0              5
68 #define SMBHSTDAT1              6
69 #define SMBBLKDAT               7
70 #define SMBTRNSADD              9
71 #define SMBSLVDATA              10
72 #define SMLINK_PIN_CTL  14
73 #define SMBUS_PIN_CTL   15
74
75 /* Between 1-10 seconds, We should never timeout normally
76  * Longer than this is just painful when a timeout condition occurs.
77  */
78 #define SMBUS_TIMEOUT (100*1000)
79
80 #endif /* I82801CX_H */