From c484c2da18f291e104b6991569045ae615187e5b Mon Sep 17 00:00:00 2001 From: Gregory Bean Date: Wed, 29 Sep 2010 13:46:45 -0700 Subject: [PATCH] --- yaml --- r: 212605 b: refs/heads/master c: 5d73c53b786665f991f70be01a51a23233aeb44f h: refs/heads/master i: 212603: d3f66caafea616d38b3634f3691434ec83a9f8d0 v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-msm/board-qsd8x50.c | 39 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index b322d84be96a..959a10c9c2b9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 26cc66607189ac544edad04927f506599d990f0f +refs/heads/master: 5d73c53b786665f991f70be01a51a23233aeb44f diff --git a/trunk/arch/arm/mach-msm/board-qsd8x50.c b/trunk/arch/arm/mach-msm/board-qsd8x50.c index fb0fe6771e56..9e4cf2441122 100644 --- a/trunk/arch/arm/mach-msm/board-qsd8x50.c +++ b/trunk/arch/arm/mach-msm/board-qsd8x50.c @@ -35,6 +35,45 @@ extern struct sys_timer msm_timer; +static const resource_size_t qsd8x50_surf_smc91x_base __initdata = 0x70000300; +static const unsigned qsd8x50_surf_smc91x_gpio __initdata = 156; + +/* Leave smc91x resources empty here, as we'll fill them in + * at run-time: they vary from board to board, and the true + * configuration won't be known until boot. + */ +static struct resource smc91x_resources[] __initdata = { + [0] = { + .flags = IORESOURCE_MEM, + }, + [1] = { + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device smc91x_device __initdata = { + .name = "smc91x", + .id = 0, + .num_resources = ARRAY_SIZE(smc91x_resources), + .resource = smc91x_resources, +}; + +static int __init msm_init_smc91x(void) +{ + if (machine_is_qsd8x50_surf()) { + smc91x_resources[0].start = qsd8x50_surf_smc91x_base; + smc91x_resources[0].end = qsd8x50_surf_smc91x_base + 0xff; + smc91x_resources[1].start = + gpio_to_irq(qsd8x50_surf_smc91x_gpio); + smc91x_resources[1].end = + gpio_to_irq(qsd8x50_surf_smc91x_gpio); + platform_device_register(&smc91x_device); + } + + return 0; +} +module_init(msm_init_smc91x); + static struct platform_device *devices[] __initdata = { &msm_device_uart3, };