Skip to content

Commit

Permalink
ARM: ux500: Fork MSP platform registration for step-by-step DT enable…
Browse files Browse the repository at this point in the history
…ment

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>
  • Loading branch information
Lee Jones committed Sep 20, 2012
1 parent 9c06af3 commit ae6d35b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
20 changes: 20 additions & 0 deletions arch/arm/mach-ux500/board-mop500-msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-ux500/board-mop500.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-ux500/board-mop500.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ae6d35b

Please sign in to comment.