diff options
Diffstat (limited to 'arch/arm')
128 files changed, 710 insertions, 1337 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 73067efd4845..9759fec0b704 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -547,6 +547,7 @@ config ARCH_KIRKWOOD | |||
547 | select CPU_FEROCEON | 547 | select CPU_FEROCEON |
548 | select GENERIC_CLOCKEVENTS | 548 | select GENERIC_CLOCKEVENTS |
549 | select PCI | 549 | select PCI |
550 | select PCI_QUIRKS | ||
550 | select PLAT_ORION_LEGACY | 551 | select PLAT_ORION_LEGACY |
551 | help | 552 | help |
552 | Support for the following Marvell Kirkwood series SoCs: | 553 | Support for the following Marvell Kirkwood series SoCs: |
@@ -1603,8 +1604,8 @@ config NR_CPUS | |||
1603 | default "4" | 1604 | default "4" |
1604 | 1605 | ||
1605 | config HOTPLUG_CPU | 1606 | config HOTPLUG_CPU |
1606 | bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" | 1607 | bool "Support for hot-pluggable CPUs" |
1607 | depends on SMP && HOTPLUG && EXPERIMENTAL | 1608 | depends on SMP && HOTPLUG |
1608 | help | 1609 | help |
1609 | Say Y here to experiment with turning CPUs off and on. CPUs | 1610 | Say Y here to experiment with turning CPUs off and on. CPUs |
1610 | can be controlled through /sys/devices/system/cpu. | 1611 | can be controlled through /sys/devices/system/cpu. |
@@ -1645,8 +1646,8 @@ config HZ | |||
1645 | default 100 | 1646 | default 100 |
1646 | 1647 | ||
1647 | config THUMB2_KERNEL | 1648 | config THUMB2_KERNEL |
1648 | bool "Compile the kernel in Thumb-2 mode (EXPERIMENTAL)" | 1649 | bool "Compile the kernel in Thumb-2 mode" |
1649 | depends on CPU_V7 && !CPU_V6 && !CPU_V6K && EXPERIMENTAL | 1650 | depends on CPU_V7 && !CPU_V6 && !CPU_V6K |
1650 | select AEABI | 1651 | select AEABI |
1651 | select ARM_ASM_UNIFIED | 1652 | select ARM_ASM_UNIFIED |
1652 | select ARM_UNWIND | 1653 | select ARM_UNWIND |
@@ -1850,6 +1851,7 @@ config XEN_DOM0 | |||
1850 | config XEN | 1851 | config XEN |
1851 | bool "Xen guest support on ARM (EXPERIMENTAL)" | 1852 | bool "Xen guest support on ARM (EXPERIMENTAL)" |
1852 | depends on EXPERIMENTAL && ARM && OF | 1853 | depends on EXPERIMENTAL && ARM && OF |
1854 | depends on CPU_V7 && !CPU_V6 | ||
1853 | help | 1855 | help |
1854 | Say Y if you want to run Linux in a Virtual Machine on Xen on ARM. | 1856 | Say Y if you want to run Linux in a Virtual Machine on Xen on ARM. |
1855 | 1857 | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index f023e3acdfbd..5f914fca911b 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -21,8 +21,6 @@ endif | |||
21 | OBJCOPYFLAGS :=-O binary -R .comment -S | 21 | OBJCOPYFLAGS :=-O binary -R .comment -S |
22 | GZFLAGS :=-9 | 22 | GZFLAGS :=-9 |
23 | #KBUILD_CFLAGS +=-pipe | 23 | #KBUILD_CFLAGS +=-pipe |
24 | # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: | ||
25 | KBUILD_CFLAGS +=$(call cc-option,-marm,) | ||
26 | 24 | ||
27 | # Never generate .eh_frame | 25 | # Never generate .eh_frame |
28 | KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) | 26 | KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) |
@@ -105,17 +103,20 @@ endif | |||
105 | ifeq ($(CONFIG_THUMB2_KERNEL),y) | 103 | ifeq ($(CONFIG_THUMB2_KERNEL),y) |
106 | AFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it) | 104 | AFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it) |
107 | AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) | 105 | AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) |
108 | CFLAGS_THUMB2 :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN) | 106 | CFLAGS_ISA :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN) |
109 | AFLAGS_THUMB2 :=$(CFLAGS_THUMB2) -Wa$(comma)-mthumb | 107 | AFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb |
110 | # Work around buggy relocation from gas if requested: | 108 | # Work around buggy relocation from gas if requested: |
111 | ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y) | 109 | ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y) |
112 | CFLAGS_MODULE +=-fno-optimize-sibling-calls | 110 | CFLAGS_MODULE +=-fno-optimize-sibling-calls |
113 | endif | 111 | endif |
112 | else | ||
113 | CFLAGS_ISA :=$(call cc-option,-marm,) | ||
114 | AFLAGS_ISA :=$(CFLAGS_ISA) | ||
114 | endif | 115 | endif |
115 | 116 | ||
116 | # Need -Uarm for gcc < 3.x | 117 | # Need -Uarm for gcc < 3.x |
117 | KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_THUMB2) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm | 118 | KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm |
118 | KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_THUMB2) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float | 119 | KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float |
119 | 120 | ||
120 | CHECKFLAGS += -D__arm__ | 121 | CHECKFLAGS += -D__arm__ |
121 | 122 | ||
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index 3fdab016aa5c..9137df539b61 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile | |||
@@ -33,7 +33,7 @@ ifeq ($(CONFIG_XIP_KERNEL),y) | |||
33 | 33 | ||
34 | $(obj)/xipImage: vmlinux FORCE | 34 | $(obj)/xipImage: vmlinux FORCE |
35 | $(call if_changed,objcopy) | 35 | $(call if_changed,objcopy) |
36 | @echo ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))' | 36 | @$(kecho) ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))' |
37 | 37 | ||
38 | $(obj)/Image $(obj)/zImage: FORCE | 38 | $(obj)/Image $(obj)/zImage: FORCE |
39 | @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)' | 39 | @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)' |
@@ -48,14 +48,14 @@ $(obj)/xipImage: FORCE | |||
48 | 48 | ||
49 | $(obj)/Image: vmlinux FORCE | 49 | $(obj)/Image: vmlinux FORCE |
50 | $(call if_changed,objcopy) | 50 | $(call if_changed,objcopy) |
51 | @echo ' Kernel: $@ is ready' | 51 | @$(kecho) ' Kernel: $@ is ready' |
52 | 52 | ||
53 | $(obj)/compressed/vmlinux: $(obj)/Image FORCE | 53 | $(obj)/compressed/vmlinux: $(obj)/Image FORCE |
54 | $(Q)$(MAKE) $(build)=$(obj)/compressed $@ | 54 | $(Q)$(MAKE) $(build)=$(obj)/compressed $@ |
55 | 55 | ||
56 | $(obj)/zImage: $(obj)/compressed/vmlinux FORCE | 56 | $(obj)/zImage: $(obj)/compressed/vmlinux FORCE |
57 | $(call if_changed,objcopy) | 57 | $(call if_changed,objcopy) |
58 | @echo ' Kernel: $@ is ready' | 58 | @$(kecho) ' Kernel: $@ is ready' |
59 | 59 | ||
60 | endif | 60 | endif |
61 | 61 | ||
@@ -90,7 +90,7 @@ fi | |||
90 | $(obj)/uImage: $(obj)/zImage FORCE | 90 | $(obj)/uImage: $(obj)/zImage FORCE |
91 | @$(check_for_multiple_loadaddr) | 91 | @$(check_for_multiple_loadaddr) |
92 | $(call if_changed,uimage) | 92 | $(call if_changed,uimage) |
93 | @echo ' Image $@ is ready' | 93 | @$(kecho) ' Image $@ is ready' |
94 | 94 | ||
95 | $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE | 95 | $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE |
96 | $(Q)$(MAKE) $(build)=$(obj)/bootp $@ | 96 | $(Q)$(MAKE) $(build)=$(obj)/bootp $@ |
@@ -98,7 +98,7 @@ $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE | |||
98 | 98 | ||
99 | $(obj)/bootpImage: $(obj)/bootp/bootp FORCE | 99 | $(obj)/bootpImage: $(obj)/bootp/bootp FORCE |
100 | $(call if_changed,objcopy) | 100 | $(call if_changed,objcopy) |
101 | @echo ' Kernel: $@ is ready' | 101 | @$(kecho) ' Kernel: $@ is ready' |
102 | 102 | ||
103 | PHONY += initrd FORCE | 103 | PHONY += initrd FORCE |
104 | initrd: | 104 | initrd: |
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 90275f036cd1..49ca86e37b8d 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -652,6 +652,15 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size | |||
652 | mov pc, lr | 652 | mov pc, lr |
653 | ENDPROC(__setup_mmu) | 653 | ENDPROC(__setup_mmu) |
654 | 654 | ||
655 | @ Enable unaligned access on v6, to allow better code generation | ||
656 | @ for the decompressor C code: | ||
657 | __armv6_mmu_cache_on: | ||
658 | mrc p15, 0, r0, c1, c0, 0 @ read SCTLR | ||
659 | bic r0, r0, #2 @ A (no unaligned access fault) | ||
660 | orr r0, r0, #1 << 22 @ U (v6 unaligned access model) | ||
661 | mcr p15, 0, r0, c1, c0, 0 @ write SCTLR | ||
662 | b __armv4_mmu_cache_on | ||
663 | |||
655 | __arm926ejs_mmu_cache_on: | 664 | __arm926ejs_mmu_cache_on: |
656 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | 665 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH |
657 | mov r0, #4 @ put dcache in WT mode | 666 | mov r0, #4 @ put dcache in WT mode |
@@ -694,6 +703,9 @@ __armv7_mmu_cache_on: | |||
694 | bic r0, r0, #1 << 28 @ clear SCTLR.TRE | 703 | bic r0, r0, #1 << 28 @ clear SCTLR.TRE |
695 | orr r0, r0, #0x5000 @ I-cache enable, RR cache replacement | 704 | orr r0, r0, #0x5000 @ I-cache enable, RR cache replacement |
696 | orr r0, r0, #0x003c @ write buffer | 705 | orr r0, r0, #0x003c @ write buffer |
706 | bic r0, r0, #2 @ A (no unaligned access fault) | ||
707 | orr r0, r0, #1 << 22 @ U (v6 unaligned access model) | ||
708 | @ (needed for ARM1176) | ||
697 | #ifdef CONFIG_MMU | 709 | #ifdef CONFIG_MMU |
698 | #ifdef CONFIG_CPU_ENDIAN_BE8 | 710 | #ifdef CONFIG_CPU_ENDIAN_BE8 |
699 | orr r0, r0, #1 << 25 @ big-endian page tables | 711 | orr r0, r0, #1 << 25 @ big-endian page tables |
@@ -914,7 +926,7 @@ proc_types: | |||
914 | 926 | ||
915 | .word 0x0007b000 @ ARMv6 | 927 | .word 0x0007b000 @ ARMv6 |
916 | .word 0x000ff000 | 928 | .word 0x000ff000 |
917 | W(b) __armv4_mmu_cache_on | 929 | W(b) __armv6_mmu_cache_on |
918 | W(b) __armv4_mmu_cache_off | 930 | W(b) __armv4_mmu_cache_off |
919 | W(b) __armv6_mmu_cache_flush | 931 | W(b) __armv6_mmu_cache_flush |
920 | 932 | ||
diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi index b06c0db273b1..e6391a4e6649 100644 --- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi +++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi | |||
@@ -126,14 +126,14 @@ | |||
126 | #size-cells = <0>; | 126 | #size-cells = <0>; |
127 | 127 | ||
128 | btn3 { | 128 | btn3 { |
129 | label = "Buttin 3"; | 129 | label = "Button 3"; |
130 | gpios = <&pioA 30 1>; | 130 | gpios = <&pioA 30 1>; |
131 | linux,code = <0x103>; | 131 | linux,code = <0x103>; |
132 | gpio-key,wakeup; | 132 | gpio-key,wakeup; |
133 | }; | 133 | }; |
134 | 134 | ||
135 | btn4 { | 135 | btn4 { |
136 | label = "Buttin 4"; | 136 | label = "Button 4"; |
137 | gpios = <&pioA 31 1>; | 137 | gpios = <&pioA 31 1>; |
138 | linux,code = <0x104>; | 138 | linux,code = <0x104>; |
139 | gpio-key,wakeup; | 139 | gpio-key,wakeup; |
diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi index 748ba7aa746c..4b0e0ca08f40 100644 --- a/arch/arm/boot/dts/dbx5x0.dtsi +++ b/arch/arm/boot/dts/dbx5x0.dtsi | |||
@@ -483,6 +483,8 @@ | |||
483 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; | 483 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; |
484 | reg = <0x80004000 0x1000>; | 484 | reg = <0x80004000 0x1000>; |
485 | interrupts = <0 21 0x4>; | 485 | interrupts = <0 21 0x4>; |
486 | arm,primecell-periphid = <0x180024>; | ||
487 | |||
486 | #address-cells = <1>; | 488 | #address-cells = <1>; |
487 | #size-cells = <0>; | 489 | #size-cells = <0>; |
488 | v-i2c-supply = <&db8500_vape_reg>; | 490 | v-i2c-supply = <&db8500_vape_reg>; |
@@ -494,6 +496,8 @@ | |||
494 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; | 496 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; |
495 | reg = <0x80122000 0x1000>; | 497 | reg = <0x80122000 0x1000>; |
496 | interrupts = <0 22 0x4>; | 498 | interrupts = <0 22 0x4>; |
499 | arm,primecell-periphid = <0x180024>; | ||
500 | |||
497 | #address-cells = <1>; | 501 | #address-cells = <1>; |
498 | #size-cells = <0>; | 502 | #size-cells = <0>; |
499 | v-i2c-supply = <&db8500_vape_reg>; | 503 | v-i2c-supply = <&db8500_vape_reg>; |
@@ -505,6 +509,8 @@ | |||
505 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; | 509 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; |
506 | reg = <0x80128000 0x1000>; | 510 | reg = <0x80128000 0x1000>; |
507 | interrupts = <0 55 0x4>; | 511 | interrupts = <0 55 0x4>; |
512 | arm,primecell-periphid = <0x180024>; | ||
513 | |||
508 | #address-cells = <1>; | 514 | #address-cells = <1>; |
509 | #size-cells = <0>; | 515 | #size-cells = <0>; |
510 | v-i2c-supply = <&db8500_vape_reg>; | 516 | v-i2c-supply = <&db8500_vape_reg>; |
@@ -516,6 +522,8 @@ | |||
516 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; | 522 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; |
517 | reg = <0x80110000 0x1000>; | 523 | reg = <0x80110000 0x1000>; |
518 | interrupts = <0 12 0x4>; | 524 | interrupts = <0 12 0x4>; |
525 | arm,primecell-periphid = <0x180024>; | ||
526 | |||
519 | #address-cells = <1>; | 527 | #address-cells = <1>; |
520 | #size-cells = <0>; | 528 | #size-cells = <0>; |
521 | v-i2c-supply = <&db8500_vape_reg>; | 529 | v-i2c-supply = <&db8500_vape_reg>; |
@@ -527,6 +535,8 @@ | |||
527 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; | 535 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; |
528 | reg = <0x8012a000 0x1000>; | 536 | reg = <0x8012a000 0x1000>; |
529 | interrupts = <0 51 0x4>; | 537 | interrupts = <0 51 0x4>; |
538 | arm,primecell-periphid = <0x180024>; | ||
539 | |||
530 | #address-cells = <1>; | 540 | #address-cells = <1>; |
531 | #size-cells = <0>; | 541 | #size-cells = <0>; |
532 | v-i2c-supply = <&db8500_vape_reg>; | 542 | v-i2c-supply = <&db8500_vape_reg>; |
@@ -573,33 +583,38 @@ | |||
573 | interrupts = <0 60 0x4>; | 583 | interrupts = <0 60 0x4>; |
574 | status = "disabled"; | 584 | status = "disabled"; |
575 | }; | 585 | }; |
586 | |||
576 | sdi@80118000 { | 587 | sdi@80118000 { |
577 | compatible = "arm,pl18x", "arm,primecell"; | 588 | compatible = "arm,pl18x", "arm,primecell"; |
578 | reg = <0x80118000 0x1000>; | 589 | reg = <0x80118000 0x1000>; |
579 | interrupts = <0 50 0x4>; | 590 | interrupts = <0 50 0x4>; |
580 | status = "disabled"; | 591 | status = "disabled"; |
581 | }; | 592 | }; |
593 | |||
582 | sdi@80005000 { | 594 | sdi@80005000 { |
583 | compatible = "arm,pl18x", "arm,primecell"; | 595 | compatible = "arm,pl18x", "arm,primecell"; |
584 | reg = <0x80005000 0x1000>; | 596 | reg = <0x80005000 0x1000>; |
585 | interrupts = <0 41 0x4>; | 597 | interrupts = <0 41 0x4>; |
586 | status = "disabled"; | 598 | status = "disabled"; |
587 | }; | 599 | }; |
600 | |||
588 | sdi@80119000 { | 601 | sdi@80119000 { |
589 | compatible = "arm,pl18x", "arm,primecell"; | 602 | compatible = "arm,pl18x", "arm,primecell"; |
590 | reg = <0x80119000 0x1000>; | 603 | reg = <0x80119000 0x1000>; |
591 | interrupts = <0 59 0x4>; | 604 | interrupts = <0 59 0x4>; |
592 | status = "disabled"; | 605 | status = "disabled"; |
593 | }; | 606 | }; |
607 | |||
594 | sdi@80114000 { | 608 | sdi@80114000 { |
595 | compatible = "arm,pl18x", "arm,primecell"; | 609 | compatible = "arm,pl18x", "arm,primecell"; |
596 | reg = <0x80114000 0x1000>; | 610 | reg = <0x80114000 0x1000>; |
597 | interrupts = <0 99 0x4>; | 611 | interrupts = <0 99 0x4>; |
598 | status = "disabled"; | 612 | status = "disabled"; |
599 | }; | 613 | }; |
614 | |||
600 | sdi@80008000 { | 615 | sdi@80008000 { |
601 | compatible = "arm,pl18x", "arm,primecell"; | 616 | compatible = "arm,pl18x", "arm,primecell"; |
602 | reg = <0x80114000 0x1000>; | 617 | reg = <0x80008000 0x1000>; |
603 | interrupts = <0 100 0x4>; | 618 | interrupts = <0 100 0x4>; |
604 | status = "disabled"; | 619 | status = "disabled"; |
605 | }; | 620 | }; |
diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts index 73567b843e72..a21511c14071 100644 --- a/arch/arm/boot/dts/exynos4210-trats.dts +++ b/arch/arm/boot/dts/exynos4210-trats.dts | |||
@@ -20,8 +20,10 @@ | |||
20 | compatible = "samsung,trats", "samsung,exynos4210"; | 20 | compatible = "samsung,trats", "samsung,exynos4210"; |
21 | 21 | ||
22 | memory { | 22 | memory { |
23 | reg = <0x40000000 0x20000000 | 23 | reg = <0x40000000 0x10000000 |
24 | 0x60000000 0x20000000>; | 24 | 0x50000000 0x10000000 |
25 | 0x60000000 0x10000000 | ||
26 | 0x70000000 0x10000000>; | ||
25 | }; | 27 | }; |
26 | 28 | ||
27 | chosen { | 29 | chosen { |
diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi index 9ca4ca70c1bc..6d31aa383460 100644 --- a/arch/arm/boot/dts/imx23.dtsi +++ b/arch/arm/boot/dts/imx23.dtsi | |||
@@ -69,6 +69,7 @@ | |||
69 | interrupts = <13>, <56>; | 69 | interrupts = <13>, <56>; |
70 | interrupt-names = "gpmi-dma", "bch"; | 70 | interrupt-names = "gpmi-dma", "bch"; |
71 | clocks = <&clks 34>; | 71 | clocks = <&clks 34>; |
72 | clock-names = "gpmi_io"; | ||
72 | fsl,gpmi-dma-channel = <4>; | 73 | fsl,gpmi-dma-channel = <4>; |
73 | status = "disabled"; | 74 | status = "disabled"; |
74 | }; | 75 | }; |
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index e16d63155480..55c57ea6169e 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi | |||
@@ -85,6 +85,7 @@ | |||
85 | interrupts = <88>, <41>; | 85 | interrupts = <88>, <41>; |
86 | interrupt-names = "gpmi-dma", "bch"; | 86 | interrupt-names = "gpmi-dma", "bch"; |
87 | clocks = <&clks 50>; | 87 | clocks = <&clks 50>; |
88 | clock-names = "gpmi_io"; | ||
88 | fsl,gpmi-dma-channel = <4>; | 89 | fsl,gpmi-dma-channel = <4>; |
89 | status = "disabled"; | 90 | status = "disabled"; |
90 | }; | 91 | }; |
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index f38ea8771b44..696e929d0304 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi | |||
@@ -257,7 +257,7 @@ | |||
257 | interrupt-names = "common", "tx", "rx", "sidetone"; | 257 | interrupt-names = "common", "tx", "rx", "sidetone"; |
258 | interrupt-parent = <&intc>; | 258 | interrupt-parent = <&intc>; |
259 | ti,buffer-size = <1280>; | 259 | ti,buffer-size = <1280>; |
260 | ti,hwmods = "mcbsp2"; | 260 | ti,hwmods = "mcbsp2", "mcbsp2_sidetone"; |
261 | }; | 261 | }; |
262 | 262 | ||
263 | mcbsp3: mcbsp@49024000 { | 263 | mcbsp3: mcbsp@49024000 { |
@@ -272,7 +272,7 @@ | |||
272 | interrupt-names = "common", "tx", "rx", "sidetone"; | 272 | interrupt-names = "common", "tx", "rx", "sidetone"; |
273 | interrupt-parent = <&intc>; | 273 | interrupt-parent = <&intc>; |
274 | ti,buffer-size = <128>; | 274 | ti,buffer-size = <128>; |
275 | ti,hwmods = "mcbsp3"; | 275 | ti,hwmods = "mcbsp3", "mcbsp3_sidetone"; |
276 | }; | 276 | }; |
277 | 277 | ||
278 | mcbsp4: mcbsp@49026000 { | 278 | mcbsp4: mcbsp@49026000 { |
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi index b1497c7d7d68..df7f2270fc91 100644 --- a/arch/arm/boot/dts/tegra30.dtsi +++ b/arch/arm/boot/dts/tegra30.dtsi | |||
@@ -73,8 +73,8 @@ | |||
73 | 73 | ||
74 | pinmux: pinmux { | 74 | pinmux: pinmux { |
75 | compatible = "nvidia,tegra30-pinmux"; | 75 | compatible = "nvidia,tegra30-pinmux"; |
76 | reg = <0x70000868 0xd0 /* Pad control registers */ | 76 | reg = <0x70000868 0xd4 /* Pad control registers */ |
77 | 0x70003000 0x3e0>; /* Mux registers */ | 77 | 0x70003000 0x3e4>; /* Mux registers */ |
78 | }; | 78 | }; |
79 | 79 | ||
80 | serial@70006000 { | 80 | serial@70006000 { |
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c index df13a3ffff35..9d2d3ba339ff 100644 --- a/arch/arm/common/timer-sp.c +++ b/arch/arm/common/timer-sp.c | |||
@@ -162,7 +162,6 @@ static struct clock_event_device sp804_clockevent = { | |||
162 | .set_mode = sp804_set_mode, | 162 | .set_mode = sp804_set_mode, |
163 | .set_next_event = sp804_set_next_event, | 163 | .set_next_event = sp804_set_next_event, |
164 | .rating = 300, | 164 | .rating = 300, |
165 | .cpumask = cpu_all_mask, | ||
166 | }; | 165 | }; |
167 | 166 | ||
168 | static struct irqaction sp804_timer_irq = { | 167 | static struct irqaction sp804_timer_irq = { |
@@ -185,6 +184,7 @@ void __init sp804_clockevents_init(void __iomem *base, unsigned int irq, | |||
185 | clkevt_reload = DIV_ROUND_CLOSEST(rate, HZ); | 184 | clkevt_reload = DIV_ROUND_CLOSEST(rate, HZ); |
186 | evt->name = name; | 185 | evt->name = name; |
187 | evt->irq = irq; | 186 | evt->irq = irq; |
187 | evt->cpumask = cpu_possible_mask; | ||
188 | 188 | ||
189 | setup_irq(irq, &sp804_timer_irq); | 189 | setup_irq(irq, &sp804_timer_irq); |
190 | clockevents_config_and_register(evt, rate, 0xf, 0xffffffff); | 190 | clockevents_config_and_register(evt, rate, 0xf, 0xffffffff); |
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 66aa7a6db884..394ded624e37 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig | |||
@@ -139,6 +139,7 @@ CONFIG_I2C_IMX=y | |||
139 | CONFIG_SPI=y | 139 | CONFIG_SPI=y |
140 | CONFIG_SPI_IMX=y | 140 | CONFIG_SPI_IMX=y |
141 | CONFIG_GPIO_SYSFS=y | 141 | CONFIG_GPIO_SYSFS=y |
142 | CONFIG_GPIO_MC9S08DZ60=y | ||
142 | # CONFIG_HWMON is not set | 143 | # CONFIG_HWMON is not set |
143 | CONFIG_WATCHDOG=y | 144 | CONFIG_WATCHDOG=y |
144 | CONFIG_IMX2_WDT=y | 145 | CONFIG_IMX2_WDT=y |
@@ -155,6 +156,7 @@ CONFIG_SOC_CAMERA=y | |||
155 | CONFIG_SOC_CAMERA_OV2640=y | 156 | CONFIG_SOC_CAMERA_OV2640=y |
156 | CONFIG_VIDEO_MX3=y | 157 | CONFIG_VIDEO_MX3=y |
157 | CONFIG_FB=y | 158 | CONFIG_FB=y |
159 | CONFIG_LCD_PLATFORM=y | ||
158 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | 160 | CONFIG_BACKLIGHT_LCD_SUPPORT=y |
159 | CONFIG_LCD_CLASS_DEVICE=y | 161 | CONFIG_LCD_CLASS_DEVICE=y |
160 | CONFIG_LCD_L4F00242T03=y | 162 | CONFIG_LCD_L4F00242T03=y |
diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index 7bcf850eddcd..3458752c4bb2 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_NO_HZ=y | 3 | CONFIG_IRQ_DOMAIN_DEBUG=y |
4 | CONFIG_HIGH_RES_TIMERS=y | 4 | CONFIG_HIGH_RES_TIMERS=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
@@ -9,10 +9,12 @@ CONFIG_SLAB=y | |||
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
11 | CONFIG_ARCH_MVEBU=y | 11 | CONFIG_ARCH_MVEBU=y |
12 | CONFIG_MACH_ARMADA_370_XP=y | 12 | CONFIG_MACH_ARMADA_370=y |
13 | CONFIG_MACH_ARMADA_XP=y | ||
14 | # CONFIG_CACHE_L2X0 is not set | ||
13 | CONFIG_AEABI=y | 15 | CONFIG_AEABI=y |
14 | CONFIG_HIGHMEM=y | 16 | CONFIG_HIGHMEM=y |
15 | CONFIG_USE_OF=y | 17 | # CONFIG_COMPACTION is not set |
16 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 18 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
17 | CONFIG_ZBOOT_ROM_BSS=0x0 | 19 | CONFIG_ZBOOT_ROM_BSS=0x0 |
18 | CONFIG_ARM_APPENDED_DTB=y | 20 | CONFIG_ARM_APPENDED_DTB=y |
@@ -23,6 +25,8 @@ CONFIG_SERIAL_8250_CONSOLE=y | |||
23 | CONFIG_SERIAL_OF_PLATFORM=y | 25 | CONFIG_SERIAL_OF_PLATFORM=y |
24 | CONFIG_GPIOLIB=y | 26 | CONFIG_GPIOLIB=y |
25 | CONFIG_GPIO_SYSFS=y | 27 | CONFIG_GPIO_SYSFS=y |
28 | # CONFIG_USB_SUPPORT is not set | ||
29 | # CONFIG_IOMMU_SUPPORT is not set | ||
26 | CONFIG_EXT2_FS=y | 30 | CONFIG_EXT2_FS=y |
27 | CONFIG_EXT3_FS=y | 31 | CONFIG_EXT3_FS=y |
28 | # CONFIG_EXT3_FS_XATTR is not set | 32 | # CONFIG_EXT3_FS_XATTR is not set |
diff --git a/arch/arm/configs/versatile_defconfig b/arch/arm/configs/versatile_defconfig index cdd4d2bd3962..2ba9e63d0f17 100644 --- a/arch/arm/configs/versatile_defconfig +++ b/arch/arm/configs/versatile_defconfig | |||
@@ -1,3 +1,4 @@ | |||
1 | CONFIG_ARCH_VERSATILE=y | ||
1 | CONFIG_EXPERIMENTAL=y | 2 | CONFIG_EXPERIMENTAL=y |
2 | # CONFIG_LOCALVERSION_AUTO is not set | 3 | # CONFIG_LOCALVERSION_AUTO is not set |
3 | CONFIG_SYSVIPC=y | 4 | CONFIG_SYSVIPC=y |
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 23004847bb05..78d8e9b5544f 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
@@ -91,6 +91,7 @@ static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) | |||
91 | */ | 91 | */ |
92 | static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) | 92 | static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
93 | { | 93 | { |
94 | debug_dma_mapping_error(dev, dma_addr); | ||
94 | return dma_addr == DMA_ERROR_CODE; | 95 | return dma_addr == DMA_ERROR_CODE; |
95 | } | 96 | } |
96 | 97 | ||
diff --git a/arch/arm/include/asm/flat.h b/arch/arm/include/asm/flat.h index 59426a4595c9..e847d23351ed 100644 --- a/arch/arm/include/asm/flat.h +++ b/arch/arm/include/asm/flat.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #define flat_argvp_envp_on_stack() 1 | 8 | #define flat_argvp_envp_on_stack() 1 |
9 | #define flat_old_ram_flag(flags) (flags) | 9 | #define flat_old_ram_flag(flags) (flags) |
10 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) | 10 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) |
11 | #define flat_get_addr_from_rp(rp, relval, flags, persistent) get_unaligned(rp) | 11 | #define flat_get_addr_from_rp(rp, relval, flags, persistent) ((void)persistent,get_unaligned(rp)) |
12 | #define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) | 12 | #define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) |
13 | #define flat_get_relocate_addr(rel) (rel) | 13 | #define flat_get_relocate_addr(rel) (rel) |
14 | #define flat_set_persistent(relval, p) 0 | 14 | #define flat_set_persistent(relval, p) 0 |
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 35c1ed89b936..42f042ee4ada 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -64,7 +64,7 @@ extern void __raw_readsl(const void __iomem *addr, void *data, int longlen); | |||
64 | static inline void __raw_writew(u16 val, volatile void __iomem *addr) | 64 | static inline void __raw_writew(u16 val, volatile void __iomem *addr) |
65 | { | 65 | { |
66 | asm volatile("strh %1, %0" | 66 | asm volatile("strh %1, %0" |
67 | : "+Qo" (*(volatile u16 __force *)addr) | 67 | : "+Q" (*(volatile u16 __force *)addr) |
68 | : "r" (val)); | 68 | : "r" (val)); |
69 | } | 69 | } |
70 | 70 | ||
@@ -72,7 +72,7 @@ static inline u16 __raw_readw(const volatile void __iomem *addr) | |||
72 | { | 72 | { |
73 | u16 val; | 73 | u16 val; |
74 | asm volatile("ldrh %1, %0" | 74 | asm volatile("ldrh %1, %0" |
75 | : "+Qo" (*(volatile u16 __force *)addr), | 75 | : "+Q" (*(volatile u16 __force *)addr), |
76 | "=r" (val)); | 76 | "=r" (val)); |
77 | return val; | 77 | return val; |
78 | } | 78 | } |
diff --git a/arch/arm/include/asm/sched_clock.h b/arch/arm/include/asm/sched_clock.h index 05b8e82ec9f5..e3f757263438 100644 --- a/arch/arm/include/asm/sched_clock.h +++ b/arch/arm/include/asm/sched_clock.h | |||
@@ -10,7 +10,5 @@ | |||
10 | 10 | ||
11 | extern void sched_clock_postinit(void); | 11 | extern void sched_clock_postinit(void); |
12 | extern void setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate); | 12 | extern void setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate); |
13 | extern void setup_sched_clock_needs_suspend(u32 (*read)(void), int bits, | ||
14 | unsigned long rate); | ||
15 | 13 | ||
16 | #endif | 14 | #endif |
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index 77bd79f2ffdb..7e1f76027f66 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -200,8 +200,8 @@ extern int __put_user_8(void *, unsigned long long); | |||
200 | #define USER_DS KERNEL_DS | 200 | #define USER_DS KERNEL_DS |
201 | 201 | ||
202 | #define segment_eq(a,b) (1) | 202 | #define segment_eq(a,b) (1) |
203 | #define __addr_ok(addr) (1) | 203 | #define __addr_ok(addr) ((void)(addr),1) |
204 | #define __range_ok(addr,size) (0) | 204 | #define __range_ok(addr,size) ((void)(addr),0) |
205 | #define get_fs() (KERNEL_DS) | 205 | #define get_fs() (KERNEL_DS) |
206 | 206 | ||
207 | static inline void set_fs(mm_segment_t fs) | 207 | static inline void set_fs(mm_segment_t fs) |
diff --git a/arch/arm/include/asm/vfpmacros.h b/arch/arm/include/asm/vfpmacros.h index 6a6f1e485f41..301c1db3e99b 100644 --- a/arch/arm/include/asm/vfpmacros.h +++ b/arch/arm/include/asm/vfpmacros.h | |||
@@ -27,9 +27,9 @@ | |||
27 | #if __LINUX_ARM_ARCH__ <= 6 | 27 | #if __LINUX_ARM_ARCH__ <= 6 |
28 | ldr \tmp, =elf_hwcap @ may not have MVFR regs | 28 | ldr \tmp, =elf_hwcap @ may not have MVFR regs |
29 | ldr \tmp, [\tmp, #0] | 29 | ldr \tmp, [\tmp, #0] |
30 | tst \tmp, #HWCAP_VFPv3D16 | 30 | tst \tmp, #HWCAP_VFPD32 |
31 | ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} | 31 | ldcnel p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} |
32 | addne \base, \base, #32*4 @ step over unused register space | 32 | addeq \base, \base, #32*4 @ step over unused register space |
33 | #else | 33 | #else |
34 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 | 34 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 |
35 | and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field | 35 | and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field |
@@ -51,9 +51,9 @@ | |||
51 | #if __LINUX_ARM_ARCH__ <= 6 | 51 | #if __LINUX_ARM_ARCH__ <= 6 |
52 | ldr \tmp, =elf_hwcap @ may not have MVFR regs | 52 | ldr \tmp, =elf_hwcap @ may not have MVFR regs |
53 | ldr \tmp, [\tmp, #0] | 53 | ldr \tmp, [\tmp, #0] |
54 | tst \tmp, #HWCAP_VFPv3D16 | 54 | tst \tmp, #HWCAP_VFPD32 |
55 | stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} | 55 | stcnel p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} |
56 | addne \base, \base, #32*4 @ step over unused register space | 56 | addeq \base, \base, #32*4 @ step over unused register space |
57 | #else | 57 | #else |
58 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 | 58 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 |
59 | and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field | 59 | and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field |
diff --git a/arch/arm/include/asm/xen/interface.h b/arch/arm/include/asm/xen/interface.h index ae05e56dd17d..5000397134b4 100644 --- a/arch/arm/include/asm/xen/interface.h +++ b/arch/arm/include/asm/xen/interface.h | |||
@@ -29,16 +29,22 @@ | |||
29 | 29 | ||
30 | #ifndef __ASSEMBLY__ | 30 | #ifndef __ASSEMBLY__ |
31 | /* Explicitly size integers that represent pfns in the interface with | 31 | /* Explicitly size integers that represent pfns in the interface with |
32 | * Xen so that we can have one ABI that works for 32 and 64 bit guests. */ | 32 | * Xen so that we can have one ABI that works for 32 and 64 bit guests. |
33 | * Note that this means that the xen_pfn_t type may be capable of | ||
34 | * representing pfn's which the guest cannot represent in its own pfn | ||
35 | * type. However since pfn space is controlled by the guest this is | ||
36 | * fine since it simply wouldn't be able to create any sure pfns in | ||
37 | * the first place. | ||
38 | */ | ||
33 | typedef uint64_t xen_pfn_t; | 39 | typedef uint64_t xen_pfn_t; |
40 | #define PRI_xen_pfn "llx" | ||
34 | typedef uint64_t xen_ulong_t; | 41 | typedef uint64_t xen_ulong_t; |
42 | #define PRI_xen_ulong "llx" | ||
35 | /* Guest handles for primitive C types. */ | 43 | /* Guest handles for primitive C types. */ |
36 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); | 44 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); |
37 | __DEFINE_GUEST_HANDLE(uint, unsigned int); | 45 | __DEFINE_GUEST_HANDLE(uint, unsigned int); |
38 | __DEFINE_GUEST_HANDLE(ulong, unsigned long); | ||
39 | DEFINE_GUEST_HANDLE(char); | 46 | DEFINE_GUEST_HANDLE(char); |
40 | DEFINE_GUEST_HANDLE(int); | 47 | DEFINE_GUEST_HANDLE(int); |
41 | DEFINE_GUEST_HANDLE(long); | ||
42 | DEFINE_GUEST_HANDLE(void); | 48 | DEFINE_GUEST_HANDLE(void); |
43 | DEFINE_GUEST_HANDLE(uint64_t); | 49 | DEFINE_GUEST_HANDLE(uint64_t); |
44 | DEFINE_GUEST_HANDLE(uint32_t); | 50 | DEFINE_GUEST_HANDLE(uint32_t); |
diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h index 174202318dff..c6b9096cef95 100644 --- a/arch/arm/include/asm/xen/page.h +++ b/arch/arm/include/asm/xen/page.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <xen/interface/grant_table.h> | 10 | #include <xen/interface/grant_table.h> |
11 | 11 | ||
12 | #define pfn_to_mfn(pfn) (pfn) | 12 | #define pfn_to_mfn(pfn) (pfn) |
13 | #define phys_to_machine_mapping_valid (1) | 13 | #define phys_to_machine_mapping_valid(pfn) (1) |
14 | #define mfn_to_pfn(mfn) (mfn) | 14 | #define mfn_to_pfn(mfn) (mfn) |
15 | #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) | 15 | #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) |
16 | 16 | ||
@@ -30,6 +30,8 @@ typedef struct xpaddr { | |||
30 | #define XMADDR(x) ((xmaddr_t) { .maddr = (x) }) | 30 | #define XMADDR(x) ((xmaddr_t) { .maddr = (x) }) |
31 | #define XPADDR(x) ((xpaddr_t) { .paddr = (x) }) | 31 | #define XPADDR(x) ((xpaddr_t) { .paddr = (x) }) |
32 | 32 | ||
33 | #define INVALID_P2M_ENTRY (~0UL) | ||
34 | |||
33 | static inline xmaddr_t phys_to_machine(xpaddr_t phys) | 35 | static inline xmaddr_t phys_to_machine(xpaddr_t phys) |
34 | { | 36 | { |
35 | unsigned offset = phys.paddr & ~PAGE_MASK; | 37 | unsigned offset = phys.paddr & ~PAGE_MASK; |
@@ -74,9 +76,14 @@ static inline int m2p_remove_override(struct page *page, bool clear_pte) | |||
74 | return 0; | 76 | return 0; |
75 | } | 77 | } |
76 | 78 | ||
79 | static inline bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn) | ||
80 | { | ||
81 | BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY); | ||
82 | return true; | ||
83 | } | ||
84 | |||
77 | static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn) | 85 | static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn) |
78 | { | 86 | { |
79 | BUG(); | 87 | return __set_phys_to_machine(pfn, mfn); |
80 | return false; | ||
81 | } | 88 | } |
82 | #endif /* _ASM_ARM_XEN_PAGE_H */ | 89 | #endif /* _ASM_ARM_XEN_PAGE_H */ |
diff --git a/arch/arm/include/debug/8250_32.S b/arch/arm/include/debug/8250_32.S new file mode 100644 index 000000000000..8db01eeabbb4 --- /dev/null +++ b/arch/arm/include/debug/8250_32.S | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011 Picochip Ltd., Jamie Iles | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit | ||
9 | * accesses to the 8250. | ||
10 | */ | ||
11 | |||
12 | #include <linux/serial_reg.h> | ||
13 | |||
14 | .macro senduart,rd,rx | ||
15 | str \rd, [\rx, #UART_TX << UART_SHIFT] | ||
16 | .endm | ||
17 | |||
18 | .macro busyuart,rd,rx | ||
19 | 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
20 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
21 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
22 | bne 1002b | ||
23 | .endm | ||
24 | |||
25 | /* The UART's don't have any flow control IO's wired up. */ | ||
26 | .macro waituart,rd,rx | ||
27 | .endm | ||
diff --git a/arch/arm/include/debug/picoxcell.S b/arch/arm/include/debug/picoxcell.S index 7419deb1b948..bc1f07c49cd4 100644 --- a/arch/arm/include/debug/picoxcell.S +++ b/arch/arm/include/debug/picoxcell.S | |||
@@ -5,10 +5,7 @@ | |||
5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | * | 7 | * |
8 | * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit | ||
9 | * accesses to the 8250. | ||
10 | */ | 8 | */ |
11 | #include <linux/serial_reg.h> | ||
12 | 9 | ||
13 | #define UART_SHIFT 2 | 10 | #define UART_SHIFT 2 |
14 | #define PICOXCELL_UART1_BASE 0x80230000 | 11 | #define PICOXCELL_UART1_BASE 0x80230000 |
@@ -19,17 +16,4 @@ | |||
19 | ldr \rp, =PICOXCELL_UART1_BASE | 16 | ldr \rp, =PICOXCELL_UART1_BASE |
20 | .endm | 17 | .endm |
21 | 18 | ||
22 | .macro senduart,rd,rx | 19 | #include "8250_32.S" |
23 | str \rd, [\rx, #UART_TX << UART_SHIFT] | ||
24 | .endm | ||
25 | |||
26 | .macro busyuart,rd,rx | ||
27 | 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
28 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
29 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
30 | bne 1002b | ||
31 | .endm | ||
32 | |||
33 | /* The UART's don't have any flow control IO's wired up. */ | ||
34 | .macro waituart,rd,rx | ||
35 | .endm | ||
diff --git a/arch/arm/include/debug/socfpga.S b/arch/arm/include/debug/socfpga.S index d6f26d23374f..966b2f994946 100644 --- a/arch/arm/include/debug/socfpga.S +++ b/arch/arm/include/debug/socfpga.S | |||
@@ -7,6 +7,9 @@ | |||
7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define UART_SHIFT 2 | ||
11 | #define DEBUG_LL_UART_OFFSET 0x00002000 | ||
12 | |||
10 | .macro addruart, rp, rv, tmp | 13 | .macro addruart, rp, rv, tmp |
11 | mov \rp, #DEBUG_LL_UART_OFFSET | 14 | mov \rp, #DEBUG_LL_UART_OFFSET |
12 | orr \rp, \rp, #0x00c00000 | 15 | orr \rp, \rp, #0x00c00000 |
@@ -14,3 +17,5 @@ | |||
14 | orr \rp, \rp, #0xff000000 @ physical base | 17 | orr \rp, \rp, #0xff000000 @ physical base |
15 | .endm | 18 | .endm |
16 | 19 | ||
20 | #include "8250_32.S" | ||
21 | |||
diff --git a/arch/arm/include/uapi/asm/hwcap.h b/arch/arm/include/uapi/asm/hwcap.h index f254f6503cce..3688fd15a32d 100644 --- a/arch/arm/include/uapi/asm/hwcap.h +++ b/arch/arm/include/uapi/asm/hwcap.h | |||
@@ -18,11 +18,12 @@ | |||
18 | #define HWCAP_THUMBEE (1 << 11) | 18 | #define HWCAP_THUMBEE (1 << 11) |
19 | #define HWCAP_NEON (1 << 12) | 19 | #define HWCAP_NEON (1 << 12) |
20 | #define HWCAP_VFPv3 (1 << 13) | 20 | #define HWCAP_VFPv3 (1 << 13) |
21 | #define HWCAP_VFPv3D16 (1 << 14) | 21 | #define HWCAP_VFPv3D16 (1 << 14) /* also set for VFPv4-D16 */ |
22 | #define HWCAP_TLS (1 << 15) | 22 | #define HWCAP_TLS (1 << 15) |
23 | #define HWCAP_VFPv4 (1 << 16) | 23 | #define HWCAP_VFPv4 (1 << 16) |
24 | #define HWCAP_IDIVA (1 << 17) | 24 | #define HWCAP_IDIVA (1 << 17) |
25 | #define HWCAP_IDIVT (1 << 18) | 25 | #define HWCAP_IDIVT (1 << 18) |
26 | #define HWCAP_VFPD32 (1 << 19) /* set if VFP has 32 regs (not 16) */ | ||
26 | #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) | 27 | #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) |
27 | 28 | ||
28 | 29 | ||
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 16cedb42c0c3..896165096d6a 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/list.h> | 34 | #include <linux/list.h> |
35 | #include <linux/kallsyms.h> | 35 | #include <linux/kallsyms.h> |
36 | #include <linux/proc_fs.h> | 36 | #include <linux/proc_fs.h> |
37 | #include <linux/export.h> | ||
37 | 38 | ||
38 | #include <asm/exception.h> | 39 | #include <asm/exception.h> |
39 | #include <asm/mach/arch.h> | 40 | #include <asm/mach/arch.h> |
@@ -109,6 +110,7 @@ void set_irq_flags(unsigned int irq, unsigned int iflags) | |||
109 | /* Order is clear bits in "clr" then set bits in "set" */ | 110 | /* Order is clear bits in "clr" then set bits in "set" */ |
110 | irq_modify_status(irq, clr, set & ~clr); | 111 | irq_modify_status(irq, clr, set & ~clr); |
111 | } | 112 | } |
113 | EXPORT_SYMBOL_GPL(set_irq_flags); | ||
112 | 114 | ||
113 | void __init init_IRQ(void) | 115 | void __init init_IRQ(void) |
114 | { | 116 | { |
diff --git a/arch/arm/kernel/kprobes-test-arm.c b/arch/arm/kernel/kprobes-test-arm.c index 38c1a3b103a0..839312905067 100644 --- a/arch/arm/kernel/kprobes-test-arm.c +++ b/arch/arm/kernel/kprobes-test-arm.c | |||
@@ -366,7 +366,9 @@ void kprobe_arm_test_cases(void) | |||
366 | TEST_UNSUPPORTED(".word 0xe04f0392 @ umaal r0, pc, r2, r3") | 366 | TEST_UNSUPPORTED(".word 0xe04f0392 @ umaal r0, pc, r2, r3") |
367 | TEST_UNSUPPORTED(".word 0xe0500090 @ undef") | 367 | TEST_UNSUPPORTED(".word 0xe0500090 @ undef") |
368 | TEST_UNSUPPORTED(".word 0xe05fff9f @ undef") | 368 | TEST_UNSUPPORTED(".word 0xe05fff9f @ undef") |
369 | #endif | ||
369 | 370 | ||
371 | #if __LINUX_ARM_ARCH__ >= 7 | ||
370 | TEST_RRR( "mls r0, r",1, VAL1,", r",2, VAL2,", r",3, VAL3,"") | 372 | TEST_RRR( "mls r0, r",1, VAL1,", r",2, VAL2,", r",3, VAL3,"") |
371 | TEST_RRR( "mlshi r7, r",8, VAL3,", r",9, VAL1,", r",10, VAL2,"") | 373 | TEST_RRR( "mlshi r7, r",8, VAL3,", r",9, VAL1,", r",10, VAL2,"") |
372 | TEST_RR( "mls lr, r",1, VAL2,", r",2, VAL3,", r13") | 374 | TEST_RR( "mls lr, r",1, VAL2,", r",2, VAL3,", r13") |
@@ -456,6 +458,8 @@ void kprobe_arm_test_cases(void) | |||
456 | TEST_UNSUPPORTED(".word 0xe1700090") /* Unallocated space */ | 458 | TEST_UNSUPPORTED(".word 0xe1700090") /* Unallocated space */ |
457 | #if __LINUX_ARM_ARCH__ >= 6 | 459 | #if __LINUX_ARM_ARCH__ >= 6 |
458 | TEST_UNSUPPORTED("ldrex r2, [sp]") | 460 | TEST_UNSUPPORTED("ldrex r2, [sp]") |
461 | #endif | ||
462 | #if (__LINUX_ARM_ARCH__ >= 7) || defined(CONFIG_CPU_32v6K) | ||
459 | TEST_UNSUPPORTED("strexd r0, r2, r3, [sp]") | 463 | TEST_UNSUPPORTED("strexd r0, r2, r3, [sp]") |
460 | TEST_UNSUPPORTED("ldrexd r2, r3, [sp]") | 464 | TEST_UNSUPPORTED("ldrexd r2, r3, [sp]") |
461 | TEST_UNSUPPORTED("strexb r0, r2, [sp]") | 465 | TEST_UNSUPPORTED("strexb r0, r2, [sp]") |
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index e29c3337ca81..8ef8c9337809 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
@@ -45,10 +45,9 @@ int machine_kexec_prepare(struct kimage *image) | |||
45 | for (i = 0; i < image->nr_segments; i++) { | 45 | for (i = 0; i < image->nr_segments; i++) { |
46 | current_segment = &image->segment[i]; | 46 | current_segment = &image->segment[i]; |
47 | 47 | ||
48 | err = memblock_is_region_memory(current_segment->mem, | 48 | if (!memblock_is_region_memory(current_segment->mem, |
49 | current_segment->memsz); | 49 | current_segment->memsz)) |
50 | if (err) | 50 | return -EINVAL; |
51 | return - EINVAL; | ||
52 | 51 | ||
53 | err = get_user(header, (__be32*)current_segment->buf); | 52 | err = get_user(header, (__be32*)current_segment->buf); |
54 | if (err) | 53 | if (err) |
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 93971b1a4f0b..53c0304b734a 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -96,6 +96,10 @@ armpmu_event_set_period(struct perf_event *event, | |||
96 | s64 period = hwc->sample_period; | 96 | s64 period = hwc->sample_period; |
97 | int ret = 0; | 97 | int ret = 0; |
98 | 98 | ||
99 | /* The period may have been changed by PERF_EVENT_IOC_PERIOD */ | ||
100 | if (unlikely(period != hwc->last_period)) | ||
101 | left = period - (hwc->last_period - left); | ||
102 | |||
99 | if (unlikely(left <= -period)) { | 103 | if (unlikely(left <= -period)) { |
100 | left = period; | 104 | left = period; |
101 | local64_set(&hwc->period_left, left); | 105 | local64_set(&hwc->period_left, left); |
diff --git a/arch/arm/kernel/sched_clock.c b/arch/arm/kernel/sched_clock.c index e21bac20d90d..fc6692e2b603 100644 --- a/arch/arm/kernel/sched_clock.c +++ b/arch/arm/kernel/sched_clock.c | |||
@@ -107,13 +107,6 @@ static void sched_clock_poll(unsigned long wrap_ticks) | |||
107 | update_sched_clock(); | 107 | update_sched_clock(); |
108 | } | 108 | } |
109 | 109 | ||
110 | void __init setup_sched_clock_needs_suspend(u32 (*read)(void), int bits, | ||
111 | unsigned long rate) | ||
112 | { | ||
113 | setup_sched_clock(read, bits, rate); | ||
114 | cd.needs_suspend = true; | ||
115 | } | ||
116 | |||
117 | void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate) | 110 | void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate) |
118 | { | 111 | { |
119 | unsigned long r, w; | 112 | unsigned long r, w; |
@@ -189,18 +182,15 @@ void __init sched_clock_postinit(void) | |||
189 | static int sched_clock_suspend(void) | 182 | static int sched_clock_suspend(void) |
190 | { | 183 | { |
191 | sched_clock_poll(sched_clock_timer.data); | 184 | sched_clock_poll(sched_clock_timer.data); |
192 | if (cd.needs_suspend) | 185 | cd.suspended = true; |
193 | cd.suspended = true; | ||
194 | return 0; | 186 | return 0; |
195 | } | 187 | } |
196 | 188 | ||
197 | static void sched_clock_resume(void) | 189 | static void sched_clock_resume(void) |
198 | { | 190 | { |
199 | if (cd.needs_suspend) { | 191 | cd.epoch_cyc = read_sched_clock(); |
200 | cd.epoch_cyc = read_sched_clock(); | 192 | cd.epoch_cyc_copy = cd.epoch_cyc; |
201 | cd.epoch_cyc_copy = cd.epoch_cyc; | 193 | cd.suspended = false; |
202 | cd.suspended = false; | ||
203 | } | ||
204 | } | 194 | } |
205 | 195 | ||
206 | static struct syscore_ops sched_clock_ops = { | 196 | static struct syscore_ops sched_clock_ops = { |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 8e20754dd31d..fbc8b2623d82 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -294,18 +294,24 @@ static void percpu_timer_setup(void); | |||
294 | asmlinkage void __cpuinit secondary_start_kernel(void) | 294 | asmlinkage void __cpuinit secondary_start_kernel(void) |
295 | { | 295 | { |
296 | struct mm_struct *mm = &init_mm; | 296 | struct mm_struct *mm = &init_mm; |
297 | unsigned int cpu = smp_processor_id(); | 297 | unsigned int cpu; |
298 | |||
299 | /* | ||
300 | * The identity mapping is uncached (strongly ordered), so | ||
301 | * switch away from it before attempting any exclusive accesses. | ||
302 | */ | ||
303 | cpu_switch_mm(mm->pgd, mm); | ||
304 | enter_lazy_tlb(mm, current); | ||
305 | local_flush_tlb_all(); | ||
298 | 306 | ||
299 | /* | 307 | /* |
300 | * All kernel threads share the same mm context; grab a | 308 | * All kernel threads share the same mm context; grab a |
301 | * reference and switch to it. | 309 | * reference and switch to it. |
302 | */ | 310 | */ |
311 | cpu = smp_processor_id(); | ||
303 | atomic_inc(&mm->mm_count); | 312 | atomic_inc(&mm->mm_count); |
304 | current->active_mm = mm; | 313 | current->active_mm = mm; |
305 | cpumask_set_cpu(cpu, mm_cpumask(mm)); | 314 | cpumask_set_cpu(cpu, mm_cpumask(mm)); |
306 | cpu_switch_mm(mm->pgd, mm); | ||
307 | enter_lazy_tlb(mm, current); | ||
308 | local_flush_tlb_all(); | ||
309 | 315 | ||
310 | printk("CPU%u: Booted secondary processor\n", cpu); | 316 | printk("CPU%u: Booted secondary processor\n", cpu); |
311 | 317 | ||
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index e1f906989bb8..b22d700fea27 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -42,10 +42,10 @@ static void twd_set_mode(enum clock_event_mode mode, | |||
42 | 42 | ||
43 | switch (mode) { | 43 | switch (mode) { |
44 | case CLOCK_EVT_MODE_PERIODIC: | 44 | case CLOCK_EVT_MODE_PERIODIC: |
45 | /* timer load already set up */ | ||
46 | ctrl = TWD_TIMER_CONTROL_ENABLE | TWD_TIMER_CONTROL_IT_ENABLE | 45 | ctrl = TWD_TIMER_CONTROL_ENABLE | TWD_TIMER_CONTROL_IT_ENABLE |
47 | | TWD_TIMER_CONTROL_PERIODIC; | 46 | | TWD_TIMER_CONTROL_PERIODIC; |
48 | __raw_writel(twd_timer_rate / HZ, twd_base + TWD_TIMER_LOAD); | 47 | __raw_writel(DIV_ROUND_CLOSEST(twd_timer_rate, HZ), |
48 | twd_base + TWD_TIMER_LOAD); | ||
49 | break; | 49 | break; |
50 | case CLOCK_EVT_MODE_ONESHOT: | 50 | case CLOCK_EVT_MODE_ONESHOT: |
51 | /* period set, and timer enabled in 'next_event' hook */ | 51 | /* period set, and timer enabled in 'next_event' hook */ |
diff --git a/arch/arm/lib/delay.c b/arch/arm/lib/delay.c index 9d0a30032d7f..0dc53854a5d8 100644 --- a/arch/arm/lib/delay.c +++ b/arch/arm/lib/delay.c | |||
@@ -45,6 +45,7 @@ int read_current_timer(unsigned long *timer_val) | |||
45 | *timer_val = delay_timer->read_current_timer(); | 45 | *timer_val = delay_timer->read_current_timer(); |
46 | return 0; | 46 | return 0; |
47 | } | 47 | } |
48 | EXPORT_SYMBOL_GPL(read_current_timer); | ||
48 | 49 | ||
49 | static void __timer_delay(unsigned long cycles) | 50 | static void __timer_delay(unsigned long cycles) |
50 | { | 51 | { |
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index b14207101938..043624219b55 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -21,19 +21,13 @@ config SOC_AT91SAM9 | |||
21 | bool | 21 | bool |
22 | select CPU_ARM926T | 22 | select CPU_ARM926T |
23 | select GENERIC_CLOCKEVENTS | 23 | select GENERIC_CLOCKEVENTS |
24 | select MULTI_IRQ_HANDLER | ||
25 | select SPARSE_IRQ | ||
24 | 26 | ||
25 | menu "Atmel AT91 System-on-Chip" | 27 | menu "Atmel AT91 System-on-Chip" |
26 | 28 | ||
27 | comment "Atmel AT91 Processor" | 29 | comment "Atmel AT91 Processor" |
28 | 30 | ||
29 | config SOC_AT91SAM9 | ||
30 | bool | ||
31 | select AT91_SAM9_SMC | ||
32 | select AT91_SAM9_TIME | ||
33 | select CPU_ARM926T | ||
34 | select MULTI_IRQ_HANDLER | ||
35 | select SPARSE_IRQ | ||
36 | |||
37 | config SOC_AT91RM9200 | 31 | config SOC_AT91RM9200 |
38 | bool "AT91RM9200" | 32 | bool "AT91RM9200" |
39 | select CPU_ARM920T | 33 | select CPU_ARM920T |
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index b4f0565aff63..5269825194a8 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c | |||
@@ -187,7 +187,7 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
187 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), | 187 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), |
188 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), | 188 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), |
189 | CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), | 189 | CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), |
190 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91rm9200", &twi_clk), | 190 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91rm9200.0", &twi_clk), |
191 | /* fake hclk clock */ | 191 | /* fake hclk clock */ |
192 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), | 192 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), |
193 | CLKDEV_CON_ID("pioA", &pioA_clk), | 193 | CLKDEV_CON_ID("pioA", &pioA_clk), |
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index a563189cdfc3..3cee0e6ea7c3 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c | |||
@@ -68,7 +68,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) | |||
68 | 68 | ||
69 | /* Enable overcurrent notification */ | 69 | /* Enable overcurrent notification */ |
70 | for (i = 0; i < data->ports; i++) { | 70 | for (i = 0; i < data->ports; i++) { |
71 | if (data->overcurrent_pin[i]) | 71 | if (gpio_is_valid(data->overcurrent_pin[i])) |
72 | at91_set_gpio_input(data->overcurrent_pin[i], 1); | 72 | at91_set_gpio_input(data->overcurrent_pin[i], 1); |
73 | } | 73 | } |
74 | 74 | ||
@@ -479,7 +479,7 @@ static struct i2c_gpio_platform_data pdata = { | |||
479 | 479 | ||
480 | static struct platform_device at91rm9200_twi_device = { | 480 | static struct platform_device at91rm9200_twi_device = { |
481 | .name = "i2c-gpio", | 481 | .name = "i2c-gpio", |
482 | .id = -1, | 482 | .id = 0, |
483 | .dev.platform_data = &pdata, | 483 | .dev.platform_data = &pdata, |
484 | }; | 484 | }; |
485 | 485 | ||
@@ -512,7 +512,7 @@ static struct resource twi_resources[] = { | |||
512 | 512 | ||
513 | static struct platform_device at91rm9200_twi_device = { | 513 | static struct platform_device at91rm9200_twi_device = { |
514 | .name = "i2c-at91rm9200", | 514 | .name = "i2c-at91rm9200", |
515 | .id = -1, | 515 | .id = 0, |
516 | .resource = twi_resources, | 516 | .resource = twi_resources, |
517 | .num_resources = ARRAY_SIZE(twi_resources), | 517 | .num_resources = ARRAY_SIZE(twi_resources), |
518 | }; | 518 | }; |
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index ad29f93f20ca..f8202615f4a8 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c | |||
@@ -211,8 +211,8 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
211 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk), | 211 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk), |
212 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk), | 212 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk), |
213 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk), | 213 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk), |
214 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260", &twi_clk), | 214 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260.0", &twi_clk), |
215 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20", &twi_clk), | 215 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.0", &twi_clk), |
216 | /* more usart lookup table for DT entries */ | 216 | /* more usart lookup table for DT entries */ |
217 | CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck), | 217 | CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck), |
218 | CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk), | 218 | CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk), |
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index a76b8684f52d..414bd855fb0c 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -72,7 +72,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) | |||
72 | 72 | ||
73 | /* Enable overcurrent notification */ | 73 | /* Enable overcurrent notification */ |
74 | for (i = 0; i < data->ports; i++) { | 74 | for (i = 0; i < data->ports; i++) { |
75 | if (data->overcurrent_pin[i]) | 75 | if (gpio_is_valid(data->overcurrent_pin[i])) |
76 | at91_set_gpio_input(data->overcurrent_pin[i], 1); | 76 | at91_set_gpio_input(data->overcurrent_pin[i], 1); |
77 | } | 77 | } |
78 | 78 | ||
@@ -389,7 +389,7 @@ static struct i2c_gpio_platform_data pdata = { | |||
389 | 389 | ||
390 | static struct platform_device at91sam9260_twi_device = { | 390 | static struct platform_device at91sam9260_twi_device = { |
391 | .name = "i2c-gpio", | 391 | .name = "i2c-gpio", |
392 | .id = -1, | 392 | .id = 0, |
393 | .dev.platform_data = &pdata, | 393 | .dev.platform_data = &pdata, |
394 | }; | 394 | }; |
395 | 395 | ||
@@ -421,7 +421,7 @@ static struct resource twi_resources[] = { | |||
421 | }; | 421 | }; |
422 | 422 | ||
423 | static struct platform_device at91sam9260_twi_device = { | 423 | static struct platform_device at91sam9260_twi_device = { |
424 | .id = -1, | 424 | .id = 0, |
425 | .resource = twi_resources, | 425 | .resource = twi_resources, |
426 | .num_resources = ARRAY_SIZE(twi_resources), | 426 | .num_resources = ARRAY_SIZE(twi_resources), |
427 | }; | 427 | }; |
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index 8d999eb1a137..04295c04b3e0 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -178,8 +178,8 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
178 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), | 178 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), |
179 | CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), | 179 | CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), |
180 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &hck0), | 180 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &hck0), |
181 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9261", &twi_clk), | 181 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9261.0", &twi_clk), |
182 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10", &twi_clk), | 182 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.0", &twi_clk), |
183 | CLKDEV_CON_ID("pioA", &pioA_clk), | 183 | CLKDEV_CON_ID("pioA", &pioA_clk), |
184 | CLKDEV_CON_ID("pioB", &pioB_clk), | 184 | CLKDEV_CON_ID("pioB", &pioB_clk), |
185 | CLKDEV_CON_ID("pioC", &pioC_clk), | 185 | CLKDEV_CON_ID("pioC", &pioC_clk), |
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 9752f17efba9..cd604aad8e96 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -72,7 +72,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) | |||
72 | 72 | ||
73 | /* Enable overcurrent notification */ | 73 | /* Enable overcurrent notification */ |
74 | for (i = 0; i < data->ports; i++) { | 74 | for (i = 0; i < data->ports; i++) { |
75 | if (data->overcurrent_pin[i]) | 75 | if (gpio_is_valid(data->overcurrent_pin[i])) |
76 | at91_set_gpio_input(data->overcurrent_pin[i], 1); | 76 | at91_set_gpio_input(data->overcurrent_pin[i], 1); |
77 | } | 77 | } |
78 | 78 | ||
@@ -285,7 +285,7 @@ static struct i2c_gpio_platform_data pdata = { | |||
285 | 285 | ||
286 | static struct platform_device at91sam9261_twi_device = { | 286 | static struct platform_device at91sam9261_twi_device = { |
287 | .name = "i2c-gpio", | 287 | .name = "i2c-gpio", |
288 | .id = -1, | 288 | .id = 0, |
289 | .dev.platform_data = &pdata, | 289 | .dev.platform_data = &pdata, |
290 | }; | 290 | }; |
291 | 291 | ||
@@ -317,7 +317,7 @@ static struct resource twi_resources[] = { | |||
317 | }; | 317 | }; |
318 | 318 | ||
319 | static struct platform_device at91sam9261_twi_device = { | 319 | static struct platform_device at91sam9261_twi_device = { |
320 | .id = -1, | 320 | .id = 0, |
321 | .resource = twi_resources, | 321 | .resource = twi_resources, |
322 | .num_resources = ARRAY_SIZE(twi_resources), | 322 | .num_resources = ARRAY_SIZE(twi_resources), |
323 | }; | 323 | }; |
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index 6a01d0360dfb..d6f9c23927c4 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -193,7 +193,7 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
193 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk), | 193 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk), |
194 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), | 194 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), |
195 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk), | 195 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk), |
196 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260", &twi_clk), | 196 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260.0", &twi_clk), |
197 | /* fake hclk clock */ | 197 | /* fake hclk clock */ |
198 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), | 198 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), |
199 | CLKDEV_CON_ID("pioA", &pioA_clk), | 199 | CLKDEV_CON_ID("pioA", &pioA_clk), |
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index 8dde220b42b6..9c61e59a2104 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -78,7 +78,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) | |||
78 | 78 | ||
79 | /* Enable overcurrent notification */ | 79 | /* Enable overcurrent notification */ |
80 | for (i = 0; i < data->ports; i++) { | 80 | for (i = 0; i < data->ports; i++) { |
81 | if (data->overcurrent_pin[i]) | 81 | if (gpio_is_valid(data->overcurrent_pin[i])) |
82 | at91_set_gpio_input(data->overcurrent_pin[i], 1); | 82 | at91_set_gpio_input(data->overcurrent_pin[i], 1); |
83 | } | 83 | } |
84 | 84 | ||
@@ -567,7 +567,7 @@ static struct i2c_gpio_platform_data pdata = { | |||
567 | 567 | ||
568 | static struct platform_device at91sam9263_twi_device = { | 568 | static struct platform_device at91sam9263_twi_device = { |
569 | .name = "i2c-gpio", | 569 | .name = "i2c-gpio", |
570 | .id = -1, | 570 | .id = 0, |
571 | .dev.platform_data = &pdata, | 571 | .dev.platform_data = &pdata, |
572 | }; | 572 | }; |
573 | 573 | ||
@@ -600,7 +600,7 @@ static struct resource twi_resources[] = { | |||
600 | 600 | ||
601 | static struct platform_device at91sam9263_twi_device = { | 601 | static struct platform_device at91sam9263_twi_device = { |
602 | .name = "i2c-at91sam9260", | 602 | .name = "i2c-at91sam9260", |
603 | .id = -1, | 603 | .id = 0, |
604 | .resource = twi_resources, | 604 | .resource = twi_resources, |
605 | .num_resources = ARRAY_SIZE(twi_resources), | 605 | .num_resources = ARRAY_SIZE(twi_resources), |
606 | }; | 606 | }; |
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index b1596072dcc2..fcd233cb33d2 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -1841,8 +1841,8 @@ static struct resource sha_resources[] = { | |||
1841 | .flags = IORESOURCE_MEM, | 1841 | .flags = IORESOURCE_MEM, |
1842 | }, | 1842 | }, |
1843 | [1] = { | 1843 | [1] = { |
1844 | .start = AT91SAM9G45_ID_AESTDESSHA, | 1844 | .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, |
1845 | .end = AT91SAM9G45_ID_AESTDESSHA, | 1845 | .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, |
1846 | .flags = IORESOURCE_IRQ, | 1846 | .flags = IORESOURCE_IRQ, |
1847 | }, | 1847 | }, |
1848 | }; | 1848 | }; |
@@ -1874,8 +1874,8 @@ static struct resource tdes_resources[] = { | |||
1874 | .flags = IORESOURCE_MEM, | 1874 | .flags = IORESOURCE_MEM, |
1875 | }, | 1875 | }, |
1876 | [1] = { | 1876 | [1] = { |
1877 | .start = AT91SAM9G45_ID_AESTDESSHA, | 1877 | .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, |
1878 | .end = AT91SAM9G45_ID_AESTDESSHA, | 1878 | .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, |
1879 | .flags = IORESOURCE_IRQ, | 1879 | .flags = IORESOURCE_IRQ, |
1880 | }, | 1880 | }, |
1881 | }; | 1881 | }; |
@@ -1910,8 +1910,8 @@ static struct resource aes_resources[] = { | |||
1910 | .flags = IORESOURCE_MEM, | 1910 | .flags = IORESOURCE_MEM, |
1911 | }, | 1911 | }, |
1912 | [1] = { | 1912 | [1] = { |
1913 | .start = AT91SAM9G45_ID_AESTDESSHA, | 1913 | .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, |
1914 | .end = AT91SAM9G45_ID_AESTDESSHA, | 1914 | .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, |
1915 | .flags = IORESOURCE_IRQ, | 1915 | .flags = IORESOURCE_IRQ, |
1916 | }, | 1916 | }, |
1917 | }; | 1917 | }; |
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index d6ca0543ce8d..5047bdc92adf 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -314,7 +314,7 @@ static struct i2c_gpio_platform_data pdata = { | |||
314 | 314 | ||
315 | static struct platform_device at91sam9rl_twi_device = { | 315 | static struct platform_device at91sam9rl_twi_device = { |
316 | .name = "i2c-gpio", | 316 | .name = "i2c-gpio", |
317 | .id = -1, | 317 | .id = 0, |
318 | .dev.platform_data = &pdata, | 318 | .dev.platform_data = &pdata, |
319 | }; | 319 | }; |
320 | 320 | ||
@@ -347,7 +347,7 @@ static struct resource twi_resources[] = { | |||
347 | 347 | ||
348 | static struct platform_device at91sam9rl_twi_device = { | 348 | static struct platform_device at91sam9rl_twi_device = { |
349 | .name = "i2c-at91sam9g20", | 349 | .name = "i2c-at91sam9g20", |
350 | .id = -1, | 350 | .id = 0, |
351 | .resource = twi_resources, | 351 | .resource = twi_resources, |
352 | .num_resources = ARRAY_SIZE(twi_resources), | 352 | .num_resources = ARRAY_SIZE(twi_resources), |
353 | }; | 353 | }; |
diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c index 6bd7300a2bc5..bb7f54474b92 100644 --- a/arch/arm/mach-at91/at91x40.c +++ b/arch/arm/mach-at91/at91x40.c | |||
@@ -88,6 +88,6 @@ void __init at91x40_init_interrupts(unsigned int priority[NR_AIC_IRQS]) | |||
88 | if (!priority) | 88 | if (!priority) |
89 | priority = at91x40_default_irq_priority; | 89 | priority = at91x40_default_irq_priority; |
90 | 90 | ||
91 | at91_aic_init(priority); | 91 | at91_aic_init(priority, at91_extern_irq); |
92 | } | 92 | } |
93 | 93 | ||
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c index 9cda3fd346ae..6960778af4c2 100644 --- a/arch/arm/mach-at91/board-neocore926.c +++ b/arch/arm/mach-at91/board-neocore926.c | |||
@@ -129,7 +129,7 @@ static struct spi_board_info neocore926_spi_devices[] = { | |||
129 | .max_speed_hz = 125000 * 16, | 129 | .max_speed_hz = 125000 * 16, |
130 | .bus_num = 0, | 130 | .bus_num = 0, |
131 | .platform_data = &ads_info, | 131 | .platform_data = &ads_info, |
132 | .irq = AT91SAM9263_ID_IRQ1, | 132 | .irq = NR_IRQS_LEGACY + AT91SAM9263_ID_IRQ1, |
133 | }, | 133 | }, |
134 | #endif | 134 | #endif |
135 | }; | 135 | }; |
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index 27b3af1a3047..a9167dd45f96 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c | |||
@@ -309,7 +309,7 @@ static struct spi_board_info ek_spi_devices[] = { | |||
309 | .max_speed_hz = 125000 * 26, /* (max sample rate @ 3V) * (cmd + data + overhead) */ | 309 | .max_speed_hz = 125000 * 26, /* (max sample rate @ 3V) * (cmd + data + overhead) */ |
310 | .bus_num = 0, | 310 | .bus_num = 0, |
311 | .platform_data = &ads_info, | 311 | .platform_data = &ads_info, |
312 | .irq = AT91SAM9261_ID_IRQ0, | 312 | .irq = NR_IRQS_LEGACY + AT91SAM9261_ID_IRQ0, |
313 | .controller_data = (void *) AT91_PIN_PA28, /* CS pin */ | 313 | .controller_data = (void *) AT91_PIN_PA28, /* CS pin */ |
314 | }, | 314 | }, |
315 | #endif | 315 | #endif |
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index 073e17403d98..b87dbe2be0d6 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c | |||
@@ -132,7 +132,7 @@ static struct spi_board_info ek_spi_devices[] = { | |||
132 | .max_speed_hz = 125000 * 26, /* (max sample rate @ 3V) * (cmd + data + overhead) */ | 132 | .max_speed_hz = 125000 * 26, /* (max sample rate @ 3V) * (cmd + data + overhead) */ |
133 | .bus_num = 0, | 133 | .bus_num = 0, |
134 | .platform_data = &ads_info, | 134 | .platform_data = &ads_info, |
135 | .irq = AT91SAM9263_ID_IRQ1, | 135 | .irq = NR_IRQS_LEGACY + AT91SAM9263_ID_IRQ1, |
136 | }, | 136 | }, |
137 | #endif | 137 | #endif |
138 | }; | 138 | }; |
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index f49650677653..b62f560e6c75 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -26,7 +26,8 @@ extern void __init at91_dt_initialize(void); | |||
26 | extern void __init at91_init_irq_default(void); | 26 | extern void __init at91_init_irq_default(void); |
27 | extern void __init at91_init_interrupts(unsigned int priority[]); | 27 | extern void __init at91_init_interrupts(unsigned int priority[]); |
28 | extern void __init at91x40_init_interrupts(unsigned int priority[]); | 28 | extern void __init at91x40_init_interrupts(unsigned int priority[]); |
29 | extern void __init at91_aic_init(unsigned int priority[]); | 29 | extern void __init at91_aic_init(unsigned int priority[], |
30 | unsigned int ext_irq_mask); | ||
30 | extern int __init at91_aic_of_init(struct device_node *node, | 31 | extern int __init at91_aic_of_init(struct device_node *node, |
31 | struct device_node *parent); | 32 | struct device_node *parent); |
32 | extern int __init at91_aic5_of_init(struct device_node *node, | 33 | extern int __init at91_aic5_of_init(struct device_node *node, |
diff --git a/arch/arm/mach-at91/irq.c b/arch/arm/mach-at91/irq.c index 1e02c0e49dcc..febc2ee901a5 100644 --- a/arch/arm/mach-at91/irq.c +++ b/arch/arm/mach-at91/irq.c | |||
@@ -502,14 +502,19 @@ int __init at91_aic5_of_init(struct device_node *node, | |||
502 | /* | 502 | /* |
503 | * Initialize the AIC interrupt controller. | 503 | * Initialize the AIC interrupt controller. |
504 | */ | 504 | */ |
505 | void __init at91_aic_init(unsigned int *priority) | 505 | void __init at91_aic_init(unsigned int *priority, unsigned int ext_irq_mask) |
506 | { | 506 | { |
507 | unsigned int i; | 507 | unsigned int i; |
508 | int irq_base; | 508 | int irq_base; |
509 | 509 | ||
510 | if (at91_aic_pm_init()) | 510 | at91_extern_irq = kzalloc(BITS_TO_LONGS(n_irqs) |
511 | * sizeof(*at91_extern_irq), GFP_KERNEL); | ||
512 | |||
513 | if (at91_aic_pm_init() || at91_extern_irq == NULL) | ||
511 | panic("Unable to allocate bit maps\n"); | 514 | panic("Unable to allocate bit maps\n"); |
512 | 515 | ||
516 | *at91_extern_irq = ext_irq_mask; | ||
517 | |||
513 | at91_aic_base = ioremap(AT91_AIC, 512); | 518 | at91_aic_base = ioremap(AT91_AIC, 512); |
514 | if (!at91_aic_base) | 519 | if (!at91_aic_base) |
515 | panic("Unable to ioremap AIC registers\n"); | 520 | panic("Unable to ioremap AIC registers\n"); |
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index da9881b161e1..0b32c81730a5 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c | |||
@@ -47,7 +47,7 @@ void __init at91_init_irq_default(void) | |||
47 | void __init at91_init_interrupts(unsigned int *priority) | 47 | void __init at91_init_interrupts(unsigned int *priority) |
48 | { | 48 | { |
49 | /* Initialize the AIC interrupt controller */ | 49 | /* Initialize the AIC interrupt controller */ |
50 | at91_aic_init(priority); | 50 | at91_aic_init(priority, at91_extern_irq); |
51 | 51 | ||
52 | /* Enable GPIO interrupts */ | 52 | /* Enable GPIO interrupts */ |
53 | at91_gpio_irq_setup(); | 53 | at91_gpio_irq_setup(); |
@@ -151,7 +151,7 @@ static void __init soc_detect(u32 dbgu_base) | |||
151 | } | 151 | } |
152 | 152 | ||
153 | /* at91sam9g10 */ | 153 | /* at91sam9g10 */ |
154 | if ((cidr & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) { | 154 | if ((socid & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) { |
155 | at91_soc_initdata.type = AT91_SOC_SAM9G10; | 155 | at91_soc_initdata.type = AT91_SOC_SAM9G10; |
156 | at91_boot_soc = at91sam9261_soc; | 156 | at91_boot_soc = at91sam9261_soc; |
157 | } | 157 | } |
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index cd0c8b1e1ecf..14e9947bad6e 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
@@ -713,8 +713,7 @@ static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type, | |||
713 | break; | 713 | break; |
714 | case VPBE_ENC_CUSTOM_TIMINGS: | 714 | case VPBE_ENC_CUSTOM_TIMINGS: |
715 | if (pclock <= 27000000) { | 715 | if (pclock <= 27000000) { |
716 | v |= DM644X_VPSS_MUXSEL_PLL2_MODE | | 716 | v |= DM644X_VPSS_DACCLKEN; |
717 | DM644X_VPSS_DACCLKEN; | ||
718 | writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); | 717 | writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); |
719 | } else { | 718 | } else { |
720 | /* | 719 | /* |
diff --git a/arch/arm/mach-dove/include/mach/pm.h b/arch/arm/mach-dove/include/mach/pm.h index 7bcd0dfce4b1..b47f75038686 100644 --- a/arch/arm/mach-dove/include/mach/pm.h +++ b/arch/arm/mach-dove/include/mach/pm.h | |||
@@ -63,7 +63,7 @@ static inline int pmu_to_irq(int pin) | |||
63 | 63 | ||
64 | static inline int irq_to_pmu(int irq) | 64 | static inline int irq_to_pmu(int irq) |
65 | { | 65 | { |
66 | if (IRQ_DOVE_PMU_START < irq && irq < NR_IRQS) | 66 | if (IRQ_DOVE_PMU_START <= irq && irq < NR_IRQS) |
67 | return irq - IRQ_DOVE_PMU_START; | 67 | return irq - IRQ_DOVE_PMU_START; |
68 | 68 | ||
69 | return -EINVAL; | 69 | return -EINVAL; |
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c index 087711524e8a..bc4344aa1009 100644 --- a/arch/arm/mach-dove/irq.c +++ b/arch/arm/mach-dove/irq.c | |||
@@ -46,8 +46,20 @@ static void pmu_irq_ack(struct irq_data *d) | |||
46 | int pin = irq_to_pmu(d->irq); | 46 | int pin = irq_to_pmu(d->irq); |
47 | u32 u; | 47 | u32 u; |
48 | 48 | ||
49 | /* | ||
50 | * The PMU mask register is not RW0C: it is RW. This means that | ||
51 | * the bits take whatever value is written to them; if you write | ||
52 | * a '1', you will set the interrupt. | ||
53 | * | ||
54 | * Unfortunately this means there is NO race free way to clear | ||
55 | * these interrupts. | ||
56 | * | ||
57 | * So, let's structure the code so that the window is as small as | ||
58 | * possible. | ||
59 | */ | ||
49 | u = ~(1 << (pin & 31)); | 60 | u = ~(1 << (pin & 31)); |
50 | writel(u, PMU_INTERRUPT_CAUSE); | 61 | u &= readl_relaxed(PMU_INTERRUPT_CAUSE); |
62 | writel_relaxed(u, PMU_INTERRUPT_CAUSE); | ||
51 | } | 63 | } |
52 | 64 | ||
53 | static struct irq_chip pmu_irq_chip = { | 65 | static struct irq_chip pmu_irq_chip = { |
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 715b690e5009..1947be8e5f5b 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <plat/fimc-core.h> | 47 | #include <plat/fimc-core.h> |
48 | #include <plat/iic-core.h> | 48 | #include <plat/iic-core.h> |
49 | #include <plat/tv-core.h> | 49 | #include <plat/tv-core.h> |
50 | #include <plat/spi-core.h> | ||
50 | #include <plat/regs-serial.h> | 51 | #include <plat/regs-serial.h> |
51 | 52 | ||
52 | #include "common.h" | 53 | #include "common.h" |
@@ -346,6 +347,8 @@ static void __init exynos4_map_io(void) | |||
346 | 347 | ||
347 | s5p_fb_setname(0, "exynos4-fb"); | 348 | s5p_fb_setname(0, "exynos4-fb"); |
348 | s5p_hdmi_setname("exynos4-hdmi"); | 349 | s5p_hdmi_setname("exynos4-hdmi"); |
350 | |||
351 | s3c64xx_spi_setname("exynos4210-spi"); | ||
349 | } | 352 | } |
350 | 353 | ||
351 | static void __init exynos5_map_io(void) | 354 | static void __init exynos5_map_io(void) |
@@ -366,6 +369,8 @@ static void __init exynos5_map_io(void) | |||
366 | s3c_i2c0_setname("s3c2440-i2c"); | 369 | s3c_i2c0_setname("s3c2440-i2c"); |
367 | s3c_i2c1_setname("s3c2440-i2c"); | 370 | s3c_i2c1_setname("s3c2440-i2c"); |
368 | s3c_i2c2_setname("s3c2440-i2c"); | 371 | s3c_i2c2_setname("s3c2440-i2c"); |
372 | |||
373 | s3c64xx_spi_setname("exynos4210-spi"); | ||
369 | } | 374 | } |
370 | 375 | ||
371 | static void __init exynos4_init_clocks(int xtal) | 376 | static void __init exynos4_init_clocks(int xtal) |
diff --git a/arch/arm/mach-exynos/dma.c b/arch/arm/mach-exynos/dma.c index 21d568b3b149..87e07d6fc615 100644 --- a/arch/arm/mach-exynos/dma.c +++ b/arch/arm/mach-exynos/dma.c | |||
@@ -275,6 +275,9 @@ static int __init exynos_dma_init(void) | |||
275 | exynos_pdma1_pdata.nr_valid_peri = | 275 | exynos_pdma1_pdata.nr_valid_peri = |
276 | ARRAY_SIZE(exynos4210_pdma1_peri); | 276 | ARRAY_SIZE(exynos4210_pdma1_peri); |
277 | exynos_pdma1_pdata.peri_id = exynos4210_pdma1_peri; | 277 | exynos_pdma1_pdata.peri_id = exynos4210_pdma1_peri; |
278 | |||
279 | if (samsung_rev() == EXYNOS4210_REV_0) | ||
280 | exynos_mdma1_device.res.start = EXYNOS4_PA_S_MDMA1; | ||
278 | } else if (soc_is_exynos4212() || soc_is_exynos4412()) { | 281 | } else if (soc_is_exynos4212() || soc_is_exynos4412()) { |
279 | exynos_pdma0_pdata.nr_valid_peri = | 282 | exynos_pdma0_pdata.nr_valid_peri = |
280 | ARRAY_SIZE(exynos4212_pdma0_peri); | 283 | ARRAY_SIZE(exynos4212_pdma0_peri); |
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 8480849affb9..ed4da4544cd2 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h | |||
@@ -90,6 +90,7 @@ | |||
90 | 90 | ||
91 | #define EXYNOS4_PA_MDMA0 0x10810000 | 91 | #define EXYNOS4_PA_MDMA0 0x10810000 |
92 | #define EXYNOS4_PA_MDMA1 0x12850000 | 92 | #define EXYNOS4_PA_MDMA1 0x12850000 |
93 | #define EXYNOS4_PA_S_MDMA1 0x12840000 | ||
93 | #define EXYNOS4_PA_PDMA0 0x12680000 | 94 | #define EXYNOS4_PA_PDMA0 0x12680000 |
94 | #define EXYNOS4_PA_PDMA1 0x12690000 | 95 | #define EXYNOS4_PA_PDMA1 0x12690000 |
95 | #define EXYNOS5_PA_MDMA0 0x10800000 | 96 | #define EXYNOS5_PA_MDMA0 0x10800000 |
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c index e58d786faf78..eadf4b59e7d2 100644 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c | |||
@@ -99,6 +99,7 @@ static char const *exynos4_dt_compat[] __initdata = { | |||
99 | 99 | ||
100 | DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") | 100 | DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") |
101 | /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ | 101 | /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ |
102 | .smp = smp_ops(exynos_smp_ops), | ||
102 | .init_irq = exynos4_init_irq, | 103 | .init_irq = exynos4_init_irq, |
103 | .map_io = exynos4_dt_map_io, | 104 | .map_io = exynos4_dt_map_io, |
104 | .handle_irq = gic_handle_irq, | 105 | .handle_irq = gic_handle_irq, |
diff --git a/arch/arm/mach-highbank/system.c b/arch/arm/mach-highbank/system.c index 82c27230d4a9..86e37cd9376c 100644 --- a/arch/arm/mach-highbank/system.c +++ b/arch/arm/mach-highbank/system.c | |||
@@ -28,6 +28,7 @@ void highbank_restart(char mode, const char *cmd) | |||
28 | hignbank_set_pwr_soft_reset(); | 28 | hignbank_set_pwr_soft_reset(); |
29 | 29 | ||
30 | scu_power_mode(scu_base_addr, SCU_PM_POWEROFF); | 30 | scu_power_mode(scu_base_addr, SCU_PM_POWEROFF); |
31 | cpu_do_idle(); | 31 | while (1) |
32 | cpu_do_idle(); | ||
32 | } | 33 | } |
33 | 34 | ||
diff --git a/arch/arm/mach-imx/clk-busy.c b/arch/arm/mach-imx/clk-busy.c index 1a7a8dd045a1..1ab91b5209e6 100644 --- a/arch/arm/mach-imx/clk-busy.c +++ b/arch/arm/mach-imx/clk-busy.c | |||
@@ -108,7 +108,7 @@ struct clk *imx_clk_busy_divider(const char *name, const char *parent_name, | |||
108 | busy->div.hw.init = &init; | 108 | busy->div.hw.init = &init; |
109 | 109 | ||
110 | clk = clk_register(NULL, &busy->div.hw); | 110 | clk = clk_register(NULL, &busy->div.hw); |
111 | if (!clk) | 111 | if (IS_ERR(clk)) |
112 | kfree(busy); | 112 | kfree(busy); |
113 | 113 | ||
114 | return clk; | 114 | return clk; |
diff --git a/arch/arm/mach-imx/clk-gate2.c b/arch/arm/mach-imx/clk-gate2.c index 3c1b8ff9a0a6..cc49c7ae186e 100644 --- a/arch/arm/mach-imx/clk-gate2.c +++ b/arch/arm/mach-imx/clk-gate2.c | |||
@@ -112,7 +112,7 @@ struct clk *clk_register_gate2(struct device *dev, const char *name, | |||
112 | 112 | ||
113 | clk = clk_register(dev, &gate->hw); | 113 | clk = clk_register(dev, &gate->hw); |
114 | if (IS_ERR(clk)) | 114 | if (IS_ERR(clk)) |
115 | kfree(clk); | 115 | kfree(gate); |
116 | 116 | ||
117 | return clk; | 117 | return clk; |
118 | } | 118 | } |
diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c index d20d4795f4ea..01e2f843bf2e 100644 --- a/arch/arm/mach-imx/clk-imx25.c +++ b/arch/arm/mach-imx/clk-imx25.c | |||
@@ -127,8 +127,8 @@ int __init mx25_clocks_init(void) | |||
127 | clk[esdhc2_ipg_per] = imx_clk_gate("esdhc2_ipg_per", "per4", ccm(CCM_CGCR0), 4); | 127 | clk[esdhc2_ipg_per] = imx_clk_gate("esdhc2_ipg_per", "per4", ccm(CCM_CGCR0), 4); |
128 | clk[gpt_ipg_per] = imx_clk_gate("gpt_ipg_per", "per5", ccm(CCM_CGCR0), 5); | 128 | clk[gpt_ipg_per] = imx_clk_gate("gpt_ipg_per", "per5", ccm(CCM_CGCR0), 5); |
129 | clk[i2c_ipg_per] = imx_clk_gate("i2c_ipg_per", "per6", ccm(CCM_CGCR0), 6); | 129 | clk[i2c_ipg_per] = imx_clk_gate("i2c_ipg_per", "per6", ccm(CCM_CGCR0), 6); |
130 | clk[lcdc_ipg_per] = imx_clk_gate("lcdc_ipg_per", "per8", ccm(CCM_CGCR0), 7); | 130 | clk[lcdc_ipg_per] = imx_clk_gate("lcdc_ipg_per", "per7", ccm(CCM_CGCR0), 7); |
131 | clk[nfc_ipg_per] = imx_clk_gate("nfc_ipg_per", "ipg_per", ccm(CCM_CGCR0), 8); | 131 | clk[nfc_ipg_per] = imx_clk_gate("nfc_ipg_per", "per8", ccm(CCM_CGCR0), 8); |
132 | clk[ssi1_ipg_per] = imx_clk_gate("ssi1_ipg_per", "per13", ccm(CCM_CGCR0), 13); | 132 | clk[ssi1_ipg_per] = imx_clk_gate("ssi1_ipg_per", "per13", ccm(CCM_CGCR0), 13); |
133 | clk[ssi2_ipg_per] = imx_clk_gate("ssi2_ipg_per", "per14", ccm(CCM_CGCR0), 14); | 133 | clk[ssi2_ipg_per] = imx_clk_gate("ssi2_ipg_per", "per14", ccm(CCM_CGCR0), 14); |
134 | clk[uart_ipg_per] = imx_clk_gate("uart_ipg_per", "per15", ccm(CCM_CGCR0), 15); | 134 | clk[uart_ipg_per] = imx_clk_gate("uart_ipg_per", "per15", ccm(CCM_CGCR0), 15); |
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index 3b6b640eed24..366e5d59d886 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c | |||
@@ -109,7 +109,7 @@ int __init mx27_clocks_init(unsigned long fref) | |||
109 | clk[per3_div] = imx_clk_divider("per3_div", "mpll_main2", CCM_PCDR1, 16, 6); | 109 | clk[per3_div] = imx_clk_divider("per3_div", "mpll_main2", CCM_PCDR1, 16, 6); |
110 | clk[per4_div] = imx_clk_divider("per4_div", "mpll_main2", CCM_PCDR1, 24, 6); | 110 | clk[per4_div] = imx_clk_divider("per4_div", "mpll_main2", CCM_PCDR1, 24, 6); |
111 | clk[vpu_sel] = imx_clk_mux("vpu_sel", CCM_CSCR, 21, 1, vpu_sel_clks, ARRAY_SIZE(vpu_sel_clks)); | 111 | clk[vpu_sel] = imx_clk_mux("vpu_sel", CCM_CSCR, 21, 1, vpu_sel_clks, ARRAY_SIZE(vpu_sel_clks)); |
112 | clk[vpu_div] = imx_clk_divider("vpu_div", "vpu_sel", CCM_PCDR0, 10, 3); | 112 | clk[vpu_div] = imx_clk_divider("vpu_div", "vpu_sel", CCM_PCDR0, 10, 6); |
113 | clk[usb_div] = imx_clk_divider("usb_div", "spll", CCM_CSCR, 28, 3); | 113 | clk[usb_div] = imx_clk_divider("usb_div", "spll", CCM_CSCR, 28, 3); |
114 | clk[cpu_sel] = imx_clk_mux("cpu_sel", CCM_CSCR, 15, 1, cpu_sel_clks, ARRAY_SIZE(cpu_sel_clks)); | 114 | clk[cpu_sel] = imx_clk_mux("cpu_sel", CCM_CSCR, 15, 1, cpu_sel_clks, ARRAY_SIZE(cpu_sel_clks)); |
115 | clk[clko_sel] = imx_clk_mux("clko_sel", CCM_CCSR, 0, 5, clko_sel_clks, ARRAY_SIZE(clko_sel_clks)); | 115 | clk[clko_sel] = imx_clk_mux("clko_sel", CCM_CCSR, 0, 5, clko_sel_clks, ARRAY_SIZE(clko_sel_clks)); |
@@ -121,7 +121,7 @@ int __init mx27_clocks_init(unsigned long fref) | |||
121 | clk[ssi1_sel] = imx_clk_mux("ssi1_sel", CCM_CSCR, 22, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks)); | 121 | clk[ssi1_sel] = imx_clk_mux("ssi1_sel", CCM_CSCR, 22, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks)); |
122 | clk[ssi2_sel] = imx_clk_mux("ssi2_sel", CCM_CSCR, 23, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks)); | 122 | clk[ssi2_sel] = imx_clk_mux("ssi2_sel", CCM_CSCR, 23, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks)); |
123 | clk[ssi1_div] = imx_clk_divider("ssi1_div", "ssi1_sel", CCM_PCDR0, 16, 6); | 123 | clk[ssi1_div] = imx_clk_divider("ssi1_div", "ssi1_sel", CCM_PCDR0, 16, 6); |
124 | clk[ssi2_div] = imx_clk_divider("ssi2_div", "ssi2_sel", CCM_PCDR0, 26, 3); | 124 | clk[ssi2_div] = imx_clk_divider("ssi2_div", "ssi2_sel", CCM_PCDR0, 26, 6); |
125 | clk[clko_en] = imx_clk_gate("clko_en", "clko_div", CCM_PCCR0, 0); | 125 | clk[clko_en] = imx_clk_gate("clko_en", "clko_div", CCM_PCCR0, 0); |
126 | clk[ssi2_ipg_gate] = imx_clk_gate("ssi2_ipg_gate", "ipg", CCM_PCCR0, 0); | 126 | clk[ssi2_ipg_gate] = imx_clk_gate("ssi2_ipg_gate", "ipg", CCM_PCCR0, 0); |
127 | clk[ssi1_ipg_gate] = imx_clk_gate("ssi1_ipg_gate", "ipg", CCM_PCCR0, 1); | 127 | clk[ssi1_ipg_gate] = imx_clk_gate("ssi1_ipg_gate", "ipg", CCM_PCCR0, 1); |
diff --git a/arch/arm/mach-imx/ehci-imx25.c b/arch/arm/mach-imx/ehci-imx25.c index 412c583a24b0..576af7446952 100644 --- a/arch/arm/mach-imx/ehci-imx25.c +++ b/arch/arm/mach-imx/ehci-imx25.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #define MX25_H1_SIC_SHIFT 21 | 30 | #define MX25_H1_SIC_SHIFT 21 |
31 | #define MX25_H1_SIC_MASK (0x3 << MX25_H1_SIC_SHIFT) | 31 | #define MX25_H1_SIC_MASK (0x3 << MX25_H1_SIC_SHIFT) |
32 | #define MX25_H1_PP_BIT (1 << 18) | 32 | #define MX25_H1_PP_BIT (1 << 18) |
33 | #define MX25_H1_PM_BIT (1 << 8) | 33 | #define MX25_H1_PM_BIT (1 << 16) |
34 | #define MX25_H1_IPPUE_UP_BIT (1 << 7) | 34 | #define MX25_H1_IPPUE_UP_BIT (1 << 7) |
35 | #define MX25_H1_IPPUE_DOWN_BIT (1 << 6) | 35 | #define MX25_H1_IPPUE_DOWN_BIT (1 << 6) |
36 | #define MX25_H1_TLL_BIT (1 << 5) | 36 | #define MX25_H1_TLL_BIT (1 << 5) |
diff --git a/arch/arm/mach-imx/ehci-imx35.c b/arch/arm/mach-imx/ehci-imx35.c index 779e16eb65cb..293397852e4e 100644 --- a/arch/arm/mach-imx/ehci-imx35.c +++ b/arch/arm/mach-imx/ehci-imx35.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #define MX35_H1_SIC_SHIFT 21 | 30 | #define MX35_H1_SIC_SHIFT 21 |
31 | #define MX35_H1_SIC_MASK (0x3 << MX35_H1_SIC_SHIFT) | 31 | #define MX35_H1_SIC_MASK (0x3 << MX35_H1_SIC_SHIFT) |
32 | #define MX35_H1_PP_BIT (1 << 18) | 32 | #define MX35_H1_PP_BIT (1 << 18) |
33 | #define MX35_H1_PM_BIT (1 << 8) | 33 | #define MX35_H1_PM_BIT (1 << 16) |
34 | #define MX35_H1_IPPUE_UP_BIT (1 << 7) | 34 | #define MX35_H1_IPPUE_UP_BIT (1 << 7) |
35 | #define MX35_H1_IPPUE_DOWN_BIT (1 << 6) | 35 | #define MX35_H1_IPPUE_DOWN_BIT (1 << 6) |
36 | #define MX35_H1_TLL_BIT (1 << 5) | 36 | #define MX35_H1_TLL_BIT (1 << 5) |
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c index 9d2c843bde02..b5deb0554552 100644 --- a/arch/arm/mach-imx/mm-imx3.c +++ b/arch/arm/mach-imx/mm-imx3.c | |||
@@ -108,9 +108,8 @@ void __init imx3_init_l2x0(void) | |||
108 | } | 108 | } |
109 | 109 | ||
110 | l2x0_base = ioremap(MX3x_L2CC_BASE_ADDR, 4096); | 110 | l2x0_base = ioremap(MX3x_L2CC_BASE_ADDR, 4096); |
111 | if (IS_ERR(l2x0_base)) { | 111 | if (!l2x0_base) { |
112 | printk(KERN_ERR "remapping L2 cache area failed with %ld\n", | 112 | printk(KERN_ERR "remapping L2 cache area failed\n"); |
113 | PTR_ERR(l2x0_base)); | ||
114 | return; | 113 | return; |
115 | } | 114 | } |
116 | 115 | ||
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c index 1694f01ce2b6..6d6bde3e15fa 100644 --- a/arch/arm/mach-ixp4xx/common-pci.c +++ b/arch/arm/mach-ixp4xx/common-pci.c | |||
@@ -410,6 +410,7 @@ void __init ixp4xx_pci_preinit(void) | |||
410 | * Enable the IO window to be way up high, at 0xfffffc00 | 410 | * Enable the IO window to be way up high, at 0xfffffc00 |
411 | */ | 411 | */ |
412 | local_write_config(PCI_BASE_ADDRESS_5, 4, 0xfffffc01); | 412 | local_write_config(PCI_BASE_ADDRESS_5, 4, 0xfffffc01); |
413 | local_write_config(0x40, 4, 0x000080FF); /* No TRDY time limit */ | ||
413 | } else { | 414 | } else { |
414 | printk("PCI: IXP4xx is target - No bus scan performed\n"); | 415 | printk("PCI: IXP4xx is target - No bus scan performed\n"); |
415 | } | 416 | } |
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index fdf91a160884..8c0c0e2d0727 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -67,15 +67,12 @@ static struct map_desc ixp4xx_io_desc[] __initdata = { | |||
67 | .pfn = __phys_to_pfn(IXP4XX_PCI_CFG_BASE_PHYS), | 67 | .pfn = __phys_to_pfn(IXP4XX_PCI_CFG_BASE_PHYS), |
68 | .length = IXP4XX_PCI_CFG_REGION_SIZE, | 68 | .length = IXP4XX_PCI_CFG_REGION_SIZE, |
69 | .type = MT_DEVICE | 69 | .type = MT_DEVICE |
70 | }, | 70 | }, { /* Queue Manager */ |
71 | #ifdef CONFIG_DEBUG_LL | 71 | .virtual = (unsigned long)IXP4XX_QMGR_BASE_VIRT, |
72 | { /* Debug UART mapping */ | 72 | .pfn = __phys_to_pfn(IXP4XX_QMGR_BASE_PHYS), |
73 | .virtual = (unsigned long)IXP4XX_DEBUG_UART_BASE_VIRT, | 73 | .length = IXP4XX_QMGR_REGION_SIZE, |
74 | .pfn = __phys_to_pfn(IXP4XX_DEBUG_UART_BASE_PHYS), | ||
75 | .length = IXP4XX_DEBUG_UART_REGION_SIZE, | ||
76 | .type = MT_DEVICE | 74 | .type = MT_DEVICE |
77 | } | 75 | }, |
78 | #endif | ||
79 | }; | 76 | }; |
80 | 77 | ||
81 | void __init ixp4xx_map_io(void) | 78 | void __init ixp4xx_map_io(void) |
diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c index b800a031207c..53b8348dfcc2 100644 --- a/arch/arm/mach-ixp4xx/goramo_mlr.c +++ b/arch/arm/mach-ixp4xx/goramo_mlr.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
16 | #include <asm/mach/flash.h> | 16 | #include <asm/mach/flash.h> |
17 | #include <asm/mach/pci.h> | 17 | #include <asm/mach/pci.h> |
18 | #include <asm/system_info.h> | ||
18 | 19 | ||
19 | #define SLOT_ETHA 0x0B /* IDSEL = AD21 */ | 20 | #define SLOT_ETHA 0x0B /* IDSEL = AD21 */ |
20 | #define SLOT_ETHB 0x0C /* IDSEL = AD20 */ | 21 | #define SLOT_ETHB 0x0C /* IDSEL = AD20 */ |
@@ -329,7 +330,7 @@ static struct platform_device device_hss_tab[] = { | |||
329 | }; | 330 | }; |
330 | 331 | ||
331 | 332 | ||
332 | static struct platform_device *device_tab[6] __initdata = { | 333 | static struct platform_device *device_tab[7] __initdata = { |
333 | &device_flash, /* index 0 */ | 334 | &device_flash, /* index 0 */ |
334 | }; | 335 | }; |
335 | 336 | ||
diff --git a/arch/arm/mach-ixp4xx/include/mach/debug-macro.S b/arch/arm/mach-ixp4xx/include/mach/debug-macro.S index 8c9f8d564492..ff686cbc5df4 100644 --- a/arch/arm/mach-ixp4xx/include/mach/debug-macro.S +++ b/arch/arm/mach-ixp4xx/include/mach/debug-macro.S | |||
@@ -17,8 +17,8 @@ | |||
17 | #else | 17 | #else |
18 | mov \rp, #0 | 18 | mov \rp, #0 |
19 | #endif | 19 | #endif |
20 | orr \rv, \rp, #0xff000000 @ virtual | 20 | orr \rv, \rp, #0xfe000000 @ virtual |
21 | orr \rv, \rv, #0x00b00000 | 21 | orr \rv, \rv, #0x00f00000 |
22 | orr \rp, \rp, #0xc8000000 @ physical | 22 | orr \rp, \rp, #0xc8000000 @ physical |
23 | .endm | 23 | .endm |
24 | 24 | ||
diff --git a/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h b/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h index eb68b61ce975..c5bae9c035d5 100644 --- a/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h +++ b/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h | |||
@@ -30,51 +30,43 @@ | |||
30 | * | 30 | * |
31 | * 0x50000000 0x10000000 ioremap'd EXP BUS | 31 | * 0x50000000 0x10000000 ioremap'd EXP BUS |
32 | * | 32 | * |
33 | * 0x6000000 0x00004000 ioremap'd QMgr | 33 | * 0xC8000000 0x00013000 0xFEF00000 On-Chip Peripherals |
34 | * | 34 | * |
35 | * 0xC0000000 0x00001000 0xffbff000 PCI CFG | 35 | * 0xC0000000 0x00001000 0xFEF13000 PCI CFG |
36 | * | 36 | * |
37 | * 0xC4000000 0x00001000 0xffbfe000 EXP CFG | 37 | * 0xC4000000 0x00001000 0xFEF14000 EXP CFG |
38 | * | 38 | * |
39 | * 0xC8000000 0x00013000 0xffbeb000 On-Chip Peripherals | 39 | * 0x60000000 0x00004000 0xFEF15000 QMgr |
40 | */ | 40 | */ |
41 | 41 | ||
42 | /* | 42 | /* |
43 | * Queue Manager | 43 | * Queue Manager |
44 | */ | 44 | */ |
45 | #define IXP4XX_QMGR_BASE_PHYS (0x60000000) | 45 | #define IXP4XX_QMGR_BASE_PHYS 0x60000000 |
46 | #define IXP4XX_QMGR_REGION_SIZE (0x00004000) | 46 | #define IXP4XX_QMGR_BASE_VIRT IOMEM(0xFEF15000) |
47 | #define IXP4XX_QMGR_REGION_SIZE 0x00004000 | ||
47 | 48 | ||
48 | /* | 49 | /* |
49 | * Expansion BUS Configuration registers | 50 | * Peripheral space, including debug UART. Must be section-aligned so that |
51 | * it can be used with the low-level debug code. | ||
50 | */ | 52 | */ |
51 | #define IXP4XX_EXP_CFG_BASE_PHYS (0xC4000000) | 53 | #define IXP4XX_PERIPHERAL_BASE_PHYS 0xC8000000 |
52 | #define IXP4XX_EXP_CFG_BASE_VIRT IOMEM(0xFFBFE000) | 54 | #define IXP4XX_PERIPHERAL_BASE_VIRT IOMEM(0xFEF00000) |
53 | #define IXP4XX_EXP_CFG_REGION_SIZE (0x00001000) | 55 | #define IXP4XX_PERIPHERAL_REGION_SIZE 0x00013000 |
54 | 56 | ||
55 | /* | 57 | /* |
56 | * PCI Config registers | 58 | * PCI Config registers |
57 | */ | 59 | */ |
58 | #define IXP4XX_PCI_CFG_BASE_PHYS (0xC0000000) | 60 | #define IXP4XX_PCI_CFG_BASE_PHYS 0xC0000000 |
59 | #define IXP4XX_PCI_CFG_BASE_VIRT IOMEM(0xFFBFF000) | 61 | #define IXP4XX_PCI_CFG_BASE_VIRT IOMEM(0xFEF13000) |
60 | #define IXP4XX_PCI_CFG_REGION_SIZE (0x00001000) | 62 | #define IXP4XX_PCI_CFG_REGION_SIZE 0x00001000 |
61 | |||
62 | /* | ||
63 | * Peripheral space | ||
64 | */ | ||
65 | #define IXP4XX_PERIPHERAL_BASE_PHYS (0xC8000000) | ||
66 | #define IXP4XX_PERIPHERAL_BASE_VIRT IOMEM(0xFFBEB000) | ||
67 | #define IXP4XX_PERIPHERAL_REGION_SIZE (0x00013000) | ||
68 | 63 | ||
69 | /* | 64 | /* |
70 | * Debug UART | 65 | * Expansion BUS Configuration registers |
71 | * | ||
72 | * This is basically a remap of UART1 into a region that is section | ||
73 | * aligned so that it * can be used with the low-level debug code. | ||
74 | */ | 66 | */ |
75 | #define IXP4XX_DEBUG_UART_BASE_PHYS (0xC8000000) | 67 | #define IXP4XX_EXP_CFG_BASE_PHYS 0xC4000000 |
76 | #define IXP4XX_DEBUG_UART_BASE_VIRT IOMEM(0xffb00000) | 68 | #define IXP4XX_EXP_CFG_BASE_VIRT 0xFEF14000 |
77 | #define IXP4XX_DEBUG_UART_REGION_SIZE (0x00001000) | 69 | #define IXP4XX_EXP_CFG_REGION_SIZE 0x00001000 |
78 | 70 | ||
79 | #define IXP4XX_EXP_CS0_OFFSET 0x00 | 71 | #define IXP4XX_EXP_CS0_OFFSET 0x00 |
80 | #define IXP4XX_EXP_CS1_OFFSET 0x04 | 72 | #define IXP4XX_EXP_CS1_OFFSET 0x04 |
diff --git a/arch/arm/mach-ixp4xx/include/mach/qmgr.h b/arch/arm/mach-ixp4xx/include/mach/qmgr.h index 9e7cad2d54cb..4de8da536dbb 100644 --- a/arch/arm/mach-ixp4xx/include/mach/qmgr.h +++ b/arch/arm/mach-ixp4xx/include/mach/qmgr.h | |||
@@ -86,7 +86,7 @@ void qmgr_release_queue(unsigned int queue); | |||
86 | 86 | ||
87 | static inline void qmgr_put_entry(unsigned int queue, u32 val) | 87 | static inline void qmgr_put_entry(unsigned int queue, u32 val) |
88 | { | 88 | { |
89 | extern struct qmgr_regs __iomem *qmgr_regs; | 89 | struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
90 | #if DEBUG_QMGR | 90 | #if DEBUG_QMGR |
91 | BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */ | 91 | BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */ |
92 | 92 | ||
@@ -99,7 +99,7 @@ static inline void qmgr_put_entry(unsigned int queue, u32 val) | |||
99 | static inline u32 qmgr_get_entry(unsigned int queue) | 99 | static inline u32 qmgr_get_entry(unsigned int queue) |
100 | { | 100 | { |
101 | u32 val; | 101 | u32 val; |
102 | extern struct qmgr_regs __iomem *qmgr_regs; | 102 | const struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
103 | val = __raw_readl(&qmgr_regs->acc[queue][0]); | 103 | val = __raw_readl(&qmgr_regs->acc[queue][0]); |
104 | #if DEBUG_QMGR | 104 | #if DEBUG_QMGR |
105 | BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */ | 105 | BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */ |
@@ -112,14 +112,14 @@ static inline u32 qmgr_get_entry(unsigned int queue) | |||
112 | 112 | ||
113 | static inline int __qmgr_get_stat1(unsigned int queue) | 113 | static inline int __qmgr_get_stat1(unsigned int queue) |
114 | { | 114 | { |
115 | extern struct qmgr_regs __iomem *qmgr_regs; | 115 | const struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
116 | return (__raw_readl(&qmgr_regs->stat1[queue >> 3]) | 116 | return (__raw_readl(&qmgr_regs->stat1[queue >> 3]) |
117 | >> ((queue & 7) << 2)) & 0xF; | 117 | >> ((queue & 7) << 2)) & 0xF; |
118 | } | 118 | } |
119 | 119 | ||
120 | static inline int __qmgr_get_stat2(unsigned int queue) | 120 | static inline int __qmgr_get_stat2(unsigned int queue) |
121 | { | 121 | { |
122 | extern struct qmgr_regs __iomem *qmgr_regs; | 122 | const struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
123 | BUG_ON(queue >= HALF_QUEUES); | 123 | BUG_ON(queue >= HALF_QUEUES); |
124 | return (__raw_readl(&qmgr_regs->stat2[queue >> 4]) | 124 | return (__raw_readl(&qmgr_regs->stat2[queue >> 4]) |
125 | >> ((queue & 0xF) << 1)) & 0x3; | 125 | >> ((queue & 0xF) << 1)) & 0x3; |
@@ -145,7 +145,7 @@ static inline int qmgr_stat_empty(unsigned int queue) | |||
145 | */ | 145 | */ |
146 | static inline int qmgr_stat_below_low_watermark(unsigned int queue) | 146 | static inline int qmgr_stat_below_low_watermark(unsigned int queue) |
147 | { | 147 | { |
148 | extern struct qmgr_regs __iomem *qmgr_regs; | 148 | const struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
149 | if (queue >= HALF_QUEUES) | 149 | if (queue >= HALF_QUEUES) |
150 | return (__raw_readl(&qmgr_regs->statne_h) >> | 150 | return (__raw_readl(&qmgr_regs->statne_h) >> |
151 | (queue - HALF_QUEUES)) & 0x01; | 151 | (queue - HALF_QUEUES)) & 0x01; |
@@ -172,7 +172,7 @@ static inline int qmgr_stat_above_high_watermark(unsigned int queue) | |||
172 | */ | 172 | */ |
173 | static inline int qmgr_stat_full(unsigned int queue) | 173 | static inline int qmgr_stat_full(unsigned int queue) |
174 | { | 174 | { |
175 | extern struct qmgr_regs __iomem *qmgr_regs; | 175 | const struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
176 | if (queue >= HALF_QUEUES) | 176 | if (queue >= HALF_QUEUES) |
177 | return (__raw_readl(&qmgr_regs->statf_h) >> | 177 | return (__raw_readl(&qmgr_regs->statf_h) >> |
178 | (queue - HALF_QUEUES)) & 0x01; | 178 | (queue - HALF_QUEUES)) & 0x01; |
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_npe.c b/arch/arm/mach-ixp4xx/ixp4xx_npe.c index a17ed79207a4..d4eb09a62863 100644 --- a/arch/arm/mach-ixp4xx/ixp4xx_npe.c +++ b/arch/arm/mach-ixp4xx/ixp4xx_npe.c | |||
@@ -116,7 +116,11 @@ | |||
116 | /* NPE mailbox_status value for reset */ | 116 | /* NPE mailbox_status value for reset */ |
117 | #define RESET_MBOX_STAT 0x0000F0F0 | 117 | #define RESET_MBOX_STAT 0x0000F0F0 |
118 | 118 | ||
119 | const char *npe_names[] = { "NPE-A", "NPE-B", "NPE-C" }; | 119 | #define NPE_A_FIRMWARE "NPE-A" |
120 | #define NPE_B_FIRMWARE "NPE-B" | ||
121 | #define NPE_C_FIRMWARE "NPE-C" | ||
122 | |||
123 | const char *npe_names[] = { NPE_A_FIRMWARE, NPE_B_FIRMWARE, NPE_C_FIRMWARE }; | ||
120 | 124 | ||
121 | #define print_npe(pri, npe, fmt, ...) \ | 125 | #define print_npe(pri, npe, fmt, ...) \ |
122 | printk(pri "%s: " fmt, npe_name(npe), ## __VA_ARGS__) | 126 | printk(pri "%s: " fmt, npe_name(npe), ## __VA_ARGS__) |
@@ -724,6 +728,9 @@ module_exit(npe_cleanup_module); | |||
724 | 728 | ||
725 | MODULE_AUTHOR("Krzysztof Halasa"); | 729 | MODULE_AUTHOR("Krzysztof Halasa"); |
726 | MODULE_LICENSE("GPL v2"); | 730 | MODULE_LICENSE("GPL v2"); |
731 | MODULE_FIRMWARE(NPE_A_FIRMWARE); | ||
732 | MODULE_FIRMWARE(NPE_B_FIRMWARE); | ||
733 | MODULE_FIRMWARE(NPE_C_FIRMWARE); | ||
727 | 734 | ||
728 | EXPORT_SYMBOL(npe_names); | 735 | EXPORT_SYMBOL(npe_names); |
729 | EXPORT_SYMBOL(npe_running); | 736 | EXPORT_SYMBOL(npe_running); |
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c index 852f7c9f87d0..9d1b6b7c394c 100644 --- a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c +++ b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <mach/qmgr.h> | 15 | #include <mach/qmgr.h> |
16 | 16 | ||
17 | struct qmgr_regs __iomem *qmgr_regs; | 17 | static struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
18 | static struct resource *mem_res; | 18 | static struct resource *mem_res; |
19 | static spinlock_t qmgr_lock; | 19 | static spinlock_t qmgr_lock; |
20 | static u32 used_sram_bitmap[4]; /* 128 16-dword pages */ | 20 | static u32 used_sram_bitmap[4]; /* 128 16-dword pages */ |
@@ -293,12 +293,6 @@ static int qmgr_init(void) | |||
293 | if (mem_res == NULL) | 293 | if (mem_res == NULL) |
294 | return -EBUSY; | 294 | return -EBUSY; |
295 | 295 | ||
296 | qmgr_regs = ioremap(IXP4XX_QMGR_BASE_PHYS, IXP4XX_QMGR_REGION_SIZE); | ||
297 | if (qmgr_regs == NULL) { | ||
298 | err = -ENOMEM; | ||
299 | goto error_map; | ||
300 | } | ||
301 | |||
302 | /* reset qmgr registers */ | 296 | /* reset qmgr registers */ |
303 | for (i = 0; i < 4; i++) { | 297 | for (i = 0; i < 4; i++) { |
304 | __raw_writel(0x33333333, &qmgr_regs->stat1[i]); | 298 | __raw_writel(0x33333333, &qmgr_regs->stat1[i]); |
@@ -347,8 +341,6 @@ static int qmgr_init(void) | |||
347 | error_irq2: | 341 | error_irq2: |
348 | free_irq(IRQ_IXP4XX_QM1, NULL); | 342 | free_irq(IRQ_IXP4XX_QM1, NULL); |
349 | error_irq: | 343 | error_irq: |
350 | iounmap(qmgr_regs); | ||
351 | error_map: | ||
352 | release_mem_region(IXP4XX_QMGR_BASE_PHYS, IXP4XX_QMGR_REGION_SIZE); | 344 | release_mem_region(IXP4XX_QMGR_BASE_PHYS, IXP4XX_QMGR_REGION_SIZE); |
353 | return err; | 345 | return err; |
354 | } | 346 | } |
@@ -359,7 +351,6 @@ static void qmgr_remove(void) | |||
359 | free_irq(IRQ_IXP4XX_QM2, NULL); | 351 | free_irq(IRQ_IXP4XX_QM2, NULL); |
360 | synchronize_irq(IRQ_IXP4XX_QM1); | 352 | synchronize_irq(IRQ_IXP4XX_QM1); |
361 | synchronize_irq(IRQ_IXP4XX_QM2); | 353 | synchronize_irq(IRQ_IXP4XX_QM2); |
362 | iounmap(qmgr_regs); | ||
363 | release_mem_region(IXP4XX_QMGR_BASE_PHYS, IXP4XX_QMGR_REGION_SIZE); | 354 | release_mem_region(IXP4XX_QMGR_BASE_PHYS, IXP4XX_QMGR_REGION_SIZE); |
364 | } | 355 | } |
365 | 356 | ||
@@ -369,7 +360,6 @@ module_exit(qmgr_remove); | |||
369 | MODULE_LICENSE("GPL v2"); | 360 | MODULE_LICENSE("GPL v2"); |
370 | MODULE_AUTHOR("Krzysztof Halasa"); | 361 | MODULE_AUTHOR("Krzysztof Halasa"); |
371 | 362 | ||
372 | EXPORT_SYMBOL(qmgr_regs); | ||
373 | EXPORT_SYMBOL(qmgr_set_irq); | 363 | EXPORT_SYMBOL(qmgr_set_irq); |
374 | EXPORT_SYMBOL(qmgr_enable_irq); | 364 | EXPORT_SYMBOL(qmgr_enable_irq); |
375 | EXPORT_SYMBOL(qmgr_disable_irq); | 365 | EXPORT_SYMBOL(qmgr_disable_irq); |
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c index ec544918b12c..74fc5a074fc4 100644 --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c | |||
@@ -207,14 +207,19 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) | |||
207 | return 1; | 207 | return 1; |
208 | } | 208 | } |
209 | 209 | ||
210 | /* | ||
211 | * The root complex has a hardwired class of PCI_CLASS_MEMORY_OTHER, when it | ||
212 | * is operating as a root complex this needs to be switched to | ||
213 | * PCI_CLASS_BRIDGE_HOST or Linux will errantly try to process the BAR's on | ||
214 | * the device. Decoding setup is handled by the orion code. | ||
215 | */ | ||
210 | static void __devinit rc_pci_fixup(struct pci_dev *dev) | 216 | static void __devinit rc_pci_fixup(struct pci_dev *dev) |
211 | { | 217 | { |
212 | /* | ||
213 | * Prevent enumeration of root complex. | ||
214 | */ | ||
215 | if (dev->bus->parent == NULL && dev->devfn == 0) { | 218 | if (dev->bus->parent == NULL && dev->devfn == 0) { |
216 | int i; | 219 | int i; |
217 | 220 | ||
221 | dev->class &= 0xff; | ||
222 | dev->class |= PCI_CLASS_BRIDGE_HOST << 8; | ||
218 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | 223 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { |
219 | dev->resource[i].start = 0; | 224 | dev->resource[i].start = 0; |
220 | dev->resource[i].end = 0; | 225 | dev->resource[i].end = 0; |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 2a1a898c7f90..d669e227e00c 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -11,7 +11,6 @@ config ARCH_OMAP2PLUS_TYPICAL | |||
11 | select I2C_OMAP | 11 | select I2C_OMAP |
12 | select MENELAUS if ARCH_OMAP2 | 12 | select MENELAUS if ARCH_OMAP2 |
13 | select NEON if ARCH_OMAP3 || ARCH_OMAP4 || SOC_OMAP5 | 13 | select NEON if ARCH_OMAP3 || ARCH_OMAP4 || SOC_OMAP5 |
14 | select PINCTRL | ||
15 | select PM_RUNTIME | 14 | select PM_RUNTIME |
16 | select REGULATOR | 15 | select REGULATOR |
17 | select SERIAL_OMAP | 16 | select SERIAL_OMAP |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index fe40d9e488c9..d6721a7f4c3b 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -184,8 +184,6 @@ obj-$(CONFIG_HW_PERF_EVENTS) += pmu.o | |||
184 | obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o | 184 | obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o |
185 | mailbox_mach-objs := mailbox.o | 185 | mailbox_mach-objs := mailbox.o |
186 | 186 | ||
187 | obj-$(CONFIG_OMAP_IOMMU) += iommu2.o | ||
188 | |||
189 | iommu-$(CONFIG_OMAP_IOMMU) := omap-iommu.o | 187 | iommu-$(CONFIG_OMAP_IOMMU) := omap-iommu.o |
190 | obj-y += $(iommu-m) $(iommu-y) | 188 | obj-y += $(iommu-m) $(iommu-y) |
191 | 189 | ||
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 48d5e41dfbfa..378590694447 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -580,6 +580,11 @@ static void __init igep_wlan_bt_init(void) | |||
580 | } else | 580 | } else |
581 | return; | 581 | return; |
582 | 582 | ||
583 | /* Make sure that the GPIO pins are muxed correctly */ | ||
584 | omap_mux_init_gpio(igep_wlan_bt_gpios[0].gpio, OMAP_PIN_OUTPUT); | ||
585 | omap_mux_init_gpio(igep_wlan_bt_gpios[1].gpio, OMAP_PIN_OUTPUT); | ||
586 | omap_mux_init_gpio(igep_wlan_bt_gpios[2].gpio, OMAP_PIN_OUTPUT); | ||
587 | |||
583 | err = gpio_request_array(igep_wlan_bt_gpios, | 588 | err = gpio_request_array(igep_wlan_bt_gpios, |
584 | ARRAY_SIZE(igep_wlan_bt_gpios)); | 589 | ARRAY_SIZE(igep_wlan_bt_gpios)); |
585 | if (err) { | 590 | if (err) { |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 388c431c745a..d41ab98890ff 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/input.h> | 24 | #include <linux/input.h> |
25 | #include <linux/gpio_keys.h> | 25 | #include <linux/gpio_keys.h> |
26 | #include <linux/opp.h> | 26 | #include <linux/opp.h> |
27 | #include <linux/cpu.h> | ||
27 | 28 | ||
28 | #include <linux/mtd/mtd.h> | 29 | #include <linux/mtd/mtd.h> |
29 | #include <linux/mtd/partitions.h> | 30 | #include <linux/mtd/partitions.h> |
@@ -444,27 +445,31 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
444 | }; | 445 | }; |
445 | #endif | 446 | #endif |
446 | 447 | ||
447 | static void __init beagle_opp_init(void) | 448 | static int __init beagle_opp_init(void) |
448 | { | 449 | { |
449 | int r = 0; | 450 | int r = 0; |
450 | 451 | ||
451 | /* Initialize the omap3 opp table */ | 452 | if (!machine_is_omap3_beagle()) |
452 | if (omap3_opp_init()) { | 453 | return 0; |
454 | |||
455 | /* Initialize the omap3 opp table if not already created. */ | ||
456 | r = omap3_opp_init(); | ||
457 | if (IS_ERR_VALUE(r) && (r != -EEXIST)) { | ||
453 | pr_err("%s: opp default init failed\n", __func__); | 458 | pr_err("%s: opp default init failed\n", __func__); |
454 | return; | 459 | return r; |
455 | } | 460 | } |
456 | 461 | ||
457 | /* Custom OPP enabled for all xM versions */ | 462 | /* Custom OPP enabled for all xM versions */ |
458 | if (cpu_is_omap3630()) { | 463 | if (cpu_is_omap3630()) { |
459 | struct device *mpu_dev, *iva_dev; | 464 | struct device *mpu_dev, *iva_dev; |
460 | 465 | ||
461 | mpu_dev = omap_device_get_by_hwmod_name("mpu"); | 466 | mpu_dev = get_cpu_device(0); |
462 | iva_dev = omap_device_get_by_hwmod_name("iva"); | 467 | iva_dev = omap_device_get_by_hwmod_name("iva"); |
463 | 468 | ||
464 | if (IS_ERR(mpu_dev) || IS_ERR(iva_dev)) { | 469 | if (IS_ERR(mpu_dev) || IS_ERR(iva_dev)) { |
465 | pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", | 470 | pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", |
466 | __func__, mpu_dev, iva_dev); | 471 | __func__, mpu_dev, iva_dev); |
467 | return; | 472 | return -ENODEV; |
468 | } | 473 | } |
469 | /* Enable MPU 1GHz and lower opps */ | 474 | /* Enable MPU 1GHz and lower opps */ |
470 | r = opp_enable(mpu_dev, 800000000); | 475 | r = opp_enable(mpu_dev, 800000000); |
@@ -484,8 +489,9 @@ static void __init beagle_opp_init(void) | |||
484 | opp_disable(iva_dev, 660000000); | 489 | opp_disable(iva_dev, 660000000); |
485 | } | 490 | } |
486 | } | 491 | } |
487 | return; | 492 | return 0; |
488 | } | 493 | } |
494 | device_initcall(beagle_opp_init); | ||
489 | 495 | ||
490 | static void __init omap3_beagle_init(void) | 496 | static void __init omap3_beagle_init(void) |
491 | { | 497 | { |
@@ -522,8 +528,6 @@ static void __init omap3_beagle_init(void) | |||
522 | /* Ensure SDRC pins are mux'd for self-refresh */ | 528 | /* Ensure SDRC pins are mux'd for self-refresh */ |
523 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); | 529 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); |
524 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); | 530 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); |
525 | |||
526 | beagle_opp_init(); | ||
527 | } | 531 | } |
528 | 532 | ||
529 | MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") | 533 | MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") |
diff --git a/arch/arm/mach-omap2/clock33xx_data.c b/arch/arm/mach-omap2/clock33xx_data.c index 114ab4b8e0e3..1a45d6bd2539 100644 --- a/arch/arm/mach-omap2/clock33xx_data.c +++ b/arch/arm/mach-omap2/clock33xx_data.c | |||
@@ -1073,6 +1073,8 @@ static struct omap_clk am33xx_clks[] = { | |||
1073 | CLK(NULL, "gfx_fck_div_ck", &gfx_fck_div_ck, CK_AM33XX), | 1073 | CLK(NULL, "gfx_fck_div_ck", &gfx_fck_div_ck, CK_AM33XX), |
1074 | CLK(NULL, "sysclkout_pre_ck", &sysclkout_pre_ck, CK_AM33XX), | 1074 | CLK(NULL, "sysclkout_pre_ck", &sysclkout_pre_ck, CK_AM33XX), |
1075 | CLK(NULL, "clkout2_ck", &clkout2_ck, CK_AM33XX), | 1075 | CLK(NULL, "clkout2_ck", &clkout2_ck, CK_AM33XX), |
1076 | CLK(NULL, "timer_32k_ck", &clkdiv32k_ick, CK_AM33XX), | ||
1077 | CLK(NULL, "timer_sys_ck", &sys_clkin_ck, CK_AM33XX), | ||
1076 | }; | 1078 | }; |
1077 | 1079 | ||
1078 | int __init am33xx_clk_init(void) | 1080 | int __init am33xx_clk_init(void) |
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 6efc30c961a5..067c486fe295 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -1316,16 +1316,6 @@ static struct clk dmic_fck = { | |||
1316 | .clkdm_name = "abe_clkdm", | 1316 | .clkdm_name = "abe_clkdm", |
1317 | }; | 1317 | }; |
1318 | 1318 | ||
1319 | static struct clk dsp_fck = { | ||
1320 | .name = "dsp_fck", | ||
1321 | .ops = &clkops_omap2_dflt, | ||
1322 | .enable_reg = OMAP4430_CM_TESLA_TESLA_CLKCTRL, | ||
1323 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | ||
1324 | .clkdm_name = "tesla_clkdm", | ||
1325 | .parent = &dpll_iva_m4x2_ck, | ||
1326 | .recalc = &followparent_recalc, | ||
1327 | }; | ||
1328 | |||
1329 | static struct clk dss_sys_clk = { | 1319 | static struct clk dss_sys_clk = { |
1330 | .name = "dss_sys_clk", | 1320 | .name = "dss_sys_clk", |
1331 | .ops = &clkops_omap2_dflt, | 1321 | .ops = &clkops_omap2_dflt, |
@@ -1696,16 +1686,6 @@ static struct clk i2c4_fck = { | |||
1696 | .recalc = &followparent_recalc, | 1686 | .recalc = &followparent_recalc, |
1697 | }; | 1687 | }; |
1698 | 1688 | ||
1699 | static struct clk ipu_fck = { | ||
1700 | .name = "ipu_fck", | ||
1701 | .ops = &clkops_omap2_dflt, | ||
1702 | .enable_reg = OMAP4430_CM_DUCATI_DUCATI_CLKCTRL, | ||
1703 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | ||
1704 | .clkdm_name = "ducati_clkdm", | ||
1705 | .parent = &ducati_clk_mux_ck, | ||
1706 | .recalc = &followparent_recalc, | ||
1707 | }; | ||
1708 | |||
1709 | static struct clk iss_ctrlclk = { | 1689 | static struct clk iss_ctrlclk = { |
1710 | .name = "iss_ctrlclk", | 1690 | .name = "iss_ctrlclk", |
1711 | .ops = &clkops_omap2_dflt, | 1691 | .ops = &clkops_omap2_dflt, |
@@ -3151,7 +3131,6 @@ static struct omap_clk omap44xx_clks[] = { | |||
3151 | CLK(NULL, "div_ts_ck", &div_ts_ck, CK_446X), | 3131 | CLK(NULL, "div_ts_ck", &div_ts_ck, CK_446X), |
3152 | CLK(NULL, "dmic_sync_mux_ck", &dmic_sync_mux_ck, CK_443X), | 3132 | CLK(NULL, "dmic_sync_mux_ck", &dmic_sync_mux_ck, CK_443X), |
3153 | CLK(NULL, "dmic_fck", &dmic_fck, CK_443X), | 3133 | CLK(NULL, "dmic_fck", &dmic_fck, CK_443X), |
3154 | CLK(NULL, "dsp_fck", &dsp_fck, CK_443X), | ||
3155 | CLK(NULL, "dss_sys_clk", &dss_sys_clk, CK_443X), | 3134 | CLK(NULL, "dss_sys_clk", &dss_sys_clk, CK_443X), |
3156 | CLK(NULL, "dss_tv_clk", &dss_tv_clk, CK_443X), | 3135 | CLK(NULL, "dss_tv_clk", &dss_tv_clk, CK_443X), |
3157 | CLK(NULL, "dss_48mhz_clk", &dss_48mhz_clk, CK_443X), | 3136 | CLK(NULL, "dss_48mhz_clk", &dss_48mhz_clk, CK_443X), |
@@ -3183,7 +3162,6 @@ static struct omap_clk omap44xx_clks[] = { | |||
3183 | CLK(NULL, "i2c2_fck", &i2c2_fck, CK_443X), | 3162 | CLK(NULL, "i2c2_fck", &i2c2_fck, CK_443X), |
3184 | CLK(NULL, "i2c3_fck", &i2c3_fck, CK_443X), | 3163 | CLK(NULL, "i2c3_fck", &i2c3_fck, CK_443X), |
3185 | CLK(NULL, "i2c4_fck", &i2c4_fck, CK_443X), | 3164 | CLK(NULL, "i2c4_fck", &i2c4_fck, CK_443X), |
3186 | CLK(NULL, "ipu_fck", &ipu_fck, CK_443X), | ||
3187 | CLK(NULL, "iss_ctrlclk", &iss_ctrlclk, CK_443X), | 3165 | CLK(NULL, "iss_ctrlclk", &iss_ctrlclk, CK_443X), |
3188 | CLK(NULL, "iss_fck", &iss_fck, CK_443X), | 3166 | CLK(NULL, "iss_fck", &iss_fck, CK_443X), |
3189 | CLK(NULL, "iva_fck", &iva_fck, CK_443X), | 3167 | CLK(NULL, "iva_fck", &iva_fck, CK_443X), |
diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c b/arch/arm/mach-omap2/clockdomains44xx_data.c index b56d06b48782..95192a062d5d 100644 --- a/arch/arm/mach-omap2/clockdomains44xx_data.c +++ b/arch/arm/mach-omap2/clockdomains44xx_data.c | |||
@@ -359,7 +359,7 @@ static struct clockdomain iss_44xx_clkdm = { | |||
359 | .clkdm_offs = OMAP4430_CM2_CAM_CAM_CDOFFS, | 359 | .clkdm_offs = OMAP4430_CM2_CAM_CAM_CDOFFS, |
360 | .wkdep_srcs = iss_wkup_sleep_deps, | 360 | .wkdep_srcs = iss_wkup_sleep_deps, |
361 | .sleepdep_srcs = iss_wkup_sleep_deps, | 361 | .sleepdep_srcs = iss_wkup_sleep_deps, |
362 | .flags = CLKDM_CAN_HWSUP_SWSUP, | 362 | .flags = CLKDM_CAN_SWSUP, |
363 | }; | 363 | }; |
364 | 364 | ||
365 | static struct clockdomain l3_dss_44xx_clkdm = { | 365 | static struct clockdomain l3_dss_44xx_clkdm = { |
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c index 48daac2581b4..84551f205e46 100644 --- a/arch/arm/mach-omap2/common-board-devices.c +++ b/arch/arm/mach-omap2/common-board-devices.c | |||
@@ -64,30 +64,36 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce, | |||
64 | struct spi_board_info *spi_bi = &ads7846_spi_board_info; | 64 | struct spi_board_info *spi_bi = &ads7846_spi_board_info; |
65 | int err; | 65 | int err; |
66 | 66 | ||
67 | err = gpio_request_one(gpio_pendown, GPIOF_IN, "TSPenDown"); | 67 | /* |
68 | if (err) { | 68 | * If a board defines get_pendown_state() function, request the pendown |
69 | pr_err("Couldn't obtain gpio for TSPenDown: %d\n", err); | 69 | * GPIO and set the GPIO debounce time. |
70 | return; | 70 | * If a board does not define the get_pendown_state() function, then |
71 | } | 71 | * the ads7846 driver will setup the pendown GPIO itself. |
72 | */ | ||
73 | if (board_pdata && board_pdata->get_pendown_state) { | ||
74 | err = gpio_request_one(gpio_pendown, GPIOF_IN, "TSPenDown"); | ||
75 | if (err) { | ||
76 | pr_err("Couldn't obtain gpio for TSPenDown: %d\n", err); | ||
77 | return; | ||
78 | } | ||
72 | 79 | ||
73 | if (gpio_debounce) | 80 | if (gpio_debounce) |
74 | gpio_set_debounce(gpio_pendown, gpio_debounce); | 81 | gpio_set_debounce(gpio_pendown, gpio_debounce); |
82 | |||
83 | gpio_export(gpio_pendown, 0); | ||
84 | } | ||
75 | 85 | ||
76 | spi_bi->bus_num = bus_num; | 86 | spi_bi->bus_num = bus_num; |
77 | spi_bi->irq = gpio_to_irq(gpio_pendown); | 87 | spi_bi->irq = gpio_to_irq(gpio_pendown); |
78 | 88 | ||
89 | ads7846_config.gpio_pendown = gpio_pendown; | ||
90 | |||
79 | if (board_pdata) { | 91 | if (board_pdata) { |
80 | board_pdata->gpio_pendown = gpio_pendown; | 92 | board_pdata->gpio_pendown = gpio_pendown; |
93 | board_pdata->gpio_pendown_debounce = gpio_debounce; | ||
81 | spi_bi->platform_data = board_pdata; | 94 | spi_bi->platform_data = board_pdata; |
82 | if (board_pdata->get_pendown_state) | ||
83 | gpio_export(gpio_pendown, 0); | ||
84 | } else { | ||
85 | ads7846_config.gpio_pendown = gpio_pendown; | ||
86 | } | 95 | } |
87 | 96 | ||
88 | if (!board_pdata || (board_pdata && !board_pdata->get_pendown_state)) | ||
89 | gpio_free(gpio_pendown); | ||
90 | |||
91 | spi_register_board_info(&ads7846_spi_board_info, 1); | 97 | spi_register_board_info(&ads7846_spi_board_info, 1); |
92 | } | 98 | } |
93 | #else | 99 | #else |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index cba60e05e32e..787a996ec4eb 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
20 | #include <linux/pinctrl/machine.h> | 20 | #include <linux/pinctrl/machine.h> |
21 | #include <linux/platform_data/omap4-keypad.h> | 21 | #include <linux/platform_data/omap4-keypad.h> |
22 | #include <linux/platform_data/omap_ocp2scp.h> | ||
22 | 23 | ||
23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
24 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
@@ -126,7 +127,7 @@ static struct platform_device omap2cam_device = { | |||
126 | 127 | ||
127 | #if defined(CONFIG_IOMMU_API) | 128 | #if defined(CONFIG_IOMMU_API) |
128 | 129 | ||
129 | #include <plat/iommu.h> | 130 | #include <linux/platform_data/iommu-omap.h> |
130 | 131 | ||
131 | static struct resource omap3isp_resources[] = { | 132 | static struct resource omap3isp_resources[] = { |
132 | { | 133 | { |
@@ -213,7 +214,7 @@ static struct platform_device omap3isp_device = { | |||
213 | }; | 214 | }; |
214 | 215 | ||
215 | static struct omap_iommu_arch_data omap3_isp_iommu = { | 216 | static struct omap_iommu_arch_data omap3_isp_iommu = { |
216 | .name = "isp", | 217 | .name = "mmu_isp", |
217 | }; | 218 | }; |
218 | 219 | ||
219 | int omap3_init_camera(struct isp_platform_data *pdata) | 220 | int omap3_init_camera(struct isp_platform_data *pdata) |
@@ -613,6 +614,83 @@ static void omap_init_vout(void) | |||
613 | static inline void omap_init_vout(void) {} | 614 | static inline void omap_init_vout(void) {} |
614 | #endif | 615 | #endif |
615 | 616 | ||
617 | #if defined(CONFIG_OMAP_OCP2SCP) || defined(CONFIG_OMAP_OCP2SCP_MODULE) | ||
618 | static int count_ocp2scp_devices(struct omap_ocp2scp_dev *ocp2scp_dev) | ||
619 | { | ||
620 | int cnt = 0; | ||
621 | |||
622 | while (ocp2scp_dev->drv_name != NULL) { | ||
623 | cnt++; | ||
624 | ocp2scp_dev++; | ||
625 | } | ||
626 | |||
627 | return cnt; | ||
628 | } | ||
629 | |||
630 | static void omap_init_ocp2scp(void) | ||
631 | { | ||
632 | struct omap_hwmod *oh; | ||
633 | struct platform_device *pdev; | ||
634 | int bus_id = -1, dev_cnt = 0, i; | ||
635 | struct omap_ocp2scp_dev *ocp2scp_dev; | ||
636 | const char *oh_name, *name; | ||
637 | struct omap_ocp2scp_platform_data *pdata; | ||
638 | |||
639 | if (!cpu_is_omap44xx()) | ||
640 | return; | ||
641 | |||
642 | oh_name = "ocp2scp_usb_phy"; | ||
643 | name = "omap-ocp2scp"; | ||
644 | |||
645 | oh = omap_hwmod_lookup(oh_name); | ||
646 | if (!oh) { | ||
647 | pr_err("%s: could not find omap_hwmod for %s\n", __func__, | ||
648 | oh_name); | ||
649 | return; | ||
650 | } | ||
651 | |||
652 | pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); | ||
653 | if (!pdata) { | ||
654 | pr_err("%s: No memory for ocp2scp pdata\n", __func__); | ||
655 | return; | ||
656 | } | ||
657 | |||
658 | ocp2scp_dev = oh->dev_attr; | ||
659 | dev_cnt = count_ocp2scp_devices(ocp2scp_dev); | ||
660 | |||
661 | if (!dev_cnt) { | ||
662 | pr_err("%s: No devices connected to ocp2scp\n", __func__); | ||
663 | kfree(pdata); | ||
664 | return; | ||
665 | } | ||
666 | |||
667 | pdata->devices = kzalloc(sizeof(struct omap_ocp2scp_dev *) | ||
668 | * dev_cnt, GFP_KERNEL); | ||
669 | if (!pdata->devices) { | ||
670 | pr_err("%s: No memory for ocp2scp pdata devices\n", __func__); | ||
671 | kfree(pdata); | ||
672 | return; | ||
673 | } | ||
674 | |||
675 | for (i = 0; i < dev_cnt; i++, ocp2scp_dev++) | ||
676 | pdata->devices[i] = ocp2scp_dev; | ||
677 | |||
678 | pdata->dev_cnt = dev_cnt; | ||
679 | |||
680 | pdev = omap_device_build(name, bus_id, oh, pdata, sizeof(*pdata), NULL, | ||
681 | 0, false); | ||
682 | if (IS_ERR(pdev)) { | ||
683 | pr_err("Could not build omap_device for %s %s\n", | ||
684 | name, oh_name); | ||
685 | kfree(pdata->devices); | ||
686 | kfree(pdata); | ||
687 | return; | ||
688 | } | ||
689 | } | ||
690 | #else | ||
691 | static inline void omap_init_ocp2scp(void) { } | ||
692 | #endif | ||
693 | |||
616 | /*-------------------------------------------------------------------------*/ | 694 | /*-------------------------------------------------------------------------*/ |
617 | 695 | ||
618 | static int __init omap2_init_devices(void) | 696 | static int __init omap2_init_devices(void) |
@@ -640,6 +718,7 @@ static int __init omap2_init_devices(void) | |||
640 | omap_init_sham(); | 718 | omap_init_sham(); |
641 | omap_init_aes(); | 719 | omap_init_aes(); |
642 | omap_init_vout(); | 720 | omap_init_vout(); |
721 | omap_init_ocp2scp(); | ||
643 | 722 | ||
644 | return 0; | 723 | return 0; |
645 | } | 724 | } |
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c deleted file mode 100644 index eefc37912ef3..000000000000 --- a/arch/arm/mach-omap2/iommu2.c +++ /dev/null | |||
@@ -1,361 +0,0 @@ | |||
1 | /* | ||
2 | * omap iommu: omap2/3 architecture specific functions | ||
3 | * | ||
4 | * Copyright (C) 2008-2009 Nokia Corporation | ||
5 | * | ||
6 | * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com>, | ||
7 | * Paul Mundt and Toshihiro Kobayashi | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/err.h> | ||
15 | #include <linux/device.h> | ||
16 | #include <linux/jiffies.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/slab.h> | ||
19 | #include <linux/stringify.h> | ||
20 | |||
21 | #include <plat/iommu.h> | ||
22 | |||
23 | /* | ||
24 | * omap2 architecture specific register bit definitions | ||
25 | */ | ||
26 | #define IOMMU_ARCH_VERSION 0x00000011 | ||
27 | |||
28 | /* SYSCONF */ | ||
29 | #define MMU_SYS_IDLE_SHIFT 3 | ||
30 | #define MMU_SYS_IDLE_FORCE (0 << MMU_SYS_IDLE_SHIFT) | ||
31 | #define MMU_SYS_IDLE_NONE (1 << MMU_SYS_IDLE_SHIFT) | ||
32 | #define MMU_SYS_IDLE_SMART (2 << MMU_SYS_IDLE_SHIFT) | ||
33 | #define MMU_SYS_IDLE_MASK (3 << MMU_SYS_IDLE_SHIFT) | ||
34 | |||
35 | #define MMU_SYS_SOFTRESET (1 << 1) | ||
36 | #define MMU_SYS_AUTOIDLE 1 | ||
37 | |||
38 | /* SYSSTATUS */ | ||
39 | #define MMU_SYS_RESETDONE 1 | ||
40 | |||
41 | /* IRQSTATUS & IRQENABLE */ | ||
42 | #define MMU_IRQ_MULTIHITFAULT (1 << 4) | ||
43 | #define MMU_IRQ_TABLEWALKFAULT (1 << 3) | ||
44 | #define MMU_IRQ_EMUMISS (1 << 2) | ||
45 | #define MMU_IRQ_TRANSLATIONFAULT (1 << 1) | ||
46 | #define MMU_IRQ_TLBMISS (1 << 0) | ||
47 | |||
48 | #define __MMU_IRQ_FAULT \ | ||
49 | (MMU_IRQ_MULTIHITFAULT | MMU_IRQ_EMUMISS | MMU_IRQ_TRANSLATIONFAULT) | ||
50 | #define MMU_IRQ_MASK \ | ||
51 | (__MMU_IRQ_FAULT | MMU_IRQ_TABLEWALKFAULT | MMU_IRQ_TLBMISS) | ||
52 | #define MMU_IRQ_TWL_MASK (__MMU_IRQ_FAULT | MMU_IRQ_TABLEWALKFAULT) | ||
53 | #define MMU_IRQ_TLB_MISS_MASK (__MMU_IRQ_FAULT | MMU_IRQ_TLBMISS) | ||
54 | |||
55 | /* MMU_CNTL */ | ||
56 | #define MMU_CNTL_SHIFT 1 | ||
57 | #define MMU_CNTL_MASK (7 << MMU_CNTL_SHIFT) | ||
58 | #define MMU_CNTL_EML_TLB (1 << 3) | ||
59 | #define MMU_CNTL_TWL_EN (1 << 2) | ||
60 | #define MMU_CNTL_MMU_EN (1 << 1) | ||
61 | |||
62 | #define get_cam_va_mask(pgsz) \ | ||
63 | (((pgsz) == MMU_CAM_PGSZ_16M) ? 0xff000000 : \ | ||
64 | ((pgsz) == MMU_CAM_PGSZ_1M) ? 0xfff00000 : \ | ||
65 | ((pgsz) == MMU_CAM_PGSZ_64K) ? 0xffff0000 : \ | ||
66 | ((pgsz) == MMU_CAM_PGSZ_4K) ? 0xfffff000 : 0) | ||
67 | |||
68 | |||
69 | static void __iommu_set_twl(struct omap_iommu *obj, bool on) | ||
70 | { | ||
71 | u32 l = iommu_read_reg(obj, MMU_CNTL); | ||
72 | |||
73 | if (on) | ||
74 | iommu_write_reg(obj, MMU_IRQ_TWL_MASK, MMU_IRQENABLE); | ||
75 | else | ||
76 | iommu_write_reg(obj, MMU_IRQ_TLB_MISS_MASK, MMU_IRQENABLE); | ||
77 | |||
78 | l &= ~MMU_CNTL_MASK; | ||
79 | if (on) | ||
80 | l |= (MMU_CNTL_MMU_EN | MMU_CNTL_TWL_EN); | ||
81 | else | ||
82 | l |= (MMU_CNTL_MMU_EN); | ||
83 | |||
84 | iommu_write_reg(obj, l, MMU_CNTL); | ||
85 | } | ||
86 | |||
87 | |||
88 | static int omap2_iommu_enable(struct omap_iommu *obj) | ||
89 | { | ||
90 | u32 l, pa; | ||
91 | unsigned long timeout; | ||
92 | |||
93 | if (!obj->iopgd || !IS_ALIGNED((u32)obj->iopgd, SZ_16K)) | ||
94 | return -EINVAL; | ||
95 | |||
96 | pa = virt_to_phys(obj->iopgd); | ||
97 | if (!IS_ALIGNED(pa, SZ_16K)) | ||
98 | return -EINVAL; | ||
99 | |||
100 | iommu_write_reg(obj, MMU_SYS_SOFTRESET, MMU_SYSCONFIG); | ||
101 | |||
102 | timeout = jiffies + msecs_to_jiffies(20); | ||
103 | do { | ||
104 | l = iommu_read_reg(obj, MMU_SYSSTATUS); | ||
105 | if (l & MMU_SYS_RESETDONE) | ||
106 | break; | ||
107 | } while (!time_after(jiffies, timeout)); | ||
108 | |||
109 | if (!(l & MMU_SYS_RESETDONE)) { | ||
110 | dev_err(obj->dev, "can't take mmu out of reset\n"); | ||
111 | return -ENODEV; | ||
112 | } | ||
113 | |||
114 | l = iommu_read_reg(obj, MMU_REVISION); | ||
115 | dev_info(obj->dev, "%s: version %d.%d\n", obj->name, | ||
116 | (l >> 4) & 0xf, l & 0xf); | ||
117 | |||
118 | l = iommu_read_reg(obj, MMU_SYSCONFIG); | ||
119 | l &= ~MMU_SYS_IDLE_MASK; | ||
120 | l |= (MMU_SYS_IDLE_SMART | MMU_SYS_AUTOIDLE); | ||
121 | iommu_write_reg(obj, l, MMU_SYSCONFIG); | ||
122 | |||
123 | iommu_write_reg(obj, pa, MMU_TTB); | ||
124 | |||
125 | __iommu_set_twl(obj, true); | ||
126 | |||
127 | return 0; | ||
128 | } | ||
129 | |||
130 | static void omap2_iommu_disable(struct omap_iommu *obj) | ||
131 | { | ||
132 | u32 l = iommu_read_reg(obj, MMU_CNTL); | ||
133 | |||
134 | l &= ~MMU_CNTL_MASK; | ||
135 | iommu_write_reg(obj, l, MMU_CNTL); | ||
136 | iommu_write_reg(obj, MMU_SYS_IDLE_FORCE, MMU_SYSCONFIG); | ||
137 | |||
138 | dev_dbg(obj->dev, "%s is shutting down\n", obj->name); | ||
139 | } | ||
140 | |||
141 | static void omap2_iommu_set_twl(struct omap_iommu *obj, bool on) | ||
142 | { | ||
143 | __iommu_set_twl(obj, false); | ||
144 | } | ||
145 | |||
146 | static u32 omap2_iommu_fault_isr(struct omap_iommu *obj, u32 *ra) | ||
147 | { | ||
148 | u32 stat, da; | ||
149 | u32 errs = 0; | ||
150 | |||
151 | stat = iommu_read_reg(obj, MMU_IRQSTATUS); | ||
152 | stat &= MMU_IRQ_MASK; | ||
153 | if (!stat) { | ||
154 | *ra = 0; | ||
155 | return 0; | ||
156 | } | ||
157 | |||
158 | da = iommu_read_reg(obj, MMU_FAULT_AD); | ||
159 | *ra = da; | ||
160 | |||
161 | if (stat & MMU_IRQ_TLBMISS) | ||
162 | errs |= OMAP_IOMMU_ERR_TLB_MISS; | ||
163 | if (stat & MMU_IRQ_TRANSLATIONFAULT) | ||
164 | errs |= OMAP_IOMMU_ERR_TRANS_FAULT; | ||
165 | if (stat & MMU_IRQ_EMUMISS) | ||
166 | errs |= OMAP_IOMMU_ERR_EMU_MISS; | ||
167 | if (stat & MMU_IRQ_TABLEWALKFAULT) | ||
168 | errs |= OMAP_IOMMU_ERR_TBLWALK_FAULT; | ||
169 | if (stat & MMU_IRQ_MULTIHITFAULT) | ||
170 | errs |= OMAP_IOMMU_ERR_MULTIHIT_FAULT; | ||
171 | iommu_write_reg(obj, stat, MMU_IRQSTATUS); | ||
172 | |||
173 | return errs; | ||
174 | } | ||
175 | |||
176 | static void omap2_tlb_read_cr(struct omap_iommu *obj, struct cr_regs *cr) | ||
177 | { | ||
178 | cr->cam = iommu_read_reg(obj, MMU_READ_CAM); | ||
179 | cr->ram = iommu_read_reg(obj, MMU_READ_RAM); | ||
180 | } | ||
181 | |||
182 | static void omap2_tlb_load_cr(struct omap_iommu *obj, struct cr_regs *cr) | ||
183 | { | ||
184 | iommu_write_reg(obj, cr->cam | MMU_CAM_V, MMU_CAM); | ||
185 | iommu_write_reg(obj, cr->ram, MMU_RAM); | ||
186 | } | ||
187 | |||
188 | static u32 omap2_cr_to_virt(struct cr_regs *cr) | ||
189 | { | ||
190 | u32 page_size = cr->cam & MMU_CAM_PGSZ_MASK; | ||
191 | u32 mask = get_cam_va_mask(cr->cam & page_size); | ||
192 | |||
193 | return cr->cam & mask; | ||
194 | } | ||
195 | |||
196 | static struct cr_regs *omap2_alloc_cr(struct omap_iommu *obj, | ||
197 | struct iotlb_entry *e) | ||
198 | { | ||
199 | struct cr_regs *cr; | ||
200 | |||
201 | if (e->da & ~(get_cam_va_mask(e->pgsz))) { | ||
202 | dev_err(obj->dev, "%s:\twrong alignment: %08x\n", __func__, | ||
203 | e->da); | ||
204 | return ERR_PTR(-EINVAL); | ||
205 | } | ||
206 | |||
207 | cr = kmalloc(sizeof(*cr), GFP_KERNEL); | ||
208 | if (!cr) | ||
209 | return ERR_PTR(-ENOMEM); | ||
210 | |||
211 | cr->cam = (e->da & MMU_CAM_VATAG_MASK) | e->prsvd | e->pgsz | e->valid; | ||
212 | cr->ram = e->pa | e->endian | e->elsz | e->mixed; | ||
213 | |||
214 | return cr; | ||
215 | } | ||
216 | |||
217 | static inline int omap2_cr_valid(struct cr_regs *cr) | ||
218 | { | ||
219 | return cr->cam & MMU_CAM_V; | ||
220 | } | ||
221 | |||
222 | static u32 omap2_get_pte_attr(struct iotlb_entry *e) | ||
223 | { | ||
224 | u32 attr; | ||
225 | |||
226 | attr = e->mixed << 5; | ||
227 | attr |= e->endian; | ||
228 | attr |= e->elsz >> 3; | ||
229 | attr <<= (((e->pgsz == MMU_CAM_PGSZ_4K) || | ||
230 | (e->pgsz == MMU_CAM_PGSZ_64K)) ? 0 : 6); | ||
231 | return attr; | ||
232 | } | ||
233 | |||
234 | static ssize_t | ||
235 | omap2_dump_cr(struct omap_iommu *obj, struct cr_regs *cr, char *buf) | ||
236 | { | ||
237 | char *p = buf; | ||
238 | |||
239 | /* FIXME: Need more detail analysis of cam/ram */ | ||
240 | p += sprintf(p, "%08x %08x %01x\n", cr->cam, cr->ram, | ||
241 | (cr->cam & MMU_CAM_P) ? 1 : 0); | ||
242 | |||
243 | return p - buf; | ||
244 | } | ||
245 | |||
246 | #define pr_reg(name) \ | ||
247 | do { \ | ||
248 | ssize_t bytes; \ | ||
249 | const char *str = "%20s: %08x\n"; \ | ||
250 | const int maxcol = 32; \ | ||
251 | bytes = snprintf(p, maxcol, str, __stringify(name), \ | ||
252 | iommu_read_reg(obj, MMU_##name)); \ | ||
253 | p += bytes; \ | ||
254 | len -= bytes; \ | ||
255 | if (len < maxcol) \ | ||
256 | goto out; \ | ||
257 | } while (0) | ||
258 | |||
259 | static ssize_t | ||
260 | omap2_iommu_dump_ctx(struct omap_iommu *obj, char *buf, ssize_t len) | ||
261 | { | ||
262 | char *p = buf; | ||
263 | |||
264 | pr_reg(REVISION); | ||
265 | pr_reg(SYSCONFIG); | ||
266 | pr_reg(SYSSTATUS); | ||
267 | pr_reg(IRQSTATUS); | ||
268 | pr_reg(IRQENABLE); | ||
269 | pr_reg(WALKING_ST); | ||
270 | pr_reg(CNTL); | ||
271 | pr_reg(FAULT_AD); | ||
272 | pr_reg(TTB); | ||
273 | pr_reg(LOCK); | ||
274 | pr_reg(LD_TLB); | ||
275 | pr_reg(CAM); | ||
276 | pr_reg(RAM); | ||
277 | pr_reg(GFLUSH); | ||
278 | pr_reg(FLUSH_ENTRY); | ||
279 | pr_reg(READ_CAM); | ||
280 | pr_reg(READ_RAM); | ||
281 | pr_reg(EMU_FAULT_AD); | ||
282 | out: | ||
283 | return p - buf; | ||
284 | } | ||
285 | |||
286 | static void omap2_iommu_save_ctx(struct omap_iommu *obj) | ||
287 | { | ||
288 | int i; | ||
289 | u32 *p = obj->ctx; | ||
290 | |||
291 | for (i = 0; i < (MMU_REG_SIZE / sizeof(u32)); i++) { | ||
292 | p[i] = iommu_read_reg(obj, i * sizeof(u32)); | ||
293 | dev_dbg(obj->dev, "%s\t[%02d] %08x\n", __func__, i, p[i]); | ||
294 | } | ||
295 | |||
296 | BUG_ON(p[0] != IOMMU_ARCH_VERSION); | ||
297 | } | ||
298 | |||
299 | static void omap2_iommu_restore_ctx(struct omap_iommu *obj) | ||
300 | { | ||
301 | int i; | ||
302 | u32 *p = obj->ctx; | ||
303 | |||
304 | for (i = 0; i < (MMU_REG_SIZE / sizeof(u32)); i++) { | ||
305 | iommu_write_reg(obj, p[i], i * sizeof(u32)); | ||
306 | dev_dbg(obj->dev, "%s\t[%02d] %08x\n", __func__, i, p[i]); | ||
307 | } | ||
308 | |||
309 | BUG_ON(p[0] != IOMMU_ARCH_VERSION); | ||
310 | } | ||
311 | |||
312 | static void omap2_cr_to_e(struct cr_regs *cr, struct iotlb_entry *e) | ||
313 | { | ||
314 | e->da = cr->cam & MMU_CAM_VATAG_MASK; | ||
315 | e->pa = cr->ram & MMU_RAM_PADDR_MASK; | ||
316 | e->valid = cr->cam & MMU_CAM_V; | ||
317 | e->pgsz = cr->cam & MMU_CAM_PGSZ_MASK; | ||
318 | e->endian = cr->ram & MMU_RAM_ENDIAN_MASK; | ||
319 | e->elsz = cr->ram & MMU_RAM_ELSZ_MASK; | ||
320 | e->mixed = cr->ram & MMU_RAM_MIXED; | ||
321 | } | ||
322 | |||
323 | static const struct iommu_functions omap2_iommu_ops = { | ||
324 | .version = IOMMU_ARCH_VERSION, | ||
325 | |||
326 | .enable = omap2_iommu_enable, | ||
327 | .disable = omap2_iommu_disable, | ||
328 | .set_twl = omap2_iommu_set_twl, | ||
329 | .fault_isr = omap2_iommu_fault_isr, | ||
330 | |||
331 | .tlb_read_cr = omap2_tlb_read_cr, | ||
332 | .tlb_load_cr = omap2_tlb_load_cr, | ||
333 | |||
334 | .cr_to_e = omap2_cr_to_e, | ||
335 | .cr_to_virt = omap2_cr_to_virt, | ||
336 | .alloc_cr = omap2_alloc_cr, | ||
337 | .cr_valid = omap2_cr_valid, | ||
338 | .dump_cr = omap2_dump_cr, | ||
339 | |||
340 | .get_pte_attr = omap2_get_pte_attr, | ||
341 | |||
342 | .save_ctx = omap2_iommu_save_ctx, | ||
343 | .restore_ctx = omap2_iommu_restore_ctx, | ||
344 | .dump_ctx = omap2_iommu_dump_ctx, | ||
345 | }; | ||
346 | |||
347 | static int __init omap2_iommu_init(void) | ||
348 | { | ||
349 | return omap_install_iommu_arch(&omap2_iommu_ops); | ||
350 | } | ||
351 | module_init(omap2_iommu_init); | ||
352 | |||
353 | static void __exit omap2_iommu_exit(void) | ||
354 | { | ||
355 | omap_uninstall_iommu_arch(&omap2_iommu_ops); | ||
356 | } | ||
357 | module_exit(omap2_iommu_exit); | ||
358 | |||
359 | MODULE_AUTHOR("Hiroshi DOYU, Paul Mundt and Toshihiro Kobayashi"); | ||
360 | MODULE_DESCRIPTION("omap iommu: omap2/3 architecture specific functions"); | ||
361 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/arch/arm/mach-omap2/mux34xx.c b/arch/arm/mach-omap2/mux34xx.c index 17f80e4ab162..c47140bbbec4 100644 --- a/arch/arm/mach-omap2/mux34xx.c +++ b/arch/arm/mach-omap2/mux34xx.c | |||
@@ -614,16 +614,16 @@ static struct omap_mux __initdata omap3_muxmodes[] = { | |||
614 | "sys_off_mode", NULL, NULL, NULL, | 614 | "sys_off_mode", NULL, NULL, NULL, |
615 | "gpio_9", NULL, NULL, "safe_mode"), | 615 | "gpio_9", NULL, NULL, "safe_mode"), |
616 | _OMAP3_MUXENTRY(UART1_CTS, 150, | 616 | _OMAP3_MUXENTRY(UART1_CTS, 150, |
617 | "uart1_cts", NULL, NULL, NULL, | 617 | "uart1_cts", "ssi1_rdy_tx", NULL, NULL, |
618 | "gpio_150", "hsusb3_tll_clk", NULL, "safe_mode"), | 618 | "gpio_150", "hsusb3_tll_clk", NULL, "safe_mode"), |
619 | _OMAP3_MUXENTRY(UART1_RTS, 149, | 619 | _OMAP3_MUXENTRY(UART1_RTS, 149, |
620 | "uart1_rts", NULL, NULL, NULL, | 620 | "uart1_rts", "ssi1_flag_tx", NULL, NULL, |
621 | "gpio_149", NULL, NULL, "safe_mode"), | 621 | "gpio_149", NULL, NULL, "safe_mode"), |
622 | _OMAP3_MUXENTRY(UART1_RX, 151, | 622 | _OMAP3_MUXENTRY(UART1_RX, 151, |
623 | "uart1_rx", NULL, "mcbsp1_clkr", "mcspi4_clk", | 623 | "uart1_rx", "ss1_wake_tx", "mcbsp1_clkr", "mcspi4_clk", |
624 | "gpio_151", NULL, NULL, "safe_mode"), | 624 | "gpio_151", NULL, NULL, "safe_mode"), |
625 | _OMAP3_MUXENTRY(UART1_TX, 148, | 625 | _OMAP3_MUXENTRY(UART1_TX, 148, |
626 | "uart1_tx", NULL, NULL, NULL, | 626 | "uart1_tx", "ssi1_dat_tx", NULL, NULL, |
627 | "gpio_148", NULL, NULL, "safe_mode"), | 627 | "gpio_148", NULL, NULL, "safe_mode"), |
628 | _OMAP3_MUXENTRY(UART2_CTS, 144, | 628 | _OMAP3_MUXENTRY(UART2_CTS, 144, |
629 | "uart2_cts", "mcbsp3_dx", "gpt9_pwm_evt", NULL, | 629 | "uart2_cts", "mcbsp3_dx", "gpt9_pwm_evt", NULL, |
diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c index df298d46707c..7642fc4672c1 100644 --- a/arch/arm/mach-omap2/omap-iommu.c +++ b/arch/arm/mach-omap2/omap-iommu.c | |||
@@ -12,153 +12,60 @@ | |||
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/err.h> | ||
16 | #include <linux/slab.h> | ||
15 | 17 | ||
16 | #include <plat/iommu.h> | 18 | #include <linux/platform_data/iommu-omap.h> |
19 | #include <plat/omap_hwmod.h> | ||
20 | #include <plat/omap_device.h> | ||
17 | 21 | ||
18 | #include "soc.h" | 22 | static int __init omap_iommu_dev_init(struct omap_hwmod *oh, void *unused) |
19 | #include "common.h" | ||
20 | |||
21 | struct iommu_device { | ||
22 | resource_size_t base; | ||
23 | int irq; | ||
24 | struct iommu_platform_data pdata; | ||
25 | struct resource res[2]; | ||
26 | }; | ||
27 | static struct iommu_device *devices; | ||
28 | static int num_iommu_devices; | ||
29 | |||
30 | #ifdef CONFIG_ARCH_OMAP3 | ||
31 | static struct iommu_device omap3_devices[] = { | ||
32 | { | ||
33 | .base = 0x480bd400, | ||
34 | .irq = 24 + OMAP_INTC_START, | ||
35 | .pdata = { | ||
36 | .name = "isp", | ||
37 | .nr_tlb_entries = 8, | ||
38 | .clk_name = "cam_ick", | ||
39 | .da_start = 0x0, | ||
40 | .da_end = 0xFFFFF000, | ||
41 | }, | ||
42 | }, | ||
43 | #if defined(CONFIG_OMAP_IOMMU_IVA2) | ||
44 | { | ||
45 | .base = 0x5d000000, | ||
46 | .irq = 28 + OMAP_INTC_START, | ||
47 | .pdata = { | ||
48 | .name = "iva2", | ||
49 | .nr_tlb_entries = 32, | ||
50 | .clk_name = "iva2_ck", | ||
51 | .da_start = 0x11000000, | ||
52 | .da_end = 0xFFFFF000, | ||
53 | }, | ||
54 | }, | ||
55 | #endif | ||
56 | }; | ||
57 | #define NR_OMAP3_IOMMU_DEVICES ARRAY_SIZE(omap3_devices) | ||
58 | static struct platform_device *omap3_iommu_pdev[NR_OMAP3_IOMMU_DEVICES]; | ||
59 | #else | ||
60 | #define omap3_devices NULL | ||
61 | #define NR_OMAP3_IOMMU_DEVICES 0 | ||
62 | #define omap3_iommu_pdev NULL | ||
63 | #endif | ||
64 | |||
65 | #ifdef CONFIG_ARCH_OMAP4 | ||
66 | static struct iommu_device omap4_devices[] = { | ||
67 | { | ||
68 | .base = OMAP4_MMU1_BASE, | ||
69 | .irq = 100 + OMAP44XX_IRQ_GIC_START, | ||
70 | .pdata = { | ||
71 | .name = "ducati", | ||
72 | .nr_tlb_entries = 32, | ||
73 | .clk_name = "ipu_fck", | ||
74 | .da_start = 0x0, | ||
75 | .da_end = 0xFFFFF000, | ||
76 | }, | ||
77 | }, | ||
78 | { | ||
79 | .base = OMAP4_MMU2_BASE, | ||
80 | .irq = 28 + OMAP44XX_IRQ_GIC_START, | ||
81 | .pdata = { | ||
82 | .name = "tesla", | ||
83 | .nr_tlb_entries = 32, | ||
84 | .clk_name = "dsp_fck", | ||
85 | .da_start = 0x0, | ||
86 | .da_end = 0xFFFFF000, | ||
87 | }, | ||
88 | }, | ||
89 | }; | ||
90 | #define NR_OMAP4_IOMMU_DEVICES ARRAY_SIZE(omap4_devices) | ||
91 | static struct platform_device *omap4_iommu_pdev[NR_OMAP4_IOMMU_DEVICES]; | ||
92 | #else | ||
93 | #define omap4_devices NULL | ||
94 | #define NR_OMAP4_IOMMU_DEVICES 0 | ||
95 | #define omap4_iommu_pdev NULL | ||
96 | #endif | ||
97 | |||
98 | static struct platform_device **omap_iommu_pdev; | ||
99 | |||
100 | static int __init omap_iommu_init(void) | ||
101 | { | 23 | { |
102 | int i, err; | 24 | struct platform_device *pdev; |
103 | struct resource res[] = { | 25 | struct iommu_platform_data *pdata; |
104 | { .flags = IORESOURCE_MEM }, | 26 | struct omap_mmu_dev_attr *a = (struct omap_mmu_dev_attr *)oh->dev_attr; |
105 | { .flags = IORESOURCE_IRQ }, | 27 | static int i; |
106 | }; | 28 | |
29 | pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); | ||
30 | if (!pdata) | ||
31 | return -ENOMEM; | ||
32 | |||
33 | pdata->name = oh->name; | ||
34 | pdata->nr_tlb_entries = a->nr_tlb_entries; | ||
35 | pdata->da_start = a->da_start; | ||
36 | pdata->da_end = a->da_end; | ||
37 | |||
38 | if (oh->rst_lines_cnt == 1) { | ||
39 | pdata->reset_name = oh->rst_lines->name; | ||
40 | pdata->assert_reset = omap_device_assert_hardreset; | ||
41 | pdata->deassert_reset = omap_device_deassert_hardreset; | ||
42 | } | ||
107 | 43 | ||
108 | if (cpu_is_omap34xx()) { | 44 | pdev = omap_device_build("omap-iommu", i, oh, pdata, sizeof(*pdata), |
109 | devices = omap3_devices; | 45 | NULL, 0, 0); |
110 | omap_iommu_pdev = omap3_iommu_pdev; | ||
111 | num_iommu_devices = NR_OMAP3_IOMMU_DEVICES; | ||
112 | } else if (cpu_is_omap44xx()) { | ||
113 | devices = omap4_devices; | ||
114 | omap_iommu_pdev = omap4_iommu_pdev; | ||
115 | num_iommu_devices = NR_OMAP4_IOMMU_DEVICES; | ||
116 | } else | ||
117 | return -ENODEV; | ||
118 | 46 | ||
119 | for (i = 0; i < num_iommu_devices; i++) { | 47 | kfree(pdata); |
120 | struct platform_device *pdev; | ||
121 | const struct iommu_device *d = &devices[i]; | ||
122 | 48 | ||
123 | pdev = platform_device_alloc("omap-iommu", i); | 49 | if (IS_ERR(pdev)) { |
124 | if (!pdev) { | 50 | pr_err("%s: device build err: %ld\n", __func__, PTR_ERR(pdev)); |
125 | err = -ENOMEM; | 51 | return PTR_ERR(pdev); |
126 | goto err_out; | 52 | } |
127 | } | ||
128 | 53 | ||
129 | res[0].start = d->base; | 54 | i++; |
130 | res[0].end = d->base + MMU_REG_SIZE - 1; | ||
131 | res[1].start = res[1].end = d->irq; | ||
132 | 55 | ||
133 | err = platform_device_add_resources(pdev, res, | ||
134 | ARRAY_SIZE(res)); | ||
135 | if (err) | ||
136 | goto err_out; | ||
137 | err = platform_device_add_data(pdev, &d->pdata, | ||
138 | sizeof(d->pdata)); | ||
139 | if (err) | ||
140 | goto err_out; | ||
141 | err = platform_device_add(pdev); | ||
142 | if (err) | ||
143 | goto err_out; | ||
144 | omap_iommu_pdev[i] = pdev; | ||
145 | } | ||
146 | return 0; | 56 | return 0; |
57 | } | ||
147 | 58 | ||
148 | err_out: | 59 | static int __init omap_iommu_init(void) |
149 | while (i--) | 60 | { |
150 | platform_device_put(omap_iommu_pdev[i]); | 61 | return omap_hwmod_for_each_by_class("mmu", omap_iommu_dev_init, NULL); |
151 | return err; | ||
152 | } | 62 | } |
153 | /* must be ready before omap3isp is probed */ | 63 | /* must be ready before omap3isp is probed */ |
154 | subsys_initcall(omap_iommu_init); | 64 | subsys_initcall(omap_iommu_init); |
155 | 65 | ||
156 | static void __exit omap_iommu_exit(void) | 66 | static void __exit omap_iommu_exit(void) |
157 | { | 67 | { |
158 | int i; | 68 | /* Do nothing */ |
159 | |||
160 | for (i = 0; i < num_iommu_devices; i++) | ||
161 | platform_device_unregister(omap_iommu_pdev[i]); | ||
162 | } | 69 | } |
163 | module_exit(omap_iommu_exit); | 70 | module_exit(omap_iommu_exit); |
164 | 71 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index b969ab1d258b..87cc6d058de2 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -422,6 +422,38 @@ static int _set_softreset(struct omap_hwmod *oh, u32 *v) | |||
422 | } | 422 | } |
423 | 423 | ||
424 | /** | 424 | /** |
425 | * _wait_softreset_complete - wait for an OCP softreset to complete | ||
426 | * @oh: struct omap_hwmod * to wait on | ||
427 | * | ||
428 | * Wait until the IP block represented by @oh reports that its OCP | ||
429 | * softreset is complete. This can be triggered by software (see | ||
430 | * _ocp_softreset()) or by hardware upon returning from off-mode (one | ||
431 | * example is HSMMC). Waits for up to MAX_MODULE_SOFTRESET_WAIT | ||
432 | * microseconds. Returns the number of microseconds waited. | ||
433 | */ | ||
434 | static int _wait_softreset_complete(struct omap_hwmod *oh) | ||
435 | { | ||
436 | struct omap_hwmod_class_sysconfig *sysc; | ||
437 | u32 softrst_mask; | ||
438 | int c = 0; | ||
439 | |||
440 | sysc = oh->class->sysc; | ||
441 | |||
442 | if (sysc->sysc_flags & SYSS_HAS_RESET_STATUS) | ||
443 | omap_test_timeout((omap_hwmod_read(oh, sysc->syss_offs) | ||
444 | & SYSS_RESETDONE_MASK), | ||
445 | MAX_MODULE_SOFTRESET_WAIT, c); | ||
446 | else if (sysc->sysc_flags & SYSC_HAS_RESET_STATUS) { | ||
447 | softrst_mask = (0x1 << sysc->sysc_fields->srst_shift); | ||
448 | omap_test_timeout(!(omap_hwmod_read(oh, sysc->sysc_offs) | ||
449 | & softrst_mask), | ||
450 | MAX_MODULE_SOFTRESET_WAIT, c); | ||
451 | } | ||
452 | |||
453 | return c; | ||
454 | } | ||
455 | |||
456 | /** | ||
425 | * _set_dmadisable: set OCP_SYSCONFIG.DMADISABLE bit in @v | 457 | * _set_dmadisable: set OCP_SYSCONFIG.DMADISABLE bit in @v |
426 | * @oh: struct omap_hwmod * | 458 | * @oh: struct omap_hwmod * |
427 | * | 459 | * |
@@ -1282,6 +1314,18 @@ static void _enable_sysc(struct omap_hwmod *oh) | |||
1282 | if (!oh->class->sysc) | 1314 | if (!oh->class->sysc) |
1283 | return; | 1315 | return; |
1284 | 1316 | ||
1317 | /* | ||
1318 | * Wait until reset has completed, this is needed as the IP | ||
1319 | * block is reset automatically by hardware in some cases | ||
1320 | * (off-mode for example), and the drivers require the | ||
1321 | * IP to be ready when they access it | ||
1322 | */ | ||
1323 | if (oh->flags & HWMOD_CONTROL_OPT_CLKS_IN_RESET) | ||
1324 | _enable_optional_clocks(oh); | ||
1325 | _wait_softreset_complete(oh); | ||
1326 | if (oh->flags & HWMOD_CONTROL_OPT_CLKS_IN_RESET) | ||
1327 | _disable_optional_clocks(oh); | ||
1328 | |||
1285 | v = oh->_sysc_cache; | 1329 | v = oh->_sysc_cache; |
1286 | sf = oh->class->sysc->sysc_flags; | 1330 | sf = oh->class->sysc->sysc_flags; |
1287 | 1331 | ||
@@ -1804,7 +1848,7 @@ static int _am33xx_disable_module(struct omap_hwmod *oh) | |||
1804 | */ | 1848 | */ |
1805 | static int _ocp_softreset(struct omap_hwmod *oh) | 1849 | static int _ocp_softreset(struct omap_hwmod *oh) |
1806 | { | 1850 | { |
1807 | u32 v, softrst_mask; | 1851 | u32 v; |
1808 | int c = 0; | 1852 | int c = 0; |
1809 | int ret = 0; | 1853 | int ret = 0; |
1810 | 1854 | ||
@@ -1834,19 +1878,7 @@ static int _ocp_softreset(struct omap_hwmod *oh) | |||
1834 | if (oh->class->sysc->srst_udelay) | 1878 | if (oh->class->sysc->srst_udelay) |
1835 | udelay(oh->class->sysc->srst_udelay); | 1879 | udelay(oh->class->sysc->srst_udelay); |
1836 | 1880 | ||
1837 | if (oh->class->sysc->sysc_flags & SYSS_HAS_RESET_STATUS) | 1881 | c = _wait_softreset_complete(oh); |
1838 | omap_test_timeout((omap_hwmod_read(oh, | ||
1839 | oh->class->sysc->syss_offs) | ||
1840 | & SYSS_RESETDONE_MASK), | ||
1841 | MAX_MODULE_SOFTRESET_WAIT, c); | ||
1842 | else if (oh->class->sysc->sysc_flags & SYSC_HAS_RESET_STATUS) { | ||
1843 | softrst_mask = (0x1 << oh->class->sysc->sysc_fields->srst_shift); | ||
1844 | omap_test_timeout(!(omap_hwmod_read(oh, | ||
1845 | oh->class->sysc->sysc_offs) | ||
1846 | & softrst_mask), | ||
1847 | MAX_MODULE_SOFTRESET_WAIT, c); | ||
1848 | } | ||
1849 | |||
1850 | if (c == MAX_MODULE_SOFTRESET_WAIT) | 1882 | if (c == MAX_MODULE_SOFTRESET_WAIT) |
1851 | pr_warning("omap_hwmod: %s: softreset failed (waited %d usec)\n", | 1883 | pr_warning("omap_hwmod: %s: softreset failed (waited %d usec)\n", |
1852 | oh->name, MAX_MODULE_SOFTRESET_WAIT); | 1884 | oh->name, MAX_MODULE_SOFTRESET_WAIT); |
@@ -2352,6 +2384,9 @@ static int __init _setup_reset(struct omap_hwmod *oh) | |||
2352 | if (oh->_state != _HWMOD_STATE_INITIALIZED) | 2384 | if (oh->_state != _HWMOD_STATE_INITIALIZED) |
2353 | return -EINVAL; | 2385 | return -EINVAL; |
2354 | 2386 | ||
2387 | if (oh->flags & HWMOD_EXT_OPT_MAIN_CLK) | ||
2388 | return -EPERM; | ||
2389 | |||
2355 | if (oh->rst_lines_cnt == 0) { | 2390 | if (oh->rst_lines_cnt == 0) { |
2356 | r = _enable(oh); | 2391 | r = _enable(oh); |
2357 | if (r) { | 2392 | if (r) { |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index f67b7ee07dd4..621bc7137233 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -26,8 +26,8 @@ | |||
26 | #include <plat/mmc.h> | 26 | #include <plat/mmc.h> |
27 | #include <linux/platform_data/asoc-ti-mcbsp.h> | 27 | #include <linux/platform_data/asoc-ti-mcbsp.h> |
28 | #include <linux/platform_data/spi-omap2-mcspi.h> | 28 | #include <linux/platform_data/spi-omap2-mcspi.h> |
29 | #include <linux/platform_data/iommu-omap.h> | ||
29 | #include <plat/dmtimer.h> | 30 | #include <plat/dmtimer.h> |
30 | #include <plat/iommu.h> | ||
31 | 31 | ||
32 | #include "am35xx.h" | 32 | #include "am35xx.h" |
33 | 33 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 652d0285bd6d..4b985b9b81d0 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -21,16 +21,17 @@ | |||
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/platform_data/gpio-omap.h> | 22 | #include <linux/platform_data/gpio-omap.h> |
23 | #include <linux/power/smartreflex.h> | 23 | #include <linux/power/smartreflex.h> |
24 | #include <linux/platform_data/omap_ocp2scp.h> | ||
24 | 25 | ||
25 | #include <plat/omap_hwmod.h> | 26 | #include <plat/omap_hwmod.h> |
26 | #include <plat/i2c.h> | 27 | #include <plat/i2c.h> |
27 | #include <plat/dma.h> | 28 | #include <plat/dma.h> |
28 | #include <linux/platform_data/spi-omap2-mcspi.h> | 29 | #include <linux/platform_data/spi-omap2-mcspi.h> |
29 | #include <linux/platform_data/asoc-ti-mcbsp.h> | 30 | #include <linux/platform_data/asoc-ti-mcbsp.h> |
31 | #include <linux/platform_data/iommu-omap.h> | ||
30 | #include <plat/mmc.h> | 32 | #include <plat/mmc.h> |
31 | #include <plat/dmtimer.h> | 33 | #include <plat/dmtimer.h> |
32 | #include <plat/common.h> | 34 | #include <plat/common.h> |
33 | #include <plat/iommu.h> | ||
34 | 35 | ||
35 | #include "omap_hwmod_common_data.h" | 36 | #include "omap_hwmod_common_data.h" |
36 | #include "cm1_44xx.h" | 37 | #include "cm1_44xx.h" |
@@ -650,7 +651,7 @@ static struct omap_hwmod omap44xx_dsp_hwmod = { | |||
650 | .mpu_irqs = omap44xx_dsp_irqs, | 651 | .mpu_irqs = omap44xx_dsp_irqs, |
651 | .rst_lines = omap44xx_dsp_resets, | 652 | .rst_lines = omap44xx_dsp_resets, |
652 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets), | 653 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets), |
653 | .main_clk = "dsp_fck", | 654 | .main_clk = "dpll_iva_m4x2_ck", |
654 | .prcm = { | 655 | .prcm = { |
655 | .omap4 = { | 656 | .omap4 = { |
656 | .clkctrl_offs = OMAP4_CM_TESLA_TESLA_CLKCTRL_OFFSET, | 657 | .clkctrl_offs = OMAP4_CM_TESLA_TESLA_CLKCTRL_OFFSET, |
@@ -1677,7 +1678,7 @@ static struct omap_hwmod omap44xx_ipu_hwmod = { | |||
1677 | .mpu_irqs = omap44xx_ipu_irqs, | 1678 | .mpu_irqs = omap44xx_ipu_irqs, |
1678 | .rst_lines = omap44xx_ipu_resets, | 1679 | .rst_lines = omap44xx_ipu_resets, |
1679 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets), | 1680 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets), |
1680 | .main_clk = "ipu_fck", | 1681 | .main_clk = "ducati_clk_mux_ck", |
1681 | .prcm = { | 1682 | .prcm = { |
1682 | .omap4 = { | 1683 | .omap4 = { |
1683 | .clkctrl_offs = OMAP4_CM_DUCATI_DUCATI_CLKCTRL_OFFSET, | 1684 | .clkctrl_offs = OMAP4_CM_DUCATI_DUCATI_CLKCTRL_OFFSET, |
@@ -2125,6 +2126,14 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = { | |||
2125 | .name = "mcpdm", | 2126 | .name = "mcpdm", |
2126 | .class = &omap44xx_mcpdm_hwmod_class, | 2127 | .class = &omap44xx_mcpdm_hwmod_class, |
2127 | .clkdm_name = "abe_clkdm", | 2128 | .clkdm_name = "abe_clkdm", |
2129 | /* | ||
2130 | * It's suspected that the McPDM requires an off-chip main | ||
2131 | * functional clock, controlled via I2C. This IP block is | ||
2132 | * currently reset very early during boot, before I2C is | ||
2133 | * available, so it doesn't seem that we have any choice in | ||
2134 | * the kernel other than to avoid resetting it. | ||
2135 | */ | ||
2136 | .flags = HWMOD_EXT_OPT_MAIN_CLK, | ||
2128 | .mpu_irqs = omap44xx_mcpdm_irqs, | 2137 | .mpu_irqs = omap44xx_mcpdm_irqs, |
2129 | .sdma_reqs = omap44xx_mcpdm_sdma_reqs, | 2138 | .sdma_reqs = omap44xx_mcpdm_sdma_reqs, |
2130 | .main_clk = "mcpdm_fck", | 2139 | .main_clk = "mcpdm_fck", |
@@ -2681,6 +2690,32 @@ static struct omap_hwmod_class omap44xx_ocp2scp_hwmod_class = { | |||
2681 | .sysc = &omap44xx_ocp2scp_sysc, | 2690 | .sysc = &omap44xx_ocp2scp_sysc, |
2682 | }; | 2691 | }; |
2683 | 2692 | ||
2693 | /* ocp2scp dev_attr */ | ||
2694 | static struct resource omap44xx_usb_phy_and_pll_addrs[] = { | ||
2695 | { | ||
2696 | .name = "usb_phy", | ||
2697 | .start = 0x4a0ad080, | ||
2698 | .end = 0x4a0ae000, | ||
2699 | .flags = IORESOURCE_MEM, | ||
2700 | }, | ||
2701 | { | ||
2702 | /* XXX: Remove this once control module driver is in place */ | ||
2703 | .name = "ctrl_dev", | ||
2704 | .start = 0x4a002300, | ||
2705 | .end = 0x4a002303, | ||
2706 | .flags = IORESOURCE_MEM, | ||
2707 | }, | ||
2708 | { } | ||
2709 | }; | ||
2710 | |||
2711 | static struct omap_ocp2scp_dev ocp2scp_dev_attr[] = { | ||
2712 | { | ||
2713 | .drv_name = "omap-usb2", | ||
2714 | .res = omap44xx_usb_phy_and_pll_addrs, | ||
2715 | }, | ||
2716 | { } | ||
2717 | }; | ||
2718 | |||
2684 | /* ocp2scp_usb_phy */ | 2719 | /* ocp2scp_usb_phy */ |
2685 | static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { | 2720 | static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { |
2686 | .name = "ocp2scp_usb_phy", | 2721 | .name = "ocp2scp_usb_phy", |
@@ -2694,6 +2729,7 @@ static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { | |||
2694 | .modulemode = MODULEMODE_HWCTRL, | 2729 | .modulemode = MODULEMODE_HWCTRL, |
2695 | }, | 2730 | }, |
2696 | }, | 2731 | }, |
2732 | .dev_attr = ocp2scp_dev_attr, | ||
2697 | }; | 2733 | }; |
2698 | 2734 | ||
2699 | /* | 2735 | /* |
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 686137d164da..67d66131cfa7 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h | |||
@@ -91,6 +91,7 @@ extern void omap3_save_scratchpad_contents(void); | |||
91 | 91 | ||
92 | #define PM_RTA_ERRATUM_i608 (1 << 0) | 92 | #define PM_RTA_ERRATUM_i608 (1 << 0) |
93 | #define PM_SDRC_WAKEUP_ERRATUM_i583 (1 << 1) | 93 | #define PM_SDRC_WAKEUP_ERRATUM_i583 (1 << 1) |
94 | #define PM_PER_MEMORIES_ERRATUM_i582 (1 << 2) | ||
94 | 95 | ||
95 | #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) | 96 | #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) |
96 | extern u16 pm34xx_errata; | 97 | extern u16 pm34xx_errata; |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index ba670db1fd37..3a904de4313e 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -652,14 +652,17 @@ static void __init pm_errata_configure(void) | |||
652 | /* Enable the l2 cache toggling in sleep logic */ | 652 | /* Enable the l2 cache toggling in sleep logic */ |
653 | enable_omap3630_toggle_l2_on_restore(); | 653 | enable_omap3630_toggle_l2_on_restore(); |
654 | if (omap_rev() < OMAP3630_REV_ES1_2) | 654 | if (omap_rev() < OMAP3630_REV_ES1_2) |
655 | pm34xx_errata |= PM_SDRC_WAKEUP_ERRATUM_i583; | 655 | pm34xx_errata |= (PM_SDRC_WAKEUP_ERRATUM_i583 | |
656 | PM_PER_MEMORIES_ERRATUM_i582); | ||
657 | } else if (cpu_is_omap34xx()) { | ||
658 | pm34xx_errata |= PM_PER_MEMORIES_ERRATUM_i582; | ||
656 | } | 659 | } |
657 | } | 660 | } |
658 | 661 | ||
659 | int __init omap3_pm_init(void) | 662 | int __init omap3_pm_init(void) |
660 | { | 663 | { |
661 | struct power_state *pwrst, *tmp; | 664 | struct power_state *pwrst, *tmp; |
662 | struct clockdomain *neon_clkdm, *mpu_clkdm; | 665 | struct clockdomain *neon_clkdm, *mpu_clkdm, *per_clkdm, *wkup_clkdm; |
663 | int ret; | 666 | int ret; |
664 | 667 | ||
665 | if (!omap3_has_io_chain_ctrl()) | 668 | if (!omap3_has_io_chain_ctrl()) |
@@ -711,6 +714,8 @@ int __init omap3_pm_init(void) | |||
711 | 714 | ||
712 | neon_clkdm = clkdm_lookup("neon_clkdm"); | 715 | neon_clkdm = clkdm_lookup("neon_clkdm"); |
713 | mpu_clkdm = clkdm_lookup("mpu_clkdm"); | 716 | mpu_clkdm = clkdm_lookup("mpu_clkdm"); |
717 | per_clkdm = clkdm_lookup("per_clkdm"); | ||
718 | wkup_clkdm = clkdm_lookup("wkup_clkdm"); | ||
714 | 719 | ||
715 | #ifdef CONFIG_SUSPEND | 720 | #ifdef CONFIG_SUSPEND |
716 | omap_pm_suspend = omap3_pm_suspend; | 721 | omap_pm_suspend = omap3_pm_suspend; |
@@ -727,6 +732,27 @@ int __init omap3_pm_init(void) | |||
727 | if (IS_PM34XX_ERRATUM(PM_RTA_ERRATUM_i608)) | 732 | if (IS_PM34XX_ERRATUM(PM_RTA_ERRATUM_i608)) |
728 | omap3630_ctrl_disable_rta(); | 733 | omap3630_ctrl_disable_rta(); |
729 | 734 | ||
735 | /* | ||
736 | * The UART3/4 FIFO and the sidetone memory in McBSP2/3 are | ||
737 | * not correctly reset when the PER powerdomain comes back | ||
738 | * from OFF or OSWR when the CORE powerdomain is kept active. | ||
739 | * See OMAP36xx Erratum i582 "PER Domain reset issue after | ||
740 | * Domain-OFF/OSWR Wakeup". This wakeup dependency is not a | ||
741 | * complete workaround. The kernel must also prevent the PER | ||
742 | * powerdomain from going to OSWR/OFF while the CORE | ||
743 | * powerdomain is not going to OSWR/OFF. And if PER last | ||
744 | * power state was off while CORE last power state was ON, the | ||
745 | * UART3/4 and McBSP2/3 SIDETONE devices need to run a | ||
746 | * self-test using their loopback tests; if that fails, those | ||
747 | * devices are unusable until the PER/CORE can complete a transition | ||
748 | * from ON to OSWR/OFF and then back to ON. | ||
749 | * | ||
750 | * XXX Technically this workaround is only needed if off-mode | ||
751 | * or OSWR is enabled. | ||
752 | */ | ||
753 | if (IS_PM34XX_ERRATUM(PM_PER_MEMORIES_ERRATUM_i582)) | ||
754 | clkdm_add_wkdep(per_clkdm, wkup_clkdm); | ||
755 | |||
730 | clkdm_add_wkdep(neon_clkdm, mpu_clkdm); | 756 | clkdm_add_wkdep(neon_clkdm, mpu_clkdm); |
731 | if (omap_type() != OMAP2_DEVICE_TYPE_GP) { | 757 | if (omap_type() != OMAP2_DEVICE_TYPE_GP) { |
732 | omap3_secure_ram_storage = | 758 | omap3_secure_ram_storage = |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 0405c8190803..a507cd6cf4f1 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -329,6 +329,11 @@ void __init omap_serial_init_port(struct omap_board_data *bdata, | |||
329 | 329 | ||
330 | oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt); | 330 | oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt); |
331 | 331 | ||
332 | if (console_uart_id == bdata->id) { | ||
333 | omap_device_enable(pdev); | ||
334 | pm_runtime_set_active(&pdev->dev); | ||
335 | } | ||
336 | |||
332 | oh->dev_attr = uart; | 337 | oh->dev_attr = uart; |
333 | 338 | ||
334 | if (((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads) | 339 | if (((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads) |
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index 635e109f5ad3..a256135d8e48 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c | |||
@@ -73,6 +73,7 @@ void __init omap4_pmic_init(const char *pmic_type, | |||
73 | { | 73 | { |
74 | /* PMIC part*/ | 74 | /* PMIC part*/ |
75 | omap_mux_init_signal("sys_nirq1", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE); | 75 | omap_mux_init_signal("sys_nirq1", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE); |
76 | omap_mux_init_signal("fref_clk0_out.sys_drm_msecure", OMAP_PIN_OUTPUT); | ||
76 | omap_pmic_init(1, 400, pmic_type, 7 + OMAP44XX_IRQ_GIC_START, pmic_data); | 77 | omap_pmic_init(1, 400, pmic_type, 7 + OMAP44XX_IRQ_GIC_START, pmic_data); |
77 | 78 | ||
78 | /* Register additional devices on i2c1 bus if needed */ | 79 | /* Register additional devices on i2c1 bus if needed */ |
@@ -366,7 +367,7 @@ static struct regulator_init_data omap4_clk32kg_idata = { | |||
366 | }; | 367 | }; |
367 | 368 | ||
368 | static struct regulator_consumer_supply omap4_vdd1_supply[] = { | 369 | static struct regulator_consumer_supply omap4_vdd1_supply[] = { |
369 | REGULATOR_SUPPLY("vcc", "mpu.0"), | 370 | REGULATOR_SUPPLY("vcc", "cpu0"), |
370 | }; | 371 | }; |
371 | 372 | ||
372 | static struct regulator_consumer_supply omap4_vdd2_supply[] = { | 373 | static struct regulator_consumer_supply omap4_vdd2_supply[] = { |
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c index 880249b17012..75878c37959b 100644 --- a/arch/arm/mach-omap2/vc.c +++ b/arch/arm/mach-omap2/vc.c | |||
@@ -264,7 +264,7 @@ static void __init omap_vc_i2c_init(struct voltagedomain *voltdm) | |||
264 | 264 | ||
265 | if (initialized) { | 265 | if (initialized) { |
266 | if (voltdm->pmic->i2c_high_speed != i2c_high_speed) | 266 | if (voltdm->pmic->i2c_high_speed != i2c_high_speed) |
267 | pr_warn("%s: I2C config for vdd_%s does not match other channels (%u).", | 267 | pr_warn("%s: I2C config for vdd_%s does not match other channels (%u).\n", |
268 | __func__, voltdm->name, i2c_high_speed); | 268 | __func__, voltdm->name, i2c_high_speed); |
269 | return; | 269 | return; |
270 | } | 270 | } |
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index 5ecbd17b5641..e2c6391863fe 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/mfd/asic3.h> | 28 | #include <linux/mfd/asic3.h> |
29 | #include <linux/mtd/physmap.h> | 29 | #include <linux/mtd/physmap.h> |
30 | #include <linux/pda_power.h> | 30 | #include <linux/pda_power.h> |
31 | #include <linux/pwm.h> | ||
31 | #include <linux/pwm_backlight.h> | 32 | #include <linux/pwm_backlight.h> |
32 | #include <linux/regulator/driver.h> | 33 | #include <linux/regulator/driver.h> |
33 | #include <linux/regulator/gpio-regulator.h> | 34 | #include <linux/regulator/gpio-regulator.h> |
@@ -556,7 +557,7 @@ static struct platform_device hx4700_lcd = { | |||
556 | */ | 557 | */ |
557 | 558 | ||
558 | static struct platform_pwm_backlight_data backlight_data = { | 559 | static struct platform_pwm_backlight_data backlight_data = { |
559 | .pwm_id = 1, | 560 | .pwm_id = -1, /* Superseded by pwm_lookup */ |
560 | .max_brightness = 200, | 561 | .max_brightness = 200, |
561 | .dft_brightness = 100, | 562 | .dft_brightness = 100, |
562 | .pwm_period_ns = 30923, | 563 | .pwm_period_ns = 30923, |
@@ -571,6 +572,10 @@ static struct platform_device backlight = { | |||
571 | }, | 572 | }, |
572 | }; | 573 | }; |
573 | 574 | ||
575 | static struct pwm_lookup hx4700_pwm_lookup[] = { | ||
576 | PWM_LOOKUP("pxa27x-pwm.1", 0, "pwm-backlight", NULL), | ||
577 | }; | ||
578 | |||
574 | /* | 579 | /* |
575 | * USB "Transceiver" | 580 | * USB "Transceiver" |
576 | */ | 581 | */ |
@@ -872,6 +877,7 @@ static void __init hx4700_init(void) | |||
872 | pxa_set_stuart_info(NULL); | 877 | pxa_set_stuart_info(NULL); |
873 | 878 | ||
874 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 879 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
880 | pwm_add_table(hx4700_pwm_lookup, ARRAY_SIZE(hx4700_pwm_lookup)); | ||
875 | 881 | ||
876 | pxa_set_ficp_info(&ficp_info); | 882 | pxa_set_ficp_info(&ficp_info); |
877 | pxa27x_set_i2c_power_info(NULL); | 883 | pxa27x_set_i2c_power_info(NULL); |
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index 438f02fe122a..842596d4d31e 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c | |||
@@ -86,10 +86,7 @@ static void spitz_discharge1(int on) | |||
86 | gpio_set_value(SPITZ_GPIO_LED_GREEN, on); | 86 | gpio_set_value(SPITZ_GPIO_LED_GREEN, on); |
87 | } | 87 | } |
88 | 88 | ||
89 | static unsigned long gpio18_config[] = { | 89 | static unsigned long gpio18_config = GPIO18_GPIO; |
90 | GPIO18_RDY, | ||
91 | GPIO18_GPIO, | ||
92 | }; | ||
93 | 90 | ||
94 | static void spitz_presuspend(void) | 91 | static void spitz_presuspend(void) |
95 | { | 92 | { |
@@ -112,7 +109,7 @@ static void spitz_presuspend(void) | |||
112 | PGSR3 &= ~SPITZ_GPIO_G3_STROBE_BIT; | 109 | PGSR3 &= ~SPITZ_GPIO_G3_STROBE_BIT; |
113 | PGSR2 |= GPIO_bit(SPITZ_GPIO_KEY_STROBE0); | 110 | PGSR2 |= GPIO_bit(SPITZ_GPIO_KEY_STROBE0); |
114 | 111 | ||
115 | pxa2xx_mfp_config(&gpio18_config[0], 1); | 112 | pxa2xx_mfp_config(&gpio18_config, 1); |
116 | gpio_request_one(18, GPIOF_OUT_INIT_HIGH, "Unknown"); | 113 | gpio_request_one(18, GPIOF_OUT_INIT_HIGH, "Unknown"); |
117 | gpio_free(18); | 114 | gpio_free(18); |
118 | 115 | ||
@@ -131,7 +128,6 @@ static void spitz_presuspend(void) | |||
131 | 128 | ||
132 | static void spitz_postsuspend(void) | 129 | static void spitz_postsuspend(void) |
133 | { | 130 | { |
134 | pxa2xx_mfp_config(&gpio18_config[1], 1); | ||
135 | } | 131 | } |
136 | 132 | ||
137 | static int spitz_should_wakeup(unsigned int resume_on_alarm) | 133 | static int spitz_should_wakeup(unsigned int resume_on_alarm) |
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c index ed5a95ece9eb..77ee0b732237 100644 --- a/arch/arm/mach-s3c24xx/s3c2416.c +++ b/arch/arm/mach-s3c24xx/s3c2416.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <plat/nand-core.h> | 61 | #include <plat/nand-core.h> |
62 | #include <plat/adc-core.h> | 62 | #include <plat/adc-core.h> |
63 | #include <plat/rtc-core.h> | 63 | #include <plat/rtc-core.h> |
64 | #include <plat/spi-core.h> | ||
64 | 65 | ||
65 | static struct map_desc s3c2416_iodesc[] __initdata = { | 66 | static struct map_desc s3c2416_iodesc[] __initdata = { |
66 | IODESC_ENT(WATCHDOG), | 67 | IODESC_ENT(WATCHDOG), |
@@ -132,6 +133,7 @@ void __init s3c2416_map_io(void) | |||
132 | /* initialize device information early */ | 133 | /* initialize device information early */ |
133 | s3c2416_default_sdhci0(); | 134 | s3c2416_default_sdhci0(); |
134 | s3c2416_default_sdhci1(); | 135 | s3c2416_default_sdhci1(); |
136 | s3c64xx_spi_setname("s3c2443-spi"); | ||
135 | 137 | ||
136 | iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc)); | 138 | iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc)); |
137 | } | 139 | } |
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c index ab648ad8fa50..165b6a6b3daa 100644 --- a/arch/arm/mach-s3c24xx/s3c2443.c +++ b/arch/arm/mach-s3c24xx/s3c2443.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <plat/nand-core.h> | 43 | #include <plat/nand-core.h> |
44 | #include <plat/adc-core.h> | 44 | #include <plat/adc-core.h> |
45 | #include <plat/rtc-core.h> | 45 | #include <plat/rtc-core.h> |
46 | #include <plat/spi-core.h> | ||
46 | 47 | ||
47 | static struct map_desc s3c2443_iodesc[] __initdata = { | 48 | static struct map_desc s3c2443_iodesc[] __initdata = { |
48 | IODESC_ENT(WATCHDOG), | 49 | IODESC_ENT(WATCHDOG), |
@@ -100,6 +101,9 @@ void __init s3c2443_map_io(void) | |||
100 | s3c24xx_gpiocfg_default.set_pull = s3c2443_gpio_setpull; | 101 | s3c24xx_gpiocfg_default.set_pull = s3c2443_gpio_setpull; |
101 | s3c24xx_gpiocfg_default.get_pull = s3c2443_gpio_getpull; | 102 | s3c24xx_gpiocfg_default.get_pull = s3c2443_gpio_getpull; |
102 | 103 | ||
104 | /* initialize device information early */ | ||
105 | s3c64xx_spi_setname("s3c2443-spi"); | ||
106 | |||
103 | iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc)); | 107 | iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc)); |
104 | } | 108 | } |
105 | 109 | ||
diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c index 6e6a0a9d6778..111e404a81fd 100644 --- a/arch/arm/mach-s5p64x0/common.c +++ b/arch/arm/mach-s5p64x0/common.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <plat/sdhci.h> | 44 | #include <plat/sdhci.h> |
45 | #include <plat/adc-core.h> | 45 | #include <plat/adc-core.h> |
46 | #include <plat/fb-core.h> | 46 | #include <plat/fb-core.h> |
47 | #include <plat/spi-core.h> | ||
47 | #include <plat/gpio-cfg.h> | 48 | #include <plat/gpio-cfg.h> |
48 | #include <plat/regs-irqtype.h> | 49 | #include <plat/regs-irqtype.h> |
49 | #include <plat/regs-serial.h> | 50 | #include <plat/regs-serial.h> |
@@ -179,6 +180,7 @@ void __init s5p6440_map_io(void) | |||
179 | /* initialize any device information early */ | 180 | /* initialize any device information early */ |
180 | s3c_adc_setname("s3c64xx-adc"); | 181 | s3c_adc_setname("s3c64xx-adc"); |
181 | s3c_fb_setname("s5p64x0-fb"); | 182 | s3c_fb_setname("s5p64x0-fb"); |
183 | s3c64xx_spi_setname("s5p64x0-spi"); | ||
182 | 184 | ||
183 | s5p64x0_default_sdhci0(); | 185 | s5p64x0_default_sdhci0(); |
184 | s5p64x0_default_sdhci1(); | 186 | s5p64x0_default_sdhci1(); |
@@ -193,6 +195,7 @@ void __init s5p6450_map_io(void) | |||
193 | /* initialize any device information early */ | 195 | /* initialize any device information early */ |
194 | s3c_adc_setname("s3c64xx-adc"); | 196 | s3c_adc_setname("s3c64xx-adc"); |
195 | s3c_fb_setname("s5p64x0-fb"); | 197 | s3c_fb_setname("s5p64x0-fb"); |
198 | s3c64xx_spi_setname("s5p64x0-spi"); | ||
196 | 199 | ||
197 | s5p64x0_default_sdhci0(); | 200 | s5p64x0_default_sdhci0(); |
198 | s5p64x0_default_sdhci1(); | 201 | s5p64x0_default_sdhci1(); |
diff --git a/arch/arm/mach-s5pc100/common.c b/arch/arm/mach-s5pc100/common.c index 621908658861..cc6e561c9958 100644 --- a/arch/arm/mach-s5pc100/common.c +++ b/arch/arm/mach-s5pc100/common.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <plat/fb-core.h> | 45 | #include <plat/fb-core.h> |
46 | #include <plat/iic-core.h> | 46 | #include <plat/iic-core.h> |
47 | #include <plat/onenand-core.h> | 47 | #include <plat/onenand-core.h> |
48 | #include <plat/spi-core.h> | ||
48 | #include <plat/regs-serial.h> | 49 | #include <plat/regs-serial.h> |
49 | #include <plat/watchdog-reset.h> | 50 | #include <plat/watchdog-reset.h> |
50 | 51 | ||
@@ -165,6 +166,8 @@ void __init s5pc100_map_io(void) | |||
165 | s3c_onenand_setname("s5pc100-onenand"); | 166 | s3c_onenand_setname("s5pc100-onenand"); |
166 | s3c_fb_setname("s5pc100-fb"); | 167 | s3c_fb_setname("s5pc100-fb"); |
167 | s3c_cfcon_setname("s5pc100-pata"); | 168 | s3c_cfcon_setname("s5pc100-pata"); |
169 | |||
170 | s3c64xx_spi_setname("s5pc100-spi"); | ||
168 | } | 171 | } |
169 | 172 | ||
170 | void __init s5pc100_init_clocks(int xtal) | 173 | void __init s5pc100_init_clocks(int xtal) |
diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c index 4c9e9027df9a..a0c50efe8145 100644 --- a/arch/arm/mach-s5pv210/common.c +++ b/arch/arm/mach-s5pv210/common.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <plat/iic-core.h> | 43 | #include <plat/iic-core.h> |
44 | #include <plat/keypad-core.h> | 44 | #include <plat/keypad-core.h> |
45 | #include <plat/tv-core.h> | 45 | #include <plat/tv-core.h> |
46 | #include <plat/spi-core.h> | ||
46 | #include <plat/regs-serial.h> | 47 | #include <plat/regs-serial.h> |
47 | 48 | ||
48 | #include "common.h" | 49 | #include "common.h" |
@@ -196,6 +197,8 @@ void __init s5pv210_map_io(void) | |||
196 | 197 | ||
197 | /* setup TV devices */ | 198 | /* setup TV devices */ |
198 | s5p_hdmi_setname("s5pv210-hdmi"); | 199 | s5p_hdmi_setname("s5pv210-hdmi"); |
200 | |||
201 | s3c64xx_spi_setname("s5pv210-spi"); | ||
199 | } | 202 | } |
200 | 203 | ||
201 | void __init s5pv210_init_clocks(int xtal) | 204 | void __init s5pv210_init_clocks(int xtal) |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 2917668f0091..ebbffc25f24f 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -247,7 +247,7 @@ void __init r8a7779_add_standard_devices(void) | |||
247 | { | 247 | { |
248 | #ifdef CONFIG_CACHE_L2X0 | 248 | #ifdef CONFIG_CACHE_L2X0 |
249 | /* Early BRESP enable, Shared attribute override enable, 64K*16way */ | 249 | /* Early BRESP enable, Shared attribute override enable, 64K*16way */ |
250 | l2x0_init((void __iomem __force *)(0xf0100000), 0x40470000, 0x82000fff); | 250 | l2x0_init(IOMEM(0xf0100000), 0x40470000, 0x82000fff); |
251 | #endif | 251 | #endif |
252 | r8a7779_pm_init(); | 252 | r8a7779_pm_init(); |
253 | 253 | ||
diff --git a/arch/arm/mach-spear13xx/include/mach/spear1310_misc_regs.h b/arch/arm/mach-spear13xx/include/mach/spear1310_misc_regs.h deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/arch/arm/mach-spear13xx/include/mach/spear1310_misc_regs.h +++ /dev/null | |||
diff --git a/arch/arm/mach-spear13xx/include/mach/spear1340_misc_regs.h b/arch/arm/mach-spear13xx/include/mach/spear1340_misc_regs.h deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/arch/arm/mach-spear13xx/include/mach/spear1340_misc_regs.h +++ /dev/null | |||
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 2236cbd03cd7..1f3fbc2bb776 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/stat.h> | 16 | #include <linux/stat.h> |
17 | #include <linux/of.h> | 17 | #include <linux/of.h> |
18 | #include <linux/of_irq.h> | 18 | #include <linux/of_irq.h> |
19 | #include <linux/irq.h> | ||
19 | #include <linux/platform_data/clk-ux500.h> | 20 | #include <linux/platform_data/clk-ux500.h> |
20 | 21 | ||
21 | #include <asm/hardware/gic.h> | 22 | #include <asm/hardware/gic.h> |
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index b9f60ebe3bc4..b820edaf3184 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -745,7 +745,7 @@ do_alignment_t32_to_handler(unsigned long *pinstr, struct pt_regs *regs, | |||
745 | static int | 745 | static int |
746 | do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | 746 | do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) |
747 | { | 747 | { |
748 | union offset_union offset; | 748 | union offset_union uninitialized_var(offset); |
749 | unsigned long instr = 0, instrptr; | 749 | unsigned long instr = 0, instrptr; |
750 | int (*handler)(unsigned long addr, unsigned long instr, struct pt_regs *regs); | 750 | int (*handler)(unsigned long addr, unsigned long instr, struct pt_regs *regs); |
751 | unsigned int type; | 751 | unsigned int type; |
@@ -856,8 +856,10 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
856 | if (thumb2_32b) { | 856 | if (thumb2_32b) { |
857 | offset.un = 0; | 857 | offset.un = 0; |
858 | handler = do_alignment_t32_to_handler(&instr, regs, &offset); | 858 | handler = do_alignment_t32_to_handler(&instr, regs, &offset); |
859 | } else | 859 | } else { |
860 | offset.un = 0; | ||
860 | handler = do_alignment_ldmstm; | 861 | handler = do_alignment_ldmstm; |
862 | } | ||
861 | break; | 863 | break; |
862 | 864 | ||
863 | default: | 865 | default: |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 477a2d23ddf1..58bc3e4d3bd0 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -610,7 +610,7 @@ static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, | |||
610 | gfp_t gfp, pgprot_t prot, bool is_coherent, const void *caller) | 610 | gfp_t gfp, pgprot_t prot, bool is_coherent, const void *caller) |
611 | { | 611 | { |
612 | u64 mask = get_coherent_dma_mask(dev); | 612 | u64 mask = get_coherent_dma_mask(dev); |
613 | struct page *page; | 613 | struct page *page = NULL; |
614 | void *addr; | 614 | void *addr; |
615 | 615 | ||
616 | #ifdef CONFIG_DMA_API_DEBUG | 616 | #ifdef CONFIG_DMA_API_DEBUG |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 86b8b480634f..09c5233f4dfc 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -89,7 +89,7 @@ ENTRY(cpu_v6_dcache_clean_area) | |||
89 | mov pc, lr | 89 | mov pc, lr |
90 | 90 | ||
91 | /* | 91 | /* |
92 | * cpu_arm926_switch_mm(pgd_phys, tsk) | 92 | * cpu_v6_switch_mm(pgd_phys, tsk) |
93 | * | 93 | * |
94 | * Set the translation table base pointer to be pgd_phys | 94 | * Set the translation table base pointer to be pgd_phys |
95 | * | 95 | * |
diff --git a/arch/arm/mm/vmregion.h b/arch/arm/mm/vmregion.h index bf312c354a21..0f5a5f2a2c7b 100644 --- a/arch/arm/mm/vmregion.h +++ b/arch/arm/mm/vmregion.h | |||
@@ -17,7 +17,6 @@ struct arm_vmregion { | |||
17 | struct list_head vm_list; | 17 | struct list_head vm_list; |
18 | unsigned long vm_start; | 18 | unsigned long vm_start; |
19 | unsigned long vm_end; | 19 | unsigned long vm_end; |
20 | void *priv; | ||
21 | int vm_active; | 20 | int vm_active; |
22 | const void *caller; | 21 | const void *caller; |
23 | }; | 22 | }; |
diff --git a/arch/arm/plat-mxc/devices/platform-mxc-mmc.c b/arch/arm/plat-mxc/devices/platform-mxc-mmc.c index 540d3a7d92df..e7b920b58675 100644 --- a/arch/arm/plat-mxc/devices/platform-mxc-mmc.c +++ b/arch/arm/plat-mxc/devices/platform-mxc-mmc.c | |||
@@ -55,7 +55,7 @@ struct platform_device *__init imx_add_mxc_mmc( | |||
55 | struct resource res[] = { | 55 | struct resource res[] = { |
56 | { | 56 | { |
57 | .start = data->iobase, | 57 | .start = data->iobase, |
58 | .end = data->iobase + SZ_4K - 1, | 58 | .end = data->iobase + data->iosize - 1, |
59 | .flags = IORESOURCE_MEM, | 59 | .flags = IORESOURCE_MEM, |
60 | }, { | 60 | }, { |
61 | .start = data->irq, | 61 | .start = data->irq, |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index 7cd56ed5cd94..82fcb206b5b2 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -26,6 +26,7 @@ config ARCH_OMAP2PLUS | |||
26 | select CLKDEV_LOOKUP | 26 | select CLKDEV_LOOKUP |
27 | select GENERIC_IRQ_CHIP | 27 | select GENERIC_IRQ_CHIP |
28 | select OMAP_DM_TIMER | 28 | select OMAP_DM_TIMER |
29 | select PINCTRL | ||
29 | select PROC_DEVICETREE if PROC_FS | 30 | select PROC_DEVICETREE if PROC_FS |
30 | select SPARSE_IRQ | 31 | select SPARSE_IRQ |
31 | select USE_OF | 32 | select USE_OF |
diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index a5683a84c6ee..6013831a043e 100644 --- a/arch/arm/plat-omap/i2c.c +++ b/arch/arm/plat-omap/i2c.c | |||
@@ -26,12 +26,14 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
29 | #include <linux/i2c-omap.h> | ||
29 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
30 | #include <linux/err.h> | 31 | #include <linux/err.h> |
31 | #include <linux/clk.h> | 32 | #include <linux/clk.h> |
32 | 33 | ||
33 | #include <mach/irqs.h> | 34 | #include <mach/irqs.h> |
34 | #include <plat/i2c.h> | 35 | #include <plat/i2c.h> |
36 | #include <plat/omap-pm.h> | ||
35 | #include <plat/omap_device.h> | 37 | #include <plat/omap_device.h> |
36 | 38 | ||
37 | #define OMAP_I2C_SIZE 0x3f | 39 | #define OMAP_I2C_SIZE 0x3f |
@@ -127,6 +129,16 @@ static inline int omap1_i2c_add_bus(int bus_id) | |||
127 | 129 | ||
128 | 130 | ||
129 | #ifdef CONFIG_ARCH_OMAP2PLUS | 131 | #ifdef CONFIG_ARCH_OMAP2PLUS |
132 | /* | ||
133 | * XXX This function is a temporary compatibility wrapper - only | ||
134 | * needed until the I2C driver can be converted to call | ||
135 | * omap_pm_set_max_dev_wakeup_lat() and handle a return code. | ||
136 | */ | ||
137 | static void omap_pm_set_max_mpu_wakeup_lat_compat(struct device *dev, long t) | ||
138 | { | ||
139 | omap_pm_set_max_mpu_wakeup_lat(dev, t); | ||
140 | } | ||
141 | |||
130 | static inline int omap2_i2c_add_bus(int bus_id) | 142 | static inline int omap2_i2c_add_bus(int bus_id) |
131 | { | 143 | { |
132 | int l; | 144 | int l; |
@@ -158,6 +170,15 @@ static inline int omap2_i2c_add_bus(int bus_id) | |||
158 | dev_attr = (struct omap_i2c_dev_attr *)oh->dev_attr; | 170 | dev_attr = (struct omap_i2c_dev_attr *)oh->dev_attr; |
159 | pdata->flags = dev_attr->flags; | 171 | pdata->flags = dev_attr->flags; |
160 | 172 | ||
173 | /* | ||
174 | * When waiting for completion of a i2c transfer, we need to | ||
175 | * set a wake up latency constraint for the MPU. This is to | ||
176 | * ensure quick enough wakeup from idle, when transfer | ||
177 | * completes. | ||
178 | * Only omap3 has support for constraints | ||
179 | */ | ||
180 | if (cpu_is_omap34xx()) | ||
181 | pdata->set_mpu_wkup_lat = omap_pm_set_max_mpu_wakeup_lat_compat; | ||
161 | pdev = omap_device_build(name, bus_id, oh, pdata, | 182 | pdev = omap_device_build(name, bus_id, oh, pdata, |
162 | sizeof(struct omap_i2c_bus_platform_data), | 183 | sizeof(struct omap_i2c_bus_platform_data), |
163 | NULL, 0, 0); | 184 | NULL, 0, 0); |
diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h deleted file mode 100644 index 68b5f0362f35..000000000000 --- a/arch/arm/plat-omap/include/plat/iommu.h +++ /dev/null | |||
@@ -1,221 +0,0 @@ | |||
1 | /* | ||
2 | * omap iommu: main structures | ||
3 | * | ||
4 | * Copyright (C) 2008-2009 Nokia Corporation | ||
5 | * | ||
6 | * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __MACH_IOMMU_H | ||
14 | #define __MACH_IOMMU_H | ||
15 | |||
16 | struct iotlb_entry { | ||
17 | u32 da; | ||
18 | u32 pa; | ||
19 | u32 pgsz, prsvd, valid; | ||
20 | union { | ||
21 | u16 ap; | ||
22 | struct { | ||
23 | u32 endian, elsz, mixed; | ||
24 | }; | ||
25 | }; | ||
26 | }; | ||
27 | |||
28 | struct omap_iommu { | ||
29 | const char *name; | ||
30 | struct module *owner; | ||
31 | struct clk *clk; | ||
32 | void __iomem *regbase; | ||
33 | struct device *dev; | ||
34 | void *isr_priv; | ||
35 | struct iommu_domain *domain; | ||
36 | |||
37 | unsigned int refcount; | ||
38 | spinlock_t iommu_lock; /* global for this whole object */ | ||
39 | |||
40 | /* | ||
41 | * We don't change iopgd for a situation like pgd for a task, | ||
42 | * but share it globally for each iommu. | ||
43 | */ | ||
44 | u32 *iopgd; | ||
45 | spinlock_t page_table_lock; /* protect iopgd */ | ||
46 | |||
47 | int nr_tlb_entries; | ||
48 | |||
49 | struct list_head mmap; | ||
50 | struct mutex mmap_lock; /* protect mmap */ | ||
51 | |||
52 | void *ctx; /* iommu context: registres saved area */ | ||
53 | u32 da_start; | ||
54 | u32 da_end; | ||
55 | }; | ||
56 | |||
57 | struct cr_regs { | ||
58 | union { | ||
59 | struct { | ||
60 | u16 cam_l; | ||
61 | u16 cam_h; | ||
62 | }; | ||
63 | u32 cam; | ||
64 | }; | ||
65 | union { | ||
66 | struct { | ||
67 | u16 ram_l; | ||
68 | u16 ram_h; | ||
69 | }; | ||
70 | u32 ram; | ||
71 | }; | ||
72 | }; | ||
73 | |||
74 | struct iotlb_lock { | ||
75 | short base; | ||
76 | short vict; | ||
77 | }; | ||
78 | |||
79 | /* architecture specific functions */ | ||
80 | struct iommu_functions { | ||
81 | unsigned long version; | ||
82 | |||
83 | int (*enable)(struct omap_iommu *obj); | ||
84 | void (*disable)(struct omap_iommu *obj); | ||
85 | void (*set_twl)(struct omap_iommu *obj, bool on); | ||
86 | u32 (*fault_isr)(struct omap_iommu *obj, u32 *ra); | ||
87 | |||
88 | void (*tlb_read_cr)(struct omap_iommu *obj, struct cr_regs *cr); | ||
89 | void (*tlb_load_cr)(struct omap_iommu *obj, struct cr_regs *cr); | ||
90 | |||
91 | struct cr_regs *(*alloc_cr)(struct omap_iommu *obj, | ||
92 | struct iotlb_entry *e); | ||
93 | int (*cr_valid)(struct cr_regs *cr); | ||
94 | u32 (*cr_to_virt)(struct cr_regs *cr); | ||
95 | void (*cr_to_e)(struct cr_regs *cr, struct iotlb_entry *e); | ||
96 | ssize_t (*dump_cr)(struct omap_iommu *obj, struct cr_regs *cr, | ||
97 | char *buf); | ||
98 | |||
99 | u32 (*get_pte_attr)(struct iotlb_entry *e); | ||
100 | |||
101 | void (*save_ctx)(struct omap_iommu *obj); | ||
102 | void (*restore_ctx)(struct omap_iommu *obj); | ||
103 | ssize_t (*dump_ctx)(struct omap_iommu *obj, char *buf, ssize_t len); | ||
104 | }; | ||
105 | |||
106 | /** | ||
107 | * struct omap_mmu_dev_attr - OMAP mmu device attributes for omap_hwmod | ||
108 | * @da_start: device address where the va space starts. | ||
109 | * @da_end: device address where the va space ends. | ||
110 | * @nr_tlb_entries: number of entries supported by the translation | ||
111 | * look-aside buffer (TLB). | ||
112 | */ | ||
113 | struct omap_mmu_dev_attr { | ||
114 | u32 da_start; | ||
115 | u32 da_end; | ||
116 | int nr_tlb_entries; | ||
117 | }; | ||
118 | |||
119 | struct iommu_platform_data { | ||
120 | const char *name; | ||
121 | const char *clk_name; | ||
122 | const int nr_tlb_entries; | ||
123 | u32 da_start; | ||
124 | u32 da_end; | ||
125 | }; | ||
126 | |||
127 | /** | ||
128 | * struct iommu_arch_data - omap iommu private data | ||
129 | * @name: name of the iommu device | ||
130 | * @iommu_dev: handle of the iommu device | ||
131 | * | ||
132 | * This is an omap iommu private data object, which binds an iommu user | ||
133 | * to its iommu device. This object should be placed at the iommu user's | ||
134 | * dev_archdata so generic IOMMU API can be used without having to | ||
135 | * utilize omap-specific plumbing anymore. | ||
136 | */ | ||
137 | struct omap_iommu_arch_data { | ||
138 | const char *name; | ||
139 | struct omap_iommu *iommu_dev; | ||
140 | }; | ||
141 | |||
142 | #ifdef CONFIG_IOMMU_API | ||
143 | /** | ||
144 | * dev_to_omap_iommu() - retrieves an omap iommu object from a user device | ||
145 | * @dev: iommu client device | ||
146 | */ | ||
147 | static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev) | ||
148 | { | ||
149 | struct omap_iommu_arch_data *arch_data = dev->archdata.iommu; | ||
150 | |||
151 | return arch_data->iommu_dev; | ||
152 | } | ||
153 | #endif | ||
154 | |||
155 | /* IOMMU errors */ | ||
156 | #define OMAP_IOMMU_ERR_TLB_MISS (1 << 0) | ||
157 | #define OMAP_IOMMU_ERR_TRANS_FAULT (1 << 1) | ||
158 | #define OMAP_IOMMU_ERR_EMU_MISS (1 << 2) | ||
159 | #define OMAP_IOMMU_ERR_TBLWALK_FAULT (1 << 3) | ||
160 | #define OMAP_IOMMU_ERR_MULTIHIT_FAULT (1 << 4) | ||
161 | |||
162 | #if defined(CONFIG_ARCH_OMAP1) | ||
163 | #error "iommu for this processor not implemented yet" | ||
164 | #else | ||
165 | #include <plat/iommu2.h> | ||
166 | #endif | ||
167 | |||
168 | /* | ||
169 | * utilities for super page(16MB, 1MB, 64KB and 4KB) | ||
170 | */ | ||
171 | |||
172 | #define iopgsz_max(bytes) \ | ||
173 | (((bytes) >= SZ_16M) ? SZ_16M : \ | ||
174 | ((bytes) >= SZ_1M) ? SZ_1M : \ | ||
175 | ((bytes) >= SZ_64K) ? SZ_64K : \ | ||
176 | ((bytes) >= SZ_4K) ? SZ_4K : 0) | ||
177 | |||
178 | #define bytes_to_iopgsz(bytes) \ | ||
179 | (((bytes) == SZ_16M) ? MMU_CAM_PGSZ_16M : \ | ||
180 | ((bytes) == SZ_1M) ? MMU_CAM_PGSZ_1M : \ | ||
181 | ((bytes) == SZ_64K) ? MMU_CAM_PGSZ_64K : \ | ||
182 | ((bytes) == SZ_4K) ? MMU_CAM_PGSZ_4K : -1) | ||
183 | |||
184 | #define iopgsz_to_bytes(iopgsz) \ | ||
185 | (((iopgsz) == MMU_CAM_PGSZ_16M) ? SZ_16M : \ | ||
186 | ((iopgsz) == MMU_CAM_PGSZ_1M) ? SZ_1M : \ | ||
187 | ((iopgsz) == MMU_CAM_PGSZ_64K) ? SZ_64K : \ | ||
188 | ((iopgsz) == MMU_CAM_PGSZ_4K) ? SZ_4K : 0) | ||
189 | |||
190 | #define iopgsz_ok(bytes) (bytes_to_iopgsz(bytes) >= 0) | ||
191 | |||
192 | /* | ||
193 | * global functions | ||
194 | */ | ||
195 | extern u32 omap_iommu_arch_version(void); | ||
196 | |||
197 | extern void omap_iotlb_cr_to_e(struct cr_regs *cr, struct iotlb_entry *e); | ||
198 | |||
199 | extern int | ||
200 | omap_iopgtable_store_entry(struct omap_iommu *obj, struct iotlb_entry *e); | ||
201 | |||
202 | extern int omap_iommu_set_isr(const char *name, | ||
203 | int (*isr)(struct omap_iommu *obj, u32 da, u32 iommu_errs, | ||
204 | void *priv), | ||
205 | void *isr_priv); | ||
206 | |||
207 | extern void omap_iommu_save_ctx(struct device *dev); | ||
208 | extern void omap_iommu_restore_ctx(struct device *dev); | ||
209 | |||
210 | extern int omap_install_iommu_arch(const struct iommu_functions *ops); | ||
211 | extern void omap_uninstall_iommu_arch(const struct iommu_functions *ops); | ||
212 | |||
213 | extern int omap_foreach_iommu_device(void *data, | ||
214 | int (*fn)(struct device *, void *)); | ||
215 | |||
216 | extern ssize_t | ||
217 | omap_iommu_dump_ctx(struct omap_iommu *obj, char *buf, ssize_t len); | ||
218 | extern size_t | ||
219 | omap_dump_tlb_entries(struct omap_iommu *obj, char *buf, ssize_t len); | ||
220 | |||
221 | #endif /* __MACH_IOMMU_H */ | ||
diff --git a/arch/arm/plat-omap/include/plat/iommu2.h b/arch/arm/plat-omap/include/plat/iommu2.h deleted file mode 100644 index d4116b595e40..000000000000 --- a/arch/arm/plat-omap/include/plat/iommu2.h +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | /* | ||
2 | * omap iommu: omap2 architecture specific definitions | ||
3 | * | ||
4 | * Copyright (C) 2008-2009 Nokia Corporation | ||
5 | * | ||
6 | * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __MACH_IOMMU2_H | ||
14 | #define __MACH_IOMMU2_H | ||
15 | |||
16 | #include <linux/io.h> | ||
17 | |||
18 | /* | ||
19 | * MMU Register offsets | ||
20 | */ | ||
21 | #define MMU_REVISION 0x00 | ||
22 | #define MMU_SYSCONFIG 0x10 | ||
23 | #define MMU_SYSSTATUS 0x14 | ||
24 | #define MMU_IRQSTATUS 0x18 | ||
25 | #define MMU_IRQENABLE 0x1c | ||
26 | #define MMU_WALKING_ST 0x40 | ||
27 | #define MMU_CNTL 0x44 | ||
28 | #define MMU_FAULT_AD 0x48 | ||
29 | #define MMU_TTB 0x4c | ||
30 | #define MMU_LOCK 0x50 | ||
31 | #define MMU_LD_TLB 0x54 | ||
32 | #define MMU_CAM 0x58 | ||
33 | #define MMU_RAM 0x5c | ||
34 | #define MMU_GFLUSH 0x60 | ||
35 | #define MMU_FLUSH_ENTRY 0x64 | ||
36 | #define MMU_READ_CAM 0x68 | ||
37 | #define MMU_READ_RAM 0x6c | ||
38 | #define MMU_EMU_FAULT_AD 0x70 | ||
39 | |||
40 | #define MMU_REG_SIZE 256 | ||
41 | |||
42 | /* | ||
43 | * MMU Register bit definitions | ||
44 | */ | ||
45 | #define MMU_LOCK_BASE_SHIFT 10 | ||
46 | #define MMU_LOCK_BASE_MASK (0x1f << MMU_LOCK_BASE_SHIFT) | ||
47 | #define MMU_LOCK_BASE(x) \ | ||
48 | ((x & MMU_LOCK_BASE_MASK) >> MMU_LOCK_BASE_SHIFT) | ||
49 | |||
50 | #define MMU_LOCK_VICT_SHIFT 4 | ||
51 | #define MMU_LOCK_VICT_MASK (0x1f << MMU_LOCK_VICT_SHIFT) | ||
52 | #define MMU_LOCK_VICT(x) \ | ||
53 | ((x & MMU_LOCK_VICT_MASK) >> MMU_LOCK_VICT_SHIFT) | ||
54 | |||
55 | #define MMU_CAM_VATAG_SHIFT 12 | ||
56 | #define MMU_CAM_VATAG_MASK \ | ||
57 | ((~0UL >> MMU_CAM_VATAG_SHIFT) << MMU_CAM_VATAG_SHIFT) | ||
58 | #define MMU_CAM_P (1 << 3) | ||
59 | #define MMU_CAM_V (1 << 2) | ||
60 | #define MMU_CAM_PGSZ_MASK 3 | ||
61 | #define MMU_CAM_PGSZ_1M (0 << 0) | ||
62 | #define MMU_CAM_PGSZ_64K (1 << 0) | ||
63 | #define MMU_CAM_PGSZ_4K (2 << 0) | ||
64 | #define MMU_CAM_PGSZ_16M (3 << 0) | ||
65 | |||
66 | #define MMU_RAM_PADDR_SHIFT 12 | ||
67 | #define MMU_RAM_PADDR_MASK \ | ||
68 | ((~0UL >> MMU_RAM_PADDR_SHIFT) << MMU_RAM_PADDR_SHIFT) | ||
69 | #define MMU_RAM_ENDIAN_SHIFT 9 | ||
70 | #define MMU_RAM_ENDIAN_MASK (1 << MMU_RAM_ENDIAN_SHIFT) | ||
71 | #define MMU_RAM_ENDIAN_BIG (1 << MMU_RAM_ENDIAN_SHIFT) | ||
72 | #define MMU_RAM_ENDIAN_LITTLE (0 << MMU_RAM_ENDIAN_SHIFT) | ||
73 | #define MMU_RAM_ELSZ_SHIFT 7 | ||
74 | #define MMU_RAM_ELSZ_MASK (3 << MMU_RAM_ELSZ_SHIFT) | ||
75 | #define MMU_RAM_ELSZ_8 (0 << MMU_RAM_ELSZ_SHIFT) | ||
76 | #define MMU_RAM_ELSZ_16 (1 << MMU_RAM_ELSZ_SHIFT) | ||
77 | #define MMU_RAM_ELSZ_32 (2 << MMU_RAM_ELSZ_SHIFT) | ||
78 | #define MMU_RAM_ELSZ_NONE (3 << MMU_RAM_ELSZ_SHIFT) | ||
79 | #define MMU_RAM_MIXED_SHIFT 6 | ||
80 | #define MMU_RAM_MIXED_MASK (1 << MMU_RAM_MIXED_SHIFT) | ||
81 | #define MMU_RAM_MIXED MMU_RAM_MIXED_MASK | ||
82 | |||
83 | /* | ||
84 | * register accessors | ||
85 | */ | ||
86 | static inline u32 iommu_read_reg(struct omap_iommu *obj, size_t offs) | ||
87 | { | ||
88 | return __raw_readl(obj->regbase + offs); | ||
89 | } | ||
90 | |||
91 | static inline void iommu_write_reg(struct omap_iommu *obj, u32 val, size_t offs) | ||
92 | { | ||
93 | __raw_writel(val, obj->regbase + offs); | ||
94 | } | ||
95 | |||
96 | #endif /* __MACH_IOMMU2_H */ | ||
diff --git a/arch/arm/plat-omap/include/plat/iopgtable.h b/arch/arm/plat-omap/include/plat/iopgtable.h deleted file mode 100644 index 66a813977d52..000000000000 --- a/arch/arm/plat-omap/include/plat/iopgtable.h +++ /dev/null | |||
@@ -1,120 +0,0 @@ | |||
1 | /* | ||
2 | * omap iommu: pagetable definitions | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Nokia Corporation | ||
5 | * | ||
6 | * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __PLAT_OMAP_IOMMU_H | ||
14 | #define __PLAT_OMAP_IOMMU_H | ||
15 | |||
16 | /* | ||
17 | * "L2 table" address mask and size definitions. | ||
18 | */ | ||
19 | #define IOPGD_SHIFT 20 | ||
20 | #define IOPGD_SIZE (1UL << IOPGD_SHIFT) | ||
21 | #define IOPGD_MASK (~(IOPGD_SIZE - 1)) | ||
22 | |||
23 | /* | ||
24 | * "section" address mask and size definitions. | ||
25 | */ | ||
26 | #define IOSECTION_SHIFT 20 | ||
27 | #define IOSECTION_SIZE (1UL << IOSECTION_SHIFT) | ||
28 | #define IOSECTION_MASK (~(IOSECTION_SIZE - 1)) | ||
29 | |||
30 | /* | ||
31 | * "supersection" address mask and size definitions. | ||
32 | */ | ||
33 | #define IOSUPER_SHIFT 24 | ||
34 | #define IOSUPER_SIZE (1UL << IOSUPER_SHIFT) | ||
35 | #define IOSUPER_MASK (~(IOSUPER_SIZE - 1)) | ||
36 | |||
37 | #define PTRS_PER_IOPGD (1UL << (32 - IOPGD_SHIFT)) | ||
38 | #define IOPGD_TABLE_SIZE (PTRS_PER_IOPGD * sizeof(u32)) | ||
39 | |||
40 | /* | ||
41 | * "small page" address mask and size definitions. | ||
42 | */ | ||
43 | #define IOPTE_SHIFT 12 | ||
44 | #define IOPTE_SIZE (1UL << IOPTE_SHIFT) | ||
45 | #define IOPTE_MASK (~(IOPTE_SIZE - 1)) | ||
46 | |||
47 | /* | ||
48 | * "large page" address mask and size definitions. | ||
49 | */ | ||
50 | #define IOLARGE_SHIFT 16 | ||
51 | #define IOLARGE_SIZE (1UL << IOLARGE_SHIFT) | ||
52 | #define IOLARGE_MASK (~(IOLARGE_SIZE - 1)) | ||
53 | |||
54 | #define PTRS_PER_IOPTE (1UL << (IOPGD_SHIFT - IOPTE_SHIFT)) | ||
55 | #define IOPTE_TABLE_SIZE (PTRS_PER_IOPTE * sizeof(u32)) | ||
56 | |||
57 | #define IOPAGE_MASK IOPTE_MASK | ||
58 | |||
59 | /** | ||
60 | * omap_iommu_translate() - va to pa translation | ||
61 | * @d: omap iommu descriptor | ||
62 | * @va: virtual address | ||
63 | * @mask: omap iommu descriptor mask | ||
64 | * | ||
65 | * va to pa translation | ||
66 | */ | ||
67 | static inline phys_addr_t omap_iommu_translate(u32 d, u32 va, u32 mask) | ||
68 | { | ||
69 | return (d & mask) | (va & (~mask)); | ||
70 | } | ||
71 | |||
72 | /* | ||
73 | * some descriptor attributes. | ||
74 | */ | ||
75 | #define IOPGD_TABLE (1 << 0) | ||
76 | #define IOPGD_SECTION (2 << 0) | ||
77 | #define IOPGD_SUPER (1 << 18 | 2 << 0) | ||
78 | |||
79 | #define iopgd_is_table(x) (((x) & 3) == IOPGD_TABLE) | ||
80 | #define iopgd_is_section(x) (((x) & (1 << 18 | 3)) == IOPGD_SECTION) | ||
81 | #define iopgd_is_super(x) (((x) & (1 << 18 | 3)) == IOPGD_SUPER) | ||
82 | |||
83 | #define IOPTE_SMALL (2 << 0) | ||
84 | #define IOPTE_LARGE (1 << 0) | ||
85 | |||
86 | #define iopte_is_small(x) (((x) & 2) == IOPTE_SMALL) | ||
87 | #define iopte_is_large(x) (((x) & 3) == IOPTE_LARGE) | ||
88 | |||
89 | /* to find an entry in a page-table-directory */ | ||
90 | #define iopgd_index(da) (((da) >> IOPGD_SHIFT) & (PTRS_PER_IOPGD - 1)) | ||
91 | #define iopgd_offset(obj, da) ((obj)->iopgd + iopgd_index(da)) | ||
92 | |||
93 | #define iopgd_page_paddr(iopgd) (*iopgd & ~((1 << 10) - 1)) | ||
94 | #define iopgd_page_vaddr(iopgd) ((u32 *)phys_to_virt(iopgd_page_paddr(iopgd))) | ||
95 | |||
96 | /* to find an entry in the second-level page table. */ | ||
97 | #define iopte_index(da) (((da) >> IOPTE_SHIFT) & (PTRS_PER_IOPTE - 1)) | ||
98 | #define iopte_offset(iopgd, da) (iopgd_page_vaddr(iopgd) + iopte_index(da)) | ||
99 | |||
100 | static inline u32 iotlb_init_entry(struct iotlb_entry *e, u32 da, u32 pa, | ||
101 | u32 flags) | ||
102 | { | ||
103 | memset(e, 0, sizeof(*e)); | ||
104 | |||
105 | e->da = da; | ||
106 | e->pa = pa; | ||
107 | e->valid = 1; | ||
108 | /* FIXME: add OMAP1 support */ | ||
109 | e->pgsz = flags & MMU_CAM_PGSZ_MASK; | ||
110 | e->endian = flags & MMU_RAM_ENDIAN_MASK; | ||
111 | e->elsz = flags & MMU_RAM_ELSZ_MASK; | ||
112 | e->mixed = flags & MMU_RAM_MIXED_MASK; | ||
113 | |||
114 | return iopgsz_to_bytes(e->pgsz); | ||
115 | } | ||
116 | |||
117 | #define to_iommu(dev) \ | ||
118 | (struct omap_iommu *)platform_get_drvdata(to_platform_device(dev)) | ||
119 | |||
120 | #endif /* __PLAT_OMAP_IOMMU_H */ | ||
diff --git a/arch/arm/plat-omap/include/plat/iovmm.h b/arch/arm/plat-omap/include/plat/iovmm.h deleted file mode 100644 index 498e57cda6cd..000000000000 --- a/arch/arm/plat-omap/include/plat/iovmm.h +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | /* | ||
2 | * omap iommu: simple virtual address space management | ||
3 | * | ||
4 | * Copyright (C) 2008-2009 Nokia Corporation | ||
5 | * | ||
6 | * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __IOMMU_MMAP_H | ||
14 | #define __IOMMU_MMAP_H | ||
15 | |||
16 | #include <linux/iommu.h> | ||
17 | |||
18 | struct iovm_struct { | ||
19 | struct omap_iommu *iommu; /* iommu object which this belongs to */ | ||
20 | u32 da_start; /* area definition */ | ||
21 | u32 da_end; | ||
22 | u32 flags; /* IOVMF_: see below */ | ||
23 | struct list_head list; /* linked in ascending order */ | ||
24 | const struct sg_table *sgt; /* keep 'page' <-> 'da' mapping */ | ||
25 | void *va; /* mpu side mapped address */ | ||
26 | }; | ||
27 | |||
28 | /* | ||
29 | * IOVMF_FLAGS: attribute for iommu virtual memory area(iovma) | ||
30 | * | ||
31 | * lower 16 bit is used for h/w and upper 16 bit is for s/w. | ||
32 | */ | ||
33 | #define IOVMF_SW_SHIFT 16 | ||
34 | |||
35 | /* | ||
36 | * iovma: h/w flags derived from cam and ram attribute | ||
37 | */ | ||
38 | #define IOVMF_CAM_MASK (~((1 << 10) - 1)) | ||
39 | #define IOVMF_RAM_MASK (~IOVMF_CAM_MASK) | ||
40 | |||
41 | #define IOVMF_PGSZ_MASK (3 << 0) | ||
42 | #define IOVMF_PGSZ_1M MMU_CAM_PGSZ_1M | ||
43 | #define IOVMF_PGSZ_64K MMU_CAM_PGSZ_64K | ||
44 | #define IOVMF_PGSZ_4K MMU_CAM_PGSZ_4K | ||
45 | #define IOVMF_PGSZ_16M MMU_CAM_PGSZ_16M | ||
46 | |||
47 | #define IOVMF_ENDIAN_MASK (1 << 9) | ||
48 | #define IOVMF_ENDIAN_BIG MMU_RAM_ENDIAN_BIG | ||
49 | #define IOVMF_ENDIAN_LITTLE MMU_RAM_ENDIAN_LITTLE | ||
50 | |||
51 | #define IOVMF_ELSZ_MASK (3 << 7) | ||
52 | #define IOVMF_ELSZ_8 MMU_RAM_ELSZ_8 | ||
53 | #define IOVMF_ELSZ_16 MMU_RAM_ELSZ_16 | ||
54 | #define IOVMF_ELSZ_32 MMU_RAM_ELSZ_32 | ||
55 | #define IOVMF_ELSZ_NONE MMU_RAM_ELSZ_NONE | ||
56 | |||
57 | #define IOVMF_MIXED_MASK (1 << 6) | ||
58 | #define IOVMF_MIXED MMU_RAM_MIXED | ||
59 | |||
60 | /* | ||
61 | * iovma: s/w flags, used for mapping and umapping internally. | ||
62 | */ | ||
63 | #define IOVMF_MMIO (1 << IOVMF_SW_SHIFT) | ||
64 | #define IOVMF_ALLOC (2 << IOVMF_SW_SHIFT) | ||
65 | #define IOVMF_ALLOC_MASK (3 << IOVMF_SW_SHIFT) | ||
66 | |||
67 | /* "superpages" is supported just with physically linear pages */ | ||
68 | #define IOVMF_DISCONT (1 << (2 + IOVMF_SW_SHIFT)) | ||
69 | #define IOVMF_LINEAR (2 << (2 + IOVMF_SW_SHIFT)) | ||
70 | #define IOVMF_LINEAR_MASK (3 << (2 + IOVMF_SW_SHIFT)) | ||
71 | |||
72 | #define IOVMF_DA_FIXED (1 << (4 + IOVMF_SW_SHIFT)) | ||
73 | |||
74 | |||
75 | extern struct iovm_struct *omap_find_iovm_area(struct device *dev, u32 da); | ||
76 | extern u32 | ||
77 | omap_iommu_vmap(struct iommu_domain *domain, struct device *dev, u32 da, | ||
78 | const struct sg_table *sgt, u32 flags); | ||
79 | extern struct sg_table *omap_iommu_vunmap(struct iommu_domain *domain, | ||
80 | struct device *dev, u32 da); | ||
81 | extern u32 | ||
82 | omap_iommu_vmalloc(struct iommu_domain *domain, struct device *dev, | ||
83 | u32 da, size_t bytes, u32 flags); | ||
84 | extern void | ||
85 | omap_iommu_vfree(struct iommu_domain *domain, struct device *dev, | ||
86 | const u32 da); | ||
87 | extern void *omap_da_to_va(struct device *dev, u32 da); | ||
88 | |||
89 | #endif /* __IOMMU_MMAP_H */ | ||
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h index f4a4cd014795..1957a8516e93 100644 --- a/arch/arm/plat-omap/include/plat/omap-serial.h +++ b/arch/arm/plat-omap/include/plat/omap-serial.h | |||
@@ -40,10 +40,10 @@ | |||
40 | #define OMAP_UART_WER_MOD_WKUP 0X7F | 40 | #define OMAP_UART_WER_MOD_WKUP 0X7F |
41 | 41 | ||
42 | /* Enable XON/XOFF flow control on output */ | 42 | /* Enable XON/XOFF flow control on output */ |
43 | #define OMAP_UART_SW_TX 0x8 | 43 | #define OMAP_UART_SW_TX 0x04 |
44 | 44 | ||
45 | /* Enable XON/XOFF flow control on input */ | 45 | /* Enable XON/XOFF flow control on input */ |
46 | #define OMAP_UART_SW_RX 0x2 | 46 | #define OMAP_UART_SW_RX 0x04 |
47 | 47 | ||
48 | #define OMAP_UART_SYSC_RESET 0X07 | 48 | #define OMAP_UART_SYSC_RESET 0X07 |
49 | #define OMAP_UART_TCR_TRIG 0X0F | 49 | #define OMAP_UART_TCR_TRIG 0X0F |
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index b3349f7b1a2c..1db029438022 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -443,6 +443,11 @@ struct omap_hwmod_omap4_prcm { | |||
443 | * in order to complete the reset. Optional clocks will be disabled | 443 | * in order to complete the reset. Optional clocks will be disabled |
444 | * again after the reset. | 444 | * again after the reset. |
445 | * HWMOD_16BIT_REG: Module has 16bit registers | 445 | * HWMOD_16BIT_REG: Module has 16bit registers |
446 | * HWMOD_EXT_OPT_MAIN_CLK: The only main functional clock source for | ||
447 | * this IP block comes from an off-chip source and is not always | ||
448 | * enabled. This prevents the hwmod code from being able to | ||
449 | * enable and reset the IP block early. XXX Eventually it should | ||
450 | * be possible to query the clock framework for this information. | ||
446 | */ | 451 | */ |
447 | #define HWMOD_SWSUP_SIDLE (1 << 0) | 452 | #define HWMOD_SWSUP_SIDLE (1 << 0) |
448 | #define HWMOD_SWSUP_MSTANDBY (1 << 1) | 453 | #define HWMOD_SWSUP_MSTANDBY (1 << 1) |
@@ -453,6 +458,7 @@ struct omap_hwmod_omap4_prcm { | |||
453 | #define HWMOD_NO_IDLEST (1 << 6) | 458 | #define HWMOD_NO_IDLEST (1 << 6) |
454 | #define HWMOD_CONTROL_OPT_CLKS_IN_RESET (1 << 7) | 459 | #define HWMOD_CONTROL_OPT_CLKS_IN_RESET (1 << 7) |
455 | #define HWMOD_16BIT_REG (1 << 8) | 460 | #define HWMOD_16BIT_REG (1 << 8) |
461 | #define HWMOD_EXT_OPT_MAIN_CLK (1 << 9) | ||
456 | 462 | ||
457 | /* | 463 | /* |
458 | * omap_hwmod._int_flags definitions | 464 | * omap_hwmod._int_flags definitions |
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index db98e7021f0d..0abd1c469887 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
@@ -473,12 +473,13 @@ int s3c2410_dma_enqueue(enum dma_ch channel, void *id, | |||
473 | pr_debug("dma%d: %s: buffer %p queued onto non-empty channel\n", | 473 | pr_debug("dma%d: %s: buffer %p queued onto non-empty channel\n", |
474 | chan->number, __func__, buf); | 474 | chan->number, __func__, buf); |
475 | 475 | ||
476 | if (chan->end == NULL) | 476 | if (chan->end == NULL) { |
477 | pr_debug("dma%d: %s: %p not empty, and chan->end==NULL?\n", | 477 | pr_debug("dma%d: %s: %p not empty, and chan->end==NULL?\n", |
478 | chan->number, __func__, chan); | 478 | chan->number, __func__, chan); |
479 | 479 | } else { | |
480 | chan->end->next = buf; | 480 | chan->end->next = buf; |
481 | chan->end = buf; | 481 | chan->end = buf; |
482 | } | ||
482 | } | 483 | } |
483 | 484 | ||
484 | /* if necessary, update the next buffer field */ | 485 | /* if necessary, update the next buffer field */ |
diff --git a/arch/arm/plat-samsung/include/plat/spi-core.h b/arch/arm/plat-samsung/include/plat/spi-core.h new file mode 100644 index 000000000000..0b9428ab3fc3 --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/spi-core.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Heiko Stuebner <heiko@sntech.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __PLAT_S3C_SPI_CORE_H | ||
10 | #define __PLAT_S3C_SPI_CORE_H | ||
11 | |||
12 | /* These functions are only for use with the core support code, such as | ||
13 | * the cpu specific initialisation code | ||
14 | */ | ||
15 | |||
16 | /* re-define device name depending on support. */ | ||
17 | static inline void s3c64xx_spi_setname(char *name) | ||
18 | { | ||
19 | #ifdef CONFIG_S3C64XX_DEV_SPI0 | ||
20 | s3c64xx_device_spi0.name = name; | ||
21 | #endif | ||
22 | #ifdef CONFIG_S3C64XX_DEV_SPI1 | ||
23 | s3c64xx_device_spi1.name = name; | ||
24 | #endif | ||
25 | #ifdef CONFIG_S3C64XX_DEV_SPI2 | ||
26 | s3c64xx_device_spi2.name = name; | ||
27 | #endif | ||
28 | } | ||
29 | |||
30 | #endif /* __PLAT_S3C_SPI_CORE_H */ | ||
diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile index 635cb1865e4d..32d05c8219dc 100644 --- a/arch/arm/tools/Makefile +++ b/arch/arm/tools/Makefile | |||
@@ -5,6 +5,6 @@ | |||
5 | # | 5 | # |
6 | 6 | ||
7 | include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types | 7 | include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types |
8 | @echo ' Generating $@' | 8 | @$(kecho) ' Generating $@' |
9 | @mkdir -p $(dir $@) | 9 | @mkdir -p $(dir $@) |
10 | $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; } | 10 | $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; } |
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index c834b32af275..3b44e0dd0a93 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -701,11 +701,14 @@ static int __init vfp_init(void) | |||
701 | elf_hwcap |= HWCAP_VFPv3; | 701 | elf_hwcap |= HWCAP_VFPv3; |
702 | 702 | ||
703 | /* | 703 | /* |
704 | * Check for VFPv3 D16. CPUs in this configuration | 704 | * Check for VFPv3 D16 and VFPv4 D16. CPUs in |
705 | * only have 16 x 64bit registers. | 705 | * this configuration only have 16 x 64bit |
706 | * registers. | ||
706 | */ | 707 | */ |
707 | if (((fmrx(MVFR0) & MVFR0_A_SIMD_MASK)) == 1) | 708 | if (((fmrx(MVFR0) & MVFR0_A_SIMD_MASK)) == 1) |
708 | elf_hwcap |= HWCAP_VFPv3D16; | 709 | elf_hwcap |= HWCAP_VFPv3D16; /* also v4-D16 */ |
710 | else | ||
711 | elf_hwcap |= HWCAP_VFPD32; | ||
709 | } | 712 | } |
710 | #endif | 713 | #endif |
711 | /* | 714 | /* |
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index 59bcb96ac369..f57609275449 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c | |||
@@ -166,3 +166,14 @@ void free_xenballooned_pages(int nr_pages, struct page **pages) | |||
166 | *pages = NULL; | 166 | *pages = NULL; |
167 | } | 167 | } |
168 | EXPORT_SYMBOL_GPL(free_xenballooned_pages); | 168 | EXPORT_SYMBOL_GPL(free_xenballooned_pages); |
169 | |||
170 | /* In the hypervisor.S file. */ | ||
171 | EXPORT_SYMBOL_GPL(HYPERVISOR_event_channel_op); | ||
172 | EXPORT_SYMBOL_GPL(HYPERVISOR_grant_table_op); | ||
173 | EXPORT_SYMBOL_GPL(HYPERVISOR_xen_version); | ||
174 | EXPORT_SYMBOL_GPL(HYPERVISOR_console_io); | ||
175 | EXPORT_SYMBOL_GPL(HYPERVISOR_sched_op); | ||
176 | EXPORT_SYMBOL_GPL(HYPERVISOR_hvm_op); | ||
177 | EXPORT_SYMBOL_GPL(HYPERVISOR_memory_op); | ||
178 | EXPORT_SYMBOL_GPL(HYPERVISOR_physdev_op); | ||
179 | EXPORT_SYMBOL_GPL(privcmd_call); | ||
diff --git a/arch/arm/xen/grant-table.c b/arch/arm/xen/grant-table.c index dbd1330c0196..859a9bb002d5 100644 --- a/arch/arm/xen/grant-table.c +++ b/arch/arm/xen/grant-table.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <xen/page.h> | 33 | #include <xen/page.h> |
34 | #include <xen/grant_table.h> | 34 | #include <xen/grant_table.h> |
35 | 35 | ||
36 | int arch_gnttab_map_shared(unsigned long *frames, unsigned long nr_gframes, | 36 | int arch_gnttab_map_shared(xen_pfn_t *frames, unsigned long nr_gframes, |
37 | unsigned long max_nr_gframes, | 37 | unsigned long max_nr_gframes, |
38 | void **__shared) | 38 | void **__shared) |
39 | { | 39 | { |
diff --git a/arch/arm/xen/hypercall.S b/arch/arm/xen/hypercall.S index 074f5ed101b9..71f723984cbd 100644 --- a/arch/arm/xen/hypercall.S +++ b/arch/arm/xen/hypercall.S | |||
@@ -48,20 +48,16 @@ | |||
48 | 48 | ||
49 | #include <linux/linkage.h> | 49 | #include <linux/linkage.h> |
50 | #include <asm/assembler.h> | 50 | #include <asm/assembler.h> |
51 | #include <asm/opcodes-virt.h> | ||
51 | #include <xen/interface/xen.h> | 52 | #include <xen/interface/xen.h> |
52 | 53 | ||
53 | 54 | ||
54 | /* HVC 0xEA1 */ | 55 | #define XEN_IMM 0xEA1 |
55 | #ifdef CONFIG_THUMB2_KERNEL | ||
56 | #define xen_hvc .word 0xf7e08ea1 | ||
57 | #else | ||
58 | #define xen_hvc .word 0xe140ea71 | ||
59 | #endif | ||
60 | 56 | ||
61 | #define HYPERCALL_SIMPLE(hypercall) \ | 57 | #define HYPERCALL_SIMPLE(hypercall) \ |
62 | ENTRY(HYPERVISOR_##hypercall) \ | 58 | ENTRY(HYPERVISOR_##hypercall) \ |
63 | mov r12, #__HYPERVISOR_##hypercall; \ | 59 | mov r12, #__HYPERVISOR_##hypercall; \ |
64 | xen_hvc; \ | 60 | __HVC(XEN_IMM); \ |
65 | mov pc, lr; \ | 61 | mov pc, lr; \ |
66 | ENDPROC(HYPERVISOR_##hypercall) | 62 | ENDPROC(HYPERVISOR_##hypercall) |
67 | 63 | ||
@@ -76,7 +72,7 @@ ENTRY(HYPERVISOR_##hypercall) \ | |||
76 | stmdb sp!, {r4} \ | 72 | stmdb sp!, {r4} \ |
77 | ldr r4, [sp, #4] \ | 73 | ldr r4, [sp, #4] \ |
78 | mov r12, #__HYPERVISOR_##hypercall; \ | 74 | mov r12, #__HYPERVISOR_##hypercall; \ |
79 | xen_hvc \ | 75 | __HVC(XEN_IMM); \ |
80 | ldm sp!, {r4} \ | 76 | ldm sp!, {r4} \ |
81 | mov pc, lr \ | 77 | mov pc, lr \ |
82 | ENDPROC(HYPERVISOR_##hypercall) | 78 | ENDPROC(HYPERVISOR_##hypercall) |
@@ -100,7 +96,7 @@ ENTRY(privcmd_call) | |||
100 | mov r2, r3 | 96 | mov r2, r3 |
101 | ldr r3, [sp, #8] | 97 | ldr r3, [sp, #8] |
102 | ldr r4, [sp, #4] | 98 | ldr r4, [sp, #4] |
103 | xen_hvc | 99 | __HVC(XEN_IMM) |
104 | ldm sp!, {r4} | 100 | ldm sp!, {r4} |
105 | mov pc, lr | 101 | mov pc, lr |
106 | ENDPROC(privcmd_call); | 102 | ENDPROC(privcmd_call); |