summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorHao Zhang <hzhang@ti.com>2014-10-22 16:32:31 +0300
committerTom Rini <trini@ti.com>2014-10-23 11:27:05 -0400
commit5ec66b140afff89c3ee5abde4a9eb4c0963c918c (patch)
tree534a8e92fb1f1a277af0f51fd512310933aafdf2 /board
parentbc45d5729fbec157370b826156cf45ce78471096 (diff)
downloadu-boot-imx-5ec66b140afff89c3ee5abde4a9eb4c0963c918c.zip
u-boot-imx-5ec66b140afff89c3ee5abde4a9eb4c0963c918c.tar.gz
u-boot-imx-5ec66b140afff89c3ee5abde4a9eb4c0963c918c.tar.bz2
ARM: keystone2: spl: move board specific code
The initialization of PLLs is a part of board specific code, so move it appropriate places. Acked-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Hao Zhang <hzhang@ti.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Diffstat (limited to 'board')
-rw-r--r--board/ti/ks2_evm/board.c19
-rw-r--r--board/ti/ks2_evm/board.h1
-rw-r--r--board/ti/ks2_evm/board_k2e.c11
-rw-r--r--board/ti/ks2_evm/board_k2hk.c12
4 files changed, 43 insertions, 0 deletions
diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c
index dfe7be6..c07d284 100644
--- a/board/ti/ks2_evm/board.c
+++ b/board/ti/ks2_evm/board.c
@@ -9,6 +9,7 @@
#include "board.h"
#include <common.h>
+#include <spl.h>
#include <exports.h>
#include <fdt_support.h>
#include <asm/arch/ddr3.h>
@@ -83,6 +84,24 @@ int board_eth_init(bd_t *bis)
}
#endif
+#ifdef CONFIG_SPL_BUILD
+void spl_board_init(void)
+{
+ spl_init_keystone_plls();
+ preloader_console_init();
+}
+
+u32 spl_boot_device(void)
+{
+#if defined(CONFIG_SPL_SPI_LOAD)
+ return BOOT_DEVICE_SPI;
+#else
+ puts("Unknown boot device\n");
+ hang();
+#endif
+}
+#endif
+
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
{
diff --git a/board/ti/ks2_evm/board.h b/board/ti/ks2_evm/board.h
index d91ef73..7a613ac 100644
--- a/board/ti/ks2_evm/board.h
+++ b/board/ti/ks2_evm/board.h
@@ -15,5 +15,6 @@
extern struct eth_priv_t eth_priv_cfg[];
int get_num_eth_ports(void);
+void spl_init_keystone_plls(void);
#endif
diff --git a/board/ti/ks2_evm/board_k2e.c b/board/ti/ks2_evm/board_k2e.c
index 5472a43..810a8e2 100644
--- a/board/ti/ks2_evm/board_k2e.c
+++ b/board/ti/ks2_evm/board_k2e.c
@@ -52,3 +52,14 @@ int board_early_init_f(void)
return 0;
}
#endif
+
+#ifdef CONFIG_SPL_BUILD
+static struct pll_init_data spl_pll_config[] = {
+ CORE_PLL_800,
+};
+
+void spl_init_keystone_plls(void)
+{
+ init_plls(ARRAY_SIZE(spl_pll_config), spl_pll_config);
+}
+#endif
diff --git a/board/ti/ks2_evm/board_k2hk.c b/board/ti/ks2_evm/board_k2hk.c
index 6fb3d21..d7dd292 100644
--- a/board/ti/ks2_evm/board_k2hk.c
+++ b/board/ti/ks2_evm/board_k2hk.c
@@ -100,3 +100,15 @@ int board_early_init_f(void)
return 0;
}
#endif
+
+#ifdef CONFIG_SPL_BUILD
+static struct pll_init_data spl_pll_config[] = {
+ CORE_PLL_799,
+ TETRIS_PLL_500,
+};
+
+void spl_init_keystone_plls(void)
+{
+ init_plls(ARRAY_SIZE(spl_pll_config), spl_pll_config);
+}
+#endif