[coreboot] Patch set updated for coreboot: 77710f5 armv7/snow: Simplify bootblock.

Hung-Te Lin (hungte@chromium.org) gerrit at coreboot.org
Thu Feb 7 13:11:29 CET 2013


Hung-Te Lin (hungte at chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2308

-gerrit

commit 77710f5a8e9731d4d2450ee2a6be1a234c1464bf
Author: Hung-Te Lin <hungte at chromium.org>
Date:   Thu Feb 7 13:22:29 2013 +0800

    armv7/snow: Simplify bootblock.
    
    I2C, power, and max77686 are not always required in bootblock stage.
    We only need SPI and clock to load romstage.
    
    Change-Id: Ic863e222871a157ba4279a673775b1e18c6eac0d
    Signed-off-by: Hung-Te Lin <hungte at chromium.org>
---
 src/cpu/samsung/exynos5250/Makefile.inc | 11 ++++-------
 src/cpu/samsung/s5p-common/Makefile.inc |  1 -
 src/drivers/maxim/max77686/Makefile.inc |  1 -
 src/mainboard/google/snow/Makefile.inc  |  4 ----
 src/mainboard/google/snow/bootblock.c   | 21 ---------------------
 src/mainboard/google/snow/romstage.c    | 10 +++++++++-
 6 files changed, 13 insertions(+), 35 deletions(-)

diff --git a/src/cpu/samsung/exynos5250/Makefile.inc b/src/cpu/samsung/exynos5250/Makefile.inc
index 7e11536..3aff95c 100644
--- a/src/cpu/samsung/exynos5250/Makefile.inc
+++ b/src/cpu/samsung/exynos5250/Makefile.inc
@@ -3,14 +3,11 @@
 # image outside of CBFS
 #INTERMEDIATE += exynos5250_add_bl1
 
-# Clock init is done in bootblock to support UART output for
-# debugging. We may add a Kconfig option to disable clock init
-# in the bootblock and try moving it entirely into romstage.
-bootblock-y += clock_init.c
+# clock and clock_init are included for SPI to work.
 bootblock-y += clock.c
-bootblock-y += pinmux.c
-bootblock-y += power.c
-bootblock-y += soc.c
+bootblock-y += clock_init.c
+bootblock-$(CONFIG_EARLY_CONSOLE) += pinmux.c
+bootblock-$(CONFIG_EARLY_CONSOLE) += soc.c
 bootblock-$(CONFIG_EARLY_CONSOLE) += uart.c
 
 romstage-y += clock.c
diff --git a/src/cpu/samsung/s5p-common/Makefile.inc b/src/cpu/samsung/s5p-common/Makefile.inc
index 621576d..0f4200c 100644
--- a/src/cpu/samsung/s5p-common/Makefile.inc
+++ b/src/cpu/samsung/s5p-common/Makefile.inc
@@ -1,5 +1,4 @@
 bootblock-y += pwm.c
-bootblock-y += s3c24x0_i2c.c
 bootblock-y += s5p_gpio.c
 bootblock-y += timer.c
 
diff --git a/src/drivers/maxim/max77686/Makefile.inc b/src/drivers/maxim/max77686/Makefile.inc
index 097b291..a5d7b90 100644
--- a/src/drivers/maxim/max77686/Makefile.inc
+++ b/src/drivers/maxim/max77686/Makefile.inc
@@ -17,6 +17,5 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-bootblock-$(CONFIG_DRIVER_MAXIM_MAX77686) += max77686.c
 romstage-$(CONFIG_DRIVER_MAXIM_MAX77686) += max77686.c
 ramstage-$(CONFIG_DRIVER_MAXIM_MAX77686) += max77686.c
diff --git a/src/mainboard/google/snow/Makefile.inc b/src/mainboard/google/snow/Makefile.inc
index 04bf543..b56a1a4 100644
--- a/src/mainboard/google/snow/Makefile.inc
+++ b/src/mainboard/google/snow/Makefile.inc
@@ -17,10 +17,6 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 ##
 
-# needed for system_clock_init()
-bootblock-y += mainboard.c
-bootblock-y += memory.c
-
 romstage-y += mainboard.c
 romstage-y += memory.c
 romstage-y += romstage.c
diff --git a/src/mainboard/google/snow/bootblock.c b/src/mainboard/google/snow/bootblock.c
index 0bee055..b220112 100644
--- a/src/mainboard/google/snow/bootblock.c
+++ b/src/mainboard/google/snow/bootblock.c
@@ -17,32 +17,11 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include <types.h>
-#include <arch/io.h>
-#include <device/i2c.h>
-#include <cpu/samsung/exynos5250/clk.h>
-#include <cpu/samsung/exynos5250/dmc.h>
-#include <cpu/samsung/exynos5250/periph.h>
-#include <cpu/samsung/exynos5250/clock_init.h>
-#include <src/cpu/samsung/exynos5250/power.h>
-#include <drivers/maxim/max77686/max77686.h>
 #include <console/console.h>
 
-#define I2C0_BASE	0x12c60000
-
 void bootblock_mainboard_init(void);
 void bootblock_mainboard_init(void)
 {
-	struct mem_timings *mem;
-	struct arm_clk_ratios *arm_ratios;
-
-	i2c_set_early_reg(I2C0_BASE);
-	i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-	power_init();
-	mem = get_mem_timings();
-	arm_ratios = get_arm_clk_ratios();
-	system_clock_init(mem, arm_ratios);
-
 	console_init();
 	printk(BIOS_INFO, "\n\n\n%s: UART initialized\n", __func__);
 }
diff --git a/src/mainboard/google/snow/romstage.c b/src/mainboard/google/snow/romstage.c
index b8e5116..c96dc2b 100644
--- a/src/mainboard/google/snow/romstage.c
+++ b/src/mainboard/google/snow/romstage.c
@@ -24,6 +24,7 @@
 #include <cbfs.h>
 #include <common.h>
 
+#include <cpu/samsung/exynos5250/clock_init.h>
 #include <cpu/samsung/exynos5250/dmc.h>
 #include <cpu/samsung/exynos5250/setup.h>
 
@@ -47,9 +48,10 @@ static int board_wakeup_permitted(void)
 
 void main(void)
 {
-	struct mem_timings *mem;
 	int ret;
 	void *entry;
+	struct mem_timings *mem;
+	struct arm_clk_ratios *arm_ratios;
 
 	console_init();
 	printk(BIOS_INFO, "hello from romstage\n");
@@ -59,6 +61,12 @@ void main(void)
 		printk(BIOS_CRIT, "Unable to auto-detect memory timings\n");
 		while(1);
 	}
+	arm_ratios = get_arm_clk_ratios();
+	system_clock_init(mem, arm_ratios);
+
+	/* Re-initialize console in case clock is changed. */
+	console_init();
+
 	printk(BIOS_SPEW, "man: 0x%x type: 0x%x, div: 0x%x, mhz: 0x%x\n",
 		mem->mem_manuf,
 		mem->mem_type,



More information about the coreboot mailing list