Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4445
-gerrit
commit 7bbb37294e29427b854c569459091be166634123
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Thu Aug 8 14:51:07 2013 -0700
exynos5420: configure SD_0_CDn as VDDEN for eMMC
On Exynos5420 the MMC channel 0 is connected to eMMC
Which does not have a card detection pin. Also this pin
is connected as VDDEN to PMIC.
This is ported from https://gerrit.chromium.org/gerrit/#/c/60732/
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
Change-Id: I19048d22b7dd00df1716b6b5b332a7eb70fe0836
Reviewed-on: https://gerrit.chromium.org/gerrit/65247
Reviewed-by: Gabe Black <gabeblack(a)chromium.org>
Commit-Queue: David Hendricks <dhendrix(a)chromium.org>
Tested-by: David Hendricks <dhendrix(a)chromium.org>
---
src/cpu/samsung/exynos5420/pinmux.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/cpu/samsung/exynos5420/pinmux.c b/src/cpu/samsung/exynos5420/pinmux.c
index 843a6db..573cdb6 100644
--- a/src/cpu/samsung/exynos5420/pinmux.c
+++ b/src/cpu/samsung/exynos5420/pinmux.c
@@ -81,7 +81,14 @@ static void exynos_pinmux_sdmmc(int start, int start_ext)
void exynos_pinmux_sdmmc0(void)
{
exynos_pinmux_sdmmc(GPIO_C00, GPIO_C30);
- gpio_set_pull(GPIO_C02, GPIO_PULL_UP);
+ /*
+ * MMC0 is intended to be used for eMMC. The card detect pin is used
+ * as a VDDEN signal to power on the eMMC. The 5420 iROM makes this
+ * same assumption.
+ */
+ gpio_set_pull(GPIO_C02, GPIO_PULL_NONE);
+ gpio_cfg_pin(GPIO_C02, GPIO_OUTPUT);
+ gpio_set_value(GPIO_C02, 1);
}
void exynos_pinmux_sdmmc1(void)
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4433
-gerrit
commit 0edce442c173f3717bd552423ec9e223d348b0b4
Author: Hung-Te Lin <hungte(a)chromium.org>
Date: Tue Aug 6 10:48:48 2013 +0800
armv7/exynos: Fix and remove memory reset workarounds
The memory corruption problem in Exynos suspend/resume process is caused by two
things together: PHY_RESET and MRS command.
After stop sending MRS on resume, we can now remove the workaround of skipping
PHY_RESET.
Change-Id: I64acc27c1d2bb549ae6ad7d32ecda94b0355972c
Reviewed-on: https://gerrit.chromium.org/gerrit/64736
Tested-by: Hung-Te Lin <hungte(a)chromium.org>
Reviewed-by: David Hendricks <dhendrix(a)chromium.org>
Commit-Queue: Hung-Te Lin <hungte(a)chromium.org>
---
src/cpu/samsung/exynos5250/dmc_init_ddr3.c | 10 ++++++++--
src/cpu/samsung/exynos5420/dmc_init_ddr3.c | 12 +++++++++---
src/mainboard/google/snow/romstage.c | 7 -------
3 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/src/cpu/samsung/exynos5250/dmc_init_ddr3.c b/src/cpu/samsung/exynos5250/dmc_init_ddr3.c
index e3d46ab..f2c228d 100644
--- a/src/cpu/samsung/exynos5250/dmc_init_ddr3.c
+++ b/src/cpu/samsung/exynos5250/dmc_init_ddr3.c
@@ -158,8 +158,14 @@ int ddr3_mem_ctrl_init(struct mem_timings *mem, unsigned long mem_iv_size,
/* Send PALL command */
dmc_config_prech(mem, dmc);
- /* Send NOP, MRS and ZQINIT commands */
- dmc_config_mrs(mem, dmc);
+ if (mem_reset) {
+ /* Send NOP, MRS and ZQINIT commands.
+ * Sending MRS command will reset the DRAM. We should not be
+ * reseting the DRAM after resume, this will lead to memory
+ * corruption as DRAM content is lost after DRAM reset
+ */
+ dmc_config_mrs(mem, dmc);
+ }
if (mem->gate_leveling_enable) {
val = PHY_CON0_RESET_VAL;
diff --git a/src/cpu/samsung/exynos5420/dmc_init_ddr3.c b/src/cpu/samsung/exynos5420/dmc_init_ddr3.c
index 74ee7e9..ebfe1e1 100644
--- a/src/cpu/samsung/exynos5420/dmc_init_ddr3.c
+++ b/src/cpu/samsung/exynos5420/dmc_init_ddr3.c
@@ -184,9 +184,15 @@ int ddr3_mem_ctrl_init(struct mem_timings *mem, int interleave_size, int reset)
writel(mem->timing_power, &drex0->timingpower);
writel(mem->timing_power, &drex1->timingpower);
- /* Send NOP, MRS and ZQINIT commands */
- dmc_config_mrs(mem, drex0);
- dmc_config_mrs(mem, drex1);
+ /* Send NOP, MRS and ZQINIT commands.
+ * Sending MRS command will reset the DRAM. We should not be
+ * reseting the DRAM after resume, this will lead to memory
+ * corruption as DRAM content is lost after DRAM reset.
+ */
+ if (reset) {
+ dmc_config_mrs(mem, drex0);
+ dmc_config_mrs(mem, drex1);
+ }
if (mem->gate_leveling_enable) {
diff --git a/src/mainboard/google/snow/romstage.c b/src/mainboard/google/snow/romstage.c
index f69fb1f..92fa21e 100644
--- a/src/mainboard/google/snow/romstage.c
+++ b/src/mainboard/google/snow/romstage.c
@@ -141,13 +141,6 @@ static void setup_memory(struct mem_timings *mem, int is_resume)
mem->mpll_mdiv,
mem->frequency_mhz);
- /* FIXME Currently memory initialization with mem_reset on normal boot
- * will cause resume to fail (even if we don't do mem_reset on resume),
- * and the workaround is to temporarily always enable "is_resume".
- * This should be removed when the root cause of resume issue is found.
- */
- is_resume = 1;
-
if (ddr3_mem_ctrl_init(mem, DMC_INTERLEAVE_SIZE, !is_resume)) {
die("Failed to initialize memory controller.\n");
}
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4435
-gerrit
commit b6e8acd1cc3f8c3174c228dfa156572905fbc644
Author: Gabe Black <gabeblack(a)google.com>
Date: Tue Aug 6 04:30:13 2013 -0700
ARM: Remove (NOLOAD) from the .car section
On ARM, if the .car section is marked as NOLOAD, there's nothing that sets it
to zero. Some code in the cbmem console depends on a global variable being
zero initially, and if that's not true bad things happen.
Change-Id: Ic72a9fb0ee0c5a608190be6f24d0d7de7c34fc1f
Signed-off-by: Gabe Black <gabeblack(a)google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/64769
Reviewed-by: Stefan Reinauer <reinauer(a)google.com>
Commit-Queue: Gabe Black <gabeblack(a)chromium.org>
Tested-by: Gabe Black <gabeblack(a)chromium.org>
---
src/arch/armv7/romstage.ld | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/arch/armv7/romstage.ld b/src/arch/armv7/romstage.ld
index 11a91cf..459f714 100644
--- a/src/arch/armv7/romstage.ld
+++ b/src/arch/armv7/romstage.ld
@@ -74,7 +74,7 @@ SECTIONS
_ebss = .;
- .car.data . (NOLOAD) : {
+ .car.data . : {
. = ALIGN(8);
_car_data_start = .;
*(.car.global_data);
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4434
-gerrit
commit 499de7bdc6bfaf05a038766fb1527febda5ee9e8
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Mon Aug 5 18:53:15 2013 -0700
exynos5420: minor correction to CPU frequency print
This divides the CPU frequency by 1,000,000 instead of 2^20.
serial console shows "CPU: S5P5420 @ 800MHz" instead of
claiming 762MHz.
Change-Id: I70cc5b62f689c5553b57c82be61233fb9f733f6e
Reviewed-on: https://gerrit.chromium.org/gerrit/64743
Reviewed-by: Gabe Black <gabeblack(a)chromium.org>
Reviewed-by: Ronald G. Minnich <rminnich(a)chromium.org>
Commit-Queue: David Hendricks <dhendrix(a)chromium.org>
Tested-by: David Hendricks <dhendrix(a)chromium.org>
---
src/cpu/samsung/exynos5420/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cpu/samsung/exynos5420/cpu.c b/src/cpu/samsung/exynos5420/cpu.c
index 729e6b3..1940b88 100644
--- a/src/cpu/samsung/exynos5420/cpu.c
+++ b/src/cpu/samsung/exynos5420/cpu.c
@@ -159,7 +159,7 @@ static void cpu_enable(device_t dev)
static void cpu_init(device_t dev)
{
printk(BIOS_INFO, "CPU: S5P%X @ %ldMHz\n",
- cpu_id, get_arm_clk() / (1024*1024));
+ cpu_id, get_arm_clk() / 1000000);
usb_init(dev);
}
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4436
-gerrit
commit ecff5bd42ddfe2bbb29b14a708fa1c1a627702e7
Author: Gabe Black <gabeblack(a)google.com>
Date: Tue Aug 6 15:36:44 2013 -0700
ARM: Don't inject nobits since we actually want to load these bits
Change-Id: I128e3ecc3773fe7c28616e93ef60b48c5862f302
Signed-off-by: Gabe Black <gabeblack(a)google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/64839
Reviewed-by: David Hendricks <dhendrix(a)chromium.org>
Reviewed-by: Stefan Reinauer <reinauer(a)chromium.org>
Tested-by: Gabe Black <gabeblack(a)chromium.org>
---
src/arch/armv7/include/arch/early_variables.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/arch/armv7/include/arch/early_variables.h b/src/arch/armv7/include/arch/early_variables.h
index 90ead9d..cec0a46 100644
--- a/src/arch/armv7/include/arch/early_variables.h
+++ b/src/arch/armv7/include/arch/early_variables.h
@@ -21,8 +21,8 @@
#define ARCH_EARLY_VARIABLES_H
#ifdef __PRE_RAM__
-#define CAR_GLOBAL __attribute__((section(".car.global_data,\"w\",%nobits@")))
-#define CAR_CBMEM __attribute__((section(".car.cbmem_console,\"w\",%nobits@")))
+#define CAR_GLOBAL __attribute__((section(".car.global_data")))
+#define CAR_CBMEM __attribute__((section(".car.cbmem_console")))
#else
#define CAR_GLOBAL
#define CAR_CBMEM