aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorJuha Yrjola <juha.yrjola@solidboot.com>2006-06-26 19:16:10 -0400
committerTony Lindgren <tony@atomide.com>2006-06-26 19:16:10 -0400
commited7eb9d90a24bbe93fa47e19b61528bd5cfe584c (patch)
tree2b014f49aacbef4ce7cb266ef980a46f98389cf1 /arch/arm/mach-omap2
parentc15e5d10b160ca0fe71f5865c771bf4ad0e7ed85 (diff)
ARM: OMAP: Register the 24xx McSPI device
Register the 24xx McSPI device as an OMAP2 platform device. The driver module and Kconfig option were merged already some time ago. Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/devices.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index fb7f91da1aad..5139677e4266 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -105,6 +105,51 @@ static inline void omap_init_sti(void)
105static inline void omap_init_sti(void) {} 105static inline void omap_init_sti(void) {}
106#endif 106#endif
107 107
108#if defined(CONFIG_SPI_OMAP24XX)
109
110#include <asm/arch/mcspi.h>
111
112#define OMAP2_MCSPI1_BASE 0x48098000
113#define OMAP2_MCSPI2_BASE 0x4809a000
114
115/* FIXME: use resources instead */
116
117static struct omap2_mcspi_platform_config omap2_mcspi1_config = {
118 .base = io_p2v(OMAP2_MCSPI1_BASE),
119 .num_cs = 4,
120};
121
122struct platform_device omap2_mcspi1 = {
123 .name = "omap2_mcspi",
124 .id = 1,
125 .dev = {
126 .platform_data = &omap2_mcspi1_config,
127 },
128};
129
130static struct omap2_mcspi_platform_config omap2_mcspi2_config = {
131 .base = io_p2v(OMAP2_MCSPI2_BASE),
132 .num_cs = 2,
133};
134
135struct platform_device omap2_mcspi2 = {
136 .name = "omap2_mcspi",
137 .id = 2,
138 .dev = {
139 .platform_data = &omap2_mcspi2_config,
140 },
141};
142
143static void omap_init_mcspi(void)
144{
145 platform_device_register(&omap2_mcspi1);
146 platform_device_register(&omap2_mcspi2);
147}
148
149#else
150static inline void omap_init_mcspi(void) {}
151#endif
152
108/*-------------------------------------------------------------------------*/ 153/*-------------------------------------------------------------------------*/
109 154
110static int __init omap2_init_devices(void) 155static int __init omap2_init_devices(void)
@@ -113,6 +158,7 @@ static int __init omap2_init_devices(void)
113 * in alphabetical order so they're easier to sort through. 158 * in alphabetical order so they're easier to sort through.
114 */ 159 */
115 omap_init_i2c(); 160 omap_init_i2c();
161 omap_init_mcspi();
116 omap_init_sti(); 162 omap_init_sti();
117 163
118 return 0; 164 return 0;