ARM: UniPhier: move pin_init() to board_early_init_f()
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Thu, 5 Feb 2015 05:42:54 +0000 (14:42 +0900)
committerMasahiro Yamada <yamada.m@jp.panasonic.com>
Fri, 6 Feb 2015 15:15:02 +0000 (00:15 +0900)
Currently, I/O pin settings are not necessary for SPL.
The board_early_init_f() seems a suitable place to call pin_init().

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
arch/arm/cpu/armv7/uniphier/Makefile
arch/arm/cpu/armv7/uniphier/board_early_init_f.c [new file with mode: 0644]
arch/arm/cpu/armv7/uniphier/board_postclk_init.c
arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile
arch/arm/cpu/armv7/uniphier/ph1-pro4/Makefile
arch/arm/cpu/armv7/uniphier/ph1-sld8/Makefile
include/configs/uniphier.h

index 05462320b58c749125f27945639df9e10ad52808..a681d2d8ea797b72202401e2b16ea6f086792e02 100644 (file)
@@ -11,6 +11,7 @@ obj-y += cache_uniphier.o
 obj-$(CONFIG_BOARD_POSTCLK_INIT) += board_postclk_init.o
 obj-y += dram_init.o
 obj-$(CONFIG_DRAM_INIT) += ddrphy_training.o
+obj-$(CONFIG_BOARD_EARLY_INIT_F) += board_early_init_f.o
 obj-$(CONFIG_DISPLAY_CPUINFO) += cpu_info.o
 obj-$(CONFIG_BOARD_EARLY_INIT_R) += board_early_init_r.o
 obj-$(CONFIG_BOARD_LATE_INIT) += board_late_init.o
diff --git a/arch/arm/cpu/armv7/uniphier/board_early_init_f.c b/arch/arm/cpu/armv7/uniphier/board_early_init_f.c
new file mode 100644 (file)
index 0000000..d25bbae
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2012-2015 Panasonic Corporation
+ *   Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <asm/arch/led.h>
+#include <asm/arch/board.h>
+
+void pin_init(void);
+
+int board_early_init_f(void)
+{
+       led_write(U, 0, , );
+
+       pin_init();
+
+       led_write(U, 1, , );
+
+       return 0;
+}
index 89e44bb95be9e04cf436fe8fb6ff9f73714238b9..8deb9f6e0864a9a94c846a140cc3a37c8b36fa94 100644 (file)
@@ -39,9 +39,6 @@ int board_postclk_init(void)
 
        led_write(B, 2, , );
 #endif
-       pin_init();
-
-       led_write(B, 3, , );
 
        return 0;
 }
index 07529061213e6be38ca5e7de7fa0ddda86c93c70..af9c86d3b83aa554ee7b005912417d5d6c327207 100644 (file)
@@ -8,5 +8,5 @@ obj-y += boot-mode.o
 obj-$(CONFIG_DEBUG_LL) += lowlevel_debug.o
 obj-$(CONFIG_SOC_INIT) += bcu_init.o sbc_init.o sg_init.o pll_init.o \
                                                                clkrst_init.o
-obj-$(CONFIG_BOARD_POSTCLK_INIT) += pinctrl.o
+obj-$(CONFIG_BOARD_EARLY_INIT_F) += pinctrl.o
 obj-$(CONFIG_DRAM_INIT) += pll_spectrum.o umc_init.o ddrphy_init.o
index 8206e2a3542774e0133525825c95e7238f3a1657..43949d0331535a5fbcb5be2f0fc1b8e34b3977ed 100644 (file)
@@ -7,5 +7,5 @@ obj-$(if $(CONFIG_OF_CONTROL),,y) += platdevice.o
 obj-y += boot-mode.o
 obj-$(CONFIG_DEBUG_LL) += lowlevel_debug.o
 obj-$(CONFIG_SOC_INIT) += sbc_init.o sg_init.o pll_init.o clkrst_init.o
-obj-$(CONFIG_BOARD_POSTCLK_INIT) += pinctrl.o
+obj-$(CONFIG_BOARD_EARLY_INIT_F) += pinctrl.o
 obj-$(CONFIG_DRAM_INIT) += pll_spectrum.o umc_init.o ddrphy_init.o
index 07529061213e6be38ca5e7de7fa0ddda86c93c70..af9c86d3b83aa554ee7b005912417d5d6c327207 100644 (file)
@@ -8,5 +8,5 @@ obj-y += boot-mode.o
 obj-$(CONFIG_DEBUG_LL) += lowlevel_debug.o
 obj-$(CONFIG_SOC_INIT) += bcu_init.o sbc_init.o sg_init.o pll_init.o \
                                                                clkrst_init.o
-obj-$(CONFIG_BOARD_POSTCLK_INIT) += pinctrl.o
+obj-$(CONFIG_BOARD_EARLY_INIT_F) += pinctrl.o
 obj-$(CONFIG_DRAM_INIT) += pll_spectrum.o umc_init.o ddrphy_init.o
index 35bea1a72f26d214181590ac0ca597cbfbf86beb..15cb223997ab65c2c5bc50035ee201f1fe7796b1 100644 (file)
@@ -95,6 +95,7 @@
 
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
+#define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_BOARD_EARLY_INIT_R
 #define CONFIG_BOARD_LATE_INIT