diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2019-11-12 20:37:21 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-11-15 16:45:36 +0000 |
commit | dc584c3f221bb59ee6b89e5517617b9d1d74bcf3 (patch) | |
tree | eb17076271066e5c271742227f76720b28da6d16 /src/mainboard/roda/rk886ex | |
parent | bf53acca5e9c6b61086e42eb9e73fd4bb59a6f31 (diff) |
nb/intel/i945: Move boilerplate romstage to a common location
This adds callbacks for mainboard specific init.
Change-Id: Ib67bc492a7b7f02f9b57a52fd6730e16501b436e
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36787
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/roda/rk886ex')
-rw-r--r-- | src/mainboard/roda/rk886ex/romstage.c | 56 |
1 files changed, 4 insertions, 52 deletions
diff --git a/src/mainboard/roda/rk886ex/romstage.c b/src/mainboard/roda/rk886ex/romstage.c index f1a638dad1..388c61a9a6 100644 --- a/src/mainboard/roda/rk886ex/romstage.c +++ b/src/mainboard/roda/rk886ex/romstage.c @@ -20,18 +20,13 @@ #include <device/pnp_ops.h> #include <device/pci_ops.h> #include <device/pci_def.h> -#include <cpu/x86/lapic.h> #include <pc80/mc146818rtc.h> -#include <console/console.h> -#include <arch/romstage.h> #include <northbridge/intel/i945/i945.h> -#include <northbridge/intel/i945/raminit.h> #include <southbridge/intel/i82801gx/i82801gx.h> -#include <southbridge/intel/common/pmclib.h> #include "option_table.h" /* Override the default lpc decode ranges */ -static void mb_lpc_decode(void) +void mainboard_lpc_decode(void) { int lpt_en = 0; if (read_option(lpt, 0) != 0) @@ -59,7 +54,7 @@ static void pnp_exit_ext_func_mode(pnp_devfn_t dev) outb(0xaa, port); } -static void early_superio_config(void) +void mainboard_superio_config(void) { pnp_devfn_t dev; @@ -94,7 +89,7 @@ static void early_superio_config(void) pnp_exit_ext_func_mode(dev); } -static void rcba_config(void) +void mainboard_late_rcba_config(void) { /* Set up virtual channel 0 */ @@ -129,50 +124,7 @@ static void init_artec_dongle(void) outb(0xf4, 0x88); } -void mainboard_romstage_entry(void) +void mainboard_pre_raminit_config(int s3_resume) { - int s3resume = 0; - - enable_lapic(); - - i82801gx_lpc_setup(); - mb_lpc_decode(); - early_superio_config(); - - /* Set up the console */ - console_init(); - - if (MCHBAR16(SSKPD) == 0xCAFE) { - system_reset(); - } - - /* Perform some early chipset initialization required - * before RAM initialization can work - */ - i82801gx_early_init(); - i945_early_initialization(); - - /* This has to happen after i945_early_initialization() */ init_artec_dongle(); - - s3resume = southbridge_detect_s3_resume(); - - /* Enable SPD ROMs and DDR-II DRAM */ - enable_smbus(); - - if (CONFIG(DEBUG_RAM_SETUP)) - dump_spd_registers(); - - sdram_initialize(s3resume ? 2 : 0, NULL); - - /* This should probably go away. Until now it is required - * and mainboard specific - */ - rcba_config(); - - /* Chipset Errata! */ - fixup_i945_errata(); - - /* Initialize the internal PCIe links before we go into stage2 */ - i945_late_initialization(s3resume); } |