aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-09-18 09:53:06 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-09-26 05:08:53 -0400
commit3ea3e63938ca3adbdb02db99bce89a71b802ebab (patch)
tree47577e6af1f64687d581e4e7d1b1888aa267e9be /arch/arm/mach-ux500
parent7585382ad5ca26134fffc860da9bfc1947895eb3 (diff)
ARM: ux500: Purge UIB framework when booting with ATAGs
It's time to remove all ATAG support from ux500 and rely solely on Device Tree booting. This patch is part of that endeavour. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/Makefile1
-rw-r--r--arch/arm/mach-ux500/board-mop500-uib.c97
-rw-r--r--arch/arm/mach-ux500/board-mop500.c8
-rw-r--r--arch/arm/mach-ux500/board-mop500.h3
-rw-r--r--arch/arm/mach-ux500/cpu.c5
-rw-r--r--arch/arm/mach-ux500/setup.h1
6 files changed, 4 insertions, 111 deletions
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index 4f55eccae704..e4ed82036302 100644
--- a/arch/arm/mach-ux500/Makefile
+++ b/arch/arm/mach-ux500/Makefile
@@ -8,7 +8,6 @@ obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
8obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o 8obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o
9obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \ 9obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \
10 board-mop500-regulators.o \ 10 board-mop500-regulators.o \
11 board-mop500-uib.o \
12 board-mop500-pins.o \ 11 board-mop500-pins.o \
13 board-mop500-audio.o 12 board-mop500-audio.o
14obj-$(CONFIG_SMP) += platsmp.o headsmp.o 13obj-$(CONFIG_SMP) += platsmp.o headsmp.o
diff --git a/arch/arm/mach-ux500/board-mop500-uib.c b/arch/arm/mach-ux500/board-mop500-uib.c
deleted file mode 100644
index 2742eeccbcd0..000000000000
--- a/arch/arm/mach-ux500/board-mop500-uib.c
+++ /dev/null
@@ -1,97 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
5 * License terms: GNU General Public License (GPL), version 2
6 */
7
8#define pr_fmt(fmt) "mop500-uib: " fmt
9
10#include <linux/kernel.h>
11#include <linux/init.h>
12#include <linux/i2c.h>
13
14#include "board-mop500.h"
15#include "id.h"
16
17enum mop500_uib {
18};
19
20struct uib {
21 const char *name;
22 const char *option;
23 void (*init)(void);
24};
25
26static struct uib __initdata mop500_uibs[] = {
27};
28
29static struct uib *mop500_uib;
30
31static int __init mop500_uib_setup(char *str)
32{
33 int i;
34
35 for (i = 0; i < ARRAY_SIZE(mop500_uibs); i++) {
36 struct uib *uib = &mop500_uibs[i];
37
38 if (!strcmp(str, uib->option)) {
39 mop500_uib = uib;
40 break;
41 }
42 }
43
44 if (i == ARRAY_SIZE(mop500_uibs))
45 pr_err("invalid uib= option (%s)\n", str);
46
47 return 1;
48}
49__setup("uib=", mop500_uib_setup);
50
51/*
52 * The UIBs are detected after the I2C host controllers are registered, so
53 * i2c_register_board_info() can't be used.
54 */
55void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info,
56 unsigned n)
57{
58 struct i2c_adapter *adap;
59 struct i2c_client *client;
60 int i;
61
62 adap = i2c_get_adapter(busnum);
63 if (!adap) {
64 pr_err("failed to get adapter i2c%d\n", busnum);
65 return;
66 }
67
68 for (i = 0; i < n; i++) {
69 client = i2c_new_device(adap, &info[i]);
70 if (!client)
71 pr_err("failed to register %s to i2c%d\n",
72 info[i].type, busnum);
73 }
74
75 i2c_put_adapter(adap);
76}
77
78static void __init __mop500_uib_init(struct uib *uib, const char *why)
79{
80 pr_info("%s (%s)\n", uib->name, why);
81 uib->init();
82}
83
84int __init mop500_uib_init(void)
85{
86 struct uib *uib = mop500_uib;
87
88 if (!cpu_is_u8500_family())
89 return -ENODEV;
90
91 if (uib) {
92 __mop500_uib_init(uib, "from uib= boot argument");
93 return 0;
94 }
95
96 return 0;
97}
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index b37bcbc1c7b7..d034e62e226f 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -105,8 +105,8 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
105 /* we re-use nomadik timer here */ 105 /* we re-use nomadik timer here */
106 .init_time = ux500_timer_init, 106 .init_time = ux500_timer_init,
107 .init_machine = mop500_init_machine, 107 .init_machine = mop500_init_machine,
108 .init_late = ux500_init_late,
109 .restart = ux500_restart, 108 .restart = ux500_restart,
109 .init_late = NULL,
110MACHINE_END 110MACHINE_END
111 111
112MACHINE_START(U8520, "ST-Ericsson U8520 Platform HREFP520") 112MACHINE_START(U8520, "ST-Ericsson U8520 Platform HREFP520")
@@ -115,8 +115,8 @@ MACHINE_START(U8520, "ST-Ericsson U8520 Platform HREFP520")
115 .init_irq = ux500_init_irq, 115 .init_irq = ux500_init_irq,
116 .init_time = ux500_timer_init, 116 .init_time = ux500_timer_init,
117 .init_machine = mop500_init_machine, 117 .init_machine = mop500_init_machine,
118 .init_late = ux500_init_late,
119 .restart = ux500_restart, 118 .restart = ux500_restart,
119 .init_late = NULL,
120MACHINE_END 120MACHINE_END
121 121
122MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") 122MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
@@ -126,8 +126,8 @@ MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
126 .init_irq = ux500_init_irq, 126 .init_irq = ux500_init_irq,
127 .init_time = ux500_timer_init, 127 .init_time = ux500_timer_init,
128 .init_machine = hrefv60_init_machine, 128 .init_machine = hrefv60_init_machine,
129 .init_late = ux500_init_late,
130 .restart = ux500_restart, 129 .restart = ux500_restart,
130 .init_late = NULL,
131MACHINE_END 131MACHINE_END
132 132
133MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") 133MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
@@ -138,6 +138,6 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
138 /* we re-use nomadik timer here */ 138 /* we re-use nomadik timer here */
139 .init_time = ux500_timer_init, 139 .init_time = ux500_timer_init,
140 .init_machine = snowball_init_machine, 140 .init_machine = snowball_init_machine,
141 .init_late = NULL,
142 .restart = ux500_restart, 141 .restart = ux500_restart,
142 .init_late = NULL,
143MACHINE_END 143MACHINE_END
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h
index 2fb89e2d5faa..511d6febbe99 100644
--- a/arch/arm/mach-ux500/board-mop500.h
+++ b/arch/arm/mach-ux500/board-mop500.h
@@ -93,7 +93,4 @@ void __init mop500_pinmaps_init(void);
93void __init snowball_pinmaps_init(void); 93void __init snowball_pinmaps_init(void);
94void __init hrefv60_pinmaps_init(void); 94void __init hrefv60_pinmaps_init(void);
95 95
96int __init mop500_uib_init(void);
97void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info,
98 unsigned n);
99#endif 96#endif
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c
index 0e65822394fc..f84d4397896b 100644
--- a/arch/arm/mach-ux500/cpu.c
+++ b/arch/arm/mach-ux500/cpu.c
@@ -104,11 +104,6 @@ void __init ux500_init_irq(void)
104 } 104 }
105} 105}
106 106
107void __init ux500_init_late(void)
108{
109 mop500_uib_init();
110}
111
112static const char * __init ux500_get_machine(void) 107static const char * __init ux500_get_machine(void)
113{ 108{
114 return kasprintf(GFP_KERNEL, "DB%4x", dbx500_partnumber()); 109 return kasprintf(GFP_KERNEL, "DB%4x", dbx500_partnumber());
diff --git a/arch/arm/mach-ux500/setup.h b/arch/arm/mach-ux500/setup.h
index 656324aad18e..bdb356498a74 100644
--- a/arch/arm/mach-ux500/setup.h
+++ b/arch/arm/mach-ux500/setup.h
@@ -24,7 +24,6 @@ extern void __init u8500_map_io(void);
24extern struct device * __init u8500_init_devices(void); 24extern struct device * __init u8500_init_devices(void);
25 25
26extern void __init ux500_init_irq(void); 26extern void __init ux500_init_irq(void);
27extern void __init ux500_init_late(void);
28 27
29extern struct device *ux500_soc_device_init(const char *soc_id); 28extern struct device *ux500_soc_device_init(const char *soc_id);
30 29