Drop #defines for registers that are not existant on the ICH7.
[coreboot.git] / src / southbridge / intel / i82801gx / i82801gx.h
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2008 coresystems GmbH
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
19  */
20
21 #ifndef SOUTHBRIDGE_INTEL_I82801GX_I82801GX_H
22 #define SOUTHBRIDGE_INTEL_I82801GX_I82801GX_H
23
24 #include "chip.h"
25 extern void i82801gx_enable(device_t dev);
26
27 #define SERIRQ_CNTL             0x64
28
29 #define GEN_PMCON_1             0xa0
30 #define GEN_PMCON_2             0xa2
31 #define GEN_PMCON_3             0xa4
32
33 /* GEN_PMCON_3 bits */
34 #define RTC_BATTERY_DEAD        (1 << 2)
35 #define RTC_POWER_FAILED        (1 << 1)
36 #define SLEEP_AFTER_POWER_FAIL  (1 << 0)
37
38 #define PMBASE                  0x40
39 #define ACPI_CNTL               0x44
40 #define BIOS_CNTL               0xDC
41 #define GPIO_BASE               0x48 /* LPC GPIO Base Address Register */
42 #define GPIO_CNTL               0x4C /* LPC GPIO Control Register */
43
44 #define PIRQA_ROUT              0x60
45 #define PIRQB_ROUT              0x61
46 #define PIRQC_ROUT              0x62
47 #define PIRQD_ROUT              0x63
48 #define PIRQE_ROUT              0x68
49 #define PIRQF_ROUT              0x69
50 #define PIRQG_ROUT              0x6A
51 #define PIRQH_ROUT              0x6B
52
53 #define LPC_IO_DEC              0x80 /* IO Decode Ranges Register */
54 #define LPC_EN                  0x82 /* LPC IF Enables Register */
55
56 /* PCI Configuration Space (D31:F1): IDE */
57 #define INTR_LN                 0x3c
58 #define IDE_TIM_PRI             0x40    /* IDE timings, primary */
59 #define   IDE_DECODE_ENABLE     (1 << 15)
60 #define   IDE_SITRE             (1 << 14)
61 #define IDE_TIM_SEC             0x42    /* IDE timings, secondary */
62 #define IDE_CONFIG              0x54    /* IDE I/O Configuration Register */
63 #define   SIG_MODE_NORMAL       (0 << 16)
64 #define   SIG_MODE_TRISTATE     (1 << 16)
65 #define   SIG_MODE_DRIVELOW     (2 << 16)
66 #define   FAST_PCB1             (1 << 13)
67 #define   FAST_PCB0             (1 << 12)
68 #define   PCB1                  (1 <<  1)
69 #define   PCB0                  (1 <<  0)
70
71 /* PCI Configuration Space (D31:F3): SMBus */
72 #define SMB_BASE                0x20
73 #define HOSTC                   0x40
74
75 /* HOSTC bits */
76 #define I2C_EN                  (1 << 2)
77 #define SMB_SMI_EN              (1 << 1)
78 #define HST_EN                  (1 << 0)
79
80 /* SMBus I/O bits.
81  * TODO: It does not matter where we put the SMBus IO base, as long as we keep
82  * consistent and don't interfere with other devices. Stage2 will relocate 
83  * this anyways. But it's a general problem we have not solved in the brightest
84  * possible way.
85  */
86 /* #define SMBUS_IO_BASE 0x1000 */
87 #define SMBUS_IO_BASE           0x0400
88
89 #define SMBHSTSTAT              0x0
90 #define SMBHSTCTL               0x2
91 #define SMBHSTCMD               0x3
92 #define SMBXMITADD              0x4
93 #define SMBHSTDAT0              0x5
94 #define SMBHSTDAT1              0x6
95 #define SMBBLKDAT               0x7
96 #define SMBTRNSADD              0x9
97 #define SMBSLVDATA              0xa
98 #define SMLINK_PIN_CTL          0xe
99 #define SMBUS_PIN_CTL           0xf
100
101 #define SMBUS_TIMEOUT           (10 * 1000 * 100)
102
103 /* HPET, if present */
104 #define HPET_ADDR               0xfed0000
105
106 #endif                          /* SOUTHBRIDGE_INTEL_I82801GX_I82801GX_H */