summaryrefslogtreecommitdiff
path: root/src/soc/samsung/exynos5420
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2014-09-15 22:10:33 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-04-06 19:15:37 +0200
commit015f0aea5dc0cd391ddc34c1db6591d93d08e8a9 (patch)
tree08a0459bed10e7dcdaa5ddc89a0e4831a01bc3f5 /src/soc/samsung/exynos5420
parent828e0e86f3b7ddb7cde5daddc83be4386a4d43b1 (diff)
downloadcoreboot-015f0aea5dc0cd391ddc34c1db6591d93d08e8a9.tar.xz
Add predefined __ROMSTAGE__ and __RAMSTAGE__ macros
This patch adds the macros __ROMSTAGE__ and __RAMSTAGE__ which get predefined in their respective stages by make, so that we have one specific macro for every stage. It also renames __BOOT_BLOCK__ and __VER_STAGE__ to __BOOTBLOCK__ and __VERSTAGE__ for consistency. This change is intended to provide finer control and clearer communication of intent after we added a new (optional) stage that falls under __PRE_RAM__, and will hopefully provide some robustness for the future (we don't want to end up always checking for romstage with #if defined(__PRE_RAM__) && !defined(__BOOT_BLOCK__) && !defined(__VER_STAGE__) && !defined(__YET_ANOTHER_PRERAM_STAGE__)). The __PRE_RAM__ macro stays as it is since many features do in fact need to differentiate on whether RAM is available. (Some also depend on whether RAM is available at the end of a stage, in which case #if !defined(__PRE_RAM__) || defined(__ROMSTAGE__) should now be authoritative.) It's unfeasable to change all existing occurences of __PRE_RAM__ that would be better described with __ROMSTAGE__, so this patch only demonstratively changes a few obvious ones in core code. BUG=None TEST=None (tested together with dependent patch). Change-Id: I6a06d0f42c27a2feeb778a4acd35dd14bb53f744 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: a4ad042746c1d3a7a3bfda422d26e0d3b9f9ae42 Original-Change-Id: I6a1f25f7077328a8b5201a79b18fc4c2e22d0b06 Original-Signed-off-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/219172 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9304 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/soc/samsung/exynos5420')
-rw-r--r--src/soc/samsung/exynos5420/alternate_cbfs.h2
-rw-r--r--src/soc/samsung/exynos5420/gpio.c7
2 files changed, 1 insertions, 8 deletions
diff --git a/src/soc/samsung/exynos5420/alternate_cbfs.h b/src/soc/samsung/exynos5420/alternate_cbfs.h
index af7751d4ee..8122a25e8c 100644
--- a/src/soc/samsung/exynos5420/alternate_cbfs.h
+++ b/src/soc/samsung/exynos5420/alternate_cbfs.h
@@ -36,7 +36,7 @@ static u32 * const iram_secondary_base = (u32 *)0x02020018;
#define OM_STAT_SPI 0x14
#define OM_STAT_MASK 0x7f
-#if defined(__BOOT_BLOCK__)
+#if defined(__PRE_RAM__) && !defined(__ROMSTAGE__)
/* A small space in IRAM to hold the romstage-only image */
static void * const alternate_cbfs_buffer =
(void *)CONFIG_CBFS_CACHE_ADDRESS;
diff --git a/src/soc/samsung/exynos5420/gpio.c b/src/soc/samsung/exynos5420/gpio.c
index ac82bf7eb1..74d81135d6 100644
--- a/src/soc/samsung/exynos5420/gpio.c
+++ b/src/soc/samsung/exynos5420/gpio.c
@@ -211,12 +211,6 @@ int gpio_set_value(unsigned gpio, int value)
*/
#define GPIO_DELAY_US 15
-#ifndef __BOOTBLOCK__
-/*
- * FIXME(dhendrix): These functions use udelay, which has dependencies on
- * pwm code and timer code. These aren't necessary for the bootblock and
- * bloat the image significantly.
- */
int gpio_read_mvl3(unsigned gpio)
{
int high, low;
@@ -252,7 +246,6 @@ int gpio_read_mvl3(unsigned gpio)
return value;
}
-#endif /* __BOOTBLOCK__ */
/*
* Display Exynos GPIO information