aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-msm/board-qsd8x50.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index fb0fe6771e56..9e4cf2441122 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -35,6 +35,45 @@
35 35
36extern struct sys_timer msm_timer; 36extern struct sys_timer msm_timer;
37 37
38static const resource_size_t qsd8x50_surf_smc91x_base __initdata = 0x70000300;
39static const unsigned qsd8x50_surf_smc91x_gpio __initdata = 156;
40
41/* Leave smc91x resources empty here, as we'll fill them in
42 * at run-time: they vary from board to board, and the true
43 * configuration won't be known until boot.
44 */
45static struct resource smc91x_resources[] __initdata = {
46 [0] = {
47 .flags = IORESOURCE_MEM,
48 },
49 [1] = {
50 .flags = IORESOURCE_IRQ,
51 },
52};
53
54static struct platform_device smc91x_device __initdata = {
55 .name = "smc91x",
56 .id = 0,
57 .num_resources = ARRAY_SIZE(smc91x_resources),
58 .resource = smc91x_resources,
59};
60
61static int __init msm_init_smc91x(void)
62{
63 if (machine_is_qsd8x50_surf()) {
64 smc91x_resources[0].start = qsd8x50_surf_smc91x_base;
65 smc91x_resources[0].end = qsd8x50_surf_smc91x_base + 0xff;
66 smc91x_resources[1].start =
67 gpio_to_irq(qsd8x50_surf_smc91x_gpio);
68 smc91x_resources[1].end =
69 gpio_to_irq(qsd8x50_surf_smc91x_gpio);
70 platform_device_register(&smc91x_device);
71 }
72
73 return 0;
74}
75module_init(msm_init_smc91x);
76
38static struct platform_device *devices[] __initdata = { 77static struct platform_device *devices[] __initdata = {
39 &msm_device_uart3, 78 &msm_device_uart3,
40}; 79};