]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: keystone2: spl: move board specific code
authorHao Zhang <hzhang@ti.com>
Wed, 22 Oct 2014 13:32:31 +0000 (16:32 +0300)
committerTom Rini <trini@ti.com>
Thu, 23 Oct 2014 15:27:05 +0000 (11:27 -0400)
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>
arch/arm/cpu/armv7/keystone/Makefile
arch/arm/cpu/armv7/keystone/spl.c [deleted file]
arch/arm/include/asm/arch-keystone/spl.h [deleted file]
board/ti/ks2_evm/board.c
board/ti/ks2_evm/board.h
board/ti/ks2_evm/board_k2e.c
board/ti/ks2_evm/board_k2hk.c

index 4750371c420504061b8a6c94a7830dff4db36b47..57f6ea6dee9fe664014b5492cfb43f60bb1083af 100644 (file)
@@ -14,6 +14,5 @@ obj-$(CONFIG_SOC_K2L) += clock-k2l.o
 obj-y  += cmd_clock.o
 obj-y  += cmd_mon.o
 obj-y  += msmc.o
-obj-$(CONFIG_SPL_BUILD)        += spl.o
 obj-y  += ddr3.o
 obj-y  += keystone.o
diff --git a/arch/arm/cpu/armv7/keystone/spl.c b/arch/arm/cpu/armv7/keystone/spl.c
deleted file mode 100644 (file)
index d4b0e9b..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * common spl init code
- *
- * (C) Copyright 2012-2014
- *     Texas Instruments Incorporated, <www.ti.com>
- *
- * SPDX-License-Identifier:     GPL-2.0+
- */
-#include <common.h>
-#include <config.h>
-#include <ns16550.h>
-#include <malloc.h>
-#include <spl.h>
-#include <spi_flash.h>
-
-#include <asm/u-boot.h>
-#include <asm/utils.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#ifdef CONFIG_K2HK_EVM
-static struct pll_init_data spl_pll_config[] = {
-       CORE_PLL_799,
-       TETRIS_PLL_500,
-};
-#endif
-
-#ifdef CONFIG_K2E_EVM
-static struct pll_init_data spl_pll_config[] = {
-       CORE_PLL_800,
-};
-#endif
-
-void spl_init_keystone_plls(void)
-{
-       init_plls(ARRAY_SIZE(spl_pll_config), spl_pll_config);
-}
-
-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
-}
diff --git a/arch/arm/include/asm/arch-keystone/spl.h b/arch/arm/include/asm/arch-keystone/spl.h
deleted file mode 100644 (file)
index a7102d5..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * (C) Copyright 2012-2014
- * Texas Instruments, <www.ti.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-#ifndef _ASM_ARCH_SPL_H_
-#define _ASM_ARCH_SPL_H_
-
-#define BOOT_DEVICE_SPI        2
-
-#endif
index dfe7be60e71befcd1c314b8f4a2cb05feca5a929..c07d2848ba55853e8d5f5073817b6b6b8f286250 100644 (file)
@@ -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)
 {
index d91ef736129fa3c2309d143f215322f108566d8b..7a613ac817bcd85c8a6dec8e804ccfa905f2a6be 100644 (file)
@@ -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
index 5472a43c43f105c4ca3ec3bbc5e268a2f6cc5c76..810a8e26eaef271d55102e642046ac625462e20d 100644 (file)
@@ -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
index 6fb3d2123df0a5183ec921f608735ab714f4e9e7..d7dd29281ce4954cbfc27c7a9aea8d3cc3742127 100644 (file)
@@ -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