diff options
207 files changed, 1477 insertions, 1603 deletions
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index 6fb82ac3bef0..53ce6a39083c 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -98,3 +98,4 @@ | |||
98 | 97 -> LifeView FlyDVB-S /Acorp TV134DS [5168:0300,4e42:0300] | 98 | 97 -> LifeView FlyDVB-S /Acorp TV134DS [5168:0300,4e42:0300] |
99 | 98 -> Proteus Pro 2309 [0919:2003] | 99 | 98 -> Proteus Pro 2309 [0919:2003] |
100 | 99 -> AVerMedia TV Hybrid A16AR [1461:2c00] | 100 | 99 -> AVerMedia TV Hybrid A16AR [1461:2c00] |
101 | 100 -> Asus Europa2 OEM [1043:4860] | ||
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index fd4a8fa0c93d..a94e6d93e2ee 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/a.out.h> | 21 | #include <linux/a.out.h> |
22 | #include <linux/screen_info.h> | 22 | #include <linux/screen_info.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/config.h> /* CONFIG_ALPHA_LCA etc */ | ||
25 | #include <linux/mc146818rtc.h> | 24 | #include <linux/mc146818rtc.h> |
26 | #include <linux/console.h> | 25 | #include <linux/console.h> |
27 | #include <linux/cpu.h> | 26 | #include <linux/cpu.h> |
diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S index 4342cea1a926..f6cfe8ce3f96 100644 --- a/arch/alpha/kernel/systbls.S +++ b/arch/alpha/kernel/systbls.S | |||
@@ -4,7 +4,6 @@ | |||
4 | * The system call table. | 4 | * The system call table. |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/config.h> /* CONFIG_OSF4_COMPAT */ | ||
8 | #include <asm/unistd.h> | 7 | #include <asm/unistd.h> |
9 | 8 | ||
10 | .data | 9 | .data |
diff --git a/arch/arm/configs/at91rm9200dk_defconfig b/arch/arm/configs/at91rm9200dk_defconfig index 4f3d8d37741e..c82e4667f45e 100644 --- a/arch/arm/configs/at91rm9200dk_defconfig +++ b/arch/arm/configs/at91rm9200dk_defconfig | |||
@@ -553,9 +553,9 @@ CONFIG_HW_CONSOLE=y | |||
553 | # | 553 | # |
554 | # Non-8250 serial port support | 554 | # Non-8250 serial port support |
555 | # | 555 | # |
556 | CONFIG_SERIAL_AT91=y | 556 | CONFIG_SERIAL_ATMEL=y |
557 | CONFIG_SERIAL_AT91_CONSOLE=y | 557 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
558 | # CONFIG_SERIAL_AT91_TTYAT is not set | 558 | # CONFIG_SERIAL_ATMEL_TTYAT is not set |
559 | CONFIG_SERIAL_CORE=y | 559 | CONFIG_SERIAL_CORE=y |
560 | CONFIG_SERIAL_CORE_CONSOLE=y | 560 | CONFIG_SERIAL_CORE_CONSOLE=y |
561 | CONFIG_UNIX98_PTYS=y | 561 | CONFIG_UNIX98_PTYS=y |
diff --git a/arch/arm/configs/at91rm9200ek_defconfig b/arch/arm/configs/at91rm9200ek_defconfig index 08b5dc38876f..b983fc59aa42 100644 --- a/arch/arm/configs/at91rm9200ek_defconfig +++ b/arch/arm/configs/at91rm9200ek_defconfig | |||
@@ -534,9 +534,9 @@ CONFIG_HW_CONSOLE=y | |||
534 | # | 534 | # |
535 | # Non-8250 serial port support | 535 | # Non-8250 serial port support |
536 | # | 536 | # |
537 | CONFIG_SERIAL_AT91=y | 537 | CONFIG_SERIAL_ATMEL=y |
538 | CONFIG_SERIAL_AT91_CONSOLE=y | 538 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
539 | # CONFIG_SERIAL_AT91_TTYAT is not set | 539 | # CONFIG_SERIAL_ATMEL_TTYAT is not set |
540 | CONFIG_SERIAL_CORE=y | 540 | CONFIG_SERIAL_CORE=y |
541 | CONFIG_SERIAL_CORE_CONSOLE=y | 541 | CONFIG_SERIAL_CORE_CONSOLE=y |
542 | CONFIG_UNIX98_PTYS=y | 542 | CONFIG_UNIX98_PTYS=y |
diff --git a/arch/arm/configs/ateb9200_defconfig b/arch/arm/configs/ateb9200_defconfig index bee7813d040e..15e6b0bbbde8 100644 --- a/arch/arm/configs/ateb9200_defconfig +++ b/arch/arm/configs/ateb9200_defconfig | |||
@@ -656,9 +656,9 @@ CONFIG_HW_CONSOLE=y | |||
656 | # | 656 | # |
657 | # Non-8250 serial port support | 657 | # Non-8250 serial port support |
658 | # | 658 | # |
659 | CONFIG_SERIAL_AT91=y | 659 | CONFIG_SERIAL_ATMEL=y |
660 | CONFIG_SERIAL_AT91_CONSOLE=y | 660 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
661 | # CONFIG_SERIAL_AT91_TTYAT is not set | 661 | # CONFIG_SERIAL_ATMEL_TTYAT is not set |
662 | CONFIG_SERIAL_CORE=y | 662 | CONFIG_SERIAL_CORE=y |
663 | CONFIG_SERIAL_CORE_CONSOLE=y | 663 | CONFIG_SERIAL_CORE_CONSOLE=y |
664 | CONFIG_UNIX98_PTYS=y | 664 | CONFIG_UNIX98_PTYS=y |
diff --git a/arch/arm/configs/carmeva_defconfig b/arch/arm/configs/carmeva_defconfig index 8a075c8ecc63..d24ae8777c35 100644 --- a/arch/arm/configs/carmeva_defconfig +++ b/arch/arm/configs/carmeva_defconfig | |||
@@ -455,8 +455,8 @@ CONFIG_HW_CONSOLE=y | |||
455 | # | 455 | # |
456 | # Non-8250 serial port support | 456 | # Non-8250 serial port support |
457 | # | 457 | # |
458 | CONFIG_SERIAL_AT91=y | 458 | CONFIG_SERIAL_ATMEL=y |
459 | CONFIG_SERIAL_AT91_CONSOLE=y | 459 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
460 | CONFIG_SERIAL_CORE=y | 460 | CONFIG_SERIAL_CORE=y |
461 | CONFIG_SERIAL_CORE_CONSOLE=y | 461 | CONFIG_SERIAL_CORE_CONSOLE=y |
462 | CONFIG_UNIX98_PTYS=y | 462 | CONFIG_UNIX98_PTYS=y |
diff --git a/arch/arm/configs/csb337_defconfig b/arch/arm/configs/csb337_defconfig index cf3fa5cb26e4..a2d6fd398f16 100644 --- a/arch/arm/configs/csb337_defconfig +++ b/arch/arm/configs/csb337_defconfig | |||
@@ -591,9 +591,9 @@ CONFIG_HW_CONSOLE=y | |||
591 | # | 591 | # |
592 | # Non-8250 serial port support | 592 | # Non-8250 serial port support |
593 | # | 593 | # |
594 | CONFIG_SERIAL_AT91=y | 594 | CONFIG_SERIAL_ATMEL=y |
595 | CONFIG_SERIAL_AT91_CONSOLE=y | 595 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
596 | # CONFIG_SERIAL_AT91_TTYAT is not set | 596 | # CONFIG_SERIAL_ATMEL_TTYAT is not set |
597 | CONFIG_SERIAL_CORE=y | 597 | CONFIG_SERIAL_CORE=y |
598 | CONFIG_SERIAL_CORE_CONSOLE=y | 598 | CONFIG_SERIAL_CORE_CONSOLE=y |
599 | CONFIG_UNIX98_PTYS=y | 599 | CONFIG_UNIX98_PTYS=y |
diff --git a/arch/arm/configs/csb637_defconfig b/arch/arm/configs/csb637_defconfig index 640d70c1f066..2a1ac6c60abc 100644 --- a/arch/arm/configs/csb637_defconfig +++ b/arch/arm/configs/csb637_defconfig | |||
@@ -591,9 +591,9 @@ CONFIG_HW_CONSOLE=y | |||
591 | # | 591 | # |
592 | # Non-8250 serial port support | 592 | # Non-8250 serial port support |
593 | # | 593 | # |
594 | CONFIG_SERIAL_AT91=y | 594 | CONFIG_SERIAL_ATMEL=y |
595 | CONFIG_SERIAL_AT91_CONSOLE=y | 595 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
596 | # CONFIG_SERIAL_AT91_TTYAT is not set | 596 | # CONFIG_SERIAL_ATMEL_TTYAT is not set |
597 | CONFIG_SERIAL_CORE=y | 597 | CONFIG_SERIAL_CORE=y |
598 | CONFIG_SERIAL_CORE_CONSOLE=y | 598 | CONFIG_SERIAL_CORE_CONSOLE=y |
599 | CONFIG_UNIX98_PTYS=y | 599 | CONFIG_UNIX98_PTYS=y |
diff --git a/arch/arm/configs/kafa_defconfig b/arch/arm/configs/kafa_defconfig index 1db633e2c940..54fcd75779da 100644 --- a/arch/arm/configs/kafa_defconfig +++ b/arch/arm/configs/kafa_defconfig | |||
@@ -536,9 +536,9 @@ CONFIG_HW_CONSOLE=y | |||
536 | # | 536 | # |
537 | # Non-8250 serial port support | 537 | # Non-8250 serial port support |
538 | # | 538 | # |
539 | CONFIG_SERIAL_AT91=y | 539 | CONFIG_SERIAL_ATMEL=y |
540 | CONFIG_SERIAL_AT91_CONSOLE=y | 540 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
541 | # CONFIG_SERIAL_AT91_TTYAT is not set | 541 | # CONFIG_SERIAL_ATMEL_TTYAT is not set |
542 | CONFIG_SERIAL_CORE=y | 542 | CONFIG_SERIAL_CORE=y |
543 | CONFIG_SERIAL_CORE_CONSOLE=y | 543 | CONFIG_SERIAL_CORE_CONSOLE=y |
544 | CONFIG_UNIX98_PTYS=y | 544 | CONFIG_UNIX98_PTYS=y |
diff --git a/arch/arm/configs/kb9202_defconfig b/arch/arm/configs/kb9202_defconfig index 45396e087196..b4cd4b414836 100644 --- a/arch/arm/configs/kb9202_defconfig +++ b/arch/arm/configs/kb9202_defconfig | |||
@@ -418,8 +418,8 @@ CONFIG_HW_CONSOLE=y | |||
418 | # | 418 | # |
419 | # Non-8250 serial port support | 419 | # Non-8250 serial port support |
420 | # | 420 | # |
421 | CONFIG_SERIAL_AT91=y | 421 | CONFIG_SERIAL_ATMEL=y |
422 | CONFIG_SERIAL_AT91_CONSOLE=y | 422 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
423 | CONFIG_SERIAL_CORE=y | 423 | CONFIG_SERIAL_CORE=y |
424 | CONFIG_SERIAL_CORE_CONSOLE=y | 424 | CONFIG_SERIAL_CORE_CONSOLE=y |
425 | CONFIG_UNIX98_PTYS=y | 425 | CONFIG_UNIX98_PTYS=y |
diff --git a/arch/arm/configs/onearm_defconfig b/arch/arm/configs/onearm_defconfig index 6a93e3aae106..cb1d94f9049e 100644 --- a/arch/arm/configs/onearm_defconfig +++ b/arch/arm/configs/onearm_defconfig | |||
@@ -583,9 +583,9 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
583 | # | 583 | # |
584 | # Non-8250 serial port support | 584 | # Non-8250 serial port support |
585 | # | 585 | # |
586 | CONFIG_SERIAL_AT91=y | 586 | CONFIG_SERIAL_ATMEL=y |
587 | CONFIG_SERIAL_AT91_CONSOLE=y | 587 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
588 | # CONFIG_SERIAL_AT91_TTYAT is not set | 588 | # CONFIG_SERIAL_ATMEL_TTYAT is not set |
589 | CONFIG_SERIAL_CORE=y | 589 | CONFIG_SERIAL_CORE=y |
590 | CONFIG_SERIAL_CORE_CONSOLE=y | 590 | CONFIG_SERIAL_CORE_CONSOLE=y |
591 | CONFIG_UNIX98_PTYS=y | 591 | CONFIG_UNIX98_PTYS=y |
diff --git a/arch/arm/kernel/crunch.c b/arch/arm/kernel/crunch.c index 748175921f9b..cec83783206e 100644 --- a/arch/arm/kernel/crunch.c +++ b/arch/arm/kernel/crunch.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/config.h> | ||
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/signal.h> | 15 | #include <linux/signal.h> |
diff --git a/arch/arm/kernel/iwmmxt-notifier.c b/arch/arm/kernel/iwmmxt-notifier.c index 44a86c33796e..0d1a1db40062 100644 --- a/arch/arm/kernel/iwmmxt-notifier.c +++ b/arch/arm/kernel/iwmmxt-notifier.c | |||
@@ -15,7 +15,6 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/config.h> | ||
19 | #include <linux/types.h> | 18 | #include <linux/types.h> |
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/signal.h> | 20 | #include <linux/signal.h> |
diff --git a/arch/arm/mach-at91rm9200/board-1arm.c b/arch/arm/mach-at91rm9200/board-1arm.c index 36eecd7161f5..971c3e2d8e36 100644 --- a/arch/arm/mach-at91rm9200/board-1arm.c +++ b/arch/arm/mach-at91rm9200/board-1arm.c | |||
@@ -18,7 +18,6 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/types.h> | 21 | #include <linux/types.h> |
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
24 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
diff --git a/arch/arm/mach-at91rm9200/board-carmeva.c b/arch/arm/mach-at91rm9200/board-carmeva.c index 50e513681ae6..98208740e7c5 100644 --- a/arch/arm/mach-at91rm9200/board-carmeva.c +++ b/arch/arm/mach-at91rm9200/board-carmeva.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | #include <linux/init.h> | 23 | #include <linux/init.h> |
25 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
diff --git a/arch/arm/mach-at91rm9200/board-eb9200.c b/arch/arm/mach-at91rm9200/board-eb9200.c index c6e0d51fbea0..65e867ba2df3 100644 --- a/arch/arm/mach-at91rm9200/board-eb9200.c +++ b/arch/arm/mach-at91rm9200/board-eb9200.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | #include <linux/init.h> | 23 | #include <linux/init.h> |
25 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
diff --git a/arch/arm/mach-at91rm9200/board-kafa.c b/arch/arm/mach-at91rm9200/board-kafa.c index 91e301924f2c..6ef3c4879829 100644 --- a/arch/arm/mach-at91rm9200/board-kafa.c +++ b/arch/arm/mach-at91rm9200/board-kafa.c | |||
@@ -18,7 +18,6 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/types.h> | 21 | #include <linux/types.h> |
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
24 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
diff --git a/arch/arm/mach-at91rm9200/board-kb9202.c b/arch/arm/mach-at91rm9200/board-kb9202.c index 272fe43bceca..35a954a44b1b 100644 --- a/arch/arm/mach-at91rm9200/board-kb9202.c +++ b/arch/arm/mach-at91rm9200/board-kb9202.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | #include <linux/init.h> | 23 | #include <linux/init.h> |
25 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
diff --git a/arch/arm/mach-at91rm9200/devices.c b/arch/arm/mach-at91rm9200/devices.c index 01525530c287..059824376629 100644 --- a/arch/arm/mach-at91rm9200/devices.c +++ b/arch/arm/mach-at91rm9200/devices.c | |||
@@ -544,7 +544,7 @@ void __init at91_init_leds(u8 cpu_led, u8 timer_led) {} | |||
544 | * UART | 544 | * UART |
545 | * -------------------------------------------------------------------- */ | 545 | * -------------------------------------------------------------------- */ |
546 | 546 | ||
547 | #if defined(CONFIG_SERIAL_AT91) | 547 | #if defined(CONFIG_SERIAL_ATMEL) |
548 | static struct resource dbgu_resources[] = { | 548 | static struct resource dbgu_resources[] = { |
549 | [0] = { | 549 | [0] = { |
550 | .start = AT91_VA_BASE_SYS + AT91_DBGU, | 550 | .start = AT91_VA_BASE_SYS + AT91_DBGU, |
@@ -558,13 +558,14 @@ static struct resource dbgu_resources[] = { | |||
558 | }, | 558 | }, |
559 | }; | 559 | }; |
560 | 560 | ||
561 | static struct at91_uart_data dbgu_data = { | 561 | static struct atmel_uart_data dbgu_data = { |
562 | .use_dma_tx = 0, | 562 | .use_dma_tx = 0, |
563 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | 563 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ |
564 | .regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU), | ||
564 | }; | 565 | }; |
565 | 566 | ||
566 | static struct platform_device at91rm9200_dbgu_device = { | 567 | static struct platform_device at91rm9200_dbgu_device = { |
567 | .name = "at91_usart", | 568 | .name = "atmel_usart", |
568 | .id = 0, | 569 | .id = 0, |
569 | .dev = { | 570 | .dev = { |
570 | .platform_data = &dbgu_data, | 571 | .platform_data = &dbgu_data, |
@@ -593,13 +594,13 @@ static struct resource uart0_resources[] = { | |||
593 | }, | 594 | }, |
594 | }; | 595 | }; |
595 | 596 | ||
596 | static struct at91_uart_data uart0_data = { | 597 | static struct atmel_uart_data uart0_data = { |
597 | .use_dma_tx = 1, | 598 | .use_dma_tx = 1, |
598 | .use_dma_rx = 1, | 599 | .use_dma_rx = 1, |
599 | }; | 600 | }; |
600 | 601 | ||
601 | static struct platform_device at91rm9200_uart0_device = { | 602 | static struct platform_device at91rm9200_uart0_device = { |
602 | .name = "at91_usart", | 603 | .name = "atmel_usart", |
603 | .id = 1, | 604 | .id = 1, |
604 | .dev = { | 605 | .dev = { |
605 | .platform_data = &uart0_data, | 606 | .platform_data = &uart0_data, |
@@ -635,13 +636,13 @@ static struct resource uart1_resources[] = { | |||
635 | }, | 636 | }, |
636 | }; | 637 | }; |
637 | 638 | ||
638 | static struct at91_uart_data uart1_data = { | 639 | static struct atmel_uart_data uart1_data = { |
639 | .use_dma_tx = 1, | 640 | .use_dma_tx = 1, |
640 | .use_dma_rx = 1, | 641 | .use_dma_rx = 1, |
641 | }; | 642 | }; |
642 | 643 | ||
643 | static struct platform_device at91rm9200_uart1_device = { | 644 | static struct platform_device at91rm9200_uart1_device = { |
644 | .name = "at91_usart", | 645 | .name = "atmel_usart", |
645 | .id = 2, | 646 | .id = 2, |
646 | .dev = { | 647 | .dev = { |
647 | .platform_data = &uart1_data, | 648 | .platform_data = &uart1_data, |
@@ -676,13 +677,13 @@ static struct resource uart2_resources[] = { | |||
676 | }, | 677 | }, |
677 | }; | 678 | }; |
678 | 679 | ||
679 | static struct at91_uart_data uart2_data = { | 680 | static struct atmel_uart_data uart2_data = { |
680 | .use_dma_tx = 1, | 681 | .use_dma_tx = 1, |
681 | .use_dma_rx = 1, | 682 | .use_dma_rx = 1, |
682 | }; | 683 | }; |
683 | 684 | ||
684 | static struct platform_device at91rm9200_uart2_device = { | 685 | static struct platform_device at91rm9200_uart2_device = { |
685 | .name = "at91_usart", | 686 | .name = "atmel_usart", |
686 | .id = 3, | 687 | .id = 3, |
687 | .dev = { | 688 | .dev = { |
688 | .platform_data = &uart2_data, | 689 | .platform_data = &uart2_data, |
@@ -711,13 +712,13 @@ static struct resource uart3_resources[] = { | |||
711 | }, | 712 | }, |
712 | }; | 713 | }; |
713 | 714 | ||
714 | static struct at91_uart_data uart3_data = { | 715 | static struct atmel_uart_data uart3_data = { |
715 | .use_dma_tx = 1, | 716 | .use_dma_tx = 1, |
716 | .use_dma_rx = 1, | 717 | .use_dma_rx = 1, |
717 | }; | 718 | }; |
718 | 719 | ||
719 | static struct platform_device at91rm9200_uart3_device = { | 720 | static struct platform_device at91rm9200_uart3_device = { |
720 | .name = "at91_usart", | 721 | .name = "atmel_usart", |
721 | .id = 4, | 722 | .id = 4, |
722 | .dev = { | 723 | .dev = { |
723 | .platform_data = &uart3_data, | 724 | .platform_data = &uart3_data, |
@@ -733,8 +734,8 @@ static inline void configure_usart3_pins(void) | |||
733 | at91_set_B_periph(AT91_PIN_PA6, 0); /* RXD3 */ | 734 | at91_set_B_periph(AT91_PIN_PA6, 0); /* RXD3 */ |
734 | } | 735 | } |
735 | 736 | ||
736 | struct platform_device *at91_uarts[AT91_NR_UART]; /* the UARTs to use */ | 737 | struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ |
737 | struct platform_device *at91_default_console_device; /* the serial console device */ | 738 | struct platform_device *atmel_default_console_device; /* the serial console device */ |
738 | 739 | ||
739 | void __init at91_init_serial(struct at91_uart_config *config) | 740 | void __init at91_init_serial(struct at91_uart_config *config) |
740 | { | 741 | { |
@@ -775,9 +776,9 @@ void __init at91_init_serial(struct at91_uart_config *config) | |||
775 | } | 776 | } |
776 | 777 | ||
777 | /* Set serial console device */ | 778 | /* Set serial console device */ |
778 | if (config->console_tty < AT91_NR_UART) | 779 | if (config->console_tty < ATMEL_MAX_UART) |
779 | at91_default_console_device = at91_uarts[config->console_tty]; | 780 | atmel_default_console_device = at91_uarts[config->console_tty]; |
780 | if (!at91_default_console_device) | 781 | if (!atmel_default_console_device) |
781 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | 782 | printk(KERN_INFO "AT91: No default serial console defined.\n"); |
782 | } | 783 | } |
783 | 784 | ||
@@ -785,7 +786,7 @@ void __init at91_add_device_serial(void) | |||
785 | { | 786 | { |
786 | int i; | 787 | int i; |
787 | 788 | ||
788 | for (i = 0; i < AT91_NR_UART; i++) { | 789 | for (i = 0; i < ATMEL_MAX_UART; i++) { |
789 | if (at91_uarts[i]) | 790 | if (at91_uarts[i]) |
790 | platform_device_register(at91_uarts[i]); | 791 | platform_device_register(at91_uarts[i]); |
791 | } | 792 | } |
diff --git a/arch/arm/mach-ep93xx/edb9302.c b/arch/arm/mach-ep93xx/edb9302.c index 62a8efd23256..0315615b74da 100644 --- a/arch/arm/mach-ep93xx/edb9302.c +++ b/arch/arm/mach-ep93xx/edb9302.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * your option) any later version. | 10 | * your option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
diff --git a/arch/arm/mach-ep93xx/edb9312.c b/arch/arm/mach-ep93xx/edb9312.c index 9e399211108c..e310e4d72990 100644 --- a/arch/arm/mach-ep93xx/edb9312.c +++ b/arch/arm/mach-ep93xx/edb9312.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * your option) any later version. | 11 | * your option) any later version. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
diff --git a/arch/arm/mach-ep93xx/edb9315.c b/arch/arm/mach-ep93xx/edb9315.c index ef7482faad81..249ca9e57bc6 100644 --- a/arch/arm/mach-ep93xx/edb9315.c +++ b/arch/arm/mach-ep93xx/edb9315.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * your option) any later version. | 10 | * your option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
diff --git a/arch/arm/mach-ep93xx/edb9315a.c b/arch/arm/mach-ep93xx/edb9315a.c index fa958e9d6ddd..7ca0e6170a41 100644 --- a/arch/arm/mach-ep93xx/edb9315a.c +++ b/arch/arm/mach-ep93xx/edb9315a.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * your option) any later version. | 10 | * your option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
diff --git a/arch/arm/mach-lh7a40x/clcd.c b/arch/arm/mach-lh7a40x/clcd.c index 93751fee793d..1992db4c2523 100644 --- a/arch/arm/mach-lh7a40x/clcd.c +++ b/arch/arm/mach-lh7a40x/clcd.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * version 2 as published by the Free Software Foundation. | 8 | * version 2 as published by the Free Software Foundation. |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | #include <linux/config.h> | 11 | |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
14 | #include <linux/dma-mapping.h> | 14 | #include <linux/dma-mapping.h> |
diff --git a/arch/arm/mach-lh7a40x/clocks.c b/arch/arm/mach-lh7a40x/clocks.c index 2291afe9f23e..7530a95c15a6 100644 --- a/arch/arm/mach-lh7a40x/clocks.c +++ b/arch/arm/mach-lh7a40x/clocks.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/cpufreq.h> | 11 | #include <linux/cpufreq.h> |
13 | #include <asm/hardware.h> | 12 | #include <asm/hardware.h> |
14 | #include <asm/arch/clocks.h> | 13 | #include <asm/arch/clocks.h> |
diff --git a/arch/arm/mach-omap2/pm-domain.c b/arch/arm/mach-omap2/pm-domain.c index 5e20e740cde5..2494091a078b 100644 --- a/arch/arm/mach-omap2/pm-domain.c +++ b/arch/arm/mach-omap2/pm-domain.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * published by the Free Software Foundation. | 15 | * published by the Free Software Foundation. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/module.h> | 18 | #include <linux/module.h> |
20 | #include <linux/init.h> | 19 | #include <linux/init.h> |
21 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
diff --git a/arch/arm/mach-pnx4008/gpio.c b/arch/arm/mach-pnx4008/gpio.c index e1ce050d8fe0..1ab84ced7b5a 100644 --- a/arch/arm/mach-pnx4008/gpio.c +++ b/arch/arm/mach-pnx4008/gpio.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * or implied. | 14 | * or implied. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/types.h> | 17 | #include <linux/types.h> |
19 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
20 | #include <linux/module.h> | 19 | #include <linux/module.h> |
diff --git a/arch/arm/mach-pnx4008/sleep.S b/arch/arm/mach-pnx4008/sleep.S index 93c802bac269..fea1e17a3650 100644 --- a/arch/arm/mach-pnx4008/sleep.S +++ b/arch/arm/mach-pnx4008/sleep.S | |||
@@ -11,7 +11,6 @@ | |||
11 | * or implied. | 11 | * or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
16 | #include <asm/assembler.h> | 15 | #include <asm/assembler.h> |
17 | #include <asm/hardware.h> | 16 | #include <asm/hardware.h> |
diff --git a/arch/arm/mach-pnx4008/time.c b/arch/arm/mach-pnx4008/time.c index 756228ddd035..b986065cd0f3 100644 --- a/arch/arm/mach-pnx4008/time.c +++ b/arch/arm/mach-pnx4008/time.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * or implied. | 11 | * or implied. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
diff --git a/arch/arm/mach-pxa/leds-trizeps4.c b/arch/arm/mach-pxa/leds-trizeps4.c index 14cfc85e44b5..2271d20ffeda 100644 --- a/arch/arm/mach-pxa/leds-trizeps4.c +++ b/arch/arm/mach-pxa/leds-trizeps4.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | 14 | ||
16 | #include <asm/hardware.h> | 15 | #include <asm/hardware.h> |
diff --git a/arch/arm/tools/gen-mach-types b/arch/arm/tools/gen-mach-types index 2f9c9b5dd260..ce319ef64bc1 100644 --- a/arch/arm/tools/gen-mach-types +++ b/arch/arm/tools/gen-mach-types | |||
@@ -28,7 +28,6 @@ END { | |||
28 | printf(" */\n\n"); | 28 | printf(" */\n\n"); |
29 | printf("#ifndef __ASM_ARM_MACH_TYPE_H\n"); | 29 | printf("#ifndef __ASM_ARM_MACH_TYPE_H\n"); |
30 | printf("#define __ASM_ARM_MACH_TYPE_H\n\n"); | 30 | printf("#define __ASM_ARM_MACH_TYPE_H\n\n"); |
31 | printf("#include <linux/config.h>\n\n"); | ||
32 | printf("#ifndef __ASSEMBLY__\n"); | 31 | printf("#ifndef __ASSEMBLY__\n"); |
33 | printf("/* The type of machine we're running on */\n"); | 32 | printf("/* The type of machine we're running on */\n"); |
34 | printf("extern unsigned int __machine_arch_type;\n"); | 33 | printf("extern unsigned int __machine_arch_type;\n"); |
diff --git a/arch/arm26/lib/ecard.S b/arch/arm26/lib/ecard.S index b4633150f01c..658bc4529c9d 100644 --- a/arch/arm26/lib/ecard.S +++ b/arch/arm26/lib/ecard.S | |||
@@ -7,7 +7,6 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/config.h> /* for CONFIG_CPU_nn */ | ||
11 | #include <linux/linkage.h> | 10 | #include <linux/linkage.h> |
12 | #include <asm/assembler.h> | 11 | #include <asm/assembler.h> |
13 | #include <asm/hardware.h> | 12 | #include <asm/hardware.h> |
diff --git a/arch/arm26/lib/io-acorn.S b/arch/arm26/lib/io-acorn.S index f6c3e30b1b4f..5f62ade5be39 100644 --- a/arch/arm26/lib/io-acorn.S +++ b/arch/arm26/lib/io-acorn.S | |||
@@ -7,7 +7,6 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/config.h> /* for CONFIG_CPU_nn */ | ||
11 | #include <linux/linkage.h> | 10 | #include <linux/linkage.h> |
12 | #include <asm/assembler.h> | 11 | #include <asm/assembler.h> |
13 | #include <asm/hardware.h> | 12 | #include <asm/hardware.h> |
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index 49164e9aadd6..cced73c58115 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | 11 | ||
12 | #include <asm/arch/board.h> | 12 | #include <asm/arch/board.h> |
13 | #include <asm/arch/init.h> | ||
13 | 14 | ||
14 | struct eth_platform_data __initdata eth0_data = { | 15 | struct eth_platform_data __initdata eth0_data = { |
15 | .valid = 1, | 16 | .valid = 1, |
@@ -20,13 +21,22 @@ struct eth_platform_data __initdata eth0_data = { | |||
20 | 21 | ||
21 | extern struct lcdc_platform_data atstk1000_fb0_data; | 22 | extern struct lcdc_platform_data atstk1000_fb0_data; |
22 | 23 | ||
24 | void __init setup_board(void) | ||
25 | { | ||
26 | at32_map_usart(1, 0); /* /dev/ttyS0 */ | ||
27 | at32_map_usart(2, 1); /* /dev/ttyS1 */ | ||
28 | at32_map_usart(3, 2); /* /dev/ttyS2 */ | ||
29 | |||
30 | at32_setup_serial_console(0); | ||
31 | } | ||
32 | |||
23 | static int __init atstk1002_init(void) | 33 | static int __init atstk1002_init(void) |
24 | { | 34 | { |
25 | at32_add_system_devices(); | 35 | at32_add_system_devices(); |
26 | 36 | ||
27 | at32_add_device_usart(1); /* /dev/ttyS0 */ | 37 | at32_add_device_usart(0); |
28 | at32_add_device_usart(2); /* /dev/ttyS1 */ | 38 | at32_add_device_usart(1); |
29 | at32_add_device_usart(3); /* /dev/ttyS2 */ | 39 | at32_add_device_usart(2); |
30 | 40 | ||
31 | at32_add_device_eth(0, ð0_data); | 41 | at32_add_device_eth(0, ð0_data); |
32 | at32_add_device_spi(0); | 42 | at32_add_device_spi(0); |
diff --git a/arch/avr32/configs/atstk1002_defconfig b/arch/avr32/configs/atstk1002_defconfig index 1d22255009fd..6c2c5e00dfc7 100644 --- a/arch/avr32/configs/atstk1002_defconfig +++ b/arch/avr32/configs/atstk1002_defconfig | |||
@@ -385,9 +385,9 @@ CONFIG_PPP_DEFLATE=m | |||
385 | # | 385 | # |
386 | # Non-8250 serial port support | 386 | # Non-8250 serial port support |
387 | # | 387 | # |
388 | CONFIG_SERIAL_AT91=y | 388 | CONFIG_SERIAL_ATMEL=y |
389 | CONFIG_SERIAL_AT91_CONSOLE=y | 389 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
390 | # CONFIG_SERIAL_AT91_TTYAT is not set | 390 | # CONFIG_SERIAL_ATMEL_TTYAT is not set |
391 | CONFIG_SERIAL_CORE=y | 391 | CONFIG_SERIAL_CORE=y |
392 | CONFIG_SERIAL_CORE_CONSOLE=y | 392 | CONFIG_SERIAL_CORE_CONSOLE=y |
393 | CONFIG_UNIX98_PTYS=y | 393 | CONFIG_UNIX98_PTYS=y |
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c index 5d68f3c6990b..ea2d1ffee478 100644 --- a/arch/avr32/kernel/setup.c +++ b/arch/avr32/kernel/setup.c | |||
@@ -292,6 +292,7 @@ void __init setup_arch (char **cmdline_p) | |||
292 | 292 | ||
293 | setup_processor(); | 293 | setup_processor(); |
294 | setup_platform(); | 294 | setup_platform(); |
295 | setup_board(); | ||
295 | 296 | ||
296 | cpu_clk = clk_get(NULL, "cpu"); | 297 | cpu_clk = clk_get(NULL, "cpu"); |
297 | if (IS_ERR(cpu_clk)) { | 298 | if (IS_ERR(cpu_clk)) { |
diff --git a/arch/avr32/mach-at32ap/at32ap.c b/arch/avr32/mach-at32ap/at32ap.c index f7cedf5aabea..90f207e8e96d 100644 --- a/arch/avr32/mach-at32ap/at32ap.c +++ b/arch/avr32/mach-at32ap/at32ap.c | |||
@@ -48,9 +48,6 @@ void __init setup_platform(void) | |||
48 | at32_sm_init(); | 48 | at32_sm_init(); |
49 | at32_clock_init(); | 49 | at32_clock_init(); |
50 | at32_portmux_init(); | 50 | at32_portmux_init(); |
51 | |||
52 | /* FIXME: This doesn't belong here */ | ||
53 | at32_setup_serial_console(1); | ||
54 | } | 51 | } |
55 | 52 | ||
56 | static int __init pdc_probe(struct platform_device *pdev) | 53 | static int __init pdc_probe(struct platform_device *pdev) |
diff --git a/arch/avr32/mach-at32ap/at32ap7000.c b/arch/avr32/mach-at32ap/at32ap7000.c index 37982b60398e..7ff6ad8bab5f 100644 --- a/arch/avr32/mach-at32ap/at32ap7000.c +++ b/arch/avr32/mach-at32ap/at32ap7000.c | |||
@@ -523,33 +523,49 @@ void __init at32_add_system_devices(void) | |||
523 | * USART | 523 | * USART |
524 | * -------------------------------------------------------------------- */ | 524 | * -------------------------------------------------------------------- */ |
525 | 525 | ||
526 | static struct resource usart0_resource[] = { | 526 | static struct atmel_uart_data atmel_usart0_data = { |
527 | .use_dma_tx = 1, | ||
528 | .use_dma_rx = 1, | ||
529 | }; | ||
530 | static struct resource atmel_usart0_resource[] = { | ||
527 | PBMEM(0xffe00c00), | 531 | PBMEM(0xffe00c00), |
528 | IRQ(7), | 532 | IRQ(7), |
529 | }; | 533 | }; |
530 | DEFINE_DEV(usart, 0); | 534 | DEFINE_DEV_DATA(atmel_usart, 0); |
531 | DEV_CLK(usart, usart0, pba, 4); | 535 | DEV_CLK(usart, atmel_usart0, pba, 4); |
532 | 536 | ||
533 | static struct resource usart1_resource[] = { | 537 | static struct atmel_uart_data atmel_usart1_data = { |
538 | .use_dma_tx = 1, | ||
539 | .use_dma_rx = 1, | ||
540 | }; | ||
541 | static struct resource atmel_usart1_resource[] = { | ||
534 | PBMEM(0xffe01000), | 542 | PBMEM(0xffe01000), |
535 | IRQ(7), | 543 | IRQ(7), |
536 | }; | 544 | }; |
537 | DEFINE_DEV(usart, 1); | 545 | DEFINE_DEV_DATA(atmel_usart, 1); |
538 | DEV_CLK(usart, usart1, pba, 4); | 546 | DEV_CLK(usart, atmel_usart1, pba, 4); |
539 | 547 | ||
540 | static struct resource usart2_resource[] = { | 548 | static struct atmel_uart_data atmel_usart2_data = { |
549 | .use_dma_tx = 1, | ||
550 | .use_dma_rx = 1, | ||
551 | }; | ||
552 | static struct resource atmel_usart2_resource[] = { | ||
541 | PBMEM(0xffe01400), | 553 | PBMEM(0xffe01400), |
542 | IRQ(8), | 554 | IRQ(8), |
543 | }; | 555 | }; |
544 | DEFINE_DEV(usart, 2); | 556 | DEFINE_DEV_DATA(atmel_usart, 2); |
545 | DEV_CLK(usart, usart2, pba, 5); | 557 | DEV_CLK(usart, atmel_usart2, pba, 5); |
546 | 558 | ||
547 | static struct resource usart3_resource[] = { | 559 | static struct atmel_uart_data atmel_usart3_data = { |
560 | .use_dma_tx = 1, | ||
561 | .use_dma_rx = 1, | ||
562 | }; | ||
563 | static struct resource atmel_usart3_resource[] = { | ||
548 | PBMEM(0xffe01800), | 564 | PBMEM(0xffe01800), |
549 | IRQ(9), | 565 | IRQ(9), |
550 | }; | 566 | }; |
551 | DEFINE_DEV(usart, 3); | 567 | DEFINE_DEV_DATA(atmel_usart, 3); |
552 | DEV_CLK(usart, usart3, pba, 6); | 568 | DEV_CLK(usart, atmel_usart3, pba, 6); |
553 | 569 | ||
554 | static inline void configure_usart0_pins(void) | 570 | static inline void configure_usart0_pins(void) |
555 | { | 571 | { |
@@ -575,51 +591,54 @@ static inline void configure_usart3_pins(void) | |||
575 | portmux_set_func(PIOB, 17, FUNC_B); /* TXD */ | 591 | portmux_set_func(PIOB, 17, FUNC_B); /* TXD */ |
576 | } | 592 | } |
577 | 593 | ||
578 | static struct platform_device *setup_usart(unsigned int id) | 594 | static struct platform_device *at32_usarts[4]; |
595 | |||
596 | void __init at32_map_usart(unsigned int hw_id, unsigned int line) | ||
579 | { | 597 | { |
580 | struct platform_device *pdev; | 598 | struct platform_device *pdev; |
581 | 599 | ||
582 | switch (id) { | 600 | switch (hw_id) { |
583 | case 0: | 601 | case 0: |
584 | pdev = &usart0_device; | 602 | pdev = &atmel_usart0_device; |
585 | configure_usart0_pins(); | 603 | configure_usart0_pins(); |
586 | break; | 604 | break; |
587 | case 1: | 605 | case 1: |
588 | pdev = &usart1_device; | 606 | pdev = &atmel_usart1_device; |
589 | configure_usart1_pins(); | 607 | configure_usart1_pins(); |
590 | break; | 608 | break; |
591 | case 2: | 609 | case 2: |
592 | pdev = &usart2_device; | 610 | pdev = &atmel_usart2_device; |
593 | configure_usart2_pins(); | 611 | configure_usart2_pins(); |
594 | break; | 612 | break; |
595 | case 3: | 613 | case 3: |
596 | pdev = &usart3_device; | 614 | pdev = &atmel_usart3_device; |
597 | configure_usart3_pins(); | 615 | configure_usart3_pins(); |
598 | break; | 616 | break; |
599 | default: | 617 | default: |
600 | pdev = NULL; | 618 | return; |
601 | break; | ||
602 | } | 619 | } |
603 | 620 | ||
604 | return pdev; | 621 | if (PXSEG(pdev->resource[0].start) == P4SEG) { |
622 | /* Addresses in the P4 segment are permanently mapped 1:1 */ | ||
623 | struct atmel_uart_data *data = pdev->dev.platform_data; | ||
624 | data->regs = (void __iomem *)pdev->resource[0].start; | ||
625 | } | ||
626 | |||
627 | pdev->id = line; | ||
628 | at32_usarts[line] = pdev; | ||
605 | } | 629 | } |
606 | 630 | ||
607 | struct platform_device *__init at32_add_device_usart(unsigned int id) | 631 | struct platform_device *__init at32_add_device_usart(unsigned int id) |
608 | { | 632 | { |
609 | struct platform_device *pdev; | 633 | platform_device_register(at32_usarts[id]); |
610 | 634 | return at32_usarts[id]; | |
611 | pdev = setup_usart(id); | ||
612 | if (pdev) | ||
613 | platform_device_register(pdev); | ||
614 | |||
615 | return pdev; | ||
616 | } | 635 | } |
617 | 636 | ||
618 | struct platform_device *at91_default_console_device; | 637 | struct platform_device *atmel_default_console_device; |
619 | 638 | ||
620 | void __init at32_setup_serial_console(unsigned int usart_id) | 639 | void __init at32_setup_serial_console(unsigned int usart_id) |
621 | { | 640 | { |
622 | at91_default_console_device = setup_usart(usart_id); | 641 | atmel_default_console_device = at32_usarts[usart_id]; |
623 | } | 642 | } |
624 | 643 | ||
625 | /* -------------------------------------------------------------------- | 644 | /* -------------------------------------------------------------------- |
@@ -813,10 +832,10 @@ struct clk *at32_clock_list[] = { | |||
813 | &pio1_mck, | 832 | &pio1_mck, |
814 | &pio2_mck, | 833 | &pio2_mck, |
815 | &pio3_mck, | 834 | &pio3_mck, |
816 | &usart0_usart, | 835 | &atmel_usart0_usart, |
817 | &usart1_usart, | 836 | &atmel_usart1_usart, |
818 | &usart2_usart, | 837 | &atmel_usart2_usart, |
819 | &usart3_usart, | 838 | &atmel_usart3_usart, |
820 | &macb0_hclk, | 839 | &macb0_hclk, |
821 | &macb0_pclk, | 840 | &macb0_pclk, |
822 | &spi0_mck, | 841 | &spi0_mck, |
diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c index 7e55884135ed..44a9aebc4f5a 100644 --- a/arch/frv/kernel/time.c +++ b/arch/frv/kernel/time.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * 2 of the License, or (at your option) any later version. | 10 | * 2 of the License, or (at your option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> /* CONFIG_HEARTBEAT */ | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
16 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
diff --git a/arch/h8300/kernel/time.c b/arch/h8300/kernel/time.c index e569d17b4ae6..8abab3bc2b6f 100644 --- a/arch/h8300/kernel/time.c +++ b/arch/h8300/kernel/time.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * "A Kernel Model for Precision Timekeeping" by Dave Mills | 16 | * "A Kernel Model for Precision Timekeeping" by Dave Mills |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> /* CONFIG_HEARTBEAT */ | ||
20 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
diff --git a/arch/i386/lib/semaphore.S b/arch/i386/lib/semaphore.S index 01f80b5c45d2..ef6ad9e1a609 100644 --- a/arch/i386/lib/semaphore.S +++ b/arch/i386/lib/semaphore.S | |||
@@ -13,7 +13,6 @@ | |||
13 | * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@kvack.org> | 13 | * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@kvack.org> |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/linkage.h> | 16 | #include <linux/linkage.h> |
18 | #include <asm/rwlock.h> | 17 | #include <asm/rwlock.h> |
19 | #include <asm/alternative-asm.i> | 18 | #include <asm/alternative-asm.i> |
diff --git a/arch/m32r/mm/mmu.S b/arch/m32r/mm/mmu.S index 0c28f11d6677..9a4d40b3d6a2 100644 --- a/arch/m32r/mm/mmu.S +++ b/arch/m32r/mm/mmu.S | |||
@@ -6,7 +6,6 @@ | |||
6 | 6 | ||
7 | /* $Id: mmu.S,v 1.15 2004/03/16 02:56:27 takata Exp $ */ | 7 | /* $Id: mmu.S,v 1.15 2004/03/16 02:56:27 takata Exp $ */ |
8 | 8 | ||
9 | #include <linux/config.h> /* CONFIG_MMU */ | ||
10 | #include <linux/linkage.h> | 9 | #include <linux/linkage.h> |
11 | #include <asm/assembler.h> | 10 | #include <asm/assembler.h> |
12 | #include <asm/smp.h> | 11 | #include <asm/smp.h> |
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c index 6cfc984380d9..28b2fefa4513 100644 --- a/arch/m68k/kernel/time.c +++ b/arch/m68k/kernel/time.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * "A Kernel Model for Precision Timekeeping" by Dave Mills | 10 | * "A Kernel Model for Precision Timekeeping" by Dave Mills |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> /* CONFIG_HEARTBEAT */ | ||
14 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
diff --git a/arch/m68knommu/platform/532x/config.c b/arch/m68knommu/platform/532x/config.c index ceef9bc181ea..c7d6ad513820 100644 --- a/arch/m68knommu/platform/532x/config.c +++ b/arch/m68knommu/platform/532x/config.c | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | /***************************************************************************/ | 18 | /***************************************************************************/ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
22 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
23 | #include <linux/param.h> | 22 | #include <linux/param.h> |
diff --git a/arch/m68knommu/platform/68328/romvec.S b/arch/m68knommu/platform/68328/romvec.S index 3e7fe1e14913..31084466eae8 100644 --- a/arch/m68knommu/platform/68328/romvec.S +++ b/arch/m68knommu/platform/68328/romvec.S | |||
@@ -10,8 +10,6 @@ | |||
10 | * Copyright 2006 Greg Ungerer <gerg@snapgear.com> | 10 | * Copyright 2006 Greg Ungerer <gerg@snapgear.com> |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | |||
15 | .global _start | 13 | .global _start |
16 | .global _buserr | 14 | .global _buserr |
17 | .global trap | 15 | .global trap |
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index 3e79e62f7b0b..eaad2328fea1 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S | |||
@@ -12,8 +12,6 @@ | |||
12 | * Initial Version 04-23-1999 by Helge Deller <deller@gmx.de> | 12 | * Initial Version 04-23-1999 by Helge Deller <deller@gmx.de> |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> /* for CONFIG_SMP */ | ||
16 | |||
17 | #include <asm/asm-offsets.h> | 15 | #include <asm/asm-offsets.h> |
18 | #include <asm/psw.h> | 16 | #include <asm/psw.h> |
19 | #include <asm/pdc.h> | 17 | #include <asm/pdc.h> |
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index 9670a89c77fe..a05800429304 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S | |||
@@ -6,7 +6,6 @@ | |||
6 | * thanks to Philipp Rumpf, Mike Shaver and various others | 6 | * thanks to Philipp Rumpf, Mike Shaver and various others |
7 | * sorry about the wall, puffin.. | 7 | * sorry about the wall, puffin.. |
8 | */ | 8 | */ |
9 | #include <linux/config.h> /* for CONFIG_SMP */ | ||
10 | 9 | ||
11 | #include <asm/asm-offsets.h> | 10 | #include <asm/asm-offsets.h> |
12 | #include <asm/unistd.h> | 11 | #include <asm/unistd.h> |
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c index 8c676d763bb0..5446bab08eca 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * option) any later version. | 11 | * option) any later version. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/stddef.h> | 14 | #include <linux/stddef.h> |
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.h b/arch/powerpc/platforms/85xx/mpc85xx_ads.h index effcbf78f851..46c3532992aa 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.h +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #ifndef __MACH_MPC85XXADS_H | 18 | #ifndef __MACH_MPC85XXADS_H |
19 | #define __MACH_MPC85XXADS_H | 19 | #define __MACH_MPC85XXADS_H |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/initrd.h> | 21 | #include <linux/initrd.h> |
23 | #include <sysdev/fsl_soc.h> | 22 | #include <sysdev/fsl_soc.h> |
24 | 23 | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 4c1fede6470e..193a5d7921b5 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * option) any later version. | 11 | * option) any later version. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/stddef.h> | 14 | #include <linux/stddef.h> |
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
diff --git a/arch/powerpc/platforms/cell/cbe_regs.c b/arch/powerpc/platforms/cell/cbe_regs.c index 3f3859d12e00..2f194ba29899 100644 --- a/arch/powerpc/platforms/cell/cbe_regs.c +++ b/arch/powerpc/platforms/cell/cbe_regs.c | |||
@@ -6,8 +6,6 @@ | |||
6 | * (c) 2006 Benjamin Herrenschmidt <benh@kernel.crashing.org>, IBM Corp. | 6 | * (c) 2006 Benjamin Herrenschmidt <benh@kernel.crashing.org>, IBM Corp. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | |||
10 | #include <linux/config.h> | ||
11 | #include <linux/percpu.h> | 9 | #include <linux/percpu.h> |
12 | #include <linux/types.h> | 10 | #include <linux/types.h> |
13 | 11 | ||
diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c index 033ad6e2827b..0984c7071695 100644 --- a/arch/powerpc/platforms/cell/ras.c +++ b/arch/powerpc/platforms/cell/ras.c | |||
@@ -1,6 +1,5 @@ | |||
1 | #define DEBUG | 1 | #define DEBUG |
2 | 2 | ||
3 | #include <linux/config.h> | ||
4 | #include <linux/types.h> | 3 | #include <linux/types.h> |
5 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
6 | #include <linux/smp.h> | 5 | #include <linux/smp.h> |
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c index e4f2b9df5e17..cb6f084844f2 100644 --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c +++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | |||
@@ -18,7 +18,6 @@ | |||
18 | * 2 of the License, or (at your option) any later version. | 18 | * 2 of the License, or (at your option) any later version. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/stddef.h> | 21 | #include <linux/stddef.h> |
23 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
24 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c index 628482671c15..106896c3b60a 100644 --- a/arch/powerpc/platforms/pasemi/setup.c +++ b/arch/powerpc/platforms/pasemi/setup.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
28 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
diff --git a/arch/powerpc/platforms/pasemi/time.c b/arch/powerpc/platforms/pasemi/time.c index 9bd410b8fec6..fa54351ac268 100644 --- a/arch/powerpc/platforms/pasemi/time.c +++ b/arch/powerpc/platforms/pasemi/time.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/time.h> | 20 | #include <linux/time.h> |
22 | 21 | ||
23 | #include <asm/time.h> | 22 | #include <asm/time.h> |
diff --git a/arch/powerpc/sysdev/tsi108_dev.c b/arch/powerpc/sysdev/tsi108_dev.c index f3038461d4c0..11de090eb901 100644 --- a/arch/powerpc/sysdev/tsi108_dev.c +++ b/arch/powerpc/sysdev/tsi108_dev.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * option) any later version. | 9 | * option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/stddef.h> | 12 | #include <linux/stddef.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
diff --git a/arch/ppc/amiga/time.c b/arch/ppc/amiga/time.c index 0073527a7036..8c880c0ca380 100644 --- a/arch/ppc/amiga/time.c +++ b/arch/ppc/amiga/time.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> /* CONFIG_HEARTBEAT */ | ||
2 | #include <linux/errno.h> | 1 | #include <linux/errno.h> |
3 | #include <linux/sched.h> | 2 | #include <linux/sched.h> |
4 | #include <linux/kernel.h> | 3 | #include <linux/kernel.h> |
diff --git a/arch/ppc/platforms/4xx/cpci405.h b/arch/ppc/platforms/4xx/cpci405.h index f5a5c0cd062d..a6c0a138b0d7 100644 --- a/arch/ppc/platforms/4xx/cpci405.h +++ b/arch/ppc/platforms/4xx/cpci405.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #ifndef __CPCI405_H__ | 13 | #ifndef __CPCI405_H__ |
14 | #define __CPCI405_H__ | 14 | #define __CPCI405_H__ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <platforms/4xx/ibm405gp.h> | 16 | #include <platforms/4xx/ibm405gp.h> |
18 | #include <asm/ppcboot.h> | 17 | #include <asm/ppcboot.h> |
19 | 18 | ||
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index 4d9ff5ce4cbd..67914fe7f317 100644 --- a/arch/s390/kernel/kprobes.c +++ b/arch/s390/kernel/kprobes.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * s390 port, used ppc64 as template. Mike Grundy <grundym@us.ibm.com> | 20 | * s390 port, used ppc64 as template. Mike Grundy <grundym@us.ibm.com> |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/kprobes.h> | 23 | #include <linux/kprobes.h> |
25 | #include <linux/ptrace.h> | 24 | #include <linux/ptrace.h> |
26 | #include <linux/preempt.h> | 25 | #include <linux/preempt.h> |
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index d33f8a07ccac..54d51b404603 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * <zaitcev> Sounds reasonable | 25 | * <zaitcev> Sounds reasonable |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c index 97bf87e8cdde..74bef2a2d37f 100644 --- a/arch/sparc/kernel/of_device.c +++ b/arch/sparc/kernel/of_device.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <linux/string.h> | 1 | #include <linux/string.h> |
3 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
4 | #include <linux/init.h> | 3 | #include <linux/init.h> |
diff --git a/arch/sparc64/kernel/auxio.c b/arch/sparc64/kernel/auxio.c index 718350aba1ec..826118ee53d5 100644 --- a/arch/sparc64/kernel/auxio.c +++ b/arch/sparc64/kernel/auxio.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * Refactoring for unified NCR/PCIO support 2002 Eric Brower (ebrower@usa.net) | 5 | * Refactoring for unified NCR/PCIO support 2002 Eric Brower (ebrower@usa.net) |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/module.h> | 8 | #include <linux/module.h> |
10 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
11 | #include <linux/init.h> | 10 | #include <linux/init.h> |
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index 238bbf6de07d..7f9204535770 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <linux/string.h> | 1 | #include <linux/string.h> |
3 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
4 | #include <linux/init.h> | 3 | #include <linux/init.h> |
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c index 5cc5ab63293f..e21cd6afa709 100644 --- a/arch/sparc64/kernel/prom.c +++ b/arch/sparc64/kernel/prom.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * 2 of the License, or (at your option) any later version. | 15 | * 2 of the License, or (at your option) any later version. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
20 | #include <linux/types.h> | 19 | #include <linux/types.h> |
21 | #include <linux/string.h> | 20 | #include <linux/string.h> |
diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c index d247ef45c374..a0d148ea63d6 100644 --- a/arch/um/drivers/hostaudio_kern.c +++ b/arch/um/drivers/hostaudio_kern.c | |||
@@ -3,7 +3,6 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
7 | #include "linux/module.h" | 6 | #include "linux/module.h" |
8 | #include "linux/init.h" | 7 | #include "linux/init.h" |
9 | #include "linux/slab.h" | 8 | #include "linux/slab.h" |
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 300a54a6523e..c1c5604752fb 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * Licensed under the GPL. | 5 | * Licensed under the GPL. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include "linux/config.h" | ||
9 | #include "linux/kernel.h" | 8 | #include "linux/kernel.h" |
10 | #include "linux/netdevice.h" | 9 | #include "linux/netdevice.h" |
11 | #include "linux/rtnetlink.h" | 10 | #include "linux/rtnetlink.h" |
diff --git a/arch/um/drivers/slip_kern.c b/arch/um/drivers/slip_kern.c index ccea2d7885e5..788da5439a2d 100644 --- a/arch/um/drivers/slip_kern.c +++ b/arch/um/drivers/slip_kern.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #include "linux/config.h" | ||
2 | #include "linux/kernel.h" | 1 | #include "linux/kernel.h" |
3 | #include "linux/stddef.h" | 2 | #include "linux/stddef.h" |
4 | #include "linux/init.h" | 3 | #include "linux/init.h" |
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c index 6f13e7c71a82..ed9c59082d0d 100644 --- a/arch/um/drivers/ssl.c +++ b/arch/um/drivers/ssl.c | |||
@@ -3,7 +3,6 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
7 | #include "linux/fs.h" | 6 | #include "linux/fs.h" |
8 | #include "linux/tty.h" | 7 | #include "linux/tty.h" |
9 | #include "linux/tty_driver.h" | 8 | #include "linux/tty_driver.h" |
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c index e4bfcfe8550b..7a4897e27f42 100644 --- a/arch/um/drivers/stdio_console.c +++ b/arch/um/drivers/stdio_console.c | |||
@@ -3,7 +3,6 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
7 | #include "linux/posix_types.h" | 6 | #include "linux/posix_types.h" |
8 | #include "linux/tty.h" | 7 | #include "linux/tty.h" |
9 | #include "linux/tty_flip.h" | 8 | #include "linux/tty_flip.h" |
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index fda4a3940698..f0b0668458b7 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #define MAJOR_NR UBD_MAJOR | 20 | #define MAJOR_NR UBD_MAJOR |
21 | #define UBD_SHIFT 4 | 21 | #define UBD_SHIFT 4 |
22 | 22 | ||
23 | #include "linux/config.h" | ||
24 | #include "linux/module.h" | 23 | #include "linux/module.h" |
25 | #include "linux/blkdev.h" | 24 | #include "linux/blkdev.h" |
26 | #include "linux/hdreg.h" | 25 | #include "linux/hdreg.h" |
diff --git a/arch/um/include/mconsole_kern.h b/arch/um/include/mconsole_kern.h index d86ee14260ce..d0b690197fd7 100644 --- a/arch/um/include/mconsole_kern.h +++ b/arch/um/include/mconsole_kern.h | |||
@@ -6,7 +6,6 @@ | |||
6 | #ifndef __MCONSOLE_KERN_H__ | 6 | #ifndef __MCONSOLE_KERN_H__ |
7 | #define __MCONSOLE_KERN_H__ | 7 | #define __MCONSOLE_KERN_H__ |
8 | 8 | ||
9 | #include "linux/config.h" | ||
10 | #include "linux/list.h" | 9 | #include "linux/list.h" |
11 | #include "mconsole.h" | 10 | #include "mconsole.h" |
12 | 11 | ||
diff --git a/arch/um/include/mode_kern.h b/arch/um/include/mode_kern.h index e7539a8451ef..88e5e77bf517 100644 --- a/arch/um/include/mode_kern.h +++ b/arch/um/include/mode_kern.h | |||
@@ -6,8 +6,6 @@ | |||
6 | #ifndef __MODE_KERN_H__ | 6 | #ifndef __MODE_KERN_H__ |
7 | #define __MODE_KERN_H__ | 7 | #define __MODE_KERN_H__ |
8 | 8 | ||
9 | #include "linux/config.h" | ||
10 | |||
11 | #ifdef CONFIG_MODE_TT | 9 | #ifdef CONFIG_MODE_TT |
12 | #include "mode_kern_tt.h" | 10 | #include "mode_kern_tt.h" |
13 | #endif | 11 | #endif |
diff --git a/arch/um/include/skas/mmu-skas.h b/arch/um/include/skas/mmu-skas.h index d8869a6ef1b4..b26986c0c3d2 100644 --- a/arch/um/include/skas/mmu-skas.h +++ b/arch/um/include/skas/mmu-skas.h | |||
@@ -6,7 +6,6 @@ | |||
6 | #ifndef __SKAS_MMU_H | 6 | #ifndef __SKAS_MMU_H |
7 | #define __SKAS_MMU_H | 7 | #define __SKAS_MMU_H |
8 | 8 | ||
9 | #include "linux/config.h" | ||
10 | #include "mm_id.h" | 9 | #include "mm_id.h" |
11 | #include "asm/ldt.h" | 10 | #include "asm/ldt.h" |
12 | 11 | ||
diff --git a/arch/um/include/sysdep-ppc/ptrace.h b/arch/um/include/sysdep-ppc/ptrace.h index 8a27353733a9..df2397dba3e5 100644 --- a/arch/um/include/sysdep-ppc/ptrace.h +++ b/arch/um/include/sysdep-ppc/ptrace.h | |||
@@ -5,7 +5,6 @@ | |||
5 | #ifndef __SYS_PTRACE_PPC_H | 5 | #ifndef __SYS_PTRACE_PPC_H |
6 | #define __SYS_PTRACE_PPC_H | 6 | #define __SYS_PTRACE_PPC_H |
7 | 7 | ||
8 | #include "linux/config.h" | ||
9 | #include "linux/types.h" | 8 | #include "linux/types.h" |
10 | 9 | ||
11 | /* the following taken from <asm-ppc/ptrace.h> */ | 10 | /* the following taken from <asm-ppc/ptrace.h> */ |
diff --git a/arch/um/include/um_uaccess.h b/arch/um/include/um_uaccess.h index 4567f1eeb4a7..5126a99b5961 100644 --- a/arch/um/include/um_uaccess.h +++ b/arch/um/include/um_uaccess.h | |||
@@ -6,7 +6,6 @@ | |||
6 | #ifndef __ARCH_UM_UACCESS_H | 6 | #ifndef __ARCH_UM_UACCESS_H |
7 | #define __ARCH_UM_UACCESS_H | 7 | #define __ARCH_UM_UACCESS_H |
8 | 8 | ||
9 | #include "linux/config.h" | ||
10 | #include "choose-mode.h" | 9 | #include "choose-mode.h" |
11 | 10 | ||
12 | #ifdef CONFIG_MODE_TT | 11 | #ifdef CONFIG_MODE_TT |
diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c index 49ed5ddf0704..8cde431348cc 100644 --- a/arch/um/kernel/init_task.c +++ b/arch/um/kernel/init_task.c | |||
@@ -3,7 +3,6 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
7 | #include "linux/mm.h" | 6 | #include "linux/mm.h" |
8 | #include "linux/module.h" | 7 | #include "linux/module.h" |
9 | #include "linux/sched.h" | 8 | #include "linux/sched.h" |
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index ce7f233fc490..eee97bb81ba5 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar | 5 | * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include "linux/config.h" | ||
9 | #include "linux/kernel.h" | 8 | #include "linux/kernel.h" |
10 | #include "linux/module.h" | 9 | #include "linux/module.h" |
11 | #include "linux/smp.h" | 10 | #include "linux/smp.h" |
diff --git a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c index f030e44262ba..0e00cf93f900 100644 --- a/arch/um/kernel/ksyms.c +++ b/arch/um/kernel/ksyms.c | |||
@@ -3,7 +3,6 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
7 | #include "linux/module.h" | 6 | #include "linux/module.h" |
8 | #include "linux/string.h" | 7 | #include "linux/string.h" |
9 | #include "linux/smp_lock.h" | 8 | #include "linux/smp_lock.h" |
diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c index 4aa9808ba264..2a32e5e8e9c9 100644 --- a/arch/um/kernel/signal.c +++ b/arch/um/kernel/signal.c | |||
@@ -3,7 +3,6 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
7 | #include "linux/stddef.h" | 6 | #include "linux/stddef.h" |
8 | #include "linux/sys.h" | 7 | #include "linux/sys.h" |
9 | #include "linux/sched.h" | 8 | #include "linux/sched.h" |
diff --git a/arch/um/kernel/skas/mem.c b/arch/um/kernel/skas/mem.c index 27bbf54b1e52..0d2cce621134 100644 --- a/arch/um/kernel/skas/mem.c +++ b/arch/um/kernel/skas/mem.c | |||
@@ -3,7 +3,6 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
7 | #include "linux/mm.h" | 6 | #include "linux/mm.h" |
8 | #include "asm/pgtable.h" | 7 | #include "asm/pgtable.h" |
9 | #include "mem_user.h" | 8 | #include "mem_user.h" |
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index 4cd2ff546ef6..c17eddcf89b3 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c | |||
@@ -3,7 +3,6 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
7 | #include "linux/sched.h" | 6 | #include "linux/sched.h" |
8 | #include "linux/list.h" | 7 | #include "linux/list.h" |
9 | #include "linux/spinlock.h" | 8 | #include "linux/spinlock.h" |
diff --git a/arch/um/kernel/skas/tlb.c b/arch/um/kernel/skas/tlb.c index 6e84963dfc29..27eb29ce666b 100644 --- a/arch/um/kernel/skas/tlb.c +++ b/arch/um/kernel/skas/tlb.c | |||
@@ -6,7 +6,6 @@ | |||
6 | 6 | ||
7 | #include "linux/stddef.h" | 7 | #include "linux/stddef.h" |
8 | #include "linux/sched.h" | 8 | #include "linux/sched.h" |
9 | #include "linux/config.h" | ||
10 | #include "linux/mm.h" | 9 | #include "linux/mm.h" |
11 | #include "asm/page.h" | 10 | #include "asm/page.h" |
12 | #include "asm/pgtable.h" | 11 | #include "asm/pgtable.h" |
diff --git a/arch/um/kernel/smp.c b/arch/um/kernel/smp.c index 511116aebaf7..759b07053160 100644 --- a/arch/um/kernel/smp.c +++ b/arch/um/kernel/smp.c | |||
@@ -3,7 +3,6 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
7 | #include "linux/percpu.h" | 6 | #include "linux/percpu.h" |
8 | #include "asm/pgalloc.h" | 7 | #include "asm/pgalloc.h" |
9 | #include "asm/tlb.h" | 8 | #include "asm/tlb.h" |
diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c index b331e970002f..239c98054dec 100644 --- a/arch/um/kernel/sysrq.c +++ b/arch/um/kernel/sysrq.c | |||
@@ -3,7 +3,6 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
7 | #include "linux/sched.h" | 6 | #include "linux/sched.h" |
8 | #include "linux/kernel.h" | 7 | #include "linux/kernel.h" |
9 | #include "linux/module.h" | 8 | #include "linux/module.h" |
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c index c7b195c7e51f..b5f124a2f6ae 100644 --- a/arch/um/kernel/trap.c +++ b/arch/um/kernel/trap.c | |||
@@ -8,7 +8,6 @@ | |||
8 | #include "linux/sched.h" | 8 | #include "linux/sched.h" |
9 | #include "linux/mm.h" | 9 | #include "linux/mm.h" |
10 | #include "linux/spinlock.h" | 10 | #include "linux/spinlock.h" |
11 | #include "linux/config.h" | ||
12 | #include "linux/init.h" | 11 | #include "linux/init.h" |
13 | #include "linux/ptrace.h" | 12 | #include "linux/ptrace.h" |
14 | #include "asm/semaphore.h" | 13 | #include "asm/semaphore.h" |
diff --git a/arch/um/kernel/tt/gdb_kern.c b/arch/um/kernel/tt/gdb_kern.c index 26506388a6aa..68e1bf63cd0a 100644 --- a/arch/um/kernel/tt/gdb_kern.c +++ b/arch/um/kernel/tt/gdb_kern.c | |||
@@ -4,7 +4,6 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/init.h" | 6 | #include "linux/init.h" |
7 | #include "linux/config.h" | ||
8 | #include "mconsole_kern.h" | 7 | #include "mconsole_kern.h" |
9 | 8 | ||
10 | #ifdef CONFIG_MCONSOLE | 9 | #ifdef CONFIG_MCONSOLE |
diff --git a/arch/um/kernel/tt/mem.c b/arch/um/kernel/tt/mem.c index 84a23b14f770..4d1929dfa285 100644 --- a/arch/um/kernel/tt/mem.c +++ b/arch/um/kernel/tt/mem.c | |||
@@ -4,7 +4,6 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/stddef.h" | 6 | #include "linux/stddef.h" |
7 | #include "linux/config.h" | ||
8 | #include "linux/mm.h" | 7 | #include "linux/mm.h" |
9 | #include "asm/uaccess.h" | 8 | #include "asm/uaccess.h" |
10 | #include "mem_user.h" | 9 | #include "mem_user.h" |
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 97d88e7902f7..66f43c906821 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -3,7 +3,6 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
7 | #include "linux/kernel.h" | 6 | #include "linux/kernel.h" |
8 | #include "linux/sched.h" | 7 | #include "linux/sched.h" |
9 | #include "linux/notifier.h" | 8 | #include "linux/notifier.h" |
diff --git a/arch/um/sys-i386/ldt.c b/arch/um/sys-i386/ldt.c index 69971b78beaf..e299ee5a753d 100644 --- a/arch/um/sys-i386/ldt.c +++ b/arch/um/sys-i386/ldt.c | |||
@@ -4,7 +4,6 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/stddef.h" | 6 | #include "linux/stddef.h" |
7 | #include "linux/config.h" | ||
8 | #include "linux/sched.h" | 7 | #include "linux/sched.h" |
9 | #include "linux/slab.h" | 8 | #include "linux/slab.h" |
10 | #include "linux/types.h" | 9 | #include "linux/types.h" |
diff --git a/arch/um/sys-i386/sysrq.c b/arch/um/sys-i386/sysrq.c index d5244f070539..171b3e9dc867 100644 --- a/arch/um/sys-i386/sysrq.c +++ b/arch/um/sys-i386/sysrq.c | |||
@@ -3,7 +3,6 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
7 | #include "linux/kernel.h" | 6 | #include "linux/kernel.h" |
8 | #include "linux/smp.h" | 7 | #include "linux/smp.h" |
9 | #include "linux/sched.h" | 8 | #include "linux/sched.h" |
diff --git a/arch/um/sys-i386/tls.c b/arch/um/sys-i386/tls.c index 71b9796258ef..643dab585727 100644 --- a/arch/um/sys-i386/tls.c +++ b/arch/um/sys-i386/tls.c | |||
@@ -3,7 +3,6 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
7 | #include "linux/kernel.h" | 6 | #include "linux/kernel.h" |
8 | #include "linux/sched.h" | 7 | #include "linux/sched.h" |
9 | #include "linux/slab.h" | 8 | #include "linux/slab.h" |
diff --git a/arch/v850/kernel/time.c b/arch/v850/kernel/time.c index f4d1a4d3cdc2..cd06f47c0ea7 100644 --- a/arch/v850/kernel/time.c +++ b/arch/v850/kernel/time.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * "A Kernel Model for Precision Timekeeping" by Dave Mills | 10 | * "A Kernel Model for Precision Timekeeping" by Dave Mills |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> /* CONFIG_HEARTBEAT */ | ||
14 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
diff --git a/arch/x86_64/boot/video.S b/arch/x86_64/boot/video.S index 2aa565c136e5..d6ff88f35135 100644 --- a/arch/x86_64/boot/video.S +++ b/arch/x86_64/boot/video.S | |||
@@ -11,8 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> /* for CONFIG_VIDEO_* */ | ||
15 | |||
16 | /* Enable autodetection of SVGA adapters and modes. */ | 14 | /* Enable autodetection of SVGA adapters and modes. */ |
17 | #undef CONFIG_VIDEO_SVGA | 15 | #undef CONFIG_VIDEO_SVGA |
18 | 16 | ||
diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c index 2fd5a67fd435..82ef182de6ae 100644 --- a/arch/x86_64/ia32/ia32_binfmt.c +++ b/arch/x86_64/ia32/ia32_binfmt.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * of ugly preprocessor tricks. Talk about very very poor man's inheritance. | 6 | * of ugly preprocessor tricks. Talk about very very poor man's inheritance. |
7 | */ | 7 | */ |
8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
9 | #include <linux/config.h> | ||
10 | #include <linux/stddef.h> | 9 | #include <linux/stddef.h> |
11 | #include <linux/rwsem.h> | 10 | #include <linux/rwsem.h> |
12 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
diff --git a/arch/x86_64/kernel/pci-calgary.c b/arch/x86_64/kernel/pci-calgary.c index cfb09b07ae99..f760045d6d35 100644 --- a/arch/x86_64/kernel/pci-calgary.c +++ b/arch/x86_64/kernel/pci-calgary.c | |||
@@ -21,7 +21,6 @@ | |||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
26 | #include <linux/init.h> | 25 | #include <linux/init.h> |
27 | #include <linux/types.h> | 26 | #include <linux/types.h> |
diff --git a/arch/x86_64/kernel/tce.c b/arch/x86_64/kernel/tce.c index cbabfdf78e06..f61fb8e4f129 100644 --- a/arch/x86_64/kernel/tce.c +++ b/arch/x86_64/kernel/tce.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/types.h> | 26 | #include <linux/types.h> |
28 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
29 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
diff --git a/arch/x86_64/kernel/x8664_ksyms.c b/arch/x86_64/kernel/x8664_ksyms.c index c3454af5e3a2..6d77e4797a47 100644 --- a/arch/x86_64/kernel/x8664_ksyms.c +++ b/arch/x86_64/kernel/x8664_ksyms.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* Exports for assembly files. | 1 | /* Exports for assembly files. |
2 | All C exports should go in the respective C files. */ | 2 | All C exports should go in the respective C files. */ |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/module.h> | 4 | #include <linux/module.h> |
6 | #include <linux/smp.h> | 5 | #include <linux/smp.h> |
7 | 6 | ||
diff --git a/arch/x86_64/lib/copy_page.S b/arch/x86_64/lib/copy_page.S index 0ebb03b60e79..727a5d46d2fc 100644 --- a/arch/x86_64/lib/copy_page.S +++ b/arch/x86_64/lib/copy_page.S | |||
@@ -1,6 +1,5 @@ | |||
1 | /* Written 2003 by Andi Kleen, based on a kernel by Evandro Menezes */ | 1 | /* Written 2003 by Andi Kleen, based on a kernel by Evandro Menezes */ |
2 | 2 | ||
3 | #include <linux/config.h> | ||
4 | #include <linux/linkage.h> | 3 | #include <linux/linkage.h> |
5 | #include <asm/dwarf2.h> | 4 | #include <asm/dwarf2.h> |
6 | 5 | ||
diff --git a/arch/x86_64/lib/delay.c b/arch/x86_64/lib/delay.c index b6cd3cca2f45..50be90975d04 100644 --- a/arch/x86_64/lib/delay.c +++ b/arch/x86_64/lib/delay.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * depends wildly on alignment on many x86 processors. | 8 | * depends wildly on alignment on many x86 processors. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
14 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
diff --git a/arch/x86_64/lib/memcpy.S b/arch/x86_64/lib/memcpy.S index 967b22fa7d07..0ea0ddc875a7 100644 --- a/arch/x86_64/lib/memcpy.S +++ b/arch/x86_64/lib/memcpy.S | |||
@@ -1,6 +1,5 @@ | |||
1 | /* Copyright 2002 Andi Kleen */ | 1 | /* Copyright 2002 Andi Kleen */ |
2 | 2 | ||
3 | #include <linux/config.h> | ||
4 | #include <linux/linkage.h> | 3 | #include <linux/linkage.h> |
5 | #include <asm/dwarf2.h> | 4 | #include <asm/dwarf2.h> |
6 | #include <asm/cpufeature.h> | 5 | #include <asm/cpufeature.h> |
diff --git a/arch/x86_64/lib/memset.S b/arch/x86_64/lib/memset.S index 09ed1f6b0eaa..2c5948116bd2 100644 --- a/arch/x86_64/lib/memset.S +++ b/arch/x86_64/lib/memset.S | |||
@@ -1,6 +1,5 @@ | |||
1 | /* Copyright 2002 Andi Kleen, SuSE Labs */ | 1 | /* Copyright 2002 Andi Kleen, SuSE Labs */ |
2 | 2 | ||
3 | #include <linux/config.h> | ||
4 | #include <linux/linkage.h> | 3 | #include <linux/linkage.h> |
5 | #include <asm/dwarf2.h> | 4 | #include <asm/dwarf2.h> |
6 | 5 | ||
diff --git a/arch/x86_64/lib/thunk.S b/arch/x86_64/lib/thunk.S index 0025535cac8d..55e586d352d3 100644 --- a/arch/x86_64/lib/thunk.S +++ b/arch/x86_64/lib/thunk.S | |||
@@ -5,7 +5,6 @@ | |||
5 | * Subject to the GNU public license, v.2. No warranty of any kind. | 5 | * Subject to the GNU public license, v.2. No warranty of any kind. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/linkage.h> | 8 | #include <linux/linkage.h> |
10 | #include <asm/dwarf2.h> | 9 | #include <asm/dwarf2.h> |
11 | #include <asm/calling.h> | 10 | #include <asm/calling.h> |
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 99f87efe0f58..36b88f6c5f82 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/config.h> /* CONFIG_PROC_FS */ | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
26 | #include <linux/types.h> | 25 | #include <linux/types.h> |
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index 4abc193314ee..ada68e65b5ff 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * Questions/Comments/Bugfixes to iss_storagedev@hp.com | 19 | * Questions/Comments/Bugfixes to iss_storagedev@hp.com |
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | #include <linux/config.h> /* CONFIG_PROC_FS */ | ||
23 | #include <linux/module.h> | 22 | #include <linux/module.h> |
24 | #include <linux/types.h> | 23 | #include <linux/types.h> |
25 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
diff --git a/drivers/char/briq_panel.c b/drivers/char/briq_panel.c index b8c22255f6ad..9f8082f8dd29 100644 --- a/drivers/char/briq_panel.c +++ b/drivers/char/briq_panel.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/tty.h> | 12 | #include <linux/tty.h> |
13 | #include <linux/timer.h> | 13 | #include <linux/timer.h> |
14 | #include <linux/config.h> | ||
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/wait.h> | 15 | #include <linux/wait.h> |
17 | #include <linux/string.h> | 16 | #include <linux/string.h> |
diff --git a/drivers/char/ftape/lowlevel/fdc-io.c b/drivers/char/ftape/lowlevel/fdc-io.c index 65c9d2ec60bd..216532445652 100644 --- a/drivers/char/ftape/lowlevel/fdc-io.c +++ b/drivers/char/ftape/lowlevel/fdc-io.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * Linux. | 26 | * Linux. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/config.h> /* for CONFIG_FT_* */ | ||
30 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
31 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
32 | #include <linux/ioport.h> | 31 | #include <linux/ioport.h> |
diff --git a/drivers/char/ftape/zftape/zftape-rw.c b/drivers/char/ftape/zftape/zftape-rw.c index a61ef50f3dfc..dab634686885 100644 --- a/drivers/char/ftape/zftape/zftape-rw.c +++ b/drivers/char/ftape/zftape/zftape-rw.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * zftape. | 24 | * zftape. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> /* for CONFIG_ZFT_DFLT_BLK_SZ */ | ||
28 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
29 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
30 | 29 | ||
diff --git a/drivers/char/ftape/zftape/zftape-rw.h b/drivers/char/ftape/zftape/zftape-rw.h index 14c07f086575..1ceec22b60bd 100644 --- a/drivers/char/ftape/zftape/zftape-rw.h +++ b/drivers/char/ftape/zftape/zftape-rw.h | |||
@@ -28,7 +28,6 @@ | |||
28 | * | 28 | * |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/config.h> /* for CONFIG_ZFT_DFLT_BLK_SZ */ | ||
32 | #include "../zftape/zftape-buffers.h" | 31 | #include "../zftape/zftape-buffers.h" |
33 | 32 | ||
34 | #define SEGMENTS_PER_TAPE (ft_segments_per_track * ft_tracks_per_tape) | 33 | #define SEGMENTS_PER_TAPE (ft_segments_per_track * ft_tracks_per_tape) |
diff --git a/drivers/char/hw_random/ixp4xx-rng.c b/drivers/char/hw_random/ixp4xx-rng.c index 3cf4d641a51c..c9caff57db85 100644 --- a/drivers/char/hw_random/ixp4xx-rng.c +++ b/drivers/char/hw_random/ixp4xx-rng.c | |||
@@ -15,7 +15,6 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/config.h> | ||
19 | #include <linux/types.h> | 18 | #include <linux/types.h> |
20 | #include <linux/module.h> | 19 | #include <linux/module.h> |
21 | #include <linux/moduleparam.h> | 20 | #include <linux/moduleparam.h> |
diff --git a/drivers/char/mspec.c b/drivers/char/mspec.c index 5426b1e5595f..5c0dec39cf6c 100644 --- a/drivers/char/mspec.c +++ b/drivers/char/mspec.c | |||
@@ -30,7 +30,6 @@ | |||
30 | * processor from ever speculating a cache line from this page. | 30 | * processor from ever speculating a cache line from this page. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | #include <linux/types.h> | 33 | #include <linux/types.h> |
35 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
36 | #include <linux/module.h> | 35 | #include <linux/module.h> |
diff --git a/drivers/char/nsc_gpio.c b/drivers/char/nsc_gpio.c index 7719bd75810b..4d47d79bcea7 100644 --- a/drivers/char/nsc_gpio.c +++ b/drivers/char/nsc_gpio.c | |||
@@ -7,7 +7,6 @@ | |||
7 | Copyright (c) 2005 Jim Cromie <jim.cromie@gmail.com> | 7 | Copyright (c) 2005 Jim Cromie <jim.cromie@gmail.com> |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/fs.h> | 10 | #include <linux/fs.h> |
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index d1ecb2c6de98..73e324209913 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
@@ -35,7 +35,6 @@ | |||
35 | 35 | ||
36 | #define MAX_DEVICE_COUNT 4 | 36 | #define MAX_DEVICE_COUNT 4 |
37 | 37 | ||
38 | #include <linux/config.h> | ||
39 | #include <linux/module.h> | 38 | #include <linux/module.h> |
40 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
41 | #include <linux/signal.h> | 40 | #include <linux/signal.h> |
diff --git a/drivers/char/sx.c b/drivers/char/sx.c index 57e31e5eaedb..8fd71a5fc619 100644 --- a/drivers/char/sx.c +++ b/drivers/char/sx.c | |||
@@ -203,9 +203,7 @@ | |||
203 | #define RCS_ID "$Id: sx.c,v 1.33 2000/03/08 10:01:02 wolff, pvdl Exp $" | 203 | #define RCS_ID "$Id: sx.c,v 1.33 2000/03/08 10:01:02 wolff, pvdl Exp $" |
204 | #define RCS_REV "$Revision: 1.33 $" | 204 | #define RCS_REV "$Revision: 1.33 $" |
205 | 205 | ||
206 | |||
207 | #include <linux/module.h> | 206 | #include <linux/module.h> |
208 | #include <linux/config.h> | ||
209 | #include <linux/kdev_t.h> | 207 | #include <linux/kdev_t.h> |
210 | #include <linux/kernel.h> | 208 | #include <linux/kernel.h> |
211 | #include <linux/sched.h> | 209 | #include <linux/sched.h> |
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index 38d94987de83..a4150c4519c4 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c | |||
@@ -63,7 +63,6 @@ | |||
63 | #define MAX_PCI_DEVICES 10 | 63 | #define MAX_PCI_DEVICES 10 |
64 | #define MAX_TOTAL_DEVICES 20 | 64 | #define MAX_TOTAL_DEVICES 20 |
65 | 65 | ||
66 | #include <linux/config.h> | ||
67 | #include <linux/module.h> | 66 | #include <linux/module.h> |
68 | #include <linux/errno.h> | 67 | #include <linux/errno.h> |
69 | #include <linux/signal.h> | 68 | #include <linux/signal.h> |
diff --git a/drivers/char/watchdog/iTCO_wdt.c b/drivers/char/watchdog/iTCO_wdt.c index 8f89948832fc..aaac94db0d8b 100644 --- a/drivers/char/watchdog/iTCO_wdt.c +++ b/drivers/char/watchdog/iTCO_wdt.c | |||
@@ -49,7 +49,6 @@ | |||
49 | #define PFX DRV_NAME ": " | 49 | #define PFX DRV_NAME ": " |
50 | 50 | ||
51 | /* Includes */ | 51 | /* Includes */ |
52 | #include <linux/config.h> /* For CONFIG_WATCHDOG_NOWAYOUT/... */ | ||
53 | #include <linux/module.h> /* For module specific items */ | 52 | #include <linux/module.h> /* For module specific items */ |
54 | #include <linux/moduleparam.h> /* For new moduleparam's */ | 53 | #include <linux/moduleparam.h> /* For new moduleparam's */ |
55 | #include <linux/types.h> /* For standard types (like size_t) */ | 54 | #include <linux/types.h> /* For standard types (like size_t) */ |
diff --git a/drivers/char/watchdog/omap_wdt.c b/drivers/char/watchdog/omap_wdt.c index 8f90b90a5021..5dbd7dc2936f 100644 --- a/drivers/char/watchdog/omap_wdt.c +++ b/drivers/char/watchdog/omap_wdt.c | |||
@@ -27,7 +27,6 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/config.h> | ||
31 | #include <linux/types.h> | 30 | #include <linux/types.h> |
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
33 | #include <linux/fs.h> | 32 | #include <linux/fs.h> |
diff --git a/drivers/char/watchdog/pcwd.c b/drivers/char/watchdog/pcwd.c index 6f8515db5b07..8e1e6e48e0a7 100644 --- a/drivers/char/watchdog/pcwd.c +++ b/drivers/char/watchdog/pcwd.c | |||
@@ -49,7 +49,6 @@ | |||
49 | * More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/ | 49 | * More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/ |
50 | */ | 50 | */ |
51 | 51 | ||
52 | #include <linux/config.h> /* For CONFIG_WATCHDOG_NOWAYOUT/... */ | ||
53 | #include <linux/module.h> /* For module specific items */ | 52 | #include <linux/module.h> /* For module specific items */ |
54 | #include <linux/moduleparam.h> /* For new moduleparam's */ | 53 | #include <linux/moduleparam.h> /* For new moduleparam's */ |
55 | #include <linux/types.h> /* For standard types (like size_t) */ | 54 | #include <linux/types.h> /* For standard types (like size_t) */ |
diff --git a/drivers/char/watchdog/pcwd_pci.c b/drivers/char/watchdog/pcwd_pci.c index 2de6e497c140..f4872c871063 100644 --- a/drivers/char/watchdog/pcwd_pci.c +++ b/drivers/char/watchdog/pcwd_pci.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * Includes, defines, variables, module parameters, ... | 31 | * Includes, defines, variables, module parameters, ... |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/config.h> /* For CONFIG_WATCHDOG_NOWAYOUT/... */ | ||
35 | #include <linux/module.h> /* For module specific items */ | 34 | #include <linux/module.h> /* For module specific items */ |
36 | #include <linux/moduleparam.h> /* For new moduleparam's */ | 35 | #include <linux/moduleparam.h> /* For new moduleparam's */ |
37 | #include <linux/types.h> /* For standard types (like size_t) */ | 36 | #include <linux/types.h> /* For standard types (like size_t) */ |
diff --git a/drivers/char/watchdog/pnx4008_wdt.c b/drivers/char/watchdog/pnx4008_wdt.c index db2731ba88e3..3a55fc6abcd8 100644 --- a/drivers/char/watchdog/pnx4008_wdt.c +++ b/drivers/char/watchdog/pnx4008_wdt.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * or implied. | 14 | * or implied. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
19 | #include <linux/moduleparam.h> | 18 | #include <linux/moduleparam.h> |
20 | #include <linux/types.h> | 19 | #include <linux/types.h> |
diff --git a/drivers/hwmon/w83791d.c b/drivers/hwmon/w83791d.c index d965d074cd61..371ed4f69a97 100644 --- a/drivers/hwmon/w83791d.c +++ b/drivers/hwmon/w83791d.c | |||
@@ -32,7 +32,6 @@ | |||
32 | The w83791g chip is the same as the w83791d but lead-free. | 32 | The w83791g chip is the same as the w83791d but lead-free. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/config.h> | ||
36 | #include <linux/module.h> | 35 | #include <linux/module.h> |
37 | #include <linux/init.h> | 36 | #include <linux/init.h> |
38 | #include <linux/slab.h> | 37 | #include <linux/slab.h> |
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c index 952a28d485ce..3e276e958ef7 100644 --- a/drivers/i2c/busses/i2c-ocores.c +++ b/drivers/i2c/busses/i2c-ocores.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * kind, whether express or implied. | 9 | * kind, whether express or implied. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c index 0cb7b9b520ea..965c43659e35 100644 --- a/drivers/ide/pci/generic.c +++ b/drivers/ide/pci/generic.c | |||
@@ -23,7 +23,6 @@ | |||
23 | 23 | ||
24 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ | 24 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ |
25 | 25 | ||
26 | #include <linux/config.h> /* for CONFIG_BLK_DEV_IDEPCI */ | ||
27 | #include <linux/types.h> | 26 | #include <linux/types.h> |
28 | #include <linux/module.h> | 27 | #include <linux/module.h> |
29 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c index 68c74bbf8b06..c1cec236ecf0 100644 --- a/drivers/ide/pci/jmicron.c +++ b/drivers/ide/pci/jmicron.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * May be copied or modified under the terms of the GNU General Public License | 5 | * May be copied or modified under the terms of the GNU General Public License |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/types.h> | 8 | #include <linux/types.h> |
10 | #include <linux/module.h> | 9 | #include <linux/module.h> |
11 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
diff --git a/drivers/ide/pci/rz1000.c b/drivers/ide/pci/rz1000.c index 608cd7609072..5f6950c2d1d1 100644 --- a/drivers/ide/pci/rz1000.c +++ b/drivers/ide/pci/rz1000.c | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ | 18 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ |
19 | 19 | ||
20 | #include <linux/config.h> /* for CONFIG_BLK_DEV_IDEPCI */ | ||
21 | #include <linux/types.h> | 20 | #include <linux/types.h> |
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
23 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
diff --git a/drivers/infiniband/hw/ipath/ipath_mmap.c b/drivers/infiniband/hw/ipath/ipath_mmap.c index 11b7378ff214..a82157db4689 100644 --- a/drivers/infiniband/hw/ipath/ipath_mmap.c +++ b/drivers/infiniband/hw/ipath/ipath_mmap.c | |||
@@ -30,7 +30,6 @@ | |||
30 | * SOFTWARE. | 30 | * SOFTWARE. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | #include <linux/module.h> | 33 | #include <linux/module.h> |
35 | #include <linux/vmalloc.h> | 34 | #include <linux/vmalloc.h> |
36 | #include <linux/mm.h> | 35 | #include <linux/mm.h> |
diff --git a/drivers/leds/leds-ams-delta.c b/drivers/leds/leds-ams-delta.c index e9f06116c4d7..599878c8e714 100644 --- a/drivers/leds/leds-ams-delta.c +++ b/drivers/leds/leds-ams-delta.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
14 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index ed4aa4e7912c..9f7e1fe8c97e 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig | |||
@@ -54,6 +54,7 @@ config VIDEO_V4L1_COMPAT | |||
54 | 54 | ||
55 | config VIDEO_V4L2 | 55 | config VIDEO_V4L2 |
56 | bool | 56 | bool |
57 | depends on VIDEO_DEV | ||
57 | default y | 58 | default y |
58 | 59 | ||
59 | source "drivers/media/video/Kconfig" | 60 | source "drivers/media/video/Kconfig" |
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index 67cefdd2334a..2cc5caa26a0a 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig | |||
@@ -69,7 +69,6 @@ config DVB_USB_DIBUSB_MC | |||
69 | config DVB_USB_DIB0700 | 69 | config DVB_USB_DIB0700 |
70 | tristate "DiBcom DiB0700 USB DVB devices (see help for supported devices)" | 70 | tristate "DiBcom DiB0700 USB DVB devices (see help for supported devices)" |
71 | depends on DVB_USB | 71 | depends on DVB_USB |
72 | select DVB_DIB7000M | ||
73 | select DVB_DIB3000MC | 72 | select DVB_DIB3000MC |
74 | select DVB_TUNER_MT2060 | 73 | select DVB_TUNER_MT2060 |
75 | help | 74 | help |
diff --git a/drivers/media/dvb/dvb-usb/usb-urb.c b/drivers/media/dvb/dvb-usb/usb-urb.c index 8728cf347a71..572b2d9aa66a 100644 --- a/drivers/media/dvb/dvb-usb/usb-urb.c +++ b/drivers/media/dvb/dvb-usb/usb-urb.c | |||
@@ -122,8 +122,9 @@ static int usb_allocate_stream_buffers(struct usb_data_stream *stream, int num, | |||
122 | usb_free_stream_buffers(stream); | 122 | usb_free_stream_buffers(stream); |
123 | return -ENOMEM; | 123 | return -ENOMEM; |
124 | } | 124 | } |
125 | deb_mem("buffer %d: %p (dma: %u)\n", | 125 | deb_mem("buffer %d: %p (dma: %Lu)\n", |
126 | stream->buf_num, stream->buf_list[stream->buf_num], stream->dma_addr[stream->buf_num]); | 126 | stream->buf_num, |
127 | stream->buf_list[stream->buf_num], (long long)stream->dma_addr[stream->buf_num]); | ||
127 | memset(stream->buf_list[stream->buf_num],0,size); | 128 | memset(stream->buf_list[stream->buf_num],0,size); |
128 | stream->state |= USB_STATE_URB_BUF; | 129 | stream->state |= USB_STATE_URB_BUF; |
129 | } | 130 | } |
diff --git a/drivers/media/radio/radio-gemtek-pci.c b/drivers/media/radio/radio-gemtek-pci.c index cfab57d6bc4a..eb14106f66fa 100644 --- a/drivers/media/radio/radio-gemtek-pci.c +++ b/drivers/media/radio/radio-gemtek-pci.c | |||
@@ -449,7 +449,7 @@ static int __init gemtek_pci_init_module( void ) | |||
449 | 449 | ||
450 | static void __exit gemtek_pci_cleanup_module( void ) | 450 | static void __exit gemtek_pci_cleanup_module( void ) |
451 | { | 451 | { |
452 | return pci_unregister_driver( &gemtek_pci_driver ); | 452 | pci_unregister_driver(&gemtek_pci_driver); |
453 | } | 453 | } |
454 | 454 | ||
455 | MODULE_AUTHOR( "Vladimir Shebordaev <vshebordaev@mail.ru>" ); | 455 | MODULE_AUTHOR( "Vladimir Shebordaev <vshebordaev@mail.ru>" ); |
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index fe3c83ca3de3..c9d8e3b9cc37 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -2994,6 +2994,34 @@ struct saa7134_board saa7134_boards[] = { | |||
2994 | .amux = LINE1, | 2994 | .amux = LINE1, |
2995 | }, | 2995 | }, |
2996 | }, | 2996 | }, |
2997 | [SAA7134_BOARD_ASUS_EUROPA2_HYBRID] = { | ||
2998 | .name = "Asus Europa2 OEM", | ||
2999 | .audio_clock = 0x00187de7, | ||
3000 | .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3, | ||
3001 | .radio_type = UNSET, | ||
3002 | .tuner_addr = ADDR_UNSET, | ||
3003 | .radio_addr = ADDR_UNSET, | ||
3004 | .tda9887_conf = TDA9887_PRESENT| TDA9887_PORT1_ACTIVE | TDA9887_PORT2_ACTIVE, | ||
3005 | .mpeg = SAA7134_MPEG_DVB, | ||
3006 | .inputs = {{ | ||
3007 | .name = name_tv, | ||
3008 | .vmux = 3, | ||
3009 | .amux = TV, | ||
3010 | .tv = 1, | ||
3011 | },{ | ||
3012 | .name = name_comp1, | ||
3013 | .vmux = 4, | ||
3014 | .amux = LINE2, | ||
3015 | },{ | ||
3016 | .name = name_svideo, | ||
3017 | .vmux = 8, | ||
3018 | .amux = LINE2, | ||
3019 | }}, | ||
3020 | .radio = { | ||
3021 | .name = name_radio, | ||
3022 | .amux = LINE1, | ||
3023 | }, | ||
3024 | }, | ||
2997 | }; | 3025 | }; |
2998 | 3026 | ||
2999 | const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); | 3027 | const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); |
@@ -3597,6 +3625,12 @@ struct pci_device_id saa7134_pci_tbl[] = { | |||
3597 | .subdevice = 0x2c00, | 3625 | .subdevice = 0x2c00, |
3598 | .driver_data = SAA7134_BOARD_AVERMEDIA_A16AR, | 3626 | .driver_data = SAA7134_BOARD_AVERMEDIA_A16AR, |
3599 | },{ | 3627 | },{ |
3628 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
3629 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, | ||
3630 | .subvendor = 0x1043, | ||
3631 | .subdevice = 0x4860, | ||
3632 | .driver_data = SAA7134_BOARD_ASUS_EUROPA2_HYBRID, | ||
3633 | },{ | ||
3600 | /* --- boards without eeprom + subsystem ID --- */ | 3634 | /* --- boards without eeprom + subsystem ID --- */ |
3601 | .vendor = PCI_VENDOR_ID_PHILIPS, | 3635 | .vendor = PCI_VENDOR_ID_PHILIPS, |
3602 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, | 3636 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, |
@@ -3871,6 +3905,7 @@ int saa7134_board_init2(struct saa7134_dev *dev) | |||
3871 | break; | 3905 | break; |
3872 | case SAA7134_BOARD_PHILIPS_EUROPA: | 3906 | case SAA7134_BOARD_PHILIPS_EUROPA: |
3873 | case SAA7134_BOARD_VIDEOMATE_DVBT_300: | 3907 | case SAA7134_BOARD_VIDEOMATE_DVBT_300: |
3908 | case SAA7134_BOARD_ASUS_EUROPA2_HYBRID: | ||
3874 | /* The Philips EUROPA based hybrid boards have the tuner connected through | 3909 | /* The Philips EUROPA based hybrid boards have the tuner connected through |
3875 | * the channel decoder. We have to make it transparent to find it | 3910 | * the channel decoder. We have to make it transparent to find it |
3876 | */ | 3911 | */ |
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index fb741fa465a5..1ba53b525ad2 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c | |||
@@ -874,6 +874,34 @@ static struct tda1004x_config philips_tiger_config = { | |||
874 | 874 | ||
875 | /* ------------------------------------------------------------------ */ | 875 | /* ------------------------------------------------------------------ */ |
876 | 876 | ||
877 | static int asus_p7131_dual_tuner_init(struct dvb_frontend *fe) | ||
878 | { | ||
879 | struct saa7134_dev *dev = fe->dvb->priv; | ||
880 | static u8 data[] = { 0x3c, 0x33, 0x6a}; | ||
881 | struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)}; | ||
882 | |||
883 | if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1) | ||
884 | return -EIO; | ||
885 | /* make sure the DVB-T antenna input is set */ | ||
886 | saa_setl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0200000); | ||
887 | return 0; | ||
888 | } | ||
889 | |||
890 | static int asus_p7131_dual_tuner_sleep(struct dvb_frontend *fe) | ||
891 | { | ||
892 | struct saa7134_dev *dev = fe->dvb->priv; | ||
893 | static u8 data[] = { 0x3c, 0x33, 0x68}; | ||
894 | struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)}; | ||
895 | |||
896 | i2c_transfer(&dev->i2c_adap, &msg, 1); | ||
897 | philips_tda827xa_tuner_sleep( 0x61, fe); | ||
898 | /* reset antenna inputs for analog usage */ | ||
899 | saa_clearl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0200000); | ||
900 | return 0; | ||
901 | } | ||
902 | |||
903 | /* ------------------------------------------------------------------ */ | ||
904 | |||
877 | static int lifeview_trio_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) | 905 | static int lifeview_trio_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) |
878 | { | 906 | { |
879 | int ret; | 907 | int ret; |
@@ -1148,8 +1176,8 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1148 | &philips_tiger_config, | 1176 | &philips_tiger_config, |
1149 | &dev->i2c_adap); | 1177 | &dev->i2c_adap); |
1150 | if (dev->dvb.frontend) { | 1178 | if (dev->dvb.frontend) { |
1151 | dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init; | 1179 | dev->dvb.frontend->ops.tuner_ops.init = asus_p7131_dual_tuner_init; |
1152 | dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep; | 1180 | dev->dvb.frontend->ops.tuner_ops.sleep = asus_p7131_dual_tuner_sleep; |
1153 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params; | 1181 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params; |
1154 | } | 1182 | } |
1155 | break; | 1183 | break; |
@@ -1240,6 +1268,18 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1240 | } | 1268 | } |
1241 | } | 1269 | } |
1242 | break; | 1270 | break; |
1271 | case SAA7134_BOARD_ASUS_EUROPA2_HYBRID: | ||
1272 | dev->dvb.frontend = tda10046_attach(&medion_cardbus, | ||
1273 | &dev->i2c_adap); | ||
1274 | if (dev->dvb.frontend) { | ||
1275 | dev->original_demod_sleep = dev->dvb.frontend->ops.sleep; | ||
1276 | dev->dvb.frontend->ops.sleep = philips_europa_demod_sleep; | ||
1277 | dev->dvb.frontend->ops.tuner_ops.init = philips_fmd1216_tuner_init; | ||
1278 | dev->dvb.frontend->ops.tuner_ops.sleep = philips_fmd1216_tuner_sleep; | ||
1279 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_fmd1216_tuner_set_params; | ||
1280 | } | ||
1281 | break; | ||
1282 | |||
1243 | default: | 1283 | default: |
1244 | printk("%s: Huh? unknown DVB card?\n",dev->name); | 1284 | printk("%s: Huh? unknown DVB card?\n",dev->name); |
1245 | break; | 1285 | break; |
diff --git a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/video/saa7134/saa7134-tvaudio.c index d31220d20495..dd759d6d8d25 100644 --- a/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/drivers/media/video/saa7134/saa7134-tvaudio.c | |||
@@ -72,12 +72,12 @@ static struct mainscan { | |||
72 | int carr; | 72 | int carr; |
73 | } mainscan[] = { | 73 | } mainscan[] = { |
74 | { | 74 | { |
75 | .name = "M", | 75 | .name = "MN", |
76 | .std = V4L2_STD_NTSC | V4L2_STD_PAL_M, | 76 | .std = V4L2_STD_MN, |
77 | .carr = 4500, | 77 | .carr = 4500, |
78 | },{ | 78 | },{ |
79 | .name = "BG", | 79 | .name = "BGH", |
80 | .std = V4L2_STD_PAL_BG, | 80 | .std = V4L2_STD_B | V4L2_STD_GH, |
81 | .carr = 5500, | 81 | .carr = 5500, |
82 | },{ | 82 | },{ |
83 | .name = "I", | 83 | .name = "I", |
@@ -85,7 +85,7 @@ static struct mainscan { | |||
85 | .carr = 6000, | 85 | .carr = 6000, |
86 | },{ | 86 | },{ |
87 | .name = "DKL", | 87 | .name = "DKL", |
88 | .std = V4L2_STD_PAL_DK | V4L2_STD_SECAM, | 88 | .std = V4L2_STD_DK | V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC, |
89 | .carr = 6500, | 89 | .carr = 6500, |
90 | } | 90 | } |
91 | }; | 91 | }; |
@@ -93,76 +93,70 @@ static struct mainscan { | |||
93 | static struct saa7134_tvaudio tvaudio[] = { | 93 | static struct saa7134_tvaudio tvaudio[] = { |
94 | { | 94 | { |
95 | .name = "PAL-B/G FM-stereo", | 95 | .name = "PAL-B/G FM-stereo", |
96 | .std = V4L2_STD_PAL, | 96 | .std = V4L2_STD_PAL_BG, |
97 | .mode = TVAUDIO_FM_BG_STEREO, | 97 | .mode = TVAUDIO_FM_BG_STEREO, |
98 | .carr1 = 5500, | 98 | .carr1 = 5500, |
99 | .carr2 = 5742, | 99 | .carr2 = 5742, |
100 | },{ | 100 | },{ |
101 | .name = "PAL-D/K1 FM-stereo", | 101 | .name = "PAL-D/K1 FM-stereo", |
102 | .std = V4L2_STD_PAL, | 102 | .std = V4L2_STD_PAL_DK, |
103 | .carr1 = 6500, | 103 | .carr1 = 6500, |
104 | .carr2 = 6258, | 104 | .carr2 = 6258, |
105 | .mode = TVAUDIO_FM_BG_STEREO, | 105 | .mode = TVAUDIO_FM_BG_STEREO, |
106 | },{ | 106 | },{ |
107 | .name = "PAL-D/K2 FM-stereo", | 107 | .name = "PAL-D/K2 FM-stereo", |
108 | .std = V4L2_STD_PAL, | 108 | .std = V4L2_STD_PAL_DK, |
109 | .carr1 = 6500, | 109 | .carr1 = 6500, |
110 | .carr2 = 6742, | 110 | .carr2 = 6742, |
111 | .mode = TVAUDIO_FM_BG_STEREO, | 111 | .mode = TVAUDIO_FM_BG_STEREO, |
112 | },{ | 112 | },{ |
113 | .name = "PAL-D/K3 FM-stereo", | 113 | .name = "PAL-D/K3 FM-stereo", |
114 | .std = V4L2_STD_PAL, | 114 | .std = V4L2_STD_PAL_DK, |
115 | .carr1 = 6500, | 115 | .carr1 = 6500, |
116 | .carr2 = 5742, | 116 | .carr2 = 5742, |
117 | .mode = TVAUDIO_FM_BG_STEREO, | 117 | .mode = TVAUDIO_FM_BG_STEREO, |
118 | },{ | 118 | },{ |
119 | .name = "PAL-B/G NICAM", | 119 | .name = "PAL-B/G NICAM", |
120 | .std = V4L2_STD_PAL, | 120 | .std = V4L2_STD_PAL_BG, |
121 | .carr1 = 5500, | 121 | .carr1 = 5500, |
122 | .carr2 = 5850, | 122 | .carr2 = 5850, |
123 | .mode = TVAUDIO_NICAM_FM, | 123 | .mode = TVAUDIO_NICAM_FM, |
124 | },{ | 124 | },{ |
125 | .name = "PAL-I NICAM", | 125 | .name = "PAL-I NICAM", |
126 | .std = V4L2_STD_PAL, | 126 | .std = V4L2_STD_PAL_I, |
127 | .carr1 = 6000, | 127 | .carr1 = 6000, |
128 | .carr2 = 6552, | 128 | .carr2 = 6552, |
129 | .mode = TVAUDIO_NICAM_FM, | 129 | .mode = TVAUDIO_NICAM_FM, |
130 | },{ | 130 | },{ |
131 | .name = "PAL-D/K NICAM", | 131 | .name = "PAL-D/K NICAM", |
132 | .std = V4L2_STD_PAL, | 132 | .std = V4L2_STD_PAL_DK, |
133 | .carr1 = 6500, | 133 | .carr1 = 6500, |
134 | .carr2 = 5850, | 134 | .carr2 = 5850, |
135 | .mode = TVAUDIO_NICAM_FM, | 135 | .mode = TVAUDIO_NICAM_FM, |
136 | },{ | 136 | },{ |
137 | .name = "SECAM-L NICAM", | 137 | .name = "SECAM-L NICAM", |
138 | .std = V4L2_STD_SECAM, | 138 | .std = V4L2_STD_SECAM_L, |
139 | .carr1 = 6500, | 139 | .carr1 = 6500, |
140 | .carr2 = 5850, | 140 | .carr2 = 5850, |
141 | .mode = TVAUDIO_NICAM_AM, | 141 | .mode = TVAUDIO_NICAM_AM, |
142 | },{ | 142 | },{ |
143 | .name = "SECAM-L MONO", | 143 | .name = "SECAM-D/K NICAM", |
144 | .std = V4L2_STD_SECAM, | 144 | .std = V4L2_STD_SECAM_DK, |
145 | .carr1 = 6500, | 145 | .carr1 = 6500, |
146 | .carr2 = -1, | 146 | .carr2 = 5850, |
147 | .mode = TVAUDIO_AM_MONO, | 147 | .mode = TVAUDIO_NICAM_FM, |
148 | },{ | 148 | },{ |
149 | .name = "SECAM-D/K", | 149 | .name = "NTSC-A2 FM-stereo", |
150 | .std = V4L2_STD_SECAM, | 150 | .std = V4L2_STD_NTSC, |
151 | .carr1 = 6500, | 151 | .carr1 = 4500, |
152 | .carr2 = -1, | 152 | .carr2 = 4724, |
153 | .mode = TVAUDIO_FM_MONO, | 153 | .mode = TVAUDIO_FM_K_STEREO, |
154 | },{ | 154 | },{ |
155 | .name = "NTSC-M", | 155 | .name = "NTSC-M", |
156 | .std = V4L2_STD_NTSC, | 156 | .std = V4L2_STD_NTSC, |
157 | .carr1 = 4500, | 157 | .carr1 = 4500, |
158 | .carr2 = -1, | 158 | .carr2 = -1, |
159 | .mode = TVAUDIO_FM_MONO, | 159 | .mode = TVAUDIO_FM_MONO, |
160 | },{ | ||
161 | .name = "NTSC-A2 FM-stereo", | ||
162 | .std = V4L2_STD_NTSC, | ||
163 | .carr1 = 4500, | ||
164 | .carr2 = 4724, | ||
165 | .mode = TVAUDIO_FM_K_STEREO, | ||
166 | } | 160 | } |
167 | }; | 161 | }; |
168 | #define TVAUDIO (sizeof(tvaudio)/sizeof(struct saa7134_tvaudio)) | 162 | #define TVAUDIO (sizeof(tvaudio)/sizeof(struct saa7134_tvaudio)) |
@@ -340,12 +334,6 @@ static void tvaudio_setmode(struct saa7134_dev *dev, | |||
340 | saa_writeb(SAA7134_STEREO_DAC_OUTPUT_SELECT, 0xa1); | 334 | saa_writeb(SAA7134_STEREO_DAC_OUTPUT_SELECT, 0xa1); |
341 | saa_writeb(SAA7134_NICAM_CONFIG, 0x00); | 335 | saa_writeb(SAA7134_NICAM_CONFIG, 0x00); |
342 | break; | 336 | break; |
343 | case TVAUDIO_AM_MONO: | ||
344 | saa_writeb(SAA7134_DEMODULATOR, 0x12); | ||
345 | saa_writeb(SAA7134_DCXO_IDENT_CTRL, 0x00); | ||
346 | saa_writeb(SAA7134_FM_DEEMPHASIS, 0x44); | ||
347 | saa_writeb(SAA7134_STEREO_DAC_OUTPUT_SELECT, 0xa0); | ||
348 | break; | ||
349 | case TVAUDIO_FM_SAT_STEREO: | 337 | case TVAUDIO_FM_SAT_STEREO: |
350 | /* not implemented (yet) */ | 338 | /* not implemented (yet) */ |
351 | break; | 339 | break; |
@@ -390,7 +378,6 @@ static int tvaudio_checkcarrier(struct saa7134_dev *dev, struct mainscan *scan) | |||
390 | } | 378 | } |
391 | printk("\n"); | 379 | printk("\n"); |
392 | } | 380 | } |
393 | |||
394 | if (dev->tvnorm->id & scan->std) { | 381 | if (dev->tvnorm->id & scan->std) { |
395 | tvaudio_setcarrier(dev,scan->carr-90,scan->carr-90); | 382 | tvaudio_setcarrier(dev,scan->carr-90,scan->carr-90); |
396 | saa_readl(SAA7134_LEVEL_READOUT1 >> 2); | 383 | saa_readl(SAA7134_LEVEL_READOUT1 >> 2); |
@@ -426,7 +413,6 @@ static int tvaudio_getstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *au | |||
426 | 413 | ||
427 | switch (audio->mode) { | 414 | switch (audio->mode) { |
428 | case TVAUDIO_FM_MONO: | 415 | case TVAUDIO_FM_MONO: |
429 | case TVAUDIO_AM_MONO: | ||
430 | return V4L2_TUNER_SUB_MONO; | 416 | return V4L2_TUNER_SUB_MONO; |
431 | case TVAUDIO_FM_K_STEREO: | 417 | case TVAUDIO_FM_K_STEREO: |
432 | case TVAUDIO_FM_BG_STEREO: | 418 | case TVAUDIO_FM_BG_STEREO: |
@@ -495,7 +481,6 @@ static int tvaudio_setstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *au | |||
495 | 481 | ||
496 | switch (audio->mode) { | 482 | switch (audio->mode) { |
497 | case TVAUDIO_FM_MONO: | 483 | case TVAUDIO_FM_MONO: |
498 | case TVAUDIO_AM_MONO: | ||
499 | /* nothing to do ... */ | 484 | /* nothing to do ... */ |
500 | break; | 485 | break; |
501 | case TVAUDIO_FM_K_STEREO: | 486 | case TVAUDIO_FM_K_STEREO: |
@@ -556,6 +541,7 @@ static int tvaudio_thread(void *data) | |||
556 | 541 | ||
557 | if (1 == nscan) { | 542 | if (1 == nscan) { |
558 | /* only one candidate -- skip scan ;) */ | 543 | /* only one candidate -- skip scan ;) */ |
544 | dprintk("only one main carrier candidate - skipping scan\n"); | ||
559 | max1 = 12345; | 545 | max1 = 12345; |
560 | carrier = default_carrier; | 546 | carrier = default_carrier; |
561 | } else { | 547 | } else { |
@@ -603,7 +589,6 @@ static int tvaudio_thread(void *data) | |||
603 | dev->automute = 0; | 589 | dev->automute = 0; |
604 | saa_andorb(SAA7134_STEREO_DAC_OUTPUT_SELECT, 0x30, 0x00); | 590 | saa_andorb(SAA7134_STEREO_DAC_OUTPUT_SELECT, 0x30, 0x00); |
605 | saa7134_tvaudio_setmute(dev); | 591 | saa7134_tvaudio_setmute(dev); |
606 | |||
607 | /* find the exact tv audio norm */ | 592 | /* find the exact tv audio norm */ |
608 | for (audio = UNSET, i = 0; i < TVAUDIO; i++) { | 593 | for (audio = UNSET, i = 0; i < TVAUDIO; i++) { |
609 | if (dev->tvnorm->id != UNSET && | 594 | if (dev->tvnorm->id != UNSET && |
@@ -611,7 +596,7 @@ static int tvaudio_thread(void *data) | |||
611 | continue; | 596 | continue; |
612 | if (tvaudio[i].carr1 != carrier) | 597 | if (tvaudio[i].carr1 != carrier) |
613 | continue; | 598 | continue; |
614 | 599 | /* Note: at least the primary carrier is right here */ | |
615 | if (UNSET == audio) | 600 | if (UNSET == audio) |
616 | audio = i; | 601 | audio = i; |
617 | tvaudio_setmode(dev,&tvaudio[i],"trying"); | 602 | tvaudio_setmode(dev,&tvaudio[i],"trying"); |
@@ -626,6 +611,7 @@ static int tvaudio_thread(void *data) | |||
626 | if (UNSET == audio) | 611 | if (UNSET == audio) |
627 | continue; | 612 | continue; |
628 | tvaudio_setmode(dev,&tvaudio[audio],"using"); | 613 | tvaudio_setmode(dev,&tvaudio[audio],"using"); |
614 | |||
629 | tvaudio_setstereo(dev,&tvaudio[audio],V4L2_TUNER_MODE_MONO); | 615 | tvaudio_setstereo(dev,&tvaudio[audio],V4L2_TUNER_MODE_MONO); |
630 | dev->tvaudio = &tvaudio[audio]; | 616 | dev->tvaudio = &tvaudio[audio]; |
631 | 617 | ||
@@ -750,7 +736,6 @@ static int mute_input_7133(struct saa7134_dev *dev) | |||
750 | int mask; | 736 | int mask; |
751 | struct saa7134_input *in; | 737 | struct saa7134_input *in; |
752 | 738 | ||
753 | /* Hac 0506 route OSS sound simultanously */ | ||
754 | xbarin = 0x03; | 739 | xbarin = 0x03; |
755 | switch (dev->input->amux) { | 740 | switch (dev->input->amux) { |
756 | case TV: | 741 | case TV: |
@@ -834,18 +819,16 @@ static int tvaudio_thread_ddep(void *data) | |||
834 | } else { | 819 | } else { |
835 | /* (let chip) scan for sound carrier */ | 820 | /* (let chip) scan for sound carrier */ |
836 | norms = 0; | 821 | norms = 0; |
837 | if (dev->tvnorm->id & V4L2_STD_PAL) { | 822 | if (dev->tvnorm->id & (V4L2_STD_B | V4L2_STD_GH)) |
838 | dprintk("PAL scan\n"); | 823 | norms |= 0x04; |
839 | norms |= 0x2c; /* B/G + D/K + I */ | 824 | if (dev->tvnorm->id & V4L2_STD_PAL_I) |
840 | } | 825 | norms |= 0x20; |
841 | if (dev->tvnorm->id & V4L2_STD_NTSC) { | 826 | if (dev->tvnorm->id & V4L2_STD_DK) |
842 | dprintk("NTSC scan\n"); | 827 | norms |= 0x08; |
843 | norms |= 0x40; /* M */ | 828 | if (dev->tvnorm->id & V4L2_STD_MN) |
844 | } | 829 | norms |= 0x40; |
845 | if (dev->tvnorm->id & V4L2_STD_SECAM) { | 830 | if (dev->tvnorm->id & (V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC)) |
846 | dprintk("SECAM scan\n"); | 831 | norms |= 0x10; |
847 | norms |= 0x18; /* L + D/K */ | ||
848 | } | ||
849 | if (0 == norms) | 832 | if (0 == norms) |
850 | norms = 0x7c; /* all */ | 833 | norms = 0x7c; /* all */ |
851 | dprintk("scanning:%s%s%s%s%s\n", | 834 | dprintk("scanning:%s%s%s%s%s\n", |
@@ -1034,7 +1017,11 @@ int saa7134_tvaudio_fini(struct saa7134_dev *dev) | |||
1034 | 1017 | ||
1035 | int saa7134_tvaudio_do_scan(struct saa7134_dev *dev) | 1018 | int saa7134_tvaudio_do_scan(struct saa7134_dev *dev) |
1036 | { | 1019 | { |
1037 | if (dev->thread.pid >= 0) { | 1020 | if (dev->input->amux != TV) { |
1021 | dprintk("sound IF not in use, skipping scan\n"); | ||
1022 | dev->automute = 0; | ||
1023 | saa7134_tvaudio_setmute(dev); | ||
1024 | } else if (dev->thread.pid >= 0) { | ||
1038 | dev->thread.mode = UNSET; | 1025 | dev->thread.mode = UNSET; |
1039 | dev->thread.scan2++; | 1026 | dev->thread.scan2++; |
1040 | wake_up_interruptible(&dev->thread.wq); | 1027 | wake_up_interruptible(&dev->thread.wq); |
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 2c171af9a9f2..203302f21827 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -43,12 +43,16 @@ static unsigned int gbuffers = 8; | |||
43 | static unsigned int noninterlaced = 1; | 43 | static unsigned int noninterlaced = 1; |
44 | static unsigned int gbufsize = 720*576*4; | 44 | static unsigned int gbufsize = 720*576*4; |
45 | static unsigned int gbufsize_max = 720*576*4; | 45 | static unsigned int gbufsize_max = 720*576*4; |
46 | static char secam[] = "--"; | ||
46 | module_param(video_debug, int, 0644); | 47 | module_param(video_debug, int, 0644); |
47 | MODULE_PARM_DESC(video_debug,"enable debug messages [video]"); | 48 | MODULE_PARM_DESC(video_debug,"enable debug messages [video]"); |
48 | module_param(gbuffers, int, 0444); | 49 | module_param(gbuffers, int, 0444); |
49 | MODULE_PARM_DESC(gbuffers,"number of capture buffers, range 2-32"); | 50 | MODULE_PARM_DESC(gbuffers,"number of capture buffers, range 2-32"); |
50 | module_param(noninterlaced, int, 0644); | 51 | module_param(noninterlaced, int, 0644); |
51 | MODULE_PARM_DESC(noninterlaced,"capture non interlaced video"); | 52 | MODULE_PARM_DESC(noninterlaced,"capture non interlaced video"); |
53 | module_param_string(secam, secam, sizeof(secam), 0644); | ||
54 | MODULE_PARM_DESC(secam, "force SECAM variant, either DK,L or Lc"); | ||
55 | |||
52 | 56 | ||
53 | #define dprintk(fmt, arg...) if (video_debug) \ | 57 | #define dprintk(fmt, arg...) if (video_debug) \ |
54 | printk(KERN_DEBUG "%s/video: " fmt, dev->name , ## arg) | 58 | printk(KERN_DEBUG "%s/video: " fmt, dev->name , ## arg) |
@@ -279,7 +283,43 @@ static struct saa7134_tvnorm tvnorms[] = { | |||
279 | .id = V4L2_STD_SECAM, | 283 | .id = V4L2_STD_SECAM, |
280 | NORM_625_50, | 284 | NORM_625_50, |
281 | 285 | ||
282 | .sync_control = 0x18, /* old: 0x58, */ | 286 | .sync_control = 0x18, |
287 | .luma_control = 0x1b, | ||
288 | .chroma_ctrl1 = 0xd1, | ||
289 | .chroma_gain = 0x80, | ||
290 | .chroma_ctrl2 = 0x00, | ||
291 | .vgate_misc = 0x1c, | ||
292 | |||
293 | },{ | ||
294 | .name = "SECAM-DK", | ||
295 | .id = V4L2_STD_SECAM_DK, | ||
296 | NORM_625_50, | ||
297 | |||
298 | .sync_control = 0x18, | ||
299 | .luma_control = 0x1b, | ||
300 | .chroma_ctrl1 = 0xd1, | ||
301 | .chroma_gain = 0x80, | ||
302 | .chroma_ctrl2 = 0x00, | ||
303 | .vgate_misc = 0x1c, | ||
304 | |||
305 | },{ | ||
306 | .name = "SECAM-L", | ||
307 | .id = V4L2_STD_SECAM_L, | ||
308 | NORM_625_50, | ||
309 | |||
310 | .sync_control = 0x18, | ||
311 | .luma_control = 0x1b, | ||
312 | .chroma_ctrl1 = 0xd1, | ||
313 | .chroma_gain = 0x80, | ||
314 | .chroma_ctrl2 = 0x00, | ||
315 | .vgate_misc = 0x1c, | ||
316 | |||
317 | },{ | ||
318 | .name = "SECAM-Lc", | ||
319 | .id = V4L2_STD_SECAM_LC, | ||
320 | NORM_625_50, | ||
321 | |||
322 | .sync_control = 0x18, | ||
283 | .luma_control = 0x1b, | 323 | .luma_control = 0x1b, |
284 | .chroma_ctrl1 = 0xd1, | 324 | .chroma_ctrl1 = 0xd1, |
285 | .chroma_gain = 0x80, | 325 | .chroma_gain = 0x80, |
@@ -1769,6 +1809,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, | |||
1769 | { | 1809 | { |
1770 | v4l2_std_id *id = arg; | 1810 | v4l2_std_id *id = arg; |
1771 | unsigned int i; | 1811 | unsigned int i; |
1812 | v4l2_std_id fixup; | ||
1772 | 1813 | ||
1773 | for (i = 0; i < TVNORMS; i++) | 1814 | for (i = 0; i < TVNORMS; i++) |
1774 | if (*id == tvnorms[i].id) | 1815 | if (*id == tvnorms[i].id) |
@@ -1779,7 +1820,22 @@ static int video_do_ioctl(struct inode *inode, struct file *file, | |||
1779 | break; | 1820 | break; |
1780 | if (i == TVNORMS) | 1821 | if (i == TVNORMS) |
1781 | return -EINVAL; | 1822 | return -EINVAL; |
1782 | 1823 | if ((*id & V4L2_STD_SECAM) && (secam[0] != '-')) { | |
1824 | if (secam[0] == 'L' || secam[0] == 'l') { | ||
1825 | if (secam[1] == 'C' || secam[1] == 'c') | ||
1826 | fixup = V4L2_STD_SECAM_LC; | ||
1827 | else | ||
1828 | fixup = V4L2_STD_SECAM_L; | ||
1829 | } else { | ||
1830 | if (secam[0] == 'D' || secam[0] == 'd') | ||
1831 | fixup = V4L2_STD_SECAM_DK; | ||
1832 | else | ||
1833 | fixup = V4L2_STD_SECAM; | ||
1834 | } | ||
1835 | for (i = 0; i < TVNORMS; i++) | ||
1836 | if (fixup == tvnorms[i].id) | ||
1837 | break; | ||
1838 | } | ||
1783 | mutex_lock(&dev->lock); | 1839 | mutex_lock(&dev->lock); |
1784 | if (res_check(fh, RESOURCE_OVERLAY)) { | 1840 | if (res_check(fh, RESOURCE_OVERLAY)) { |
1785 | spin_lock_irqsave(&dev->slock,flags); | 1841 | spin_lock_irqsave(&dev->slock,flags); |
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index 701a90942108..7cf96b430250 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h | |||
@@ -61,7 +61,6 @@ enum saa7134_tvaudio_mode { | |||
61 | TVAUDIO_FM_K_STEREO = 4, | 61 | TVAUDIO_FM_K_STEREO = 4, |
62 | TVAUDIO_NICAM_AM = 5, | 62 | TVAUDIO_NICAM_AM = 5, |
63 | TVAUDIO_NICAM_FM = 6, | 63 | TVAUDIO_NICAM_FM = 6, |
64 | TVAUDIO_AM_MONO = 7 | ||
65 | }; | 64 | }; |
66 | 65 | ||
67 | enum saa7134_audio_in { | 66 | enum saa7134_audio_in { |
@@ -227,6 +226,7 @@ struct saa7134_format { | |||
227 | #define SAA7134_BOARD_FLYDVBS_LR300 97 | 226 | #define SAA7134_BOARD_FLYDVBS_LR300 97 |
228 | #define SAA7134_BOARD_PROTEUS_2309 98 | 227 | #define SAA7134_BOARD_PROTEUS_2309 98 |
229 | #define SAA7134_BOARD_AVERMEDIA_A16AR 99 | 228 | #define SAA7134_BOARD_AVERMEDIA_A16AR 99 |
229 | #define SAA7134_BOARD_ASUS_EUROPA2_HYBRID 100 | ||
230 | 230 | ||
231 | #define SAA7134_MAXBOARDS 8 | 231 | #define SAA7134_MAXBOARDS 8 |
232 | #define SAA7134_INPUT_MAX 8 | 232 | #define SAA7134_INPUT_MAX 8 |
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index cd1502ac9560..e6baaee038bf 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c | |||
@@ -222,8 +222,8 @@ hauppauge_tuner[] = | |||
222 | { TUNER_TCL_2002MB, "TCL M2523_3DB_E"}, | 222 | { TUNER_TCL_2002MB, "TCL M2523_3DB_E"}, |
223 | { TUNER_ABSENT, "Philips 8275A"}, | 223 | { TUNER_ABSENT, "Philips 8275A"}, |
224 | { TUNER_ABSENT, "Microtune MT2060"}, | 224 | { TUNER_ABSENT, "Microtune MT2060"}, |
225 | { TUNER_ABSENT, "Philips FM1236 MK5"}, | 225 | { TUNER_PHILIPS_FM1236_MK3, "Philips FM1236 MK5"}, |
226 | { TUNER_ABSENT, "Philips FM1216ME MK5"}, | 226 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FM1216ME MK5"}, |
227 | { TUNER_ABSENT, "TCL M2523_3DI_E"}, | 227 | { TUNER_ABSENT, "TCL M2523_3DI_E"}, |
228 | { TUNER_ABSENT, "Samsung THPD5222FG30A"}, | 228 | { TUNER_ABSENT, "Samsung THPD5222FG30A"}, |
229 | /* 120-129 */ | 229 | /* 120-129 */ |
diff --git a/drivers/media/video/zoran_card.c b/drivers/media/video/zoran_card.c index 9f21d0ba0f0f..653822ce391c 100644 --- a/drivers/media/video/zoran_card.c +++ b/drivers/media/video/zoran_card.c | |||
@@ -1278,9 +1278,7 @@ find_zr36057 (void) | |||
1278 | 1278 | ||
1279 | zoran_num = 0; | 1279 | zoran_num = 0; |
1280 | while (zoran_num < BUZ_MAX && | 1280 | while (zoran_num < BUZ_MAX && |
1281 | (dev = | 1281 | (dev = pci_get_device(PCI_VENDOR_ID_ZORAN, PCI_DEVICE_ID_ZORAN_36057, dev)) != NULL) { |
1282 | pci_find_device(PCI_VENDOR_ID_ZORAN, | ||
1283 | PCI_DEVICE_ID_ZORAN_36057, dev)) != NULL) { | ||
1284 | card_num = card[zoran_num]; | 1282 | card_num = card[zoran_num]; |
1285 | zr = &zoran[zoran_num]; | 1283 | zr = &zoran[zoran_num]; |
1286 | memset(zr, 0, sizeof(struct zoran)); // Just in case if previous cycle failed | 1284 | memset(zr, 0, sizeof(struct zoran)); // Just in case if previous cycle failed |
@@ -1541,7 +1539,8 @@ find_zr36057 (void) | |||
1541 | goto zr_detach_vfe; | 1539 | goto zr_detach_vfe; |
1542 | } | 1540 | } |
1543 | } | 1541 | } |
1544 | 1542 | /* Success so keep the pci_dev referenced */ | |
1543 | pci_dev_get(zr->pci_dev); | ||
1545 | zoran_num++; | 1544 | zoran_num++; |
1546 | continue; | 1545 | continue; |
1547 | 1546 | ||
@@ -1563,6 +1562,9 @@ find_zr36057 (void) | |||
1563 | iounmap(zr->zr36057_mem); | 1562 | iounmap(zr->zr36057_mem); |
1564 | continue; | 1563 | continue; |
1565 | } | 1564 | } |
1565 | if (dev) /* Clean up ref count on early exit */ | ||
1566 | pci_dev_put(dev); | ||
1567 | |||
1566 | if (zoran_num == 0) { | 1568 | if (zoran_num == 0) { |
1567 | dprintk(1, KERN_INFO "No known MJPEG cards found.\n"); | 1569 | dprintk(1, KERN_INFO "No known MJPEG cards found.\n"); |
1568 | } | 1570 | } |
diff --git a/drivers/media/video/zr36120.c b/drivers/media/video/zr36120.c index 9240638a0134..b5ffe53c40d8 100644 --- a/drivers/media/video/zr36120.c +++ b/drivers/media/video/zr36120.c | |||
@@ -1840,16 +1840,16 @@ int __init find_zoran(void) | |||
1840 | struct zoran *ztv; | 1840 | struct zoran *ztv; |
1841 | struct pci_dev *dev = NULL; | 1841 | struct pci_dev *dev = NULL; |
1842 | unsigned char revision; | 1842 | unsigned char revision; |
1843 | int zoran_num=0; | 1843 | int zoran_num = 0; |
1844 | 1844 | ||
1845 | while ((dev = pci_find_device(PCI_VENDOR_ID_ZORAN,PCI_DEVICE_ID_ZORAN_36120, dev))) | 1845 | while ((dev = pci_get_device(PCI_VENDOR_ID_ZORAN,PCI_DEVICE_ID_ZORAN_36120, dev))) |
1846 | { | 1846 | { |
1847 | /* Ok, a ZR36120/ZR36125 found! */ | 1847 | /* Ok, a ZR36120/ZR36125 found! */ |
1848 | ztv = &zorans[zoran_num]; | 1848 | ztv = &zorans[zoran_num]; |
1849 | ztv->dev = dev; | 1849 | ztv->dev = dev; |
1850 | 1850 | ||
1851 | if (pci_enable_device(dev)) | 1851 | if (pci_enable_device(dev)) |
1852 | return -EIO; | 1852 | continue; |
1853 | 1853 | ||
1854 | pci_read_config_byte(dev, PCI_CLASS_REVISION, &revision); | 1854 | pci_read_config_byte(dev, PCI_CLASS_REVISION, &revision); |
1855 | printk(KERN_INFO "zoran: Zoran %x (rev %d) ", | 1855 | printk(KERN_INFO "zoran: Zoran %x (rev %d) ", |
@@ -1867,17 +1867,18 @@ int __init find_zoran(void) | |||
1867 | { | 1867 | { |
1868 | iounmap(ztv->zoran_mem); | 1868 | iounmap(ztv->zoran_mem); |
1869 | printk(KERN_ERR "zoran: Bad irq number or handler\n"); | 1869 | printk(KERN_ERR "zoran: Bad irq number or handler\n"); |
1870 | return -EINVAL; | 1870 | continue; |
1871 | } | 1871 | } |
1872 | if (result==-EBUSY) | 1872 | if (result==-EBUSY) |
1873 | printk(KERN_ERR "zoran: IRQ %d busy, change your PnP config in BIOS\n",dev->irq); | 1873 | printk(KERN_ERR "zoran: IRQ %d busy, change your PnP config in BIOS\n",dev->irq); |
1874 | if (result < 0) { | 1874 | if (result < 0) { |
1875 | iounmap(ztv->zoran_mem); | 1875 | iounmap(ztv->zoran_mem); |
1876 | return result; | 1876 | continue; |
1877 | } | 1877 | } |
1878 | /* Enable bus-mastering */ | 1878 | /* Enable bus-mastering */ |
1879 | pci_set_master(dev); | 1879 | pci_set_master(dev); |
1880 | 1880 | /* Keep a reference */ | |
1881 | pci_dev_get(dev); | ||
1881 | zoran_num++; | 1882 | zoran_num++; |
1882 | } | 1883 | } |
1883 | if(zoran_num) | 1884 | if(zoran_num) |
@@ -2041,6 +2042,9 @@ void release_zoran(int max) | |||
2041 | if (ztv->zoran_mem) | 2042 | if (ztv->zoran_mem) |
2042 | iounmap(ztv->zoran_mem); | 2043 | iounmap(ztv->zoran_mem); |
2043 | 2044 | ||
2045 | /* Drop PCI device */ | ||
2046 | pci_dev_put(ztv->dev); | ||
2047 | |||
2044 | video_unregister_device(&ztv->video_dev); | 2048 | video_unregister_device(&ztv->video_dev); |
2045 | video_unregister_device(&ztv->vbi_dev); | 2049 | video_unregister_device(&ztv->vbi_dev); |
2046 | } | 2050 | } |
@@ -2057,13 +2061,12 @@ int __init zr36120_init(void) | |||
2057 | 2061 | ||
2058 | handle_chipset(); | 2062 | handle_chipset(); |
2059 | zoran_cards = find_zoran(); | 2063 | zoran_cards = find_zoran(); |
2060 | if (zoran_cards<0) | 2064 | if (zoran_cards <= 0) |
2061 | /* no cards found, no need for a driver */ | ||
2062 | return -EIO; | 2065 | return -EIO; |
2063 | 2066 | ||
2064 | /* initialize Zorans */ | 2067 | /* initialize Zorans */ |
2065 | for (card=0; card<zoran_cards; card++) { | 2068 | for (card=0; card<zoran_cards; card++) { |
2066 | if (init_zoran(card)<0) { | 2069 | if (init_zoran(card) < 0) { |
2067 | /* only release the zorans we have registered */ | 2070 | /* only release the zorans we have registered */ |
2068 | release_zoran(card); | 2071 | release_zoran(card); |
2069 | return -EIO; | 2072 | return -EIO; |
diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c index cef00744a9dc..d231efa624d4 100644 --- a/drivers/net/arm/ep93xx_eth.c +++ b/drivers/net/arm/ep93xx_eth.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * (at your option) any later version. | 9 | * (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c index 1328e10caa35..baaae3dbf2e6 100644 --- a/drivers/net/fs_enet/mii-fec.c +++ b/drivers/net/fs_enet/mii-fec.c | |||
@@ -12,8 +12,6 @@ | |||
12 | * kind, whether express or implied. | 12 | * kind, whether express or implied. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | |||
16 | #include <linux/config.h> | ||
17 | #include <linux/module.h> | 15 | #include <linux/module.h> |
18 | #include <linux/types.h> | 16 | #include <linux/types.h> |
19 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index 21dc68eff514..a43e24245b7e 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c | |||
@@ -21,8 +21,6 @@ | |||
21 | * | 21 | * |
22 | *************************************************************************/ | 22 | *************************************************************************/ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | |||
26 | #define DRV_NAME "pcnet32" | 24 | #define DRV_NAME "pcnet32" |
27 | #ifdef CONFIG_PCNET32_NAPI | 25 | #ifdef CONFIG_PCNET32_NAPI |
28 | #define DRV_VERSION "1.33-NAPI" | 26 | #define DRV_VERSION "1.33-NAPI" |
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c index 94b47c8d0ab4..f14e99276dba 100644 --- a/drivers/net/phy/fixed.c +++ b/drivers/net/phy/fixed.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * option) any later version. | 13 | * option) any later version. |
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | #include <linux/config.h> | ||
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
19 | #include <linux/string.h> | 18 | #include <linux/string.h> |
diff --git a/drivers/net/ucc_geth_phy.c b/drivers/net/ucc_geth_phy.c index f91028c5386d..67260eb3188a 100644 --- a/drivers/net/ucc_geth_phy.c +++ b/drivers/net/ucc_geth_phy.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
22 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
23 | #include <linux/string.h> | 22 | #include <linux/string.h> |
diff --git a/drivers/rtc/rtc-max6902.c b/drivers/rtc/rtc-max6902.c index 2f0b77724192..0b20dfacbf59 100644 --- a/drivers/rtc/rtc-max6902.c +++ b/drivers/rtc/rtc-max6902.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * - Initial driver creation. | 19 | * - Initial driver creation. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/module.h> | 22 | #include <linux/module.h> |
24 | #include <linux/version.h> | 23 | #include <linux/version.h> |
25 | 24 | ||
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index ee2ccad70487..734adc9d5206 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * | 24 | * |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/module.h> | 27 | #include <linux/module.h> |
29 | #include <linux/init.h> | 28 | #include <linux/init.h> |
30 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
diff --git a/drivers/scsi/imm.h b/drivers/scsi/imm.h index ece936ac29c7..8f6f32fc61ff 100644 --- a/drivers/scsi/imm.h +++ b/drivers/scsi/imm.h | |||
@@ -66,7 +66,6 @@ | |||
66 | */ | 66 | */ |
67 | /* ------ END OF USER CONFIGURABLE PARAMETERS ----- */ | 67 | /* ------ END OF USER CONFIGURABLE PARAMETERS ----- */ |
68 | 68 | ||
69 | #include <linux/config.h> | ||
70 | #include <linux/stddef.h> | 69 | #include <linux/stddef.h> |
71 | #include <linux/module.h> | 70 | #include <linux/module.h> |
72 | #include <linux/kernel.h> | 71 | #include <linux/kernel.h> |
diff --git a/drivers/scsi/ppa.h b/drivers/scsi/ppa.h index 7511df3588e4..ba8021427b88 100644 --- a/drivers/scsi/ppa.h +++ b/drivers/scsi/ppa.h | |||
@@ -73,7 +73,6 @@ | |||
73 | */ | 73 | */ |
74 | /* ------ END OF USER CONFIGURABLE PARAMETERS ----- */ | 74 | /* ------ END OF USER CONFIGURABLE PARAMETERS ----- */ |
75 | 75 | ||
76 | #include <linux/config.h> | ||
77 | #include <linux/stddef.h> | 76 | #include <linux/stddef.h> |
78 | #include <linux/module.h> | 77 | #include <linux/module.h> |
79 | #include <linux/kernel.h> | 78 | #include <linux/kernel.h> |
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 8edee745888a..b0d502622d94 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig | |||
@@ -299,33 +299,33 @@ config SERIAL_AMBA_PL011_CONSOLE | |||
299 | your boot loader (lilo or loadlin) about how to pass options to the | 299 | your boot loader (lilo or loadlin) about how to pass options to the |
300 | kernel at boot time.) | 300 | kernel at boot time.) |
301 | 301 | ||
302 | config SERIAL_AT91 | 302 | config SERIAL_ATMEL |
303 | bool "AT91RM9200 / AT91SAM9261 serial port support" | 303 | bool "AT91 / AT32 on-chip serial port support" |
304 | depends on ARM && (ARCH_AT91RM9200 || ARCH_AT91SAM9261) | 304 | depends on (ARM && ARCH_AT91) || AVR32 |
305 | select SERIAL_CORE | 305 | select SERIAL_CORE |
306 | help | 306 | help |
307 | This enables the driver for the on-chip UARTs of the Atmel | 307 | This enables the driver for the on-chip UARTs of the Atmel |
308 | AT91RM9200 and AT91SAM926 processor. | 308 | AT91 and AT32 processors. |
309 | 309 | ||
310 | config SERIAL_AT91_CONSOLE | 310 | config SERIAL_ATMEL_CONSOLE |
311 | bool "Support for console on AT91RM9200 / AT91SAM9261 serial port" | 311 | bool "Support for console on AT91 / AT32 serial port" |
312 | depends on SERIAL_AT91=y | 312 | depends on SERIAL_ATMEL=y |
313 | select SERIAL_CORE_CONSOLE | 313 | select SERIAL_CORE_CONSOLE |
314 | help | 314 | help |
315 | Say Y here if you wish to use a UART on the Atmel AT91RM9200 or | 315 | Say Y here if you wish to use an on-chip UART on a Atmel |
316 | AT91SAM9261 as the system console (the system console is the device | 316 | AT91 or AT32 processor as the system console (the system |
317 | which receives all kernel messages and warnings and which allows | 317 | console is the device which receives all kernel messages and |
318 | logins in single user mode). | 318 | warnings and which allows logins in single user mode). |
319 | 319 | ||
320 | config SERIAL_AT91_TTYAT | 320 | config SERIAL_ATMEL_TTYAT |
321 | bool "Install as device ttyAT0-4 instead of ttyS0-4" | 321 | bool "Install as device ttyATn instead of ttySn" |
322 | depends on SERIAL_AT91=y | 322 | depends on SERIAL_ATMEL=y |
323 | help | 323 | help |
324 | Say Y here if you wish to have the five internal AT91RM9200 UARTs | 324 | Say Y here if you wish to have the internal AT91 / AT32 UARTs |
325 | appear as /dev/ttyAT0-4 (major 204, minor 154-158) instead of the | 325 | appear as /dev/ttyATn (major 204, minor starting at 154) |
326 | normal /dev/ttyS0-4 (major 4, minor 64-68). This is necessary if | 326 | instead of the normal /dev/ttySn (major 4, minor starting at |
327 | you also want other UARTs, such as external 8250/16C550 compatible | 327 | 64). This is necessary if you also want other UARTs, such as |
328 | UARTs. | 328 | external 8250/16C550 compatible UARTs. |
329 | The ttySn nodes are legally reserved for the 8250 serial driver | 329 | The ttySn nodes are legally reserved for the 8250 serial driver |
330 | but are often misused by other serial drivers. | 330 | but are often misused by other serial drivers. |
331 | 331 | ||
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile index 927faee0362e..b4d8a7c182e3 100644 --- a/drivers/serial/Makefile +++ b/drivers/serial/Makefile | |||
@@ -54,5 +54,5 @@ obj-$(CONFIG_SERIAL_TXX9) += serial_txx9.o | |||
54 | obj-$(CONFIG_SERIAL_VR41XX) += vr41xx_siu.o | 54 | obj-$(CONFIG_SERIAL_VR41XX) += vr41xx_siu.o |
55 | obj-$(CONFIG_SERIAL_SGI_IOC4) += ioc4_serial.o | 55 | obj-$(CONFIG_SERIAL_SGI_IOC4) += ioc4_serial.o |
56 | obj-$(CONFIG_SERIAL_SGI_IOC3) += ioc3_serial.o | 56 | obj-$(CONFIG_SERIAL_SGI_IOC3) += ioc3_serial.o |
57 | obj-$(CONFIG_SERIAL_AT91) += at91_serial.o | 57 | obj-$(CONFIG_SERIAL_ATMEL) += atmel_serial.o |
58 | obj-$(CONFIG_SERIAL_NETX) += netx-serial.o | 58 | obj-$(CONFIG_SERIAL_NETX) += netx-serial.o |
diff --git a/drivers/serial/at91_serial.c b/drivers/serial/at91_serial.c deleted file mode 100644 index bf4bf103e5a0..000000000000 --- a/drivers/serial/at91_serial.c +++ /dev/null | |||
@@ -1,980 +0,0 @@ | |||
1 | /* | ||
2 | * linux/drivers/char/at91_serial.c | ||
3 | * | ||
4 | * Driver for Atmel AT91RM9200 Serial ports | ||
5 | * Copyright (C) 2003 Rick Bronson | ||
6 | * | ||
7 | * Based on drivers/char/serial_sa1100.c, by Deep Blue Solutions Ltd. | ||
8 | * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
23 | * | ||
24 | */ | ||
25 | #include <linux/module.h> | ||
26 | #include <linux/tty.h> | ||
27 | #include <linux/ioport.h> | ||
28 | #include <linux/slab.h> | ||
29 | #include <linux/init.h> | ||
30 | #include <linux/serial.h> | ||
31 | #include <linux/clk.h> | ||
32 | #include <linux/console.h> | ||
33 | #include <linux/sysrq.h> | ||
34 | #include <linux/tty_flip.h> | ||
35 | #include <linux/platform_device.h> | ||
36 | |||
37 | #include <asm/io.h> | ||
38 | |||
39 | #include <asm/arch/at91rm9200_usart.h> | ||
40 | #include <asm/arch/at91rm9200_pdc.h> | ||
41 | #include <asm/mach/serial_at91.h> | ||
42 | #include <asm/arch/board.h> | ||
43 | #include <asm/arch/system.h> | ||
44 | #include <asm/arch/gpio.h> | ||
45 | |||
46 | #if defined(CONFIG_SERIAL_AT91_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | ||
47 | #define SUPPORT_SYSRQ | ||
48 | #endif | ||
49 | |||
50 | #include <linux/serial_core.h> | ||
51 | |||
52 | #ifdef CONFIG_SERIAL_AT91_TTYAT | ||
53 | |||
54 | /* Use device name ttyAT, major 204 and minor 154-169. This is necessary if we | ||
55 | * should coexist with the 8250 driver, such as if we have an external 16C550 | ||
56 | * UART. */ | ||
57 | #define SERIAL_AT91_MAJOR 204 | ||
58 | #define MINOR_START 154 | ||
59 | #define AT91_DEVICENAME "ttyAT" | ||
60 | |||
61 | #else | ||
62 | |||
63 | /* Use device name ttyS, major 4, minor 64-68. This is the usual serial port | ||
64 | * name, but it is legally reserved for the 8250 driver. */ | ||
65 | #define SERIAL_AT91_MAJOR TTY_MAJOR | ||
66 | #define MINOR_START 64 | ||
67 | #define AT91_DEVICENAME "ttyS" | ||
68 | |||
69 | #endif | ||
70 | |||
71 | #define AT91_ISR_PASS_LIMIT 256 | ||
72 | |||
73 | #define UART_PUT_CR(port,v) writel(v, (port)->membase + AT91_US_CR) | ||
74 | #define UART_GET_MR(port) readl((port)->membase + AT91_US_MR) | ||
75 | #define UART_PUT_MR(port,v) writel(v, (port)->membase + AT91_US_MR) | ||
76 | #define UART_PUT_IER(port,v) writel(v, (port)->membase + AT91_US_IER) | ||
77 | #define UART_PUT_IDR(port,v) writel(v, (port)->membase + AT91_US_IDR) | ||
78 | #define UART_GET_IMR(port) readl((port)->membase + AT91_US_IMR) | ||
79 | #define UART_GET_CSR(port) readl((port)->membase + AT91_US_CSR) | ||
80 | #define UART_GET_CHAR(port) readl((port)->membase + AT91_US_RHR) | ||
81 | #define UART_PUT_CHAR(port,v) writel(v, (port)->membase + AT91_US_THR) | ||
82 | #define UART_GET_BRGR(port) readl((port)->membase + AT91_US_BRGR) | ||
83 | #define UART_PUT_BRGR(port,v) writel(v, (port)->membase + AT91_US_BRGR) | ||
84 | #define UART_PUT_RTOR(port,v) writel(v, (port)->membase + AT91_US_RTOR) | ||
85 | |||
86 | // #define UART_GET_CR(port) readl((port)->membase + AT91_US_CR) // is write-only | ||
87 | |||
88 | /* PDC registers */ | ||
89 | #define UART_PUT_PTCR(port,v) writel(v, (port)->membase + AT91_PDC_PTCR) | ||
90 | #define UART_GET_PTSR(port) readl((port)->membase + AT91_PDC_PTSR) | ||
91 | |||
92 | #define UART_PUT_RPR(port,v) writel(v, (port)->membase + AT91_PDC_RPR) | ||
93 | #define UART_GET_RPR(port) readl((port)->membase + AT91_PDC_RPR) | ||
94 | #define UART_PUT_RCR(port,v) writel(v, (port)->membase + AT91_PDC_RCR) | ||
95 | #define UART_PUT_RNPR(port,v) writel(v, (port)->membase + AT91_PDC_RNPR) | ||
96 | #define UART_PUT_RNCR(port,v) writel(v, (port)->membase + AT91_PDC_RNCR) | ||
97 | |||
98 | #define UART_PUT_TPR(port,v) writel(v, (port)->membase + AT91_PDC_TPR) | ||
99 | #define UART_PUT_TCR(port,v) writel(v, (port)->membase + AT91_PDC_TCR) | ||
100 | //#define UART_PUT_TNPR(port,v) writel(v, (port)->membase + AT91_PDC_TNPR) | ||
101 | //#define UART_PUT_TNCR(port,v) writel(v, (port)->membase + AT91_PDC_TNCR) | ||
102 | |||
103 | static int (*at91_open)(struct uart_port *); | ||
104 | static void (*at91_close)(struct uart_port *); | ||
105 | |||
106 | /* | ||
107 | * We wrap our port structure around the generic uart_port. | ||
108 | */ | ||
109 | struct at91_uart_port { | ||
110 | struct uart_port uart; /* uart */ | ||
111 | struct clk *clk; /* uart clock */ | ||
112 | unsigned short suspended; /* is port suspended? */ | ||
113 | }; | ||
114 | |||
115 | static struct at91_uart_port at91_ports[AT91_NR_UART]; | ||
116 | |||
117 | #ifdef SUPPORT_SYSRQ | ||
118 | static struct console at91_console; | ||
119 | #endif | ||
120 | |||
121 | /* | ||
122 | * Return TIOCSER_TEMT when transmitter FIFO and Shift register is empty. | ||
123 | */ | ||
124 | static u_int at91_tx_empty(struct uart_port *port) | ||
125 | { | ||
126 | return (UART_GET_CSR(port) & AT91_US_TXEMPTY) ? TIOCSER_TEMT : 0; | ||
127 | } | ||
128 | |||
129 | /* | ||
130 | * Set state of the modem control output lines | ||
131 | */ | ||
132 | static void at91_set_mctrl(struct uart_port *port, u_int mctrl) | ||
133 | { | ||
134 | unsigned int control = 0; | ||
135 | unsigned int mode; | ||
136 | |||
137 | if (arch_identify() == ARCH_ID_AT91RM9200) { | ||
138 | /* | ||
139 | * AT91RM9200 Errata #39: RTS0 is not internally connected to PA21. | ||
140 | * We need to drive the pin manually. | ||
141 | */ | ||
142 | if (port->mapbase == AT91RM9200_BASE_US0) { | ||
143 | if (mctrl & TIOCM_RTS) | ||
144 | at91_set_gpio_value(AT91_PIN_PA21, 0); | ||
145 | else | ||
146 | at91_set_gpio_value(AT91_PIN_PA21, 1); | ||
147 | } | ||
148 | } | ||
149 | |||
150 | if (mctrl & TIOCM_RTS) | ||
151 | control |= AT91_US_RTSEN; | ||
152 | else | ||
153 | control |= AT91_US_RTSDIS; | ||
154 | |||
155 | if (mctrl & TIOCM_DTR) | ||
156 | control |= AT91_US_DTREN; | ||
157 | else | ||
158 | control |= AT91_US_DTRDIS; | ||
159 | |||
160 | UART_PUT_CR(port, control); | ||
161 | |||
162 | /* Local loopback mode? */ | ||
163 | mode = UART_GET_MR(port) & ~AT91_US_CHMODE; | ||
164 | if (mctrl & TIOCM_LOOP) | ||
165 | mode |= AT91_US_CHMODE_LOC_LOOP; | ||
166 | else | ||
167 | mode |= AT91_US_CHMODE_NORMAL; | ||
168 | UART_PUT_MR(port, mode); | ||
169 | } | ||
170 | |||
171 | /* | ||
172 | * Get state of the modem control input lines | ||
173 | */ | ||
174 | static u_int at91_get_mctrl(struct uart_port *port) | ||
175 | { | ||
176 | unsigned int status, ret = 0; | ||
177 | |||
178 | status = UART_GET_CSR(port); | ||
179 | |||
180 | /* | ||
181 | * The control signals are active low. | ||
182 | */ | ||
183 | if (!(status & AT91_US_DCD)) | ||
184 | ret |= TIOCM_CD; | ||
185 | if (!(status & AT91_US_CTS)) | ||
186 | ret |= TIOCM_CTS; | ||
187 | if (!(status & AT91_US_DSR)) | ||
188 | ret |= TIOCM_DSR; | ||
189 | if (!(status & AT91_US_RI)) | ||
190 | ret |= TIOCM_RI; | ||
191 | |||
192 | return ret; | ||
193 | } | ||
194 | |||
195 | /* | ||
196 | * Stop transmitting. | ||
197 | */ | ||
198 | static void at91_stop_tx(struct uart_port *port) | ||
199 | { | ||
200 | struct at91_uart_port *at91_port = (struct at91_uart_port *) port; | ||
201 | |||
202 | UART_PUT_IDR(port, AT91_US_TXRDY); | ||
203 | } | ||
204 | |||
205 | /* | ||
206 | * Start transmitting. | ||
207 | */ | ||
208 | static void at91_start_tx(struct uart_port *port) | ||
209 | { | ||
210 | struct at91_uart_port *at91_port = (struct at91_uart_port *) port; | ||
211 | |||
212 | UART_PUT_IER(port, AT91_US_TXRDY); | ||
213 | } | ||
214 | |||
215 | /* | ||
216 | * Stop receiving - port is in process of being closed. | ||
217 | */ | ||
218 | static void at91_stop_rx(struct uart_port *port) | ||
219 | { | ||
220 | struct at91_uart_port *at91_port = (struct at91_uart_port *) port; | ||
221 | |||
222 | UART_PUT_IDR(port, AT91_US_RXRDY); | ||
223 | } | ||
224 | |||
225 | /* | ||
226 | * Enable modem status interrupts | ||
227 | */ | ||
228 | static void at91_enable_ms(struct uart_port *port) | ||
229 | { | ||
230 | UART_PUT_IER(port, AT91_US_RIIC | AT91_US_DSRIC | AT91_US_DCDIC | AT91_US_CTSIC); | ||
231 | } | ||
232 | |||
233 | /* | ||
234 | * Control the transmission of a break signal | ||
235 | */ | ||
236 | static void at91_break_ctl(struct uart_port *port, int break_state) | ||
237 | { | ||
238 | if (break_state != 0) | ||
239 | UART_PUT_CR(port, AT91_US_STTBRK); /* start break */ | ||
240 | else | ||
241 | UART_PUT_CR(port, AT91_US_STPBRK); /* stop break */ | ||
242 | } | ||
243 | |||
244 | /* | ||
245 | * Characters received (called from interrupt handler) | ||
246 | */ | ||
247 | static void at91_rx_chars(struct uart_port *port, struct pt_regs *regs) | ||
248 | { | ||
249 | struct tty_struct *tty = port->info->tty; | ||
250 | unsigned int status, ch, flg; | ||
251 | |||
252 | status = UART_GET_CSR(port); | ||
253 | while (status & AT91_US_RXRDY) { | ||
254 | ch = UART_GET_CHAR(port); | ||
255 | |||
256 | port->icount.rx++; | ||
257 | |||
258 | flg = TTY_NORMAL; | ||
259 | |||
260 | /* | ||
261 | * note that the error handling code is | ||
262 | * out of the main execution path | ||
263 | */ | ||
264 | if (unlikely(status & (AT91_US_PARE | AT91_US_FRAME | AT91_US_OVRE | AT91_US_RXBRK))) { | ||
265 | UART_PUT_CR(port, AT91_US_RSTSTA); /* clear error */ | ||
266 | if (status & AT91_US_RXBRK) { | ||
267 | status &= ~(AT91_US_PARE | AT91_US_FRAME); /* ignore side-effect */ | ||
268 | port->icount.brk++; | ||
269 | if (uart_handle_break(port)) | ||
270 | goto ignore_char; | ||
271 | } | ||
272 | if (status & AT91_US_PARE) | ||
273 | port->icount.parity++; | ||
274 | if (status & AT91_US_FRAME) | ||
275 | port->icount.frame++; | ||
276 | if (status & AT91_US_OVRE) | ||
277 | port->icount.overrun++; | ||
278 | |||
279 | status &= port->read_status_mask; | ||
280 | |||
281 | if (status & AT91_US_RXBRK) | ||
282 | flg = TTY_BREAK; | ||
283 | else if (status & AT91_US_PARE) | ||
284 | flg = TTY_PARITY; | ||
285 | else if (status & AT91_US_FRAME) | ||
286 | flg = TTY_FRAME; | ||
287 | } | ||
288 | |||
289 | if (uart_handle_sysrq_char(port, ch, regs)) | ||
290 | goto ignore_char; | ||
291 | |||
292 | uart_insert_char(port, status, AT91_US_OVRE, ch, flg); | ||
293 | |||
294 | ignore_char: | ||
295 | status = UART_GET_CSR(port); | ||
296 | } | ||
297 | |||
298 | tty_flip_buffer_push(tty); | ||
299 | } | ||
300 | |||
301 | /* | ||
302 | * Transmit characters (called from interrupt handler) | ||
303 | */ | ||
304 | static void at91_tx_chars(struct uart_port *port) | ||
305 | { | ||
306 | struct circ_buf *xmit = &port->info->xmit; | ||
307 | |||
308 | if (port->x_char) { | ||
309 | UART_PUT_CHAR(port, port->x_char); | ||
310 | port->icount.tx++; | ||
311 | port->x_char = 0; | ||
312 | return; | ||
313 | } | ||
314 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { | ||
315 | at91_stop_tx(port); | ||
316 | return; | ||
317 | } | ||
318 | |||
319 | while (UART_GET_CSR(port) & AT91_US_TXRDY) { | ||
320 | UART_PUT_CHAR(port, xmit->buf[xmit->tail]); | ||
321 | xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); | ||
322 | port->icount.tx++; | ||
323 | if (uart_circ_empty(xmit)) | ||
324 | break; | ||
325 | } | ||
326 | |||
327 | if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) | ||
328 | uart_write_wakeup(port); | ||
329 | |||
330 | if (uart_circ_empty(xmit)) | ||
331 | at91_stop_tx(port); | ||
332 | } | ||
333 | |||
334 | /* | ||
335 | * Interrupt handler | ||
336 | */ | ||
337 | static irqreturn_t at91_interrupt(int irq, void *dev_id, struct pt_regs *regs) | ||
338 | { | ||
339 | struct uart_port *port = dev_id; | ||
340 | struct at91_uart_port *at91_port = (struct at91_uart_port *) port; | ||
341 | unsigned int status, pending, pass_counter = 0; | ||
342 | |||
343 | status = UART_GET_CSR(port); | ||
344 | pending = status & UART_GET_IMR(port); | ||
345 | while (pending) { | ||
346 | /* Interrupt receive */ | ||
347 | if (pending & AT91_US_RXRDY) | ||
348 | at91_rx_chars(port, regs); | ||
349 | |||
350 | // TODO: All reads to CSR will clear these interrupts! | ||
351 | if (pending & AT91_US_RIIC) port->icount.rng++; | ||
352 | if (pending & AT91_US_DSRIC) port->icount.dsr++; | ||
353 | if (pending & AT91_US_DCDIC) | ||
354 | uart_handle_dcd_change(port, !(status & AT91_US_DCD)); | ||
355 | if (pending & AT91_US_CTSIC) | ||
356 | uart_handle_cts_change(port, !(status & AT91_US_CTS)); | ||
357 | if (pending & (AT91_US_RIIC | AT91_US_DSRIC | AT91_US_DCDIC | AT91_US_CTSIC)) | ||
358 | wake_up_interruptible(&port->info->delta_msr_wait); | ||
359 | |||
360 | /* Interrupt transmit */ | ||
361 | if (pending & AT91_US_TXRDY) | ||
362 | at91_tx_chars(port); | ||
363 | |||
364 | if (pass_counter++ > AT91_ISR_PASS_LIMIT) | ||
365 | break; | ||
366 | |||
367 | status = UART_GET_CSR(port); | ||
368 | pending = status & UART_GET_IMR(port); | ||
369 | } | ||
370 | return IRQ_HANDLED; | ||
371 | } | ||
372 | |||
373 | /* | ||
374 | * Perform initialization and enable port for reception | ||
375 | */ | ||
376 | static int at91_startup(struct uart_port *port) | ||
377 | { | ||
378 | struct at91_uart_port *at91_port = (struct at91_uart_port *) port; | ||
379 | int retval; | ||
380 | |||
381 | /* | ||
382 | * Ensure that no interrupts are enabled otherwise when | ||
383 | * request_irq() is called we could get stuck trying to | ||
384 | * handle an unexpected interrupt | ||
385 | */ | ||
386 | UART_PUT_IDR(port, -1); | ||
387 | |||
388 | /* | ||
389 | * Allocate the IRQ | ||
390 | */ | ||
391 | retval = request_irq(port->irq, at91_interrupt, IRQF_SHARED, "at91_serial", port); | ||
392 | if (retval) { | ||
393 | printk("at91_serial: at91_startup - Can't get irq\n"); | ||
394 | return retval; | ||
395 | } | ||
396 | |||
397 | /* | ||
398 | * If there is a specific "open" function (to register | ||
399 | * control line interrupts) | ||
400 | */ | ||
401 | if (at91_open) { | ||
402 | retval = at91_open(port); | ||
403 | if (retval) { | ||
404 | free_irq(port->irq, port); | ||
405 | return retval; | ||
406 | } | ||
407 | } | ||
408 | |||
409 | /* | ||
410 | * Finally, enable the serial port | ||
411 | */ | ||
412 | UART_PUT_CR(port, AT91_US_RSTSTA | AT91_US_RSTRX); | ||
413 | UART_PUT_CR(port, AT91_US_TXEN | AT91_US_RXEN); /* enable xmit & rcvr */ | ||
414 | |||
415 | UART_PUT_IER(port, AT91_US_RXRDY); /* enable receive only */ | ||
416 | |||
417 | return 0; | ||
418 | } | ||
419 | |||
420 | /* | ||
421 | * Disable the port | ||
422 | */ | ||
423 | static void at91_shutdown(struct uart_port *port) | ||
424 | { | ||
425 | struct at91_uart_port *at91_port = (struct at91_uart_port *) port; | ||
426 | |||
427 | /* | ||
428 | * Disable all interrupts, port and break condition. | ||
429 | */ | ||
430 | UART_PUT_CR(port, AT91_US_RSTSTA); | ||
431 | UART_PUT_IDR(port, -1); | ||
432 | |||
433 | /* | ||
434 | * Free the interrupt | ||
435 | */ | ||
436 | free_irq(port->irq, port); | ||
437 | |||
438 | /* | ||
439 | * If there is a specific "close" function (to unregister | ||
440 | * control line interrupts) | ||
441 | */ | ||
442 | if (at91_close) | ||
443 | at91_close(port); | ||
444 | } | ||
445 | |||
446 | /* | ||
447 | * Power / Clock management. | ||
448 | */ | ||
449 | static void at91_serial_pm(struct uart_port *port, unsigned int state, unsigned int oldstate) | ||
450 | { | ||
451 | struct at91_uart_port *at91_port = (struct at91_uart_port *) port; | ||
452 | |||
453 | switch (state) { | ||
454 | case 0: | ||
455 | /* | ||
456 | * Enable the peripheral clock for this serial port. | ||
457 | * This is called on uart_open() or a resume event. | ||
458 | */ | ||
459 | clk_enable(at91_port->clk); | ||
460 | break; | ||
461 | case 3: | ||
462 | /* | ||
463 | * Disable the peripheral clock for this serial port. | ||
464 | * This is called on uart_close() or a suspend event. | ||
465 | */ | ||
466 | clk_disable(at91_port->clk); | ||
467 | break; | ||
468 | default: | ||
469 | printk(KERN_ERR "at91_serial: unknown pm %d\n", state); | ||
470 | } | ||
471 | } | ||
472 | |||
473 | /* | ||
474 | * Change the port parameters | ||
475 | */ | ||
476 | static void at91_set_termios(struct uart_port *port, struct termios * termios, struct termios * old) | ||
477 | { | ||
478 | unsigned long flags; | ||
479 | unsigned int mode, imr, quot, baud; | ||
480 | |||
481 | baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); | ||
482 | quot = uart_get_divisor(port, baud); | ||
483 | |||
484 | /* Get current mode register */ | ||
485 | mode = UART_GET_MR(port) & ~(AT91_US_CHRL | AT91_US_NBSTOP | AT91_US_PAR); | ||
486 | |||
487 | /* byte size */ | ||
488 | switch (termios->c_cflag & CSIZE) { | ||
489 | case CS5: | ||
490 | mode |= AT91_US_CHRL_5; | ||
491 | break; | ||
492 | case CS6: | ||
493 | mode |= AT91_US_CHRL_6; | ||
494 | break; | ||
495 | case CS7: | ||
496 | mode |= AT91_US_CHRL_7; | ||
497 | break; | ||
498 | default: | ||
499 | mode |= AT91_US_CHRL_8; | ||
500 | break; | ||
501 | } | ||
502 | |||
503 | /* stop bits */ | ||
504 | if (termios->c_cflag & CSTOPB) | ||
505 | mode |= AT91_US_NBSTOP_2; | ||
506 | |||
507 | /* parity */ | ||
508 | if (termios->c_cflag & PARENB) { | ||
509 | if (termios->c_cflag & CMSPAR) { /* Mark or Space parity */ | ||
510 | if (termios->c_cflag & PARODD) | ||
511 | mode |= AT91_US_PAR_MARK; | ||
512 | else | ||
513 | mode |= AT91_US_PAR_SPACE; | ||
514 | } | ||
515 | else if (termios->c_cflag & PARODD) | ||
516 | mode |= AT91_US_PAR_ODD; | ||
517 | else | ||
518 | mode |= AT91_US_PAR_EVEN; | ||
519 | } | ||
520 | else | ||
521 | mode |= AT91_US_PAR_NONE; | ||
522 | |||
523 | spin_lock_irqsave(&port->lock, flags); | ||
524 | |||
525 | port->read_status_mask = AT91_US_OVRE; | ||
526 | if (termios->c_iflag & INPCK) | ||
527 | port->read_status_mask |= (AT91_US_FRAME | AT91_US_PARE); | ||
528 | if (termios->c_iflag & (BRKINT | PARMRK)) | ||
529 | port->read_status_mask |= AT91_US_RXBRK; | ||
530 | |||
531 | /* | ||
532 | * Characters to ignore | ||
533 | */ | ||
534 | port->ignore_status_mask = 0; | ||
535 | if (termios->c_iflag & IGNPAR) | ||
536 | port->ignore_status_mask |= (AT91_US_FRAME | AT91_US_PARE); | ||
537 | if (termios->c_iflag & IGNBRK) { | ||
538 | port->ignore_status_mask |= AT91_US_RXBRK; | ||
539 | /* | ||
540 | * If we're ignoring parity and break indicators, | ||
541 | * ignore overruns too (for real raw support). | ||
542 | */ | ||
543 | if (termios->c_iflag & IGNPAR) | ||
544 | port->ignore_status_mask |= AT91_US_OVRE; | ||
545 | } | ||
546 | |||
547 | // TODO: Ignore all characters if CREAD is set. | ||
548 | |||
549 | /* update the per-port timeout */ | ||
550 | uart_update_timeout(port, termios->c_cflag, baud); | ||
551 | |||
552 | /* disable interrupts and drain transmitter */ | ||
553 | imr = UART_GET_IMR(port); /* get interrupt mask */ | ||
554 | UART_PUT_IDR(port, -1); /* disable all interrupts */ | ||
555 | while (!(UART_GET_CSR(port) & AT91_US_TXEMPTY)) { barrier(); } | ||
556 | |||
557 | /* disable receiver and transmitter */ | ||
558 | UART_PUT_CR(port, AT91_US_TXDIS | AT91_US_RXDIS); | ||
559 | |||
560 | /* set the parity, stop bits and data size */ | ||
561 | UART_PUT_MR(port, mode); | ||
562 | |||
563 | /* set the baud rate */ | ||
564 | UART_PUT_BRGR(port, quot); | ||
565 | UART_PUT_CR(port, AT91_US_RSTSTA | AT91_US_RSTRX); | ||
566 | UART_PUT_CR(port, AT91_US_TXEN | AT91_US_RXEN); | ||
567 | |||
568 | /* restore interrupts */ | ||
569 | UART_PUT_IER(port, imr); | ||
570 | |||
571 | /* CTS flow-control and modem-status interrupts */ | ||
572 | if (UART_ENABLE_MS(port, termios->c_cflag)) | ||
573 | port->ops->enable_ms(port); | ||
574 | |||
575 | spin_unlock_irqrestore(&port->lock, flags); | ||
576 | } | ||
577 | |||
578 | /* | ||
579 | * Return string describing the specified port | ||
580 | */ | ||
581 | static const char *at91_type(struct uart_port *port) | ||
582 | { | ||
583 | return (port->type == PORT_AT91) ? "AT91_SERIAL" : NULL; | ||
584 | } | ||
585 | |||
586 | /* | ||
587 | * Release the memory region(s) being used by 'port'. | ||
588 | */ | ||
589 | static void at91_release_port(struct uart_port *port) | ||
590 | { | ||
591 | struct platform_device *pdev = to_platform_device(port->dev); | ||
592 | int size = pdev->resource[0].end - pdev->resource[0].start + 1; | ||
593 | |||
594 | release_mem_region(port->mapbase, size); | ||
595 | |||
596 | if (port->flags & UPF_IOREMAP) { | ||
597 | iounmap(port->membase); | ||
598 | port->membase = NULL; | ||
599 | } | ||
600 | } | ||
601 | |||
602 | /* | ||
603 | * Request the memory region(s) being used by 'port'. | ||
604 | */ | ||
605 | static int at91_request_port(struct uart_port *port) | ||
606 | { | ||
607 | struct platform_device *pdev = to_platform_device(port->dev); | ||
608 | int size = pdev->resource[0].end - pdev->resource[0].start + 1; | ||
609 | |||
610 | if (!request_mem_region(port->mapbase, size, "at91_serial")) | ||
611 | return -EBUSY; | ||
612 | |||
613 | if (port->flags & UPF_IOREMAP) { | ||
614 | port->membase = ioremap(port->mapbase, size); | ||
615 | if (port->membase == NULL) { | ||
616 | release_mem_region(port->mapbase, size); | ||
617 | return -ENOMEM; | ||
618 | } | ||
619 | } | ||
620 | |||
621 | return 0; | ||
622 | } | ||
623 | |||
624 | /* | ||
625 | * Configure/autoconfigure the port. | ||
626 | */ | ||
627 | static void at91_config_port(struct uart_port *port, int flags) | ||
628 | { | ||
629 | if (flags & UART_CONFIG_TYPE) { | ||
630 | port->type = PORT_AT91; | ||
631 | at91_request_port(port); | ||
632 | } | ||
633 | } | ||
634 | |||
635 | /* | ||
636 | * Verify the new serial_struct (for TIOCSSERIAL). | ||
637 | */ | ||
638 | static int at91_verify_port(struct uart_port *port, struct serial_struct *ser) | ||
639 | { | ||
640 | int ret = 0; | ||
641 | if (ser->type != PORT_UNKNOWN && ser->type != PORT_AT91) | ||
642 | ret = -EINVAL; | ||
643 | if (port->irq != ser->irq) | ||
644 | ret = -EINVAL; | ||
645 | if (ser->io_type != SERIAL_IO_MEM) | ||
646 | ret = -EINVAL; | ||
647 | if (port->uartclk / 16 != ser->baud_base) | ||
648 | ret = -EINVAL; | ||
649 | if ((void *)port->mapbase != ser->iomem_base) | ||
650 | ret = -EINVAL; | ||
651 | if (port->iobase != ser->port) | ||
652 | ret = -EINVAL; | ||
653 | if (ser->hub6 != 0) | ||
654 | ret = -EINVAL; | ||
655 | return ret; | ||
656 | } | ||
657 | |||
658 | static struct uart_ops at91_pops = { | ||
659 | .tx_empty = at91_tx_empty, | ||
660 | .set_mctrl = at91_set_mctrl, | ||
661 | .get_mctrl = at91_get_mctrl, | ||
662 | .stop_tx = at91_stop_tx, | ||
663 | .start_tx = at91_start_tx, | ||
664 | .stop_rx = at91_stop_rx, | ||
665 | .enable_ms = at91_enable_ms, | ||
666 | .break_ctl = at91_break_ctl, | ||
667 | .startup = at91_startup, | ||
668 | .shutdown = at91_shutdown, | ||
669 | .set_termios = at91_set_termios, | ||
670 | .type = at91_type, | ||
671 | .release_port = at91_release_port, | ||
672 | .request_port = at91_request_port, | ||
673 | .config_port = at91_config_port, | ||
674 | .verify_port = at91_verify_port, | ||
675 | .pm = at91_serial_pm, | ||
676 | }; | ||
677 | |||
678 | /* | ||
679 | * Configure the port from the platform device resource info. | ||
680 | */ | ||
681 | static void __devinit at91_init_port(struct at91_uart_port *at91_port, struct platform_device *pdev) | ||
682 | { | ||
683 | struct uart_port *port = &at91_port->uart; | ||
684 | struct at91_uart_data *data = pdev->dev.platform_data; | ||
685 | |||
686 | port->iotype = UPIO_MEM; | ||
687 | port->flags = UPF_BOOT_AUTOCONF; | ||
688 | port->ops = &at91_pops; | ||
689 | port->fifosize = 1; | ||
690 | port->line = pdev->id; | ||
691 | port->dev = &pdev->dev; | ||
692 | |||
693 | port->mapbase = pdev->resource[0].start; | ||
694 | port->irq = pdev->resource[1].start; | ||
695 | |||
696 | if (port->mapbase == AT91_VA_BASE_SYS + AT91_DBGU) /* Part of system perpherals - already mapped */ | ||
697 | port->membase = (void __iomem *) port->mapbase; | ||
698 | else { | ||
699 | port->flags |= UPF_IOREMAP; | ||
700 | port->membase = NULL; | ||
701 | } | ||
702 | |||
703 | if (!at91_port->clk) { /* for console, the clock could already be configured */ | ||
704 | at91_port->clk = clk_get(&pdev->dev, "usart"); | ||
705 | clk_enable(at91_port->clk); | ||
706 | port->uartclk = clk_get_rate(at91_port->clk); | ||
707 | } | ||
708 | } | ||
709 | |||
710 | /* | ||
711 | * Register board-specific modem-control line handlers. | ||
712 | */ | ||
713 | void __init at91_register_uart_fns(struct at91_port_fns *fns) | ||
714 | { | ||
715 | if (fns->enable_ms) | ||
716 | at91_pops.enable_ms = fns->enable_ms; | ||
717 | if (fns->get_mctrl) | ||
718 | at91_pops.get_mctrl = fns->get_mctrl; | ||
719 | if (fns->set_mctrl) | ||
720 | at91_pops.set_mctrl = fns->set_mctrl; | ||
721 | at91_open = fns->open; | ||
722 | at91_close = fns->close; | ||
723 | at91_pops.pm = fns->pm; | ||
724 | at91_pops.set_wake = fns->set_wake; | ||
725 | } | ||
726 | |||
727 | |||
728 | #ifdef CONFIG_SERIAL_AT91_CONSOLE | ||
729 | static void at91_console_putchar(struct uart_port *port, int ch) | ||
730 | { | ||
731 | while (!(UART_GET_CSR(port) & AT91_US_TXRDY)) | ||
732 | barrier(); | ||
733 | UART_PUT_CHAR(port, ch); | ||
734 | } | ||
735 | |||
736 | /* | ||
737 | * Interrupts are disabled on entering | ||
738 | */ | ||
739 | static void at91_console_write(struct console *co, const char *s, u_int count) | ||
740 | { | ||
741 | struct uart_port *port = &at91_ports[co->index].uart; | ||
742 | unsigned int status, imr; | ||
743 | |||
744 | /* | ||
745 | * First, save IMR and then disable interrupts | ||
746 | */ | ||
747 | imr = UART_GET_IMR(port); /* get interrupt mask */ | ||
748 | UART_PUT_IDR(port, AT91_US_RXRDY | AT91_US_TXRDY); | ||
749 | |||
750 | uart_console_write(port, s, count, at91_console_putchar); | ||
751 | |||
752 | /* | ||
753 | * Finally, wait for transmitter to become empty | ||
754 | * and restore IMR | ||
755 | */ | ||
756 | do { | ||
757 | status = UART_GET_CSR(port); | ||
758 | } while (!(status & AT91_US_TXRDY)); | ||
759 | UART_PUT_IER(port, imr); /* set interrupts back the way they were */ | ||
760 | } | ||
761 | |||
762 | /* | ||
763 | * If the port was already initialised (eg, by a boot loader), try to determine | ||
764 | * the current setup. | ||
765 | */ | ||
766 | static void __init at91_console_get_options(struct uart_port *port, int *baud, int *parity, int *bits) | ||
767 | { | ||
768 | unsigned int mr, quot; | ||
769 | |||
770 | // TODO: CR is a write-only register | ||
771 | // unsigned int cr; | ||
772 | // | ||
773 | // cr = UART_GET_CR(port) & (AT91_US_RXEN | AT91_US_TXEN); | ||
774 | // if (cr == (AT91_US_RXEN | AT91_US_TXEN)) { | ||
775 | // /* ok, the port was enabled */ | ||
776 | // } | ||
777 | |||
778 | mr = UART_GET_MR(port) & AT91_US_CHRL; | ||
779 | if (mr == AT91_US_CHRL_8) | ||
780 | *bits = 8; | ||
781 | else | ||
782 | *bits = 7; | ||
783 | |||
784 | mr = UART_GET_MR(port) & AT91_US_PAR; | ||
785 | if (mr == AT91_US_PAR_EVEN) | ||
786 | *parity = 'e'; | ||
787 | else if (mr == AT91_US_PAR_ODD) | ||
788 | *parity = 'o'; | ||
789 | |||
790 | quot = UART_GET_BRGR(port); | ||
791 | *baud = port->uartclk / (16 * (quot)); | ||
792 | } | ||
793 | |||
794 | static int __init at91_console_setup(struct console *co, char *options) | ||
795 | { | ||
796 | struct uart_port *port = &at91_ports[co->index].uart; | ||
797 | int baud = 115200; | ||
798 | int bits = 8; | ||
799 | int parity = 'n'; | ||
800 | int flow = 'n'; | ||
801 | |||
802 | if (port->membase == 0) /* Port not initialized yet - delay setup */ | ||
803 | return -ENODEV; | ||
804 | |||
805 | UART_PUT_IDR(port, -1); /* disable interrupts */ | ||
806 | UART_PUT_CR(port, AT91_US_RSTSTA | AT91_US_RSTRX); | ||
807 | UART_PUT_CR(port, AT91_US_TXEN | AT91_US_RXEN); | ||
808 | |||
809 | if (options) | ||
810 | uart_parse_options(options, &baud, &parity, &bits, &flow); | ||
811 | else | ||
812 | at91_console_get_options(port, &baud, &parity, &bits); | ||
813 | |||
814 | return uart_set_options(port, co, baud, parity, bits, flow); | ||
815 | } | ||
816 | |||
817 | static struct uart_driver at91_uart; | ||
818 | |||
819 | static struct console at91_console = { | ||
820 | .name = AT91_DEVICENAME, | ||
821 | .write = at91_console_write, | ||
822 | .device = uart_console_device, | ||
823 | .setup = at91_console_setup, | ||
824 | .flags = CON_PRINTBUFFER, | ||
825 | .index = -1, | ||
826 | .data = &at91_uart, | ||
827 | }; | ||
828 | |||
829 | #define AT91_CONSOLE_DEVICE &at91_console | ||
830 | |||
831 | /* | ||
832 | * Early console initialization (before VM subsystem initialized). | ||
833 | */ | ||
834 | static int __init at91_console_init(void) | ||
835 | { | ||
836 | if (at91_default_console_device) { | ||
837 | add_preferred_console(AT91_DEVICENAME, at91_default_console_device->id, NULL); | ||
838 | at91_init_port(&(at91_ports[at91_default_console_device->id]), at91_default_console_device); | ||
839 | register_console(&at91_console); | ||
840 | } | ||
841 | |||
842 | return 0; | ||
843 | } | ||
844 | console_initcall(at91_console_init); | ||
845 | |||
846 | /* | ||
847 | * Late console initialization. | ||
848 | */ | ||
849 | static int __init at91_late_console_init(void) | ||
850 | { | ||
851 | if (at91_default_console_device && !(at91_console.flags & CON_ENABLED)) | ||
852 | register_console(&at91_console); | ||
853 | |||
854 | return 0; | ||
855 | } | ||
856 | core_initcall(at91_late_console_init); | ||
857 | |||
858 | #else | ||
859 | #define AT91_CONSOLE_DEVICE NULL | ||
860 | #endif | ||
861 | |||
862 | static struct uart_driver at91_uart = { | ||
863 | .owner = THIS_MODULE, | ||
864 | .driver_name = "at91_serial", | ||
865 | .dev_name = AT91_DEVICENAME, | ||
866 | .major = SERIAL_AT91_MAJOR, | ||
867 | .minor = MINOR_START, | ||
868 | .nr = AT91_NR_UART, | ||
869 | .cons = AT91_CONSOLE_DEVICE, | ||
870 | }; | ||
871 | |||
872 | #ifdef CONFIG_PM | ||
873 | static int at91_serial_suspend(struct platform_device *pdev, pm_message_t state) | ||
874 | { | ||
875 | struct uart_port *port = platform_get_drvdata(pdev); | ||
876 | struct at91_uart_port *at91_port = (struct at91_uart_port *) port; | ||
877 | |||
878 | if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock()) | ||
879 | enable_irq_wake(port->irq); | ||
880 | else { | ||
881 | disable_irq_wake(port->irq); | ||
882 | uart_suspend_port(&at91_uart, port); | ||
883 | at91_port->suspended = 1; | ||
884 | } | ||
885 | |||
886 | return 0; | ||
887 | } | ||
888 | |||
889 | static int at91_serial_resume(struct platform_device *pdev) | ||
890 | { | ||
891 | struct uart_port *port = platform_get_drvdata(pdev); | ||
892 | struct at91_uart_port *at91_port = (struct at91_uart_port *) port; | ||
893 | |||
894 | if (at91_port->suspended) { | ||
895 | uart_resume_port(&at91_uart, port); | ||
896 | at91_port->suspended = 0; | ||
897 | } | ||
898 | |||
899 | return 0; | ||
900 | } | ||
901 | #else | ||
902 | #define at91_serial_suspend NULL | ||
903 | #define at91_serial_resume NULL | ||
904 | #endif | ||
905 | |||
906 | static int __devinit at91_serial_probe(struct platform_device *pdev) | ||
907 | { | ||
908 | struct at91_uart_port *port; | ||
909 | int ret; | ||
910 | |||
911 | port = &at91_ports[pdev->id]; | ||
912 | at91_init_port(port, pdev); | ||
913 | |||
914 | ret = uart_add_one_port(&at91_uart, &port->uart); | ||
915 | if (!ret) { | ||
916 | device_init_wakeup(&pdev->dev, 1); | ||
917 | platform_set_drvdata(pdev, port); | ||
918 | } | ||
919 | |||
920 | return ret; | ||
921 | } | ||
922 | |||
923 | static int __devexit at91_serial_remove(struct platform_device *pdev) | ||
924 | { | ||
925 | struct uart_port *port = platform_get_drvdata(pdev); | ||
926 | struct at91_uart_port *at91_port = (struct at91_uart_port *) port; | ||
927 | int ret = 0; | ||
928 | |||
929 | clk_disable(at91_port->clk); | ||
930 | clk_put(at91_port->clk); | ||
931 | |||
932 | device_init_wakeup(&pdev->dev, 0); | ||
933 | platform_set_drvdata(pdev, NULL); | ||
934 | |||
935 | if (port) { | ||
936 | ret = uart_remove_one_port(&at91_uart, port); | ||
937 | kfree(port); | ||
938 | } | ||
939 | |||
940 | return ret; | ||
941 | } | ||
942 | |||
943 | static struct platform_driver at91_serial_driver = { | ||
944 | .probe = at91_serial_probe, | ||
945 | .remove = __devexit_p(at91_serial_remove), | ||
946 | .suspend = at91_serial_suspend, | ||
947 | .resume = at91_serial_resume, | ||
948 | .driver = { | ||
949 | .name = "at91_usart", | ||
950 | .owner = THIS_MODULE, | ||
951 | }, | ||
952 | }; | ||
953 | |||
954 | static int __init at91_serial_init(void) | ||
955 | { | ||
956 | int ret; | ||
957 | |||
958 | ret = uart_register_driver(&at91_uart); | ||
959 | if (ret) | ||
960 | return ret; | ||
961 | |||
962 | ret = platform_driver_register(&at91_serial_driver); | ||
963 | if (ret) | ||
964 | uart_unregister_driver(&at91_uart); | ||
965 | |||
966 | return ret; | ||
967 | } | ||
968 | |||
969 | static void __exit at91_serial_exit(void) | ||
970 | { | ||
971 | platform_driver_unregister(&at91_serial_driver); | ||
972 | uart_unregister_driver(&at91_uart); | ||
973 | } | ||
974 | |||
975 | module_init(at91_serial_init); | ||
976 | module_exit(at91_serial_exit); | ||
977 | |||
978 | MODULE_AUTHOR("Rick Bronson"); | ||
979 | MODULE_DESCRIPTION("AT91 generic serial port driver"); | ||
980 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c new file mode 100644 index 000000000000..955c46da5800 --- /dev/null +++ b/drivers/serial/atmel_serial.c | |||
@@ -0,0 +1,992 @@ | |||
1 | /* | ||
2 | * linux/drivers/char/at91_serial.c | ||
3 | * | ||
4 | * Driver for Atmel AT91 / AT32 Serial ports | ||
5 | * Copyright (C) 2003 Rick Bronson | ||
6 | * | ||
7 | * Based on drivers/char/serial_sa1100.c, by Deep Blue Solutions Ltd. | ||
8 | * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
23 | * | ||
24 | */ | ||
25 | #include <linux/module.h> | ||
26 | #include <linux/tty.h> | ||
27 | #include <linux/ioport.h> | ||
28 | #include <linux/slab.h> | ||
29 | #include <linux/init.h> | ||
30 | #include <linux/serial.h> | ||
31 | #include <linux/clk.h> | ||
32 | #include <linux/console.h> | ||
33 | #include <linux/sysrq.h> | ||
34 | #include <linux/tty_flip.h> | ||
35 | #include <linux/platform_device.h> | ||
36 | |||
37 | #include <asm/io.h> | ||
38 | |||
39 | #include <asm/arch/at91rm9200_pdc.h> | ||
40 | #include <asm/mach/serial_at91.h> | ||
41 | #include <asm/arch/board.h> | ||
42 | #ifdef CONFIG_ARM | ||
43 | #include <asm/arch/system.h> | ||
44 | #include <asm/arch/gpio.h> | ||
45 | #endif | ||
46 | |||
47 | #include "atmel_serial.h" | ||
48 | |||
49 | #if defined(CONFIG_SERIAL_ATMEL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | ||
50 | #define SUPPORT_SYSRQ | ||
51 | #endif | ||
52 | |||
53 | #include <linux/serial_core.h> | ||
54 | |||
55 | #ifdef CONFIG_SERIAL_ATMEL_TTYAT | ||
56 | |||
57 | /* Use device name ttyAT, major 204 and minor 154-169. This is necessary if we | ||
58 | * should coexist with the 8250 driver, such as if we have an external 16C550 | ||
59 | * UART. */ | ||
60 | #define SERIAL_ATMEL_MAJOR 204 | ||
61 | #define MINOR_START 154 | ||
62 | #define ATMEL_DEVICENAME "ttyAT" | ||
63 | |||
64 | #else | ||
65 | |||
66 | /* Use device name ttyS, major 4, minor 64-68. This is the usual serial port | ||
67 | * name, but it is legally reserved for the 8250 driver. */ | ||
68 | #define SERIAL_ATMEL_MAJOR TTY_MAJOR | ||
69 | #define MINOR_START 64 | ||
70 | #define ATMEL_DEVICENAME "ttyS" | ||
71 | |||
72 | #endif | ||
73 | |||
74 | #define ATMEL_ISR_PASS_LIMIT 256 | ||
75 | |||
76 | #define UART_PUT_CR(port,v) writel(v, (port)->membase + ATMEL_US_CR) | ||
77 | #define UART_GET_MR(port) readl((port)->membase + ATMEL_US_MR) | ||
78 | #define UART_PUT_MR(port,v) writel(v, (port)->membase + ATMEL_US_MR) | ||
79 | #define UART_PUT_IER(port,v) writel(v, (port)->membase + ATMEL_US_IER) | ||
80 | #define UART_PUT_IDR(port,v) writel(v, (port)->membase + ATMEL_US_IDR) | ||
81 | #define UART_GET_IMR(port) readl((port)->membase + ATMEL_US_IMR) | ||
82 | #define UART_GET_CSR(port) readl((port)->membase + ATMEL_US_CSR) | ||
83 | #define UART_GET_CHAR(port) readl((port)->membase + ATMEL_US_RHR) | ||
84 | #define UART_PUT_CHAR(port,v) writel(v, (port)->membase + ATMEL_US_THR) | ||
85 | #define UART_GET_BRGR(port) readl((port)->membase + ATMEL_US_BRGR) | ||
86 | #define UART_PUT_BRGR(port,v) writel(v, (port)->membase + ATMEL_US_BRGR) | ||
87 | #define UART_PUT_RTOR(port,v) writel(v, (port)->membase + ATMEL_US_RTOR) | ||
88 | |||
89 | // #define UART_GET_CR(port) readl((port)->membase + ATMEL_US_CR) // is write-only | ||
90 | |||
91 | /* PDC registers */ | ||
92 | #define UART_PUT_PTCR(port,v) writel(v, (port)->membase + ATMEL_PDC_PTCR) | ||
93 | #define UART_GET_PTSR(port) readl((port)->membase + ATMEL_PDC_PTSR) | ||
94 | |||
95 | #define UART_PUT_RPR(port,v) writel(v, (port)->membase + ATMEL_PDC_RPR) | ||
96 | #define UART_GET_RPR(port) readl((port)->membase + ATMEL_PDC_RPR) | ||
97 | #define UART_PUT_RCR(port,v) writel(v, (port)->membase + ATMEL_PDC_RCR) | ||
98 | #define UART_PUT_RNPR(port,v) writel(v, (port)->membase + ATMEL_PDC_RNPR) | ||
99 | #define UART_PUT_RNCR(port,v) writel(v, (port)->membase + ATMEL_PDC_RNCR) | ||
100 | |||
101 | #define UART_PUT_TPR(port,v) writel(v, (port)->membase + ATMEL_PDC_TPR) | ||
102 | #define UART_PUT_TCR(port,v) writel(v, (port)->membase + ATMEL_PDC_TCR) | ||
103 | //#define UART_PUT_TNPR(port,v) writel(v, (port)->membase + ATMEL_PDC_TNPR) | ||
104 | //#define UART_PUT_TNCR(port,v) writel(v, (port)->membase + ATMEL_PDC_TNCR) | ||
105 | |||
106 | static int (*atmel_open_hook)(struct uart_port *); | ||
107 | static void (*atmel_close_hook)(struct uart_port *); | ||
108 | |||
109 | /* | ||
110 | * We wrap our port structure around the generic uart_port. | ||
111 | */ | ||
112 | struct atmel_uart_port { | ||
113 | struct uart_port uart; /* uart */ | ||
114 | struct clk *clk; /* uart clock */ | ||
115 | unsigned short suspended; /* is port suspended? */ | ||
116 | }; | ||
117 | |||
118 | static struct atmel_uart_port atmel_ports[ATMEL_MAX_UART]; | ||
119 | |||
120 | #ifdef SUPPORT_SYSRQ | ||
121 | static struct console atmel_console; | ||
122 | #endif | ||
123 | |||
124 | /* | ||
125 | * Return TIOCSER_TEMT when transmitter FIFO and Shift register is empty. | ||
126 | */ | ||
127 | static u_int atmel_tx_empty(struct uart_port *port) | ||
128 | { | ||
129 | return (UART_GET_CSR(port) & ATMEL_US_TXEMPTY) ? TIOCSER_TEMT : 0; | ||
130 | } | ||
131 | |||
132 | /* | ||
133 | * Set state of the modem control output lines | ||
134 | */ | ||
135 | static void atmel_set_mctrl(struct uart_port *port, u_int mctrl) | ||
136 | { | ||
137 | unsigned int control = 0; | ||
138 | unsigned int mode; | ||
139 | |||
140 | #ifdef CONFIG_ARM | ||
141 | if (arch_identify() == ARCH_ID_AT91RM9200) { | ||
142 | /* | ||
143 | * AT91RM9200 Errata #39: RTS0 is not internally connected to PA21. | ||
144 | * We need to drive the pin manually. | ||
145 | */ | ||
146 | if (port->mapbase == AT91RM9200_BASE_US0) { | ||
147 | if (mctrl & TIOCM_RTS) | ||
148 | at91_set_gpio_value(AT91_PIN_PA21, 0); | ||
149 | else | ||
150 | at91_set_gpio_value(AT91_PIN_PA21, 1); | ||
151 | } | ||
152 | } | ||
153 | #endif | ||
154 | |||
155 | if (mctrl & TIOCM_RTS) | ||
156 | control |= ATMEL_US_RTSEN; | ||
157 | else | ||
158 | control |= ATMEL_US_RTSDIS; | ||
159 | |||
160 | if (mctrl & TIOCM_DTR) | ||
161 | control |= ATMEL_US_DTREN; | ||
162 | else | ||
163 | control |= ATMEL_US_DTRDIS; | ||
164 | |||
165 | UART_PUT_CR(port, control); | ||
166 | |||
167 | /* Local loopback mode? */ | ||
168 | mode = UART_GET_MR(port) & ~ATMEL_US_CHMODE; | ||
169 | if (mctrl & TIOCM_LOOP) | ||
170 | mode |= ATMEL_US_CHMODE_LOC_LOOP; | ||
171 | else | ||
172 | mode |= ATMEL_US_CHMODE_NORMAL; | ||
173 | UART_PUT_MR(port, mode); | ||
174 | } | ||
175 | |||
176 | /* | ||
177 | * Get state of the modem control input lines | ||
178 | */ | ||
179 | static u_int atmel_get_mctrl(struct uart_port *port) | ||
180 | { | ||
181 | unsigned int status, ret = 0; | ||
182 | |||
183 | status = UART_GET_CSR(port); | ||
184 | |||
185 | /* | ||
186 | * The control signals are active low. | ||
187 | */ | ||
188 | if (!(status & ATMEL_US_DCD)) | ||
189 | ret |= TIOCM_CD; | ||
190 | if (!(status & ATMEL_US_CTS)) | ||
191 | ret |= TIOCM_CTS; | ||
192 | if (!(status & ATMEL_US_DSR)) | ||
193 | ret |= TIOCM_DSR; | ||
194 | if (!(status & ATMEL_US_RI)) | ||
195 | ret |= TIOCM_RI; | ||
196 | |||
197 | return ret; | ||
198 | } | ||
199 | |||
200 | /* | ||
201 | * Stop transmitting. | ||
202 | */ | ||
203 | static void atmel_stop_tx(struct uart_port *port) | ||
204 | { | ||
205 | struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port; | ||
206 | |||
207 | UART_PUT_IDR(port, ATMEL_US_TXRDY); | ||
208 | } | ||
209 | |||
210 | /* | ||
211 | * Start transmitting. | ||
212 | */ | ||
213 | static void atmel_start_tx(struct uart_port *port) | ||
214 | { | ||
215 | struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port; | ||
216 | |||
217 | UART_PUT_IER(port, ATMEL_US_TXRDY); | ||
218 | } | ||
219 | |||
220 | /* | ||
221 | * Stop receiving - port is in process of being closed. | ||
222 | */ | ||
223 | static void atmel_stop_rx(struct uart_port *port) | ||
224 | { | ||
225 | struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port; | ||
226 | |||
227 | UART_PUT_IDR(port, ATMEL_US_RXRDY); | ||
228 | } | ||
229 | |||
230 | /* | ||
231 | * Enable modem status interrupts | ||
232 | */ | ||
233 | static void atmel_enable_ms(struct uart_port *port) | ||
234 | { | ||
235 | UART_PUT_IER(port, ATMEL_US_RIIC | ATMEL_US_DSRIC | ATMEL_US_DCDIC | ATMEL_US_CTSIC); | ||
236 | } | ||
237 | |||
238 | /* | ||
239 | * Control the transmission of a break signal | ||
240 | */ | ||
241 | static void atmel_break_ctl(struct uart_port *port, int break_state) | ||
242 | { | ||
243 | if (break_state != 0) | ||
244 | UART_PUT_CR(port, ATMEL_US_STTBRK); /* start break */ | ||
245 | else | ||
246 | UART_PUT_CR(port, ATMEL_US_STPBRK); /* stop break */ | ||
247 | } | ||
248 | |||
249 | /* | ||
250 | * Characters received (called from interrupt handler) | ||
251 | */ | ||
252 | static void atmel_rx_chars(struct uart_port *port, struct pt_regs *regs) | ||
253 | { | ||
254 | struct tty_struct *tty = port->info->tty; | ||
255 | unsigned int status, ch, flg; | ||
256 | |||
257 | status = UART_GET_CSR(port); | ||
258 | while (status & ATMEL_US_RXRDY) { | ||
259 | ch = UART_GET_CHAR(port); | ||
260 | |||
261 | port->icount.rx++; | ||
262 | |||
263 | flg = TTY_NORMAL; | ||
264 | |||
265 | /* | ||
266 | * note that the error handling code is | ||
267 | * out of the main execution path | ||
268 | */ | ||
269 | if (unlikely(status & (ATMEL_US_PARE | ATMEL_US_FRAME | ATMEL_US_OVRE | ATMEL_US_RXBRK))) { | ||
270 | UART_PUT_CR(port, ATMEL_US_RSTSTA); /* clear error */ | ||
271 | if (status & ATMEL_US_RXBRK) { | ||
272 | status &= ~(ATMEL_US_PARE | ATMEL_US_FRAME); /* ignore side-effect */ | ||
273 | port->icount.brk++; | ||
274 | if (uart_handle_break(port)) | ||
275 | goto ignore_char; | ||
276 | } | ||
277 | if (status & ATMEL_US_PARE) | ||
278 | port->icount.parity++; | ||
279 | if (status & ATMEL_US_FRAME) | ||
280 | port->icount.frame++; | ||
281 | if (status & ATMEL_US_OVRE) | ||
282 | port->icount.overrun++; | ||
283 | |||
284 | status &= port->read_status_mask; | ||
285 | |||
286 | if (status & ATMEL_US_RXBRK) | ||
287 | flg = TTY_BREAK; | ||
288 | else if (status & ATMEL_US_PARE) | ||
289 | flg = TTY_PARITY; | ||
290 | else if (status & ATMEL_US_FRAME) | ||
291 | flg = TTY_FRAME; | ||
292 | } | ||
293 | |||
294 | if (uart_handle_sysrq_char(port, ch, regs)) | ||
295 | goto ignore_char; | ||
296 | |||
297 | uart_insert_char(port, status, ATMEL_US_OVRE, ch, flg); | ||
298 | |||
299 | ignore_char: | ||
300 | status = UART_GET_CSR(port); | ||
301 | } | ||
302 | |||
303 | tty_flip_buffer_push(tty); | ||
304 | } | ||
305 | |||
306 | /* | ||
307 | * Transmit characters (called from interrupt handler) | ||
308 | */ | ||
309 | static void atmel_tx_chars(struct uart_port *port) | ||
310 | { | ||
311 | struct circ_buf *xmit = &port->info->xmit; | ||
312 | |||
313 | if (port->x_char) { | ||
314 | UART_PUT_CHAR(port, port->x_char); | ||
315 | port->icount.tx++; | ||
316 | port->x_char = 0; | ||
317 | return; | ||
318 | } | ||
319 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { | ||
320 | atmel_stop_tx(port); | ||
321 | return; | ||
322 | } | ||
323 | |||
324 | while (UART_GET_CSR(port) & ATMEL_US_TXRDY) { | ||
325 | UART_PUT_CHAR(port, xmit->buf[xmit->tail]); | ||
326 | xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); | ||
327 | port->icount.tx++; | ||
328 | if (uart_circ_empty(xmit)) | ||
329 | break; | ||
330 | } | ||
331 | |||
332 | if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) | ||
333 | uart_write_wakeup(port); | ||
334 | |||
335 | if (uart_circ_empty(xmit)) | ||
336 | atmel_stop_tx(port); | ||
337 | } | ||
338 | |||
339 | /* | ||
340 | * Interrupt handler | ||
341 | */ | ||
342 | static irqreturn_t atmel_interrupt(int irq, void *dev_id, struct pt_regs *regs) | ||
343 | { | ||
344 | struct uart_port *port = dev_id; | ||
345 | struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port; | ||
346 | unsigned int status, pending, pass_counter = 0; | ||
347 | |||
348 | status = UART_GET_CSR(port); | ||
349 | pending = status & UART_GET_IMR(port); | ||
350 | while (pending) { | ||
351 | /* Interrupt receive */ | ||
352 | if (pending & ATMEL_US_RXRDY) | ||
353 | atmel_rx_chars(port, regs); | ||
354 | |||
355 | // TODO: All reads to CSR will clear these interrupts! | ||
356 | if (pending & ATMEL_US_RIIC) port->icount.rng++; | ||
357 | if (pending & ATMEL_US_DSRIC) port->icount.dsr++; | ||
358 | if (pending & ATMEL_US_DCDIC) | ||
359 | uart_handle_dcd_change(port, !(status & ATMEL_US_DCD)); | ||
360 | if (pending & ATMEL_US_CTSIC) | ||
361 | uart_handle_cts_change(port, !(status & ATMEL_US_CTS)); | ||
362 | if (pending & (ATMEL_US_RIIC | ATMEL_US_DSRIC | ATMEL_US_DCDIC | ATMEL_US_CTSIC)) | ||
363 | wake_up_interruptible(&port->info->delta_msr_wait); | ||
364 | |||
365 | /* Interrupt transmit */ | ||
366 | if (pending & ATMEL_US_TXRDY) | ||
367 | atmel_tx_chars(port); | ||
368 | |||
369 | if (pass_counter++ > ATMEL_ISR_PASS_LIMIT) | ||
370 | break; | ||
371 | |||
372 | status = UART_GET_CSR(port); | ||
373 | pending = status & UART_GET_IMR(port); | ||
374 | } | ||
375 | return IRQ_HANDLED; | ||
376 | } | ||
377 | |||
378 | /* | ||
379 | * Perform initialization and enable port for reception | ||
380 | */ | ||
381 | static int atmel_startup(struct uart_port *port) | ||
382 | { | ||
383 | struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port; | ||
384 | int retval; | ||
385 | |||
386 | /* | ||
387 | * Ensure that no interrupts are enabled otherwise when | ||
388 | * request_irq() is called we could get stuck trying to | ||
389 | * handle an unexpected interrupt | ||
390 | */ | ||
391 | UART_PUT_IDR(port, -1); | ||
392 | |||
393 | /* | ||
394 | * Allocate the IRQ | ||
395 | */ | ||
396 | retval = request_irq(port->irq, atmel_interrupt, IRQF_SHARED, "atmel_serial", port); | ||
397 | if (retval) { | ||
398 | printk("atmel_serial: atmel_startup - Can't get irq\n"); | ||
399 | return retval; | ||
400 | } | ||
401 | |||
402 | /* | ||
403 | * If there is a specific "open" function (to register | ||
404 | * control line interrupts) | ||
405 | */ | ||
406 | if (atmel_open_hook) { | ||
407 | retval = atmel_open_hook(port); | ||
408 | if (retval) { | ||
409 | free_irq(port->irq, port); | ||
410 | return retval; | ||
411 | } | ||
412 | } | ||
413 | |||
414 | /* | ||
415 | * Finally, enable the serial port | ||
416 | */ | ||
417 | UART_PUT_CR(port, ATMEL_US_RSTSTA | ATMEL_US_RSTRX); | ||
418 | UART_PUT_CR(port, ATMEL_US_TXEN | ATMEL_US_RXEN); /* enable xmit & rcvr */ | ||
419 | |||
420 | UART_PUT_IER(port, ATMEL_US_RXRDY); /* enable receive only */ | ||
421 | |||
422 | return 0; | ||
423 | } | ||
424 | |||
425 | /* | ||
426 | * Disable the port | ||
427 | */ | ||
428 | static void atmel_shutdown(struct uart_port *port) | ||
429 | { | ||
430 | struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port; | ||
431 | |||
432 | /* | ||
433 | * Disable all interrupts, port and break condition. | ||
434 | */ | ||
435 | UART_PUT_CR(port, ATMEL_US_RSTSTA); | ||
436 | UART_PUT_IDR(port, -1); | ||
437 | |||
438 | /* | ||
439 | * Free the interrupt | ||
440 | */ | ||
441 | free_irq(port->irq, port); | ||
442 | |||
443 | /* | ||
444 | * If there is a specific "close" function (to unregister | ||
445 | * control line interrupts) | ||
446 | */ | ||
447 | if (atmel_close_hook) | ||
448 | atmel_close_hook(port); | ||
449 | } | ||
450 | |||
451 | /* | ||
452 | * Power / Clock management. | ||
453 | */ | ||
454 | static void atmel_serial_pm(struct uart_port *port, unsigned int state, unsigned int oldstate) | ||
455 | { | ||
456 | struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port; | ||
457 | |||
458 | switch (state) { | ||
459 | case 0: | ||
460 | /* | ||
461 | * Enable the peripheral clock for this serial port. | ||
462 | * This is called on uart_open() or a resume event. | ||
463 | */ | ||
464 | clk_enable(atmel_port->clk); | ||
465 | break; | ||
466 | case 3: | ||
467 | /* | ||
468 | * Disable the peripheral clock for this serial port. | ||
469 | * This is called on uart_close() or a suspend event. | ||
470 | */ | ||
471 | clk_disable(atmel_port->clk); | ||
472 | break; | ||
473 | default: | ||
474 | printk(KERN_ERR "atmel_serial: unknown pm %d\n", state); | ||
475 | } | ||
476 | } | ||
477 | |||
478 | /* | ||
479 | * Change the port parameters | ||
480 | */ | ||
481 | static void atmel_set_termios(struct uart_port *port, struct termios * termios, struct termios * old) | ||
482 | { | ||
483 | unsigned long flags; | ||
484 | unsigned int mode, imr, quot, baud; | ||
485 | |||
486 | baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); | ||
487 | quot = uart_get_divisor(port, baud); | ||
488 | |||
489 | /* Get current mode register */ | ||
490 | mode = UART_GET_MR(port) & ~(ATMEL_US_CHRL | ATMEL_US_NBSTOP | ATMEL_US_PAR); | ||
491 | |||
492 | /* byte size */ | ||
493 | switch (termios->c_cflag & CSIZE) { | ||
494 | case CS5: | ||
495 | mode |= ATMEL_US_CHRL_5; | ||
496 | break; | ||
497 | case CS6: | ||
498 | mode |= ATMEL_US_CHRL_6; | ||
499 | break; | ||
500 | case CS7: | ||
501 | mode |= ATMEL_US_CHRL_7; | ||
502 | break; | ||
503 | default: | ||
504 | mode |= ATMEL_US_CHRL_8; | ||
505 | break; | ||
506 | } | ||
507 | |||
508 | /* stop bits */ | ||
509 | if (termios->c_cflag & CSTOPB) | ||
510 | mode |= ATMEL_US_NBSTOP_2; | ||
511 | |||
512 | /* parity */ | ||
513 | if (termios->c_cflag & PARENB) { | ||
514 | if (termios->c_cflag & CMSPAR) { /* Mark or Space parity */ | ||
515 | if (termios->c_cflag & PARODD) | ||
516 | mode |= ATMEL_US_PAR_MARK; | ||
517 | else | ||
518 | mode |= ATMEL_US_PAR_SPACE; | ||
519 | } | ||
520 | else if (termios->c_cflag & PARODD) | ||
521 | mode |= ATMEL_US_PAR_ODD; | ||
522 | else | ||
523 | mode |= ATMEL_US_PAR_EVEN; | ||
524 | } | ||
525 | else | ||
526 | mode |= ATMEL_US_PAR_NONE; | ||
527 | |||
528 | spin_lock_irqsave(&port->lock, flags); | ||
529 | |||
530 | port->read_status_mask = ATMEL_US_OVRE; | ||
531 | if (termios->c_iflag & INPCK) | ||
532 | port->read_status_mask |= (ATMEL_US_FRAME | ATMEL_US_PARE); | ||
533 | if (termios->c_iflag & (BRKINT | PARMRK)) | ||
534 | port->read_status_mask |= ATMEL_US_RXBRK; | ||
535 | |||
536 | /* | ||
537 | * Characters to ignore | ||
538 | */ | ||
539 | port->ignore_status_mask = 0; | ||
540 | if (termios->c_iflag & IGNPAR) | ||
541 | port->ignore_status_mask |= (ATMEL_US_FRAME | ATMEL_US_PARE); | ||
542 | if (termios->c_iflag & IGNBRK) { | ||
543 | port->ignore_status_mask |= ATMEL_US_RXBRK; | ||
544 | /* | ||
545 | * If we're ignoring parity and break indicators, | ||
546 | * ignore overruns too (for real raw support). | ||
547 | */ | ||
548 | if (termios->c_iflag & IGNPAR) | ||
549 | port->ignore_status_mask |= ATMEL_US_OVRE; | ||
550 | } | ||
551 | |||
552 | // TODO: Ignore all characters if CREAD is set. | ||
553 | |||
554 | /* update the per-port timeout */ | ||
555 | uart_update_timeout(port, termios->c_cflag, baud); | ||
556 | |||
557 | /* disable interrupts and drain transmitter */ | ||
558 | imr = UART_GET_IMR(port); /* get interrupt mask */ | ||
559 | UART_PUT_IDR(port, -1); /* disable all interrupts */ | ||
560 | while (!(UART_GET_CSR(port) & ATMEL_US_TXEMPTY)) { barrier(); } | ||
561 | |||
562 | /* disable receiver and transmitter */ | ||
563 | UART_PUT_CR(port, ATMEL_US_TXDIS | ATMEL_US_RXDIS); | ||
564 | |||
565 | /* set the parity, stop bits and data size */ | ||
566 | UART_PUT_MR(port, mode); | ||
567 | |||
568 | /* set the baud rate */ | ||
569 | UART_PUT_BRGR(port, quot); | ||
570 | UART_PUT_CR(port, ATMEL_US_RSTSTA | ATMEL_US_RSTRX); | ||
571 | UART_PUT_CR(port, ATMEL_US_TXEN | ATMEL_US_RXEN); | ||
572 | |||
573 | /* restore interrupts */ | ||
574 | UART_PUT_IER(port, imr); | ||
575 | |||
576 | /* CTS flow-control and modem-status interrupts */ | ||
577 | if (UART_ENABLE_MS(port, termios->c_cflag)) | ||
578 | port->ops->enable_ms(port); | ||
579 | |||
580 | spin_unlock_irqrestore(&port->lock, flags); | ||
581 | } | ||
582 | |||
583 | /* | ||
584 | * Return string describing the specified port | ||
585 | */ | ||
586 | static const char *atmel_type(struct uart_port *port) | ||
587 | { | ||
588 | return (port->type == PORT_ATMEL) ? "ATMEL_SERIAL" : NULL; | ||
589 | } | ||
590 | |||
591 | /* | ||
592 | * Release the memory region(s) being used by 'port'. | ||
593 | */ | ||
594 | static void atmel_release_port(struct uart_port *port) | ||
595 | { | ||
596 | struct platform_device *pdev = to_platform_device(port->dev); | ||
597 | int size = pdev->resource[0].end - pdev->resource[0].start + 1; | ||
598 | |||
599 | release_mem_region(port->mapbase, size); | ||
600 | |||
601 | if (port->flags & UPF_IOREMAP) { | ||
602 | iounmap(port->membase); | ||
603 | port->membase = NULL; | ||
604 | } | ||
605 | } | ||
606 | |||
607 | /* | ||
608 | * Request the memory region(s) being used by 'port'. | ||
609 | */ | ||
610 | static int atmel_request_port(struct uart_port *port) | ||
611 | { | ||
612 | struct platform_device *pdev = to_platform_device(port->dev); | ||
613 | int size = pdev->resource[0].end - pdev->resource[0].start + 1; | ||
614 | |||
615 | if (!request_mem_region(port->mapbase, size, "atmel_serial")) | ||
616 | return -EBUSY; | ||
617 | |||
618 | if (port->flags & UPF_IOREMAP) { | ||
619 | port->membase = ioremap(port->mapbase, size); | ||
620 | if (port->membase == NULL) { | ||
621 | release_mem_region(port->mapbase, size); | ||
622 | return -ENOMEM; | ||
623 | } | ||
624 | } | ||
625 | |||
626 | return 0; | ||
627 | } | ||
628 | |||
629 | /* | ||
630 | * Configure/autoconfigure the port. | ||
631 | */ | ||
632 | static void atmel_config_port(struct uart_port *port, int flags) | ||
633 | { | ||
634 | if (flags & UART_CONFIG_TYPE) { | ||
635 | port->type = PORT_ATMEL; | ||
636 | atmel_request_port(port); | ||
637 | } | ||
638 | } | ||
639 | |||
640 | /* | ||
641 | * Verify the new serial_struct (for TIOCSSERIAL). | ||
642 | */ | ||
643 | static int atmel_verify_port(struct uart_port *port, struct serial_struct *ser) | ||
644 | { | ||
645 | int ret = 0; | ||
646 | if (ser->type != PORT_UNKNOWN && ser->type != PORT_ATMEL) | ||
647 | ret = -EINVAL; | ||
648 | if (port->irq != ser->irq) | ||
649 | ret = -EINVAL; | ||
650 | if (ser->io_type != SERIAL_IO_MEM) | ||
651 | ret = -EINVAL; | ||
652 | if (port->uartclk / 16 != ser->baud_base) | ||
653 | ret = -EINVAL; | ||
654 | if ((void *)port->mapbase != ser->iomem_base) | ||
655 | ret = -EINVAL; | ||
656 | if (port->iobase != ser->port) | ||
657 | ret = -EINVAL; | ||
658 | if (ser->hub6 != 0) | ||
659 | ret = -EINVAL; | ||
660 | return ret; | ||
661 | } | ||
662 | |||
663 | static struct uart_ops atmel_pops = { | ||
664 | .tx_empty = atmel_tx_empty, | ||
665 | .set_mctrl = atmel_set_mctrl, | ||
666 | .get_mctrl = atmel_get_mctrl, | ||
667 | .stop_tx = atmel_stop_tx, | ||
668 | .start_tx = atmel_start_tx, | ||
669 | .stop_rx = atmel_stop_rx, | ||
670 | .enable_ms = atmel_enable_ms, | ||
671 | .break_ctl = atmel_break_ctl, | ||
672 | .startup = atmel_startup, | ||
673 | .shutdown = atmel_shutdown, | ||
674 | .set_termios = atmel_set_termios, | ||
675 | .type = atmel_type, | ||
676 | .release_port = atmel_release_port, | ||
677 | .request_port = atmel_request_port, | ||
678 | .config_port = atmel_config_port, | ||
679 | .verify_port = atmel_verify_port, | ||
680 | .pm = atmel_serial_pm, | ||
681 | }; | ||
682 | |||
683 | /* | ||
684 | * Configure the port from the platform device resource info. | ||
685 | */ | ||
686 | static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port, struct platform_device *pdev) | ||
687 | { | ||
688 | struct uart_port *port = &atmel_port->uart; | ||
689 | struct atmel_uart_data *data = pdev->dev.platform_data; | ||
690 | |||
691 | port->iotype = UPIO_MEM; | ||
692 | port->flags = UPF_BOOT_AUTOCONF; | ||
693 | port->ops = &atmel_pops; | ||
694 | port->fifosize = 1; | ||
695 | port->line = pdev->id; | ||
696 | port->dev = &pdev->dev; | ||
697 | |||
698 | port->mapbase = pdev->resource[0].start; | ||
699 | port->irq = pdev->resource[1].start; | ||
700 | |||
701 | if (data->regs) | ||
702 | /* Already mapped by setup code */ | ||
703 | port->membase = data->regs; | ||
704 | else { | ||
705 | port->flags |= UPF_IOREMAP; | ||
706 | port->membase = NULL; | ||
707 | } | ||
708 | |||
709 | if (!atmel_port->clk) { /* for console, the clock could already be configured */ | ||
710 | atmel_port->clk = clk_get(&pdev->dev, "usart"); | ||
711 | clk_enable(atmel_port->clk); | ||
712 | port->uartclk = clk_get_rate(atmel_port->clk); | ||
713 | } | ||
714 | } | ||
715 | |||
716 | /* | ||
717 | * Register board-specific modem-control line handlers. | ||
718 | */ | ||
719 | void __init atmel_register_uart_fns(struct atmel_port_fns *fns) | ||
720 | { | ||
721 | if (fns->enable_ms) | ||
722 | atmel_pops.enable_ms = fns->enable_ms; | ||
723 | if (fns->get_mctrl) | ||
724 | atmel_pops.get_mctrl = fns->get_mctrl; | ||
725 | if (fns->set_mctrl) | ||
726 | atmel_pops.set_mctrl = fns->set_mctrl; | ||
727 | atmel_open_hook = fns->open; | ||
728 | atmel_close_hook = fns->close; | ||
729 | atmel_pops.pm = fns->pm; | ||
730 | atmel_pops.set_wake = fns->set_wake; | ||
731 | } | ||
732 | |||
733 | |||
734 | #ifdef CONFIG_SERIAL_ATMEL_CONSOLE | ||
735 | static void atmel_console_putchar(struct uart_port *port, int ch) | ||
736 | { | ||
737 | while (!(UART_GET_CSR(port) & ATMEL_US_TXRDY)) | ||
738 | barrier(); | ||
739 | UART_PUT_CHAR(port, ch); | ||
740 | } | ||
741 | |||
742 | /* | ||
743 | * Interrupts are disabled on entering | ||
744 | */ | ||
745 | static void atmel_console_write(struct console *co, const char *s, u_int count) | ||
746 | { | ||
747 | struct uart_port *port = &atmel_ports[co->index].uart; | ||
748 | unsigned int status, imr; | ||
749 | |||
750 | /* | ||
751 | * First, save IMR and then disable interrupts | ||
752 | */ | ||
753 | imr = UART_GET_IMR(port); /* get interrupt mask */ | ||
754 | UART_PUT_IDR(port, ATMEL_US_RXRDY | ATMEL_US_TXRDY); | ||
755 | |||
756 | uart_console_write(port, s, count, atmel_console_putchar); | ||
757 | |||
758 | /* | ||
759 | * Finally, wait for transmitter to become empty | ||
760 | * and restore IMR | ||
761 | */ | ||
762 | do { | ||
763 | status = UART_GET_CSR(port); | ||
764 | } while (!(status & ATMEL_US_TXRDY)); | ||
765 | UART_PUT_IER(port, imr); /* set interrupts back the way they were */ | ||
766 | } | ||
767 | |||
768 | /* | ||
769 | * If the port was already initialised (eg, by a boot loader), try to determine | ||
770 | * the current setup. | ||
771 | */ | ||
772 | static void __init atmel_console_get_options(struct uart_port *port, int *baud, int *parity, int *bits) | ||
773 | { | ||
774 | unsigned int mr, quot; | ||
775 | |||
776 | // TODO: CR is a write-only register | ||
777 | // unsigned int cr; | ||
778 | // | ||
779 | // cr = UART_GET_CR(port) & (ATMEL_US_RXEN | ATMEL_US_TXEN); | ||
780 | // if (cr == (ATMEL_US_RXEN | ATMEL_US_TXEN)) { | ||
781 | // /* ok, the port was enabled */ | ||
782 | // } | ||
783 | |||
784 | mr = UART_GET_MR(port) & ATMEL_US_CHRL; | ||
785 | if (mr == ATMEL_US_CHRL_8) | ||
786 | *bits = 8; | ||
787 | else | ||
788 | *bits = 7; | ||
789 | |||
790 | mr = UART_GET_MR(port) & ATMEL_US_PAR; | ||
791 | if (mr == ATMEL_US_PAR_EVEN) | ||
792 | *parity = 'e'; | ||
793 | else if (mr == ATMEL_US_PAR_ODD) | ||
794 | *parity = 'o'; | ||
795 | |||
796 | /* | ||
797 | * The serial core only rounds down when matching this to a | ||
798 | * supported baud rate. Make sure we don't end up slightly | ||
799 | * lower than one of those, as it would make us fall through | ||
800 | * to a much lower baud rate than we really want. | ||
801 | */ | ||
802 | quot = UART_GET_BRGR(port); | ||
803 | *baud = port->uartclk / (16 * (quot - 1)); | ||
804 | } | ||
805 | |||
806 | static int __init atmel_console_setup(struct console *co, char *options) | ||
807 | { | ||
808 | struct uart_port *port = &atmel_ports[co->index].uart; | ||
809 | int baud = 115200; | ||
810 | int bits = 8; | ||
811 | int parity = 'n'; | ||
812 | int flow = 'n'; | ||
813 | |||
814 | if (port->membase == 0) /* Port not initialized yet - delay setup */ | ||
815 | return -ENODEV; | ||
816 | |||
817 | UART_PUT_IDR(port, -1); /* disable interrupts */ | ||
818 | UART_PUT_CR(port, ATMEL_US_RSTSTA | ATMEL_US_RSTRX); | ||
819 | UART_PUT_CR(port, ATMEL_US_TXEN | ATMEL_US_RXEN); | ||
820 | |||
821 | if (options) | ||
822 | uart_parse_options(options, &baud, &parity, &bits, &flow); | ||
823 | else | ||
824 | atmel_console_get_options(port, &baud, &parity, &bits); | ||
825 | |||
826 | return uart_set_options(port, co, baud, parity, bits, flow); | ||
827 | } | ||
828 | |||
829 | static struct uart_driver atmel_uart; | ||
830 | |||
831 | static struct console atmel_console = { | ||
832 | .name = ATMEL_DEVICENAME, | ||
833 | .write = atmel_console_write, | ||
834 | .device = uart_console_device, | ||
835 | .setup = atmel_console_setup, | ||
836 | .flags = CON_PRINTBUFFER, | ||
837 | .index = -1, | ||
838 | .data = &atmel_uart, | ||
839 | }; | ||
840 | |||
841 | #define ATMEL_CONSOLE_DEVICE &atmel_console | ||
842 | |||
843 | /* | ||
844 | * Early console initialization (before VM subsystem initialized). | ||
845 | */ | ||
846 | static int __init atmel_console_init(void) | ||
847 | { | ||
848 | if (atmel_default_console_device) { | ||
849 | add_preferred_console(ATMEL_DEVICENAME, atmel_default_console_device->id, NULL); | ||
850 | atmel_init_port(&(atmel_ports[atmel_default_console_device->id]), atmel_default_console_device); | ||
851 | register_console(&atmel_console); | ||
852 | } | ||
853 | |||
854 | return 0; | ||
855 | } | ||
856 | console_initcall(atmel_console_init); | ||
857 | |||
858 | /* | ||
859 | * Late console initialization. | ||
860 | */ | ||
861 | static int __init atmel_late_console_init(void) | ||
862 | { | ||
863 | if (atmel_default_console_device && !(atmel_console.flags & CON_ENABLED)) | ||
864 | register_console(&atmel_console); | ||
865 | |||
866 | return 0; | ||
867 | } | ||
868 | core_initcall(atmel_late_console_init); | ||
869 | |||
870 | #else | ||
871 | #define ATMEL_CONSOLE_DEVICE NULL | ||
872 | #endif | ||
873 | |||
874 | static struct uart_driver atmel_uart = { | ||
875 | .owner = THIS_MODULE, | ||
876 | .driver_name = "atmel_serial", | ||
877 | .dev_name = ATMEL_DEVICENAME, | ||
878 | .major = SERIAL_ATMEL_MAJOR, | ||
879 | .minor = MINOR_START, | ||
880 | .nr = ATMEL_MAX_UART, | ||
881 | .cons = ATMEL_CONSOLE_DEVICE, | ||
882 | }; | ||
883 | |||
884 | #ifdef CONFIG_PM | ||
885 | static int atmel_serial_suspend(struct platform_device *pdev, pm_message_t state) | ||
886 | { | ||
887 | struct uart_port *port = platform_get_drvdata(pdev); | ||
888 | struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port; | ||
889 | |||
890 | if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock()) | ||
891 | enable_irq_wake(port->irq); | ||
892 | else { | ||
893 | disable_irq_wake(port->irq); | ||
894 | uart_suspend_port(&atmel_uart, port); | ||
895 | atmel_port->suspended = 1; | ||
896 | } | ||
897 | |||
898 | return 0; | ||
899 | } | ||
900 | |||
901 | static int atmel_serial_resume(struct platform_device *pdev) | ||
902 | { | ||
903 | struct uart_port *port = platform_get_drvdata(pdev); | ||
904 | struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port; | ||
905 | |||
906 | if (atmel_port->suspended) { | ||
907 | uart_resume_port(&atmel_uart, port); | ||
908 | atmel_port->suspended = 0; | ||
909 | } | ||
910 | |||
911 | return 0; | ||
912 | } | ||
913 | #else | ||
914 | #define atmel_serial_suspend NULL | ||
915 | #define atmel_serial_resume NULL | ||
916 | #endif | ||
917 | |||
918 | static int __devinit atmel_serial_probe(struct platform_device *pdev) | ||
919 | { | ||
920 | struct atmel_uart_port *port; | ||
921 | int ret; | ||
922 | |||
923 | port = &atmel_ports[pdev->id]; | ||
924 | atmel_init_port(port, pdev); | ||
925 | |||
926 | ret = uart_add_one_port(&atmel_uart, &port->uart); | ||
927 | if (!ret) { | ||
928 | device_init_wakeup(&pdev->dev, 1); | ||
929 | platform_set_drvdata(pdev, port); | ||
930 | } | ||
931 | |||
932 | return ret; | ||
933 | } | ||
934 | |||
935 | static int __devexit atmel_serial_remove(struct platform_device *pdev) | ||
936 | { | ||
937 | struct uart_port *port = platform_get_drvdata(pdev); | ||
938 | struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port; | ||
939 | int ret = 0; | ||
940 | |||
941 | clk_disable(atmel_port->clk); | ||
942 | clk_put(atmel_port->clk); | ||
943 | |||
944 | device_init_wakeup(&pdev->dev, 0); | ||
945 | platform_set_drvdata(pdev, NULL); | ||
946 | |||
947 | if (port) { | ||
948 | ret = uart_remove_one_port(&atmel_uart, port); | ||
949 | kfree(port); | ||
950 | } | ||
951 | |||
952 | return ret; | ||
953 | } | ||
954 | |||
955 | static struct platform_driver atmel_serial_driver = { | ||
956 | .probe = atmel_serial_probe, | ||
957 | .remove = __devexit_p(atmel_serial_remove), | ||
958 | .suspend = atmel_serial_suspend, | ||
959 | .resume = atmel_serial_resume, | ||
960 | .driver = { | ||
961 | .name = "atmel_usart", | ||
962 | .owner = THIS_MODULE, | ||
963 | }, | ||
964 | }; | ||
965 | |||
966 | static int __init atmel_serial_init(void) | ||
967 | { | ||
968 | int ret; | ||
969 | |||
970 | ret = uart_register_driver(&atmel_uart); | ||
971 | if (ret) | ||
972 | return ret; | ||
973 | |||
974 | ret = platform_driver_register(&atmel_serial_driver); | ||
975 | if (ret) | ||
976 | uart_unregister_driver(&atmel_uart); | ||
977 | |||
978 | return ret; | ||
979 | } | ||
980 | |||
981 | static void __exit atmel_serial_exit(void) | ||
982 | { | ||
983 | platform_driver_unregister(&atmel_serial_driver); | ||
984 | uart_unregister_driver(&atmel_uart); | ||
985 | } | ||
986 | |||
987 | module_init(atmel_serial_init); | ||
988 | module_exit(atmel_serial_exit); | ||
989 | |||
990 | MODULE_AUTHOR("Rick Bronson"); | ||
991 | MODULE_DESCRIPTION("Atmel AT91 / AT32 serial port driver"); | ||
992 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/serial/atmel_serial.h b/drivers/serial/atmel_serial.h new file mode 100644 index 000000000000..eced2ad1a8d9 --- /dev/null +++ b/drivers/serial/atmel_serial.h | |||
@@ -0,0 +1,123 @@ | |||
1 | /* | ||
2 | * drivers/serial/atmel_serial.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * USART registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef ATMEL_SERIAL_H | ||
17 | #define ATMEL_SERIAL_H | ||
18 | |||
19 | #define ATMEL_US_CR 0x00 /* Control Register */ | ||
20 | #define ATMEL_US_RSTRX (1 << 2) /* Reset Receiver */ | ||
21 | #define ATMEL_US_RSTTX (1 << 3) /* Reset Transmitter */ | ||
22 | #define ATMEL_US_RXEN (1 << 4) /* Receiver Enable */ | ||
23 | #define ATMEL_US_RXDIS (1 << 5) /* Receiver Disable */ | ||
24 | #define ATMEL_US_TXEN (1 << 6) /* Transmitter Enable */ | ||
25 | #define ATMEL_US_TXDIS (1 << 7) /* Transmitter Disable */ | ||
26 | #define ATMEL_US_RSTSTA (1 << 8) /* Reset Status Bits */ | ||
27 | #define ATMEL_US_STTBRK (1 << 9) /* Start Break */ | ||
28 | #define ATMEL_US_STPBRK (1 << 10) /* Stop Break */ | ||
29 | #define ATMEL_US_STTTO (1 << 11) /* Start Time-out */ | ||
30 | #define ATMEL_US_SENDA (1 << 12) /* Send Address */ | ||
31 | #define ATMEL_US_RSTIT (1 << 13) /* Reset Iterations */ | ||
32 | #define ATMEL_US_RSTNACK (1 << 14) /* Reset Non Acknowledge */ | ||
33 | #define ATMEL_US_RETTO (1 << 15) /* Rearm Time-out */ | ||
34 | #define ATMEL_US_DTREN (1 << 16) /* Data Terminal Ready Enable */ | ||
35 | #define ATMEL_US_DTRDIS (1 << 17) /* Data Terminal Ready Disable */ | ||
36 | #define ATMEL_US_RTSEN (1 << 18) /* Request To Send Enable */ | ||
37 | #define ATMEL_US_RTSDIS (1 << 19) /* Request To Send Disable */ | ||
38 | |||
39 | #define ATMEL_US_MR 0x04 /* Mode Register */ | ||
40 | #define ATMEL_US_USMODE (0xf << 0) /* Mode of the USART */ | ||
41 | #define ATMEL_US_USMODE_NORMAL 0 | ||
42 | #define ATMEL_US_USMODE_RS485 1 | ||
43 | #define ATMEL_US_USMODE_HWHS 2 | ||
44 | #define ATMEL_US_USMODE_MODEM 3 | ||
45 | #define ATMEL_US_USMODE_ISO7816_T0 4 | ||
46 | #define ATMEL_US_USMODE_ISO7816_T1 6 | ||
47 | #define ATMEL_US_USMODE_IRDA 8 | ||
48 | #define ATMEL_US_USCLKS (3 << 4) /* Clock Selection */ | ||
49 | #define ATMEL_US_CHRL (3 << 6) /* Character Length */ | ||
50 | #define ATMEL_US_CHRL_5 (0 << 6) | ||
51 | #define ATMEL_US_CHRL_6 (1 << 6) | ||
52 | #define ATMEL_US_CHRL_7 (2 << 6) | ||
53 | #define ATMEL_US_CHRL_8 (3 << 6) | ||
54 | #define ATMEL_US_SYNC (1 << 8) /* Synchronous Mode Select */ | ||
55 | #define ATMEL_US_PAR (7 << 9) /* Parity Type */ | ||
56 | #define ATMEL_US_PAR_EVEN (0 << 9) | ||
57 | #define ATMEL_US_PAR_ODD (1 << 9) | ||
58 | #define ATMEL_US_PAR_SPACE (2 << 9) | ||
59 | #define ATMEL_US_PAR_MARK (3 << 9) | ||
60 | #define ATMEL_US_PAR_NONE (4 << 9) | ||
61 | #define ATMEL_US_PAR_MULTI_DROP (6 << 9) | ||
62 | #define ATMEL_US_NBSTOP (3 << 12) /* Number of Stop Bits */ | ||
63 | #define ATMEL_US_NBSTOP_1 (0 << 12) | ||
64 | #define ATMEL_US_NBSTOP_1_5 (1 << 12) | ||
65 | #define ATMEL_US_NBSTOP_2 (2 << 12) | ||
66 | #define ATMEL_US_CHMODE (3 << 14) /* Channel Mode */ | ||
67 | #define ATMEL_US_CHMODE_NORMAL (0 << 14) | ||
68 | #define ATMEL_US_CHMODE_ECHO (1 << 14) | ||
69 | #define ATMEL_US_CHMODE_LOC_LOOP (2 << 14) | ||
70 | #define ATMEL_US_CHMODE_REM_LOOP (3 << 14) | ||
71 | #define ATMEL_US_MSBF (1 << 16) /* Bit Order */ | ||
72 | #define ATMEL_US_MODE9 (1 << 17) /* 9-bit Character Length */ | ||
73 | #define ATMEL_US_CLKO (1 << 18) /* Clock Output Select */ | ||
74 | #define ATMEL_US_OVER (1 << 19) /* Oversampling Mode */ | ||
75 | #define ATMEL_US_INACK (1 << 20) /* Inhibit Non Acknowledge */ | ||
76 | #define ATMEL_US_DSNACK (1 << 21) /* Disable Successive NACK */ | ||
77 | #define ATMEL_US_MAX_ITER (7 << 24) /* Max Iterations */ | ||
78 | #define ATMEL_US_FILTER (1 << 28) /* Infrared Receive Line Filter */ | ||
79 | |||
80 | #define ATMEL_US_IER 0x08 /* Interrupt Enable Register */ | ||
81 | #define ATMEL_US_RXRDY (1 << 0) /* Receiver Ready */ | ||
82 | #define ATMEL_US_TXRDY (1 << 1) /* Transmitter Ready */ | ||
83 | #define ATMEL_US_RXBRK (1 << 2) /* Break Received / End of Break */ | ||
84 | #define ATMEL_US_ENDRX (1 << 3) /* End of Receiver Transfer */ | ||
85 | #define ATMEL_US_ENDTX (1 << 4) /* End of Transmitter Transfer */ | ||
86 | #define ATMEL_US_OVRE (1 << 5) /* Overrun Error */ | ||
87 | #define ATMEL_US_FRAME (1 << 6) /* Framing Error */ | ||
88 | #define ATMEL_US_PARE (1 << 7) /* Parity Error */ | ||
89 | #define ATMEL_US_TIMEOUT (1 << 8) /* Receiver Time-out */ | ||
90 | #define ATMEL_US_TXEMPTY (1 << 9) /* Transmitter Empty */ | ||
91 | #define ATMEL_US_ITERATION (1 << 10) /* Max number of Repetitions Reached */ | ||
92 | #define ATMEL_US_TXBUFE (1 << 11) /* Transmission Buffer Empty */ | ||
93 | #define ATMEL_US_RXBUFF (1 << 12) /* Reception Buffer Full */ | ||
94 | #define ATMEL_US_NACK (1 << 13) /* Non Acknowledge */ | ||
95 | #define ATMEL_US_RIIC (1 << 16) /* Ring Indicator Input Change */ | ||
96 | #define ATMEL_US_DSRIC (1 << 17) /* Data Set Ready Input Change */ | ||
97 | #define ATMEL_US_DCDIC (1 << 18) /* Data Carrier Detect Input Change */ | ||
98 | #define ATMEL_US_CTSIC (1 << 19) /* Clear to Send Input Change */ | ||
99 | #define ATMEL_US_RI (1 << 20) /* RI */ | ||
100 | #define ATMEL_US_DSR (1 << 21) /* DSR */ | ||
101 | #define ATMEL_US_DCD (1 << 22) /* DCD */ | ||
102 | #define ATMEL_US_CTS (1 << 23) /* CTS */ | ||
103 | |||
104 | #define ATMEL_US_IDR 0x0c /* Interrupt Disable Register */ | ||
105 | #define ATMEL_US_IMR 0x10 /* Interrupt Mask Register */ | ||
106 | #define ATMEL_US_CSR 0x14 /* Channel Status Register */ | ||
107 | #define ATMEL_US_RHR 0x18 /* Receiver Holding Register */ | ||
108 | #define ATMEL_US_THR 0x1c /* Transmitter Holding Register */ | ||
109 | |||
110 | #define ATMEL_US_BRGR 0x20 /* Baud Rate Generator Register */ | ||
111 | #define ATMEL_US_CD (0xffff << 0) /* Clock Divider */ | ||
112 | |||
113 | #define ATMEL_US_RTOR 0x24 /* Receiver Time-out Register */ | ||
114 | #define ATMEL_US_TO (0xffff << 0) /* Time-out Value */ | ||
115 | |||
116 | #define ATMEL_US_TTGR 0x28 /* Transmitter Timeguard Register */ | ||
117 | #define ATMEL_US_TG (0xff << 0) /* Timeguard Value */ | ||
118 | |||
119 | #define ATMEL_US_FIDI 0x40 /* FI DI Ratio Register */ | ||
120 | #define ATMEL_US_NER 0x44 /* Number of Errors Register */ | ||
121 | #define ATMEL_US_IF 0x4c /* IrDA Filter Register */ | ||
122 | |||
123 | #endif | ||
diff --git a/drivers/serial/cpm_uart/cpm_uart.h b/drivers/serial/cpm_uart/cpm_uart.h index 3b35cb779539..a8f894c78194 100644 --- a/drivers/serial/cpm_uart/cpm_uart.h +++ b/drivers/serial/cpm_uart/cpm_uart.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #ifndef CPM_UART_H | 16 | #ifndef CPM_UART_H |
17 | #define CPM_UART_H | 17 | #define CPM_UART_H |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
21 | #include <linux/fs_uart_pd.h> | 20 | #include <linux/fs_uart_pd.h> |
22 | 21 | ||
diff --git a/drivers/serial/netx-serial.c b/drivers/serial/netx-serial.c index c1adc9e4b239..7502109d37f0 100644 --- a/drivers/serial/netx-serial.c +++ b/drivers/serial/netx-serial.c | |||
@@ -17,8 +17,6 @@ | |||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | |||
22 | #if defined(CONFIG_SERIAL_NETX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 20 | #if defined(CONFIG_SERIAL_NETX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
23 | #define SUPPORT_SYSRQ | 21 | #define SUPPORT_SYSRQ |
24 | #endif | 22 | #endif |
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index f336ba6778dd..5c025d1190c1 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -20,7 +20,6 @@ | |||
20 | 20 | ||
21 | #undef DEBUG | 21 | #undef DEBUG |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
26 | #include <linux/timer.h> | 25 | #include <linux/timer.h> |
diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h index 28643c4dc850..7ee992146ae9 100644 --- a/drivers/serial/sh-sci.h +++ b/drivers/serial/sh-sci.h | |||
@@ -10,7 +10,6 @@ | |||
10 | * Modified to support SH7300(SH-Mobile) SCIF. Takashi Kusuda (Jun 2003). | 10 | * Modified to support SH7300(SH-Mobile) SCIF. Takashi Kusuda (Jun 2003). |
11 | * Modified to support H8/300 Series Yoshinori Sato (Feb 2004). | 11 | * Modified to support H8/300 Series Yoshinori Sato (Feb 2004). |
12 | */ | 12 | */ |
13 | #include <linux/config.h> | ||
14 | #include <linux/serial_core.h> | 13 | #include <linux/serial_core.h> |
15 | #include <asm/io.h> | 14 | #include <asm/io.h> |
16 | 15 | ||
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index 5fc14563ee3a..20eb6e95a3a0 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | //#define DEBUG | 14 | //#define DEBUG |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
18 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
19 | #include <linux/workqueue.h> | 18 | #include <linux/workqueue.h> |
diff --git a/drivers/spi/spi_s3c24xx_gpio.c b/drivers/spi/spi_s3c24xx_gpio.c index aacdceb8f44b..a5d2cdfff46f 100644 --- a/drivers/spi/spi_s3c24xx_gpio.c +++ b/drivers/spi/spi_s3c24xx_gpio.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c index 16332cc57946..ebb20ff7ac58 100644 --- a/drivers/usb/core/generic.c +++ b/drivers/usb/core/generic.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/usb.h> | 20 | #include <linux/usb.h> |
22 | #include "usb.h" | 21 | #include "usb.h" |
23 | 22 | ||
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c index 83601d4009e3..64554acad63f 100644 --- a/drivers/usb/gadget/gmidi.c +++ b/drivers/usb/gadget/gmidi.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #define DEBUG 1 | 21 | #define DEBUG 1 |
22 | // #define VERBOSE | 22 | // #define VERBOSE |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
27 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c index cb2e2a604d1b..0a315200b331 100644 --- a/drivers/usb/host/u132-hcd.c +++ b/drivers/usb/host/u132-hcd.c | |||
@@ -35,7 +35,6 @@ | |||
35 | * via an ELAN U132 adapter. | 35 | * via an ELAN U132 adapter. |
36 | * | 36 | * |
37 | */ | 37 | */ |
38 | #include <linux/config.h> | ||
39 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
40 | #include <linux/module.h> | 39 | #include <linux/module.h> |
41 | #include <linux/moduleparam.h> | 40 | #include <linux/moduleparam.h> |
diff --git a/drivers/usb/input/usbtouchscreen.c b/drivers/usb/input/usbtouchscreen.c index 4640d1000d83..923e22db18d4 100644 --- a/drivers/usb/input/usbtouchscreen.c +++ b/drivers/usb/input/usbtouchscreen.c | |||
@@ -35,7 +35,6 @@ | |||
35 | 35 | ||
36 | //#define DEBUG | 36 | //#define DEBUG |
37 | 37 | ||
38 | #include <linux/config.h> | ||
39 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
40 | #include <linux/slab.h> | 39 | #include <linux/slab.h> |
41 | #include <linux/input.h> | 40 | #include <linux/input.h> |
diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c index bfde82f5d180..fc6cc147996f 100644 --- a/drivers/usb/misc/appledisplay.c +++ b/drivers/usb/misc/appledisplay.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
25 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
26 | #include <linux/init.h> | 25 | #include <linux/init.h> |
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c index b88a09497c28..c6f2f488a40f 100644 --- a/drivers/usb/misc/ftdi-elan.c +++ b/drivers/usb/misc/ftdi-elan.c | |||
@@ -35,7 +35,6 @@ | |||
35 | * via an ELAN U132 adapter. | 35 | * via an ELAN U132 adapter. |
36 | * | 36 | * |
37 | */ | 37 | */ |
38 | #include <linux/config.h> | ||
39 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
40 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
41 | #include <linux/init.h> | 40 | #include <linux/init.h> |
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index a44124c7e851..a287836e39f1 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c | |||
@@ -36,7 +36,6 @@ | |||
36 | * | 36 | * |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include <linux/config.h> | ||
40 | #include <linux/mutex.h> | 39 | #include <linux/mutex.h> |
41 | #include <linux/module.h> | 40 | #include <linux/module.h> |
42 | #include <linux/kernel.h> | 41 | #include <linux/kernel.h> |
diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c index fb48feca8353..bf26c3c56990 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_con.c +++ b/drivers/usb/misc/sisusbvga/sisusb_con.c | |||
@@ -47,7 +47,6 @@ | |||
47 | * | 47 | * |
48 | */ | 48 | */ |
49 | 49 | ||
50 | #include <linux/config.h> | ||
51 | #include <linux/mutex.h> | 50 | #include <linux/mutex.h> |
52 | #include <linux/module.h> | 51 | #include <linux/module.h> |
53 | #include <linux/kernel.h> | 52 | #include <linux/kernel.h> |
diff --git a/drivers/video/intelfb/intelfb_i2c.c b/drivers/video/intelfb/intelfb_i2c.c index c1113d6e941d..5686e2164e39 100644 --- a/drivers/video/intelfb/intelfb_i2c.c +++ b/drivers/video/intelfb/intelfb_i2c.c | |||
@@ -25,7 +25,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. | |||
25 | 25 | ||
26 | **************************************************************************/ | 26 | **************************************************************************/ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
31 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
diff --git a/fs/isofs/namei.c b/fs/isofs/namei.c index e7ba0c30e071..c04b3a14a3e9 100644 --- a/fs/isofs/namei.c +++ b/fs/isofs/namei.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * (C) 1991 Linus Torvalds - minix filesystem | 6 | * (C) 1991 Linus Torvalds - minix filesystem |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> /* Joliet? */ | ||
10 | #include <linux/smp_lock.h> | 9 | #include <linux/smp_lock.h> |
11 | #include "isofs.h" | 10 | #include "isofs.h" |
12 | 11 | ||
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 8106f3b29e4a..6e4e48c5092a 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | 15 | ||
diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c index 76b08ae9ed82..20c6f39ea38a 100644 --- a/fs/nfs/getroot.c +++ b/fs/nfs/getroot.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | 14 | ||
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c index 60408646176b..ec1114b33d89 100644 --- a/fs/nfs/namespace.c +++ b/fs/nfs/namespace.c | |||
@@ -7,8 +7,6 @@ | |||
7 | * NFS namespace | 7 | * NFS namespace |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | |||
12 | #include <linux/dcache.h> | 10 | #include <linux/dcache.h> |
13 | #include <linux/mount.h> | 11 | #include <linux/mount.h> |
14 | #include <linux/namei.h> | 12 | #include <linux/namei.h> |
diff --git a/fs/nfs/nfs4namespace.c b/fs/nfs/nfs4namespace.c index 24e47f3bbd17..b872779d7cd5 100644 --- a/fs/nfs/nfs4namespace.c +++ b/fs/nfs/nfs4namespace.c | |||
@@ -7,8 +7,6 @@ | |||
7 | * NFSv4 namespace | 7 | * NFSv4 namespace |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | |||
12 | #include <linux/dcache.h> | 10 | #include <linux/dcache.h> |
13 | #include <linux/mount.h> | 11 | #include <linux/mount.h> |
14 | #include <linux/namei.h> | 12 | #include <linux/namei.h> |
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index 1d656a645199..8dfefe41a8da 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c | |||
@@ -69,7 +69,6 @@ | |||
69 | * Fabian Frederick: Option parser rebuilt (using parser lib) | 69 | * Fabian Frederick: Option parser rebuilt (using parser lib) |
70 | */ | 70 | */ |
71 | 71 | ||
72 | #include <linux/config.h> | ||
73 | #include <linux/types.h> | 72 | #include <linux/types.h> |
74 | #include <linux/string.h> | 73 | #include <linux/string.h> |
75 | #include <linux/kernel.h> | 74 | #include <linux/kernel.h> |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index e8d40030cab4..28659a919d6e 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * of another (see nfs_lookup()) | 20 | * of another (see nfs_lookup()) |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | #include <linux/init.h> | 24 | #include <linux/init.h> |
26 | 25 | ||
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index c093642fb983..b67ce9354048 100644 --- a/fs/reiserfs/file.c +++ b/fs/reiserfs/file.c | |||
@@ -2,7 +2,6 @@ | |||
2 | * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README | 2 | * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/config.h> | ||
6 | #include <linux/time.h> | 5 | #include <linux/time.h> |
7 | #include <linux/reiserfs_fs.h> | 6 | #include <linux/reiserfs_fs.h> |
8 | #include <linux/reiserfs_acl.h> | 7 | #include <linux/reiserfs_acl.h> |
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_usart.h b/include/asm-arm/arch-at91rm9200/at91rm9200_usart.h deleted file mode 100644 index 79f851e31b9c..000000000000 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_usart.h +++ /dev/null | |||
@@ -1,123 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_usart.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * USART registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91RM9200_USART_H | ||
17 | #define AT91RM9200_USART_H | ||
18 | |||
19 | #define AT91_US_CR 0x00 /* Control Register */ | ||
20 | #define AT91_US_RSTRX (1 << 2) /* Reset Receiver */ | ||
21 | #define AT91_US_RSTTX (1 << 3) /* Reset Transmitter */ | ||
22 | #define AT91_US_RXEN (1 << 4) /* Receiver Enable */ | ||
23 | #define AT91_US_RXDIS (1 << 5) /* Receiver Disable */ | ||
24 | #define AT91_US_TXEN (1 << 6) /* Transmitter Enable */ | ||
25 | #define AT91_US_TXDIS (1 << 7) /* Transmitter Disable */ | ||
26 | #define AT91_US_RSTSTA (1 << 8) /* Reset Status Bits */ | ||
27 | #define AT91_US_STTBRK (1 << 9) /* Start Break */ | ||
28 | #define AT91_US_STPBRK (1 << 10) /* Stop Break */ | ||
29 | #define AT91_US_STTTO (1 << 11) /* Start Time-out */ | ||
30 | #define AT91_US_SENDA (1 << 12) /* Send Address */ | ||
31 | #define AT91_US_RSTIT (1 << 13) /* Reset Iterations */ | ||
32 | #define AT91_US_RSTNACK (1 << 14) /* Reset Non Acknowledge */ | ||
33 | #define AT91_US_RETTO (1 << 15) /* Rearm Time-out */ | ||
34 | #define AT91_US_DTREN (1 << 16) /* Data Terminal Ready Enable */ | ||
35 | #define AT91_US_DTRDIS (1 << 17) /* Data Terminal Ready Disable */ | ||
36 | #define AT91_US_RTSEN (1 << 18) /* Request To Send Enable */ | ||
37 | #define AT91_US_RTSDIS (1 << 19) /* Request To Send Disable */ | ||
38 | |||
39 | #define AT91_US_MR 0x04 /* Mode Register */ | ||
40 | #define AT91_US_USMODE (0xf << 0) /* Mode of the USART */ | ||
41 | #define AT91_US_USMODE_NORMAL 0 | ||
42 | #define AT91_US_USMODE_RS485 1 | ||
43 | #define AT91_US_USMODE_HWHS 2 | ||
44 | #define AT91_US_USMODE_MODEM 3 | ||
45 | #define AT91_US_USMODE_ISO7816_T0 4 | ||
46 | #define AT91_US_USMODE_ISO7816_T1 6 | ||
47 | #define AT91_US_USMODE_IRDA 8 | ||
48 | #define AT91_US_USCLKS (3 << 4) /* Clock Selection */ | ||
49 | #define AT91_US_CHRL (3 << 6) /* Character Length */ | ||
50 | #define AT91_US_CHRL_5 (0 << 6) | ||
51 | #define AT91_US_CHRL_6 (1 << 6) | ||
52 | #define AT91_US_CHRL_7 (2 << 6) | ||
53 | #define AT91_US_CHRL_8 (3 << 6) | ||
54 | #define AT91_US_SYNC (1 << 8) /* Synchronous Mode Select */ | ||
55 | #define AT91_US_PAR (7 << 9) /* Parity Type */ | ||
56 | #define AT91_US_PAR_EVEN (0 << 9) | ||
57 | #define AT91_US_PAR_ODD (1 << 9) | ||
58 | #define AT91_US_PAR_SPACE (2 << 9) | ||
59 | #define AT91_US_PAR_MARK (3 << 9) | ||
60 | #define AT91_US_PAR_NONE (4 << 9) | ||
61 | #define AT91_US_PAR_MULTI_DROP (6 << 9) | ||
62 | #define AT91_US_NBSTOP (3 << 12) /* Number of Stop Bits */ | ||
63 | #define AT91_US_NBSTOP_1 (0 << 12) | ||
64 | #define AT91_US_NBSTOP_1_5 (1 << 12) | ||
65 | #define AT91_US_NBSTOP_2 (2 << 12) | ||
66 | #define AT91_US_CHMODE (3 << 14) /* Channel Mode */ | ||
67 | #define AT91_US_CHMODE_NORMAL (0 << 14) | ||
68 | #define AT91_US_CHMODE_ECHO (1 << 14) | ||
69 | #define AT91_US_CHMODE_LOC_LOOP (2 << 14) | ||
70 | #define AT91_US_CHMODE_REM_LOOP (3 << 14) | ||
71 | #define AT91_US_MSBF (1 << 16) /* Bit Order */ | ||
72 | #define AT91_US_MODE9 (1 << 17) /* 9-bit Character Length */ | ||
73 | #define AT91_US_CLKO (1 << 18) /* Clock Output Select */ | ||
74 | #define AT91_US_OVER (1 << 19) /* Oversampling Mode */ | ||
75 | #define AT91_US_INACK (1 << 20) /* Inhibit Non Acknowledge */ | ||
76 | #define AT91_US_DSNACK (1 << 21) /* Disable Successive NACK */ | ||
77 | #define AT91_US_MAX_ITER (7 << 24) /* Max Iterations */ | ||
78 | #define AT91_US_FILTER (1 << 28) /* Infrared Receive Line Filter */ | ||
79 | |||
80 | #define AT91_US_IER 0x08 /* Interrupt Enable Register */ | ||
81 | #define AT91_US_RXRDY (1 << 0) /* Receiver Ready */ | ||
82 | #define AT91_US_TXRDY (1 << 1) /* Transmitter Ready */ | ||
83 | #define AT91_US_RXBRK (1 << 2) /* Break Received / End of Break */ | ||
84 | #define AT91_US_ENDRX (1 << 3) /* End of Receiver Transfer */ | ||
85 | #define AT91_US_ENDTX (1 << 4) /* End of Transmitter Transfer */ | ||
86 | #define AT91_US_OVRE (1 << 5) /* Overrun Error */ | ||
87 | #define AT91_US_FRAME (1 << 6) /* Framing Error */ | ||
88 | #define AT91_US_PARE (1 << 7) /* Parity Error */ | ||
89 | #define AT91_US_TIMEOUT (1 << 8) /* Receiver Time-out */ | ||
90 | #define AT91_US_TXEMPTY (1 << 9) /* Transmitter Empty */ | ||
91 | #define AT91_US_ITERATION (1 << 10) /* Max number of Repetitions Reached */ | ||
92 | #define AT91_US_TXBUFE (1 << 11) /* Transmission Buffer Empty */ | ||
93 | #define AT91_US_RXBUFF (1 << 12) /* Reception Buffer Full */ | ||
94 | #define AT91_US_NACK (1 << 13) /* Non Acknowledge */ | ||
95 | #define AT91_US_RIIC (1 << 16) /* Ring Indicator Input Change */ | ||
96 | #define AT91_US_DSRIC (1 << 17) /* Data Set Ready Input Change */ | ||
97 | #define AT91_US_DCDIC (1 << 18) /* Data Carrier Detect Input Change */ | ||
98 | #define AT91_US_CTSIC (1 << 19) /* Clear to Send Input Change */ | ||
99 | #define AT91_US_RI (1 << 20) /* RI */ | ||
100 | #define AT91_US_DSR (1 << 21) /* DSR */ | ||
101 | #define AT91_US_DCD (1 << 22) /* DCD */ | ||
102 | #define AT91_US_CTS (1 << 23) /* CTS */ | ||
103 | |||
104 | #define AT91_US_IDR 0x0c /* Interrupt Disable Register */ | ||
105 | #define AT91_US_IMR 0x10 /* Interrupt Mask Register */ | ||
106 | #define AT91_US_CSR 0x14 /* Channel Status Register */ | ||
107 | #define AT91_US_RHR 0x18 /* Receiver Holding Register */ | ||
108 | #define AT91_US_THR 0x1c /* Transmitter Holding Register */ | ||
109 | |||
110 | #define AT91_US_BRGR 0x20 /* Baud Rate Generator Register */ | ||
111 | #define AT91_US_CD (0xffff << 0) /* Clock Divider */ | ||
112 | |||
113 | #define AT91_US_RTOR 0x24 /* Receiver Time-out Register */ | ||
114 | #define AT91_US_TO (0xffff << 0) /* Time-out Value */ | ||
115 | |||
116 | #define AT91_US_TTGR 0x28 /* Transmitter Timeguard Register */ | ||
117 | #define AT91_US_TG (0xff << 0) /* Timeguard Value */ | ||
118 | |||
119 | #define AT91_US_FIDI 0x40 /* FI DI Ratio Register */ | ||
120 | #define AT91_US_NER 0x44 /* Number of Errors Register */ | ||
121 | #define AT91_US_IF 0x4c /* IrDA Filter Register */ | ||
122 | |||
123 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/board.h b/include/asm-arm/arch-at91rm9200/board.h index c1ca9a4658ec..3cc9aec80f9d 100644 --- a/include/asm-arm/arch-at91rm9200/board.h +++ b/include/asm-arm/arch-at91rm9200/board.h | |||
@@ -97,12 +97,13 @@ struct at91_uart_config { | |||
97 | unsigned short nr_tty; /* number of serial tty's */ | 97 | unsigned short nr_tty; /* number of serial tty's */ |
98 | short tty_map[]; /* map UART to tty number */ | 98 | short tty_map[]; /* map UART to tty number */ |
99 | }; | 99 | }; |
100 | extern struct platform_device *at91_default_console_device; | 100 | extern struct platform_device *atmel_default_console_device; |
101 | extern void __init at91_init_serial(struct at91_uart_config *config); | 101 | extern void __init at91_init_serial(struct at91_uart_config *config); |
102 | 102 | ||
103 | struct at91_uart_data { | 103 | struct atmel_uart_data { |
104 | short use_dma_tx; /* use transmit DMA? */ | 104 | short use_dma_tx; /* use transmit DMA? */ |
105 | short use_dma_rx; /* use receive DMA? */ | 105 | short use_dma_rx; /* use receive DMA? */ |
106 | void __iomem *regs; /* virtual base address, if any */ | ||
106 | }; | 107 | }; |
107 | extern void __init at91_add_device_serial(void); | 108 | extern void __init at91_add_device_serial(void); |
108 | 109 | ||
diff --git a/include/asm-arm/arch-at91rm9200/hardware.h b/include/asm-arm/arch-at91rm9200/hardware.h index 6551b4d1ff7b..9ca4cc9c0b2e 100644 --- a/include/asm-arm/arch-at91rm9200/hardware.h +++ b/include/asm-arm/arch-at91rm9200/hardware.h | |||
@@ -44,7 +44,7 @@ | |||
44 | #define AT91_SRAM_VIRT_BASE (AT91_IO_VIRT_BASE - AT91RM9200_SRAM_SIZE) | 44 | #define AT91_SRAM_VIRT_BASE (AT91_IO_VIRT_BASE - AT91RM9200_SRAM_SIZE) |
45 | 45 | ||
46 | /* Serial ports */ | 46 | /* Serial ports */ |
47 | #define AT91_NR_UART 5 /* 4 USART3's and one DBGU port */ | 47 | #define ATMEL_MAX_UART 5 /* 4 USART3's and one DBGU port */ |
48 | 48 | ||
49 | /* FLASH */ | 49 | /* FLASH */ |
50 | #define AT91_FLASH_BASE 0x10000000 /* NCS0: Flash physical base address */ | 50 | #define AT91_FLASH_BASE 0x10000000 /* NCS0: Flash physical base address */ |
diff --git a/include/asm-arm/arch-lh7a40x/clocks.h b/include/asm-arm/arch-lh7a40x/clocks.h index bee02fd8dab1..7d0ba18ad578 100644 --- a/include/asm-arm/arch-lh7a40x/clocks.h +++ b/include/asm-arm/arch-lh7a40x/clocks.h | |||
@@ -8,8 +8,6 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | |||
13 | #ifndef __ASM_ARCH_CLOCKS_H | 11 | #ifndef __ASM_ARCH_CLOCKS_H |
14 | #define __ASM_ARCH_CLOCKS_H | 12 | #define __ASM_ARCH_CLOCKS_H |
15 | 13 | ||
diff --git a/include/asm-arm/mach/serial_at91.h b/include/asm-arm/mach/serial_at91.h index 1290bb32802d..55b317a89061 100644 --- a/include/asm-arm/mach/serial_at91.h +++ b/include/asm-arm/mach/serial_at91.h | |||
@@ -14,7 +14,7 @@ struct uart_port; | |||
14 | * This is a temporary structure for registering these | 14 | * This is a temporary structure for registering these |
15 | * functions; it is intended to be discarded after boot. | 15 | * functions; it is intended to be discarded after boot. |
16 | */ | 16 | */ |
17 | struct at91_port_fns { | 17 | struct atmel_port_fns { |
18 | void (*set_mctrl)(struct uart_port *, u_int); | 18 | void (*set_mctrl)(struct uart_port *, u_int); |
19 | u_int (*get_mctrl)(struct uart_port *); | 19 | u_int (*get_mctrl)(struct uart_port *); |
20 | void (*enable_ms)(struct uart_port *); | 20 | void (*enable_ms)(struct uart_port *); |
@@ -24,10 +24,10 @@ struct at91_port_fns { | |||
24 | void (*close)(struct uart_port *); | 24 | void (*close)(struct uart_port *); |
25 | }; | 25 | }; |
26 | 26 | ||
27 | #if defined(CONFIG_SERIAL_AT91) | 27 | #if defined(CONFIG_SERIAL_ATMEL) |
28 | void at91_register_uart_fns(struct at91_port_fns *fns); | 28 | void atmel_register_uart_fns(struct atmel_port_fns *fns); |
29 | #else | 29 | #else |
30 | #define at91_register_uart_fns(fns) do { } while (0) | 30 | #define atmel_register_uart_fns(fns) do { } while (0) |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | 33 | ||
diff --git a/include/asm-arm/pgtable-nommu.h b/include/asm-arm/pgtable-nommu.h index b13322dccf41..c1b264dff287 100644 --- a/include/asm-arm/pgtable-nommu.h +++ b/include/asm-arm/pgtable-nommu.h | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #ifndef __ASSEMBLY__ | 14 | #ifndef __ASSEMBLY__ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
18 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
19 | #include <asm/page.h> | 18 | #include <asm/page.h> |
diff --git a/include/asm-avr32/arch-at32ap/at91rm9200_usart.h b/include/asm-avr32/arch-at32ap/at91rm9200_usart.h deleted file mode 100644 index 79f851e31b9c..000000000000 --- a/include/asm-avr32/arch-at32ap/at91rm9200_usart.h +++ /dev/null | |||
@@ -1,123 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_usart.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * USART registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91RM9200_USART_H | ||
17 | #define AT91RM9200_USART_H | ||
18 | |||
19 | #define AT91_US_CR 0x00 /* Control Register */ | ||
20 | #define AT91_US_RSTRX (1 << 2) /* Reset Receiver */ | ||
21 | #define AT91_US_RSTTX (1 << 3) /* Reset Transmitter */ | ||
22 | #define AT91_US_RXEN (1 << 4) /* Receiver Enable */ | ||
23 | #define AT91_US_RXDIS (1 << 5) /* Receiver Disable */ | ||
24 | #define AT91_US_TXEN (1 << 6) /* Transmitter Enable */ | ||
25 | #define AT91_US_TXDIS (1 << 7) /* Transmitter Disable */ | ||
26 | #define AT91_US_RSTSTA (1 << 8) /* Reset Status Bits */ | ||
27 | #define AT91_US_STTBRK (1 << 9) /* Start Break */ | ||
28 | #define AT91_US_STPBRK (1 << 10) /* Stop Break */ | ||
29 | #define AT91_US_STTTO (1 << 11) /* Start Time-out */ | ||
30 | #define AT91_US_SENDA (1 << 12) /* Send Address */ | ||
31 | #define AT91_US_RSTIT (1 << 13) /* Reset Iterations */ | ||
32 | #define AT91_US_RSTNACK (1 << 14) /* Reset Non Acknowledge */ | ||
33 | #define AT91_US_RETTO (1 << 15) /* Rearm Time-out */ | ||
34 | #define AT91_US_DTREN (1 << 16) /* Data Terminal Ready Enable */ | ||
35 | #define AT91_US_DTRDIS (1 << 17) /* Data Terminal Ready Disable */ | ||
36 | #define AT91_US_RTSEN (1 << 18) /* Request To Send Enable */ | ||
37 | #define AT91_US_RTSDIS (1 << 19) /* Request To Send Disable */ | ||
38 | |||
39 | #define AT91_US_MR 0x04 /* Mode Register */ | ||
40 | #define AT91_US_USMODE (0xf << 0) /* Mode of the USART */ | ||
41 | #define AT91_US_USMODE_NORMAL 0 | ||
42 | #define AT91_US_USMODE_RS485 1 | ||
43 | #define AT91_US_USMODE_HWHS 2 | ||
44 | #define AT91_US_USMODE_MODEM 3 | ||
45 | #define AT91_US_USMODE_ISO7816_T0 4 | ||
46 | #define AT91_US_USMODE_ISO7816_T1 6 | ||
47 | #define AT91_US_USMODE_IRDA 8 | ||
48 | #define AT91_US_USCLKS (3 << 4) /* Clock Selection */ | ||
49 | #define AT91_US_CHRL (3 << 6) /* Character Length */ | ||
50 | #define AT91_US_CHRL_5 (0 << 6) | ||
51 | #define AT91_US_CHRL_6 (1 << 6) | ||
52 | #define AT91_US_CHRL_7 (2 << 6) | ||
53 | #define AT91_US_CHRL_8 (3 << 6) | ||
54 | #define AT91_US_SYNC (1 << 8) /* Synchronous Mode Select */ | ||
55 | #define AT91_US_PAR (7 << 9) /* Parity Type */ | ||
56 | #define AT91_US_PAR_EVEN (0 << 9) | ||
57 | #define AT91_US_PAR_ODD (1 << 9) | ||
58 | #define AT91_US_PAR_SPACE (2 << 9) | ||
59 | #define AT91_US_PAR_MARK (3 << 9) | ||
60 | #define AT91_US_PAR_NONE (4 << 9) | ||
61 | #define AT91_US_PAR_MULTI_DROP (6 << 9) | ||
62 | #define AT91_US_NBSTOP (3 << 12) /* Number of Stop Bits */ | ||
63 | #define AT91_US_NBSTOP_1 (0 << 12) | ||
64 | #define AT91_US_NBSTOP_1_5 (1 << 12) | ||
65 | #define AT91_US_NBSTOP_2 (2 << 12) | ||
66 | #define AT91_US_CHMODE (3 << 14) /* Channel Mode */ | ||
67 | #define AT91_US_CHMODE_NORMAL (0 << 14) | ||
68 | #define AT91_US_CHMODE_ECHO (1 << 14) | ||
69 | #define AT91_US_CHMODE_LOC_LOOP (2 << 14) | ||
70 | #define AT91_US_CHMODE_REM_LOOP (3 << 14) | ||
71 | #define AT91_US_MSBF (1 << 16) /* Bit Order */ | ||
72 | #define AT91_US_MODE9 (1 << 17) /* 9-bit Character Length */ | ||
73 | #define AT91_US_CLKO (1 << 18) /* Clock Output Select */ | ||
74 | #define AT91_US_OVER (1 << 19) /* Oversampling Mode */ | ||
75 | #define AT91_US_INACK (1 << 20) /* Inhibit Non Acknowledge */ | ||
76 | #define AT91_US_DSNACK (1 << 21) /* Disable Successive NACK */ | ||
77 | #define AT91_US_MAX_ITER (7 << 24) /* Max Iterations */ | ||
78 | #define AT91_US_FILTER (1 << 28) /* Infrared Receive Line Filter */ | ||
79 | |||
80 | #define AT91_US_IER 0x08 /* Interrupt Enable Register */ | ||
81 | #define AT91_US_RXRDY (1 << 0) /* Receiver Ready */ | ||
82 | #define AT91_US_TXRDY (1 << 1) /* Transmitter Ready */ | ||
83 | #define AT91_US_RXBRK (1 << 2) /* Break Received / End of Break */ | ||
84 | #define AT91_US_ENDRX (1 << 3) /* End of Receiver Transfer */ | ||
85 | #define AT91_US_ENDTX (1 << 4) /* End of Transmitter Transfer */ | ||
86 | #define AT91_US_OVRE (1 << 5) /* Overrun Error */ | ||
87 | #define AT91_US_FRAME (1 << 6) /* Framing Error */ | ||
88 | #define AT91_US_PARE (1 << 7) /* Parity Error */ | ||
89 | #define AT91_US_TIMEOUT (1 << 8) /* Receiver Time-out */ | ||
90 | #define AT91_US_TXEMPTY (1 << 9) /* Transmitter Empty */ | ||
91 | #define AT91_US_ITERATION (1 << 10) /* Max number of Repetitions Reached */ | ||
92 | #define AT91_US_TXBUFE (1 << 11) /* Transmission Buffer Empty */ | ||
93 | #define AT91_US_RXBUFF (1 << 12) /* Reception Buffer Full */ | ||
94 | #define AT91_US_NACK (1 << 13) /* Non Acknowledge */ | ||
95 | #define AT91_US_RIIC (1 << 16) /* Ring Indicator Input Change */ | ||
96 | #define AT91_US_DSRIC (1 << 17) /* Data Set Ready Input Change */ | ||
97 | #define AT91_US_DCDIC (1 << 18) /* Data Carrier Detect Input Change */ | ||
98 | #define AT91_US_CTSIC (1 << 19) /* Clear to Send Input Change */ | ||
99 | #define AT91_US_RI (1 << 20) /* RI */ | ||
100 | #define AT91_US_DSR (1 << 21) /* DSR */ | ||
101 | #define AT91_US_DCD (1 << 22) /* DCD */ | ||
102 | #define AT91_US_CTS (1 << 23) /* CTS */ | ||
103 | |||
104 | #define AT91_US_IDR 0x0c /* Interrupt Disable Register */ | ||
105 | #define AT91_US_IMR 0x10 /* Interrupt Mask Register */ | ||
106 | #define AT91_US_CSR 0x14 /* Channel Status Register */ | ||
107 | #define AT91_US_RHR 0x18 /* Receiver Holding Register */ | ||
108 | #define AT91_US_THR 0x1c /* Transmitter Holding Register */ | ||
109 | |||
110 | #define AT91_US_BRGR 0x20 /* Baud Rate Generator Register */ | ||
111 | #define AT91_US_CD (0xffff << 0) /* Clock Divider */ | ||
112 | |||
113 | #define AT91_US_RTOR 0x24 /* Receiver Time-out Register */ | ||
114 | #define AT91_US_TO (0xffff << 0) /* Time-out Value */ | ||
115 | |||
116 | #define AT91_US_TTGR 0x28 /* Transmitter Timeguard Register */ | ||
117 | #define AT91_US_TG (0xff << 0) /* Timeguard Value */ | ||
118 | |||
119 | #define AT91_US_FIDI 0x40 /* FI DI Ratio Register */ | ||
120 | #define AT91_US_NER 0x44 /* Number of Errors Register */ | ||
121 | #define AT91_US_IF 0x4c /* IrDA Filter Register */ | ||
122 | |||
123 | #endif | ||
diff --git a/include/asm-avr32/arch-at32ap/board.h b/include/asm-avr32/arch-at32ap/board.h index 39368e18ab20..a39b3e999f18 100644 --- a/include/asm-avr32/arch-at32ap/board.h +++ b/include/asm-avr32/arch-at32ap/board.h | |||
@@ -9,9 +9,15 @@ | |||
9 | /* Add basic devices: system manager, interrupt controller, portmuxes, etc. */ | 9 | /* Add basic devices: system manager, interrupt controller, portmuxes, etc. */ |
10 | void at32_add_system_devices(void); | 10 | void at32_add_system_devices(void); |
11 | 11 | ||
12 | #define AT91_NR_UART 4 | 12 | #define ATMEL_MAX_UART 4 |
13 | extern struct platform_device *at91_default_console_device; | 13 | extern struct platform_device *atmel_default_console_device; |
14 | 14 | ||
15 | struct atmel_uart_data { | ||
16 | short use_dma_tx; /* use transmit DMA? */ | ||
17 | short use_dma_rx; /* use receive DMA? */ | ||
18 | void __iomem *regs; /* virtual base address, if any */ | ||
19 | }; | ||
20 | void at32_map_usart(unsigned int hw_id, unsigned int line); | ||
15 | struct platform_device *at32_add_device_usart(unsigned int id); | 21 | struct platform_device *at32_add_device_usart(unsigned int id); |
16 | 22 | ||
17 | struct eth_platform_data { | 23 | struct eth_platform_data { |
diff --git a/include/asm-avr32/arch-at32ap/init.h b/include/asm-avr32/arch-at32ap/init.h index 43722634e069..5e75d850d707 100644 --- a/include/asm-avr32/arch-at32ap/init.h +++ b/include/asm-avr32/arch-at32ap/init.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #define __ASM_AVR32_AT32AP_INIT_H__ | 11 | #define __ASM_AVR32_AT32AP_INIT_H__ |
12 | 12 | ||
13 | void setup_platform(void); | 13 | void setup_platform(void); |
14 | void setup_board(void); | ||
14 | 15 | ||
15 | /* Called by setup_platform */ | 16 | /* Called by setup_platform */ |
16 | void at32_clock_init(void); | 17 | void at32_clock_init(void); |
diff --git a/include/asm-avr32/mach/serial_at91.h b/include/asm-avr32/mach/serial_at91.h index 1290bb32802d..55b317a89061 100644 --- a/include/asm-avr32/mach/serial_at91.h +++ b/include/asm-avr32/mach/serial_at91.h | |||
@@ -14,7 +14,7 @@ struct uart_port; | |||
14 | * This is a temporary structure for registering these | 14 | * This is a temporary structure for registering these |
15 | * functions; it is intended to be discarded after boot. | 15 | * functions; it is intended to be discarded after boot. |
16 | */ | 16 | */ |
17 | struct at91_port_fns { | 17 | struct atmel_port_fns { |
18 | void (*set_mctrl)(struct uart_port *, u_int); | 18 | void (*set_mctrl)(struct uart_port *, u_int); |
19 | u_int (*get_mctrl)(struct uart_port *); | 19 | u_int (*get_mctrl)(struct uart_port *); |
20 | void (*enable_ms)(struct uart_port *); | 20 | void (*enable_ms)(struct uart_port *); |
@@ -24,10 +24,10 @@ struct at91_port_fns { | |||
24 | void (*close)(struct uart_port *); | 24 | void (*close)(struct uart_port *); |
25 | }; | 25 | }; |
26 | 26 | ||
27 | #if defined(CONFIG_SERIAL_AT91) | 27 | #if defined(CONFIG_SERIAL_ATMEL) |
28 | void at91_register_uart_fns(struct at91_port_fns *fns); | 28 | void atmel_register_uart_fns(struct atmel_port_fns *fns); |
29 | #else | 29 | #else |
30 | #define at91_register_uart_fns(fns) do { } while (0) | 30 | #define atmel_register_uart_fns(fns) do { } while (0) |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | 33 | ||
diff --git a/include/asm-i386/alternative-asm.i b/include/asm-i386/alternative-asm.i index 6c47e3b9484b..f0510209ccbe 100644 --- a/include/asm-i386/alternative-asm.i +++ b/include/asm-i386/alternative-asm.i | |||
@@ -1,5 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | |||
3 | #ifdef CONFIG_SMP | 1 | #ifdef CONFIG_SMP |
4 | .macro LOCK_PREFIX | 2 | .macro LOCK_PREFIX |
5 | 1: lock | 3 | 1: lock |
diff --git a/include/asm-i386/frame.i b/include/asm-i386/frame.i index 4d68ddce18b6..03620251ae17 100644 --- a/include/asm-i386/frame.i +++ b/include/asm-i386/frame.i | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <asm/dwarf2.h> | 1 | #include <asm/dwarf2.h> |
3 | 2 | ||
4 | /* The annotation hides the frame from the unwinder and makes it look | 3 | /* The annotation hides the frame from the unwinder and makes it look |
diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h index 4da41efb1319..89ed545b446b 100644 --- a/include/asm-powerpc/irq.h +++ b/include/asm-powerpc/irq.h | |||
@@ -9,7 +9,6 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/threads.h> | 12 | #include <linux/threads.h> |
14 | #include <linux/list.h> | 13 | #include <linux/list.h> |
15 | #include <linux/radix-tree.h> | 14 | #include <linux/radix-tree.h> |
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h index 4f55573762bb..86ee46b09b8a 100644 --- a/include/asm-powerpc/pci-bridge.h +++ b/include/asm-powerpc/pci-bridge.h | |||
@@ -6,7 +6,6 @@ | |||
6 | #include <asm-ppc/pci-bridge.h> | 6 | #include <asm-ppc/pci-bridge.h> |
7 | #else | 7 | #else |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/pci.h> | 9 | #include <linux/pci.h> |
11 | #include <linux/list.h> | 10 | #include <linux/list.h> |
12 | 11 | ||
diff --git a/include/asm-sparc64/compat_signal.h b/include/asm-sparc64/compat_signal.h index 7aefa301321e..b759eab9b51c 100644 --- a/include/asm-sparc64/compat_signal.h +++ b/include/asm-sparc64/compat_signal.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _COMPAT_SIGNAL_H | 1 | #ifndef _COMPAT_SIGNAL_H |
2 | #define _COMPAT_SIGNAL_H | 2 | #define _COMPAT_SIGNAL_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/compat.h> | 4 | #include <linux/compat.h> |
6 | #include <asm/signal.h> | 5 | #include <asm/signal.h> |
7 | 6 | ||
diff --git a/include/asm-x86_64/alternative-asm.i b/include/asm-x86_64/alternative-asm.i index e4041f4fa4dc..0b3f1a2bb2cb 100644 --- a/include/asm-x86_64/alternative-asm.i +++ b/include/asm-x86_64/alternative-asm.i | |||
@@ -1,5 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | |||
3 | #ifdef CONFIG_SMP | 1 | #ifdef CONFIG_SMP |
4 | .macro LOCK_PREFIX | 2 | .macro LOCK_PREFIX |
5 | 1: lock | 3 | 1: lock |
diff --git a/include/linux/config.h b/include/linux/config.h index a91f5e55b525..479ffb0a22d8 100644 --- a/include/linux/config.h +++ b/include/linux/config.h | |||
@@ -3,6 +3,7 @@ | |||
3 | /* This file is no longer in use and kept only for backward compatibility. | 3 | /* This file is no longer in use and kept only for backward compatibility. |
4 | * autoconf.h is now included via -imacros on the commandline | 4 | * autoconf.h is now included via -imacros on the commandline |
5 | */ | 5 | */ |
6 | #warning Including config.h is deprecated. | ||
6 | #include <linux/autoconf.h> | 7 | #include <linux/autoconf.h> |
7 | 8 | ||
8 | #endif | 9 | #endif |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index de2e68159d96..b661c19f3f72 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -67,8 +67,8 @@ | |||
67 | /* Parisc type numbers. */ | 67 | /* Parisc type numbers. */ |
68 | #define PORT_MUX 48 | 68 | #define PORT_MUX 48 |
69 | 69 | ||
70 | /* Atmel AT91xxx SoC */ | 70 | /* Atmel AT91 / AT32 SoC */ |
71 | #define PORT_AT91 49 | 71 | #define PORT_ATMEL 49 |
72 | 72 | ||
73 | /* Macintosh Zilog type numbers */ | 73 | /* Macintosh Zilog type numbers */ |
74 | #define PORT_MAC_ZILOG 50 /* m68k : not yet implemented */ | 74 | #define PORT_MAC_ZILOG 50 /* m68k : not yet implemented */ |
diff --git a/include/net/netdma.h b/include/net/netdma.h index 7f53cd1d8b1e..f28c6e064e8f 100644 --- a/include/net/netdma.h +++ b/include/net/netdma.h | |||
@@ -20,7 +20,6 @@ | |||
20 | */ | 20 | */ |
21 | #ifndef NETDMA_H | 21 | #ifndef NETDMA_H |
22 | #define NETDMA_H | 22 | #define NETDMA_H |
23 | #include <linux/config.h> | ||
24 | #ifdef CONFIG_NET_DMA | 23 | #ifdef CONFIG_NET_DMA |
25 | #include <linux/dmaengine.h> | 24 | #include <linux/dmaengine.h> |
26 | #include <linux/skbuff.h> | 25 | #include <linux/skbuff.h> |
diff --git a/init/do_mounts.h b/init/do_mounts.h index e7f2e7fa066e..735705d137ff 100644 --- a/init/do_mounts.h +++ b/init/do_mounts.h | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
3 | #include <linux/init.h> | 2 | #include <linux/init.h> |
4 | #include <linux/syscalls.h> | 3 | #include <linux/syscalls.h> |
diff --git a/kernel/rtmutex-debug.c b/kernel/rtmutex-debug.c index 0c1faa950af7..da8d6bf46457 100644 --- a/kernel/rtmutex-debug.c +++ b/kernel/rtmutex-debug.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * | 16 | * |
17 | * See rt.c in preempt-rt for proper credits and further information | 17 | * See rt.c in preempt-rt for proper credits and further information |
18 | */ | 18 | */ |
19 | #include <linux/config.h> | ||
20 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
21 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
diff --git a/kernel/rtmutex-tester.c b/kernel/rtmutex-tester.c index 948bd8f643e2..6dcea9dd8c94 100644 --- a/kernel/rtmutex-tester.c +++ b/kernel/rtmutex-tester.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * Copyright (C) 2006, Timesys Corp., Thomas Gleixner <tglx@timesys.com> | 6 | * Copyright (C) 2006, Timesys Corp., Thomas Gleixner <tglx@timesys.com> |
7 | * | 7 | * |
8 | */ | 8 | */ |
9 | #include <linux/config.h> | ||
10 | #include <linux/kthread.h> | 9 | #include <linux/kthread.h> |
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
diff --git a/mm/filemap.h b/mm/filemap.h index 3f2a343c6015..c2bff04c84ed 100644 --- a/mm/filemap.h +++ b/mm/filemap.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/highmem.h> | 13 | #include <linux/highmem.h> |
14 | #include <linux/uio.h> | 14 | #include <linux/uio.h> |
15 | #include <linux/config.h> | ||
16 | #include <linux/uaccess.h> | 15 | #include <linux/uaccess.h> |
17 | 16 | ||
18 | size_t | 17 | size_t |
@@ -86,7 +86,6 @@ | |||
86 | * All object allocations for a node occur from node specific slab lists. | 86 | * All object allocations for a node occur from node specific slab lists. |
87 | */ | 87 | */ |
88 | 88 | ||
89 | #include <linux/config.h> | ||
90 | #include <linux/slab.h> | 89 | #include <linux/slab.h> |
91 | #include <linux/mm.h> | 90 | #include <linux/mm.h> |
92 | #include <linux/poison.h> | 91 | #include <linux/poison.h> |
diff --git a/mm/vmstat.c b/mm/vmstat.c index a2b6a9f96e5c..45b124e012f5 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * Christoph Lameter <christoph@lameter.com> | 9 | * Christoph Lameter <christoph@lameter.com> |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/cpu.h> | 14 | #include <linux/cpu.h> |
diff --git a/net/atm/lec.h b/net/atm/lec.h index 8ac6b7321635..877f50939696 100644 --- a/net/atm/lec.h +++ b/net/atm/lec.h | |||
@@ -7,7 +7,6 @@ | |||
7 | #ifndef _LEC_H_ | 7 | #ifndef _LEC_H_ |
8 | #define _LEC_H_ | 8 | #define _LEC_H_ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/atmdev.h> | 10 | #include <linux/atmdev.h> |
12 | #include <linux/netdevice.h> | 11 | #include <linux/netdevice.h> |
13 | #include <linux/atmlec.h> | 12 | #include <linux/atmlec.h> |
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index a99d87d82b7f..6b0e63cacd93 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * Authors: Thomas Graf <tgraf@suug.ch> | 8 | * Authors: Thomas Graf <tgraf@suug.ch> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/types.h> | 11 | #include <linux/types.h> |
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/list.h> | 13 | #include <linux/list.h> |
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index 34f5bfaddfc2..d8c1057e8b00 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * Ville Nuorvala <vnuorval@tcs.hut.fi> | 13 | * Ville Nuorvala <vnuorval@tcs.hut.fi> |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
18 | 17 | ||
19 | #include <net/fib_rules.h> | 18 | #include <net/fib_rules.h> |
diff --git a/net/ipv6/mip6.c b/net/ipv6/mip6.c index 99d116caecda..7ccdc8fc5a31 100644 --- a/net/ipv6/mip6.c +++ b/net/ipv6/mip6.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Masahide NAKAMURA @USAGI | 22 | * Masahide NAKAMURA @USAGI |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/skbuff.h> | 26 | #include <linux/skbuff.h> |
28 | #include <linux/time.h> | 27 | #include <linux/time.h> |
diff --git a/sound/aoa/soundbus/sysfs.c b/sound/aoa/soundbus/sysfs.c index d31f8146952a..f580942b5c09 100644 --- a/sound/aoa/soundbus/sysfs.c +++ b/sound/aoa/soundbus/sysfs.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
3 | #include <linux/stat.h> | 2 | #include <linux/stat.h> |
4 | /* FIX UP */ | 3 | /* FIX UP */ |
diff --git a/sound/core/memory.c b/sound/core/memory.c index fe59850be868..93537ab7c2ac 100644 --- a/sound/core/memory.c +++ b/sound/core/memory.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | #include <asm/io.h> | 24 | #include <asm/io.h> |
26 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |