diff options
author | Bryan Wu <bryan.wu@analog.com> | 2007-10-10 13:20:06 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-10-10 13:20:06 -0400 |
commit | c6c4d7bbbb498c38afa05688dfc2784948a0c4e2 (patch) | |
tree | 9ebefb1b6c6ceff6e83eda3dfcbd616a725ecced /arch/blackfin/mach-bf533/boards/ezkit.c | |
parent | bbf25010f1a6b761914430f5fca081ec8c7accd1 (diff) |
Blackfin arch: update platform driver resource information to all board files
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin/mach-bf533/boards/ezkit.c')
-rw-r--r-- | arch/blackfin/mach-bf533/boards/ezkit.c | 91 |
1 files changed, 82 insertions, 9 deletions
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index 0000b8f1239c..5c1e35d3c012 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c | |||
@@ -35,7 +35,9 @@ | |||
35 | #include <linux/spi/spi.h> | 35 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/flash.h> | 36 | #include <linux/spi/flash.h> |
37 | #include <linux/usb_isp1362.h> | 37 | #include <linux/usb_isp1362.h> |
38 | #include <linux/pata_platform.h> | ||
38 | #include <linux/irq.h> | 39 | #include <linux/irq.h> |
40 | #include <asm/dma.h> | ||
39 | #include <asm/bfin5xx_spi.h> | 41 | #include <asm/bfin5xx_spi.h> |
40 | 42 | ||
41 | /* | 43 | /* |
@@ -50,6 +52,12 @@ static struct platform_device rtc_device = { | |||
50 | }; | 52 | }; |
51 | #endif | 53 | #endif |
52 | 54 | ||
55 | #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) | ||
56 | static struct platform_device bfin_fb_adv7393_device = { | ||
57 | .name = "bfin-adv7393", | ||
58 | }; | ||
59 | #endif | ||
60 | |||
53 | /* | 61 | /* |
54 | * USB-LAN EzExtender board | 62 | * USB-LAN EzExtender board |
55 | * Driver needs to know address, irq and flag pin. | 63 | * Driver needs to know address, irq and flag pin. |
@@ -131,7 +139,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
131 | /* the modalias must be the same as spi device driver name */ | 139 | /* the modalias must be the same as spi device driver name */ |
132 | .modalias = "m25p80", /* Name of spi_driver for this device */ | 140 | .modalias = "m25p80", /* Name of spi_driver for this device */ |
133 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ | 141 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ |
134 | .bus_num = 1, /* Framework bus number */ | 142 | .bus_num = 0, /* Framework bus number */ |
135 | .chip_select = 2, /* Framework chip select. On STAMP537 it is SPISSEL2*/ | 143 | .chip_select = 2, /* Framework chip select. On STAMP537 it is SPISSEL2*/ |
136 | .platform_data = &bfin_spi_flash_data, | 144 | .platform_data = &bfin_spi_flash_data, |
137 | .controller_data = &spi_flash_chip_info, | 145 | .controller_data = &spi_flash_chip_info, |
@@ -143,7 +151,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
143 | { | 151 | { |
144 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | 152 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ |
145 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | 153 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ |
146 | .bus_num = 1, /* Framework bus number */ | 154 | .bus_num = 0, /* Framework bus number */ |
147 | .chip_select = 1, /* Framework chip select. */ | 155 | .chip_select = 1, /* Framework chip select. */ |
148 | .platform_data = NULL, /* No spi_driver specific config */ | 156 | .platform_data = NULL, /* No spi_driver specific config */ |
149 | .controller_data = &spi_adc_chip_info, | 157 | .controller_data = &spi_adc_chip_info, |
@@ -154,24 +162,40 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
154 | { | 162 | { |
155 | .modalias = "ad1836-spi", | 163 | .modalias = "ad1836-spi", |
156 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 164 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
157 | .bus_num = 1, | 165 | .bus_num = 0, |
158 | .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, | 166 | .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, |
159 | .controller_data = &ad1836_spi_chip_info, | 167 | .controller_data = &ad1836_spi_chip_info, |
160 | }, | 168 | }, |
161 | #endif | 169 | #endif |
162 | }; | 170 | }; |
163 | 171 | ||
172 | /* SPI (0) */ | ||
173 | static struct resource bfin_spi0_resource[] = { | ||
174 | [0] = { | ||
175 | .start = SPI0_REGBASE, | ||
176 | .end = SPI0_REGBASE + 0xFF, | ||
177 | .flags = IORESOURCE_MEM, | ||
178 | }, | ||
179 | [1] = { | ||
180 | .start = CH_SPI, | ||
181 | .end = CH_SPI, | ||
182 | .flags = IORESOURCE_IRQ, | ||
183 | } | ||
184 | }; | ||
185 | |||
164 | /* SPI controller data */ | 186 | /* SPI controller data */ |
165 | static struct bfin5xx_spi_master spi_bfin_master_info = { | 187 | static struct bfin5xx_spi_master bfin_spi0_info = { |
166 | .num_chipselect = 8, | 188 | .num_chipselect = 8, |
167 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 189 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
168 | }; | 190 | }; |
169 | 191 | ||
170 | static struct platform_device spi_bfin_master_device = { | 192 | static struct platform_device bfin_spi0_device = { |
171 | .name = "bfin-spi-master", | 193 | .name = "bfin-spi", |
172 | .id = 1, /* Bus number */ | 194 | .id = 0, /* Bus number */ |
195 | .num_resources = ARRAY_SIZE(bfin_spi0_resource), | ||
196 | .resource = bfin_spi0_resource, | ||
173 | .dev = { | 197 | .dev = { |
174 | .platform_data = &spi_bfin_master_info, /* Passed to driver */ | 198 | .platform_data = &bfin_spi0_info, /* Passed to driver */ |
175 | }, | 199 | }, |
176 | }; | 200 | }; |
177 | #endif /* spi master and devices */ | 201 | #endif /* spi master and devices */ |
@@ -193,13 +217,54 @@ static struct platform_device bfin_uart_device = { | |||
193 | }; | 217 | }; |
194 | #endif | 218 | #endif |
195 | 219 | ||
220 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | ||
221 | #define PATA_INT 55 | ||
222 | |||
223 | static struct pata_platform_info bfin_pata_platform_data = { | ||
224 | .ioport_shift = 1, | ||
225 | .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED, | ||
226 | }; | ||
227 | |||
228 | static struct resource bfin_pata_resources[] = { | ||
229 | { | ||
230 | .start = 0x20314020, | ||
231 | .end = 0x2031403F, | ||
232 | .flags = IORESOURCE_MEM, | ||
233 | }, | ||
234 | { | ||
235 | .start = 0x2031401C, | ||
236 | .end = 0x2031401F, | ||
237 | .flags = IORESOURCE_MEM, | ||
238 | }, | ||
239 | { | ||
240 | .start = PATA_INT, | ||
241 | .end = PATA_INT, | ||
242 | .flags = IORESOURCE_IRQ, | ||
243 | }, | ||
244 | }; | ||
245 | |||
246 | static struct platform_device bfin_pata_device = { | ||
247 | .name = "pata_platform", | ||
248 | .id = -1, | ||
249 | .num_resources = ARRAY_SIZE(bfin_pata_resources), | ||
250 | .resource = bfin_pata_resources, | ||
251 | .dev = { | ||
252 | .platform_data = &bfin_pata_platform_data, | ||
253 | } | ||
254 | }; | ||
255 | #endif | ||
256 | |||
196 | static struct platform_device *ezkit_devices[] __initdata = { | 257 | static struct platform_device *ezkit_devices[] __initdata = { |
197 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 258 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
198 | &smc91x_device, | 259 | &smc91x_device, |
199 | #endif | 260 | #endif |
200 | 261 | ||
201 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 262 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
202 | &spi_bfin_master_device, | 263 | &bfin_spi0_device, |
264 | #endif | ||
265 | |||
266 | #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) | ||
267 | &bfin_fb_adv7393_device, | ||
203 | #endif | 268 | #endif |
204 | 269 | ||
205 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | 270 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
@@ -209,6 +274,10 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
209 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 274 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
210 | &bfin_uart_device, | 275 | &bfin_uart_device, |
211 | #endif | 276 | #endif |
277 | |||
278 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | ||
279 | &bfin_pata_device, | ||
280 | #endif | ||
212 | }; | 281 | }; |
213 | 282 | ||
214 | static int __init ezkit_init(void) | 283 | static int __init ezkit_init(void) |
@@ -218,6 +287,10 @@ static int __init ezkit_init(void) | |||
218 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 287 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
219 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 288 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
220 | #endif | 289 | #endif |
290 | |||
291 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | ||
292 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; | ||
293 | #endif | ||
221 | return 0; | 294 | return 0; |
222 | } | 295 | } |
223 | 296 | ||