]> git.karo-electronics.de Git - linux-beck.git/commitdiff
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 dcf5ea9884f85422a73e8a8511609832aa5719f7..bfd48515073df937efbb20a7b9229c660c05e99f 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__);
index a7994776ef302f73eed796ea30afaeedf10f13c1..e7593b0a4f4235f7622dfb758634e87f31a20e76 100644 (file)
@@ -804,7 +804,7 @@ static void __init u8500_init_machine(void)
                mop500_uib_init();
 
        } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
-               mop500_msp_init(parent);
+               mop500_of_msp_init(parent);
        } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) {
                /*
                 * The HREFv60 board removed a GPIO expander and routed
index bdae9b03a33b1d60026384bdc71a21f00ab29b21..c6daea208870371e88ee11d36d8e6d29aa7f0c23 100644 (file)
@@ -95,6 +95,8 @@ void __init mop500_pinmaps_init(void);
 void __init snowball_pinmaps_init(void);
 void __init hrefv60_pinmaps_init(void);
 void mop500_msp_init(struct device *parent);
+/* Due for removal once the MSP driver has been fully DT:ed. */
+void mop500_of_msp_init(struct device *parent);
 
 int __init mop500_uib_init(void);
 void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info,