diff options
Diffstat (limited to 'arch/arm/mach-mx2/devices.c')
-rw-r--r-- | arch/arm/mach-mx2/devices.c | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c index 4ecf0977beb4..62810cbe4e30 100644 --- a/arch/arm/mach-mx2/devices.c +++ b/arch/arm/mach-mx2/devices.c | |||
@@ -40,6 +40,74 @@ | |||
40 | #include "devices.h" | 40 | #include "devices.h" |
41 | 41 | ||
42 | /* | 42 | /* |
43 | * SPI master controller | ||
44 | * | ||
45 | * - i.MX1: 2 channel (slighly different register setting) | ||
46 | * - i.MX21: 2 channel | ||
47 | * - i.MX27: 3 channel | ||
48 | */ | ||
49 | static struct resource mxc_spi_resources0[] = { | ||
50 | { | ||
51 | .start = CSPI1_BASE_ADDR, | ||
52 | .end = CSPI1_BASE_ADDR + SZ_4K - 1, | ||
53 | .flags = IORESOURCE_MEM, | ||
54 | }, { | ||
55 | .start = MXC_INT_CSPI1, | ||
56 | .end = MXC_INT_CSPI1, | ||
57 | .flags = IORESOURCE_IRQ, | ||
58 | }, | ||
59 | }; | ||
60 | |||
61 | static struct resource mxc_spi_resources1[] = { | ||
62 | { | ||
63 | .start = CSPI2_BASE_ADDR, | ||
64 | .end = CSPI2_BASE_ADDR + SZ_4K - 1, | ||
65 | .flags = IORESOURCE_MEM, | ||
66 | }, { | ||
67 | .start = MXC_INT_CSPI2, | ||
68 | .end = MXC_INT_CSPI2, | ||
69 | .flags = IORESOURCE_IRQ, | ||
70 | }, | ||
71 | }; | ||
72 | |||
73 | #ifdef CONFIG_MACH_MX27 | ||
74 | static struct resource mxc_spi_resources2[] = { | ||
75 | { | ||
76 | .start = CSPI3_BASE_ADDR, | ||
77 | .end = CSPI3_BASE_ADDR + SZ_4K - 1, | ||
78 | .flags = IORESOURCE_MEM, | ||
79 | }, { | ||
80 | .start = MXC_INT_CSPI3, | ||
81 | .end = MXC_INT_CSPI3, | ||
82 | .flags = IORESOURCE_IRQ, | ||
83 | }, | ||
84 | }; | ||
85 | #endif | ||
86 | |||
87 | struct platform_device mxc_spi_device0 = { | ||
88 | .name = "spi_imx", | ||
89 | .id = 0, | ||
90 | .num_resources = ARRAY_SIZE(mxc_spi_resources0), | ||
91 | .resource = mxc_spi_resources0, | ||
92 | }; | ||
93 | |||
94 | struct platform_device mxc_spi_device1 = { | ||
95 | .name = "spi_imx", | ||
96 | .id = 1, | ||
97 | .num_resources = ARRAY_SIZE(mxc_spi_resources1), | ||
98 | .resource = mxc_spi_resources1, | ||
99 | }; | ||
100 | |||
101 | #ifdef CONFIG_MACH_MX27 | ||
102 | struct platform_device mxc_spi_device2 = { | ||
103 | .name = "spi_imx", | ||
104 | .id = 2, | ||
105 | .num_resources = ARRAY_SIZE(mxc_spi_resources2), | ||
106 | .resource = mxc_spi_resources2, | ||
107 | }; | ||
108 | #endif | ||
109 | |||
110 | /* | ||
43 | * General Purpose Timer | 111 | * General Purpose Timer |
44 | * - i.MX21: 3 timers | 112 | * - i.MX21: 3 timers |
45 | * - i.MX27: 6 timers | 113 | * - i.MX27: 6 timers |