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