Please bear with me - another rename checkin. This qualifies as trivial, no
[coreboot.git] / src / southbridge / intel / i82371eb / i82371eb.h
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2007 Uwe Hermann <uwe@hermann-uwe.de>
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_I82371EB_I82371EB_H
22 #define SOUTHBRIDGE_INTEL_I82371EB_I82371EB_H
23
24 #ifndef __ROMCC__
25 #include "chip.h"
26 void i82371eb_enable(device_t dev);
27 #endif
28
29 /* If 'cond' is true this macro sets the bit(s) specified by 'bits' in the
30  * 'reg' variable, otherwise it clears those bits.
31  *
32  * Examples:
33  * reg16 = ONOFF(conf->ide0_enable, reg16, (1 << 5));
34  * reg16 = ONOFF(conf->ide0_enable, reg16, (FOO | BAR));
35  */
36 /* TODO: Move into some global header file? */
37 #define ONOFF(cond,reg,bits) ((cond) ? ((reg) | (bits)) : ((reg) & ~(bits)))
38
39 #define XBCS            0x4e    /* X-Bus chip select register */
40 #define GENCFG          0xb0    /* General configuration register */
41 #define RC              0xcf9   /* Reset control register */
42
43 /* IDE */
44 #define IDETIM_PRI      0x40    /* IDE timing register, primary channel */
45 #define IDETIM_SEC      0x42    /* IDE timing register, secondary channel */
46 #define UDMACTL         0x48    /* Ultra DMA/33 control register */
47 #define UDMATIM         0x4a    /* Ultra DMA/33 timing register */
48
49 /* SMBus */
50 #define SMBBA           0x90    /* SMBus base address */
51 #define SMBHSTCFG       0xd2    /* SMBus host configuration */
52
53 /* Power management (ACPI) */
54 #define PMBA            0x40    /* Power management base address */
55 #define PMREGMISC       0x80    /* Miscellaneous power management */
56
57 /* Bit definitions */
58 #define EXT_BIOS_ENABLE_1MB     (1 << 9)  /* 1-Meg Extended BIOS Enable */
59 #define EXT_BIOS_ENABLE         (1 << 7)  /* Extended BIOS Enable */
60 #define LOWER_BIOS_ENABLE       (1 << 6)  /* Lower BIOS Enable */
61 #define WRITE_PROTECT_ENABLE    (1 << 2)  /* Write Protect Enable */
62 #define SRST                    (1 << 1)  /* System Reset */
63 #define RCPU                    (1 << 2)  /* Reset CPU */
64 #define SMB_HST_EN              (1 << 0)  /* Host Interface Enable */
65 #define IDE_DECODE_ENABLE       (1 << 15) /* IDE Decode Enable */
66 #define DTE0                    (1 << 3)  /* DMA Timing Enable Only, drive 0 */
67 #define DTE1                    (1 << 7)  /* DMA Timing Enable Only, drive 1 */
68 #define PSDE0                   (1 << 0)  /* Primary Drive 0 UDMA/33 */
69 #define PSDE1                   (1 << 1)  /* Primary Drive 1 UDMA/33 */
70 #define SSDE0                   (1 << 2)  /* Secondary Drive 0 UDMA/33 */
71 #define SSDE1                   (1 << 3)  /* Secondary Drive 1 UDMA/33 */
72 #define ISA                     (1 << 0)  /* Select ISA */
73 #define EIO                     (0 << 0)  /* Select EIO */
74
75 #endif /* SOUTHBRIDGE_INTEL_I82371EB_I82371EB_H */