aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2012-07-26 12:42:01 -0400
committerLee Jones <lee.jones@linaro.org>2012-09-20 06:32:39 -0400
commitae6d35b9486b61c50294f88c1eb5dc1c7b74e65b (patch)
tree1c89f648a4e9ed41f46d3535affc0bff5da49fcc
parent9c06af30207276a0a4bcaf8aa57521095f440383 (diff)
ARM: ux500: Fork MSP platform registration for step-by-step DT enablement
We've done this before and it worked well last time. Here we're duplicating a complex registration function to ease the process of enabling it for Device Tree. As there are quite a few steps taken during the registration process, it makes sense to break them up into more manageable chunks. This patch will aid us. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--arch/arm/mach-ux500/board-mop500-msp.c20
-rw-r--r--arch/arm/mach-ux500/board-mop500.c2
-rw-r--r--arch/arm/mach-ux500/board-mop500.h2
3 files changed, 23 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-msp.c b/arch/arm/mach-ux500/board-mop500-msp.c
index dcf5ea9884f8..bfd48515073d 100644
--- a/arch/arm/mach-ux500/board-mop500-msp.c
+++ b/arch/arm/mach-ux500/board-mop500-msp.c
@@ -171,6 +171,26 @@ static struct msp_i2s_platform_data msp3_platform_data = {
171 .msp_i2s_dma_tx = NULL, 171 .msp_i2s_dma_tx = NULL,
172}; 172};
173 173
174/* Due for removal once the MSP driver has been fully DT:ed. */
175void mop500_of_msp_init(struct device *parent)
176{
177 pr_info("%s: Register platform-device 'snd-soc-u8500'.\n", __func__);
178 platform_device_register(&snd_soc_mop500);
179
180 pr_info("Initialize MSP I2S-devices.\n");
181 db8500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0,
182 &msp0_platform_data);
183 db8500_add_msp_i2s(parent, 1, U8500_MSP1_BASE, IRQ_DB8500_MSP1,
184 &msp1_platform_data);
185 db8500_add_msp_i2s(parent, 2, U8500_MSP2_BASE, IRQ_DB8500_MSP2,
186 &msp2_platform_data);
187 db8500_add_msp_i2s(parent, 3, U8500_MSP3_BASE, IRQ_DB8500_MSP1,
188 &msp3_platform_data);
189
190 pr_info("%s: Register platform-device 'ux500-pcm'\n", __func__);
191 platform_device_register(&ux500_pcm);
192}
193
174void mop500_msp_init(struct device *parent) 194void mop500_msp_init(struct device *parent)
175{ 195{
176 pr_info("%s: Register platform-device 'snd-soc-mop500'.\n", __func__); 196 pr_info("%s: Register platform-device 'snd-soc-mop500'.\n", __func__);
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index a7994776ef30..e7593b0a4f42 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -804,7 +804,7 @@ static void __init u8500_init_machine(void)
804 mop500_uib_init(); 804 mop500_uib_init();
805 805
806 } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { 806 } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
807 mop500_msp_init(parent); 807 mop500_of_msp_init(parent);
808 } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) { 808 } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) {
809 /* 809 /*
810 * The HREFv60 board removed a GPIO expander and routed 810 * The HREFv60 board removed a GPIO expander and routed
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h
index bdae9b03a33b..c6daea208870 100644
--- a/arch/arm/mach-ux500/board-mop500.h
+++ b/arch/arm/mach-ux500/board-mop500.h
@@ -95,6 +95,8 @@ void __init mop500_pinmaps_init(void);
95void __init snowball_pinmaps_init(void); 95void __init snowball_pinmaps_init(void);
96void __init hrefv60_pinmaps_init(void); 96void __init hrefv60_pinmaps_init(void);
97void mop500_msp_init(struct device *parent); 97void mop500_msp_init(struct device *parent);
98/* Due for removal once the MSP driver has been fully DT:ed. */
99void mop500_of_msp_init(struct device *parent);
98 100
99int __init mop500_uib_init(void); 101int __init mop500_uib_init(void);
100void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info, 102void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info,