aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2012-05-02 04:53:48 -0400
committerArnd Bergmann <arnd@arndb.de>2012-05-31 20:04:33 -0400
commitfd6948bb2aee1020001d7fd4747160541d69e30f (patch)
tree6cf7a62c08d785bc26630d0490e0d838daf24948 /arch
parent48a4ea626ddfad1c714ac4e3b7049347c22f2aa2 (diff)
ARM: ux500: Only initialise STE's UIBs on boards which support them
ST-Ericsson uses User Interface Boards to extend functionality of some of their development boards. However, these aren't compatible with all the supported boards found in Mainline (Snowball for instance). This patch ensures that the UIBs are only probed on boards which can actually support them. This in turn saves lots of unnecessary error messages normally found in Snowball's boot log. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ux500/board-mop500-uib.c4
-rw-r--r--arch/arm/mach-ux500/board-mop500.c8
-rw-r--r--arch/arm/mach-ux500/board-mop500.h1
3 files changed, 10 insertions, 3 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-uib.c b/arch/arm/mach-ux500/board-mop500-uib.c
index b29a788f498c..1f47d962e3a1 100644
--- a/arch/arm/mach-ux500/board-mop500-uib.c
+++ b/arch/arm/mach-ux500/board-mop500-uib.c
@@ -96,7 +96,7 @@ static void __init __mop500_uib_init(struct uib *uib, const char *why)
96/* 96/*
97 * Detect the UIB attached based on the presence or absence of i2c devices. 97 * Detect the UIB attached based on the presence or absence of i2c devices.
98 */ 98 */
99static int __init mop500_uib_init(void) 99int __init mop500_uib_init(void)
100{ 100{
101 struct uib *uib = mop500_uib; 101 struct uib *uib = mop500_uib;
102 struct i2c_adapter *i2c0; 102 struct i2c_adapter *i2c0;
@@ -131,5 +131,3 @@ static int __init mop500_uib_init(void)
131 131
132 return 0; 132 return 0;
133} 133}
134
135module_init(mop500_uib_init);
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 5c5bfd5d1b11..c3ece275b22c 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -716,6 +716,8 @@ static void __init mop500_init_machine(void)
716 716
717 /* This board has full regulator constraints */ 717 /* This board has full regulator constraints */
718 regulator_has_full_constraints(); 718 regulator_has_full_constraints();
719
720 mop500_uib_init();
719} 721}
720 722
721static void __init snowball_init_machine(void) 723static void __init snowball_init_machine(void)
@@ -780,6 +782,8 @@ static void __init hrefv60_init_machine(void)
780 782
781 /* This board has full regulator constraints */ 783 /* This board has full regulator constraints */
782 regulator_has_full_constraints(); 784 regulator_has_full_constraints();
785
786 mop500_uib_init();
783} 787}
784 788
785MACHINE_START(U8500, "ST-Ericsson MOP500 platform") 789MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
@@ -883,6 +887,8 @@ static void __init u8500_init_machine(void)
883 i2c_register_board_info(2, mop500_i2c2_devices, 887 i2c_register_board_info(2, mop500_i2c2_devices,
884 ARRAY_SIZE(mop500_i2c2_devices)); 888 ARRAY_SIZE(mop500_i2c2_devices));
885 889
890 mop500_uib_init();
891
886 } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { 892 } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
887 /* 893 /*
888 * Devices to be DT:ed: 894 * Devices to be DT:ed:
@@ -913,6 +919,8 @@ static void __init u8500_init_machine(void)
913 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); 919 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
914 i2c_register_board_info(2, mop500_i2c2_devices, 920 i2c_register_board_info(2, mop500_i2c2_devices,
915 ARRAY_SIZE(mop500_i2c2_devices)); 921 ARRAY_SIZE(mop500_i2c2_devices));
922
923 mop500_uib_init();
916 } 924 }
917 mop500_i2c_init(parent); 925 mop500_i2c_init(parent);
918 926
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h
index 3be0cb8f8914..2f87b25a908a 100644
--- a/arch/arm/mach-ux500/board-mop500.h
+++ b/arch/arm/mach-ux500/board-mop500.h
@@ -89,6 +89,7 @@ void __init mop500_pinmaps_init(void);
89void __init snowball_pinmaps_init(void); 89void __init snowball_pinmaps_init(void);
90void __init hrefv60_pinmaps_init(void); 90void __init hrefv60_pinmaps_init(void);
91 91
92int __init mop500_uib_init(void);
92void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info, 93void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info,
93 unsigned n); 94 unsigned n);
94 95