diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-01-15 14:59:06 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-01-17 09:00:40 +0900 |
commit | ef07a99b083378644bcb35e79eebd02b6cb8cd91 (patch) | |
tree | 5c56987b97b4493b2e2406f340e1e457245258c5 /arch/arm | |
parent | 9e3bb84bd880d8be82351d689415d6e142dfab32 (diff) |
ARM: uniphier: refactor Support Card init code
Splitting reset assertion (support_card_reset) and deassertion
(support_card_init) is not adding much value any more. Handle
all the initialization of Support Card in support_card_init(),
then remove support_card_reset().
Also, detect_num_flash_banks() can have a static qualifier.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-uniphier/init/init-ld11.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/init/init-ld20.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/init/init-ld4.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/init/init-pro4.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/init/init-pro5.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/init/init-pxs2.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/init/init-sld3.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/init/init-sld8.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/micro-support-card.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/micro-support-card.h | 5 |
10 files changed, 8 insertions, 28 deletions
diff --git a/arch/arm/mach-uniphier/init/init-ld11.c b/arch/arm/mach-uniphier/init/init-ld11.c index 64fe000eba0..e19dc5b1a70 100644 --- a/arch/arm/mach-uniphier/init/init-ld11.c +++ b/arch/arm/mach-uniphier/init/init-ld11.c @@ -15,8 +15,6 @@ int uniphier_ld11_init(const struct uniphier_board_data *bd) { uniphier_ld11_sbc_init(); - support_card_reset(); - support_card_init(); led_puts("L0"); diff --git a/arch/arm/mach-uniphier/init/init-ld20.c b/arch/arm/mach-uniphier/init/init-ld20.c index ec4563b3a18..e056d5d0b9d 100644 --- a/arch/arm/mach-uniphier/init/init-ld20.c +++ b/arch/arm/mach-uniphier/init/init-ld20.c @@ -15,8 +15,6 @@ int uniphier_ld20_init(const struct uniphier_board_data *bd) { uniphier_ld11_sbc_init(); - support_card_reset(); - support_card_init(); led_puts("L0"); diff --git a/arch/arm/mach-uniphier/init/init-ld4.c b/arch/arm/mach-uniphier/init/init-ld4.c index a56fb7fc192..a5b9493546b 100644 --- a/arch/arm/mach-uniphier/init/init-ld4.c +++ b/arch/arm/mach-uniphier/init/init-ld4.c @@ -18,12 +18,10 @@ int uniphier_ld4_init(const struct uniphier_board_data *bd) uniphier_ld4_sbc_init(); - support_card_reset(); + support_card_init(); uniphier_ld4_dpll_init(bd); - support_card_init(); - led_puts("L0"); uniphier_memconf_2ch_init(bd); diff --git a/arch/arm/mach-uniphier/init/init-pro4.c b/arch/arm/mach-uniphier/init/init-pro4.c index 8e2ebc73861..c277071450e 100644 --- a/arch/arm/mach-uniphier/init/init-pro4.c +++ b/arch/arm/mach-uniphier/init/init-pro4.c @@ -16,12 +16,10 @@ int uniphier_pro4_init(const struct uniphier_board_data *bd) { uniphier_sbc_init_savepin(); - support_card_reset(); + support_card_init(); uniphier_pro4_dpll_init(bd); - support_card_init(); - led_puts("L0"); uniphier_memconf_2ch_init(bd); diff --git a/arch/arm/mach-uniphier/init/init-pro5.c b/arch/arm/mach-uniphier/init/init-pro5.c index 37c62ef1b32..4e7041b19bd 100644 --- a/arch/arm/mach-uniphier/init/init-pro5.c +++ b/arch/arm/mach-uniphier/init/init-pro5.c @@ -14,8 +14,6 @@ int uniphier_pro5_init(const struct uniphier_board_data *bd) { uniphier_sbc_init_savepin(); - support_card_reset(); - support_card_init(); led_puts("L0"); diff --git a/arch/arm/mach-uniphier/init/init-pxs2.c b/arch/arm/mach-uniphier/init/init-pxs2.c index d080b9bfbb1..f7d5b4870c4 100644 --- a/arch/arm/mach-uniphier/init/init-pxs2.c +++ b/arch/arm/mach-uniphier/init/init-pxs2.c @@ -16,8 +16,6 @@ int uniphier_pxs2_init(const struct uniphier_board_data *bd) uniphier_pxs2_sbc_init(); - support_card_reset(); - support_card_init(); led_puts("L0"); diff --git a/arch/arm/mach-uniphier/init/init-sld3.c b/arch/arm/mach-uniphier/init/init-sld3.c index 0b8d6c510ab..50d9eafd113 100644 --- a/arch/arm/mach-uniphier/init/init-sld3.c +++ b/arch/arm/mach-uniphier/init/init-sld3.c @@ -18,12 +18,10 @@ int uniphier_sld3_init(const struct uniphier_board_data *bd) uniphier_sbc_init_admulti(); - support_card_reset(); + support_card_init(); uniphier_sld3_dpll_init(bd); - support_card_init(); - led_puts("L0"); uniphier_memconf_3ch_no_disbit_init(bd); diff --git a/arch/arm/mach-uniphier/init/init-sld8.c b/arch/arm/mach-uniphier/init/init-sld8.c index 075ac2739f2..8da28435788 100644 --- a/arch/arm/mach-uniphier/init/init-sld8.c +++ b/arch/arm/mach-uniphier/init/init-sld8.c @@ -18,12 +18,10 @@ int uniphier_sld8_init(const struct uniphier_board_data *bd) uniphier_ld4_sbc_init(); - support_card_reset(); + support_card_init(); uniphier_sld8_dpll_init(bd); - support_card_init(); - led_puts("L0"); uniphier_memconf_2ch_init(bd); diff --git a/arch/arm/mach-uniphier/micro-support-card.c b/arch/arm/mach-uniphier/micro-support-card.c index e53bcdf8e3c..80c5d970824 100644 --- a/arch/arm/mach-uniphier/micro-support-card.c +++ b/arch/arm/mach-uniphier/micro-support-card.c @@ -25,12 +25,12 @@ * bit[0]: LAN, I2C, LED * bit[1]: UART */ -void support_card_reset_deassert(void) +static void support_card_reset_deassert(void) { writel(0x00010000, MICRO_SUPPORT_CARD_RESET); } -void support_card_reset(void) +static void support_card_reset(void) { writel(0x00020003, MICRO_SUPPORT_CARD_RESET); } @@ -57,6 +57,7 @@ int checkboard(void) void support_card_init(void) { + support_card_reset(); /* * After power on, we need to keep the LAN controller in reset state * for a while. (200 usec) @@ -157,7 +158,7 @@ static void detect_num_flash_banks(void) debug("number of flash banks: %d\n", cfi_flash_num_flash_banks); } #else /* CONFIG_SYS_NO_FLASH */ -void detect_num_flash_banks(void) +static void detect_num_flash_banks(void) { }; #endif /* CONFIG_SYS_NO_FLASH */ diff --git a/arch/arm/mach-uniphier/micro-support-card.h b/arch/arm/mach-uniphier/micro-support-card.h index 4dae60312f5..90990ba4044 100644 --- a/arch/arm/mach-uniphier/micro-support-card.h +++ b/arch/arm/mach-uniphier/micro-support-card.h @@ -10,15 +10,10 @@ #define MICRO_SUPPORT_CARD_H #if defined(CONFIG_MICRO_SUPPORT_CARD) -void support_card_reset(void); void support_card_init(void); void support_card_late_init(void); void led_puts(const char *s); #else -static inline void support_card_reset(void) -{ -} - static inline void support_card_init(void) { } |