diff options
159 files changed, 1461 insertions, 2455 deletions
diff --git a/Documentation/devicetree/bindings/arm/arch_timer.txt b/Documentation/devicetree/bindings/arm/arch_timer.txt new file mode 100644 index 000000000000..52478c83d0cc --- /dev/null +++ b/Documentation/devicetree/bindings/arm/arch_timer.txt | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | * ARM architected timer | ||
| 2 | |||
| 3 | ARM Cortex-A7 and Cortex-A15 have a per-core architected timer, which | ||
| 4 | provides per-cpu timers. | ||
| 5 | |||
| 6 | The timer is attached to a GIC to deliver its per-processor interrupts. | ||
| 7 | |||
| 8 | ** Timer node properties: | ||
| 9 | |||
| 10 | - compatible : Should at least contain "arm,armv7-timer". | ||
| 11 | |||
| 12 | - interrupts : Interrupt list for secure, non-secure, virtual and | ||
| 13 | hypervisor timers, in that order. | ||
| 14 | |||
| 15 | - clock-frequency : The frequency of the main counter, in Hz. Optional. | ||
| 16 | |||
| 17 | Example: | ||
| 18 | |||
| 19 | timer { | ||
| 20 | compatible = "arm,cortex-a15-timer", | ||
| 21 | "arm,armv7-timer"; | ||
| 22 | interrupts = <1 13 0xf08>, | ||
| 23 | <1 14 0xf08>, | ||
| 24 | <1 11 0xf08>, | ||
| 25 | <1 10 0xf08>; | ||
| 26 | clock-frequency = <100000000>; | ||
| 27 | }; | ||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e19ed3fd3089..554ec1dd89d4 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -11,6 +11,7 @@ config ARM | |||
| 11 | select HAVE_OPROFILE if (HAVE_PERF_EVENTS) | 11 | select HAVE_OPROFILE if (HAVE_PERF_EVENTS) |
| 12 | select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL | 12 | select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL |
| 13 | select HAVE_ARCH_KGDB | 13 | select HAVE_ARCH_KGDB |
| 14 | select HAVE_ARCH_TRACEHOOK | ||
| 14 | select HAVE_KPROBES if !XIP_KERNEL | 15 | select HAVE_KPROBES if !XIP_KERNEL |
| 15 | select HAVE_KRETPROBES if (HAVE_KPROBES) | 16 | select HAVE_KRETPROBES if (HAVE_KPROBES) |
| 16 | select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) | 17 | select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) |
| @@ -30,6 +31,8 @@ config ARM | |||
| 30 | select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)) | 31 | select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)) |
| 31 | select HAVE_C_RECORDMCOUNT | 32 | select HAVE_C_RECORDMCOUNT |
| 32 | select HAVE_GENERIC_HARDIRQS | 33 | select HAVE_GENERIC_HARDIRQS |
| 34 | select HARDIRQS_SW_RESEND | ||
| 35 | select GENERIC_IRQ_PROBE | ||
| 33 | select GENERIC_IRQ_SHOW | 36 | select GENERIC_IRQ_SHOW |
| 34 | select CPU_PM if (SUSPEND || CPU_IDLE) | 37 | select CPU_PM if (SUSPEND || CPU_IDLE) |
| 35 | select GENERIC_PCI_IOMAP | 38 | select GENERIC_PCI_IOMAP |
| @@ -126,14 +129,6 @@ config TRACE_IRQFLAGS_SUPPORT | |||
| 126 | bool | 129 | bool |
| 127 | default y | 130 | default y |
| 128 | 131 | ||
| 129 | config HARDIRQS_SW_RESEND | ||
| 130 | bool | ||
| 131 | default y | ||
| 132 | |||
| 133 | config GENERIC_IRQ_PROBE | ||
| 134 | bool | ||
| 135 | default y | ||
| 136 | |||
| 137 | config GENERIC_LOCKBREAK | 132 | config GENERIC_LOCKBREAK |
| 138 | bool | 133 | bool |
| 139 | default y | 134 | default y |
| @@ -280,6 +275,7 @@ config ARCH_INTEGRATOR | |||
| 280 | select NEED_MACH_IO_H | 275 | select NEED_MACH_IO_H |
| 281 | select NEED_MACH_MEMORY_H | 276 | select NEED_MACH_MEMORY_H |
| 282 | select SPARSE_IRQ | 277 | select SPARSE_IRQ |
| 278 | select MULTI_IRQ_HANDLER | ||
| 283 | help | 279 | help |
| 284 | Support for ARM's Integrator platform. | 280 | Support for ARM's Integrator platform. |
| 285 | 281 | ||
| @@ -632,7 +628,6 @@ config ARCH_MMP | |||
| 632 | select CLKDEV_LOOKUP | 628 | select CLKDEV_LOOKUP |
| 633 | select GENERIC_CLOCKEVENTS | 629 | select GENERIC_CLOCKEVENTS |
| 634 | select GPIO_PXA | 630 | select GPIO_PXA |
| 635 | select TICK_ONESHOT | ||
| 636 | select PLAT_PXA | 631 | select PLAT_PXA |
| 637 | select SPARSE_IRQ | 632 | select SPARSE_IRQ |
| 638 | select GENERIC_ALLOCATOR | 633 | select GENERIC_ALLOCATOR |
| @@ -716,7 +711,6 @@ config ARCH_PXA | |||
| 716 | select ARCH_REQUIRE_GPIOLIB | 711 | select ARCH_REQUIRE_GPIOLIB |
| 717 | select GENERIC_CLOCKEVENTS | 712 | select GENERIC_CLOCKEVENTS |
| 718 | select GPIO_PXA | 713 | select GPIO_PXA |
| 719 | select TICK_ONESHOT | ||
| 720 | select PLAT_PXA | 714 | select PLAT_PXA |
| 721 | select SPARSE_IRQ | 715 | select SPARSE_IRQ |
| 722 | select AUTO_ZRELADDR | 716 | select AUTO_ZRELADDR |
| @@ -783,7 +777,6 @@ config ARCH_SA1100 | |||
| 783 | select CPU_FREQ | 777 | select CPU_FREQ |
| 784 | select GENERIC_CLOCKEVENTS | 778 | select GENERIC_CLOCKEVENTS |
| 785 | select CLKDEV_LOOKUP | 779 | select CLKDEV_LOOKUP |
| 786 | select TICK_ONESHOT | ||
| 787 | select ARCH_REQUIRE_GPIOLIB | 780 | select ARCH_REQUIRE_GPIOLIB |
| 788 | select HAVE_IDE | 781 | select HAVE_IDE |
| 789 | select NEED_MACH_MEMORY_H | 782 | select NEED_MACH_MEMORY_H |
| @@ -1552,10 +1545,15 @@ config HAVE_ARM_SCU | |||
| 1552 | help | 1545 | help |
| 1553 | This option enables support for the ARM system coherency unit | 1546 | This option enables support for the ARM system coherency unit |
| 1554 | 1547 | ||
| 1548 | config ARM_ARCH_TIMER | ||
| 1549 | bool "Architected timer support" | ||
| 1550 | depends on CPU_V7 | ||
| 1551 | help | ||
| 1552 | This option enables support for the ARM architected timer | ||
| 1553 | |||
| 1555 | config HAVE_ARM_TWD | 1554 | config HAVE_ARM_TWD |
| 1556 | bool | 1555 | bool |
| 1557 | depends on SMP | 1556 | depends on SMP |
| 1558 | select TICK_ONESHOT | ||
| 1559 | help | 1557 | help |
| 1560 | This options enables support for the ARM timer and watchdog unit | 1558 | This options enables support for the ARM timer and watchdog unit |
| 1561 | 1559 | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 047a20780fc1..aaf96bccd4a0 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
| @@ -70,8 +70,6 @@ arch-$(CONFIG_CPU_32v4) :=-D__LINUX_ARM_ARCH__=4 -march=armv4 | |||
| 70 | arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3 | 70 | arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3 |
| 71 | 71 | ||
| 72 | # This selects how we optimise for the processor. | 72 | # This selects how we optimise for the processor. |
| 73 | tune-$(CONFIG_CPU_ARM610) :=-mtune=arm610 | ||
| 74 | tune-$(CONFIG_CPU_ARM710) :=-mtune=arm710 | ||
| 75 | tune-$(CONFIG_CPU_ARM7TDMI) :=-mtune=arm7tdmi | 73 | tune-$(CONFIG_CPU_ARM7TDMI) :=-mtune=arm7tdmi |
| 76 | tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi | 74 | tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi |
| 77 | tune-$(CONFIG_CPU_ARM740T) :=-mtune=arm7tdmi | 75 | tune-$(CONFIG_CPU_ARM740T) :=-mtune=arm7tdmi |
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index dc7e8ce8e6be..b8c64b80bafc 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
| @@ -567,6 +567,12 @@ __armv3_mpu_cache_on: | |||
| 567 | mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 | 567 | mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 |
| 568 | mov pc, lr | 568 | mov pc, lr |
| 569 | 569 | ||
| 570 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
| 571 | #define CB_BITS 0x08 | ||
| 572 | #else | ||
| 573 | #define CB_BITS 0x0c | ||
| 574 | #endif | ||
| 575 | |||
| 570 | __setup_mmu: sub r3, r4, #16384 @ Page directory size | 576 | __setup_mmu: sub r3, r4, #16384 @ Page directory size |
| 571 | bic r3, r3, #0xff @ Align the pointer | 577 | bic r3, r3, #0xff @ Align the pointer |
| 572 | bic r3, r3, #0x3f00 | 578 | bic r3, r3, #0x3f00 |
| @@ -578,17 +584,14 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size | |||
| 578 | mov r9, r0, lsr #18 | 584 | mov r9, r0, lsr #18 |
| 579 | mov r9, r9, lsl #18 @ start of RAM | 585 | mov r9, r9, lsl #18 @ start of RAM |
| 580 | add r10, r9, #0x10000000 @ a reasonable RAM size | 586 | add r10, r9, #0x10000000 @ a reasonable RAM size |
| 581 | mov r1, #0x12 | 587 | mov r1, #0x12 @ XN|U + section mapping |
| 582 | orr r1, r1, #3 << 10 | 588 | orr r1, r1, #3 << 10 @ AP=11 |
| 583 | add r2, r3, #16384 | 589 | add r2, r3, #16384 |
| 584 | 1: cmp r1, r9 @ if virt > start of RAM | 590 | 1: cmp r1, r9 @ if virt > start of RAM |
| 585 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | 591 | cmphs r10, r1 @ && end of RAM > virt |
| 586 | orrhs r1, r1, #0x08 @ set cacheable | 592 | bic r1, r1, #0x1c @ clear XN|U + C + B |
| 587 | #else | 593 | orrlo r1, r1, #0x10 @ Set XN|U for non-RAM |
| 588 | orrhs r1, r1, #0x0c @ set cacheable, bufferable | 594 | orrhs r1, r1, r6 @ set RAM section settings |
| 589 | #endif | ||
| 590 | cmp r1, r10 @ if virt > end of RAM | ||
| 591 | bichs r1, r1, #0x0c @ clear cacheable, bufferable | ||
| 592 | str r1, [r0], #4 @ 1:1 mapping | 595 | str r1, [r0], #4 @ 1:1 mapping |
| 593 | add r1, r1, #1048576 | 596 | add r1, r1, #1048576 |
| 594 | teq r0, r2 | 597 | teq r0, r2 |
| @@ -599,7 +602,7 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size | |||
| 599 | * so there is no map overlap problem for up to 1 MB compressed kernel. | 602 | * so there is no map overlap problem for up to 1 MB compressed kernel. |
| 600 | * If the execution is in RAM then we would only be duplicating the above. | 603 | * If the execution is in RAM then we would only be duplicating the above. |
| 601 | */ | 604 | */ |
| 602 | mov r1, #0x1e | 605 | orr r1, r6, #0x04 @ ensure B is set for this |
| 603 | orr r1, r1, #3 << 10 | 606 | orr r1, r1, #3 << 10 |
| 604 | mov r2, pc | 607 | mov r2, pc |
| 605 | mov r2, r2, lsr #20 | 608 | mov r2, r2, lsr #20 |
| @@ -620,6 +623,7 @@ __arm926ejs_mmu_cache_on: | |||
| 620 | __armv4_mmu_cache_on: | 623 | __armv4_mmu_cache_on: |
| 621 | mov r12, lr | 624 | mov r12, lr |
| 622 | #ifdef CONFIG_MMU | 625 | #ifdef CONFIG_MMU |
| 626 | mov r6, #CB_BITS | 0x12 @ U | ||
| 623 | bl __setup_mmu | 627 | bl __setup_mmu |
| 624 | mov r0, #0 | 628 | mov r0, #0 |
| 625 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer | 629 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer |
| @@ -641,6 +645,7 @@ __armv7_mmu_cache_on: | |||
| 641 | #ifdef CONFIG_MMU | 645 | #ifdef CONFIG_MMU |
| 642 | mrc p15, 0, r11, c0, c1, 4 @ read ID_MMFR0 | 646 | mrc p15, 0, r11, c0, c1, 4 @ read ID_MMFR0 |
| 643 | tst r11, #0xf @ VMSA | 647 | tst r11, #0xf @ VMSA |
| 648 | movne r6, #CB_BITS | 0x02 @ !XN | ||
| 644 | blne __setup_mmu | 649 | blne __setup_mmu |
| 645 | mov r0, #0 | 650 | mov r0, #0 |
| 646 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer | 651 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer |
| @@ -655,7 +660,7 @@ __armv7_mmu_cache_on: | |||
| 655 | orr r0, r0, #1 << 25 @ big-endian page tables | 660 | orr r0, r0, #1 << 25 @ big-endian page tables |
| 656 | #endif | 661 | #endif |
| 657 | orrne r0, r0, #1 @ MMU enabled | 662 | orrne r0, r0, #1 @ MMU enabled |
| 658 | movne r1, #-1 | 663 | movne r1, #0xfffffffd @ domain 0 = client |
| 659 | mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer | 664 | mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer |
| 660 | mcrne p15, 0, r1, c3, c0, 0 @ load domain access control | 665 | mcrne p15, 0, r1, c3, c0, 0 @ load domain access control |
| 661 | #endif | 666 | #endif |
| @@ -668,6 +673,7 @@ __armv7_mmu_cache_on: | |||
| 668 | 673 | ||
| 669 | __fa526_cache_on: | 674 | __fa526_cache_on: |
| 670 | mov r12, lr | 675 | mov r12, lr |
| 676 | mov r6, #CB_BITS | 0x12 @ U | ||
| 671 | bl __setup_mmu | 677 | bl __setup_mmu |
| 672 | mov r0, #0 | 678 | mov r0, #0 |
| 673 | mcr p15, 0, r0, c7, c7, 0 @ Invalidate whole cache | 679 | mcr p15, 0, r0, c7, c7, 0 @ Invalidate whole cache |
| @@ -680,18 +686,6 @@ __fa526_cache_on: | |||
| 680 | mcr p15, 0, r0, c8, c7, 0 @ flush UTLB | 686 | mcr p15, 0, r0, c8, c7, 0 @ flush UTLB |
| 681 | mov pc, r12 | 687 | mov pc, r12 |
| 682 | 688 | ||
| 683 | __arm6_mmu_cache_on: | ||
| 684 | mov r12, lr | ||
| 685 | bl __setup_mmu | ||
| 686 | mov r0, #0 | ||
| 687 | mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 | ||
| 688 | mcr p15, 0, r0, c5, c0, 0 @ invalidate whole TLB v3 | ||
| 689 | mov r0, #0x30 | ||
| 690 | bl __common_mmu_cache_on | ||
| 691 | mov r0, #0 | ||
| 692 | mcr p15, 0, r0, c5, c0, 0 @ invalidate whole TLB v3 | ||
| 693 | mov pc, r12 | ||
| 694 | |||
| 695 | __common_mmu_cache_on: | 689 | __common_mmu_cache_on: |
| 696 | #ifndef CONFIG_THUMB2_KERNEL | 690 | #ifndef CONFIG_THUMB2_KERNEL |
| 697 | #ifndef DEBUG | 691 | #ifndef DEBUG |
| @@ -756,16 +750,6 @@ call_cache_fn: adr r12, proc_types | |||
| 756 | .align 2 | 750 | .align 2 |
| 757 | .type proc_types,#object | 751 | .type proc_types,#object |
| 758 | proc_types: | 752 | proc_types: |
| 759 | .word 0x41560600 @ ARM6/610 | ||
| 760 | .word 0xffffffe0 | ||
| 761 | W(b) __arm6_mmu_cache_off @ works, but slow | ||
| 762 | W(b) __arm6_mmu_cache_off | ||
| 763 | mov pc, lr | ||
| 764 | THUMB( nop ) | ||
| 765 | @ b __arm6_mmu_cache_on @ untested | ||
| 766 | @ b __arm6_mmu_cache_off | ||
| 767 | @ b __armv3_mmu_cache_flush | ||
| 768 | |||
| 769 | .word 0x00000000 @ old ARM ID | 753 | .word 0x00000000 @ old ARM ID |
| 770 | .word 0x0000f000 | 754 | .word 0x0000f000 |
| 771 | mov pc, lr | 755 | mov pc, lr |
| @@ -777,8 +761,10 @@ proc_types: | |||
| 777 | 761 | ||
| 778 | .word 0x41007000 @ ARM7/710 | 762 | .word 0x41007000 @ ARM7/710 |
| 779 | .word 0xfff8fe00 | 763 | .word 0xfff8fe00 |
| 780 | W(b) __arm7_mmu_cache_off | 764 | mov pc, lr |
| 781 | W(b) __arm7_mmu_cache_off | 765 | THUMB( nop ) |
| 766 | mov pc, lr | ||
| 767 | THUMB( nop ) | ||
| 782 | mov pc, lr | 768 | mov pc, lr |
| 783 | THUMB( nop ) | 769 | THUMB( nop ) |
| 784 | 770 | ||
| @@ -977,21 +963,6 @@ __armv7_mmu_cache_off: | |||
| 977 | mcr p15, 0, r0, c7, c5, 4 @ ISB | 963 | mcr p15, 0, r0, c7, c5, 4 @ ISB |
| 978 | mov pc, r12 | 964 | mov pc, r12 |
| 979 | 965 | ||
| 980 | __arm6_mmu_cache_off: | ||
| 981 | mov r0, #0x00000030 @ ARM6 control reg. | ||
| 982 | b __armv3_mmu_cache_off | ||
| 983 | |||
| 984 | __arm7_mmu_cache_off: | ||
| 985 | mov r0, #0x00000070 @ ARM7 control reg. | ||
| 986 | b __armv3_mmu_cache_off | ||
| 987 | |||
| 988 | __armv3_mmu_cache_off: | ||
| 989 | mcr p15, 0, r0, c1, c0, 0 @ turn MMU and cache off | ||
| 990 | mov r0, #0 | ||
| 991 | mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 | ||
| 992 | mcr p15, 0, r0, c5, c0, 0 @ invalidate whole TLB v3 | ||
| 993 | mov pc, lr | ||
| 994 | |||
| 995 | /* | 966 | /* |
| 996 | * Clean and flush the cache to maintain consistency. | 967 | * Clean and flush the cache to maintain consistency. |
| 997 | * | 968 | * |
diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c index dcb13494ca0d..c4110d1b1f2d 100644 --- a/arch/arm/common/it8152.c +++ b/arch/arm/common/it8152.c | |||
| @@ -222,7 +222,7 @@ static int it8152_pci_write_config(struct pci_bus *bus, | |||
| 222 | return PCIBIOS_SUCCESSFUL; | 222 | return PCIBIOS_SUCCESSFUL; |
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | static struct pci_ops it8152_ops = { | 225 | struct pci_ops it8152_ops = { |
| 226 | .read = it8152_pci_read_config, | 226 | .read = it8152_pci_read_config, |
| 227 | .write = it8152_pci_write_config, | 227 | .write = it8152_pci_write_config, |
| 228 | }; | 228 | }; |
| @@ -346,9 +346,4 @@ void pcibios_set_master(struct pci_dev *dev) | |||
| 346 | } | 346 | } |
| 347 | 347 | ||
| 348 | 348 | ||
| 349 | struct pci_bus * __init it8152_pci_scan_bus(int nr, struct pci_sys_data *sys) | ||
| 350 | { | ||
| 351 | return pci_scan_root_bus(NULL, nr, &it8152_ops, sys, &sys->resources); | ||
| 352 | } | ||
| 353 | |||
| 354 | EXPORT_SYMBOL(dma_set_coherent_mask); | 349 | EXPORT_SYMBOL(dma_set_coherent_mask); |
diff --git a/arch/arm/common/via82c505.c b/arch/arm/common/via82c505.c index 1171a5010aea..6cb362e56d29 100644 --- a/arch/arm/common/via82c505.c +++ b/arch/arm/common/via82c505.c | |||
| @@ -51,7 +51,7 @@ via82c505_write_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
| 51 | return PCIBIOS_SUCCESSFUL; | 51 | return PCIBIOS_SUCCESSFUL; |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | static struct pci_ops via82c505_ops = { | 54 | struct pci_ops via82c505_ops = { |
| 55 | .read = via82c505_read_config, | 55 | .read = via82c505_read_config, |
| 56 | .write = via82c505_write_config, | 56 | .write = via82c505_write_config, |
| 57 | }; | 57 | }; |
| @@ -81,12 +81,3 @@ int __init via82c505_setup(int nr, struct pci_sys_data *sys) | |||
| 81 | { | 81 | { |
| 82 | return (nr == 0); | 82 | return (nr == 0); |
| 83 | } | 83 | } |
| 84 | |||
| 85 | struct pci_bus * __init via82c505_scan_bus(int nr, struct pci_sys_data *sysdata) | ||
| 86 | { | ||
| 87 | if (nr == 0) | ||
| 88 | return pci_scan_root_bus(NULL, 0, &via82c505_ops, sysdata, | ||
| 89 | &sysdata->resources); | ||
| 90 | |||
| 91 | return NULL; | ||
| 92 | } | ||
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c index 7e288f96cedf..e0d538803cc3 100644 --- a/arch/arm/common/vic.c +++ b/arch/arm/common/vic.c | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | * struct vic_device - VIC PM device | 39 | * struct vic_device - VIC PM device |
| 40 | * @irq: The IRQ number for the base of the VIC. | 40 | * @irq: The IRQ number for the base of the VIC. |
| 41 | * @base: The register base for the VIC. | 41 | * @base: The register base for the VIC. |
| 42 | * @valid_sources: A bitmask of valid interrupts | ||
| 42 | * @resume_sources: A bitmask of interrupts for resume. | 43 | * @resume_sources: A bitmask of interrupts for resume. |
| 43 | * @resume_irqs: The IRQs enabled for resume. | 44 | * @resume_irqs: The IRQs enabled for resume. |
| 44 | * @int_select: Save for VIC_INT_SELECT. | 45 | * @int_select: Save for VIC_INT_SELECT. |
| @@ -50,6 +51,7 @@ | |||
| 50 | struct vic_device { | 51 | struct vic_device { |
| 51 | void __iomem *base; | 52 | void __iomem *base; |
| 52 | int irq; | 53 | int irq; |
| 54 | u32 valid_sources; | ||
| 53 | u32 resume_sources; | 55 | u32 resume_sources; |
| 54 | u32 resume_irqs; | 56 | u32 resume_irqs; |
| 55 | u32 int_select; | 57 | u32 int_select; |
| @@ -164,10 +166,32 @@ static int __init vic_pm_init(void) | |||
| 164 | late_initcall(vic_pm_init); | 166 | late_initcall(vic_pm_init); |
| 165 | #endif /* CONFIG_PM */ | 167 | #endif /* CONFIG_PM */ |
| 166 | 168 | ||
| 169 | static struct irq_chip vic_chip; | ||
| 170 | |||
| 171 | static int vic_irqdomain_map(struct irq_domain *d, unsigned int irq, | ||
| 172 | irq_hw_number_t hwirq) | ||
| 173 | { | ||
| 174 | struct vic_device *v = d->host_data; | ||
| 175 | |||
| 176 | /* Skip invalid IRQs, only register handlers for the real ones */ | ||
| 177 | if (!(v->valid_sources & (1 << hwirq))) | ||
| 178 | return -ENOTSUPP; | ||
| 179 | irq_set_chip_and_handler(irq, &vic_chip, handle_level_irq); | ||
| 180 | irq_set_chip_data(irq, v->base); | ||
| 181 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
| 182 | return 0; | ||
| 183 | } | ||
| 184 | |||
| 185 | static struct irq_domain_ops vic_irqdomain_ops = { | ||
| 186 | .map = vic_irqdomain_map, | ||
| 187 | .xlate = irq_domain_xlate_onetwocell, | ||
| 188 | }; | ||
| 189 | |||
| 167 | /** | 190 | /** |
| 168 | * vic_register() - Register a VIC. | 191 | * vic_register() - Register a VIC. |
| 169 | * @base: The base address of the VIC. | 192 | * @base: The base address of the VIC. |
| 170 | * @irq: The base IRQ for the VIC. | 193 | * @irq: The base IRQ for the VIC. |
| 194 | * @valid_sources: bitmask of valid interrupts | ||
| 171 | * @resume_sources: bitmask of interrupts allowed for resume sources. | 195 | * @resume_sources: bitmask of interrupts allowed for resume sources. |
| 172 | * @node: The device tree node associated with the VIC. | 196 | * @node: The device tree node associated with the VIC. |
| 173 | * | 197 | * |
| @@ -178,7 +202,8 @@ late_initcall(vic_pm_init); | |||
| 178 | * This also configures the IRQ domain for the VIC. | 202 | * This also configures the IRQ domain for the VIC. |
| 179 | */ | 203 | */ |
| 180 | static void __init vic_register(void __iomem *base, unsigned int irq, | 204 | static void __init vic_register(void __iomem *base, unsigned int irq, |
| 181 | u32 resume_sources, struct device_node *node) | 205 | u32 valid_sources, u32 resume_sources, |
| 206 | struct device_node *node) | ||
| 182 | { | 207 | { |
| 183 | struct vic_device *v; | 208 | struct vic_device *v; |
| 184 | 209 | ||
| @@ -189,11 +214,12 @@ static void __init vic_register(void __iomem *base, unsigned int irq, | |||
| 189 | 214 | ||
| 190 | v = &vic_devices[vic_id]; | 215 | v = &vic_devices[vic_id]; |
| 191 | v->base = base; | 216 | v->base = base; |
| 217 | v->valid_sources = valid_sources; | ||
| 192 | v->resume_sources = resume_sources; | 218 | v->resume_sources = resume_sources; |
| 193 | v->irq = irq; | 219 | v->irq = irq; |
| 194 | vic_id++; | 220 | vic_id++; |
| 195 | v->domain = irq_domain_add_legacy(node, 32, irq, 0, | 221 | v->domain = irq_domain_add_legacy(node, fls(valid_sources), irq, 0, |
| 196 | &irq_domain_simple_ops, v); | 222 | &vic_irqdomain_ops, v); |
| 197 | } | 223 | } |
| 198 | 224 | ||
| 199 | static void vic_ack_irq(struct irq_data *d) | 225 | static void vic_ack_irq(struct irq_data *d) |
| @@ -287,23 +313,6 @@ static void __init vic_clear_interrupts(void __iomem *base) | |||
| 287 | } | 313 | } |
| 288 | } | 314 | } |
| 289 | 315 | ||
| 290 | static void __init vic_set_irq_sources(void __iomem *base, | ||
| 291 | unsigned int irq_start, u32 vic_sources) | ||
| 292 | { | ||
| 293 | unsigned int i; | ||
| 294 | |||
| 295 | for (i = 0; i < 32; i++) { | ||
| 296 | if (vic_sources & (1 << i)) { | ||
| 297 | unsigned int irq = irq_start + i; | ||
| 298 | |||
| 299 | irq_set_chip_and_handler(irq, &vic_chip, | ||
| 300 | handle_level_irq); | ||
| 301 | irq_set_chip_data(irq, base); | ||
| 302 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
| 303 | } | ||
| 304 | } | ||
| 305 | } | ||
| 306 | |||
| 307 | /* | 316 | /* |
| 308 | * The PL190 cell from ARM has been modified by ST to handle 64 interrupts. | 317 | * The PL190 cell from ARM has been modified by ST to handle 64 interrupts. |
| 309 | * The original cell has 32 interrupts, while the modified one has 64, | 318 | * The original cell has 32 interrupts, while the modified one has 64, |
| @@ -338,8 +347,7 @@ static void __init vic_init_st(void __iomem *base, unsigned int irq_start, | |||
| 338 | writel(32, base + VIC_PL190_DEF_VECT_ADDR); | 347 | writel(32, base + VIC_PL190_DEF_VECT_ADDR); |
| 339 | } | 348 | } |
| 340 | 349 | ||
| 341 | vic_set_irq_sources(base, irq_start, vic_sources); | 350 | vic_register(base, irq_start, vic_sources, 0, node); |
| 342 | vic_register(base, irq_start, 0, node); | ||
| 343 | } | 351 | } |
| 344 | 352 | ||
| 345 | void __init __vic_init(void __iomem *base, unsigned int irq_start, | 353 | void __init __vic_init(void __iomem *base, unsigned int irq_start, |
| @@ -379,9 +387,7 @@ void __init __vic_init(void __iomem *base, unsigned int irq_start, | |||
| 379 | 387 | ||
| 380 | vic_init2(base); | 388 | vic_init2(base); |
| 381 | 389 | ||
| 382 | vic_set_irq_sources(base, irq_start, vic_sources); | 390 | vic_register(base, irq_start, vic_sources, resume_sources, node); |
| 383 | |||
| 384 | vic_register(base, irq_start, resume_sources, node); | ||
| 385 | } | 391 | } |
| 386 | 392 | ||
| 387 | /** | 393 | /** |
diff --git a/arch/arm/configs/rpc_defconfig b/arch/arm/configs/rpc_defconfig index af278f7a2246..00515ef9782d 100644 --- a/arch/arm/configs/rpc_defconfig +++ b/arch/arm/configs/rpc_defconfig | |||
| @@ -8,8 +8,6 @@ CONFIG_MODULES=y | |||
| 8 | CONFIG_MODULE_UNLOAD=y | 8 | CONFIG_MODULE_UNLOAD=y |
| 9 | # CONFIG_BLK_DEV_BSG is not set | 9 | # CONFIG_BLK_DEV_BSG is not set |
| 10 | CONFIG_ARCH_RPC=y | 10 | CONFIG_ARCH_RPC=y |
| 11 | CONFIG_CPU_ARM610=y | ||
| 12 | CONFIG_CPU_ARM710=y | ||
| 13 | CONFIG_CPU_SA110=y | 11 | CONFIG_CPU_SA110=y |
| 14 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 12 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
| 15 | CONFIG_ZBOOT_ROM_BSS=0x0 | 13 | CONFIG_ZBOOT_ROM_BSS=0x0 |
diff --git a/arch/arm/include/asm/arch_timer.h b/arch/arm/include/asm/arch_timer.h new file mode 100644 index 000000000000..ed2e95d46e29 --- /dev/null +++ b/arch/arm/include/asm/arch_timer.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #ifndef __ASMARM_ARCH_TIMER_H | ||
| 2 | #define __ASMARM_ARCH_TIMER_H | ||
| 3 | |||
| 4 | #ifdef CONFIG_ARM_ARCH_TIMER | ||
| 5 | int arch_timer_of_register(void); | ||
| 6 | int arch_timer_sched_clock_init(void); | ||
| 7 | #else | ||
| 8 | static inline int arch_timer_of_register(void) | ||
| 9 | { | ||
| 10 | return -ENXIO; | ||
| 11 | } | ||
| 12 | |||
| 13 | static inline int arch_timer_sched_clock_init(void) | ||
| 14 | { | ||
| 15 | return -ENXIO; | ||
| 16 | } | ||
| 17 | #endif | ||
| 18 | |||
| 19 | #endif | ||
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index d5d8d5c72682..004c1bc95d2b 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
| @@ -101,7 +101,7 @@ struct cpu_cache_fns { | |||
| 101 | void (*flush_user_range)(unsigned long, unsigned long, unsigned int); | 101 | void (*flush_user_range)(unsigned long, unsigned long, unsigned int); |
| 102 | 102 | ||
| 103 | void (*coherent_kern_range)(unsigned long, unsigned long); | 103 | void (*coherent_kern_range)(unsigned long, unsigned long); |
| 104 | void (*coherent_user_range)(unsigned long, unsigned long); | 104 | int (*coherent_user_range)(unsigned long, unsigned long); |
| 105 | void (*flush_kern_dcache_area)(void *, size_t); | 105 | void (*flush_kern_dcache_area)(void *, size_t); |
| 106 | 106 | ||
| 107 | void (*dma_map_area)(const void *, size_t, int); | 107 | void (*dma_map_area)(const void *, size_t, int); |
| @@ -142,7 +142,7 @@ extern void __cpuc_flush_kern_all(void); | |||
| 142 | extern void __cpuc_flush_user_all(void); | 142 | extern void __cpuc_flush_user_all(void); |
| 143 | extern void __cpuc_flush_user_range(unsigned long, unsigned long, unsigned int); | 143 | extern void __cpuc_flush_user_range(unsigned long, unsigned long, unsigned int); |
| 144 | extern void __cpuc_coherent_kern_range(unsigned long, unsigned long); | 144 | extern void __cpuc_coherent_kern_range(unsigned long, unsigned long); |
| 145 | extern void __cpuc_coherent_user_range(unsigned long, unsigned long); | 145 | extern int __cpuc_coherent_user_range(unsigned long, unsigned long); |
| 146 | extern void __cpuc_flush_dcache_area(void *, size_t); | 146 | extern void __cpuc_flush_dcache_area(void *, size_t); |
| 147 | 147 | ||
| 148 | /* | 148 | /* |
| @@ -249,7 +249,7 @@ extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr | |||
| 249 | * Harvard caches are synchronised for the user space address range. | 249 | * Harvard caches are synchronised for the user space address range. |
| 250 | * This is used for the ARM private sys_cacheflush system call. | 250 | * This is used for the ARM private sys_cacheflush system call. |
| 251 | */ | 251 | */ |
| 252 | #define flush_cache_user_range(vma,start,end) \ | 252 | #define flush_cache_user_range(start,end) \ |
| 253 | __cpuc_coherent_user_range((start) & PAGE_MASK, PAGE_ALIGN(end)) | 253 | __cpuc_coherent_user_range((start) & PAGE_MASK, PAGE_ALIGN(end)) |
| 254 | 254 | ||
| 255 | /* | 255 | /* |
diff --git a/arch/arm/include/asm/cmpxchg.h b/arch/arm/include/asm/cmpxchg.h index d41d7cbf0ada..7eb18c1d8d6c 100644 --- a/arch/arm/include/asm/cmpxchg.h +++ b/arch/arm/include/asm/cmpxchg.h | |||
| @@ -229,66 +229,19 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr, | |||
| 229 | (unsigned long)(n), \ | 229 | (unsigned long)(n), \ |
| 230 | sizeof(*(ptr)))) | 230 | sizeof(*(ptr)))) |
| 231 | 231 | ||
| 232 | #ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ | 232 | #define cmpxchg64(ptr, o, n) \ |
| 233 | 233 | ((__typeof__(*(ptr)))atomic64_cmpxchg(container_of((ptr), \ | |
| 234 | /* | 234 | atomic64_t, \ |
| 235 | * Note : ARMv7-M (currently unsupported by Linux) does not support | 235 | counter), \ |
| 236 | * ldrexd/strexd. If ARMv7-M is ever supported by the Linux kernel, it should | 236 | (unsigned long)(o), \ |
| 237 | * not be allowed to use __cmpxchg64. | 237 | (unsigned long)(n))) |
| 238 | */ | 238 | |
| 239 | static inline unsigned long long __cmpxchg64(volatile void *ptr, | 239 | #define cmpxchg64_local(ptr, o, n) \ |
| 240 | unsigned long long old, | 240 | ((__typeof__(*(ptr)))local64_cmpxchg(container_of((ptr), \ |
| 241 | unsigned long long new) | 241 | local64_t, \ |
| 242 | { | 242 | a), \ |
| 243 | register unsigned long long oldval asm("r0"); | 243 | (unsigned long)(o), \ |
| 244 | register unsigned long long __old asm("r2") = old; | 244 | (unsigned long)(n))) |
| 245 | register unsigned long long __new asm("r4") = new; | ||
| 246 | unsigned long res; | ||
| 247 | |||
| 248 | do { | ||
| 249 | asm volatile( | ||
| 250 | " @ __cmpxchg8\n" | ||
| 251 | " ldrexd %1, %H1, [%2]\n" | ||
| 252 | " mov %0, #0\n" | ||
| 253 | " teq %1, %3\n" | ||
| 254 | " teqeq %H1, %H3\n" | ||
| 255 | " strexdeq %0, %4, %H4, [%2]\n" | ||
| 256 | : "=&r" (res), "=&r" (oldval) | ||
| 257 | : "r" (ptr), "Ir" (__old), "r" (__new) | ||
| 258 | : "memory", "cc"); | ||
| 259 | } while (res); | ||
| 260 | |||
| 261 | return oldval; | ||
| 262 | } | ||
| 263 | |||
| 264 | static inline unsigned long long __cmpxchg64_mb(volatile void *ptr, | ||
| 265 | unsigned long long old, | ||
| 266 | unsigned long long new) | ||
| 267 | { | ||
| 268 | unsigned long long ret; | ||
| 269 | |||
| 270 | smp_mb(); | ||
| 271 | ret = __cmpxchg64(ptr, old, new); | ||
| 272 | smp_mb(); | ||
| 273 | |||
| 274 | return ret; | ||
| 275 | } | ||
| 276 | |||
| 277 | #define cmpxchg64(ptr,o,n) \ | ||
| 278 | ((__typeof__(*(ptr)))__cmpxchg64_mb((ptr), \ | ||
| 279 | (unsigned long long)(o), \ | ||
| 280 | (unsigned long long)(n))) | ||
| 281 | |||
| 282 | #define cmpxchg64_local(ptr,o,n) \ | ||
| 283 | ((__typeof__(*(ptr)))__cmpxchg64((ptr), \ | ||
| 284 | (unsigned long long)(o), \ | ||
| 285 | (unsigned long long)(n))) | ||
| 286 | |||
| 287 | #else /* min ARCH = ARMv6 */ | ||
| 288 | |||
| 289 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
| 290 | |||
| 291 | #endif | ||
| 292 | 245 | ||
| 293 | #endif /* __LINUX_ARM_ARCH__ >= 6 */ | 246 | #endif /* __LINUX_ARM_ARCH__ >= 6 */ |
| 294 | 247 | ||
diff --git a/arch/arm/include/asm/glue-df.h b/arch/arm/include/asm/glue-df.h index 354d571e8bcc..8cacbcda76da 100644 --- a/arch/arm/include/asm/glue-df.h +++ b/arch/arm/include/asm/glue-df.h | |||
| @@ -31,14 +31,6 @@ | |||
| 31 | #undef CPU_DABORT_HANDLER | 31 | #undef CPU_DABORT_HANDLER |
| 32 | #undef MULTI_DABORT | 32 | #undef MULTI_DABORT |
| 33 | 33 | ||
| 34 | #if defined(CONFIG_CPU_ARM610) | ||
| 35 | # ifdef CPU_DABORT_HANDLER | ||
| 36 | # define MULTI_DABORT 1 | ||
| 37 | # else | ||
| 38 | # define CPU_DABORT_HANDLER cpu_arm6_data_abort | ||
| 39 | # endif | ||
| 40 | #endif | ||
| 41 | |||
| 42 | #if defined(CONFIG_CPU_ARM710) | 34 | #if defined(CONFIG_CPU_ARM710) |
| 43 | # ifdef CPU_DABORT_HANDLER | 35 | # ifdef CPU_DABORT_HANDLER |
| 44 | # define MULTI_DABORT 1 | 36 | # define MULTI_DABORT 1 |
diff --git a/arch/arm/include/asm/glue-proc.h b/arch/arm/include/asm/glue-proc.h index e2be7f142668..ac1dd54724b6 100644 --- a/arch/arm/include/asm/glue-proc.h +++ b/arch/arm/include/asm/glue-proc.h | |||
| @@ -23,15 +23,6 @@ | |||
| 23 | * CPU_NAME - the prefix for CPU related functions | 23 | * CPU_NAME - the prefix for CPU related functions |
| 24 | */ | 24 | */ |
| 25 | 25 | ||
| 26 | #ifdef CONFIG_CPU_ARM610 | ||
| 27 | # ifdef CPU_NAME | ||
| 28 | # undef MULTI_CPU | ||
| 29 | # define MULTI_CPU | ||
| 30 | # else | ||
| 31 | # define CPU_NAME cpu_arm6 | ||
| 32 | # endif | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #ifdef CONFIG_CPU_ARM7TDMI | 26 | #ifdef CONFIG_CPU_ARM7TDMI |
| 36 | # ifdef CPU_NAME | 27 | # ifdef CPU_NAME |
| 37 | # undef MULTI_CPU | 28 | # undef MULTI_CPU |
| @@ -41,15 +32,6 @@ | |||
| 41 | # endif | 32 | # endif |
| 42 | #endif | 33 | #endif |
| 43 | 34 | ||
| 44 | #ifdef CONFIG_CPU_ARM710 | ||
| 45 | # ifdef CPU_NAME | ||
| 46 | # undef MULTI_CPU | ||
| 47 | # define MULTI_CPU | ||
| 48 | # else | ||
| 49 | # define CPU_NAME cpu_arm7 | ||
| 50 | # endif | ||
| 51 | #endif | ||
| 52 | |||
| 53 | #ifdef CONFIG_CPU_ARM720T | 35 | #ifdef CONFIG_CPU_ARM720T |
| 54 | # ifdef CPU_NAME | 36 | # ifdef CPU_NAME |
| 55 | # undef MULTI_CPU | 37 | # undef MULTI_CPU |
diff --git a/arch/arm/include/asm/hardware/it8152.h b/arch/arm/include/asm/hardware/it8152.h index 73f84fa4f366..d36a73d7c0e8 100644 --- a/arch/arm/include/asm/hardware/it8152.h +++ b/arch/arm/include/asm/hardware/it8152.h | |||
| @@ -110,6 +110,6 @@ extern void it8152_irq_demux(unsigned int irq, struct irq_desc *desc); | |||
| 110 | extern void it8152_init_irq(void); | 110 | extern void it8152_init_irq(void); |
| 111 | extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); | 111 | extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); |
| 112 | extern int it8152_pci_setup(int nr, struct pci_sys_data *sys); | 112 | extern int it8152_pci_setup(int nr, struct pci_sys_data *sys); |
| 113 | extern struct pci_bus *it8152_pci_scan_bus(int nr, struct pci_sys_data *sys); | 113 | extern struct pci_ops it8152_ops; |
| 114 | 114 | ||
| 115 | #endif /* __ASM_HARDWARE_IT8152_H */ | 115 | #endif /* __ASM_HARDWARE_IT8152_H */ |
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h index d943b7d20f11..26c511fddf8f 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h | |||
| @@ -12,13 +12,14 @@ | |||
| 12 | #define __ASM_MACH_PCI_H | 12 | #define __ASM_MACH_PCI_H |
| 13 | 13 | ||
| 14 | struct pci_sys_data; | 14 | struct pci_sys_data; |
| 15 | struct pci_ops; | ||
| 15 | struct pci_bus; | 16 | struct pci_bus; |
| 16 | 17 | ||
| 17 | struct hw_pci { | 18 | struct hw_pci { |
| 18 | #ifdef CONFIG_PCI_DOMAINS | 19 | #ifdef CONFIG_PCI_DOMAINS |
| 19 | int domain; | 20 | int domain; |
| 20 | #endif | 21 | #endif |
| 21 | struct list_head buses; | 22 | struct pci_ops *ops; |
| 22 | int nr_controllers; | 23 | int nr_controllers; |
| 23 | int (*setup)(int nr, struct pci_sys_data *); | 24 | int (*setup)(int nr, struct pci_sys_data *); |
| 24 | struct pci_bus *(*scan)(int nr, struct pci_sys_data *); | 25 | struct pci_bus *(*scan)(int nr, struct pci_sys_data *); |
| @@ -45,16 +46,10 @@ struct pci_sys_data { | |||
| 45 | u8 (*swizzle)(struct pci_dev *, u8 *); | 46 | u8 (*swizzle)(struct pci_dev *, u8 *); |
| 46 | /* IRQ mapping */ | 47 | /* IRQ mapping */ |
| 47 | int (*map_irq)(const struct pci_dev *, u8, u8); | 48 | int (*map_irq)(const struct pci_dev *, u8, u8); |
| 48 | struct hw_pci *hw; | ||
| 49 | void *private_data; /* platform controller private data */ | 49 | void *private_data; /* platform controller private data */ |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | /* | 52 | /* |
| 53 | * This is the standard PCI-PCI bridge swizzling algorithm. | ||
| 54 | */ | ||
| 55 | #define pci_std_swizzle pci_common_swizzle | ||
| 56 | |||
| 57 | /* | ||
| 58 | * Call this with your hw_pci struct to initialise the PCI system. | 53 | * Call this with your hw_pci struct to initialise the PCI system. |
| 59 | */ | 54 | */ |
| 60 | void pci_common_init(struct hw_pci *); | 55 | void pci_common_init(struct hw_pci *); |
| @@ -62,22 +57,22 @@ void pci_common_init(struct hw_pci *); | |||
| 62 | /* | 57 | /* |
| 63 | * PCI controllers | 58 | * PCI controllers |
| 64 | */ | 59 | */ |
| 60 | extern struct pci_ops iop3xx_ops; | ||
| 65 | extern int iop3xx_pci_setup(int nr, struct pci_sys_data *); | 61 | extern int iop3xx_pci_setup(int nr, struct pci_sys_data *); |
| 66 | extern struct pci_bus *iop3xx_pci_scan_bus(int nr, struct pci_sys_data *); | ||
| 67 | extern void iop3xx_pci_preinit(void); | 62 | extern void iop3xx_pci_preinit(void); |
| 68 | extern void iop3xx_pci_preinit_cond(void); | 63 | extern void iop3xx_pci_preinit_cond(void); |
| 69 | 64 | ||
| 65 | extern struct pci_ops dc21285_ops; | ||
| 70 | extern int dc21285_setup(int nr, struct pci_sys_data *); | 66 | extern int dc21285_setup(int nr, struct pci_sys_data *); |
| 71 | extern struct pci_bus *dc21285_scan_bus(int nr, struct pci_sys_data *); | ||
| 72 | extern void dc21285_preinit(void); | 67 | extern void dc21285_preinit(void); |
| 73 | extern void dc21285_postinit(void); | 68 | extern void dc21285_postinit(void); |
| 74 | 69 | ||
| 70 | extern struct pci_ops via82c505_ops; | ||
| 75 | extern int via82c505_setup(int nr, struct pci_sys_data *); | 71 | extern int via82c505_setup(int nr, struct pci_sys_data *); |
| 76 | extern struct pci_bus *via82c505_scan_bus(int nr, struct pci_sys_data *); | ||
| 77 | extern void via82c505_init(void *sysdata); | 72 | extern void via82c505_init(void *sysdata); |
| 78 | 73 | ||
| 74 | extern struct pci_ops pci_v3_ops; | ||
| 79 | extern int pci_v3_setup(int nr, struct pci_sys_data *); | 75 | extern int pci_v3_setup(int nr, struct pci_sys_data *); |
| 80 | extern struct pci_bus *pci_v3_scan_bus(int nr, struct pci_sys_data *); | ||
| 81 | extern void pci_v3_preinit(void); | 76 | extern void pci_v3_preinit(void); |
| 82 | extern void pci_v3_postinit(void); | 77 | extern void pci_v3_postinit(void); |
| 83 | 78 | ||
diff --git a/arch/arm/include/asm/mach/time.h b/arch/arm/include/asm/mach/time.h index f73c908b7fa0..6ca945f534ab 100644 --- a/arch/arm/include/asm/mach/time.h +++ b/arch/arm/include/asm/mach/time.h | |||
| @@ -42,4 +42,9 @@ struct sys_timer { | |||
| 42 | 42 | ||
| 43 | extern void timer_tick(void); | 43 | extern void timer_tick(void); |
| 44 | 44 | ||
| 45 | struct timespec; | ||
| 46 | typedef void (*clock_access_fn)(struct timespec *); | ||
| 47 | extern int register_persistent_clock(clock_access_fn read_boot, | ||
| 48 | clock_access_fn read_persistent); | ||
| 49 | |||
| 45 | #endif | 50 | #endif |
diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h index b8e580a297e4..14965658a923 100644 --- a/arch/arm/include/asm/mmu.h +++ b/arch/arm/include/asm/mmu.h | |||
| @@ -34,11 +34,4 @@ typedef struct { | |||
| 34 | 34 | ||
| 35 | #endif | 35 | #endif |
| 36 | 36 | ||
| 37 | /* | ||
| 38 | * switch_mm() may do a full cache flush over the context switch, | ||
| 39 | * so enable interrupts over the context switch to avoid high | ||
| 40 | * latency. | ||
| 41 | */ | ||
| 42 | #define __ARCH_WANT_INTERRUPTS_ON_CTXSW | ||
| 43 | |||
| 44 | #endif | 37 | #endif |
diff --git a/arch/arm/include/asm/mmu_context.h b/arch/arm/include/asm/mmu_context.h index a0b3cac0547c..0306bc642c0d 100644 --- a/arch/arm/include/asm/mmu_context.h +++ b/arch/arm/include/asm/mmu_context.h | |||
| @@ -43,45 +43,104 @@ void __check_kvm_seq(struct mm_struct *mm); | |||
| 43 | #define ASID_FIRST_VERSION (1 << ASID_BITS) | 43 | #define ASID_FIRST_VERSION (1 << ASID_BITS) |
| 44 | 44 | ||
| 45 | extern unsigned int cpu_last_asid; | 45 | extern unsigned int cpu_last_asid; |
| 46 | #ifdef CONFIG_SMP | ||
| 47 | DECLARE_PER_CPU(struct mm_struct *, current_mm); | ||
| 48 | #endif | ||
| 49 | 46 | ||
| 50 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm); | 47 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm); |
| 51 | void __new_context(struct mm_struct *mm); | 48 | void __new_context(struct mm_struct *mm); |
| 49 | void cpu_set_reserved_ttbr0(void); | ||
| 52 | 50 | ||
| 53 | static inline void check_context(struct mm_struct *mm) | 51 | static inline void switch_new_context(struct mm_struct *mm) |
| 54 | { | 52 | { |
| 55 | /* | 53 | unsigned long flags; |
| 56 | * This code is executed with interrupts enabled. Therefore, | 54 | |
| 57 | * mm->context.id cannot be updated to the latest ASID version | 55 | __new_context(mm); |
| 58 | * on a different CPU (and condition below not triggered) | 56 | |
| 59 | * without first getting an IPI to reset the context. The | 57 | local_irq_save(flags); |
| 60 | * alternative is to take a read_lock on mm->context.id_lock | 58 | cpu_switch_mm(mm->pgd, mm); |
| 61 | * (after changing its type to rwlock_t). | 59 | local_irq_restore(flags); |
| 62 | */ | 60 | } |
| 63 | if (unlikely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) | ||
| 64 | __new_context(mm); | ||
| 65 | 61 | ||
| 62 | static inline void check_and_switch_context(struct mm_struct *mm, | ||
| 63 | struct task_struct *tsk) | ||
| 64 | { | ||
| 66 | if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) | 65 | if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) |
| 67 | __check_kvm_seq(mm); | 66 | __check_kvm_seq(mm); |
| 67 | |||
| 68 | /* | ||
| 69 | * Required during context switch to avoid speculative page table | ||
| 70 | * walking with the wrong TTBR. | ||
| 71 | */ | ||
| 72 | cpu_set_reserved_ttbr0(); | ||
| 73 | |||
| 74 | if (!((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) | ||
| 75 | /* | ||
| 76 | * The ASID is from the current generation, just switch to the | ||
| 77 | * new pgd. This condition is only true for calls from | ||
| 78 | * context_switch() and interrupts are already disabled. | ||
| 79 | */ | ||
| 80 | cpu_switch_mm(mm->pgd, mm); | ||
| 81 | else if (irqs_disabled()) | ||
| 82 | /* | ||
| 83 | * Defer the new ASID allocation until after the context | ||
| 84 | * switch critical region since __new_context() cannot be | ||
| 85 | * called with interrupts disabled (it sends IPIs). | ||
| 86 | */ | ||
| 87 | set_ti_thread_flag(task_thread_info(tsk), TIF_SWITCH_MM); | ||
| 88 | else | ||
| 89 | /* | ||
| 90 | * That is a direct call to switch_mm() or activate_mm() with | ||
| 91 | * interrupts enabled and a new context. | ||
| 92 | */ | ||
| 93 | switch_new_context(mm); | ||
| 68 | } | 94 | } |
| 69 | 95 | ||
| 70 | #define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0) | 96 | #define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0) |
| 71 | 97 | ||
| 72 | #else | 98 | #define finish_arch_post_lock_switch \ |
| 73 | 99 | finish_arch_post_lock_switch | |
| 74 | static inline void check_context(struct mm_struct *mm) | 100 | static inline void finish_arch_post_lock_switch(void) |
| 75 | { | 101 | { |
| 102 | if (test_and_clear_thread_flag(TIF_SWITCH_MM)) | ||
| 103 | switch_new_context(current->mm); | ||
| 104 | } | ||
| 105 | |||
| 106 | #else /* !CONFIG_CPU_HAS_ASID */ | ||
| 107 | |||
| 76 | #ifdef CONFIG_MMU | 108 | #ifdef CONFIG_MMU |
| 109 | |||
| 110 | static inline void check_and_switch_context(struct mm_struct *mm, | ||
| 111 | struct task_struct *tsk) | ||
| 112 | { | ||
| 77 | if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) | 113 | if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) |
| 78 | __check_kvm_seq(mm); | 114 | __check_kvm_seq(mm); |
| 79 | #endif | 115 | |
| 116 | if (irqs_disabled()) | ||
| 117 | /* | ||
| 118 | * cpu_switch_mm() needs to flush the VIVT caches. To avoid | ||
| 119 | * high interrupt latencies, defer the call and continue | ||
| 120 | * running with the old mm. Since we only support UP systems | ||
| 121 | * on non-ASID CPUs, the old mm will remain valid until the | ||
| 122 | * finish_arch_post_lock_switch() call. | ||
| 123 | */ | ||
| 124 | set_ti_thread_flag(task_thread_info(tsk), TIF_SWITCH_MM); | ||
| 125 | else | ||
| 126 | cpu_switch_mm(mm->pgd, mm); | ||
| 80 | } | 127 | } |
| 81 | 128 | ||
| 129 | #define finish_arch_post_lock_switch \ | ||
| 130 | finish_arch_post_lock_switch | ||
| 131 | static inline void finish_arch_post_lock_switch(void) | ||
| 132 | { | ||
| 133 | if (test_and_clear_thread_flag(TIF_SWITCH_MM)) { | ||
| 134 | struct mm_struct *mm = current->mm; | ||
| 135 | cpu_switch_mm(mm->pgd, mm); | ||
| 136 | } | ||
| 137 | } | ||
| 138 | |||
| 139 | #endif /* CONFIG_MMU */ | ||
| 140 | |||
| 82 | #define init_new_context(tsk,mm) 0 | 141 | #define init_new_context(tsk,mm) 0 |
| 83 | 142 | ||
| 84 | #endif | 143 | #endif /* CONFIG_CPU_HAS_ASID */ |
| 85 | 144 | ||
| 86 | #define destroy_context(mm) do { } while(0) | 145 | #define destroy_context(mm) do { } while(0) |
| 87 | 146 | ||
| @@ -119,12 +178,7 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
| 119 | __flush_icache_all(); | 178 | __flush_icache_all(); |
| 120 | #endif | 179 | #endif |
| 121 | if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) || prev != next) { | 180 | if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) || prev != next) { |
| 122 | #ifdef CONFIG_SMP | 181 | check_and_switch_context(next, tsk); |
| 123 | struct mm_struct **crt_mm = &per_cpu(current_mm, cpu); | ||
| 124 | *crt_mm = next; | ||
| 125 | #endif | ||
| 126 | check_context(next); | ||
| 127 | cpu_switch_mm(next->pgd, next); | ||
| 128 | if (cache_is_vivt()) | 182 | if (cache_is_vivt()) |
| 129 | cpumask_clear_cpu(cpu, mm_cpumask(prev)); | 183 | cpumask_clear_cpu(cpu, mm_cpumask(prev)); |
| 130 | } | 184 | } |
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index 5838361c48b3..ecf901902e44 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
| @@ -34,7 +34,6 @@ | |||
| 34 | * processor(s) we're building for. | 34 | * processor(s) we're building for. |
| 35 | * | 35 | * |
| 36 | * We have the following to choose from: | 36 | * We have the following to choose from: |
| 37 | * v3 - ARMv3 | ||
| 38 | * v4wt - ARMv4 with writethrough cache, without minicache | 37 | * v4wt - ARMv4 with writethrough cache, without minicache |
| 39 | * v4wb - ARMv4 with writeback cache, without minicache | 38 | * v4wb - ARMv4 with writeback cache, without minicache |
| 40 | * v4_mc - ARMv4 with minicache | 39 | * v4_mc - ARMv4 with minicache |
| @@ -44,14 +43,6 @@ | |||
| 44 | #undef _USER | 43 | #undef _USER |
| 45 | #undef MULTI_USER | 44 | #undef MULTI_USER |
| 46 | 45 | ||
| 47 | #ifdef CONFIG_CPU_COPY_V3 | ||
| 48 | # ifdef _USER | ||
| 49 | # define MULTI_USER 1 | ||
| 50 | # else | ||
| 51 | # define _USER v3 | ||
| 52 | # endif | ||
| 53 | #endif | ||
| 54 | |||
| 55 | #ifdef CONFIG_CPU_COPY_V4WT | 46 | #ifdef CONFIG_CPU_COPY_V4WT |
| 56 | # ifdef _USER | 47 | # ifdef _USER |
| 57 | # define MULTI_USER 1 | 48 | # define MULTI_USER 1 |
diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h index 759af70f9a0a..b24903549d1c 100644 --- a/arch/arm/include/asm/pgtable-3level.h +++ b/arch/arm/include/asm/pgtable-3level.h | |||
| @@ -69,8 +69,6 @@ | |||
| 69 | */ | 69 | */ |
| 70 | #define L_PTE_PRESENT (_AT(pteval_t, 3) << 0) /* Valid */ | 70 | #define L_PTE_PRESENT (_AT(pteval_t, 3) << 0) /* Valid */ |
| 71 | #define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */ | 71 | #define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */ |
| 72 | #define L_PTE_BUFFERABLE (_AT(pteval_t, 1) << 2) /* AttrIndx[0] */ | ||
| 73 | #define L_PTE_CACHEABLE (_AT(pteval_t, 1) << 3) /* AttrIndx[1] */ | ||
| 74 | #define L_PTE_USER (_AT(pteval_t, 1) << 6) /* AP[1] */ | 72 | #define L_PTE_USER (_AT(pteval_t, 1) << 6) /* AP[1] */ |
| 75 | #define L_PTE_RDONLY (_AT(pteval_t, 1) << 7) /* AP[2] */ | 73 | #define L_PTE_RDONLY (_AT(pteval_t, 1) << 7) /* AP[2] */ |
| 76 | #define L_PTE_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */ | 74 | #define L_PTE_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */ |
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h index 451808ba1211..355ece523f41 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h | |||
| @@ -249,6 +249,11 @@ static inline unsigned long kernel_stack_pointer(struct pt_regs *regs) | |||
| 249 | return regs->ARM_sp; | 249 | return regs->ARM_sp; |
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | static inline unsigned long user_stack_pointer(struct pt_regs *regs) | ||
| 253 | { | ||
| 254 | return regs->ARM_sp; | ||
| 255 | } | ||
| 256 | |||
| 252 | #endif /* __KERNEL__ */ | 257 | #endif /* __KERNEL__ */ |
| 253 | 258 | ||
| 254 | #endif /* __ASSEMBLY__ */ | 259 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/arm/include/asm/syscall.h b/arch/arm/include/asm/syscall.h new file mode 100644 index 000000000000..c334a23ddf75 --- /dev/null +++ b/arch/arm/include/asm/syscall.h | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | /* | ||
| 2 | * Access to user system call parameters and results | ||
| 3 | * | ||
| 4 | * See asm-generic/syscall.h for descriptions of what we must do here. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifndef _ASM_ARM_SYSCALL_H | ||
| 8 | #define _ASM_ARM_SYSCALL_H | ||
| 9 | |||
| 10 | #include <linux/err.h> | ||
| 11 | |||
| 12 | extern const unsigned long sys_call_table[]; | ||
| 13 | |||
| 14 | static inline int syscall_get_nr(struct task_struct *task, | ||
| 15 | struct pt_regs *regs) | ||
| 16 | { | ||
| 17 | return task_thread_info(task)->syscall; | ||
| 18 | } | ||
| 19 | |||
| 20 | static inline void syscall_rollback(struct task_struct *task, | ||
| 21 | struct pt_regs *regs) | ||
| 22 | { | ||
| 23 | regs->ARM_r0 = regs->ARM_ORIG_r0; | ||
| 24 | } | ||
| 25 | |||
| 26 | static inline long syscall_get_error(struct task_struct *task, | ||
| 27 | struct pt_regs *regs) | ||
| 28 | { | ||
| 29 | unsigned long error = regs->ARM_r0; | ||
| 30 | return IS_ERR_VALUE(error) ? error : 0; | ||
| 31 | } | ||
| 32 | |||
| 33 | static inline long syscall_get_return_value(struct task_struct *task, | ||
| 34 | struct pt_regs *regs) | ||
| 35 | { | ||
| 36 | return regs->ARM_r0; | ||
| 37 | } | ||
| 38 | |||
| 39 | static inline void syscall_set_return_value(struct task_struct *task, | ||
| 40 | struct pt_regs *regs, | ||
| 41 | int error, long val) | ||
| 42 | { | ||
| 43 | regs->ARM_r0 = (long) error ? error : val; | ||
| 44 | } | ||
| 45 | |||
| 46 | #define SYSCALL_MAX_ARGS 7 | ||
| 47 | |||
| 48 | static inline void syscall_get_arguments(struct task_struct *task, | ||
| 49 | struct pt_regs *regs, | ||
| 50 | unsigned int i, unsigned int n, | ||
| 51 | unsigned long *args) | ||
| 52 | { | ||
| 53 | if (i + n > SYSCALL_MAX_ARGS) { | ||
| 54 | unsigned long *args_bad = args + SYSCALL_MAX_ARGS - i; | ||
| 55 | unsigned int n_bad = n + i - SYSCALL_MAX_ARGS; | ||
| 56 | pr_warning("%s called with max args %d, handling only %d\n", | ||
| 57 | __func__, i + n, SYSCALL_MAX_ARGS); | ||
| 58 | memset(args_bad, 0, n_bad * sizeof(args[0])); | ||
| 59 | n = SYSCALL_MAX_ARGS - i; | ||
| 60 | } | ||
| 61 | |||
| 62 | if (i == 0) { | ||
| 63 | args[0] = regs->ARM_ORIG_r0; | ||
| 64 | args++; | ||
| 65 | i++; | ||
| 66 | n--; | ||
| 67 | } | ||
| 68 | |||
| 69 | memcpy(args, ®s->ARM_r0 + i, n * sizeof(args[0])); | ||
| 70 | } | ||
| 71 | |||
| 72 | static inline void syscall_set_arguments(struct task_struct *task, | ||
| 73 | struct pt_regs *regs, | ||
| 74 | unsigned int i, unsigned int n, | ||
| 75 | const unsigned long *args) | ||
| 76 | { | ||
| 77 | if (i + n > SYSCALL_MAX_ARGS) { | ||
| 78 | pr_warning("%s called with max args %d, handling only %d\n", | ||
| 79 | __func__, i + n, SYSCALL_MAX_ARGS); | ||
| 80 | n = SYSCALL_MAX_ARGS - i; | ||
| 81 | } | ||
| 82 | |||
| 83 | if (i == 0) { | ||
| 84 | regs->ARM_ORIG_r0 = args[0]; | ||
| 85 | args++; | ||
| 86 | i++; | ||
| 87 | n--; | ||
| 88 | } | ||
| 89 | |||
| 90 | memcpy(®s->ARM_r0 + i, args, n * sizeof(args[0])); | ||
| 91 | } | ||
| 92 | |||
| 93 | #endif /* _ASM_ARM_SYSCALL_H */ | ||
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index 0f04d84582e1..68388eb4946b 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
| @@ -153,6 +153,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, | |||
| 153 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 153 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
| 154 | #define TIF_RESTORE_SIGMASK 20 | 154 | #define TIF_RESTORE_SIGMASK 20 |
| 155 | #define TIF_SECCOMP 21 | 155 | #define TIF_SECCOMP 21 |
| 156 | #define TIF_SWITCH_MM 22 /* deferred switch_mm */ | ||
| 156 | 157 | ||
| 157 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 158 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
| 158 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 159 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h index 85fe61e73202..6e924d3a77eb 100644 --- a/arch/arm/include/asm/tlbflush.h +++ b/arch/arm/include/asm/tlbflush.h | |||
| @@ -65,21 +65,6 @@ | |||
| 65 | #define MULTI_TLB 1 | 65 | #define MULTI_TLB 1 |
| 66 | #endif | 66 | #endif |
| 67 | 67 | ||
| 68 | #define v3_tlb_flags (TLB_V3_FULL | TLB_V3_PAGE) | ||
| 69 | |||
| 70 | #ifdef CONFIG_CPU_TLB_V3 | ||
| 71 | # define v3_possible_flags v3_tlb_flags | ||
| 72 | # define v3_always_flags v3_tlb_flags | ||
| 73 | # ifdef _TLB | ||
| 74 | # define MULTI_TLB 1 | ||
| 75 | # else | ||
| 76 | # define _TLB v3 | ||
| 77 | # endif | ||
| 78 | #else | ||
| 79 | # define v3_possible_flags 0 | ||
| 80 | # define v3_always_flags (-1UL) | ||
| 81 | #endif | ||
| 82 | |||
| 83 | #define v4_tlb_flags (TLB_V4_U_FULL | TLB_V4_U_PAGE) | 68 | #define v4_tlb_flags (TLB_V4_U_FULL | TLB_V4_U_PAGE) |
| 84 | 69 | ||
| 85 | #ifdef CONFIG_CPU_TLB_V4WT | 70 | #ifdef CONFIG_CPU_TLB_V4WT |
| @@ -298,8 +283,7 @@ extern struct cpu_tlb_fns cpu_tlb; | |||
| 298 | * implemented the "%?" method, but this has been discontinued due to too | 283 | * implemented the "%?" method, but this has been discontinued due to too |
| 299 | * many people getting it wrong. | 284 | * many people getting it wrong. |
| 300 | */ | 285 | */ |
| 301 | #define possible_tlb_flags (v3_possible_flags | \ | 286 | #define possible_tlb_flags (v4_possible_flags | \ |
| 302 | v4_possible_flags | \ | ||
| 303 | v4wbi_possible_flags | \ | 287 | v4wbi_possible_flags | \ |
| 304 | fr_possible_flags | \ | 288 | fr_possible_flags | \ |
| 305 | v4wb_possible_flags | \ | 289 | v4wb_possible_flags | \ |
| @@ -307,8 +291,7 @@ extern struct cpu_tlb_fns cpu_tlb; | |||
| 307 | v6wbi_possible_flags | \ | 291 | v6wbi_possible_flags | \ |
| 308 | v7wbi_possible_flags) | 292 | v7wbi_possible_flags) |
| 309 | 293 | ||
| 310 | #define always_tlb_flags (v3_always_flags & \ | 294 | #define always_tlb_flags (v4_always_flags & \ |
| 311 | v4_always_flags & \ | ||
| 312 | v4wbi_always_flags & \ | 295 | v4wbi_always_flags & \ |
| 313 | fr_always_flags & \ | 296 | fr_always_flags & \ |
| 314 | v4wb_always_flags & \ | 297 | v4wb_always_flags & \ |
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 7b787d642af4..22b0f1e255f0 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
| @@ -34,6 +34,7 @@ obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o suspend.o | |||
| 34 | obj-$(CONFIG_SMP) += smp.o smp_tlb.o | 34 | obj-$(CONFIG_SMP) += smp.o smp_tlb.o |
| 35 | obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o | 35 | obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o |
| 36 | obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o | 36 | obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o |
| 37 | obj-$(CONFIG_ARM_ARCH_TIMER) += arch_timer.o | ||
| 37 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o | 38 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o |
| 38 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o | 39 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o |
| 39 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o | 40 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o |
diff --git a/arch/arm/kernel/arch_timer.c b/arch/arm/kernel/arch_timer.c new file mode 100644 index 000000000000..dd58035621f7 --- /dev/null +++ b/arch/arm/kernel/arch_timer.c | |||
| @@ -0,0 +1,350 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/kernel/arch_timer.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 ARM Ltd. | ||
| 5 | * All Rights Reserved | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | #include <linux/init.h> | ||
| 12 | #include <linux/kernel.h> | ||
| 13 | #include <linux/delay.h> | ||
| 14 | #include <linux/device.h> | ||
| 15 | #include <linux/smp.h> | ||
| 16 | #include <linux/cpu.h> | ||
| 17 | #include <linux/jiffies.h> | ||
| 18 | #include <linux/clockchips.h> | ||
| 19 | #include <linux/interrupt.h> | ||
| 20 | #include <linux/of_irq.h> | ||
| 21 | #include <linux/io.h> | ||
| 22 | |||
| 23 | #include <asm/cputype.h> | ||
| 24 | #include <asm/localtimer.h> | ||
| 25 | #include <asm/arch_timer.h> | ||
| 26 | #include <asm/system_info.h> | ||
| 27 | #include <asm/sched_clock.h> | ||
| 28 | |||
| 29 | static unsigned long arch_timer_rate; | ||
| 30 | static int arch_timer_ppi; | ||
| 31 | static int arch_timer_ppi2; | ||
| 32 | |||
| 33 | static struct clock_event_device __percpu **arch_timer_evt; | ||
| 34 | |||
| 35 | /* | ||
| 36 | * Architected system timer support. | ||
| 37 | */ | ||
| 38 | |||
| 39 | #define ARCH_TIMER_CTRL_ENABLE (1 << 0) | ||
| 40 | #define ARCH_TIMER_CTRL_IT_MASK (1 << 1) | ||
| 41 | #define ARCH_TIMER_CTRL_IT_STAT (1 << 2) | ||
| 42 | |||
| 43 | #define ARCH_TIMER_REG_CTRL 0 | ||
| 44 | #define ARCH_TIMER_REG_FREQ 1 | ||
| 45 | #define ARCH_TIMER_REG_TVAL 2 | ||
| 46 | |||
| 47 | static void arch_timer_reg_write(int reg, u32 val) | ||
| 48 | { | ||
| 49 | switch (reg) { | ||
| 50 | case ARCH_TIMER_REG_CTRL: | ||
| 51 | asm volatile("mcr p15, 0, %0, c14, c2, 1" : : "r" (val)); | ||
| 52 | break; | ||
| 53 | case ARCH_TIMER_REG_TVAL: | ||
| 54 | asm volatile("mcr p15, 0, %0, c14, c2, 0" : : "r" (val)); | ||
| 55 | break; | ||
| 56 | } | ||
| 57 | |||
| 58 | isb(); | ||
| 59 | } | ||
| 60 | |||
| 61 | static u32 arch_timer_reg_read(int reg) | ||
| 62 | { | ||
| 63 | u32 val; | ||
| 64 | |||
| 65 | switch (reg) { | ||
| 66 | case ARCH_TIMER_REG_CTRL: | ||
| 67 | asm volatile("mrc p15, 0, %0, c14, c2, 1" : "=r" (val)); | ||
| 68 | break; | ||
| 69 | case ARCH_TIMER_REG_FREQ: | ||
| 70 | asm volatile("mrc p15, 0, %0, c14, c0, 0" : "=r" (val)); | ||
| 71 | break; | ||
| 72 | case ARCH_TIMER_REG_TVAL: | ||
| 73 | asm volatile("mrc p15, 0, %0, c14, c2, 0" : "=r" (val)); | ||
| 74 | break; | ||
| 75 | default: | ||
| 76 | BUG(); | ||
| 77 | } | ||
| 78 | |||
| 79 | return val; | ||
| 80 | } | ||
| 81 | |||
| 82 | static irqreturn_t arch_timer_handler(int irq, void *dev_id) | ||
| 83 | { | ||
| 84 | struct clock_event_device *evt = *(struct clock_event_device **)dev_id; | ||
| 85 | unsigned long ctrl; | ||
| 86 | |||
| 87 | ctrl = arch_timer_reg_read(ARCH_TIMER_REG_CTRL); | ||
| 88 | if (ctrl & ARCH_TIMER_CTRL_IT_STAT) { | ||
| 89 | ctrl |= ARCH_TIMER_CTRL_IT_MASK; | ||
| 90 | arch_timer_reg_write(ARCH_TIMER_REG_CTRL, ctrl); | ||
| 91 | evt->event_handler(evt); | ||
| 92 | return IRQ_HANDLED; | ||
| 93 | } | ||
| 94 | |||
| 95 | return IRQ_NONE; | ||
| 96 | } | ||
| 97 | |||
| 98 | static void arch_timer_disable(void) | ||
| 99 | { | ||
| 100 | unsigned long ctrl; | ||
| 101 | |||
| 102 | ctrl = arch_timer_reg_read(ARCH_TIMER_REG_CTRL); | ||
| 103 | ctrl &= ~ARCH_TIMER_CTRL_ENABLE; | ||
| 104 | arch_timer_reg_write(ARCH_TIMER_REG_CTRL, ctrl); | ||
| 105 | } | ||
| 106 | |||
| 107 | static void arch_timer_set_mode(enum clock_event_mode mode, | ||
| 108 | struct clock_event_device *clk) | ||
| 109 | { | ||
| 110 | switch (mode) { | ||
| 111 | case CLOCK_EVT_MODE_UNUSED: | ||
| 112 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
| 113 | arch_timer_disable(); | ||
| 114 | break; | ||
| 115 | default: | ||
| 116 | break; | ||
| 117 | } | ||
| 118 | } | ||
| 119 | |||
| 120 | static int arch_timer_set_next_event(unsigned long evt, | ||
| 121 | struct clock_event_device *unused) | ||
| 122 | { | ||
| 123 | unsigned long ctrl; | ||
| 124 | |||
| 125 | ctrl = arch_timer_reg_read(ARCH_TIMER_REG_CTRL); | ||
| 126 | ctrl |= ARCH_TIMER_CTRL_ENABLE; | ||
| 127 | ctrl &= ~ARCH_TIMER_CTRL_IT_MASK; | ||
| 128 | |||
| 129 | arch_timer_reg_write(ARCH_TIMER_REG_TVAL, evt); | ||
| 130 | arch_timer_reg_write(ARCH_TIMER_REG_CTRL, ctrl); | ||
| 131 | |||
| 132 | return 0; | ||
| 133 | } | ||
| 134 | |||
| 135 | static int __cpuinit arch_timer_setup(struct clock_event_device *clk) | ||
| 136 | { | ||
| 137 | /* Be safe... */ | ||
| 138 | arch_timer_disable(); | ||
| 139 | |||
| 140 | clk->features = CLOCK_EVT_FEAT_ONESHOT; | ||
| 141 | clk->name = "arch_sys_timer"; | ||
| 142 | clk->rating = 450; | ||
| 143 | clk->set_mode = arch_timer_set_mode; | ||
| 144 | clk->set_next_event = arch_timer_set_next_event; | ||
| 145 | clk->irq = arch_timer_ppi; | ||
| 146 | |||
| 147 | clockevents_config_and_register(clk, arch_timer_rate, | ||
| 148 | 0xf, 0x7fffffff); | ||
| 149 | |||
| 150 | *__this_cpu_ptr(arch_timer_evt) = clk; | ||
| 151 | |||
| 152 | enable_percpu_irq(clk->irq, 0); | ||
| 153 | if (arch_timer_ppi2) | ||
| 154 | enable_percpu_irq(arch_timer_ppi2, 0); | ||
| 155 | |||
| 156 | return 0; | ||
| 157 | } | ||
| 158 | |||
| 159 | /* Is the optional system timer available? */ | ||
| 160 | static int local_timer_is_architected(void) | ||
| 161 | { | ||
| 162 | return (cpu_architecture() >= CPU_ARCH_ARMv7) && | ||
| 163 | ((read_cpuid_ext(CPUID_EXT_PFR1) >> 16) & 0xf) == 1; | ||
| 164 | } | ||
| 165 | |||
| 166 | static int arch_timer_available(void) | ||
| 167 | { | ||
| 168 | unsigned long freq; | ||
| 169 | |||
| 170 | if (!local_timer_is_architected()) | ||
| 171 | return -ENXIO; | ||
| 172 | |||
| 173 | if (arch_timer_rate == 0) { | ||
| 174 | arch_timer_reg_write(ARCH_TIMER_REG_CTRL, 0); | ||
| 175 | freq = arch_timer_reg_read(ARCH_TIMER_REG_FREQ); | ||
| 176 | |||
| 177 | /* Check the timer frequency. */ | ||
| 178 | if (freq == 0) { | ||
| 179 | pr_warn("Architected timer frequency not available\n"); | ||
| 180 | return -EINVAL; | ||
| 181 | } | ||
| 182 | |||
| 183 | arch_timer_rate = freq; | ||
| 184 | } | ||
| 185 | |||
| 186 | pr_info_once("Architected local timer running at %lu.%02luMHz.\n", | ||
| 187 | arch_timer_rate / 1000000, (arch_timer_rate / 10000) % 100); | ||
| 188 | return 0; | ||
| 189 | } | ||
| 190 | |||
| 191 | static inline cycle_t arch_counter_get_cntpct(void) | ||
| 192 | { | ||
| 193 | u32 cvall, cvalh; | ||
| 194 | |||
| 195 | asm volatile("mrrc p15, 0, %0, %1, c14" : "=r" (cvall), "=r" (cvalh)); | ||
| 196 | |||
| 197 | return ((cycle_t) cvalh << 32) | cvall; | ||
| 198 | } | ||
| 199 | |||
| 200 | static inline cycle_t arch_counter_get_cntvct(void) | ||
| 201 | { | ||
| 202 | u32 cvall, cvalh; | ||
| 203 | |||
| 204 | asm volatile("mrrc p15, 1, %0, %1, c14" : "=r" (cvall), "=r" (cvalh)); | ||
| 205 | |||
| 206 | return ((cycle_t) cvalh << 32) | cvall; | ||
| 207 | } | ||
| 208 | |||
| 209 | static u32 notrace arch_counter_get_cntvct32(void) | ||
| 210 | { | ||
| 211 | cycle_t cntvct = arch_counter_get_cntvct(); | ||
| 212 | |||
| 213 | /* | ||
| 214 | * The sched_clock infrastructure only knows about counters | ||
| 215 | * with at most 32bits. Forget about the upper 24 bits for the | ||
| 216 | * time being... | ||
| 217 | */ | ||
| 218 | return (u32)(cntvct & (u32)~0); | ||
| 219 | } | ||
| 220 | |||
| 221 | static cycle_t arch_counter_read(struct clocksource *cs) | ||
| 222 | { | ||
| 223 | return arch_counter_get_cntpct(); | ||
| 224 | } | ||
| 225 | |||
| 226 | static struct clocksource clocksource_counter = { | ||
| 227 | .name = "arch_sys_counter", | ||
| 228 | .rating = 400, | ||
| 229 | .read = arch_counter_read, | ||
| 230 | .mask = CLOCKSOURCE_MASK(56), | ||
| 231 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
| 232 | }; | ||
| 233 | |||
| 234 | static void __cpuinit arch_timer_stop(struct clock_event_device *clk) | ||
| 235 | { | ||
| 236 | pr_debug("arch_timer_teardown disable IRQ%d cpu #%d\n", | ||
| 237 | clk->irq, smp_processor_id()); | ||
| 238 | disable_percpu_irq(clk->irq); | ||
| 239 | if (arch_timer_ppi2) | ||
| 240 | disable_percpu_irq(arch_timer_ppi2); | ||
| 241 | arch_timer_set_mode(CLOCK_EVT_MODE_UNUSED, clk); | ||
| 242 | } | ||
| 243 | |||
| 244 | static struct local_timer_ops arch_timer_ops __cpuinitdata = { | ||
| 245 | .setup = arch_timer_setup, | ||
| 246 | .stop = arch_timer_stop, | ||
| 247 | }; | ||
| 248 | |||
| 249 | static struct clock_event_device arch_timer_global_evt; | ||
| 250 | |||
| 251 | static int __init arch_timer_register(void) | ||
| 252 | { | ||
| 253 | int err; | ||
| 254 | |||
| 255 | err = arch_timer_available(); | ||
| 256 | if (err) | ||
| 257 | return err; | ||
| 258 | |||
| 259 | arch_timer_evt = alloc_percpu(struct clock_event_device *); | ||
| 260 | if (!arch_timer_evt) | ||
| 261 | return -ENOMEM; | ||
| 262 | |||
| 263 | clocksource_register_hz(&clocksource_counter, arch_timer_rate); | ||
| 264 | |||
| 265 | err = request_percpu_irq(arch_timer_ppi, arch_timer_handler, | ||
| 266 | "arch_timer", arch_timer_evt); | ||
| 267 | if (err) { | ||
| 268 | pr_err("arch_timer: can't register interrupt %d (%d)\n", | ||
| 269 | arch_timer_ppi, err); | ||
| 270 | goto out_free; | ||
| 271 | } | ||
| 272 | |||
| 273 | if (arch_timer_ppi2) { | ||
| 274 | err = request_percpu_irq(arch_timer_ppi2, arch_timer_handler, | ||
| 275 | "arch_timer", arch_timer_evt); | ||
| 276 | if (err) { | ||
| 277 | pr_err("arch_timer: can't register interrupt %d (%d)\n", | ||
| 278 | arch_timer_ppi2, err); | ||
| 279 | arch_timer_ppi2 = 0; | ||
| 280 | goto out_free_irq; | ||
| 281 | } | ||
| 282 | } | ||
| 283 | |||
| 284 | err = local_timer_register(&arch_timer_ops); | ||
| 285 | if (err) { | ||
| 286 | /* | ||
| 287 | * We couldn't register as a local timer (could be | ||
| 288 | * because we're on a UP platform, or because some | ||
| 289 | * other local timer is already present...). Try as a | ||
| 290 | * global timer instead. | ||
| 291 | */ | ||
| 292 | arch_timer_global_evt.cpumask = cpumask_of(0); | ||
| 293 | err = arch_timer_setup(&arch_timer_global_evt); | ||
| 294 | } | ||
| 295 | |||
| 296 | if (err) | ||
| 297 | goto out_free_irq; | ||
| 298 | |||
| 299 | return 0; | ||
| 300 | |||
| 301 | out_free_irq: | ||
| 302 | free_percpu_irq(arch_timer_ppi, arch_timer_evt); | ||
| 303 | if (arch_timer_ppi2) | ||
| 304 | free_percpu_irq(arch_timer_ppi2, arch_timer_evt); | ||
| 305 | |||
| 306 | out_free: | ||
| 307 | free_percpu(arch_timer_evt); | ||
| 308 | |||
| 309 | return err; | ||
| 310 | } | ||
| 311 | |||
| 312 | static const struct of_device_id arch_timer_of_match[] __initconst = { | ||
| 313 | { .compatible = "arm,armv7-timer", }, | ||
| 314 | {}, | ||
| 315 | }; | ||
| 316 | |||
| 317 | int __init arch_timer_of_register(void) | ||
| 318 | { | ||
| 319 | struct device_node *np; | ||
| 320 | u32 freq; | ||
| 321 | |||
| 322 | np = of_find_matching_node(NULL, arch_timer_of_match); | ||
| 323 | if (!np) { | ||
| 324 | pr_err("arch_timer: can't find DT node\n"); | ||
| 325 | return -ENODEV; | ||
| 326 | } | ||
| 327 | |||
| 328 | /* Try to determine the frequency from the device tree or CNTFRQ */ | ||
| 329 | if (!of_property_read_u32(np, "clock-frequency", &freq)) | ||
| 330 | arch_timer_rate = freq; | ||
| 331 | |||
| 332 | arch_timer_ppi = irq_of_parse_and_map(np, 0); | ||
| 333 | arch_timer_ppi2 = irq_of_parse_and_map(np, 1); | ||
| 334 | pr_info("arch_timer: found %s irqs %d %d\n", | ||
| 335 | np->name, arch_timer_ppi, arch_timer_ppi2); | ||
| 336 | |||
| 337 | return arch_timer_register(); | ||
| 338 | } | ||
| 339 | |||
| 340 | int __init arch_timer_sched_clock_init(void) | ||
| 341 | { | ||
| 342 | int err; | ||
| 343 | |||
| 344 | err = arch_timer_available(); | ||
| 345 | if (err) | ||
| 346 | return err; | ||
| 347 | |||
| 348 | setup_sched_clock(arch_counter_get_cntvct32, 32, arch_timer_rate); | ||
| 349 | return 0; | ||
| 350 | } | ||
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index ede5f7741c42..25552508c3fd 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c | |||
| @@ -374,16 +374,29 @@ EXPORT_SYMBOL(pcibios_fixup_bus); | |||
| 374 | #endif | 374 | #endif |
| 375 | 375 | ||
| 376 | /* | 376 | /* |
| 377 | * Swizzle the device pin each time we cross a bridge. | 377 | * Swizzle the device pin each time we cross a bridge. If a platform does |
| 378 | * This might update pin and returns the slot number. | 378 | * not provide a swizzle function, we perform the standard PCI swizzling. |
| 379 | * | ||
| 380 | * The default swizzling walks up the bus tree one level at a time, applying | ||
| 381 | * the standard swizzle function at each step, stopping when it finds the PCI | ||
| 382 | * root bus. This will return the slot number of the bridge device on the | ||
| 383 | * root bus and the interrupt pin on that device which should correspond | ||
| 384 | * with the downstream device interrupt. | ||
| 385 | * | ||
| 386 | * Platforms may override this, in which case the slot and pin returned | ||
| 387 | * depend entirely on the platform code. However, please note that the | ||
| 388 | * PCI standard swizzle is implemented on plug-in cards and Cardbus based | ||
| 389 | * PCI extenders, so it can not be ignored. | ||
| 379 | */ | 390 | */ |
| 380 | static u8 __devinit pcibios_swizzle(struct pci_dev *dev, u8 *pin) | 391 | static u8 __devinit pcibios_swizzle(struct pci_dev *dev, u8 *pin) |
| 381 | { | 392 | { |
| 382 | struct pci_sys_data *sys = dev->sysdata; | 393 | struct pci_sys_data *sys = dev->sysdata; |
| 383 | int slot = 0, oldpin = *pin; | 394 | int slot, oldpin = *pin; |
| 384 | 395 | ||
| 385 | if (sys->swizzle) | 396 | if (sys->swizzle) |
| 386 | slot = sys->swizzle(dev, pin); | 397 | slot = sys->swizzle(dev, pin); |
| 398 | else | ||
| 399 | slot = pci_common_swizzle(dev, pin); | ||
| 387 | 400 | ||
| 388 | if (debug_pci) | 401 | if (debug_pci) |
| 389 | printk("PCI: %s swizzling pin %d => pin %d slot %d\n", | 402 | printk("PCI: %s swizzling pin %d => pin %d slot %d\n", |
| @@ -410,7 +423,7 @@ static int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 410 | return irq; | 423 | return irq; |
| 411 | } | 424 | } |
| 412 | 425 | ||
| 413 | static void __init pcibios_init_hw(struct hw_pci *hw) | 426 | static void __init pcibios_init_hw(struct hw_pci *hw, struct list_head *head) |
| 414 | { | 427 | { |
| 415 | struct pci_sys_data *sys = NULL; | 428 | struct pci_sys_data *sys = NULL; |
| 416 | int ret; | 429 | int ret; |
| @@ -424,7 +437,6 @@ static void __init pcibios_init_hw(struct hw_pci *hw) | |||
| 424 | #ifdef CONFIG_PCI_DOMAINS | 437 | #ifdef CONFIG_PCI_DOMAINS |
| 425 | sys->domain = hw->domain; | 438 | sys->domain = hw->domain; |
| 426 | #endif | 439 | #endif |
| 427 | sys->hw = hw; | ||
| 428 | sys->busnr = busnr; | 440 | sys->busnr = busnr; |
| 429 | sys->swizzle = hw->swizzle; | 441 | sys->swizzle = hw->swizzle; |
| 430 | sys->map_irq = hw->map_irq; | 442 | sys->map_irq = hw->map_irq; |
| @@ -440,14 +452,18 @@ static void __init pcibios_init_hw(struct hw_pci *hw) | |||
| 440 | &iomem_resource, sys->mem_offset); | 452 | &iomem_resource, sys->mem_offset); |
| 441 | } | 453 | } |
| 442 | 454 | ||
| 443 | sys->bus = hw->scan(nr, sys); | 455 | if (hw->scan) |
| 456 | sys->bus = hw->scan(nr, sys); | ||
| 457 | else | ||
| 458 | sys->bus = pci_scan_root_bus(NULL, sys->busnr, | ||
| 459 | hw->ops, sys, &sys->resources); | ||
| 444 | 460 | ||
| 445 | if (!sys->bus) | 461 | if (!sys->bus) |
| 446 | panic("PCI: unable to scan bus!"); | 462 | panic("PCI: unable to scan bus!"); |
| 447 | 463 | ||
| 448 | busnr = sys->bus->subordinate + 1; | 464 | busnr = sys->bus->subordinate + 1; |
| 449 | 465 | ||
| 450 | list_add(&sys->node, &hw->buses); | 466 | list_add(&sys->node, head); |
| 451 | } else { | 467 | } else { |
| 452 | kfree(sys); | 468 | kfree(sys); |
| 453 | if (ret < 0) | 469 | if (ret < 0) |
| @@ -459,19 +475,18 @@ static void __init pcibios_init_hw(struct hw_pci *hw) | |||
| 459 | void __init pci_common_init(struct hw_pci *hw) | 475 | void __init pci_common_init(struct hw_pci *hw) |
| 460 | { | 476 | { |
| 461 | struct pci_sys_data *sys; | 477 | struct pci_sys_data *sys; |
| 462 | 478 | LIST_HEAD(head); | |
| 463 | INIT_LIST_HEAD(&hw->buses); | ||
| 464 | 479 | ||
| 465 | pci_add_flags(PCI_REASSIGN_ALL_RSRC); | 480 | pci_add_flags(PCI_REASSIGN_ALL_RSRC); |
| 466 | if (hw->preinit) | 481 | if (hw->preinit) |
| 467 | hw->preinit(); | 482 | hw->preinit(); |
| 468 | pcibios_init_hw(hw); | 483 | pcibios_init_hw(hw, &head); |
| 469 | if (hw->postinit) | 484 | if (hw->postinit) |
| 470 | hw->postinit(); | 485 | hw->postinit(); |
| 471 | 486 | ||
| 472 | pci_fixup_irqs(pcibios_swizzle, pcibios_map_irq); | 487 | pci_fixup_irqs(pcibios_swizzle, pcibios_map_irq); |
| 473 | 488 | ||
| 474 | list_for_each_entry(sys, &hw->buses, node) { | 489 | list_for_each_entry(sys, &head, node) { |
| 475 | struct pci_bus *bus = sys->bus; | 490 | struct pci_bus *bus = sys->bus; |
| 476 | 491 | ||
| 477 | if (!pci_has_flag(PCI_PROBE_ONLY)) { | 492 | if (!pci_has_flag(PCI_PROBE_ONLY)) { |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 7fd3ad048da9..437f0c426517 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
| @@ -556,10 +556,6 @@ call_fpe: | |||
| 556 | #endif | 556 | #endif |
| 557 | tst r0, #0x08000000 @ only CDP/CPRT/LDC/STC have bit 27 | 557 | tst r0, #0x08000000 @ only CDP/CPRT/LDC/STC have bit 27 |
| 558 | tstne r0, #0x04000000 @ bit 26 set on both ARM and Thumb-2 | 558 | tstne r0, #0x04000000 @ bit 26 set on both ARM and Thumb-2 |
| 559 | #if defined(CONFIG_CPU_ARM610) || defined(CONFIG_CPU_ARM710) | ||
| 560 | and r8, r0, #0x0f000000 @ mask out op-code bits | ||
| 561 | teqne r8, #0x0f000000 @ SWI (ARM6/7 bug)? | ||
| 562 | #endif | ||
| 563 | moveq pc, lr | 559 | moveq pc, lr |
| 564 | get_thread_info r10 @ get current thread | 560 | get_thread_info r10 @ get current thread |
| 565 | and r8, r0, #0x00000f00 @ mask out CP number | 561 | and r8, r0, #0x00000f00 @ mask out CP number |
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 54ee265dd819..7bd2d3cb8957 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
| @@ -335,20 +335,6 @@ ENDPROC(ftrace_stub) | |||
| 335 | *----------------------------------------------------------------------------- | 335 | *----------------------------------------------------------------------------- |
| 336 | */ | 336 | */ |
| 337 | 337 | ||
| 338 | /* If we're optimising for StrongARM the resulting code won't | ||
| 339 | run on an ARM7 and we can save a couple of instructions. | ||
| 340 | --pb */ | ||
| 341 | #ifdef CONFIG_CPU_ARM710 | ||
| 342 | #define A710(code...) code | ||
| 343 | .Larm710bug: | ||
| 344 | ldmia sp, {r0 - lr}^ @ Get calling r0 - lr | ||
| 345 | mov r0, r0 | ||
| 346 | add sp, sp, #S_FRAME_SIZE | ||
| 347 | subs pc, lr, #4 | ||
| 348 | #else | ||
| 349 | #define A710(code...) | ||
| 350 | #endif | ||
| 351 | |||
| 352 | .align 5 | 338 | .align 5 |
| 353 | ENTRY(vector_swi) | 339 | ENTRY(vector_swi) |
| 354 | sub sp, sp, #S_FRAME_SIZE | 340 | sub sp, sp, #S_FRAME_SIZE |
| @@ -379,9 +365,6 @@ ENTRY(vector_swi) | |||
| 379 | ldreq r10, [lr, #-4] @ get SWI instruction | 365 | ldreq r10, [lr, #-4] @ get SWI instruction |
| 380 | #else | 366 | #else |
| 381 | ldr r10, [lr, #-4] @ get SWI instruction | 367 | ldr r10, [lr, #-4] @ get SWI instruction |
| 382 | A710( and ip, r10, #0x0f000000 @ check for SWI ) | ||
| 383 | A710( teq ip, #0x0f000000 ) | ||
| 384 | A710( bne .Larm710bug ) | ||
| 385 | #endif | 368 | #endif |
| 386 | #ifdef CONFIG_CPU_ENDIAN_BE8 | 369 | #ifdef CONFIG_CPU_ENDIAN_BE8 |
| 387 | rev r10, r10 @ little endian instruction | 370 | rev r10, r10 @ little endian instruction |
| @@ -392,26 +375,15 @@ ENTRY(vector_swi) | |||
| 392 | /* | 375 | /* |
| 393 | * Pure EABI user space always put syscall number into scno (r7). | 376 | * Pure EABI user space always put syscall number into scno (r7). |
| 394 | */ | 377 | */ |
| 395 | A710( ldr ip, [lr, #-4] @ get SWI instruction ) | ||
| 396 | A710( and ip, ip, #0x0f000000 @ check for SWI ) | ||
| 397 | A710( teq ip, #0x0f000000 ) | ||
| 398 | A710( bne .Larm710bug ) | ||
| 399 | |||
| 400 | #elif defined(CONFIG_ARM_THUMB) | 378 | #elif defined(CONFIG_ARM_THUMB) |
| 401 | |||
| 402 | /* Legacy ABI only, possibly thumb mode. */ | 379 | /* Legacy ABI only, possibly thumb mode. */ |
| 403 | tst r8, #PSR_T_BIT @ this is SPSR from save_user_regs | 380 | tst r8, #PSR_T_BIT @ this is SPSR from save_user_regs |
| 404 | addne scno, r7, #__NR_SYSCALL_BASE @ put OS number in | 381 | addne scno, r7, #__NR_SYSCALL_BASE @ put OS number in |
| 405 | ldreq scno, [lr, #-4] | 382 | ldreq scno, [lr, #-4] |
| 406 | 383 | ||
| 407 | #else | 384 | #else |
| 408 | |||
| 409 | /* Legacy ABI only. */ | 385 | /* Legacy ABI only. */ |
| 410 | ldr scno, [lr, #-4] @ get SWI instruction | 386 | ldr scno, [lr, #-4] @ get SWI instruction |
| 411 | A710( and ip, scno, #0x0f000000 @ check for SWI ) | ||
| 412 | A710( teq ip, #0x0f000000 ) | ||
| 413 | A710( bne .Larm710bug ) | ||
| 414 | |||
| 415 | #endif | 387 | #endif |
| 416 | 388 | ||
| 417 | #ifdef CONFIG_ALIGNMENT_TRAP | 389 | #ifdef CONFIG_ALIGNMENT_TRAP |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 3bf0c7f8b043..835898e7d704 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
| @@ -277,10 +277,6 @@ __create_page_tables: | |||
| 277 | mov r3, r3, lsl #PMD_ORDER | 277 | mov r3, r3, lsl #PMD_ORDER |
| 278 | 278 | ||
| 279 | add r0, r4, r3 | 279 | add r0, r4, r3 |
| 280 | rsb r3, r3, #0x4000 @ PTRS_PER_PGD*sizeof(long) | ||
| 281 | cmp r3, #0x0800 @ limit to 512MB | ||
| 282 | movhi r3, #0x0800 | ||
| 283 | add r6, r0, r3 | ||
| 284 | mov r3, r7, lsr #SECTION_SHIFT | 280 | mov r3, r7, lsr #SECTION_SHIFT |
| 285 | ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags | 281 | ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags |
| 286 | orr r3, r7, r3, lsl #SECTION_SHIFT | 282 | orr r3, r7, r3, lsl #SECTION_SHIFT |
| @@ -289,13 +285,10 @@ __create_page_tables: | |||
| 289 | #else | 285 | #else |
| 290 | orr r3, r3, #PMD_SECT_XN | 286 | orr r3, r3, #PMD_SECT_XN |
| 291 | #endif | 287 | #endif |
| 292 | 1: str r3, [r0], #4 | 288 | str r3, [r0], #4 |
| 293 | #ifdef CONFIG_ARM_LPAE | 289 | #ifdef CONFIG_ARM_LPAE |
| 294 | str r7, [r0], #4 | 290 | str r7, [r0], #4 |
| 295 | #endif | 291 | #endif |
| 296 | add r3, r3, #1 << SECTION_SHIFT | ||
| 297 | cmp r0, r6 | ||
| 298 | blo 1b | ||
| 299 | 292 | ||
| 300 | #else /* CONFIG_DEBUG_ICEDCC || CONFIG_DEBUG_SEMIHOSTING */ | 293 | #else /* CONFIG_DEBUG_ICEDCC || CONFIG_DEBUG_SEMIHOSTING */ |
| 301 | /* we don't need any serial debugging mappings */ | 294 | /* we don't need any serial debugging mappings */ |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 9650c143afc1..14e38261cd31 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <linux/hw_breakpoint.h> | 24 | #include <linux/hw_breakpoint.h> |
| 25 | #include <linux/regset.h> | 25 | #include <linux/regset.h> |
| 26 | #include <linux/audit.h> | 26 | #include <linux/audit.h> |
| 27 | #include <linux/tracehook.h> | ||
| 27 | 28 | ||
| 28 | #include <asm/pgtable.h> | 29 | #include <asm/pgtable.h> |
| 29 | #include <asm/traps.h> | 30 | #include <asm/traps.h> |
| @@ -918,8 +919,6 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) | |||
| 918 | 919 | ||
| 919 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | 920 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) |
| 920 | return scno; | 921 | return scno; |
| 921 | if (!(current->ptrace & PT_PTRACED)) | ||
| 922 | return scno; | ||
| 923 | 922 | ||
| 924 | current_thread_info()->syscall = scno; | 923 | current_thread_info()->syscall = scno; |
| 925 | 924 | ||
| @@ -930,19 +929,11 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) | |||
| 930 | ip = regs->ARM_ip; | 929 | ip = regs->ARM_ip; |
| 931 | regs->ARM_ip = why; | 930 | regs->ARM_ip = why; |
| 932 | 931 | ||
| 933 | /* the 0x80 provides a way for the tracing parent to distinguish | 932 | if (why) |
| 934 | between a syscall stop and SIGTRAP delivery */ | 933 | tracehook_report_syscall_exit(regs, 0); |
| 935 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) | 934 | else if (tracehook_report_syscall_entry(regs)) |
| 936 | ? 0x80 : 0)); | 935 | current_thread_info()->syscall = -1; |
| 937 | /* | 936 | |
| 938 | * this isn't the same as continuing with a signal, but it will do | ||
| 939 | * for normal use. strace only continues with a signal if the | ||
| 940 | * stopping signal is not SIGTRAP. -brl | ||
| 941 | */ | ||
| 942 | if (current->exit_code) { | ||
| 943 | send_sig(current->exit_code, current, 1); | ||
| 944 | current->exit_code = 0; | ||
| 945 | } | ||
| 946 | regs->ARM_ip = ip; | 937 | regs->ARM_ip = ip; |
| 947 | 938 | ||
| 948 | return current_thread_info()->syscall; | 939 | return current_thread_info()->syscall; |
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index d68d1b694680..73d9a420850d 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
| @@ -589,6 +589,8 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, | |||
| 589 | */ | 589 | */ |
| 590 | block_sigmask(ka, sig); | 590 | block_sigmask(ka, sig); |
| 591 | 591 | ||
| 592 | tracehook_signal_handler(sig, info, ka, regs, 0); | ||
| 593 | |||
| 592 | return 0; | 594 | return 0; |
| 593 | } | 595 | } |
| 594 | 596 | ||
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 8f4644659777..cf58558ef4b9 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
| @@ -454,6 +454,9 @@ static struct local_timer_ops *lt_ops; | |||
| 454 | #ifdef CONFIG_LOCAL_TIMERS | 454 | #ifdef CONFIG_LOCAL_TIMERS |
| 455 | int local_timer_register(struct local_timer_ops *ops) | 455 | int local_timer_register(struct local_timer_ops *ops) |
| 456 | { | 456 | { |
| 457 | if (!is_smp() || !setup_max_cpus) | ||
| 458 | return -ENXIO; | ||
| 459 | |||
| 457 | if (lt_ops) | 460 | if (lt_ops) |
| 458 | return -EBUSY; | 461 | return -EBUSY; |
| 459 | 462 | ||
diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c index 8f5dd7963356..b9f015e843d8 100644 --- a/arch/arm/kernel/smp_scu.c +++ b/arch/arm/kernel/smp_scu.c | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
| 12 | #include <linux/io.h> | 12 | #include <linux/io.h> |
| 13 | 13 | ||
| 14 | #include <asm/smp_plat.h> | ||
| 14 | #include <asm/smp_scu.h> | 15 | #include <asm/smp_scu.h> |
| 15 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
| 16 | #include <asm/cputype.h> | 17 | #include <asm/cputype.h> |
| @@ -74,7 +75,7 @@ void scu_enable(void __iomem *scu_base) | |||
| 74 | int scu_power_mode(void __iomem *scu_base, unsigned int mode) | 75 | int scu_power_mode(void __iomem *scu_base, unsigned int mode) |
| 75 | { | 76 | { |
| 76 | unsigned int val; | 77 | unsigned int val; |
| 77 | int cpu = smp_processor_id(); | 78 | int cpu = cpu_logical_map(smp_processor_id()); |
| 78 | 79 | ||
| 79 | if (mode > 3 || mode == 1 || cpu > 3) | 80 | if (mode > 3 || mode == 1 || cpu > 3) |
| 80 | return -EINVAL; | 81 | return -EINVAL; |
diff --git a/arch/arm/kernel/thumbee.c b/arch/arm/kernel/thumbee.c index aab899764053..7b8403b76666 100644 --- a/arch/arm/kernel/thumbee.c +++ b/arch/arm/kernel/thumbee.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
| 21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
| 22 | 22 | ||
| 23 | #include <asm/cputype.h> | ||
| 23 | #include <asm/system_info.h> | 24 | #include <asm/system_info.h> |
| 24 | #include <asm/thread_notify.h> | 25 | #include <asm/thread_notify.h> |
| 25 | 26 | ||
| @@ -67,8 +68,7 @@ static int __init thumbee_init(void) | |||
| 67 | if (cpu_arch < CPU_ARCH_ARMv7) | 68 | if (cpu_arch < CPU_ARCH_ARMv7) |
| 68 | return 0; | 69 | return 0; |
| 69 | 70 | ||
| 70 | /* processor feature register 0 */ | 71 | pfr0 = read_cpuid_ext(CPUID_EXT_PFR0); |
| 71 | asm("mrc p15, 0, %0, c0, c1, 0\n" : "=r" (pfr0)); | ||
| 72 | if ((pfr0 & 0x0000f000) != 0x00001000) | 72 | if ((pfr0 & 0x0000f000) != 0x00001000) |
| 73 | return 0; | 73 | return 0; |
| 74 | 74 | ||
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index fe31b22f18fd..af2afb019672 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
| @@ -110,6 +110,42 @@ void timer_tick(void) | |||
| 110 | } | 110 | } |
| 111 | #endif | 111 | #endif |
| 112 | 112 | ||
| 113 | static void dummy_clock_access(struct timespec *ts) | ||
| 114 | { | ||
| 115 | ts->tv_sec = 0; | ||
| 116 | ts->tv_nsec = 0; | ||
| 117 | } | ||
| 118 | |||
| 119 | static clock_access_fn __read_persistent_clock = dummy_clock_access; | ||
| 120 | static clock_access_fn __read_boot_clock = dummy_clock_access;; | ||
| 121 | |||
| 122 | void read_persistent_clock(struct timespec *ts) | ||
| 123 | { | ||
| 124 | __read_persistent_clock(ts); | ||
| 125 | } | ||
| 126 | |||
| 127 | void read_boot_clock(struct timespec *ts) | ||
| 128 | { | ||
| 129 | __read_boot_clock(ts); | ||
| 130 | } | ||
| 131 | |||
| 132 | int __init register_persistent_clock(clock_access_fn read_boot, | ||
| 133 | clock_access_fn read_persistent) | ||
| 134 | { | ||
| 135 | /* Only allow the clockaccess functions to be registered once */ | ||
| 136 | if (__read_persistent_clock == dummy_clock_access && | ||
| 137 | __read_boot_clock == dummy_clock_access) { | ||
| 138 | if (read_boot) | ||
| 139 | __read_boot_clock = read_boot; | ||
| 140 | if (read_persistent) | ||
| 141 | __read_persistent_clock = read_persistent; | ||
| 142 | |||
| 143 | return 0; | ||
| 144 | } | ||
| 145 | |||
| 146 | return -EINVAL; | ||
| 147 | } | ||
| 148 | |||
| 113 | #if defined(CONFIG_PM) && !defined(CONFIG_GENERIC_CLOCKEVENTS) | 149 | #if defined(CONFIG_PM) && !defined(CONFIG_GENERIC_CLOCKEVENTS) |
| 114 | static int timer_suspend(void) | 150 | static int timer_suspend(void) |
| 115 | { | 151 | { |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 778454750a6c..3647170e9a16 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
| @@ -479,14 +479,14 @@ static int bad_syscall(int n, struct pt_regs *regs) | |||
| 479 | return regs->ARM_r0; | 479 | return regs->ARM_r0; |
| 480 | } | 480 | } |
| 481 | 481 | ||
| 482 | static inline void | 482 | static inline int |
| 483 | do_cache_op(unsigned long start, unsigned long end, int flags) | 483 | do_cache_op(unsigned long start, unsigned long end, int flags) |
| 484 | { | 484 | { |
| 485 | struct mm_struct *mm = current->active_mm; | 485 | struct mm_struct *mm = current->active_mm; |
| 486 | struct vm_area_struct *vma; | 486 | struct vm_area_struct *vma; |
| 487 | 487 | ||
| 488 | if (end < start || flags) | 488 | if (end < start || flags) |
| 489 | return; | 489 | return -EINVAL; |
| 490 | 490 | ||
| 491 | down_read(&mm->mmap_sem); | 491 | down_read(&mm->mmap_sem); |
| 492 | vma = find_vma(mm, start); | 492 | vma = find_vma(mm, start); |
| @@ -496,9 +496,11 @@ do_cache_op(unsigned long start, unsigned long end, int flags) | |||
| 496 | if (end > vma->vm_end) | 496 | if (end > vma->vm_end) |
| 497 | end = vma->vm_end; | 497 | end = vma->vm_end; |
| 498 | 498 | ||
| 499 | flush_cache_user_range(vma, start, end); | 499 | up_read(&mm->mmap_sem); |
| 500 | return flush_cache_user_range(start, end); | ||
| 500 | } | 501 | } |
| 501 | up_read(&mm->mmap_sem); | 502 | up_read(&mm->mmap_sem); |
| 503 | return -EINVAL; | ||
| 502 | } | 504 | } |
| 503 | 505 | ||
| 504 | /* | 506 | /* |
| @@ -544,8 +546,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) | |||
| 544 | * the specified region). | 546 | * the specified region). |
| 545 | */ | 547 | */ |
| 546 | case NR(cacheflush): | 548 | case NR(cacheflush): |
| 547 | do_cache_op(regs->ARM_r0, regs->ARM_r1, regs->ARM_r2); | 549 | return do_cache_op(regs->ARM_r0, regs->ARM_r1, regs->ARM_r2); |
| 548 | return 0; | ||
| 549 | 550 | ||
| 550 | case NR(usr26): | 551 | case NR(usr26): |
| 551 | if (!(elf_hwcap & HWCAP_26BIT)) | 552 | if (!(elf_hwcap & HWCAP_26BIT)) |
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 0ade0acc1ed9..992769ae2599 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile | |||
| @@ -17,30 +17,13 @@ lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \ | |||
| 17 | call_with_stack.o | 17 | call_with_stack.o |
| 18 | 18 | ||
| 19 | mmu-y := clear_user.o copy_page.o getuser.o putuser.o | 19 | mmu-y := clear_user.o copy_page.o getuser.o putuser.o |
| 20 | 20 | mmu-y += copy_from_user.o copy_to_user.o | |
| 21 | # the code in uaccess.S is not preemption safe and | ||
| 22 | # probably faster on ARMv3 only | ||
| 23 | ifeq ($(CONFIG_PREEMPT),y) | ||
| 24 | mmu-y += copy_from_user.o copy_to_user.o | ||
| 25 | else | ||
| 26 | ifneq ($(CONFIG_CPU_32v3),y) | ||
| 27 | mmu-y += copy_from_user.o copy_to_user.o | ||
| 28 | else | ||
| 29 | mmu-y += uaccess.o | ||
| 30 | endif | ||
| 31 | endif | ||
| 32 | 21 | ||
| 33 | # using lib_ here won't override already available weak symbols | 22 | # using lib_ here won't override already available weak symbols |
| 34 | obj-$(CONFIG_UACCESS_WITH_MEMCPY) += uaccess_with_memcpy.o | 23 | obj-$(CONFIG_UACCESS_WITH_MEMCPY) += uaccess_with_memcpy.o |
| 35 | 24 | ||
| 36 | lib-$(CONFIG_MMU) += $(mmu-y) | 25 | lib-$(CONFIG_MMU) += $(mmu-y) |
| 37 | 26 | lib-y += io-readsw-armv4.o io-writesw-armv4.o | |
| 38 | ifeq ($(CONFIG_CPU_32v3),y) | ||
| 39 | lib-y += io-readsw-armv3.o io-writesw-armv3.o | ||
| 40 | else | ||
| 41 | lib-y += io-readsw-armv4.o io-writesw-armv4.o | ||
| 42 | endif | ||
| 43 | |||
| 44 | lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o | 27 | lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o |
| 45 | lib-$(CONFIG_ARCH_SHARK) += io-shark.o | 28 | lib-$(CONFIG_ARCH_SHARK) += io-shark.o |
| 46 | 29 | ||
diff --git a/arch/arm/lib/io-readsw-armv3.S b/arch/arm/lib/io-readsw-armv3.S deleted file mode 100644 index 88487c8c4f23..000000000000 --- a/arch/arm/lib/io-readsw-armv3.S +++ /dev/null | |||
| @@ -1,106 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/lib/io-readsw-armv3.S | ||
| 3 | * | ||
| 4 | * Copyright (C) 1995-2000 Russell King | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | #include <linux/linkage.h> | ||
| 11 | #include <asm/assembler.h> | ||
| 12 | |||
| 13 | .Linsw_bad_alignment: | ||
| 14 | adr r0, .Linsw_bad_align_msg | ||
| 15 | mov r2, lr | ||
| 16 | b panic | ||
| 17 | .Linsw_bad_align_msg: | ||
| 18 | .asciz "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n" | ||
| 19 | .align | ||
| 20 | |||
| 21 | .Linsw_align: tst r1, #1 | ||
| 22 | bne .Linsw_bad_alignment | ||
| 23 | |||
| 24 | ldr r3, [r0] | ||
| 25 | strb r3, [r1], #1 | ||
| 26 | mov r3, r3, lsr #8 | ||
| 27 | strb r3, [r1], #1 | ||
| 28 | |||
| 29 | subs r2, r2, #1 | ||
| 30 | moveq pc, lr | ||
| 31 | |||
| 32 | ENTRY(__raw_readsw) | ||
| 33 | teq r2, #0 @ do we have to check for the zero len? | ||
| 34 | moveq pc, lr | ||
| 35 | tst r1, #3 | ||
| 36 | bne .Linsw_align | ||
| 37 | |||
| 38 | .Linsw_aligned: mov ip, #0xff | ||
| 39 | orr ip, ip, ip, lsl #8 | ||
| 40 | stmfd sp!, {r4, r5, r6, lr} | ||
| 41 | |||
| 42 | subs r2, r2, #8 | ||
| 43 | bmi .Lno_insw_8 | ||
| 44 | |||
| 45 | .Linsw_8_lp: ldr r3, [r0] | ||
| 46 | and r3, r3, ip | ||
| 47 | ldr r4, [r0] | ||
| 48 | orr r3, r3, r4, lsl #16 | ||
| 49 | |||
| 50 | ldr r4, [r0] | ||
| 51 | and r4, r4, ip | ||
| 52 | ldr r5, [r0] | ||
| 53 | orr r4, r4, r5, lsl #16 | ||
| 54 | |||
| 55 | ldr r5, [r0] | ||
| 56 | and r5, r5, ip | ||
| 57 | ldr r6, [r0] | ||
| 58 | orr r5, r5, r6, lsl #16 | ||
| 59 | |||
| 60 | ldr r6, [r0] | ||
| 61 | and r6, r6, ip | ||
| 62 | ldr lr, [r0] | ||
| 63 | orr r6, r6, lr, lsl #16 | ||
| 64 | |||
| 65 | stmia r1!, {r3 - r6} | ||
| 66 | |||
| 67 | subs r2, r2, #8 | ||
| 68 | bpl .Linsw_8_lp | ||
| 69 | |||
| 70 | tst r2, #7 | ||
| 71 | ldmeqfd sp!, {r4, r5, r6, pc} | ||
| 72 | |||
| 73 | .Lno_insw_8: tst r2, #4 | ||
| 74 | beq .Lno_insw_4 | ||
| 75 | |||
| 76 | ldr r3, [r0] | ||
| 77 | and r3, r3, ip | ||
| 78 | ldr r4, [r0] | ||
| 79 | orr r3, r3, r4, lsl #16 | ||
| 80 | |||
| 81 | ldr r4, [r0] | ||
| 82 | and r4, r4, ip | ||
| 83 | ldr r5, [r0] | ||
| 84 | orr r4, r4, r5, lsl #16 | ||
| 85 | |||
| 86 | stmia r1!, {r3, r4} | ||
| 87 | |||
| 88 | .Lno_insw_4: tst r2, #2 | ||
| 89 | beq .Lno_insw_2 | ||
| 90 | |||
| 91 | ldr r3, [r0] | ||
| 92 | and r3, r3, ip | ||
| 93 | ldr r4, [r0] | ||
| 94 | orr r3, r3, r4, lsl #16 | ||
| 95 | |||
| 96 | str r3, [r1], #4 | ||
| 97 | |||
| 98 | .Lno_insw_2: tst r2, #1 | ||
| 99 | ldrne r3, [r0] | ||
| 100 | strneb r3, [r1], #1 | ||
| 101 | movne r3, r3, lsr #8 | ||
| 102 | strneb r3, [r1] | ||
| 103 | |||
| 104 | ldmfd sp!, {r4, r5, r6, pc} | ||
| 105 | |||
| 106 | |||
diff --git a/arch/arm/lib/io-writesw-armv3.S b/arch/arm/lib/io-writesw-armv3.S deleted file mode 100644 index 49b800419e32..000000000000 --- a/arch/arm/lib/io-writesw-armv3.S +++ /dev/null | |||
| @@ -1,126 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/lib/io-writesw-armv3.S | ||
| 3 | * | ||
| 4 | * Copyright (C) 1995-2000 Russell King | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | #include <linux/linkage.h> | ||
| 11 | #include <asm/assembler.h> | ||
| 12 | |||
| 13 | .Loutsw_bad_alignment: | ||
| 14 | adr r0, .Loutsw_bad_align_msg | ||
| 15 | mov r2, lr | ||
| 16 | b panic | ||
| 17 | .Loutsw_bad_align_msg: | ||
| 18 | .asciz "outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n" | ||
| 19 | .align | ||
| 20 | |||
| 21 | .Loutsw_align: tst r1, #1 | ||
| 22 | bne .Loutsw_bad_alignment | ||
| 23 | |||
| 24 | add r1, r1, #2 | ||
| 25 | |||
| 26 | ldr r3, [r1, #-4] | ||
| 27 | mov r3, r3, lsr #16 | ||
| 28 | orr r3, r3, r3, lsl #16 | ||
| 29 | str r3, [r0] | ||
| 30 | subs r2, r2, #1 | ||
| 31 | moveq pc, lr | ||
| 32 | |||
| 33 | ENTRY(__raw_writesw) | ||
| 34 | teq r2, #0 @ do we have to check for the zero len? | ||
| 35 | moveq pc, lr | ||
| 36 | tst r1, #3 | ||
| 37 | bne .Loutsw_align | ||
| 38 | |||
| 39 | stmfd sp!, {r4, r5, r6, lr} | ||
| 40 | |||
| 41 | subs r2, r2, #8 | ||
| 42 | bmi .Lno_outsw_8 | ||
| 43 | |||
| 44 | .Loutsw_8_lp: ldmia r1!, {r3, r4, r5, r6} | ||
| 45 | |||
| 46 | mov ip, r3, lsl #16 | ||
| 47 | orr ip, ip, ip, lsr #16 | ||
| 48 | str ip, [r0] | ||
| 49 | |||
| 50 | mov ip, r3, lsr #16 | ||
| 51 | orr ip, ip, ip, lsl #16 | ||
| 52 | str ip, [r0] | ||
| 53 | |||
| 54 | mov ip, r4, lsl #16 | ||
| 55 | orr ip, ip, ip, lsr #16 | ||
| 56 | str ip, [r0] | ||
| 57 | |||
| 58 | mov ip, r4, lsr #16 | ||
| 59 | orr ip, ip, ip, lsl #16 | ||
| 60 | str ip, [r0] | ||
| 61 | |||
| 62 | mov ip, r5, lsl #16 | ||
| 63 | orr ip, ip, ip, lsr #16 | ||
| 64 | str ip, [r0] | ||
| 65 | |||
| 66 | mov ip, r5, lsr #16 | ||
| 67 | orr ip, ip, ip, lsl #16 | ||
| 68 | str ip, [r0] | ||
| 69 | |||
| 70 | mov ip, r6, lsl #16 | ||
| 71 | orr ip, ip, ip, lsr #16 | ||
| 72 | str ip, [r0] | ||
| 73 | |||
| 74 | mov ip, r6, lsr #16 | ||
| 75 | orr ip, ip, ip, lsl #16 | ||
| 76 | str ip, [r0] | ||
| 77 | |||
| 78 | subs r2, r2, #8 | ||
| 79 | bpl .Loutsw_8_lp | ||
| 80 | |||
| 81 | tst r2, #7 | ||
| 82 | ldmeqfd sp!, {r4, r5, r6, pc} | ||
| 83 | |||
| 84 | .Lno_outsw_8: tst r2, #4 | ||
| 85 | beq .Lno_outsw_4 | ||
| 86 | |||
| 87 | ldmia r1!, {r3, r4} | ||
| 88 | |||
| 89 | mov ip, r3, lsl #16 | ||
| 90 | orr ip, ip, ip, lsr #16 | ||
| 91 | str ip, [r0] | ||
| 92 | |||
| 93 | mov ip, r3, lsr #16 | ||
| 94 | orr ip, ip, ip, lsl #16 | ||
| 95 | str ip, [r0] | ||
| 96 | |||
| 97 | mov ip, r4, lsl #16 | ||
| 98 | orr ip, ip, ip, lsr #16 | ||
| 99 | str ip, [r0] | ||
| 100 | |||
| 101 | mov ip, r4, lsr #16 | ||
| 102 | orr ip, ip, ip, lsl #16 | ||
| 103 | str ip, [r0] | ||
| 104 | |||
| 105 | .Lno_outsw_4: tst r2, #2 | ||
| 106 | beq .Lno_outsw_2 | ||
| 107 | |||
| 108 | ldr r3, [r1], #4 | ||
| 109 | |||
| 110 | mov ip, r3, lsl #16 | ||
| 111 | orr ip, ip, ip, lsr #16 | ||
| 112 | str ip, [r0] | ||
| 113 | |||
| 114 | mov ip, r3, lsr #16 | ||
| 115 | orr ip, ip, ip, lsl #16 | ||
| 116 | str ip, [r0] | ||
| 117 | |||
| 118 | .Lno_outsw_2: tst r2, #1 | ||
| 119 | |||
| 120 | ldrne r3, [r1] | ||
| 121 | |||
| 122 | movne ip, r3, lsl #16 | ||
| 123 | orrne ip, ip, ip, lsr #16 | ||
| 124 | strne ip, [r0] | ||
| 125 | |||
| 126 | ldmfd sp!, {r4, r5, r6, pc} | ||
diff --git a/arch/arm/lib/uaccess.S b/arch/arm/lib/uaccess.S deleted file mode 100644 index 5c908b1cb8ed..000000000000 --- a/arch/arm/lib/uaccess.S +++ /dev/null | |||
| @@ -1,564 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/lib/uaccess.S | ||
| 3 | * | ||
| 4 | * Copyright (C) 1995, 1996,1997,1998 Russell King | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * Routines to block copy data to/from user memory | ||
| 11 | * These are highly optimised both for the 4k page size | ||
| 12 | * and for various alignments. | ||
| 13 | */ | ||
| 14 | #include <linux/linkage.h> | ||
| 15 | #include <asm/assembler.h> | ||
| 16 | #include <asm/errno.h> | ||
| 17 | #include <asm/domain.h> | ||
| 18 | |||
| 19 | .text | ||
| 20 | |||
| 21 | #define PAGE_SHIFT 12 | ||
| 22 | |||
| 23 | /* Prototype: int __copy_to_user(void *to, const char *from, size_t n) | ||
| 24 | * Purpose : copy a block to user memory from kernel memory | ||
| 25 | * Params : to - user memory | ||
| 26 | * : from - kernel memory | ||
| 27 | * : n - number of bytes to copy | ||
| 28 | * Returns : Number of bytes NOT copied. | ||
| 29 | */ | ||
| 30 | |||
| 31 | .Lc2u_dest_not_aligned: | ||
| 32 | rsb ip, ip, #4 | ||
| 33 | cmp ip, #2 | ||
| 34 | ldrb r3, [r1], #1 | ||
| 35 | USER( TUSER( strb) r3, [r0], #1) @ May fault | ||
| 36 | ldrgeb r3, [r1], #1 | ||
| 37 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault | ||
| 38 | ldrgtb r3, [r1], #1 | ||
| 39 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault | ||
| 40 | sub r2, r2, ip | ||
| 41 | b .Lc2u_dest_aligned | ||
| 42 | |||
| 43 | ENTRY(__copy_to_user) | ||
| 44 | stmfd sp!, {r2, r4 - r7, lr} | ||
| 45 | cmp r2, #4 | ||
| 46 | blt .Lc2u_not_enough | ||
| 47 | ands ip, r0, #3 | ||
| 48 | bne .Lc2u_dest_not_aligned | ||
| 49 | .Lc2u_dest_aligned: | ||
| 50 | |||
| 51 | ands ip, r1, #3 | ||
| 52 | bne .Lc2u_src_not_aligned | ||
| 53 | /* | ||
| 54 | * Seeing as there has to be at least 8 bytes to copy, we can | ||
| 55 | * copy one word, and force a user-mode page fault... | ||
| 56 | */ | ||
| 57 | |||
| 58 | .Lc2u_0fupi: subs r2, r2, #4 | ||
| 59 | addmi ip, r2, #4 | ||
| 60 | bmi .Lc2u_0nowords | ||
| 61 | ldr r3, [r1], #4 | ||
| 62 | USER( TUSER( str) r3, [r0], #4) @ May fault | ||
| 63 | mov ip, r0, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction | ||
| 64 | rsb ip, ip, #0 | ||
| 65 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
| 66 | beq .Lc2u_0fupi | ||
| 67 | /* | ||
| 68 | * ip = max no. of bytes to copy before needing another "strt" insn | ||
| 69 | */ | ||
| 70 | cmp r2, ip | ||
| 71 | movlt ip, r2 | ||
| 72 | sub r2, r2, ip | ||
| 73 | subs ip, ip, #32 | ||
| 74 | blt .Lc2u_0rem8lp | ||
| 75 | |||
| 76 | .Lc2u_0cpy8lp: ldmia r1!, {r3 - r6} | ||
| 77 | stmia r0!, {r3 - r6} @ Shouldnt fault | ||
| 78 | ldmia r1!, {r3 - r6} | ||
| 79 | subs ip, ip, #32 | ||
| 80 | stmia r0!, {r3 - r6} @ Shouldnt fault | ||
| 81 | bpl .Lc2u_0cpy8lp | ||
| 82 | |||
| 83 | .Lc2u_0rem8lp: cmn ip, #16 | ||
| 84 | ldmgeia r1!, {r3 - r6} | ||
| 85 | stmgeia r0!, {r3 - r6} @ Shouldnt fault | ||
| 86 | tst ip, #8 | ||
| 87 | ldmneia r1!, {r3 - r4} | ||
| 88 | stmneia r0!, {r3 - r4} @ Shouldnt fault | ||
| 89 | tst ip, #4 | ||
| 90 | ldrne r3, [r1], #4 | ||
| 91 | TUSER( strne) r3, [r0], #4 @ Shouldnt fault | ||
| 92 | ands ip, ip, #3 | ||
| 93 | beq .Lc2u_0fupi | ||
| 94 | .Lc2u_0nowords: teq ip, #0 | ||
| 95 | beq .Lc2u_finished | ||
| 96 | .Lc2u_nowords: cmp ip, #2 | ||
| 97 | ldrb r3, [r1], #1 | ||
| 98 | USER( TUSER( strb) r3, [r0], #1) @ May fault | ||
| 99 | ldrgeb r3, [r1], #1 | ||
| 100 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault | ||
| 101 | ldrgtb r3, [r1], #1 | ||
| 102 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault | ||
| 103 | b .Lc2u_finished | ||
| 104 | |||
| 105 | .Lc2u_not_enough: | ||
| 106 | movs ip, r2 | ||
| 107 | bne .Lc2u_nowords | ||
| 108 | .Lc2u_finished: mov r0, #0 | ||
| 109 | ldmfd sp!, {r2, r4 - r7, pc} | ||
| 110 | |||
| 111 | .Lc2u_src_not_aligned: | ||
| 112 | bic r1, r1, #3 | ||
| 113 | ldr r7, [r1], #4 | ||
| 114 | cmp ip, #2 | ||
| 115 | bgt .Lc2u_3fupi | ||
| 116 | beq .Lc2u_2fupi | ||
| 117 | .Lc2u_1fupi: subs r2, r2, #4 | ||
| 118 | addmi ip, r2, #4 | ||
| 119 | bmi .Lc2u_1nowords | ||
| 120 | mov r3, r7, pull #8 | ||
| 121 | ldr r7, [r1], #4 | ||
| 122 | orr r3, r3, r7, push #24 | ||
| 123 | USER( TUSER( str) r3, [r0], #4) @ May fault | ||
| 124 | mov ip, r0, lsl #32 - PAGE_SHIFT | ||
| 125 | rsb ip, ip, #0 | ||
| 126 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
| 127 | beq .Lc2u_1fupi | ||
| 128 | cmp r2, ip | ||
| 129 | movlt ip, r2 | ||
| 130 | sub r2, r2, ip | ||
| 131 | subs ip, ip, #16 | ||
| 132 | blt .Lc2u_1rem8lp | ||
| 133 | |||
| 134 | .Lc2u_1cpy8lp: mov r3, r7, pull #8 | ||
| 135 | ldmia r1!, {r4 - r7} | ||
| 136 | subs ip, ip, #16 | ||
| 137 | orr r3, r3, r4, push #24 | ||
| 138 | mov r4, r4, pull #8 | ||
| 139 | orr r4, r4, r5, push #24 | ||
| 140 | mov r5, r5, pull #8 | ||
| 141 | orr r5, r5, r6, push #24 | ||
| 142 | mov r6, r6, pull #8 | ||
| 143 | orr r6, r6, r7, push #24 | ||
| 144 | stmia r0!, {r3 - r6} @ Shouldnt fault | ||
| 145 | bpl .Lc2u_1cpy8lp | ||
| 146 | |||
| 147 | .Lc2u_1rem8lp: tst ip, #8 | ||
| 148 | movne r3, r7, pull #8 | ||
| 149 | ldmneia r1!, {r4, r7} | ||
| 150 | orrne r3, r3, r4, push #24 | ||
| 151 | movne r4, r4, pull #8 | ||
| 152 | orrne r4, r4, r7, push #24 | ||
| 153 | stmneia r0!, {r3 - r4} @ Shouldnt fault | ||
| 154 | tst ip, #4 | ||
| 155 | movne r3, r7, pull #8 | ||
| 156 | ldrne r7, [r1], #4 | ||
| 157 | orrne r3, r3, r7, push #24 | ||
| 158 | TUSER( strne) r3, [r0], #4 @ Shouldnt fault | ||
| 159 | ands ip, ip, #3 | ||
| 160 | beq .Lc2u_1fupi | ||
| 161 | .Lc2u_1nowords: mov r3, r7, get_byte_1 | ||
| 162 | teq ip, #0 | ||
| 163 | beq .Lc2u_finished | ||
| 164 | cmp ip, #2 | ||
| 165 | USER( TUSER( strb) r3, [r0], #1) @ May fault | ||
| 166 | movge r3, r7, get_byte_2 | ||
| 167 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault | ||
| 168 | movgt r3, r7, get_byte_3 | ||
| 169 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault | ||
| 170 | b .Lc2u_finished | ||
| 171 | |||
| 172 | .Lc2u_2fupi: subs r2, r2, #4 | ||
| 173 | addmi ip, r2, #4 | ||
| 174 | bmi .Lc2u_2nowords | ||
| 175 | mov r3, r7, pull #16 | ||
| 176 | ldr r7, [r1], #4 | ||
| 177 | orr r3, r3, r7, push #16 | ||
| 178 | USER( TUSER( str) r3, [r0], #4) @ May fault | ||
| 179 | mov ip, r0, lsl #32 - PAGE_SHIFT | ||
| 180 | rsb ip, ip, #0 | ||
| 181 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
| 182 | beq .Lc2u_2fupi | ||
| 183 | cmp r2, ip | ||
| 184 | movlt ip, r2 | ||
| 185 | sub r2, r2, ip | ||
| 186 | subs ip, ip, #16 | ||
| 187 | blt .Lc2u_2rem8lp | ||
| 188 | |||
| 189 | .Lc2u_2cpy8lp: mov r3, r7, pull #16 | ||
| 190 | ldmia r1!, {r4 - r7} | ||
| 191 | subs ip, ip, #16 | ||
| 192 | orr r3, r3, r4, push #16 | ||
| 193 | mov r4, r4, pull #16 | ||
| 194 | orr r4, r4, r5, push #16 | ||
| 195 | mov r5, r5, pull #16 | ||
| 196 | orr r5, r5, r6, push #16 | ||
| 197 | mov r6, r6, pull #16 | ||
| 198 | orr r6, r6, r7, push #16 | ||
| 199 | stmia r0!, {r3 - r6} @ Shouldnt fault | ||
| 200 | bpl .Lc2u_2cpy8lp | ||
| 201 | |||
| 202 | .Lc2u_2rem8lp: tst ip, #8 | ||
| 203 | movne r3, r7, pull #16 | ||
| 204 | ldmneia r1!, {r4, r7} | ||
| 205 | orrne r3, r3, r4, push #16 | ||
| 206 | movne r4, r4, pull #16 | ||
| 207 | orrne r4, r4, r7, push #16 | ||
| 208 | stmneia r0!, {r3 - r4} @ Shouldnt fault | ||
| 209 | tst ip, #4 | ||
| 210 | movne r3, r7, pull #16 | ||
| 211 | ldrne r7, [r1], #4 | ||
| 212 | orrne r3, r3, r7, push #16 | ||
| 213 | TUSER( strne) r3, [r0], #4 @ Shouldnt fault | ||
| 214 | ands ip, ip, #3 | ||
| 215 | beq .Lc2u_2fupi | ||
| 216 | .Lc2u_2nowords: mov r3, r7, get_byte_2 | ||
| 217 | teq ip, #0 | ||
| 218 | beq .Lc2u_finished | ||
| 219 | cmp ip, #2 | ||
| 220 | USER( TUSER( strb) r3, [r0], #1) @ May fault | ||
| 221 | movge r3, r7, get_byte_3 | ||
| 222 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault | ||
| 223 | ldrgtb r3, [r1], #0 | ||
| 224 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault | ||
| 225 | b .Lc2u_finished | ||
| 226 | |||
| 227 | .Lc2u_3fupi: subs r2, r2, #4 | ||
| 228 | addmi ip, r2, #4 | ||
| 229 | bmi .Lc2u_3nowords | ||
| 230 | mov r3, r7, pull #24 | ||
| 231 | ldr r7, [r1], #4 | ||
| 232 | orr r3, r3, r7, push #8 | ||
| 233 | USER( TUSER( str) r3, [r0], #4) @ May fault | ||
| 234 | mov ip, r0, lsl #32 - PAGE_SHIFT | ||
| 235 | rsb ip, ip, #0 | ||
| 236 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
| 237 | beq .Lc2u_3fupi | ||
| 238 | cmp r2, ip | ||
| 239 | movlt ip, r2 | ||
| 240 | sub r2, r2, ip | ||
| 241 | subs ip, ip, #16 | ||
| 242 | blt .Lc2u_3rem8lp | ||
| 243 | |||
| 244 | .Lc2u_3cpy8lp: mov r3, r7, pull #24 | ||
| 245 | ldmia r1!, {r4 - r7} | ||
| 246 | subs ip, ip, #16 | ||
| 247 | orr r3, r3, r4, push #8 | ||
| 248 | mov r4, r4, pull #24 | ||
| 249 | orr r4, r4, r5, push #8 | ||
| 250 | mov r5, r5, pull #24 | ||
| 251 | orr r5, r5, r6, push #8 | ||
| 252 | mov r6, r6, pull #24 | ||
| 253 | orr r6, r6, r7, push #8 | ||
| 254 | stmia r0!, {r3 - r6} @ Shouldnt fault | ||
| 255 | bpl .Lc2u_3cpy8lp | ||
| 256 | |||
| 257 | .Lc2u_3rem8lp: tst ip, #8 | ||
| 258 | movne r3, r7, pull #24 | ||
| 259 | ldmneia r1!, {r4, r7} | ||
| 260 | orrne r3, r3, r4, push #8 | ||
| 261 | movne r4, r4, pull #24 | ||
| 262 | orrne r4, r4, r7, push #8 | ||
| 263 | stmneia r0!, {r3 - r4} @ Shouldnt fault | ||
| 264 | tst ip, #4 | ||
| 265 | movne r3, r7, pull #24 | ||
| 266 | ldrne r7, [r1], #4 | ||
| 267 | orrne r3, r3, r7, push #8 | ||
| 268 | TUSER( strne) r3, [r0], #4 @ Shouldnt fault | ||
| 269 | ands ip, ip, #3 | ||
| 270 | beq .Lc2u_3fupi | ||
| 271 | .Lc2u_3nowords: mov r3, r7, get_byte_3 | ||
| 272 | teq ip, #0 | ||
| 273 | beq .Lc2u_finished | ||
| 274 | cmp ip, #2 | ||
| 275 | USER( TUSER( strb) r3, [r0], #1) @ May fault | ||
| 276 | ldrgeb r3, [r1], #1 | ||
| 277 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault | ||
| 278 | ldrgtb r3, [r1], #0 | ||
| 279 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault | ||
| 280 | b .Lc2u_finished | ||
| 281 | ENDPROC(__copy_to_user) | ||
| 282 | |||
| 283 | .pushsection .fixup,"ax" | ||
| 284 | .align 0 | ||
| 285 | 9001: ldmfd sp!, {r0, r4 - r7, pc} | ||
| 286 | .popsection | ||
| 287 | |||
| 288 | /* Prototype: unsigned long __copy_from_user(void *to,const void *from,unsigned long n); | ||
| 289 | * Purpose : copy a block from user memory to kernel memory | ||
| 290 | * Params : to - kernel memory | ||
| 291 | * : from - user memory | ||
| 292 | * : n - number of bytes to copy | ||
| 293 | * Returns : Number of bytes NOT copied. | ||
| 294 | */ | ||
| 295 | .Lcfu_dest_not_aligned: | ||
| 296 | rsb ip, ip, #4 | ||
| 297 | cmp ip, #2 | ||
| 298 | USER( TUSER( ldrb) r3, [r1], #1) @ May fault | ||
| 299 | strb r3, [r0], #1 | ||
| 300 | USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault | ||
| 301 | strgeb r3, [r0], #1 | ||
| 302 | USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault | ||
| 303 | strgtb r3, [r0], #1 | ||
| 304 | sub r2, r2, ip | ||
| 305 | b .Lcfu_dest_aligned | ||
| 306 | |||
| 307 | ENTRY(__copy_from_user) | ||
| 308 | stmfd sp!, {r0, r2, r4 - r7, lr} | ||
| 309 | cmp r2, #4 | ||
| 310 | blt .Lcfu_not_enough | ||
| 311 | ands ip, r0, #3 | ||
| 312 | bne .Lcfu_dest_not_aligned | ||
| 313 | .Lcfu_dest_aligned: | ||
| 314 | ands ip, r1, #3 | ||
| 315 | bne .Lcfu_src_not_aligned | ||
| 316 | |||
| 317 | /* | ||
| 318 | * Seeing as there has to be at least 8 bytes to copy, we can | ||
| 319 | * copy one word, and force a user-mode page fault... | ||
| 320 | */ | ||
| 321 | |||
| 322 | .Lcfu_0fupi: subs r2, r2, #4 | ||
| 323 | addmi ip, r2, #4 | ||
| 324 | bmi .Lcfu_0nowords | ||
| 325 | USER( TUSER( ldr) r3, [r1], #4) | ||
| 326 | str r3, [r0], #4 | ||
| 327 | mov ip, r1, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction | ||
| 328 | rsb ip, ip, #0 | ||
| 329 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
| 330 | beq .Lcfu_0fupi | ||
| 331 | /* | ||
| 332 | * ip = max no. of bytes to copy before needing another "strt" insn | ||
| 333 | */ | ||
| 334 | cmp r2, ip | ||
| 335 | movlt ip, r2 | ||
| 336 | sub r2, r2, ip | ||
| 337 | subs ip, ip, #32 | ||
| 338 | blt .Lcfu_0rem8lp | ||
| 339 | |||
| 340 | .Lcfu_0cpy8lp: ldmia r1!, {r3 - r6} @ Shouldnt fault | ||
| 341 | stmia r0!, {r3 - r6} | ||
| 342 | ldmia r1!, {r3 - r6} @ Shouldnt fault | ||
| 343 | subs ip, ip, #32 | ||
| 344 | stmia r0!, {r3 - r6} | ||
| 345 | bpl .Lcfu_0cpy8lp | ||
| 346 | |||
| 347 | .Lcfu_0rem8lp: cmn ip, #16 | ||
| 348 | ldmgeia r1!, {r3 - r6} @ Shouldnt fault | ||
| 349 | stmgeia r0!, {r3 - r6} | ||
| 350 | tst ip, #8 | ||
| 351 | ldmneia r1!, {r3 - r4} @ Shouldnt fault | ||
| 352 | stmneia r0!, {r3 - r4} | ||
| 353 | tst ip, #4 | ||
| 354 | TUSER( ldrne) r3, [r1], #4 @ Shouldnt fault | ||
| 355 | strne r3, [r0], #4 | ||
| 356 | ands ip, ip, #3 | ||
| 357 | beq .Lcfu_0fupi | ||
| 358 | .Lcfu_0nowords: teq ip, #0 | ||
| 359 | beq .Lcfu_finished | ||
| 360 | .Lcfu_nowords: cmp ip, #2 | ||
| 361 | USER( TUSER( ldrb) r3, [r1], #1) @ May fault | ||
| 362 | strb r3, [r0], #1 | ||
| 363 | USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault | ||
| 364 | strgeb r3, [r0], #1 | ||
| 365 | USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault | ||
| 366 | strgtb r3, [r0], #1 | ||
| 367 | b .Lcfu_finished | ||
| 368 | |||
| 369 | .Lcfu_not_enough: | ||
| 370 | movs ip, r2 | ||
| 371 | bne .Lcfu_nowords | ||
| 372 | .Lcfu_finished: mov r0, #0 | ||
| 373 | add sp, sp, #8 | ||
| 374 | ldmfd sp!, {r4 - r7, pc} | ||
| 375 | |||
| 376 | .Lcfu_src_not_aligned: | ||
| 377 | bic r1, r1, #3 | ||
| 378 | USER( TUSER( ldr) r7, [r1], #4) @ May fault | ||
| 379 | cmp ip, #2 | ||
| 380 | bgt .Lcfu_3fupi | ||
| 381 | beq .Lcfu_2fupi | ||
| 382 | .Lcfu_1fupi: subs r2, r2, #4 | ||
| 383 | addmi ip, r2, #4 | ||
| 384 | bmi .Lcfu_1nowords | ||
| 385 | mov r3, r7, pull #8 | ||
| 386 | USER( TUSER( ldr) r7, [r1], #4) @ May fault | ||
| 387 | orr r3, r3, r7, push #24 | ||
| 388 | str r3, [r0], #4 | ||
| 389 | mov ip, r1, lsl #32 - PAGE_SHIFT | ||
| 390 | rsb ip, ip, #0 | ||
| 391 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
| 392 | beq .Lcfu_1fupi | ||
| 393 | cmp r2, ip | ||
| 394 | movlt ip, r2 | ||
| 395 | sub r2, r2, ip | ||
| 396 | subs ip, ip, #16 | ||
| 397 | blt .Lcfu_1rem8lp | ||
| 398 | |||
| 399 | .Lcfu_1cpy8lp: mov r3, r7, pull #8 | ||
| 400 | ldmia r1!, {r4 - r7} @ Shouldnt fault | ||
| 401 | subs ip, ip, #16 | ||
| 402 | orr r3, r3, r4, push #24 | ||
| 403 | mov r4, r4, pull #8 | ||
| 404 | orr r4, r4, r5, push #24 | ||
| 405 | mov r5, r5, pull #8 | ||
| 406 | orr r5, r5, r6, push #24 | ||
| 407 | mov r6, r6, pull #8 | ||
| 408 | orr r6, r6, r7, push #24 | ||
| 409 | stmia r0!, {r3 - r6} | ||
| 410 | bpl .Lcfu_1cpy8lp | ||
| 411 | |||
| 412 | .Lcfu_1rem8lp: tst ip, #8 | ||
| 413 | movne r3, r7, pull #8 | ||
| 414 | ldmneia r1!, {r4, r7} @ Shouldnt fault | ||
| 415 | orrne r3, r3, r4, push #24 | ||
| 416 | movne r4, r4, pull #8 | ||
| 417 | orrne r4, r4, r7, push #24 | ||
| 418 | stmneia r0!, {r3 - r4} | ||
| 419 | tst ip, #4 | ||
| 420 | movne r3, r7, pull #8 | ||
| 421 | USER( TUSER( ldrne) r7, [r1], #4) @ May fault | ||
| 422 | orrne r3, r3, r7, push #24 | ||
| 423 | strne r3, [r0], #4 | ||
| 424 | ands ip, ip, #3 | ||
| 425 | beq .Lcfu_1fupi | ||
| 426 | .Lcfu_1nowords: mov r3, r7, get_byte_1 | ||
| 427 | teq ip, #0 | ||
| 428 | beq .Lcfu_finished | ||
| 429 | cmp ip, #2 | ||
| 430 | strb r3, [r0], #1 | ||
| 431 | movge r3, r7, get_byte_2 | ||
| 432 | strgeb r3, [r0], #1 | ||
| 433 | movgt r3, r7, get_byte_3 | ||
| 434 | strgtb r3, [r0], #1 | ||
| 435 | b .Lcfu_finished | ||
| 436 | |||
| 437 | .Lcfu_2fupi: subs r2, r2, #4 | ||
| 438 | addmi ip, r2, #4 | ||
| 439 | bmi .Lcfu_2nowords | ||
| 440 | mov r3, r7, pull #16 | ||
| 441 | USER( TUSER( ldr) r7, [r1], #4) @ May fault | ||
| 442 | orr r3, r3, r7, push #16 | ||
| 443 | str r3, [r0], #4 | ||
| 444 | mov ip, r1, lsl #32 - PAGE_SHIFT | ||
| 445 | rsb ip, ip, #0 | ||
| 446 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
| 447 | beq .Lcfu_2fupi | ||
| 448 | cmp r2, ip | ||
| 449 | movlt ip, r2 | ||
| 450 | sub r2, r2, ip | ||
| 451 | subs ip, ip, #16 | ||
| 452 | blt .Lcfu_2rem8lp | ||
| 453 | |||
| 454 | |||
| 455 | .Lcfu_2cpy8lp: mov r3, r7, pull #16 | ||
| 456 | ldmia r1!, {r4 - r7} @ Shouldnt fault | ||
| 457 | subs ip, ip, #16 | ||
| 458 | orr r3, r3, r4, push #16 | ||
| 459 | mov r4, r4, pull #16 | ||
| 460 | orr r4, r4, r5, push #16 | ||
| 461 | mov r5, r5, pull #16 | ||
| 462 | orr r5, r5, r6, push #16 | ||
| 463 | mov r6, r6, pull #16 | ||
| 464 | orr r6, r6, r7, push #16 | ||
| 465 | stmia r0!, {r3 - r6} | ||
| 466 | bpl .Lcfu_2cpy8lp | ||
| 467 | |||
| 468 | .Lcfu_2rem8lp: tst ip, #8 | ||
| 469 | movne r3, r7, pull #16 | ||
| 470 | ldmneia r1!, {r4, r7} @ Shouldnt fault | ||
| 471 | orrne r3, r3, r4, push #16 | ||
| 472 | movne r4, r4, pull #16 | ||
| 473 | orrne r4, r4, r7, push #16 | ||
| 474 | stmneia r0!, {r3 - r4} | ||
| 475 | tst ip, #4 | ||
| 476 | movne r3, r7, pull #16 | ||
| 477 | USER( TUSER( ldrne) r7, [r1], #4) @ May fault | ||
| 478 | orrne r3, r3, r7, push #16 | ||
| 479 | strne r3, [r0], #4 | ||
| 480 | ands ip, ip, #3 | ||
| 481 | beq .Lcfu_2fupi | ||
| 482 | .Lcfu_2nowords: mov r3, r7, get_byte_2 | ||
| 483 | teq ip, #0 | ||
| 484 | beq .Lcfu_finished | ||
| 485 | cmp ip, #2 | ||
| 486 | strb r3, [r0], #1 | ||
| 487 | movge r3, r7, get_byte_3 | ||
| 488 | strgeb r3, [r0], #1 | ||
| 489 | USER( TUSER( ldrgtb) r3, [r1], #0) @ May fault | ||
| 490 | strgtb r3, [r0], #1 | ||
| 491 | b .Lcfu_finished | ||
| 492 | |||
| 493 | .Lcfu_3fupi: subs r2, r2, #4 | ||
| 494 | addmi ip, r2, #4 | ||
| 495 | bmi .Lcfu_3nowords | ||
| 496 | mov r3, r7, pull #24 | ||
| 497 | USER( TUSER( ldr) r7, [r1], #4) @ May fault | ||
| 498 | orr r3, r3, r7, push #8 | ||
| 499 | str r3, [r0], #4 | ||
| 500 | mov ip, r1, lsl #32 - PAGE_SHIFT | ||
| 501 | rsb ip, ip, #0 | ||
| 502 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
| 503 | beq .Lcfu_3fupi | ||
| 504 | cmp r2, ip | ||
| 505 | movlt ip, r2 | ||
| 506 | sub r2, r2, ip | ||
| 507 | subs ip, ip, #16 | ||
| 508 | blt .Lcfu_3rem8lp | ||
| 509 | |||
| 510 | .Lcfu_3cpy8lp: mov r3, r7, pull #24 | ||
| 511 | ldmia r1!, {r4 - r7} @ Shouldnt fault | ||
| 512 | orr r3, r3, r4, push #8 | ||
| 513 | mov r4, r4, pull #24 | ||
| 514 | orr r4, r4, r5, push #8 | ||
| 515 | mov r5, r5, pull #24 | ||
| 516 | orr r5, r5, r6, push #8 | ||
| 517 | mov r6, r6, pull #24 | ||
| 518 | orr r6, r6, r7, push #8 | ||
| 519 | stmia r0!, {r3 - r6} | ||
| 520 | subs ip, ip, #16 | ||
| 521 | bpl .Lcfu_3cpy8lp | ||
| 522 | |||
| 523 | .Lcfu_3rem8lp: tst ip, #8 | ||
| 524 | movne r3, r7, pull #24 | ||
| 525 | ldmneia r1!, {r4, r7} @ Shouldnt fault | ||
| 526 | orrne r3, r3, r4, push #8 | ||
| 527 | movne r4, r4, pull #24 | ||
| 528 | orrne r4, r4, r7, push #8 | ||
| 529 | stmneia r0!, {r3 - r4} | ||
| 530 | tst ip, #4 | ||
| 531 | movne r3, r7, pull #24 | ||
| 532 | USER( TUSER( ldrne) r7, [r1], #4) @ May fault | ||
| 533 | orrne r3, r3, r7, push #8 | ||
| 534 | strne r3, [r0], #4 | ||
| 535 | ands ip, ip, #3 | ||
| 536 | beq .Lcfu_3fupi | ||
| 537 | .Lcfu_3nowords: mov r3, r7, get_byte_3 | ||
| 538 | teq ip, #0 | ||
| 539 | beq .Lcfu_finished | ||
| 540 | cmp ip, #2 | ||
| 541 | strb r3, [r0], #1 | ||
| 542 | USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault | ||
| 543 | strgeb r3, [r0], #1 | ||
| 544 | USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault | ||
| 545 | strgtb r3, [r0], #1 | ||
| 546 | b .Lcfu_finished | ||
| 547 | ENDPROC(__copy_from_user) | ||
| 548 | |||
| 549 | .pushsection .fixup,"ax" | ||
| 550 | .align 0 | ||
| 551 | /* | ||
| 552 | * We took an exception. r0 contains a pointer to | ||
| 553 | * the byte not copied. | ||
| 554 | */ | ||
| 555 | 9001: ldr r2, [sp], #4 @ void *to | ||
| 556 | sub r2, r0, r2 @ bytes copied | ||
| 557 | ldr r1, [sp], #4 @ unsigned long count | ||
| 558 | subs r4, r1, r2 @ bytes left to copy | ||
| 559 | movne r1, r4 | ||
| 560 | blne __memzero | ||
| 561 | mov r0, r4 | ||
| 562 | ldmfd sp!, {r4 - r7, pc} | ||
| 563 | .popsection | ||
| 564 | |||
diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c index 79d001f831e0..311328314163 100644 --- a/arch/arm/mach-cns3xxx/pcie.c +++ b/arch/arm/mach-cns3xxx/pcie.c | |||
| @@ -166,12 +166,6 @@ static struct pci_ops cns3xxx_pcie_ops = { | |||
| 166 | .write = cns3xxx_pci_write_config, | 166 | .write = cns3xxx_pci_write_config, |
| 167 | }; | 167 | }; |
| 168 | 168 | ||
| 169 | static struct pci_bus *cns3xxx_pci_scan_bus(int nr, struct pci_sys_data *sys) | ||
| 170 | { | ||
| 171 | return pci_scan_root_bus(NULL, sys->busnr, &cns3xxx_pcie_ops, sys, | ||
| 172 | &sys->resources); | ||
| 173 | } | ||
| 174 | |||
| 175 | static int cns3xxx_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 169 | static int cns3xxx_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
| 176 | { | 170 | { |
| 177 | struct cns3xxx_pcie *cnspci = pdev_to_cnspci(dev); | 171 | struct cns3xxx_pcie *cnspci = pdev_to_cnspci(dev); |
| @@ -221,10 +215,9 @@ static struct cns3xxx_pcie cns3xxx_pcie[] = { | |||
| 221 | .irqs = { IRQ_CNS3XXX_PCIE0_RC, IRQ_CNS3XXX_PCIE0_DEVICE, }, | 215 | .irqs = { IRQ_CNS3XXX_PCIE0_RC, IRQ_CNS3XXX_PCIE0_DEVICE, }, |
| 222 | .hw_pci = { | 216 | .hw_pci = { |
| 223 | .domain = 0, | 217 | .domain = 0, |
| 224 | .swizzle = pci_std_swizzle, | ||
| 225 | .nr_controllers = 1, | 218 | .nr_controllers = 1, |
| 219 | .ops = &cns3xxx_pcie_ops, | ||
| 226 | .setup = cns3xxx_pci_setup, | 220 | .setup = cns3xxx_pci_setup, |
| 227 | .scan = cns3xxx_pci_scan_bus, | ||
| 228 | .map_irq = cns3xxx_pcie_map_irq, | 221 | .map_irq = cns3xxx_pcie_map_irq, |
| 229 | }, | 222 | }, |
| 230 | }, | 223 | }, |
| @@ -264,10 +257,9 @@ static struct cns3xxx_pcie cns3xxx_pcie[] = { | |||
| 264 | .irqs = { IRQ_CNS3XXX_PCIE1_RC, IRQ_CNS3XXX_PCIE1_DEVICE, }, | 257 | .irqs = { IRQ_CNS3XXX_PCIE1_RC, IRQ_CNS3XXX_PCIE1_DEVICE, }, |
| 265 | .hw_pci = { | 258 | .hw_pci = { |
| 266 | .domain = 1, | 259 | .domain = 1, |
| 267 | .swizzle = pci_std_swizzle, | ||
| 268 | .nr_controllers = 1, | 260 | .nr_controllers = 1, |
| 261 | .ops = &cns3xxx_pcie_ops, | ||
| 269 | .setup = cns3xxx_pci_setup, | 262 | .setup = cns3xxx_pci_setup, |
| 270 | .scan = cns3xxx_pci_scan_bus, | ||
| 271 | .map_irq = cns3xxx_pcie_map_irq, | 263 | .map_irq = cns3xxx_pcie_map_irq, |
| 272 | }, | 264 | }, |
| 273 | }, | 265 | }, |
diff --git a/arch/arm/mach-dove/pcie.c b/arch/arm/mach-dove/pcie.c index 48a032005ea3..47921b0cdc65 100644 --- a/arch/arm/mach-dove/pcie.c +++ b/arch/arm/mach-dove/pcie.c | |||
| @@ -43,6 +43,7 @@ static int __init dove_pcie_setup(int nr, struct pci_sys_data *sys) | |||
| 43 | return 0; | 43 | return 0; |
| 44 | 44 | ||
| 45 | pp = &pcie_port[nr]; | 45 | pp = &pcie_port[nr]; |
| 46 | sys->private_data = pp; | ||
| 46 | pp->root_bus_nr = sys->busnr; | 47 | pp->root_bus_nr = sys->busnr; |
| 47 | 48 | ||
| 48 | /* | 49 | /* |
| @@ -93,19 +94,6 @@ static int __init dove_pcie_setup(int nr, struct pci_sys_data *sys) | |||
| 93 | return 1; | 94 | return 1; |
| 94 | } | 95 | } |
| 95 | 96 | ||
| 96 | static struct pcie_port *bus_to_port(int bus) | ||
| 97 | { | ||
| 98 | int i; | ||
| 99 | |||
| 100 | for (i = num_pcie_ports - 1; i >= 0; i--) { | ||
| 101 | int rbus = pcie_port[i].root_bus_nr; | ||
| 102 | if (rbus != -1 && rbus <= bus) | ||
| 103 | break; | ||
| 104 | } | ||
| 105 | |||
| 106 | return i >= 0 ? pcie_port + i : NULL; | ||
| 107 | } | ||
| 108 | |||
| 109 | static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) | 97 | static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) |
| 110 | { | 98 | { |
| 111 | /* | 99 | /* |
| @@ -121,7 +109,8 @@ static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) | |||
| 121 | static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, | 109 | static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, |
| 122 | int size, u32 *val) | 110 | int size, u32 *val) |
| 123 | { | 111 | { |
| 124 | struct pcie_port *pp = bus_to_port(bus->number); | 112 | struct pci_sys_data *sys = bus->sysdata; |
| 113 | struct pcie_port *pp = sys->private_data; | ||
| 125 | unsigned long flags; | 114 | unsigned long flags; |
| 126 | int ret; | 115 | int ret; |
| 127 | 116 | ||
| @@ -140,7 +129,8 @@ static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, | |||
| 140 | static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, | 129 | static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, |
| 141 | int where, int size, u32 val) | 130 | int where, int size, u32 val) |
| 142 | { | 131 | { |
| 143 | struct pcie_port *pp = bus_to_port(bus->number); | 132 | struct pci_sys_data *sys = bus->sysdata; |
| 133 | struct pcie_port *pp = sys->private_data; | ||
| 144 | unsigned long flags; | 134 | unsigned long flags; |
| 145 | int ret; | 135 | int ret; |
| 146 | 136 | ||
| @@ -194,14 +184,14 @@ dove_pcie_scan_bus(int nr, struct pci_sys_data *sys) | |||
| 194 | 184 | ||
| 195 | static int __init dove_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 185 | static int __init dove_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
| 196 | { | 186 | { |
| 197 | struct pcie_port *pp = bus_to_port(dev->bus->number); | 187 | struct pci_sys_data *sys = dev->sysdata; |
| 188 | struct pcie_port *pp = sys->private_data; | ||
| 198 | 189 | ||
| 199 | return pp->index ? IRQ_DOVE_PCIE1 : IRQ_DOVE_PCIE0; | 190 | return pp->index ? IRQ_DOVE_PCIE1 : IRQ_DOVE_PCIE0; |
| 200 | } | 191 | } |
| 201 | 192 | ||
| 202 | static struct hw_pci dove_pci __initdata = { | 193 | static struct hw_pci dove_pci __initdata = { |
| 203 | .nr_controllers = 2, | 194 | .nr_controllers = 2, |
| 204 | .swizzle = pci_std_swizzle, | ||
| 205 | .setup = dove_pcie_setup, | 195 | .setup = dove_pcie_setup, |
| 206 | .scan = dove_pcie_scan_bus, | 196 | .scan = dove_pcie_scan_bus, |
| 207 | .map_irq = dove_pcie_map_irq, | 197 | .map_irq = dove_pcie_map_irq, |
diff --git a/arch/arm/mach-footbridge/cats-pci.c b/arch/arm/mach-footbridge/cats-pci.c index 32321f66dec4..5cec2567c9c5 100644 --- a/arch/arm/mach-footbridge/cats-pci.c +++ b/arch/arm/mach-footbridge/cats-pci.c | |||
| @@ -16,6 +16,11 @@ | |||
| 16 | /* cats host-specific stuff */ | 16 | /* cats host-specific stuff */ |
| 17 | static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 }; | 17 | static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 }; |
| 18 | 18 | ||
| 19 | static u8 cats_no_swizzle(struct pci_dev *dev, u8 *pin) | ||
| 20 | { | ||
| 21 | return 0; | ||
| 22 | } | ||
| 23 | |||
| 19 | static int __init cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 24 | static int __init cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
| 20 | { | 25 | { |
| 21 | if (dev->irq >= 255) | 26 | if (dev->irq >= 255) |
| @@ -39,11 +44,11 @@ static int __init cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 39 | * cards being used (ie, pci-pci bridge based cards)? | 44 | * cards being used (ie, pci-pci bridge based cards)? |
| 40 | */ | 45 | */ |
| 41 | static struct hw_pci cats_pci __initdata = { | 46 | static struct hw_pci cats_pci __initdata = { |
| 42 | .swizzle = NULL, | 47 | .swizzle = cats_no_swizzle, |
| 43 | .map_irq = cats_map_irq, | 48 | .map_irq = cats_map_irq, |
| 44 | .nr_controllers = 1, | 49 | .nr_controllers = 1, |
| 50 | .ops = &dc21285_ops, | ||
| 45 | .setup = dc21285_setup, | 51 | .setup = dc21285_setup, |
| 46 | .scan = dc21285_scan_bus, | ||
| 47 | .preinit = dc21285_preinit, | 52 | .preinit = dc21285_preinit, |
| 48 | .postinit = dc21285_postinit, | 53 | .postinit = dc21285_postinit, |
| 49 | }; | 54 | }; |
diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c index e17e11de4f5e..9d62e3381024 100644 --- a/arch/arm/mach-footbridge/dc21285.c +++ b/arch/arm/mach-footbridge/dc21285.c | |||
| @@ -129,7 +129,7 @@ dc21285_write_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
| 129 | return PCIBIOS_SUCCESSFUL; | 129 | return PCIBIOS_SUCCESSFUL; |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | static struct pci_ops dc21285_ops = { | 132 | struct pci_ops dc21285_ops = { |
| 133 | .read = dc21285_read_config, | 133 | .read = dc21285_read_config, |
| 134 | .write = dc21285_write_config, | 134 | .write = dc21285_write_config, |
| 135 | }; | 135 | }; |
| @@ -284,11 +284,6 @@ int __init dc21285_setup(int nr, struct pci_sys_data *sys) | |||
| 284 | return 1; | 284 | return 1; |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | struct pci_bus * __init dc21285_scan_bus(int nr, struct pci_sys_data *sys) | ||
| 288 | { | ||
| 289 | return pci_scan_root_bus(NULL, 0, &dc21285_ops, sys, &sys->resources); | ||
| 290 | } | ||
| 291 | |||
| 292 | #define dc21285_request_irq(_a, _b, _c, _d, _e) \ | 287 | #define dc21285_request_irq(_a, _b, _c, _d, _e) \ |
| 293 | WARN_ON(request_irq(_a, _b, _c, _d, _e) < 0) | 288 | WARN_ON(request_irq(_a, _b, _c, _d, _e) < 0) |
| 294 | 289 | ||
diff --git a/arch/arm/mach-footbridge/ebsa285-pci.c b/arch/arm/mach-footbridge/ebsa285-pci.c index 511c673ffa9d..fd12d8a36dc5 100644 --- a/arch/arm/mach-footbridge/ebsa285-pci.c +++ b/arch/arm/mach-footbridge/ebsa285-pci.c | |||
| @@ -29,11 +29,10 @@ static int __init ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | static struct hw_pci ebsa285_pci __initdata = { | 31 | static struct hw_pci ebsa285_pci __initdata = { |
| 32 | .swizzle = pci_std_swizzle, | ||
| 33 | .map_irq = ebsa285_map_irq, | 32 | .map_irq = ebsa285_map_irq, |
| 34 | .nr_controllers = 1, | 33 | .nr_controllers = 1, |
| 34 | .ops = &dc21285_ops, | ||
| 35 | .setup = dc21285_setup, | 35 | .setup = dc21285_setup, |
| 36 | .scan = dc21285_scan_bus, | ||
| 37 | .preinit = dc21285_preinit, | 36 | .preinit = dc21285_preinit, |
| 38 | .postinit = dc21285_postinit, | 37 | .postinit = dc21285_postinit, |
| 39 | }; | 38 | }; |
diff --git a/arch/arm/mach-footbridge/netwinder-pci.c b/arch/arm/mach-footbridge/netwinder-pci.c index 62187610e17e..0fba5134e4fe 100644 --- a/arch/arm/mach-footbridge/netwinder-pci.c +++ b/arch/arm/mach-footbridge/netwinder-pci.c | |||
| @@ -43,11 +43,10 @@ static int __init netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | static struct hw_pci netwinder_pci __initdata = { | 45 | static struct hw_pci netwinder_pci __initdata = { |
| 46 | .swizzle = pci_std_swizzle, | ||
| 47 | .map_irq = netwinder_map_irq, | 46 | .map_irq = netwinder_map_irq, |
| 48 | .nr_controllers = 1, | 47 | .nr_controllers = 1, |
| 48 | .ops = &dc21285_ops, | ||
| 49 | .setup = dc21285_setup, | 49 | .setup = dc21285_setup, |
| 50 | .scan = dc21285_scan_bus, | ||
| 51 | .preinit = dc21285_preinit, | 50 | .preinit = dc21285_preinit, |
| 52 | .postinit = dc21285_postinit, | 51 | .postinit = dc21285_postinit, |
| 53 | }; | 52 | }; |
diff --git a/arch/arm/mach-footbridge/personal-pci.c b/arch/arm/mach-footbridge/personal-pci.c index aeb651d914a6..5c9ee54613b2 100644 --- a/arch/arm/mach-footbridge/personal-pci.c +++ b/arch/arm/mach-footbridge/personal-pci.c | |||
| @@ -41,8 +41,8 @@ static int __init personal_server_map_irq(const struct pci_dev *dev, u8 slot, | |||
| 41 | static struct hw_pci personal_server_pci __initdata = { | 41 | static struct hw_pci personal_server_pci __initdata = { |
| 42 | .map_irq = personal_server_map_irq, | 42 | .map_irq = personal_server_map_irq, |
| 43 | .nr_controllers = 1, | 43 | .nr_controllers = 1, |
| 44 | .ops = &dc21285_ops, | ||
| 44 | .setup = dc21285_setup, | 45 | .setup = dc21285_setup, |
| 45 | .scan = dc21285_scan_bus, | ||
| 46 | .preinit = dc21285_preinit, | 46 | .preinit = dc21285_preinit, |
| 47 | .postinit = dc21285_postinit, | 47 | .postinit = dc21285_postinit, |
| 48 | }; | 48 | }; |
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 3e538da6cb1f..e428f3ab15c7 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
| @@ -398,24 +398,16 @@ static int impd1_probe(struct lm_device *dev) | |||
| 398 | struct impd1_device *idev = impd1_devs + i; | 398 | struct impd1_device *idev = impd1_devs + i; |
| 399 | struct amba_device *d; | 399 | struct amba_device *d; |
| 400 | unsigned long pc_base; | 400 | unsigned long pc_base; |
| 401 | char devname[32]; | ||
| 401 | 402 | ||
| 402 | pc_base = dev->resource.start + idev->offset; | 403 | pc_base = dev->resource.start + idev->offset; |
| 403 | 404 | snprintf(devname, 32, "lm%x:%5.5lx", dev->id, idev->offset >> 12); | |
| 404 | d = amba_device_alloc(NULL, pc_base, SZ_4K); | 405 | d = amba_ahb_device_add(&dev->dev, devname, pc_base, SZ_4K, |
| 405 | if (!d) | 406 | dev->irq, dev->irq, |
| 407 | idev->platform_data, idev->id); | ||
| 408 | if (IS_ERR(d)) { | ||
| 409 | dev_err(&dev->dev, "unable to register device: %ld\n", PTR_ERR(d)); | ||
| 406 | continue; | 410 | continue; |
| 407 | |||
| 408 | dev_set_name(&d->dev, "lm%x:%5.5lx", dev->id, idev->offset >> 12); | ||
| 409 | d->dev.parent = &dev->dev; | ||
| 410 | d->irq[0] = dev->irq; | ||
| 411 | d->irq[1] = dev->irq; | ||
| 412 | d->periphid = idev->id; | ||
| 413 | d->dev.platform_data = idev->platform_data; | ||
| 414 | |||
| 415 | ret = amba_device_add(d, &dev->resource); | ||
| 416 | if (ret) { | ||
| 417 | dev_err(&d->dev, "unable to register device: %d\n", ret); | ||
| 418 | amba_device_put(d); | ||
| 419 | } | 411 | } |
| 420 | } | 412 | } |
| 421 | 413 | ||
diff --git a/arch/arm/mach-integrator/include/mach/entry-macro.S b/arch/arm/mach-integrator/include/mach/entry-macro.S deleted file mode 100644 index 5cc7b85ad9df..000000000000 --- a/arch/arm/mach-integrator/include/mach/entry-macro.S +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-integrator/include/mach/entry-macro.S | ||
| 3 | * | ||
| 4 | * Low-level IRQ helper macros for Integrator platforms | ||
| 5 | * | ||
| 6 | * This file is licensed under the terms of the GNU General Public | ||
| 7 | * License version 2. This program is licensed "as is" without any | ||
| 8 | * warranty of any kind, whether express or implied. | ||
| 9 | */ | ||
| 10 | #include <mach/hardware.h> | ||
| 11 | #include <mach/platform.h> | ||
| 12 | #include <mach/irqs.h> | ||
| 13 | |||
| 14 | .macro get_irqnr_preamble, base, tmp | ||
| 15 | .endm | ||
| 16 | |||
| 17 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
| 18 | /* FIXME: should not be using soo many LDRs here */ | ||
| 19 | ldr \base, =IO_ADDRESS(INTEGRATOR_IC_BASE) | ||
| 20 | mov \irqnr, #IRQ_PIC_START | ||
| 21 | ldr \irqstat, [\base, #IRQ_STATUS] @ get masked status | ||
| 22 | ldr \base, =IO_ADDRESS(INTEGRATOR_HDR_BASE) | ||
| 23 | teq \irqstat, #0 | ||
| 24 | ldreq \irqstat, [\base, #(INTEGRATOR_HDR_IC_OFFSET+IRQ_STATUS)] | ||
| 25 | moveq \irqnr, #IRQ_CIC_START | ||
| 26 | |||
| 27 | 1001: tst \irqstat, #15 | ||
| 28 | bne 1002f | ||
| 29 | add \irqnr, \irqnr, #4 | ||
| 30 | movs \irqstat, \irqstat, lsr #4 | ||
| 31 | bne 1001b | ||
| 32 | 1002: tst \irqstat, #1 | ||
| 33 | bne 1003f | ||
| 34 | add \irqnr, \irqnr, #1 | ||
| 35 | movs \irqstat, \irqstat, lsr #1 | ||
| 36 | bne 1002b | ||
| 37 | 1003: /* EQ will be set if no irqs pending */ | ||
| 38 | .endm | ||
| 39 | |||
diff --git a/arch/arm/mach-integrator/include/mach/irqs.h b/arch/arm/mach-integrator/include/mach/irqs.h index a19a1a2fcf6b..7371018455d2 100644 --- a/arch/arm/mach-integrator/include/mach/irqs.h +++ b/arch/arm/mach-integrator/include/mach/irqs.h | |||
| @@ -22,37 +22,37 @@ | |||
| 22 | /* | 22 | /* |
| 23 | * Interrupt numbers | 23 | * Interrupt numbers |
| 24 | */ | 24 | */ |
| 25 | #define IRQ_PIC_START 0 | 25 | #define IRQ_PIC_START 1 |
| 26 | #define IRQ_SOFTINT 0 | 26 | #define IRQ_SOFTINT 1 |
| 27 | #define IRQ_UARTINT0 1 | 27 | #define IRQ_UARTINT0 2 |
| 28 | #define IRQ_UARTINT1 2 | 28 | #define IRQ_UARTINT1 3 |
| 29 | #define IRQ_KMIINT0 3 | 29 | #define IRQ_KMIINT0 4 |
| 30 | #define IRQ_KMIINT1 4 | 30 | #define IRQ_KMIINT1 5 |
| 31 | #define IRQ_TIMERINT0 5 | 31 | #define IRQ_TIMERINT0 6 |
| 32 | #define IRQ_TIMERINT1 6 | 32 | #define IRQ_TIMERINT1 7 |
| 33 | #define IRQ_TIMERINT2 7 | 33 | #define IRQ_TIMERINT2 8 |
| 34 | #define IRQ_RTCINT 8 | 34 | #define IRQ_RTCINT 9 |
| 35 | #define IRQ_AP_EXPINT0 9 | 35 | #define IRQ_AP_EXPINT0 10 |
| 36 | #define IRQ_AP_EXPINT1 10 | 36 | #define IRQ_AP_EXPINT1 11 |
| 37 | #define IRQ_AP_EXPINT2 11 | 37 | #define IRQ_AP_EXPINT2 12 |
| 38 | #define IRQ_AP_EXPINT3 12 | 38 | #define IRQ_AP_EXPINT3 13 |
| 39 | #define IRQ_AP_PCIINT0 13 | 39 | #define IRQ_AP_PCIINT0 14 |
| 40 | #define IRQ_AP_PCIINT1 14 | 40 | #define IRQ_AP_PCIINT1 15 |
| 41 | #define IRQ_AP_PCIINT2 15 | 41 | #define IRQ_AP_PCIINT2 16 |
| 42 | #define IRQ_AP_PCIINT3 16 | 42 | #define IRQ_AP_PCIINT3 17 |
| 43 | #define IRQ_AP_V3INT 17 | 43 | #define IRQ_AP_V3INT 18 |
| 44 | #define IRQ_AP_CPINT0 18 | 44 | #define IRQ_AP_CPINT0 19 |
| 45 | #define IRQ_AP_CPINT1 19 | 45 | #define IRQ_AP_CPINT1 20 |
| 46 | #define IRQ_AP_LBUSTIMEOUT 20 | 46 | #define IRQ_AP_LBUSTIMEOUT 21 |
| 47 | #define IRQ_AP_APCINT 21 | 47 | #define IRQ_AP_APCINT 22 |
| 48 | #define IRQ_CP_CLCDCINT 22 | 48 | #define IRQ_CP_CLCDCINT 23 |
| 49 | #define IRQ_CP_MMCIINT0 23 | 49 | #define IRQ_CP_MMCIINT0 24 |
| 50 | #define IRQ_CP_MMCIINT1 24 | 50 | #define IRQ_CP_MMCIINT1 25 |
| 51 | #define IRQ_CP_AACIINT 25 | 51 | #define IRQ_CP_AACIINT 26 |
| 52 | #define IRQ_CP_CPPLDINT 26 | 52 | #define IRQ_CP_CPPLDINT 27 |
| 53 | #define IRQ_CP_ETHINT 27 | 53 | #define IRQ_CP_ETHINT 28 |
| 54 | #define IRQ_CP_TSPENINT 28 | 54 | #define IRQ_CP_TSPENINT 29 |
| 55 | #define IRQ_PIC_END 31 | 55 | #define IRQ_PIC_END 29 |
| 56 | 56 | ||
| 57 | #define IRQ_CIC_START 32 | 57 | #define IRQ_CIC_START 32 |
| 58 | #define IRQ_CM_SOFTINT 32 | 58 | #define IRQ_CM_SOFTINT 32 |
| @@ -80,4 +80,3 @@ | |||
| 80 | 80 | ||
| 81 | #define NR_IRQS_INTEGRATOR_AP 34 | 81 | #define NR_IRQS_INTEGRATOR_AP 34 |
| 82 | #define NR_IRQS_INTEGRATOR_CP 47 | 82 | #define NR_IRQS_INTEGRATOR_CP 47 |
| 83 | |||
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index 871f148ffd72..c857501c5783 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
| @@ -162,12 +162,6 @@ static void __init ap_map_io(void) | |||
| 162 | 162 | ||
| 163 | #define INTEGRATOR_SC_VALID_INT 0x003fffff | 163 | #define INTEGRATOR_SC_VALID_INT 0x003fffff |
| 164 | 164 | ||
| 165 | static struct fpga_irq_data sc_irq_data = { | ||
| 166 | .base = VA_IC_BASE, | ||
| 167 | .irq_start = 0, | ||
| 168 | .chip.name = "SC", | ||
| 169 | }; | ||
| 170 | |||
| 171 | static void __init ap_init_irq(void) | 165 | static void __init ap_init_irq(void) |
| 172 | { | 166 | { |
| 173 | /* Disable all interrupts initially. */ | 167 | /* Disable all interrupts initially. */ |
| @@ -178,7 +172,8 @@ static void __init ap_init_irq(void) | |||
| 178 | writel(-1, VA_IC_BASE + IRQ_ENABLE_CLEAR); | 172 | writel(-1, VA_IC_BASE + IRQ_ENABLE_CLEAR); |
| 179 | writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR); | 173 | writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR); |
| 180 | 174 | ||
| 181 | fpga_irq_init(-1, INTEGRATOR_SC_VALID_INT, &sc_irq_data); | 175 | fpga_irq_init(VA_IC_BASE, "SC", IRQ_PIC_START, |
| 176 | -1, INTEGRATOR_SC_VALID_INT, NULL); | ||
| 182 | } | 177 | } |
| 183 | 178 | ||
| 184 | #ifdef CONFIG_PM | 179 | #ifdef CONFIG_PM |
| @@ -478,6 +473,7 @@ MACHINE_START(INTEGRATOR, "ARM-Integrator") | |||
| 478 | .nr_irqs = NR_IRQS_INTEGRATOR_AP, | 473 | .nr_irqs = NR_IRQS_INTEGRATOR_AP, |
| 479 | .init_early = integrator_init_early, | 474 | .init_early = integrator_init_early, |
| 480 | .init_irq = ap_init_irq, | 475 | .init_irq = ap_init_irq, |
| 476 | .handle_irq = fpga_handle_irq, | ||
| 481 | .timer = &ap_timer, | 477 | .timer = &ap_timer, |
| 482 | .init_machine = ap_init, | 478 | .init_machine = ap_init, |
| 483 | .restart = integrator_restart, | 479 | .restart = integrator_restart, |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 48a115a91d9d..a56c53608939 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
| @@ -143,30 +143,14 @@ static void __init intcp_map_io(void) | |||
| 143 | iotable_init(intcp_io_desc, ARRAY_SIZE(intcp_io_desc)); | 143 | iotable_init(intcp_io_desc, ARRAY_SIZE(intcp_io_desc)); |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | static struct fpga_irq_data cic_irq_data = { | ||
| 147 | .base = INTCP_VA_CIC_BASE, | ||
| 148 | .irq_start = IRQ_CIC_START, | ||
| 149 | .chip.name = "CIC", | ||
| 150 | }; | ||
| 151 | |||
| 152 | static struct fpga_irq_data pic_irq_data = { | ||
| 153 | .base = INTCP_VA_PIC_BASE, | ||
| 154 | .irq_start = IRQ_PIC_START, | ||
| 155 | .chip.name = "PIC", | ||
| 156 | }; | ||
| 157 | |||
| 158 | static struct fpga_irq_data sic_irq_data = { | ||
| 159 | .base = INTCP_VA_SIC_BASE, | ||
| 160 | .irq_start = IRQ_SIC_START, | ||
| 161 | .chip.name = "SIC", | ||
| 162 | }; | ||
| 163 | |||
| 164 | static void __init intcp_init_irq(void) | 146 | static void __init intcp_init_irq(void) |
| 165 | { | 147 | { |
| 166 | u32 pic_mask, sic_mask; | 148 | u32 pic_mask, cic_mask, sic_mask; |
| 167 | 149 | ||
| 150 | /* These masks are for the HW IRQ registers */ | ||
| 168 | pic_mask = ~((~0u) << (11 - IRQ_PIC_START)); | 151 | pic_mask = ~((~0u) << (11 - IRQ_PIC_START)); |
| 169 | pic_mask |= (~((~0u) << (29 - 22))) << 22; | 152 | pic_mask |= (~((~0u) << (29 - 22))) << 22; |
| 153 | cic_mask = ~((~0u) << (1 + IRQ_CIC_END - IRQ_CIC_START)); | ||
| 170 | sic_mask = ~((~0u) << (1 + IRQ_SIC_END - IRQ_SIC_START)); | 154 | sic_mask = ~((~0u) << (1 + IRQ_SIC_END - IRQ_SIC_START)); |
| 171 | 155 | ||
| 172 | /* | 156 | /* |
| @@ -179,12 +163,14 @@ static void __init intcp_init_irq(void) | |||
| 179 | writel(sic_mask, INTCP_VA_SIC_BASE + IRQ_ENABLE_CLEAR); | 163 | writel(sic_mask, INTCP_VA_SIC_BASE + IRQ_ENABLE_CLEAR); |
| 180 | writel(sic_mask, INTCP_VA_SIC_BASE + FIQ_ENABLE_CLEAR); | 164 | writel(sic_mask, INTCP_VA_SIC_BASE + FIQ_ENABLE_CLEAR); |
| 181 | 165 | ||
| 182 | fpga_irq_init(-1, pic_mask, &pic_irq_data); | 166 | fpga_irq_init(INTCP_VA_PIC_BASE, "PIC", IRQ_PIC_START, |
| 167 | -1, pic_mask, NULL); | ||
| 183 | 168 | ||
| 184 | fpga_irq_init(-1, ~((~0u) << (1 + IRQ_CIC_END - IRQ_CIC_START)), | 169 | fpga_irq_init(INTCP_VA_CIC_BASE, "CIC", IRQ_CIC_START, |
| 185 | &cic_irq_data); | 170 | -1, cic_mask, NULL); |
| 186 | 171 | ||
| 187 | fpga_irq_init(IRQ_CP_CPPLDINT, sic_mask, &sic_irq_data); | 172 | fpga_irq_init(INTCP_VA_SIC_BASE, "SIC", IRQ_SIC_START, |
| 173 | IRQ_CP_CPPLDINT, sic_mask, NULL); | ||
| 188 | } | 174 | } |
| 189 | 175 | ||
| 190 | /* | 176 | /* |
| @@ -467,6 +453,7 @@ MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP") | |||
| 467 | .nr_irqs = NR_IRQS_INTEGRATOR_CP, | 453 | .nr_irqs = NR_IRQS_INTEGRATOR_CP, |
| 468 | .init_early = intcp_init_early, | 454 | .init_early = intcp_init_early, |
| 469 | .init_irq = intcp_init_irq, | 455 | .init_irq = intcp_init_irq, |
| 456 | .handle_irq = fpga_handle_irq, | ||
| 470 | .timer = &cp_timer, | 457 | .timer = &cp_timer, |
| 471 | .init_machine = intcp_init, | 458 | .init_machine = intcp_init, |
| 472 | .restart = integrator_restart, | 459 | .restart = integrator_restart, |
diff --git a/arch/arm/mach-integrator/pci.c b/arch/arm/mach-integrator/pci.c index f1ca9c122861..6c1667e728f5 100644 --- a/arch/arm/mach-integrator/pci.c +++ b/arch/arm/mach-integrator/pci.c | |||
| @@ -70,21 +70,10 @@ | |||
| 70 | */ | 70 | */ |
| 71 | static u8 __init integrator_swizzle(struct pci_dev *dev, u8 *pinp) | 71 | static u8 __init integrator_swizzle(struct pci_dev *dev, u8 *pinp) |
| 72 | { | 72 | { |
| 73 | int pin = *pinp; | 73 | if (*pinp == 0) |
| 74 | *pinp = 1; | ||
| 74 | 75 | ||
| 75 | if (pin == 0) | 76 | return pci_common_swizzle(dev, pinp); |
| 76 | pin = 1; | ||
| 77 | |||
| 78 | while (dev->bus->self) { | ||
| 79 | pin = pci_swizzle_interrupt_pin(dev, pin); | ||
| 80 | /* | ||
| 81 | * move up the chain of bridges, swizzling as we go. | ||
| 82 | */ | ||
| 83 | dev = dev->bus->self; | ||
| 84 | } | ||
| 85 | *pinp = pin; | ||
| 86 | |||
| 87 | return PCI_SLOT(dev->devfn); | ||
| 88 | } | 77 | } |
| 89 | 78 | ||
| 90 | static int irq_tab[4] __initdata = { | 79 | static int irq_tab[4] __initdata = { |
| @@ -109,7 +98,7 @@ static struct hw_pci integrator_pci __initdata = { | |||
| 109 | .map_irq = integrator_map_irq, | 98 | .map_irq = integrator_map_irq, |
| 110 | .setup = pci_v3_setup, | 99 | .setup = pci_v3_setup, |
| 111 | .nr_controllers = 1, | 100 | .nr_controllers = 1, |
| 112 | .scan = pci_v3_scan_bus, | 101 | .ops = &pci_v3_ops, |
| 113 | .preinit = pci_v3_preinit, | 102 | .preinit = pci_v3_preinit, |
| 114 | .postinit = pci_v3_postinit, | 103 | .postinit = pci_v3_postinit, |
| 115 | }; | 104 | }; |
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index 67e6f9a9d1a0..b866880e82ac 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
| @@ -340,7 +340,7 @@ static int v3_write_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
| 340 | return PCIBIOS_SUCCESSFUL; | 340 | return PCIBIOS_SUCCESSFUL; |
| 341 | } | 341 | } |
| 342 | 342 | ||
| 343 | static struct pci_ops pci_v3_ops = { | 343 | struct pci_ops pci_v3_ops = { |
| 344 | .read = v3_read_config, | 344 | .read = v3_read_config, |
| 345 | .write = v3_write_config, | 345 | .write = v3_write_config, |
| 346 | }; | 346 | }; |
| @@ -488,12 +488,6 @@ int __init pci_v3_setup(int nr, struct pci_sys_data *sys) | |||
| 488 | return ret; | 488 | return ret; |
| 489 | } | 489 | } |
| 490 | 490 | ||
| 491 | struct pci_bus * __init pci_v3_scan_bus(int nr, struct pci_sys_data *sys) | ||
| 492 | { | ||
| 493 | return pci_scan_root_bus(NULL, sys->busnr, &pci_v3_ops, sys, | ||
| 494 | &sys->resources); | ||
| 495 | } | ||
| 496 | |||
| 497 | /* | 491 | /* |
| 498 | * V3_LB_BASE? - local bus address | 492 | * V3_LB_BASE? - local bus address |
| 499 | * V3_LB_MAP? - pci bus address | 493 | * V3_LB_MAP? - pci bus address |
diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c index 5c96b73e6964..e3f3e7daa79e 100644 --- a/arch/arm/mach-iop13xx/iq81340mc.c +++ b/arch/arm/mach-iop13xx/iq81340mc.c | |||
| @@ -54,7 +54,6 @@ iq81340mc_pcix_map_irq(const struct pci_dev *dev, u8 idsel, u8 pin) | |||
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | static struct hw_pci iq81340mc_pci __initdata = { | 56 | static struct hw_pci iq81340mc_pci __initdata = { |
| 57 | .swizzle = pci_std_swizzle, | ||
| 58 | .nr_controllers = 0, | 57 | .nr_controllers = 0, |
| 59 | .setup = iop13xx_pci_setup, | 58 | .setup = iop13xx_pci_setup, |
| 60 | .map_irq = iq81340mc_pcix_map_irq, | 59 | .map_irq = iq81340mc_pcix_map_irq, |
diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c index aa4dd750135a..060cddde2fd4 100644 --- a/arch/arm/mach-iop13xx/iq81340sc.c +++ b/arch/arm/mach-iop13xx/iq81340sc.c | |||
| @@ -56,7 +56,6 @@ iq81340sc_atux_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) | |||
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | static struct hw_pci iq81340sc_pci __initdata = { | 58 | static struct hw_pci iq81340sc_pci __initdata = { |
| 59 | .swizzle = pci_std_swizzle, | ||
| 60 | .nr_controllers = 0, | 59 | .nr_controllers = 0, |
| 61 | .setup = iop13xx_pci_setup, | 60 | .setup = iop13xx_pci_setup, |
| 62 | .scan = iop13xx_scan_bus, | 61 | .scan = iop13xx_scan_bus, |
diff --git a/arch/arm/mach-iop32x/em7210.c b/arch/arm/mach-iop32x/em7210.c index 24069e03fdc1..9f369f09c29d 100644 --- a/arch/arm/mach-iop32x/em7210.c +++ b/arch/arm/mach-iop32x/em7210.c | |||
| @@ -103,11 +103,10 @@ em7210_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | static struct hw_pci em7210_pci __initdata = { | 105 | static struct hw_pci em7210_pci __initdata = { |
| 106 | .swizzle = pci_std_swizzle, | ||
| 107 | .nr_controllers = 1, | 106 | .nr_controllers = 1, |
| 107 | .ops = &iop3xx_ops, | ||
| 108 | .setup = iop3xx_pci_setup, | 108 | .setup = iop3xx_pci_setup, |
| 109 | .preinit = iop3xx_pci_preinit, | 109 | .preinit = iop3xx_pci_preinit, |
| 110 | .scan = iop3xx_pci_scan_bus, | ||
| 111 | .map_irq = em7210_pci_map_irq, | 110 | .map_irq = em7210_pci_map_irq, |
| 112 | }; | 111 | }; |
| 113 | 112 | ||
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c index 204e1d1cd766..c15a100ba779 100644 --- a/arch/arm/mach-iop32x/glantank.c +++ b/arch/arm/mach-iop32x/glantank.c | |||
| @@ -96,11 +96,10 @@ glantank_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | static struct hw_pci glantank_pci __initdata = { | 98 | static struct hw_pci glantank_pci __initdata = { |
| 99 | .swizzle = pci_std_swizzle, | ||
| 100 | .nr_controllers = 1, | 99 | .nr_controllers = 1, |
| 100 | .ops = &iop3xx_ops, | ||
| 101 | .setup = iop3xx_pci_setup, | 101 | .setup = iop3xx_pci_setup, |
| 102 | .preinit = iop3xx_pci_preinit, | 102 | .preinit = iop3xx_pci_preinit, |
| 103 | .scan = iop3xx_pci_scan_bus, | ||
| 104 | .map_irq = glantank_pci_map_irq, | 103 | .map_irq = glantank_pci_map_irq, |
| 105 | }; | 104 | }; |
| 106 | 105 | ||
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c index 3eb642af1cdc..ddd1c7ecfe57 100644 --- a/arch/arm/mach-iop32x/iq31244.c +++ b/arch/arm/mach-iop32x/iq31244.c | |||
| @@ -130,11 +130,10 @@ ep80219_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | static struct hw_pci ep80219_pci __initdata = { | 132 | static struct hw_pci ep80219_pci __initdata = { |
| 133 | .swizzle = pci_std_swizzle, | ||
| 134 | .nr_controllers = 1, | 133 | .nr_controllers = 1, |
| 134 | .ops = &iop3xx_ops, | ||
| 135 | .setup = iop3xx_pci_setup, | 135 | .setup = iop3xx_pci_setup, |
| 136 | .preinit = iop3xx_pci_preinit, | 136 | .preinit = iop3xx_pci_preinit, |
| 137 | .scan = iop3xx_pci_scan_bus, | ||
| 138 | .map_irq = ep80219_pci_map_irq, | 137 | .map_irq = ep80219_pci_map_irq, |
| 139 | }; | 138 | }; |
| 140 | 139 | ||
| @@ -166,11 +165,10 @@ iq31244_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 166 | } | 165 | } |
| 167 | 166 | ||
| 168 | static struct hw_pci iq31244_pci __initdata = { | 167 | static struct hw_pci iq31244_pci __initdata = { |
| 169 | .swizzle = pci_std_swizzle, | ||
| 170 | .nr_controllers = 1, | 168 | .nr_controllers = 1, |
| 169 | .ops = &iop3xx_ops, | ||
| 171 | .setup = iop3xx_pci_setup, | 170 | .setup = iop3xx_pci_setup, |
| 172 | .preinit = iop3xx_pci_preinit, | 171 | .preinit = iop3xx_pci_preinit, |
| 173 | .scan = iop3xx_pci_scan_bus, | ||
| 174 | .map_irq = iq31244_pci_map_irq, | 172 | .map_irq = iq31244_pci_map_irq, |
| 175 | }; | 173 | }; |
| 176 | 174 | ||
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c index 2ec724b58a2c..bf155e6a3b45 100644 --- a/arch/arm/mach-iop32x/iq80321.c +++ b/arch/arm/mach-iop32x/iq80321.c | |||
| @@ -101,11 +101,10 @@ iq80321_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | static struct hw_pci iq80321_pci __initdata = { | 103 | static struct hw_pci iq80321_pci __initdata = { |
| 104 | .swizzle = pci_std_swizzle, | ||
| 105 | .nr_controllers = 1, | 104 | .nr_controllers = 1, |
| 105 | .ops = &iop3xx_ops, | ||
| 106 | .setup = iop3xx_pci_setup, | 106 | .setup = iop3xx_pci_setup, |
| 107 | .preinit = iop3xx_pci_preinit_cond, | 107 | .preinit = iop3xx_pci_preinit_cond, |
| 108 | .scan = iop3xx_pci_scan_bus, | ||
| 109 | .map_irq = iq80321_pci_map_irq, | 108 | .map_irq = iq80321_pci_map_irq, |
| 110 | }; | 109 | }; |
| 111 | 110 | ||
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c index 6b6d55912444..5a7ae91e8849 100644 --- a/arch/arm/mach-iop32x/n2100.c +++ b/arch/arm/mach-iop32x/n2100.c | |||
| @@ -114,11 +114,10 @@ n2100_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | static struct hw_pci n2100_pci __initdata = { | 116 | static struct hw_pci n2100_pci __initdata = { |
| 117 | .swizzle = pci_std_swizzle, | ||
| 118 | .nr_controllers = 1, | 117 | .nr_controllers = 1, |
| 118 | .ops = &iop3xx_ops, | ||
| 119 | .setup = iop3xx_pci_setup, | 119 | .setup = iop3xx_pci_setup, |
| 120 | .preinit = iop3xx_pci_preinit, | 120 | .preinit = iop3xx_pci_preinit, |
| 121 | .scan = iop3xx_pci_scan_bus, | ||
| 122 | .map_irq = n2100_pci_map_irq, | 121 | .map_irq = n2100_pci_map_irq, |
| 123 | }; | 122 | }; |
| 124 | 123 | ||
diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c index abce934f3816..e74a7debe793 100644 --- a/arch/arm/mach-iop33x/iq80331.c +++ b/arch/arm/mach-iop33x/iq80331.c | |||
| @@ -84,11 +84,10 @@ iq80331_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | static struct hw_pci iq80331_pci __initdata = { | 86 | static struct hw_pci iq80331_pci __initdata = { |
| 87 | .swizzle = pci_std_swizzle, | ||
| 88 | .nr_controllers = 1, | 87 | .nr_controllers = 1, |
| 88 | .ops = &iop3xx_ops, | ||
| 89 | .setup = iop3xx_pci_setup, | 89 | .setup = iop3xx_pci_setup, |
| 90 | .preinit = iop3xx_pci_preinit_cond, | 90 | .preinit = iop3xx_pci_preinit_cond, |
| 91 | .scan = iop3xx_pci_scan_bus, | ||
| 92 | .map_irq = iq80331_pci_map_irq, | 91 | .map_irq = iq80331_pci_map_irq, |
| 93 | }; | 92 | }; |
| 94 | 93 | ||
diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c index 7513559e25bb..e2f5beece6e8 100644 --- a/arch/arm/mach-iop33x/iq80332.c +++ b/arch/arm/mach-iop33x/iq80332.c | |||
| @@ -84,11 +84,10 @@ iq80332_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | static struct hw_pci iq80332_pci __initdata = { | 86 | static struct hw_pci iq80332_pci __initdata = { |
| 87 | .swizzle = pci_std_swizzle, | ||
| 88 | .nr_controllers = 1, | 87 | .nr_controllers = 1, |
| 88 | .ops = &iop3xx_ops, | ||
| 89 | .setup = iop3xx_pci_setup, | 89 | .setup = iop3xx_pci_setup, |
| 90 | .preinit = iop3xx_pci_preinit_cond, | 90 | .preinit = iop3xx_pci_preinit_cond, |
| 91 | .scan = iop3xx_pci_scan_bus, | ||
| 92 | .map_irq = iq80332_pci_map_irq, | 91 | .map_irq = iq80332_pci_map_irq, |
| 93 | }; | 92 | }; |
| 94 | 93 | ||
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c index 4867f408617c..73df2f688813 100644 --- a/arch/arm/mach-ixp2000/enp2611.c +++ b/arch/arm/mach-ixp2000/enp2611.c | |||
| @@ -141,13 +141,6 @@ static struct pci_ops enp2611_pci_ops = { | |||
| 141 | .write = enp2611_pci_write_config | 141 | .write = enp2611_pci_write_config |
| 142 | }; | 142 | }; |
| 143 | 143 | ||
| 144 | static struct pci_bus * __init enp2611_pci_scan_bus(int nr, | ||
| 145 | struct pci_sys_data *sys) | ||
| 146 | { | ||
| 147 | return pci_scan_root_bus(NULL, sys->busnr, &enp2611_pci_ops, sys, | ||
| 148 | &sys->resources); | ||
| 149 | } | ||
| 150 | |||
| 151 | static int __init enp2611_pci_map_irq(const struct pci_dev *dev, u8 slot, | 144 | static int __init enp2611_pci_map_irq(const struct pci_dev *dev, u8 slot, |
| 152 | u8 pin) | 145 | u8 pin) |
| 153 | { | 146 | { |
| @@ -180,9 +173,9 @@ static int __init enp2611_pci_map_irq(const struct pci_dev *dev, u8 slot, | |||
| 180 | 173 | ||
| 181 | struct hw_pci enp2611_pci __initdata = { | 174 | struct hw_pci enp2611_pci __initdata = { |
| 182 | .nr_controllers = 1, | 175 | .nr_controllers = 1, |
| 176 | .ops = &enp2611_pci_ops, | ||
| 183 | .setup = enp2611_pci_setup, | 177 | .setup = enp2611_pci_setup, |
| 184 | .preinit = enp2611_pci_preinit, | 178 | .preinit = enp2611_pci_preinit, |
| 185 | .scan = enp2611_pci_scan_bus, | ||
| 186 | .map_irq = enp2611_pci_map_irq, | 179 | .map_irq = enp2611_pci_map_irq, |
| 187 | }; | 180 | }; |
| 188 | 181 | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/platform.h b/arch/arm/mach-ixp2000/include/mach/platform.h index bb0f8dcf9ee1..6b500c0858be 100644 --- a/arch/arm/mach-ixp2000/include/mach/platform.h +++ b/arch/arm/mach-ixp2000/include/mach/platform.h | |||
| @@ -127,10 +127,10 @@ unsigned long ixp2000_gettimeoffset(void); | |||
| 127 | 127 | ||
| 128 | struct pci_sys_data; | 128 | struct pci_sys_data; |
| 129 | 129 | ||
| 130 | extern struct pci_ops ixp2000_pci_ops; | ||
| 130 | u32 *ixp2000_pci_config_addr(unsigned int bus, unsigned int devfn, int where); | 131 | u32 *ixp2000_pci_config_addr(unsigned int bus, unsigned int devfn, int where); |
| 131 | void ixp2000_pci_preinit(void); | 132 | void ixp2000_pci_preinit(void); |
| 132 | int ixp2000_pci_setup(int, struct pci_sys_data*); | 133 | int ixp2000_pci_setup(int, struct pci_sys_data*); |
| 133 | struct pci_bus* ixp2000_pci_scan_bus(int, struct pci_sys_data*); | ||
| 134 | int ixp2000_pci_read_config(struct pci_bus*, unsigned int, int, int, u32 *); | 134 | int ixp2000_pci_read_config(struct pci_bus*, unsigned int, int, int, u32 *); |
| 135 | int ixp2000_pci_write_config(struct pci_bus*, unsigned int, int, int, u32); | 135 | int ixp2000_pci_write_config(struct pci_bus*, unsigned int, int, int, u32); |
| 136 | 136 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c index 915ad49e3b8f..4ec44801d303 100644 --- a/arch/arm/mach-ixp2000/ixdp2400.c +++ b/arch/arm/mach-ixp2000/ixdp2400.c | |||
| @@ -146,10 +146,10 @@ static void ixdp2400_pci_postinit(void) | |||
| 146 | 146 | ||
| 147 | static struct hw_pci ixdp2400_pci __initdata = { | 147 | static struct hw_pci ixdp2400_pci __initdata = { |
| 148 | .nr_controllers = 1, | 148 | .nr_controllers = 1, |
| 149 | .ops = &ixp2000_pci_ops, | ||
| 149 | .setup = ixdp2400_pci_setup, | 150 | .setup = ixdp2400_pci_setup, |
| 150 | .preinit = ixdp2400_pci_preinit, | 151 | .preinit = ixdp2400_pci_preinit, |
| 151 | .postinit = ixdp2400_pci_postinit, | 152 | .postinit = ixdp2400_pci_postinit, |
| 152 | .scan = ixp2000_pci_scan_bus, | ||
| 153 | .map_irq = ixdp2400_pci_map_irq, | 153 | .map_irq = ixdp2400_pci_map_irq, |
| 154 | }; | 154 | }; |
| 155 | 155 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c index a9f1819ea049..44378c31d177 100644 --- a/arch/arm/mach-ixp2000/ixdp2800.c +++ b/arch/arm/mach-ixp2000/ixdp2800.c | |||
| @@ -246,10 +246,10 @@ static void __init ixdp2800_pci_postinit(void) | |||
| 246 | 246 | ||
| 247 | struct __initdata hw_pci ixdp2800_pci __initdata = { | 247 | struct __initdata hw_pci ixdp2800_pci __initdata = { |
| 248 | .nr_controllers = 1, | 248 | .nr_controllers = 1, |
| 249 | .ops = &ixp2000_pci_ops, | ||
| 249 | .setup = ixdp2800_pci_setup, | 250 | .setup = ixdp2800_pci_setup, |
| 250 | .preinit = ixdp2800_pci_preinit, | 251 | .preinit = ixdp2800_pci_preinit, |
| 251 | .postinit = ixdp2800_pci_postinit, | 252 | .postinit = ixdp2800_pci_postinit, |
| 252 | .scan = ixp2000_pci_scan_bus, | ||
| 253 | .map_irq = ixdp2800_pci_map_irq, | 253 | .map_irq = ixdp2800_pci_map_irq, |
| 254 | }; | 254 | }; |
| 255 | 255 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c index 5196c39cdba4..af8b801d7d59 100644 --- a/arch/arm/mach-ixp2000/ixdp2x01.c +++ b/arch/arm/mach-ixp2000/ixdp2x01.c | |||
| @@ -327,9 +327,9 @@ static int ixdp2x01_pci_setup(int nr, struct pci_sys_data *sys) | |||
| 327 | 327 | ||
| 328 | struct hw_pci ixdp2x01_pci __initdata = { | 328 | struct hw_pci ixdp2x01_pci __initdata = { |
| 329 | .nr_controllers = 1, | 329 | .nr_controllers = 1, |
| 330 | .ops = &ixp2000_pci_ops, | ||
| 330 | .setup = ixdp2x01_pci_setup, | 331 | .setup = ixdp2x01_pci_setup, |
| 331 | .preinit = ixdp2x01_pci_preinit, | 332 | .preinit = ixdp2x01_pci_preinit, |
| 332 | .scan = ixp2000_pci_scan_bus, | ||
| 333 | .map_irq = ixdp2x01_pci_map_irq, | 333 | .map_irq = ixdp2x01_pci_map_irq, |
| 334 | }; | 334 | }; |
| 335 | 335 | ||
diff --git a/arch/arm/mach-ixp2000/pci.c b/arch/arm/mach-ixp2000/pci.c index 9c02de932fac..d706838db023 100644 --- a/arch/arm/mach-ixp2000/pci.c +++ b/arch/arm/mach-ixp2000/pci.c | |||
| @@ -124,17 +124,11 @@ int ixp2000_pci_write_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | 126 | ||
| 127 | static struct pci_ops ixp2000_pci_ops = { | 127 | struct pci_ops ixp2000_pci_ops = { |
| 128 | .read = ixp2000_pci_read_config, | 128 | .read = ixp2000_pci_read_config, |
| 129 | .write = ixp2000_pci_write_config | 129 | .write = ixp2000_pci_write_config |
| 130 | }; | 130 | }; |
| 131 | 131 | ||
| 132 | struct pci_bus *ixp2000_pci_scan_bus(int nr, struct pci_sys_data *sysdata) | ||
| 133 | { | ||
| 134 | return pci_scan_root_bus(NULL, sysdata->busnr, &ixp2000_pci_ops, | ||
| 135 | sysdata, &sysdata->resources); | ||
| 136 | } | ||
| 137 | |||
| 138 | 132 | ||
| 139 | int ixp2000_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | 133 | int ixp2000_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) |
| 140 | { | 134 | { |
diff --git a/arch/arm/mach-ixp23xx/include/mach/platform.h b/arch/arm/mach-ixp23xx/include/mach/platform.h index 50de558e722e..798d8b42ab4a 100644 --- a/arch/arm/mach-ixp23xx/include/mach/platform.h +++ b/arch/arm/mach-ixp23xx/include/mach/platform.h | |||
| @@ -37,7 +37,7 @@ void ixp23xx_sys_init(void); | |||
| 37 | void ixp23xx_restart(char, const char *); | 37 | void ixp23xx_restart(char, const char *); |
| 38 | int ixp23xx_pci_setup(int, struct pci_sys_data *); | 38 | int ixp23xx_pci_setup(int, struct pci_sys_data *); |
| 39 | void ixp23xx_pci_preinit(void); | 39 | void ixp23xx_pci_preinit(void); |
| 40 | struct pci_bus *ixp23xx_pci_scan_bus(int, struct pci_sys_data*); | 40 | extern struct pci_ops ixp23xx_pci_ops; |
| 41 | void ixp23xx_pci_slave_init(void); | 41 | void ixp23xx_pci_slave_init(void); |
| 42 | 42 | ||
| 43 | extern struct sys_timer ixp23xx_timer; | 43 | extern struct sys_timer ixp23xx_timer; |
diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c index b0e07db5ceaf..8b48e32a8a62 100644 --- a/arch/arm/mach-ixp23xx/ixdp2351.c +++ b/arch/arm/mach-ixp23xx/ixdp2351.c | |||
| @@ -251,9 +251,9 @@ static int __init ixdp2351_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 251 | 251 | ||
| 252 | struct hw_pci ixdp2351_pci __initdata = { | 252 | struct hw_pci ixdp2351_pci __initdata = { |
| 253 | .nr_controllers = 1, | 253 | .nr_controllers = 1, |
| 254 | .ops = &ixp23xx_pci_ops, | ||
| 254 | .preinit = ixp23xx_pci_preinit, | 255 | .preinit = ixp23xx_pci_preinit, |
| 255 | .setup = ixp23xx_pci_setup, | 256 | .setup = ixp23xx_pci_setup, |
| 256 | .scan = ixp23xx_pci_scan_bus, | ||
| 257 | .map_irq = ixdp2351_map_irq, | 257 | .map_irq = ixdp2351_map_irq, |
| 258 | }; | 258 | }; |
| 259 | 259 | ||
diff --git a/arch/arm/mach-ixp23xx/pci.c b/arch/arm/mach-ixp23xx/pci.c index 911f5a58e006..9211506ef556 100644 --- a/arch/arm/mach-ixp23xx/pci.c +++ b/arch/arm/mach-ixp23xx/pci.c | |||
| @@ -140,12 +140,6 @@ struct pci_ops ixp23xx_pci_ops = { | |||
| 140 | .write = ixp23xx_pci_write_config, | 140 | .write = ixp23xx_pci_write_config, |
| 141 | }; | 141 | }; |
| 142 | 142 | ||
| 143 | struct pci_bus *ixp23xx_pci_scan_bus(int nr, struct pci_sys_data *sysdata) | ||
| 144 | { | ||
| 145 | return pci_scan_root_bus(NULL, sysdata->busnr, &ixp23xx_pci_ops, | ||
| 146 | sysdata, &sysdata->resources); | ||
| 147 | } | ||
| 148 | |||
| 149 | int ixp23xx_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | 143 | int ixp23xx_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) |
| 150 | { | 144 | { |
| 151 | volatile unsigned long temp; | 145 | volatile unsigned long temp; |
diff --git a/arch/arm/mach-ixp23xx/roadrunner.c b/arch/arm/mach-ixp23xx/roadrunner.c index eaaa3fa9fd05..8c0e5de3c609 100644 --- a/arch/arm/mach-ixp23xx/roadrunner.c +++ b/arch/arm/mach-ixp23xx/roadrunner.c | |||
| @@ -118,9 +118,9 @@ static void __init roadrunner_pci_preinit(void) | |||
| 118 | 118 | ||
| 119 | static struct hw_pci roadrunner_pci __initdata = { | 119 | static struct hw_pci roadrunner_pci __initdata = { |
| 120 | .nr_controllers = 1, | 120 | .nr_controllers = 1, |
| 121 | .ops = &ixp23xx_pci_ops, | ||
| 121 | .preinit = roadrunner_pci_preinit, | 122 | .preinit = roadrunner_pci_preinit, |
| 122 | .setup = ixp23xx_pci_setup, | 123 | .setup = ixp23xx_pci_setup, |
| 123 | .scan = ixp23xx_pci_scan_bus, | ||
| 124 | .map_irq = roadrunner_map_irq, | 124 | .map_irq = roadrunner_map_irq, |
| 125 | }; | 125 | }; |
| 126 | 126 | ||
diff --git a/arch/arm/mach-ixp4xx/avila-pci.c b/arch/arm/mach-ixp4xx/avila-pci.c index 8fea0a3c5246..548c7d43ade6 100644 --- a/arch/arm/mach-ixp4xx/avila-pci.c +++ b/arch/arm/mach-ixp4xx/avila-pci.c | |||
| @@ -65,10 +65,9 @@ static int __init avila_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 65 | 65 | ||
| 66 | struct hw_pci avila_pci __initdata = { | 66 | struct hw_pci avila_pci __initdata = { |
| 67 | .nr_controllers = 1, | 67 | .nr_controllers = 1, |
| 68 | .ops = &ixp4xx_ops, | ||
| 68 | .preinit = avila_pci_preinit, | 69 | .preinit = avila_pci_preinit, |
| 69 | .swizzle = pci_std_swizzle, | ||
| 70 | .setup = ixp4xx_setup, | 70 | .setup = ixp4xx_setup, |
| 71 | .scan = ixp4xx_scan_bus, | ||
| 72 | .map_irq = avila_map_irq, | 71 | .map_irq = avila_map_irq, |
| 73 | }; | 72 | }; |
| 74 | 73 | ||
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c index d5719eb42591..1694f01ce2b6 100644 --- a/arch/arm/mach-ixp4xx/common-pci.c +++ b/arch/arm/mach-ixp4xx/common-pci.c | |||
| @@ -480,12 +480,6 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys) | |||
| 480 | return 1; | 480 | return 1; |
| 481 | } | 481 | } |
| 482 | 482 | ||
| 483 | struct pci_bus * __devinit ixp4xx_scan_bus(int nr, struct pci_sys_data *sys) | ||
| 484 | { | ||
| 485 | return pci_scan_root_bus(NULL, sys->busnr, &ixp4xx_ops, sys, | ||
| 486 | &sys->resources); | ||
| 487 | } | ||
| 488 | |||
| 489 | int dma_set_coherent_mask(struct device *dev, u64 mask) | 483 | int dma_set_coherent_mask(struct device *dev, u64 mask) |
| 490 | { | 484 | { |
| 491 | if (mask >= SZ_64M - 1) | 485 | if (mask >= SZ_64M - 1) |
diff --git a/arch/arm/mach-ixp4xx/coyote-pci.c b/arch/arm/mach-ixp4xx/coyote-pci.c index 71f5c9c60fc3..5d14ce2aee6d 100644 --- a/arch/arm/mach-ixp4xx/coyote-pci.c +++ b/arch/arm/mach-ixp4xx/coyote-pci.c | |||
| @@ -48,10 +48,9 @@ static int __init coyote_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 48 | 48 | ||
| 49 | struct hw_pci coyote_pci __initdata = { | 49 | struct hw_pci coyote_pci __initdata = { |
| 50 | .nr_controllers = 1, | 50 | .nr_controllers = 1, |
| 51 | .ops = &ixp4xx_ops, | ||
| 51 | .preinit = coyote_pci_preinit, | 52 | .preinit = coyote_pci_preinit, |
| 52 | .swizzle = pci_std_swizzle, | ||
| 53 | .setup = ixp4xx_setup, | 53 | .setup = ixp4xx_setup, |
| 54 | .scan = ixp4xx_scan_bus, | ||
| 55 | .map_irq = coyote_map_irq, | 54 | .map_irq = coyote_map_irq, |
| 56 | }; | 55 | }; |
| 57 | 56 | ||
diff --git a/arch/arm/mach-ixp4xx/dsmg600-pci.c b/arch/arm/mach-ixp4xx/dsmg600-pci.c index 0532510b5e8c..8dca76937723 100644 --- a/arch/arm/mach-ixp4xx/dsmg600-pci.c +++ b/arch/arm/mach-ixp4xx/dsmg600-pci.c | |||
| @@ -62,10 +62,9 @@ static int __init dsmg600_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 62 | 62 | ||
| 63 | struct hw_pci __initdata dsmg600_pci = { | 63 | struct hw_pci __initdata dsmg600_pci = { |
| 64 | .nr_controllers = 1, | 64 | .nr_controllers = 1, |
| 65 | .ops = &ixp4xx_ops, | ||
| 65 | .preinit = dsmg600_pci_preinit, | 66 | .preinit = dsmg600_pci_preinit, |
| 66 | .swizzle = pci_std_swizzle, | ||
| 67 | .setup = ixp4xx_setup, | 67 | .setup = ixp4xx_setup, |
| 68 | .scan = ixp4xx_scan_bus, | ||
| 69 | .map_irq = dsmg600_map_irq, | 68 | .map_irq = dsmg600_map_irq, |
| 70 | }; | 69 | }; |
| 71 | 70 | ||
diff --git a/arch/arm/mach-ixp4xx/fsg-pci.c b/arch/arm/mach-ixp4xx/fsg-pci.c index d2ac803328f7..fd4a8625b4ae 100644 --- a/arch/arm/mach-ixp4xx/fsg-pci.c +++ b/arch/arm/mach-ixp4xx/fsg-pci.c | |||
| @@ -59,10 +59,9 @@ static int __init fsg_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 59 | 59 | ||
| 60 | struct hw_pci fsg_pci __initdata = { | 60 | struct hw_pci fsg_pci __initdata = { |
| 61 | .nr_controllers = 1, | 61 | .nr_controllers = 1, |
| 62 | .ops = &ixp4xx_ops, | ||
| 62 | .preinit = fsg_pci_preinit, | 63 | .preinit = fsg_pci_preinit, |
| 63 | .swizzle = pci_std_swizzle, | ||
| 64 | .setup = ixp4xx_setup, | 64 | .setup = ixp4xx_setup, |
| 65 | .scan = ixp4xx_scan_bus, | ||
| 66 | .map_irq = fsg_map_irq, | 65 | .map_irq = fsg_map_irq, |
| 67 | }; | 66 | }; |
| 68 | 67 | ||
diff --git a/arch/arm/mach-ixp4xx/gateway7001-pci.c b/arch/arm/mach-ixp4xx/gateway7001-pci.c index 76581fb467c4..d9d6cc089707 100644 --- a/arch/arm/mach-ixp4xx/gateway7001-pci.c +++ b/arch/arm/mach-ixp4xx/gateway7001-pci.c | |||
| @@ -47,10 +47,9 @@ static int __init gateway7001_map_irq(const struct pci_dev *dev, u8 slot, | |||
| 47 | 47 | ||
| 48 | struct hw_pci gateway7001_pci __initdata = { | 48 | struct hw_pci gateway7001_pci __initdata = { |
| 49 | .nr_controllers = 1, | 49 | .nr_controllers = 1, |
| 50 | .ops = &ixp4xx_ops, | ||
| 50 | .preinit = gateway7001_pci_preinit, | 51 | .preinit = gateway7001_pci_preinit, |
| 51 | .swizzle = pci_std_swizzle, | ||
| 52 | .setup = ixp4xx_setup, | 52 | .setup = ixp4xx_setup, |
| 53 | .scan = ixp4xx_scan_bus, | ||
| 54 | .map_irq = gateway7001_map_irq, | 53 | .map_irq = gateway7001_map_irq, |
| 55 | }; | 54 | }; |
| 56 | 55 | ||
diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c index 46bb924962ee..b800a031207c 100644 --- a/arch/arm/mach-ixp4xx/goramo_mlr.c +++ b/arch/arm/mach-ixp4xx/goramo_mlr.c | |||
| @@ -473,11 +473,10 @@ static int __init gmlr_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 473 | 473 | ||
| 474 | static struct hw_pci gmlr_hw_pci __initdata = { | 474 | static struct hw_pci gmlr_hw_pci __initdata = { |
| 475 | .nr_controllers = 1, | 475 | .nr_controllers = 1, |
| 476 | .ops = &ixp4xx_ops, | ||
| 476 | .preinit = gmlr_pci_preinit, | 477 | .preinit = gmlr_pci_preinit, |
| 477 | .postinit = gmlr_pci_postinit, | 478 | .postinit = gmlr_pci_postinit, |
| 478 | .swizzle = pci_std_swizzle, | ||
| 479 | .setup = ixp4xx_setup, | 479 | .setup = ixp4xx_setup, |
| 480 | .scan = ixp4xx_scan_bus, | ||
| 481 | .map_irq = gmlr_map_irq, | 480 | .map_irq = gmlr_map_irq, |
| 482 | }; | 481 | }; |
| 483 | 482 | ||
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-pci.c b/arch/arm/mach-ixp4xx/gtwx5715-pci.c index d68fc068c38d..551d114c9e14 100644 --- a/arch/arm/mach-ixp4xx/gtwx5715-pci.c +++ b/arch/arm/mach-ixp4xx/gtwx5715-pci.c | |||
| @@ -67,10 +67,9 @@ static int __init gtwx5715_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 67 | 67 | ||
| 68 | struct hw_pci gtwx5715_pci __initdata = { | 68 | struct hw_pci gtwx5715_pci __initdata = { |
| 69 | .nr_controllers = 1, | 69 | .nr_controllers = 1, |
| 70 | .ops = &ixp4xx_ops, | ||
| 70 | .preinit = gtwx5715_pci_preinit, | 71 | .preinit = gtwx5715_pci_preinit, |
| 71 | .swizzle = pci_std_swizzle, | ||
| 72 | .setup = ixp4xx_setup, | 72 | .setup = ixp4xx_setup, |
| 73 | .scan = ixp4xx_scan_bus, | ||
| 74 | .map_irq = gtwx5715_map_irq, | 73 | .map_irq = gtwx5715_map_irq, |
| 75 | }; | 74 | }; |
| 76 | 75 | ||
diff --git a/arch/arm/mach-ixp4xx/include/mach/platform.h b/arch/arm/mach-ixp4xx/include/mach/platform.h index b66bedc64de1..5bce94aacca9 100644 --- a/arch/arm/mach-ixp4xx/include/mach/platform.h +++ b/arch/arm/mach-ixp4xx/include/mach/platform.h | |||
| @@ -130,7 +130,7 @@ extern void ixp4xx_restart(char, const char *); | |||
| 130 | extern void ixp4xx_pci_preinit(void); | 130 | extern void ixp4xx_pci_preinit(void); |
| 131 | struct pci_sys_data; | 131 | struct pci_sys_data; |
| 132 | extern int ixp4xx_setup(int nr, struct pci_sys_data *sys); | 132 | extern int ixp4xx_setup(int nr, struct pci_sys_data *sys); |
| 133 | extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys); | 133 | extern struct pci_ops ixp4xx_ops; |
| 134 | 134 | ||
| 135 | /* | 135 | /* |
| 136 | * GPIO-functions | 136 | * GPIO-functions |
diff --git a/arch/arm/mach-ixp4xx/ixdp425-pci.c b/arch/arm/mach-ixp4xx/ixdp425-pci.c index fffd8c5e40bf..318424dd3c50 100644 --- a/arch/arm/mach-ixp4xx/ixdp425-pci.c +++ b/arch/arm/mach-ixp4xx/ixdp425-pci.c | |||
| @@ -60,10 +60,9 @@ static int __init ixdp425_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 60 | 60 | ||
| 61 | struct hw_pci ixdp425_pci __initdata = { | 61 | struct hw_pci ixdp425_pci __initdata = { |
| 62 | .nr_controllers = 1, | 62 | .nr_controllers = 1, |
| 63 | .ops = &ixp4xx_ops, | ||
| 63 | .preinit = ixdp425_pci_preinit, | 64 | .preinit = ixdp425_pci_preinit, |
| 64 | .swizzle = pci_std_swizzle, | ||
| 65 | .setup = ixp4xx_setup, | 65 | .setup = ixp4xx_setup, |
| 66 | .scan = ixp4xx_scan_bus, | ||
| 67 | .map_irq = ixdp425_map_irq, | 66 | .map_irq = ixdp425_map_irq, |
| 68 | }; | 67 | }; |
| 69 | 68 | ||
diff --git a/arch/arm/mach-ixp4xx/ixdpg425-pci.c b/arch/arm/mach-ixp4xx/ixdpg425-pci.c index 34efe75015ec..1f8717ba13dc 100644 --- a/arch/arm/mach-ixp4xx/ixdpg425-pci.c +++ b/arch/arm/mach-ixp4xx/ixdpg425-pci.c | |||
| @@ -42,10 +42,9 @@ static int __init ixdpg425_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 42 | 42 | ||
| 43 | struct hw_pci ixdpg425_pci __initdata = { | 43 | struct hw_pci ixdpg425_pci __initdata = { |
| 44 | .nr_controllers = 1, | 44 | .nr_controllers = 1, |
| 45 | .ops = &ixp4xx_ops, | ||
| 45 | .preinit = ixdpg425_pci_preinit, | 46 | .preinit = ixdpg425_pci_preinit, |
| 46 | .swizzle = pci_std_swizzle, | ||
| 47 | .setup = ixp4xx_setup, | 47 | .setup = ixp4xx_setup, |
| 48 | .scan = ixp4xx_scan_bus, | ||
| 49 | .map_irq = ixdpg425_map_irq, | 48 | .map_irq = ixdpg425_map_irq, |
| 50 | }; | 49 | }; |
| 51 | 50 | ||
diff --git a/arch/arm/mach-ixp4xx/miccpt-pci.c b/arch/arm/mach-ixp4xx/miccpt-pci.c index ca0bae7fca90..d114ccd2017c 100644 --- a/arch/arm/mach-ixp4xx/miccpt-pci.c +++ b/arch/arm/mach-ixp4xx/miccpt-pci.c | |||
| @@ -61,10 +61,9 @@ static int __init miccpt_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 61 | 61 | ||
| 62 | struct hw_pci miccpt_pci __initdata = { | 62 | struct hw_pci miccpt_pci __initdata = { |
| 63 | .nr_controllers = 1, | 63 | .nr_controllers = 1, |
| 64 | .ops = &ixp4xx_ops, | ||
| 64 | .preinit = miccpt_pci_preinit, | 65 | .preinit = miccpt_pci_preinit, |
| 65 | .swizzle = pci_std_swizzle, | ||
| 66 | .setup = ixp4xx_setup, | 66 | .setup = ixp4xx_setup, |
| 67 | .scan = ixp4xx_scan_bus, | ||
| 68 | .map_irq = miccpt_map_irq, | 67 | .map_irq = miccpt_map_irq, |
| 69 | }; | 68 | }; |
| 70 | 69 | ||
diff --git a/arch/arm/mach-ixp4xx/nas100d-pci.c b/arch/arm/mach-ixp4xx/nas100d-pci.c index 5434ccf553eb..8f0eba0a6800 100644 --- a/arch/arm/mach-ixp4xx/nas100d-pci.c +++ b/arch/arm/mach-ixp4xx/nas100d-pci.c | |||
| @@ -58,10 +58,9 @@ static int __init nas100d_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 58 | 58 | ||
| 59 | struct hw_pci __initdata nas100d_pci = { | 59 | struct hw_pci __initdata nas100d_pci = { |
| 60 | .nr_controllers = 1, | 60 | .nr_controllers = 1, |
| 61 | .ops = &ixp4xx_ops, | ||
| 61 | .preinit = nas100d_pci_preinit, | 62 | .preinit = nas100d_pci_preinit, |
| 62 | .swizzle = pci_std_swizzle, | ||
| 63 | .setup = ixp4xx_setup, | 63 | .setup = ixp4xx_setup, |
| 64 | .scan = ixp4xx_scan_bus, | ||
| 65 | .map_irq = nas100d_map_irq, | 64 | .map_irq = nas100d_map_irq, |
| 66 | }; | 65 | }; |
| 67 | 66 | ||
diff --git a/arch/arm/mach-ixp4xx/nslu2-pci.c b/arch/arm/mach-ixp4xx/nslu2-pci.c index b57160535e47..032defe111aa 100644 --- a/arch/arm/mach-ixp4xx/nslu2-pci.c +++ b/arch/arm/mach-ixp4xx/nslu2-pci.c | |||
| @@ -54,10 +54,9 @@ static int __init nslu2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 54 | 54 | ||
| 55 | struct hw_pci __initdata nslu2_pci = { | 55 | struct hw_pci __initdata nslu2_pci = { |
| 56 | .nr_controllers = 1, | 56 | .nr_controllers = 1, |
| 57 | .ops = &ixp4xx_ops, | ||
| 57 | .preinit = nslu2_pci_preinit, | 58 | .preinit = nslu2_pci_preinit, |
| 58 | .swizzle = pci_std_swizzle, | ||
| 59 | .setup = ixp4xx_setup, | 59 | .setup = ixp4xx_setup, |
| 60 | .scan = ixp4xx_scan_bus, | ||
| 61 | .map_irq = nslu2_map_irq, | 60 | .map_irq = nslu2_map_irq, |
| 62 | }; | 61 | }; |
| 63 | 62 | ||
diff --git a/arch/arm/mach-ixp4xx/vulcan-pci.c b/arch/arm/mach-ixp4xx/vulcan-pci.c index 0bc3f34c282f..a4220fa5e0c3 100644 --- a/arch/arm/mach-ixp4xx/vulcan-pci.c +++ b/arch/arm/mach-ixp4xx/vulcan-pci.c | |||
| @@ -56,10 +56,9 @@ static int __init vulcan_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 56 | 56 | ||
| 57 | struct hw_pci vulcan_pci __initdata = { | 57 | struct hw_pci vulcan_pci __initdata = { |
| 58 | .nr_controllers = 1, | 58 | .nr_controllers = 1, |
| 59 | .ops = &ixp4xx_ops, | ||
| 59 | .preinit = vulcan_pci_preinit, | 60 | .preinit = vulcan_pci_preinit, |
| 60 | .swizzle = pci_std_swizzle, | ||
| 61 | .setup = ixp4xx_setup, | 61 | .setup = ixp4xx_setup, |
| 62 | .scan = ixp4xx_scan_bus, | ||
| 63 | .map_irq = vulcan_map_irq, | 62 | .map_irq = vulcan_map_irq, |
| 64 | }; | 63 | }; |
| 65 | 64 | ||
diff --git a/arch/arm/mach-ixp4xx/wg302v2-pci.c b/arch/arm/mach-ixp4xx/wg302v2-pci.c index f27dfcfe811b..c92e5b82af36 100644 --- a/arch/arm/mach-ixp4xx/wg302v2-pci.c +++ b/arch/arm/mach-ixp4xx/wg302v2-pci.c | |||
| @@ -46,10 +46,9 @@ static int __init wg302v2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 46 | 46 | ||
| 47 | struct hw_pci wg302v2_pci __initdata = { | 47 | struct hw_pci wg302v2_pci __initdata = { |
| 48 | .nr_controllers = 1, | 48 | .nr_controllers = 1, |
| 49 | .ops = &ixp4xx_ops, | ||
| 49 | .preinit = wg302v2_pci_preinit, | 50 | .preinit = wg302v2_pci_preinit, |
| 50 | .swizzle = pci_std_swizzle, | ||
| 51 | .setup = ixp4xx_setup, | 51 | .setup = ixp4xx_setup, |
| 52 | .scan = ixp4xx_scan_bus, | ||
| 53 | .map_irq = wg302v2_map_irq, | 52 | .map_irq = wg302v2_map_irq, |
| 54 | }; | 53 | }; |
| 55 | 54 | ||
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c index f56a0118c1bb..de373176ee67 100644 --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c | |||
| @@ -44,12 +44,6 @@ struct pcie_port { | |||
| 44 | static int pcie_port_map[2]; | 44 | static int pcie_port_map[2]; |
| 45 | static int num_pcie_ports; | 45 | static int num_pcie_ports; |
| 46 | 46 | ||
| 47 | static inline struct pcie_port *bus_to_port(struct pci_bus *bus) | ||
| 48 | { | ||
| 49 | struct pci_sys_data *sys = bus->sysdata; | ||
| 50 | return sys->private_data; | ||
| 51 | } | ||
| 52 | |||
| 53 | static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) | 47 | static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) |
| 54 | { | 48 | { |
| 55 | /* | 49 | /* |
| @@ -79,7 +73,8 @@ static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) | |||
| 79 | static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, | 73 | static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, |
| 80 | int size, u32 *val) | 74 | int size, u32 *val) |
| 81 | { | 75 | { |
| 82 | struct pcie_port *pp = bus_to_port(bus); | 76 | struct pci_sys_data *sys = bus->sysdata; |
| 77 | struct pcie_port *pp = sys->private_data; | ||
| 83 | unsigned long flags; | 78 | unsigned long flags; |
| 84 | int ret; | 79 | int ret; |
| 85 | 80 | ||
| @@ -98,7 +93,8 @@ static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, | |||
| 98 | static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, | 93 | static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, |
| 99 | int where, int size, u32 val) | 94 | int where, int size, u32 val) |
| 100 | { | 95 | { |
| 101 | struct pcie_port *pp = bus_to_port(bus); | 96 | struct pci_sys_data *sys = bus->sysdata; |
| 97 | struct pcie_port *pp = sys->private_data; | ||
| 102 | unsigned long flags; | 98 | unsigned long flags; |
| 103 | int ret; | 99 | int ret; |
| 104 | 100 | ||
| @@ -248,13 +244,13 @@ kirkwood_pcie_scan_bus(int nr, struct pci_sys_data *sys) | |||
| 248 | static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot, | 244 | static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot, |
| 249 | u8 pin) | 245 | u8 pin) |
| 250 | { | 246 | { |
| 251 | struct pcie_port *pp = bus_to_port(dev->bus); | 247 | struct pci_sys_data *sys = dev->sysdata; |
| 248 | struct pcie_port *pp = sys->private_data; | ||
| 252 | 249 | ||
| 253 | return pp->irq; | 250 | return pp->irq; |
| 254 | } | 251 | } |
| 255 | 252 | ||
| 256 | static struct hw_pci kirkwood_pci __initdata = { | 253 | static struct hw_pci kirkwood_pci __initdata = { |
| 257 | .swizzle = pci_std_swizzle, | ||
| 258 | .setup = kirkwood_pcie_setup, | 254 | .setup = kirkwood_pcie_setup, |
| 259 | .scan = kirkwood_pcie_scan_bus, | 255 | .scan = kirkwood_pcie_scan_bus, |
| 260 | .map_irq = kirkwood_pcie_map_irq, | 256 | .map_irq = kirkwood_pcie_map_irq, |
diff --git a/arch/arm/mach-ks8695/pci.c b/arch/arm/mach-ks8695/pci.c index acc701435817..bb18193b4bac 100644 --- a/arch/arm/mach-ks8695/pci.c +++ b/arch/arm/mach-ks8695/pci.c | |||
| @@ -141,12 +141,6 @@ static struct pci_ops ks8695_pci_ops = { | |||
| 141 | .write = ks8695_pci_writeconfig, | 141 | .write = ks8695_pci_writeconfig, |
| 142 | }; | 142 | }; |
| 143 | 143 | ||
| 144 | static struct pci_bus* __init ks8695_pci_scan_bus(int nr, struct pci_sys_data *sys) | ||
| 145 | { | ||
| 146 | return pci_scan_root_bus(NULL, sys->busnr, &ks8695_pci_ops, sys, | ||
| 147 | &sys->resources); | ||
| 148 | } | ||
| 149 | |||
| 150 | static struct resource pci_mem = { | 144 | static struct resource pci_mem = { |
| 151 | .name = "PCI Memory space", | 145 | .name = "PCI Memory space", |
| 152 | .start = KS8695_PCIMEM_PA, | 146 | .start = KS8695_PCIMEM_PA, |
| @@ -302,11 +296,10 @@ static void ks8695_show_pciregs(void) | |||
| 302 | 296 | ||
| 303 | static struct hw_pci ks8695_pci __initdata = { | 297 | static struct hw_pci ks8695_pci __initdata = { |
| 304 | .nr_controllers = 1, | 298 | .nr_controllers = 1, |
| 299 | .ops = &ks8695_pci_ops, | ||
| 305 | .preinit = ks8695_pci_preinit, | 300 | .preinit = ks8695_pci_preinit, |
| 306 | .setup = ks8695_pci_setup, | 301 | .setup = ks8695_pci_setup, |
| 307 | .scan = ks8695_pci_scan_bus, | ||
| 308 | .postinit = NULL, | 302 | .postinit = NULL, |
| 309 | .swizzle = pci_std_swizzle, | ||
| 310 | .map_irq = NULL, | 303 | .map_irq = NULL, |
| 311 | }; | 304 | }; |
| 312 | 305 | ||
diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c index df3e38055a24..2e56e86b6d68 100644 --- a/arch/arm/mach-mv78xx0/pcie.c +++ b/arch/arm/mach-mv78xx0/pcie.c | |||
| @@ -147,6 +147,7 @@ static int __init mv78xx0_pcie_setup(int nr, struct pci_sys_data *sys) | |||
| 147 | return 0; | 147 | return 0; |
| 148 | 148 | ||
| 149 | pp = &pcie_port[nr]; | 149 | pp = &pcie_port[nr]; |
| 150 | sys->private_data = pp; | ||
| 150 | pp->root_bus_nr = sys->busnr; | 151 | pp->root_bus_nr = sys->busnr; |
| 151 | 152 | ||
| 152 | /* | 153 | /* |
| @@ -161,19 +162,6 @@ static int __init mv78xx0_pcie_setup(int nr, struct pci_sys_data *sys) | |||
| 161 | return 1; | 162 | return 1; |
| 162 | } | 163 | } |
| 163 | 164 | ||
| 164 | static struct pcie_port *bus_to_port(int bus) | ||
| 165 | { | ||
| 166 | int i; | ||
| 167 | |||
| 168 | for (i = num_pcie_ports - 1; i >= 0; i--) { | ||
| 169 | int rbus = pcie_port[i].root_bus_nr; | ||
| 170 | if (rbus != -1 && rbus <= bus) | ||
| 171 | break; | ||
| 172 | } | ||
| 173 | |||
| 174 | return i >= 0 ? pcie_port + i : NULL; | ||
| 175 | } | ||
| 176 | |||
| 177 | static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) | 165 | static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) |
| 178 | { | 166 | { |
| 179 | /* | 167 | /* |
| @@ -189,7 +177,8 @@ static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) | |||
| 189 | static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, | 177 | static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, |
| 190 | int size, u32 *val) | 178 | int size, u32 *val) |
| 191 | { | 179 | { |
| 192 | struct pcie_port *pp = bus_to_port(bus->number); | 180 | struct pci_sys_data *sys = bus->sysdata; |
| 181 | struct pcie_port *pp = sys->private_data; | ||
| 193 | unsigned long flags; | 182 | unsigned long flags; |
| 194 | int ret; | 183 | int ret; |
| 195 | 184 | ||
| @@ -208,7 +197,8 @@ static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, | |||
| 208 | static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, | 197 | static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, |
| 209 | int where, int size, u32 val) | 198 | int where, int size, u32 val) |
| 210 | { | 199 | { |
| 211 | struct pcie_port *pp = bus_to_port(bus->number); | 200 | struct pci_sys_data *sys = bus->sysdata; |
| 201 | struct pcie_port *pp = sys->private_data; | ||
| 212 | unsigned long flags; | 202 | unsigned long flags; |
| 213 | int ret; | 203 | int ret; |
| 214 | 204 | ||
| @@ -263,7 +253,8 @@ mv78xx0_pcie_scan_bus(int nr, struct pci_sys_data *sys) | |||
| 263 | static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot, | 253 | static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot, |
| 264 | u8 pin) | 254 | u8 pin) |
| 265 | { | 255 | { |
| 266 | struct pcie_port *pp = bus_to_port(dev->bus->number); | 256 | struct pci_sys_data *sys = dev->bus->sysdata; |
| 257 | struct pcie_port *pp = sys->private_data; | ||
| 267 | 258 | ||
| 268 | return IRQ_MV78XX0_PCIE_00 + (pp->maj << 2) + pp->min; | 259 | return IRQ_MV78XX0_PCIE_00 + (pp->maj << 2) + pp->min; |
| 269 | } | 260 | } |
| @@ -271,7 +262,6 @@ static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot, | |||
| 271 | static struct hw_pci mv78xx0_pci __initdata = { | 262 | static struct hw_pci mv78xx0_pci __initdata = { |
| 272 | .nr_controllers = 8, | 263 | .nr_controllers = 8, |
| 273 | .preinit = mv78xx0_pcie_preinit, | 264 | .preinit = mv78xx0_pcie_preinit, |
| 274 | .swizzle = pci_std_swizzle, | ||
| 275 | .setup = mv78xx0_pcie_setup, | 265 | .setup = mv78xx0_pcie_setup, |
| 276 | .scan = mv78xx0_pcie_scan_bus, | 266 | .scan = mv78xx0_pcie_scan_bus, |
| 277 | .map_irq = mv78xx0_pcie_map_irq, | 267 | .map_irq = mv78xx0_pcie_map_irq, |
diff --git a/arch/arm/mach-mxs/devices-mx23.h b/arch/arm/mach-mxs/devices-mx23.h index 4d1329d59287..9acdd6387047 100644 --- a/arch/arm/mach-mxs/devices-mx23.h +++ b/arch/arm/mach-mxs/devices-mx23.h | |||
| @@ -11,10 +11,16 @@ | |||
| 11 | #include <mach/mx23.h> | 11 | #include <mach/mx23.h> |
| 12 | #include <mach/devices-common.h> | 12 | #include <mach/devices-common.h> |
| 13 | #include <mach/mxsfb.h> | 13 | #include <mach/mxsfb.h> |
| 14 | #include <linux/amba/bus.h> | ||
| 14 | 15 | ||
| 15 | extern const struct amba_device mx23_duart_device __initconst; | 16 | static inline int mx23_add_duart(void) |
| 16 | #define mx23_add_duart() \ | 17 | { |
| 17 | mxs_add_duart(&mx23_duart_device) | 18 | struct amba_device *d; |
| 19 | |||
| 20 | d = amba_ahb_device_add(NULL, "duart", MX23_DUART_BASE_ADDR, SZ_8K, | ||
| 21 | MX23_INT_DUART, 0, 0, 0); | ||
| 22 | return IS_ERR(d) ? PTR_ERR(d) : 0; | ||
| 23 | } | ||
| 18 | 24 | ||
| 19 | extern const struct mxs_auart_data mx23_auart_data[] __initconst; | 25 | extern const struct mxs_auart_data mx23_auart_data[] __initconst; |
| 20 | #define mx23_add_auart(id) mxs_add_auart(&mx23_auart_data[id]) | 26 | #define mx23_add_auart(id) mxs_add_auart(&mx23_auart_data[id]) |
diff --git a/arch/arm/mach-mxs/devices-mx28.h b/arch/arm/mach-mxs/devices-mx28.h index 9dbeae130842..84b2960df117 100644 --- a/arch/arm/mach-mxs/devices-mx28.h +++ b/arch/arm/mach-mxs/devices-mx28.h | |||
| @@ -11,10 +11,16 @@ | |||
| 11 | #include <mach/mx28.h> | 11 | #include <mach/mx28.h> |
| 12 | #include <mach/devices-common.h> | 12 | #include <mach/devices-common.h> |
| 13 | #include <mach/mxsfb.h> | 13 | #include <mach/mxsfb.h> |
| 14 | #include <linux/amba/bus.h> | ||
| 14 | 15 | ||
| 15 | extern const struct amba_device mx28_duart_device __initconst; | 16 | static inline int mx28_add_duart(void) |
| 16 | #define mx28_add_duart() \ | 17 | { |
| 17 | mxs_add_duart(&mx28_duart_device) | 18 | struct amba_device *d; |
| 19 | |||
| 20 | d = amba_ahb_device_add(NULL, "duart", MX28_DUART_BASE_ADDR, SZ_8K, | ||
| 21 | MX28_INT_DUART, 0, 0, 0); | ||
| 22 | return IS_ERR(d) ? PTR_ERR(d) : 0; | ||
| 23 | } | ||
| 18 | 24 | ||
| 19 | extern const struct mxs_auart_data mx28_auart_data[] __initconst; | 25 | extern const struct mxs_auart_data mx28_auart_data[] __initconst; |
| 20 | #define mx28_add_auart(id) mxs_add_auart(&mx28_auart_data[id]) | 26 | #define mx28_add_auart(id) mxs_add_auart(&mx28_auart_data[id]) |
diff --git a/arch/arm/mach-mxs/devices.c b/arch/arm/mach-mxs/devices.c index 01faffec3064..cf50b5a66dda 100644 --- a/arch/arm/mach-mxs/devices.c +++ b/arch/arm/mach-mxs/devices.c | |||
| @@ -75,22 +75,6 @@ err: | |||
| 75 | return pdev; | 75 | return pdev; |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | int __init mxs_add_amba_device(const struct amba_device *dev) | ||
| 79 | { | ||
| 80 | struct amba_device *adev = amba_device_alloc(dev->dev.init_name, | ||
| 81 | dev->res.start, resource_size(&dev->res)); | ||
| 82 | |||
| 83 | if (!adev) { | ||
| 84 | pr_err("%s: failed to allocate memory", __func__); | ||
| 85 | return -ENOMEM; | ||
| 86 | } | ||
| 87 | |||
| 88 | adev->irq[0] = dev->irq[0]; | ||
| 89 | adev->irq[1] = dev->irq[1]; | ||
| 90 | |||
| 91 | return amba_device_add(adev, &iomem_resource); | ||
| 92 | } | ||
| 93 | |||
| 94 | struct device mxs_apbh_bus = { | 78 | struct device mxs_apbh_bus = { |
| 95 | .init_name = "mxs_apbh", | 79 | .init_name = "mxs_apbh", |
| 96 | .parent = &platform_bus, | 80 | .parent = &platform_bus, |
diff --git a/arch/arm/mach-mxs/devices/Makefile b/arch/arm/mach-mxs/devices/Makefile index c8f5c9541a30..5f72d9787444 100644 --- a/arch/arm/mach-mxs/devices/Makefile +++ b/arch/arm/mach-mxs/devices/Makefile | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | obj-$(CONFIG_MXS_HAVE_AMBA_DUART) += amba-duart.o | ||
| 2 | obj-$(CONFIG_MXS_HAVE_PLATFORM_AUART) += platform-auart.o | 1 | obj-$(CONFIG_MXS_HAVE_PLATFORM_AUART) += platform-auart.o |
| 3 | obj-y += platform-dma.o | 2 | obj-y += platform-dma.o |
| 4 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o | 3 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o |
diff --git a/arch/arm/mach-mxs/devices/amba-duart.c b/arch/arm/mach-mxs/devices/amba-duart.c deleted file mode 100644 index a5479f766046..000000000000 --- a/arch/arm/mach-mxs/devices/amba-duart.c +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2009-2010 Pengutronix | ||
| 3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
| 4 | * | ||
| 5 | * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it under | ||
| 8 | * the terms of the GNU General Public License version 2 as published by the | ||
| 9 | * Free Software Foundation. | ||
| 10 | */ | ||
| 11 | #include <asm/irq.h> | ||
| 12 | #include <mach/mx23.h> | ||
| 13 | #include <mach/mx28.h> | ||
| 14 | #include <mach/devices-common.h> | ||
| 15 | |||
| 16 | #define MXS_AMBA_DUART_DEVICE(name, soc) \ | ||
| 17 | const struct amba_device name##_device __initconst = { \ | ||
| 18 | .dev = { \ | ||
| 19 | .init_name = "duart", \ | ||
| 20 | }, \ | ||
| 21 | .res = { \ | ||
| 22 | .start = soc ## _DUART_BASE_ADDR, \ | ||
| 23 | .end = (soc ## _DUART_BASE_ADDR) + SZ_8K - 1, \ | ||
| 24 | .flags = IORESOURCE_MEM, \ | ||
| 25 | }, \ | ||
| 26 | .irq = {soc ## _INT_DUART}, \ | ||
| 27 | } | ||
| 28 | |||
| 29 | #ifdef CONFIG_SOC_IMX23 | ||
| 30 | MXS_AMBA_DUART_DEVICE(mx23_duart, MX23); | ||
| 31 | #endif | ||
| 32 | |||
| 33 | #ifdef CONFIG_SOC_IMX28 | ||
| 34 | MXS_AMBA_DUART_DEVICE(mx28_duart, MX28); | ||
| 35 | #endif | ||
| 36 | |||
| 37 | int __init mxs_add_duart(const struct amba_device *dev) | ||
| 38 | { | ||
| 39 | return mxs_add_amba_device(dev); | ||
| 40 | } | ||
diff --git a/arch/arm/mach-mxs/include/mach/devices-common.h b/arch/arm/mach-mxs/include/mach/devices-common.h index f2e383955d88..21e45a70d344 100644 --- a/arch/arm/mach-mxs/include/mach/devices-common.h +++ b/arch/arm/mach-mxs/include/mach/devices-common.h | |||
| @@ -27,11 +27,6 @@ static inline struct platform_device *mxs_add_platform_device( | |||
| 27 | name, id, res, num_resources, data, size_data, 0); | 27 | name, id, res, num_resources, data, size_data, 0); |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | int __init mxs_add_amba_device(const struct amba_device *dev); | ||
| 31 | |||
| 32 | /* duart */ | ||
| 33 | int __init mxs_add_duart(const struct amba_device *dev); | ||
| 34 | |||
| 35 | /* auart */ | 30 | /* auart */ |
| 36 | struct mxs_auart_data { | 31 | struct mxs_auart_data { |
| 37 | int id; | 32 | int id; |
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c index e52108c9aaea..49a3fd630313 100644 --- a/arch/arm/mach-orion5x/db88f5281-setup.c +++ b/arch/arm/mach-orion5x/db88f5281-setup.c | |||
| @@ -265,7 +265,6 @@ static int __init db88f5281_pci_map_irq(const struct pci_dev *dev, u8 slot, | |||
| 265 | static struct hw_pci db88f5281_pci __initdata = { | 265 | static struct hw_pci db88f5281_pci __initdata = { |
| 266 | .nr_controllers = 2, | 266 | .nr_controllers = 2, |
| 267 | .preinit = db88f5281_pci_preinit, | 267 | .preinit = db88f5281_pci_preinit, |
| 268 | .swizzle = pci_std_swizzle, | ||
| 269 | .setup = orion5x_pci_sys_setup, | 268 | .setup = orion5x_pci_sys_setup, |
| 270 | .scan = orion5x_pci_sys_scan_bus, | 269 | .scan = orion5x_pci_sys_scan_bus, |
| 271 | .map_irq = db88f5281_pci_map_irq, | 270 | .map_irq = db88f5281_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index c3ed15b8ea25..8c06ccac44c2 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
| @@ -86,7 +86,6 @@ static int __init dns323_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 86 | 86 | ||
| 87 | static struct hw_pci dns323_pci __initdata = { | 87 | static struct hw_pci dns323_pci __initdata = { |
| 88 | .nr_controllers = 2, | 88 | .nr_controllers = 2, |
| 89 | .swizzle = pci_std_swizzle, | ||
| 90 | .setup = orion5x_pci_sys_setup, | 89 | .setup = orion5x_pci_sys_setup, |
| 91 | .scan = orion5x_pci_sys_scan_bus, | 90 | .scan = orion5x_pci_sys_scan_bus, |
| 92 | .map_irq = dns323_pci_map_irq, | 91 | .map_irq = dns323_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c index 47587b832842..1e458efafb9a 100644 --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c | |||
| @@ -138,7 +138,6 @@ static int __init kurobox_pro_pci_map_irq(const struct pci_dev *dev, u8 slot, | |||
| 138 | 138 | ||
| 139 | static struct hw_pci kurobox_pro_pci __initdata = { | 139 | static struct hw_pci kurobox_pro_pci __initdata = { |
| 140 | .nr_controllers = 2, | 140 | .nr_controllers = 2, |
| 141 | .swizzle = pci_std_swizzle, | ||
| 142 | .setup = orion5x_pci_sys_setup, | 141 | .setup = orion5x_pci_sys_setup, |
| 143 | .scan = orion5x_pci_sys_scan_bus, | 142 | .scan = orion5x_pci_sys_scan_bus, |
| 144 | .map_irq = kurobox_pro_pci_map_irq, | 143 | .map_irq = kurobox_pro_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/mss2-setup.c b/arch/arm/mach-orion5x/mss2-setup.c index 65faaa34de61..1c16d045333e 100644 --- a/arch/arm/mach-orion5x/mss2-setup.c +++ b/arch/arm/mach-orion5x/mss2-setup.c | |||
| @@ -89,7 +89,6 @@ static int __init mss2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 89 | 89 | ||
| 90 | static struct hw_pci mss2_pci __initdata = { | 90 | static struct hw_pci mss2_pci __initdata = { |
| 91 | .nr_controllers = 2, | 91 | .nr_controllers = 2, |
| 92 | .swizzle = pci_std_swizzle, | ||
| 93 | .setup = orion5x_pci_sys_setup, | 92 | .setup = orion5x_pci_sys_setup, |
| 94 | .scan = orion5x_pci_sys_scan_bus, | 93 | .scan = orion5x_pci_sys_scan_bus, |
| 95 | .map_irq = mss2_pci_map_irq, | 94 | .map_irq = mss2_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c index 292038fc59fd..78a6a11d8216 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | |||
| @@ -149,7 +149,6 @@ rd88f5181l_fxo_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 149 | 149 | ||
| 150 | static struct hw_pci rd88f5181l_fxo_pci __initdata = { | 150 | static struct hw_pci rd88f5181l_fxo_pci __initdata = { |
| 151 | .nr_controllers = 2, | 151 | .nr_controllers = 2, |
| 152 | .swizzle = pci_std_swizzle, | ||
| 153 | .setup = orion5x_pci_sys_setup, | 152 | .setup = orion5x_pci_sys_setup, |
| 154 | .scan = orion5x_pci_sys_scan_bus, | 153 | .scan = orion5x_pci_sys_scan_bus, |
| 155 | .map_irq = rd88f5181l_fxo_pci_map_irq, | 154 | .map_irq = rd88f5181l_fxo_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c index c44eabaabc16..2f5dc54cd4cd 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | |||
| @@ -161,7 +161,6 @@ rd88f5181l_ge_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 161 | 161 | ||
| 162 | static struct hw_pci rd88f5181l_ge_pci __initdata = { | 162 | static struct hw_pci rd88f5181l_ge_pci __initdata = { |
| 163 | .nr_controllers = 2, | 163 | .nr_controllers = 2, |
| 164 | .swizzle = pci_std_swizzle, | ||
| 165 | .setup = orion5x_pci_sys_setup, | 164 | .setup = orion5x_pci_sys_setup, |
| 166 | .scan = orion5x_pci_sys_scan_bus, | 165 | .scan = orion5x_pci_sys_scan_bus, |
| 167 | .map_irq = rd88f5181l_ge_pci_map_irq, | 166 | .map_irq = rd88f5181l_ge_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c index e3ce61711478..399130fac0b6 100644 --- a/arch/arm/mach-orion5x/rd88f5182-setup.c +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c | |||
| @@ -200,7 +200,6 @@ static int __init rd88f5182_pci_map_irq(const struct pci_dev *dev, u8 slot, | |||
| 200 | static struct hw_pci rd88f5182_pci __initdata = { | 200 | static struct hw_pci rd88f5182_pci __initdata = { |
| 201 | .nr_controllers = 2, | 201 | .nr_controllers = 2, |
| 202 | .preinit = rd88f5182_pci_preinit, | 202 | .preinit = rd88f5182_pci_preinit, |
| 203 | .swizzle = pci_std_swizzle, | ||
| 204 | .setup = orion5x_pci_sys_setup, | 203 | .setup = orion5x_pci_sys_setup, |
| 205 | .scan = orion5x_pci_sys_scan_bus, | 204 | .scan = orion5x_pci_sys_scan_bus, |
| 206 | .map_irq = rd88f5182_pci_map_irq, | 205 | .map_irq = rd88f5182_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c index 2c5fab00d205..e91bf0ba4e8e 100644 --- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | |||
| @@ -102,7 +102,6 @@ static void __init rd88f6183ap_ge_init(void) | |||
| 102 | 102 | ||
| 103 | static struct hw_pci rd88f6183ap_ge_pci __initdata = { | 103 | static struct hw_pci rd88f6183ap_ge_pci __initdata = { |
| 104 | .nr_controllers = 2, | 104 | .nr_controllers = 2, |
| 105 | .swizzle = pci_std_swizzle, | ||
| 106 | .setup = orion5x_pci_sys_setup, | 105 | .setup = orion5x_pci_sys_setup, |
| 107 | .scan = orion5x_pci_sys_scan_bus, | 106 | .scan = orion5x_pci_sys_scan_bus, |
| 108 | .map_irq = orion5x_pci_map_irq, | 107 | .map_irq = orion5x_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion5x/terastation_pro2-setup.c index 632a861ef82b..90e571dc4deb 100644 --- a/arch/arm/mach-orion5x/terastation_pro2-setup.c +++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c | |||
| @@ -122,7 +122,6 @@ static int __init tsp2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 122 | static struct hw_pci tsp2_pci __initdata = { | 122 | static struct hw_pci tsp2_pci __initdata = { |
| 123 | .nr_controllers = 2, | 123 | .nr_controllers = 2, |
| 124 | .preinit = tsp2_pci_preinit, | 124 | .preinit = tsp2_pci_preinit, |
| 125 | .swizzle = pci_std_swizzle, | ||
| 126 | .setup = orion5x_pci_sys_setup, | 125 | .setup = orion5x_pci_sys_setup, |
| 127 | .scan = orion5x_pci_sys_scan_bus, | 126 | .scan = orion5x_pci_sys_scan_bus, |
| 128 | .map_irq = tsp2_pci_map_irq, | 127 | .map_irq = tsp2_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c index 5d6408745582..b184f680e0db 100644 --- a/arch/arm/mach-orion5x/ts209-setup.c +++ b/arch/arm/mach-orion5x/ts209-setup.c | |||
| @@ -170,7 +170,6 @@ static int __init qnap_ts209_pci_map_irq(const struct pci_dev *dev, u8 slot, | |||
| 170 | static struct hw_pci qnap_ts209_pci __initdata = { | 170 | static struct hw_pci qnap_ts209_pci __initdata = { |
| 171 | .nr_controllers = 2, | 171 | .nr_controllers = 2, |
| 172 | .preinit = qnap_ts209_pci_preinit, | 172 | .preinit = qnap_ts209_pci_preinit, |
| 173 | .swizzle = pci_std_swizzle, | ||
| 174 | .setup = orion5x_pci_sys_setup, | 173 | .setup = orion5x_pci_sys_setup, |
| 175 | .scan = orion5x_pci_sys_scan_bus, | 174 | .scan = orion5x_pci_sys_scan_bus, |
| 176 | .map_irq = qnap_ts209_pci_map_irq, | 175 | .map_irq = qnap_ts209_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c index 4e6ff759cd32..a5c2e64c4ece 100644 --- a/arch/arm/mach-orion5x/ts409-setup.c +++ b/arch/arm/mach-orion5x/ts409-setup.c | |||
| @@ -140,7 +140,6 @@ static int __init qnap_ts409_pci_map_irq(const struct pci_dev *dev, u8 slot, | |||
| 140 | 140 | ||
| 141 | static struct hw_pci qnap_ts409_pci __initdata = { | 141 | static struct hw_pci qnap_ts409_pci __initdata = { |
| 142 | .nr_controllers = 2, | 142 | .nr_controllers = 2, |
| 143 | .swizzle = pci_std_swizzle, | ||
| 144 | .setup = orion5x_pci_sys_setup, | 143 | .setup = orion5x_pci_sys_setup, |
| 145 | .scan = orion5x_pci_sys_scan_bus, | 144 | .scan = orion5x_pci_sys_scan_bus, |
| 146 | .map_irq = qnap_ts409_pci_map_irq, | 145 | .map_irq = qnap_ts409_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c index 078c03f7cd52..754c12b6abf0 100644 --- a/arch/arm/mach-orion5x/wnr854t-setup.c +++ b/arch/arm/mach-orion5x/wnr854t-setup.c | |||
| @@ -155,7 +155,6 @@ static int __init wnr854t_pci_map_irq(const struct pci_dev *dev, u8 slot, | |||
| 155 | 155 | ||
| 156 | static struct hw_pci wnr854t_pci __initdata = { | 156 | static struct hw_pci wnr854t_pci __initdata = { |
| 157 | .nr_controllers = 2, | 157 | .nr_controllers = 2, |
| 158 | .swizzle = pci_std_swizzle, | ||
| 159 | .setup = orion5x_pci_sys_setup, | 158 | .setup = orion5x_pci_sys_setup, |
| 160 | .scan = orion5x_pci_sys_scan_bus, | 159 | .scan = orion5x_pci_sys_scan_bus, |
| 161 | .map_irq = wnr854t_pci_map_irq, | 160 | .map_irq = wnr854t_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index 46a9778171ce..45c21251eb1e 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c | |||
| @@ -243,7 +243,6 @@ static int __init wrt350n_v2_pci_map_irq(const struct pci_dev *dev, u8 slot, | |||
| 243 | 243 | ||
| 244 | static struct hw_pci wrt350n_v2_pci __initdata = { | 244 | static struct hw_pci wrt350n_v2_pci __initdata = { |
| 245 | .nr_controllers = 2, | 245 | .nr_controllers = 2, |
| 246 | .swizzle = pci_std_swizzle, | ||
| 247 | .setup = orion5x_pci_sys_setup, | 246 | .setup = orion5x_pci_sys_setup, |
| 248 | .scan = orion5x_pci_sys_scan_bus, | 247 | .scan = orion5x_pci_sys_scan_bus, |
| 249 | .map_irq = wrt350n_v2_pci_map_irq, | 248 | .map_irq = wrt350n_v2_pci_map_irq, |
diff --git a/arch/arm/mach-pxa/cm-x2xx-pci.c b/arch/arm/mach-pxa/cm-x2xx-pci.c index ebd9259f5ac9..d8f816c24a2f 100644 --- a/arch/arm/mach-pxa/cm-x2xx-pci.c +++ b/arch/arm/mach-pxa/cm-x2xx-pci.c | |||
| @@ -181,11 +181,10 @@ static void cmx2xx_pci_preinit(void) | |||
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | static struct hw_pci cmx2xx_pci __initdata = { | 183 | static struct hw_pci cmx2xx_pci __initdata = { |
| 184 | .swizzle = pci_std_swizzle, | ||
| 185 | .map_irq = cmx2xx_pci_map_irq, | 184 | .map_irq = cmx2xx_pci_map_irq, |
| 186 | .nr_controllers = 1, | 185 | .nr_controllers = 1, |
| 186 | .ops = &it8152_ops, | ||
| 187 | .setup = it8152_pci_setup, | 187 | .setup = it8152_pci_setup, |
| 188 | .scan = it8152_pci_scan_bus, | ||
| 189 | .preinit = cmx2xx_pci_preinit, | 188 | .preinit = cmx2xx_pci_preinit, |
| 190 | }; | 189 | }; |
| 191 | 190 | ||
diff --git a/arch/arm/mach-sa1100/pci-nanoengine.c b/arch/arm/mach-sa1100/pci-nanoengine.c index b49108b890a8..ff02e2da99f2 100644 --- a/arch/arm/mach-sa1100/pci-nanoengine.c +++ b/arch/arm/mach-sa1100/pci-nanoengine.c | |||
| @@ -129,12 +129,6 @@ static int __init pci_nanoengine_map_irq(const struct pci_dev *dev, u8 slot, | |||
| 129 | return NANOENGINE_IRQ_GPIO_PCI; | 129 | return NANOENGINE_IRQ_GPIO_PCI; |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | struct pci_bus * __init pci_nanoengine_scan_bus(int nr, struct pci_sys_data *sys) | ||
| 133 | { | ||
| 134 | return pci_scan_root_bus(NULL, sys->busnr, &pci_nano_ops, sys, | ||
| 135 | &sys->resources); | ||
| 136 | } | ||
| 137 | |||
| 138 | static struct resource pci_io_ports = | 132 | static struct resource pci_io_ports = |
| 139 | DEFINE_RES_IO_NAMED(0x400, 0x400, "PCI IO"); | 133 | DEFINE_RES_IO_NAMED(0x400, 0x400, "PCI IO"); |
| 140 | 134 | ||
| @@ -274,7 +268,7 @@ int __init pci_nanoengine_setup(int nr, struct pci_sys_data *sys) | |||
| 274 | static struct hw_pci nanoengine_pci __initdata = { | 268 | static struct hw_pci nanoengine_pci __initdata = { |
| 275 | .map_irq = pci_nanoengine_map_irq, | 269 | .map_irq = pci_nanoengine_map_irq, |
| 276 | .nr_controllers = 1, | 270 | .nr_controllers = 1, |
| 277 | .scan = pci_nanoengine_scan_bus, | 271 | .ops = &pci_nano_ops, |
| 278 | .setup = pci_nanoengine_setup, | 272 | .setup = pci_nanoengine_setup, |
| 279 | }; | 273 | }; |
| 280 | 274 | ||
diff --git a/arch/arm/mach-shark/pci.c b/arch/arm/mach-shark/pci.c index 7cb79a092f31..9089407d5326 100644 --- a/arch/arm/mach-shark/pci.c +++ b/arch/arm/mach-shark/pci.c | |||
| @@ -29,10 +29,9 @@ extern void __init via82c505_preinit(void); | |||
| 29 | 29 | ||
| 30 | static struct hw_pci shark_pci __initdata = { | 30 | static struct hw_pci shark_pci __initdata = { |
| 31 | .setup = via82c505_setup, | 31 | .setup = via82c505_setup, |
| 32 | .swizzle = pci_std_swizzle, | ||
| 33 | .map_irq = shark_map_irq, | 32 | .map_irq = shark_map_irq, |
| 34 | .nr_controllers = 1, | 33 | .nr_controllers = 1, |
| 35 | .scan = via82c505_scan_bus, | 34 | .ops = &via82c505_ops, |
| 36 | .preinit = via82c505_preinit, | 35 | .preinit = via82c505_preinit, |
| 37 | }; | 36 | }; |
| 38 | 37 | ||
diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c index 54a816ff3847..0e09137506ec 100644 --- a/arch/arm/mach-tegra/pcie.c +++ b/arch/arm/mach-tegra/pcie.c | |||
| @@ -475,7 +475,6 @@ static struct hw_pci tegra_pcie_hw __initdata = { | |||
| 475 | .nr_controllers = 2, | 475 | .nr_controllers = 2, |
| 476 | .setup = tegra_pcie_setup, | 476 | .setup = tegra_pcie_setup, |
| 477 | .scan = tegra_pcie_scan_bus, | 477 | .scan = tegra_pcie_scan_bus, |
| 478 | .swizzle = pci_std_swizzle, | ||
| 479 | .map_irq = tegra_pcie_map_irq, | 478 | .map_irq = tegra_pcie_map_irq, |
| 480 | }; | 479 | }; |
| 481 | 480 | ||
diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c index 1eed8d4a80ef..315672c7bd48 100644 --- a/arch/arm/mach-tegra/timer.c +++ b/arch/arm/mach-tegra/timer.c | |||
| @@ -124,7 +124,7 @@ static u64 tegra_rtc_read_ms(void) | |||
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | /* | 126 | /* |
| 127 | * read_persistent_clock - Return time from a persistent clock. | 127 | * tegra_read_persistent_clock - Return time from a persistent clock. |
| 128 | * | 128 | * |
| 129 | * Reads the time from a source which isn't disabled during PM, the | 129 | * Reads the time from a source which isn't disabled during PM, the |
| 130 | * 32k sync timer. Convert the cycles elapsed since last read into | 130 | * 32k sync timer. Convert the cycles elapsed since last read into |
| @@ -133,7 +133,7 @@ static u64 tegra_rtc_read_ms(void) | |||
| 133 | * tegra_rtc driver could be executing to avoid race conditions | 133 | * tegra_rtc driver could be executing to avoid race conditions |
| 134 | * on the RTC shadow register | 134 | * on the RTC shadow register |
| 135 | */ | 135 | */ |
| 136 | void read_persistent_clock(struct timespec *ts) | 136 | static void tegra_read_persistent_clock(struct timespec *ts) |
| 137 | { | 137 | { |
| 138 | u64 delta; | 138 | u64 delta; |
| 139 | struct timespec *tsp = &persistent_ts; | 139 | struct timespec *tsp = &persistent_ts; |
| @@ -243,6 +243,7 @@ static void __init tegra_init_timer(void) | |||
| 243 | tegra_clockevent.irq = tegra_timer_irq.irq; | 243 | tegra_clockevent.irq = tegra_timer_irq.irq; |
| 244 | clockevents_register_device(&tegra_clockevent); | 244 | clockevents_register_device(&tegra_clockevent); |
| 245 | tegra_twd_init(); | 245 | tegra_twd_init(); |
| 246 | register_persistent_clock(NULL, tegra_read_persistent_clock); | ||
| 246 | } | 247 | } |
| 247 | 248 | ||
| 248 | struct sys_timer tegra_timer = { | 249 | struct sys_timer tegra_timer = { |
diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c index c5312a4b49f5..dfdd4a54668d 100644 --- a/arch/arm/mach-ux500/devices-common.c +++ b/arch/arm/mach-ux500/devices-common.c | |||
| @@ -11,7 +11,6 @@ | |||
| 11 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
| 12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
| 13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
| 14 | #include <linux/amba/bus.h> | ||
| 15 | 14 | ||
| 16 | #include <plat/gpio-nomadik.h> | 15 | #include <plat/gpio-nomadik.h> |
| 17 | 16 | ||
| @@ -19,38 +18,6 @@ | |||
| 19 | 18 | ||
| 20 | #include "devices-common.h" | 19 | #include "devices-common.h" |
| 21 | 20 | ||
| 22 | struct amba_device * | ||
| 23 | dbx500_add_amba_device(struct device *parent, const char *name, | ||
| 24 | resource_size_t base, int irq, void *pdata, | ||
| 25 | unsigned int periphid) | ||
| 26 | { | ||
| 27 | struct amba_device *dev; | ||
| 28 | int ret; | ||
| 29 | |||
| 30 | dev = amba_device_alloc(name, base, SZ_4K); | ||
| 31 | if (!dev) | ||
| 32 | return ERR_PTR(-ENOMEM); | ||
| 33 | |||
| 34 | dev->dma_mask = DMA_BIT_MASK(32); | ||
| 35 | dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | ||
| 36 | |||
| 37 | dev->irq[0] = irq; | ||
| 38 | |||
| 39 | dev->periphid = periphid; | ||
| 40 | |||
| 41 | dev->dev.platform_data = pdata; | ||
| 42 | |||
| 43 | dev->dev.parent = parent; | ||
| 44 | |||
| 45 | ret = amba_device_add(dev, &iomem_resource); | ||
| 46 | if (ret) { | ||
| 47 | amba_device_put(dev); | ||
| 48 | return ERR_PTR(ret); | ||
| 49 | } | ||
| 50 | |||
| 51 | return dev; | ||
| 52 | } | ||
| 53 | |||
| 54 | static struct platform_device * | 21 | static struct platform_device * |
| 55 | dbx500_add_gpio(struct device *parent, int id, resource_size_t addr, int irq, | 22 | dbx500_add_gpio(struct device *parent, int id, resource_size_t addr, int irq, |
| 56 | struct nmk_gpio_platform_data *pdata) | 23 | struct nmk_gpio_platform_data *pdata) |
diff --git a/arch/arm/mach-ux500/devices-common.h b/arch/arm/mach-ux500/devices-common.h index 39c74ec82add..f75bcb2ab13b 100644 --- a/arch/arm/mach-ux500/devices-common.h +++ b/arch/arm/mach-ux500/devices-common.h | |||
| @@ -11,13 +11,9 @@ | |||
| 11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
| 12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
| 13 | #include <linux/sys_soc.h> | 13 | #include <linux/sys_soc.h> |
| 14 | #include <linux/amba/bus.h> | ||
| 14 | #include <plat/i2c.h> | 15 | #include <plat/i2c.h> |
| 15 | 16 | ||
| 16 | extern struct amba_device * | ||
| 17 | dbx500_add_amba_device(struct device *parent, const char *name, | ||
| 18 | resource_size_t base, int irq, void *pdata, | ||
| 19 | unsigned int periphid); | ||
| 20 | |||
| 21 | struct spi_master_cntlr; | 17 | struct spi_master_cntlr; |
| 22 | 18 | ||
| 23 | static inline struct amba_device * | 19 | static inline struct amba_device * |
| @@ -25,8 +21,8 @@ dbx500_add_msp_spi(struct device *parent, const char *name, | |||
| 25 | resource_size_t base, int irq, | 21 | resource_size_t base, int irq, |
| 26 | struct spi_master_cntlr *pdata) | 22 | struct spi_master_cntlr *pdata) |
| 27 | { | 23 | { |
| 28 | return dbx500_add_amba_device(parent, name, base, irq, | 24 | return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, |
| 29 | pdata, 0); | 25 | pdata, 0); |
| 30 | } | 26 | } |
| 31 | 27 | ||
| 32 | static inline struct amba_device * | 28 | static inline struct amba_device * |
| @@ -34,8 +30,8 @@ dbx500_add_spi(struct device *parent, const char *name, resource_size_t base, | |||
| 34 | int irq, struct spi_master_cntlr *pdata, | 30 | int irq, struct spi_master_cntlr *pdata, |
| 35 | u32 periphid) | 31 | u32 periphid) |
| 36 | { | 32 | { |
| 37 | return dbx500_add_amba_device(parent, name, base, irq, | 33 | return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, |
| 38 | pdata, periphid); | 34 | pdata, periphid); |
| 39 | } | 35 | } |
| 40 | 36 | ||
| 41 | struct mmci_platform_data; | 37 | struct mmci_platform_data; |
| @@ -44,8 +40,8 @@ static inline struct amba_device * | |||
| 44 | dbx500_add_sdi(struct device *parent, const char *name, resource_size_t base, | 40 | dbx500_add_sdi(struct device *parent, const char *name, resource_size_t base, |
| 45 | int irq, struct mmci_platform_data *pdata, u32 periphid) | 41 | int irq, struct mmci_platform_data *pdata, u32 periphid) |
| 46 | { | 42 | { |
| 47 | return dbx500_add_amba_device(parent, name, base, irq, | 43 | return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, |
| 48 | pdata, periphid); | 44 | pdata, periphid); |
| 49 | } | 45 | } |
| 50 | 46 | ||
| 51 | struct amba_pl011_data; | 47 | struct amba_pl011_data; |
| @@ -54,7 +50,7 @@ static inline struct amba_device * | |||
| 54 | dbx500_add_uart(struct device *parent, const char *name, resource_size_t base, | 50 | dbx500_add_uart(struct device *parent, const char *name, resource_size_t base, |
| 55 | int irq, struct amba_pl011_data *pdata) | 51 | int irq, struct amba_pl011_data *pdata) |
| 56 | { | 52 | { |
| 57 | return dbx500_add_amba_device(parent, name, base, irq, pdata, 0); | 53 | return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, pdata, 0); |
| 58 | } | 54 | } |
| 59 | 55 | ||
| 60 | struct nmk_i2c_controller; | 56 | struct nmk_i2c_controller; |
| @@ -85,7 +81,8 @@ dbx500_add_i2c(struct device *parent, int id, resource_size_t base, int irq, | |||
| 85 | static inline struct amba_device * | 81 | static inline struct amba_device * |
| 86 | dbx500_add_rtc(struct device *parent, resource_size_t base, int irq) | 82 | dbx500_add_rtc(struct device *parent, resource_size_t base, int irq) |
| 87 | { | 83 | { |
| 88 | return dbx500_add_amba_device(parent, "rtc-pl031", base, irq, NULL, 0); | 84 | return amba_apb_device_add(parent, "rtc-pl031", base, SZ_4K, irq, |
| 85 | 0, NULL, 0); | ||
| 89 | } | 86 | } |
| 90 | 87 | ||
| 91 | struct nmk_gpio_platform_data; | 88 | struct nmk_gpio_platform_data; |
diff --git a/arch/arm/mach-ux500/devices-db8500.h b/arch/arm/mach-ux500/devices-db8500.h index 9fd93e9da529..6fc7eb24d9a0 100644 --- a/arch/arm/mach-ux500/devices-db8500.h +++ b/arch/arm/mach-ux500/devices-db8500.h | |||
| @@ -31,7 +31,7 @@ static inline struct amba_device * | |||
| 31 | db8500_add_ssp(struct device *parent, const char *name, resource_size_t base, | 31 | db8500_add_ssp(struct device *parent, const char *name, resource_size_t base, |
| 32 | int irq, struct pl022_ssp_controller *pdata) | 32 | int irq, struct pl022_ssp_controller *pdata) |
| 33 | { | 33 | { |
| 34 | return dbx500_add_amba_device(parent, name, base, irq, pdata, 0); | 34 | return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, pdata, 0); |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | 37 | ||
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 6bbd74e950ab..cf4687ee2a7b 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
| @@ -66,12 +66,6 @@ | |||
| 66 | #define VA_VIC_BASE __io_address(VERSATILE_VIC_BASE) | 66 | #define VA_VIC_BASE __io_address(VERSATILE_VIC_BASE) |
| 67 | #define VA_SIC_BASE __io_address(VERSATILE_SIC_BASE) | 67 | #define VA_SIC_BASE __io_address(VERSATILE_SIC_BASE) |
| 68 | 68 | ||
| 69 | static struct fpga_irq_data sic_irq = { | ||
| 70 | .base = VA_SIC_BASE, | ||
| 71 | .irq_start = IRQ_SIC_START, | ||
| 72 | .chip.name = "SIC", | ||
| 73 | }; | ||
| 74 | |||
| 75 | #if 1 | 69 | #if 1 |
| 76 | #define IRQ_MMCI0A IRQ_VICSOURCE22 | 70 | #define IRQ_MMCI0A IRQ_VICSOURCE22 |
| 77 | #define IRQ_AACI IRQ_VICSOURCE24 | 71 | #define IRQ_AACI IRQ_VICSOURCE24 |
| @@ -105,8 +99,11 @@ void __init versatile_init_irq(void) | |||
| 105 | 99 | ||
| 106 | writel(~0, VA_SIC_BASE + SIC_IRQ_ENABLE_CLEAR); | 100 | writel(~0, VA_SIC_BASE + SIC_IRQ_ENABLE_CLEAR); |
| 107 | 101 | ||
| 108 | fpga_irq_init(IRQ_VICSOURCE31, ~PIC_MASK, &sic_irq); | 102 | np = of_find_matching_node_by_address(NULL, sic_of_match, |
| 109 | irq_domain_generate_simple(sic_of_match, VERSATILE_SIC_BASE, IRQ_SIC_START); | 103 | VERSATILE_SIC_BASE); |
| 104 | |||
| 105 | fpga_irq_init(VA_SIC_BASE, "SIC", IRQ_SIC_START, | ||
| 106 | IRQ_VICSOURCE31, ~PIC_MASK, np); | ||
| 110 | 107 | ||
| 111 | /* | 108 | /* |
| 112 | * Interrupts on secondary controller from 0 to 8 are routed to | 109 | * Interrupts on secondary controller from 0 to 8 are routed to |
| @@ -666,17 +663,18 @@ static struct amba_device *amba_devs[] __initdata = { | |||
| 666 | * having a specific name. | 663 | * having a specific name. |
| 667 | */ | 664 | */ |
| 668 | struct of_dev_auxdata versatile_auxdata_lookup[] __initdata = { | 665 | struct of_dev_auxdata versatile_auxdata_lookup[] __initdata = { |
| 669 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_MMCI0_BASE, "fpga:05", NULL), | 666 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_MMCI0_BASE, "fpga:05", &mmc0_plat_data), |
| 670 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_KMI0_BASE, "fpga:06", NULL), | 667 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_KMI0_BASE, "fpga:06", NULL), |
| 671 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_KMI1_BASE, "fpga:07", NULL), | 668 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_KMI1_BASE, "fpga:07", NULL), |
| 672 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART3_BASE, "fpga:09", NULL), | 669 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART3_BASE, "fpga:09", NULL), |
| 670 | /* FIXME: this is buggy, the platform data is needed for this MMC instance too */ | ||
| 673 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_MMCI1_BASE, "fpga:0b", NULL), | 671 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_MMCI1_BASE, "fpga:0b", NULL), |
| 674 | 672 | ||
| 675 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_CLCD_BASE, "dev:20", &clcd_plat_data), | 673 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_CLCD_BASE, "dev:20", &clcd_plat_data), |
| 676 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART0_BASE, "dev:f1", NULL), | 674 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART0_BASE, "dev:f1", NULL), |
| 677 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART1_BASE, "dev:f2", NULL), | 675 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART1_BASE, "dev:f2", NULL), |
| 678 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART2_BASE, "dev:f3", NULL), | 676 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART2_BASE, "dev:f3", NULL), |
| 679 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_SSP_BASE, "dev:f4", NULL), | 677 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_SSP_BASE, "dev:f4", &ssp0_plat_data), |
| 680 | 678 | ||
| 681 | #if 0 | 679 | #if 0 |
| 682 | /* | 680 | /* |
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c index d2268be8c34c..15c6a00000ec 100644 --- a/arch/arm/mach-versatile/pci.c +++ b/arch/arm/mach-versatile/pci.c | |||
| @@ -303,12 +303,6 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys) | |||
| 303 | } | 303 | } |
| 304 | 304 | ||
| 305 | 305 | ||
| 306 | struct pci_bus * __init pci_versatile_scan_bus(int nr, struct pci_sys_data *sys) | ||
| 307 | { | ||
| 308 | return pci_scan_root_bus(NULL, sys->busnr, &pci_versatile_ops, sys, | ||
| 309 | &sys->resources); | ||
| 310 | } | ||
| 311 | |||
| 312 | void __init pci_versatile_preinit(void) | 306 | void __init pci_versatile_preinit(void) |
| 313 | { | 307 | { |
| 314 | pcibios_min_io = 0x44000000; | 308 | pcibios_min_io = 0x44000000; |
| @@ -339,19 +333,16 @@ static int __init versatile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 339 | * 26 1 29 | 333 | * 26 1 29 |
| 340 | * 27 1 30 | 334 | * 27 1 30 |
| 341 | */ | 335 | */ |
| 342 | irq = 27 + ((slot + pin - 1) & 3); | 336 | irq = 27 + ((slot - 24 + pin - 1) & 3); |
| 343 | |||
| 344 | printk("PCI map irq: slot %d, pin %d, devslot %d, irq: %d\n",slot,pin,devslot,irq); | ||
| 345 | 337 | ||
| 346 | return irq; | 338 | return irq; |
| 347 | } | 339 | } |
| 348 | 340 | ||
| 349 | static struct hw_pci versatile_pci __initdata = { | 341 | static struct hw_pci versatile_pci __initdata = { |
| 350 | .swizzle = NULL, | ||
| 351 | .map_irq = versatile_map_irq, | 342 | .map_irq = versatile_map_irq, |
| 352 | .nr_controllers = 1, | 343 | .nr_controllers = 1, |
| 344 | .ops = &pci_versatile_ops, | ||
| 353 | .setup = pci_versatile_setup, | 345 | .setup = pci_versatile_setup, |
| 354 | .scan = pci_versatile_scan_bus, | ||
| 355 | .preinit = pci_versatile_preinit, | 346 | .preinit = pci_versatile_preinit, |
| 356 | }; | 347 | }; |
| 357 | 348 | ||
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 47cdcca5a7e7..04dd092211b8 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
| @@ -19,8 +19,10 @@ | |||
| 19 | #include <linux/clkdev.h> | 19 | #include <linux/clkdev.h> |
| 20 | #include <linux/mtd/physmap.h> | 20 | #include <linux/mtd/physmap.h> |
| 21 | 21 | ||
| 22 | #include <asm/arch_timer.h> | ||
| 22 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
| 23 | #include <asm/sizes.h> | 24 | #include <asm/sizes.h> |
| 25 | #include <asm/smp_twd.h> | ||
| 24 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
| 25 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
| 26 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
| @@ -616,7 +618,6 @@ void __init v2m_dt_init_early(void) | |||
| 616 | } | 618 | } |
| 617 | 619 | ||
| 618 | clkdev_add_table(v2m_dt_lookups, ARRAY_SIZE(v2m_dt_lookups)); | 620 | clkdev_add_table(v2m_dt_lookups, ARRAY_SIZE(v2m_dt_lookups)); |
| 619 | versatile_sched_clock_init(v2m_sysreg_base + V2M_SYS_24MHZ, 24000000); | ||
| 620 | } | 621 | } |
| 621 | 622 | ||
| 622 | static struct of_device_id vexpress_irq_match[] __initdata = { | 623 | static struct of_device_id vexpress_irq_match[] __initdata = { |
| @@ -643,6 +644,11 @@ static void __init v2m_dt_timer_init(void) | |||
| 643 | return; | 644 | return; |
| 644 | node = of_find_node_by_path(path); | 645 | node = of_find_node_by_path(path); |
| 645 | v2m_sp804_init(of_iomap(node, 0), irq_of_parse_and_map(node, 0)); | 646 | v2m_sp804_init(of_iomap(node, 0), irq_of_parse_and_map(node, 0)); |
| 647 | if (arch_timer_of_register() != 0) | ||
| 648 | twd_local_timer_of_register(); | ||
| 649 | |||
| 650 | if (arch_timer_sched_clock_init() != 0) | ||
| 651 | versatile_sched_clock_init(v2m_sysreg_base + V2M_SYS_24MHZ, 24000000); | ||
| 646 | } | 652 | } |
| 647 | 653 | ||
| 648 | static struct sys_timer v2m_dt_timer = { | 654 | static struct sys_timer v2m_dt_timer = { |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 7c8a7d8467bf..101b9681c08c 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
| @@ -4,23 +4,6 @@ comment "Processor Type" | |||
| 4 | # which CPUs we support in the kernel image, and the compiler instruction | 4 | # which CPUs we support in the kernel image, and the compiler instruction |
| 5 | # optimiser behaviour. | 5 | # optimiser behaviour. |
| 6 | 6 | ||
| 7 | # ARM610 | ||
| 8 | config CPU_ARM610 | ||
| 9 | bool "Support ARM610 processor" if ARCH_RPC | ||
| 10 | select CPU_32v3 | ||
| 11 | select CPU_CACHE_V3 | ||
| 12 | select CPU_CACHE_VIVT | ||
| 13 | select CPU_CP15_MMU | ||
| 14 | select CPU_COPY_V3 if MMU | ||
| 15 | select CPU_TLB_V3 if MMU | ||
| 16 | select CPU_PABRT_LEGACY | ||
| 17 | help | ||
| 18 | The ARM610 is the successor to the ARM3 processor | ||
| 19 | and was produced by VLSI Technology Inc. | ||
| 20 | |||
| 21 | Say Y if you want support for the ARM610 processor. | ||
| 22 | Otherwise, say N. | ||
| 23 | |||
| 24 | # ARM7TDMI | 7 | # ARM7TDMI |
| 25 | config CPU_ARM7TDMI | 8 | config CPU_ARM7TDMI |
| 26 | bool "Support ARM7TDMI processor" | 9 | bool "Support ARM7TDMI processor" |
| @@ -36,25 +19,6 @@ config CPU_ARM7TDMI | |||
| 36 | Say Y if you want support for the ARM7TDMI processor. | 19 | Say Y if you want support for the ARM7TDMI processor. |
| 37 | Otherwise, say N. | 20 | Otherwise, say N. |
| 38 | 21 | ||
| 39 | # ARM710 | ||
| 40 | config CPU_ARM710 | ||
| 41 | bool "Support ARM710 processor" if ARCH_RPC | ||
| 42 | select CPU_32v3 | ||
| 43 | select CPU_CACHE_V3 | ||
| 44 | select CPU_CACHE_VIVT | ||
| 45 | select CPU_CP15_MMU | ||
| 46 | select CPU_COPY_V3 if MMU | ||
| 47 | select CPU_TLB_V3 if MMU | ||
| 48 | select CPU_PABRT_LEGACY | ||
| 49 | help | ||
| 50 | A 32-bit RISC microprocessor based on the ARM7 processor core | ||
| 51 | designed by Advanced RISC Machines Ltd. The ARM710 is the | ||
| 52 | successor to the ARM610 processor. It was released in | ||
| 53 | July 1994 by VLSI Technology Inc. | ||
| 54 | |||
| 55 | Say Y if you want support for the ARM710 processor. | ||
| 56 | Otherwise, say N. | ||
| 57 | |||
| 58 | # ARM720T | 22 | # ARM720T |
| 59 | config CPU_ARM720T | 23 | config CPU_ARM720T |
| 60 | bool "Support ARM720T processor" if ARCH_INTEGRATOR | 24 | bool "Support ARM720T processor" if ARCH_INTEGRATOR |
| @@ -530,9 +494,6 @@ config CPU_CACHE_FA | |||
| 530 | 494 | ||
| 531 | if MMU | 495 | if MMU |
| 532 | # The copy-page model | 496 | # The copy-page model |
| 533 | config CPU_COPY_V3 | ||
| 534 | bool | ||
| 535 | |||
| 536 | config CPU_COPY_V4WT | 497 | config CPU_COPY_V4WT |
| 537 | bool | 498 | bool |
| 538 | 499 | ||
| @@ -549,11 +510,6 @@ config CPU_COPY_V6 | |||
| 549 | bool | 510 | bool |
| 550 | 511 | ||
| 551 | # This selects the TLB model | 512 | # This selects the TLB model |
| 552 | config CPU_TLB_V3 | ||
| 553 | bool | ||
| 554 | help | ||
| 555 | ARM Architecture Version 3 TLB. | ||
| 556 | |||
| 557 | config CPU_TLB_V4WT | 513 | config CPU_TLB_V4WT |
| 558 | bool | 514 | bool |
| 559 | help | 515 | help |
| @@ -731,7 +687,7 @@ config CPU_HIGH_VECTOR | |||
| 731 | 687 | ||
| 732 | config CPU_ICACHE_DISABLE | 688 | config CPU_ICACHE_DISABLE |
| 733 | bool "Disable I-Cache (I-bit)" | 689 | bool "Disable I-Cache (I-bit)" |
| 734 | depends on CPU_CP15 && !(CPU_ARM610 || CPU_ARM710 || CPU_ARM720T || CPU_ARM740T || CPU_XSCALE || CPU_XSC3) | 690 | depends on CPU_CP15 && !(CPU_ARM720T || CPU_ARM740T || CPU_XSCALE || CPU_XSC3) |
| 735 | help | 691 | help |
| 736 | Say Y here to disable the processor instruction cache. Unless | 692 | Say Y here to disable the processor instruction cache. Unless |
| 737 | you have a reason not to or are unsure, say N. | 693 | you have a reason not to or are unsure, say N. |
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile index bca7e61928c7..8a9c4cb50a93 100644 --- a/arch/arm/mm/Makefile +++ b/arch/arm/mm/Makefile | |||
| @@ -44,7 +44,6 @@ obj-$(CONFIG_CPU_CACHE_FA) += cache-fa.o | |||
| 44 | AFLAGS_cache-v6.o :=-Wa,-march=armv6 | 44 | AFLAGS_cache-v6.o :=-Wa,-march=armv6 |
| 45 | AFLAGS_cache-v7.o :=-Wa,-march=armv7-a | 45 | AFLAGS_cache-v7.o :=-Wa,-march=armv7-a |
| 46 | 46 | ||
| 47 | obj-$(CONFIG_CPU_COPY_V3) += copypage-v3.o | ||
| 48 | obj-$(CONFIG_CPU_COPY_V4WT) += copypage-v4wt.o | 47 | obj-$(CONFIG_CPU_COPY_V4WT) += copypage-v4wt.o |
| 49 | obj-$(CONFIG_CPU_COPY_V4WB) += copypage-v4wb.o | 48 | obj-$(CONFIG_CPU_COPY_V4WB) += copypage-v4wb.o |
| 50 | obj-$(CONFIG_CPU_COPY_FEROCEON) += copypage-feroceon.o | 49 | obj-$(CONFIG_CPU_COPY_FEROCEON) += copypage-feroceon.o |
| @@ -54,7 +53,6 @@ obj-$(CONFIG_CPU_XSCALE) += copypage-xscale.o | |||
| 54 | obj-$(CONFIG_CPU_XSC3) += copypage-xsc3.o | 53 | obj-$(CONFIG_CPU_XSC3) += copypage-xsc3.o |
| 55 | obj-$(CONFIG_CPU_COPY_FA) += copypage-fa.o | 54 | obj-$(CONFIG_CPU_COPY_FA) += copypage-fa.o |
| 56 | 55 | ||
| 57 | obj-$(CONFIG_CPU_TLB_V3) += tlb-v3.o | ||
| 58 | obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o | 56 | obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o |
| 59 | obj-$(CONFIG_CPU_TLB_V4WB) += tlb-v4wb.o | 57 | obj-$(CONFIG_CPU_TLB_V4WB) += tlb-v4wb.o |
| 60 | obj-$(CONFIG_CPU_TLB_V4WBI) += tlb-v4wbi.o | 58 | obj-$(CONFIG_CPU_TLB_V4WBI) += tlb-v4wbi.o |
| @@ -66,8 +64,6 @@ obj-$(CONFIG_CPU_TLB_FA) += tlb-fa.o | |||
| 66 | AFLAGS_tlb-v6.o :=-Wa,-march=armv6 | 64 | AFLAGS_tlb-v6.o :=-Wa,-march=armv6 |
| 67 | AFLAGS_tlb-v7.o :=-Wa,-march=armv7-a | 65 | AFLAGS_tlb-v7.o :=-Wa,-march=armv7-a |
| 68 | 66 | ||
| 69 | obj-$(CONFIG_CPU_ARM610) += proc-arm6_7.o | ||
| 70 | obj-$(CONFIG_CPU_ARM710) += proc-arm6_7.o | ||
| 71 | obj-$(CONFIG_CPU_ARM7TDMI) += proc-arm7tdmi.o | 67 | obj-$(CONFIG_CPU_ARM7TDMI) += proc-arm7tdmi.o |
| 72 | obj-$(CONFIG_CPU_ARM720T) += proc-arm720.o | 68 | obj-$(CONFIG_CPU_ARM720T) += proc-arm720.o |
| 73 | obj-$(CONFIG_CPU_ARM740T) += proc-arm740.o | 69 | obj-$(CONFIG_CPU_ARM740T) += proc-arm740.o |
diff --git a/arch/arm/mm/cache-v3.S b/arch/arm/mm/cache-v3.S index c2301f226100..52e35f32eefb 100644 --- a/arch/arm/mm/cache-v3.S +++ b/arch/arm/mm/cache-v3.S | |||
| @@ -78,6 +78,7 @@ ENTRY(v3_coherent_kern_range) | |||
| 78 | * - end - virtual end address | 78 | * - end - virtual end address |
| 79 | */ | 79 | */ |
| 80 | ENTRY(v3_coherent_user_range) | 80 | ENTRY(v3_coherent_user_range) |
| 81 | mov r0, #0 | ||
| 81 | mov pc, lr | 82 | mov pc, lr |
| 82 | 83 | ||
| 83 | /* | 84 | /* |
diff --git a/arch/arm/mm/cache-v4.S b/arch/arm/mm/cache-v4.S index fd9bb7addc8d..022135d2b7e4 100644 --- a/arch/arm/mm/cache-v4.S +++ b/arch/arm/mm/cache-v4.S | |||
| @@ -88,6 +88,7 @@ ENTRY(v4_coherent_kern_range) | |||
| 88 | * - end - virtual end address | 88 | * - end - virtual end address |
| 89 | */ | 89 | */ |
| 90 | ENTRY(v4_coherent_user_range) | 90 | ENTRY(v4_coherent_user_range) |
| 91 | mov r0, #0 | ||
| 91 | mov pc, lr | 92 | mov pc, lr |
| 92 | 93 | ||
| 93 | /* | 94 | /* |
diff --git a/arch/arm/mm/cache-v4wb.S b/arch/arm/mm/cache-v4wb.S index 4f2c14151ccb..8f1eeae340c8 100644 --- a/arch/arm/mm/cache-v4wb.S +++ b/arch/arm/mm/cache-v4wb.S | |||
| @@ -167,9 +167,9 @@ ENTRY(v4wb_coherent_user_range) | |||
| 167 | add r0, r0, #CACHE_DLINESIZE | 167 | add r0, r0, #CACHE_DLINESIZE |
| 168 | cmp r0, r1 | 168 | cmp r0, r1 |
| 169 | blo 1b | 169 | blo 1b |
| 170 | mov ip, #0 | 170 | mov r0, #0 |
| 171 | mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache | 171 | mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache |
| 172 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 172 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
| 173 | mov pc, lr | 173 | mov pc, lr |
| 174 | 174 | ||
| 175 | 175 | ||
diff --git a/arch/arm/mm/cache-v4wt.S b/arch/arm/mm/cache-v4wt.S index 4d7b467631ce..b34a5f908a82 100644 --- a/arch/arm/mm/cache-v4wt.S +++ b/arch/arm/mm/cache-v4wt.S | |||
| @@ -125,6 +125,7 @@ ENTRY(v4wt_coherent_user_range) | |||
| 125 | add r0, r0, #CACHE_DLINESIZE | 125 | add r0, r0, #CACHE_DLINESIZE |
| 126 | cmp r0, r1 | 126 | cmp r0, r1 |
| 127 | blo 1b | 127 | blo 1b |
| 128 | mov r0, #0 | ||
| 128 | mov pc, lr | 129 | mov pc, lr |
| 129 | 130 | ||
| 130 | /* | 131 | /* |
diff --git a/arch/arm/mm/cache-v6.S b/arch/arm/mm/cache-v6.S index 74c2e5a33a4d..4b10760c56d6 100644 --- a/arch/arm/mm/cache-v6.S +++ b/arch/arm/mm/cache-v6.S | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/linkage.h> | 12 | #include <linux/linkage.h> |
| 13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
| 14 | #include <asm/assembler.h> | 14 | #include <asm/assembler.h> |
| 15 | #include <asm/errno.h> | ||
| 15 | #include <asm/unwind.h> | 16 | #include <asm/unwind.h> |
| 16 | 17 | ||
| 17 | #include "proc-macros.S" | 18 | #include "proc-macros.S" |
| @@ -135,7 +136,6 @@ ENTRY(v6_coherent_user_range) | |||
| 135 | 1: | 136 | 1: |
| 136 | USER( mcr p15, 0, r0, c7, c10, 1 ) @ clean D line | 137 | USER( mcr p15, 0, r0, c7, c10, 1 ) @ clean D line |
| 137 | add r0, r0, #CACHE_LINE_SIZE | 138 | add r0, r0, #CACHE_LINE_SIZE |
| 138 | 2: | ||
| 139 | cmp r0, r1 | 139 | cmp r0, r1 |
| 140 | blo 1b | 140 | blo 1b |
| 141 | #endif | 141 | #endif |
| @@ -154,13 +154,11 @@ ENTRY(v6_coherent_user_range) | |||
| 154 | 154 | ||
| 155 | /* | 155 | /* |
| 156 | * Fault handling for the cache operation above. If the virtual address in r0 | 156 | * Fault handling for the cache operation above. If the virtual address in r0 |
| 157 | * isn't mapped, just try the next page. | 157 | * isn't mapped, fail with -EFAULT. |
| 158 | */ | 158 | */ |
| 159 | 9001: | 159 | 9001: |
| 160 | mov r0, r0, lsr #12 | 160 | mov r0, #-EFAULT |
| 161 | mov r0, r0, lsl #12 | 161 | mov pc, lr |
| 162 | add r0, r0, #4096 | ||
| 163 | b 2b | ||
| 164 | UNWIND(.fnend ) | 162 | UNWIND(.fnend ) |
| 165 | ENDPROC(v6_coherent_user_range) | 163 | ENDPROC(v6_coherent_user_range) |
| 166 | ENDPROC(v6_coherent_kern_range) | 164 | ENDPROC(v6_coherent_kern_range) |
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index a655d3da386d..39e3fb3db801 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
| 14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
| 15 | #include <asm/assembler.h> | 15 | #include <asm/assembler.h> |
| 16 | #include <asm/errno.h> | ||
| 16 | #include <asm/unwind.h> | 17 | #include <asm/unwind.h> |
| 17 | 18 | ||
| 18 | #include "proc-macros.S" | 19 | #include "proc-macros.S" |
| @@ -198,7 +199,6 @@ ENTRY(v7_coherent_user_range) | |||
| 198 | add r12, r12, r2 | 199 | add r12, r12, r2 |
| 199 | cmp r12, r1 | 200 | cmp r12, r1 |
| 200 | blo 2b | 201 | blo 2b |
| 201 | 3: | ||
| 202 | mov r0, #0 | 202 | mov r0, #0 |
| 203 | ALT_SMP(mcr p15, 0, r0, c7, c1, 6) @ invalidate BTB Inner Shareable | 203 | ALT_SMP(mcr p15, 0, r0, c7, c1, 6) @ invalidate BTB Inner Shareable |
| 204 | ALT_UP(mcr p15, 0, r0, c7, c5, 6) @ invalidate BTB | 204 | ALT_UP(mcr p15, 0, r0, c7, c5, 6) @ invalidate BTB |
| @@ -208,13 +208,11 @@ ENTRY(v7_coherent_user_range) | |||
| 208 | 208 | ||
| 209 | /* | 209 | /* |
| 210 | * Fault handling for the cache operation above. If the virtual address in r0 | 210 | * Fault handling for the cache operation above. If the virtual address in r0 |
| 211 | * isn't mapped, just try the next page. | 211 | * isn't mapped, fail with -EFAULT. |
| 212 | */ | 212 | */ |
| 213 | 9001: | 213 | 9001: |
| 214 | mov r12, r12, lsr #12 | 214 | mov r0, #-EFAULT |
| 215 | mov r12, r12, lsl #12 | 215 | mov pc, lr |
| 216 | add r12, r12, #4096 | ||
| 217 | b 3b | ||
| 218 | UNWIND(.fnend ) | 216 | UNWIND(.fnend ) |
| 219 | ENDPROC(v7_coherent_kern_range) | 217 | ENDPROC(v7_coherent_kern_range) |
| 220 | ENDPROC(v7_coherent_user_range) | 218 | ENDPROC(v7_coherent_user_range) |
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index ee9bb363d606..806cc4f63516 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c | |||
| @@ -18,30 +18,39 @@ | |||
| 18 | 18 | ||
| 19 | static DEFINE_RAW_SPINLOCK(cpu_asid_lock); | 19 | static DEFINE_RAW_SPINLOCK(cpu_asid_lock); |
| 20 | unsigned int cpu_last_asid = ASID_FIRST_VERSION; | 20 | unsigned int cpu_last_asid = ASID_FIRST_VERSION; |
| 21 | #ifdef CONFIG_SMP | ||
| 22 | DEFINE_PER_CPU(struct mm_struct *, current_mm); | ||
| 23 | #endif | ||
| 24 | 21 | ||
| 25 | #ifdef CONFIG_ARM_LPAE | 22 | #ifdef CONFIG_ARM_LPAE |
| 26 | #define cpu_set_asid(asid) { \ | 23 | void cpu_set_reserved_ttbr0(void) |
| 27 | unsigned long ttbl, ttbh; \ | 24 | { |
| 28 | asm volatile( \ | 25 | unsigned long ttbl = __pa(swapper_pg_dir); |
| 29 | " mrrc p15, 0, %0, %1, c2 @ read TTBR0\n" \ | 26 | unsigned long ttbh = 0; |
| 30 | " mov %1, %2, lsl #(48 - 32) @ set ASID\n" \ | 27 | |
| 31 | " mcrr p15, 0, %0, %1, c2 @ set TTBR0\n" \ | 28 | /* |
| 32 | : "=&r" (ttbl), "=&r" (ttbh) \ | 29 | * Set TTBR0 to swapper_pg_dir which contains only global entries. The |
| 33 | : "r" (asid & ~ASID_MASK)); \ | 30 | * ASID is set to 0. |
| 31 | */ | ||
| 32 | asm volatile( | ||
| 33 | " mcrr p15, 0, %0, %1, c2 @ set TTBR0\n" | ||
| 34 | : | ||
| 35 | : "r" (ttbl), "r" (ttbh)); | ||
| 36 | isb(); | ||
| 34 | } | 37 | } |
| 35 | #else | 38 | #else |
| 36 | #define cpu_set_asid(asid) \ | 39 | void cpu_set_reserved_ttbr0(void) |
| 37 | asm(" mcr p15, 0, %0, c13, c0, 1\n" : : "r" (asid)) | 40 | { |
| 41 | u32 ttb; | ||
| 42 | /* Copy TTBR1 into TTBR0 */ | ||
| 43 | asm volatile( | ||
| 44 | " mrc p15, 0, %0, c2, c0, 1 @ read TTBR1\n" | ||
| 45 | " mcr p15, 0, %0, c2, c0, 0 @ set TTBR0\n" | ||
| 46 | : "=r" (ttb)); | ||
| 47 | isb(); | ||
| 48 | } | ||
| 38 | #endif | 49 | #endif |
| 39 | 50 | ||
| 40 | /* | 51 | /* |
| 41 | * We fork()ed a process, and we need a new context for the child | 52 | * We fork()ed a process, and we need a new context for the child |
| 42 | * to run in. We reserve version 0 for initial tasks so we will | 53 | * to run in. |
| 43 | * always allocate an ASID. The ASID 0 is reserved for the TTBR | ||
| 44 | * register changing sequence. | ||
| 45 | */ | 54 | */ |
| 46 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) | 55 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) |
| 47 | { | 56 | { |
| @@ -51,9 +60,7 @@ void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) | |||
| 51 | 60 | ||
| 52 | static void flush_context(void) | 61 | static void flush_context(void) |
| 53 | { | 62 | { |
| 54 | /* set the reserved ASID before flushing the TLB */ | 63 | cpu_set_reserved_ttbr0(); |
| 55 | cpu_set_asid(0); | ||
| 56 | isb(); | ||
| 57 | local_flush_tlb_all(); | 64 | local_flush_tlb_all(); |
| 58 | if (icache_is_vivt_asid_tagged()) { | 65 | if (icache_is_vivt_asid_tagged()) { |
| 59 | __flush_icache_all(); | 66 | __flush_icache_all(); |
| @@ -98,14 +105,7 @@ static void reset_context(void *info) | |||
| 98 | { | 105 | { |
| 99 | unsigned int asid; | 106 | unsigned int asid; |
| 100 | unsigned int cpu = smp_processor_id(); | 107 | unsigned int cpu = smp_processor_id(); |
| 101 | struct mm_struct *mm = per_cpu(current_mm, cpu); | 108 | struct mm_struct *mm = current->active_mm; |
| 102 | |||
| 103 | /* | ||
| 104 | * Check if a current_mm was set on this CPU as it might still | ||
| 105 | * be in the early booting stages and using the reserved ASID. | ||
| 106 | */ | ||
| 107 | if (!mm) | ||
| 108 | return; | ||
| 109 | 109 | ||
| 110 | smp_rmb(); | 110 | smp_rmb(); |
| 111 | asid = cpu_last_asid + cpu + 1; | 111 | asid = cpu_last_asid + cpu + 1; |
| @@ -114,8 +114,7 @@ static void reset_context(void *info) | |||
| 114 | set_mm_context(mm, asid); | 114 | set_mm_context(mm, asid); |
| 115 | 115 | ||
| 116 | /* set the new ASID */ | 116 | /* set the new ASID */ |
| 117 | cpu_set_asid(mm->context.id); | 117 | cpu_switch_mm(mm->pgd, mm); |
| 118 | isb(); | ||
| 119 | } | 118 | } |
| 120 | 119 | ||
| 121 | #else | 120 | #else |
diff --git a/arch/arm/mm/copypage-v3.c b/arch/arm/mm/copypage-v3.c deleted file mode 100644 index 3935bddd4769..000000000000 --- a/arch/arm/mm/copypage-v3.c +++ /dev/null | |||
| @@ -1,81 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mm/copypage-v3.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 1995-1999 Russell King | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | #include <linux/init.h> | ||
| 11 | #include <linux/highmem.h> | ||
| 12 | |||
| 13 | /* | ||
| 14 | * ARMv3 optimised copy_user_highpage | ||
| 15 | * | ||
| 16 | * FIXME: do we need to handle cache stuff... | ||
| 17 | */ | ||
| 18 | static void __naked | ||
| 19 | v3_copy_user_page(void *kto, const void *kfrom) | ||
| 20 | { | ||
| 21 | asm("\n\ | ||
| 22 | stmfd sp!, {r4, lr} @ 2\n\ | ||
| 23 | mov r2, %2 @ 1\n\ | ||
| 24 | ldmia %0!, {r3, r4, ip, lr} @ 4+1\n\ | ||
| 25 | 1: stmia %1!, {r3, r4, ip, lr} @ 4\n\ | ||
| 26 | ldmia %0!, {r3, r4, ip, lr} @ 4+1\n\ | ||
| 27 | stmia %1!, {r3, r4, ip, lr} @ 4\n\ | ||
| 28 | ldmia %0!, {r3, r4, ip, lr} @ 4+1\n\ | ||
| 29 | stmia %1!, {r3, r4, ip, lr} @ 4\n\ | ||
| 30 | ldmia %0!, {r3, r4, ip, lr} @ 4\n\ | ||
| 31 | subs r2, r2, #1 @ 1\n\ | ||
| 32 | stmia %1!, {r3, r4, ip, lr} @ 4\n\ | ||
| 33 | ldmneia %0!, {r3, r4, ip, lr} @ 4\n\ | ||
| 34 | bne 1b @ 1\n\ | ||
| 35 | ldmfd sp!, {r4, pc} @ 3" | ||
| 36 | : | ||
| 37 | : "r" (kfrom), "r" (kto), "I" (PAGE_SIZE / 64)); | ||
| 38 | } | ||
| 39 | |||
| 40 | void v3_copy_user_highpage(struct page *to, struct page *from, | ||
| 41 | unsigned long vaddr, struct vm_area_struct *vma) | ||
| 42 | { | ||
| 43 | void *kto, *kfrom; | ||
| 44 | |||
| 45 | kto = kmap_atomic(to); | ||
| 46 | kfrom = kmap_atomic(from); | ||
| 47 | v3_copy_user_page(kto, kfrom); | ||
| 48 | kunmap_atomic(kfrom); | ||
| 49 | kunmap_atomic(kto); | ||
| 50 | } | ||
| 51 | |||
| 52 | /* | ||
| 53 | * ARMv3 optimised clear_user_page | ||
| 54 | * | ||
| 55 | * FIXME: do we need to handle cache stuff... | ||
| 56 | */ | ||
| 57 | void v3_clear_user_highpage(struct page *page, unsigned long vaddr) | ||
| 58 | { | ||
| 59 | void *ptr, *kaddr = kmap_atomic(page); | ||
| 60 | asm volatile("\n\ | ||
| 61 | mov r1, %2 @ 1\n\ | ||
| 62 | mov r2, #0 @ 1\n\ | ||
| 63 | mov r3, #0 @ 1\n\ | ||
| 64 | mov ip, #0 @ 1\n\ | ||
| 65 | mov lr, #0 @ 1\n\ | ||
| 66 | 1: stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
| 67 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
| 68 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
| 69 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
| 70 | subs r1, r1, #1 @ 1\n\ | ||
| 71 | bne 1b @ 1" | ||
| 72 | : "=r" (ptr) | ||
| 73 | : "0" (kaddr), "I" (PAGE_SIZE / 64) | ||
| 74 | : "r1", "r2", "r3", "ip", "lr"); | ||
| 75 | kunmap_atomic(kaddr); | ||
| 76 | } | ||
| 77 | |||
| 78 | struct cpu_user_fns v3_user_fns __initdata = { | ||
| 79 | .cpu_clear_user_highpage = v3_clear_user_highpage, | ||
| 80 | .cpu_copy_user_highpage = v3_copy_user_highpage, | ||
| 81 | }; | ||
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 5bb48356d217..c3bd83450227 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
| @@ -432,9 +432,6 @@ do_translation_fault(unsigned long addr, unsigned int fsr, | |||
| 432 | 432 | ||
| 433 | index = pgd_index(addr); | 433 | index = pgd_index(addr); |
| 434 | 434 | ||
| 435 | /* | ||
| 436 | * FIXME: CP15 C1 is write only on ARMv3 architectures. | ||
| 437 | */ | ||
| 438 | pgd = cpu_get_pgd() + index; | 435 | pgd = cpu_get_pgd() + index; |
| 439 | pgd_k = init_mm.pgd + index; | 436 | pgd_k = init_mm.pgd + index; |
| 440 | 437 | ||
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S index 234951345eb3..0650bb87c1e3 100644 --- a/arch/arm/mm/proc-arm1020.S +++ b/arch/arm/mm/proc-arm1020.S | |||
| @@ -241,6 +241,7 @@ ENTRY(arm1020_coherent_user_range) | |||
| 241 | cmp r0, r1 | 241 | cmp r0, r1 |
| 242 | blo 1b | 242 | blo 1b |
| 243 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 243 | mcr p15, 0, ip, c7, c10, 4 @ drain WB |
| 244 | mov r0, #0 | ||
| 244 | mov pc, lr | 245 | mov pc, lr |
| 245 | 246 | ||
| 246 | /* | 247 | /* |
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S index c244b06caac9..4188478325a6 100644 --- a/arch/arm/mm/proc-arm1020e.S +++ b/arch/arm/mm/proc-arm1020e.S | |||
| @@ -235,6 +235,7 @@ ENTRY(arm1020e_coherent_user_range) | |||
| 235 | cmp r0, r1 | 235 | cmp r0, r1 |
| 236 | blo 1b | 236 | blo 1b |
| 237 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 237 | mcr p15, 0, ip, c7, c10, 4 @ drain WB |
| 238 | mov r0, #0 | ||
| 238 | mov pc, lr | 239 | mov pc, lr |
| 239 | 240 | ||
| 240 | /* | 241 | /* |
diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S index 38fe22efd18f..33c68824bff0 100644 --- a/arch/arm/mm/proc-arm1022.S +++ b/arch/arm/mm/proc-arm1022.S | |||
| @@ -224,6 +224,7 @@ ENTRY(arm1022_coherent_user_range) | |||
| 224 | cmp r0, r1 | 224 | cmp r0, r1 |
| 225 | blo 1b | 225 | blo 1b |
| 226 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 226 | mcr p15, 0, ip, c7, c10, 4 @ drain WB |
| 227 | mov r0, #0 | ||
| 227 | mov pc, lr | 228 | mov pc, lr |
| 228 | 229 | ||
| 229 | /* | 230 | /* |
diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S index 3eb9c3c26c75..fbc1d5fc24dc 100644 --- a/arch/arm/mm/proc-arm1026.S +++ b/arch/arm/mm/proc-arm1026.S | |||
| @@ -218,6 +218,7 @@ ENTRY(arm1026_coherent_user_range) | |||
| 218 | cmp r0, r1 | 218 | cmp r0, r1 |
| 219 | blo 1b | 219 | blo 1b |
| 220 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 220 | mcr p15, 0, ip, c7, c10, 4 @ drain WB |
| 221 | mov r0, #0 | ||
| 221 | mov pc, lr | 222 | mov pc, lr |
| 222 | 223 | ||
| 223 | /* | 224 | /* |
diff --git a/arch/arm/mm/proc-arm6_7.S b/arch/arm/mm/proc-arm6_7.S deleted file mode 100644 index 4fbeb5b8e6c2..000000000000 --- a/arch/arm/mm/proc-arm6_7.S +++ /dev/null | |||
| @@ -1,327 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mm/proc-arm6,7.S | ||
| 3 | * | ||
| 4 | * Copyright (C) 1997-2000 Russell King | ||
| 5 | * hacked for non-paged-MM by Hyok S. Choi, 2003. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | * | ||
| 11 | * These are the low level assembler for performing cache and TLB | ||
| 12 | * functions on the ARM610 & ARM710. | ||
| 13 | */ | ||
| 14 | #include <linux/linkage.h> | ||
| 15 | #include <linux/init.h> | ||
| 16 | #include <asm/assembler.h> | ||
| 17 | #include <asm/asm-offsets.h> | ||
| 18 | #include <asm/hwcap.h> | ||
| 19 | #include <asm/pgtable-hwdef.h> | ||
| 20 | #include <asm/pgtable.h> | ||
| 21 | #include <asm/ptrace.h> | ||
| 22 | |||
| 23 | #include "proc-macros.S" | ||
| 24 | |||
| 25 | ENTRY(cpu_arm6_dcache_clean_area) | ||
| 26 | ENTRY(cpu_arm7_dcache_clean_area) | ||
| 27 | mov pc, lr | ||
| 28 | |||
| 29 | /* | ||
| 30 | * Function: arm6_7_data_abort () | ||
| 31 | * | ||
| 32 | * Params : r2 = pt_regs | ||
| 33 | * : r4 = aborted context pc | ||
| 34 | * : r5 = aborted context psr | ||
| 35 | * | ||
| 36 | * Purpose : obtain information about current aborted instruction | ||
| 37 | * | ||
| 38 | * Returns : r4-r5, r10-r11, r13 preserved | ||
| 39 | */ | ||
| 40 | |||
| 41 | ENTRY(cpu_arm7_data_abort) | ||
| 42 | mrc p15, 0, r1, c5, c0, 0 @ get FSR | ||
| 43 | mrc p15, 0, r0, c6, c0, 0 @ get FAR | ||
| 44 | ldr r8, [r4] @ read arm instruction | ||
| 45 | tst r8, #1 << 20 @ L = 0 -> write? | ||
| 46 | orreq r1, r1, #1 << 11 @ yes. | ||
| 47 | and r7, r8, #15 << 24 | ||
| 48 | add pc, pc, r7, lsr #22 @ Now branch to the relevant processing routine | ||
| 49 | nop | ||
| 50 | |||
| 51 | /* 0 */ b .data_unknown | ||
| 52 | /* 1 */ b do_DataAbort @ swp | ||
| 53 | /* 2 */ b .data_unknown | ||
| 54 | /* 3 */ b .data_unknown | ||
| 55 | /* 4 */ b .data_arm_lateldrpostconst @ ldr rd, [rn], #m | ||
| 56 | /* 5 */ b .data_arm_lateldrpreconst @ ldr rd, [rn, #m] | ||
| 57 | /* 6 */ b .data_arm_lateldrpostreg @ ldr rd, [rn], rm | ||
| 58 | /* 7 */ b .data_arm_lateldrprereg @ ldr rd, [rn, rm] | ||
| 59 | /* 8 */ b .data_arm_ldmstm @ ldm*a rn, <rlist> | ||
| 60 | /* 9 */ b .data_arm_ldmstm @ ldm*b rn, <rlist> | ||
| 61 | /* a */ b .data_unknown | ||
| 62 | /* b */ b .data_unknown | ||
| 63 | /* c */ b do_DataAbort @ ldc rd, [rn], #m @ Same as ldr rd, [rn], #m | ||
| 64 | /* d */ b do_DataAbort @ ldc rd, [rn, #m] | ||
| 65 | /* e */ b .data_unknown | ||
| 66 | /* f */ | ||
| 67 | .data_unknown: @ Part of jumptable | ||
| 68 | mov r0, r4 | ||
| 69 | mov r1, r8 | ||
| 70 | b baddataabort | ||
| 71 | |||
| 72 | ENTRY(cpu_arm6_data_abort) | ||
| 73 | mrc p15, 0, r1, c5, c0, 0 @ get FSR | ||
| 74 | mrc p15, 0, r0, c6, c0, 0 @ get FAR | ||
| 75 | ldr r8, [r4] @ read arm instruction | ||
| 76 | tst r8, #1 << 20 @ L = 0 -> write? | ||
| 77 | orreq r1, r1, #1 << 11 @ yes. | ||
| 78 | and r7, r8, #14 << 24 | ||
| 79 | teq r7, #8 << 24 @ was it ldm/stm | ||
| 80 | bne do_DataAbort | ||
| 81 | |||
| 82 | .data_arm_ldmstm: | ||
| 83 | tst r8, #1 << 21 @ check writeback bit | ||
| 84 | beq do_DataAbort @ no writeback -> no fixup | ||
| 85 | mov r7, #0x11 | ||
| 86 | orr r7, r7, #0x1100 | ||
| 87 | and r6, r8, r7 | ||
| 88 | and r9, r8, r7, lsl #1 | ||
| 89 | add r6, r6, r9, lsr #1 | ||
| 90 | and r9, r8, r7, lsl #2 | ||
| 91 | add r6, r6, r9, lsr #2 | ||
| 92 | and r9, r8, r7, lsl #3 | ||
| 93 | add r6, r6, r9, lsr #3 | ||
| 94 | add r6, r6, r6, lsr #8 | ||
| 95 | add r6, r6, r6, lsr #4 | ||
| 96 | and r6, r6, #15 @ r6 = no. of registers to transfer. | ||
| 97 | and r9, r8, #15 << 16 @ Extract 'n' from instruction | ||
| 98 | ldr r7, [r2, r9, lsr #14] @ Get register 'Rn' | ||
| 99 | tst r8, #1 << 23 @ Check U bit | ||
| 100 | subne r7, r7, r6, lsl #2 @ Undo increment | ||
| 101 | addeq r7, r7, r6, lsl #2 @ Undo decrement | ||
| 102 | str r7, [r2, r9, lsr #14] @ Put register 'Rn' | ||
| 103 | b do_DataAbort | ||
| 104 | |||
| 105 | .data_arm_apply_r6_and_rn: | ||
| 106 | and r9, r8, #15 << 16 @ Extract 'n' from instruction | ||
| 107 | ldr r7, [r2, r9, lsr #14] @ Get register 'Rn' | ||
| 108 | tst r8, #1 << 23 @ Check U bit | ||
| 109 | subne r7, r7, r6 @ Undo incrmenet | ||
| 110 | addeq r7, r7, r6 @ Undo decrement | ||
| 111 | str r7, [r2, r9, lsr #14] @ Put register 'Rn' | ||
| 112 | b do_DataAbort | ||
| 113 | |||
| 114 | .data_arm_lateldrpreconst: | ||
| 115 | tst r8, #1 << 21 @ check writeback bit | ||
| 116 | beq do_DataAbort @ no writeback -> no fixup | ||
| 117 | .data_arm_lateldrpostconst: | ||
| 118 | movs r6, r8, lsl #20 @ Get offset | ||
| 119 | beq do_DataAbort @ zero -> no fixup | ||
| 120 | and r9, r8, #15 << 16 @ Extract 'n' from instruction | ||
| 121 | ldr r7, [r2, r9, lsr #14] @ Get register 'Rn' | ||
| 122 | tst r8, #1 << 23 @ Check U bit | ||
| 123 | subne r7, r7, r6, lsr #20 @ Undo increment | ||
| 124 | addeq r7, r7, r6, lsr #20 @ Undo decrement | ||
| 125 | str r7, [r2, r9, lsr #14] @ Put register 'Rn' | ||
| 126 | b do_DataAbort | ||
| 127 | |||
| 128 | .data_arm_lateldrprereg: | ||
| 129 | tst r8, #1 << 21 @ check writeback bit | ||
| 130 | beq do_DataAbort @ no writeback -> no fixup | ||
| 131 | .data_arm_lateldrpostreg: | ||
| 132 | and r7, r8, #15 @ Extract 'm' from instruction | ||
| 133 | ldr r6, [r2, r7, lsl #2] @ Get register 'Rm' | ||
| 134 | mov r9, r8, lsr #7 @ get shift count | ||
| 135 | ands r9, r9, #31 | ||
| 136 | and r7, r8, #0x70 @ get shift type | ||
| 137 | orreq r7, r7, #8 @ shift count = 0 | ||
| 138 | add pc, pc, r7 | ||
| 139 | nop | ||
| 140 | |||
| 141 | mov r6, r6, lsl r9 @ 0: LSL #!0 | ||
| 142 | b .data_arm_apply_r6_and_rn | ||
| 143 | b .data_arm_apply_r6_and_rn @ 1: LSL #0 | ||
| 144 | nop | ||
| 145 | b .data_unknown @ 2: MUL? | ||
| 146 | nop | ||
| 147 | b .data_unknown @ 3: MUL? | ||
| 148 | nop | ||
| 149 | mov r6, r6, lsr r9 @ 4: LSR #!0 | ||
| 150 | b .data_arm_apply_r6_and_rn | ||
| 151 | mov r6, r6, lsr #32 @ 5: LSR #32 | ||
| 152 | b .data_arm_apply_r6_and_rn | ||
| 153 | b .data_unknown @ 6: MUL? | ||
| 154 | nop | ||
| 155 | b .data_unknown @ 7: MUL? | ||
| 156 | nop | ||
| 157 | mov r6, r6, asr r9 @ 8: ASR #!0 | ||
| 158 | b .data_arm_apply_r6_and_rn | ||
| 159 | mov r6, r6, asr #32 @ 9: ASR #32 | ||
| 160 | b .data_arm_apply_r6_and_rn | ||
| 161 | b .data_unknown @ A: MUL? | ||
| 162 | nop | ||
| 163 | b .data_unknown @ B: MUL? | ||
| 164 | nop | ||
| 165 | mov r6, r6, ror r9 @ C: ROR #!0 | ||
| 166 | b .data_arm_apply_r6_and_rn | ||
| 167 | mov r6, r6, rrx @ D: RRX | ||
| 168 | b .data_arm_apply_r6_and_rn | ||
| 169 | b .data_unknown @ E: MUL? | ||
| 170 | nop | ||
| 171 | b .data_unknown @ F: MUL? | ||
| 172 | |||
| 173 | /* | ||
| 174 | * Function: arm6_7_proc_init (void) | ||
| 175 | * : arm6_7_proc_fin (void) | ||
| 176 | * | ||
| 177 | * Notes : This processor does not require these | ||
| 178 | */ | ||
| 179 | ENTRY(cpu_arm6_proc_init) | ||
| 180 | ENTRY(cpu_arm7_proc_init) | ||
| 181 | mov pc, lr | ||
| 182 | |||
| 183 | ENTRY(cpu_arm6_proc_fin) | ||
| 184 | ENTRY(cpu_arm7_proc_fin) | ||
| 185 | mov r0, #0x31 @ ....S..DP...M | ||
| 186 | mcr p15, 0, r0, c1, c0, 0 @ disable caches | ||
| 187 | mov pc, lr | ||
| 188 | |||
| 189 | ENTRY(cpu_arm6_do_idle) | ||
| 190 | ENTRY(cpu_arm7_do_idle) | ||
| 191 | mov pc, lr | ||
| 192 | |||
| 193 | /* | ||
| 194 | * Function: arm6_7_switch_mm(unsigned long pgd_phys) | ||
| 195 | * Params : pgd_phys Physical address of page table | ||
| 196 | * Purpose : Perform a task switch, saving the old processes state, and restoring | ||
| 197 | * the new. | ||
| 198 | */ | ||
| 199 | ENTRY(cpu_arm6_switch_mm) | ||
| 200 | ENTRY(cpu_arm7_switch_mm) | ||
| 201 | #ifdef CONFIG_MMU | ||
| 202 | mov r1, #0 | ||
| 203 | mcr p15, 0, r1, c7, c0, 0 @ flush cache | ||
| 204 | mcr p15, 0, r0, c2, c0, 0 @ update page table ptr | ||
| 205 | mcr p15, 0, r1, c5, c0, 0 @ flush TLBs | ||
| 206 | #endif | ||
| 207 | mov pc, lr | ||
| 208 | |||
| 209 | /* | ||
| 210 | * Function: arm6_7_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext) | ||
| 211 | * Params : r0 = Address to set | ||
| 212 | * : r1 = value to set | ||
| 213 | * Purpose : Set a PTE and flush it out of any WB cache | ||
| 214 | */ | ||
| 215 | .align 5 | ||
| 216 | ENTRY(cpu_arm6_set_pte_ext) | ||
| 217 | ENTRY(cpu_arm7_set_pte_ext) | ||
| 218 | #ifdef CONFIG_MMU | ||
| 219 | armv3_set_pte_ext wc_disable=0 | ||
| 220 | #endif /* CONFIG_MMU */ | ||
| 221 | mov pc, lr | ||
| 222 | |||
| 223 | /* | ||
| 224 | * Function: _arm6_7_reset | ||
| 225 | * Params : r0 = address to jump to | ||
| 226 | * Notes : This sets up everything for a reset | ||
| 227 | */ | ||
| 228 | .pushsection .idmap.text, "ax" | ||
| 229 | ENTRY(cpu_arm6_reset) | ||
| 230 | ENTRY(cpu_arm7_reset) | ||
| 231 | mov r1, #0 | ||
| 232 | mcr p15, 0, r1, c7, c0, 0 @ flush cache | ||
| 233 | #ifdef CONFIG_MMU | ||
| 234 | mcr p15, 0, r1, c5, c0, 0 @ flush TLB | ||
| 235 | #endif | ||
| 236 | mov r1, #0x30 | ||
| 237 | mcr p15, 0, r1, c1, c0, 0 @ turn off MMU etc | ||
| 238 | mov pc, r0 | ||
| 239 | ENDPROC(cpu_arm6_reset) | ||
| 240 | ENDPROC(cpu_arm7_reset) | ||
| 241 | .popsection | ||
| 242 | |||
| 243 | __CPUINIT | ||
| 244 | |||
| 245 | .type __arm6_setup, #function | ||
| 246 | __arm6_setup: mov r0, #0 | ||
| 247 | mcr p15, 0, r0, c7, c0 @ flush caches on v3 | ||
| 248 | #ifdef CONFIG_MMU | ||
| 249 | mcr p15, 0, r0, c5, c0 @ flush TLBs on v3 | ||
| 250 | mov r0, #0x3d @ . ..RS BLDP WCAM | ||
| 251 | orr r0, r0, #0x100 @ . ..01 0011 1101 | ||
| 252 | #else | ||
| 253 | mov r0, #0x3c @ . ..RS BLDP WCA. | ||
| 254 | #endif | ||
| 255 | mov pc, lr | ||
| 256 | .size __arm6_setup, . - __arm6_setup | ||
| 257 | |||
| 258 | .type __arm7_setup, #function | ||
| 259 | __arm7_setup: mov r0, #0 | ||
| 260 | mcr p15, 0, r0, c7, c0 @ flush caches on v3 | ||
| 261 | #ifdef CONFIG_MMU | ||
| 262 | mcr p15, 0, r0, c5, c0 @ flush TLBs on v3 | ||
| 263 | mcr p15, 0, r0, c3, c0 @ load domain access register | ||
| 264 | mov r0, #0x7d @ . ..RS BLDP WCAM | ||
| 265 | orr r0, r0, #0x100 @ . ..01 0111 1101 | ||
| 266 | #else | ||
| 267 | mov r0, #0x7c @ . ..RS BLDP WCA. | ||
| 268 | #endif | ||
| 269 | mov pc, lr | ||
| 270 | .size __arm7_setup, . - __arm7_setup | ||
| 271 | |||
| 272 | __INITDATA | ||
| 273 | |||
| 274 | @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) | ||
| 275 | define_processor_functions arm6, dabort=cpu_arm6_data_abort, pabort=legacy_pabort | ||
| 276 | define_processor_functions arm7, dabort=cpu_arm7_data_abort, pabort=legacy_pabort | ||
| 277 | |||
| 278 | .section ".rodata" | ||
| 279 | |||
| 280 | string cpu_arch_name, "armv3" | ||
| 281 | string cpu_elf_name, "v3" | ||
| 282 | string cpu_arm6_name, "ARM6" | ||
| 283 | string cpu_arm610_name, "ARM610" | ||
| 284 | string cpu_arm7_name, "ARM7" | ||
| 285 | string cpu_arm710_name, "ARM710" | ||
| 286 | |||
| 287 | .align | ||
| 288 | |||
| 289 | .section ".proc.info.init", #alloc, #execinstr | ||
| 290 | |||
| 291 | .macro arm67_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, \ | ||
| 292 | cpu_mm_mmu_flags:req, cpu_flush:req, cpu_proc_funcs:req | ||
| 293 | .type __\name\()_proc_info, #object | ||
| 294 | __\name\()_proc_info: | ||
| 295 | .long \cpu_val | ||
| 296 | .long \cpu_mask | ||
| 297 | .long \cpu_mm_mmu_flags | ||
| 298 | .long PMD_TYPE_SECT | \ | ||
| 299 | PMD_BIT4 | \ | ||
| 300 | PMD_SECT_AP_WRITE | \ | ||
| 301 | PMD_SECT_AP_READ | ||
| 302 | b \cpu_flush | ||
| 303 | .long cpu_arch_name | ||
| 304 | .long cpu_elf_name | ||
| 305 | .long HWCAP_SWP | HWCAP_26BIT | ||
| 306 | .long \cpu_name | ||
| 307 | .long \cpu_proc_funcs | ||
| 308 | .long v3_tlb_fns | ||
| 309 | .long v3_user_fns | ||
| 310 | .long v3_cache_fns | ||
| 311 | .size __\name\()_proc_info, . - __\name\()_proc_info | ||
| 312 | .endm | ||
| 313 | |||
| 314 | arm67_proc_info arm6, 0x41560600, 0xfffffff0, cpu_arm6_name, \ | ||
| 315 | 0x00000c1e, __arm6_setup, arm6_processor_functions | ||
| 316 | arm67_proc_info arm610, 0x41560610, 0xfffffff0, cpu_arm610_name, \ | ||
| 317 | 0x00000c1e, __arm6_setup, arm6_processor_functions | ||
| 318 | arm67_proc_info arm7, 0x41007000, 0xffffff00, cpu_arm7_name, \ | ||
| 319 | 0x00000c1e, __arm7_setup, arm7_processor_functions | ||
| 320 | arm67_proc_info arm710, 0x41007100, 0xfff8ff00, cpu_arm710_name, \ | ||
| 321 | PMD_TYPE_SECT | \ | ||
| 322 | PMD_SECT_BUFFERABLE | \ | ||
| 323 | PMD_SECT_CACHEABLE | \ | ||
| 324 | PMD_BIT4 | \ | ||
| 325 | PMD_SECT_AP_WRITE | \ | ||
| 326 | PMD_SECT_AP_READ, \ | ||
| 327 | __arm7_setup, arm7_processor_functions | ||
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S index cb941ae95f66..1a8c138eb897 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S | |||
| @@ -210,6 +210,7 @@ ENTRY(arm920_coherent_user_range) | |||
| 210 | cmp r0, r1 | 210 | cmp r0, r1 |
| 211 | blo 1b | 211 | blo 1b |
| 212 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 212 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
| 213 | mov r0, #0 | ||
| 213 | mov pc, lr | 214 | mov pc, lr |
| 214 | 215 | ||
| 215 | /* | 216 | /* |
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S index 4ec0e074dd55..4c44d7e1c3ca 100644 --- a/arch/arm/mm/proc-arm922.S +++ b/arch/arm/mm/proc-arm922.S | |||
| @@ -212,6 +212,7 @@ ENTRY(arm922_coherent_user_range) | |||
| 212 | cmp r0, r1 | 212 | cmp r0, r1 |
| 213 | blo 1b | 213 | blo 1b |
| 214 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 214 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
| 215 | mov r0, #0 | ||
| 215 | mov pc, lr | 216 | mov pc, lr |
| 216 | 217 | ||
| 217 | /* | 218 | /* |
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S index 9dccd9a365b3..ec5b1180994f 100644 --- a/arch/arm/mm/proc-arm925.S +++ b/arch/arm/mm/proc-arm925.S | |||
| @@ -258,6 +258,7 @@ ENTRY(arm925_coherent_user_range) | |||
| 258 | cmp r0, r1 | 258 | cmp r0, r1 |
| 259 | blo 1b | 259 | blo 1b |
| 260 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 260 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
| 261 | mov r0, #0 | ||
| 261 | mov pc, lr | 262 | mov pc, lr |
| 262 | 263 | ||
| 263 | /* | 264 | /* |
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 820259b81a1f..c31e62c606c0 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
| @@ -221,6 +221,7 @@ ENTRY(arm926_coherent_user_range) | |||
| 221 | cmp r0, r1 | 221 | cmp r0, r1 |
| 222 | blo 1b | 222 | blo 1b |
| 223 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 223 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
| 224 | mov r0, #0 | ||
| 224 | mov pc, lr | 225 | mov pc, lr |
| 225 | 226 | ||
| 226 | /* | 227 | /* |
diff --git a/arch/arm/mm/proc-arm940.S b/arch/arm/mm/proc-arm940.S index 9fdc0a170974..a613a7dd7146 100644 --- a/arch/arm/mm/proc-arm940.S +++ b/arch/arm/mm/proc-arm940.S | |||
| @@ -160,7 +160,7 @@ ENTRY(arm940_coherent_user_range) | |||
| 160 | * - size - region size | 160 | * - size - region size |
| 161 | */ | 161 | */ |
| 162 | ENTRY(arm940_flush_kern_dcache_area) | 162 | ENTRY(arm940_flush_kern_dcache_area) |
| 163 | mov ip, #0 | 163 | mov r0, #0 |
| 164 | mov r1, #(CACHE_DSEGMENTS - 1) << 4 @ 4 segments | 164 | mov r1, #(CACHE_DSEGMENTS - 1) << 4 @ 4 segments |
| 165 | 1: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries | 165 | 1: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries |
| 166 | 2: mcr p15, 0, r3, c7, c14, 2 @ clean/flush D index | 166 | 2: mcr p15, 0, r3, c7, c14, 2 @ clean/flush D index |
| @@ -168,8 +168,8 @@ ENTRY(arm940_flush_kern_dcache_area) | |||
| 168 | bcs 2b @ entries 63 to 0 | 168 | bcs 2b @ entries 63 to 0 |
| 169 | subs r1, r1, #1 << 4 | 169 | subs r1, r1, #1 << 4 |
| 170 | bcs 1b @ segments 7 to 0 | 170 | bcs 1b @ segments 7 to 0 |
| 171 | mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache | 171 | mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache |
| 172 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 172 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
| 173 | mov pc, lr | 173 | mov pc, lr |
| 174 | 174 | ||
| 175 | /* | 175 | /* |
diff --git a/arch/arm/mm/proc-arm946.S b/arch/arm/mm/proc-arm946.S index f684cfedcca9..9f4f2999fdd0 100644 --- a/arch/arm/mm/proc-arm946.S +++ b/arch/arm/mm/proc-arm946.S | |||
| @@ -190,6 +190,7 @@ ENTRY(arm946_coherent_user_range) | |||
| 190 | cmp r0, r1 | 190 | cmp r0, r1 |
| 191 | blo 1b | 191 | blo 1b |
| 192 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 192 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
| 193 | mov r0, #0 | ||
| 193 | mov pc, lr | 194 | mov pc, lr |
| 194 | 195 | ||
| 195 | /* | 196 | /* |
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S index ba3c500584ac..23a8e4c7f2bd 100644 --- a/arch/arm/mm/proc-feroceon.S +++ b/arch/arm/mm/proc-feroceon.S | |||
| @@ -232,6 +232,7 @@ ENTRY(feroceon_coherent_user_range) | |||
| 232 | cmp r0, r1 | 232 | cmp r0, r1 |
| 233 | blo 1b | 233 | blo 1b |
| 234 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 234 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
| 235 | mov r0, #0 | ||
| 235 | mov pc, lr | 236 | mov pc, lr |
| 236 | 237 | ||
| 237 | /* | 238 | /* |
diff --git a/arch/arm/mm/proc-mohawk.S b/arch/arm/mm/proc-mohawk.S index cdfedc5b8ad8..b0475468c711 100644 --- a/arch/arm/mm/proc-mohawk.S +++ b/arch/arm/mm/proc-mohawk.S | |||
| @@ -193,6 +193,7 @@ ENTRY(mohawk_coherent_user_range) | |||
| 193 | cmp r0, r1 | 193 | cmp r0, r1 |
| 194 | blo 1b | 194 | blo 1b |
| 195 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 195 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
| 196 | mov r0, #0 | ||
| 196 | mov pc, lr | 197 | mov pc, lr |
| 197 | 198 | ||
| 198 | /* | 199 | /* |
diff --git a/arch/arm/mm/proc-v7-2level.S b/arch/arm/mm/proc-v7-2level.S index 3a4b3e7b888c..42ac069c8012 100644 --- a/arch/arm/mm/proc-v7-2level.S +++ b/arch/arm/mm/proc-v7-2level.S | |||
| @@ -49,15 +49,10 @@ ENTRY(cpu_v7_switch_mm) | |||
| 49 | #ifdef CONFIG_ARM_ERRATA_754322 | 49 | #ifdef CONFIG_ARM_ERRATA_754322 |
| 50 | dsb | 50 | dsb |
| 51 | #endif | 51 | #endif |
| 52 | mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID | ||
| 53 | isb | ||
| 54 | 1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 | ||
| 55 | isb | ||
| 56 | #ifdef CONFIG_ARM_ERRATA_754322 | ||
| 57 | dsb | ||
| 58 | #endif | ||
| 59 | mcr p15, 0, r1, c13, c0, 1 @ set context ID | 52 | mcr p15, 0, r1, c13, c0, 1 @ set context ID |
| 60 | isb | 53 | isb |
| 54 | mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 | ||
| 55 | isb | ||
| 61 | #endif | 56 | #endif |
| 62 | mov pc, lr | 57 | mov pc, lr |
| 63 | ENDPROC(cpu_v7_switch_mm) | 58 | ENDPROC(cpu_v7_switch_mm) |
diff --git a/arch/arm/mm/tlb-v3.S b/arch/arm/mm/tlb-v3.S deleted file mode 100644 index d253995ec4ca..000000000000 --- a/arch/arm/mm/tlb-v3.S +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mm/tlbv3.S | ||
| 3 | * | ||
| 4 | * Copyright (C) 1997-2002 Russell King | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * ARM architecture version 3 TLB handling functions. | ||
| 11 | * | ||
| 12 | * Processors: ARM610, ARM710. | ||
| 13 | */ | ||
| 14 | #include <linux/linkage.h> | ||
| 15 | #include <linux/init.h> | ||
| 16 | #include <asm/asm-offsets.h> | ||
| 17 | #include <asm/tlbflush.h> | ||
| 18 | #include "proc-macros.S" | ||
| 19 | |||
| 20 | .align 5 | ||
| 21 | /* | ||
| 22 | * v3_flush_user_tlb_range(start, end, mm) | ||
| 23 | * | ||
| 24 | * Invalidate a range of TLB entries in the specified address space. | ||
| 25 | * | ||
| 26 | * - start - range start address | ||
| 27 | * - end - range end address | ||
| 28 | * - mm - mm_struct describing address space | ||
| 29 | */ | ||
| 30 | .align 5 | ||
| 31 | ENTRY(v3_flush_user_tlb_range) | ||
| 32 | vma_vm_mm r2, r2 | ||
| 33 | act_mm r3 @ get current->active_mm | ||
| 34 | teq r2, r3 @ == mm ? | ||
| 35 | movne pc, lr @ no, we dont do anything | ||
| 36 | ENTRY(v3_flush_kern_tlb_range) | ||
| 37 | bic r0, r0, #0x0ff | ||
| 38 | bic r0, r0, #0xf00 | ||
| 39 | 1: mcr p15, 0, r0, c6, c0, 0 @ invalidate TLB entry | ||
| 40 | add r0, r0, #PAGE_SZ | ||
| 41 | cmp r0, r1 | ||
| 42 | blo 1b | ||
| 43 | mov pc, lr | ||
| 44 | |||
| 45 | __INITDATA | ||
| 46 | |||
| 47 | /* define struct cpu_tlb_fns (see <asm/tlbflush.h> and proc-macros.S) */ | ||
| 48 | define_tlb_functions v3, v3_tlb_flags | ||
diff --git a/arch/arm/plat-iop/pci.c b/arch/arm/plat-iop/pci.c index 0da42058a20f..8daae9b230ea 100644 --- a/arch/arm/plat-iop/pci.c +++ b/arch/arm/plat-iop/pci.c | |||
| @@ -160,7 +160,7 @@ iop3xx_write_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
| 160 | return PCIBIOS_SUCCESSFUL; | 160 | return PCIBIOS_SUCCESSFUL; |
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | static struct pci_ops iop3xx_ops = { | 163 | struct pci_ops iop3xx_ops = { |
| 164 | .read = iop3xx_read_config, | 164 | .read = iop3xx_read_config, |
| 165 | .write = iop3xx_write_config, | 165 | .write = iop3xx_write_config, |
| 166 | }; | 166 | }; |
| @@ -220,12 +220,6 @@ int iop3xx_pci_setup(int nr, struct pci_sys_data *sys) | |||
| 220 | return 1; | 220 | return 1; |
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | struct pci_bus *iop3xx_pci_scan_bus(int nr, struct pci_sys_data *sys) | ||
| 224 | { | ||
| 225 | return pci_scan_root_bus(NULL, sys->busnr, &iop3xx_ops, sys, | ||
| 226 | &sys->resources); | ||
| 227 | } | ||
| 228 | |||
| 229 | void __init iop3xx_atu_setup(void) | 223 | void __init iop3xx_atu_setup(void) |
| 230 | { | 224 | { |
| 231 | /* BAR 0 ( Disabled ) */ | 225 | /* BAR 0 ( Disabled ) */ |
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c index 5068fe5a6910..44ae077dbc28 100644 --- a/arch/arm/plat-omap/counter_32k.c +++ b/arch/arm/plat-omap/counter_32k.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
| 20 | #include <linux/clocksource.h> | 20 | #include <linux/clocksource.h> |
| 21 | 21 | ||
| 22 | #include <asm/mach/time.h> | ||
| 22 | #include <asm/sched_clock.h> | 23 | #include <asm/sched_clock.h> |
| 23 | 24 | ||
| 24 | #include <plat/hardware.h> | 25 | #include <plat/hardware.h> |
| @@ -43,7 +44,7 @@ static u32 notrace omap_32k_read_sched_clock(void) | |||
| 43 | } | 44 | } |
| 44 | 45 | ||
| 45 | /** | 46 | /** |
| 46 | * read_persistent_clock - Return time from a persistent clock. | 47 | * omap_read_persistent_clock - Return time from a persistent clock. |
| 47 | * | 48 | * |
| 48 | * Reads the time from a source which isn't disabled during PM, the | 49 | * Reads the time from a source which isn't disabled during PM, the |
| 49 | * 32k sync timer. Convert the cycles elapsed since last read into | 50 | * 32k sync timer. Convert the cycles elapsed since last read into |
| @@ -52,7 +53,7 @@ static u32 notrace omap_32k_read_sched_clock(void) | |||
| 52 | static struct timespec persistent_ts; | 53 | static struct timespec persistent_ts; |
| 53 | static cycles_t cycles, last_cycles; | 54 | static cycles_t cycles, last_cycles; |
| 54 | static unsigned int persistent_mult, persistent_shift; | 55 | static unsigned int persistent_mult, persistent_shift; |
| 55 | void read_persistent_clock(struct timespec *ts) | 56 | static void omap_read_persistent_clock(struct timespec *ts) |
| 56 | { | 57 | { |
| 57 | unsigned long long nsecs; | 58 | unsigned long long nsecs; |
| 58 | cycles_t delta; | 59 | cycles_t delta; |
| @@ -116,6 +117,7 @@ int __init omap_init_clocksource_32k(void) | |||
| 116 | printk(err, "32k_counter"); | 117 | printk(err, "32k_counter"); |
| 117 | 118 | ||
| 118 | setup_sched_clock(omap_32k_read_sched_clock, 32, 32768); | 119 | setup_sched_clock(omap_32k_read_sched_clock, 32, 32768); |
| 120 | register_persistent_clock(NULL, omap_read_persistent_clock); | ||
| 119 | } | 121 | } |
| 120 | return 0; | 122 | return 0; |
| 121 | } | 123 | } |
diff --git a/arch/arm/plat-versatile/Kconfig b/arch/arm/plat-versatile/Kconfig index 043f7b02a9e7..81ee7cc34457 100644 --- a/arch/arm/plat-versatile/Kconfig +++ b/arch/arm/plat-versatile/Kconfig | |||
| @@ -5,6 +5,12 @@ config PLAT_VERSATILE_CLCD | |||
| 5 | 5 | ||
| 6 | config PLAT_VERSATILE_FPGA_IRQ | 6 | config PLAT_VERSATILE_FPGA_IRQ |
| 7 | bool | 7 | bool |
| 8 | select IRQ_DOMAIN | ||
| 9 | |||
| 10 | config PLAT_VERSATILE_FPGA_IRQ_NR | ||
| 11 | int | ||
| 12 | default 4 | ||
| 13 | depends on PLAT_VERSATILE_FPGA_IRQ | ||
| 8 | 14 | ||
| 9 | config PLAT_VERSATILE_LEDS | 15 | config PLAT_VERSATILE_LEDS |
| 10 | def_bool y if LEDS_CLASS | 16 | def_bool y if LEDS_CLASS |
diff --git a/arch/arm/plat-versatile/fpga-irq.c b/arch/arm/plat-versatile/fpga-irq.c index f0cc8e19b094..6e70d03824a1 100644 --- a/arch/arm/plat-versatile/fpga-irq.c +++ b/arch/arm/plat-versatile/fpga-irq.c | |||
| @@ -3,7 +3,10 @@ | |||
| 3 | */ | 3 | */ |
| 4 | #include <linux/irq.h> | 4 | #include <linux/irq.h> |
| 5 | #include <linux/io.h> | 5 | #include <linux/io.h> |
| 6 | #include <linux/irqdomain.h> | ||
| 7 | #include <linux/module.h> | ||
| 6 | 8 | ||
| 9 | #include <asm/exception.h> | ||
| 7 | #include <asm/mach/irq.h> | 10 | #include <asm/mach/irq.h> |
| 8 | #include <plat/fpga-irq.h> | 11 | #include <plat/fpga-irq.h> |
| 9 | 12 | ||
| @@ -12,10 +15,32 @@ | |||
| 12 | #define IRQ_ENABLE_SET 0x08 | 15 | #define IRQ_ENABLE_SET 0x08 |
| 13 | #define IRQ_ENABLE_CLEAR 0x0c | 16 | #define IRQ_ENABLE_CLEAR 0x0c |
| 14 | 17 | ||
| 18 | /** | ||
| 19 | * struct fpga_irq_data - irq data container for the FPGA IRQ controller | ||
| 20 | * @base: memory offset in virtual memory | ||
| 21 | * @irq_start: first IRQ number handled by this instance | ||
| 22 | * @chip: chip container for this instance | ||
| 23 | * @domain: IRQ domain for this instance | ||
| 24 | * @valid: mask for valid IRQs on this controller | ||
| 25 | * @used_irqs: number of active IRQs on this controller | ||
| 26 | */ | ||
| 27 | struct fpga_irq_data { | ||
| 28 | void __iomem *base; | ||
| 29 | unsigned int irq_start; | ||
| 30 | struct irq_chip chip; | ||
| 31 | u32 valid; | ||
| 32 | struct irq_domain *domain; | ||
| 33 | u8 used_irqs; | ||
| 34 | }; | ||
| 35 | |||
| 36 | /* we cannot allocate memory when the controllers are initially registered */ | ||
| 37 | static struct fpga_irq_data fpga_irq_devices[CONFIG_PLAT_VERSATILE_FPGA_IRQ_NR]; | ||
| 38 | static int fpga_irq_id; | ||
| 39 | |||
| 15 | static void fpga_irq_mask(struct irq_data *d) | 40 | static void fpga_irq_mask(struct irq_data *d) |
| 16 | { | 41 | { |
| 17 | struct fpga_irq_data *f = irq_data_get_irq_chip_data(d); | 42 | struct fpga_irq_data *f = irq_data_get_irq_chip_data(d); |
| 18 | u32 mask = 1 << (d->irq - f->irq_start); | 43 | u32 mask = 1 << d->hwirq; |
| 19 | 44 | ||
| 20 | writel(mask, f->base + IRQ_ENABLE_CLEAR); | 45 | writel(mask, f->base + IRQ_ENABLE_CLEAR); |
| 21 | } | 46 | } |
| @@ -23,7 +48,7 @@ static void fpga_irq_mask(struct irq_data *d) | |||
| 23 | static void fpga_irq_unmask(struct irq_data *d) | 48 | static void fpga_irq_unmask(struct irq_data *d) |
| 24 | { | 49 | { |
| 25 | struct fpga_irq_data *f = irq_data_get_irq_chip_data(d); | 50 | struct fpga_irq_data *f = irq_data_get_irq_chip_data(d); |
| 26 | u32 mask = 1 << (d->irq - f->irq_start); | 51 | u32 mask = 1 << d->hwirq; |
| 27 | 52 | ||
| 28 | writel(mask, f->base + IRQ_ENABLE_SET); | 53 | writel(mask, f->base + IRQ_ENABLE_SET); |
| 29 | } | 54 | } |
| @@ -41,32 +66,93 @@ static void fpga_irq_handle(unsigned int irq, struct irq_desc *desc) | |||
| 41 | do { | 66 | do { |
| 42 | irq = ffs(status) - 1; | 67 | irq = ffs(status) - 1; |
| 43 | status &= ~(1 << irq); | 68 | status &= ~(1 << irq); |
| 44 | 69 | generic_handle_irq(irq_find_mapping(f->domain, irq)); | |
| 45 | generic_handle_irq(irq + f->irq_start); | ||
| 46 | } while (status); | 70 | } while (status); |
| 47 | } | 71 | } |
| 48 | 72 | ||
| 49 | void __init fpga_irq_init(int parent_irq, u32 valid, struct fpga_irq_data *f) | 73 | /* |
| 74 | * Handle each interrupt in a single FPGA IRQ controller. Returns non-zero | ||
| 75 | * if we've handled at least one interrupt. This does a single read of the | ||
| 76 | * status register and handles all interrupts in order from LSB first. | ||
| 77 | */ | ||
| 78 | static int handle_one_fpga(struct fpga_irq_data *f, struct pt_regs *regs) | ||
| 79 | { | ||
| 80 | int handled = 0; | ||
| 81 | int irq; | ||
| 82 | u32 status; | ||
| 83 | |||
| 84 | while ((status = readl(f->base + IRQ_STATUS))) { | ||
| 85 | irq = ffs(status) - 1; | ||
| 86 | handle_IRQ(irq_find_mapping(f->domain, irq), regs); | ||
| 87 | handled = 1; | ||
| 88 | } | ||
| 89 | |||
| 90 | return handled; | ||
| 91 | } | ||
| 92 | |||
| 93 | /* | ||
| 94 | * Keep iterating over all registered FPGA IRQ controllers until there are | ||
| 95 | * no pending interrupts. | ||
| 96 | */ | ||
| 97 | asmlinkage void __exception_irq_entry fpga_handle_irq(struct pt_regs *regs) | ||
| 50 | { | 98 | { |
| 51 | unsigned int i; | 99 | int i, handled; |
| 52 | 100 | ||
| 101 | do { | ||
| 102 | for (i = 0, handled = 0; i < fpga_irq_id; ++i) | ||
| 103 | handled |= handle_one_fpga(&fpga_irq_devices[i], regs); | ||
| 104 | } while (handled); | ||
| 105 | } | ||
| 106 | |||
| 107 | static int fpga_irqdomain_map(struct irq_domain *d, unsigned int irq, | ||
| 108 | irq_hw_number_t hwirq) | ||
| 109 | { | ||
| 110 | struct fpga_irq_data *f = d->host_data; | ||
| 111 | |||
| 112 | /* Skip invalid IRQs, only register handlers for the real ones */ | ||
| 113 | if (!(f->valid & (1 << hwirq))) | ||
| 114 | return -ENOTSUPP; | ||
| 115 | irq_set_chip_data(irq, f); | ||
| 116 | irq_set_chip_and_handler(irq, &f->chip, | ||
| 117 | handle_level_irq); | ||
| 118 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
| 119 | f->used_irqs++; | ||
| 120 | return 0; | ||
| 121 | } | ||
| 122 | |||
| 123 | static struct irq_domain_ops fpga_irqdomain_ops = { | ||
| 124 | .map = fpga_irqdomain_map, | ||
| 125 | .xlate = irq_domain_xlate_onetwocell, | ||
| 126 | }; | ||
| 127 | |||
| 128 | void __init fpga_irq_init(void __iomem *base, const char *name, int irq_start, | ||
| 129 | int parent_irq, u32 valid, struct device_node *node) | ||
| 130 | { | ||
| 131 | struct fpga_irq_data *f; | ||
| 132 | |||
| 133 | if (fpga_irq_id >= ARRAY_SIZE(fpga_irq_devices)) { | ||
| 134 | printk(KERN_ERR "%s: too few FPGA IRQ controllers, increase CONFIG_PLAT_VERSATILE_FPGA_IRQ_NR\n", __func__); | ||
| 135 | return; | ||
| 136 | } | ||
| 137 | |||
| 138 | f = &fpga_irq_devices[fpga_irq_id]; | ||
| 139 | f->base = base; | ||
| 140 | f->irq_start = irq_start; | ||
| 141 | f->chip.name = name; | ||
| 53 | f->chip.irq_ack = fpga_irq_mask; | 142 | f->chip.irq_ack = fpga_irq_mask; |
| 54 | f->chip.irq_mask = fpga_irq_mask; | 143 | f->chip.irq_mask = fpga_irq_mask; |
| 55 | f->chip.irq_unmask = fpga_irq_unmask; | 144 | f->chip.irq_unmask = fpga_irq_unmask; |
| 145 | f->valid = valid; | ||
| 56 | 146 | ||
| 57 | if (parent_irq != -1) { | 147 | if (parent_irq != -1) { |
| 58 | irq_set_handler_data(parent_irq, f); | 148 | irq_set_handler_data(parent_irq, f); |
| 59 | irq_set_chained_handler(parent_irq, fpga_irq_handle); | 149 | irq_set_chained_handler(parent_irq, fpga_irq_handle); |
| 60 | } | 150 | } |
| 61 | 151 | ||
| 62 | for (i = 0; i < 32; i++) { | 152 | f->domain = irq_domain_add_legacy(node, fls(valid), f->irq_start, 0, |
| 63 | if (valid & (1 << i)) { | 153 | &fpga_irqdomain_ops, f); |
| 64 | unsigned int irq = f->irq_start + i; | 154 | pr_info("FPGA IRQ chip %d \"%s\" @ %p, %u irqs\n", |
| 155 | fpga_irq_id, name, base, f->used_irqs); | ||
| 65 | 156 | ||
| 66 | irq_set_chip_data(irq, f); | 157 | fpga_irq_id++; |
| 67 | irq_set_chip_and_handler(irq, &f->chip, | ||
| 68 | handle_level_irq); | ||
| 69 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
| 70 | } | ||
| 71 | } | ||
| 72 | } | 158 | } |
diff --git a/arch/arm/plat-versatile/include/plat/fpga-irq.h b/arch/arm/plat-versatile/include/plat/fpga-irq.h index 627fafd1e595..91bcfb67551d 100644 --- a/arch/arm/plat-versatile/include/plat/fpga-irq.h +++ b/arch/arm/plat-versatile/include/plat/fpga-irq.h | |||
| @@ -1,12 +1,11 @@ | |||
| 1 | #ifndef PLAT_FPGA_IRQ_H | 1 | #ifndef PLAT_FPGA_IRQ_H |
| 2 | #define PLAT_FPGA_IRQ_H | 2 | #define PLAT_FPGA_IRQ_H |
| 3 | 3 | ||
| 4 | struct fpga_irq_data { | 4 | struct device_node; |
| 5 | void __iomem *base; | 5 | struct pt_regs; |
| 6 | unsigned int irq_start; | ||
| 7 | struct irq_chip chip; | ||
| 8 | }; | ||
| 9 | 6 | ||
| 10 | void fpga_irq_init(int, u32, struct fpga_irq_data *); | 7 | void fpga_handle_irq(struct pt_regs *regs); |
| 8 | void fpga_irq_init(void __iomem *, const char *, int, int, u32, | ||
| 9 | struct device_node *node); | ||
| 11 | 10 | ||
| 12 | #endif | 11 | #endif |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index f9c9f33f8cbe..2997e56ce0dd 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | # are merged into mainline or have been edited in the machine database | 16 | # are merged into mainline or have been edited in the machine database |
| 17 | # within the last 12 months. References to machine_is_NAME() do not count! | 17 | # within the last 12 months. References to machine_is_NAME() do not count! |
| 18 | # | 18 | # |
| 19 | # Last update: Tue Dec 6 11:07:38 2011 | 19 | # Last update: Thu Apr 26 08:44:23 2012 |
| 20 | # | 20 | # |
| 21 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 21 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
| 22 | # | 22 | # |
| @@ -205,6 +205,7 @@ omap_fsample MACH_OMAP_FSAMPLE OMAP_FSAMPLE 970 | |||
| 205 | snapper_cl15 MACH_SNAPPER_CL15 SNAPPER_CL15 986 | 205 | snapper_cl15 MACH_SNAPPER_CL15 SNAPPER_CL15 986 |
| 206 | omap_palmz71 MACH_OMAP_PALMZ71 OMAP_PALMZ71 993 | 206 | omap_palmz71 MACH_OMAP_PALMZ71 OMAP_PALMZ71 993 |
| 207 | smdk2412 MACH_SMDK2412 SMDK2412 1009 | 207 | smdk2412 MACH_SMDK2412 SMDK2412 1009 |
| 208 | bkde303 MACH_BKDE303 BKDE303 1021 | ||
| 208 | smdk2413 MACH_SMDK2413 SMDK2413 1022 | 209 | smdk2413 MACH_SMDK2413 SMDK2413 1022 |
| 209 | aml_m5900 MACH_AML_M5900 AML_M5900 1024 | 210 | aml_m5900 MACH_AML_M5900 AML_M5900 1024 |
| 210 | balloon3 MACH_BALLOON3 BALLOON3 1029 | 211 | balloon3 MACH_BALLOON3 BALLOON3 1029 |
| @@ -381,8 +382,6 @@ davinci_da850_evm MACH_DAVINCI_DA850_EVM DAVINCI_DA850_EVM 2157 | |||
| 381 | at91sam9g10ek MACH_AT91SAM9G10EK AT91SAM9G10EK 2159 | 382 | at91sam9g10ek MACH_AT91SAM9G10EK AT91SAM9G10EK 2159 |
| 382 | omap_4430sdp MACH_OMAP_4430SDP OMAP_4430SDP 2160 | 383 | omap_4430sdp MACH_OMAP_4430SDP OMAP_4430SDP 2160 |
| 383 | magx_zn5 MACH_MAGX_ZN5 MAGX_ZN5 2162 | 384 | magx_zn5 MACH_MAGX_ZN5 MAGX_ZN5 2162 |
| 384 | btmavb101 MACH_BTMAVB101 BTMAVB101 2172 | ||
| 385 | btmawb101 MACH_BTMAWB101 BTMAWB101 2173 | ||
| 386 | tx25 MACH_TX25 TX25 2177 | 385 | tx25 MACH_TX25 TX25 2177 |
| 387 | omap3_torpedo MACH_OMAP3_TORPEDO OMAP3_TORPEDO 2178 | 386 | omap3_torpedo MACH_OMAP3_TORPEDO OMAP3_TORPEDO 2178 |
| 388 | anw6410 MACH_ANW6410 ANW6410 2183 | 387 | anw6410 MACH_ANW6410 ANW6410 2183 |
| @@ -397,7 +396,6 @@ net2big_v2 MACH_NET2BIG_V2 NET2BIG_V2 2204 | |||
| 397 | net5big_v2 MACH_NET5BIG_V2 NET5BIG_V2 2206 | 396 | net5big_v2 MACH_NET5BIG_V2 NET5BIG_V2 2206 |
| 398 | inetspace_v2 MACH_INETSPACE_V2 INETSPACE_V2 2208 | 397 | inetspace_v2 MACH_INETSPACE_V2 INETSPACE_V2 2208 |
| 399 | at91sam9g45ekes MACH_AT91SAM9G45EKES AT91SAM9G45EKES 2212 | 398 | at91sam9g45ekes MACH_AT91SAM9G45EKES AT91SAM9G45EKES 2212 |
| 400 | pc7302 MACH_PC7302 PC7302 2220 | ||
| 401 | spear600 MACH_SPEAR600 SPEAR600 2236 | 399 | spear600 MACH_SPEAR600 SPEAR600 2236 |
| 402 | spear300 MACH_SPEAR300 SPEAR300 2237 | 400 | spear300 MACH_SPEAR300 SPEAR300 2237 |
| 403 | lilly1131 MACH_LILLY1131 LILLY1131 2239 | 401 | lilly1131 MACH_LILLY1131 LILLY1131 2239 |
| @@ -407,7 +405,6 @@ d2net MACH_D2NET D2NET 2282 | |||
| 407 | bigdisk MACH_BIGDISK BIGDISK 2283 | 405 | bigdisk MACH_BIGDISK BIGDISK 2283 |
| 408 | at91sam9g20ek_2mmc MACH_AT91SAM9G20EK_2MMC AT91SAM9G20EK_2MMC 2288 | 406 | at91sam9g20ek_2mmc MACH_AT91SAM9G20EK_2MMC AT91SAM9G20EK_2MMC 2288 |
| 409 | bcmring MACH_BCMRING BCMRING 2289 | 407 | bcmring MACH_BCMRING BCMRING 2289 |
| 410 | dp6xx MACH_DP6XX DP6XX 2302 | ||
| 411 | mahimahi MACH_MAHIMAHI MAHIMAHI 2304 | 408 | mahimahi MACH_MAHIMAHI MAHIMAHI 2304 |
| 412 | smdk6442 MACH_SMDK6442 SMDK6442 2324 | 409 | smdk6442 MACH_SMDK6442 SMDK6442 2324 |
| 413 | openrd_base MACH_OPENRD_BASE OPENRD_BASE 2325 | 410 | openrd_base MACH_OPENRD_BASE OPENRD_BASE 2325 |
| @@ -444,8 +441,6 @@ mx28evk MACH_MX28EVK MX28EVK 2531 | |||
| 444 | smartq5 MACH_SMARTQ5 SMARTQ5 2534 | 441 | smartq5 MACH_SMARTQ5 SMARTQ5 2534 |
| 445 | davinci_dm6467tevm MACH_DAVINCI_DM6467TEVM DAVINCI_DM6467TEVM 2548 | 442 | davinci_dm6467tevm MACH_DAVINCI_DM6467TEVM DAVINCI_DM6467TEVM 2548 |
| 446 | mxt_td60 MACH_MXT_TD60 MXT_TD60 2550 | 443 | mxt_td60 MACH_MXT_TD60 MXT_TD60 2550 |
| 447 | riot_bei2 MACH_RIOT_BEI2 RIOT_BEI2 2576 | ||
| 448 | riot_x37 MACH_RIOT_X37 RIOT_X37 2578 | ||
| 449 | pca101 MACH_PCA101 PCA101 2595 | 444 | pca101 MACH_PCA101 PCA101 2595 |
| 450 | capc7117 MACH_CAPC7117 CAPC7117 2612 | 445 | capc7117 MACH_CAPC7117 CAPC7117 2612 |
| 451 | icontrol MACH_ICONTROL ICONTROL 2624 | 446 | icontrol MACH_ICONTROL ICONTROL 2624 |
| @@ -460,7 +455,6 @@ spear320 MACH_SPEAR320 SPEAR320 2661 | |||
| 460 | aquila MACH_AQUILA AQUILA 2676 | 455 | aquila MACH_AQUILA AQUILA 2676 |
| 461 | esata_sheevaplug MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678 | 456 | esata_sheevaplug MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678 |
| 462 | msm7x30_surf MACH_MSM7X30_SURF MSM7X30_SURF 2679 | 457 | msm7x30_surf MACH_MSM7X30_SURF MSM7X30_SURF 2679 |
| 463 | ea2478devkit MACH_EA2478DEVKIT EA2478DEVKIT 2683 | ||
| 464 | terastation_wxl MACH_TERASTATION_WXL TERASTATION_WXL 2697 | 458 | terastation_wxl MACH_TERASTATION_WXL TERASTATION_WXL 2697 |
| 465 | msm7x25_surf MACH_MSM7X25_SURF MSM7X25_SURF 2703 | 459 | msm7x25_surf MACH_MSM7X25_SURF MSM7X25_SURF 2703 |
| 466 | msm7x25_ffa MACH_MSM7X25_FFA MSM7X25_FFA 2704 | 460 | msm7x25_ffa MACH_MSM7X25_FFA MSM7X25_FFA 2704 |
| @@ -479,8 +473,6 @@ wbd222 MACH_WBD222 WBD222 2753 | |||
| 479 | msm8x60_surf MACH_MSM8X60_SURF MSM8X60_SURF 2755 | 473 | msm8x60_surf MACH_MSM8X60_SURF MSM8X60_SURF 2755 |
| 480 | msm8x60_sim MACH_MSM8X60_SIM MSM8X60_SIM 2756 | 474 | msm8x60_sim MACH_MSM8X60_SIM MSM8X60_SIM 2756 |
| 481 | tcc8000_sdk MACH_TCC8000_SDK TCC8000_SDK 2758 | 475 | tcc8000_sdk MACH_TCC8000_SDK TCC8000_SDK 2758 |
| 482 | nanos MACH_NANOS NANOS 2759 | ||
| 483 | stamp9g45 MACH_STAMP9G45 STAMP9G45 2761 | ||
| 484 | cns3420vb MACH_CNS3420VB CNS3420VB 2776 | 476 | cns3420vb MACH_CNS3420VB CNS3420VB 2776 |
| 485 | omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791 | 477 | omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791 |
| 486 | ti8168evm MACH_TI8168EVM TI8168EVM 2800 | 478 | ti8168evm MACH_TI8168EVM TI8168EVM 2800 |
| @@ -490,12 +482,9 @@ eukrea_cpuimx35sd MACH_EUKREA_CPUIMX35SD EUKREA_CPUIMX35SD 2821 | |||
| 490 | eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822 | 482 | eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822 |
| 491 | eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823 | 483 | eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823 |
| 492 | smdkc210 MACH_SMDKC210 SMDKC210 2838 | 484 | smdkc210 MACH_SMDKC210 SMDKC210 2838 |
| 493 | pca102 MACH_PCA102 PCA102 2843 | 485 | pcaal1 MACH_PCAAL1 PCAAL1 2843 |
| 494 | t5325 MACH_T5325 T5325 2846 | 486 | t5325 MACH_T5325 T5325 2846 |
| 495 | income MACH_INCOME INCOME 2849 | 487 | income MACH_INCOME INCOME 2849 |
| 496 | vvbox_sdorig2 MACH_VVBOX_SDORIG2 VVBOX_SDORIG2 2857 | ||
| 497 | vvbox_sdlite2 MACH_VVBOX_SDLITE2 VVBOX_SDLITE2 2858 | ||
| 498 | vvbox_sdpro4 MACH_VVBOX_SDPRO4 VVBOX_SDPRO4 2859 | ||
| 499 | mx257sx MACH_MX257SX MX257SX 2861 | 488 | mx257sx MACH_MX257SX MX257SX 2861 |
| 500 | goni MACH_GONI GONI 2862 | 489 | goni MACH_GONI GONI 2862 |
| 501 | bv07 MACH_BV07 BV07 2882 | 490 | bv07 MACH_BV07 BV07 2882 |
| @@ -504,6 +493,7 @@ devixp MACH_DEVIXP DEVIXP 2885 | |||
| 504 | miccpt MACH_MICCPT MICCPT 2886 | 493 | miccpt MACH_MICCPT MICCPT 2886 |
| 505 | mic256 MACH_MIC256 MIC256 2887 | 494 | mic256 MACH_MIC256 MIC256 2887 |
| 506 | u5500 MACH_U5500 U5500 2890 | 495 | u5500 MACH_U5500 U5500 2890 |
| 496 | pov15hd MACH_POV15HD POV15HD 2910 | ||
| 507 | linkstation_lschl MACH_LINKSTATION_LSCHL LINKSTATION_LSCHL 2913 | 497 | linkstation_lschl MACH_LINKSTATION_LSCHL LINKSTATION_LSCHL 2913 |
| 508 | smdkv310 MACH_SMDKV310 SMDKV310 2925 | 498 | smdkv310 MACH_SMDKV310 SMDKV310 2925 |
| 509 | wm8505_7in_netbook MACH_WM8505_7IN_NETBOOK WM8505_7IN_NETBOOK 2928 | 499 | wm8505_7in_netbook MACH_WM8505_7IN_NETBOOK WM8505_7IN_NETBOOK 2928 |
| @@ -537,243 +527,24 @@ trimslice MACH_TRIMSLICE TRIMSLICE 3209 | |||
| 537 | mackerel MACH_MACKEREL MACKEREL 3211 | 527 | mackerel MACH_MACKEREL MACKEREL 3211 |
| 538 | kaen MACH_KAEN KAEN 3217 | 528 | kaen MACH_KAEN KAEN 3217 |
| 539 | nokia_rm680 MACH_NOKIA_RM680 NOKIA_RM680 3220 | 529 | nokia_rm680 MACH_NOKIA_RM680 NOKIA_RM680 3220 |
| 540 | dm6446_adbox MACH_DM6446_ADBOX DM6446_ADBOX 3226 | ||
| 541 | quad_salsa MACH_QUAD_SALSA QUAD_SALSA 3227 | ||
| 542 | abb_gma_1_1 MACH_ABB_GMA_1_1 ABB_GMA_1_1 3228 | ||
| 543 | svcid MACH_SVCID SVCID 3229 | ||
| 544 | msm8960_sim MACH_MSM8960_SIM MSM8960_SIM 3230 | 530 | msm8960_sim MACH_MSM8960_SIM MSM8960_SIM 3230 |
| 545 | msm8960_rumi3 MACH_MSM8960_RUMI3 MSM8960_RUMI3 3231 | 531 | msm8960_rumi3 MACH_MSM8960_RUMI3 MSM8960_RUMI3 3231 |
| 546 | icon_g MACH_ICON_G ICON_G 3232 | ||
| 547 | mb3 MACH_MB3 MB3 3233 | ||
| 548 | gsia18s MACH_GSIA18S GSIA18S 3234 | 532 | gsia18s MACH_GSIA18S GSIA18S 3234 |
| 549 | pivicc MACH_PIVICC PIVICC 3235 | ||
| 550 | pcm048 MACH_PCM048 PCM048 3236 | ||
| 551 | dds MACH_DDS DDS 3237 | ||
| 552 | chalten_xa1 MACH_CHALTEN_XA1 CHALTEN_XA1 3238 | ||
| 553 | ts48xx MACH_TS48XX TS48XX 3239 | ||
| 554 | tonga2_tfttimer MACH_TONGA2_TFTTIMER TONGA2_TFTTIMER 3240 | ||
| 555 | whistler MACH_WHISTLER WHISTLER 3241 | ||
| 556 | asl_phoenix MACH_ASL_PHOENIX ASL_PHOENIX 3242 | ||
| 557 | at91sam9263otlite MACH_AT91SAM9263OTLITE AT91SAM9263OTLITE 3243 | ||
| 558 | ddplug MACH_DDPLUG DDPLUG 3244 | ||
| 559 | d2plug MACH_D2PLUG D2PLUG 3245 | ||
| 560 | kzm9d MACH_KZM9D KZM9D 3246 | ||
| 561 | verdi_lte MACH_VERDI_LTE VERDI_LTE 3247 | ||
| 562 | nanozoom MACH_NANOZOOM NANOZOOM 3248 | ||
| 563 | dm3730_som_lv MACH_DM3730_SOM_LV DM3730_SOM_LV 3249 | ||
| 564 | dm3730_torpedo MACH_DM3730_TORPEDO DM3730_TORPEDO 3250 | ||
| 565 | anchovy MACH_ANCHOVY ANCHOVY 3251 | ||
| 566 | re2rev20 MACH_RE2REV20 RE2REV20 3253 | ||
| 567 | re2rev21 MACH_RE2REV21 RE2REV21 3254 | ||
| 568 | cns21xx MACH_CNS21XX CNS21XX 3255 | ||
| 569 | rider MACH_RIDER RIDER 3257 | ||
| 570 | nsk330 MACH_NSK330 NSK330 3258 | ||
| 571 | cns2133evb MACH_CNS2133EVB CNS2133EVB 3259 | ||
| 572 | z3_816x_mod MACH_Z3_816X_MOD Z3_816X_MOD 3260 | ||
| 573 | z3_814x_mod MACH_Z3_814X_MOD Z3_814X_MOD 3261 | ||
| 574 | beect MACH_BEECT BEECT 3262 | ||
| 575 | dma_thunderbug MACH_DMA_THUNDERBUG DMA_THUNDERBUG 3263 | ||
| 576 | omn_at91sam9g20 MACH_OMN_AT91SAM9G20 OMN_AT91SAM9G20 3264 | ||
| 577 | mx25_e2s_uc MACH_MX25_E2S_UC MX25_E2S_UC 3265 | ||
| 578 | mione MACH_MIONE MIONE 3266 | ||
| 579 | top9000_tcu MACH_TOP9000_TCU TOP9000_TCU 3267 | ||
| 580 | top9000_bsl MACH_TOP9000_BSL TOP9000_BSL 3268 | ||
| 581 | kingdom MACH_KINGDOM KINGDOM 3269 | ||
| 582 | armadillo460 MACH_ARMADILLO460 ARMADILLO460 3270 | ||
| 583 | lq2 MACH_LQ2 LQ2 3271 | ||
| 584 | sweda_tms2 MACH_SWEDA_TMS2 SWEDA_TMS2 3272 | ||
| 585 | mx53_loco MACH_MX53_LOCO MX53_LOCO 3273 | 533 | mx53_loco MACH_MX53_LOCO MX53_LOCO 3273 |
| 586 | acer_a8 MACH_ACER_A8 ACER_A8 3275 | ||
| 587 | acer_gauguin MACH_ACER_GAUGUIN ACER_GAUGUIN 3276 | ||
| 588 | guppy MACH_GUPPY GUPPY 3277 | ||
| 589 | mx61_ard MACH_MX61_ARD MX61_ARD 3278 | ||
| 590 | tx53 MACH_TX53 TX53 3279 | 534 | tx53 MACH_TX53 TX53 3279 |
| 591 | omapl138_case_a3 MACH_OMAPL138_CASE_A3 OMAPL138_CASE_A3 3280 | ||
| 592 | uemd MACH_UEMD UEMD 3281 | ||
| 593 | ccwmx51mut MACH_CCWMX51MUT CCWMX51MUT 3282 | ||
| 594 | rockhopper MACH_ROCKHOPPER ROCKHOPPER 3283 | ||
| 595 | encore MACH_ENCORE ENCORE 3284 | 535 | encore MACH_ENCORE ENCORE 3284 |
| 596 | hkdkc100 MACH_HKDKC100 HKDKC100 3285 | ||
| 597 | ts42xx MACH_TS42XX TS42XX 3286 | ||
| 598 | aebl MACH_AEBL AEBL 3287 | ||
| 599 | wario MACH_WARIO WARIO 3288 | 536 | wario MACH_WARIO WARIO 3288 |
| 600 | gfs_spm MACH_GFS_SPM GFS_SPM 3289 | ||
| 601 | cm_t3730 MACH_CM_T3730 CM_T3730 3290 | 537 | cm_t3730 MACH_CM_T3730 CM_T3730 3290 |
| 602 | isc3 MACH_ISC3 ISC3 3291 | ||
| 603 | rascal MACH_RASCAL RASCAL 3292 | ||
| 604 | hrefv60 MACH_HREFV60 HREFV60 3293 | 538 | hrefv60 MACH_HREFV60 HREFV60 3293 |
| 605 | tpt_2_0 MACH_TPT_2_0 TPT_2_0 3294 | ||
| 606 | splendor MACH_SPLENDOR SPLENDOR 3296 | ||
| 607 | msm8x60_qt MACH_MSM8X60_QT MSM8X60_QT 3298 | ||
| 608 | htc_hd_mini MACH_HTC_HD_MINI HTC_HD_MINI 3299 | ||
| 609 | athene MACH_ATHENE ATHENE 3300 | ||
| 610 | deep_r_ek_1 MACH_DEEP_R_EK_1 DEEP_R_EK_1 3301 | ||
| 611 | vivow_ct MACH_VIVOW_CT VIVOW_CT 3302 | ||
| 612 | nery_1000 MACH_NERY_1000 NERY_1000 3303 | ||
| 613 | rfl109145_ssrv MACH_RFL109145_SSRV RFL109145_SSRV 3304 | ||
| 614 | nmh MACH_NMH NMH 3305 | ||
| 615 | wn802t MACH_WN802T WN802T 3306 | ||
| 616 | dragonet MACH_DRAGONET DRAGONET 3307 | ||
| 617 | at91sam9263desk16l MACH_AT91SAM9263DESK16L AT91SAM9263DESK16L 3309 | ||
| 618 | bcmhana_sv MACH_BCMHANA_SV BCMHANA_SV 3310 | ||
| 619 | bcmhana_tablet MACH_BCMHANA_TABLET BCMHANA_TABLET 3311 | ||
| 620 | koi MACH_KOI KOI 3312 | ||
| 621 | ts4800 MACH_TS4800 TS4800 3313 | ||
| 622 | tqma9263 MACH_TQMA9263 TQMA9263 3314 | ||
| 623 | holiday MACH_HOLIDAY HOLIDAY 3315 | ||
| 624 | pcats_overlay MACH_PCATS_OVERLAY PCATS_OVERLAY 3317 | ||
| 625 | hwgw6410 MACH_HWGW6410 HWGW6410 3318 | ||
| 626 | shenzhou MACH_SHENZHOU SHENZHOU 3319 | ||
| 627 | cwme9210 MACH_CWME9210 CWME9210 3320 | ||
| 628 | cwme9210js MACH_CWME9210JS CWME9210JS 3321 | ||
| 629 | colibri_tegra2 MACH_COLIBRI_TEGRA2 COLIBRI_TEGRA2 3323 | ||
| 630 | w21 MACH_W21 W21 3324 | ||
| 631 | polysat1 MACH_POLYSAT1 POLYSAT1 3325 | ||
| 632 | dataway MACH_DATAWAY DATAWAY 3326 | ||
| 633 | cobral138 MACH_COBRAL138 COBRAL138 3327 | ||
| 634 | roverpcs8 MACH_ROVERPCS8 ROVERPCS8 3328 | ||
| 635 | marvelc MACH_MARVELC MARVELC 3329 | ||
| 636 | navefihid MACH_NAVEFIHID NAVEFIHID 3330 | ||
| 637 | dm365_cv100 MACH_DM365_CV100 DM365_CV100 3331 | ||
| 638 | able MACH_ABLE ABLE 3332 | ||
| 639 | legacy MACH_LEGACY LEGACY 3333 | ||
| 640 | icong MACH_ICONG ICONG 3334 | ||
| 641 | rover_g8 MACH_ROVER_G8 ROVER_G8 3335 | ||
| 642 | t5388p MACH_T5388P T5388P 3336 | ||
| 643 | dingo MACH_DINGO DINGO 3337 | ||
| 644 | goflexhome MACH_GOFLEXHOME GOFLEXHOME 3338 | ||
| 645 | lanreadyfn511 MACH_LANREADYFN511 LANREADYFN511 3340 | ||
| 646 | omap3_baia MACH_OMAP3_BAIA OMAP3_BAIA 3341 | ||
| 647 | omap3smartdisplay MACH_OMAP3SMARTDISPLAY OMAP3SMARTDISPLAY 3342 | ||
| 648 | xilinx MACH_XILINX XILINX 3343 | ||
| 649 | a2f MACH_A2F A2F 3344 | ||
| 650 | sky25 MACH_SKY25 SKY25 3345 | ||
| 651 | ccmx53 MACH_CCMX53 CCMX53 3346 | ||
| 652 | ccmx53js MACH_CCMX53JS CCMX53JS 3347 | ||
| 653 | ccwmx53 MACH_CCWMX53 CCWMX53 3348 | ||
| 654 | ccwmx53js MACH_CCWMX53JS CCWMX53JS 3349 | ||
| 655 | frisms MACH_FRISMS FRISMS 3350 | ||
| 656 | msm7x27a_ffa MACH_MSM7X27A_FFA MSM7X27A_FFA 3351 | ||
| 657 | msm7x27a_surf MACH_MSM7X27A_SURF MSM7X27A_SURF 3352 | ||
| 658 | msm7x27a_rumi3 MACH_MSM7X27A_RUMI3 MSM7X27A_RUMI3 3353 | ||
| 659 | dimmsam9g20 MACH_DIMMSAM9G20 DIMMSAM9G20 3354 | ||
| 660 | dimm_imx28 MACH_DIMM_IMX28 DIMM_IMX28 3355 | ||
| 661 | amk_a4 MACH_AMK_A4 AMK_A4 3356 | ||
| 662 | gnet_sgme MACH_GNET_SGME GNET_SGME 3357 | ||
| 663 | shooter_u MACH_SHOOTER_U SHOOTER_U 3358 | ||
| 664 | vmx53 MACH_VMX53 VMX53 3359 | ||
| 665 | rhino MACH_RHINO RHINO 3360 | ||
| 666 | armlex4210 MACH_ARMLEX4210 ARMLEX4210 3361 | 539 | armlex4210 MACH_ARMLEX4210 ARMLEX4210 3361 |
| 667 | swarcoextmodem MACH_SWARCOEXTMODEM SWARCOEXTMODEM 3362 | ||
| 668 | snowball MACH_SNOWBALL SNOWBALL 3363 | 540 | snowball MACH_SNOWBALL SNOWBALL 3363 |
| 669 | pcm049 MACH_PCM049 PCM049 3364 | ||
| 670 | vigor MACH_VIGOR VIGOR 3365 | ||
| 671 | oslo_amundsen MACH_OSLO_AMUNDSEN OSLO_AMUNDSEN 3366 | ||
| 672 | gsl_diamond MACH_GSL_DIAMOND GSL_DIAMOND 3367 | ||
| 673 | cv2201 MACH_CV2201 CV2201 3368 | ||
| 674 | cv2202 MACH_CV2202 CV2202 3369 | ||
| 675 | cv2203 MACH_CV2203 CV2203 3370 | ||
| 676 | vit_ibox MACH_VIT_IBOX VIT_IBOX 3371 | ||
| 677 | dm6441_esp MACH_DM6441_ESP DM6441_ESP 3372 | ||
| 678 | at91sam9x5ek MACH_AT91SAM9X5EK AT91SAM9X5EK 3373 | ||
| 679 | libra MACH_LIBRA LIBRA 3374 | ||
| 680 | easycrrh MACH_EASYCRRH EASYCRRH 3375 | ||
| 681 | tripel MACH_TRIPEL TRIPEL 3376 | ||
| 682 | endian_mini MACH_ENDIAN_MINI ENDIAN_MINI 3377 | ||
| 683 | xilinx_ep107 MACH_XILINX_EP107 XILINX_EP107 3378 | 541 | xilinx_ep107 MACH_XILINX_EP107 XILINX_EP107 3378 |
| 684 | nuri MACH_NURI NURI 3379 | 542 | nuri MACH_NURI NURI 3379 |
| 685 | janus MACH_JANUS JANUS 3380 | ||
| 686 | ddnas MACH_DDNAS DDNAS 3381 | ||
| 687 | tag MACH_TAG TAG 3382 | ||
| 688 | tagw MACH_TAGW TAGW 3383 | ||
| 689 | nitrogen_vm_imx51 MACH_NITROGEN_VM_IMX51 NITROGEN_VM_IMX51 3384 | ||
| 690 | viprinet MACH_VIPRINET VIPRINET 3385 | ||
| 691 | bockw MACH_BOCKW BOCKW 3386 | ||
| 692 | eva2000 MACH_EVA2000 EVA2000 3387 | ||
| 693 | steelyard MACH_STEELYARD STEELYARD 3388 | ||
| 694 | nsslsboard MACH_NSSLSBOARD NSSLSBOARD 3392 | ||
| 695 | geneva_b5 MACH_GENEVA_B5 GENEVA_B5 3393 | ||
| 696 | spear1340 MACH_SPEAR1340 SPEAR1340 3394 | ||
| 697 | rexmas MACH_REXMAS REXMAS 3395 | ||
| 698 | msm8960_cdp MACH_MSM8960_CDP MSM8960_CDP 3396 | ||
| 699 | msm8960_fluid MACH_MSM8960_FLUID MSM8960_FLUID 3398 | ||
| 700 | msm8960_apq MACH_MSM8960_APQ MSM8960_APQ 3399 | ||
| 701 | helios_v2 MACH_HELIOS_V2 HELIOS_V2 3400 | ||
| 702 | mif10p MACH_MIF10P MIF10P 3401 | ||
| 703 | iam28 MACH_IAM28 IAM28 3402 | ||
| 704 | picasso MACH_PICASSO PICASSO 3403 | ||
| 705 | mr301a MACH_MR301A MR301A 3404 | ||
| 706 | notle MACH_NOTLE NOTLE 3405 | ||
| 707 | eelx2 MACH_EELX2 EELX2 3406 | ||
| 708 | moon MACH_MOON MOON 3407 | ||
| 709 | ruby MACH_RUBY RUBY 3408 | ||
| 710 | goldengate MACH_GOLDENGATE GOLDENGATE 3409 | ||
| 711 | ctbu_gen2 MACH_CTBU_GEN2 CTBU_GEN2 3410 | ||
| 712 | kmp_am17_01 MACH_KMP_AM17_01 KMP_AM17_01 3411 | ||
| 713 | wtplug MACH_WTPLUG WTPLUG 3412 | 543 | wtplug MACH_WTPLUG WTPLUG 3412 |
| 714 | mx27su2 MACH_MX27SU2 MX27SU2 3413 | ||
| 715 | nb31 MACH_NB31 NB31 3414 | ||
| 716 | hjsdu MACH_HJSDU HJSDU 3415 | ||
| 717 | td3_rev1 MACH_TD3_REV1 TD3_REV1 3416 | ||
| 718 | eag_ci4000 MACH_EAG_CI4000 EAG_CI4000 3417 | ||
| 719 | net5big_nand_v2 MACH_NET5BIG_NAND_V2 NET5BIG_NAND_V2 3418 | ||
| 720 | cpx2 MACH_CPX2 CPX2 3419 | ||
| 721 | net2big_nand_v2 MACH_NET2BIG_NAND_V2 NET2BIG_NAND_V2 3420 | ||
| 722 | ecuv5 MACH_ECUV5 ECUV5 3421 | ||
| 723 | hsgx6d MACH_HSGX6D HSGX6D 3422 | ||
| 724 | dawad7 MACH_DAWAD7 DAWAD7 3423 | ||
| 725 | sam9repeater MACH_SAM9REPEATER SAM9REPEATER 3424 | ||
| 726 | gt_i5700 MACH_GT_I5700 GT_I5700 3425 | ||
| 727 | ctera_plug_c2 MACH_CTERA_PLUG_C2 CTERA_PLUG_C2 3426 | ||
| 728 | marvelct MACH_MARVELCT MARVELCT 3427 | ||
| 729 | ag11005 MACH_AG11005 AG11005 3428 | ||
| 730 | vangogh MACH_VANGOGH VANGOGH 3430 | ||
| 731 | matrix505 MACH_MATRIX505 MATRIX505 3431 | ||
| 732 | oce_nigma MACH_OCE_NIGMA OCE_NIGMA 3432 | ||
| 733 | t55 MACH_T55 T55 3433 | ||
| 734 | bio3k MACH_BIO3K BIO3K 3434 | ||
| 735 | expressct MACH_EXPRESSCT EXPRESSCT 3435 | ||
| 736 | cardhu MACH_CARDHU CARDHU 3436 | ||
| 737 | aruba MACH_ARUBA ARUBA 3437 | ||
| 738 | bonaire MACH_BONAIRE BONAIRE 3438 | ||
| 739 | nuc700evb MACH_NUC700EVB NUC700EVB 3439 | ||
| 740 | nuc710evb MACH_NUC710EVB NUC710EVB 3440 | ||
| 741 | nuc740evb MACH_NUC740EVB NUC740EVB 3441 | ||
| 742 | nuc745evb MACH_NUC745EVB NUC745EVB 3442 | ||
| 743 | transcede MACH_TRANSCEDE TRANSCEDE 3443 | ||
| 744 | mora MACH_MORA MORA 3444 | ||
| 745 | nda_evm MACH_NDA_EVM NDA_EVM 3445 | ||
| 746 | timu MACH_TIMU TIMU 3446 | ||
| 747 | expressh MACH_EXPRESSH EXPRESSH 3447 | ||
| 748 | veridis_a300 MACH_VERIDIS_A300 VERIDIS_A300 3448 | 544 | veridis_a300 MACH_VERIDIS_A300 VERIDIS_A300 3448 |
| 749 | dm368_leopard MACH_DM368_LEOPARD DM368_LEOPARD 3449 | ||
| 750 | omap_mcop MACH_OMAP_MCOP OMAP_MCOP 3450 | ||
| 751 | tritip MACH_TRITIP TRITIP 3451 | ||
| 752 | sm1k MACH_SM1K SM1K 3452 | ||
| 753 | monch MACH_MONCH MONCH 3453 | ||
| 754 | curacao MACH_CURACAO CURACAO 3454 | ||
| 755 | origen MACH_ORIGEN ORIGEN 3455 | 545 | origen MACH_ORIGEN ORIGEN 3455 |
| 756 | epc10 MACH_EPC10 EPC10 3456 | ||
| 757 | sgh_i740 MACH_SGH_I740 SGH_I740 3457 | ||
| 758 | tuna MACH_TUNA TUNA 3458 | ||
| 759 | mx51_tulip MACH_MX51_TULIP MX51_TULIP 3459 | ||
| 760 | mx51_aster7 MACH_MX51_ASTER7 MX51_ASTER7 3460 | ||
| 761 | acro37xbrd MACH_ACRO37XBRD ACRO37XBRD 3461 | ||
| 762 | elke MACH_ELKE ELKE 3462 | ||
| 763 | sbc6000x MACH_SBC6000X SBC6000X 3463 | ||
| 764 | r1801e MACH_R1801E R1801E 3464 | ||
| 765 | h1600 MACH_H1600 H1600 3465 | ||
| 766 | mini210 MACH_MINI210 MINI210 3466 | ||
| 767 | mini8168 MACH_MINI8168 MINI8168 3467 | ||
| 768 | pc7308 MACH_PC7308 PC7308 3468 | ||
| 769 | kmm2m01 MACH_KMM2M01 KMM2M01 3470 | ||
| 770 | mx51erebus MACH_MX51EREBUS MX51EREBUS 3471 | ||
| 771 | wm8650refboard MACH_WM8650REFBOARD WM8650REFBOARD 3472 | 546 | wm8650refboard MACH_WM8650REFBOARD WM8650REFBOARD 3472 |
| 772 | tuxrail MACH_TUXRAIL TUXRAIL 3473 | ||
| 773 | arthur MACH_ARTHUR ARTHUR 3474 | ||
| 774 | doorboy MACH_DOORBOY DOORBOY 3475 | ||
| 775 | xarina MACH_XARINA XARINA 3476 | 547 | xarina MACH_XARINA XARINA 3476 |
| 776 | roverx7 MACH_ROVERX7 ROVERX7 3477 | ||
| 777 | sdvr MACH_SDVR SDVR 3478 | 548 | sdvr MACH_SDVR SDVR 3478 |
| 778 | acer_maya MACH_ACER_MAYA ACER_MAYA 3479 | 549 | acer_maya MACH_ACER_MAYA ACER_MAYA 3479 |
| 779 | pico MACH_PICO PICO 3480 | 550 | pico MACH_PICO PICO 3480 |
| @@ -999,6 +770,7 @@ promwad_jade MACH_PROMWAD_JADE PROMWAD_JADE 3708 | |||
| 999 | amp MACH_AMP AMP 3709 | 770 | amp MACH_AMP AMP 3709 |
| 1000 | gnet_amp MACH_GNET_AMP GNET_AMP 3710 | 771 | gnet_amp MACH_GNET_AMP GNET_AMP 3710 |
| 1001 | toques MACH_TOQUES TOQUES 3711 | 772 | toques MACH_TOQUES TOQUES 3711 |
| 773 | apx4devkit MACH_APX4DEVKIT APX4DEVKIT 3712 | ||
| 1002 | dct_storm MACH_DCT_STORM DCT_STORM 3713 | 774 | dct_storm MACH_DCT_STORM DCT_STORM 3713 |
| 1003 | owl MACH_OWL OWL 3715 | 775 | owl MACH_OWL OWL 3715 |
| 1004 | cogent_csb1741 MACH_COGENT_CSB1741 COGENT_CSB1741 3716 | 776 | cogent_csb1741 MACH_COGENT_CSB1741 COGENT_CSB1741 3716 |
| @@ -1063,7 +835,6 @@ shelter MACH_SHELTER SHELTER 3778 | |||
| 1063 | omap3_devkit8500 MACH_OMAP3_DEVKIT8500 OMAP3_DEVKIT8500 3779 | 835 | omap3_devkit8500 MACH_OMAP3_DEVKIT8500 OMAP3_DEVKIT8500 3779 |
| 1064 | edgetd MACH_EDGETD EDGETD 3780 | 836 | edgetd MACH_EDGETD EDGETD 3780 |
| 1065 | copperyard MACH_COPPERYARD COPPERYARD 3781 | 837 | copperyard MACH_COPPERYARD COPPERYARD 3781 |
| 1066 | edge MACH_EDGE EDGE 3782 | ||
| 1067 | edge_u MACH_EDGE_U EDGE_U 3783 | 838 | edge_u MACH_EDGE_U EDGE_U 3783 |
| 1068 | edge_td MACH_EDGE_TD EDGE_TD 3784 | 839 | edge_td MACH_EDGE_TD EDGE_TD 3784 |
| 1069 | wdss MACH_WDSS WDSS 3785 | 840 | wdss MACH_WDSS WDSS 3785 |
| @@ -1169,3 +940,269 @@ elite_ulk MACH_ELITE_ULK ELITE_ULK 3888 | |||
| 1169 | pov2 MACH_POV2 POV2 3889 | 940 | pov2 MACH_POV2 POV2 3889 |
| 1170 | ipod_touch_2g MACH_IPOD_TOUCH_2G IPOD_TOUCH_2G 3890 | 941 | ipod_touch_2g MACH_IPOD_TOUCH_2G IPOD_TOUCH_2G 3890 |
| 1171 | da850_pqab MACH_DA850_PQAB DA850_PQAB 3891 | 942 | da850_pqab MACH_DA850_PQAB DA850_PQAB 3891 |
| 943 | fermi MACH_FERMI FERMI 3892 | ||
| 944 | ccardwmx28 MACH_CCARDWMX28 CCARDWMX28 3893 | ||
| 945 | ccardmx28 MACH_CCARDMX28 CCARDMX28 3894 | ||
| 946 | fs20_fcm2050 MACH_FS20_FCM2050 FS20_FCM2050 3895 | ||
| 947 | kinetis MACH_KINETIS KINETIS 3896 | ||
| 948 | kai MACH_KAI KAI 3897 | ||
| 949 | bcthb2 MACH_BCTHB2 BCTHB2 3898 | ||
| 950 | inels3_cu MACH_INELS3_CU INELS3_CU 3899 | ||
| 951 | da850_apollo MACH_DA850_APOLLO DA850_APOLLO 3901 | ||
| 952 | tracnas MACH_TRACNAS TRACNAS 3902 | ||
| 953 | mityarm335x MACH_MITYARM335X MITYARM335X 3903 | ||
| 954 | xcgz7x MACH_XCGZ7X XCGZ7X 3904 | ||
| 955 | cubox MACH_CUBOX CUBOX 3905 | ||
| 956 | terminator MACH_TERMINATOR TERMINATOR 3906 | ||
| 957 | eye03 MACH_EYE03 EYE03 3907 | ||
| 958 | kota3 MACH_KOTA3 KOTA3 3908 | ||
| 959 | pscpe MACH_PSCPE PSCPE 3910 | ||
| 960 | akt1100 MACH_AKT1100 AKT1100 3911 | ||
| 961 | pcaaxl2 MACH_PCAAXL2 PCAAXL2 3912 | ||
| 962 | primodd_ct MACH_PRIMODD_CT PRIMODD_CT 3913 | ||
| 963 | nsbc MACH_NSBC NSBC 3914 | ||
| 964 | meson2_skt MACH_MESON2_SKT MESON2_SKT 3915 | ||
| 965 | meson2_ref MACH_MESON2_REF MESON2_REF 3916 | ||
| 966 | ccardwmx28js MACH_CCARDWMX28JS CCARDWMX28JS 3917 | ||
| 967 | ccardmx28js MACH_CCARDMX28JS CCARDMX28JS 3918 | ||
| 968 | indico MACH_INDICO INDICO 3919 | ||
| 969 | msm8960dt MACH_MSM8960DT MSM8960DT 3920 | ||
| 970 | primods MACH_PRIMODS PRIMODS 3921 | ||
| 971 | beluga_m1388 MACH_BELUGA_M1388 BELUGA_M1388 3922 | ||
| 972 | primotd MACH_PRIMOTD PRIMOTD 3923 | ||
| 973 | varan_master MACH_VARAN_MASTER VARAN_MASTER 3924 | ||
| 974 | primodd MACH_PRIMODD PRIMODD 3925 | ||
| 975 | jetduo MACH_JETDUO JETDUO 3926 | ||
| 976 | mx53_umobo MACH_MX53_UMOBO MX53_UMOBO 3927 | ||
| 977 | trats MACH_TRATS TRATS 3928 | ||
| 978 | starcraft MACH_STARCRAFT STARCRAFT 3929 | ||
| 979 | qseven_tegra2 MACH_QSEVEN_TEGRA2 QSEVEN_TEGRA2 3930 | ||
| 980 | lichee_sun4i_devbd MACH_LICHEE_SUN4I_DEVBD LICHEE_SUN4I_DEVBD 3931 | ||
| 981 | movenow MACH_MOVENOW MOVENOW 3932 | ||
| 982 | golf_u MACH_GOLF_U GOLF_U 3933 | ||
| 983 | msm7627a_evb MACH_MSM7627A_EVB MSM7627A_EVB 3934 | ||
| 984 | rambo MACH_RAMBO RAMBO 3935 | ||
| 985 | golfu MACH_GOLFU GOLFU 3936 | ||
| 986 | mango310 MACH_MANGO310 MANGO310 3937 | ||
| 987 | dns343 MACH_DNS343 DNS343 3938 | ||
| 988 | var_som_om44 MACH_VAR_SOM_OM44 VAR_SOM_OM44 3939 | ||
| 989 | naon MACH_NAON NAON 3940 | ||
| 990 | vp4000 MACH_VP4000 VP4000 3941 | ||
| 991 | impcard MACH_IMPCARD IMPCARD 3942 | ||
| 992 | smoovcam MACH_SMOOVCAM SMOOVCAM 3943 | ||
| 993 | cobham3725 MACH_COBHAM3725 COBHAM3725 3944 | ||
| 994 | cobham3730 MACH_COBHAM3730 COBHAM3730 3945 | ||
| 995 | cobham3703 MACH_COBHAM3703 COBHAM3703 3946 | ||
| 996 | quetzal MACH_QUETZAL QUETZAL 3947 | ||
| 997 | apq8064_cdp MACH_APQ8064_CDP APQ8064_CDP 3948 | ||
| 998 | apq8064_mtp MACH_APQ8064_MTP APQ8064_MTP 3949 | ||
| 999 | apq8064_fluid MACH_APQ8064_FLUID APQ8064_FLUID 3950 | ||
| 1000 | apq8064_liquid MACH_APQ8064_LIQUID APQ8064_LIQUID 3951 | ||
| 1001 | mango210 MACH_MANGO210 MANGO210 3952 | ||
| 1002 | mango100 MACH_MANGO100 MANGO100 3953 | ||
| 1003 | mango24 MACH_MANGO24 MANGO24 3954 | ||
| 1004 | mango64 MACH_MANGO64 MANGO64 3955 | ||
| 1005 | nsa320 MACH_NSA320 NSA320 3956 | ||
| 1006 | elv_ccu2 MACH_ELV_CCU2 ELV_CCU2 3957 | ||
| 1007 | triton_x00 MACH_TRITON_X00 TRITON_X00 3958 | ||
| 1008 | triton_1500_2000 MACH_TRITON_1500_2000 TRITON_1500_2000 3959 | ||
| 1009 | pogoplugv4 MACH_POGOPLUGV4 POGOPLUGV4 3960 | ||
| 1010 | venus_cl MACH_VENUS_CL VENUS_CL 3961 | ||
| 1011 | vulcano_g20 MACH_VULCANO_G20 VULCANO_G20 3962 | ||
| 1012 | sgs_i9100 MACH_SGS_I9100 SGS_I9100 3963 | ||
| 1013 | stsv2 MACH_STSV2 STSV2 3964 | ||
| 1014 | csb1724 MACH_CSB1724 CSB1724 3965 | ||
| 1015 | omapl138_lcdk MACH_OMAPL138_LCDK OMAPL138_LCDK 3966 | ||
| 1016 | pvd_mx25 MACH_PVD_MX25 PVD_MX25 3968 | ||
| 1017 | meson6_skt MACH_MESON6_SKT MESON6_SKT 3969 | ||
| 1018 | meson6_ref MACH_MESON6_REF MESON6_REF 3970 | ||
| 1019 | pxm MACH_PXM PXM 3971 | ||
| 1020 | pogoplugv3 MACH_POGOPLUGV3 POGOPLUGV3 3973 | ||
| 1021 | mlp89626 MACH_MLP89626 MLP89626 3974 | ||
| 1022 | iomegahmndce MACH_IOMEGAHMNDCE IOMEGAHMNDCE 3975 | ||
| 1023 | pogoplugv3pci MACH_POGOPLUGV3PCI POGOPLUGV3PCI 3976 | ||
| 1024 | bntv250 MACH_BNTV250 BNTV250 3977 | ||
| 1025 | mx53_qseven MACH_MX53_QSEVEN MX53_QSEVEN 3978 | ||
| 1026 | gtl_it1100 MACH_GTL_IT1100 GTL_IT1100 3979 | ||
| 1027 | mx6q_sabresd MACH_MX6Q_SABRESD MX6Q_SABRESD 3980 | ||
| 1028 | mt4 MACH_MT4 MT4 3981 | ||
| 1029 | jumbo_d MACH_JUMBO_D JUMBO_D 3982 | ||
| 1030 | jumbo_i MACH_JUMBO_I JUMBO_I 3983 | ||
| 1031 | fs20_dmp MACH_FS20_DMP FS20_DMP 3984 | ||
| 1032 | dns320 MACH_DNS320 DNS320 3985 | ||
| 1033 | mx28bacos MACH_MX28BACOS MX28BACOS 3986 | ||
| 1034 | tl80 MACH_TL80 TL80 3987 | ||
| 1035 | polatis_nic_1001 MACH_POLATIS_NIC_1001 POLATIS_NIC_1001 3988 | ||
| 1036 | tely MACH_TELY TELY 3989 | ||
| 1037 | u8520 MACH_U8520 U8520 3990 | ||
| 1038 | manta MACH_MANTA MANTA 3991 | ||
| 1039 | mpq8064_cdp MACH_MPQ8064_CDP MPQ8064_CDP 3993 | ||
| 1040 | mpq8064_dtv MACH_MPQ8064_DTV MPQ8064_DTV 3995 | ||
| 1041 | dm368som MACH_DM368SOM DM368SOM 3996 | ||
| 1042 | gprisb2 MACH_GPRISB2 GPRISB2 3997 | ||
| 1043 | chammid MACH_CHAMMID CHAMMID 3998 | ||
| 1044 | seoul2 MACH_SEOUL2 SEOUL2 3999 | ||
| 1045 | omap4_nooktablet MACH_OMAP4_NOOKTABLET OMAP4_NOOKTABLET 4000 | ||
| 1046 | aalto MACH_AALTO AALTO 4001 | ||
| 1047 | metro MACH_METRO METRO 4002 | ||
| 1048 | cydm3730 MACH_CYDM3730 CYDM3730 4003 | ||
| 1049 | tqma53 MACH_TQMA53 TQMA53 4004 | ||
| 1050 | msm7627a_qrd3 MACH_MSM7627A_QRD3 MSM7627A_QRD3 4005 | ||
| 1051 | mx28_canby MACH_MX28_CANBY MX28_CANBY 4006 | ||
| 1052 | tiger MACH_TIGER TIGER 4007 | ||
| 1053 | pcats_9307_type_a MACH_PCATS_9307_TYPE_A PCATS_9307_TYPE_A 4008 | ||
| 1054 | pcats_9307_type_o MACH_PCATS_9307_TYPE_O PCATS_9307_TYPE_O 4009 | ||
| 1055 | pcats_9307_type_r MACH_PCATS_9307_TYPE_R PCATS_9307_TYPE_R 4010 | ||
| 1056 | streamplug MACH_STREAMPLUG STREAMPLUG 4011 | ||
| 1057 | icechicken_dev MACH_ICECHICKEN_DEV ICECHICKEN_DEV 4012 | ||
| 1058 | hedgehog MACH_HEDGEHOG HEDGEHOG 4013 | ||
| 1059 | yusend_obc MACH_YUSEND_OBC YUSEND_OBC 4014 | ||
| 1060 | imxninja MACH_IMXNINJA IMXNINJA 4015 | ||
| 1061 | omap4_jarod MACH_OMAP4_JAROD OMAP4_JAROD 4016 | ||
| 1062 | eco5_pk MACH_ECO5_PK ECO5_PK 4017 | ||
| 1063 | qj2440 MACH_QJ2440 QJ2440 4018 | ||
| 1064 | mx6q_mercury MACH_MX6Q_MERCURY MX6Q_MERCURY 4019 | ||
| 1065 | cm6810 MACH_CM6810 CM6810 4020 | ||
| 1066 | omap4_torpedo MACH_OMAP4_TORPEDO OMAP4_TORPEDO 4021 | ||
| 1067 | nsa310 MACH_NSA310 NSA310 4022 | ||
| 1068 | tmx536 MACH_TMX536 TMX536 4023 | ||
| 1069 | ktt20 MACH_KTT20 KTT20 4024 | ||
| 1070 | dragonix MACH_DRAGONIX DRAGONIX 4025 | ||
| 1071 | lungching MACH_LUNGCHING LUNGCHING 4026 | ||
| 1072 | bulogics MACH_BULOGICS BULOGICS 4027 | ||
| 1073 | mx535_sx MACH_MX535_SX MX535_SX 4028 | ||
| 1074 | ngui3250 MACH_NGUI3250 NGUI3250 4029 | ||
| 1075 | salutec_dac MACH_SALUTEC_DAC SALUTEC_DAC 4030 | ||
| 1076 | loco MACH_LOCO LOCO 4031 | ||
| 1077 | ctera_plug_usi MACH_CTERA_PLUG_USI CTERA_PLUG_USI 4032 | ||
| 1078 | scepter MACH_SCEPTER SCEPTER 4033 | ||
| 1079 | sga MACH_SGA SGA 4034 | ||
| 1080 | p_81_j5 MACH_P_81_J5 P_81_J5 4035 | ||
| 1081 | p_81_o4 MACH_P_81_O4 P_81_O4 4036 | ||
| 1082 | msm8625_surf MACH_MSM8625_SURF MSM8625_SURF 4037 | ||
| 1083 | carallon_shark MACH_CARALLON_SHARK CARALLON_SHARK 4038 | ||
| 1084 | ordog MACH_ORDOG ORDOG 4040 | ||
| 1085 | puente_io MACH_PUENTE_IO PUENTE_IO 4041 | ||
| 1086 | msm8625_evb MACH_MSM8625_EVB MSM8625_EVB 4042 | ||
| 1087 | ev_am1707 MACH_EV_AM1707 EV_AM1707 4043 | ||
| 1088 | ev_am1707e2 MACH_EV_AM1707E2 EV_AM1707E2 4044 | ||
| 1089 | ev_am3517e2 MACH_EV_AM3517E2 EV_AM3517E2 4045 | ||
| 1090 | calabria MACH_CALABRIA CALABRIA 4046 | ||
| 1091 | ev_imx287 MACH_EV_IMX287 EV_IMX287 4047 | ||
| 1092 | erau MACH_ERAU ERAU 4048 | ||
| 1093 | sichuan MACH_SICHUAN SICHUAN 4049 | ||
| 1094 | davinci_da850 MACH_DAVINCI_DA850 DAVINCI_DA850 4051 | ||
| 1095 | omap138_trunarc MACH_OMAP138_TRUNARC OMAP138_TRUNARC 4052 | ||
| 1096 | bcm4761 MACH_BCM4761 BCM4761 4053 | ||
| 1097 | picasso_e2 MACH_PICASSO_E2 PICASSO_E2 4054 | ||
| 1098 | picasso_mf MACH_PICASSO_MF PICASSO_MF 4055 | ||
| 1099 | miro MACH_MIRO MIRO 4056 | ||
| 1100 | at91sam9g20ewon3 MACH_AT91SAM9G20EWON3 AT91SAM9G20EWON3 4057 | ||
| 1101 | yoyo MACH_YOYO YOYO 4058 | ||
| 1102 | windjkl MACH_WINDJKL WINDJKL 4059 | ||
| 1103 | monarudo MACH_MONARUDO MONARUDO 4060 | ||
| 1104 | batan MACH_BATAN BATAN 4061 | ||
| 1105 | tadao MACH_TADAO TADAO 4062 | ||
| 1106 | baso MACH_BASO BASO 4063 | ||
| 1107 | mahon MACH_MAHON MAHON 4064 | ||
| 1108 | villec2 MACH_VILLEC2 VILLEC2 4065 | ||
| 1109 | asi1230 MACH_ASI1230 ASI1230 4066 | ||
| 1110 | alaska MACH_ALASKA ALASKA 4067 | ||
| 1111 | swarco_shdsl2 MACH_SWARCO_SHDSL2 SWARCO_SHDSL2 4068 | ||
| 1112 | oxrtu MACH_OXRTU OXRTU 4069 | ||
| 1113 | omap5_panda MACH_OMAP5_PANDA OMAP5_PANDA 4070 | ||
| 1114 | c8000 MACH_C8000 C8000 4072 | ||
| 1115 | bje_display3_5 MACH_BJE_DISPLAY3_5 BJE_DISPLAY3_5 4073 | ||
| 1116 | picomod7 MACH_PICOMOD7 PICOMOD7 4074 | ||
| 1117 | picocom5 MACH_PICOCOM5 PICOCOM5 4075 | ||
| 1118 | qblissa8 MACH_QBLISSA8 QBLISSA8 4076 | ||
| 1119 | armstonea8 MACH_ARMSTONEA8 ARMSTONEA8 4077 | ||
| 1120 | netdcu14 MACH_NETDCU14 NETDCU14 4078 | ||
| 1121 | at91sam9x5_epiphan MACH_AT91SAM9X5_EPIPHAN AT91SAM9X5_EPIPHAN 4079 | ||
| 1122 | p2u MACH_P2U P2U 4080 | ||
| 1123 | doris MACH_DORIS DORIS 4081 | ||
| 1124 | j49 MACH_J49 J49 4082 | ||
| 1125 | vdss2e MACH_VDSS2E VDSS2E 4083 | ||
| 1126 | vc300 MACH_VC300 VC300 4084 | ||
| 1127 | ns115_pad_test MACH_NS115_PAD_TEST NS115_PAD_TEST 4085 | ||
| 1128 | ns115_pad_ref MACH_NS115_PAD_REF NS115_PAD_REF 4086 | ||
| 1129 | ns115_phone_test MACH_NS115_PHONE_TEST NS115_PHONE_TEST 4087 | ||
| 1130 | ns115_phone_ref MACH_NS115_PHONE_REF NS115_PHONE_REF 4088 | ||
| 1131 | golfc MACH_GOLFC GOLFC 4089 | ||
| 1132 | xerox_olympus MACH_XEROX_OLYMPUS XEROX_OLYMPUS 4090 | ||
| 1133 | mx6sl_arm2 MACH_MX6SL_ARM2 MX6SL_ARM2 4091 | ||
| 1134 | csb1701_csb1726 MACH_CSB1701_CSB1726 CSB1701_CSB1726 4092 | ||
| 1135 | at91sam9xeek MACH_AT91SAM9XEEK AT91SAM9XEEK 4093 | ||
| 1136 | ebv210 MACH_EBV210 EBV210 4094 | ||
| 1137 | msm7627a_qrd7 MACH_MSM7627A_QRD7 MSM7627A_QRD7 4095 | ||
| 1138 | svthin MACH_SVTHIN SVTHIN 4096 | ||
| 1139 | duovero MACH_DUOVERO DUOVERO 4097 | ||
| 1140 | chupacabra MACH_CHUPACABRA CHUPACABRA 4098 | ||
| 1141 | scorpion MACH_SCORPION SCORPION 4099 | ||
| 1142 | davinci_he_hmi10 MACH_DAVINCI_HE_HMI10 DAVINCI_HE_HMI10 4100 | ||
| 1143 | topkick MACH_TOPKICK TOPKICK 4101 | ||
| 1144 | m3_auguestrush MACH_M3_AUGUESTRUSH M3_AUGUESTRUSH 4102 | ||
| 1145 | ipc335x MACH_IPC335X IPC335X 4103 | ||
| 1146 | sun4i MACH_SUN4I SUN4I 4104 | ||
| 1147 | imx233_olinuxino MACH_IMX233_OLINUXINO IMX233_OLINUXINO 4105 | ||
| 1148 | k2_wl MACH_K2_WL K2_WL 4106 | ||
| 1149 | k2_ul MACH_K2_UL K2_UL 4107 | ||
| 1150 | k2_cl MACH_K2_CL K2_CL 4108 | ||
| 1151 | minbari_w MACH_MINBARI_W MINBARI_W 4109 | ||
| 1152 | minbari_m MACH_MINBARI_M MINBARI_M 4110 | ||
| 1153 | k035 MACH_K035 K035 4111 | ||
| 1154 | ariel MACH_ARIEL ARIEL 4112 | ||
| 1155 | arielsaarc MACH_ARIELSAARC ARIELSAARC 4113 | ||
| 1156 | arieldkb MACH_ARIELDKB ARIELDKB 4114 | ||
| 1157 | armadillo810 MACH_ARMADILLO810 ARMADILLO810 4115 | ||
| 1158 | tam335x MACH_TAM335X TAM335X 4116 | ||
| 1159 | grouper MACH_GROUPER GROUPER 4117 | ||
| 1160 | mpcsa21_9g20 MACH_MPCSA21_9G20 MPCSA21_9G20 4118 | ||
| 1161 | m6u_cpu MACH_M6U_CPU M6U_CPU 4119 | ||
| 1162 | davinci_dp10 MACH_DAVINCI_DP10 DAVINCI_DP10 4120 | ||
| 1163 | ginkgo MACH_GINKGO GINKGO 4121 | ||
| 1164 | cgt_qmx6 MACH_CGT_QMX6 CGT_QMX6 4122 | ||
| 1165 | profpga MACH_PROFPGA PROFPGA 4123 | ||
| 1166 | acfx100oc MACH_ACFX100OC ACFX100OC 4124 | ||
| 1167 | acfx100nb MACH_ACFX100NB ACFX100NB 4125 | ||
| 1168 | capricorn MACH_CAPRICORN CAPRICORN 4126 | ||
| 1169 | pisces MACH_PISCES PISCES 4127 | ||
| 1170 | aries MACH_ARIES ARIES 4128 | ||
| 1171 | cancer MACH_CANCER CANCER 4129 | ||
| 1172 | leo MACH_LEO LEO 4130 | ||
| 1173 | virgo MACH_VIRGO VIRGO 4131 | ||
| 1174 | sagittarius MACH_SAGITTARIUS SAGITTARIUS 4132 | ||
| 1175 | devil MACH_DEVIL DEVIL 4133 | ||
| 1176 | ballantines MACH_BALLANTINES BALLANTINES 4134 | ||
| 1177 | omap3_procerusvpu MACH_OMAP3_PROCERUSVPU OMAP3_PROCERUSVPU 4135 | ||
| 1178 | my27 MACH_MY27 MY27 4136 | ||
| 1179 | sun6i MACH_SUN6I SUN6I 4137 | ||
| 1180 | sun5i MACH_SUN5I SUN5I 4138 | ||
| 1181 | mx512_mx MACH_MX512_MX MX512_MX 4139 | ||
| 1182 | kzm9g MACH_KZM9G KZM9G 4140 | ||
| 1183 | vdstbn MACH_VDSTBN VDSTBN 4141 | ||
| 1184 | cfa10036 MACH_CFA10036 CFA10036 4142 | ||
| 1185 | cfa10049 MACH_CFA10049 CFA10049 4143 | ||
| 1186 | pcm051 MACH_PCM051 PCM051 4144 | ||
| 1187 | vybrid_vf7xx MACH_VYBRID_VF7XX VYBRID_VF7XX 4145 | ||
| 1188 | vybrid_vf6xx MACH_VYBRID_VF6XX VYBRID_VF6XX 4146 | ||
| 1189 | vybrid_vf5xx MACH_VYBRID_VF5XX VYBRID_VF5XX 4147 | ||
| 1190 | vybrid_vf4xx MACH_VYBRID_VF4XX VYBRID_VF4XX 4148 | ||
| 1191 | aria_g25 MACH_ARIA_G25 ARIA_G25 4149 | ||
| 1192 | bcm21553 MACH_BCM21553 BCM21553 4150 | ||
| 1193 | smdk5410 MACH_SMDK5410 SMDK5410 4151 | ||
| 1194 | lpc18xx MACH_LPC18XX LPC18XX 4152 | ||
| 1195 | oratisparty MACH_ORATISPARTY ORATISPARTY 4153 | ||
| 1196 | qseven MACH_QSEVEN QSEVEN 4154 | ||
| 1197 | gmv_generic MACH_GMV_GENERIC GMV_GENERIC 4155 | ||
| 1198 | th_link_eth MACH_TH_LINK_ETH TH_LINK_ETH 4156 | ||
| 1199 | tn_muninn MACH_TN_MUNINN TN_MUNINN 4157 | ||
| 1200 | rampage MACH_RAMPAGE RAMPAGE 4158 | ||
| 1201 | visstrim_mv10 MACH_VISSTRIM_MV10 VISSTRIM_MV10 4159 | ||
| 1202 | mx28_wilma MACH_MX28_WILMA MX28_WILMA 4164 | ||
| 1203 | msm8625_ffa MACH_MSM8625_FFA MSM8625_FFA 4166 | ||
| 1204 | vpu101 MACH_VPU101 VPU101 4167 | ||
| 1205 | baileys MACH_BAILEYS BAILEYS 4169 | ||
| 1206 | familybox MACH_FAMILYBOX FAMILYBOX 4170 | ||
| 1207 | ensemble_mx35 MACH_ENSEMBLE_MX35 ENSEMBLE_MX35 4171 | ||
| 1208 | sc_sps_1 MACH_SC_SPS_1 SC_SPS_1 4172 | ||
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index b0197b2c857d..586961929e96 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
| @@ -241,11 +241,11 @@ static void vfp_panic(char *reason, u32 inst) | |||
| 241 | { | 241 | { |
| 242 | int i; | 242 | int i; |
| 243 | 243 | ||
| 244 | printk(KERN_ERR "VFP: Error: %s\n", reason); | 244 | pr_err("VFP: Error: %s\n", reason); |
| 245 | printk(KERN_ERR "VFP: EXC 0x%08x SCR 0x%08x INST 0x%08x\n", | 245 | pr_err("VFP: EXC 0x%08x SCR 0x%08x INST 0x%08x\n", |
| 246 | fmrx(FPEXC), fmrx(FPSCR), inst); | 246 | fmrx(FPEXC), fmrx(FPSCR), inst); |
| 247 | for (i = 0; i < 32; i += 2) | 247 | for (i = 0; i < 32; i += 2) |
| 248 | printk(KERN_ERR "VFP: s%2u: 0x%08x s%2u: 0x%08x\n", | 248 | pr_err("VFP: s%2u: 0x%08x s%2u: 0x%08x\n", |
| 249 | i, vfp_get_float(i), i+1, vfp_get_float(i+1)); | 249 | i, vfp_get_float(i), i+1, vfp_get_float(i+1)); |
| 250 | } | 250 | } |
| 251 | 251 | ||
| @@ -452,7 +452,7 @@ static int vfp_pm_suspend(void) | |||
| 452 | 452 | ||
| 453 | /* if vfp is on, then save state for resumption */ | 453 | /* if vfp is on, then save state for resumption */ |
| 454 | if (fpexc & FPEXC_EN) { | 454 | if (fpexc & FPEXC_EN) { |
| 455 | printk(KERN_DEBUG "%s: saving vfp state\n", __func__); | 455 | pr_debug("%s: saving vfp state\n", __func__); |
| 456 | vfp_save_state(&ti->vfpstate, fpexc); | 456 | vfp_save_state(&ti->vfpstate, fpexc); |
| 457 | 457 | ||
| 458 | /* disable, just in case */ | 458 | /* disable, just in case */ |
| @@ -664,16 +664,16 @@ static int __init vfp_init(void) | |||
| 664 | barrier(); | 664 | barrier(); |
| 665 | vfp_vector = vfp_null_entry; | 665 | vfp_vector = vfp_null_entry; |
| 666 | 666 | ||
| 667 | printk(KERN_INFO "VFP support v0.3: "); | 667 | pr_info("VFP support v0.3: "); |
| 668 | if (VFP_arch) | 668 | if (VFP_arch) |
| 669 | printk("not present\n"); | 669 | pr_cont("not present\n"); |
| 670 | else if (vfpsid & FPSID_NODOUBLE) { | 670 | else if (vfpsid & FPSID_NODOUBLE) { |
| 671 | printk("no double precision support\n"); | 671 | pr_cont("no double precision support\n"); |
| 672 | } else { | 672 | } else { |
| 673 | hotcpu_notifier(vfp_hotplug, 0); | 673 | hotcpu_notifier(vfp_hotplug, 0); |
| 674 | 674 | ||
| 675 | VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT; /* Extract the architecture version */ | 675 | VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT; /* Extract the architecture version */ |
| 676 | printk("implementor %02x architecture %d part %02x variant %x rev %x\n", | 676 | pr_cont("implementor %02x architecture %d part %02x variant %x rev %x\n", |
| 677 | (vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT, | 677 | (vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT, |
| 678 | (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT, | 678 | (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT, |
| 679 | (vfpsid & FPSID_PART_MASK) >> FPSID_PART_BIT, | 679 | (vfpsid & FPSID_PART_MASK) >> FPSID_PART_BIT, |
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index cc273226dbd0..b7e728517284 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c | |||
| @@ -527,9 +527,9 @@ int amba_device_add(struct amba_device *dev, struct resource *parent) | |||
| 527 | if (ret) | 527 | if (ret) |
| 528 | goto err_release; | 528 | goto err_release; |
| 529 | 529 | ||
| 530 | if (dev->irq[0] && dev->irq[0] != NO_IRQ) | 530 | if (dev->irq[0]) |
| 531 | ret = device_create_file(&dev->dev, &dev_attr_irq0); | 531 | ret = device_create_file(&dev->dev, &dev_attr_irq0); |
| 532 | if (ret == 0 && dev->irq[1] && dev->irq[1] != NO_IRQ) | 532 | if (ret == 0 && dev->irq[1]) |
| 533 | ret = device_create_file(&dev->dev, &dev_attr_irq1); | 533 | ret = device_create_file(&dev->dev, &dev_attr_irq1); |
| 534 | if (ret == 0) | 534 | if (ret == 0) |
| 535 | return ret; | 535 | return ret; |
| @@ -543,6 +543,55 @@ int amba_device_add(struct amba_device *dev, struct resource *parent) | |||
| 543 | } | 543 | } |
| 544 | EXPORT_SYMBOL_GPL(amba_device_add); | 544 | EXPORT_SYMBOL_GPL(amba_device_add); |
| 545 | 545 | ||
| 546 | static struct amba_device * | ||
| 547 | amba_aphb_device_add(struct device *parent, const char *name, | ||
| 548 | resource_size_t base, size_t size, int irq1, int irq2, | ||
| 549 | void *pdata, unsigned int periphid, u64 dma_mask) | ||
| 550 | { | ||
| 551 | struct amba_device *dev; | ||
| 552 | int ret; | ||
| 553 | |||
| 554 | dev = amba_device_alloc(name, base, size); | ||
| 555 | if (!dev) | ||
| 556 | return ERR_PTR(-ENOMEM); | ||
| 557 | |||
| 558 | dev->dma_mask = dma_mask; | ||
| 559 | dev->dev.coherent_dma_mask = dma_mask; | ||
| 560 | dev->irq[0] = irq1; | ||
| 561 | dev->irq[1] = irq2; | ||
| 562 | dev->periphid = periphid; | ||
| 563 | dev->dev.platform_data = pdata; | ||
| 564 | dev->dev.parent = parent; | ||
| 565 | |||
| 566 | ret = amba_device_add(dev, &iomem_resource); | ||
| 567 | if (ret) { | ||
| 568 | amba_device_put(dev); | ||
| 569 | return ERR_PTR(ret); | ||
| 570 | } | ||
| 571 | |||
| 572 | return dev; | ||
| 573 | } | ||
| 574 | |||
| 575 | struct amba_device * | ||
| 576 | amba_apb_device_add(struct device *parent, const char *name, | ||
| 577 | resource_size_t base, size_t size, int irq1, int irq2, | ||
| 578 | void *pdata, unsigned int periphid) | ||
| 579 | { | ||
| 580 | return amba_aphb_device_add(parent, name, base, size, irq1, irq2, pdata, | ||
| 581 | periphid, 0); | ||
| 582 | } | ||
| 583 | EXPORT_SYMBOL_GPL(amba_apb_device_add); | ||
| 584 | |||
| 585 | struct amba_device * | ||
| 586 | amba_ahb_device_add(struct device *parent, const char *name, | ||
| 587 | resource_size_t base, size_t size, int irq1, int irq2, | ||
| 588 | void *pdata, unsigned int periphid) | ||
| 589 | { | ||
| 590 | return amba_aphb_device_add(parent, name, base, size, irq1, irq2, pdata, | ||
| 591 | periphid, ~0ULL); | ||
| 592 | } | ||
| 593 | EXPORT_SYMBOL_GPL(amba_ahb_device_add); | ||
| 594 | |||
| 546 | static void amba_device_initialize(struct amba_device *dev, const char *name) | 595 | static void amba_device_initialize(struct amba_device *dev, const char *name) |
| 547 | { | 596 | { |
| 548 | device_initialize(&dev->dev); | 597 | device_initialize(&dev->dev); |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 032b84791a16..b6f38421d541 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
| @@ -94,6 +94,17 @@ static struct variant_data variant_u300 = { | |||
| 94 | .signal_direction = true, | 94 | .signal_direction = true, |
| 95 | }; | 95 | }; |
| 96 | 96 | ||
| 97 | static struct variant_data variant_nomadik = { | ||
| 98 | .fifosize = 16 * 4, | ||
| 99 | .fifohalfsize = 8 * 4, | ||
| 100 | .clkreg = MCI_CLK_ENABLE, | ||
| 101 | .datalength_bits = 24, | ||
| 102 | .sdio = true, | ||
| 103 | .st_clkdiv = true, | ||
| 104 | .pwrreg_powerup = MCI_PWR_ON, | ||
| 105 | .signal_direction = true, | ||
| 106 | }; | ||
| 107 | |||
| 97 | static struct variant_data variant_ux500 = { | 108 | static struct variant_data variant_ux500 = { |
| 98 | .fifosize = 30 * 4, | 109 | .fifosize = 30 * 4, |
| 99 | .fifohalfsize = 8 * 4, | 110 | .fifohalfsize = 8 * 4, |
| @@ -1397,7 +1408,7 @@ static int __devinit mmci_probe(struct amba_device *dev, | |||
| 1397 | if (ret) | 1408 | if (ret) |
| 1398 | goto unmap; | 1409 | goto unmap; |
| 1399 | 1410 | ||
| 1400 | if (dev->irq[1] == NO_IRQ || !dev->irq[1]) | 1411 | if (!dev->irq[1]) |
| 1401 | host->singleirq = true; | 1412 | host->singleirq = true; |
| 1402 | else { | 1413 | else { |
| 1403 | ret = request_irq(dev->irq[1], mmci_pio_irq, IRQF_SHARED, | 1414 | ret = request_irq(dev->irq[1], mmci_pio_irq, IRQF_SHARED, |
| @@ -1569,6 +1580,11 @@ static struct amba_id mmci_ids[] = { | |||
| 1569 | .data = &variant_u300, | 1580 | .data = &variant_u300, |
| 1570 | }, | 1581 | }, |
| 1571 | { | 1582 | { |
| 1583 | .id = 0x10180180, | ||
| 1584 | .mask = 0xf0ffffff, | ||
| 1585 | .data = &variant_nomadik, | ||
| 1586 | }, | ||
| 1587 | { | ||
| 1572 | .id = 0x00280180, | 1588 | .id = 0x00280180, |
| 1573 | .mask = 0x00ffffff, | 1589 | .mask = 0x00ffffff, |
| 1574 | .data = &variant_u300, | 1590 | .data = &variant_u300, |
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index 8d54f79457ba..d36417158d8f 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
| @@ -63,6 +63,14 @@ struct amba_device *amba_device_alloc(const char *, resource_size_t, size_t); | |||
| 63 | void amba_device_put(struct amba_device *); | 63 | void amba_device_put(struct amba_device *); |
| 64 | int amba_device_add(struct amba_device *, struct resource *); | 64 | int amba_device_add(struct amba_device *, struct resource *); |
| 65 | int amba_device_register(struct amba_device *, struct resource *); | 65 | int amba_device_register(struct amba_device *, struct resource *); |
| 66 | struct amba_device *amba_apb_device_add(struct device *parent, const char *name, | ||
| 67 | resource_size_t base, size_t size, | ||
| 68 | int irq1, int irq2, void *pdata, | ||
| 69 | unsigned int periphid); | ||
| 70 | struct amba_device *amba_ahb_device_add(struct device *parent, const char *name, | ||
| 71 | resource_size_t base, size_t size, | ||
| 72 | int irq1, int irq2, void *pdata, | ||
| 73 | unsigned int periphid); | ||
| 66 | void amba_device_unregister(struct amba_device *); | 74 | void amba_device_unregister(struct amba_device *); |
| 67 | struct amba_device *amba_find_device(const char *, struct device *, unsigned int, unsigned int); | 75 | struct amba_device *amba_find_device(const char *, struct device *, unsigned int, unsigned int); |
| 68 | int amba_request_regions(struct amba_device *, const char *); | 76 | int amba_request_regions(struct amba_device *, const char *); |
