summaryrefslogtreecommitdiffstats
path: root/src/mainboard/apple/macbook21/romstage.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2019-11-11 19:12:57 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-11-14 11:30:09 +0000
commit399b6c11efaff64cb86a879dc9047a97538e790f (patch)
treeab3a75f247654a8f6c97d75b5dd4d79fe58d3f9e /src/mainboard/apple/macbook21/romstage.c
parent949ff57bcaa3bf7e196b36c90124989a36ba93a5 (diff)
downloadcoreboot-399b6c11efaff64cb86a879dc9047a97538e790f.tar.gz
coreboot-399b6c11efaff64cb86a879dc9047a97538e790f.tar.bz2
coreboot-399b6c11efaff64cb86a879dc9047a97538e790f.zip
sb/intel/i82801gx: Add common early code
Remove some of the code duplication on i82801gx. x4x boards are left untouched for now since that northbridge also supports i82801jx. The order of some things has changed: - on i945 early_ich7_init is now done before the raminit - enabling the IOAPIC is done before the raminit Change-Id: Ie39549938891e17667a8819b49a78b9c71c8ec9e Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36754 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/apple/macbook21/romstage.c')
-rw-r--r--src/mainboard/apple/macbook21/romstage.c36
1 files changed, 1 insertions, 35 deletions
diff --git a/src/mainboard/apple/macbook21/romstage.c b/src/mainboard/apple/macbook21/romstage.c
index aced71ce6a85..41c0e9f384ec 100644
--- a/src/mainboard/apple/macbook21/romstage.c
+++ b/src/mainboard/apple/macbook21/romstage.c
@@ -48,9 +48,6 @@ static void rcba_config(void)
RCBA16(D28IR) = 0x3201;
RCBA16(D27IR) = 0x3216;
- /* Enable IOAPIC */
- RCBA8(OIC) = 0x03;
-
/* Disable unused devices */
RCBA32(FD) |= FD_INTLAN;
@@ -61,35 +58,6 @@ static void rcba_config(void)
RCBA32(0x1e98) = 0x000c0801;
}
-static void early_ich7_init(void)
-{
- uint8_t reg8;
- uint32_t reg32;
-
- /* program secondary mlt XXX byte? */
- pci_write_config8(PCI_DEV(0, 0x1e, 0), SMLT, 0x20);
-
- /* reset rtc power status */
- reg8 = pci_read_config8(PCI_DEV(0, 0x1f, 0), GEN_PMCON_3);
- reg8 &= ~RTC_BATTERY_DEAD;
- pci_write_config8(PCI_DEV(0, 0x1f, 0), GEN_PMCON_3, reg8);
-
- /* usb transient disconnect */
- reg8 = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xad);
- reg8 |= (3 << 0);
- pci_write_config8(PCI_DEV(0, 0x1f, 0), 0xad, reg8);
-
- reg32 = pci_read_config32(PCI_DEV(0, 0x1d, 7), 0xfc);
- reg32 |= (1 << 29) | (1 << 17);
- pci_write_config32(PCI_DEV(0, 0x1d, 7), 0xfc, reg32);
-
- reg32 = pci_read_config32(PCI_DEV(0, 0x1d, 7), 0xdc);
- reg32 |= (1 << 31) | (1 << 27);
- pci_write_config32(PCI_DEV(0, 0x1d, 7), 0xdc, reg32);
-
- ich7_setup_cir();
-}
-
void mainboard_romstage_entry(void)
{
int s3resume = 0;
@@ -111,6 +79,7 @@ void mainboard_romstage_entry(void)
/* Perform some early chipset initialization required
* before RAM initialization can work
*/
+ i82801gx_early_init();
i945_early_initialization();
s3resume = southbridge_detect_s3_resume();
@@ -123,9 +92,6 @@ void mainboard_romstage_entry(void)
sdram_initialize(s3resume ? 2 : 0, spd_addrmap);
- /* Perform some initialization that must run before stage2 */
- early_ich7_init();
-
/* This should probably go away. Until now it is required
* and mainboard specific
*/