ARM: uniphier: refactor SBC init code
There is a bunch of duplication in the System Bus Controller init
code. Roughly, there are two types in the SBC mode: Adress/Data
Multiplex Mode and Save Pins Mode. Consolidate per-SoC functions
into the two, plus per-SoC optional init code.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
diff --git a/arch/arm/mach-uniphier/init/init-ld4.c b/arch/arm/mach-uniphier/init/init-ld4.c
index a9c6d72..5295cd0 100644
--- a/arch/arm/mach-uniphier/init/init-ld4.c
+++ b/arch/arm/mach-uniphier/init/init-ld4.c
@@ -14,7 +14,8 @@
{
ph1_ld4_bcu_init(bd);
- ph1_ld4_sbc_init(bd);
+ sbc_savepin_init(bd);
+ uniphier_ld4_sbc_init(bd);
support_card_reset();
diff --git a/arch/arm/mach-uniphier/init/init-pro4.c b/arch/arm/mach-uniphier/init/init-pro4.c
index 6fcd8b6..456fb48 100644
--- a/arch/arm/mach-uniphier/init/init-pro4.c
+++ b/arch/arm/mach-uniphier/init/init-pro4.c
@@ -12,7 +12,7 @@
int ph1_pro4_init(const struct uniphier_board_data *bd)
{
- ph1_pro4_sbc_init(bd);
+ sbc_savepin_init(bd);
support_card_reset();
diff --git a/arch/arm/mach-uniphier/init/init-pro5.c b/arch/arm/mach-uniphier/init/init-pro5.c
index 45c65cf..c2c6803 100644
--- a/arch/arm/mach-uniphier/init/init-pro5.c
+++ b/arch/arm/mach-uniphier/init/init-pro5.c
@@ -12,7 +12,7 @@
int ph1_pro5_init(const struct uniphier_board_data *bd)
{
- ph1_pro4_sbc_init(bd);
+ sbc_savepin_init(bd);
support_card_reset();
diff --git a/arch/arm/mach-uniphier/init/init-pxs2.c b/arch/arm/mach-uniphier/init/init-pxs2.c
index 029c544..2d4b6fb 100644
--- a/arch/arm/mach-uniphier/init/init-pxs2.c
+++ b/arch/arm/mach-uniphier/init/init-pxs2.c
@@ -14,7 +14,8 @@
{
int ret;
- proxstream2_sbc_init(bd);
+ sbc_savepin_init(bd);
+ uniphier_pxs2_sbc_init(bd);
support_card_reset();
diff --git a/arch/arm/mach-uniphier/init/init-sld3.c b/arch/arm/mach-uniphier/init/init-sld3.c
index 7827ec0..c48126f 100644
--- a/arch/arm/mach-uniphier/init/init-sld3.c
+++ b/arch/arm/mach-uniphier/init/init-sld3.c
@@ -14,7 +14,8 @@
{
ph1_sld3_bcu_init(bd);
- ph1_sld3_sbc_init(bd);
+ sbc_admulti_init(bd);
+ uniphier_sld3_sbc_init(bd);
support_card_reset();
diff --git a/arch/arm/mach-uniphier/init/init-sld8.c b/arch/arm/mach-uniphier/init/init-sld8.c
index 6c96aed..1f31ca6 100644
--- a/arch/arm/mach-uniphier/init/init-sld8.c
+++ b/arch/arm/mach-uniphier/init/init-sld8.c
@@ -14,7 +14,8 @@
{
ph1_ld4_bcu_init(bd);
- ph1_ld4_sbc_init(bd);
+ sbc_savepin_init(bd);
+ uniphier_ld4_sbc_init(bd);
support_card_reset();