Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4428
-gerrit
commit 034c32ffa36dadaeb7977efee2b571881601ad90
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Wed Jul 31 16:28:44 2013 -0700
ARMv7: Fix location of CBMEM console in romstage
The CBMEM console pointer in romstage is actually a zero byte array.
This means CBMEM area has to live at the end of the allocations or
else CBMEM console will overwrite whatever comes after it.
Change-Id: Icc59e982b724a2d396370c3a5abd8898e08baf26
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63997
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Commit-Queue: Stefan Reinauer <reinauer(a)chromium.org>
Tested-by: Stefan Reinauer <reinauer(a)chromium.org>
---
src/arch/armv7/romstage.ld | 37 +++++++++++++++++++++++++------------
1 file changed, 25 insertions(+), 12 deletions(-)
diff --git a/src/arch/armv7/romstage.ld b/src/arch/armv7/romstage.ld
index 14c5bde..11a91cf 100644
--- a/src/arch/armv7/romstage.ld
+++ b/src/arch/armv7/romstage.ld
@@ -60,9 +60,25 @@ SECTIONS
_erom = .;
}
+ /* bss does not contain data, it is just a space that should be zero
+ * initialized on startup. (typically uninitialized global variables)
+ * crt0.S fills between _bss and _ebss with zeroes.
+ */
+ .bss . : {
+ . = ALIGN(8);
+ _bss = .;
+ *(.bss)
+ *(.sbss)
+ *(COMMON)
+ }
+
+ _ebss = .;
+
.car.data . (NOLOAD) : {
+ . = ALIGN(8);
_car_data_start = .;
*(.car.global_data);
+ . = ALIGN(8);
/* The cbmem_console section comes last to take advantage of
* a zero-sized array to hold the memconsole contents that
* grows to a bound of CONFIG_CONSOLE_CAR_BUFFER_SIZE. However,
@@ -73,20 +89,17 @@ SECTIONS
_car_data_end = .;
}
- /* bss does not contain data, it is just a space that should be zero
- * initialized on startup. (typically uninitialized global variables)
- * crt0.S fills between _bss and _ebss with zeroes.
- */
- .bss . : {
- . = ALIGN(8);
- _bss = .;
- *(.bss)
- *(.sbss)
- *(COMMON)
- }
- _ebss = .;
_end = .;
+ /* TODO: check if we are running out of SRAM. Below check is not good
+ * enough though because SRAM has different size on different CPUs
+ * and not all SRAM is available to the romstage. On Exynos, some is
+ * used for BL1, the bootblock and the stack.
+ *
+ * _bogus = ASSERT((_end - _start + EXPECTED_CBMEM_CONSOLE_SIZE <= \
+ * 0x54000), "SRAM area is too full");
+ */
+
/* Discard the sections we don't need/want */
/DISCARD/ : {
*(.comment)
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4419
-gerrit
commit f6d868a8b49c9801e016eb07834deeceeff02dcc
Author: Gabe Black <gabeblack(a)google.com>
Date: Wed Jul 31 22:50:21 2013 -0700
exynos5250: Add mct_start to the timer init blob in timer_monotonic_get
A previous change removed init_timer from timer_monotonic_get because its old
implementation set up the PWM based timer which was going away. It would still
be a good idea to initialize the timer at that point, just not the pwm.
Change-Id: I4816710ec2c9d5ca53b704c6b9397bcfac183fdc
Signed-off-by: Gabe Black <gabeblack(a)google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/64160
Reviewed-by: Ronald G. Minnich <rminnich(a)chromium.org>
Commit-Queue: Gabe Black <gabeblack(a)chromium.org>
Tested-by: Gabe Black <gabeblack(a)chromium.org>
---
src/cpu/samsung/exynos5250/monotonic_timer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/cpu/samsung/exynos5250/monotonic_timer.c b/src/cpu/samsung/exynos5250/monotonic_timer.c
index d46d02a..57e3ae3 100644
--- a/src/cpu/samsung/exynos5250/monotonic_timer.c
+++ b/src/cpu/samsung/exynos5250/monotonic_timer.c
@@ -37,6 +37,7 @@ void timer_monotonic_get(struct mono_time *mt)
uint64_t usecs_elapsed;
if (!mono_counter.initialized) {
+ mct_start();
mono_counter.last_value = mct_raw_value();
mono_counter.initialized = 1;
}
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4420
-gerrit
commit 54494f082349bf2893126743ad631a769cf7ca28
Author: Gabe Black <gabeblack(a)google.com>
Date: Wed Jul 31 23:21:34 2013 -0700
pit: Get rid of the mostly unnecessary exynos5420.h
Like on kirby, this header had a single constant in it that was actually used.
This change moves that constant inline and gets rid of the header file.
Change-Id: Ibe380396f72fddb121fb6ceb3cee24f1b9a85738
Signed-off-by: Gabe Black <gabeblack(a)google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/64163
Reviewed-by: Ronald G. Minnich <rminnich(a)chromium.org>
Commit-Queue: Gabe Black <gabeblack(a)chromium.org>
Tested-by: Gabe Black <gabeblack(a)chromium.org>
---
src/mainboard/google/pit/exynos5420.h | 34 ----------------------------------
src/mainboard/google/pit/mainboard.c | 2 --
src/mainboard/google/pit/romstage.c | 4 +---
3 files changed, 1 insertion(+), 39 deletions(-)
diff --git a/src/mainboard/google/pit/exynos5420.h b/src/mainboard/google/pit/exynos5420.h
deleted file mode 100644
index 21b704c..0000000
--- a/src/mainboard/google/pit/exynos5420.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2013 Google Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/* I2C */
-#define I2C_0_SPEED 100000
-#define I2C_4_SPEED 1000000 /* 1MHz */
-#define I2C_SLAVE 0
-
-/* Voltages */
-#define VDD_ARM_MV 1300 // 1.3V
-#define VDD_INT_UV 1012500 // 1.0125V
-#define VDD_MIF_MV 1000 // 1.0V
-#define VDD_G3D_MV 1200 // 1.2V
-#define VDD_LDO2_MV 1500 // 1.5V
-#define VDD_LDO3_MV 1800 // 1.8V
-#define VDD_LDO5_MV 1800 // 1.8V
-#define VDD_LDO10_MV 1800 // 1.8V
-
diff --git a/src/mainboard/google/pit/mainboard.c b/src/mainboard/google/pit/mainboard.c
index 827c18b..5c67df2 100644
--- a/src/mainboard/google/pit/mainboard.c
+++ b/src/mainboard/google/pit/mainboard.c
@@ -38,8 +38,6 @@
#include <ec/google/chromeec/ec.h>
#include <stdlib.h>
-#include "exynos5420.h"
-
/* convenient shorthand (in MB) */
#define DRAM_START (CONFIG_SYS_SDRAM_BASE >> 20)
#define DRAM_SIZE CONFIG_DRAM_SIZE_MB
diff --git a/src/mainboard/google/pit/romstage.c b/src/mainboard/google/pit/romstage.c
index 255f292..c11f712 100644
--- a/src/mainboard/google/pit/romstage.c
+++ b/src/mainboard/google/pit/romstage.c
@@ -40,8 +40,6 @@
#include <drivers/maxim/max77802/max77802.h>
#include <device/i2c.h>
-#include "exynos5420.h"
-
#define MMC0_GPIO_PIN (58)
struct pmic_write
@@ -89,7 +87,7 @@ static void setup_power(int is_resume)
/* Initialize I2C bus to configure PMIC. */
exynos_pinmux_i2c4();
- i2c_init(4, I2C_4_SPEED, 0x00);
+ i2c_init(4, 1000000, 0x00); /* 1MHz */
printk(BIOS_DEBUG, "%s: Setting up PMIC...\n", __func__);
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4421
-gerrit
commit 379e890d2580ab3e41ff9151359dc884264514fd
Author: Gabe Black <gabeblack(a)google.com>
Date: Wed Jul 31 23:40:55 2013 -0700
kirby: pit: Fix up wakeup_need_reset
In a previous commit the contents of wakeup_need_reset were removed because
the GPIO it referred to wasn't connected to anything on pit. I didn't realize
at that time that that could have been because we hadn't tried getting
suspend/resume working on pit and hadn't updated that file. On snow, the GPIO
is the recovery mode pin. This change updates pit to have the right GPIO,
kirby to read that GPIO, and makes the comments for both pit and kirby more
explicit and spells out the fact that this is the recovery mode GPIO.
Having a check here at all may still be a holdover from snow that isn't
applicable to pit or kirby, but since there is a parallel as far as the
recovery mode GPIO we might as well make them match while waiting for more
information.
Change-Id: Ic1f3f605a0fddf89e8f5668c7a8df30bdfb91d94
Signed-off-by: Gabe Black <gabeblack(a)google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/64164
Reviewed-by: Ronald G. Minnich <rminnich(a)chromium.org>
Commit-Queue: Gabe Black <gabeblack(a)chromium.org>
Tested-by: Gabe Black <gabeblack(a)chromium.org>
---
src/mainboard/google/kirby/wakeup.c | 4 +++-
src/mainboard/google/pit/wakeup.c | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/mainboard/google/kirby/wakeup.c b/src/mainboard/google/kirby/wakeup.c
index 43bad6f..02305b5 100644
--- a/src/mainboard/google/kirby/wakeup.c
+++ b/src/mainboard/google/kirby/wakeup.c
@@ -22,6 +22,8 @@
int wakeup_need_reset(void)
{
- return 0;
+ /* The "wake up" event is not reliable (known as "bad wakeup") and needs
+ * reset if the TPM reset mask GPIO value is high. */
+ return gpio_get_value(GPIO_X06);
}
diff --git a/src/mainboard/google/pit/wakeup.c b/src/mainboard/google/pit/wakeup.c
index a82b632..02305b5 100644
--- a/src/mainboard/google/pit/wakeup.c
+++ b/src/mainboard/google/pit/wakeup.c
@@ -23,7 +23,7 @@
int wakeup_need_reset(void)
{
/* The "wake up" event is not reliable (known as "bad wakeup") and needs
- * reset if GPIO value is high. */
- return gpio_get_value(GPIO_Y10);
+ * reset if the TPM reset mask GPIO value is high. */
+ return gpio_get_value(GPIO_X06);
}
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 877f1ec399f44d791aab1a78ac5ab9834b671277
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 26a30987b7103c8762bfc94a1e2c9d30da0d7551
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 0fbe5cd1434abc9f745f98f135e1feed524267c8
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)
;