exynos/snow: partial clean-up of snow bootblock using build class

This removes some duplicate code from Snow's mainboard bootblock
by utilizing the bootblock build class.

Change-Id: I153247370a8c5127260082dcdca3ebdc5e104fb8
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/2270
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
David Hendricks
2013-02-03 19:13:36 -08:00
committed by Ronald G. Minnich
parent ad7f98cb01
commit aa6701c090
6 changed files with 55 additions and 273 deletions

View File

@@ -18,7 +18,7 @@ config SATA_AHCI
#
# 0x0202_0000: vendor-provided BL1
# 0x0202_3400: bootblock, assume up to 32KB in size
# 0x0202_2600: ID section, assume 2KB in size. This will be
# 0x0202_7000: ID section, assume 2KB in size. This will be
# within the bootblock section.
# 0x0203_0000: romstage, assume up to 128KB in size.
# 0x0207_7f00: stack pointer
@@ -38,7 +38,7 @@ config BOOTBLOCK_BASE
config ID_SECTION_BASE
hex
default 0x02026000
default 0x02027000
config ROMSTAGE_BASE
hex

View File

@@ -3,6 +3,12 @@
# 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
bootblock-y += clock.c
romstage-y += clock.c
romstage-y += clock_init.c
romstage-y += exynos_cache.c

View File

@@ -597,6 +597,38 @@ static int autodetect_memory(void)
#ifdef CONFIG_SPL_BUILD
#define SIGNATURE 0xdeadbeef
/* Parameters of early board initialization in SPL */
static struct spl_machine_param machine_param = {
.signature = SIGNATURE,
.version = 1,
.params = "vmubfasirMw",
.size = sizeof(machine_param),
.mem_iv_size = 0x1f,
.mem_type = DDR_MODE_DDR3,
/*
* Set uboot_size to 0x100000 bytes.
*
* This is an overly conservative value chosen to accommodate all
* possible U-Boot image. You are advised to set this value to a
* smaller realistic size via scripts that modifies the .machine_param
* section of output U-Boot image.
*/
.uboot_size = 0x100000,
.boot_source = BOOT_MODE_OM,
.frequency_mhz = 800,
.arm_freq_mhz = 1700,
.serial_base = 0x12c30000,
.i2c_base = 0x12c60000,
// .board_rev_gpios = GPIO_D00 | (GPIO_D01 << 16),
.mem_manuf = MEM_MANUF_SAMSUNG,
// .bad_wake_gpio = GPIO_Y10,
};
/**
* Get the required memory type and speed (SPL version).
*
@@ -608,7 +640,7 @@ int clock_get_mem_selection(enum ddr_mode *mem_type,
{
struct spl_machine_param *params;
params = spl_get_machine_params();
params = &machine_param;
*mem_type = params->mem_type;
*frequency_mhz = params->frequency_mhz;
*arm_freq = params->arm_freq_mhz;
@@ -719,7 +751,7 @@ struct arm_clk_ratios *get_arm_ratios(void)
return arm_ratio;
}
die("get_arm_ratios: Failed to find ratio\n");
// die("get_arm_ratios: Failed to find ratio\n");
return NULL;
}

View File

@@ -1,3 +1,6 @@
bootblock-y += pwm.c
bootblock-y += timer.c
romstage-y += cpu_info.c
romstage-y += pwm.c # needed by timer.c
romstage-y += s5p_gpio.c