diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-04-22 20:08:44 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-04-22 20:08:44 -0400 |
commit | 6c9468e9eb1252eaefd94ce7f06e1be9b0b641b1 (patch) | |
tree | 797676a336b050bfa1ef879377c07e541b9075d6 /arch/blackfin/mach-bf537/boards | |
parent | 4cb3ca7cd7e2cae8d1daf5345ec99a1e8502cf3f (diff) | |
parent | c81eddb0e3728661d1585fbc564449c94165cc36 (diff) |
Merge branch 'master' into for-next
Diffstat (limited to 'arch/blackfin/mach-bf537/boards')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/cm_bf537e.c | 116 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/cm_bf537u.c | 187 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/minotaur.c | 183 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/pnav10.c | 169 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 684 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/tcm_bf537.c | 187 |
6 files changed, 1377 insertions, 149 deletions
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c index c85f4d770535..d35fc5fe4c2b 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c | |||
@@ -73,7 +73,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = { | |||
73 | }; | 73 | }; |
74 | #endif | 74 | #endif |
75 | 75 | ||
76 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 76 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
77 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | 77 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
78 | .enable_dma = 0, | 78 | .enable_dma = 0, |
79 | .bits_per_word = 16, | 79 | .bits_per_word = 16, |
@@ -112,7 +112,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
112 | }, | 112 | }, |
113 | #endif | 113 | #endif |
114 | 114 | ||
115 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 115 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
116 | { | 116 | { |
117 | .modalias = "ad1836", | 117 | .modalias = "ad1836", |
118 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 118 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
@@ -329,8 +329,8 @@ static struct platform_device cm_flash_device = { | |||
329 | #ifdef CONFIG_SERIAL_BFIN_UART0 | 329 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
330 | static struct resource bfin_uart0_resources[] = { | 330 | static struct resource bfin_uart0_resources[] = { |
331 | { | 331 | { |
332 | .start = 0xFFC00400, | 332 | .start = UART0_THR, |
333 | .end = 0xFFC004FF, | 333 | .end = UART0_GCTL+2, |
334 | .flags = IORESOURCE_MEM, | 334 | .flags = IORESOURCE_MEM, |
335 | }, | 335 | }, |
336 | { | 336 | { |
@@ -373,18 +373,25 @@ static struct resource bfin_uart0_resources[] = { | |||
373 | #endif | 373 | #endif |
374 | }; | 374 | }; |
375 | 375 | ||
376 | unsigned short bfin_uart0_peripherals[] = { | ||
377 | P_UART0_TX, P_UART0_RX, 0 | ||
378 | }; | ||
379 | |||
376 | static struct platform_device bfin_uart0_device = { | 380 | static struct platform_device bfin_uart0_device = { |
377 | .name = "bfin-uart", | 381 | .name = "bfin-uart", |
378 | .id = 0, | 382 | .id = 0, |
379 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), | 383 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), |
380 | .resource = bfin_uart0_resources, | 384 | .resource = bfin_uart0_resources, |
385 | .dev = { | ||
386 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
387 | }, | ||
381 | }; | 388 | }; |
382 | #endif | 389 | #endif |
383 | #ifdef CONFIG_SERIAL_BFIN_UART1 | 390 | #ifdef CONFIG_SERIAL_BFIN_UART1 |
384 | static struct resource bfin_uart1_resources[] = { | 391 | static struct resource bfin_uart1_resources[] = { |
385 | { | 392 | { |
386 | .start = 0xFFC02000, | 393 | .start = UART1_THR, |
387 | .end = 0xFFC020FF, | 394 | .end = UART1_GCTL+2, |
388 | .flags = IORESOURCE_MEM, | 395 | .flags = IORESOURCE_MEM, |
389 | }, | 396 | }, |
390 | { | 397 | { |
@@ -427,11 +434,18 @@ static struct resource bfin_uart1_resources[] = { | |||
427 | #endif | 434 | #endif |
428 | }; | 435 | }; |
429 | 436 | ||
437 | unsigned short bfin_uart1_peripherals[] = { | ||
438 | P_UART1_TX, P_UART1_RX, 0 | ||
439 | }; | ||
440 | |||
430 | static struct platform_device bfin_uart1_device = { | 441 | static struct platform_device bfin_uart1_device = { |
431 | .name = "bfin-uart", | 442 | .name = "bfin-uart", |
432 | .id = 1, | 443 | .id = 1, |
433 | .num_resources = ARRAY_SIZE(bfin_uart1_resources), | 444 | .num_resources = ARRAY_SIZE(bfin_uart1_resources), |
434 | .resource = bfin_uart1_resources, | 445 | .resource = bfin_uart1_resources, |
446 | .dev = { | ||
447 | .platform_data = &bfin_uart1_peripherals, /* Passed to driver */ | ||
448 | }, | ||
435 | }; | 449 | }; |
436 | #endif | 450 | #endif |
437 | #endif | 451 | #endif |
@@ -512,16 +526,75 @@ static struct platform_device i2c_bfin_twi_device = { | |||
512 | #endif | 526 | #endif |
513 | 527 | ||
514 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 528 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
529 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
530 | static struct resource bfin_sport0_uart_resources[] = { | ||
531 | { | ||
532 | .start = SPORT0_TCR1, | ||
533 | .end = SPORT0_MRCS3+4, | ||
534 | .flags = IORESOURCE_MEM, | ||
535 | }, | ||
536 | { | ||
537 | .start = IRQ_SPORT0_RX, | ||
538 | .end = IRQ_SPORT0_RX+1, | ||
539 | .flags = IORESOURCE_IRQ, | ||
540 | }, | ||
541 | { | ||
542 | .start = IRQ_SPORT0_ERROR, | ||
543 | .end = IRQ_SPORT0_ERROR, | ||
544 | .flags = IORESOURCE_IRQ, | ||
545 | }, | ||
546 | }; | ||
547 | |||
548 | unsigned short bfin_sport0_peripherals[] = { | ||
549 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
550 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
551 | }; | ||
552 | |||
515 | static struct platform_device bfin_sport0_uart_device = { | 553 | static struct platform_device bfin_sport0_uart_device = { |
516 | .name = "bfin-sport-uart", | 554 | .name = "bfin-sport-uart", |
517 | .id = 0, | 555 | .id = 0, |
556 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
557 | .resource = bfin_sport0_uart_resources, | ||
558 | .dev = { | ||
559 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
560 | }, | ||
561 | }; | ||
562 | #endif | ||
563 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
564 | static struct resource bfin_sport1_uart_resources[] = { | ||
565 | { | ||
566 | .start = SPORT1_TCR1, | ||
567 | .end = SPORT1_MRCS3+4, | ||
568 | .flags = IORESOURCE_MEM, | ||
569 | }, | ||
570 | { | ||
571 | .start = IRQ_SPORT1_RX, | ||
572 | .end = IRQ_SPORT1_RX+1, | ||
573 | .flags = IORESOURCE_IRQ, | ||
574 | }, | ||
575 | { | ||
576 | .start = IRQ_SPORT1_ERROR, | ||
577 | .end = IRQ_SPORT1_ERROR, | ||
578 | .flags = IORESOURCE_IRQ, | ||
579 | }, | ||
580 | }; | ||
581 | |||
582 | unsigned short bfin_sport1_peripherals[] = { | ||
583 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
584 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
518 | }; | 585 | }; |
519 | 586 | ||
520 | static struct platform_device bfin_sport1_uart_device = { | 587 | static struct platform_device bfin_sport1_uart_device = { |
521 | .name = "bfin-sport-uart", | 588 | .name = "bfin-sport-uart", |
522 | .id = 1, | 589 | .id = 1, |
590 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
591 | .resource = bfin_sport1_uart_resources, | ||
592 | .dev = { | ||
593 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
594 | }, | ||
523 | }; | 595 | }; |
524 | #endif | 596 | #endif |
597 | #endif | ||
525 | 598 | ||
526 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 599 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
527 | static struct platform_device bfin_mii_bus = { | 600 | static struct platform_device bfin_mii_bus = { |
@@ -633,9 +706,13 @@ static struct platform_device *cm_bf537e_devices[] __initdata = { | |||
633 | #endif | 706 | #endif |
634 | 707 | ||
635 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 708 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
709 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
636 | &bfin_sport0_uart_device, | 710 | &bfin_sport0_uart_device, |
711 | #endif | ||
712 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
637 | &bfin_sport1_uart_device, | 713 | &bfin_sport1_uart_device, |
638 | #endif | 714 | #endif |
715 | #endif | ||
639 | 716 | ||
640 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 717 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
641 | &isp1362_hcd_device, | 718 | &isp1362_hcd_device, |
@@ -683,6 +760,33 @@ static int __init cm_bf537e_init(void) | |||
683 | 760 | ||
684 | arch_initcall(cm_bf537e_init); | 761 | arch_initcall(cm_bf537e_init); |
685 | 762 | ||
763 | static struct platform_device *cm_bf537e_early_devices[] __initdata = { | ||
764 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
765 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
766 | &bfin_uart0_device, | ||
767 | #endif | ||
768 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
769 | &bfin_uart1_device, | ||
770 | #endif | ||
771 | #endif | ||
772 | |||
773 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
774 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
775 | &bfin_sport0_uart_device, | ||
776 | #endif | ||
777 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
778 | &bfin_sport1_uart_device, | ||
779 | #endif | ||
780 | #endif | ||
781 | }; | ||
782 | |||
783 | void __init native_machine_early_platform_add_devices(void) | ||
784 | { | ||
785 | printk(KERN_INFO "register early platform devices\n"); | ||
786 | early_platform_add_devices(cm_bf537e_early_devices, | ||
787 | ARRAY_SIZE(cm_bf537e_early_devices)); | ||
788 | } | ||
789 | |||
686 | void bfin_get_ether_addr(char *addr) | 790 | void bfin_get_ether_addr(char *addr) |
687 | { | 791 | { |
688 | random_ether_addr(addr); | 792 | random_ether_addr(addr); |
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c index ea11aa81340d..d464ad5b72b2 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c | |||
@@ -74,7 +74,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = { | |||
74 | }; | 74 | }; |
75 | #endif | 75 | #endif |
76 | 76 | ||
77 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 77 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
78 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | 78 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
79 | .enable_dma = 0, | 79 | .enable_dma = 0, |
80 | .bits_per_word = 16, | 80 | .bits_per_word = 16, |
@@ -113,7 +113,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
113 | }, | 113 | }, |
114 | #endif | 114 | #endif |
115 | 115 | ||
116 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 116 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
117 | { | 117 | { |
118 | .modalias = "ad1836", | 118 | .modalias = "ad1836", |
119 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 119 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
@@ -327,25 +327,93 @@ static struct platform_device cm_flash_device = { | |||
327 | #endif | 327 | #endif |
328 | 328 | ||
329 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 329 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
330 | static struct resource bfin_uart_resources[] = { | 330 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
331 | static struct resource bfin_uart0_resources[] = { | ||
331 | { | 332 | { |
332 | .start = 0xFFC00400, | 333 | .start = UART0_THR, |
333 | .end = 0xFFC004FF, | 334 | .end = UART0_GCTL+2, |
334 | .flags = IORESOURCE_MEM, | 335 | .flags = IORESOURCE_MEM, |
335 | }, { | 336 | }, |
336 | .start = 0xFFC02000, | 337 | { |
337 | .end = 0xFFC020FF, | 338 | .start = IRQ_UART0_RX, |
339 | .end = IRQ_UART0_RX+1, | ||
340 | .flags = IORESOURCE_IRQ, | ||
341 | }, | ||
342 | { | ||
343 | .start = IRQ_UART0_ERROR, | ||
344 | .end = IRQ_UART0_ERROR, | ||
345 | .flags = IORESOURCE_IRQ, | ||
346 | }, | ||
347 | { | ||
348 | .start = CH_UART0_TX, | ||
349 | .end = CH_UART0_TX, | ||
350 | .flags = IORESOURCE_DMA, | ||
351 | }, | ||
352 | { | ||
353 | .start = CH_UART0_RX, | ||
354 | .end = CH_UART0_RX, | ||
355 | .flags = IORESOURCE_DMA, | ||
356 | }, | ||
357 | }; | ||
358 | |||
359 | unsigned short bfin_uart0_peripherals[] = { | ||
360 | P_UART0_TX, P_UART0_RX, 0 | ||
361 | }; | ||
362 | |||
363 | static struct platform_device bfin_uart0_device = { | ||
364 | .name = "bfin-uart", | ||
365 | .id = 0, | ||
366 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), | ||
367 | .resource = bfin_uart0_resources, | ||
368 | .dev = { | ||
369 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
370 | }, | ||
371 | }; | ||
372 | #endif | ||
373 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
374 | static struct resource bfin_uart1_resources[] = { | ||
375 | { | ||
376 | .start = UART1_THR, | ||
377 | .end = UART1_GCTL+2, | ||
338 | .flags = IORESOURCE_MEM, | 378 | .flags = IORESOURCE_MEM, |
339 | }, | 379 | }, |
380 | { | ||
381 | .start = IRQ_UART1_RX, | ||
382 | .end = IRQ_UART1_RX+1, | ||
383 | .flags = IORESOURCE_IRQ, | ||
384 | }, | ||
385 | { | ||
386 | .start = IRQ_UART1_ERROR, | ||
387 | .end = IRQ_UART1_ERROR, | ||
388 | .flags = IORESOURCE_IRQ, | ||
389 | }, | ||
390 | { | ||
391 | .start = CH_UART1_TX, | ||
392 | .end = CH_UART1_TX, | ||
393 | .flags = IORESOURCE_DMA, | ||
394 | }, | ||
395 | { | ||
396 | .start = CH_UART1_RX, | ||
397 | .end = CH_UART1_RX, | ||
398 | .flags = IORESOURCE_DMA, | ||
399 | }, | ||
400 | }; | ||
401 | |||
402 | unsigned short bfin_uart1_peripherals[] = { | ||
403 | P_UART1_TX, P_UART1_RX, 0 | ||
340 | }; | 404 | }; |
341 | 405 | ||
342 | static struct platform_device bfin_uart_device = { | 406 | static struct platform_device bfin_uart1_device = { |
343 | .name = "bfin-uart", | 407 | .name = "bfin-uart", |
344 | .id = 1, | 408 | .id = 1, |
345 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 409 | .num_resources = ARRAY_SIZE(bfin_uart1_resources), |
346 | .resource = bfin_uart_resources, | 410 | .resource = bfin_uart1_resources, |
411 | .dev = { | ||
412 | .platform_data = &bfin_uart1_peripherals, /* Passed to driver */ | ||
413 | }, | ||
347 | }; | 414 | }; |
348 | #endif | 415 | #endif |
416 | #endif | ||
349 | 417 | ||
350 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 418 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
351 | #ifdef CONFIG_BFIN_SIR0 | 419 | #ifdef CONFIG_BFIN_SIR0 |
@@ -423,16 +491,75 @@ static struct platform_device i2c_bfin_twi_device = { | |||
423 | #endif | 491 | #endif |
424 | 492 | ||
425 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 493 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
494 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
495 | static struct resource bfin_sport0_uart_resources[] = { | ||
496 | { | ||
497 | .start = SPORT0_TCR1, | ||
498 | .end = SPORT0_MRCS3+4, | ||
499 | .flags = IORESOURCE_MEM, | ||
500 | }, | ||
501 | { | ||
502 | .start = IRQ_SPORT0_RX, | ||
503 | .end = IRQ_SPORT0_RX+1, | ||
504 | .flags = IORESOURCE_IRQ, | ||
505 | }, | ||
506 | { | ||
507 | .start = IRQ_SPORT0_ERROR, | ||
508 | .end = IRQ_SPORT0_ERROR, | ||
509 | .flags = IORESOURCE_IRQ, | ||
510 | }, | ||
511 | }; | ||
512 | |||
513 | unsigned short bfin_sport0_peripherals[] = { | ||
514 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
515 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
516 | }; | ||
517 | |||
426 | static struct platform_device bfin_sport0_uart_device = { | 518 | static struct platform_device bfin_sport0_uart_device = { |
427 | .name = "bfin-sport-uart", | 519 | .name = "bfin-sport-uart", |
428 | .id = 0, | 520 | .id = 0, |
521 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
522 | .resource = bfin_sport0_uart_resources, | ||
523 | .dev = { | ||
524 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
525 | }, | ||
526 | }; | ||
527 | #endif | ||
528 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
529 | static struct resource bfin_sport1_uart_resources[] = { | ||
530 | { | ||
531 | .start = SPORT1_TCR1, | ||
532 | .end = SPORT1_MRCS3+4, | ||
533 | .flags = IORESOURCE_MEM, | ||
534 | }, | ||
535 | { | ||
536 | .start = IRQ_SPORT1_RX, | ||
537 | .end = IRQ_SPORT1_RX+1, | ||
538 | .flags = IORESOURCE_IRQ, | ||
539 | }, | ||
540 | { | ||
541 | .start = IRQ_SPORT1_ERROR, | ||
542 | .end = IRQ_SPORT1_ERROR, | ||
543 | .flags = IORESOURCE_IRQ, | ||
544 | }, | ||
545 | }; | ||
546 | |||
547 | unsigned short bfin_sport1_peripherals[] = { | ||
548 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
549 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
429 | }; | 550 | }; |
430 | 551 | ||
431 | static struct platform_device bfin_sport1_uart_device = { | 552 | static struct platform_device bfin_sport1_uart_device = { |
432 | .name = "bfin-sport-uart", | 553 | .name = "bfin-sport-uart", |
433 | .id = 1, | 554 | .id = 1, |
555 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
556 | .resource = bfin_sport1_uart_resources, | ||
557 | .dev = { | ||
558 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
559 | }, | ||
434 | }; | 560 | }; |
435 | #endif | 561 | #endif |
562 | #endif | ||
436 | 563 | ||
437 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 564 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
438 | static struct platform_device bfin_mii_bus = { | 565 | static struct platform_device bfin_mii_bus = { |
@@ -522,7 +649,12 @@ static struct platform_device *cm_bf537u_devices[] __initdata = { | |||
522 | #endif | 649 | #endif |
523 | 650 | ||
524 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 651 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
525 | &bfin_uart_device, | 652 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
653 | &bfin_uart0_device, | ||
654 | #endif | ||
655 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
656 | &bfin_uart1_device, | ||
657 | #endif | ||
526 | #endif | 658 | #endif |
527 | 659 | ||
528 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 660 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
@@ -539,9 +671,13 @@ static struct platform_device *cm_bf537u_devices[] __initdata = { | |||
539 | #endif | 671 | #endif |
540 | 672 | ||
541 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 673 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
674 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
542 | &bfin_sport0_uart_device, | 675 | &bfin_sport0_uart_device, |
676 | #endif | ||
677 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
543 | &bfin_sport1_uart_device, | 678 | &bfin_sport1_uart_device, |
544 | #endif | 679 | #endif |
680 | #endif | ||
545 | 681 | ||
546 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 682 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
547 | &isp1362_hcd_device, | 683 | &isp1362_hcd_device, |
@@ -589,6 +725,33 @@ static int __init cm_bf537u_init(void) | |||
589 | 725 | ||
590 | arch_initcall(cm_bf537u_init); | 726 | arch_initcall(cm_bf537u_init); |
591 | 727 | ||
728 | static struct platform_device *cm_bf537u_early_devices[] __initdata = { | ||
729 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
730 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
731 | &bfin_uart0_device, | ||
732 | #endif | ||
733 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
734 | &bfin_uart1_device, | ||
735 | #endif | ||
736 | #endif | ||
737 | |||
738 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
739 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
740 | &bfin_sport0_uart_device, | ||
741 | #endif | ||
742 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
743 | &bfin_sport1_uart_device, | ||
744 | #endif | ||
745 | #endif | ||
746 | }; | ||
747 | |||
748 | void __init native_machine_early_platform_add_devices(void) | ||
749 | { | ||
750 | printk(KERN_INFO "register early platform devices\n"); | ||
751 | early_platform_add_devices(cm_bf537u_early_devices, | ||
752 | ARRAY_SIZE(cm_bf537u_early_devices)); | ||
753 | } | ||
754 | |||
592 | void bfin_get_ether_addr(char *addr) | 755 | void bfin_get_ether_addr(char *addr) |
593 | { | 756 | { |
594 | random_ether_addr(addr); | 757 | random_ether_addr(addr); |
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c index 0da927252701..c489d602c590 100644 --- a/arch/blackfin/mach-bf537/boards/minotaur.c +++ b/arch/blackfin/mach-bf537/boards/minotaur.c | |||
@@ -211,25 +211,93 @@ static struct platform_device bfin_spi0_device = { | |||
211 | #endif /* spi master and devices */ | 211 | #endif /* spi master and devices */ |
212 | 212 | ||
213 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 213 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
214 | static struct resource bfin_uart_resources[] = { | 214 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
215 | static struct resource bfin_uart0_resources[] = { | ||
215 | { | 216 | { |
216 | .start = 0xFFC00400, | 217 | .start = UART0_THR, |
217 | .end = 0xFFC004FF, | 218 | .end = UART0_GCTL+2, |
218 | .flags = IORESOURCE_MEM, | 219 | .flags = IORESOURCE_MEM, |
219 | }, { | 220 | }, |
220 | .start = 0xFFC02000, | 221 | { |
221 | .end = 0xFFC020FF, | 222 | .start = IRQ_UART0_RX, |
223 | .end = IRQ_UART0_RX+1, | ||
224 | .flags = IORESOURCE_IRQ, | ||
225 | }, | ||
226 | { | ||
227 | .start = IRQ_UART0_ERROR, | ||
228 | .end = IRQ_UART0_ERROR, | ||
229 | .flags = IORESOURCE_IRQ, | ||
230 | }, | ||
231 | { | ||
232 | .start = CH_UART0_TX, | ||
233 | .end = CH_UART0_TX, | ||
234 | .flags = IORESOURCE_DMA, | ||
235 | }, | ||
236 | { | ||
237 | .start = CH_UART0_RX, | ||
238 | .end = CH_UART0_RX, | ||
239 | .flags = IORESOURCE_DMA, | ||
240 | }, | ||
241 | }; | ||
242 | |||
243 | unsigned short bfin_uart0_peripherals[] = { | ||
244 | P_UART0_TX, P_UART0_RX, 0 | ||
245 | }; | ||
246 | |||
247 | static struct platform_device bfin_uart0_device = { | ||
248 | .name = "bfin-uart", | ||
249 | .id = 0, | ||
250 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), | ||
251 | .resource = bfin_uart0_resources, | ||
252 | .dev = { | ||
253 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
254 | }, | ||
255 | }; | ||
256 | #endif | ||
257 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
258 | static struct resource bfin_uart1_resources[] = { | ||
259 | { | ||
260 | .start = UART1_THR, | ||
261 | .end = UART1_GCTL+2, | ||
222 | .flags = IORESOURCE_MEM, | 262 | .flags = IORESOURCE_MEM, |
223 | }, | 263 | }, |
264 | { | ||
265 | .start = IRQ_UART1_RX, | ||
266 | .end = IRQ_UART1_RX+1, | ||
267 | .flags = IORESOURCE_IRQ, | ||
268 | }, | ||
269 | { | ||
270 | .start = IRQ_UART1_ERROR, | ||
271 | .end = IRQ_UART1_ERROR, | ||
272 | .flags = IORESOURCE_IRQ, | ||
273 | }, | ||
274 | { | ||
275 | .start = CH_UART1_TX, | ||
276 | .end = CH_UART1_TX, | ||
277 | .flags = IORESOURCE_DMA, | ||
278 | }, | ||
279 | { | ||
280 | .start = CH_UART1_RX, | ||
281 | .end = CH_UART1_RX, | ||
282 | .flags = IORESOURCE_DMA, | ||
283 | }, | ||
284 | }; | ||
285 | |||
286 | unsigned short bfin_uart1_peripherals[] = { | ||
287 | P_UART1_TX, P_UART1_RX, 0 | ||
224 | }; | 288 | }; |
225 | 289 | ||
226 | static struct platform_device bfin_uart_device = { | 290 | static struct platform_device bfin_uart1_device = { |
227 | .name = "bfin-uart", | 291 | .name = "bfin-uart", |
228 | .id = 1, | 292 | .id = 1, |
229 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 293 | .num_resources = ARRAY_SIZE(bfin_uart1_resources), |
230 | .resource = bfin_uart_resources, | 294 | .resource = bfin_uart1_resources, |
295 | .dev = { | ||
296 | .platform_data = &bfin_uart1_peripherals, /* Passed to driver */ | ||
297 | }, | ||
231 | }; | 298 | }; |
232 | #endif | 299 | #endif |
300 | #endif | ||
233 | 301 | ||
234 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 302 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
235 | #ifdef CONFIG_BFIN_SIR0 | 303 | #ifdef CONFIG_BFIN_SIR0 |
@@ -309,16 +377,75 @@ static struct platform_device i2c_bfin_twi_device = { | |||
309 | #endif | 377 | #endif |
310 | 378 | ||
311 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 379 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
380 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
381 | static struct resource bfin_sport0_uart_resources[] = { | ||
382 | { | ||
383 | .start = SPORT0_TCR1, | ||
384 | .end = SPORT0_MRCS3+4, | ||
385 | .flags = IORESOURCE_MEM, | ||
386 | }, | ||
387 | { | ||
388 | .start = IRQ_SPORT0_RX, | ||
389 | .end = IRQ_SPORT0_RX+1, | ||
390 | .flags = IORESOURCE_IRQ, | ||
391 | }, | ||
392 | { | ||
393 | .start = IRQ_SPORT0_ERROR, | ||
394 | .end = IRQ_SPORT0_ERROR, | ||
395 | .flags = IORESOURCE_IRQ, | ||
396 | }, | ||
397 | }; | ||
398 | |||
399 | unsigned short bfin_sport0_peripherals[] = { | ||
400 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
401 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
402 | }; | ||
403 | |||
312 | static struct platform_device bfin_sport0_uart_device = { | 404 | static struct platform_device bfin_sport0_uart_device = { |
313 | .name = "bfin-sport-uart", | 405 | .name = "bfin-sport-uart", |
314 | .id = 0, | 406 | .id = 0, |
407 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
408 | .resource = bfin_sport0_uart_resources, | ||
409 | .dev = { | ||
410 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
411 | }, | ||
412 | }; | ||
413 | #endif | ||
414 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
415 | static struct resource bfin_sport1_uart_resources[] = { | ||
416 | { | ||
417 | .start = SPORT1_TCR1, | ||
418 | .end = SPORT1_MRCS3+4, | ||
419 | .flags = IORESOURCE_MEM, | ||
420 | }, | ||
421 | { | ||
422 | .start = IRQ_SPORT1_RX, | ||
423 | .end = IRQ_SPORT1_RX+1, | ||
424 | .flags = IORESOURCE_IRQ, | ||
425 | }, | ||
426 | { | ||
427 | .start = IRQ_SPORT1_ERROR, | ||
428 | .end = IRQ_SPORT1_ERROR, | ||
429 | .flags = IORESOURCE_IRQ, | ||
430 | }, | ||
431 | }; | ||
432 | |||
433 | unsigned short bfin_sport1_peripherals[] = { | ||
434 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
435 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
315 | }; | 436 | }; |
316 | 437 | ||
317 | static struct platform_device bfin_sport1_uart_device = { | 438 | static struct platform_device bfin_sport1_uart_device = { |
318 | .name = "bfin-sport-uart", | 439 | .name = "bfin-sport-uart", |
319 | .id = 1, | 440 | .id = 1, |
441 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
442 | .resource = bfin_sport1_uart_resources, | ||
443 | .dev = { | ||
444 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
445 | }, | ||
320 | }; | 446 | }; |
321 | #endif | 447 | #endif |
448 | #endif | ||
322 | 449 | ||
323 | static struct platform_device *minotaur_devices[] __initdata = { | 450 | static struct platform_device *minotaur_devices[] __initdata = { |
324 | #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) | 451 | #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) |
@@ -343,7 +470,12 @@ static struct platform_device *minotaur_devices[] __initdata = { | |||
343 | #endif | 470 | #endif |
344 | 471 | ||
345 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 472 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
346 | &bfin_uart_device, | 473 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
474 | &bfin_uart0_device, | ||
475 | #endif | ||
476 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
477 | &bfin_uart1_device, | ||
478 | #endif | ||
347 | #endif | 479 | #endif |
348 | 480 | ||
349 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 481 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
@@ -360,9 +492,13 @@ static struct platform_device *minotaur_devices[] __initdata = { | |||
360 | #endif | 492 | #endif |
361 | 493 | ||
362 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 494 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
495 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
363 | &bfin_sport0_uart_device, | 496 | &bfin_sport0_uart_device, |
497 | #endif | ||
498 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
364 | &bfin_sport1_uart_device, | 499 | &bfin_sport1_uart_device, |
365 | #endif | 500 | #endif |
501 | #endif | ||
366 | 502 | ||
367 | }; | 503 | }; |
368 | 504 | ||
@@ -380,6 +516,33 @@ static int __init minotaur_init(void) | |||
380 | 516 | ||
381 | arch_initcall(minotaur_init); | 517 | arch_initcall(minotaur_init); |
382 | 518 | ||
519 | static struct platform_device *minotaur_early_devices[] __initdata = { | ||
520 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
521 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
522 | &bfin_uart0_device, | ||
523 | #endif | ||
524 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
525 | &bfin_uart1_device, | ||
526 | #endif | ||
527 | #endif | ||
528 | |||
529 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
530 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
531 | &bfin_sport0_uart_device, | ||
532 | #endif | ||
533 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
534 | &bfin_sport1_uart_device, | ||
535 | #endif | ||
536 | #endif | ||
537 | }; | ||
538 | |||
539 | void __init native_machine_early_platform_add_devices(void) | ||
540 | { | ||
541 | printk(KERN_INFO "register early platform devices\n"); | ||
542 | early_platform_add_devices(minotaur_early_devices, | ||
543 | ARRAY_SIZE(minotaur_early_devices)); | ||
544 | } | ||
545 | |||
383 | void native_machine_restart(char *cmd) | 546 | void native_machine_restart(char *cmd) |
384 | { | 547 | { |
385 | /* workaround reboot hang when booting from SPI */ | 548 | /* workaround reboot hang when booting from SPI */ |
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c index 4e0afda472ab..812e8f991601 100644 --- a/arch/blackfin/mach-bf537/boards/pnav10.c +++ b/arch/blackfin/mach-bf537/boards/pnav10.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <asm/dma.h> | 17 | #include <asm/dma.h> |
18 | #include <asm/bfin5xx_spi.h> | 18 | #include <asm/bfin5xx_spi.h> |
19 | #include <asm/portmux.h> | 19 | #include <asm/portmux.h> |
20 | #include <linux/usb/sl811.h> | ||
21 | 20 | ||
22 | #include <linux/spi/ad7877.h> | 21 | #include <linux/spi/ad7877.h> |
23 | 22 | ||
@@ -99,51 +98,6 @@ static struct platform_device smc91x_device = { | |||
99 | }; | 98 | }; |
100 | #endif | 99 | #endif |
101 | 100 | ||
102 | #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) | ||
103 | static struct resource sl811_hcd_resources[] = { | ||
104 | { | ||
105 | .start = 0x20340000, | ||
106 | .end = 0x20340000, | ||
107 | .flags = IORESOURCE_MEM, | ||
108 | }, { | ||
109 | .start = 0x20340004, | ||
110 | .end = 0x20340004, | ||
111 | .flags = IORESOURCE_MEM, | ||
112 | }, { | ||
113 | .start = CONFIG_USB_SL811_BFIN_IRQ, | ||
114 | .end = CONFIG_USB_SL811_BFIN_IRQ, | ||
115 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
116 | }, | ||
117 | }; | ||
118 | |||
119 | #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS) | ||
120 | void sl811_port_power(struct device *dev, int is_on) | ||
121 | { | ||
122 | gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS"); | ||
123 | gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on); | ||
124 | |||
125 | } | ||
126 | #endif | ||
127 | |||
128 | static struct sl811_platform_data sl811_priv = { | ||
129 | .potpg = 10, | ||
130 | .power = 250, /* == 500mA */ | ||
131 | #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS) | ||
132 | .port_power = &sl811_port_power, | ||
133 | #endif | ||
134 | }; | ||
135 | |||
136 | static struct platform_device sl811_hcd_device = { | ||
137 | .name = "sl811-hcd", | ||
138 | .id = 0, | ||
139 | .dev = { | ||
140 | .platform_data = &sl811_priv, | ||
141 | }, | ||
142 | .num_resources = ARRAY_SIZE(sl811_hcd_resources), | ||
143 | .resource = sl811_hcd_resources, | ||
144 | }; | ||
145 | #endif | ||
146 | |||
147 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 101 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
148 | static struct platform_device bfin_mii_bus = { | 102 | static struct platform_device bfin_mii_bus = { |
149 | .name = "bfin_mii_bus", | 103 | .name = "bfin_mii_bus", |
@@ -221,8 +175,8 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = { | |||
221 | }; | 175 | }; |
222 | #endif | 176 | #endif |
223 | 177 | ||
224 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ | 178 | #if defined(CONFIG_SND_BLACKFIN_AD183X) \ |
225 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 179 | || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
226 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | 180 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
227 | .enable_dma = 0, | 181 | .enable_dma = 0, |
228 | .bits_per_word = 16, | 182 | .bits_per_word = 16, |
@@ -284,8 +238,8 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
284 | }, | 238 | }, |
285 | #endif | 239 | #endif |
286 | 240 | ||
287 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ | 241 | #if defined(CONFIG_SND_BLACKFIN_AD183X) \ |
288 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 242 | || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
289 | { | 243 | { |
290 | .modalias = "ad1836", | 244 | .modalias = "ad1836", |
291 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 245 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
@@ -362,25 +316,93 @@ static struct platform_device bfin_fb_device = { | |||
362 | #endif | 316 | #endif |
363 | 317 | ||
364 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 318 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
365 | static struct resource bfin_uart_resources[] = { | 319 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
320 | static struct resource bfin_uart0_resources[] = { | ||
366 | { | 321 | { |
367 | .start = 0xFFC00400, | 322 | .start = UART0_THR, |
368 | .end = 0xFFC004FF, | 323 | .end = UART0_GCTL+2, |
369 | .flags = IORESOURCE_MEM, | 324 | .flags = IORESOURCE_MEM, |
370 | }, { | 325 | }, |
371 | .start = 0xFFC02000, | 326 | { |
372 | .end = 0xFFC020FF, | 327 | .start = IRQ_UART0_RX, |
328 | .end = IRQ_UART0_RX+1, | ||
329 | .flags = IORESOURCE_IRQ, | ||
330 | }, | ||
331 | { | ||
332 | .start = IRQ_UART0_ERROR, | ||
333 | .end = IRQ_UART0_ERROR, | ||
334 | .flags = IORESOURCE_IRQ, | ||
335 | }, | ||
336 | { | ||
337 | .start = CH_UART0_TX, | ||
338 | .end = CH_UART0_TX, | ||
339 | .flags = IORESOURCE_DMA, | ||
340 | }, | ||
341 | { | ||
342 | .start = CH_UART0_RX, | ||
343 | .end = CH_UART0_RX, | ||
344 | .flags = IORESOURCE_DMA, | ||
345 | }, | ||
346 | }; | ||
347 | |||
348 | unsigned short bfin_uart0_peripherals[] = { | ||
349 | P_UART0_TX, P_UART0_RX, 0 | ||
350 | }; | ||
351 | |||
352 | static struct platform_device bfin_uart0_device = { | ||
353 | .name = "bfin-uart", | ||
354 | .id = 0, | ||
355 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), | ||
356 | .resource = bfin_uart0_resources, | ||
357 | .dev = { | ||
358 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
359 | }, | ||
360 | }; | ||
361 | #endif | ||
362 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
363 | static struct resource bfin_uart1_resources[] = { | ||
364 | { | ||
365 | .start = UART1_THR, | ||
366 | .end = UART1_GCTL+2, | ||
373 | .flags = IORESOURCE_MEM, | 367 | .flags = IORESOURCE_MEM, |
374 | }, | 368 | }, |
369 | { | ||
370 | .start = IRQ_UART1_RX, | ||
371 | .end = IRQ_UART1_RX+1, | ||
372 | .flags = IORESOURCE_IRQ, | ||
373 | }, | ||
374 | { | ||
375 | .start = IRQ_UART1_ERROR, | ||
376 | .end = IRQ_UART1_ERROR, | ||
377 | .flags = IORESOURCE_IRQ, | ||
378 | }, | ||
379 | { | ||
380 | .start = CH_UART1_TX, | ||
381 | .end = CH_UART1_TX, | ||
382 | .flags = IORESOURCE_DMA, | ||
383 | }, | ||
384 | { | ||
385 | .start = CH_UART1_RX, | ||
386 | .end = CH_UART1_RX, | ||
387 | .flags = IORESOURCE_DMA, | ||
388 | }, | ||
389 | }; | ||
390 | |||
391 | unsigned short bfin_uart1_peripherals[] = { | ||
392 | P_UART1_TX, P_UART1_RX, 0 | ||
375 | }; | 393 | }; |
376 | 394 | ||
377 | static struct platform_device bfin_uart_device = { | 395 | static struct platform_device bfin_uart1_device = { |
378 | .name = "bfin-uart", | 396 | .name = "bfin-uart", |
379 | .id = 1, | 397 | .id = 1, |
380 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 398 | .num_resources = ARRAY_SIZE(bfin_uart1_resources), |
381 | .resource = bfin_uart_resources, | 399 | .resource = bfin_uart1_resources, |
400 | .dev = { | ||
401 | .platform_data = &bfin_uart1_peripherals, /* Passed to driver */ | ||
402 | }, | ||
382 | }; | 403 | }; |
383 | #endif | 404 | #endif |
405 | #endif | ||
384 | 406 | ||
385 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 407 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
386 | #ifdef CONFIG_BFIN_SIR0 | 408 | #ifdef CONFIG_BFIN_SIR0 |
@@ -446,10 +468,6 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
446 | &rtc_device, | 468 | &rtc_device, |
447 | #endif | 469 | #endif |
448 | 470 | ||
449 | #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) | ||
450 | &sl811_hcd_device, | ||
451 | #endif | ||
452 | |||
453 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 471 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
454 | &smc91x_device, | 472 | &smc91x_device, |
455 | #endif | 473 | #endif |
@@ -472,7 +490,12 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
472 | #endif | 490 | #endif |
473 | 491 | ||
474 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 492 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
475 | &bfin_uart_device, | 493 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
494 | &bfin_uart0_device, | ||
495 | #endif | ||
496 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
497 | &bfin_uart1_device, | ||
498 | #endif | ||
476 | #endif | 499 | #endif |
477 | 500 | ||
478 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 501 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
@@ -498,6 +521,24 @@ static int __init pnav_init(void) | |||
498 | 521 | ||
499 | arch_initcall(pnav_init); | 522 | arch_initcall(pnav_init); |
500 | 523 | ||
524 | static struct platform_device *stamp_early_devices[] __initdata = { | ||
525 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
526 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
527 | &bfin_uart0_device, | ||
528 | #endif | ||
529 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
530 | &bfin_uart1_device, | ||
531 | #endif | ||
532 | #endif | ||
533 | }; | ||
534 | |||
535 | void __init native_machine_early_platform_add_devices(void) | ||
536 | { | ||
537 | printk(KERN_INFO "register early platform devices\n"); | ||
538 | early_platform_add_devices(stamp_early_devices, | ||
539 | ARRAY_SIZE(stamp_early_devices)); | ||
540 | } | ||
541 | |||
501 | void bfin_get_ether_addr(char *addr) | 542 | void bfin_get_ether_addr(char *addr) |
502 | { | 543 | { |
503 | random_ether_addr(addr); | 544 | random_ether_addr(addr); |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index ac9b52e0087c..9eaf5b05c11e 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -20,10 +20,12 @@ | |||
20 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 20 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
21 | #include <linux/usb/isp1362.h> | 21 | #include <linux/usb/isp1362.h> |
22 | #endif | 22 | #endif |
23 | #include <linux/i2c.h> | ||
24 | #include <linux/i2c/adp5588.h> | ||
25 | #include <linux/etherdevice.h> | ||
23 | #include <linux/ata_platform.h> | 26 | #include <linux/ata_platform.h> |
24 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
25 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
26 | #include <linux/i2c.h> | ||
27 | #include <linux/usb/sl811.h> | 29 | #include <linux/usb/sl811.h> |
28 | #include <linux/spi/mmc_spi.h> | 30 | #include <linux/spi/mmc_spi.h> |
29 | #include <linux/leds.h> | 31 | #include <linux/leds.h> |
@@ -33,6 +35,14 @@ | |||
33 | #include <asm/reboot.h> | 35 | #include <asm/reboot.h> |
34 | #include <asm/portmux.h> | 36 | #include <asm/portmux.h> |
35 | #include <asm/dpmc.h> | 37 | #include <asm/dpmc.h> |
38 | #ifdef CONFIG_REGULATOR_ADP_SWITCH | ||
39 | #include <linux/regulator/adp_switch.h> | ||
40 | #endif | ||
41 | #ifdef CONFIG_REGULATOR_AD5398 | ||
42 | #include <linux/regulator/ad5398.h> | ||
43 | #endif | ||
44 | #include <linux/regulator/consumer.h> | ||
45 | #include <linux/regulator/userspace-consumer.h> | ||
36 | 46 | ||
37 | /* | 47 | /* |
38 | * Name the Board for the /proc/cpuinfo | 48 | * Name the Board for the /proc/cpuinfo |
@@ -208,8 +218,8 @@ static struct resource sl811_hcd_resources[] = { | |||
208 | .end = 0x20340004, | 218 | .end = 0x20340004, |
209 | .flags = IORESOURCE_MEM, | 219 | .flags = IORESOURCE_MEM, |
210 | }, { | 220 | }, { |
211 | .start = CONFIG_USB_SL811_BFIN_IRQ, | 221 | .start = IRQ_PF4, |
212 | .end = CONFIG_USB_SL811_BFIN_IRQ, | 222 | .end = IRQ_PF4, |
213 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | 223 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
214 | }, | 224 | }, |
215 | }; | 225 | }; |
@@ -454,6 +464,9 @@ static struct physmap_flash_data stamp_flash_data = { | |||
454 | .width = 2, | 464 | .width = 2, |
455 | .parts = stamp_partitions, | 465 | .parts = stamp_partitions, |
456 | .nr_parts = ARRAY_SIZE(stamp_partitions), | 466 | .nr_parts = ARRAY_SIZE(stamp_partitions), |
467 | #ifdef CONFIG_ROMKERNEL | ||
468 | .probe_type = "map_rom", | ||
469 | #endif | ||
457 | }; | 470 | }; |
458 | 471 | ||
459 | static struct resource stamp_flash_resource = { | 472 | static struct resource stamp_flash_resource = { |
@@ -515,20 +528,19 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = { | |||
515 | }; | 528 | }; |
516 | #endif | 529 | #endif |
517 | 530 | ||
518 | #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ | 531 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ |
519 | || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) | 532 | || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) |
520 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | 533 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
521 | .enable_dma = 0, | 534 | .enable_dma = 0, |
522 | .bits_per_word = 16, | 535 | .bits_per_word = 16, |
523 | }; | 536 | }; |
524 | #endif | 537 | #endif |
525 | 538 | ||
526 | #if defined(CONFIG_SND_BF5XX_SOC_AD1938) \ | 539 | #if defined(CONFIG_SND_BF5XX_SOC_AD193X) \ |
527 | || defined(CONFIG_SND_BF5XX_SOC_AD1938_MODULE) | 540 | || defined(CONFIG_SND_BF5XX_SOC_AD193X_MODULE) |
528 | static struct bfin5xx_spi_chip ad1938_spi_chip_info = { | 541 | static struct bfin5xx_spi_chip ad1938_spi_chip_info = { |
529 | .enable_dma = 0, | 542 | .enable_dma = 0, |
530 | .bits_per_word = 8, | 543 | .bits_per_word = 8, |
531 | .cs_gpio = GPIO_PF5, | ||
532 | }; | 544 | }; |
533 | #endif | 545 | #endif |
534 | 546 | ||
@@ -644,6 +656,42 @@ static struct ad714x_platform_data ad7142_i2c_platform_data = { | |||
644 | }; | 656 | }; |
645 | #endif | 657 | #endif |
646 | 658 | ||
659 | #if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE) | ||
660 | static struct bfin5xx_spi_chip ad2s90_spi_chip_info = { | ||
661 | .enable_dma = 0, | ||
662 | .bits_per_word = 16, | ||
663 | }; | ||
664 | #endif | ||
665 | |||
666 | #if defined(CONFIG_AD2S120X) || defined(CONFIG_AD2S120X_MODULE) | ||
667 | unsigned short ad2s120x_platform_data[] = { | ||
668 | /* used as SAMPLE and RDVEL */ | ||
669 | GPIO_PF5, GPIO_PF6, 0 | ||
670 | }; | ||
671 | |||
672 | static struct bfin5xx_spi_chip ad2s120x_spi_chip_info = { | ||
673 | .enable_dma = 0, | ||
674 | .bits_per_word = 16, | ||
675 | }; | ||
676 | #endif | ||
677 | |||
678 | #if defined(CONFIG_AD2S1210) || defined(CONFIG_AD2S1210_MODULE) | ||
679 | unsigned short ad2s1210_platform_data[] = { | ||
680 | /* use as SAMPLE, A0, A1 */ | ||
681 | GPIO_PF7, GPIO_PF8, GPIO_PF9, | ||
682 | # if defined(CONFIG_AD2S1210_GPIO_INPUT) || defined(CONFIG_AD2S1210_GPIO_OUTPUT) | ||
683 | /* the RES0 and RES1 pins */ | ||
684 | GPIO_PF4, GPIO_PF5, | ||
685 | # endif | ||
686 | 0, | ||
687 | }; | ||
688 | |||
689 | static struct bfin5xx_spi_chip ad2s1210_spi_chip_info = { | ||
690 | .enable_dma = 0, | ||
691 | .bits_per_word = 8, | ||
692 | }; | ||
693 | #endif | ||
694 | |||
647 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 695 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
648 | #define MMC_SPI_CARD_DETECT_INT IRQ_PF5 | 696 | #define MMC_SPI_CARD_DETECT_INT IRQ_PF5 |
649 | 697 | ||
@@ -686,11 +734,11 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { | |||
686 | .y_plate_ohms = 486, | 734 | .y_plate_ohms = 486, |
687 | .pressure_max = 1000, | 735 | .pressure_max = 1000, |
688 | .pressure_min = 0, | 736 | .pressure_min = 0, |
689 | .stopacq_polarity = 1, | 737 | .stopacq_polarity = 1, |
690 | .first_conversion_delay = 3, | 738 | .first_conversion_delay = 3, |
691 | .acquisition_time = 1, | 739 | .acquisition_time = 1, |
692 | .averaging = 1, | 740 | .averaging = 1, |
693 | .pen_down_acc_interval = 1, | 741 | .pen_down_acc_interval = 1, |
694 | }; | 742 | }; |
695 | #endif | 743 | #endif |
696 | 744 | ||
@@ -701,13 +749,13 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { | |||
701 | .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */ | 749 | .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */ |
702 | .pressure_max = 10000, | 750 | .pressure_max = 10000, |
703 | .pressure_min = 0, | 751 | .pressure_min = 0, |
704 | .first_conversion_delay = 3, /* wait 512us before do a first conversion */ | 752 | .first_conversion_delay = 3, /* wait 512us before do a first conversion */ |
705 | .acquisition_time = 1, /* 4us acquisition time per sample */ | 753 | .acquisition_time = 1, /* 4us acquisition time per sample */ |
706 | .median = 2, /* do 8 measurements */ | 754 | .median = 2, /* do 8 measurements */ |
707 | .averaging = 1, /* take the average of 4 middle samples */ | 755 | .averaging = 1, /* take the average of 4 middle samples */ |
708 | .pen_down_acc_interval = 255, /* 9.4 ms */ | 756 | .pen_down_acc_interval = 255, /* 9.4 ms */ |
709 | .gpio_output = 1, /* configure AUX/VBAT/GPIO as GPIO output */ | 757 | .gpio_export = 1, /* Export GPIO to gpiolib */ |
710 | .gpio_default = 1, /* During initialization set GPIO = HIGH */ | 758 | .gpio_base = -1, /* Dynamic allocation */ |
711 | }; | 759 | }; |
712 | #endif | 760 | #endif |
713 | 761 | ||
@@ -742,6 +790,11 @@ static const struct adxl34x_platform_data adxl34x_info = { | |||
742 | /* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */ | 790 | /* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */ |
743 | .power_mode = ADXL_AUTO_SLEEP | ADXL_LINK, | 791 | .power_mode = ADXL_AUTO_SLEEP | ADXL_LINK, |
744 | .fifo_mode = ADXL_FIFO_STREAM, | 792 | .fifo_mode = ADXL_FIFO_STREAM, |
793 | .orientation_enable = ADXL_EN_ORIENTATION_3D, | ||
794 | .deadzone_angle = ADXL_DEADZONE_ANGLE_10p8, | ||
795 | .divisor_length = ADXL_LP_FILTER_DIVISOR_16, | ||
796 | /* EV_KEY {+Z, +Y, +X, -X, -Y, -Z} */ | ||
797 | .ev_codes_orient_3d = {BTN_Z, BTN_Y, BTN_X, BTN_A, BTN_B, BTN_C}, | ||
745 | }; | 798 | }; |
746 | #endif | 799 | #endif |
747 | 800 | ||
@@ -813,6 +866,35 @@ static struct adf702x_platform_data adf7021_platform_data = { | |||
813 | .adf702x_regs = adf7021_regs, | 866 | .adf702x_regs = adf7021_regs, |
814 | .tx_reg = TXREG, | 867 | .tx_reg = TXREG, |
815 | }; | 868 | }; |
869 | static inline void adf702x_mac_init(void) | ||
870 | { | ||
871 | random_ether_addr(adf7021_platform_data.mac_addr); | ||
872 | } | ||
873 | #else | ||
874 | static inline void adf702x_mac_init(void) {} | ||
875 | #endif | ||
876 | |||
877 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | ||
878 | #include <linux/spi/ads7846.h> | ||
879 | static struct bfin5xx_spi_chip ad7873_spi_chip_info = { | ||
880 | .bits_per_word = 8, | ||
881 | }; | ||
882 | |||
883 | static int ads7873_get_pendown_state(void) | ||
884 | { | ||
885 | return gpio_get_value(GPIO_PF6); | ||
886 | } | ||
887 | |||
888 | static struct ads7846_platform_data __initdata ad7873_pdata = { | ||
889 | .model = 7873, /* AD7873 */ | ||
890 | .x_max = 0xfff, | ||
891 | .y_max = 0xfff, | ||
892 | .x_plate_ohms = 620, | ||
893 | .debounce_max = 1, | ||
894 | .debounce_rep = 0, | ||
895 | .debounce_tol = (~0), | ||
896 | .get_pendown_state = ads7873_get_pendown_state, | ||
897 | }; | ||
816 | #endif | 898 | #endif |
817 | 899 | ||
818 | #if defined(CONFIG_MTD_DATAFLASH) \ | 900 | #if defined(CONFIG_MTD_DATAFLASH) \ |
@@ -893,24 +975,25 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
893 | }, | 975 | }, |
894 | #endif | 976 | #endif |
895 | 977 | ||
896 | #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ | 978 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ |
897 | || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) | 979 | || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) |
898 | { | 980 | { |
899 | .modalias = "ad1836", | 981 | .modalias = "ad183x", |
900 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 982 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
901 | .bus_num = 0, | 983 | .bus_num = 0, |
902 | .chip_select = 4,/* CONFIG_SND_BLACKFIN_SPI_PFBIT */ | 984 | .chip_select = 4,/* CONFIG_SND_BLACKFIN_SPI_PFBIT */ |
985 | .platform_data = "ad1836", /* only includes chip name for the moment */ | ||
903 | .controller_data = &ad1836_spi_chip_info, | 986 | .controller_data = &ad1836_spi_chip_info, |
904 | .mode = SPI_MODE_3, | 987 | .mode = SPI_MODE_3, |
905 | }, | 988 | }, |
906 | #endif | 989 | #endif |
907 | 990 | ||
908 | #if defined(CONFIG_SND_BF5XX_SOC_AD1938) || defined(CONFIG_SND_BF5XX_SOC_AD1938_MODULE) | 991 | #if defined(CONFIG_SND_BF5XX_SOC_AD193X) || defined(CONFIG_SND_BF5XX_SOC_AD193X_MODULE) |
909 | { | 992 | { |
910 | .modalias = "ad1938", | 993 | .modalias = "ad193x", |
911 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 994 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
912 | .bus_num = 0, | 995 | .bus_num = 0, |
913 | .chip_select = 0,/* CONFIG_SND_BLACKFIN_SPI_PFBIT */ | 996 | .chip_select = 5, |
914 | .controller_data = &ad1938_spi_chip_info, | 997 | .controller_data = &ad1938_spi_chip_info, |
915 | .mode = SPI_MODE_3, | 998 | .mode = SPI_MODE_3, |
916 | }, | 999 | }, |
@@ -929,6 +1012,37 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
929 | }, | 1012 | }, |
930 | #endif | 1013 | #endif |
931 | 1014 | ||
1015 | #if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE) | ||
1016 | { | ||
1017 | .modalias = "ad2s90", | ||
1018 | .bus_num = 0, | ||
1019 | .chip_select = 3, /* change it for your board */ | ||
1020 | .platform_data = NULL, | ||
1021 | .controller_data = &ad2s90_spi_chip_info, | ||
1022 | }, | ||
1023 | #endif | ||
1024 | |||
1025 | #if defined(CONFIG_AD2S120X) || defined(CONFIG_AD2S120X_MODULE) | ||
1026 | { | ||
1027 | .modalias = "ad2s120x", | ||
1028 | .bus_num = 0, | ||
1029 | .chip_select = 4, /* CS, change it for your board */ | ||
1030 | .platform_data = ad2s120x_platform_data, | ||
1031 | .controller_data = &ad2s120x_spi_chip_info, | ||
1032 | }, | ||
1033 | #endif | ||
1034 | |||
1035 | #if defined(CONFIG_AD2S1210) || defined(CONFIG_AD2S1210_MODULE) | ||
1036 | { | ||
1037 | .modalias = "ad2s1210", | ||
1038 | .max_speed_hz = 8192000, | ||
1039 | .bus_num = 0, | ||
1040 | .chip_select = 4, /* CS, change it for your board */ | ||
1041 | .platform_data = ad2s1210_platform_data, | ||
1042 | .controller_data = &ad2s1210_spi_chip_info, | ||
1043 | }, | ||
1044 | #endif | ||
1045 | |||
932 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 1046 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
933 | { | 1047 | { |
934 | .modalias = "mmc_spi", | 1048 | .modalias = "mmc_spi", |
@@ -1016,7 +1130,18 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1016 | .mode = SPI_MODE_0, | 1130 | .mode = SPI_MODE_0, |
1017 | }, | 1131 | }, |
1018 | #endif | 1132 | #endif |
1019 | 1133 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | |
1134 | { | ||
1135 | .modalias = "ads7846", | ||
1136 | .max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */ | ||
1137 | .bus_num = 0, | ||
1138 | .irq = IRQ_PF6, | ||
1139 | .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */ | ||
1140 | .controller_data = &ad7873_spi_chip_info, | ||
1141 | .platform_data = &ad7873_pdata, | ||
1142 | .mode = SPI_MODE_0, | ||
1143 | }, | ||
1144 | #endif | ||
1020 | }; | 1145 | }; |
1021 | 1146 | ||
1022 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 1147 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
@@ -1132,9 +1257,10 @@ static struct platform_device bfin_fb_device = { | |||
1132 | #include <asm/bfin-lq035q1.h> | 1257 | #include <asm/bfin-lq035q1.h> |
1133 | 1258 | ||
1134 | static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { | 1259 | static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { |
1135 | .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB, | 1260 | .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB, |
1136 | .use_bl = 0, /* let something else control the LCD Blacklight */ | 1261 | .ppi_mode = USE_RGB565_16_BIT_PPI, |
1137 | .gpio_bl = GPIO_PF7, | 1262 | .use_bl = 0, /* let something else control the LCD Blacklight */ |
1263 | .gpio_bl = GPIO_PF7, | ||
1138 | }; | 1264 | }; |
1139 | 1265 | ||
1140 | static struct resource bfin_lq035q1_resources[] = { | 1266 | static struct resource bfin_lq035q1_resources[] = { |
@@ -1148,8 +1274,8 @@ static struct resource bfin_lq035q1_resources[] = { | |||
1148 | static struct platform_device bfin_lq035q1_device = { | 1274 | static struct platform_device bfin_lq035q1_device = { |
1149 | .name = "bfin-lq035q1", | 1275 | .name = "bfin-lq035q1", |
1150 | .id = -1, | 1276 | .id = -1, |
1151 | .num_resources = ARRAY_SIZE(bfin_lq035q1_resources), | 1277 | .num_resources = ARRAY_SIZE(bfin_lq035q1_resources), |
1152 | .resource = bfin_lq035q1_resources, | 1278 | .resource = bfin_lq035q1_resources, |
1153 | .dev = { | 1279 | .dev = { |
1154 | .platform_data = &bfin_lq035q1_data, | 1280 | .platform_data = &bfin_lq035q1_data, |
1155 | }, | 1281 | }, |
@@ -1157,30 +1283,105 @@ static struct platform_device bfin_lq035q1_device = { | |||
1157 | #endif | 1283 | #endif |
1158 | 1284 | ||
1159 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 1285 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
1160 | static struct resource bfin_uart_resources[] = { | ||
1161 | #ifdef CONFIG_SERIAL_BFIN_UART0 | 1286 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
1287 | static struct resource bfin_uart0_resources[] = { | ||
1162 | { | 1288 | { |
1163 | .start = 0xFFC00400, | 1289 | .start = UART0_THR, |
1164 | .end = 0xFFC004FF, | 1290 | .end = UART0_GCTL+2, |
1165 | .flags = IORESOURCE_MEM, | 1291 | .flags = IORESOURCE_MEM, |
1166 | }, | 1292 | }, |
1293 | { | ||
1294 | .start = IRQ_UART0_RX, | ||
1295 | .end = IRQ_UART0_RX+1, | ||
1296 | .flags = IORESOURCE_IRQ, | ||
1297 | }, | ||
1298 | { | ||
1299 | .start = IRQ_UART0_ERROR, | ||
1300 | .end = IRQ_UART0_ERROR, | ||
1301 | .flags = IORESOURCE_IRQ, | ||
1302 | }, | ||
1303 | { | ||
1304 | .start = CH_UART0_TX, | ||
1305 | .end = CH_UART0_TX, | ||
1306 | .flags = IORESOURCE_DMA, | ||
1307 | }, | ||
1308 | { | ||
1309 | .start = CH_UART0_RX, | ||
1310 | .end = CH_UART0_RX, | ||
1311 | .flags = IORESOURCE_DMA, | ||
1312 | }, | ||
1313 | #ifdef CONFIG_BFIN_UART0_CTSRTS | ||
1314 | { /* CTS pin */ | ||
1315 | .start = GPIO_PG7, | ||
1316 | .end = GPIO_PG7, | ||
1317 | .flags = IORESOURCE_IO, | ||
1318 | }, | ||
1319 | { /* RTS pin */ | ||
1320 | .start = GPIO_PG6, | ||
1321 | .end = GPIO_PG6, | ||
1322 | .flags = IORESOURCE_IO, | ||
1323 | }, | ||
1324 | #endif | ||
1325 | }; | ||
1326 | |||
1327 | unsigned short bfin_uart0_peripherals[] = { | ||
1328 | P_UART0_TX, P_UART0_RX, 0 | ||
1329 | }; | ||
1330 | |||
1331 | static struct platform_device bfin_uart0_device = { | ||
1332 | .name = "bfin-uart", | ||
1333 | .id = 0, | ||
1334 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), | ||
1335 | .resource = bfin_uart0_resources, | ||
1336 | .dev = { | ||
1337 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
1338 | }, | ||
1339 | }; | ||
1167 | #endif | 1340 | #endif |
1168 | #ifdef CONFIG_SERIAL_BFIN_UART1 | 1341 | #ifdef CONFIG_SERIAL_BFIN_UART1 |
1342 | static struct resource bfin_uart1_resources[] = { | ||
1169 | { | 1343 | { |
1170 | .start = 0xFFC02000, | 1344 | .start = UART1_THR, |
1171 | .end = 0xFFC020FF, | 1345 | .end = UART1_GCTL+2, |
1172 | .flags = IORESOURCE_MEM, | 1346 | .flags = IORESOURCE_MEM, |
1173 | }, | 1347 | }, |
1174 | #endif | 1348 | { |
1349 | .start = IRQ_UART1_RX, | ||
1350 | .end = IRQ_UART1_RX+1, | ||
1351 | .flags = IORESOURCE_IRQ, | ||
1352 | }, | ||
1353 | { | ||
1354 | .start = IRQ_UART1_ERROR, | ||
1355 | .end = IRQ_UART1_ERROR, | ||
1356 | .flags = IORESOURCE_IRQ, | ||
1357 | }, | ||
1358 | { | ||
1359 | .start = CH_UART1_TX, | ||
1360 | .end = CH_UART1_TX, | ||
1361 | .flags = IORESOURCE_DMA, | ||
1362 | }, | ||
1363 | { | ||
1364 | .start = CH_UART1_RX, | ||
1365 | .end = CH_UART1_RX, | ||
1366 | .flags = IORESOURCE_DMA, | ||
1367 | }, | ||
1368 | }; | ||
1369 | |||
1370 | unsigned short bfin_uart1_peripherals[] = { | ||
1371 | P_UART1_TX, P_UART1_RX, 0 | ||
1175 | }; | 1372 | }; |
1176 | 1373 | ||
1177 | static struct platform_device bfin_uart_device = { | 1374 | static struct platform_device bfin_uart1_device = { |
1178 | .name = "bfin-uart", | 1375 | .name = "bfin-uart", |
1179 | .id = 1, | 1376 | .id = 1, |
1180 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 1377 | .num_resources = ARRAY_SIZE(bfin_uart1_resources), |
1181 | .resource = bfin_uart_resources, | 1378 | .resource = bfin_uart1_resources, |
1379 | .dev = { | ||
1380 | .platform_data = &bfin_uart1_peripherals, /* Passed to driver */ | ||
1381 | }, | ||
1182 | }; | 1382 | }; |
1183 | #endif | 1383 | #endif |
1384 | #endif | ||
1184 | 1385 | ||
1185 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 1386 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
1186 | #ifdef CONFIG_BFIN_SIR0 | 1387 | #ifdef CONFIG_BFIN_SIR0 |
@@ -1260,7 +1461,6 @@ static struct platform_device i2c_bfin_twi_device = { | |||
1260 | #endif | 1461 | #endif |
1261 | 1462 | ||
1262 | #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) | 1463 | #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) |
1263 | #include <linux/i2c/adp5588.h> | ||
1264 | static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = { | 1464 | static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = { |
1265 | [0] = KEY_GRAVE, | 1465 | [0] = KEY_GRAVE, |
1266 | [1] = KEY_1, | 1466 | [1] = KEY_1, |
@@ -1457,7 +1657,6 @@ static struct adp5520_platform_data adp5520_pdev_data = { | |||
1457 | #endif | 1657 | #endif |
1458 | 1658 | ||
1459 | #if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE) | 1659 | #if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE) |
1460 | #include <linux/i2c/adp5588.h> | ||
1461 | static struct adp5588_gpio_platform_data adp5588_gpio_data = { | 1660 | static struct adp5588_gpio_platform_data adp5588_gpio_data = { |
1462 | .gpio_start = 50, | 1661 | .gpio_start = 50, |
1463 | .pullup_dis_mask = 0, | 1662 | .pullup_dis_mask = 0, |
@@ -1516,6 +1715,101 @@ static struct adp8870_backlight_platform_data adp8870_pdata = { | |||
1516 | }; | 1715 | }; |
1517 | #endif | 1716 | #endif |
1518 | 1717 | ||
1718 | #if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE) | ||
1719 | #include <linux/i2c/adp8860.h> | ||
1720 | static struct led_info adp8860_leds[] = { | ||
1721 | { | ||
1722 | .name = "adp8860-led7", | ||
1723 | .default_trigger = "none", | ||
1724 | .flags = ADP8860_LED_D7 | ADP8860_LED_OFFT_600ms, | ||
1725 | }, | ||
1726 | }; | ||
1727 | |||
1728 | static struct adp8860_backlight_platform_data adp8860_pdata = { | ||
1729 | .bl_led_assign = ADP8860_BL_D1 | ADP8860_BL_D2 | ADP8860_BL_D3 | | ||
1730 | ADP8860_BL_D4 | ADP8860_BL_D5 | ADP8860_BL_D6, /* 1 = Backlight 0 = Individual LED */ | ||
1731 | |||
1732 | .bl_fade_in = ADP8860_FADE_T_1200ms, /* Backlight Fade-In Timer */ | ||
1733 | .bl_fade_out = ADP8860_FADE_T_1200ms, /* Backlight Fade-Out Timer */ | ||
1734 | .bl_fade_law = ADP8860_FADE_LAW_CUBIC1, /* fade-on/fade-off transfer characteristic */ | ||
1735 | |||
1736 | .en_ambl_sens = 1, /* 1 = enable ambient light sensor */ | ||
1737 | .abml_filt = ADP8860_BL_AMBL_FILT_320ms, /* Light sensor filter time */ | ||
1738 | |||
1739 | .l1_daylight_max = ADP8860_BL_CUR_mA(20), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
1740 | .l1_daylight_dim = ADP8860_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
1741 | .l2_office_max = ADP8860_BL_CUR_mA(6), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
1742 | .l2_office_dim = ADP8860_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
1743 | .l3_dark_max = ADP8860_BL_CUR_mA(2), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
1744 | .l3_dark_dim = ADP8860_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
1745 | |||
1746 | .l2_trip = ADP8860_L2_COMP_CURR_uA(710), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */ | ||
1747 | .l2_hyst = ADP8860_L2_COMP_CURR_uA(73), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */ | ||
1748 | .l3_trip = ADP8860_L3_COMP_CURR_uA(43), /* use L3_COMP_CURR_uA(I) 0 <= I <= 138 uA */ | ||
1749 | .l3_hyst = ADP8860_L3_COMP_CURR_uA(11), /* use L3_COMP_CURR_uA(I) 0 <= I <= 138 uA */ | ||
1750 | |||
1751 | .leds = adp8860_leds, | ||
1752 | .num_leds = ARRAY_SIZE(adp8860_leds), | ||
1753 | .led_fade_law = ADP8860_FADE_LAW_SQUARE, /* fade-on/fade-off transfer characteristic */ | ||
1754 | .led_fade_in = ADP8860_FADE_T_600ms, | ||
1755 | .led_fade_out = ADP8860_FADE_T_600ms, | ||
1756 | .led_on_time = ADP8860_LED_ONT_200ms, | ||
1757 | }; | ||
1758 | #endif | ||
1759 | |||
1760 | #if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) | ||
1761 | static struct regulator_consumer_supply ad5398_consumer = { | ||
1762 | .supply = "current", | ||
1763 | }; | ||
1764 | |||
1765 | static struct regulator_init_data ad5398_regulator_data = { | ||
1766 | .constraints = { | ||
1767 | .name = "current range", | ||
1768 | .max_uA = 120000, | ||
1769 | .valid_ops_mask = REGULATOR_CHANGE_CURRENT | REGULATOR_CHANGE_STATUS, | ||
1770 | }, | ||
1771 | .num_consumer_supplies = 1, | ||
1772 | .consumer_supplies = &ad5398_consumer, | ||
1773 | }; | ||
1774 | |||
1775 | static struct ad5398_platform_data ad5398_i2c_platform_data = { | ||
1776 | .current_bits = 10, | ||
1777 | .current_offset = 4, | ||
1778 | .regulator_data = &ad5398_regulator_data, | ||
1779 | }; | ||
1780 | |||
1781 | #if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \ | ||
1782 | defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE) | ||
1783 | static struct platform_device ad5398_virt_consumer_device = { | ||
1784 | .name = "reg-virt-consumer", | ||
1785 | .id = 0, | ||
1786 | .dev = { | ||
1787 | .platform_data = "current", /* Passed to driver */ | ||
1788 | }, | ||
1789 | }; | ||
1790 | #endif | ||
1791 | #if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ | ||
1792 | defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE) | ||
1793 | static struct regulator_bulk_data ad5398_bulk_data = { | ||
1794 | .supply = "current", | ||
1795 | }; | ||
1796 | |||
1797 | static struct regulator_userspace_consumer_data ad5398_userspace_comsumer_data = { | ||
1798 | .name = "ad5398", | ||
1799 | .num_supplies = 1, | ||
1800 | .supplies = &ad5398_bulk_data, | ||
1801 | }; | ||
1802 | |||
1803 | static struct platform_device ad5398_userspace_consumer_device = { | ||
1804 | .name = "reg-userspace-consumer", | ||
1805 | .id = 0, | ||
1806 | .dev = { | ||
1807 | .platform_data = &ad5398_userspace_comsumer_data, | ||
1808 | }, | ||
1809 | }; | ||
1810 | #endif | ||
1811 | #endif | ||
1812 | |||
1519 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | 1813 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
1520 | #if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE) | 1814 | #if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE) |
1521 | { | 1815 | { |
@@ -1524,6 +1818,52 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
1524 | .platform_data = (void *)&ad7142_i2c_platform_data, | 1818 | .platform_data = (void *)&ad7142_i2c_platform_data, |
1525 | }, | 1819 | }, |
1526 | #endif | 1820 | #endif |
1821 | |||
1822 | #if defined(CONFIG_AD7150) || defined(CONFIG_AD7150_MODULE) | ||
1823 | { | ||
1824 | I2C_BOARD_INFO("ad7150", 0x48), | ||
1825 | .irq = IRQ_PG5, /* fixme: use real interrupt number */ | ||
1826 | }, | ||
1827 | #endif | ||
1828 | |||
1829 | #if defined(CONFIG_AD7152) || defined(CONFIG_AD7152_MODULE) | ||
1830 | { | ||
1831 | I2C_BOARD_INFO("ad7152", 0x48), | ||
1832 | }, | ||
1833 | #endif | ||
1834 | |||
1835 | #if defined(CONFIG_AD774X) || defined(CONFIG_AD774X_MODULE) | ||
1836 | { | ||
1837 | I2C_BOARD_INFO("ad774x", 0x48), | ||
1838 | }, | ||
1839 | #endif | ||
1840 | |||
1841 | #if defined(CONFIG_AD7414) || defined(CONFIG_AD7414_MODULE) | ||
1842 | { | ||
1843 | I2C_BOARD_INFO("ad7414", 0x9), | ||
1844 | .irq = IRQ_PG5, | ||
1845 | /* | ||
1846 | * platform_data pointer is borrwoed by the driver to | ||
1847 | * store custimer defined IRQ ALART level mode. | ||
1848 | * only IRQF_TRIGGER_HIGH and IRQF_TRIGGER_LOW are valid. | ||
1849 | */ | ||
1850 | .platform_data = (void *)IRQF_TRIGGER_LOW, | ||
1851 | }, | ||
1852 | #endif | ||
1853 | |||
1854 | #if defined(CONFIG_AD7416) || defined(CONFIG_AD7416_MODULE) | ||
1855 | { | ||
1856 | I2C_BOARD_INFO("ad7417", 0xb), | ||
1857 | .irq = IRQ_PG5, | ||
1858 | /* | ||
1859 | * platform_data pointer is borrwoed by the driver to | ||
1860 | * store custimer defined IRQ ALART level mode. | ||
1861 | * only IRQF_TRIGGER_HIGH and IRQF_TRIGGER_LOW are valid. | ||
1862 | */ | ||
1863 | .platform_data = (void *)IRQF_TRIGGER_LOW, | ||
1864 | }, | ||
1865 | #endif | ||
1866 | |||
1527 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) | 1867 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) |
1528 | { | 1868 | { |
1529 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | 1869 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), |
@@ -1595,24 +1935,105 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
1595 | I2C_BOARD_INFO("adau1761", 0x38), | 1935 | I2C_BOARD_INFO("adau1761", 0x38), |
1596 | }, | 1936 | }, |
1597 | #endif | 1937 | #endif |
1938 | #if defined(CONFIG_SND_SOC_ADAU1361) || defined(CONFIG_SND_SOC_ADAU1361_MODULE) | ||
1939 | { | ||
1940 | I2C_BOARD_INFO("adau1361", 0x38), | ||
1941 | }, | ||
1942 | #endif | ||
1598 | #if defined(CONFIG_AD525X_DPOT) || defined(CONFIG_AD525X_DPOT_MODULE) | 1943 | #if defined(CONFIG_AD525X_DPOT) || defined(CONFIG_AD525X_DPOT_MODULE) |
1599 | { | 1944 | { |
1600 | I2C_BOARD_INFO("ad5258", 0x18), | 1945 | I2C_BOARD_INFO("ad5258", 0x18), |
1601 | }, | 1946 | }, |
1602 | #endif | 1947 | #endif |
1948 | #if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) | ||
1949 | { | ||
1950 | I2C_BOARD_INFO("ssm2602", 0x1b), | ||
1951 | }, | ||
1952 | #endif | ||
1953 | #if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) | ||
1954 | { | ||
1955 | I2C_BOARD_INFO("ad5398", 0xC), | ||
1956 | .platform_data = (void *)&ad5398_i2c_platform_data, | ||
1957 | }, | ||
1958 | #endif | ||
1959 | #if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE) | ||
1960 | { | ||
1961 | I2C_BOARD_INFO("adp8860", 0x2A), | ||
1962 | .platform_data = (void *)&adp8860_pdata, | ||
1963 | }, | ||
1964 | #endif | ||
1603 | }; | 1965 | }; |
1604 | 1966 | ||
1605 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 1967 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
1968 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
1969 | static struct resource bfin_sport0_uart_resources[] = { | ||
1970 | { | ||
1971 | .start = SPORT0_TCR1, | ||
1972 | .end = SPORT0_MRCS3+4, | ||
1973 | .flags = IORESOURCE_MEM, | ||
1974 | }, | ||
1975 | { | ||
1976 | .start = IRQ_SPORT0_RX, | ||
1977 | .end = IRQ_SPORT0_RX+1, | ||
1978 | .flags = IORESOURCE_IRQ, | ||
1979 | }, | ||
1980 | { | ||
1981 | .start = IRQ_SPORT0_ERROR, | ||
1982 | .end = IRQ_SPORT0_ERROR, | ||
1983 | .flags = IORESOURCE_IRQ, | ||
1984 | }, | ||
1985 | }; | ||
1986 | |||
1987 | unsigned short bfin_sport0_peripherals[] = { | ||
1988 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
1989 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
1990 | }; | ||
1991 | |||
1606 | static struct platform_device bfin_sport0_uart_device = { | 1992 | static struct platform_device bfin_sport0_uart_device = { |
1607 | .name = "bfin-sport-uart", | 1993 | .name = "bfin-sport-uart", |
1608 | .id = 0, | 1994 | .id = 0, |
1995 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
1996 | .resource = bfin_sport0_uart_resources, | ||
1997 | .dev = { | ||
1998 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
1999 | }, | ||
2000 | }; | ||
2001 | #endif | ||
2002 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
2003 | static struct resource bfin_sport1_uart_resources[] = { | ||
2004 | { | ||
2005 | .start = SPORT1_TCR1, | ||
2006 | .end = SPORT1_MRCS3+4, | ||
2007 | .flags = IORESOURCE_MEM, | ||
2008 | }, | ||
2009 | { | ||
2010 | .start = IRQ_SPORT1_RX, | ||
2011 | .end = IRQ_SPORT1_RX+1, | ||
2012 | .flags = IORESOURCE_IRQ, | ||
2013 | }, | ||
2014 | { | ||
2015 | .start = IRQ_SPORT1_ERROR, | ||
2016 | .end = IRQ_SPORT1_ERROR, | ||
2017 | .flags = IORESOURCE_IRQ, | ||
2018 | }, | ||
2019 | }; | ||
2020 | |||
2021 | unsigned short bfin_sport1_peripherals[] = { | ||
2022 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
2023 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
1609 | }; | 2024 | }; |
1610 | 2025 | ||
1611 | static struct platform_device bfin_sport1_uart_device = { | 2026 | static struct platform_device bfin_sport1_uart_device = { |
1612 | .name = "bfin-sport-uart", | 2027 | .name = "bfin-sport-uart", |
1613 | .id = 1, | 2028 | .id = 1, |
2029 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
2030 | .resource = bfin_sport1_uart_resources, | ||
2031 | .dev = { | ||
2032 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
2033 | }, | ||
1614 | }; | 2034 | }; |
1615 | #endif | 2035 | #endif |
2036 | #endif | ||
1616 | 2037 | ||
1617 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 2038 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
1618 | #define CF_IDE_NAND_CARD_USE_HDD_INTERFACE | 2039 | #define CF_IDE_NAND_CARD_USE_HDD_INTERFACE |
@@ -1701,13 +2122,121 @@ static struct platform_device bfin_dpmc = { | |||
1701 | }, | 2122 | }, |
1702 | }; | 2123 | }; |
1703 | 2124 | ||
2125 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | ||
2126 | static struct platform_device bfin_i2s = { | ||
2127 | .name = "bfin-i2s", | ||
2128 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | ||
2129 | /* TODO: add platform data here */ | ||
2130 | }; | ||
2131 | #endif | ||
2132 | |||
1704 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | 2133 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) |
1705 | static struct platform_device bfin_tdm = { | 2134 | static struct platform_device bfin_tdm = { |
1706 | .name = "bfin-tdm", | 2135 | .name = "bfin-tdm", |
2136 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | ||
1707 | /* TODO: add platform data here */ | 2137 | /* TODO: add platform data here */ |
1708 | }; | 2138 | }; |
1709 | #endif | 2139 | #endif |
1710 | 2140 | ||
2141 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | ||
2142 | static struct platform_device bfin_ac97 = { | ||
2143 | .name = "bfin-ac97", | ||
2144 | .id = CONFIG_SND_BF5XX_SPORT_NUM, | ||
2145 | /* TODO: add platform data here */ | ||
2146 | }; | ||
2147 | #endif | ||
2148 | |||
2149 | #if defined(CONFIG_REGULATOR_ADP_SWITCH) || defined(CONFIG_REGULATOR_ADP_SWITCH_MODULE) | ||
2150 | #define REGULATOR_ADP122 "adp122" | ||
2151 | #define REGULATOR_ADP150 "adp150" | ||
2152 | |||
2153 | static struct regulator_consumer_supply adp122_consumers = { | ||
2154 | .supply = REGULATOR_ADP122, | ||
2155 | }; | ||
2156 | |||
2157 | static struct regulator_consumer_supply adp150_consumers = { | ||
2158 | .supply = REGULATOR_ADP150, | ||
2159 | }; | ||
2160 | |||
2161 | static struct regulator_init_data adp_switch_regulator_data[] = { | ||
2162 | { | ||
2163 | .constraints = { | ||
2164 | .name = REGULATOR_ADP122, | ||
2165 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
2166 | .min_uA = 0, | ||
2167 | .max_uA = 300000, | ||
2168 | }, | ||
2169 | .num_consumer_supplies = 1, /* only 1 */ | ||
2170 | .consumer_supplies = &adp122_consumers, | ||
2171 | .driver_data = (void *)GPIO_PF2, /* gpio port only */ | ||
2172 | }, | ||
2173 | { | ||
2174 | .constraints = { | ||
2175 | .name = REGULATOR_ADP150, | ||
2176 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
2177 | .min_uA = 0, | ||
2178 | .max_uA = 150000, | ||
2179 | }, | ||
2180 | .num_consumer_supplies = 1, /* only 1 */ | ||
2181 | .consumer_supplies = &adp150_consumers, | ||
2182 | .driver_data = (void *)GPIO_PF3, /* gpio port only */ | ||
2183 | }, | ||
2184 | }; | ||
2185 | |||
2186 | static struct adp_switch_platform_data adp_switch_pdata = { | ||
2187 | .regulator_num = ARRAY_SIZE(adp_switch_regulator_data), | ||
2188 | .regulator_data = adp_switch_regulator_data, | ||
2189 | }; | ||
2190 | |||
2191 | static struct platform_device adp_switch_device = { | ||
2192 | .name = "adp_switch", | ||
2193 | .id = 0, | ||
2194 | .dev = { | ||
2195 | .platform_data = &adp_switch_pdata, | ||
2196 | }, | ||
2197 | }; | ||
2198 | |||
2199 | #if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ | ||
2200 | defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE) | ||
2201 | static struct regulator_bulk_data adp122_bulk_data = { | ||
2202 | .supply = REGULATOR_ADP122, | ||
2203 | }; | ||
2204 | |||
2205 | static struct regulator_userspace_consumer_data adp122_userspace_comsumer_data = { | ||
2206 | .name = REGULATOR_ADP122, | ||
2207 | .num_supplies = 1, | ||
2208 | .supplies = &adp122_bulk_data, | ||
2209 | }; | ||
2210 | |||
2211 | static struct platform_device adp122_userspace_consumer_device = { | ||
2212 | .name = "reg-userspace-consumer", | ||
2213 | .id = 0, | ||
2214 | .dev = { | ||
2215 | .platform_data = &adp122_userspace_comsumer_data, | ||
2216 | }, | ||
2217 | }; | ||
2218 | |||
2219 | static struct regulator_bulk_data adp150_bulk_data = { | ||
2220 | .supply = REGULATOR_ADP150, | ||
2221 | }; | ||
2222 | |||
2223 | static struct regulator_userspace_consumer_data adp150_userspace_comsumer_data = { | ||
2224 | .name = REGULATOR_ADP150, | ||
2225 | .num_supplies = 1, | ||
2226 | .supplies = &adp150_bulk_data, | ||
2227 | }; | ||
2228 | |||
2229 | static struct platform_device adp150_userspace_consumer_device = { | ||
2230 | .name = "reg-userspace-consumer", | ||
2231 | .id = 1, | ||
2232 | .dev = { | ||
2233 | .platform_data = &adp150_userspace_comsumer_data, | ||
2234 | }, | ||
2235 | }; | ||
2236 | #endif | ||
2237 | #endif | ||
2238 | |||
2239 | |||
1711 | static struct platform_device *stamp_devices[] __initdata = { | 2240 | static struct platform_device *stamp_devices[] __initdata = { |
1712 | 2241 | ||
1713 | &bfin_dpmc, | 2242 | &bfin_dpmc, |
@@ -1771,7 +2300,12 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
1771 | #endif | 2300 | #endif |
1772 | 2301 | ||
1773 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 2302 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
1774 | &bfin_uart_device, | 2303 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
2304 | &bfin_uart0_device, | ||
2305 | #endif | ||
2306 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
2307 | &bfin_uart1_device, | ||
2308 | #endif | ||
1775 | #endif | 2309 | #endif |
1776 | 2310 | ||
1777 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 2311 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
@@ -1788,9 +2322,13 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
1788 | #endif | 2322 | #endif |
1789 | 2323 | ||
1790 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 2324 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
2325 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
1791 | &bfin_sport0_uart_device, | 2326 | &bfin_sport0_uart_device, |
2327 | #endif | ||
2328 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
1792 | &bfin_sport1_uart_device, | 2329 | &bfin_sport1_uart_device, |
1793 | #endif | 2330 | #endif |
2331 | #endif | ||
1794 | 2332 | ||
1795 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 2333 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
1796 | &bfin_pata_device, | 2334 | &bfin_pata_device, |
@@ -1808,18 +2346,46 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
1808 | &stamp_flash_device, | 2346 | &stamp_flash_device, |
1809 | #endif | 2347 | #endif |
1810 | 2348 | ||
2349 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | ||
2350 | &bfin_i2s, | ||
2351 | #endif | ||
2352 | |||
1811 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | 2353 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) |
1812 | &bfin_tdm, | 2354 | &bfin_tdm, |
1813 | #endif | 2355 | #endif |
2356 | |||
2357 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | ||
2358 | &bfin_ac97, | ||
2359 | #endif | ||
2360 | #if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) | ||
2361 | #if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \ | ||
2362 | defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE) | ||
2363 | &ad5398_virt_consumer_device, | ||
2364 | #endif | ||
2365 | #if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ | ||
2366 | defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE) | ||
2367 | &ad5398_userspace_consumer_device, | ||
2368 | #endif | ||
2369 | #endif | ||
2370 | |||
2371 | #if defined(CONFIG_REGULATOR_ADP_SWITCH) || defined(CONFIG_REGULATOR_ADP_SWITCH_MODULE) | ||
2372 | &adp_switch_device, | ||
2373 | #if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ | ||
2374 | defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE) | ||
2375 | &adp122_userspace_consumer_device, | ||
2376 | &adp150_userspace_consumer_device, | ||
2377 | #endif | ||
2378 | #endif | ||
1814 | }; | 2379 | }; |
1815 | 2380 | ||
1816 | static int __init stamp_init(void) | 2381 | static int __init stamp_init(void) |
1817 | { | 2382 | { |
1818 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 2383 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
1819 | i2c_register_board_info(0, bfin_i2c_board_info, | ||
1820 | ARRAY_SIZE(bfin_i2c_board_info)); | ||
1821 | bfin_plat_nand_init(); | 2384 | bfin_plat_nand_init(); |
2385 | adf702x_mac_init(); | ||
1822 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 2386 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
2387 | i2c_register_board_info(0, bfin_i2c_board_info, | ||
2388 | ARRAY_SIZE(bfin_i2c_board_info)); | ||
1823 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 2389 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
1824 | 2390 | ||
1825 | return 0; | 2391 | return 0; |
@@ -1827,6 +2393,34 @@ static int __init stamp_init(void) | |||
1827 | 2393 | ||
1828 | arch_initcall(stamp_init); | 2394 | arch_initcall(stamp_init); |
1829 | 2395 | ||
2396 | |||
2397 | static struct platform_device *stamp_early_devices[] __initdata = { | ||
2398 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
2399 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
2400 | &bfin_uart0_device, | ||
2401 | #endif | ||
2402 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
2403 | &bfin_uart1_device, | ||
2404 | #endif | ||
2405 | #endif | ||
2406 | |||
2407 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
2408 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
2409 | &bfin_sport0_uart_device, | ||
2410 | #endif | ||
2411 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
2412 | &bfin_sport1_uart_device, | ||
2413 | #endif | ||
2414 | #endif | ||
2415 | }; | ||
2416 | |||
2417 | void __init native_machine_early_platform_add_devices(void) | ||
2418 | { | ||
2419 | printk(KERN_INFO "register early platform devices\n"); | ||
2420 | early_platform_add_devices(stamp_early_devices, | ||
2421 | ARRAY_SIZE(stamp_early_devices)); | ||
2422 | } | ||
2423 | |||
1830 | void native_machine_restart(char *cmd) | 2424 | void native_machine_restart(char *cmd) |
1831 | { | 2425 | { |
1832 | /* workaround reboot hang when booting from SPI */ | 2426 | /* workaround reboot hang when booting from SPI */ |
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c index 57163b65a4f5..4f0a2e72ce4c 100644 --- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c +++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c | |||
@@ -74,7 +74,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = { | |||
74 | }; | 74 | }; |
75 | #endif | 75 | #endif |
76 | 76 | ||
77 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 77 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
78 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | 78 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
79 | .enable_dma = 0, | 79 | .enable_dma = 0, |
80 | .bits_per_word = 16, | 80 | .bits_per_word = 16, |
@@ -113,7 +113,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
113 | }, | 113 | }, |
114 | #endif | 114 | #endif |
115 | 115 | ||
116 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 116 | #if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) |
117 | { | 117 | { |
118 | .modalias = "ad1836", | 118 | .modalias = "ad1836", |
119 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 119 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
@@ -327,25 +327,93 @@ static struct platform_device cm_flash_device = { | |||
327 | #endif | 327 | #endif |
328 | 328 | ||
329 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 329 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
330 | static struct resource bfin_uart_resources[] = { | 330 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
331 | static struct resource bfin_uart0_resources[] = { | ||
331 | { | 332 | { |
332 | .start = 0xFFC00400, | 333 | .start = UART0_THR, |
333 | .end = 0xFFC004FF, | 334 | .end = UART0_GCTL+2, |
334 | .flags = IORESOURCE_MEM, | 335 | .flags = IORESOURCE_MEM, |
335 | }, { | 336 | }, |
336 | .start = 0xFFC02000, | 337 | { |
337 | .end = 0xFFC020FF, | 338 | .start = IRQ_UART0_RX, |
339 | .end = IRQ_UART0_RX+1, | ||
340 | .flags = IORESOURCE_IRQ, | ||
341 | }, | ||
342 | { | ||
343 | .start = IRQ_UART0_ERROR, | ||
344 | .end = IRQ_UART0_ERROR, | ||
345 | .flags = IORESOURCE_IRQ, | ||
346 | }, | ||
347 | { | ||
348 | .start = CH_UART0_TX, | ||
349 | .end = CH_UART0_TX, | ||
350 | .flags = IORESOURCE_DMA, | ||
351 | }, | ||
352 | { | ||
353 | .start = CH_UART0_RX, | ||
354 | .end = CH_UART0_RX, | ||
355 | .flags = IORESOURCE_DMA, | ||
356 | }, | ||
357 | }; | ||
358 | |||
359 | unsigned short bfin_uart0_peripherals[] = { | ||
360 | P_UART0_TX, P_UART0_RX, 0 | ||
361 | }; | ||
362 | |||
363 | static struct platform_device bfin_uart0_device = { | ||
364 | .name = "bfin-uart", | ||
365 | .id = 0, | ||
366 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), | ||
367 | .resource = bfin_uart0_resources, | ||
368 | .dev = { | ||
369 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
370 | }, | ||
371 | }; | ||
372 | #endif | ||
373 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
374 | static struct resource bfin_uart1_resources[] = { | ||
375 | { | ||
376 | .start = UART1_THR, | ||
377 | .end = UART1_GCTL+2, | ||
338 | .flags = IORESOURCE_MEM, | 378 | .flags = IORESOURCE_MEM, |
339 | }, | 379 | }, |
380 | { | ||
381 | .start = IRQ_UART1_RX, | ||
382 | .end = IRQ_UART1_RX+1, | ||
383 | .flags = IORESOURCE_IRQ, | ||
384 | }, | ||
385 | { | ||
386 | .start = IRQ_UART1_ERROR, | ||
387 | .end = IRQ_UART1_ERROR, | ||
388 | .flags = IORESOURCE_IRQ, | ||
389 | }, | ||
390 | { | ||
391 | .start = CH_UART1_TX, | ||
392 | .end = CH_UART1_TX, | ||
393 | .flags = IORESOURCE_DMA, | ||
394 | }, | ||
395 | { | ||
396 | .start = CH_UART1_RX, | ||
397 | .end = CH_UART1_RX, | ||
398 | .flags = IORESOURCE_DMA, | ||
399 | }, | ||
400 | }; | ||
401 | |||
402 | unsigned short bfin_uart1_peripherals[] = { | ||
403 | P_UART1_TX, P_UART1_RX, 0 | ||
340 | }; | 404 | }; |
341 | 405 | ||
342 | static struct platform_device bfin_uart_device = { | 406 | static struct platform_device bfin_uart1_device = { |
343 | .name = "bfin-uart", | 407 | .name = "bfin-uart", |
344 | .id = 1, | 408 | .id = 1, |
345 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 409 | .num_resources = ARRAY_SIZE(bfin_uart1_resources), |
346 | .resource = bfin_uart_resources, | 410 | .resource = bfin_uart1_resources, |
411 | .dev = { | ||
412 | .platform_data = &bfin_uart1_peripherals, /* Passed to driver */ | ||
413 | }, | ||
347 | }; | 414 | }; |
348 | #endif | 415 | #endif |
416 | #endif | ||
349 | 417 | ||
350 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 418 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
351 | #ifdef CONFIG_BFIN_SIR0 | 419 | #ifdef CONFIG_BFIN_SIR0 |
@@ -425,16 +493,75 @@ static struct platform_device i2c_bfin_twi_device = { | |||
425 | #endif | 493 | #endif |
426 | 494 | ||
427 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 495 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
496 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
497 | static struct resource bfin_sport0_uart_resources[] = { | ||
498 | { | ||
499 | .start = SPORT0_TCR1, | ||
500 | .end = SPORT0_MRCS3+4, | ||
501 | .flags = IORESOURCE_MEM, | ||
502 | }, | ||
503 | { | ||
504 | .start = IRQ_SPORT0_RX, | ||
505 | .end = IRQ_SPORT0_RX+1, | ||
506 | .flags = IORESOURCE_IRQ, | ||
507 | }, | ||
508 | { | ||
509 | .start = IRQ_SPORT0_ERROR, | ||
510 | .end = IRQ_SPORT0_ERROR, | ||
511 | .flags = IORESOURCE_IRQ, | ||
512 | }, | ||
513 | }; | ||
514 | |||
515 | unsigned short bfin_sport0_peripherals[] = { | ||
516 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
517 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
518 | }; | ||
519 | |||
428 | static struct platform_device bfin_sport0_uart_device = { | 520 | static struct platform_device bfin_sport0_uart_device = { |
429 | .name = "bfin-sport-uart", | 521 | .name = "bfin-sport-uart", |
430 | .id = 0, | 522 | .id = 0, |
523 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
524 | .resource = bfin_sport0_uart_resources, | ||
525 | .dev = { | ||
526 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
527 | }, | ||
528 | }; | ||
529 | #endif | ||
530 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
531 | static struct resource bfin_sport1_uart_resources[] = { | ||
532 | { | ||
533 | .start = SPORT1_TCR1, | ||
534 | .end = SPORT1_MRCS3+4, | ||
535 | .flags = IORESOURCE_MEM, | ||
536 | }, | ||
537 | { | ||
538 | .start = IRQ_SPORT1_RX, | ||
539 | .end = IRQ_SPORT1_RX+1, | ||
540 | .flags = IORESOURCE_IRQ, | ||
541 | }, | ||
542 | { | ||
543 | .start = IRQ_SPORT1_ERROR, | ||
544 | .end = IRQ_SPORT1_ERROR, | ||
545 | .flags = IORESOURCE_IRQ, | ||
546 | }, | ||
547 | }; | ||
548 | |||
549 | unsigned short bfin_sport1_peripherals[] = { | ||
550 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
551 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
431 | }; | 552 | }; |
432 | 553 | ||
433 | static struct platform_device bfin_sport1_uart_device = { | 554 | static struct platform_device bfin_sport1_uart_device = { |
434 | .name = "bfin-sport-uart", | 555 | .name = "bfin-sport-uart", |
435 | .id = 1, | 556 | .id = 1, |
557 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
558 | .resource = bfin_sport1_uart_resources, | ||
559 | .dev = { | ||
560 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
561 | }, | ||
436 | }; | 562 | }; |
437 | #endif | 563 | #endif |
564 | #endif | ||
438 | 565 | ||
439 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 566 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
440 | static struct platform_device bfin_mii_bus = { | 567 | static struct platform_device bfin_mii_bus = { |
@@ -524,7 +651,12 @@ static struct platform_device *cm_bf537_devices[] __initdata = { | |||
524 | #endif | 651 | #endif |
525 | 652 | ||
526 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 653 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
527 | &bfin_uart_device, | 654 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
655 | &bfin_uart0_device, | ||
656 | #endif | ||
657 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
658 | &bfin_uart1_device, | ||
659 | #endif | ||
528 | #endif | 660 | #endif |
529 | 661 | ||
530 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 662 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
@@ -541,9 +673,13 @@ static struct platform_device *cm_bf537_devices[] __initdata = { | |||
541 | #endif | 673 | #endif |
542 | 674 | ||
543 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 675 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
676 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
544 | &bfin_sport0_uart_device, | 677 | &bfin_sport0_uart_device, |
678 | #endif | ||
679 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
545 | &bfin_sport1_uart_device, | 680 | &bfin_sport1_uart_device, |
546 | #endif | 681 | #endif |
682 | #endif | ||
547 | 683 | ||
548 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 684 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
549 | &isp1362_hcd_device, | 685 | &isp1362_hcd_device, |
@@ -591,6 +727,33 @@ static int __init tcm_bf537_init(void) | |||
591 | 727 | ||
592 | arch_initcall(tcm_bf537_init); | 728 | arch_initcall(tcm_bf537_init); |
593 | 729 | ||
730 | static struct platform_device *cm_bf537_early_devices[] __initdata = { | ||
731 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
732 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
733 | &bfin_uart0_device, | ||
734 | #endif | ||
735 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
736 | &bfin_uart1_device, | ||
737 | #endif | ||
738 | #endif | ||
739 | |||
740 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
741 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
742 | &bfin_sport0_uart_device, | ||
743 | #endif | ||
744 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
745 | &bfin_sport1_uart_device, | ||
746 | #endif | ||
747 | #endif | ||
748 | }; | ||
749 | |||
750 | void __init native_machine_early_platform_add_devices(void) | ||
751 | { | ||
752 | printk(KERN_INFO "register early platform devices\n"); | ||
753 | early_platform_add_devices(cm_bf537_early_devices, | ||
754 | ARRAY_SIZE(cm_bf537_early_devices)); | ||
755 | } | ||
756 | |||
594 | void bfin_get_ether_addr(char *addr) | 757 | void bfin_get_ether_addr(char *addr) |
595 | { | 758 | { |
596 | random_ether_addr(addr); | 759 | random_ether_addr(addr); |