summaryrefslogtreecommitdiff
path: root/board/altera
diff options
context:
space:
mode:
authorThomas Chou <thomas@wytron.com.tw>2015-09-04 16:19:16 +0800
committerThomas Chou <thomas@wytron.com.tw>2015-10-23 07:28:37 +0800
commitb6c180928c3c7c9efbdc5eb1b468c450c877abdf (patch)
tree3fbe1f9a927e92033cf5cb20df0101af387d9226 /board/altera
parenta03377b62f7f8546b1c489319879cad1a3c77138 (diff)
nios2: move altera_pio_init to board_early_init_r
As altera_pio_init() uses BSS, it should be moved to board_early_init_r(). Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'board/altera')
-rw-r--r--board/altera/nios2-generic/nios2-generic.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/board/altera/nios2-generic/nios2-generic.c b/board/altera/nios2-generic/nios2-generic.c
index 834cbeb2d5..384fee9b75 100644
--- a/board/altera/nios2-generic/nios2-generic.c
+++ b/board/altera/nios2-generic/nios2-generic.c
@@ -28,6 +28,15 @@ void early_flash_cmd_reset(void)
int board_early_init_f(void)
{
+#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) && \
+ defined(CONFIG_CFI_FLASH_MTD)
+ early_flash_cmd_reset();
+#endif
+ return 0;
+}
+
+int board_early_init_r(void)
+{
#ifdef CONFIG_ALTERA_PIO
#ifdef LED_PIO_BASE
altera_pio_init(LED_PIO_BASE, LED_PIO_WIDTH, 'o',
@@ -35,10 +44,6 @@ int board_early_init_f(void)
"led");
#endif
#endif
-#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) && \
- defined(CONFIG_CFI_FLASH_MTD)
- early_flash_cmd_reset();
-#endif
return 0;
}