summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/samsung/exynos5250/Kconfig4
-rw-r--r--src/cpu/samsung/exynos5250/Makefile.inc6
-rw-r--r--src/cpu/samsung/exynos5250/clock_init.c36
-rw-r--r--src/cpu/samsung/s5p-common/Makefile.inc3
4 files changed, 45 insertions, 4 deletions
diff --git a/src/cpu/samsung/exynos5250/Kconfig b/src/cpu/samsung/exynos5250/Kconfig
index 41a1446ef2..ec1d7af558 100644
--- a/src/cpu/samsung/exynos5250/Kconfig
+++ b/src/cpu/samsung/exynos5250/Kconfig
@@ -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
diff --git a/src/cpu/samsung/exynos5250/Makefile.inc b/src/cpu/samsung/exynos5250/Makefile.inc
index 6eee50328f..db28221179 100644
--- a/src/cpu/samsung/exynos5250/Makefile.inc
+++ b/src/cpu/samsung/exynos5250/Makefile.inc
@@ -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
diff --git a/src/cpu/samsung/exynos5250/clock_init.c b/src/cpu/samsung/exynos5250/clock_init.c
index 421d880fa7..53bab1a53a 100644
--- a/src/cpu/samsung/exynos5250/clock_init.c
+++ b/src/cpu/samsung/exynos5250/clock_init.c
@@ -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;
}
diff --git a/src/cpu/samsung/s5p-common/Makefile.inc b/src/cpu/samsung/s5p-common/Makefile.inc
index 7de3c285d2..df67573b84 100644
--- a/src/cpu/samsung/s5p-common/Makefile.inc
+++ b/src/cpu/samsung/s5p-common/Makefile.inc
@@ -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