Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4441
-gerrit
commit caa0f7d56bee6765c90b0739bc0bb349a9616f59
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Tue Aug 6 18:05:55 2013 -0700
exynos5420: set L2ACTLR parameters for A15 cores
This patch does the following for the A15 cores:
- Disable clean/evict push to external
- Enable hazard detect timout
- Prevent gating the L2 logic clock
This is ported from https://gerrit.chromium.org/gerrit/#/c/60154
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
Change-Id: I7ac9f40acecfa7daee6fb81772676bf5119d0536
Reviewed-on: https://gerrit.chromium.org/gerrit/64862
Commit-Queue: David Hendricks <dhendrix(a)chromium.org>
Reviewed-by: David Hendricks <dhendrix(a)chromium.org>
Tested-by: David Hendricks <dhendrix(a)chromium.org>
---
src/cpu/samsung/exynos5420/cpu.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/cpu/samsung/exynos5420/cpu.c b/src/cpu/samsung/exynos5420/cpu.c
index 1940b88..bda46de 100644
--- a/src/cpu/samsung/exynos5420/cpu.c
+++ b/src/cpu/samsung/exynos5420/cpu.c
@@ -198,4 +198,20 @@ void exynos5420_config_l2_cache(void)
*/
val = (1 << 9) | (0x2 << 6) | (1 << 5) | (0x2);
write_l2ctlr(val);
+
+ val = read_l2actlr();
+
+ /* L2ACTLR[3]: Disable clean/evict push to external */
+ val |= (1 << 3);
+
+ /* L2ACTLR[7]: Enable hazard detect timeout for A15 */
+ val |= (1 << 7);
+
+ /* L2ACTLR[27]: Prevents stopping the L2 logic clock */
+ val |= (1 << 27);
+
+ write_l2actlr(val);
+
+ /* Read the l2 control register to force things to take effect? */
+ val = read_l2ctlr();
}
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4440
-gerrit
commit c0a5876f628597f96ed737a0f2d95ab3ef04bf73
Author: Gabe Black <gabeblack(a)google.com>
Date: Mon Aug 5 22:19:36 2013 -0700
snow: Set up the i2s0 pins during boot
Change-Id: I6729a139091b40d8fd9ba2aa7a8c4e14216d95c5
Signed-off-by: Gabe Black <gabeblack(a)google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/64879
Reviewed-by: Stefan Reinauer <reinauer(a)google.com>
Commit-Queue: Stefan Reinauer <reinauer(a)google.com>
Tested-by: Stefan Reinauer <reinauer(a)google.com>
---
src/mainboard/google/snow/mainboard.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/mainboard/google/snow/mainboard.c b/src/mainboard/google/snow/mainboard.c
index b493652..aa11487 100644
--- a/src/mainboard/google/snow/mainboard.c
+++ b/src/mainboard/google/snow/mainboard.c
@@ -202,6 +202,7 @@ static void gpio_init(void)
gpio_direction_output(GPIO_X15, 1);
/* Set up the I2S busses. */
+ exynos_pinmux_i2s0();
exynos_pinmux_i2s1();
}
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4443
-gerrit
commit 0bd2f34204c027e26588efb5dbe4db8d5220cd37
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Mon Aug 5 21:09:32 2013 -0700
exynos5420: init APLL at 1800MHz
This initializes the APLL at 1800MHz.
Change-Id: I366bf4e75510847ab93d9c9f214a49c731cca08a
Reviewed-on: https://gerrit.chromium.org/gerrit/64745
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/clock_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cpu/samsung/exynos5420/clock_init.c b/src/cpu/samsung/exynos5420/clock_init.c
index b62ebe4..3521636 100644
--- a/src/cpu/samsung/exynos5420/clock_init.c
+++ b/src/cpu/samsung/exynos5420/clock_init.c
@@ -65,7 +65,7 @@ void system_clock_init(void)
/* Set APLL */
writel(APLL_CON1_VAL, &clk->apll_con1);
- val = set_pll(0xc8, 0x3, 0x1);
+ val = set_pll(225, 3, 0); /* FOUT=1800MHz */
writel(val, &clk->apll_con0);
while ((readl(&clk->apll_con0) & PLL_LOCKED) == 0)
;
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 efd5ba40a0c2bcc8d2f827501260c19ccff6f44b
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 db9f37cebf202a79835fb849686637de712721c3
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");
}