From bc518d5cab4234a0d0d06a7d3829bbca9e318ba6 Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Mon, 30 May 2016 15:01:06 -0700 Subject: quark: Enable HSUART0 as console The use of HSUART0 on galileo requires early initialization of the I2C GPIO expanders to direct the RXD and TXD signals to DIGITAL 0 and 1 on the expansion connector. TEST=None Change-Id: I11195d79e954c1f6bc91eafe257d7ddc1310b2e7 Signed-off-by: Lee Leahy Reviewed-on: https://review.coreboot.org/15010 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/soc/intel/quark/romstage/romstage.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/soc/intel/quark/romstage/romstage.c') diff --git a/src/soc/intel/quark/romstage/romstage.c b/src/soc/intel/quark/romstage/romstage.c index 5be022a8d6..e27aa685be 100644 --- a/src/soc/intel/quark/romstage/romstage.c +++ b/src/soc/intel/quark/romstage/romstage.c @@ -67,6 +67,13 @@ static const struct reg_script hsuart_init[] = { void car_soc_pre_console_init(void) { + /* Initialize the controllers */ + reg_script_run_on_dev(I2CGPIO_BDF, i2c_gpio_controller_init); + reg_script_run_on_dev(LPC_BDF, legacy_gpio_init); + + /* Enable the HSUART */ + if (IS_ENABLED(CONFIG_ENABLE_BUILTIN_HSUART0)) + reg_script_run_on_dev(HSUART0_BDF, hsuart_init); if (IS_ENABLED(CONFIG_ENABLE_BUILTIN_HSUART1)) reg_script_run_on_dev(HSUART1_BDF, hsuart_init); } @@ -74,11 +81,6 @@ void car_soc_pre_console_init(void) void car_soc_post_console_init(void) { report_platform_info(); - - /* Initialize the controllers */ - reg_script_run_on_dev(I2CGPIO_BDF, i2c_gpio_controller_init); - reg_script_run_on_dev(LPC_BDF, legacy_gpio_init); - mainboard_gpio_init(); }; static struct chipset_power_state power_state CAR_GLOBAL; -- cgit v1.2.3