diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-18 20:02:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-18 20:02:35 -0400 |
commit | 39710479303fd3affb3e204e9a7a75cc676977b5 (patch) | |
tree | 3fff5fb412df77170883f02fc54bdbee9aba4f22 /arch/blackfin/mach-bf518/boards/ezbrd.c | |
parent | 9d20593a722c2dab7a5ab74f5d8c9b604aca52f9 (diff) | |
parent | eb63e5d15758d2b1e607ddd5fb861b5596629380 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (96 commits)
Blackfin: stop cleaning include/asm/asm-offsets.h
Blackfin: scale calibration when cpu freq changes
Blackfin: eat spurious space in asm/dpmc.h
Blackfin: fix anomaly 283 handling with exact hardware error
Blackfin: bf537-stamp: add example ADXL346 orientation resources
Blackfin: bf537-stamp: add example AD2S1210 IIO resources
Blackfin: don't support keypad wakeup from hibernate
Blackfin: bf537-stamp: add example AD7416 IIO resources
Blackfin: bf537-stamp: add example ADP8860 backlight/led resources
Blackfin: bf537-stamp: add example AD7414 temp sensor resources
Blackfin: rename AD1836 to AD183X in board files
Blackfin: bf537-stamp: add example AD2S120x resources
Blackfin: add support for the on-chip MAC status interrupts
Blackfin: asm/page.h: pull in asm-generic headers
Blackfin: mark gpio lib functions static
Blackfin: bf537-stamp: add example ADAU1361 resources
Blackfin: GPIO: implement to_irq handler
Blackfin: bf537-stamp: add example ADP122/ADP150 power regulator resources
Blackfin: bf537-stamp: add example AD2S90 resources
Blackfin: bf537-stamp: add example AD5398 power regulator resources
...
Diffstat (limited to 'arch/blackfin/mach-bf518/boards/ezbrd.c')
-rw-r--r-- | arch/blackfin/mach-bf518/boards/ezbrd.c | 178 |
1 files changed, 168 insertions, 10 deletions
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c index 01975c017116..44d6d5299022 100644 --- a/arch/blackfin/mach-bf518/boards/ezbrd.c +++ b/arch/blackfin/mach-bf518/boards/ezbrd.c | |||
@@ -382,30 +382,93 @@ static struct platform_device bfin_spi1_device = { | |||
382 | #endif /* spi master and devices */ | 382 | #endif /* spi master and devices */ |
383 | 383 | ||
384 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 384 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
385 | static struct resource bfin_uart_resources[] = { | ||
386 | #ifdef CONFIG_SERIAL_BFIN_UART0 | 385 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
386 | static struct resource bfin_uart0_resources[] = { | ||
387 | { | 387 | { |
388 | .start = 0xFFC00400, | 388 | .start = UART0_THR, |
389 | .end = 0xFFC004FF, | 389 | .end = UART0_GCTL+2, |
390 | .flags = IORESOURCE_MEM, | 390 | .flags = IORESOURCE_MEM, |
391 | }, | 391 | }, |
392 | { | ||
393 | .start = IRQ_UART0_RX, | ||
394 | .end = IRQ_UART0_RX+1, | ||
395 | .flags = IORESOURCE_IRQ, | ||
396 | }, | ||
397 | { | ||
398 | .start = IRQ_UART0_ERROR, | ||
399 | .end = IRQ_UART0_ERROR, | ||
400 | .flags = IORESOURCE_IRQ, | ||
401 | }, | ||
402 | { | ||
403 | .start = CH_UART0_TX, | ||
404 | .end = CH_UART0_TX, | ||
405 | .flags = IORESOURCE_DMA, | ||
406 | }, | ||
407 | { | ||
408 | .start = CH_UART0_RX, | ||
409 | .end = CH_UART0_RX, | ||
410 | .flags = IORESOURCE_DMA, | ||
411 | }, | ||
412 | }; | ||
413 | |||
414 | unsigned short bfin_uart0_peripherals[] = { | ||
415 | P_UART0_TX, P_UART0_RX, 0 | ||
416 | }; | ||
417 | |||
418 | static struct platform_device bfin_uart0_device = { | ||
419 | .name = "bfin-uart", | ||
420 | .id = 0, | ||
421 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), | ||
422 | .resource = bfin_uart0_resources, | ||
423 | .dev = { | ||
424 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
425 | }, | ||
426 | }; | ||
392 | #endif | 427 | #endif |
393 | #ifdef CONFIG_SERIAL_BFIN_UART1 | 428 | #ifdef CONFIG_SERIAL_BFIN_UART1 |
429 | static struct resource bfin_uart1_resources[] = { | ||
394 | { | 430 | { |
395 | .start = 0xFFC02000, | 431 | .start = UART1_THR, |
396 | .end = 0xFFC020FF, | 432 | .end = UART1_GCTL+2, |
397 | .flags = IORESOURCE_MEM, | 433 | .flags = IORESOURCE_MEM, |
398 | }, | 434 | }, |
399 | #endif | 435 | { |
436 | .start = IRQ_UART1_RX, | ||
437 | .end = IRQ_UART1_RX+1, | ||
438 | .flags = IORESOURCE_IRQ, | ||
439 | }, | ||
440 | { | ||
441 | .start = IRQ_UART1_ERROR, | ||
442 | .end = IRQ_UART1_ERROR, | ||
443 | .flags = IORESOURCE_IRQ, | ||
444 | }, | ||
445 | { | ||
446 | .start = CH_UART1_TX, | ||
447 | .end = CH_UART1_TX, | ||
448 | .flags = IORESOURCE_DMA, | ||
449 | }, | ||
450 | { | ||
451 | .start = CH_UART1_RX, | ||
452 | .end = CH_UART1_RX, | ||
453 | .flags = IORESOURCE_DMA, | ||
454 | }, | ||
455 | }; | ||
456 | |||
457 | unsigned short bfin_uart1_peripherals[] = { | ||
458 | P_UART1_TX, P_UART1_RX, 0 | ||
400 | }; | 459 | }; |
401 | 460 | ||
402 | static struct platform_device bfin_uart_device = { | 461 | static struct platform_device bfin_uart1_device = { |
403 | .name = "bfin-uart", | 462 | .name = "bfin-uart", |
404 | .id = 1, | 463 | .id = 1, |
405 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 464 | .num_resources = ARRAY_SIZE(bfin_uart1_resources), |
406 | .resource = bfin_uart_resources, | 465 | .resource = bfin_uart1_resources, |
466 | .dev = { | ||
467 | .platform_data = &bfin_uart1_peripherals, /* Passed to driver */ | ||
468 | }, | ||
407 | }; | 469 | }; |
408 | #endif | 470 | #endif |
471 | #endif | ||
409 | 472 | ||
410 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 473 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
411 | #ifdef CONFIG_BFIN_SIR0 | 474 | #ifdef CONFIG_BFIN_SIR0 |
@@ -499,16 +562,75 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
499 | }; | 562 | }; |
500 | 563 | ||
501 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 564 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
565 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
566 | static struct resource bfin_sport0_uart_resources[] = { | ||
567 | { | ||
568 | .start = SPORT0_TCR1, | ||
569 | .end = SPORT0_MRCS3+4, | ||
570 | .flags = IORESOURCE_MEM, | ||
571 | }, | ||
572 | { | ||
573 | .start = IRQ_SPORT0_RX, | ||
574 | .end = IRQ_SPORT0_RX+1, | ||
575 | .flags = IORESOURCE_IRQ, | ||
576 | }, | ||
577 | { | ||
578 | .start = IRQ_SPORT0_ERROR, | ||
579 | .end = IRQ_SPORT0_ERROR, | ||
580 | .flags = IORESOURCE_IRQ, | ||
581 | }, | ||
582 | }; | ||
583 | |||
584 | unsigned short bfin_sport0_peripherals[] = { | ||
585 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
586 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
587 | }; | ||
588 | |||
502 | static struct platform_device bfin_sport0_uart_device = { | 589 | static struct platform_device bfin_sport0_uart_device = { |
503 | .name = "bfin-sport-uart", | 590 | .name = "bfin-sport-uart", |
504 | .id = 0, | 591 | .id = 0, |
592 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
593 | .resource = bfin_sport0_uart_resources, | ||
594 | .dev = { | ||
595 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
596 | }, | ||
597 | }; | ||
598 | #endif | ||
599 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
600 | static struct resource bfin_sport1_uart_resources[] = { | ||
601 | { | ||
602 | .start = SPORT1_TCR1, | ||
603 | .end = SPORT1_MRCS3+4, | ||
604 | .flags = IORESOURCE_MEM, | ||
605 | }, | ||
606 | { | ||
607 | .start = IRQ_SPORT1_RX, | ||
608 | .end = IRQ_SPORT1_RX+1, | ||
609 | .flags = IORESOURCE_IRQ, | ||
610 | }, | ||
611 | { | ||
612 | .start = IRQ_SPORT1_ERROR, | ||
613 | .end = IRQ_SPORT1_ERROR, | ||
614 | .flags = IORESOURCE_IRQ, | ||
615 | }, | ||
616 | }; | ||
617 | |||
618 | unsigned short bfin_sport1_peripherals[] = { | ||
619 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
620 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
505 | }; | 621 | }; |
506 | 622 | ||
507 | static struct platform_device bfin_sport1_uart_device = { | 623 | static struct platform_device bfin_sport1_uart_device = { |
508 | .name = "bfin-sport-uart", | 624 | .name = "bfin-sport-uart", |
509 | .id = 1, | 625 | .id = 1, |
626 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
627 | .resource = bfin_sport1_uart_resources, | ||
628 | .dev = { | ||
629 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
630 | }, | ||
510 | }; | 631 | }; |
511 | #endif | 632 | #endif |
633 | #endif | ||
512 | 634 | ||
513 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 635 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
514 | #include <linux/input.h> | 636 | #include <linux/input.h> |
@@ -593,7 +715,12 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
593 | #endif | 715 | #endif |
594 | 716 | ||
595 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 717 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
596 | &bfin_uart_device, | 718 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
719 | &bfin_uart0_device, | ||
720 | #endif | ||
721 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
722 | &bfin_uart1_device, | ||
723 | #endif | ||
597 | #endif | 724 | #endif |
598 | 725 | ||
599 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 726 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
@@ -610,9 +737,13 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
610 | #endif | 737 | #endif |
611 | 738 | ||
612 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 739 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
740 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
613 | &bfin_sport0_uart_device, | 741 | &bfin_sport0_uart_device, |
742 | #endif | ||
743 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
614 | &bfin_sport1_uart_device, | 744 | &bfin_sport1_uart_device, |
615 | #endif | 745 | #endif |
746 | #endif | ||
616 | 747 | ||
617 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 748 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
618 | &bfin_device_gpiokeys, | 749 | &bfin_device_gpiokeys, |
@@ -644,6 +775,33 @@ static int __init ezbrd_init(void) | |||
644 | 775 | ||
645 | arch_initcall(ezbrd_init); | 776 | arch_initcall(ezbrd_init); |
646 | 777 | ||
778 | static struct platform_device *ezbrd_early_devices[] __initdata = { | ||
779 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
780 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
781 | &bfin_uart0_device, | ||
782 | #endif | ||
783 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
784 | &bfin_uart1_device, | ||
785 | #endif | ||
786 | #endif | ||
787 | |||
788 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
789 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
790 | &bfin_sport0_uart_device, | ||
791 | #endif | ||
792 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
793 | &bfin_sport1_uart_device, | ||
794 | #endif | ||
795 | #endif | ||
796 | }; | ||
797 | |||
798 | void __init native_machine_early_platform_add_devices(void) | ||
799 | { | ||
800 | printk(KERN_INFO "register early platform devices\n"); | ||
801 | early_platform_add_devices(ezbrd_early_devices, | ||
802 | ARRAY_SIZE(ezbrd_early_devices)); | ||
803 | } | ||
804 | |||
647 | void native_machine_restart(char *cmd) | 805 | void native_machine_restart(char *cmd) |
648 | { | 806 | { |
649 | /* workaround reboot hang when booting from SPI */ | 807 | /* workaround reboot hang when booting from SPI */ |