diff options
author | Mike Banon <mikebdp2@gmail.com> | 2019-12-20 11:08:35 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-01-21 10:57:19 +0000 |
commit | 33768dd08b9ba3be151c2c1b20d953c0b2475e85 (patch) | |
tree | 2e65c12296be8b3f2ed0fd457e0f11afaaa64bad /src | |
parent | 73692e8b7729baa70263ab652e8436271caa4da4 (diff) |
biostar/a68n_5200: Switch away from ROMCC_BOOTBLOCK
Following the example of change CB:37737 (ee8f969).
Switching was done by moving a SIO configuration and
the clocks setup from 'romstage.c' to 'bootblock.c'.
Tested-by: Damien Zammit <damien@zamaudio.com>
Signed-off-by: Mike Banon <mikebdp2@gmail.com>
Signed-off-by: Damien Zammit <damien@zamaudio.com>
Change-Id: I2e710ac61843c09a055523c7971e4c05bae56a37
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37872
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/biostar/a68n_5200/Kconfig | 4 | ||||
-rw-r--r-- | src/mainboard/biostar/a68n_5200/Kconfig.name | 4 | ||||
-rw-r--r-- | src/mainboard/biostar/a68n_5200/Makefile.inc | 2 | ||||
-rw-r--r-- | src/mainboard/biostar/a68n_5200/bootblock.c (renamed from src/mainboard/biostar/a68n_5200/romstage.c) | 18 | ||||
-rw-r--r-- | src/mainboard/biostar/a68n_5200/irq_tables.c | 1 |
5 files changed, 14 insertions, 15 deletions
diff --git a/src/mainboard/biostar/a68n_5200/Kconfig b/src/mainboard/biostar/a68n_5200/Kconfig index f608513d0e..e4271d34fe 100644 --- a/src/mainboard/biostar/a68n_5200/Kconfig +++ b/src/mainboard/biostar/a68n_5200/Kconfig @@ -15,14 +15,10 @@ # GNU General Public License for more details. # -config BOARD_BIOSTAR_A68N5200 - def_bool n - if BOARD_BIOSTAR_A68N5200 config BOARD_SPECIFIC_OPTIONS def_bool y - #select ROMCC_BOOTBLOCK select CPU_AMD_AGESA_FAMILY16_KB select NORTHBRIDGE_AMD_AGESA_FAMILY16_KB select SOUTHBRIDGE_AMD_AGESA_YANGTZE diff --git a/src/mainboard/biostar/a68n_5200/Kconfig.name b/src/mainboard/biostar/a68n_5200/Kconfig.name index 6d765d2712..52a7f1511a 100644 --- a/src/mainboard/biostar/a68n_5200/Kconfig.name +++ b/src/mainboard/biostar/a68n_5200/Kconfig.name @@ -1,2 +1,2 @@ -#config BOARD_BIOSTAR_A68N5200 -# bool"A68N-5200" +config BOARD_BIOSTAR_A68N5200 + bool "A68N-5200" diff --git a/src/mainboard/biostar/a68n_5200/Makefile.inc b/src/mainboard/biostar/a68n_5200/Makefile.inc index f8895faa92..4dde2cfd1e 100644 --- a/src/mainboard/biostar/a68n_5200/Makefile.inc +++ b/src/mainboard/biostar/a68n_5200/Makefile.inc @@ -13,6 +13,8 @@ # GNU General Public License for more details. # +bootblock-y += bootblock.c + romstage-y += buildOpts.c romstage-y += BiosCallOuts.c romstage-y += OemCustomize.c diff --git a/src/mainboard/biostar/a68n_5200/romstage.c b/src/mainboard/biostar/a68n_5200/bootblock.c index 5e0cd7c83d..395419b76f 100644 --- a/src/mainboard/biostar/a68n_5200/romstage.c +++ b/src/mainboard/biostar/a68n_5200/bootblock.c @@ -15,14 +15,10 @@ * GNU General Public License for more details. */ -#include <stdint.h> #include <amdblocks/acpimmio.h> -#include <device/pci_def.h> -#include <arch/io.h> +#include <bootblock_common.h> +#include <stdint.h> #include <device/pci_ops.h> -#include <northbridge/amd/agesa/state_machine.h> -#include <southbridge/amd/agesa/hudson/hudson.h> -#include <amdblocks/acpimmio.h> #include <superio/ite/common/ite.h> #include <superio/ite/it8728f/it8728f.h> @@ -32,18 +28,20 @@ static void sbxxx_enable_48mhzout(void) { - /* most likely programming to 48MHz out signal */ u32 reg32; + + /* Set auxiliary output clock frequency on OSCOUT1 pin to be 48MHz */ reg32 = misc_read32(0x28); reg32 &= 0xfff8ffff; misc_write32(0x28, reg32); + /* Enable Auxiliary Clock1, disable FCH 14 MHz OscClk */ reg32 = misc_read32(0x40); reg32 &= 0xffffbffb; misc_write32(0x40, reg32); } -void board_BeforeAgesa(struct sysinfo *cb) +void bootblock_mainboard_early_init(void) { u8 byte; @@ -64,8 +62,10 @@ void board_BeforeAgesa(struct sysinfo *cb) byte |= (1 << 6); /* 0x3f8 */ pci_write_config8(dev, 0x44, byte); - /* run ite */ + /* enable SIO clock */ sbxxx_enable_48mhzout(); + + /* Enable serial output on it8728f */ ite_conf_clkin(CLKIN_DEV, ITE_UART_CLK_PREDIVIDE_48); ite_kill_watchdog(GPIO_DEV); ite_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE); diff --git a/src/mainboard/biostar/a68n_5200/irq_tables.c b/src/mainboard/biostar/a68n_5200/irq_tables.c index 530c132a05..ab26cbac1f 100644 --- a/src/mainboard/biostar/a68n_5200/irq_tables.c +++ b/src/mainboard/biostar/a68n_5200/irq_tables.c @@ -16,6 +16,7 @@ #include <console/console.h> #include <string.h> #include <stdint.h> +#include <device/pci_def.h> #include <arch/pirq_routing.h> static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn, |