ARM: ux500: Fork MSP platform registration for step-by-step DT enablement
authorLee Jones <lee.jones@linaro.org>
Thu, 26 Jul 2012 16:42:01 +0000 (17:42 +0100)
committerLee Jones <lee.jones@linaro.org>
Thu, 20 Sep 2012 10:32:39 +0000 (12:32 +0200)
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>
arch/arm/mach-ux500/board-mop500-msp.c
arch/arm/mach-ux500/board-mop500.c
arch/arm/mach-ux500/board-mop500.h

index dcf5ea9..bfd4851 100644 (file)
@@ -171,6 +171,26 @@ static struct msp_i2s_platform_data msp3_platform_data = {
        .msp_i2s_dma_tx = NULL,
 };
 
+/* Due for removal once the MSP driver has been fully DT:ed. */
+void mop500_of_msp_init(struct device *parent)
+{
+       pr_info("%s: Register platform-device 'snd-soc-u8500'.\n", __func__);
+       platform_device_register(&snd_soc_mop500);
+
+       pr_info("Initialize MSP I2S-devices.\n");
+       db8500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0,
+                          &msp0_platform_data);
+       db8500_add_msp_i2s(parent, 1, U8500_MSP1_BASE, IRQ_DB8500_MSP1,
+                          &msp1_platform_data);
+       db8500_add_msp_i2s(parent, 2, U8500_MSP2_BASE, IRQ_DB8500_MSP2,
+                          &msp2_platform_data);
+       db8500_add_msp_i2s(parent, 3, U8500_MSP3_BASE, IRQ_DB8500_MSP1,
+                          &msp3_platform_data);
+
+       pr_info("%s: Register platform-device 'ux500-pcm'\n", __func__);
+       platform_device_register(&ux500_pcm);
+}
+
 void mop500_msp_init(struct device *parent)
 {
        pr_info("%s: Register platform-device 'snd-soc-mop500'.\n", __func__);
Simple merge
Simple merge