Get rid of some unneeded function prototypes in romstage.c files.
[coreboot.git] / src / southbridge / intel / i82801ax / i82801ax.h
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2007 Corey Osgood <corey.osgood@gmail.com>
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_I82801AX_I82801AX_H
22 #define SOUTHBRIDGE_INTEL_I82801AX_I82801AX_H
23
24 #if !defined(__PRE_RAM__)
25 #include "chip.h"
26 void i82801ax_enable(device_t dev);
27 #endif
28
29 #if defined(__PRE_RAM__) && !defined(__ROMCC__)
30 void enable_smbus(void);
31 int smbus_read_byte(u8 device, u8 address);
32 #endif
33
34 #define SMBUS_IO_BASE           0x0f00
35 #define PMBASE_ADDR             0x0400
36 #define HPET_ADDR               0xfed00000
37
38 #define PCI_DMA_CFG             0x90
39 #define SERIRQ_CNTL             0x64
40 #define GEN_CNTL                0xd0
41 #define GEN_STA                 0xd4
42 #define RTC_CONF                0xd8
43 #define GEN_PMCON_3             0xa4
44
45 #define PMBASE                  0x40
46 #define ACPI_CNTL               0x44
47 #define ACPI_EN                 (1 << 4)
48 #define BIOS_CNTL               0x4E
49 #define GPIO_BASE               0x58 /* GPIO Base Address Register */
50 #define GPIO_CNTL               0x5C /* GPIO Control Register */
51 #define GPIO_EN                 (1 << 4)
52
53 #define PIRQA_ROUT              0x60
54 #define PIRQB_ROUT              0x61
55 #define PIRQC_ROUT              0x62
56 #define PIRQD_ROUT              0x63
57
58 #define FUNC_DIS                0xF2
59
60 #define COM_DEC                 0xE0 /* LPC I/F Comm. Port Decode Ranges */
61 #define LPC_EN                  0xE6 /* LPC IF Enables */
62
63 // TODO: FDC_DEC etc.
64
65 #define SBUS_NUM                0x19
66 #define SUB_BUS_NUM             0x1A
67 #define SMLT                    0x1B
68 #define IOBASE                  0x1C
69 #define IOLIM                   0x1D
70 #define MEMBASE                 0x20
71 #define MEMLIM                  0x22
72 #define CNF                     0x50
73 #define MTT                     0x70
74 #define PCI_MAST_STS            0x82
75
76 #define TCOBASE                 0x60 /* TCO Base Address Register */
77 #define TCO1_CNT                0x08 /* TCO1 Control Register */
78
79 /* GEN_PMCON_3 bits */
80 #define RTC_BATTERY_DEAD        (1 << 2)
81 #define RTC_POWER_FAILED        (1 << 1)
82 #define SLEEP_AFTER_POWER_FAIL  (1 << 0)
83
84 /* IDE Timing registers (IDE_TIM) */
85 #define IDE_TIM_PRI             0x40    /* IDE timings, primary */
86 #define IDE_TIM_SEC             0x42    /* IDE timings, secondary */
87
88 /* IDE_TIM bits */
89 #define IDE_DECODE_ENABLE       (1 << 15)
90
91 /* SMBus */
92 #define SMB_BASE                0x20
93 #define HOSTC                   0x40
94
95 /* HOSTC bits */
96 #define I2C_EN                  (1 << 2)
97 #define SMB_SMI_EN              (1 << 1)
98 #define HST_EN                  (1 << 0)
99
100 /* SMBus I/O registers. */
101 #define SMBHSTSTAT              0x0
102 #define SMBHSTCTL               0x2
103 #define SMBHSTCMD               0x3
104 #define SMBXMITADD              0x4
105 #define SMBHSTDAT0              0x5
106 #define SMBHSTDAT1              0x6
107 #define SMBBLKDAT               0x7
108
109 #define SMBUS_TIMEOUT           (10 * 1000 * 100)
110
111 #endif