diff options
Diffstat (limited to 'arch/blackfin/mach-bf533/boards')
-rw-r--r-- | arch/blackfin/mach-bf533/boards/H8606.c | 66 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/blackstamp.c | 134 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/cm_bf533.c | 138 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/ezkit.c | 102 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/ip0x.c | 63 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/stamp.c | 174 |
6 files changed, 621 insertions, 56 deletions
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c index 4adceb0bdb6d..175371af0692 100644 --- a/arch/blackfin/mach-bf533/boards/H8606.c +++ b/arch/blackfin/mach-bf533/boards/H8606.c | |||
@@ -171,7 +171,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = { | |||
171 | }; | 171 | }; |
172 | #endif | 172 | #endif |
173 | 173 | ||
174 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 174 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
175 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | 175 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
176 | .enable_dma = 0, | 176 | .enable_dma = 0, |
177 | .bits_per_word = 16, | 177 | .bits_per_word = 16, |
@@ -206,7 +206,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
206 | }, | 206 | }, |
207 | #endif | 207 | #endif |
208 | 208 | ||
209 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 209 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
210 | { | 210 | { |
211 | .modalias = "ad1836", | 211 | .modalias = "ad1836", |
212 | .max_speed_hz = 16, | 212 | .max_speed_hz = 16, |
@@ -257,21 +257,50 @@ static struct platform_device bfin_spi0_device = { | |||
257 | #endif /* spi master and devices */ | 257 | #endif /* spi master and devices */ |
258 | 258 | ||
259 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 259 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
260 | static struct resource bfin_uart_resources[] = { | 260 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
261 | static struct resource bfin_uart0_resources[] = { | ||
261 | { | 262 | { |
262 | .start = 0xFFC00400, | 263 | .start = BFIN_UART_THR, |
263 | .end = 0xFFC004FF, | 264 | .end = BFIN_UART_GCTL+2, |
264 | .flags = IORESOURCE_MEM, | 265 | .flags = IORESOURCE_MEM, |
265 | }, | 266 | }, |
267 | { | ||
268 | .start = IRQ_UART0_RX, | ||
269 | .end = IRQ_UART0_RX + 1, | ||
270 | .flags = IORESOURCE_IRQ, | ||
271 | }, | ||
272 | { | ||
273 | .start = IRQ_UART0_ERROR, | ||
274 | .end = IRQ_UART0_ERROR, | ||
275 | .flags = IORESOURCE_IRQ, | ||
276 | }, | ||
277 | { | ||
278 | .start = CH_UART0_TX, | ||
279 | .end = CH_UART0_TX, | ||
280 | .flags = IORESOURCE_DMA, | ||
281 | }, | ||
282 | { | ||
283 | .start = CH_UART0_RX, | ||
284 | .end = CH_UART0_RX, | ||
285 | .flags = IORESOURCE_DMA, | ||
286 | }, | ||
287 | }; | ||
288 | |||
289 | unsigned short bfin_uart0_peripherals[] = { | ||
290 | P_UART0_TX, P_UART0_RX, 0 | ||
266 | }; | 291 | }; |
267 | 292 | ||
268 | static struct platform_device bfin_uart_device = { | 293 | static struct platform_device bfin_uart0_device = { |
269 | .name = "bfin-uart", | 294 | .name = "bfin-uart", |
270 | .id = 1, | 295 | .id = 0, |
271 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 296 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), |
272 | .resource = bfin_uart_resources, | 297 | .resource = bfin_uart0_resources, |
298 | .dev = { | ||
299 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
300 | }, | ||
273 | }; | 301 | }; |
274 | #endif | 302 | #endif |
303 | #endif | ||
275 | 304 | ||
276 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 305 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
277 | #ifdef CONFIG_BFIN_SIR0 | 306 | #ifdef CONFIG_BFIN_SIR0 |
@@ -394,7 +423,9 @@ static struct platform_device *h8606_devices[] __initdata = { | |||
394 | #endif | 423 | #endif |
395 | 424 | ||
396 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 425 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
397 | &bfin_uart_device, | 426 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
427 | &bfin_uart0_device, | ||
428 | #endif | ||
398 | #endif | 429 | #endif |
399 | 430 | ||
400 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 431 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
@@ -424,3 +455,18 @@ static int __init H8606_init(void) | |||
424 | } | 455 | } |
425 | 456 | ||
426 | arch_initcall(H8606_init); | 457 | arch_initcall(H8606_init); |
458 | |||
459 | static struct platform_device *H8606_early_devices[] __initdata = { | ||
460 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
461 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
462 | &bfin_uart0_device, | ||
463 | #endif | ||
464 | #endif | ||
465 | }; | ||
466 | |||
467 | void __init native_machine_early_platform_add_devices(void) | ||
468 | { | ||
469 | printk(KERN_INFO "register early platform devices\n"); | ||
470 | early_platform_add_devices(H8606_early_devices, | ||
471 | ARRAY_SIZE(H8606_early_devices)); | ||
472 | } | ||
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c index b580884848d4..842b4fa76ea9 100644 --- a/arch/blackfin/mach-bf533/boards/blackstamp.c +++ b/arch/blackfin/mach-bf533/boards/blackstamp.c | |||
@@ -195,21 +195,50 @@ static struct platform_device bfin_spi0_device = { | |||
195 | #endif /* spi master and devices */ | 195 | #endif /* spi master and devices */ |
196 | 196 | ||
197 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 197 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
198 | static struct resource bfin_uart_resources[] = { | 198 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
199 | static struct resource bfin_uart0_resources[] = { | ||
199 | { | 200 | { |
200 | .start = 0xFFC00400, | 201 | .start = BFIN_UART_THR, |
201 | .end = 0xFFC004FF, | 202 | .end = BFIN_UART_GCTL+2, |
202 | .flags = IORESOURCE_MEM, | 203 | .flags = IORESOURCE_MEM, |
203 | }, | 204 | }, |
205 | { | ||
206 | .start = IRQ_UART0_RX, | ||
207 | .end = IRQ_UART0_RX + 1, | ||
208 | .flags = IORESOURCE_IRQ, | ||
209 | }, | ||
210 | { | ||
211 | .start = IRQ_UART0_ERROR, | ||
212 | .end = IRQ_UART0_ERROR, | ||
213 | .flags = IORESOURCE_IRQ, | ||
214 | }, | ||
215 | { | ||
216 | .start = CH_UART0_TX, | ||
217 | .end = CH_UART0_TX, | ||
218 | .flags = IORESOURCE_DMA, | ||
219 | }, | ||
220 | { | ||
221 | .start = CH_UART0_RX, | ||
222 | .end = CH_UART0_RX, | ||
223 | .flags = IORESOURCE_DMA, | ||
224 | }, | ||
225 | }; | ||
226 | |||
227 | unsigned short bfin_uart0_peripherals[] = { | ||
228 | P_UART0_TX, P_UART0_RX, 0 | ||
204 | }; | 229 | }; |
205 | 230 | ||
206 | static struct platform_device bfin_uart_device = { | 231 | static struct platform_device bfin_uart0_device = { |
207 | .name = "bfin-uart", | 232 | .name = "bfin-uart", |
208 | .id = 1, | 233 | .id = 0, |
209 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 234 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), |
210 | .resource = bfin_uart_resources, | 235 | .resource = bfin_uart0_resources, |
236 | .dev = { | ||
237 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
238 | }, | ||
211 | }; | 239 | }; |
212 | #endif | 240 | #endif |
241 | #endif | ||
213 | 242 | ||
214 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 243 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
215 | #ifdef CONFIG_BFIN_SIR0 | 244 | #ifdef CONFIG_BFIN_SIR0 |
@@ -241,16 +270,75 @@ static struct platform_device bfin_sir0_device = { | |||
241 | #endif | 270 | #endif |
242 | 271 | ||
243 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 272 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
273 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
274 | static struct resource bfin_sport0_uart_resources[] = { | ||
275 | { | ||
276 | .start = SPORT0_TCR1, | ||
277 | .end = SPORT0_MRCS3+4, | ||
278 | .flags = IORESOURCE_MEM, | ||
279 | }, | ||
280 | { | ||
281 | .start = IRQ_SPORT0_RX, | ||
282 | .end = IRQ_SPORT0_RX+1, | ||
283 | .flags = IORESOURCE_IRQ, | ||
284 | }, | ||
285 | { | ||
286 | .start = IRQ_SPORT0_ERROR, | ||
287 | .end = IRQ_SPORT0_ERROR, | ||
288 | .flags = IORESOURCE_IRQ, | ||
289 | }, | ||
290 | }; | ||
291 | |||
292 | unsigned short bfin_sport0_peripherals[] = { | ||
293 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
294 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
295 | }; | ||
296 | |||
244 | static struct platform_device bfin_sport0_uart_device = { | 297 | static struct platform_device bfin_sport0_uart_device = { |
245 | .name = "bfin-sport-uart", | 298 | .name = "bfin-sport-uart", |
246 | .id = 0, | 299 | .id = 0, |
300 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
301 | .resource = bfin_sport0_uart_resources, | ||
302 | .dev = { | ||
303 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
304 | }, | ||
305 | }; | ||
306 | #endif | ||
307 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
308 | static struct resource bfin_sport1_uart_resources[] = { | ||
309 | { | ||
310 | .start = SPORT1_TCR1, | ||
311 | .end = SPORT1_MRCS3+4, | ||
312 | .flags = IORESOURCE_MEM, | ||
313 | }, | ||
314 | { | ||
315 | .start = IRQ_SPORT1_RX, | ||
316 | .end = IRQ_SPORT1_RX+1, | ||
317 | .flags = IORESOURCE_IRQ, | ||
318 | }, | ||
319 | { | ||
320 | .start = IRQ_SPORT1_ERROR, | ||
321 | .end = IRQ_SPORT1_ERROR, | ||
322 | .flags = IORESOURCE_IRQ, | ||
323 | }, | ||
324 | }; | ||
325 | |||
326 | unsigned short bfin_sport1_peripherals[] = { | ||
327 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
328 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
247 | }; | 329 | }; |
248 | 330 | ||
249 | static struct platform_device bfin_sport1_uart_device = { | 331 | static struct platform_device bfin_sport1_uart_device = { |
250 | .name = "bfin-sport-uart", | 332 | .name = "bfin-sport-uart", |
251 | .id = 1, | 333 | .id = 1, |
334 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
335 | .resource = bfin_sport1_uart_resources, | ||
336 | .dev = { | ||
337 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
338 | }, | ||
252 | }; | 339 | }; |
253 | #endif | 340 | #endif |
341 | #endif | ||
254 | 342 | ||
255 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 343 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
256 | #include <linux/input.h> | 344 | #include <linux/input.h> |
@@ -344,7 +432,9 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
344 | #endif | 432 | #endif |
345 | 433 | ||
346 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 434 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
347 | &bfin_uart_device, | 435 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
436 | &bfin_uart0_device, | ||
437 | #endif | ||
348 | #endif | 438 | #endif |
349 | 439 | ||
350 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 440 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
@@ -354,9 +444,13 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
354 | #endif | 444 | #endif |
355 | 445 | ||
356 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 446 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
447 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
357 | &bfin_sport0_uart_device, | 448 | &bfin_sport0_uart_device, |
449 | #endif | ||
450 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
358 | &bfin_sport1_uart_device, | 451 | &bfin_sport1_uart_device, |
359 | #endif | 452 | #endif |
453 | #endif | ||
360 | 454 | ||
361 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 455 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
362 | &bfin_device_gpiokeys, | 456 | &bfin_device_gpiokeys, |
@@ -392,3 +486,27 @@ static int __init blackstamp_init(void) | |||
392 | } | 486 | } |
393 | 487 | ||
394 | arch_initcall(blackstamp_init); | 488 | arch_initcall(blackstamp_init); |
489 | |||
490 | static struct platform_device *stamp_early_devices[] __initdata = { | ||
491 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
492 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
493 | &bfin_uart0_device, | ||
494 | #endif | ||
495 | #endif | ||
496 | |||
497 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
498 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
499 | &bfin_sport0_uart_device, | ||
500 | #endif | ||
501 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
502 | &bfin_sport1_uart_device, | ||
503 | #endif | ||
504 | #endif | ||
505 | }; | ||
506 | |||
507 | void __init native_machine_early_platform_add_devices(void) | ||
508 | { | ||
509 | printk(KERN_INFO "register early platform devices\n"); | ||
510 | early_platform_add_devices(stamp_early_devices, | ||
511 | ARRAY_SIZE(stamp_early_devices)); | ||
512 | } | ||
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c index 7fc3b860d4ae..fdcde61906dc 100644 --- a/arch/blackfin/mach-bf533/boards/cm_bf533.c +++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c | |||
@@ -71,7 +71,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = { | |||
71 | }; | 71 | }; |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 74 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
75 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | 75 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
76 | .enable_dma = 0, | 76 | .enable_dma = 0, |
77 | .bits_per_word = 16, | 77 | .bits_per_word = 16, |
@@ -110,7 +110,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
110 | }, | 110 | }, |
111 | #endif | 111 | #endif |
112 | 112 | ||
113 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 113 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
114 | { | 114 | { |
115 | .modalias = "ad1836", | 115 | .modalias = "ad1836", |
116 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 116 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
@@ -242,21 +242,50 @@ static struct platform_device smsc911x_device = { | |||
242 | #endif | 242 | #endif |
243 | 243 | ||
244 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 244 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
245 | static struct resource bfin_uart_resources[] = { | 245 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
246 | static struct resource bfin_uart0_resources[] = { | ||
246 | { | 247 | { |
247 | .start = 0xFFC00400, | 248 | .start = BFIN_UART_THR, |
248 | .end = 0xFFC004FF, | 249 | .end = BFIN_UART_GCTL+2, |
249 | .flags = IORESOURCE_MEM, | 250 | .flags = IORESOURCE_MEM, |
250 | }, | 251 | }, |
252 | { | ||
253 | .start = IRQ_UART0_RX, | ||
254 | .end = IRQ_UART0_RX + 1, | ||
255 | .flags = IORESOURCE_IRQ, | ||
256 | }, | ||
257 | { | ||
258 | .start = IRQ_UART0_ERROR, | ||
259 | .end = IRQ_UART0_ERROR, | ||
260 | .flags = IORESOURCE_IRQ, | ||
261 | }, | ||
262 | { | ||
263 | .start = CH_UART0_TX, | ||
264 | .end = CH_UART0_TX, | ||
265 | .flags = IORESOURCE_DMA, | ||
266 | }, | ||
267 | { | ||
268 | .start = CH_UART0_RX, | ||
269 | .end = CH_UART0_RX, | ||
270 | .flags = IORESOURCE_DMA, | ||
271 | }, | ||
272 | }; | ||
273 | |||
274 | unsigned short bfin_uart0_peripherals[] = { | ||
275 | P_UART0_TX, P_UART0_RX, 0 | ||
251 | }; | 276 | }; |
252 | 277 | ||
253 | static struct platform_device bfin_uart_device = { | 278 | static struct platform_device bfin_uart0_device = { |
254 | .name = "bfin-uart", | 279 | .name = "bfin-uart", |
255 | .id = 1, | 280 | .id = 0, |
256 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 281 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), |
257 | .resource = bfin_uart_resources, | 282 | .resource = bfin_uart0_resources, |
283 | .dev = { | ||
284 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
285 | }, | ||
258 | }; | 286 | }; |
259 | #endif | 287 | #endif |
288 | #endif | ||
260 | 289 | ||
261 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 290 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
262 | #ifdef CONFIG_BFIN_SIR0 | 291 | #ifdef CONFIG_BFIN_SIR0 |
@@ -288,16 +317,75 @@ static struct platform_device bfin_sir0_device = { | |||
288 | #endif | 317 | #endif |
289 | 318 | ||
290 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 319 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
320 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
321 | static struct resource bfin_sport0_uart_resources[] = { | ||
322 | { | ||
323 | .start = SPORT0_TCR1, | ||
324 | .end = SPORT0_MRCS3+4, | ||
325 | .flags = IORESOURCE_MEM, | ||
326 | }, | ||
327 | { | ||
328 | .start = IRQ_SPORT0_RX, | ||
329 | .end = IRQ_SPORT0_RX+1, | ||
330 | .flags = IORESOURCE_IRQ, | ||
331 | }, | ||
332 | { | ||
333 | .start = IRQ_SPORT0_ERROR, | ||
334 | .end = IRQ_SPORT0_ERROR, | ||
335 | .flags = IORESOURCE_IRQ, | ||
336 | }, | ||
337 | }; | ||
338 | |||
339 | unsigned short bfin_sport0_peripherals[] = { | ||
340 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
341 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
342 | }; | ||
343 | |||
291 | static struct platform_device bfin_sport0_uart_device = { | 344 | static struct platform_device bfin_sport0_uart_device = { |
292 | .name = "bfin-sport-uart", | 345 | .name = "bfin-sport-uart", |
293 | .id = 0, | 346 | .id = 0, |
347 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
348 | .resource = bfin_sport0_uart_resources, | ||
349 | .dev = { | ||
350 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
351 | }, | ||
352 | }; | ||
353 | #endif | ||
354 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
355 | static struct resource bfin_sport1_uart_resources[] = { | ||
356 | { | ||
357 | .start = SPORT1_TCR1, | ||
358 | .end = SPORT1_MRCS3+4, | ||
359 | .flags = IORESOURCE_MEM, | ||
360 | }, | ||
361 | { | ||
362 | .start = IRQ_SPORT1_RX, | ||
363 | .end = IRQ_SPORT1_RX+1, | ||
364 | .flags = IORESOURCE_IRQ, | ||
365 | }, | ||
366 | { | ||
367 | .start = IRQ_SPORT1_ERROR, | ||
368 | .end = IRQ_SPORT1_ERROR, | ||
369 | .flags = IORESOURCE_IRQ, | ||
370 | }, | ||
371 | }; | ||
372 | |||
373 | unsigned short bfin_sport1_peripherals[] = { | ||
374 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
375 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
294 | }; | 376 | }; |
295 | 377 | ||
296 | static struct platform_device bfin_sport1_uart_device = { | 378 | static struct platform_device bfin_sport1_uart_device = { |
297 | .name = "bfin-sport-uart", | 379 | .name = "bfin-sport-uart", |
298 | .id = 1, | 380 | .id = 1, |
381 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
382 | .resource = bfin_sport1_uart_resources, | ||
383 | .dev = { | ||
384 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
385 | }, | ||
299 | }; | 386 | }; |
300 | #endif | 387 | #endif |
388 | #endif | ||
301 | 389 | ||
302 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 390 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
303 | static struct resource isp1362_hcd_resources[] = { | 391 | static struct resource isp1362_hcd_resources[] = { |
@@ -432,7 +520,9 @@ static struct platform_device *cm_bf533_devices[] __initdata = { | |||
432 | &bfin_dpmc, | 520 | &bfin_dpmc, |
433 | 521 | ||
434 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 522 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
435 | &bfin_uart_device, | 523 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
524 | &bfin_uart0_device, | ||
525 | #endif | ||
436 | #endif | 526 | #endif |
437 | 527 | ||
438 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 528 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
@@ -442,9 +532,13 @@ static struct platform_device *cm_bf533_devices[] __initdata = { | |||
442 | #endif | 532 | #endif |
443 | 533 | ||
444 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 534 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
535 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
445 | &bfin_sport0_uart_device, | 536 | &bfin_sport0_uart_device, |
537 | #endif | ||
538 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
446 | &bfin_sport1_uart_device, | 539 | &bfin_sport1_uart_device, |
447 | #endif | 540 | #endif |
541 | #endif | ||
448 | 542 | ||
449 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | 543 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
450 | &rtc_device, | 544 | &rtc_device, |
@@ -486,3 +580,27 @@ static int __init cm_bf533_init(void) | |||
486 | } | 580 | } |
487 | 581 | ||
488 | arch_initcall(cm_bf533_init); | 582 | arch_initcall(cm_bf533_init); |
583 | |||
584 | static struct platform_device *cm_bf533_early_devices[] __initdata = { | ||
585 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
586 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
587 | &bfin_uart0_device, | ||
588 | #endif | ||
589 | #endif | ||
590 | |||
591 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
592 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
593 | &bfin_sport0_uart_device, | ||
594 | #endif | ||
595 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
596 | &bfin_sport1_uart_device, | ||
597 | #endif | ||
598 | #endif | ||
599 | }; | ||
600 | |||
601 | void __init native_machine_early_platform_add_devices(void) | ||
602 | { | ||
603 | printk(KERN_INFO "register early platform devices\n"); | ||
604 | early_platform_add_devices(cm_bf533_early_devices, | ||
605 | ARRAY_SIZE(cm_bf533_early_devices)); | ||
606 | } | ||
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index d4689dcc198e..739773cb7fc6 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c | |||
@@ -222,7 +222,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = { | |||
222 | }; | 222 | }; |
223 | #endif | 223 | #endif |
224 | 224 | ||
225 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 225 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
226 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | 226 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
227 | .enable_dma = 0, | 227 | .enable_dma = 0, |
228 | .bits_per_word = 16, | 228 | .bits_per_word = 16, |
@@ -261,7 +261,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
261 | }, | 261 | }, |
262 | #endif | 262 | #endif |
263 | 263 | ||
264 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 264 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
265 | { | 265 | { |
266 | .modalias = "ad1836", | 266 | .modalias = "ad1836", |
267 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 267 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
@@ -320,21 +320,50 @@ static struct platform_device bfin_spi0_device = { | |||
320 | #endif /* spi master and devices */ | 320 | #endif /* spi master and devices */ |
321 | 321 | ||
322 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 322 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
323 | static struct resource bfin_uart_resources[] = { | 323 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
324 | static struct resource bfin_uart0_resources[] = { | ||
324 | { | 325 | { |
325 | .start = 0xFFC00400, | 326 | .start = BFIN_UART_THR, |
326 | .end = 0xFFC004FF, | 327 | .end = BFIN_UART_GCTL+2, |
327 | .flags = IORESOURCE_MEM, | 328 | .flags = IORESOURCE_MEM, |
328 | }, | 329 | }, |
330 | { | ||
331 | .start = IRQ_UART0_RX, | ||
332 | .end = IRQ_UART0_RX + 1, | ||
333 | .flags = IORESOURCE_IRQ, | ||
334 | }, | ||
335 | { | ||
336 | .start = IRQ_UART0_ERROR, | ||
337 | .end = IRQ_UART0_ERROR, | ||
338 | .flags = IORESOURCE_IRQ, | ||
339 | }, | ||
340 | { | ||
341 | .start = CH_UART0_TX, | ||
342 | .end = CH_UART0_TX, | ||
343 | .flags = IORESOURCE_DMA, | ||
344 | }, | ||
345 | { | ||
346 | .start = CH_UART0_RX, | ||
347 | .end = CH_UART0_RX, | ||
348 | .flags = IORESOURCE_DMA, | ||
349 | }, | ||
350 | }; | ||
351 | |||
352 | unsigned short bfin_uart0_peripherals[] = { | ||
353 | P_UART0_TX, P_UART0_RX, 0 | ||
329 | }; | 354 | }; |
330 | 355 | ||
331 | static struct platform_device bfin_uart_device = { | 356 | static struct platform_device bfin_uart0_device = { |
332 | .name = "bfin-uart", | 357 | .name = "bfin-uart", |
333 | .id = 1, | 358 | .id = 0, |
334 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 359 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), |
335 | .resource = bfin_uart_resources, | 360 | .resource = bfin_uart0_resources, |
361 | .dev = { | ||
362 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
363 | }, | ||
336 | }; | 364 | }; |
337 | #endif | 365 | #endif |
366 | #endif | ||
338 | 367 | ||
339 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 368 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
340 | #ifdef CONFIG_BFIN_SIR0 | 369 | #ifdef CONFIG_BFIN_SIR0 |
@@ -444,6 +473,30 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
444 | #endif | 473 | #endif |
445 | }; | 474 | }; |
446 | 475 | ||
476 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | ||
477 | static struct platform_device bfin_i2s = { | ||
478 | .name = "bfin-i2s", | ||
479 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | ||
480 | /* TODO: add platform data here */ | ||
481 | }; | ||
482 | #endif | ||
483 | |||
484 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | ||
485 | static struct platform_device bfin_tdm = { | ||
486 | .name = "bfin-tdm", | ||
487 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | ||
488 | /* TODO: add platform data here */ | ||
489 | }; | ||
490 | #endif | ||
491 | |||
492 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | ||
493 | static struct platform_device bfin_ac97 = { | ||
494 | .name = "bfin-ac97", | ||
495 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | ||
496 | /* TODO: add platform data here */ | ||
497 | }; | ||
498 | #endif | ||
499 | |||
447 | static struct platform_device *ezkit_devices[] __initdata = { | 500 | static struct platform_device *ezkit_devices[] __initdata = { |
448 | 501 | ||
449 | &bfin_dpmc, | 502 | &bfin_dpmc, |
@@ -471,7 +524,9 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
471 | #endif | 524 | #endif |
472 | 525 | ||
473 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 526 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
474 | &bfin_uart_device, | 527 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
528 | &bfin_uart0_device, | ||
529 | #endif | ||
475 | #endif | 530 | #endif |
476 | 531 | ||
477 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 532 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
@@ -487,6 +542,18 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
487 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) | 542 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) |
488 | &i2c_gpio_device, | 543 | &i2c_gpio_device, |
489 | #endif | 544 | #endif |
545 | |||
546 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | ||
547 | &bfin_i2s, | ||
548 | #endif | ||
549 | |||
550 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | ||
551 | &bfin_tdm, | ||
552 | #endif | ||
553 | |||
554 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | ||
555 | &bfin_ac97, | ||
556 | #endif | ||
490 | }; | 557 | }; |
491 | 558 | ||
492 | static int __init ezkit_init(void) | 559 | static int __init ezkit_init(void) |
@@ -500,3 +567,18 @@ static int __init ezkit_init(void) | |||
500 | } | 567 | } |
501 | 568 | ||
502 | arch_initcall(ezkit_init); | 569 | arch_initcall(ezkit_init); |
570 | |||
571 | static struct platform_device *ezkit_early_devices[] __initdata = { | ||
572 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
573 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
574 | &bfin_uart0_device, | ||
575 | #endif | ||
576 | #endif | ||
577 | }; | ||
578 | |||
579 | void __init native_machine_early_platform_add_devices(void) | ||
580 | { | ||
581 | printk(KERN_INFO "register early platform devices\n"); | ||
582 | early_platform_add_devices(ezkit_early_devices, | ||
583 | ARRAY_SIZE(ezkit_early_devices)); | ||
584 | } | ||
diff --git a/arch/blackfin/mach-bf533/boards/ip0x.c b/arch/blackfin/mach-bf533/boards/ip0x.c index 8ec42ba35b9e..7349970db978 100644 --- a/arch/blackfin/mach-bf533/boards/ip0x.c +++ b/arch/blackfin/mach-bf533/boards/ip0x.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/usb/isp1362.h> | 19 | #include <linux/usb/isp1362.h> |
20 | #endif | 20 | #endif |
21 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
22 | #include <asm/dma.h> | ||
22 | #include <asm/bfin5xx_spi.h> | 23 | #include <asm/bfin5xx_spi.h> |
23 | #include <asm/portmux.h> | 24 | #include <asm/portmux.h> |
24 | 25 | ||
@@ -143,21 +144,50 @@ static struct platform_device spi_bfin_master_device = { | |||
143 | #endif /* spi master and devices */ | 144 | #endif /* spi master and devices */ |
144 | 145 | ||
145 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 146 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
146 | static struct resource bfin_uart_resources[] = { | 147 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
148 | static struct resource bfin_uart0_resources[] = { | ||
147 | { | 149 | { |
148 | .start = 0xFFC00400, | 150 | .start = BFIN_UART_THR, |
149 | .end = 0xFFC004FF, | 151 | .end = BFIN_UART_GCTL+2, |
150 | .flags = IORESOURCE_MEM, | 152 | .flags = IORESOURCE_MEM, |
151 | }, | 153 | }, |
154 | { | ||
155 | .start = IRQ_UART0_RX, | ||
156 | .end = IRQ_UART0_RX + 1, | ||
157 | .flags = IORESOURCE_IRQ, | ||
158 | }, | ||
159 | { | ||
160 | .start = IRQ_UART0_ERROR, | ||
161 | .end = IRQ_UART0_ERROR, | ||
162 | .flags = IORESOURCE_IRQ, | ||
163 | }, | ||
164 | { | ||
165 | .start = CH_UART0_TX, | ||
166 | .end = CH_UART0_TX, | ||
167 | .flags = IORESOURCE_DMA, | ||
168 | }, | ||
169 | { | ||
170 | .start = CH_UART0_RX, | ||
171 | .end = CH_UART0_RX, | ||
172 | .flags = IORESOURCE_DMA, | ||
173 | }, | ||
174 | }; | ||
175 | |||
176 | unsigned short bfin_uart0_peripherals[] = { | ||
177 | P_UART0_TX, P_UART0_RX, 0 | ||
152 | }; | 178 | }; |
153 | 179 | ||
154 | static struct platform_device bfin_uart_device = { | 180 | static struct platform_device bfin_uart0_device = { |
155 | .name = "bfin-uart", | 181 | .name = "bfin-uart", |
156 | .id = 1, | 182 | .id = 0, |
157 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 183 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), |
158 | .resource = bfin_uart_resources, | 184 | .resource = bfin_uart0_resources, |
185 | .dev = { | ||
186 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
187 | }, | ||
159 | }; | 188 | }; |
160 | #endif | 189 | #endif |
190 | #endif | ||
161 | 191 | ||
162 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 192 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
163 | #ifdef CONFIG_BFIN_SIR0 | 193 | #ifdef CONFIG_BFIN_SIR0 |
@@ -241,7 +271,9 @@ static struct platform_device *ip0x_devices[] __initdata = { | |||
241 | #endif | 271 | #endif |
242 | 272 | ||
243 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 273 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
244 | &bfin_uart_device, | 274 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
275 | &bfin_uart0_device, | ||
276 | #endif | ||
245 | #endif | 277 | #endif |
246 | 278 | ||
247 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 279 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
@@ -276,3 +308,18 @@ static int __init ip0x_init(void) | |||
276 | } | 308 | } |
277 | 309 | ||
278 | arch_initcall(ip0x_init); | 310 | arch_initcall(ip0x_init); |
311 | |||
312 | static struct platform_device *ip0x_early_devices[] __initdata = { | ||
313 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
314 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
315 | &bfin_uart0_device, | ||
316 | #endif | ||
317 | #endif | ||
318 | }; | ||
319 | |||
320 | void __init native_machine_early_platform_add_devices(void) | ||
321 | { | ||
322 | printk(KERN_INFO "register early platform devices\n"); | ||
323 | early_platform_add_devices(ip0x_early_devices, | ||
324 | ARRAY_SIZE(ip0x_early_devices)); | ||
325 | } | ||
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index 6d68dcfa2da2..c457eaa60239 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
@@ -184,7 +184,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = { | |||
184 | }; | 184 | }; |
185 | #endif | 185 | #endif |
186 | 186 | ||
187 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 187 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
188 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | 188 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
189 | .enable_dma = 0, | 189 | .enable_dma = 0, |
190 | .bits_per_word = 16, | 190 | .bits_per_word = 16, |
@@ -251,7 +251,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
251 | }, | 251 | }, |
252 | #endif | 252 | #endif |
253 | 253 | ||
254 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 254 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
255 | { | 255 | { |
256 | .modalias = "ad1836", | 256 | .modalias = "ad1836", |
257 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 257 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
@@ -322,21 +322,50 @@ static struct platform_device bfin_spi0_device = { | |||
322 | #endif /* spi master and devices */ | 322 | #endif /* spi master and devices */ |
323 | 323 | ||
324 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 324 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
325 | static struct resource bfin_uart_resources[] = { | 325 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
326 | static struct resource bfin_uart0_resources[] = { | ||
326 | { | 327 | { |
327 | .start = 0xFFC00400, | 328 | .start = BFIN_UART_THR, |
328 | .end = 0xFFC004FF, | 329 | .end = BFIN_UART_GCTL+2, |
329 | .flags = IORESOURCE_MEM, | 330 | .flags = IORESOURCE_MEM, |
330 | }, | 331 | }, |
332 | { | ||
333 | .start = IRQ_UART0_RX, | ||
334 | .end = IRQ_UART0_RX + 1, | ||
335 | .flags = IORESOURCE_IRQ, | ||
336 | }, | ||
337 | { | ||
338 | .start = IRQ_UART0_ERROR, | ||
339 | .end = IRQ_UART0_ERROR, | ||
340 | .flags = IORESOURCE_IRQ, | ||
341 | }, | ||
342 | { | ||
343 | .start = CH_UART0_TX, | ||
344 | .end = CH_UART0_TX, | ||
345 | .flags = IORESOURCE_DMA, | ||
346 | }, | ||
347 | { | ||
348 | .start = CH_UART0_RX, | ||
349 | .end = CH_UART0_RX, | ||
350 | .flags = IORESOURCE_DMA, | ||
351 | }, | ||
331 | }; | 352 | }; |
332 | 353 | ||
333 | static struct platform_device bfin_uart_device = { | 354 | unsigned short bfin_uart0_peripherals[] = { |
355 | P_UART0_TX, P_UART0_RX, 0 | ||
356 | }; | ||
357 | |||
358 | static struct platform_device bfin_uart0_device = { | ||
334 | .name = "bfin-uart", | 359 | .name = "bfin-uart", |
335 | .id = 1, | 360 | .id = 0, |
336 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 361 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), |
337 | .resource = bfin_uart_resources, | 362 | .resource = bfin_uart0_resources, |
363 | .dev = { | ||
364 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
365 | }, | ||
338 | }; | 366 | }; |
339 | #endif | 367 | #endif |
368 | #endif | ||
340 | 369 | ||
341 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 370 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
342 | #ifdef CONFIG_BFIN_SIR0 | 371 | #ifdef CONFIG_BFIN_SIR0 |
@@ -368,16 +397,75 @@ static struct platform_device bfin_sir0_device = { | |||
368 | #endif | 397 | #endif |
369 | 398 | ||
370 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 399 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
400 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
401 | static struct resource bfin_sport0_uart_resources[] = { | ||
402 | { | ||
403 | .start = SPORT0_TCR1, | ||
404 | .end = SPORT0_MRCS3+4, | ||
405 | .flags = IORESOURCE_MEM, | ||
406 | }, | ||
407 | { | ||
408 | .start = IRQ_SPORT0_RX, | ||
409 | .end = IRQ_SPORT0_RX+1, | ||
410 | .flags = IORESOURCE_IRQ, | ||
411 | }, | ||
412 | { | ||
413 | .start = IRQ_SPORT0_ERROR, | ||
414 | .end = IRQ_SPORT0_ERROR, | ||
415 | .flags = IORESOURCE_IRQ, | ||
416 | }, | ||
417 | }; | ||
418 | |||
419 | unsigned short bfin_sport0_peripherals[] = { | ||
420 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
421 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
422 | }; | ||
423 | |||
371 | static struct platform_device bfin_sport0_uart_device = { | 424 | static struct platform_device bfin_sport0_uart_device = { |
372 | .name = "bfin-sport-uart", | 425 | .name = "bfin-sport-uart", |
373 | .id = 0, | 426 | .id = 0, |
427 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
428 | .resource = bfin_sport0_uart_resources, | ||
429 | .dev = { | ||
430 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
431 | }, | ||
432 | }; | ||
433 | #endif | ||
434 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
435 | static struct resource bfin_sport1_uart_resources[] = { | ||
436 | { | ||
437 | .start = SPORT1_TCR1, | ||
438 | .end = SPORT1_MRCS3+4, | ||
439 | .flags = IORESOURCE_MEM, | ||
440 | }, | ||
441 | { | ||
442 | .start = IRQ_SPORT1_RX, | ||
443 | .end = IRQ_SPORT1_RX+1, | ||
444 | .flags = IORESOURCE_IRQ, | ||
445 | }, | ||
446 | { | ||
447 | .start = IRQ_SPORT1_ERROR, | ||
448 | .end = IRQ_SPORT1_ERROR, | ||
449 | .flags = IORESOURCE_IRQ, | ||
450 | }, | ||
451 | }; | ||
452 | |||
453 | unsigned short bfin_sport1_peripherals[] = { | ||
454 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
455 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
374 | }; | 456 | }; |
375 | 457 | ||
376 | static struct platform_device bfin_sport1_uart_device = { | 458 | static struct platform_device bfin_sport1_uart_device = { |
377 | .name = "bfin-sport-uart", | 459 | .name = "bfin-sport-uart", |
378 | .id = 1, | 460 | .id = 1, |
461 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
462 | .resource = bfin_sport1_uart_resources, | ||
463 | .dev = { | ||
464 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
465 | }, | ||
379 | }; | 466 | }; |
380 | #endif | 467 | #endif |
468 | #endif | ||
381 | 469 | ||
382 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 470 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
383 | #include <linux/input.h> | 471 | #include <linux/input.h> |
@@ -474,6 +562,30 @@ static struct platform_device bfin_dpmc = { | |||
474 | }, | 562 | }, |
475 | }; | 563 | }; |
476 | 564 | ||
565 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | ||
566 | static struct platform_device bfin_i2s = { | ||
567 | .name = "bfin-i2s", | ||
568 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | ||
569 | /* TODO: add platform data here */ | ||
570 | }; | ||
571 | #endif | ||
572 | |||
573 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | ||
574 | static struct platform_device bfin_tdm = { | ||
575 | .name = "bfin-tdm", | ||
576 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | ||
577 | /* TODO: add platform data here */ | ||
578 | }; | ||
579 | #endif | ||
580 | |||
581 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | ||
582 | static struct platform_device bfin_ac97 = { | ||
583 | .name = "bfin-ac97", | ||
584 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | ||
585 | /* TODO: add platform data here */ | ||
586 | }; | ||
587 | #endif | ||
588 | |||
477 | static struct platform_device *stamp_devices[] __initdata = { | 589 | static struct platform_device *stamp_devices[] __initdata = { |
478 | 590 | ||
479 | &bfin_dpmc, | 591 | &bfin_dpmc, |
@@ -495,7 +607,9 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
495 | #endif | 607 | #endif |
496 | 608 | ||
497 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 609 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
498 | &bfin_uart_device, | 610 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
611 | &bfin_uart0_device, | ||
612 | #endif | ||
499 | #endif | 613 | #endif |
500 | 614 | ||
501 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 615 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
@@ -505,9 +619,13 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
505 | #endif | 619 | #endif |
506 | 620 | ||
507 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 621 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
622 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
508 | &bfin_sport0_uart_device, | 623 | &bfin_sport0_uart_device, |
624 | #endif | ||
625 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
509 | &bfin_sport1_uart_device, | 626 | &bfin_sport1_uart_device, |
510 | #endif | 627 | #endif |
628 | #endif | ||
511 | 629 | ||
512 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 630 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
513 | &bfin_device_gpiokeys, | 631 | &bfin_device_gpiokeys, |
@@ -520,6 +638,18 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
520 | #if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE) | 638 | #if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE) |
521 | &stamp_flash_device, | 639 | &stamp_flash_device, |
522 | #endif | 640 | #endif |
641 | |||
642 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | ||
643 | &bfin_i2s, | ||
644 | #endif | ||
645 | |||
646 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | ||
647 | &bfin_tdm, | ||
648 | #endif | ||
649 | |||
650 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | ||
651 | &bfin_ac97, | ||
652 | #endif | ||
523 | }; | 653 | }; |
524 | 654 | ||
525 | static int __init stamp_init(void) | 655 | static int __init stamp_init(void) |
@@ -548,6 +678,30 @@ static int __init stamp_init(void) | |||
548 | 678 | ||
549 | arch_initcall(stamp_init); | 679 | arch_initcall(stamp_init); |
550 | 680 | ||
681 | static struct platform_device *stamp_early_devices[] __initdata = { | ||
682 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
683 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
684 | &bfin_uart0_device, | ||
685 | #endif | ||
686 | #endif | ||
687 | |||
688 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
689 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
690 | &bfin_sport0_uart_device, | ||
691 | #endif | ||
692 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
693 | &bfin_sport1_uart_device, | ||
694 | #endif | ||
695 | #endif | ||
696 | }; | ||
697 | |||
698 | void __init native_machine_early_platform_add_devices(void) | ||
699 | { | ||
700 | printk(KERN_INFO "register early platform devices\n"); | ||
701 | early_platform_add_devices(stamp_early_devices, | ||
702 | ARRAY_SIZE(stamp_early_devices)); | ||
703 | } | ||
704 | |||
551 | void native_machine_restart(char *cmd) | 705 | void native_machine_restart(char *cmd) |
552 | { | 706 | { |
553 | /* workaround pull up on cpld / flash pin not being strong enough */ | 707 | /* workaround pull up on cpld / flash pin not being strong enough */ |