diff options
Diffstat (limited to 'arch/arm')
166 files changed, 2997 insertions, 949 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index aee8f3ada7ae..117e81b12009 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -6,7 +6,7 @@ config ARM | |||
6 | select HAVE_DMA_API_DEBUG | 6 | select HAVE_DMA_API_DEBUG |
7 | select HAVE_IDE if PCI || ISA || PCMCIA | 7 | select HAVE_IDE if PCI || ISA || PCMCIA |
8 | select HAVE_DMA_ATTRS | 8 | select HAVE_DMA_ATTRS |
9 | select HAVE_DMA_CONTIGUOUS if (CPU_V6 || CPU_V6K || CPU_V7) | 9 | select HAVE_DMA_CONTIGUOUS if MMU |
10 | select HAVE_MEMBLOCK | 10 | select HAVE_MEMBLOCK |
11 | select RTC_LIB | 11 | select RTC_LIB |
12 | select SYS_SUPPORTS_APM_EMULATION | 12 | select SYS_SUPPORTS_APM_EMULATION |
@@ -16,6 +16,7 @@ config ARM | |||
16 | select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL | 16 | select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL |
17 | select HAVE_ARCH_KGDB | 17 | select HAVE_ARCH_KGDB |
18 | select HAVE_ARCH_TRACEHOOK | 18 | select HAVE_ARCH_TRACEHOOK |
19 | select HAVE_SYSCALL_TRACEPOINTS | ||
19 | select HAVE_KPROBES if !XIP_KERNEL | 20 | select HAVE_KPROBES if !XIP_KERNEL |
20 | select HAVE_KRETPROBES if (HAVE_KPROBES) | 21 | select HAVE_KRETPROBES if (HAVE_KPROBES) |
21 | select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) | 22 | select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) |
@@ -38,7 +39,6 @@ config ARM | |||
38 | select HARDIRQS_SW_RESEND | 39 | select HARDIRQS_SW_RESEND |
39 | select GENERIC_IRQ_PROBE | 40 | select GENERIC_IRQ_PROBE |
40 | select GENERIC_IRQ_SHOW | 41 | select GENERIC_IRQ_SHOW |
41 | select GENERIC_IRQ_PROBE | ||
42 | select ARCH_WANT_IPC_PARSE_VERSION | 42 | select ARCH_WANT_IPC_PARSE_VERSION |
43 | select HARDIRQS_SW_RESEND | 43 | select HARDIRQS_SW_RESEND |
44 | select CPU_PM if (SUSPEND || CPU_IDLE) | 44 | select CPU_PM if (SUSPEND || CPU_IDLE) |
@@ -126,11 +126,6 @@ config TRACE_IRQFLAGS_SUPPORT | |||
126 | bool | 126 | bool |
127 | default y | 127 | default y |
128 | 128 | ||
129 | config GENERIC_LOCKBREAK | ||
130 | bool | ||
131 | default y | ||
132 | depends on SMP && PREEMPT | ||
133 | |||
134 | config RWSEM_GENERIC_SPINLOCK | 129 | config RWSEM_GENERIC_SPINLOCK |
135 | bool | 130 | bool |
136 | default y | 131 | default y |
@@ -1419,6 +1414,16 @@ config PL310_ERRATA_769419 | |||
1419 | on systems with an outer cache, the store buffer is drained | 1414 | on systems with an outer cache, the store buffer is drained |
1420 | explicitly. | 1415 | explicitly. |
1421 | 1416 | ||
1417 | config ARM_ERRATA_775420 | ||
1418 | bool "ARM errata: A data cache maintenance operation which aborts, might lead to deadlock" | ||
1419 | depends on CPU_V7 | ||
1420 | help | ||
1421 | This option enables the workaround for the 775420 Cortex-A9 (r2p2, | ||
1422 | r2p6,r2p8,r2p10,r3p0) erratum. In case a date cache maintenance | ||
1423 | operation aborts with MMU exception, it might cause the processor | ||
1424 | to deadlock. This workaround puts DSB before executing ISB if | ||
1425 | an abort may occur on cache maintenance. | ||
1426 | |||
1422 | endmenu | 1427 | endmenu |
1423 | 1428 | ||
1424 | source "arch/arm/common/Kconfig" | 1429 | source "arch/arm/common/Kconfig" |
@@ -1897,12 +1902,6 @@ config CC_STACKPROTECTOR | |||
1897 | neutralized via a kernel panic. | 1902 | neutralized via a kernel panic. |
1898 | This feature requires gcc version 4.2 or above. | 1903 | This feature requires gcc version 4.2 or above. |
1899 | 1904 | ||
1900 | config DEPRECATED_PARAM_STRUCT | ||
1901 | bool "Provide old way to pass kernel parameters" | ||
1902 | help | ||
1903 | This was deprecated in 2001 and announced to live on for 5 years. | ||
1904 | Some old boot loaders still use this way. | ||
1905 | |||
1906 | endmenu | 1905 | endmenu |
1907 | 1906 | ||
1908 | menu "Boot options" | 1907 | menu "Boot options" |
@@ -1915,6 +1914,23 @@ config USE_OF | |||
1915 | help | 1914 | help |
1916 | Include support for flattened device tree machine descriptions. | 1915 | Include support for flattened device tree machine descriptions. |
1917 | 1916 | ||
1917 | config ATAGS | ||
1918 | bool "Support for the traditional ATAGS boot data passing" if USE_OF | ||
1919 | default y | ||
1920 | help | ||
1921 | This is the traditional way of passing data to the kernel at boot | ||
1922 | time. If you are solely relying on the flattened device tree (or | ||
1923 | the ARM_ATAG_DTB_COMPAT option) then you may unselect this option | ||
1924 | to remove ATAGS support from your kernel binary. If unsure, | ||
1925 | leave this to y. | ||
1926 | |||
1927 | config DEPRECATED_PARAM_STRUCT | ||
1928 | bool "Provide old way to pass kernel parameters" | ||
1929 | depends on ATAGS | ||
1930 | help | ||
1931 | This was deprecated in 2001 and announced to live on for 5 years. | ||
1932 | Some old boot loaders still use this way. | ||
1933 | |||
1918 | # Compressed boot loader in ROM. Yes, we really want to ask about | 1934 | # Compressed boot loader in ROM. Yes, we really want to ask about |
1919 | # TEXT and BSS so we preserve their values in the config files. | 1935 | # TEXT and BSS so we preserve their values in the config files. |
1920 | config ZBOOT_ROM_TEXT | 1936 | config ZBOOT_ROM_TEXT |
@@ -2041,6 +2057,7 @@ config CMDLINE | |||
2041 | choice | 2057 | choice |
2042 | prompt "Kernel command line type" if CMDLINE != "" | 2058 | prompt "Kernel command line type" if CMDLINE != "" |
2043 | default CMDLINE_FROM_BOOTLOADER | 2059 | default CMDLINE_FROM_BOOTLOADER |
2060 | depends on ATAGS | ||
2044 | 2061 | ||
2045 | config CMDLINE_FROM_BOOTLOADER | 2062 | config CMDLINE_FROM_BOOTLOADER |
2046 | bool "Use bootloader kernel arguments if available" | 2063 | bool "Use bootloader kernel arguments if available" |
@@ -2110,7 +2127,7 @@ config KEXEC | |||
2110 | 2127 | ||
2111 | config ATAGS_PROC | 2128 | config ATAGS_PROC |
2112 | bool "Export atags in procfs" | 2129 | bool "Export atags in procfs" |
2113 | depends on KEXEC | 2130 | depends on ATAGS && KEXEC |
2114 | default y | 2131 | default y |
2115 | help | 2132 | help |
2116 | Should the atags used to boot the kernel be exported in an "atags" | 2133 | Should the atags used to boot the kernel be exported in an "atags" |
@@ -2150,6 +2167,7 @@ source "drivers/cpufreq/Kconfig" | |||
2150 | config CPU_FREQ_IMX | 2167 | config CPU_FREQ_IMX |
2151 | tristate "CPUfreq driver for i.MX CPUs" | 2168 | tristate "CPUfreq driver for i.MX CPUs" |
2152 | depends on ARCH_MXC && CPU_FREQ | 2169 | depends on ARCH_MXC && CPU_FREQ |
2170 | select CPU_FREQ_TABLE | ||
2153 | help | 2171 | help |
2154 | This enables the CPUfreq driver for i.MX CPUs. | 2172 | This enables the CPUfreq driver for i.MX CPUs. |
2155 | 2173 | ||
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index f15f82bf3a50..e968a52e4881 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -356,15 +356,15 @@ choice | |||
356 | is nothing connected to read from the DCC. | 356 | is nothing connected to read from the DCC. |
357 | 357 | ||
358 | config DEBUG_SEMIHOSTING | 358 | config DEBUG_SEMIHOSTING |
359 | bool "Kernel low-level debug output via semihosting I" | 359 | bool "Kernel low-level debug output via semihosting I/O" |
360 | help | 360 | help |
361 | Semihosting enables code running on an ARM target to use | 361 | Semihosting enables code running on an ARM target to use |
362 | the I/O facilities on a host debugger/emulator through a | 362 | the I/O facilities on a host debugger/emulator through a |
363 | simple SVC calls. The host debugger or emulator must have | 363 | simple SVC call. The host debugger or emulator must have |
364 | semihosting enabled for the special svc call to be trapped | 364 | semihosting enabled for the special svc call to be trapped |
365 | otherwise the kernel will crash. | 365 | otherwise the kernel will crash. |
366 | 366 | ||
367 | This is known to work with OpenOCD, as wellas | 367 | This is known to work with OpenOCD, as well as |
368 | ARM's Fast Models, or any other controlling environment | 368 | ARM's Fast Models, or any other controlling environment |
369 | that implements semihosting. | 369 | that implements semihosting. |
370 | 370 | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 0457ef4d8c86..361936a3d191 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -289,10 +289,10 @@ zImage Image xipImage bootpImage uImage: vmlinux | |||
289 | zinstall uinstall install: vmlinux | 289 | zinstall uinstall install: vmlinux |
290 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ | 290 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ |
291 | 291 | ||
292 | %.dtb: | 292 | %.dtb: scripts |
293 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ | 293 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ |
294 | 294 | ||
295 | dtbs: | 295 | dtbs: scripts |
296 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ | 296 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ |
297 | 297 | ||
298 | # We use MRPROPER_FILES and CLEAN_FILES now | 298 | # We use MRPROPER_FILES and CLEAN_FILES now |
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index b8c64b80bafc..bc67cbff3944 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -653,16 +653,21 @@ __armv7_mmu_cache_on: | |||
653 | mcrne p15, 0, r0, c8, c7, 0 @ flush I,D TLBs | 653 | mcrne p15, 0, r0, c8, c7, 0 @ flush I,D TLBs |
654 | #endif | 654 | #endif |
655 | mrc p15, 0, r0, c1, c0, 0 @ read control reg | 655 | mrc p15, 0, r0, c1, c0, 0 @ read control reg |
656 | bic r0, r0, #1 << 28 @ clear SCTLR.TRE | ||
656 | orr r0, r0, #0x5000 @ I-cache enable, RR cache replacement | 657 | orr r0, r0, #0x5000 @ I-cache enable, RR cache replacement |
657 | orr r0, r0, #0x003c @ write buffer | 658 | orr r0, r0, #0x003c @ write buffer |
658 | #ifdef CONFIG_MMU | 659 | #ifdef CONFIG_MMU |
659 | #ifdef CONFIG_CPU_ENDIAN_BE8 | 660 | #ifdef CONFIG_CPU_ENDIAN_BE8 |
660 | orr r0, r0, #1 << 25 @ big-endian page tables | 661 | orr r0, r0, #1 << 25 @ big-endian page tables |
661 | #endif | 662 | #endif |
663 | mrcne p15, 0, r6, c2, c0, 2 @ read ttb control reg | ||
662 | orrne r0, r0, #1 @ MMU enabled | 664 | orrne r0, r0, #1 @ MMU enabled |
663 | movne r1, #0xfffffffd @ domain 0 = client | 665 | movne r1, #0xfffffffd @ domain 0 = client |
666 | bic r6, r6, #1 << 31 @ 32-bit translation system | ||
667 | bic r6, r6, #3 << 0 @ use only ttbr0 | ||
664 | mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer | 668 | mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer |
665 | mcrne p15, 0, r1, c3, c0, 0 @ load domain access control | 669 | mcrne p15, 0, r1, c3, c0, 0 @ load domain access control |
670 | mcrne p15, 0, r6, c2, c0, 2 @ load ttb control | ||
666 | #endif | 671 | #endif |
667 | mcr p15, 0, r0, c7, c5, 4 @ ISB | 672 | mcr p15, 0, r0, c7, c5, 4 @ ISB |
668 | mcr p15, 0, r0, c1, c0, 0 @ load control register | 673 | mcr p15, 0, r0, c1, c0, 0 @ load control register |
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 59509c48d7e5..bd0cff3f808c 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi | |||
@@ -154,5 +154,10 @@ | |||
154 | #size-cells = <0>; | 154 | #size-cells = <0>; |
155 | ti,hwmods = "i2c3"; | 155 | ti,hwmods = "i2c3"; |
156 | }; | 156 | }; |
157 | |||
158 | wdt2: wdt@44e35000 { | ||
159 | compatible = "ti,omap3-wdt"; | ||
160 | ti,hwmods = "wd_timer2"; | ||
161 | }; | ||
157 | }; | 162 | }; |
158 | }; | 163 | }; |
diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi index 66389c1c6f62..7c95f76398de 100644 --- a/arch/arm/boot/dts/at91sam9260.dtsi +++ b/arch/arm/boot/dts/at91sam9260.dtsi | |||
@@ -104,6 +104,7 @@ | |||
104 | #gpio-cells = <2>; | 104 | #gpio-cells = <2>; |
105 | gpio-controller; | 105 | gpio-controller; |
106 | interrupt-controller; | 106 | interrupt-controller; |
107 | #interrupt-cells = <2>; | ||
107 | }; | 108 | }; |
108 | 109 | ||
109 | pioB: gpio@fffff600 { | 110 | pioB: gpio@fffff600 { |
@@ -113,6 +114,7 @@ | |||
113 | #gpio-cells = <2>; | 114 | #gpio-cells = <2>; |
114 | gpio-controller; | 115 | gpio-controller; |
115 | interrupt-controller; | 116 | interrupt-controller; |
117 | #interrupt-cells = <2>; | ||
116 | }; | 118 | }; |
117 | 119 | ||
118 | pioC: gpio@fffff800 { | 120 | pioC: gpio@fffff800 { |
@@ -122,6 +124,7 @@ | |||
122 | #gpio-cells = <2>; | 124 | #gpio-cells = <2>; |
123 | gpio-controller; | 125 | gpio-controller; |
124 | interrupt-controller; | 126 | interrupt-controller; |
127 | #interrupt-cells = <2>; | ||
125 | }; | 128 | }; |
126 | 129 | ||
127 | dbgu: serial@fffff200 { | 130 | dbgu: serial@fffff200 { |
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi index b460d6ce9eb5..195019b7ca0e 100644 --- a/arch/arm/boot/dts/at91sam9263.dtsi +++ b/arch/arm/boot/dts/at91sam9263.dtsi | |||
@@ -95,6 +95,7 @@ | |||
95 | #gpio-cells = <2>; | 95 | #gpio-cells = <2>; |
96 | gpio-controller; | 96 | gpio-controller; |
97 | interrupt-controller; | 97 | interrupt-controller; |
98 | #interrupt-cells = <2>; | ||
98 | }; | 99 | }; |
99 | 100 | ||
100 | pioB: gpio@fffff400 { | 101 | pioB: gpio@fffff400 { |
@@ -104,6 +105,7 @@ | |||
104 | #gpio-cells = <2>; | 105 | #gpio-cells = <2>; |
105 | gpio-controller; | 106 | gpio-controller; |
106 | interrupt-controller; | 107 | interrupt-controller; |
108 | #interrupt-cells = <2>; | ||
107 | }; | 109 | }; |
108 | 110 | ||
109 | pioC: gpio@fffff600 { | 111 | pioC: gpio@fffff600 { |
@@ -113,6 +115,7 @@ | |||
113 | #gpio-cells = <2>; | 115 | #gpio-cells = <2>; |
114 | gpio-controller; | 116 | gpio-controller; |
115 | interrupt-controller; | 117 | interrupt-controller; |
118 | #interrupt-cells = <2>; | ||
116 | }; | 119 | }; |
117 | 120 | ||
118 | pioD: gpio@fffff800 { | 121 | pioD: gpio@fffff800 { |
@@ -122,6 +125,7 @@ | |||
122 | #gpio-cells = <2>; | 125 | #gpio-cells = <2>; |
123 | gpio-controller; | 126 | gpio-controller; |
124 | interrupt-controller; | 127 | interrupt-controller; |
128 | #interrupt-cells = <2>; | ||
125 | }; | 129 | }; |
126 | 130 | ||
127 | pioE: gpio@fffffa00 { | 131 | pioE: gpio@fffffa00 { |
@@ -131,6 +135,7 @@ | |||
131 | #gpio-cells = <2>; | 135 | #gpio-cells = <2>; |
132 | gpio-controller; | 136 | gpio-controller; |
133 | interrupt-controller; | 137 | interrupt-controller; |
138 | #interrupt-cells = <2>; | ||
134 | }; | 139 | }; |
135 | 140 | ||
136 | dbgu: serial@ffffee00 { | 141 | dbgu: serial@ffffee00 { |
diff --git a/arch/arm/boot/dts/at91sam9g25ek.dts b/arch/arm/boot/dts/at91sam9g25ek.dts index 7829a4d0cb22..96514c134e54 100644 --- a/arch/arm/boot/dts/at91sam9g25ek.dts +++ b/arch/arm/boot/dts/at91sam9g25ek.dts | |||
@@ -15,7 +15,7 @@ | |||
15 | compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; | 15 | compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; |
16 | 16 | ||
17 | chosen { | 17 | chosen { |
18 | bootargs = "128M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs"; | 18 | bootargs = "console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs"; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | ahb { | 21 | ahb { |
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi index bafa8806fc17..63751b1e744b 100644 --- a/arch/arm/boot/dts/at91sam9g45.dtsi +++ b/arch/arm/boot/dts/at91sam9g45.dtsi | |||
@@ -113,6 +113,7 @@ | |||
113 | #gpio-cells = <2>; | 113 | #gpio-cells = <2>; |
114 | gpio-controller; | 114 | gpio-controller; |
115 | interrupt-controller; | 115 | interrupt-controller; |
116 | #interrupt-cells = <2>; | ||
116 | }; | 117 | }; |
117 | 118 | ||
118 | pioB: gpio@fffff400 { | 119 | pioB: gpio@fffff400 { |
@@ -122,6 +123,7 @@ | |||
122 | #gpio-cells = <2>; | 123 | #gpio-cells = <2>; |
123 | gpio-controller; | 124 | gpio-controller; |
124 | interrupt-controller; | 125 | interrupt-controller; |
126 | #interrupt-cells = <2>; | ||
125 | }; | 127 | }; |
126 | 128 | ||
127 | pioC: gpio@fffff600 { | 129 | pioC: gpio@fffff600 { |
@@ -131,6 +133,7 @@ | |||
131 | #gpio-cells = <2>; | 133 | #gpio-cells = <2>; |
132 | gpio-controller; | 134 | gpio-controller; |
133 | interrupt-controller; | 135 | interrupt-controller; |
136 | #interrupt-cells = <2>; | ||
134 | }; | 137 | }; |
135 | 138 | ||
136 | pioD: gpio@fffff800 { | 139 | pioD: gpio@fffff800 { |
@@ -140,6 +143,7 @@ | |||
140 | #gpio-cells = <2>; | 143 | #gpio-cells = <2>; |
141 | gpio-controller; | 144 | gpio-controller; |
142 | interrupt-controller; | 145 | interrupt-controller; |
146 | #interrupt-cells = <2>; | ||
143 | }; | 147 | }; |
144 | 148 | ||
145 | pioE: gpio@fffffa00 { | 149 | pioE: gpio@fffffa00 { |
@@ -149,6 +153,7 @@ | |||
149 | #gpio-cells = <2>; | 153 | #gpio-cells = <2>; |
150 | gpio-controller; | 154 | gpio-controller; |
151 | interrupt-controller; | 155 | interrupt-controller; |
156 | #interrupt-cells = <2>; | ||
152 | }; | 157 | }; |
153 | 158 | ||
154 | dbgu: serial@ffffee00 { | 159 | dbgu: serial@ffffee00 { |
diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi index bfac0dfc332c..ef9336ae9614 100644 --- a/arch/arm/boot/dts/at91sam9n12.dtsi +++ b/arch/arm/boot/dts/at91sam9n12.dtsi | |||
@@ -107,6 +107,7 @@ | |||
107 | #gpio-cells = <2>; | 107 | #gpio-cells = <2>; |
108 | gpio-controller; | 108 | gpio-controller; |
109 | interrupt-controller; | 109 | interrupt-controller; |
110 | #interrupt-cells = <2>; | ||
110 | }; | 111 | }; |
111 | 112 | ||
112 | pioB: gpio@fffff600 { | 113 | pioB: gpio@fffff600 { |
@@ -116,6 +117,7 @@ | |||
116 | #gpio-cells = <2>; | 117 | #gpio-cells = <2>; |
117 | gpio-controller; | 118 | gpio-controller; |
118 | interrupt-controller; | 119 | interrupt-controller; |
120 | #interrupt-cells = <2>; | ||
119 | }; | 121 | }; |
120 | 122 | ||
121 | pioC: gpio@fffff800 { | 123 | pioC: gpio@fffff800 { |
@@ -125,6 +127,7 @@ | |||
125 | #gpio-cells = <2>; | 127 | #gpio-cells = <2>; |
126 | gpio-controller; | 128 | gpio-controller; |
127 | interrupt-controller; | 129 | interrupt-controller; |
130 | #interrupt-cells = <2>; | ||
128 | }; | 131 | }; |
129 | 132 | ||
130 | pioD: gpio@fffffa00 { | 133 | pioD: gpio@fffffa00 { |
@@ -134,6 +137,7 @@ | |||
134 | #gpio-cells = <2>; | 137 | #gpio-cells = <2>; |
135 | gpio-controller; | 138 | gpio-controller; |
136 | interrupt-controller; | 139 | interrupt-controller; |
140 | #interrupt-cells = <2>; | ||
137 | }; | 141 | }; |
138 | 142 | ||
139 | dbgu: serial@fffff200 { | 143 | dbgu: serial@fffff200 { |
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi index 4a18c393b136..8a387a8d61b7 100644 --- a/arch/arm/boot/dts/at91sam9x5.dtsi +++ b/arch/arm/boot/dts/at91sam9x5.dtsi | |||
@@ -115,6 +115,7 @@ | |||
115 | #gpio-cells = <2>; | 115 | #gpio-cells = <2>; |
116 | gpio-controller; | 116 | gpio-controller; |
117 | interrupt-controller; | 117 | interrupt-controller; |
118 | #interrupt-cells = <2>; | ||
118 | }; | 119 | }; |
119 | 120 | ||
120 | pioB: gpio@fffff600 { | 121 | pioB: gpio@fffff600 { |
@@ -124,6 +125,7 @@ | |||
124 | #gpio-cells = <2>; | 125 | #gpio-cells = <2>; |
125 | gpio-controller; | 126 | gpio-controller; |
126 | interrupt-controller; | 127 | interrupt-controller; |
128 | #interrupt-cells = <2>; | ||
127 | }; | 129 | }; |
128 | 130 | ||
129 | pioC: gpio@fffff800 { | 131 | pioC: gpio@fffff800 { |
@@ -133,6 +135,7 @@ | |||
133 | #gpio-cells = <2>; | 135 | #gpio-cells = <2>; |
134 | gpio-controller; | 136 | gpio-controller; |
135 | interrupt-controller; | 137 | interrupt-controller; |
138 | #interrupt-cells = <2>; | ||
136 | }; | 139 | }; |
137 | 140 | ||
138 | pioD: gpio@fffffa00 { | 141 | pioD: gpio@fffffa00 { |
@@ -142,6 +145,7 @@ | |||
142 | #gpio-cells = <2>; | 145 | #gpio-cells = <2>; |
143 | gpio-controller; | 146 | gpio-controller; |
144 | interrupt-controller; | 147 | interrupt-controller; |
148 | #interrupt-cells = <2>; | ||
145 | }; | 149 | }; |
146 | 150 | ||
147 | dbgu: serial@fffff200 { | 151 | dbgu: serial@fffff200 { |
diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi index a874dbfb5ae6..e6138310e5ce 100644 --- a/arch/arm/boot/dts/imx23.dtsi +++ b/arch/arm/boot/dts/imx23.dtsi | |||
@@ -51,11 +51,11 @@ | |||
51 | 51 | ||
52 | dma-apbh@80004000 { | 52 | dma-apbh@80004000 { |
53 | compatible = "fsl,imx23-dma-apbh"; | 53 | compatible = "fsl,imx23-dma-apbh"; |
54 | reg = <0x80004000 2000>; | 54 | reg = <0x80004000 0x2000>; |
55 | }; | 55 | }; |
56 | 56 | ||
57 | ecc@80008000 { | 57 | ecc@80008000 { |
58 | reg = <0x80008000 2000>; | 58 | reg = <0x80008000 0x2000>; |
59 | status = "disabled"; | 59 | status = "disabled"; |
60 | }; | 60 | }; |
61 | 61 | ||
@@ -63,7 +63,7 @@ | |||
63 | compatible = "fsl,imx23-gpmi-nand"; | 63 | compatible = "fsl,imx23-gpmi-nand"; |
64 | #address-cells = <1>; | 64 | #address-cells = <1>; |
65 | #size-cells = <1>; | 65 | #size-cells = <1>; |
66 | reg = <0x8000c000 2000>, <0x8000a000 2000>; | 66 | reg = <0x8000c000 0x2000>, <0x8000a000 0x2000>; |
67 | reg-names = "gpmi-nand", "bch"; | 67 | reg-names = "gpmi-nand", "bch"; |
68 | interrupts = <13>, <56>; | 68 | interrupts = <13>, <56>; |
69 | interrupt-names = "gpmi-dma", "bch"; | 69 | interrupt-names = "gpmi-dma", "bch"; |
@@ -72,14 +72,14 @@ | |||
72 | }; | 72 | }; |
73 | 73 | ||
74 | ssp0: ssp@80010000 { | 74 | ssp0: ssp@80010000 { |
75 | reg = <0x80010000 2000>; | 75 | reg = <0x80010000 0x2000>; |
76 | interrupts = <15 14>; | 76 | interrupts = <15 14>; |
77 | fsl,ssp-dma-channel = <1>; | 77 | fsl,ssp-dma-channel = <1>; |
78 | status = "disabled"; | 78 | status = "disabled"; |
79 | }; | 79 | }; |
80 | 80 | ||
81 | etm@80014000 { | 81 | etm@80014000 { |
82 | reg = <0x80014000 2000>; | 82 | reg = <0x80014000 0x2000>; |
83 | status = "disabled"; | 83 | status = "disabled"; |
84 | }; | 84 | }; |
85 | 85 | ||
@@ -87,7 +87,7 @@ | |||
87 | #address-cells = <1>; | 87 | #address-cells = <1>; |
88 | #size-cells = <0>; | 88 | #size-cells = <0>; |
89 | compatible = "fsl,imx23-pinctrl", "simple-bus"; | 89 | compatible = "fsl,imx23-pinctrl", "simple-bus"; |
90 | reg = <0x80018000 2000>; | 90 | reg = <0x80018000 0x2000>; |
91 | 91 | ||
92 | gpio0: gpio@0 { | 92 | gpio0: gpio@0 { |
93 | compatible = "fsl,imx23-gpio", "fsl,mxs-gpio"; | 93 | compatible = "fsl,imx23-gpio", "fsl,mxs-gpio"; |
@@ -273,32 +273,32 @@ | |||
273 | }; | 273 | }; |
274 | 274 | ||
275 | emi@80020000 { | 275 | emi@80020000 { |
276 | reg = <0x80020000 2000>; | 276 | reg = <0x80020000 0x2000>; |
277 | status = "disabled"; | 277 | status = "disabled"; |
278 | }; | 278 | }; |
279 | 279 | ||
280 | dma-apbx@80024000 { | 280 | dma-apbx@80024000 { |
281 | compatible = "fsl,imx23-dma-apbx"; | 281 | compatible = "fsl,imx23-dma-apbx"; |
282 | reg = <0x80024000 2000>; | 282 | reg = <0x80024000 0x2000>; |
283 | }; | 283 | }; |
284 | 284 | ||
285 | dcp@80028000 { | 285 | dcp@80028000 { |
286 | reg = <0x80028000 2000>; | 286 | reg = <0x80028000 0x2000>; |
287 | status = "disabled"; | 287 | status = "disabled"; |
288 | }; | 288 | }; |
289 | 289 | ||
290 | pxp@8002a000 { | 290 | pxp@8002a000 { |
291 | reg = <0x8002a000 2000>; | 291 | reg = <0x8002a000 0x2000>; |
292 | status = "disabled"; | 292 | status = "disabled"; |
293 | }; | 293 | }; |
294 | 294 | ||
295 | ocotp@8002c000 { | 295 | ocotp@8002c000 { |
296 | reg = <0x8002c000 2000>; | 296 | reg = <0x8002c000 0x2000>; |
297 | status = "disabled"; | 297 | status = "disabled"; |
298 | }; | 298 | }; |
299 | 299 | ||
300 | axi-ahb@8002e000 { | 300 | axi-ahb@8002e000 { |
301 | reg = <0x8002e000 2000>; | 301 | reg = <0x8002e000 0x2000>; |
302 | status = "disabled"; | 302 | status = "disabled"; |
303 | }; | 303 | }; |
304 | 304 | ||
@@ -310,14 +310,14 @@ | |||
310 | }; | 310 | }; |
311 | 311 | ||
312 | ssp1: ssp@80034000 { | 312 | ssp1: ssp@80034000 { |
313 | reg = <0x80034000 2000>; | 313 | reg = <0x80034000 0x2000>; |
314 | interrupts = <2 20>; | 314 | interrupts = <2 20>; |
315 | fsl,ssp-dma-channel = <2>; | 315 | fsl,ssp-dma-channel = <2>; |
316 | status = "disabled"; | 316 | status = "disabled"; |
317 | }; | 317 | }; |
318 | 318 | ||
319 | tvenc@80038000 { | 319 | tvenc@80038000 { |
320 | reg = <0x80038000 2000>; | 320 | reg = <0x80038000 0x2000>; |
321 | status = "disabled"; | 321 | status = "disabled"; |
322 | }; | 322 | }; |
323 | }; | 323 | }; |
@@ -330,37 +330,37 @@ | |||
330 | ranges; | 330 | ranges; |
331 | 331 | ||
332 | clkctl@80040000 { | 332 | clkctl@80040000 { |
333 | reg = <0x80040000 2000>; | 333 | reg = <0x80040000 0x2000>; |
334 | status = "disabled"; | 334 | status = "disabled"; |
335 | }; | 335 | }; |
336 | 336 | ||
337 | saif0: saif@80042000 { | 337 | saif0: saif@80042000 { |
338 | reg = <0x80042000 2000>; | 338 | reg = <0x80042000 0x2000>; |
339 | status = "disabled"; | 339 | status = "disabled"; |
340 | }; | 340 | }; |
341 | 341 | ||
342 | power@80044000 { | 342 | power@80044000 { |
343 | reg = <0x80044000 2000>; | 343 | reg = <0x80044000 0x2000>; |
344 | status = "disabled"; | 344 | status = "disabled"; |
345 | }; | 345 | }; |
346 | 346 | ||
347 | saif1: saif@80046000 { | 347 | saif1: saif@80046000 { |
348 | reg = <0x80046000 2000>; | 348 | reg = <0x80046000 0x2000>; |
349 | status = "disabled"; | 349 | status = "disabled"; |
350 | }; | 350 | }; |
351 | 351 | ||
352 | audio-out@80048000 { | 352 | audio-out@80048000 { |
353 | reg = <0x80048000 2000>; | 353 | reg = <0x80048000 0x2000>; |
354 | status = "disabled"; | 354 | status = "disabled"; |
355 | }; | 355 | }; |
356 | 356 | ||
357 | audio-in@8004c000 { | 357 | audio-in@8004c000 { |
358 | reg = <0x8004c000 2000>; | 358 | reg = <0x8004c000 0x2000>; |
359 | status = "disabled"; | 359 | status = "disabled"; |
360 | }; | 360 | }; |
361 | 361 | ||
362 | lradc@80050000 { | 362 | lradc@80050000 { |
363 | reg = <0x80050000 2000>; | 363 | reg = <0x80050000 0x2000>; |
364 | status = "disabled"; | 364 | status = "disabled"; |
365 | }; | 365 | }; |
366 | 366 | ||
@@ -370,26 +370,26 @@ | |||
370 | }; | 370 | }; |
371 | 371 | ||
372 | i2c@80058000 { | 372 | i2c@80058000 { |
373 | reg = <0x80058000 2000>; | 373 | reg = <0x80058000 0x2000>; |
374 | status = "disabled"; | 374 | status = "disabled"; |
375 | }; | 375 | }; |
376 | 376 | ||
377 | rtc@8005c000 { | 377 | rtc@8005c000 { |
378 | compatible = "fsl,imx23-rtc", "fsl,stmp3xxx-rtc"; | 378 | compatible = "fsl,imx23-rtc", "fsl,stmp3xxx-rtc"; |
379 | reg = <0x8005c000 2000>; | 379 | reg = <0x8005c000 0x2000>; |
380 | interrupts = <22>; | 380 | interrupts = <22>; |
381 | }; | 381 | }; |
382 | 382 | ||
383 | pwm: pwm@80064000 { | 383 | pwm: pwm@80064000 { |
384 | compatible = "fsl,imx23-pwm"; | 384 | compatible = "fsl,imx23-pwm"; |
385 | reg = <0x80064000 2000>; | 385 | reg = <0x80064000 0x2000>; |
386 | #pwm-cells = <2>; | 386 | #pwm-cells = <2>; |
387 | fsl,pwm-number = <5>; | 387 | fsl,pwm-number = <5>; |
388 | status = "disabled"; | 388 | status = "disabled"; |
389 | }; | 389 | }; |
390 | 390 | ||
391 | timrot@80068000 { | 391 | timrot@80068000 { |
392 | reg = <0x80068000 2000>; | 392 | reg = <0x80068000 0x2000>; |
393 | status = "disabled"; | 393 | status = "disabled"; |
394 | }; | 394 | }; |
395 | 395 | ||
@@ -429,7 +429,7 @@ | |||
429 | ranges; | 429 | ranges; |
430 | 430 | ||
431 | usbctrl@80080000 { | 431 | usbctrl@80080000 { |
432 | reg = <0x80080000 0x10000>; | 432 | reg = <0x80080000 0x40000>; |
433 | status = "disabled"; | 433 | status = "disabled"; |
434 | }; | 434 | }; |
435 | }; | 435 | }; |
diff --git a/arch/arm/boot/dts/imx27-3ds.dts b/arch/arm/boot/dts/imx27-3ds.dts index d3f8296e19e0..0a8978a40ece 100644 --- a/arch/arm/boot/dts/imx27-3ds.dts +++ b/arch/arm/boot/dts/imx27-3ds.dts | |||
@@ -27,7 +27,7 @@ | |||
27 | status = "okay"; | 27 | status = "okay"; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | uart@1000a000 { | 30 | uart1: serial@1000a000 { |
31 | fsl,uart-has-rtscts; | 31 | fsl,uart-has-rtscts; |
32 | status = "okay"; | 32 | status = "okay"; |
33 | }; | 33 | }; |
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi index 00bae3aad5ab..5303ab680a34 100644 --- a/arch/arm/boot/dts/imx27.dtsi +++ b/arch/arm/boot/dts/imx27.dtsi | |||
@@ -19,6 +19,12 @@ | |||
19 | serial3 = &uart4; | 19 | serial3 = &uart4; |
20 | serial4 = &uart5; | 20 | serial4 = &uart5; |
21 | serial5 = &uart6; | 21 | serial5 = &uart6; |
22 | gpio0 = &gpio1; | ||
23 | gpio1 = &gpio2; | ||
24 | gpio2 = &gpio3; | ||
25 | gpio3 = &gpio4; | ||
26 | gpio4 = &gpio5; | ||
27 | gpio5 = &gpio6; | ||
22 | }; | 28 | }; |
23 | 29 | ||
24 | avic: avic-interrupt-controller@e0000000 { | 30 | avic: avic-interrupt-controller@e0000000 { |
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index 787efac68da8..3fa6d190fab4 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi | |||
@@ -57,18 +57,18 @@ | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | hsadc@80002000 { | 59 | hsadc@80002000 { |
60 | reg = <0x80002000 2000>; | 60 | reg = <0x80002000 0x2000>; |
61 | interrupts = <13 87>; | 61 | interrupts = <13 87>; |
62 | status = "disabled"; | 62 | status = "disabled"; |
63 | }; | 63 | }; |
64 | 64 | ||
65 | dma-apbh@80004000 { | 65 | dma-apbh@80004000 { |
66 | compatible = "fsl,imx28-dma-apbh"; | 66 | compatible = "fsl,imx28-dma-apbh"; |
67 | reg = <0x80004000 2000>; | 67 | reg = <0x80004000 0x2000>; |
68 | }; | 68 | }; |
69 | 69 | ||
70 | perfmon@80006000 { | 70 | perfmon@80006000 { |
71 | reg = <0x80006000 800>; | 71 | reg = <0x80006000 0x800>; |
72 | interrupts = <27>; | 72 | interrupts = <27>; |
73 | status = "disabled"; | 73 | status = "disabled"; |
74 | }; | 74 | }; |
@@ -77,7 +77,7 @@ | |||
77 | compatible = "fsl,imx28-gpmi-nand"; | 77 | compatible = "fsl,imx28-gpmi-nand"; |
78 | #address-cells = <1>; | 78 | #address-cells = <1>; |
79 | #size-cells = <1>; | 79 | #size-cells = <1>; |
80 | reg = <0x8000c000 2000>, <0x8000a000 2000>; | 80 | reg = <0x8000c000 0x2000>, <0x8000a000 0x2000>; |
81 | reg-names = "gpmi-nand", "bch"; | 81 | reg-names = "gpmi-nand", "bch"; |
82 | interrupts = <88>, <41>; | 82 | interrupts = <88>, <41>; |
83 | interrupt-names = "gpmi-dma", "bch"; | 83 | interrupt-names = "gpmi-dma", "bch"; |
@@ -86,28 +86,28 @@ | |||
86 | }; | 86 | }; |
87 | 87 | ||
88 | ssp0: ssp@80010000 { | 88 | ssp0: ssp@80010000 { |
89 | reg = <0x80010000 2000>; | 89 | reg = <0x80010000 0x2000>; |
90 | interrupts = <96 82>; | 90 | interrupts = <96 82>; |
91 | fsl,ssp-dma-channel = <0>; | 91 | fsl,ssp-dma-channel = <0>; |
92 | status = "disabled"; | 92 | status = "disabled"; |
93 | }; | 93 | }; |
94 | 94 | ||
95 | ssp1: ssp@80012000 { | 95 | ssp1: ssp@80012000 { |
96 | reg = <0x80012000 2000>; | 96 | reg = <0x80012000 0x2000>; |
97 | interrupts = <97 83>; | 97 | interrupts = <97 83>; |
98 | fsl,ssp-dma-channel = <1>; | 98 | fsl,ssp-dma-channel = <1>; |
99 | status = "disabled"; | 99 | status = "disabled"; |
100 | }; | 100 | }; |
101 | 101 | ||
102 | ssp2: ssp@80014000 { | 102 | ssp2: ssp@80014000 { |
103 | reg = <0x80014000 2000>; | 103 | reg = <0x80014000 0x2000>; |
104 | interrupts = <98 84>; | 104 | interrupts = <98 84>; |
105 | fsl,ssp-dma-channel = <2>; | 105 | fsl,ssp-dma-channel = <2>; |
106 | status = "disabled"; | 106 | status = "disabled"; |
107 | }; | 107 | }; |
108 | 108 | ||
109 | ssp3: ssp@80016000 { | 109 | ssp3: ssp@80016000 { |
110 | reg = <0x80016000 2000>; | 110 | reg = <0x80016000 0x2000>; |
111 | interrupts = <99 85>; | 111 | interrupts = <99 85>; |
112 | fsl,ssp-dma-channel = <3>; | 112 | fsl,ssp-dma-channel = <3>; |
113 | status = "disabled"; | 113 | status = "disabled"; |
@@ -117,7 +117,7 @@ | |||
117 | #address-cells = <1>; | 117 | #address-cells = <1>; |
118 | #size-cells = <0>; | 118 | #size-cells = <0>; |
119 | compatible = "fsl,imx28-pinctrl", "simple-bus"; | 119 | compatible = "fsl,imx28-pinctrl", "simple-bus"; |
120 | reg = <0x80018000 2000>; | 120 | reg = <0x80018000 0x2000>; |
121 | 121 | ||
122 | gpio0: gpio@0 { | 122 | gpio0: gpio@0 { |
123 | compatible = "fsl,imx28-gpio", "fsl,mxs-gpio"; | 123 | compatible = "fsl,imx28-gpio", "fsl,mxs-gpio"; |
@@ -510,96 +510,96 @@ | |||
510 | }; | 510 | }; |
511 | 511 | ||
512 | digctl@8001c000 { | 512 | digctl@8001c000 { |
513 | reg = <0x8001c000 2000>; | 513 | reg = <0x8001c000 0x2000>; |
514 | interrupts = <89>; | 514 | interrupts = <89>; |
515 | status = "disabled"; | 515 | status = "disabled"; |
516 | }; | 516 | }; |
517 | 517 | ||
518 | etm@80022000 { | 518 | etm@80022000 { |
519 | reg = <0x80022000 2000>; | 519 | reg = <0x80022000 0x2000>; |
520 | status = "disabled"; | 520 | status = "disabled"; |
521 | }; | 521 | }; |
522 | 522 | ||
523 | dma-apbx@80024000 { | 523 | dma-apbx@80024000 { |
524 | compatible = "fsl,imx28-dma-apbx"; | 524 | compatible = "fsl,imx28-dma-apbx"; |
525 | reg = <0x80024000 2000>; | 525 | reg = <0x80024000 0x2000>; |
526 | }; | 526 | }; |
527 | 527 | ||
528 | dcp@80028000 { | 528 | dcp@80028000 { |
529 | reg = <0x80028000 2000>; | 529 | reg = <0x80028000 0x2000>; |
530 | interrupts = <52 53 54>; | 530 | interrupts = <52 53 54>; |
531 | status = "disabled"; | 531 | status = "disabled"; |
532 | }; | 532 | }; |
533 | 533 | ||
534 | pxp@8002a000 { | 534 | pxp@8002a000 { |
535 | reg = <0x8002a000 2000>; | 535 | reg = <0x8002a000 0x2000>; |
536 | interrupts = <39>; | 536 | interrupts = <39>; |
537 | status = "disabled"; | 537 | status = "disabled"; |
538 | }; | 538 | }; |
539 | 539 | ||
540 | ocotp@8002c000 { | 540 | ocotp@8002c000 { |
541 | reg = <0x8002c000 2000>; | 541 | reg = <0x8002c000 0x2000>; |
542 | status = "disabled"; | 542 | status = "disabled"; |
543 | }; | 543 | }; |
544 | 544 | ||
545 | axi-ahb@8002e000 { | 545 | axi-ahb@8002e000 { |
546 | reg = <0x8002e000 2000>; | 546 | reg = <0x8002e000 0x2000>; |
547 | status = "disabled"; | 547 | status = "disabled"; |
548 | }; | 548 | }; |
549 | 549 | ||
550 | lcdif@80030000 { | 550 | lcdif@80030000 { |
551 | compatible = "fsl,imx28-lcdif"; | 551 | compatible = "fsl,imx28-lcdif"; |
552 | reg = <0x80030000 2000>; | 552 | reg = <0x80030000 0x2000>; |
553 | interrupts = <38 86>; | 553 | interrupts = <38 86>; |
554 | status = "disabled"; | 554 | status = "disabled"; |
555 | }; | 555 | }; |
556 | 556 | ||
557 | can0: can@80032000 { | 557 | can0: can@80032000 { |
558 | compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan"; | 558 | compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan"; |
559 | reg = <0x80032000 2000>; | 559 | reg = <0x80032000 0x2000>; |
560 | interrupts = <8>; | 560 | interrupts = <8>; |
561 | status = "disabled"; | 561 | status = "disabled"; |
562 | }; | 562 | }; |
563 | 563 | ||
564 | can1: can@80034000 { | 564 | can1: can@80034000 { |
565 | compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan"; | 565 | compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan"; |
566 | reg = <0x80034000 2000>; | 566 | reg = <0x80034000 0x2000>; |
567 | interrupts = <9>; | 567 | interrupts = <9>; |
568 | status = "disabled"; | 568 | status = "disabled"; |
569 | }; | 569 | }; |
570 | 570 | ||
571 | simdbg@8003c000 { | 571 | simdbg@8003c000 { |
572 | reg = <0x8003c000 200>; | 572 | reg = <0x8003c000 0x200>; |
573 | status = "disabled"; | 573 | status = "disabled"; |
574 | }; | 574 | }; |
575 | 575 | ||
576 | simgpmisel@8003c200 { | 576 | simgpmisel@8003c200 { |
577 | reg = <0x8003c200 100>; | 577 | reg = <0x8003c200 0x100>; |
578 | status = "disabled"; | 578 | status = "disabled"; |
579 | }; | 579 | }; |
580 | 580 | ||
581 | simsspsel@8003c300 { | 581 | simsspsel@8003c300 { |
582 | reg = <0x8003c300 100>; | 582 | reg = <0x8003c300 0x100>; |
583 | status = "disabled"; | 583 | status = "disabled"; |
584 | }; | 584 | }; |
585 | 585 | ||
586 | simmemsel@8003c400 { | 586 | simmemsel@8003c400 { |
587 | reg = <0x8003c400 100>; | 587 | reg = <0x8003c400 0x100>; |
588 | status = "disabled"; | 588 | status = "disabled"; |
589 | }; | 589 | }; |
590 | 590 | ||
591 | gpiomon@8003c500 { | 591 | gpiomon@8003c500 { |
592 | reg = <0x8003c500 100>; | 592 | reg = <0x8003c500 0x100>; |
593 | status = "disabled"; | 593 | status = "disabled"; |
594 | }; | 594 | }; |
595 | 595 | ||
596 | simenet@8003c700 { | 596 | simenet@8003c700 { |
597 | reg = <0x8003c700 100>; | 597 | reg = <0x8003c700 0x100>; |
598 | status = "disabled"; | 598 | status = "disabled"; |
599 | }; | 599 | }; |
600 | 600 | ||
601 | armjtag@8003c800 { | 601 | armjtag@8003c800 { |
602 | reg = <0x8003c800 100>; | 602 | reg = <0x8003c800 0x100>; |
603 | status = "disabled"; | 603 | status = "disabled"; |
604 | }; | 604 | }; |
605 | }; | 605 | }; |
@@ -612,45 +612,45 @@ | |||
612 | ranges; | 612 | ranges; |
613 | 613 | ||
614 | clkctl@80040000 { | 614 | clkctl@80040000 { |
615 | reg = <0x80040000 2000>; | 615 | reg = <0x80040000 0x2000>; |
616 | status = "disabled"; | 616 | status = "disabled"; |
617 | }; | 617 | }; |
618 | 618 | ||
619 | saif0: saif@80042000 { | 619 | saif0: saif@80042000 { |
620 | compatible = "fsl,imx28-saif"; | 620 | compatible = "fsl,imx28-saif"; |
621 | reg = <0x80042000 2000>; | 621 | reg = <0x80042000 0x2000>; |
622 | interrupts = <59 80>; | 622 | interrupts = <59 80>; |
623 | fsl,saif-dma-channel = <4>; | 623 | fsl,saif-dma-channel = <4>; |
624 | status = "disabled"; | 624 | status = "disabled"; |
625 | }; | 625 | }; |
626 | 626 | ||
627 | power@80044000 { | 627 | power@80044000 { |
628 | reg = <0x80044000 2000>; | 628 | reg = <0x80044000 0x2000>; |
629 | status = "disabled"; | 629 | status = "disabled"; |
630 | }; | 630 | }; |
631 | 631 | ||
632 | saif1: saif@80046000 { | 632 | saif1: saif@80046000 { |
633 | compatible = "fsl,imx28-saif"; | 633 | compatible = "fsl,imx28-saif"; |
634 | reg = <0x80046000 2000>; | 634 | reg = <0x80046000 0x2000>; |
635 | interrupts = <58 81>; | 635 | interrupts = <58 81>; |
636 | fsl,saif-dma-channel = <5>; | 636 | fsl,saif-dma-channel = <5>; |
637 | status = "disabled"; | 637 | status = "disabled"; |
638 | }; | 638 | }; |
639 | 639 | ||
640 | lradc@80050000 { | 640 | lradc@80050000 { |
641 | reg = <0x80050000 2000>; | 641 | reg = <0x80050000 0x2000>; |
642 | status = "disabled"; | 642 | status = "disabled"; |
643 | }; | 643 | }; |
644 | 644 | ||
645 | spdif@80054000 { | 645 | spdif@80054000 { |
646 | reg = <0x80054000 2000>; | 646 | reg = <0x80054000 0x2000>; |
647 | interrupts = <45 66>; | 647 | interrupts = <45 66>; |
648 | status = "disabled"; | 648 | status = "disabled"; |
649 | }; | 649 | }; |
650 | 650 | ||
651 | rtc@80056000 { | 651 | rtc@80056000 { |
652 | compatible = "fsl,imx28-rtc", "fsl,stmp3xxx-rtc"; | 652 | compatible = "fsl,imx28-rtc", "fsl,stmp3xxx-rtc"; |
653 | reg = <0x80056000 2000>; | 653 | reg = <0x80056000 0x2000>; |
654 | interrupts = <29>; | 654 | interrupts = <29>; |
655 | }; | 655 | }; |
656 | 656 | ||
@@ -658,7 +658,7 @@ | |||
658 | #address-cells = <1>; | 658 | #address-cells = <1>; |
659 | #size-cells = <0>; | 659 | #size-cells = <0>; |
660 | compatible = "fsl,imx28-i2c"; | 660 | compatible = "fsl,imx28-i2c"; |
661 | reg = <0x80058000 2000>; | 661 | reg = <0x80058000 0x2000>; |
662 | interrupts = <111 68>; | 662 | interrupts = <111 68>; |
663 | clock-frequency = <100000>; | 663 | clock-frequency = <100000>; |
664 | status = "disabled"; | 664 | status = "disabled"; |
@@ -668,7 +668,7 @@ | |||
668 | #address-cells = <1>; | 668 | #address-cells = <1>; |
669 | #size-cells = <0>; | 669 | #size-cells = <0>; |
670 | compatible = "fsl,imx28-i2c"; | 670 | compatible = "fsl,imx28-i2c"; |
671 | reg = <0x8005a000 2000>; | 671 | reg = <0x8005a000 0x2000>; |
672 | interrupts = <110 69>; | 672 | interrupts = <110 69>; |
673 | clock-frequency = <100000>; | 673 | clock-frequency = <100000>; |
674 | status = "disabled"; | 674 | status = "disabled"; |
@@ -676,14 +676,14 @@ | |||
676 | 676 | ||
677 | pwm: pwm@80064000 { | 677 | pwm: pwm@80064000 { |
678 | compatible = "fsl,imx28-pwm", "fsl,imx23-pwm"; | 678 | compatible = "fsl,imx28-pwm", "fsl,imx23-pwm"; |
679 | reg = <0x80064000 2000>; | 679 | reg = <0x80064000 0x2000>; |
680 | #pwm-cells = <2>; | 680 | #pwm-cells = <2>; |
681 | fsl,pwm-number = <8>; | 681 | fsl,pwm-number = <8>; |
682 | status = "disabled"; | 682 | status = "disabled"; |
683 | }; | 683 | }; |
684 | 684 | ||
685 | timrot@80068000 { | 685 | timrot@80068000 { |
686 | reg = <0x80068000 2000>; | 686 | reg = <0x80068000 0x2000>; |
687 | status = "disabled"; | 687 | status = "disabled"; |
688 | }; | 688 | }; |
689 | 689 | ||
diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts index de065b5976e6..59d9789e5508 100644 --- a/arch/arm/boot/dts/imx51-babbage.dts +++ b/arch/arm/boot/dts/imx51-babbage.dts | |||
@@ -25,8 +25,8 @@ | |||
25 | aips@70000000 { /* aips-1 */ | 25 | aips@70000000 { /* aips-1 */ |
26 | spba@70000000 { | 26 | spba@70000000 { |
27 | esdhc@70004000 { /* ESDHC1 */ | 27 | esdhc@70004000 { /* ESDHC1 */ |
28 | fsl,cd-internal; | 28 | fsl,cd-controller; |
29 | fsl,wp-internal; | 29 | fsl,wp-controller; |
30 | status = "okay"; | 30 | status = "okay"; |
31 | }; | 31 | }; |
32 | 32 | ||
@@ -53,7 +53,7 @@ | |||
53 | spi-max-frequency = <6000000>; | 53 | spi-max-frequency = <6000000>; |
54 | reg = <0>; | 54 | reg = <0>; |
55 | interrupt-parent = <&gpio1>; | 55 | interrupt-parent = <&gpio1>; |
56 | interrupts = <8>; | 56 | interrupts = <8 0x4>; |
57 | 57 | ||
58 | regulators { | 58 | regulators { |
59 | sw1_reg: sw1 { | 59 | sw1_reg: sw1 { |
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi index 53cbaa3d4f90..aba28dc87fc8 100644 --- a/arch/arm/boot/dts/imx51.dtsi +++ b/arch/arm/boot/dts/imx51.dtsi | |||
@@ -17,6 +17,10 @@ | |||
17 | serial0 = &uart1; | 17 | serial0 = &uart1; |
18 | serial1 = &uart2; | 18 | serial1 = &uart2; |
19 | serial2 = &uart3; | 19 | serial2 = &uart3; |
20 | gpio0 = &gpio1; | ||
21 | gpio1 = &gpio2; | ||
22 | gpio2 = &gpio3; | ||
23 | gpio3 = &gpio4; | ||
20 | }; | 24 | }; |
21 | 25 | ||
22 | tzic: tz-interrupt-controller@e0000000 { | 26 | tzic: tz-interrupt-controller@e0000000 { |
diff --git a/arch/arm/boot/dts/imx53-ard.dts b/arch/arm/boot/dts/imx53-ard.dts index 5b8eafcdbeec..da895e93a999 100644 --- a/arch/arm/boot/dts/imx53-ard.dts +++ b/arch/arm/boot/dts/imx53-ard.dts | |||
@@ -64,12 +64,32 @@ | |||
64 | reg = <0xf4000000 0x2000000>; | 64 | reg = <0xf4000000 0x2000000>; |
65 | phy-mode = "mii"; | 65 | phy-mode = "mii"; |
66 | interrupt-parent = <&gpio2>; | 66 | interrupt-parent = <&gpio2>; |
67 | interrupts = <31>; | 67 | interrupts = <31 0x8>; |
68 | reg-io-width = <4>; | 68 | reg-io-width = <4>; |
69 | /* | ||
70 | * VDD33A and VDDVARIO of LAN9220 are supplied by | ||
71 | * SW4_3V3 of LTC3589. Before the regulator driver | ||
72 | * for this PMIC is available, we use a fixed dummy | ||
73 | * 3V3 regulator to get LAN9220 driver probing work. | ||
74 | */ | ||
75 | vdd33a-supply = <®_3p3v>; | ||
76 | vddvario-supply = <®_3p3v>; | ||
69 | smsc,irq-push-pull; | 77 | smsc,irq-push-pull; |
70 | }; | 78 | }; |
71 | }; | 79 | }; |
72 | 80 | ||
81 | regulators { | ||
82 | compatible = "simple-bus"; | ||
83 | |||
84 | reg_3p3v: 3p3v { | ||
85 | compatible = "regulator-fixed"; | ||
86 | regulator-name = "3P3V"; | ||
87 | regulator-min-microvolt = <3300000>; | ||
88 | regulator-max-microvolt = <3300000>; | ||
89 | regulator-always-on; | ||
90 | }; | ||
91 | }; | ||
92 | |||
73 | gpio-keys { | 93 | gpio-keys { |
74 | compatible = "gpio-keys"; | 94 | compatible = "gpio-keys"; |
75 | 95 | ||
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi index fc79cdc4b4e6..cd37165edce5 100644 --- a/arch/arm/boot/dts/imx53.dtsi +++ b/arch/arm/boot/dts/imx53.dtsi | |||
@@ -19,6 +19,13 @@ | |||
19 | serial2 = &uart3; | 19 | serial2 = &uart3; |
20 | serial3 = &uart4; | 20 | serial3 = &uart4; |
21 | serial4 = &uart5; | 21 | serial4 = &uart5; |
22 | gpio0 = &gpio1; | ||
23 | gpio1 = &gpio2; | ||
24 | gpio2 = &gpio3; | ||
25 | gpio3 = &gpio4; | ||
26 | gpio4 = &gpio5; | ||
27 | gpio5 = &gpio6; | ||
28 | gpio6 = &gpio7; | ||
22 | }; | 29 | }; |
23 | 30 | ||
24 | tzic: tz-interrupt-controller@0fffc000 { | 31 | tzic: tz-interrupt-controller@0fffc000 { |
diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts index d42e851ceb97..72f30f3e6171 100644 --- a/arch/arm/boot/dts/imx6q-sabrelite.dts +++ b/arch/arm/boot/dts/imx6q-sabrelite.dts | |||
@@ -53,6 +53,7 @@ | |||
53 | fsl,pins = < | 53 | fsl,pins = < |
54 | 144 0x80000000 /* MX6Q_PAD_EIM_D22__GPIO_3_22 */ | 54 | 144 0x80000000 /* MX6Q_PAD_EIM_D22__GPIO_3_22 */ |
55 | 121 0x80000000 /* MX6Q_PAD_EIM_D19__GPIO_3_19 */ | 55 | 121 0x80000000 /* MX6Q_PAD_EIM_D19__GPIO_3_19 */ |
56 | 953 0x80000000 /* MX6Q_PAD_GPIO_0__CCM_CLKO */ | ||
56 | >; | 57 | >; |
57 | }; | 58 | }; |
58 | }; | 59 | }; |
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 3d3c64b014e6..fd57079f71a9 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi | |||
@@ -19,6 +19,13 @@ | |||
19 | serial2 = &uart3; | 19 | serial2 = &uart3; |
20 | serial3 = &uart4; | 20 | serial3 = &uart4; |
21 | serial4 = &uart5; | 21 | serial4 = &uart5; |
22 | gpio0 = &gpio1; | ||
23 | gpio1 = &gpio2; | ||
24 | gpio2 = &gpio3; | ||
25 | gpio3 = &gpio4; | ||
26 | gpio4 = &gpio5; | ||
27 | gpio5 = &gpio6; | ||
28 | gpio6 = &gpio7; | ||
22 | }; | 29 | }; |
23 | 30 | ||
24 | cpus { | 31 | cpus { |
diff --git a/arch/arm/boot/dts/integrator.dtsi b/arch/arm/boot/dts/integrator.dtsi new file mode 100644 index 000000000000..813b91d7bea2 --- /dev/null +++ b/arch/arm/boot/dts/integrator.dtsi | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * SoC core Device Tree for the ARM Integrator platforms | ||
3 | */ | ||
4 | |||
5 | /include/ "skeleton.dtsi" | ||
6 | |||
7 | / { | ||
8 | timer@13000000 { | ||
9 | reg = <0x13000000 0x100>; | ||
10 | interrupt-parent = <&pic>; | ||
11 | interrupts = <5>; | ||
12 | }; | ||
13 | |||
14 | timer@13000100 { | ||
15 | reg = <0x13000100 0x100>; | ||
16 | interrupt-parent = <&pic>; | ||
17 | interrupts = <6>; | ||
18 | }; | ||
19 | |||
20 | timer@13000200 { | ||
21 | reg = <0x13000200 0x100>; | ||
22 | interrupt-parent = <&pic>; | ||
23 | interrupts = <7>; | ||
24 | }; | ||
25 | |||
26 | pic@14000000 { | ||
27 | compatible = "arm,versatile-fpga-irq"; | ||
28 | #interrupt-cells = <1>; | ||
29 | interrupt-controller; | ||
30 | reg = <0x14000000 0x100>; | ||
31 | clear-mask = <0xffffffff>; | ||
32 | }; | ||
33 | |||
34 | flash@24000000 { | ||
35 | compatible = "cfi-flash"; | ||
36 | reg = <0x24000000 0x02000000>; | ||
37 | }; | ||
38 | |||
39 | fpga { | ||
40 | compatible = "arm,amba-bus", "simple-bus"; | ||
41 | #address-cells = <1>; | ||
42 | #size-cells = <1>; | ||
43 | ranges; | ||
44 | interrupt-parent = <&pic>; | ||
45 | |||
46 | /* | ||
47 | * These PrimeCells are in the same locations and using the | ||
48 | * same interrupts in all Integrators, however the silicon | ||
49 | * version deployed is different. | ||
50 | */ | ||
51 | rtc@15000000 { | ||
52 | reg = <0x15000000 0x1000>; | ||
53 | interrupts = <8>; | ||
54 | }; | ||
55 | |||
56 | uart@16000000 { | ||
57 | reg = <0x16000000 0x1000>; | ||
58 | interrupts = <1>; | ||
59 | }; | ||
60 | |||
61 | uart@17000000 { | ||
62 | reg = <0x17000000 0x1000>; | ||
63 | interrupts = <2>; | ||
64 | }; | ||
65 | |||
66 | kmi@18000000 { | ||
67 | reg = <0x18000000 0x1000>; | ||
68 | interrupts = <3>; | ||
69 | }; | ||
70 | |||
71 | kmi@19000000 { | ||
72 | reg = <0x19000000 0x1000>; | ||
73 | interrupts = <4>; | ||
74 | }; | ||
75 | }; | ||
76 | }; | ||
diff --git a/arch/arm/boot/dts/integratorap.dts b/arch/arm/boot/dts/integratorap.dts new file mode 100644 index 000000000000..61767757b50a --- /dev/null +++ b/arch/arm/boot/dts/integratorap.dts | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * Device Tree for the ARM Integrator/AP platform | ||
3 | */ | ||
4 | |||
5 | /dts-v1/; | ||
6 | /include/ "integrator.dtsi" | ||
7 | |||
8 | / { | ||
9 | model = "ARM Integrator/AP"; | ||
10 | compatible = "arm,integrator-ap"; | ||
11 | |||
12 | aliases { | ||
13 | arm,timer-primary = &timer2; | ||
14 | arm,timer-secondary = &timer1; | ||
15 | }; | ||
16 | |||
17 | chosen { | ||
18 | bootargs = "root=/dev/ram0 console=ttyAM0,38400n8 earlyprintk"; | ||
19 | }; | ||
20 | |||
21 | timer0: timer@13000000 { | ||
22 | compatible = "arm,integrator-timer"; | ||
23 | }; | ||
24 | |||
25 | timer1: timer@13000100 { | ||
26 | compatible = "arm,integrator-timer"; | ||
27 | }; | ||
28 | |||
29 | timer2: timer@13000200 { | ||
30 | compatible = "arm,integrator-timer"; | ||
31 | }; | ||
32 | |||
33 | pic: pic@14000000 { | ||
34 | valid-mask = <0x003fffff>; | ||
35 | }; | ||
36 | |||
37 | fpga { | ||
38 | /* | ||
39 | * The Integator/AP predates the idea to have magic numbers | ||
40 | * identifying the PrimeCell in hardware, thus we have to | ||
41 | * supply these from the device tree. | ||
42 | */ | ||
43 | rtc: rtc@15000000 { | ||
44 | compatible = "arm,pl030", "arm,primecell"; | ||
45 | arm,primecell-periphid = <0x00041030>; | ||
46 | }; | ||
47 | |||
48 | uart0: uart@16000000 { | ||
49 | compatible = "arm,pl010", "arm,primecell"; | ||
50 | arm,primecell-periphid = <0x00041010>; | ||
51 | }; | ||
52 | |||
53 | uart1: uart@17000000 { | ||
54 | compatible = "arm,pl010", "arm,primecell"; | ||
55 | arm,primecell-periphid = <0x00041010>; | ||
56 | }; | ||
57 | |||
58 | kmi0: kmi@18000000 { | ||
59 | compatible = "arm,pl050", "arm,primecell"; | ||
60 | arm,primecell-periphid = <0x00041050>; | ||
61 | }; | ||
62 | |||
63 | kmi1: kmi@19000000 { | ||
64 | compatible = "arm,pl050", "arm,primecell"; | ||
65 | arm,primecell-periphid = <0x00041050>; | ||
66 | }; | ||
67 | }; | ||
68 | }; | ||
diff --git a/arch/arm/boot/dts/integratorcp.dts b/arch/arm/boot/dts/integratorcp.dts new file mode 100644 index 000000000000..2dd5e4e48481 --- /dev/null +++ b/arch/arm/boot/dts/integratorcp.dts | |||
@@ -0,0 +1,110 @@ | |||
1 | /* | ||
2 | * Device Tree for the ARM Integrator/CP platform | ||
3 | */ | ||
4 | |||
5 | /dts-v1/; | ||
6 | /include/ "integrator.dtsi" | ||
7 | |||
8 | / { | ||
9 | model = "ARM Integrator/CP"; | ||
10 | compatible = "arm,integrator-cp"; | ||
11 | |||
12 | aliases { | ||
13 | arm,timer-primary = &timer2; | ||
14 | arm,timer-secondary = &timer1; | ||
15 | }; | ||
16 | |||
17 | chosen { | ||
18 | bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk"; | ||
19 | }; | ||
20 | |||
21 | timer0: timer@13000000 { | ||
22 | compatible = "arm,sp804", "arm,primecell"; | ||
23 | }; | ||
24 | |||
25 | timer1: timer@13000100 { | ||
26 | compatible = "arm,sp804", "arm,primecell"; | ||
27 | }; | ||
28 | |||
29 | timer2: timer@13000200 { | ||
30 | compatible = "arm,sp804", "arm,primecell"; | ||
31 | }; | ||
32 | |||
33 | pic: pic@14000000 { | ||
34 | valid-mask = <0x1fc003ff>; | ||
35 | }; | ||
36 | |||
37 | cic: cic@10000040 { | ||
38 | compatible = "arm,versatile-fpga-irq"; | ||
39 | #interrupt-cells = <1>; | ||
40 | interrupt-controller; | ||
41 | reg = <0x10000040 0x100>; | ||
42 | clear-mask = <0xffffffff>; | ||
43 | valid-mask = <0x00000007>; | ||
44 | }; | ||
45 | |||
46 | sic: sic@ca000000 { | ||
47 | compatible = "arm,versatile-fpga-irq"; | ||
48 | #interrupt-cells = <1>; | ||
49 | interrupt-controller; | ||
50 | reg = <0xca000000 0x100>; | ||
51 | clear-mask = <0x00000fff>; | ||
52 | valid-mask = <0x00000fff>; | ||
53 | }; | ||
54 | |||
55 | ethernet@c8000000 { | ||
56 | compatible = "smsc,lan91c111"; | ||
57 | reg = <0xc8000000 0x10>; | ||
58 | interrupt-parent = <&pic>; | ||
59 | interrupts = <27>; | ||
60 | }; | ||
61 | |||
62 | fpga { | ||
63 | /* | ||
64 | * These PrimeCells are at the same location and using | ||
65 | * the same interrupts in all Integrators, but in the CP | ||
66 | * slightly newer versions are deployed. | ||
67 | */ | ||
68 | rtc@15000000 { | ||
69 | compatible = "arm,pl031", "arm,primecell"; | ||
70 | }; | ||
71 | |||
72 | uart@16000000 { | ||
73 | compatible = "arm,pl011", "arm,primecell"; | ||
74 | }; | ||
75 | |||
76 | uart@17000000 { | ||
77 | compatible = "arm,pl011", "arm,primecell"; | ||
78 | }; | ||
79 | |||
80 | kmi@18000000 { | ||
81 | compatible = "arm,pl050", "arm,primecell"; | ||
82 | }; | ||
83 | |||
84 | kmi@19000000 { | ||
85 | compatible = "arm,pl050", "arm,primecell"; | ||
86 | }; | ||
87 | |||
88 | /* | ||
89 | * These PrimeCells are only available on the Integrator/CP | ||
90 | */ | ||
91 | mmc@1c000000 { | ||
92 | compatible = "arm,pl180", "arm,primecell"; | ||
93 | reg = <0x1c000000 0x1000>; | ||
94 | interrupts = <23 24>; | ||
95 | max-frequency = <515633>; | ||
96 | }; | ||
97 | |||
98 | aaci@1d000000 { | ||
99 | compatible = "arm,pl041", "arm,primecell"; | ||
100 | reg = <0x1d000000 0x1000>; | ||
101 | interrupts = <25>; | ||
102 | }; | ||
103 | |||
104 | clcd@c0000000 { | ||
105 | compatible = "arm,pl110", "arm,primecell"; | ||
106 | reg = <0xC0000000 0x1000>; | ||
107 | interrupts = <22>; | ||
108 | }; | ||
109 | }; | ||
110 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-iconnect.dts b/arch/arm/boot/dts/kirkwood-iconnect.dts index 52d947045106..f8ca6fa88192 100644 --- a/arch/arm/boot/dts/kirkwood-iconnect.dts +++ b/arch/arm/boot/dts/kirkwood-iconnect.dts | |||
@@ -41,9 +41,13 @@ | |||
41 | }; | 41 | }; |
42 | power-blue { | 42 | power-blue { |
43 | label = "power:blue"; | 43 | label = "power:blue"; |
44 | gpios = <&gpio1 11 0>; | 44 | gpios = <&gpio1 10 0>; |
45 | linux,default-trigger = "timer"; | 45 | linux,default-trigger = "timer"; |
46 | }; | 46 | }; |
47 | power-red { | ||
48 | label = "power:red"; | ||
49 | gpios = <&gpio1 11 0>; | ||
50 | }; | ||
47 | usb1 { | 51 | usb1 { |
48 | label = "usb1:blue"; | 52 | label = "usb1:blue"; |
49 | gpios = <&gpio1 12 0>; | 53 | gpios = <&gpio1 12 0>; |
diff --git a/arch/arm/boot/dts/twl6030.dtsi b/arch/arm/boot/dts/twl6030.dtsi index 3b2f3510d7eb..d351b27d7213 100644 --- a/arch/arm/boot/dts/twl6030.dtsi +++ b/arch/arm/boot/dts/twl6030.dtsi | |||
@@ -66,6 +66,7 @@ | |||
66 | 66 | ||
67 | vcxio: regulator@8 { | 67 | vcxio: regulator@8 { |
68 | compatible = "ti,twl6030-vcxio"; | 68 | compatible = "ti,twl6030-vcxio"; |
69 | regulator-always-on; | ||
69 | }; | 70 | }; |
70 | 71 | ||
71 | vusb: regulator@9 { | 72 | vusb: regulator@9 { |
@@ -74,10 +75,12 @@ | |||
74 | 75 | ||
75 | v1v8: regulator@10 { | 76 | v1v8: regulator@10 { |
76 | compatible = "ti,twl6030-v1v8"; | 77 | compatible = "ti,twl6030-v1v8"; |
78 | regulator-always-on; | ||
77 | }; | 79 | }; |
78 | 80 | ||
79 | v2v1: regulator@11 { | 81 | v2v1: regulator@11 { |
80 | compatible = "ti,twl6030-v2v1"; | 82 | compatible = "ti,twl6030-v2v1"; |
83 | regulator-always-on; | ||
81 | }; | 84 | }; |
82 | 85 | ||
83 | clk32kg: regulator@12 { | 86 | clk32kg: regulator@12 { |
diff --git a/arch/arm/configs/armadillo800eva_defconfig b/arch/arm/configs/armadillo800eva_defconfig index 7d8718468e0d..90610c7030f7 100644 --- a/arch/arm/configs/armadillo800eva_defconfig +++ b/arch/arm/configs/armadillo800eva_defconfig | |||
@@ -33,7 +33,7 @@ CONFIG_AEABI=y | |||
33 | CONFIG_FORCE_MAX_ZONEORDER=13 | 33 | CONFIG_FORCE_MAX_ZONEORDER=13 |
34 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 34 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
35 | CONFIG_ZBOOT_ROM_BSS=0x0 | 35 | CONFIG_ZBOOT_ROM_BSS=0x0 |
36 | CONFIG_CMDLINE="console=tty0 console=ttySC1,115200 earlyprintk=sh-sci.1,115200 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096" | 36 | CONFIG_CMDLINE="console=tty0 console=ttySC1,115200 earlyprintk=sh-sci.1,115200 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096 rw" |
37 | CONFIG_CMDLINE_FORCE=y | 37 | CONFIG_CMDLINE_FORCE=y |
38 | CONFIG_KEXEC=y | 38 | CONFIG_KEXEC=y |
39 | CONFIG_VFP=y | 39 | CONFIG_VFP=y |
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index f725b9637b33..3c9f32f9b6b4 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig | |||
@@ -192,6 +192,7 @@ CONFIG_RTC_DRV_MC13XXX=y | |||
192 | CONFIG_RTC_DRV_MXC=y | 192 | CONFIG_RTC_DRV_MXC=y |
193 | CONFIG_DMADEVICES=y | 193 | CONFIG_DMADEVICES=y |
194 | CONFIG_IMX_SDMA=y | 194 | CONFIG_IMX_SDMA=y |
195 | CONFIG_MXS_DMA=y | ||
195 | CONFIG_COMMON_CLK_DEBUG=y | 196 | CONFIG_COMMON_CLK_DEBUG=y |
196 | # CONFIG_IOMMU_SUPPORT is not set | 197 | # CONFIG_IOMMU_SUPPORT is not set |
197 | CONFIG_EXT2_FS=y | 198 | CONFIG_EXT2_FS=y |
diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig index ccdb6357fb74..4edcfb4e4dee 100644 --- a/arch/arm/configs/mxs_defconfig +++ b/arch/arm/configs/mxs_defconfig | |||
@@ -34,7 +34,6 @@ CONFIG_NO_HZ=y | |||
34 | CONFIG_HIGH_RES_TIMERS=y | 34 | CONFIG_HIGH_RES_TIMERS=y |
35 | CONFIG_PREEMPT_VOLUNTARY=y | 35 | CONFIG_PREEMPT_VOLUNTARY=y |
36 | CONFIG_AEABI=y | 36 | CONFIG_AEABI=y |
37 | CONFIG_DEFAULT_MMAP_MIN_ADDR=65536 | ||
38 | CONFIG_AUTO_ZRELADDR=y | 37 | CONFIG_AUTO_ZRELADDR=y |
39 | CONFIG_FPE_NWFPE=y | 38 | CONFIG_FPE_NWFPE=y |
40 | CONFIG_NET=y | 39 | CONFIG_NET=y |
diff --git a/arch/arm/configs/tct_hammer_defconfig b/arch/arm/configs/tct_hammer_defconfig index 1d24f8458bef..71277a1591ba 100644 --- a/arch/arm/configs/tct_hammer_defconfig +++ b/arch/arm/configs/tct_hammer_defconfig | |||
@@ -7,7 +7,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y | |||
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_EXPERT=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_KALLSYMS is not set | 9 | # CONFIG_KALLSYMS is not set |
10 | # CONFIG_BUG is not set | 10 | # CONFIG_BUGVERBOSE is not set |
11 | # CONFIG_ELF_CORE is not set | 11 | # CONFIG_ELF_CORE is not set |
12 | # CONFIG_SHMEM is not set | 12 | # CONFIG_SHMEM is not set |
13 | CONFIG_SLOB=y | 13 | CONFIG_SLOB=y |
diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig index 2d4f661d1cf6..da6845493caa 100644 --- a/arch/arm/configs/u8500_defconfig +++ b/arch/arm/configs/u8500_defconfig | |||
@@ -86,6 +86,7 @@ CONFIG_NEW_LEDS=y | |||
86 | CONFIG_LEDS_CLASS=y | 86 | CONFIG_LEDS_CLASS=y |
87 | CONFIG_LEDS_LM3530=y | 87 | CONFIG_LEDS_LM3530=y |
88 | CONFIG_LEDS_LP5521=y | 88 | CONFIG_LEDS_LP5521=y |
89 | CONFIG_LEDS_GPIO=y | ||
89 | CONFIG_RTC_CLASS=y | 90 | CONFIG_RTC_CLASS=y |
90 | CONFIG_RTC_DRV_AB8500=y | 91 | CONFIG_RTC_DRV_AB8500=y |
91 | CONFIG_RTC_DRV_PL031=y | 92 | CONFIG_RTC_DRV_PL031=y |
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 03fb93621d0d..5c8b3bf4d825 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -320,4 +320,12 @@ | |||
320 | .size \name , . - \name | 320 | .size \name , . - \name |
321 | .endm | 321 | .endm |
322 | 322 | ||
323 | .macro check_uaccess, addr:req, size:req, limit:req, tmp:req, bad:req | ||
324 | #ifndef CONFIG_CPU_USE_DOMAINS | ||
325 | adds \tmp, \addr, #\size - 1 | ||
326 | sbcccs \tmp, \tmp, \limit | ||
327 | bcs \bad | ||
328 | #endif | ||
329 | .endm | ||
330 | |||
323 | #endif /* __ASM_ASSEMBLER_H__ */ | 331 | #endif /* __ASM_ASSEMBLER_H__ */ |
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 2ae842df4551..5c44dcb0987b 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
@@ -203,6 +203,13 @@ static inline void dma_free_writecombine(struct device *dev, size_t size, | |||
203 | } | 203 | } |
204 | 204 | ||
205 | /* | 205 | /* |
206 | * This can be called during early boot to increase the size of the atomic | ||
207 | * coherent DMA pool above the default value of 256KiB. It must be called | ||
208 | * before postcore_initcall. | ||
209 | */ | ||
210 | extern void __init init_dma_coherent_pool_size(unsigned long size); | ||
211 | |||
212 | /* | ||
206 | * This can be called during boot to increase the size of the consistent | 213 | * This can be called during boot to increase the size of the consistent |
207 | * DMA region above it's default value of 2MB. It must be called before the | 214 | * DMA region above it's default value of 2MB. It must be called before the |
208 | * memory allocator is initialised, i.e. before any core_initcall. | 215 | * memory allocator is initialised, i.e. before any core_initcall. |
diff --git a/arch/arm/include/asm/hardware/linkup-l1110.h b/arch/arm/include/asm/hardware/linkup-l1110.h deleted file mode 100644 index 7ec91168a576..000000000000 --- a/arch/arm/include/asm/hardware/linkup-l1110.h +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Definitions for H3600 Handheld Computer | ||
4 | * | ||
5 | * Copyright 2001 Compaq Computer Corporation. | ||
6 | * | ||
7 | * Use consistent with the GNU GPL is permitted, | ||
8 | * provided that this copyright notice is | ||
9 | * preserved in its entirety in all copies and derived works. | ||
10 | * | ||
11 | * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED, | ||
12 | * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS | ||
13 | * FITNESS FOR ANY PARTICULAR PURPOSE. | ||
14 | * | ||
15 | * Author: Jamey Hicks. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | /* LinkUp Systems PCCard/CompactFlash Interface for SA-1100 */ | ||
20 | |||
21 | /* PC Card Status Register */ | ||
22 | #define LINKUP_PRS_S1 (1 << 0) /* voltage control bits S1-S4 */ | ||
23 | #define LINKUP_PRS_S2 (1 << 1) | ||
24 | #define LINKUP_PRS_S3 (1 << 2) | ||
25 | #define LINKUP_PRS_S4 (1 << 3) | ||
26 | #define LINKUP_PRS_BVD1 (1 << 4) | ||
27 | #define LINKUP_PRS_BVD2 (1 << 5) | ||
28 | #define LINKUP_PRS_VS1 (1 << 6) | ||
29 | #define LINKUP_PRS_VS2 (1 << 7) | ||
30 | #define LINKUP_PRS_RDY (1 << 8) | ||
31 | #define LINKUP_PRS_CD1 (1 << 9) | ||
32 | #define LINKUP_PRS_CD2 (1 << 10) | ||
33 | |||
34 | /* PC Card Command Register */ | ||
35 | #define LINKUP_PRC_S1 (1 << 0) | ||
36 | #define LINKUP_PRC_S2 (1 << 1) | ||
37 | #define LINKUP_PRC_S3 (1 << 2) | ||
38 | #define LINKUP_PRC_S4 (1 << 3) | ||
39 | #define LINKUP_PRC_RESET (1 << 4) | ||
40 | #define LINKUP_PRC_APOE (1 << 5) /* Auto Power Off Enable: clears S1-S4 when either nCD goes high */ | ||
41 | #define LINKUP_PRC_CFE (1 << 6) /* CompactFlash mode Enable: addresses A[10:0] only, A[25:11] high */ | ||
42 | #define LINKUP_PRC_SOE (1 << 7) /* signal output driver enable */ | ||
43 | #define LINKUP_PRC_SSP (1 << 8) /* sock select polarity: 0 for socket 0, 1 for socket 1 */ | ||
44 | #define LINKUP_PRC_MBZ (1 << 15) /* must be zero */ | ||
45 | |||
46 | struct linkup_l1110 { | ||
47 | volatile short prc; | ||
48 | }; | ||
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index e965f1b560f1..5f6ddcc56452 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -187,6 +187,7 @@ static inline unsigned long __phys_to_virt(unsigned long x) | |||
187 | #define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET) | 187 | #define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET) |
188 | #endif | 188 | #endif |
189 | #endif | 189 | #endif |
190 | #endif /* __ASSEMBLY__ */ | ||
190 | 191 | ||
191 | #ifndef PHYS_OFFSET | 192 | #ifndef PHYS_OFFSET |
192 | #ifdef PLAT_PHYS_OFFSET | 193 | #ifdef PLAT_PHYS_OFFSET |
@@ -196,6 +197,8 @@ static inline unsigned long __phys_to_virt(unsigned long x) | |||
196 | #endif | 197 | #endif |
197 | #endif | 198 | #endif |
198 | 199 | ||
200 | #ifndef __ASSEMBLY__ | ||
201 | |||
199 | /* | 202 | /* |
200 | * PFNs are used to describe any physical page; this means | 203 | * PFNs are used to describe any physical page; this means |
201 | * PFN 0 == physical address 0. | 204 | * PFN 0 == physical address 0. |
diff --git a/arch/arm/include/asm/opcodes-virt.h b/arch/arm/include/asm/opcodes-virt.h new file mode 100644 index 000000000000..b85665a96f8e --- /dev/null +++ b/arch/arm/include/asm/opcodes-virt.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * opcodes-virt.h: Opcode definitions for the ARM virtualization extensions | ||
3 | * Copyright (C) 2012 Linaro Limited | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License along | ||
16 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | */ | ||
19 | #ifndef __ASM_ARM_OPCODES_VIRT_H | ||
20 | #define __ASM_ARM_OPCODES_VIRT_H | ||
21 | |||
22 | #include <asm/opcodes.h> | ||
23 | |||
24 | #define __HVC(imm16) __inst_arm_thumb32( \ | ||
25 | 0xE1400070 | (((imm16) & 0xFFF0) << 4) | ((imm16) & 0x000F), \ | ||
26 | 0xF7E08000 | (((imm16) & 0xF000) << 4) | ((imm16) & 0x0FFF) \ | ||
27 | ) | ||
28 | |||
29 | #endif /* ! __ASM_ARM_OPCODES_VIRT_H */ | ||
diff --git a/arch/arm/include/asm/opcodes.h b/arch/arm/include/asm/opcodes.h index 19c48deda70f..74e211a6fb24 100644 --- a/arch/arm/include/asm/opcodes.h +++ b/arch/arm/include/asm/opcodes.h | |||
@@ -19,6 +19,33 @@ extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr); | |||
19 | 19 | ||
20 | 20 | ||
21 | /* | 21 | /* |
22 | * Assembler opcode byteswap helpers. | ||
23 | * These are only intended for use by this header: don't use them directly, | ||
24 | * because they will be suboptimal in most cases. | ||
25 | */ | ||
26 | #define ___asm_opcode_swab32(x) ( \ | ||
27 | (((x) << 24) & 0xFF000000) \ | ||
28 | | (((x) << 8) & 0x00FF0000) \ | ||
29 | | (((x) >> 8) & 0x0000FF00) \ | ||
30 | | (((x) >> 24) & 0x000000FF) \ | ||
31 | ) | ||
32 | #define ___asm_opcode_swab16(x) ( \ | ||
33 | (((x) << 8) & 0xFF00) \ | ||
34 | | (((x) >> 8) & 0x00FF) \ | ||
35 | ) | ||
36 | #define ___asm_opcode_swahb32(x) ( \ | ||
37 | (((x) << 8) & 0xFF00FF00) \ | ||
38 | | (((x) >> 8) & 0x00FF00FF) \ | ||
39 | ) | ||
40 | #define ___asm_opcode_swahw32(x) ( \ | ||
41 | (((x) << 16) & 0xFFFF0000) \ | ||
42 | | (((x) >> 16) & 0x0000FFFF) \ | ||
43 | ) | ||
44 | #define ___asm_opcode_identity32(x) ((x) & 0xFFFFFFFF) | ||
45 | #define ___asm_opcode_identity16(x) ((x) & 0xFFFF) | ||
46 | |||
47 | |||
48 | /* | ||
22 | * Opcode byteswap helpers | 49 | * Opcode byteswap helpers |
23 | * | 50 | * |
24 | * These macros help with converting instructions between a canonical integer | 51 | * These macros help with converting instructions between a canonical integer |
@@ -41,39 +68,163 @@ extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr); | |||
41 | * Note that values in the range 0x0000E800..0xE7FFFFFF intentionally do not | 68 | * Note that values in the range 0x0000E800..0xE7FFFFFF intentionally do not |
42 | * represent any valid Thumb-2 instruction. For this range, | 69 | * represent any valid Thumb-2 instruction. For this range, |
43 | * __opcode_is_thumb32() and __opcode_is_thumb16() will both be false. | 70 | * __opcode_is_thumb32() and __opcode_is_thumb16() will both be false. |
71 | * | ||
72 | * The ___asm variants are intended only for use by this header, in situations | ||
73 | * involving inline assembler. For .S files, the normal __opcode_*() macros | ||
74 | * should do the right thing. | ||
44 | */ | 75 | */ |
76 | #ifdef __ASSEMBLY__ | ||
45 | 77 | ||
46 | #ifndef __ASSEMBLY__ | 78 | #define ___opcode_swab32(x) ___asm_opcode_swab32(x) |
79 | #define ___opcode_swab16(x) ___asm_opcode_swab16(x) | ||
80 | #define ___opcode_swahb32(x) ___asm_opcode_swahb32(x) | ||
81 | #define ___opcode_swahw32(x) ___asm_opcode_swahw32(x) | ||
82 | #define ___opcode_identity32(x) ___asm_opcode_identity32(x) | ||
83 | #define ___opcode_identity16(x) ___asm_opcode_identity16(x) | ||
84 | |||
85 | #else /* ! __ASSEMBLY__ */ | ||
47 | 86 | ||
48 | #include <linux/types.h> | 87 | #include <linux/types.h> |
49 | #include <linux/swab.h> | 88 | #include <linux/swab.h> |
50 | 89 | ||
90 | #define ___opcode_swab32(x) swab32(x) | ||
91 | #define ___opcode_swab16(x) swab16(x) | ||
92 | #define ___opcode_swahb32(x) swahb32(x) | ||
93 | #define ___opcode_swahw32(x) swahw32(x) | ||
94 | #define ___opcode_identity32(x) ((u32)(x)) | ||
95 | #define ___opcode_identity16(x) ((u16)(x)) | ||
96 | |||
97 | #endif /* ! __ASSEMBLY__ */ | ||
98 | |||
99 | |||
51 | #ifdef CONFIG_CPU_ENDIAN_BE8 | 100 | #ifdef CONFIG_CPU_ENDIAN_BE8 |
52 | #define __opcode_to_mem_arm(x) swab32(x) | 101 | |
53 | #define __opcode_to_mem_thumb16(x) swab16(x) | 102 | #define __opcode_to_mem_arm(x) ___opcode_swab32(x) |
54 | #define __opcode_to_mem_thumb32(x) swahb32(x) | 103 | #define __opcode_to_mem_thumb16(x) ___opcode_swab16(x) |
55 | #else | 104 | #define __opcode_to_mem_thumb32(x) ___opcode_swahb32(x) |
56 | #define __opcode_to_mem_arm(x) ((u32)(x)) | 105 | #define ___asm_opcode_to_mem_arm(x) ___asm_opcode_swab32(x) |
57 | #define __opcode_to_mem_thumb16(x) ((u16)(x)) | 106 | #define ___asm_opcode_to_mem_thumb16(x) ___asm_opcode_swab16(x) |
58 | #define __opcode_to_mem_thumb32(x) swahw32(x) | 107 | #define ___asm_opcode_to_mem_thumb32(x) ___asm_opcode_swahb32(x) |
108 | |||
109 | #else /* ! CONFIG_CPU_ENDIAN_BE8 */ | ||
110 | |||
111 | #define __opcode_to_mem_arm(x) ___opcode_identity32(x) | ||
112 | #define __opcode_to_mem_thumb16(x) ___opcode_identity16(x) | ||
113 | #define ___asm_opcode_to_mem_arm(x) ___asm_opcode_identity32(x) | ||
114 | #define ___asm_opcode_to_mem_thumb16(x) ___asm_opcode_identity16(x) | ||
115 | #ifndef CONFIG_CPU_ENDIAN_BE32 | ||
116 | /* | ||
117 | * On BE32 systems, using 32-bit accesses to store Thumb instructions will not | ||
118 | * work in all cases, due to alignment constraints. For now, a correct | ||
119 | * version is not provided for BE32. | ||
120 | */ | ||
121 | #define __opcode_to_mem_thumb32(x) ___opcode_swahw32(x) | ||
122 | #define ___asm_opcode_to_mem_thumb32(x) ___asm_opcode_swahw32(x) | ||
59 | #endif | 123 | #endif |
60 | 124 | ||
125 | #endif /* ! CONFIG_CPU_ENDIAN_BE8 */ | ||
126 | |||
61 | #define __mem_to_opcode_arm(x) __opcode_to_mem_arm(x) | 127 | #define __mem_to_opcode_arm(x) __opcode_to_mem_arm(x) |
62 | #define __mem_to_opcode_thumb16(x) __opcode_to_mem_thumb16(x) | 128 | #define __mem_to_opcode_thumb16(x) __opcode_to_mem_thumb16(x) |
129 | #ifndef CONFIG_CPU_ENDIAN_BE32 | ||
63 | #define __mem_to_opcode_thumb32(x) __opcode_to_mem_thumb32(x) | 130 | #define __mem_to_opcode_thumb32(x) __opcode_to_mem_thumb32(x) |
131 | #endif | ||
64 | 132 | ||
65 | /* Operations specific to Thumb opcodes */ | 133 | /* Operations specific to Thumb opcodes */ |
66 | 134 | ||
67 | /* Instruction size checks: */ | 135 | /* Instruction size checks: */ |
68 | #define __opcode_is_thumb32(x) ((u32)(x) >= 0xE8000000UL) | 136 | #define __opcode_is_thumb32(x) ( \ |
69 | #define __opcode_is_thumb16(x) ((u32)(x) < 0xE800UL) | 137 | ((x) & 0xF8000000) == 0xE8000000 \ |
138 | || ((x) & 0xF0000000) == 0xF0000000 \ | ||
139 | ) | ||
140 | #define __opcode_is_thumb16(x) ( \ | ||
141 | ((x) & 0xFFFF0000) == 0 \ | ||
142 | && !(((x) & 0xF800) == 0xE800 || ((x) & 0xF000) == 0xF000) \ | ||
143 | ) | ||
70 | 144 | ||
71 | /* Operations to construct or split 32-bit Thumb instructions: */ | 145 | /* Operations to construct or split 32-bit Thumb instructions: */ |
72 | #define __opcode_thumb32_first(x) ((u16)((x) >> 16)) | 146 | #define __opcode_thumb32_first(x) (___opcode_identity16((x) >> 16)) |
73 | #define __opcode_thumb32_second(x) ((u16)(x)) | 147 | #define __opcode_thumb32_second(x) (___opcode_identity16(x)) |
74 | #define __opcode_thumb32_compose(first, second) \ | 148 | #define __opcode_thumb32_compose(first, second) ( \ |
75 | (((u32)(u16)(first) << 16) | (u32)(u16)(second)) | 149 | (___opcode_identity32(___opcode_identity16(first)) << 16) \ |
150 | | ___opcode_identity32(___opcode_identity16(second)) \ | ||
151 | ) | ||
152 | #define ___asm_opcode_thumb32_first(x) (___asm_opcode_identity16((x) >> 16)) | ||
153 | #define ___asm_opcode_thumb32_second(x) (___asm_opcode_identity16(x)) | ||
154 | #define ___asm_opcode_thumb32_compose(first, second) ( \ | ||
155 | (___asm_opcode_identity32(___asm_opcode_identity16(first)) << 16) \ | ||
156 | | ___asm_opcode_identity32(___asm_opcode_identity16(second)) \ | ||
157 | ) | ||
76 | 158 | ||
77 | #endif /* __ASSEMBLY__ */ | 159 | /* |
160 | * Opcode injection helpers | ||
161 | * | ||
162 | * In rare cases it is necessary to assemble an opcode which the | ||
163 | * assembler does not support directly, or which would normally be | ||
164 | * rejected because of the CFLAGS or AFLAGS used to build the affected | ||
165 | * file. | ||
166 | * | ||
167 | * Before using these macros, consider carefully whether it is feasible | ||
168 | * instead to change the build flags for your file, or whether it really | ||
169 | * makes sense to support old assembler versions when building that | ||
170 | * particular kernel feature. | ||
171 | * | ||
172 | * The macros defined here should only be used where there is no viable | ||
173 | * alternative. | ||
174 | * | ||
175 | * | ||
176 | * __inst_arm(x): emit the specified ARM opcode | ||
177 | * __inst_thumb16(x): emit the specified 16-bit Thumb opcode | ||
178 | * __inst_thumb32(x): emit the specified 32-bit Thumb opcode | ||
179 | * | ||
180 | * __inst_arm_thumb16(arm, thumb): emit either the specified arm or | ||
181 | * 16-bit Thumb opcode, depending on whether an ARM or Thumb-2 | ||
182 | * kernel is being built | ||
183 | * | ||
184 | * __inst_arm_thumb32(arm, thumb): emit either the specified arm or | ||
185 | * 32-bit Thumb opcode, depending on whether an ARM or Thumb-2 | ||
186 | * kernel is being built | ||
187 | * | ||
188 | * | ||
189 | * Note that using these macros directly is poor practice. Instead, you | ||
190 | * should use them to define human-readable wrapper macros to encode the | ||
191 | * instructions that you care about. In code which might run on ARMv7 or | ||
192 | * above, you can usually use the __inst_arm_thumb{16,32} macros to | ||
193 | * specify the ARM and Thumb alternatives at the same time. This ensures | ||
194 | * that the correct opcode gets emitted depending on the instruction set | ||
195 | * used for the kernel build. | ||
196 | * | ||
197 | * Look at opcodes-virt.h for an example of how to use these macros. | ||
198 | */ | ||
199 | #include <linux/stringify.h> | ||
200 | |||
201 | #define __inst_arm(x) ___inst_arm(___asm_opcode_to_mem_arm(x)) | ||
202 | #define __inst_thumb32(x) ___inst_thumb32( \ | ||
203 | ___asm_opcode_to_mem_thumb16(___asm_opcode_thumb32_first(x)), \ | ||
204 | ___asm_opcode_to_mem_thumb16(___asm_opcode_thumb32_second(x)) \ | ||
205 | ) | ||
206 | #define __inst_thumb16(x) ___inst_thumb16(___asm_opcode_to_mem_thumb16(x)) | ||
207 | |||
208 | #ifdef CONFIG_THUMB2_KERNEL | ||
209 | #define __inst_arm_thumb16(arm_opcode, thumb_opcode) \ | ||
210 | __inst_thumb16(thumb_opcode) | ||
211 | #define __inst_arm_thumb32(arm_opcode, thumb_opcode) \ | ||
212 | __inst_thumb32(thumb_opcode) | ||
213 | #else | ||
214 | #define __inst_arm_thumb16(arm_opcode, thumb_opcode) __inst_arm(arm_opcode) | ||
215 | #define __inst_arm_thumb32(arm_opcode, thumb_opcode) __inst_arm(arm_opcode) | ||
216 | #endif | ||
217 | |||
218 | /* Helpers for the helpers. Don't use these directly. */ | ||
219 | #ifdef __ASSEMBLY__ | ||
220 | #define ___inst_arm(x) .long x | ||
221 | #define ___inst_thumb16(x) .short x | ||
222 | #define ___inst_thumb32(first, second) .short first, second | ||
223 | #else | ||
224 | #define ___inst_arm(x) ".long " __stringify(x) "\n\t" | ||
225 | #define ___inst_thumb16(x) ".short " __stringify(x) "\n\t" | ||
226 | #define ___inst_thumb32(first, second) \ | ||
227 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ||
228 | #endif | ||
78 | 229 | ||
79 | #endif /* __ASM_ARM_OPCODES_H */ | 230 | #endif /* __ASM_ARM_OPCODES_H */ |
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index f66626d71e7d..41dc31f834c3 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -195,6 +195,18 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd) | |||
195 | 195 | ||
196 | #define pte_clear(mm,addr,ptep) set_pte_ext(ptep, __pte(0), 0) | 196 | #define pte_clear(mm,addr,ptep) set_pte_ext(ptep, __pte(0), 0) |
197 | 197 | ||
198 | #define pte_none(pte) (!pte_val(pte)) | ||
199 | #define pte_present(pte) (pte_val(pte) & L_PTE_PRESENT) | ||
200 | #define pte_write(pte) (!(pte_val(pte) & L_PTE_RDONLY)) | ||
201 | #define pte_dirty(pte) (pte_val(pte) & L_PTE_DIRTY) | ||
202 | #define pte_young(pte) (pte_val(pte) & L_PTE_YOUNG) | ||
203 | #define pte_exec(pte) (!(pte_val(pte) & L_PTE_XN)) | ||
204 | #define pte_special(pte) (0) | ||
205 | |||
206 | #define pte_present_user(pte) \ | ||
207 | ((pte_val(pte) & (L_PTE_PRESENT | L_PTE_USER)) == \ | ||
208 | (L_PTE_PRESENT | L_PTE_USER)) | ||
209 | |||
198 | #if __LINUX_ARM_ARCH__ < 6 | 210 | #if __LINUX_ARM_ARCH__ < 6 |
199 | static inline void __sync_icache_dcache(pte_t pteval) | 211 | static inline void __sync_icache_dcache(pte_t pteval) |
200 | { | 212 | { |
@@ -206,25 +218,15 @@ extern void __sync_icache_dcache(pte_t pteval); | |||
206 | static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | 218 | static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, |
207 | pte_t *ptep, pte_t pteval) | 219 | pte_t *ptep, pte_t pteval) |
208 | { | 220 | { |
209 | if (addr >= TASK_SIZE) | 221 | unsigned long ext = 0; |
210 | set_pte_ext(ptep, pteval, 0); | 222 | |
211 | else { | 223 | if (addr < TASK_SIZE && pte_present_user(pteval)) { |
212 | __sync_icache_dcache(pteval); | 224 | __sync_icache_dcache(pteval); |
213 | set_pte_ext(ptep, pteval, PTE_EXT_NG); | 225 | ext |= PTE_EXT_NG; |
214 | } | 226 | } |
215 | } | ||
216 | 227 | ||
217 | #define pte_none(pte) (!pte_val(pte)) | 228 | set_pte_ext(ptep, pteval, ext); |
218 | #define pte_present(pte) (pte_val(pte) & L_PTE_PRESENT) | 229 | } |
219 | #define pte_write(pte) (!(pte_val(pte) & L_PTE_RDONLY)) | ||
220 | #define pte_dirty(pte) (pte_val(pte) & L_PTE_DIRTY) | ||
221 | #define pte_young(pte) (pte_val(pte) & L_PTE_YOUNG) | ||
222 | #define pte_exec(pte) (!(pte_val(pte) & L_PTE_XN)) | ||
223 | #define pte_special(pte) (0) | ||
224 | |||
225 | #define pte_present_user(pte) \ | ||
226 | ((pte_val(pte) & (L_PTE_PRESENT | L_PTE_USER)) == \ | ||
227 | (L_PTE_PRESENT | L_PTE_USER)) | ||
228 | 230 | ||
229 | #define PTE_BIT_FUNC(fn,op) \ | 231 | #define PTE_BIT_FUNC(fn,op) \ |
230 | static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; } | 232 | static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; } |
@@ -251,13 +253,13 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
251 | * | 253 | * |
252 | * 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 | 254 | * 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 |
253 | * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 | 255 | * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 |
254 | * <--------------- offset --------------------> <- type --> 0 0 0 | 256 | * <--------------- offset ----------------------> < type -> 0 0 0 |
255 | * | 257 | * |
256 | * This gives us up to 63 swap files and 32GB per swap file. Note that | 258 | * This gives us up to 31 swap files and 64GB per swap file. Note that |
257 | * the offset field is always non-zero. | 259 | * the offset field is always non-zero. |
258 | */ | 260 | */ |
259 | #define __SWP_TYPE_SHIFT 3 | 261 | #define __SWP_TYPE_SHIFT 3 |
260 | #define __SWP_TYPE_BITS 6 | 262 | #define __SWP_TYPE_BITS 5 |
261 | #define __SWP_TYPE_MASK ((1 << __SWP_TYPE_BITS) - 1) | 263 | #define __SWP_TYPE_MASK ((1 << __SWP_TYPE_BITS) - 1) |
262 | #define __SWP_OFFSET_SHIFT (__SWP_TYPE_BITS + __SWP_TYPE_SHIFT) | 264 | #define __SWP_OFFSET_SHIFT (__SWP_TYPE_BITS + __SWP_TYPE_SHIFT) |
263 | 265 | ||
diff --git a/arch/arm/include/asm/sched_clock.h b/arch/arm/include/asm/sched_clock.h index e3f757263438..05b8e82ec9f5 100644 --- a/arch/arm/include/asm/sched_clock.h +++ b/arch/arm/include/asm/sched_clock.h | |||
@@ -10,5 +10,7 @@ | |||
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); | ||
13 | 15 | ||
14 | #endif | 16 | #endif |
diff --git a/arch/arm/include/asm/syscall.h b/arch/arm/include/asm/syscall.h index c334a23ddf75..47486a41c56e 100644 --- a/arch/arm/include/asm/syscall.h +++ b/arch/arm/include/asm/syscall.h | |||
@@ -9,6 +9,10 @@ | |||
9 | 9 | ||
10 | #include <linux/err.h> | 10 | #include <linux/err.h> |
11 | 11 | ||
12 | #include <asm/unistd.h> | ||
13 | |||
14 | #define NR_syscalls (__NR_syscalls) | ||
15 | |||
12 | extern const unsigned long sys_call_table[]; | 16 | extern const unsigned long sys_call_table[]; |
13 | 17 | ||
14 | static inline int syscall_get_nr(struct task_struct *task, | 18 | static inline int syscall_get_nr(struct task_struct *task, |
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index af7b0bda3355..f71cdab18b87 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
@@ -59,7 +59,9 @@ struct thread_info { | |||
59 | __u32 syscall; /* syscall number */ | 59 | __u32 syscall; /* syscall number */ |
60 | __u8 used_cp[16]; /* thread used copro */ | 60 | __u8 used_cp[16]; /* thread used copro */ |
61 | unsigned long tp_value; | 61 | unsigned long tp_value; |
62 | #ifdef CONFIG_CRUNCH | ||
62 | struct crunch_state crunchstate; | 63 | struct crunch_state crunchstate; |
64 | #endif | ||
63 | union fp_state fpstate __attribute__((aligned(8))); | 65 | union fp_state fpstate __attribute__((aligned(8))); |
64 | union vfp_state vfpstate; | 66 | union vfp_state vfpstate; |
65 | #ifdef CONFIG_ARM_THUMBEE | 67 | #ifdef CONFIG_ARM_THUMBEE |
@@ -148,6 +150,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, | |||
148 | #define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ | 150 | #define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ |
149 | #define TIF_SYSCALL_TRACE 8 | 151 | #define TIF_SYSCALL_TRACE 8 |
150 | #define TIF_SYSCALL_AUDIT 9 | 152 | #define TIF_SYSCALL_AUDIT 9 |
153 | #define TIF_SYSCALL_TRACEPOINT 10 | ||
151 | #define TIF_POLLING_NRFLAG 16 | 154 | #define TIF_POLLING_NRFLAG 16 |
152 | #define TIF_USING_IWMMXT 17 | 155 | #define TIF_USING_IWMMXT 17 |
153 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 156 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
@@ -160,12 +163,13 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, | |||
160 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 163 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
161 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 164 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
162 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 165 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
166 | #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) | ||
163 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 167 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
164 | #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) | 168 | #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) |
165 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | 169 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
166 | 170 | ||
167 | /* Checks for any syscall work in entry-common.S */ | 171 | /* Checks for any syscall work in entry-common.S */ |
168 | #define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT) | 172 | #define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SYSCALL_TRACEPOINT) |
169 | 173 | ||
170 | /* | 174 | /* |
171 | * Change these and you break ASM code in entry-common.S | 175 | * Change these and you break ASM code in entry-common.S |
diff --git a/arch/arm/include/asm/tlb.h b/arch/arm/include/asm/tlb.h index 314d4664eae7..99a19512ee26 100644 --- a/arch/arm/include/asm/tlb.h +++ b/arch/arm/include/asm/tlb.h | |||
@@ -199,6 +199,9 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, | |||
199 | { | 199 | { |
200 | pgtable_page_dtor(pte); | 200 | pgtable_page_dtor(pte); |
201 | 201 | ||
202 | #ifdef CONFIG_ARM_LPAE | ||
203 | tlb_add_flush(tlb, addr); | ||
204 | #else | ||
202 | /* | 205 | /* |
203 | * With the classic ARM MMU, a pte page has two corresponding pmd | 206 | * With the classic ARM MMU, a pte page has two corresponding pmd |
204 | * entries, each covering 1MB. | 207 | * entries, each covering 1MB. |
@@ -206,6 +209,7 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, | |||
206 | addr &= PMD_MASK; | 209 | addr &= PMD_MASK; |
207 | tlb_add_flush(tlb, addr + SZ_1M - PAGE_SIZE); | 210 | tlb_add_flush(tlb, addr + SZ_1M - PAGE_SIZE); |
208 | tlb_add_flush(tlb, addr + SZ_1M); | 211 | tlb_add_flush(tlb, addr + SZ_1M); |
212 | #endif | ||
209 | 213 | ||
210 | tlb_remove_page(tlb, pte); | 214 | tlb_remove_page(tlb, pte); |
211 | } | 215 | } |
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index 479a6352e0b5..77bd79f2ffdb 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -101,28 +101,39 @@ extern int __get_user_1(void *); | |||
101 | extern int __get_user_2(void *); | 101 | extern int __get_user_2(void *); |
102 | extern int __get_user_4(void *); | 102 | extern int __get_user_4(void *); |
103 | 103 | ||
104 | #define __get_user_x(__r2,__p,__e,__s,__i...) \ | 104 | #define __GUP_CLOBBER_1 "lr", "cc" |
105 | #ifdef CONFIG_CPU_USE_DOMAINS | ||
106 | #define __GUP_CLOBBER_2 "ip", "lr", "cc" | ||
107 | #else | ||
108 | #define __GUP_CLOBBER_2 "lr", "cc" | ||
109 | #endif | ||
110 | #define __GUP_CLOBBER_4 "lr", "cc" | ||
111 | |||
112 | #define __get_user_x(__r2,__p,__e,__l,__s) \ | ||
105 | __asm__ __volatile__ ( \ | 113 | __asm__ __volatile__ ( \ |
106 | __asmeq("%0", "r0") __asmeq("%1", "r2") \ | 114 | __asmeq("%0", "r0") __asmeq("%1", "r2") \ |
115 | __asmeq("%3", "r1") \ | ||
107 | "bl __get_user_" #__s \ | 116 | "bl __get_user_" #__s \ |
108 | : "=&r" (__e), "=r" (__r2) \ | 117 | : "=&r" (__e), "=r" (__r2) \ |
109 | : "0" (__p) \ | 118 | : "0" (__p), "r" (__l) \ |
110 | : __i, "cc") | 119 | : __GUP_CLOBBER_##__s) |
111 | 120 | ||
112 | #define get_user(x,p) \ | 121 | #define __get_user_check(x,p) \ |
113 | ({ \ | 122 | ({ \ |
123 | unsigned long __limit = current_thread_info()->addr_limit - 1; \ | ||
114 | register const typeof(*(p)) __user *__p asm("r0") = (p);\ | 124 | register const typeof(*(p)) __user *__p asm("r0") = (p);\ |
115 | register unsigned long __r2 asm("r2"); \ | 125 | register unsigned long __r2 asm("r2"); \ |
126 | register unsigned long __l asm("r1") = __limit; \ | ||
116 | register int __e asm("r0"); \ | 127 | register int __e asm("r0"); \ |
117 | switch (sizeof(*(__p))) { \ | 128 | switch (sizeof(*(__p))) { \ |
118 | case 1: \ | 129 | case 1: \ |
119 | __get_user_x(__r2, __p, __e, 1, "lr"); \ | 130 | __get_user_x(__r2, __p, __e, __l, 1); \ |
120 | break; \ | 131 | break; \ |
121 | case 2: \ | 132 | case 2: \ |
122 | __get_user_x(__r2, __p, __e, 2, "r3", "lr"); \ | 133 | __get_user_x(__r2, __p, __e, __l, 2); \ |
123 | break; \ | 134 | break; \ |
124 | case 4: \ | 135 | case 4: \ |
125 | __get_user_x(__r2, __p, __e, 4, "lr"); \ | 136 | __get_user_x(__r2, __p, __e, __l, 4); \ |
126 | break; \ | 137 | break; \ |
127 | default: __e = __get_user_bad(); break; \ | 138 | default: __e = __get_user_bad(); break; \ |
128 | } \ | 139 | } \ |
@@ -130,42 +141,57 @@ extern int __get_user_4(void *); | |||
130 | __e; \ | 141 | __e; \ |
131 | }) | 142 | }) |
132 | 143 | ||
144 | #define get_user(x,p) \ | ||
145 | ({ \ | ||
146 | might_fault(); \ | ||
147 | __get_user_check(x,p); \ | ||
148 | }) | ||
149 | |||
133 | extern int __put_user_1(void *, unsigned int); | 150 | extern int __put_user_1(void *, unsigned int); |
134 | extern int __put_user_2(void *, unsigned int); | 151 | extern int __put_user_2(void *, unsigned int); |
135 | extern int __put_user_4(void *, unsigned int); | 152 | extern int __put_user_4(void *, unsigned int); |
136 | extern int __put_user_8(void *, unsigned long long); | 153 | extern int __put_user_8(void *, unsigned long long); |
137 | 154 | ||
138 | #define __put_user_x(__r2,__p,__e,__s) \ | 155 | #define __put_user_x(__r2,__p,__e,__l,__s) \ |
139 | __asm__ __volatile__ ( \ | 156 | __asm__ __volatile__ ( \ |
140 | __asmeq("%0", "r0") __asmeq("%2", "r2") \ | 157 | __asmeq("%0", "r0") __asmeq("%2", "r2") \ |
158 | __asmeq("%3", "r1") \ | ||
141 | "bl __put_user_" #__s \ | 159 | "bl __put_user_" #__s \ |
142 | : "=&r" (__e) \ | 160 | : "=&r" (__e) \ |
143 | : "0" (__p), "r" (__r2) \ | 161 | : "0" (__p), "r" (__r2), "r" (__l) \ |
144 | : "ip", "lr", "cc") | 162 | : "ip", "lr", "cc") |
145 | 163 | ||
146 | #define put_user(x,p) \ | 164 | #define __put_user_check(x,p) \ |
147 | ({ \ | 165 | ({ \ |
166 | unsigned long __limit = current_thread_info()->addr_limit - 1; \ | ||
148 | register const typeof(*(p)) __r2 asm("r2") = (x); \ | 167 | register const typeof(*(p)) __r2 asm("r2") = (x); \ |
149 | register const typeof(*(p)) __user *__p asm("r0") = (p);\ | 168 | register const typeof(*(p)) __user *__p asm("r0") = (p);\ |
169 | register unsigned long __l asm("r1") = __limit; \ | ||
150 | register int __e asm("r0"); \ | 170 | register int __e asm("r0"); \ |
151 | switch (sizeof(*(__p))) { \ | 171 | switch (sizeof(*(__p))) { \ |
152 | case 1: \ | 172 | case 1: \ |
153 | __put_user_x(__r2, __p, __e, 1); \ | 173 | __put_user_x(__r2, __p, __e, __l, 1); \ |
154 | break; \ | 174 | break; \ |
155 | case 2: \ | 175 | case 2: \ |
156 | __put_user_x(__r2, __p, __e, 2); \ | 176 | __put_user_x(__r2, __p, __e, __l, 2); \ |
157 | break; \ | 177 | break; \ |
158 | case 4: \ | 178 | case 4: \ |
159 | __put_user_x(__r2, __p, __e, 4); \ | 179 | __put_user_x(__r2, __p, __e, __l, 4); \ |
160 | break; \ | 180 | break; \ |
161 | case 8: \ | 181 | case 8: \ |
162 | __put_user_x(__r2, __p, __e, 8); \ | 182 | __put_user_x(__r2, __p, __e, __l, 8); \ |
163 | break; \ | 183 | break; \ |
164 | default: __e = __put_user_bad(); break; \ | 184 | default: __e = __put_user_bad(); break; \ |
165 | } \ | 185 | } \ |
166 | __e; \ | 186 | __e; \ |
167 | }) | 187 | }) |
168 | 188 | ||
189 | #define put_user(x,p) \ | ||
190 | ({ \ | ||
191 | might_fault(); \ | ||
192 | __put_user_check(x,p); \ | ||
193 | }) | ||
194 | |||
169 | #else /* CONFIG_MMU */ | 195 | #else /* CONFIG_MMU */ |
170 | 196 | ||
171 | /* | 197 | /* |
@@ -219,6 +245,7 @@ do { \ | |||
219 | unsigned long __gu_addr = (unsigned long)(ptr); \ | 245 | unsigned long __gu_addr = (unsigned long)(ptr); \ |
220 | unsigned long __gu_val; \ | 246 | unsigned long __gu_val; \ |
221 | __chk_user_ptr(ptr); \ | 247 | __chk_user_ptr(ptr); \ |
248 | might_fault(); \ | ||
222 | switch (sizeof(*(ptr))) { \ | 249 | switch (sizeof(*(ptr))) { \ |
223 | case 1: __get_user_asm_byte(__gu_val,__gu_addr,err); break; \ | 250 | case 1: __get_user_asm_byte(__gu_val,__gu_addr,err); break; \ |
224 | case 2: __get_user_asm_half(__gu_val,__gu_addr,err); break; \ | 251 | case 2: __get_user_asm_half(__gu_val,__gu_addr,err); break; \ |
@@ -300,6 +327,7 @@ do { \ | |||
300 | unsigned long __pu_addr = (unsigned long)(ptr); \ | 327 | unsigned long __pu_addr = (unsigned long)(ptr); \ |
301 | __typeof__(*(ptr)) __pu_val = (x); \ | 328 | __typeof__(*(ptr)) __pu_val = (x); \ |
302 | __chk_user_ptr(ptr); \ | 329 | __chk_user_ptr(ptr); \ |
330 | might_fault(); \ | ||
303 | switch (sizeof(*(ptr))) { \ | 331 | switch (sizeof(*(ptr))) { \ |
304 | case 1: __put_user_asm_byte(__pu_val,__pu_addr,err); break; \ | 332 | case 1: __put_user_asm_byte(__pu_val,__pu_addr,err); break; \ |
305 | case 2: __put_user_asm_half(__pu_val,__pu_addr,err); break; \ | 333 | case 2: __put_user_asm_half(__pu_val,__pu_addr,err); break; \ |
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index 0cab47d4a83f..d9ff5cc3a506 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
@@ -404,6 +404,15 @@ | |||
404 | #define __NR_setns (__NR_SYSCALL_BASE+375) | 404 | #define __NR_setns (__NR_SYSCALL_BASE+375) |
405 | #define __NR_process_vm_readv (__NR_SYSCALL_BASE+376) | 405 | #define __NR_process_vm_readv (__NR_SYSCALL_BASE+376) |
406 | #define __NR_process_vm_writev (__NR_SYSCALL_BASE+377) | 406 | #define __NR_process_vm_writev (__NR_SYSCALL_BASE+377) |
407 | /* 378 for kcmp */ | ||
408 | |||
409 | /* | ||
410 | * This may need to be greater than __NR_last_syscall+1 in order to | ||
411 | * account for the padding in the syscall table | ||
412 | */ | ||
413 | #ifdef __KERNEL__ | ||
414 | #define __NR_syscalls (380) | ||
415 | #endif /* __KERNEL__ */ | ||
407 | 416 | ||
408 | /* | 417 | /* |
409 | * The following SWIs are ARM private. | 418 | * The following SWIs are ARM private. |
@@ -483,6 +492,7 @@ | |||
483 | */ | 492 | */ |
484 | #define __IGNORE_fadvise64_64 | 493 | #define __IGNORE_fadvise64_64 |
485 | #define __IGNORE_migrate_pages | 494 | #define __IGNORE_migrate_pages |
495 | #define __IGNORE_kcmp | ||
486 | 496 | ||
487 | #endif /* __KERNEL__ */ | 497 | #endif /* __KERNEL__ */ |
488 | #endif /* __ASM_ARM_UNISTD_H */ | 498 | #endif /* __ASM_ARM_UNISTD_H */ |
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 7ad2d5cf7008..79e346a5d78b 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -19,7 +19,9 @@ obj-y := elf.o entry-armv.o entry-common.o irq.o opcodes.o \ | |||
19 | process.o ptrace.o return_address.o sched_clock.o \ | 19 | process.o ptrace.o return_address.o sched_clock.o \ |
20 | setup.o signal.o stacktrace.o sys_arm.o time.o traps.o | 20 | setup.o signal.o stacktrace.o sys_arm.o time.o traps.o |
21 | 21 | ||
22 | obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += compat.o | 22 | obj-$(CONFIG_ATAGS) += atags_parse.o |
23 | obj-$(CONFIG_ATAGS_PROC) += atags_proc.o | ||
24 | obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += atags_compat.o | ||
23 | 25 | ||
24 | obj-$(CONFIG_LEDS) += leds.o | 26 | obj-$(CONFIG_LEDS) += leds.o |
25 | obj-$(CONFIG_OC_ETM) += etm.o | 27 | obj-$(CONFIG_OC_ETM) += etm.o |
@@ -52,7 +54,6 @@ test-kprobes-objs += kprobes-test-thumb.o | |||
52 | else | 54 | else |
53 | test-kprobes-objs += kprobes-test-arm.o | 55 | test-kprobes-objs += kprobes-test-arm.o |
54 | endif | 56 | endif |
55 | obj-$(CONFIG_ATAGS_PROC) += atags.o | ||
56 | obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o | 57 | obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o |
57 | obj-$(CONFIG_ARM_THUMBEE) += thumbee.o | 58 | obj-$(CONFIG_ARM_THUMBEE) += thumbee.o |
58 | obj-$(CONFIG_KGDB) += kgdb.o | 59 | obj-$(CONFIG_KGDB) += kgdb.o |
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c index 1429d8989fb9..c985b481192c 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c | |||
@@ -59,10 +59,12 @@ int main(void) | |||
59 | DEFINE(TI_USED_CP, offsetof(struct thread_info, used_cp)); | 59 | DEFINE(TI_USED_CP, offsetof(struct thread_info, used_cp)); |
60 | DEFINE(TI_TP_VALUE, offsetof(struct thread_info, tp_value)); | 60 | DEFINE(TI_TP_VALUE, offsetof(struct thread_info, tp_value)); |
61 | DEFINE(TI_FPSTATE, offsetof(struct thread_info, fpstate)); | 61 | DEFINE(TI_FPSTATE, offsetof(struct thread_info, fpstate)); |
62 | #ifdef CONFIG_VFP | ||
62 | DEFINE(TI_VFPSTATE, offsetof(struct thread_info, vfpstate)); | 63 | DEFINE(TI_VFPSTATE, offsetof(struct thread_info, vfpstate)); |
63 | #ifdef CONFIG_SMP | 64 | #ifdef CONFIG_SMP |
64 | DEFINE(VFP_CPU, offsetof(union vfp_state, hard.cpu)); | 65 | DEFINE(VFP_CPU, offsetof(union vfp_state, hard.cpu)); |
65 | #endif | 66 | #endif |
67 | #endif | ||
66 | #ifdef CONFIG_ARM_THUMBEE | 68 | #ifdef CONFIG_ARM_THUMBEE |
67 | DEFINE(TI_THUMBEE_STATE, offsetof(struct thread_info, thumbee_state)); | 69 | DEFINE(TI_THUMBEE_STATE, offsetof(struct thread_info, thumbee_state)); |
68 | #endif | 70 | #endif |
diff --git a/arch/arm/kernel/atags.h b/arch/arm/kernel/atags.h index e5f028d214a1..9edc9692332d 100644 --- a/arch/arm/kernel/atags.h +++ b/arch/arm/kernel/atags.h | |||
@@ -3,3 +3,17 @@ extern void save_atags(struct tag *tags); | |||
3 | #else | 3 | #else |
4 | static inline void save_atags(struct tag *tags) { } | 4 | static inline void save_atags(struct tag *tags) { } |
5 | #endif | 5 | #endif |
6 | |||
7 | void convert_to_tag_list(struct tag *tags); | ||
8 | |||
9 | #ifdef CONFIG_ATAGS | ||
10 | struct machine_desc *setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr); | ||
11 | #else | ||
12 | static inline struct machine_desc * | ||
13 | setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr) | ||
14 | { | ||
15 | early_print("no ATAGS support: can't continue\n"); | ||
16 | while (true); | ||
17 | unreachable(); | ||
18 | } | ||
19 | #endif | ||
diff --git a/arch/arm/kernel/compat.c b/arch/arm/kernel/atags_compat.c index 925652318b8b..5236ad38f417 100644 --- a/arch/arm/kernel/compat.c +++ b/arch/arm/kernel/atags_compat.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/arm/kernel/compat.c | 2 | * linux/arch/arm/kernel/atags_compat.c |
3 | * | 3 | * |
4 | * Copyright (C) 2001 Russell King | 4 | * Copyright (C) 2001 Russell King |
5 | * | 5 | * |
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
28 | 28 | ||
29 | #include "compat.h" | 29 | #include "atags.h" |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * Usage: | 32 | * Usage: |
diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c new file mode 100644 index 000000000000..14512e6931d8 --- /dev/null +++ b/arch/arm/kernel/atags_parse.c | |||
@@ -0,0 +1,238 @@ | |||
1 | /* | ||
2 | * Tag parsing. | ||
3 | * | ||
4 | * Copyright (C) 1995-2001 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | /* | ||
12 | * This is the traditional way of passing data to the kernel at boot time. Rather | ||
13 | * than passing a fixed inflexible structure to the kernel, we pass a list | ||
14 | * of variable-sized tags to the kernel. The first tag must be a ATAG_CORE | ||
15 | * tag for the list to be recognised (to distinguish the tagged list from | ||
16 | * a param_struct). The list is terminated with a zero-length tag (this tag | ||
17 | * is not parsed in any way). | ||
18 | */ | ||
19 | |||
20 | #include <linux/init.h> | ||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/fs.h> | ||
23 | #include <linux/root_dev.h> | ||
24 | #include <linux/screen_info.h> | ||
25 | |||
26 | #include <asm/setup.h> | ||
27 | #include <asm/system_info.h> | ||
28 | #include <asm/page.h> | ||
29 | #include <asm/mach/arch.h> | ||
30 | |||
31 | #include "atags.h" | ||
32 | |||
33 | static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; | ||
34 | |||
35 | #ifndef MEM_SIZE | ||
36 | #define MEM_SIZE (16*1024*1024) | ||
37 | #endif | ||
38 | |||
39 | static struct { | ||
40 | struct tag_header hdr1; | ||
41 | struct tag_core core; | ||
42 | struct tag_header hdr2; | ||
43 | struct tag_mem32 mem; | ||
44 | struct tag_header hdr3; | ||
45 | } default_tags __initdata = { | ||
46 | { tag_size(tag_core), ATAG_CORE }, | ||
47 | { 1, PAGE_SIZE, 0xff }, | ||
48 | { tag_size(tag_mem32), ATAG_MEM }, | ||
49 | { MEM_SIZE }, | ||
50 | { 0, ATAG_NONE } | ||
51 | }; | ||
52 | |||
53 | static int __init parse_tag_core(const struct tag *tag) | ||
54 | { | ||
55 | if (tag->hdr.size > 2) { | ||
56 | if ((tag->u.core.flags & 1) == 0) | ||
57 | root_mountflags &= ~MS_RDONLY; | ||
58 | ROOT_DEV = old_decode_dev(tag->u.core.rootdev); | ||
59 | } | ||
60 | return 0; | ||
61 | } | ||
62 | |||
63 | __tagtable(ATAG_CORE, parse_tag_core); | ||
64 | |||
65 | static int __init parse_tag_mem32(const struct tag *tag) | ||
66 | { | ||
67 | return arm_add_memory(tag->u.mem.start, tag->u.mem.size); | ||
68 | } | ||
69 | |||
70 | __tagtable(ATAG_MEM, parse_tag_mem32); | ||
71 | |||
72 | #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) | ||
73 | static int __init parse_tag_videotext(const struct tag *tag) | ||
74 | { | ||
75 | screen_info.orig_x = tag->u.videotext.x; | ||
76 | screen_info.orig_y = tag->u.videotext.y; | ||
77 | screen_info.orig_video_page = tag->u.videotext.video_page; | ||
78 | screen_info.orig_video_mode = tag->u.videotext.video_mode; | ||
79 | screen_info.orig_video_cols = tag->u.videotext.video_cols; | ||
80 | screen_info.orig_video_ega_bx = tag->u.videotext.video_ega_bx; | ||
81 | screen_info.orig_video_lines = tag->u.videotext.video_lines; | ||
82 | screen_info.orig_video_isVGA = tag->u.videotext.video_isvga; | ||
83 | screen_info.orig_video_points = tag->u.videotext.video_points; | ||
84 | return 0; | ||
85 | } | ||
86 | |||
87 | __tagtable(ATAG_VIDEOTEXT, parse_tag_videotext); | ||
88 | #endif | ||
89 | |||
90 | #ifdef CONFIG_BLK_DEV_RAM | ||
91 | static int __init parse_tag_ramdisk(const struct tag *tag) | ||
92 | { | ||
93 | extern int rd_size, rd_image_start, rd_prompt, rd_doload; | ||
94 | |||
95 | rd_image_start = tag->u.ramdisk.start; | ||
96 | rd_doload = (tag->u.ramdisk.flags & 1) == 0; | ||
97 | rd_prompt = (tag->u.ramdisk.flags & 2) == 0; | ||
98 | |||
99 | if (tag->u.ramdisk.size) | ||
100 | rd_size = tag->u.ramdisk.size; | ||
101 | |||
102 | return 0; | ||
103 | } | ||
104 | |||
105 | __tagtable(ATAG_RAMDISK, parse_tag_ramdisk); | ||
106 | #endif | ||
107 | |||
108 | static int __init parse_tag_serialnr(const struct tag *tag) | ||
109 | { | ||
110 | system_serial_low = tag->u.serialnr.low; | ||
111 | system_serial_high = tag->u.serialnr.high; | ||
112 | return 0; | ||
113 | } | ||
114 | |||
115 | __tagtable(ATAG_SERIAL, parse_tag_serialnr); | ||
116 | |||
117 | static int __init parse_tag_revision(const struct tag *tag) | ||
118 | { | ||
119 | system_rev = tag->u.revision.rev; | ||
120 | return 0; | ||
121 | } | ||
122 | |||
123 | __tagtable(ATAG_REVISION, parse_tag_revision); | ||
124 | |||
125 | static int __init parse_tag_cmdline(const struct tag *tag) | ||
126 | { | ||
127 | #if defined(CONFIG_CMDLINE_EXTEND) | ||
128 | strlcat(default_command_line, " ", COMMAND_LINE_SIZE); | ||
129 | strlcat(default_command_line, tag->u.cmdline.cmdline, | ||
130 | COMMAND_LINE_SIZE); | ||
131 | #elif defined(CONFIG_CMDLINE_FORCE) | ||
132 | pr_warning("Ignoring tag cmdline (using the default kernel command line)\n"); | ||
133 | #else | ||
134 | strlcpy(default_command_line, tag->u.cmdline.cmdline, | ||
135 | COMMAND_LINE_SIZE); | ||
136 | #endif | ||
137 | return 0; | ||
138 | } | ||
139 | |||
140 | __tagtable(ATAG_CMDLINE, parse_tag_cmdline); | ||
141 | |||
142 | /* | ||
143 | * Scan the tag table for this tag, and call its parse function. | ||
144 | * The tag table is built by the linker from all the __tagtable | ||
145 | * declarations. | ||
146 | */ | ||
147 | static int __init parse_tag(const struct tag *tag) | ||
148 | { | ||
149 | extern struct tagtable __tagtable_begin, __tagtable_end; | ||
150 | struct tagtable *t; | ||
151 | |||
152 | for (t = &__tagtable_begin; t < &__tagtable_end; t++) | ||
153 | if (tag->hdr.tag == t->tag) { | ||
154 | t->parse(tag); | ||
155 | break; | ||
156 | } | ||
157 | |||
158 | return t < &__tagtable_end; | ||
159 | } | ||
160 | |||
161 | /* | ||
162 | * Parse all tags in the list, checking both the global and architecture | ||
163 | * specific tag tables. | ||
164 | */ | ||
165 | static void __init parse_tags(const struct tag *t) | ||
166 | { | ||
167 | for (; t->hdr.size; t = tag_next(t)) | ||
168 | if (!parse_tag(t)) | ||
169 | printk(KERN_WARNING | ||
170 | "Ignoring unrecognised tag 0x%08x\n", | ||
171 | t->hdr.tag); | ||
172 | } | ||
173 | |||
174 | static void __init squash_mem_tags(struct tag *tag) | ||
175 | { | ||
176 | for (; tag->hdr.size; tag = tag_next(tag)) | ||
177 | if (tag->hdr.tag == ATAG_MEM) | ||
178 | tag->hdr.tag = ATAG_NONE; | ||
179 | } | ||
180 | |||
181 | struct machine_desc * __init setup_machine_tags(phys_addr_t __atags_pointer, | ||
182 | unsigned int machine_nr) | ||
183 | { | ||
184 | struct tag *tags = (struct tag *)&default_tags; | ||
185 | struct machine_desc *mdesc = NULL, *p; | ||
186 | char *from = default_command_line; | ||
187 | |||
188 | default_tags.mem.start = PHYS_OFFSET; | ||
189 | |||
190 | /* | ||
191 | * locate machine in the list of supported machines. | ||
192 | */ | ||
193 | for_each_machine_desc(p) | ||
194 | if (machine_nr == p->nr) { | ||
195 | printk("Machine: %s\n", p->name); | ||
196 | mdesc = p; | ||
197 | break; | ||
198 | } | ||
199 | |||
200 | if (!mdesc) { | ||
201 | early_print("\nError: unrecognized/unsupported machine ID" | ||
202 | " (r1 = 0x%08x).\n\n", machine_nr); | ||
203 | dump_machine_table(); /* does not return */ | ||
204 | } | ||
205 | |||
206 | if (__atags_pointer) | ||
207 | tags = phys_to_virt(__atags_pointer); | ||
208 | else if (mdesc->atag_offset) | ||
209 | tags = (void *)(PAGE_OFFSET + mdesc->atag_offset); | ||
210 | |||
211 | #if defined(CONFIG_DEPRECATED_PARAM_STRUCT) | ||
212 | /* | ||
213 | * If we have the old style parameters, convert them to | ||
214 | * a tag list. | ||
215 | */ | ||
216 | if (tags->hdr.tag != ATAG_CORE) | ||
217 | convert_to_tag_list(tags); | ||
218 | #endif | ||
219 | if (tags->hdr.tag != ATAG_CORE) { | ||
220 | early_print("Warning: Neither atags nor dtb found\n"); | ||
221 | tags = (struct tag *)&default_tags; | ||
222 | } | ||
223 | |||
224 | if (mdesc->fixup) | ||
225 | mdesc->fixup(tags, &from, &meminfo); | ||
226 | |||
227 | if (tags->hdr.tag == ATAG_CORE) { | ||
228 | if (meminfo.nr_banks != 0) | ||
229 | squash_mem_tags(tags); | ||
230 | save_atags(tags); | ||
231 | parse_tags(tags); | ||
232 | } | ||
233 | |||
234 | /* parse_early_param needs a boot_command_line */ | ||
235 | strlcpy(boot_command_line, from, COMMAND_LINE_SIZE); | ||
236 | |||
237 | return mdesc; | ||
238 | } | ||
diff --git a/arch/arm/kernel/atags.c b/arch/arm/kernel/atags_proc.c index 42a1a1415fa6..42a1a1415fa6 100644 --- a/arch/arm/kernel/atags.c +++ b/arch/arm/kernel/atags_proc.c | |||
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 463ff4a0ec8a..e337879595e5 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
@@ -387,6 +387,7 @@ | |||
387 | /* 375 */ CALL(sys_setns) | 387 | /* 375 */ CALL(sys_setns) |
388 | CALL(sys_process_vm_readv) | 388 | CALL(sys_process_vm_readv) |
389 | CALL(sys_process_vm_writev) | 389 | CALL(sys_process_vm_writev) |
390 | CALL(sys_ni_syscall) /* reserved for sys_kcmp */ | ||
390 | #ifndef syscalls_counted | 391 | #ifndef syscalls_counted |
391 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls | 392 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls |
392 | #define syscalls_counted | 393 | #define syscalls_counted |
diff --git a/arch/arm/kernel/compat.h b/arch/arm/kernel/compat.h deleted file mode 100644 index 39264ab1b9c6..000000000000 --- a/arch/arm/kernel/compat.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/kernel/compat.h | ||
3 | * | ||
4 | * Copyright (C) 2001 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | extern void convert_to_tag_list(struct tag *tags); | ||
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 978eac57e04a..f45987037bf1 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -94,6 +94,15 @@ ENDPROC(ret_from_fork) | |||
94 | .equ NR_syscalls,0 | 94 | .equ NR_syscalls,0 |
95 | #define CALL(x) .equ NR_syscalls,NR_syscalls+1 | 95 | #define CALL(x) .equ NR_syscalls,NR_syscalls+1 |
96 | #include "calls.S" | 96 | #include "calls.S" |
97 | |||
98 | /* | ||
99 | * Ensure that the system call table is equal to __NR_syscalls, | ||
100 | * which is the value the rest of the system sees | ||
101 | */ | ||
102 | .ifne NR_syscalls - __NR_syscalls | ||
103 | .error "__NR_syscalls is not equal to the size of the syscall table" | ||
104 | .endif | ||
105 | |||
97 | #undef CALL | 106 | #undef CALL |
98 | #define CALL(x) .long x | 107 | #define CALL(x) .long x |
99 | 108 | ||
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index ba386bd94107..281bf3301241 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c | |||
@@ -159,6 +159,12 @@ static int debug_arch_supported(void) | |||
159 | arch >= ARM_DEBUG_ARCH_V7_1; | 159 | arch >= ARM_DEBUG_ARCH_V7_1; |
160 | } | 160 | } |
161 | 161 | ||
162 | /* Can we determine the watchpoint access type from the fsr? */ | ||
163 | static int debug_exception_updates_fsr(void) | ||
164 | { | ||
165 | return 0; | ||
166 | } | ||
167 | |||
162 | /* Determine number of WRP registers available. */ | 168 | /* Determine number of WRP registers available. */ |
163 | static int get_num_wrp_resources(void) | 169 | static int get_num_wrp_resources(void) |
164 | { | 170 | { |
@@ -604,13 +610,14 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp) | |||
604 | /* Aligned */ | 610 | /* Aligned */ |
605 | break; | 611 | break; |
606 | case 1: | 612 | case 1: |
607 | /* Allow single byte watchpoint. */ | ||
608 | if (info->ctrl.len == ARM_BREAKPOINT_LEN_1) | ||
609 | break; | ||
610 | case 2: | 613 | case 2: |
611 | /* Allow halfword watchpoints and breakpoints. */ | 614 | /* Allow halfword watchpoints and breakpoints. */ |
612 | if (info->ctrl.len == ARM_BREAKPOINT_LEN_2) | 615 | if (info->ctrl.len == ARM_BREAKPOINT_LEN_2) |
613 | break; | 616 | break; |
617 | case 3: | ||
618 | /* Allow single byte watchpoint. */ | ||
619 | if (info->ctrl.len == ARM_BREAKPOINT_LEN_1) | ||
620 | break; | ||
614 | default: | 621 | default: |
615 | ret = -EINVAL; | 622 | ret = -EINVAL; |
616 | goto out; | 623 | goto out; |
@@ -619,18 +626,35 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp) | |||
619 | info->address &= ~alignment_mask; | 626 | info->address &= ~alignment_mask; |
620 | info->ctrl.len <<= offset; | 627 | info->ctrl.len <<= offset; |
621 | 628 | ||
622 | /* | 629 | if (!bp->overflow_handler) { |
623 | * Currently we rely on an overflow handler to take | 630 | /* |
624 | * care of single-stepping the breakpoint when it fires. | 631 | * Mismatch breakpoints are required for single-stepping |
625 | * In the case of userspace breakpoints on a core with V7 debug, | 632 | * breakpoints. |
626 | * we can use the mismatch feature as a poor-man's hardware | 633 | */ |
627 | * single-step, but this only works for per-task breakpoints. | 634 | if (!core_has_mismatch_brps()) |
628 | */ | 635 | return -EINVAL; |
629 | if (!bp->overflow_handler && (arch_check_bp_in_kernelspace(bp) || | 636 | |
630 | !core_has_mismatch_brps() || !bp->hw.bp_target)) { | 637 | /* We don't allow mismatch breakpoints in kernel space. */ |
631 | pr_warning("overflow handler required but none found\n"); | 638 | if (arch_check_bp_in_kernelspace(bp)) |
632 | ret = -EINVAL; | 639 | return -EPERM; |
640 | |||
641 | /* | ||
642 | * Per-cpu breakpoints are not supported by our stepping | ||
643 | * mechanism. | ||
644 | */ | ||
645 | if (!bp->hw.bp_target) | ||
646 | return -EINVAL; | ||
647 | |||
648 | /* | ||
649 | * We only support specific access types if the fsr | ||
650 | * reports them. | ||
651 | */ | ||
652 | if (!debug_exception_updates_fsr() && | ||
653 | (info->ctrl.type == ARM_BREAKPOINT_LOAD || | ||
654 | info->ctrl.type == ARM_BREAKPOINT_STORE)) | ||
655 | return -EINVAL; | ||
633 | } | 656 | } |
657 | |||
634 | out: | 658 | out: |
635 | return ret; | 659 | return ret; |
636 | } | 660 | } |
@@ -706,10 +730,12 @@ static void watchpoint_handler(unsigned long addr, unsigned int fsr, | |||
706 | goto unlock; | 730 | goto unlock; |
707 | 731 | ||
708 | /* Check that the access type matches. */ | 732 | /* Check that the access type matches. */ |
709 | access = (fsr & ARM_FSR_ACCESS_MASK) ? HW_BREAKPOINT_W : | 733 | if (debug_exception_updates_fsr()) { |
710 | HW_BREAKPOINT_R; | 734 | access = (fsr & ARM_FSR_ACCESS_MASK) ? |
711 | if (!(access & hw_breakpoint_type(wp))) | 735 | HW_BREAKPOINT_W : HW_BREAKPOINT_R; |
712 | goto unlock; | 736 | if (!(access & hw_breakpoint_type(wp))) |
737 | goto unlock; | ||
738 | } | ||
713 | 739 | ||
714 | /* We have a winner. */ | 740 | /* We have a winner. */ |
715 | info->trigger = addr; | 741 | info->trigger = addr; |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 3e0fc5f7ed4b..739db3a1b2d2 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -30,6 +30,9 @@ | |||
30 | #include <asm/pgtable.h> | 30 | #include <asm/pgtable.h> |
31 | #include <asm/traps.h> | 31 | #include <asm/traps.h> |
32 | 32 | ||
33 | #define CREATE_TRACE_POINTS | ||
34 | #include <trace/events/syscalls.h> | ||
35 | |||
33 | #define REG_PC 15 | 36 | #define REG_PC 15 |
34 | #define REG_PSR 16 | 37 | #define REG_PSR 16 |
35 | /* | 38 | /* |
@@ -918,11 +921,11 @@ static int ptrace_syscall_trace(struct pt_regs *regs, int scno, | |||
918 | { | 921 | { |
919 | unsigned long ip; | 922 | unsigned long ip; |
920 | 923 | ||
924 | current_thread_info()->syscall = scno; | ||
925 | |||
921 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | 926 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) |
922 | return scno; | 927 | return scno; |
923 | 928 | ||
924 | current_thread_info()->syscall = scno; | ||
925 | |||
926 | /* | 929 | /* |
927 | * IP is used to denote syscall entry/exit: | 930 | * IP is used to denote syscall entry/exit: |
928 | * IP = 0 -> entry, =1 -> exit | 931 | * IP = 0 -> entry, =1 -> exit |
@@ -941,15 +944,19 @@ static int ptrace_syscall_trace(struct pt_regs *regs, int scno, | |||
941 | 944 | ||
942 | asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno) | 945 | asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno) |
943 | { | 946 | { |
944 | int ret = ptrace_syscall_trace(regs, scno, PTRACE_SYSCALL_ENTER); | 947 | scno = ptrace_syscall_trace(regs, scno, PTRACE_SYSCALL_ENTER); |
948 | if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) | ||
949 | trace_sys_enter(regs, scno); | ||
945 | audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0, regs->ARM_r1, | 950 | audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0, regs->ARM_r1, |
946 | regs->ARM_r2, regs->ARM_r3); | 951 | regs->ARM_r2, regs->ARM_r3); |
947 | return ret; | 952 | return scno; |
948 | } | 953 | } |
949 | 954 | ||
950 | asmlinkage int syscall_trace_exit(struct pt_regs *regs, int scno) | 955 | asmlinkage int syscall_trace_exit(struct pt_regs *regs, int scno) |
951 | { | 956 | { |
952 | int ret = ptrace_syscall_trace(regs, scno, PTRACE_SYSCALL_EXIT); | 957 | scno = ptrace_syscall_trace(regs, scno, PTRACE_SYSCALL_EXIT); |
958 | if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) | ||
959 | trace_sys_exit(regs, scno); | ||
953 | audit_syscall_exit(regs); | 960 | audit_syscall_exit(regs); |
954 | return ret; | 961 | return scno; |
955 | } | 962 | } |
diff --git a/arch/arm/kernel/sched_clock.c b/arch/arm/kernel/sched_clock.c index 9b8451a4330f..e21bac20d90d 100644 --- a/arch/arm/kernel/sched_clock.c +++ b/arch/arm/kernel/sched_clock.c | |||
@@ -22,6 +22,8 @@ struct clock_data { | |||
22 | u32 epoch_cyc_copy; | 22 | u32 epoch_cyc_copy; |
23 | u32 mult; | 23 | u32 mult; |
24 | u32 shift; | 24 | u32 shift; |
25 | bool suspended; | ||
26 | bool needs_suspend; | ||
25 | }; | 27 | }; |
26 | 28 | ||
27 | static void sched_clock_poll(unsigned long wrap_ticks); | 29 | static void sched_clock_poll(unsigned long wrap_ticks); |
@@ -53,6 +55,9 @@ static unsigned long long cyc_to_sched_clock(u32 cyc, u32 mask) | |||
53 | u64 epoch_ns; | 55 | u64 epoch_ns; |
54 | u32 epoch_cyc; | 56 | u32 epoch_cyc; |
55 | 57 | ||
58 | if (cd.suspended) | ||
59 | return cd.epoch_ns; | ||
60 | |||
56 | /* | 61 | /* |
57 | * Load the epoch_cyc and epoch_ns atomically. We do this by | 62 | * Load the epoch_cyc and epoch_ns atomically. We do this by |
58 | * ensuring that we always write epoch_cyc, epoch_ns and | 63 | * ensuring that we always write epoch_cyc, epoch_ns and |
@@ -102,6 +107,13 @@ static void sched_clock_poll(unsigned long wrap_ticks) | |||
102 | update_sched_clock(); | 107 | update_sched_clock(); |
103 | } | 108 | } |
104 | 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 | |||
105 | void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate) | 117 | void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate) |
106 | { | 118 | { |
107 | unsigned long r, w; | 119 | unsigned long r, w; |
@@ -177,11 +189,23 @@ void __init sched_clock_postinit(void) | |||
177 | static int sched_clock_suspend(void) | 189 | static int sched_clock_suspend(void) |
178 | { | 190 | { |
179 | sched_clock_poll(sched_clock_timer.data); | 191 | sched_clock_poll(sched_clock_timer.data); |
192 | if (cd.needs_suspend) | ||
193 | cd.suspended = true; | ||
180 | return 0; | 194 | return 0; |
181 | } | 195 | } |
182 | 196 | ||
197 | static void sched_clock_resume(void) | ||
198 | { | ||
199 | if (cd.needs_suspend) { | ||
200 | cd.epoch_cyc = read_sched_clock(); | ||
201 | cd.epoch_cyc_copy = cd.epoch_cyc; | ||
202 | cd.suspended = false; | ||
203 | } | ||
204 | } | ||
205 | |||
183 | static struct syscore_ops sched_clock_ops = { | 206 | static struct syscore_ops sched_clock_ops = { |
184 | .suspend = sched_clock_suspend, | 207 | .suspend = sched_clock_suspend, |
208 | .resume = sched_clock_resume, | ||
185 | }; | 209 | }; |
186 | 210 | ||
187 | static int __init sched_clock_syscore_init(void) | 211 | static int __init sched_clock_syscore_init(void) |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index a81dcecc7343..0785472460a8 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -21,11 +21,9 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/kexec.h> | 22 | #include <linux/kexec.h> |
23 | #include <linux/of_fdt.h> | 23 | #include <linux/of_fdt.h> |
24 | #include <linux/root_dev.h> | ||
25 | #include <linux/cpu.h> | 24 | #include <linux/cpu.h> |
26 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
27 | #include <linux/smp.h> | 26 | #include <linux/smp.h> |
28 | #include <linux/fs.h> | ||
29 | #include <linux/proc_fs.h> | 27 | #include <linux/proc_fs.h> |
30 | #include <linux/memblock.h> | 28 | #include <linux/memblock.h> |
31 | #include <linux/bug.h> | 29 | #include <linux/bug.h> |
@@ -56,15 +54,9 @@ | |||
56 | #include <asm/unwind.h> | 54 | #include <asm/unwind.h> |
57 | #include <asm/memblock.h> | 55 | #include <asm/memblock.h> |
58 | 56 | ||
59 | #if defined(CONFIG_DEPRECATED_PARAM_STRUCT) | ||
60 | #include "compat.h" | ||
61 | #endif | ||
62 | #include "atags.h" | 57 | #include "atags.h" |
63 | #include "tcm.h" | 58 | #include "tcm.h" |
64 | 59 | ||
65 | #ifndef MEM_SIZE | ||
66 | #define MEM_SIZE (16*1024*1024) | ||
67 | #endif | ||
68 | 60 | ||
69 | #if defined(CONFIG_FPE_NWFPE) || defined(CONFIG_FPE_FASTFPE) | 61 | #if defined(CONFIG_FPE_NWFPE) || defined(CONFIG_FPE_FASTFPE) |
70 | char fpe_type[8]; | 62 | char fpe_type[8]; |
@@ -145,7 +137,6 @@ static const char *machine_name; | |||
145 | static char __initdata cmd_line[COMMAND_LINE_SIZE]; | 137 | static char __initdata cmd_line[COMMAND_LINE_SIZE]; |
146 | struct machine_desc *machine_desc __initdata; | 138 | struct machine_desc *machine_desc __initdata; |
147 | 139 | ||
148 | static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; | ||
149 | static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } }; | 140 | static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } }; |
150 | #define ENDIANNESS ((char)endian_test.l) | 141 | #define ENDIANNESS ((char)endian_test.l) |
151 | 142 | ||
@@ -583,21 +574,6 @@ static int __init early_mem(char *p) | |||
583 | } | 574 | } |
584 | early_param("mem", early_mem); | 575 | early_param("mem", early_mem); |
585 | 576 | ||
586 | static void __init | ||
587 | setup_ramdisk(int doload, int prompt, int image_start, unsigned int rd_sz) | ||
588 | { | ||
589 | #ifdef CONFIG_BLK_DEV_RAM | ||
590 | extern int rd_size, rd_image_start, rd_prompt, rd_doload; | ||
591 | |||
592 | rd_image_start = image_start; | ||
593 | rd_prompt = prompt; | ||
594 | rd_doload = doload; | ||
595 | |||
596 | if (rd_sz) | ||
597 | rd_size = rd_sz; | ||
598 | #endif | ||
599 | } | ||
600 | |||
601 | static void __init request_standard_resources(struct machine_desc *mdesc) | 577 | static void __init request_standard_resources(struct machine_desc *mdesc) |
602 | { | 578 | { |
603 | struct memblock_region *region; | 579 | struct memblock_region *region; |
@@ -643,35 +619,6 @@ static void __init request_standard_resources(struct machine_desc *mdesc) | |||
643 | request_resource(&ioport_resource, &lp2); | 619 | request_resource(&ioport_resource, &lp2); |
644 | } | 620 | } |
645 | 621 | ||
646 | /* | ||
647 | * Tag parsing. | ||
648 | * | ||
649 | * This is the new way of passing data to the kernel at boot time. Rather | ||
650 | * than passing a fixed inflexible structure to the kernel, we pass a list | ||
651 | * of variable-sized tags to the kernel. The first tag must be a ATAG_CORE | ||
652 | * tag for the list to be recognised (to distinguish the tagged list from | ||
653 | * a param_struct). The list is terminated with a zero-length tag (this tag | ||
654 | * is not parsed in any way). | ||
655 | */ | ||
656 | static int __init parse_tag_core(const struct tag *tag) | ||
657 | { | ||
658 | if (tag->hdr.size > 2) { | ||
659 | if ((tag->u.core.flags & 1) == 0) | ||
660 | root_mountflags &= ~MS_RDONLY; | ||
661 | ROOT_DEV = old_decode_dev(tag->u.core.rootdev); | ||
662 | } | ||
663 | return 0; | ||
664 | } | ||
665 | |||
666 | __tagtable(ATAG_CORE, parse_tag_core); | ||
667 | |||
668 | static int __init parse_tag_mem32(const struct tag *tag) | ||
669 | { | ||
670 | return arm_add_memory(tag->u.mem.start, tag->u.mem.size); | ||
671 | } | ||
672 | |||
673 | __tagtable(ATAG_MEM, parse_tag_mem32); | ||
674 | |||
675 | #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) | 622 | #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) |
676 | struct screen_info screen_info = { | 623 | struct screen_info screen_info = { |
677 | .orig_video_lines = 30, | 624 | .orig_video_lines = 30, |
@@ -681,117 +628,8 @@ struct screen_info screen_info = { | |||
681 | .orig_video_isVGA = 1, | 628 | .orig_video_isVGA = 1, |
682 | .orig_video_points = 8 | 629 | .orig_video_points = 8 |
683 | }; | 630 | }; |
684 | |||
685 | static int __init parse_tag_videotext(const struct tag *tag) | ||
686 | { | ||
687 | screen_info.orig_x = tag->u.videotext.x; | ||
688 | screen_info.orig_y = tag->u.videotext.y; | ||
689 | screen_info.orig_video_page = tag->u.videotext.video_page; | ||
690 | screen_info.orig_video_mode = tag->u.videotext.video_mode; | ||
691 | screen_info.orig_video_cols = tag->u.videotext.video_cols; | ||
692 | screen_info.orig_video_ega_bx = tag->u.videotext.video_ega_bx; | ||
693 | screen_info.orig_video_lines = tag->u.videotext.video_lines; | ||
694 | screen_info.orig_video_isVGA = tag->u.videotext.video_isvga; | ||
695 | screen_info.orig_video_points = tag->u.videotext.video_points; | ||
696 | return 0; | ||
697 | } | ||
698 | |||
699 | __tagtable(ATAG_VIDEOTEXT, parse_tag_videotext); | ||
700 | #endif | 631 | #endif |
701 | 632 | ||
702 | static int __init parse_tag_ramdisk(const struct tag *tag) | ||
703 | { | ||
704 | setup_ramdisk((tag->u.ramdisk.flags & 1) == 0, | ||
705 | (tag->u.ramdisk.flags & 2) == 0, | ||
706 | tag->u.ramdisk.start, tag->u.ramdisk.size); | ||
707 | return 0; | ||
708 | } | ||
709 | |||
710 | __tagtable(ATAG_RAMDISK, parse_tag_ramdisk); | ||
711 | |||
712 | static int __init parse_tag_serialnr(const struct tag *tag) | ||
713 | { | ||
714 | system_serial_low = tag->u.serialnr.low; | ||
715 | system_serial_high = tag->u.serialnr.high; | ||
716 | return 0; | ||
717 | } | ||
718 | |||
719 | __tagtable(ATAG_SERIAL, parse_tag_serialnr); | ||
720 | |||
721 | static int __init parse_tag_revision(const struct tag *tag) | ||
722 | { | ||
723 | system_rev = tag->u.revision.rev; | ||
724 | return 0; | ||
725 | } | ||
726 | |||
727 | __tagtable(ATAG_REVISION, parse_tag_revision); | ||
728 | |||
729 | static int __init parse_tag_cmdline(const struct tag *tag) | ||
730 | { | ||
731 | #if defined(CONFIG_CMDLINE_EXTEND) | ||
732 | strlcat(default_command_line, " ", COMMAND_LINE_SIZE); | ||
733 | strlcat(default_command_line, tag->u.cmdline.cmdline, | ||
734 | COMMAND_LINE_SIZE); | ||
735 | #elif defined(CONFIG_CMDLINE_FORCE) | ||
736 | pr_warning("Ignoring tag cmdline (using the default kernel command line)\n"); | ||
737 | #else | ||
738 | strlcpy(default_command_line, tag->u.cmdline.cmdline, | ||
739 | COMMAND_LINE_SIZE); | ||
740 | #endif | ||
741 | return 0; | ||
742 | } | ||
743 | |||
744 | __tagtable(ATAG_CMDLINE, parse_tag_cmdline); | ||
745 | |||
746 | /* | ||
747 | * Scan the tag table for this tag, and call its parse function. | ||
748 | * The tag table is built by the linker from all the __tagtable | ||
749 | * declarations. | ||
750 | */ | ||
751 | static int __init parse_tag(const struct tag *tag) | ||
752 | { | ||
753 | extern struct tagtable __tagtable_begin, __tagtable_end; | ||
754 | struct tagtable *t; | ||
755 | |||
756 | for (t = &__tagtable_begin; t < &__tagtable_end; t++) | ||
757 | if (tag->hdr.tag == t->tag) { | ||
758 | t->parse(tag); | ||
759 | break; | ||
760 | } | ||
761 | |||
762 | return t < &__tagtable_end; | ||
763 | } | ||
764 | |||
765 | /* | ||
766 | * Parse all tags in the list, checking both the global and architecture | ||
767 | * specific tag tables. | ||
768 | */ | ||
769 | static void __init parse_tags(const struct tag *t) | ||
770 | { | ||
771 | for (; t->hdr.size; t = tag_next(t)) | ||
772 | if (!parse_tag(t)) | ||
773 | printk(KERN_WARNING | ||
774 | "Ignoring unrecognised tag 0x%08x\n", | ||
775 | t->hdr.tag); | ||
776 | } | ||
777 | |||
778 | /* | ||
779 | * This holds our defaults. | ||
780 | */ | ||
781 | static struct init_tags { | ||
782 | struct tag_header hdr1; | ||
783 | struct tag_core core; | ||
784 | struct tag_header hdr2; | ||
785 | struct tag_mem32 mem; | ||
786 | struct tag_header hdr3; | ||
787 | } init_tags __initdata = { | ||
788 | { tag_size(tag_core), ATAG_CORE }, | ||
789 | { 1, PAGE_SIZE, 0xff }, | ||
790 | { tag_size(tag_mem32), ATAG_MEM }, | ||
791 | { MEM_SIZE }, | ||
792 | { 0, ATAG_NONE } | ||
793 | }; | ||
794 | |||
795 | static int __init customize_machine(void) | 633 | static int __init customize_machine(void) |
796 | { | 634 | { |
797 | /* customizes platform devices, or adds new ones */ | 635 | /* customizes platform devices, or adds new ones */ |
@@ -858,78 +696,6 @@ static void __init reserve_crashkernel(void) | |||
858 | static inline void reserve_crashkernel(void) {} | 696 | static inline void reserve_crashkernel(void) {} |
859 | #endif /* CONFIG_KEXEC */ | 697 | #endif /* CONFIG_KEXEC */ |
860 | 698 | ||
861 | static void __init squash_mem_tags(struct tag *tag) | ||
862 | { | ||
863 | for (; tag->hdr.size; tag = tag_next(tag)) | ||
864 | if (tag->hdr.tag == ATAG_MEM) | ||
865 | tag->hdr.tag = ATAG_NONE; | ||
866 | } | ||
867 | |||
868 | static struct machine_desc * __init setup_machine_tags(unsigned int nr) | ||
869 | { | ||
870 | struct tag *tags = (struct tag *)&init_tags; | ||
871 | struct machine_desc *mdesc = NULL, *p; | ||
872 | char *from = default_command_line; | ||
873 | |||
874 | init_tags.mem.start = PHYS_OFFSET; | ||
875 | |||
876 | /* | ||
877 | * locate machine in the list of supported machines. | ||
878 | */ | ||
879 | for_each_machine_desc(p) | ||
880 | if (nr == p->nr) { | ||
881 | printk("Machine: %s\n", p->name); | ||
882 | mdesc = p; | ||
883 | break; | ||
884 | } | ||
885 | |||
886 | if (!mdesc) { | ||
887 | early_print("\nError: unrecognized/unsupported machine ID" | ||
888 | " (r1 = 0x%08x).\n\n", nr); | ||
889 | dump_machine_table(); /* does not return */ | ||
890 | } | ||
891 | |||
892 | if (__atags_pointer) | ||
893 | tags = phys_to_virt(__atags_pointer); | ||
894 | else if (mdesc->atag_offset) | ||
895 | tags = (void *)(PAGE_OFFSET + mdesc->atag_offset); | ||
896 | |||
897 | #if defined(CONFIG_DEPRECATED_PARAM_STRUCT) | ||
898 | /* | ||
899 | * If we have the old style parameters, convert them to | ||
900 | * a tag list. | ||
901 | */ | ||
902 | if (tags->hdr.tag != ATAG_CORE) | ||
903 | convert_to_tag_list(tags); | ||
904 | #endif | ||
905 | |||
906 | if (tags->hdr.tag != ATAG_CORE) { | ||
907 | #if defined(CONFIG_OF) | ||
908 | /* | ||
909 | * If CONFIG_OF is set, then assume this is a reasonably | ||
910 | * modern system that should pass boot parameters | ||
911 | */ | ||
912 | early_print("Warning: Neither atags nor dtb found\n"); | ||
913 | #endif | ||
914 | tags = (struct tag *)&init_tags; | ||
915 | } | ||
916 | |||
917 | if (mdesc->fixup) | ||
918 | mdesc->fixup(tags, &from, &meminfo); | ||
919 | |||
920 | if (tags->hdr.tag == ATAG_CORE) { | ||
921 | if (meminfo.nr_banks != 0) | ||
922 | squash_mem_tags(tags); | ||
923 | save_atags(tags); | ||
924 | parse_tags(tags); | ||
925 | } | ||
926 | |||
927 | /* parse_early_param needs a boot_command_line */ | ||
928 | strlcpy(boot_command_line, from, COMMAND_LINE_SIZE); | ||
929 | |||
930 | return mdesc; | ||
931 | } | ||
932 | |||
933 | static int __init meminfo_cmp(const void *_a, const void *_b) | 699 | static int __init meminfo_cmp(const void *_a, const void *_b) |
934 | { | 700 | { |
935 | const struct membank *a = _a, *b = _b; | 701 | const struct membank *a = _a, *b = _b; |
@@ -944,7 +710,7 @@ void __init setup_arch(char **cmdline_p) | |||
944 | setup_processor(); | 710 | setup_processor(); |
945 | mdesc = setup_machine_fdt(__atags_pointer); | 711 | mdesc = setup_machine_fdt(__atags_pointer); |
946 | if (!mdesc) | 712 | if (!mdesc) |
947 | mdesc = setup_machine_tags(machine_arch_type); | 713 | mdesc = setup_machine_tags(__atags_pointer, machine_arch_type); |
948 | machine_desc = mdesc; | 714 | machine_desc = mdesc; |
949 | machine_name = mdesc->name; | 715 | machine_name = mdesc->name; |
950 | 716 | ||
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index fef42b21cecb..e1f906989bb8 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/clk.h> | 13 | #include <linux/clk.h> |
14 | #include <linux/cpufreq.h> | ||
15 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
16 | #include <linux/device.h> | 15 | #include <linux/device.h> |
17 | #include <linux/err.h> | 16 | #include <linux/err.h> |
@@ -96,7 +95,52 @@ static void twd_timer_stop(struct clock_event_device *clk) | |||
96 | disable_percpu_irq(clk->irq); | 95 | disable_percpu_irq(clk->irq); |
97 | } | 96 | } |
98 | 97 | ||
99 | #ifdef CONFIG_CPU_FREQ | 98 | #ifdef CONFIG_COMMON_CLK |
99 | |||
100 | /* | ||
101 | * Updates clockevent frequency when the cpu frequency changes. | ||
102 | * Called on the cpu that is changing frequency with interrupts disabled. | ||
103 | */ | ||
104 | static void twd_update_frequency(void *new_rate) | ||
105 | { | ||
106 | twd_timer_rate = *((unsigned long *) new_rate); | ||
107 | |||
108 | clockevents_update_freq(*__this_cpu_ptr(twd_evt), twd_timer_rate); | ||
109 | } | ||
110 | |||
111 | static int twd_rate_change(struct notifier_block *nb, | ||
112 | unsigned long flags, void *data) | ||
113 | { | ||
114 | struct clk_notifier_data *cnd = data; | ||
115 | |||
116 | /* | ||
117 | * The twd clock events must be reprogrammed to account for the new | ||
118 | * frequency. The timer is local to a cpu, so cross-call to the | ||
119 | * changing cpu. | ||
120 | */ | ||
121 | if (flags == POST_RATE_CHANGE) | ||
122 | smp_call_function(twd_update_frequency, | ||
123 | (void *)&cnd->new_rate, 1); | ||
124 | |||
125 | return NOTIFY_OK; | ||
126 | } | ||
127 | |||
128 | static struct notifier_block twd_clk_nb = { | ||
129 | .notifier_call = twd_rate_change, | ||
130 | }; | ||
131 | |||
132 | static int twd_clk_init(void) | ||
133 | { | ||
134 | if (twd_evt && *__this_cpu_ptr(twd_evt) && !IS_ERR(twd_clk)) | ||
135 | return clk_notifier_register(twd_clk, &twd_clk_nb); | ||
136 | |||
137 | return 0; | ||
138 | } | ||
139 | core_initcall(twd_clk_init); | ||
140 | |||
141 | #elif defined (CONFIG_CPU_FREQ) | ||
142 | |||
143 | #include <linux/cpufreq.h> | ||
100 | 144 | ||
101 | /* | 145 | /* |
102 | * Updates clockevent frequency when the cpu frequency changes. | 146 | * Updates clockevent frequency when the cpu frequency changes. |
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index 198b08456e90..26c12c6440fc 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c | |||
@@ -321,7 +321,7 @@ void store_cpu_topology(unsigned int cpuid) | |||
321 | * init_cpu_topology is called at boot when only one cpu is running | 321 | * init_cpu_topology is called at boot when only one cpu is running |
322 | * which prevent simultaneous write access to cpu_topology array | 322 | * which prevent simultaneous write access to cpu_topology array |
323 | */ | 323 | */ |
324 | void init_cpu_topology(void) | 324 | void __init init_cpu_topology(void) |
325 | { | 325 | { |
326 | unsigned int cpu; | 326 | unsigned int cpu; |
327 | 327 | ||
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index f7945218b8c6..b0179b89a04c 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -420,20 +420,23 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs) | |||
420 | #endif | 420 | #endif |
421 | instr = *(u32 *) pc; | 421 | instr = *(u32 *) pc; |
422 | } else if (thumb_mode(regs)) { | 422 | } else if (thumb_mode(regs)) { |
423 | get_user(instr, (u16 __user *)pc); | 423 | if (get_user(instr, (u16 __user *)pc)) |
424 | goto die_sig; | ||
424 | if (is_wide_instruction(instr)) { | 425 | if (is_wide_instruction(instr)) { |
425 | unsigned int instr2; | 426 | unsigned int instr2; |
426 | get_user(instr2, (u16 __user *)pc+1); | 427 | if (get_user(instr2, (u16 __user *)pc+1)) |
428 | goto die_sig; | ||
427 | instr <<= 16; | 429 | instr <<= 16; |
428 | instr |= instr2; | 430 | instr |= instr2; |
429 | } | 431 | } |
430 | } else { | 432 | } else if (get_user(instr, (u32 __user *)pc)) { |
431 | get_user(instr, (u32 __user *)pc); | 433 | goto die_sig; |
432 | } | 434 | } |
433 | 435 | ||
434 | if (call_undef_hook(regs, instr) == 0) | 436 | if (call_undef_hook(regs, instr) == 0) |
435 | return; | 437 | return; |
436 | 438 | ||
439 | die_sig: | ||
437 | #ifdef CONFIG_DEBUG_USER | 440 | #ifdef CONFIG_DEBUG_USER |
438 | if (user_debug & UDBG_UNDEFINED) { | 441 | if (user_debug & UDBG_UNDEFINED) { |
439 | printk(KERN_INFO "%s (%d): undefined instruction: pc=%p\n", | 442 | printk(KERN_INFO "%s (%d): undefined instruction: pc=%p\n", |
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 2473fd1fd51c..af72969820b4 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile | |||
@@ -16,13 +16,30 @@ lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \ | |||
16 | call_with_stack.o | 16 | call_with_stack.o |
17 | 17 | ||
18 | mmu-y := clear_user.o copy_page.o getuser.o putuser.o | 18 | mmu-y := clear_user.o copy_page.o getuser.o putuser.o |
19 | mmu-y += copy_from_user.o copy_to_user.o | 19 | |
20 | # the code in uaccess.S is not preemption safe and | ||
21 | # probably faster on ARMv3 only | ||
22 | ifeq ($(CONFIG_PREEMPT),y) | ||
23 | mmu-y += copy_from_user.o copy_to_user.o | ||
24 | else | ||
25 | ifneq ($(CONFIG_CPU_32v3),y) | ||
26 | mmu-y += copy_from_user.o copy_to_user.o | ||
27 | else | ||
28 | mmu-y += uaccess.o | ||
29 | endif | ||
30 | endif | ||
20 | 31 | ||
21 | # using lib_ here won't override already available weak symbols | 32 | # using lib_ here won't override already available weak symbols |
22 | obj-$(CONFIG_UACCESS_WITH_MEMCPY) += uaccess_with_memcpy.o | 33 | obj-$(CONFIG_UACCESS_WITH_MEMCPY) += uaccess_with_memcpy.o |
23 | 34 | ||
24 | lib-$(CONFIG_MMU) += $(mmu-y) | 35 | lib-$(CONFIG_MMU) += $(mmu-y) |
25 | lib-y += io-readsw-armv4.o io-writesw-armv4.o | 36 | |
37 | ifeq ($(CONFIG_CPU_32v3),y) | ||
38 | lib-y += io-readsw-armv3.o io-writesw-armv3.o | ||
39 | else | ||
40 | lib-y += io-readsw-armv4.o io-writesw-armv4.o | ||
41 | endif | ||
42 | |||
26 | lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o | 43 | lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o |
27 | lib-$(CONFIG_ARCH_SHARK) += io-shark.o | 44 | lib-$(CONFIG_ARCH_SHARK) += io-shark.o |
28 | 45 | ||
diff --git a/arch/arm/lib/delay.c b/arch/arm/lib/delay.c index d6dacc69254e..395d5fbb8fa2 100644 --- a/arch/arm/lib/delay.c +++ b/arch/arm/lib/delay.c | |||
@@ -59,6 +59,7 @@ void __init init_current_timer_delay(unsigned long freq) | |||
59 | { | 59 | { |
60 | pr_info("Switching to timer-based delay loop\n"); | 60 | pr_info("Switching to timer-based delay loop\n"); |
61 | lpj_fine = freq / HZ; | 61 | lpj_fine = freq / HZ; |
62 | loops_per_jiffy = lpj_fine; | ||
62 | arm_delay_ops.delay = __timer_delay; | 63 | arm_delay_ops.delay = __timer_delay; |
63 | arm_delay_ops.const_udelay = __timer_const_udelay; | 64 | arm_delay_ops.const_udelay = __timer_const_udelay; |
64 | arm_delay_ops.udelay = __timer_udelay; | 65 | arm_delay_ops.udelay = __timer_udelay; |
diff --git a/arch/arm/lib/getuser.S b/arch/arm/lib/getuser.S index 11093a7c3e32..9b06bb41fca6 100644 --- a/arch/arm/lib/getuser.S +++ b/arch/arm/lib/getuser.S | |||
@@ -16,8 +16,9 @@ | |||
16 | * __get_user_X | 16 | * __get_user_X |
17 | * | 17 | * |
18 | * Inputs: r0 contains the address | 18 | * Inputs: r0 contains the address |
19 | * r1 contains the address limit, which must be preserved | ||
19 | * Outputs: r0 is the error code | 20 | * Outputs: r0 is the error code |
20 | * r2, r3 contains the zero-extended value | 21 | * r2 contains the zero-extended value |
21 | * lr corrupted | 22 | * lr corrupted |
22 | * | 23 | * |
23 | * No other registers must be altered. (see <asm/uaccess.h> | 24 | * No other registers must be altered. (see <asm/uaccess.h> |
@@ -27,33 +28,39 @@ | |||
27 | * Note also that it is intended that __get_user_bad is not global. | 28 | * Note also that it is intended that __get_user_bad is not global. |
28 | */ | 29 | */ |
29 | #include <linux/linkage.h> | 30 | #include <linux/linkage.h> |
31 | #include <asm/assembler.h> | ||
30 | #include <asm/errno.h> | 32 | #include <asm/errno.h> |
31 | #include <asm/domain.h> | 33 | #include <asm/domain.h> |
32 | 34 | ||
33 | ENTRY(__get_user_1) | 35 | ENTRY(__get_user_1) |
36 | check_uaccess r0, 1, r1, r2, __get_user_bad | ||
34 | 1: TUSER(ldrb) r2, [r0] | 37 | 1: TUSER(ldrb) r2, [r0] |
35 | mov r0, #0 | 38 | mov r0, #0 |
36 | mov pc, lr | 39 | mov pc, lr |
37 | ENDPROC(__get_user_1) | 40 | ENDPROC(__get_user_1) |
38 | 41 | ||
39 | ENTRY(__get_user_2) | 42 | ENTRY(__get_user_2) |
40 | #ifdef CONFIG_THUMB2_KERNEL | 43 | check_uaccess r0, 2, r1, r2, __get_user_bad |
41 | 2: TUSER(ldrb) r2, [r0] | 44 | #ifdef CONFIG_CPU_USE_DOMAINS |
42 | 3: TUSER(ldrb) r3, [r0, #1] | 45 | rb .req ip |
46 | 2: ldrbt r2, [r0], #1 | ||
47 | 3: ldrbt rb, [r0], #0 | ||
43 | #else | 48 | #else |
44 | 2: TUSER(ldrb) r2, [r0], #1 | 49 | rb .req r0 |
45 | 3: TUSER(ldrb) r3, [r0] | 50 | 2: ldrb r2, [r0] |
51 | 3: ldrb rb, [r0, #1] | ||
46 | #endif | 52 | #endif |
47 | #ifndef __ARMEB__ | 53 | #ifndef __ARMEB__ |
48 | orr r2, r2, r3, lsl #8 | 54 | orr r2, r2, rb, lsl #8 |
49 | #else | 55 | #else |
50 | orr r2, r3, r2, lsl #8 | 56 | orr r2, rb, r2, lsl #8 |
51 | #endif | 57 | #endif |
52 | mov r0, #0 | 58 | mov r0, #0 |
53 | mov pc, lr | 59 | mov pc, lr |
54 | ENDPROC(__get_user_2) | 60 | ENDPROC(__get_user_2) |
55 | 61 | ||
56 | ENTRY(__get_user_4) | 62 | ENTRY(__get_user_4) |
63 | check_uaccess r0, 4, r1, r2, __get_user_bad | ||
57 | 4: TUSER(ldr) r2, [r0] | 64 | 4: TUSER(ldr) r2, [r0] |
58 | mov r0, #0 | 65 | mov r0, #0 |
59 | mov pc, lr | 66 | mov pc, lr |
diff --git a/arch/arm/lib/io-readsw-armv3.S b/arch/arm/lib/io-readsw-armv3.S new file mode 100644 index 000000000000..88487c8c4f23 --- /dev/null +++ b/arch/arm/lib/io-readsw-armv3.S | |||
@@ -0,0 +1,106 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/io-readsw-armv3.S | ||
3 | * | ||
4 | * Copyright (C) 1995-2000 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #include <linux/linkage.h> | ||
11 | #include <asm/assembler.h> | ||
12 | |||
13 | .Linsw_bad_alignment: | ||
14 | adr r0, .Linsw_bad_align_msg | ||
15 | mov r2, lr | ||
16 | b panic | ||
17 | .Linsw_bad_align_msg: | ||
18 | .asciz "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n" | ||
19 | .align | ||
20 | |||
21 | .Linsw_align: tst r1, #1 | ||
22 | bne .Linsw_bad_alignment | ||
23 | |||
24 | ldr r3, [r0] | ||
25 | strb r3, [r1], #1 | ||
26 | mov r3, r3, lsr #8 | ||
27 | strb r3, [r1], #1 | ||
28 | |||
29 | subs r2, r2, #1 | ||
30 | moveq pc, lr | ||
31 | |||
32 | ENTRY(__raw_readsw) | ||
33 | teq r2, #0 @ do we have to check for the zero len? | ||
34 | moveq pc, lr | ||
35 | tst r1, #3 | ||
36 | bne .Linsw_align | ||
37 | |||
38 | .Linsw_aligned: mov ip, #0xff | ||
39 | orr ip, ip, ip, lsl #8 | ||
40 | stmfd sp!, {r4, r5, r6, lr} | ||
41 | |||
42 | subs r2, r2, #8 | ||
43 | bmi .Lno_insw_8 | ||
44 | |||
45 | .Linsw_8_lp: ldr r3, [r0] | ||
46 | and r3, r3, ip | ||
47 | ldr r4, [r0] | ||
48 | orr r3, r3, r4, lsl #16 | ||
49 | |||
50 | ldr r4, [r0] | ||
51 | and r4, r4, ip | ||
52 | ldr r5, [r0] | ||
53 | orr r4, r4, r5, lsl #16 | ||
54 | |||
55 | ldr r5, [r0] | ||
56 | and r5, r5, ip | ||
57 | ldr r6, [r0] | ||
58 | orr r5, r5, r6, lsl #16 | ||
59 | |||
60 | ldr r6, [r0] | ||
61 | and r6, r6, ip | ||
62 | ldr lr, [r0] | ||
63 | orr r6, r6, lr, lsl #16 | ||
64 | |||
65 | stmia r1!, {r3 - r6} | ||
66 | |||
67 | subs r2, r2, #8 | ||
68 | bpl .Linsw_8_lp | ||
69 | |||
70 | tst r2, #7 | ||
71 | ldmeqfd sp!, {r4, r5, r6, pc} | ||
72 | |||
73 | .Lno_insw_8: tst r2, #4 | ||
74 | beq .Lno_insw_4 | ||
75 | |||
76 | ldr r3, [r0] | ||
77 | and r3, r3, ip | ||
78 | ldr r4, [r0] | ||
79 | orr r3, r3, r4, lsl #16 | ||
80 | |||
81 | ldr r4, [r0] | ||
82 | and r4, r4, ip | ||
83 | ldr r5, [r0] | ||
84 | orr r4, r4, r5, lsl #16 | ||
85 | |||
86 | stmia r1!, {r3, r4} | ||
87 | |||
88 | .Lno_insw_4: tst r2, #2 | ||
89 | beq .Lno_insw_2 | ||
90 | |||
91 | ldr r3, [r0] | ||
92 | and r3, r3, ip | ||
93 | ldr r4, [r0] | ||
94 | orr r3, r3, r4, lsl #16 | ||
95 | |||
96 | str r3, [r1], #4 | ||
97 | |||
98 | .Lno_insw_2: tst r2, #1 | ||
99 | ldrne r3, [r0] | ||
100 | strneb r3, [r1], #1 | ||
101 | movne r3, r3, lsr #8 | ||
102 | strneb r3, [r1] | ||
103 | |||
104 | ldmfd sp!, {r4, r5, r6, pc} | ||
105 | |||
106 | |||
diff --git a/arch/arm/lib/io-writesw-armv3.S b/arch/arm/lib/io-writesw-armv3.S new file mode 100644 index 000000000000..49b800419e32 --- /dev/null +++ b/arch/arm/lib/io-writesw-armv3.S | |||
@@ -0,0 +1,126 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/io-writesw-armv3.S | ||
3 | * | ||
4 | * Copyright (C) 1995-2000 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #include <linux/linkage.h> | ||
11 | #include <asm/assembler.h> | ||
12 | |||
13 | .Loutsw_bad_alignment: | ||
14 | adr r0, .Loutsw_bad_align_msg | ||
15 | mov r2, lr | ||
16 | b panic | ||
17 | .Loutsw_bad_align_msg: | ||
18 | .asciz "outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n" | ||
19 | .align | ||
20 | |||
21 | .Loutsw_align: tst r1, #1 | ||
22 | bne .Loutsw_bad_alignment | ||
23 | |||
24 | add r1, r1, #2 | ||
25 | |||
26 | ldr r3, [r1, #-4] | ||
27 | mov r3, r3, lsr #16 | ||
28 | orr r3, r3, r3, lsl #16 | ||
29 | str r3, [r0] | ||
30 | subs r2, r2, #1 | ||
31 | moveq pc, lr | ||
32 | |||
33 | ENTRY(__raw_writesw) | ||
34 | teq r2, #0 @ do we have to check for the zero len? | ||
35 | moveq pc, lr | ||
36 | tst r1, #3 | ||
37 | bne .Loutsw_align | ||
38 | |||
39 | stmfd sp!, {r4, r5, r6, lr} | ||
40 | |||
41 | subs r2, r2, #8 | ||
42 | bmi .Lno_outsw_8 | ||
43 | |||
44 | .Loutsw_8_lp: ldmia r1!, {r3, r4, r5, r6} | ||
45 | |||
46 | mov ip, r3, lsl #16 | ||
47 | orr ip, ip, ip, lsr #16 | ||
48 | str ip, [r0] | ||
49 | |||
50 | mov ip, r3, lsr #16 | ||
51 | orr ip, ip, ip, lsl #16 | ||
52 | str ip, [r0] | ||
53 | |||
54 | mov ip, r4, lsl #16 | ||
55 | orr ip, ip, ip, lsr #16 | ||
56 | str ip, [r0] | ||
57 | |||
58 | mov ip, r4, lsr #16 | ||
59 | orr ip, ip, ip, lsl #16 | ||
60 | str ip, [r0] | ||
61 | |||
62 | mov ip, r5, lsl #16 | ||
63 | orr ip, ip, ip, lsr #16 | ||
64 | str ip, [r0] | ||
65 | |||
66 | mov ip, r5, lsr #16 | ||
67 | orr ip, ip, ip, lsl #16 | ||
68 | str ip, [r0] | ||
69 | |||
70 | mov ip, r6, lsl #16 | ||
71 | orr ip, ip, ip, lsr #16 | ||
72 | str ip, [r0] | ||
73 | |||
74 | mov ip, r6, lsr #16 | ||
75 | orr ip, ip, ip, lsl #16 | ||
76 | str ip, [r0] | ||
77 | |||
78 | subs r2, r2, #8 | ||
79 | bpl .Loutsw_8_lp | ||
80 | |||
81 | tst r2, #7 | ||
82 | ldmeqfd sp!, {r4, r5, r6, pc} | ||
83 | |||
84 | .Lno_outsw_8: tst r2, #4 | ||
85 | beq .Lno_outsw_4 | ||
86 | |||
87 | ldmia r1!, {r3, r4} | ||
88 | |||
89 | mov ip, r3, lsl #16 | ||
90 | orr ip, ip, ip, lsr #16 | ||
91 | str ip, [r0] | ||
92 | |||
93 | mov ip, r3, lsr #16 | ||
94 | orr ip, ip, ip, lsl #16 | ||
95 | str ip, [r0] | ||
96 | |||
97 | mov ip, r4, lsl #16 | ||
98 | orr ip, ip, ip, lsr #16 | ||
99 | str ip, [r0] | ||
100 | |||
101 | mov ip, r4, lsr #16 | ||
102 | orr ip, ip, ip, lsl #16 | ||
103 | str ip, [r0] | ||
104 | |||
105 | .Lno_outsw_4: tst r2, #2 | ||
106 | beq .Lno_outsw_2 | ||
107 | |||
108 | ldr r3, [r1], #4 | ||
109 | |||
110 | mov ip, r3, lsl #16 | ||
111 | orr ip, ip, ip, lsr #16 | ||
112 | str ip, [r0] | ||
113 | |||
114 | mov ip, r3, lsr #16 | ||
115 | orr ip, ip, ip, lsl #16 | ||
116 | str ip, [r0] | ||
117 | |||
118 | .Lno_outsw_2: tst r2, #1 | ||
119 | |||
120 | ldrne r3, [r1] | ||
121 | |||
122 | movne ip, r3, lsl #16 | ||
123 | orrne ip, ip, ip, lsr #16 | ||
124 | strne ip, [r0] | ||
125 | |||
126 | ldmfd sp!, {r4, r5, r6, pc} | ||
diff --git a/arch/arm/lib/putuser.S b/arch/arm/lib/putuser.S index 7db25990c589..3d73dcb959b0 100644 --- a/arch/arm/lib/putuser.S +++ b/arch/arm/lib/putuser.S | |||
@@ -16,6 +16,7 @@ | |||
16 | * __put_user_X | 16 | * __put_user_X |
17 | * | 17 | * |
18 | * Inputs: r0 contains the address | 18 | * Inputs: r0 contains the address |
19 | * r1 contains the address limit, which must be preserved | ||
19 | * r2, r3 contains the value | 20 | * r2, r3 contains the value |
20 | * Outputs: r0 is the error code | 21 | * Outputs: r0 is the error code |
21 | * lr corrupted | 22 | * lr corrupted |
@@ -27,16 +28,19 @@ | |||
27 | * Note also that it is intended that __put_user_bad is not global. | 28 | * Note also that it is intended that __put_user_bad is not global. |
28 | */ | 29 | */ |
29 | #include <linux/linkage.h> | 30 | #include <linux/linkage.h> |
31 | #include <asm/assembler.h> | ||
30 | #include <asm/errno.h> | 32 | #include <asm/errno.h> |
31 | #include <asm/domain.h> | 33 | #include <asm/domain.h> |
32 | 34 | ||
33 | ENTRY(__put_user_1) | 35 | ENTRY(__put_user_1) |
36 | check_uaccess r0, 1, r1, ip, __put_user_bad | ||
34 | 1: TUSER(strb) r2, [r0] | 37 | 1: TUSER(strb) r2, [r0] |
35 | mov r0, #0 | 38 | mov r0, #0 |
36 | mov pc, lr | 39 | mov pc, lr |
37 | ENDPROC(__put_user_1) | 40 | ENDPROC(__put_user_1) |
38 | 41 | ||
39 | ENTRY(__put_user_2) | 42 | ENTRY(__put_user_2) |
43 | check_uaccess r0, 2, r1, ip, __put_user_bad | ||
40 | mov ip, r2, lsr #8 | 44 | mov ip, r2, lsr #8 |
41 | #ifdef CONFIG_THUMB2_KERNEL | 45 | #ifdef CONFIG_THUMB2_KERNEL |
42 | #ifndef __ARMEB__ | 46 | #ifndef __ARMEB__ |
@@ -60,12 +64,14 @@ ENTRY(__put_user_2) | |||
60 | ENDPROC(__put_user_2) | 64 | ENDPROC(__put_user_2) |
61 | 65 | ||
62 | ENTRY(__put_user_4) | 66 | ENTRY(__put_user_4) |
67 | check_uaccess r0, 4, r1, ip, __put_user_bad | ||
63 | 4: TUSER(str) r2, [r0] | 68 | 4: TUSER(str) r2, [r0] |
64 | mov r0, #0 | 69 | mov r0, #0 |
65 | mov pc, lr | 70 | mov pc, lr |
66 | ENDPROC(__put_user_4) | 71 | ENDPROC(__put_user_4) |
67 | 72 | ||
68 | ENTRY(__put_user_8) | 73 | ENTRY(__put_user_8) |
74 | check_uaccess r0, 8, r1, ip, __put_user_bad | ||
69 | #ifdef CONFIG_THUMB2_KERNEL | 75 | #ifdef CONFIG_THUMB2_KERNEL |
70 | 5: TUSER(str) r2, [r0] | 76 | 5: TUSER(str) r2, [r0] |
71 | 6: TUSER(str) r3, [r0, #4] | 77 | 6: TUSER(str) r3, [r0, #4] |
diff --git a/arch/arm/lib/uaccess.S b/arch/arm/lib/uaccess.S new file mode 100644 index 000000000000..5c908b1cb8ed --- /dev/null +++ b/arch/arm/lib/uaccess.S | |||
@@ -0,0 +1,564 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/uaccess.S | ||
3 | * | ||
4 | * Copyright (C) 1995, 1996,1997,1998 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Routines to block copy data to/from user memory | ||
11 | * These are highly optimised both for the 4k page size | ||
12 | * and for various alignments. | ||
13 | */ | ||
14 | #include <linux/linkage.h> | ||
15 | #include <asm/assembler.h> | ||
16 | #include <asm/errno.h> | ||
17 | #include <asm/domain.h> | ||
18 | |||
19 | .text | ||
20 | |||
21 | #define PAGE_SHIFT 12 | ||
22 | |||
23 | /* Prototype: int __copy_to_user(void *to, const char *from, size_t n) | ||
24 | * Purpose : copy a block to user memory from kernel memory | ||
25 | * Params : to - user memory | ||
26 | * : from - kernel memory | ||
27 | * : n - number of bytes to copy | ||
28 | * Returns : Number of bytes NOT copied. | ||
29 | */ | ||
30 | |||
31 | .Lc2u_dest_not_aligned: | ||
32 | rsb ip, ip, #4 | ||
33 | cmp ip, #2 | ||
34 | ldrb r3, [r1], #1 | ||
35 | USER( TUSER( strb) r3, [r0], #1) @ May fault | ||
36 | ldrgeb r3, [r1], #1 | ||
37 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault | ||
38 | ldrgtb r3, [r1], #1 | ||
39 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault | ||
40 | sub r2, r2, ip | ||
41 | b .Lc2u_dest_aligned | ||
42 | |||
43 | ENTRY(__copy_to_user) | ||
44 | stmfd sp!, {r2, r4 - r7, lr} | ||
45 | cmp r2, #4 | ||
46 | blt .Lc2u_not_enough | ||
47 | ands ip, r0, #3 | ||
48 | bne .Lc2u_dest_not_aligned | ||
49 | .Lc2u_dest_aligned: | ||
50 | |||
51 | ands ip, r1, #3 | ||
52 | bne .Lc2u_src_not_aligned | ||
53 | /* | ||
54 | * Seeing as there has to be at least 8 bytes to copy, we can | ||
55 | * copy one word, and force a user-mode page fault... | ||
56 | */ | ||
57 | |||
58 | .Lc2u_0fupi: subs r2, r2, #4 | ||
59 | addmi ip, r2, #4 | ||
60 | bmi .Lc2u_0nowords | ||
61 | ldr r3, [r1], #4 | ||
62 | USER( TUSER( str) r3, [r0], #4) @ May fault | ||
63 | mov ip, r0, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction | ||
64 | rsb ip, ip, #0 | ||
65 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
66 | beq .Lc2u_0fupi | ||
67 | /* | ||
68 | * ip = max no. of bytes to copy before needing another "strt" insn | ||
69 | */ | ||
70 | cmp r2, ip | ||
71 | movlt ip, r2 | ||
72 | sub r2, r2, ip | ||
73 | subs ip, ip, #32 | ||
74 | blt .Lc2u_0rem8lp | ||
75 | |||
76 | .Lc2u_0cpy8lp: ldmia r1!, {r3 - r6} | ||
77 | stmia r0!, {r3 - r6} @ Shouldnt fault | ||
78 | ldmia r1!, {r3 - r6} | ||
79 | subs ip, ip, #32 | ||
80 | stmia r0!, {r3 - r6} @ Shouldnt fault | ||
81 | bpl .Lc2u_0cpy8lp | ||
82 | |||
83 | .Lc2u_0rem8lp: cmn ip, #16 | ||
84 | ldmgeia r1!, {r3 - r6} | ||
85 | stmgeia r0!, {r3 - r6} @ Shouldnt fault | ||
86 | tst ip, #8 | ||
87 | ldmneia r1!, {r3 - r4} | ||
88 | stmneia r0!, {r3 - r4} @ Shouldnt fault | ||
89 | tst ip, #4 | ||
90 | ldrne r3, [r1], #4 | ||
91 | TUSER( strne) r3, [r0], #4 @ Shouldnt fault | ||
92 | ands ip, ip, #3 | ||
93 | beq .Lc2u_0fupi | ||
94 | .Lc2u_0nowords: teq ip, #0 | ||
95 | beq .Lc2u_finished | ||
96 | .Lc2u_nowords: cmp ip, #2 | ||
97 | ldrb r3, [r1], #1 | ||
98 | USER( TUSER( strb) r3, [r0], #1) @ May fault | ||
99 | ldrgeb r3, [r1], #1 | ||
100 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault | ||
101 | ldrgtb r3, [r1], #1 | ||
102 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault | ||
103 | b .Lc2u_finished | ||
104 | |||
105 | .Lc2u_not_enough: | ||
106 | movs ip, r2 | ||
107 | bne .Lc2u_nowords | ||
108 | .Lc2u_finished: mov r0, #0 | ||
109 | ldmfd sp!, {r2, r4 - r7, pc} | ||
110 | |||
111 | .Lc2u_src_not_aligned: | ||
112 | bic r1, r1, #3 | ||
113 | ldr r7, [r1], #4 | ||
114 | cmp ip, #2 | ||
115 | bgt .Lc2u_3fupi | ||
116 | beq .Lc2u_2fupi | ||
117 | .Lc2u_1fupi: subs r2, r2, #4 | ||
118 | addmi ip, r2, #4 | ||
119 | bmi .Lc2u_1nowords | ||
120 | mov r3, r7, pull #8 | ||
121 | ldr r7, [r1], #4 | ||
122 | orr r3, r3, r7, push #24 | ||
123 | USER( TUSER( str) r3, [r0], #4) @ May fault | ||
124 | mov ip, r0, lsl #32 - PAGE_SHIFT | ||
125 | rsb ip, ip, #0 | ||
126 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
127 | beq .Lc2u_1fupi | ||
128 | cmp r2, ip | ||
129 | movlt ip, r2 | ||
130 | sub r2, r2, ip | ||
131 | subs ip, ip, #16 | ||
132 | blt .Lc2u_1rem8lp | ||
133 | |||
134 | .Lc2u_1cpy8lp: mov r3, r7, pull #8 | ||
135 | ldmia r1!, {r4 - r7} | ||
136 | subs ip, ip, #16 | ||
137 | orr r3, r3, r4, push #24 | ||
138 | mov r4, r4, pull #8 | ||
139 | orr r4, r4, r5, push #24 | ||
140 | mov r5, r5, pull #8 | ||
141 | orr r5, r5, r6, push #24 | ||
142 | mov r6, r6, pull #8 | ||
143 | orr r6, r6, r7, push #24 | ||
144 | stmia r0!, {r3 - r6} @ Shouldnt fault | ||
145 | bpl .Lc2u_1cpy8lp | ||
146 | |||
147 | .Lc2u_1rem8lp: tst ip, #8 | ||
148 | movne r3, r7, pull #8 | ||
149 | ldmneia r1!, {r4, r7} | ||
150 | orrne r3, r3, r4, push #24 | ||
151 | movne r4, r4, pull #8 | ||
152 | orrne r4, r4, r7, push #24 | ||
153 | stmneia r0!, {r3 - r4} @ Shouldnt fault | ||
154 | tst ip, #4 | ||
155 | movne r3, r7, pull #8 | ||
156 | ldrne r7, [r1], #4 | ||
157 | orrne r3, r3, r7, push #24 | ||
158 | TUSER( strne) r3, [r0], #4 @ Shouldnt fault | ||
159 | ands ip, ip, #3 | ||
160 | beq .Lc2u_1fupi | ||
161 | .Lc2u_1nowords: mov r3, r7, get_byte_1 | ||
162 | teq ip, #0 | ||
163 | beq .Lc2u_finished | ||
164 | cmp ip, #2 | ||
165 | USER( TUSER( strb) r3, [r0], #1) @ May fault | ||
166 | movge r3, r7, get_byte_2 | ||
167 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault | ||
168 | movgt r3, r7, get_byte_3 | ||
169 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault | ||
170 | b .Lc2u_finished | ||
171 | |||
172 | .Lc2u_2fupi: subs r2, r2, #4 | ||
173 | addmi ip, r2, #4 | ||
174 | bmi .Lc2u_2nowords | ||
175 | mov r3, r7, pull #16 | ||
176 | ldr r7, [r1], #4 | ||
177 | orr r3, r3, r7, push #16 | ||
178 | USER( TUSER( str) r3, [r0], #4) @ May fault | ||
179 | mov ip, r0, lsl #32 - PAGE_SHIFT | ||
180 | rsb ip, ip, #0 | ||
181 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
182 | beq .Lc2u_2fupi | ||
183 | cmp r2, ip | ||
184 | movlt ip, r2 | ||
185 | sub r2, r2, ip | ||
186 | subs ip, ip, #16 | ||
187 | blt .Lc2u_2rem8lp | ||
188 | |||
189 | .Lc2u_2cpy8lp: mov r3, r7, pull #16 | ||
190 | ldmia r1!, {r4 - r7} | ||
191 | subs ip, ip, #16 | ||
192 | orr r3, r3, r4, push #16 | ||
193 | mov r4, r4, pull #16 | ||
194 | orr r4, r4, r5, push #16 | ||
195 | mov r5, r5, pull #16 | ||
196 | orr r5, r5, r6, push #16 | ||
197 | mov r6, r6, pull #16 | ||
198 | orr r6, r6, r7, push #16 | ||
199 | stmia r0!, {r3 - r6} @ Shouldnt fault | ||
200 | bpl .Lc2u_2cpy8lp | ||
201 | |||
202 | .Lc2u_2rem8lp: tst ip, #8 | ||
203 | movne r3, r7, pull #16 | ||
204 | ldmneia r1!, {r4, r7} | ||
205 | orrne r3, r3, r4, push #16 | ||
206 | movne r4, r4, pull #16 | ||
207 | orrne r4, r4, r7, push #16 | ||
208 | stmneia r0!, {r3 - r4} @ Shouldnt fault | ||
209 | tst ip, #4 | ||
210 | movne r3, r7, pull #16 | ||
211 | ldrne r7, [r1], #4 | ||
212 | orrne r3, r3, r7, push #16 | ||
213 | TUSER( strne) r3, [r0], #4 @ Shouldnt fault | ||
214 | ands ip, ip, #3 | ||
215 | beq .Lc2u_2fupi | ||
216 | .Lc2u_2nowords: mov r3, r7, get_byte_2 | ||
217 | teq ip, #0 | ||
218 | beq .Lc2u_finished | ||
219 | cmp ip, #2 | ||
220 | USER( TUSER( strb) r3, [r0], #1) @ May fault | ||
221 | movge r3, r7, get_byte_3 | ||
222 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault | ||
223 | ldrgtb r3, [r1], #0 | ||
224 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault | ||
225 | b .Lc2u_finished | ||
226 | |||
227 | .Lc2u_3fupi: subs r2, r2, #4 | ||
228 | addmi ip, r2, #4 | ||
229 | bmi .Lc2u_3nowords | ||
230 | mov r3, r7, pull #24 | ||
231 | ldr r7, [r1], #4 | ||
232 | orr r3, r3, r7, push #8 | ||
233 | USER( TUSER( str) r3, [r0], #4) @ May fault | ||
234 | mov ip, r0, lsl #32 - PAGE_SHIFT | ||
235 | rsb ip, ip, #0 | ||
236 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
237 | beq .Lc2u_3fupi | ||
238 | cmp r2, ip | ||
239 | movlt ip, r2 | ||
240 | sub r2, r2, ip | ||
241 | subs ip, ip, #16 | ||
242 | blt .Lc2u_3rem8lp | ||
243 | |||
244 | .Lc2u_3cpy8lp: mov r3, r7, pull #24 | ||
245 | ldmia r1!, {r4 - r7} | ||
246 | subs ip, ip, #16 | ||
247 | orr r3, r3, r4, push #8 | ||
248 | mov r4, r4, pull #24 | ||
249 | orr r4, r4, r5, push #8 | ||
250 | mov r5, r5, pull #24 | ||
251 | orr r5, r5, r6, push #8 | ||
252 | mov r6, r6, pull #24 | ||
253 | orr r6, r6, r7, push #8 | ||
254 | stmia r0!, {r3 - r6} @ Shouldnt fault | ||
255 | bpl .Lc2u_3cpy8lp | ||
256 | |||
257 | .Lc2u_3rem8lp: tst ip, #8 | ||
258 | movne r3, r7, pull #24 | ||
259 | ldmneia r1!, {r4, r7} | ||
260 | orrne r3, r3, r4, push #8 | ||
261 | movne r4, r4, pull #24 | ||
262 | orrne r4, r4, r7, push #8 | ||
263 | stmneia r0!, {r3 - r4} @ Shouldnt fault | ||
264 | tst ip, #4 | ||
265 | movne r3, r7, pull #24 | ||
266 | ldrne r7, [r1], #4 | ||
267 | orrne r3, r3, r7, push #8 | ||
268 | TUSER( strne) r3, [r0], #4 @ Shouldnt fault | ||
269 | ands ip, ip, #3 | ||
270 | beq .Lc2u_3fupi | ||
271 | .Lc2u_3nowords: mov r3, r7, get_byte_3 | ||
272 | teq ip, #0 | ||
273 | beq .Lc2u_finished | ||
274 | cmp ip, #2 | ||
275 | USER( TUSER( strb) r3, [r0], #1) @ May fault | ||
276 | ldrgeb r3, [r1], #1 | ||
277 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault | ||
278 | ldrgtb r3, [r1], #0 | ||
279 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault | ||
280 | b .Lc2u_finished | ||
281 | ENDPROC(__copy_to_user) | ||
282 | |||
283 | .pushsection .fixup,"ax" | ||
284 | .align 0 | ||
285 | 9001: ldmfd sp!, {r0, r4 - r7, pc} | ||
286 | .popsection | ||
287 | |||
288 | /* Prototype: unsigned long __copy_from_user(void *to,const void *from,unsigned long n); | ||
289 | * Purpose : copy a block from user memory to kernel memory | ||
290 | * Params : to - kernel memory | ||
291 | * : from - user memory | ||
292 | * : n - number of bytes to copy | ||
293 | * Returns : Number of bytes NOT copied. | ||
294 | */ | ||
295 | .Lcfu_dest_not_aligned: | ||
296 | rsb ip, ip, #4 | ||
297 | cmp ip, #2 | ||
298 | USER( TUSER( ldrb) r3, [r1], #1) @ May fault | ||
299 | strb r3, [r0], #1 | ||
300 | USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault | ||
301 | strgeb r3, [r0], #1 | ||
302 | USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault | ||
303 | strgtb r3, [r0], #1 | ||
304 | sub r2, r2, ip | ||
305 | b .Lcfu_dest_aligned | ||
306 | |||
307 | ENTRY(__copy_from_user) | ||
308 | stmfd sp!, {r0, r2, r4 - r7, lr} | ||
309 | cmp r2, #4 | ||
310 | blt .Lcfu_not_enough | ||
311 | ands ip, r0, #3 | ||
312 | bne .Lcfu_dest_not_aligned | ||
313 | .Lcfu_dest_aligned: | ||
314 | ands ip, r1, #3 | ||
315 | bne .Lcfu_src_not_aligned | ||
316 | |||
317 | /* | ||
318 | * Seeing as there has to be at least 8 bytes to copy, we can | ||
319 | * copy one word, and force a user-mode page fault... | ||
320 | */ | ||
321 | |||
322 | .Lcfu_0fupi: subs r2, r2, #4 | ||
323 | addmi ip, r2, #4 | ||
324 | bmi .Lcfu_0nowords | ||
325 | USER( TUSER( ldr) r3, [r1], #4) | ||
326 | str r3, [r0], #4 | ||
327 | mov ip, r1, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction | ||
328 | rsb ip, ip, #0 | ||
329 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
330 | beq .Lcfu_0fupi | ||
331 | /* | ||
332 | * ip = max no. of bytes to copy before needing another "strt" insn | ||
333 | */ | ||
334 | cmp r2, ip | ||
335 | movlt ip, r2 | ||
336 | sub r2, r2, ip | ||
337 | subs ip, ip, #32 | ||
338 | blt .Lcfu_0rem8lp | ||
339 | |||
340 | .Lcfu_0cpy8lp: ldmia r1!, {r3 - r6} @ Shouldnt fault | ||
341 | stmia r0!, {r3 - r6} | ||
342 | ldmia r1!, {r3 - r6} @ Shouldnt fault | ||
343 | subs ip, ip, #32 | ||
344 | stmia r0!, {r3 - r6} | ||
345 | bpl .Lcfu_0cpy8lp | ||
346 | |||
347 | .Lcfu_0rem8lp: cmn ip, #16 | ||
348 | ldmgeia r1!, {r3 - r6} @ Shouldnt fault | ||
349 | stmgeia r0!, {r3 - r6} | ||
350 | tst ip, #8 | ||
351 | ldmneia r1!, {r3 - r4} @ Shouldnt fault | ||
352 | stmneia r0!, {r3 - r4} | ||
353 | tst ip, #4 | ||
354 | TUSER( ldrne) r3, [r1], #4 @ Shouldnt fault | ||
355 | strne r3, [r0], #4 | ||
356 | ands ip, ip, #3 | ||
357 | beq .Lcfu_0fupi | ||
358 | .Lcfu_0nowords: teq ip, #0 | ||
359 | beq .Lcfu_finished | ||
360 | .Lcfu_nowords: cmp ip, #2 | ||
361 | USER( TUSER( ldrb) r3, [r1], #1) @ May fault | ||
362 | strb r3, [r0], #1 | ||
363 | USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault | ||
364 | strgeb r3, [r0], #1 | ||
365 | USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault | ||
366 | strgtb r3, [r0], #1 | ||
367 | b .Lcfu_finished | ||
368 | |||
369 | .Lcfu_not_enough: | ||
370 | movs ip, r2 | ||
371 | bne .Lcfu_nowords | ||
372 | .Lcfu_finished: mov r0, #0 | ||
373 | add sp, sp, #8 | ||
374 | ldmfd sp!, {r4 - r7, pc} | ||
375 | |||
376 | .Lcfu_src_not_aligned: | ||
377 | bic r1, r1, #3 | ||
378 | USER( TUSER( ldr) r7, [r1], #4) @ May fault | ||
379 | cmp ip, #2 | ||
380 | bgt .Lcfu_3fupi | ||
381 | beq .Lcfu_2fupi | ||
382 | .Lcfu_1fupi: subs r2, r2, #4 | ||
383 | addmi ip, r2, #4 | ||
384 | bmi .Lcfu_1nowords | ||
385 | mov r3, r7, pull #8 | ||
386 | USER( TUSER( ldr) r7, [r1], #4) @ May fault | ||
387 | orr r3, r3, r7, push #24 | ||
388 | str r3, [r0], #4 | ||
389 | mov ip, r1, lsl #32 - PAGE_SHIFT | ||
390 | rsb ip, ip, #0 | ||
391 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
392 | beq .Lcfu_1fupi | ||
393 | cmp r2, ip | ||
394 | movlt ip, r2 | ||
395 | sub r2, r2, ip | ||
396 | subs ip, ip, #16 | ||
397 | blt .Lcfu_1rem8lp | ||
398 | |||
399 | .Lcfu_1cpy8lp: mov r3, r7, pull #8 | ||
400 | ldmia r1!, {r4 - r7} @ Shouldnt fault | ||
401 | subs ip, ip, #16 | ||
402 | orr r3, r3, r4, push #24 | ||
403 | mov r4, r4, pull #8 | ||
404 | orr r4, r4, r5, push #24 | ||
405 | mov r5, r5, pull #8 | ||
406 | orr r5, r5, r6, push #24 | ||
407 | mov r6, r6, pull #8 | ||
408 | orr r6, r6, r7, push #24 | ||
409 | stmia r0!, {r3 - r6} | ||
410 | bpl .Lcfu_1cpy8lp | ||
411 | |||
412 | .Lcfu_1rem8lp: tst ip, #8 | ||
413 | movne r3, r7, pull #8 | ||
414 | ldmneia r1!, {r4, r7} @ Shouldnt fault | ||
415 | orrne r3, r3, r4, push #24 | ||
416 | movne r4, r4, pull #8 | ||
417 | orrne r4, r4, r7, push #24 | ||
418 | stmneia r0!, {r3 - r4} | ||
419 | tst ip, #4 | ||
420 | movne r3, r7, pull #8 | ||
421 | USER( TUSER( ldrne) r7, [r1], #4) @ May fault | ||
422 | orrne r3, r3, r7, push #24 | ||
423 | strne r3, [r0], #4 | ||
424 | ands ip, ip, #3 | ||
425 | beq .Lcfu_1fupi | ||
426 | .Lcfu_1nowords: mov r3, r7, get_byte_1 | ||
427 | teq ip, #0 | ||
428 | beq .Lcfu_finished | ||
429 | cmp ip, #2 | ||
430 | strb r3, [r0], #1 | ||
431 | movge r3, r7, get_byte_2 | ||
432 | strgeb r3, [r0], #1 | ||
433 | movgt r3, r7, get_byte_3 | ||
434 | strgtb r3, [r0], #1 | ||
435 | b .Lcfu_finished | ||
436 | |||
437 | .Lcfu_2fupi: subs r2, r2, #4 | ||
438 | addmi ip, r2, #4 | ||
439 | bmi .Lcfu_2nowords | ||
440 | mov r3, r7, pull #16 | ||
441 | USER( TUSER( ldr) r7, [r1], #4) @ May fault | ||
442 | orr r3, r3, r7, push #16 | ||
443 | str r3, [r0], #4 | ||
444 | mov ip, r1, lsl #32 - PAGE_SHIFT | ||
445 | rsb ip, ip, #0 | ||
446 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
447 | beq .Lcfu_2fupi | ||
448 | cmp r2, ip | ||
449 | movlt ip, r2 | ||
450 | sub r2, r2, ip | ||
451 | subs ip, ip, #16 | ||
452 | blt .Lcfu_2rem8lp | ||
453 | |||
454 | |||
455 | .Lcfu_2cpy8lp: mov r3, r7, pull #16 | ||
456 | ldmia r1!, {r4 - r7} @ Shouldnt fault | ||
457 | subs ip, ip, #16 | ||
458 | orr r3, r3, r4, push #16 | ||
459 | mov r4, r4, pull #16 | ||
460 | orr r4, r4, r5, push #16 | ||
461 | mov r5, r5, pull #16 | ||
462 | orr r5, r5, r6, push #16 | ||
463 | mov r6, r6, pull #16 | ||
464 | orr r6, r6, r7, push #16 | ||
465 | stmia r0!, {r3 - r6} | ||
466 | bpl .Lcfu_2cpy8lp | ||
467 | |||
468 | .Lcfu_2rem8lp: tst ip, #8 | ||
469 | movne r3, r7, pull #16 | ||
470 | ldmneia r1!, {r4, r7} @ Shouldnt fault | ||
471 | orrne r3, r3, r4, push #16 | ||
472 | movne r4, r4, pull #16 | ||
473 | orrne r4, r4, r7, push #16 | ||
474 | stmneia r0!, {r3 - r4} | ||
475 | tst ip, #4 | ||
476 | movne r3, r7, pull #16 | ||
477 | USER( TUSER( ldrne) r7, [r1], #4) @ May fault | ||
478 | orrne r3, r3, r7, push #16 | ||
479 | strne r3, [r0], #4 | ||
480 | ands ip, ip, #3 | ||
481 | beq .Lcfu_2fupi | ||
482 | .Lcfu_2nowords: mov r3, r7, get_byte_2 | ||
483 | teq ip, #0 | ||
484 | beq .Lcfu_finished | ||
485 | cmp ip, #2 | ||
486 | strb r3, [r0], #1 | ||
487 | movge r3, r7, get_byte_3 | ||
488 | strgeb r3, [r0], #1 | ||
489 | USER( TUSER( ldrgtb) r3, [r1], #0) @ May fault | ||
490 | strgtb r3, [r0], #1 | ||
491 | b .Lcfu_finished | ||
492 | |||
493 | .Lcfu_3fupi: subs r2, r2, #4 | ||
494 | addmi ip, r2, #4 | ||
495 | bmi .Lcfu_3nowords | ||
496 | mov r3, r7, pull #24 | ||
497 | USER( TUSER( ldr) r7, [r1], #4) @ May fault | ||
498 | orr r3, r3, r7, push #8 | ||
499 | str r3, [r0], #4 | ||
500 | mov ip, r1, lsl #32 - PAGE_SHIFT | ||
501 | rsb ip, ip, #0 | ||
502 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
503 | beq .Lcfu_3fupi | ||
504 | cmp r2, ip | ||
505 | movlt ip, r2 | ||
506 | sub r2, r2, ip | ||
507 | subs ip, ip, #16 | ||
508 | blt .Lcfu_3rem8lp | ||
509 | |||
510 | .Lcfu_3cpy8lp: mov r3, r7, pull #24 | ||
511 | ldmia r1!, {r4 - r7} @ Shouldnt fault | ||
512 | orr r3, r3, r4, push #8 | ||
513 | mov r4, r4, pull #24 | ||
514 | orr r4, r4, r5, push #8 | ||
515 | mov r5, r5, pull #24 | ||
516 | orr r5, r5, r6, push #8 | ||
517 | mov r6, r6, pull #24 | ||
518 | orr r6, r6, r7, push #8 | ||
519 | stmia r0!, {r3 - r6} | ||
520 | subs ip, ip, #16 | ||
521 | bpl .Lcfu_3cpy8lp | ||
522 | |||
523 | .Lcfu_3rem8lp: tst ip, #8 | ||
524 | movne r3, r7, pull #24 | ||
525 | ldmneia r1!, {r4, r7} @ Shouldnt fault | ||
526 | orrne r3, r3, r4, push #8 | ||
527 | movne r4, r4, pull #24 | ||
528 | orrne r4, r4, r7, push #8 | ||
529 | stmneia r0!, {r3 - r4} | ||
530 | tst ip, #4 | ||
531 | movne r3, r7, pull #24 | ||
532 | USER( TUSER( ldrne) r7, [r1], #4) @ May fault | ||
533 | orrne r3, r3, r7, push #8 | ||
534 | strne r3, [r0], #4 | ||
535 | ands ip, ip, #3 | ||
536 | beq .Lcfu_3fupi | ||
537 | .Lcfu_3nowords: mov r3, r7, get_byte_3 | ||
538 | teq ip, #0 | ||
539 | beq .Lcfu_finished | ||
540 | cmp ip, #2 | ||
541 | strb r3, [r0], #1 | ||
542 | USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault | ||
543 | strgeb r3, [r0], #1 | ||
544 | USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault | ||
545 | strgtb r3, [r0], #1 | ||
546 | b .Lcfu_finished | ||
547 | ENDPROC(__copy_from_user) | ||
548 | |||
549 | .pushsection .fixup,"ax" | ||
550 | .align 0 | ||
551 | /* | ||
552 | * We took an exception. r0 contains a pointer to | ||
553 | * the byte not copied. | ||
554 | */ | ||
555 | 9001: ldr r2, [sp], #4 @ void *to | ||
556 | sub r2, r0, r2 @ bytes copied | ||
557 | ldr r1, [sp], #4 @ unsigned long count | ||
558 | subs r4, r1, r2 @ bytes left to copy | ||
559 | movne r1, r4 | ||
560 | blne __memzero | ||
561 | mov r0, r4 | ||
562 | ldmfd sp!, {r4 - r7, pc} | ||
563 | .popsection | ||
564 | |||
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c index 104ca40d8d18..aaa443b48c91 100644 --- a/arch/arm/mach-at91/at91rm9200_time.c +++ b/arch/arm/mach-at91/at91rm9200_time.c | |||
@@ -197,7 +197,7 @@ void __init at91rm9200_timer_init(void) | |||
197 | at91_st_read(AT91_ST_SR); | 197 | at91_st_read(AT91_ST_SR); |
198 | 198 | ||
199 | /* Make IRQs happen for the system timer */ | 199 | /* Make IRQs happen for the system timer */ |
200 | setup_irq(AT91_ID_SYS, &at91rm9200_timer_irq); | 200 | setup_irq(NR_IRQS_LEGACY + AT91_ID_SYS, &at91rm9200_timer_irq); |
201 | 201 | ||
202 | /* The 32KiHz "Slow Clock" (tick every 30517.58 nanoseconds) is used | 202 | /* The 32KiHz "Slow Clock" (tick every 30517.58 nanoseconds) is used |
203 | * directly for the clocksource and all clockevents, after adjusting | 203 | * directly for the clocksource and all clockevents, after adjusting |
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 7b9c2ba396ed..bce572a530ef 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -726,6 +726,8 @@ static struct resource rtt_resources[] = { | |||
726 | .flags = IORESOURCE_MEM, | 726 | .flags = IORESOURCE_MEM, |
727 | }, { | 727 | }, { |
728 | .flags = IORESOURCE_MEM, | 728 | .flags = IORESOURCE_MEM, |
729 | }, { | ||
730 | .flags = IORESOURCE_IRQ, | ||
729 | }, | 731 | }, |
730 | }; | 732 | }; |
731 | 733 | ||
@@ -744,10 +746,12 @@ static void __init at91_add_device_rtt_rtc(void) | |||
744 | * The second resource is needed: | 746 | * The second resource is needed: |
745 | * GPBR will serve as the storage for RTC time offset | 747 | * GPBR will serve as the storage for RTC time offset |
746 | */ | 748 | */ |
747 | at91sam9260_rtt_device.num_resources = 2; | 749 | at91sam9260_rtt_device.num_resources = 3; |
748 | rtt_resources[1].start = AT91SAM9260_BASE_GPBR + | 750 | rtt_resources[1].start = AT91SAM9260_BASE_GPBR + |
749 | 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR; | 751 | 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR; |
750 | rtt_resources[1].end = rtt_resources[1].start + 3; | 752 | rtt_resources[1].end = rtt_resources[1].start + 3; |
753 | rtt_resources[2].start = NR_IRQS_LEGACY + AT91_ID_SYS; | ||
754 | rtt_resources[2].end = NR_IRQS_LEGACY + AT91_ID_SYS; | ||
751 | } | 755 | } |
752 | #else | 756 | #else |
753 | static void __init at91_add_device_rtt_rtc(void) | 757 | static void __init at91_add_device_rtt_rtc(void) |
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 8df5c1bdff92..bc2590d712d0 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -609,6 +609,8 @@ static struct resource rtt_resources[] = { | |||
609 | .flags = IORESOURCE_MEM, | 609 | .flags = IORESOURCE_MEM, |
610 | }, { | 610 | }, { |
611 | .flags = IORESOURCE_MEM, | 611 | .flags = IORESOURCE_MEM, |
612 | }, { | ||
613 | .flags = IORESOURCE_IRQ, | ||
612 | } | 614 | } |
613 | }; | 615 | }; |
614 | 616 | ||
@@ -626,10 +628,12 @@ static void __init at91_add_device_rtt_rtc(void) | |||
626 | * The second resource is needed: | 628 | * The second resource is needed: |
627 | * GPBR will serve as the storage for RTC time offset | 629 | * GPBR will serve as the storage for RTC time offset |
628 | */ | 630 | */ |
629 | at91sam9261_rtt_device.num_resources = 2; | 631 | at91sam9261_rtt_device.num_resources = 3; |
630 | rtt_resources[1].start = AT91SAM9261_BASE_GPBR + | 632 | rtt_resources[1].start = AT91SAM9261_BASE_GPBR + |
631 | 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR; | 633 | 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR; |
632 | rtt_resources[1].end = rtt_resources[1].start + 3; | 634 | rtt_resources[1].end = rtt_resources[1].start + 3; |
635 | rtt_resources[2].start = NR_IRQS_LEGACY + AT91_ID_SYS; | ||
636 | rtt_resources[2].end = NR_IRQS_LEGACY + AT91_ID_SYS; | ||
633 | } | 637 | } |
634 | #else | 638 | #else |
635 | static void __init at91_add_device_rtt_rtc(void) | 639 | static void __init at91_add_device_rtt_rtc(void) |
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index eb6bbf86fb9f..9b6ca734f1a9 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -990,6 +990,8 @@ static struct resource rtt0_resources[] = { | |||
990 | .flags = IORESOURCE_MEM, | 990 | .flags = IORESOURCE_MEM, |
991 | }, { | 991 | }, { |
992 | .flags = IORESOURCE_MEM, | 992 | .flags = IORESOURCE_MEM, |
993 | }, { | ||
994 | .flags = IORESOURCE_IRQ, | ||
993 | } | 995 | } |
994 | }; | 996 | }; |
995 | 997 | ||
@@ -1006,6 +1008,8 @@ static struct resource rtt1_resources[] = { | |||
1006 | .flags = IORESOURCE_MEM, | 1008 | .flags = IORESOURCE_MEM, |
1007 | }, { | 1009 | }, { |
1008 | .flags = IORESOURCE_MEM, | 1010 | .flags = IORESOURCE_MEM, |
1011 | }, { | ||
1012 | .flags = IORESOURCE_IRQ, | ||
1009 | } | 1013 | } |
1010 | }; | 1014 | }; |
1011 | 1015 | ||
@@ -1027,14 +1031,14 @@ static void __init at91_add_device_rtt_rtc(void) | |||
1027 | * The second resource is needed only for the chosen RTT: | 1031 | * The second resource is needed only for the chosen RTT: |
1028 | * GPBR will serve as the storage for RTC time offset | 1032 | * GPBR will serve as the storage for RTC time offset |
1029 | */ | 1033 | */ |
1030 | at91sam9263_rtt0_device.num_resources = 2; | 1034 | at91sam9263_rtt0_device.num_resources = 3; |
1031 | at91sam9263_rtt1_device.num_resources = 1; | 1035 | at91sam9263_rtt1_device.num_resources = 1; |
1032 | pdev = &at91sam9263_rtt0_device; | 1036 | pdev = &at91sam9263_rtt0_device; |
1033 | r = rtt0_resources; | 1037 | r = rtt0_resources; |
1034 | break; | 1038 | break; |
1035 | case 1: | 1039 | case 1: |
1036 | at91sam9263_rtt0_device.num_resources = 1; | 1040 | at91sam9263_rtt0_device.num_resources = 1; |
1037 | at91sam9263_rtt1_device.num_resources = 2; | 1041 | at91sam9263_rtt1_device.num_resources = 3; |
1038 | pdev = &at91sam9263_rtt1_device; | 1042 | pdev = &at91sam9263_rtt1_device; |
1039 | r = rtt1_resources; | 1043 | r = rtt1_resources; |
1040 | break; | 1044 | break; |
@@ -1047,6 +1051,8 @@ static void __init at91_add_device_rtt_rtc(void) | |||
1047 | pdev->name = "rtc-at91sam9"; | 1051 | pdev->name = "rtc-at91sam9"; |
1048 | r[1].start = AT91SAM9263_BASE_GPBR + 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR; | 1052 | r[1].start = AT91SAM9263_BASE_GPBR + 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR; |
1049 | r[1].end = r[1].start + 3; | 1053 | r[1].end = r[1].start + 3; |
1054 | r[2].start = NR_IRQS_LEGACY + AT91_ID_SYS; | ||
1055 | r[2].end = NR_IRQS_LEGACY + AT91_ID_SYS; | ||
1050 | } | 1056 | } |
1051 | #else | 1057 | #else |
1052 | static void __init at91_add_device_rtt_rtc(void) | 1058 | static void __init at91_add_device_rtt_rtc(void) |
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index 06073996a382..1b47319ca00b 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -1293,6 +1293,8 @@ static struct resource rtt_resources[] = { | |||
1293 | .flags = IORESOURCE_MEM, | 1293 | .flags = IORESOURCE_MEM, |
1294 | }, { | 1294 | }, { |
1295 | .flags = IORESOURCE_MEM, | 1295 | .flags = IORESOURCE_MEM, |
1296 | }, { | ||
1297 | .flags = IORESOURCE_IRQ, | ||
1296 | } | 1298 | } |
1297 | }; | 1299 | }; |
1298 | 1300 | ||
@@ -1310,10 +1312,12 @@ static void __init at91_add_device_rtt_rtc(void) | |||
1310 | * The second resource is needed: | 1312 | * The second resource is needed: |
1311 | * GPBR will serve as the storage for RTC time offset | 1313 | * GPBR will serve as the storage for RTC time offset |
1312 | */ | 1314 | */ |
1313 | at91sam9g45_rtt_device.num_resources = 2; | 1315 | at91sam9g45_rtt_device.num_resources = 3; |
1314 | rtt_resources[1].start = AT91SAM9G45_BASE_GPBR + | 1316 | rtt_resources[1].start = AT91SAM9G45_BASE_GPBR + |
1315 | 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR; | 1317 | 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR; |
1316 | rtt_resources[1].end = rtt_resources[1].start + 3; | 1318 | rtt_resources[1].end = rtt_resources[1].start + 3; |
1319 | rtt_resources[2].start = NR_IRQS_LEGACY + AT91_ID_SYS; | ||
1320 | rtt_resources[2].end = NR_IRQS_LEGACY + AT91_ID_SYS; | ||
1317 | } | 1321 | } |
1318 | #else | 1322 | #else |
1319 | static void __init at91_add_device_rtt_rtc(void) | 1323 | static void __init at91_add_device_rtt_rtc(void) |
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index f09fff932172..b3d365dadef5 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -688,6 +688,8 @@ static struct resource rtt_resources[] = { | |||
688 | .flags = IORESOURCE_MEM, | 688 | .flags = IORESOURCE_MEM, |
689 | }, { | 689 | }, { |
690 | .flags = IORESOURCE_MEM, | 690 | .flags = IORESOURCE_MEM, |
691 | }, { | ||
692 | .flags = IORESOURCE_IRQ, | ||
691 | } | 693 | } |
692 | }; | 694 | }; |
693 | 695 | ||
@@ -705,10 +707,12 @@ static void __init at91_add_device_rtt_rtc(void) | |||
705 | * The second resource is needed: | 707 | * The second resource is needed: |
706 | * GPBR will serve as the storage for RTC time offset | 708 | * GPBR will serve as the storage for RTC time offset |
707 | */ | 709 | */ |
708 | at91sam9rl_rtt_device.num_resources = 2; | 710 | at91sam9rl_rtt_device.num_resources = 3; |
709 | rtt_resources[1].start = AT91SAM9RL_BASE_GPBR + | 711 | rtt_resources[1].start = AT91SAM9RL_BASE_GPBR + |
710 | 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR; | 712 | 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR; |
711 | rtt_resources[1].end = rtt_resources[1].start + 3; | 713 | rtt_resources[1].end = rtt_resources[1].start + 3; |
714 | rtt_resources[2].start = NR_IRQS_LEGACY + AT91_ID_SYS; | ||
715 | rtt_resources[2].end = NR_IRQS_LEGACY + AT91_ID_SYS; | ||
712 | } | 716 | } |
713 | #else | 717 | #else |
714 | static void __init at91_add_device_rtt_rtc(void) | 718 | static void __init at91_add_device_rtt_rtc(void) |
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index de2ec6b8fea7..188c82971ebd 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91/clock.c | |||
@@ -63,6 +63,12 @@ EXPORT_SYMBOL_GPL(at91_pmc_base); | |||
63 | 63 | ||
64 | #define cpu_has_300M_plla() (cpu_is_at91sam9g10()) | 64 | #define cpu_has_300M_plla() (cpu_is_at91sam9g10()) |
65 | 65 | ||
66 | #define cpu_has_240M_plla() (cpu_is_at91sam9261() \ | ||
67 | || cpu_is_at91sam9263() \ | ||
68 | || cpu_is_at91sam9rl()) | ||
69 | |||
70 | #define cpu_has_210M_plla() (cpu_is_at91sam9260()) | ||
71 | |||
66 | #define cpu_has_pllb() (!(cpu_is_at91sam9rl() \ | 72 | #define cpu_has_pllb() (!(cpu_is_at91sam9rl() \ |
67 | || cpu_is_at91sam9g45() \ | 73 | || cpu_is_at91sam9g45() \ |
68 | || cpu_is_at91sam9x5() \ | 74 | || cpu_is_at91sam9x5() \ |
@@ -706,6 +712,12 @@ static int __init at91_pmc_init(unsigned long main_clock) | |||
706 | } else if (cpu_has_800M_plla()) { | 712 | } else if (cpu_has_800M_plla()) { |
707 | if (plla.rate_hz > 800000000) | 713 | if (plla.rate_hz > 800000000) |
708 | pll_overclock = true; | 714 | pll_overclock = true; |
715 | } else if (cpu_has_240M_plla()) { | ||
716 | if (plla.rate_hz > 240000000) | ||
717 | pll_overclock = true; | ||
718 | } else if (cpu_has_210M_plla()) { | ||
719 | if (plla.rate_hz > 210000000) | ||
720 | pll_overclock = true; | ||
709 | } else { | 721 | } else { |
710 | if (plla.rate_hz > 209000000) | 722 | if (plla.rate_hz > 209000000) |
711 | pll_overclock = true; | 723 | pll_overclock = true; |
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c index 5de69f2fcca9..f6b9fc70161b 100644 --- a/arch/arm/mach-davinci/board-neuros-osd2.c +++ b/arch/arm/mach-davinci/board-neuros-osd2.c | |||
@@ -162,38 +162,6 @@ static void __init davinci_ntosd2_map_io(void) | |||
162 | dm644x_init(); | 162 | dm644x_init(); |
163 | } | 163 | } |
164 | 164 | ||
165 | /* | ||
166 | I2C initialization | ||
167 | */ | ||
168 | static struct davinci_i2c_platform_data ntosd2_i2c_pdata = { | ||
169 | .bus_freq = 20 /* kHz */, | ||
170 | .bus_delay = 100 /* usec */, | ||
171 | }; | ||
172 | |||
173 | static struct i2c_board_info __initdata ntosd2_i2c_info[] = { | ||
174 | }; | ||
175 | |||
176 | static int ntosd2_init_i2c(void) | ||
177 | { | ||
178 | int status; | ||
179 | |||
180 | davinci_init_i2c(&ntosd2_i2c_pdata); | ||
181 | status = gpio_request(NTOSD2_MSP430_IRQ, ntosd2_i2c_info[0].type); | ||
182 | if (status == 0) { | ||
183 | status = gpio_direction_input(NTOSD2_MSP430_IRQ); | ||
184 | if (status == 0) { | ||
185 | status = gpio_to_irq(NTOSD2_MSP430_IRQ); | ||
186 | if (status > 0) { | ||
187 | ntosd2_i2c_info[0].irq = status; | ||
188 | i2c_register_board_info(1, | ||
189 | ntosd2_i2c_info, | ||
190 | ARRAY_SIZE(ntosd2_i2c_info)); | ||
191 | } | ||
192 | } | ||
193 | } | ||
194 | return status; | ||
195 | } | ||
196 | |||
197 | static struct davinci_mmc_config davinci_ntosd2_mmc_config = { | 165 | static struct davinci_mmc_config davinci_ntosd2_mmc_config = { |
198 | .wires = 4, | 166 | .wires = 4, |
199 | .version = MMC_CTLR_VERSION_1 | 167 | .version = MMC_CTLR_VERSION_1 |
@@ -218,7 +186,6 @@ static __init void davinci_ntosd2_init(void) | |||
218 | { | 186 | { |
219 | struct clk *aemif_clk; | 187 | struct clk *aemif_clk; |
220 | struct davinci_soc_info *soc_info = &davinci_soc_info; | 188 | struct davinci_soc_info *soc_info = &davinci_soc_info; |
221 | int status; | ||
222 | 189 | ||
223 | aemif_clk = clk_get(NULL, "aemif"); | 190 | aemif_clk = clk_get(NULL, "aemif"); |
224 | clk_enable(aemif_clk); | 191 | clk_enable(aemif_clk); |
@@ -242,12 +209,6 @@ static __init void davinci_ntosd2_init(void) | |||
242 | platform_add_devices(davinci_ntosd2_devices, | 209 | platform_add_devices(davinci_ntosd2_devices, |
243 | ARRAY_SIZE(davinci_ntosd2_devices)); | 210 | ARRAY_SIZE(davinci_ntosd2_devices)); |
244 | 211 | ||
245 | /* Initialize I2C interface specific for this board */ | ||
246 | status = ntosd2_init_i2c(); | ||
247 | if (status < 0) | ||
248 | pr_warning("davinci_ntosd2_init: msp430 irq setup failed:" | ||
249 | " %d\n", status); | ||
250 | |||
251 | davinci_serial_init(&uart_config); | 212 | davinci_serial_init(&uart_config); |
252 | dm644x_init_asp(&dm644x_ntosd2_snd_data); | 213 | dm644x_init_asp(&dm644x_ntosd2_snd_data); |
253 | 214 | ||
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index 4db5de54b6a7..6321567d8eaa 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -102,7 +102,8 @@ void __init dove_ehci1_init(void) | |||
102 | void __init dove_ge00_init(struct mv643xx_eth_platform_data *eth_data) | 102 | void __init dove_ge00_init(struct mv643xx_eth_platform_data *eth_data) |
103 | { | 103 | { |
104 | orion_ge00_init(eth_data, DOVE_GE00_PHYS_BASE, | 104 | orion_ge00_init(eth_data, DOVE_GE00_PHYS_BASE, |
105 | IRQ_DOVE_GE00_SUM, IRQ_DOVE_GE00_ERR); | 105 | IRQ_DOVE_GE00_SUM, IRQ_DOVE_GE00_ERR, |
106 | 1600); | ||
106 | } | 107 | } |
107 | 108 | ||
108 | /***************************************************************************** | 109 | /***************************************************************************** |
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index 5ca80307d6d7..4e574c24581c 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <plat/backlight.h> | 42 | #include <plat/backlight.h> |
43 | #include <plat/fb.h> | 43 | #include <plat/fb.h> |
44 | #include <plat/mfc.h> | 44 | #include <plat/mfc.h> |
45 | #include <plat/hdmi.h> | ||
45 | 46 | ||
46 | #include <mach/ohci.h> | 47 | #include <mach/ohci.h> |
47 | #include <mach/map.h> | 48 | #include <mach/map.h> |
@@ -734,6 +735,11 @@ static void __init origen_bt_setup(void) | |||
734 | s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE); | 735 | s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE); |
735 | } | 736 | } |
736 | 737 | ||
738 | /* I2C module and id for HDMIPHY */ | ||
739 | static struct i2c_board_info hdmiphy_info = { | ||
740 | I2C_BOARD_INFO("hdmiphy-exynos4210", 0x38), | ||
741 | }; | ||
742 | |||
737 | static void s5p_tv_setup(void) | 743 | static void s5p_tv_setup(void) |
738 | { | 744 | { |
739 | /* Direct HPD to HDMI chip */ | 745 | /* Direct HPD to HDMI chip */ |
@@ -781,6 +787,7 @@ static void __init origen_machine_init(void) | |||
781 | 787 | ||
782 | s5p_tv_setup(); | 788 | s5p_tv_setup(); |
783 | s5p_i2c_hdmiphy_set_platdata(NULL); | 789 | s5p_i2c_hdmiphy_set_platdata(NULL); |
790 | s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0); | ||
784 | 791 | ||
785 | #ifdef CONFIG_DRM_EXYNOS | 792 | #ifdef CONFIG_DRM_EXYNOS |
786 | s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; | 793 | s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; |
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c index 3cfa688d274a..73f2bce097e1 100644 --- a/arch/arm/mach-exynos/mach-smdkv310.c +++ b/arch/arm/mach-exynos/mach-smdkv310.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <plat/mfc.h> | 40 | #include <plat/mfc.h> |
41 | #include <plat/ehci.h> | 41 | #include <plat/ehci.h> |
42 | #include <plat/clock.h> | 42 | #include <plat/clock.h> |
43 | #include <plat/hdmi.h> | ||
43 | 44 | ||
44 | #include <mach/map.h> | 45 | #include <mach/map.h> |
45 | #include <mach/ohci.h> | 46 | #include <mach/ohci.h> |
@@ -354,6 +355,11 @@ static struct platform_pwm_backlight_data smdkv310_bl_data = { | |||
354 | .pwm_period_ns = 1000, | 355 | .pwm_period_ns = 1000, |
355 | }; | 356 | }; |
356 | 357 | ||
358 | /* I2C module and id for HDMIPHY */ | ||
359 | static struct i2c_board_info hdmiphy_info = { | ||
360 | I2C_BOARD_INFO("hdmiphy-exynos4210", 0x38), | ||
361 | }; | ||
362 | |||
357 | static void s5p_tv_setup(void) | 363 | static void s5p_tv_setup(void) |
358 | { | 364 | { |
359 | /* direct HPD to HDMI chip */ | 365 | /* direct HPD to HDMI chip */ |
@@ -388,6 +394,7 @@ static void __init smdkv310_machine_init(void) | |||
388 | 394 | ||
389 | s5p_tv_setup(); | 395 | s5p_tv_setup(); |
390 | s5p_i2c_hdmiphy_set_platdata(NULL); | 396 | s5p_i2c_hdmiphy_set_platdata(NULL); |
397 | s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0); | ||
391 | 398 | ||
392 | samsung_keypad_set_platdata(&smdkv310_keypad_data); | 399 | samsung_keypad_set_platdata(&smdkv310_keypad_data); |
393 | 400 | ||
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index 373c3c00d24c..c0bc83a7663e 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c | |||
@@ -115,7 +115,7 @@ static __init int exynos_pm_dt_parse_domains(void) | |||
115 | } | 115 | } |
116 | #endif /* CONFIG_OF */ | 116 | #endif /* CONFIG_OF */ |
117 | 117 | ||
118 | static __init void exynos_pm_add_dev_to_genpd(struct platform_device *pdev, | 118 | static __init __maybe_unused void exynos_pm_add_dev_to_genpd(struct platform_device *pdev, |
119 | struct exynos_pm_domain *pd) | 119 | struct exynos_pm_domain *pd) |
120 | { | 120 | { |
121 | if (pdev->dev.bus) { | 121 | if (pdev->dev.bus) { |
diff --git a/arch/arm/mach-gemini/irq.c b/arch/arm/mach-gemini/irq.c index ca70e5fcc7ac..020852d3bdd8 100644 --- a/arch/arm/mach-gemini/irq.c +++ b/arch/arm/mach-gemini/irq.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <asm/irq.h> | 18 | #include <asm/irq.h> |
19 | #include <asm/mach/irq.h> | 19 | #include <asm/mach/irq.h> |
20 | #include <asm/system_misc.h> | ||
20 | #include <mach/hardware.h> | 21 | #include <mach/hardware.h> |
21 | 22 | ||
22 | #define IRQ_SOURCE(base_addr) (base_addr + 0x00) | 23 | #define IRQ_SOURCE(base_addr) (base_addr + 0x00) |
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 07f7c226e4cf..d004d37ad9d8 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -9,7 +9,8 @@ obj-$(CONFIG_SOC_IMX27) += clk-imx27.o mm-imx27.o ehci-imx27.o | |||
9 | obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o clk-imx31.o iomux-imx31.o ehci-imx31.o pm-imx3.o | 9 | obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o clk-imx31.o iomux-imx31.o ehci-imx31.o pm-imx3.o |
10 | obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clk-imx35.o ehci-imx35.o pm-imx3.o | 10 | obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clk-imx35.o ehci-imx35.o pm-imx3.o |
11 | 11 | ||
12 | obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o mm-imx5.o clk-imx51-imx53.o ehci-imx5.o pm-imx5.o cpu_op-mx51.o | 12 | imx5-pm-$(CONFIG_PM) += pm-imx5.o |
13 | obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o mm-imx5.o clk-imx51-imx53.o ehci-imx5.o $(imx5-pm-y) cpu_op-mx51.o | ||
13 | 14 | ||
14 | obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ | 15 | obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ |
15 | clk-pfd.o clk-busy.o | 16 | clk-pfd.o clk-busy.o |
@@ -70,14 +71,13 @@ obj-$(CONFIG_DEBUG_LL) += lluart.o | |||
70 | obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o | 71 | obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o |
71 | obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o | 72 | obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o |
72 | obj-$(CONFIG_HAVE_IMX_SRC) += src.o | 73 | obj-$(CONFIG_HAVE_IMX_SRC) += src.o |
73 | obj-$(CONFIG_CPU_V7) += head-v7.o | 74 | AFLAGS_headsmp.o :=-Wa,-march=armv7-a |
74 | AFLAGS_head-v7.o :=-Wa,-march=armv7-a | 75 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o |
75 | obj-$(CONFIG_SMP) += platsmp.o | ||
76 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 76 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
77 | obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o mach-imx6q.o | 77 | obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o mach-imx6q.o |
78 | 78 | ||
79 | ifeq ($(CONFIG_PM),y) | 79 | ifeq ($(CONFIG_PM),y) |
80 | obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o | 80 | obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o headsmp.o |
81 | endif | 81 | endif |
82 | 82 | ||
83 | # i.MX5 based machines | 83 | # i.MX5 based machines |
diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c index fdd8cc87c9fe..d20d4795f4ea 100644 --- a/arch/arm/mach-imx/clk-imx25.c +++ b/arch/arm/mach-imx/clk-imx25.c | |||
@@ -222,10 +222,8 @@ int __init mx25_clocks_init(void) | |||
222 | clk_register_clkdev(clk[lcdc_ipg], "ipg", "imx-fb.0"); | 222 | clk_register_clkdev(clk[lcdc_ipg], "ipg", "imx-fb.0"); |
223 | clk_register_clkdev(clk[lcdc_ahb], "ahb", "imx-fb.0"); | 223 | clk_register_clkdev(clk[lcdc_ahb], "ahb", "imx-fb.0"); |
224 | clk_register_clkdev(clk[wdt_ipg], NULL, "imx2-wdt.0"); | 224 | clk_register_clkdev(clk[wdt_ipg], NULL, "imx2-wdt.0"); |
225 | clk_register_clkdev(clk[ssi1_ipg_per], "per", "imx-ssi.0"); | 225 | clk_register_clkdev(clk[ssi1_ipg], NULL, "imx-ssi.0"); |
226 | clk_register_clkdev(clk[ssi1_ipg], "ipg", "imx-ssi.0"); | 226 | clk_register_clkdev(clk[ssi2_ipg], NULL, "imx-ssi.1"); |
227 | clk_register_clkdev(clk[ssi2_ipg_per], "per", "imx-ssi.1"); | ||
228 | clk_register_clkdev(clk[ssi2_ipg], "ipg", "imx-ssi.1"); | ||
229 | clk_register_clkdev(clk[esdhc1_ipg_per], "per", "sdhci-esdhc-imx25.0"); | 227 | clk_register_clkdev(clk[esdhc1_ipg_per], "per", "sdhci-esdhc-imx25.0"); |
230 | clk_register_clkdev(clk[esdhc1_ipg], "ipg", "sdhci-esdhc-imx25.0"); | 228 | clk_register_clkdev(clk[esdhc1_ipg], "ipg", "sdhci-esdhc-imx25.0"); |
231 | clk_register_clkdev(clk[esdhc1_ahb], "ahb", "sdhci-esdhc-imx25.0"); | 229 | clk_register_clkdev(clk[esdhc1_ahb], "ahb", "sdhci-esdhc-imx25.0"); |
@@ -243,6 +241,6 @@ int __init mx25_clocks_init(void) | |||
243 | clk_register_clkdev(clk[sdma_ahb], "ahb", "imx35-sdma"); | 241 | clk_register_clkdev(clk[sdma_ahb], "ahb", "imx35-sdma"); |
244 | clk_register_clkdev(clk[iim_ipg], "iim", NULL); | 242 | clk_register_clkdev(clk[iim_ipg], "iim", NULL); |
245 | 243 | ||
246 | mxc_timer_init(MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); | 244 | mxc_timer_init(MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), MX25_INT_GPT1); |
247 | return 0; | 245 | return 0; |
248 | } | 246 | } |
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index 7aa6313fb167..f69ca4680049 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c | |||
@@ -223,7 +223,7 @@ int __init mx27_clocks_init(unsigned long fref) | |||
223 | clk_register_clkdev(clk[per3_gate], "per", "imx-fb.0"); | 223 | clk_register_clkdev(clk[per3_gate], "per", "imx-fb.0"); |
224 | clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx-fb.0"); | 224 | clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx-fb.0"); |
225 | clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx-fb.0"); | 225 | clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx-fb.0"); |
226 | clk_register_clkdev(clk[csi_ahb_gate], NULL, "mx2-camera.0"); | 226 | clk_register_clkdev(clk[csi_ahb_gate], "ahb", "mx2-camera.0"); |
227 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); | 227 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); |
228 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc"); | 228 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc"); |
229 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc"); | 229 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc"); |
@@ -250,8 +250,10 @@ int __init mx27_clocks_init(unsigned long fref) | |||
250 | clk_register_clkdev(clk[i2c2_ipg_gate], NULL, "imx-i2c.1"); | 250 | clk_register_clkdev(clk[i2c2_ipg_gate], NULL, "imx-i2c.1"); |
251 | clk_register_clkdev(clk[owire_ipg_gate], NULL, "mxc_w1.0"); | 251 | clk_register_clkdev(clk[owire_ipg_gate], NULL, "mxc_w1.0"); |
252 | clk_register_clkdev(clk[kpp_ipg_gate], NULL, "imx-keypad"); | 252 | clk_register_clkdev(clk[kpp_ipg_gate], NULL, "imx-keypad"); |
253 | clk_register_clkdev(clk[emma_ahb_gate], "ahb", "imx-emma"); | 253 | clk_register_clkdev(clk[emma_ahb_gate], "emma-ahb", "mx2-camera.0"); |
254 | clk_register_clkdev(clk[emma_ipg_gate], "ipg", "imx-emma"); | 254 | clk_register_clkdev(clk[emma_ipg_gate], "emma-ipg", "mx2-camera.0"); |
255 | clk_register_clkdev(clk[emma_ahb_gate], "ahb", "m2m-emmaprp.0"); | ||
256 | clk_register_clkdev(clk[emma_ipg_gate], "ipg", "m2m-emmaprp.0"); | ||
255 | clk_register_clkdev(clk[iim_ipg_gate], "iim", NULL); | 257 | clk_register_clkdev(clk[iim_ipg_gate], "iim", NULL); |
256 | clk_register_clkdev(clk[gpio_ipg_gate], "gpio", NULL); | 258 | clk_register_clkdev(clk[gpio_ipg_gate], "gpio", NULL); |
257 | clk_register_clkdev(clk[brom_ahb_gate], "brom", NULL); | 259 | clk_register_clkdev(clk[brom_ahb_gate], "brom", NULL); |
diff --git a/arch/arm/mach-imx/clk-imx31.c b/arch/arm/mach-imx/clk-imx31.c index 8e19e70f90f9..1253af2d9971 100644 --- a/arch/arm/mach-imx/clk-imx31.c +++ b/arch/arm/mach-imx/clk-imx31.c | |||
@@ -130,7 +130,7 @@ int __init mx31_clocks_init(unsigned long fref) | |||
130 | clk_register_clkdev(clk[nfc], NULL, "mxc_nand.0"); | 130 | clk_register_clkdev(clk[nfc], NULL, "mxc_nand.0"); |
131 | clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core"); | 131 | clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core"); |
132 | clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb"); | 132 | clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb"); |
133 | clk_register_clkdev(clk[kpp_gate], "kpp", NULL); | 133 | clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad"); |
134 | clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.0"); | 134 | clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.0"); |
135 | clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.0"); | 135 | clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.0"); |
136 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.0"); | 136 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.0"); |
diff --git a/arch/arm/mach-imx/clk-imx35.c b/arch/arm/mach-imx/clk-imx35.c index c6422fb10bae..65fb8bcd86cb 100644 --- a/arch/arm/mach-imx/clk-imx35.c +++ b/arch/arm/mach-imx/clk-imx35.c | |||
@@ -230,10 +230,8 @@ int __init mx35_clocks_init() | |||
230 | clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb"); | 230 | clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb"); |
231 | clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1"); | 231 | clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1"); |
232 | clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma"); | 232 | clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma"); |
233 | clk_register_clkdev(clk[ipg], "ipg", "imx-ssi.0"); | 233 | clk_register_clkdev(clk[ssi1_gate], NULL, "imx-ssi.0"); |
234 | clk_register_clkdev(clk[ssi1_div_post], "per", "imx-ssi.0"); | 234 | clk_register_clkdev(clk[ssi2_gate], NULL, "imx-ssi.1"); |
235 | clk_register_clkdev(clk[ipg], "ipg", "imx-ssi.1"); | ||
236 | clk_register_clkdev(clk[ssi2_div_post], "per", "imx-ssi.1"); | ||
237 | /* i.mx35 has the i.mx21 type uart */ | 235 | /* i.mx35 has the i.mx21 type uart */ |
238 | clk_register_clkdev(clk[uart1_gate], "per", "imx21-uart.0"); | 236 | clk_register_clkdev(clk[uart1_gate], "per", "imx21-uart.0"); |
239 | clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.0"); | 237 | clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.0"); |
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c index f6086693ebd2..4bdcaa97bd98 100644 --- a/arch/arm/mach-imx/clk-imx51-imx53.c +++ b/arch/arm/mach-imx/clk-imx51-imx53.c | |||
@@ -303,6 +303,7 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil, | |||
303 | clk_prepare_enable(clk[aips_tz2]); /* fec */ | 303 | clk_prepare_enable(clk[aips_tz2]); /* fec */ |
304 | clk_prepare_enable(clk[spba]); | 304 | clk_prepare_enable(clk[spba]); |
305 | clk_prepare_enable(clk[emi_fast_gate]); /* fec */ | 305 | clk_prepare_enable(clk[emi_fast_gate]); /* fec */ |
306 | clk_prepare_enable(clk[emi_slow_gate]); /* eim */ | ||
306 | clk_prepare_enable(clk[tmax1]); | 307 | clk_prepare_enable(clk[tmax1]); |
307 | clk_prepare_enable(clk[tmax2]); /* esdhc2, fec */ | 308 | clk_prepare_enable(clk[tmax2]); /* esdhc2, fec */ |
308 | clk_prepare_enable(clk[tmax3]); /* esdhc1, esdhc4 */ | 309 | clk_prepare_enable(clk[tmax3]); /* esdhc1, esdhc4 */ |
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index ea89520b6e22..4233d9e3531d 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
@@ -152,7 +152,7 @@ enum mx6q_clks { | |||
152 | ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, | 152 | ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, |
153 | usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, | 153 | usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, |
154 | pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, ssi1_ipg, | 154 | pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, ssi1_ipg, |
155 | ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, | 155 | ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5, |
156 | clk_max | 156 | clk_max |
157 | }; | 157 | }; |
158 | 158 | ||
@@ -288,8 +288,10 @@ int __init mx6q_clocks_init(void) | |||
288 | clk[gpu3d_shader] = imx_clk_divider("gpu3d_shader", "gpu3d_shader_sel", base + 0x18, 29, 3); | 288 | clk[gpu3d_shader] = imx_clk_divider("gpu3d_shader", "gpu3d_shader_sel", base + 0x18, 29, 3); |
289 | clk[ipu1_podf] = imx_clk_divider("ipu1_podf", "ipu1_sel", base + 0x3c, 11, 3); | 289 | clk[ipu1_podf] = imx_clk_divider("ipu1_podf", "ipu1_sel", base + 0x3c, 11, 3); |
290 | clk[ipu2_podf] = imx_clk_divider("ipu2_podf", "ipu2_sel", base + 0x3c, 16, 3); | 290 | clk[ipu2_podf] = imx_clk_divider("ipu2_podf", "ipu2_sel", base + 0x3c, 16, 3); |
291 | clk[ldb_di0_podf] = imx_clk_divider("ldb_di0_podf", "ldb_di0_sel", base + 0x20, 10, 1); | 291 | clk[ldb_di0_div_3_5] = imx_clk_fixed_factor("ldb_di0_div_3_5", "ldb_di0_sel", 2, 7); |
292 | clk[ldb_di1_podf] = imx_clk_divider("ldb_di1_podf", "ldb_di1_sel", base + 0x20, 11, 1); | 292 | clk[ldb_di0_podf] = imx_clk_divider("ldb_di0_podf", "ldb_di0_div_3_5", base + 0x20, 10, 1); |
293 | clk[ldb_di1_div_3_5] = imx_clk_fixed_factor("ldb_di1_div_3_5", "ldb_di1_sel", 2, 7); | ||
294 | clk[ldb_di1_podf] = imx_clk_divider("ldb_di1_podf", "ldb_di1_div_3_5", base + 0x20, 11, 1); | ||
293 | clk[ipu1_di0_pre] = imx_clk_divider("ipu1_di0_pre", "ipu1_di0_pre_sel", base + 0x34, 3, 3); | 295 | clk[ipu1_di0_pre] = imx_clk_divider("ipu1_di0_pre", "ipu1_di0_pre_sel", base + 0x34, 3, 3); |
294 | clk[ipu1_di1_pre] = imx_clk_divider("ipu1_di1_pre", "ipu1_di1_pre_sel", base + 0x34, 12, 3); | 296 | clk[ipu1_di1_pre] = imx_clk_divider("ipu1_di1_pre", "ipu1_di1_pre_sel", base + 0x34, 12, 3); |
295 | clk[ipu2_di0_pre] = imx_clk_divider("ipu2_di0_pre", "ipu2_di0_pre_sel", base + 0x38, 3, 3); | 297 | clk[ipu2_di0_pre] = imx_clk_divider("ipu2_di0_pre", "ipu2_di0_pre_sel", base + 0x38, 3, 3); |
diff --git a/arch/arm/mach-imx/head-v7.S b/arch/arm/mach-imx/headsmp.S index 7e49deb128a4..7e49deb128a4 100644 --- a/arch/arm/mach-imx/head-v7.S +++ b/arch/arm/mach-imx/headsmp.S | |||
diff --git a/arch/arm/mach-imx/hotplug.c b/arch/arm/mach-imx/hotplug.c index 20ed2d56c1af..f8f7437c83b8 100644 --- a/arch/arm/mach-imx/hotplug.c +++ b/arch/arm/mach-imx/hotplug.c | |||
@@ -42,22 +42,6 @@ static inline void cpu_enter_lowpower(void) | |||
42 | : "cc"); | 42 | : "cc"); |
43 | } | 43 | } |
44 | 44 | ||
45 | static inline void cpu_leave_lowpower(void) | ||
46 | { | ||
47 | unsigned int v; | ||
48 | |||
49 | asm volatile( | ||
50 | "mrc p15, 0, %0, c1, c0, 0\n" | ||
51 | " orr %0, %0, %1\n" | ||
52 | " mcr p15, 0, %0, c1, c0, 0\n" | ||
53 | " mrc p15, 0, %0, c1, c0, 1\n" | ||
54 | " orr %0, %0, %2\n" | ||
55 | " mcr p15, 0, %0, c1, c0, 1\n" | ||
56 | : "=&r" (v) | ||
57 | : "Ir" (CR_C), "Ir" (0x40) | ||
58 | : "cc"); | ||
59 | } | ||
60 | |||
61 | /* | 45 | /* |
62 | * platform-specific code to shutdown a CPU | 46 | * platform-specific code to shutdown a CPU |
63 | * | 47 | * |
@@ -67,11 +51,10 @@ void platform_cpu_die(unsigned int cpu) | |||
67 | { | 51 | { |
68 | cpu_enter_lowpower(); | 52 | cpu_enter_lowpower(); |
69 | imx_enable_cpu(cpu, false); | 53 | imx_enable_cpu(cpu, false); |
70 | cpu_do_idle(); | ||
71 | cpu_leave_lowpower(); | ||
72 | 54 | ||
73 | /* We should never return from idle */ | 55 | /* spin here until hardware takes it down */ |
74 | panic("cpu %d unexpectedly exit from shutdown\n", cpu); | 56 | while (1) |
57 | ; | ||
75 | } | 58 | } |
76 | 59 | ||
77 | int platform_cpu_disable(unsigned int cpu) | 60 | int platform_cpu_disable(unsigned int cpu) |
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c index 2c6ab3273f9e..5985ed1b8c98 100644 --- a/arch/arm/mach-imx/mach-armadillo5x0.c +++ b/arch/arm/mach-imx/mach-armadillo5x0.c | |||
@@ -526,7 +526,8 @@ static void __init armadillo5x0_init(void) | |||
526 | imx31_add_mxc_nand(&armadillo5x0_nand_board_info); | 526 | imx31_add_mxc_nand(&armadillo5x0_nand_board_info); |
527 | 527 | ||
528 | /* set NAND page size to 2k if not configured via boot mode pins */ | 528 | /* set NAND page size to 2k if not configured via boot mode pins */ |
529 | __raw_writel(__raw_readl(MXC_CCM_RCSR) | (1 << 30), MXC_CCM_RCSR); | 529 | __raw_writel(__raw_readl(mx3_ccm_base + MXC_CCM_RCSR) | |
530 | (1 << 30), mx3_ccm_base + MXC_CCM_RCSR); | ||
530 | 531 | ||
531 | /* RTC */ | 532 | /* RTC */ |
532 | /* Get RTC IRQ and register the chip */ | 533 | /* Get RTC IRQ and register the chip */ |
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index f264ddddd47c..5823a2e65124 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
@@ -32,13 +32,13 @@ | |||
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | #include <linux/dma-mapping.h> | 33 | #include <linux/dma-mapping.h> |
34 | #include <linux/leds.h> | 34 | #include <linux/leds.h> |
35 | #include <linux/memblock.h> | ||
36 | #include <media/soc_camera.h> | 35 | #include <media/soc_camera.h> |
37 | #include <sound/tlv320aic32x4.h> | 36 | #include <sound/tlv320aic32x4.h> |
38 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
39 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
40 | #include <asm/mach/time.h> | 39 | #include <asm/mach/time.h> |
41 | #include <asm/system_info.h> | 40 | #include <asm/system_info.h> |
41 | #include <asm/memblock.h> | ||
42 | #include <mach/common.h> | 42 | #include <mach/common.h> |
43 | #include <mach/hardware.h> | 43 | #include <mach/hardware.h> |
44 | #include <mach/iomux-mx27.h> | 44 | #include <mach/iomux-mx27.h> |
@@ -233,10 +233,8 @@ static void __init visstrim_camera_init(void) | |||
233 | static void __init visstrim_reserve(void) | 233 | static void __init visstrim_reserve(void) |
234 | { | 234 | { |
235 | /* reserve 4 MiB for mx2-camera */ | 235 | /* reserve 4 MiB for mx2-camera */ |
236 | mx2_camera_base = memblock_alloc(MX2_CAMERA_BUF_SIZE, | 236 | mx2_camera_base = memblock_steal(MX2_CAMERA_BUF_SIZE, |
237 | MX2_CAMERA_BUF_SIZE); | 237 | MX2_CAMERA_BUF_SIZE); |
238 | memblock_free(mx2_camera_base, MX2_CAMERA_BUF_SIZE); | ||
239 | memblock_remove(mx2_camera_base, MX2_CAMERA_BUF_SIZE); | ||
240 | } | 238 | } |
241 | 239 | ||
242 | /* GPIOs used as events for applications */ | 240 | /* GPIOs used as events for applications */ |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 5ec0608f2a76..045b3f6a387d 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -71,7 +71,7 @@ soft: | |||
71 | /* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */ | 71 | /* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */ |
72 | static int ksz9021rn_phy_fixup(struct phy_device *phydev) | 72 | static int ksz9021rn_phy_fixup(struct phy_device *phydev) |
73 | { | 73 | { |
74 | if (IS_ENABLED(CONFIG_PHYLIB)) { | 74 | if (IS_BUILTIN(CONFIG_PHYLIB)) { |
75 | /* min rx data delay */ | 75 | /* min rx data delay */ |
76 | phy_write(phydev, 0x0b, 0x8105); | 76 | phy_write(phydev, 0x0b, 0x8105); |
77 | phy_write(phydev, 0x0c, 0x0000); | 77 | phy_write(phydev, 0x0c, 0x0000); |
@@ -112,7 +112,7 @@ put_clk: | |||
112 | 112 | ||
113 | static void __init imx6q_sabrelite_init(void) | 113 | static void __init imx6q_sabrelite_init(void) |
114 | { | 114 | { |
115 | if (IS_ENABLED(CONFIG_PHYLIB)) | 115 | if (IS_BUILTIN(CONFIG_PHYLIB)) |
116 | phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK, | 116 | phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK, |
117 | ksz9021rn_phy_fixup); | 117 | ksz9021rn_phy_fixup); |
118 | imx6q_sabrelite_cko1_setup(); | 118 | imx6q_sabrelite_cko1_setup(); |
diff --git a/arch/arm/mach-integrator/common.h b/arch/arm/mach-integrator/common.h index 899561d8db28..c3ff21b5ea24 100644 --- a/arch/arm/mach-integrator/common.h +++ b/arch/arm/mach-integrator/common.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #include <linux/amba/serial.h> | ||
2 | extern struct amba_pl010_data integrator_uart_data; | ||
1 | void integrator_init_early(void); | 3 | void integrator_init_early(void); |
4 | int integrator_init(bool is_cp); | ||
2 | void integrator_reserve(void); | 5 | void integrator_reserve(void); |
3 | void integrator_restart(char, const char *); | 6 | void integrator_restart(char, const char *); |
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index ebf680bebdf2..1772c024e789 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
14 | #include <linux/export.h> | ||
14 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
15 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
16 | #include <linux/irq.h> | 17 | #include <linux/irq.h> |
@@ -32,7 +33,9 @@ | |||
32 | #include <asm/mach/time.h> | 33 | #include <asm/mach/time.h> |
33 | #include <asm/pgtable.h> | 34 | #include <asm/pgtable.h> |
34 | 35 | ||
35 | static struct amba_pl010_data integrator_uart_data; | 36 | #include "common.h" |
37 | |||
38 | #ifdef CONFIG_ATAGS | ||
36 | 39 | ||
37 | #define INTEGRATOR_RTC_IRQ { IRQ_RTCINT } | 40 | #define INTEGRATOR_RTC_IRQ { IRQ_RTCINT } |
38 | #define INTEGRATOR_UART0_IRQ { IRQ_UARTINT0 } | 41 | #define INTEGRATOR_UART0_IRQ { IRQ_UARTINT0 } |
@@ -60,7 +63,7 @@ static struct amba_device *amba_devs[] __initdata = { | |||
60 | &kmi1_device, | 63 | &kmi1_device, |
61 | }; | 64 | }; |
62 | 65 | ||
63 | static int __init integrator_init(void) | 66 | int __init integrator_init(bool is_cp) |
64 | { | 67 | { |
65 | int i; | 68 | int i; |
66 | 69 | ||
@@ -69,7 +72,7 @@ static int __init integrator_init(void) | |||
69 | * hard-code them. The Integator/CP and forward have proper cell IDs. | 72 | * hard-code them. The Integator/CP and forward have proper cell IDs. |
70 | * Else we leave them undefined to the bus driver can autoprobe them. | 73 | * Else we leave them undefined to the bus driver can autoprobe them. |
71 | */ | 74 | */ |
72 | if (machine_is_integrator()) { | 75 | if (!is_cp) { |
73 | rtc_device.periphid = 0x00041030; | 76 | rtc_device.periphid = 0x00041030; |
74 | uart0_device.periphid = 0x00041010; | 77 | uart0_device.periphid = 0x00041010; |
75 | uart1_device.periphid = 0x00041010; | 78 | uart1_device.periphid = 0x00041010; |
@@ -85,7 +88,7 @@ static int __init integrator_init(void) | |||
85 | return 0; | 88 | return 0; |
86 | } | 89 | } |
87 | 90 | ||
88 | arch_initcall(integrator_init); | 91 | #endif |
89 | 92 | ||
90 | /* | 93 | /* |
91 | * On the Integrator platform, the port RTS and DTR are provided by | 94 | * On the Integrator platform, the port RTS and DTR are provided by |
@@ -100,11 +103,14 @@ arch_initcall(integrator_init); | |||
100 | static void integrator_uart_set_mctrl(struct amba_device *dev, void __iomem *base, unsigned int mctrl) | 103 | static void integrator_uart_set_mctrl(struct amba_device *dev, void __iomem *base, unsigned int mctrl) |
101 | { | 104 | { |
102 | unsigned int ctrls = 0, ctrlc = 0, rts_mask, dtr_mask; | 105 | unsigned int ctrls = 0, ctrlc = 0, rts_mask, dtr_mask; |
106 | u32 phybase = dev->res.start; | ||
103 | 107 | ||
104 | if (dev == &uart0_device) { | 108 | if (phybase == INTEGRATOR_UART0_BASE) { |
109 | /* UART0 */ | ||
105 | rts_mask = 1 << 4; | 110 | rts_mask = 1 << 4; |
106 | dtr_mask = 1 << 5; | 111 | dtr_mask = 1 << 5; |
107 | } else { | 112 | } else { |
113 | /* UART1 */ | ||
108 | rts_mask = 1 << 6; | 114 | rts_mask = 1 << 6; |
109 | dtr_mask = 1 << 7; | 115 | dtr_mask = 1 << 7; |
110 | } | 116 | } |
@@ -123,7 +129,7 @@ static void integrator_uart_set_mctrl(struct amba_device *dev, void __iomem *bas | |||
123 | __raw_writel(ctrlc, SC_CTRLC); | 129 | __raw_writel(ctrlc, SC_CTRLC); |
124 | } | 130 | } |
125 | 131 | ||
126 | static struct amba_pl010_data integrator_uart_data = { | 132 | struct amba_pl010_data integrator_uart_data = { |
127 | .set_mctrl = integrator_uart_set_mctrl, | 133 | .set_mctrl = integrator_uart_set_mctrl, |
128 | }; | 134 | }; |
129 | 135 | ||
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index 7b1055c8e0b9..ff1255ae7121 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -34,6 +34,9 @@ | |||
34 | #include <linux/mtd/physmap.h> | 34 | #include <linux/mtd/physmap.h> |
35 | #include <linux/clk.h> | 35 | #include <linux/clk.h> |
36 | #include <linux/platform_data/clk-integrator.h> | 36 | #include <linux/platform_data/clk-integrator.h> |
37 | #include <linux/of_irq.h> | ||
38 | #include <linux/of_address.h> | ||
39 | #include <linux/of_platform.h> | ||
37 | #include <video/vga.h> | 40 | #include <video/vga.h> |
38 | 41 | ||
39 | #include <mach/hardware.h> | 42 | #include <mach/hardware.h> |
@@ -161,23 +164,6 @@ static void __init ap_map_io(void) | |||
161 | vga_base = PCI_MEMORY_VADDR; | 164 | vga_base = PCI_MEMORY_VADDR; |
162 | } | 165 | } |
163 | 166 | ||
164 | #define INTEGRATOR_SC_VALID_INT 0x003fffff | ||
165 | |||
166 | static void __init ap_init_irq(void) | ||
167 | { | ||
168 | /* Disable all interrupts initially. */ | ||
169 | /* Do the core module ones */ | ||
170 | writel(-1, VA_CMIC_BASE + IRQ_ENABLE_CLEAR); | ||
171 | |||
172 | /* do the header card stuff next */ | ||
173 | writel(-1, VA_IC_BASE + IRQ_ENABLE_CLEAR); | ||
174 | writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR); | ||
175 | |||
176 | fpga_irq_init(VA_IC_BASE, "SC", IRQ_PIC_START, | ||
177 | -1, INTEGRATOR_SC_VALID_INT, NULL); | ||
178 | integrator_clk_init(false); | ||
179 | } | ||
180 | |||
181 | #ifdef CONFIG_PM | 167 | #ifdef CONFIG_PM |
182 | static unsigned long ic_irq_enable; | 168 | static unsigned long ic_irq_enable; |
183 | 169 | ||
@@ -270,50 +256,6 @@ static struct physmap_flash_data ap_flash_data = { | |||
270 | .set_vpp = ap_flash_set_vpp, | 256 | .set_vpp = ap_flash_set_vpp, |
271 | }; | 257 | }; |
272 | 258 | ||
273 | static struct resource cfi_flash_resource = { | ||
274 | .start = INTEGRATOR_FLASH_BASE, | ||
275 | .end = INTEGRATOR_FLASH_BASE + INTEGRATOR_FLASH_SIZE - 1, | ||
276 | .flags = IORESOURCE_MEM, | ||
277 | }; | ||
278 | |||
279 | static struct platform_device cfi_flash_device = { | ||
280 | .name = "physmap-flash", | ||
281 | .id = 0, | ||
282 | .dev = { | ||
283 | .platform_data = &ap_flash_data, | ||
284 | }, | ||
285 | .num_resources = 1, | ||
286 | .resource = &cfi_flash_resource, | ||
287 | }; | ||
288 | |||
289 | static void __init ap_init(void) | ||
290 | { | ||
291 | unsigned long sc_dec; | ||
292 | int i; | ||
293 | |||
294 | platform_device_register(&cfi_flash_device); | ||
295 | |||
296 | sc_dec = readl(VA_SC_BASE + INTEGRATOR_SC_DEC_OFFSET); | ||
297 | for (i = 0; i < 4; i++) { | ||
298 | struct lm_device *lmdev; | ||
299 | |||
300 | if ((sc_dec & (16 << i)) == 0) | ||
301 | continue; | ||
302 | |||
303 | lmdev = kzalloc(sizeof(struct lm_device), GFP_KERNEL); | ||
304 | if (!lmdev) | ||
305 | continue; | ||
306 | |||
307 | lmdev->resource.start = 0xc0000000 + 0x10000000 * i; | ||
308 | lmdev->resource.end = lmdev->resource.start + 0x0fffffff; | ||
309 | lmdev->resource.flags = IORESOURCE_MEM; | ||
310 | lmdev->irq = IRQ_AP_EXPINT0 + i; | ||
311 | lmdev->id = i; | ||
312 | |||
313 | lm_device_register(lmdev); | ||
314 | } | ||
315 | } | ||
316 | |||
317 | /* | 259 | /* |
318 | * Where is the timer (VA)? | 260 | * Where is the timer (VA)? |
319 | */ | 261 | */ |
@@ -328,9 +270,9 @@ static u32 notrace integrator_read_sched_clock(void) | |||
328 | return -readl((void __iomem *) TIMER2_VA_BASE + TIMER_VALUE); | 270 | return -readl((void __iomem *) TIMER2_VA_BASE + TIMER_VALUE); |
329 | } | 271 | } |
330 | 272 | ||
331 | static void integrator_clocksource_init(unsigned long inrate) | 273 | static void integrator_clocksource_init(unsigned long inrate, |
274 | void __iomem *base) | ||
332 | { | 275 | { |
333 | void __iomem *base = (void __iomem *)TIMER2_VA_BASE; | ||
334 | u32 ctrl = TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC; | 276 | u32 ctrl = TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC; |
335 | unsigned long rate = inrate; | 277 | unsigned long rate = inrate; |
336 | 278 | ||
@@ -347,7 +289,7 @@ static void integrator_clocksource_init(unsigned long inrate) | |||
347 | setup_sched_clock(integrator_read_sched_clock, 16, rate); | 289 | setup_sched_clock(integrator_read_sched_clock, 16, rate); |
348 | } | 290 | } |
349 | 291 | ||
350 | static void __iomem * const clkevt_base = (void __iomem *)TIMER1_VA_BASE; | 292 | static void __iomem * clkevt_base; |
351 | 293 | ||
352 | /* | 294 | /* |
353 | * IRQ handler for the timer | 295 | * IRQ handler for the timer |
@@ -419,11 +361,13 @@ static struct irqaction integrator_timer_irq = { | |||
419 | .dev_id = &integrator_clockevent, | 361 | .dev_id = &integrator_clockevent, |
420 | }; | 362 | }; |
421 | 363 | ||
422 | static void integrator_clockevent_init(unsigned long inrate) | 364 | static void integrator_clockevent_init(unsigned long inrate, |
365 | void __iomem *base, int irq) | ||
423 | { | 366 | { |
424 | unsigned long rate = inrate; | 367 | unsigned long rate = inrate; |
425 | unsigned int ctrl = 0; | 368 | unsigned int ctrl = 0; |
426 | 369 | ||
370 | clkevt_base = base; | ||
427 | /* Calculate and program a divisor */ | 371 | /* Calculate and program a divisor */ |
428 | if (rate > 0x100000 * HZ) { | 372 | if (rate > 0x100000 * HZ) { |
429 | rate /= 256; | 373 | rate /= 256; |
@@ -435,7 +379,7 @@ static void integrator_clockevent_init(unsigned long inrate) | |||
435 | timer_reload = rate / HZ; | 379 | timer_reload = rate / HZ; |
436 | writel(ctrl, clkevt_base + TIMER_CTRL); | 380 | writel(ctrl, clkevt_base + TIMER_CTRL); |
437 | 381 | ||
438 | setup_irq(IRQ_TIMERINT1, &integrator_timer_irq); | 382 | setup_irq(irq, &integrator_timer_irq); |
439 | clockevents_config_and_register(&integrator_clockevent, | 383 | clockevents_config_and_register(&integrator_clockevent, |
440 | rate, | 384 | rate, |
441 | 1, | 385 | 1, |
@@ -446,9 +390,153 @@ void __init ap_init_early(void) | |||
446 | { | 390 | { |
447 | } | 391 | } |
448 | 392 | ||
393 | #ifdef CONFIG_OF | ||
394 | |||
395 | static void __init ap_init_timer_of(void) | ||
396 | { | ||
397 | struct device_node *node; | ||
398 | const char *path; | ||
399 | void __iomem *base; | ||
400 | int err; | ||
401 | int irq; | ||
402 | struct clk *clk; | ||
403 | unsigned long rate; | ||
404 | |||
405 | clk = clk_get_sys("ap_timer", NULL); | ||
406 | BUG_ON(IS_ERR(clk)); | ||
407 | clk_prepare_enable(clk); | ||
408 | rate = clk_get_rate(clk); | ||
409 | |||
410 | err = of_property_read_string(of_aliases, | ||
411 | "arm,timer-primary", &path); | ||
412 | if (WARN_ON(err)) | ||
413 | return; | ||
414 | node = of_find_node_by_path(path); | ||
415 | base = of_iomap(node, 0); | ||
416 | if (WARN_ON(!base)) | ||
417 | return; | ||
418 | writel(0, base + TIMER_CTRL); | ||
419 | integrator_clocksource_init(rate, base); | ||
420 | |||
421 | err = of_property_read_string(of_aliases, | ||
422 | "arm,timer-secondary", &path); | ||
423 | if (WARN_ON(err)) | ||
424 | return; | ||
425 | node = of_find_node_by_path(path); | ||
426 | base = of_iomap(node, 0); | ||
427 | if (WARN_ON(!base)) | ||
428 | return; | ||
429 | irq = irq_of_parse_and_map(node, 0); | ||
430 | writel(0, base + TIMER_CTRL); | ||
431 | integrator_clockevent_init(rate, base, irq); | ||
432 | } | ||
433 | |||
434 | static struct sys_timer ap_of_timer = { | ||
435 | .init = ap_init_timer_of, | ||
436 | }; | ||
437 | |||
438 | static const struct of_device_id fpga_irq_of_match[] __initconst = { | ||
439 | { .compatible = "arm,versatile-fpga-irq", .data = fpga_irq_of_init, }, | ||
440 | { /* Sentinel */ } | ||
441 | }; | ||
442 | |||
443 | static void __init ap_init_irq_of(void) | ||
444 | { | ||
445 | /* disable core module IRQs */ | ||
446 | writel(0xffffffffU, VA_CMIC_BASE + IRQ_ENABLE_CLEAR); | ||
447 | of_irq_init(fpga_irq_of_match); | ||
448 | integrator_clk_init(false); | ||
449 | } | ||
450 | |||
451 | /* For the Device Tree, add in the UART callbacks as AUXDATA */ | ||
452 | static struct of_dev_auxdata ap_auxdata_lookup[] __initdata = { | ||
453 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_RTC_BASE, | ||
454 | "rtc", NULL), | ||
455 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_UART0_BASE, | ||
456 | "uart0", &integrator_uart_data), | ||
457 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_UART1_BASE, | ||
458 | "uart1", &integrator_uart_data), | ||
459 | OF_DEV_AUXDATA("arm,primecell", KMI0_BASE, | ||
460 | "kmi0", NULL), | ||
461 | OF_DEV_AUXDATA("arm,primecell", KMI1_BASE, | ||
462 | "kmi1", NULL), | ||
463 | OF_DEV_AUXDATA("cfi-flash", INTEGRATOR_FLASH_BASE, | ||
464 | "physmap-flash", &ap_flash_data), | ||
465 | { /* sentinel */ }, | ||
466 | }; | ||
467 | |||
468 | static void __init ap_init_of(void) | ||
469 | { | ||
470 | unsigned long sc_dec; | ||
471 | int i; | ||
472 | |||
473 | of_platform_populate(NULL, of_default_bus_match_table, | ||
474 | ap_auxdata_lookup, NULL); | ||
475 | |||
476 | sc_dec = readl(VA_SC_BASE + INTEGRATOR_SC_DEC_OFFSET); | ||
477 | for (i = 0; i < 4; i++) { | ||
478 | struct lm_device *lmdev; | ||
479 | |||
480 | if ((sc_dec & (16 << i)) == 0) | ||
481 | continue; | ||
482 | |||
483 | lmdev = kzalloc(sizeof(struct lm_device), GFP_KERNEL); | ||
484 | if (!lmdev) | ||
485 | continue; | ||
486 | |||
487 | lmdev->resource.start = 0xc0000000 + 0x10000000 * i; | ||
488 | lmdev->resource.end = lmdev->resource.start + 0x0fffffff; | ||
489 | lmdev->resource.flags = IORESOURCE_MEM; | ||
490 | lmdev->irq = IRQ_AP_EXPINT0 + i; | ||
491 | lmdev->id = i; | ||
492 | |||
493 | lm_device_register(lmdev); | ||
494 | } | ||
495 | } | ||
496 | |||
497 | static const char * ap_dt_board_compat[] = { | ||
498 | "arm,integrator-ap", | ||
499 | NULL, | ||
500 | }; | ||
501 | |||
502 | DT_MACHINE_START(INTEGRATOR_AP_DT, "ARM Integrator/AP (Device Tree)") | ||
503 | .reserve = integrator_reserve, | ||
504 | .map_io = ap_map_io, | ||
505 | .nr_irqs = NR_IRQS_INTEGRATOR_AP, | ||
506 | .init_early = ap_init_early, | ||
507 | .init_irq = ap_init_irq_of, | ||
508 | .handle_irq = fpga_handle_irq, | ||
509 | .timer = &ap_of_timer, | ||
510 | .init_machine = ap_init_of, | ||
511 | .restart = integrator_restart, | ||
512 | .dt_compat = ap_dt_board_compat, | ||
513 | MACHINE_END | ||
514 | |||
515 | #endif | ||
516 | |||
517 | #ifdef CONFIG_ATAGS | ||
518 | |||
449 | /* | 519 | /* |
450 | * Set up timer(s). | 520 | * This is where non-devicetree initialization code is collected and stashed |
521 | * for eventual deletion. | ||
451 | */ | 522 | */ |
523 | |||
524 | static struct resource cfi_flash_resource = { | ||
525 | .start = INTEGRATOR_FLASH_BASE, | ||
526 | .end = INTEGRATOR_FLASH_BASE + INTEGRATOR_FLASH_SIZE - 1, | ||
527 | .flags = IORESOURCE_MEM, | ||
528 | }; | ||
529 | |||
530 | static struct platform_device cfi_flash_device = { | ||
531 | .name = "physmap-flash", | ||
532 | .id = 0, | ||
533 | .dev = { | ||
534 | .platform_data = &ap_flash_data, | ||
535 | }, | ||
536 | .num_resources = 1, | ||
537 | .resource = &cfi_flash_resource, | ||
538 | }; | ||
539 | |||
452 | static void __init ap_init_timer(void) | 540 | static void __init ap_init_timer(void) |
453 | { | 541 | { |
454 | struct clk *clk; | 542 | struct clk *clk; |
@@ -456,21 +544,69 @@ static void __init ap_init_timer(void) | |||
456 | 544 | ||
457 | clk = clk_get_sys("ap_timer", NULL); | 545 | clk = clk_get_sys("ap_timer", NULL); |
458 | BUG_ON(IS_ERR(clk)); | 546 | BUG_ON(IS_ERR(clk)); |
459 | clk_enable(clk); | 547 | clk_prepare_enable(clk); |
460 | rate = clk_get_rate(clk); | 548 | rate = clk_get_rate(clk); |
461 | 549 | ||
462 | writel(0, TIMER0_VA_BASE + TIMER_CTRL); | 550 | writel(0, TIMER0_VA_BASE + TIMER_CTRL); |
463 | writel(0, TIMER1_VA_BASE + TIMER_CTRL); | 551 | writel(0, TIMER1_VA_BASE + TIMER_CTRL); |
464 | writel(0, TIMER2_VA_BASE + TIMER_CTRL); | 552 | writel(0, TIMER2_VA_BASE + TIMER_CTRL); |
465 | 553 | ||
466 | integrator_clocksource_init(rate); | 554 | integrator_clocksource_init(rate, (void __iomem *)TIMER2_VA_BASE); |
467 | integrator_clockevent_init(rate); | 555 | integrator_clockevent_init(rate, (void __iomem *)TIMER1_VA_BASE, |
556 | IRQ_TIMERINT1); | ||
468 | } | 557 | } |
469 | 558 | ||
470 | static struct sys_timer ap_timer = { | 559 | static struct sys_timer ap_timer = { |
471 | .init = ap_init_timer, | 560 | .init = ap_init_timer, |
472 | }; | 561 | }; |
473 | 562 | ||
563 | #define INTEGRATOR_SC_VALID_INT 0x003fffff | ||
564 | |||
565 | static void __init ap_init_irq(void) | ||
566 | { | ||
567 | /* Disable all interrupts initially. */ | ||
568 | /* Do the core module ones */ | ||
569 | writel(-1, VA_CMIC_BASE + IRQ_ENABLE_CLEAR); | ||
570 | |||
571 | /* do the header card stuff next */ | ||
572 | writel(-1, VA_IC_BASE + IRQ_ENABLE_CLEAR); | ||
573 | writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR); | ||
574 | |||
575 | fpga_irq_init(VA_IC_BASE, "SC", IRQ_PIC_START, | ||
576 | -1, INTEGRATOR_SC_VALID_INT, NULL); | ||
577 | integrator_clk_init(false); | ||
578 | } | ||
579 | |||
580 | static void __init ap_init(void) | ||
581 | { | ||
582 | unsigned long sc_dec; | ||
583 | int i; | ||
584 | |||
585 | platform_device_register(&cfi_flash_device); | ||
586 | |||
587 | sc_dec = readl(VA_SC_BASE + INTEGRATOR_SC_DEC_OFFSET); | ||
588 | for (i = 0; i < 4; i++) { | ||
589 | struct lm_device *lmdev; | ||
590 | |||
591 | if ((sc_dec & (16 << i)) == 0) | ||
592 | continue; | ||
593 | |||
594 | lmdev = kzalloc(sizeof(struct lm_device), GFP_KERNEL); | ||
595 | if (!lmdev) | ||
596 | continue; | ||
597 | |||
598 | lmdev->resource.start = 0xc0000000 + 0x10000000 * i; | ||
599 | lmdev->resource.end = lmdev->resource.start + 0x0fffffff; | ||
600 | lmdev->resource.flags = IORESOURCE_MEM; | ||
601 | lmdev->irq = IRQ_AP_EXPINT0 + i; | ||
602 | lmdev->id = i; | ||
603 | |||
604 | lm_device_register(lmdev); | ||
605 | } | ||
606 | |||
607 | integrator_init(false); | ||
608 | } | ||
609 | |||
474 | MACHINE_START(INTEGRATOR, "ARM-Integrator") | 610 | MACHINE_START(INTEGRATOR, "ARM-Integrator") |
475 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 611 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
476 | .atag_offset = 0x100, | 612 | .atag_offset = 0x100, |
@@ -484,3 +620,5 @@ MACHINE_START(INTEGRATOR, "ARM-Integrator") | |||
484 | .init_machine = ap_init, | 620 | .init_machine = ap_init, |
485 | .restart = integrator_restart, | 621 | .restart = integrator_restart, |
486 | MACHINE_END | 622 | MACHINE_END |
623 | |||
624 | #endif | ||
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 82d5c837cc74..f51363e2d6fe 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -23,6 +23,9 @@ | |||
23 | #include <linux/gfp.h> | 23 | #include <linux/gfp.h> |
24 | #include <linux/mtd/physmap.h> | 24 | #include <linux/mtd/physmap.h> |
25 | #include <linux/platform_data/clk-integrator.h> | 25 | #include <linux/platform_data/clk-integrator.h> |
26 | #include <linux/of_irq.h> | ||
27 | #include <linux/of_address.h> | ||
28 | #include <linux/of_platform.h> | ||
26 | 29 | ||
27 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
28 | #include <mach/platform.h> | 31 | #include <mach/platform.h> |
@@ -49,16 +52,9 @@ | |||
49 | #include "common.h" | 52 | #include "common.h" |
50 | 53 | ||
51 | #define INTCP_PA_FLASH_BASE 0x24000000 | 54 | #define INTCP_PA_FLASH_BASE 0x24000000 |
52 | #define INTCP_FLASH_SIZE SZ_32M | ||
53 | 55 | ||
54 | #define INTCP_PA_CLCD_BASE 0xc0000000 | 56 | #define INTCP_PA_CLCD_BASE 0xc0000000 |
55 | 57 | ||
56 | #define INTCP_VA_CIC_BASE __io_address(INTEGRATOR_HDR_BASE + 0x40) | ||
57 | #define INTCP_VA_PIC_BASE __io_address(INTEGRATOR_IC_BASE) | ||
58 | #define INTCP_VA_SIC_BASE __io_address(INTEGRATOR_CP_SIC_BASE) | ||
59 | |||
60 | #define INTCP_ETH_SIZE 0x10 | ||
61 | |||
62 | #define INTCP_VA_CTRL_BASE IO_ADDRESS(INTEGRATOR_CP_CTL_BASE) | 58 | #define INTCP_VA_CTRL_BASE IO_ADDRESS(INTEGRATOR_CP_CTL_BASE) |
63 | #define INTCP_FLASHPROG 0x04 | 59 | #define INTCP_FLASHPROG 0x04 |
64 | #define CINTEGRATOR_FLASHPROG_FLVPPEN (1 << 0) | 60 | #define CINTEGRATOR_FLASHPROG_FLVPPEN (1 << 0) |
@@ -143,37 +139,6 @@ static void __init intcp_map_io(void) | |||
143 | iotable_init(intcp_io_desc, ARRAY_SIZE(intcp_io_desc)); | 139 | iotable_init(intcp_io_desc, ARRAY_SIZE(intcp_io_desc)); |
144 | } | 140 | } |
145 | 141 | ||
146 | static void __init intcp_init_irq(void) | ||
147 | { | ||
148 | u32 pic_mask, cic_mask, sic_mask; | ||
149 | |||
150 | /* These masks are for the HW IRQ registers */ | ||
151 | pic_mask = ~((~0u) << (11 - IRQ_PIC_START)); | ||
152 | pic_mask |= (~((~0u) << (29 - 22))) << 22; | ||
153 | cic_mask = ~((~0u) << (1 + IRQ_CIC_END - IRQ_CIC_START)); | ||
154 | sic_mask = ~((~0u) << (1 + IRQ_SIC_END - IRQ_SIC_START)); | ||
155 | |||
156 | /* | ||
157 | * Disable all interrupt sources | ||
158 | */ | ||
159 | writel(0xffffffff, INTCP_VA_PIC_BASE + IRQ_ENABLE_CLEAR); | ||
160 | writel(0xffffffff, INTCP_VA_PIC_BASE + FIQ_ENABLE_CLEAR); | ||
161 | writel(0xffffffff, INTCP_VA_CIC_BASE + IRQ_ENABLE_CLEAR); | ||
162 | writel(0xffffffff, INTCP_VA_CIC_BASE + FIQ_ENABLE_CLEAR); | ||
163 | writel(sic_mask, INTCP_VA_SIC_BASE + IRQ_ENABLE_CLEAR); | ||
164 | writel(sic_mask, INTCP_VA_SIC_BASE + FIQ_ENABLE_CLEAR); | ||
165 | |||
166 | fpga_irq_init(INTCP_VA_PIC_BASE, "PIC", IRQ_PIC_START, | ||
167 | -1, pic_mask, NULL); | ||
168 | |||
169 | fpga_irq_init(INTCP_VA_CIC_BASE, "CIC", IRQ_CIC_START, | ||
170 | -1, cic_mask, NULL); | ||
171 | |||
172 | fpga_irq_init(INTCP_VA_SIC_BASE, "SIC", IRQ_SIC_START, | ||
173 | IRQ_CP_CPPLDINT, sic_mask, NULL); | ||
174 | integrator_clk_init(true); | ||
175 | } | ||
176 | |||
177 | /* | 142 | /* |
178 | * Flash handling. | 143 | * Flash handling. |
179 | */ | 144 | */ |
@@ -216,47 +181,6 @@ static struct physmap_flash_data intcp_flash_data = { | |||
216 | .set_vpp = intcp_flash_set_vpp, | 181 | .set_vpp = intcp_flash_set_vpp, |
217 | }; | 182 | }; |
218 | 183 | ||
219 | static struct resource intcp_flash_resource = { | ||
220 | .start = INTCP_PA_FLASH_BASE, | ||
221 | .end = INTCP_PA_FLASH_BASE + INTCP_FLASH_SIZE - 1, | ||
222 | .flags = IORESOURCE_MEM, | ||
223 | }; | ||
224 | |||
225 | static struct platform_device intcp_flash_device = { | ||
226 | .name = "physmap-flash", | ||
227 | .id = 0, | ||
228 | .dev = { | ||
229 | .platform_data = &intcp_flash_data, | ||
230 | }, | ||
231 | .num_resources = 1, | ||
232 | .resource = &intcp_flash_resource, | ||
233 | }; | ||
234 | |||
235 | static struct resource smc91x_resources[] = { | ||
236 | [0] = { | ||
237 | .start = INTEGRATOR_CP_ETH_BASE, | ||
238 | .end = INTEGRATOR_CP_ETH_BASE + INTCP_ETH_SIZE - 1, | ||
239 | .flags = IORESOURCE_MEM, | ||
240 | }, | ||
241 | [1] = { | ||
242 | .start = IRQ_CP_ETHINT, | ||
243 | .end = IRQ_CP_ETHINT, | ||
244 | .flags = IORESOURCE_IRQ, | ||
245 | }, | ||
246 | }; | ||
247 | |||
248 | static struct platform_device smc91x_device = { | ||
249 | .name = "smc91x", | ||
250 | .id = 0, | ||
251 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
252 | .resource = smc91x_resources, | ||
253 | }; | ||
254 | |||
255 | static struct platform_device *intcp_devs[] __initdata = { | ||
256 | &intcp_flash_device, | ||
257 | &smc91x_device, | ||
258 | }; | ||
259 | |||
260 | /* | 184 | /* |
261 | * It seems that the card insertion interrupt remains active after | 185 | * It seems that the card insertion interrupt remains active after |
262 | * we've acknowledged it. We therefore ignore the interrupt, and | 186 | * we've acknowledged it. We therefore ignore the interrupt, and |
@@ -278,16 +202,6 @@ static struct mmci_platform_data mmc_data = { | |||
278 | .gpio_cd = -1, | 202 | .gpio_cd = -1, |
279 | }; | 203 | }; |
280 | 204 | ||
281 | #define INTEGRATOR_CP_MMC_IRQS { IRQ_CP_MMCIINT0, IRQ_CP_MMCIINT1 } | ||
282 | #define INTEGRATOR_CP_AACI_IRQS { IRQ_CP_AACIINT } | ||
283 | |||
284 | static AMBA_APB_DEVICE(mmc, "mmci", 0, INTEGRATOR_CP_MMC_BASE, | ||
285 | INTEGRATOR_CP_MMC_IRQS, &mmc_data); | ||
286 | |||
287 | static AMBA_APB_DEVICE(aaci, "aaci", 0, INTEGRATOR_CP_AACI_BASE, | ||
288 | INTEGRATOR_CP_AACI_IRQS, NULL); | ||
289 | |||
290 | |||
291 | /* | 205 | /* |
292 | * CLCD support | 206 | * CLCD support |
293 | */ | 207 | */ |
@@ -338,15 +252,6 @@ static struct clcd_board clcd_data = { | |||
338 | .remove = versatile_clcd_remove_dma, | 252 | .remove = versatile_clcd_remove_dma, |
339 | }; | 253 | }; |
340 | 254 | ||
341 | static AMBA_AHB_DEVICE(clcd, "clcd", 0, INTCP_PA_CLCD_BASE, | ||
342 | { IRQ_CP_CLCDCINT }, &clcd_data); | ||
343 | |||
344 | static struct amba_device *amba_devs[] __initdata = { | ||
345 | &mmc_device, | ||
346 | &aaci_device, | ||
347 | &clcd_device, | ||
348 | }; | ||
349 | |||
350 | #define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28) | 255 | #define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28) |
351 | 256 | ||
352 | static void __init intcp_init_early(void) | 257 | static void __init intcp_init_early(void) |
@@ -356,16 +261,193 @@ static void __init intcp_init_early(void) | |||
356 | #endif | 261 | #endif |
357 | } | 262 | } |
358 | 263 | ||
359 | static void __init intcp_init(void) | 264 | static void __init intcp_timer_init_of(void) |
360 | { | 265 | { |
361 | int i; | 266 | struct device_node *node; |
267 | const char *path; | ||
268 | void __iomem *base; | ||
269 | int err; | ||
270 | int irq; | ||
271 | |||
272 | err = of_property_read_string(of_aliases, | ||
273 | "arm,timer-primary", &path); | ||
274 | if (WARN_ON(err)) | ||
275 | return; | ||
276 | node = of_find_node_by_path(path); | ||
277 | base = of_iomap(node, 0); | ||
278 | if (WARN_ON(!base)) | ||
279 | return; | ||
280 | writel(0, base + TIMER_CTRL); | ||
281 | sp804_clocksource_init(base, node->name); | ||
282 | |||
283 | err = of_property_read_string(of_aliases, | ||
284 | "arm,timer-secondary", &path); | ||
285 | if (WARN_ON(err)) | ||
286 | return; | ||
287 | node = of_find_node_by_path(path); | ||
288 | base = of_iomap(node, 0); | ||
289 | if (WARN_ON(!base)) | ||
290 | return; | ||
291 | irq = irq_of_parse_and_map(node, 0); | ||
292 | writel(0, base + TIMER_CTRL); | ||
293 | sp804_clockevents_init(base, irq, node->name); | ||
294 | } | ||
362 | 295 | ||
363 | platform_add_devices(intcp_devs, ARRAY_SIZE(intcp_devs)); | 296 | static struct sys_timer cp_of_timer = { |
297 | .init = intcp_timer_init_of, | ||
298 | }; | ||
364 | 299 | ||
365 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | 300 | #ifdef CONFIG_OF |
366 | struct amba_device *d = amba_devs[i]; | 301 | |
367 | amba_device_register(d, &iomem_resource); | 302 | static const struct of_device_id fpga_irq_of_match[] __initconst = { |
368 | } | 303 | { .compatible = "arm,versatile-fpga-irq", .data = fpga_irq_of_init, }, |
304 | { /* Sentinel */ } | ||
305 | }; | ||
306 | |||
307 | static void __init intcp_init_irq_of(void) | ||
308 | { | ||
309 | of_irq_init(fpga_irq_of_match); | ||
310 | integrator_clk_init(true); | ||
311 | } | ||
312 | |||
313 | /* | ||
314 | * For the Device Tree, add in the UART, MMC and CLCD specifics as AUXDATA | ||
315 | * and enforce the bus names since these are used for clock lookups. | ||
316 | */ | ||
317 | static struct of_dev_auxdata intcp_auxdata_lookup[] __initdata = { | ||
318 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_RTC_BASE, | ||
319 | "rtc", NULL), | ||
320 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_UART0_BASE, | ||
321 | "uart0", &integrator_uart_data), | ||
322 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_UART1_BASE, | ||
323 | "uart1", &integrator_uart_data), | ||
324 | OF_DEV_AUXDATA("arm,primecell", KMI0_BASE, | ||
325 | "kmi0", NULL), | ||
326 | OF_DEV_AUXDATA("arm,primecell", KMI1_BASE, | ||
327 | "kmi1", NULL), | ||
328 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_CP_MMC_BASE, | ||
329 | "mmci", &mmc_data), | ||
330 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_CP_AACI_BASE, | ||
331 | "aaci", &mmc_data), | ||
332 | OF_DEV_AUXDATA("arm,primecell", INTCP_PA_CLCD_BASE, | ||
333 | "clcd", &clcd_data), | ||
334 | OF_DEV_AUXDATA("cfi-flash", INTCP_PA_FLASH_BASE, | ||
335 | "physmap-flash", &intcp_flash_data), | ||
336 | { /* sentinel */ }, | ||
337 | }; | ||
338 | |||
339 | static void __init intcp_init_of(void) | ||
340 | { | ||
341 | of_platform_populate(NULL, of_default_bus_match_table, | ||
342 | intcp_auxdata_lookup, NULL); | ||
343 | } | ||
344 | |||
345 | static const char * intcp_dt_board_compat[] = { | ||
346 | "arm,integrator-cp", | ||
347 | NULL, | ||
348 | }; | ||
349 | |||
350 | DT_MACHINE_START(INTEGRATOR_CP_DT, "ARM Integrator/CP (Device Tree)") | ||
351 | .reserve = integrator_reserve, | ||
352 | .map_io = intcp_map_io, | ||
353 | .nr_irqs = NR_IRQS_INTEGRATOR_CP, | ||
354 | .init_early = intcp_init_early, | ||
355 | .init_irq = intcp_init_irq_of, | ||
356 | .handle_irq = fpga_handle_irq, | ||
357 | .timer = &cp_of_timer, | ||
358 | .init_machine = intcp_init_of, | ||
359 | .restart = integrator_restart, | ||
360 | .dt_compat = intcp_dt_board_compat, | ||
361 | MACHINE_END | ||
362 | |||
363 | #endif | ||
364 | |||
365 | #ifdef CONFIG_ATAGS | ||
366 | |||
367 | /* | ||
368 | * This is where non-devicetree initialization code is collected and stashed | ||
369 | * for eventual deletion. | ||
370 | */ | ||
371 | |||
372 | #define INTCP_FLASH_SIZE SZ_32M | ||
373 | |||
374 | static struct resource intcp_flash_resource = { | ||
375 | .start = INTCP_PA_FLASH_BASE, | ||
376 | .end = INTCP_PA_FLASH_BASE + INTCP_FLASH_SIZE - 1, | ||
377 | .flags = IORESOURCE_MEM, | ||
378 | }; | ||
379 | |||
380 | static struct platform_device intcp_flash_device = { | ||
381 | .name = "physmap-flash", | ||
382 | .id = 0, | ||
383 | .dev = { | ||
384 | .platform_data = &intcp_flash_data, | ||
385 | }, | ||
386 | .num_resources = 1, | ||
387 | .resource = &intcp_flash_resource, | ||
388 | }; | ||
389 | |||
390 | #define INTCP_ETH_SIZE 0x10 | ||
391 | |||
392 | static struct resource smc91x_resources[] = { | ||
393 | [0] = { | ||
394 | .start = INTEGRATOR_CP_ETH_BASE, | ||
395 | .end = INTEGRATOR_CP_ETH_BASE + INTCP_ETH_SIZE - 1, | ||
396 | .flags = IORESOURCE_MEM, | ||
397 | }, | ||
398 | [1] = { | ||
399 | .start = IRQ_CP_ETHINT, | ||
400 | .end = IRQ_CP_ETHINT, | ||
401 | .flags = IORESOURCE_IRQ, | ||
402 | }, | ||
403 | }; | ||
404 | |||
405 | static struct platform_device smc91x_device = { | ||
406 | .name = "smc91x", | ||
407 | .id = 0, | ||
408 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
409 | .resource = smc91x_resources, | ||
410 | }; | ||
411 | |||
412 | static struct platform_device *intcp_devs[] __initdata = { | ||
413 | &intcp_flash_device, | ||
414 | &smc91x_device, | ||
415 | }; | ||
416 | |||
417 | #define INTCP_VA_CIC_BASE __io_address(INTEGRATOR_HDR_BASE + 0x40) | ||
418 | #define INTCP_VA_PIC_BASE __io_address(INTEGRATOR_IC_BASE) | ||
419 | #define INTCP_VA_SIC_BASE __io_address(INTEGRATOR_CP_SIC_BASE) | ||
420 | |||
421 | static void __init intcp_init_irq(void) | ||
422 | { | ||
423 | u32 pic_mask, cic_mask, sic_mask; | ||
424 | |||
425 | /* These masks are for the HW IRQ registers */ | ||
426 | pic_mask = ~((~0u) << (11 - IRQ_PIC_START)); | ||
427 | pic_mask |= (~((~0u) << (29 - 22))) << 22; | ||
428 | cic_mask = ~((~0u) << (1 + IRQ_CIC_END - IRQ_CIC_START)); | ||
429 | sic_mask = ~((~0u) << (1 + IRQ_SIC_END - IRQ_SIC_START)); | ||
430 | |||
431 | /* | ||
432 | * Disable all interrupt sources | ||
433 | */ | ||
434 | writel(0xffffffff, INTCP_VA_PIC_BASE + IRQ_ENABLE_CLEAR); | ||
435 | writel(0xffffffff, INTCP_VA_PIC_BASE + FIQ_ENABLE_CLEAR); | ||
436 | writel(0xffffffff, INTCP_VA_CIC_BASE + IRQ_ENABLE_CLEAR); | ||
437 | writel(0xffffffff, INTCP_VA_CIC_BASE + FIQ_ENABLE_CLEAR); | ||
438 | writel(sic_mask, INTCP_VA_SIC_BASE + IRQ_ENABLE_CLEAR); | ||
439 | writel(sic_mask, INTCP_VA_SIC_BASE + FIQ_ENABLE_CLEAR); | ||
440 | |||
441 | fpga_irq_init(INTCP_VA_PIC_BASE, "PIC", IRQ_PIC_START, | ||
442 | -1, pic_mask, NULL); | ||
443 | |||
444 | fpga_irq_init(INTCP_VA_CIC_BASE, "CIC", IRQ_CIC_START, | ||
445 | -1, cic_mask, NULL); | ||
446 | |||
447 | fpga_irq_init(INTCP_VA_SIC_BASE, "SIC", IRQ_SIC_START, | ||
448 | IRQ_CP_CPPLDINT, sic_mask, NULL); | ||
449 | |||
450 | integrator_clk_init(true); | ||
369 | } | 451 | } |
370 | 452 | ||
371 | #define TIMER0_VA_BASE __io_address(INTEGRATOR_TIMER0_BASE) | 453 | #define TIMER0_VA_BASE __io_address(INTEGRATOR_TIMER0_BASE) |
@@ -386,6 +468,37 @@ static struct sys_timer cp_timer = { | |||
386 | .init = intcp_timer_init, | 468 | .init = intcp_timer_init, |
387 | }; | 469 | }; |
388 | 470 | ||
471 | #define INTEGRATOR_CP_MMC_IRQS { IRQ_CP_MMCIINT0, IRQ_CP_MMCIINT1 } | ||
472 | #define INTEGRATOR_CP_AACI_IRQS { IRQ_CP_AACIINT } | ||
473 | |||
474 | static AMBA_APB_DEVICE(mmc, "mmci", 0, INTEGRATOR_CP_MMC_BASE, | ||
475 | INTEGRATOR_CP_MMC_IRQS, &mmc_data); | ||
476 | |||
477 | static AMBA_APB_DEVICE(aaci, "aaci", 0, INTEGRATOR_CP_AACI_BASE, | ||
478 | INTEGRATOR_CP_AACI_IRQS, NULL); | ||
479 | |||
480 | static AMBA_AHB_DEVICE(clcd, "clcd", 0, INTCP_PA_CLCD_BASE, | ||
481 | { IRQ_CP_CLCDCINT }, &clcd_data); | ||
482 | |||
483 | static struct amba_device *amba_devs[] __initdata = { | ||
484 | &mmc_device, | ||
485 | &aaci_device, | ||
486 | &clcd_device, | ||
487 | }; | ||
488 | |||
489 | static void __init intcp_init(void) | ||
490 | { | ||
491 | int i; | ||
492 | |||
493 | platform_add_devices(intcp_devs, ARRAY_SIZE(intcp_devs)); | ||
494 | |||
495 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | ||
496 | struct amba_device *d = amba_devs[i]; | ||
497 | amba_device_register(d, &iomem_resource); | ||
498 | } | ||
499 | integrator_init(true); | ||
500 | } | ||
501 | |||
389 | MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP") | 502 | MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP") |
390 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 503 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
391 | .atag_offset = 0x100, | 504 | .atag_offset = 0x100, |
@@ -399,3 +512,5 @@ MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP") | |||
399 | .init_machine = intcp_init, | 512 | .init_machine = intcp_init, |
400 | .restart = integrator_restart, | 513 | .restart = integrator_restart, |
401 | MACHINE_END | 514 | MACHINE_END |
515 | |||
516 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/Makefile.boot b/arch/arm/mach-kirkwood/Makefile.boot index 2a576abf409b..a13299d758e1 100644 --- a/arch/arm/mach-kirkwood/Makefile.boot +++ b/arch/arm/mach-kirkwood/Makefile.boot | |||
@@ -7,7 +7,8 @@ dtb-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += kirkwood-dns320.dtb | |||
7 | dtb-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += kirkwood-dns325.dtb | 7 | dtb-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += kirkwood-dns325.dtb |
8 | dtb-$(CONFIG_MACH_ICONNECT_DT) += kirkwood-iconnect.dtb | 8 | dtb-$(CONFIG_MACH_ICONNECT_DT) += kirkwood-iconnect.dtb |
9 | dtb-$(CONFIG_MACH_IB62X0_DT) += kirkwood-ib62x0.dtb | 9 | dtb-$(CONFIG_MACH_IB62X0_DT) += kirkwood-ib62x0.dtb |
10 | dtb-$(CONFIG_MACH_TS219_DT) += kirkwood-qnap-ts219.dtb | 10 | dtb-$(CONFIG_MACH_TS219_DT) += kirkwood-ts219-6281.dtb |
11 | dtb-$(CONFIG_MACH_TS219_DT) += kirkwood-ts219-6282.dtb | ||
11 | dtb-$(CONFIG_MACH_GOFLEXNET_DT) += kirkwood-goflexnet.dtb | 12 | dtb-$(CONFIG_MACH_GOFLEXNET_DT) += kirkwood-goflexnet.dtb |
12 | dbt-$(CONFIG_MACH_LSXL_DT) += kirkwood-lschlv2.dtb | 13 | dtb-$(CONFIG_MACH_LSXL_DT) += kirkwood-lschlv2.dtb |
13 | dbt-$(CONFIG_MACH_LSXL_DT) += kirkwood-lsxhl.dtb | 14 | dtb-$(CONFIG_MACH_LSXL_DT) += kirkwood-lsxhl.dtb |
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index c4b64adcbfce..1201191d7f1b 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -301,7 +301,7 @@ void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data) | |||
301 | { | 301 | { |
302 | orion_ge00_init(eth_data, | 302 | orion_ge00_init(eth_data, |
303 | GE00_PHYS_BASE, IRQ_KIRKWOOD_GE00_SUM, | 303 | GE00_PHYS_BASE, IRQ_KIRKWOOD_GE00_SUM, |
304 | IRQ_KIRKWOOD_GE00_ERR); | 304 | IRQ_KIRKWOOD_GE00_ERR, 1600); |
305 | /* The interface forgets the MAC address assigned by u-boot if | 305 | /* The interface forgets the MAC address assigned by u-boot if |
306 | the clock is turned off, so claim the clk now. */ | 306 | the clock is turned off, so claim the clk now. */ |
307 | clk_prepare_enable(ge0); | 307 | clk_prepare_enable(ge0); |
@@ -315,7 +315,7 @@ void __init kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data) | |||
315 | { | 315 | { |
316 | orion_ge01_init(eth_data, | 316 | orion_ge01_init(eth_data, |
317 | GE01_PHYS_BASE, IRQ_KIRKWOOD_GE01_SUM, | 317 | GE01_PHYS_BASE, IRQ_KIRKWOOD_GE01_SUM, |
318 | IRQ_KIRKWOOD_GE01_ERR); | 318 | IRQ_KIRKWOOD_GE01_ERR, 1600); |
319 | clk_prepare_enable(ge1); | 319 | clk_prepare_enable(ge1); |
320 | } | 320 | } |
321 | 321 | ||
@@ -517,6 +517,13 @@ void __init kirkwood_wdt_init(void) | |||
517 | void __init kirkwood_init_early(void) | 517 | void __init kirkwood_init_early(void) |
518 | { | 518 | { |
519 | orion_time_set_base(TIMER_VIRT_BASE); | 519 | orion_time_set_base(TIMER_VIRT_BASE); |
520 | |||
521 | /* | ||
522 | * Some Kirkwood devices allocate their coherent buffers from atomic | ||
523 | * context. Increase size of atomic coherent pool to make sure such | ||
524 | * the allocations won't fail. | ||
525 | */ | ||
526 | init_dma_coherent_pool_size(SZ_1M); | ||
520 | } | 527 | } |
521 | 528 | ||
522 | int kirkwood_tclk; | 529 | int kirkwood_tclk; |
diff --git a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c index d93359379598..be90b7d0e10b 100644 --- a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c +++ b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/sizes.h> | ||
13 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
14 | #include <linux/mtd/partitions.h> | 15 | #include <linux/mtd/partitions.h> |
15 | #include <linux/ata_platform.h> | 16 | #include <linux/ata_platform.h> |
diff --git a/arch/arm/mach-mmp/sram.c b/arch/arm/mach-mmp/sram.c index 4304f9519372..7e8a5a2e1ec7 100644 --- a/arch/arm/mach-mmp/sram.c +++ b/arch/arm/mach-mmp/sram.c | |||
@@ -68,7 +68,7 @@ static int __devinit sram_probe(struct platform_device *pdev) | |||
68 | struct resource *res; | 68 | struct resource *res; |
69 | int ret = 0; | 69 | int ret = 0; |
70 | 70 | ||
71 | if (!pdata && !pdata->pool_name) | 71 | if (!pdata || !pdata->pool_name) |
72 | return -ENODEV; | 72 | return -ENODEV; |
73 | 73 | ||
74 | info = kzalloc(sizeof(*info), GFP_KERNEL); | 74 | info = kzalloc(sizeof(*info), GFP_KERNEL); |
diff --git a/arch/arm/mach-mv78xx0/addr-map.c b/arch/arm/mach-mv78xx0/addr-map.c index 62b53d710efd..a9bc84180d21 100644 --- a/arch/arm/mach-mv78xx0/addr-map.c +++ b/arch/arm/mach-mv78xx0/addr-map.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #define WIN0_OFF(n) (BRIDGE_VIRT_BASE + 0x0000 + ((n) << 4)) | 37 | #define WIN0_OFF(n) (BRIDGE_VIRT_BASE + 0x0000 + ((n) << 4)) |
38 | #define WIN8_OFF(n) (BRIDGE_VIRT_BASE + 0x0900 + (((n) - 8) << 4)) | 38 | #define WIN8_OFF(n) (BRIDGE_VIRT_BASE + 0x0900 + (((n) - 8) << 4)) |
39 | 39 | ||
40 | static void __init __iomem *win_cfg_base(int win) | 40 | static void __init __iomem *win_cfg_base(const struct orion_addr_map_cfg *cfg, int win) |
41 | { | 41 | { |
42 | /* | 42 | /* |
43 | * Find the control register base address for this window. | 43 | * Find the control register base address for this window. |
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c index b4c53b846c9c..3057f7d4329a 100644 --- a/arch/arm/mach-mv78xx0/common.c +++ b/arch/arm/mach-mv78xx0/common.c | |||
@@ -213,7 +213,8 @@ void __init mv78xx0_ge00_init(struct mv643xx_eth_platform_data *eth_data) | |||
213 | { | 213 | { |
214 | orion_ge00_init(eth_data, | 214 | orion_ge00_init(eth_data, |
215 | GE00_PHYS_BASE, IRQ_MV78XX0_GE00_SUM, | 215 | GE00_PHYS_BASE, IRQ_MV78XX0_GE00_SUM, |
216 | IRQ_MV78XX0_GE_ERR); | 216 | IRQ_MV78XX0_GE_ERR, |
217 | MV643XX_TX_CSUM_DEFAULT_LIMIT); | ||
217 | } | 218 | } |
218 | 219 | ||
219 | 220 | ||
@@ -224,7 +225,8 @@ void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data) | |||
224 | { | 225 | { |
225 | orion_ge01_init(eth_data, | 226 | orion_ge01_init(eth_data, |
226 | GE01_PHYS_BASE, IRQ_MV78XX0_GE01_SUM, | 227 | GE01_PHYS_BASE, IRQ_MV78XX0_GE01_SUM, |
227 | NO_IRQ); | 228 | NO_IRQ, |
229 | MV643XX_TX_CSUM_DEFAULT_LIMIT); | ||
228 | } | 230 | } |
229 | 231 | ||
230 | 232 | ||
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index ccdf83b17cf1..9a8bbda195b2 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig | |||
@@ -2,9 +2,6 @@ if ARCH_MXS | |||
2 | 2 | ||
3 | source "arch/arm/mach-mxs/devices/Kconfig" | 3 | source "arch/arm/mach-mxs/devices/Kconfig" |
4 | 4 | ||
5 | config MXS_OCOTP | ||
6 | bool | ||
7 | |||
8 | config SOC_IMX23 | 5 | config SOC_IMX23 |
9 | bool | 6 | bool |
10 | select ARM_AMBA | 7 | select ARM_AMBA |
@@ -66,7 +63,6 @@ config MACH_MX28EVK | |||
66 | select MXS_HAVE_PLATFORM_MXS_SAIF | 63 | select MXS_HAVE_PLATFORM_MXS_SAIF |
67 | select MXS_HAVE_PLATFORM_MXS_I2C | 64 | select MXS_HAVE_PLATFORM_MXS_I2C |
68 | select MXS_HAVE_PLATFORM_RTC_STMP3XXX | 65 | select MXS_HAVE_PLATFORM_RTC_STMP3XXX |
69 | select MXS_OCOTP | ||
70 | help | 66 | help |
71 | Include support for MX28EVK platform. This includes specific | 67 | Include support for MX28EVK platform. This includes specific |
72 | configurations for the board and its peripherals. | 68 | configurations for the board and its peripherals. |
@@ -94,7 +90,6 @@ config MODULE_M28 | |||
94 | select MXS_HAVE_PLATFORM_MXS_I2C | 90 | select MXS_HAVE_PLATFORM_MXS_I2C |
95 | select MXS_HAVE_PLATFORM_MXS_MMC | 91 | select MXS_HAVE_PLATFORM_MXS_MMC |
96 | select MXS_HAVE_PLATFORM_MXSFB | 92 | select MXS_HAVE_PLATFORM_MXSFB |
97 | select MXS_OCOTP | ||
98 | 93 | ||
99 | config MODULE_APX4 | 94 | config MODULE_APX4 |
100 | bool | 95 | bool |
@@ -106,7 +101,6 @@ config MODULE_APX4 | |||
106 | select MXS_HAVE_PLATFORM_MXS_I2C | 101 | select MXS_HAVE_PLATFORM_MXS_I2C |
107 | select MXS_HAVE_PLATFORM_MXS_MMC | 102 | select MXS_HAVE_PLATFORM_MXS_MMC |
108 | select MXS_HAVE_PLATFORM_MXS_SAIF | 103 | select MXS_HAVE_PLATFORM_MXS_SAIF |
109 | select MXS_OCOTP | ||
110 | 104 | ||
111 | config MACH_TX28 | 105 | config MACH_TX28 |
112 | bool "Ka-Ro TX28 module" | 106 | bool "Ka-Ro TX28 module" |
diff --git a/arch/arm/mach-mxs/Makefile b/arch/arm/mach-mxs/Makefile index e41590ccb437..fed3695a1339 100644 --- a/arch/arm/mach-mxs/Makefile +++ b/arch/arm/mach-mxs/Makefile | |||
@@ -1,7 +1,6 @@ | |||
1 | # Common support | 1 | # Common support |
2 | obj-y := devices.o icoll.o iomux.o system.o timer.o mm.o | 2 | obj-y := devices.o icoll.o iomux.o ocotp.o system.o timer.o mm.o |
3 | 3 | ||
4 | obj-$(CONFIG_MXS_OCOTP) += ocotp.o | ||
5 | obj-$(CONFIG_PM) += pm.o | 4 | obj-$(CONFIG_PM) += pm.o |
6 | 5 | ||
7 | obj-$(CONFIG_MACH_MXS_DT) += mach-mxs.o | 6 | obj-$(CONFIG_MACH_MXS_DT) += mach-mxs.o |
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 8dabfe81d07c..ff886e01a0b0 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c | |||
@@ -261,7 +261,7 @@ static void __init apx4devkit_init(void) | |||
261 | enable_clk_enet_out(); | 261 | enable_clk_enet_out(); |
262 | 262 | ||
263 | if (IS_BUILTIN(CONFIG_PHYLIB)) | 263 | if (IS_BUILTIN(CONFIG_PHYLIB)) |
264 | phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK, | 264 | phy_register_fixup_for_uid(PHY_ID_KSZ8051, MICREL_PHY_ID_MASK, |
265 | apx4devkit_phy_fixup); | 265 | apx4devkit_phy_fixup); |
266 | 266 | ||
267 | mxsfb_pdata.mode_list = apx4devkit_video_modes; | 267 | mxsfb_pdata.mode_list = apx4devkit_video_modes; |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index dd2db025f778..346fd26f3aa6 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -62,13 +62,14 @@ config ARCH_OMAP4 | |||
62 | select PM_OPP if PM | 62 | select PM_OPP if PM |
63 | select USB_ARCH_HAS_EHCI if USB_SUPPORT | 63 | select USB_ARCH_HAS_EHCI if USB_SUPPORT |
64 | select ARM_CPU_SUSPEND if PM | 64 | select ARM_CPU_SUSPEND if PM |
65 | select ARCH_NEEDS_CPU_IDLE_COUPLED | 65 | select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP |
66 | 66 | ||
67 | config SOC_OMAP5 | 67 | config SOC_OMAP5 |
68 | bool "TI OMAP5" | 68 | bool "TI OMAP5" |
69 | select CPU_V7 | 69 | select CPU_V7 |
70 | select ARM_GIC | 70 | select ARM_GIC |
71 | select HAVE_SMP | 71 | select HAVE_SMP |
72 | select ARM_CPU_SUSPEND if PM | ||
72 | 73 | ||
73 | comment "OMAP Core Type" | 74 | comment "OMAP Core Type" |
74 | depends on ARCH_OMAP2 | 75 | depends on ARCH_OMAP2 |
@@ -231,10 +232,11 @@ config MACH_OMAP3_PANDORA | |||
231 | select OMAP_PACKAGE_CBB | 232 | select OMAP_PACKAGE_CBB |
232 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 233 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
233 | 234 | ||
234 | config MACH_OMAP3_TOUCHBOOK | 235 | config MACH_TOUCHBOOK |
235 | bool "OMAP3 Touch Book" | 236 | bool "OMAP3 Touch Book" |
236 | depends on ARCH_OMAP3 | 237 | depends on ARCH_OMAP3 |
237 | default y | 238 | default y |
239 | select OMAP_PACKAGE_CBB | ||
238 | 240 | ||
239 | config MACH_OMAP_3430SDP | 241 | config MACH_OMAP_3430SDP |
240 | bool "OMAP 3430 SDP board" | 242 | bool "OMAP 3430 SDP board" |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index f6a24b3f9c4f..34c2c7f59f0a 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -255,7 +255,7 @@ obj-$(CONFIG_MACH_OMAP_3630SDP) += board-zoom-display.o | |||
255 | obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o | 255 | obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o |
256 | obj-$(CONFIG_MACH_CM_T3517) += board-cm-t3517.o | 256 | obj-$(CONFIG_MACH_CM_T3517) += board-cm-t3517.o |
257 | obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o | 257 | obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o |
258 | obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o | 258 | obj-$(CONFIG_MACH_TOUCHBOOK) += board-omap3touchbook.o |
259 | obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o | 259 | obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o |
260 | obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o | 260 | obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o |
261 | 261 | ||
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 74915295482e..28214483aaba 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -554,6 +554,8 @@ static const struct usbhs_omap_board_data igep3_usbhs_bdata __initconst = { | |||
554 | 554 | ||
555 | #ifdef CONFIG_OMAP_MUX | 555 | #ifdef CONFIG_OMAP_MUX |
556 | static struct omap_board_mux board_mux[] __initdata = { | 556 | static struct omap_board_mux board_mux[] __initdata = { |
557 | /* SMSC9221 LAN Controller ETH IRQ (GPIO_176) */ | ||
558 | OMAP3_MUX(MCSPI1_CS2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
557 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 559 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
558 | }; | 560 | }; |
559 | #endif | 561 | #endif |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index ef230a0eb5eb..0d362e9f9cb9 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include "hsmmc.h" | 58 | #include "hsmmc.h" |
59 | #include "common-board-devices.h" | 59 | #include "common-board-devices.h" |
60 | 60 | ||
61 | #define OMAP3_EVM_TS_GPIO 175 | ||
61 | #define OMAP3_EVM_EHCI_VBUS 22 | 62 | #define OMAP3_EVM_EHCI_VBUS 22 |
62 | #define OMAP3_EVM_EHCI_SELECT 61 | 63 | #define OMAP3_EVM_EHCI_SELECT 61 |
63 | 64 | ||
diff --git a/arch/arm/mach-omap2/clock33xx_data.c b/arch/arm/mach-omap2/clock33xx_data.c index 25bbcc7ca4dc..ae27de8899a6 100644 --- a/arch/arm/mach-omap2/clock33xx_data.c +++ b/arch/arm/mach-omap2/clock33xx_data.c | |||
@@ -1036,13 +1036,13 @@ static struct omap_clk am33xx_clks[] = { | |||
1036 | CLK(NULL, "mmu_fck", &mmu_fck, CK_AM33XX), | 1036 | CLK(NULL, "mmu_fck", &mmu_fck, CK_AM33XX), |
1037 | CLK(NULL, "smartreflex0_fck", &smartreflex0_fck, CK_AM33XX), | 1037 | CLK(NULL, "smartreflex0_fck", &smartreflex0_fck, CK_AM33XX), |
1038 | CLK(NULL, "smartreflex1_fck", &smartreflex1_fck, CK_AM33XX), | 1038 | CLK(NULL, "smartreflex1_fck", &smartreflex1_fck, CK_AM33XX), |
1039 | CLK(NULL, "gpt1_fck", &timer1_fck, CK_AM33XX), | 1039 | CLK(NULL, "timer1_fck", &timer1_fck, CK_AM33XX), |
1040 | CLK(NULL, "gpt2_fck", &timer2_fck, CK_AM33XX), | 1040 | CLK(NULL, "timer2_fck", &timer2_fck, CK_AM33XX), |
1041 | CLK(NULL, "gpt3_fck", &timer3_fck, CK_AM33XX), | 1041 | CLK(NULL, "timer3_fck", &timer3_fck, CK_AM33XX), |
1042 | CLK(NULL, "gpt4_fck", &timer4_fck, CK_AM33XX), | 1042 | CLK(NULL, "timer4_fck", &timer4_fck, CK_AM33XX), |
1043 | CLK(NULL, "gpt5_fck", &timer5_fck, CK_AM33XX), | 1043 | CLK(NULL, "timer5_fck", &timer5_fck, CK_AM33XX), |
1044 | CLK(NULL, "gpt6_fck", &timer6_fck, CK_AM33XX), | 1044 | CLK(NULL, "timer6_fck", &timer6_fck, CK_AM33XX), |
1045 | CLK(NULL, "gpt7_fck", &timer7_fck, CK_AM33XX), | 1045 | CLK(NULL, "timer7_fck", &timer7_fck, CK_AM33XX), |
1046 | CLK(NULL, "usbotg_fck", &usbotg_fck, CK_AM33XX), | 1046 | CLK(NULL, "usbotg_fck", &usbotg_fck, CK_AM33XX), |
1047 | CLK(NULL, "ieee5000_fck", &ieee5000_fck, CK_AM33XX), | 1047 | CLK(NULL, "ieee5000_fck", &ieee5000_fck, CK_AM33XX), |
1048 | CLK(NULL, "wdt1_fck", &wdt1_fck, CK_AM33XX), | 1048 | CLK(NULL, "wdt1_fck", &wdt1_fck, CK_AM33XX), |
diff --git a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c index a0d68dbecfa3..f99e65cfb862 100644 --- a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c +++ b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c | |||
@@ -241,6 +241,52 @@ static void omap3_clkdm_deny_idle(struct clockdomain *clkdm) | |||
241 | _clkdm_del_autodeps(clkdm); | 241 | _clkdm_del_autodeps(clkdm); |
242 | } | 242 | } |
243 | 243 | ||
244 | static int omap3xxx_clkdm_clk_enable(struct clockdomain *clkdm) | ||
245 | { | ||
246 | bool hwsup = false; | ||
247 | |||
248 | if (!clkdm->clktrctrl_mask) | ||
249 | return 0; | ||
250 | |||
251 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, | ||
252 | clkdm->clktrctrl_mask); | ||
253 | |||
254 | if (hwsup) { | ||
255 | /* Disable HW transitions when we are changing deps */ | ||
256 | _disable_hwsup(clkdm); | ||
257 | _clkdm_add_autodeps(clkdm); | ||
258 | _enable_hwsup(clkdm); | ||
259 | } else { | ||
260 | if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP) | ||
261 | omap3_clkdm_wakeup(clkdm); | ||
262 | } | ||
263 | |||
264 | return 0; | ||
265 | } | ||
266 | |||
267 | static int omap3xxx_clkdm_clk_disable(struct clockdomain *clkdm) | ||
268 | { | ||
269 | bool hwsup = false; | ||
270 | |||
271 | if (!clkdm->clktrctrl_mask) | ||
272 | return 0; | ||
273 | |||
274 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, | ||
275 | clkdm->clktrctrl_mask); | ||
276 | |||
277 | if (hwsup) { | ||
278 | /* Disable HW transitions when we are changing deps */ | ||
279 | _disable_hwsup(clkdm); | ||
280 | _clkdm_del_autodeps(clkdm); | ||
281 | _enable_hwsup(clkdm); | ||
282 | } else { | ||
283 | if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP) | ||
284 | omap3_clkdm_sleep(clkdm); | ||
285 | } | ||
286 | |||
287 | return 0; | ||
288 | } | ||
289 | |||
244 | struct clkdm_ops omap2_clkdm_operations = { | 290 | struct clkdm_ops omap2_clkdm_operations = { |
245 | .clkdm_add_wkdep = omap2_clkdm_add_wkdep, | 291 | .clkdm_add_wkdep = omap2_clkdm_add_wkdep, |
246 | .clkdm_del_wkdep = omap2_clkdm_del_wkdep, | 292 | .clkdm_del_wkdep = omap2_clkdm_del_wkdep, |
@@ -267,6 +313,6 @@ struct clkdm_ops omap3_clkdm_operations = { | |||
267 | .clkdm_wakeup = omap3_clkdm_wakeup, | 313 | .clkdm_wakeup = omap3_clkdm_wakeup, |
268 | .clkdm_allow_idle = omap3_clkdm_allow_idle, | 314 | .clkdm_allow_idle = omap3_clkdm_allow_idle, |
269 | .clkdm_deny_idle = omap3_clkdm_deny_idle, | 315 | .clkdm_deny_idle = omap3_clkdm_deny_idle, |
270 | .clkdm_clk_enable = omap2_clkdm_clk_enable, | 316 | .clkdm_clk_enable = omap3xxx_clkdm_clk_enable, |
271 | .clkdm_clk_disable = omap2_clkdm_clk_disable, | 317 | .clkdm_clk_disable = omap3xxx_clkdm_clk_disable, |
272 | }; | 318 | }; |
diff --git a/arch/arm/mach-omap2/cm-regbits-34xx.h b/arch/arm/mach-omap2/cm-regbits-34xx.h index 766338fe4d34..975f6bda0e0b 100644 --- a/arch/arm/mach-omap2/cm-regbits-34xx.h +++ b/arch/arm/mach-omap2/cm-regbits-34xx.h | |||
@@ -67,6 +67,7 @@ | |||
67 | #define OMAP3430_EN_IVA2_DPLL_MASK (0x7 << 0) | 67 | #define OMAP3430_EN_IVA2_DPLL_MASK (0x7 << 0) |
68 | 68 | ||
69 | /* CM_IDLEST_IVA2 */ | 69 | /* CM_IDLEST_IVA2 */ |
70 | #define OMAP3430_ST_IVA2_SHIFT 0 | ||
70 | #define OMAP3430_ST_IVA2_MASK (1 << 0) | 71 | #define OMAP3430_ST_IVA2_MASK (1 << 0) |
71 | 72 | ||
72 | /* CM_IDLEST_PLL_IVA2 */ | 73 | /* CM_IDLEST_PLL_IVA2 */ |
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c index 14734746457c..c1875862679f 100644 --- a/arch/arm/mach-omap2/common-board-devices.c +++ b/arch/arm/mach-omap2/common-board-devices.c | |||
@@ -35,16 +35,6 @@ static struct omap2_mcspi_device_config ads7846_mcspi_config = { | |||
35 | .turbo_mode = 0, | 35 | .turbo_mode = 0, |
36 | }; | 36 | }; |
37 | 37 | ||
38 | /* | ||
39 | * ADS7846 driver maybe request a gpio according to the value | ||
40 | * of pdata->get_pendown_state, but we have done this. So set | ||
41 | * get_pendown_state to avoid twice gpio requesting. | ||
42 | */ | ||
43 | static int omap3_get_pendown_state(void) | ||
44 | { | ||
45 | return !gpio_get_value(OMAP3_EVM_TS_GPIO); | ||
46 | } | ||
47 | |||
48 | static struct ads7846_platform_data ads7846_config = { | 38 | static struct ads7846_platform_data ads7846_config = { |
49 | .x_max = 0x0fff, | 39 | .x_max = 0x0fff, |
50 | .y_max = 0x0fff, | 40 | .y_max = 0x0fff, |
@@ -55,7 +45,6 @@ static struct ads7846_platform_data ads7846_config = { | |||
55 | .debounce_rep = 1, | 45 | .debounce_rep = 1, |
56 | .gpio_pendown = -EINVAL, | 46 | .gpio_pendown = -EINVAL, |
57 | .keep_vref_on = 1, | 47 | .keep_vref_on = 1, |
58 | .get_pendown_state = &omap3_get_pendown_state, | ||
59 | }; | 48 | }; |
60 | 49 | ||
61 | static struct spi_board_info ads7846_spi_board_info __initdata = { | 50 | static struct spi_board_info ads7846_spi_board_info __initdata = { |
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h index 4c4ef6a6166b..a0b4a42836ab 100644 --- a/arch/arm/mach-omap2/common-board-devices.h +++ b/arch/arm/mach-omap2/common-board-devices.h | |||
@@ -4,7 +4,6 @@ | |||
4 | #include "twl-common.h" | 4 | #include "twl-common.h" |
5 | 5 | ||
6 | #define NAND_BLOCK_SIZE SZ_128K | 6 | #define NAND_BLOCK_SIZE SZ_128K |
7 | #define OMAP3_EVM_TS_GPIO 175 | ||
8 | 7 | ||
9 | struct mtd_partition; | 8 | struct mtd_partition; |
10 | struct ads7846_platform_data; | 9 | struct ads7846_platform_data; |
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c index ee05e193fc61..288bee6cbb76 100644 --- a/arch/arm/mach-omap2/cpuidle44xx.c +++ b/arch/arm/mach-omap2/cpuidle44xx.c | |||
@@ -238,8 +238,9 @@ int __init omap4_idle_init(void) | |||
238 | for_each_cpu(cpu_id, cpu_online_mask) { | 238 | for_each_cpu(cpu_id, cpu_online_mask) { |
239 | dev = &per_cpu(omap4_idle_dev, cpu_id); | 239 | dev = &per_cpu(omap4_idle_dev, cpu_id); |
240 | dev->cpu = cpu_id; | 240 | dev->cpu = cpu_id; |
241 | #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED | ||
241 | dev->coupled_cpus = *cpu_online_mask; | 242 | dev->coupled_cpus = *cpu_online_mask; |
242 | 243 | #endif | |
243 | cpuidle_register_driver(&omap4_idle_driver); | 244 | cpuidle_register_driver(&omap4_idle_driver); |
244 | 245 | ||
245 | if (cpuidle_register_device(dev)) { | 246 | if (cpuidle_register_device(dev)) { |
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h index 471e62a74a16..76f9b3c2f586 100644 --- a/arch/arm/mach-omap2/mux.h +++ b/arch/arm/mach-omap2/mux.h | |||
@@ -127,7 +127,6 @@ struct omap_mux_partition { | |||
127 | * @gpio: GPIO number | 127 | * @gpio: GPIO number |
128 | * @muxnames: available signal modes for a ball | 128 | * @muxnames: available signal modes for a ball |
129 | * @balls: available balls on the package | 129 | * @balls: available balls on the package |
130 | * @partition: mux partition | ||
131 | */ | 130 | */ |
132 | struct omap_mux { | 131 | struct omap_mux { |
133 | u16 reg_offset; | 132 | u16 reg_offset; |
diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c index 05fdebfaa195..330d4c6e746b 100644 --- a/arch/arm/mach-omap2/omap-wakeupgen.c +++ b/arch/arm/mach-omap2/omap-wakeupgen.c | |||
@@ -46,7 +46,7 @@ | |||
46 | static void __iomem *wakeupgen_base; | 46 | static void __iomem *wakeupgen_base; |
47 | static void __iomem *sar_base; | 47 | static void __iomem *sar_base; |
48 | static DEFINE_SPINLOCK(wakeupgen_lock); | 48 | static DEFINE_SPINLOCK(wakeupgen_lock); |
49 | static unsigned int irq_target_cpu[NR_IRQS]; | 49 | static unsigned int irq_target_cpu[MAX_IRQS]; |
50 | static unsigned int irq_banks = MAX_NR_REG_BANKS; | 50 | static unsigned int irq_banks = MAX_NR_REG_BANKS; |
51 | static unsigned int max_irqs = MAX_IRQS; | 51 | static unsigned int max_irqs = MAX_IRQS; |
52 | static unsigned int omap_secure_apis; | 52 | static unsigned int omap_secure_apis; |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 6ca8e519968d..37afbd173c2c 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -1889,6 +1889,7 @@ static int _enable(struct omap_hwmod *oh) | |||
1889 | _enable_sysc(oh); | 1889 | _enable_sysc(oh); |
1890 | } | 1890 | } |
1891 | } else { | 1891 | } else { |
1892 | _omap4_disable_module(oh); | ||
1892 | _disable_clocks(oh); | 1893 | _disable_clocks(oh); |
1893 | pr_debug("omap_hwmod: %s: _wait_target_ready: %d\n", | 1894 | pr_debug("omap_hwmod: %s: _wait_target_ready: %d\n", |
1894 | oh->name, r); | 1895 | oh->name, r); |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index c9e38200216b..ce7e6068768f 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -100,9 +100,9 @@ static struct omap_hwmod omap3xxx_mpu_hwmod = { | |||
100 | 100 | ||
101 | /* IVA2 (IVA2) */ | 101 | /* IVA2 (IVA2) */ |
102 | static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = { | 102 | static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = { |
103 | { .name = "logic", .rst_shift = 0 }, | 103 | { .name = "logic", .rst_shift = 0, .st_shift = 8 }, |
104 | { .name = "seq0", .rst_shift = 1 }, | 104 | { .name = "seq0", .rst_shift = 1, .st_shift = 9 }, |
105 | { .name = "seq1", .rst_shift = 2 }, | 105 | { .name = "seq1", .rst_shift = 2, .st_shift = 10 }, |
106 | }; | 106 | }; |
107 | 107 | ||
108 | static struct omap_hwmod omap3xxx_iva_hwmod = { | 108 | static struct omap_hwmod omap3xxx_iva_hwmod = { |
@@ -112,6 +112,15 @@ static struct omap_hwmod omap3xxx_iva_hwmod = { | |||
112 | .rst_lines = omap3xxx_iva_resets, | 112 | .rst_lines = omap3xxx_iva_resets, |
113 | .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets), | 113 | .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets), |
114 | .main_clk = "iva2_ck", | 114 | .main_clk = "iva2_ck", |
115 | .prcm = { | ||
116 | .omap2 = { | ||
117 | .module_offs = OMAP3430_IVA2_MOD, | ||
118 | .prcm_reg_id = 1, | ||
119 | .module_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT, | ||
120 | .idlest_reg_id = 1, | ||
121 | .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT, | ||
122 | } | ||
123 | }, | ||
115 | }; | 124 | }; |
116 | 125 | ||
117 | /* timer class */ | 126 | /* timer class */ |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 242aee498ceb..afb60917a948 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -4210,7 +4210,7 @@ static struct omap_hwmod_ocp_if omap44xx_dsp__iva = { | |||
4210 | }; | 4210 | }; |
4211 | 4211 | ||
4212 | /* dsp -> sl2if */ | 4212 | /* dsp -> sl2if */ |
4213 | static struct omap_hwmod_ocp_if omap44xx_dsp__sl2if = { | 4213 | static struct omap_hwmod_ocp_if __maybe_unused omap44xx_dsp__sl2if = { |
4214 | .master = &omap44xx_dsp_hwmod, | 4214 | .master = &omap44xx_dsp_hwmod, |
4215 | .slave = &omap44xx_sl2if_hwmod, | 4215 | .slave = &omap44xx_sl2if_hwmod, |
4216 | .clk = "dpll_iva_m5x2_ck", | 4216 | .clk = "dpll_iva_m5x2_ck", |
@@ -4828,7 +4828,7 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = { | |||
4828 | }; | 4828 | }; |
4829 | 4829 | ||
4830 | /* iva -> sl2if */ | 4830 | /* iva -> sl2if */ |
4831 | static struct omap_hwmod_ocp_if omap44xx_iva__sl2if = { | 4831 | static struct omap_hwmod_ocp_if __maybe_unused omap44xx_iva__sl2if = { |
4832 | .master = &omap44xx_iva_hwmod, | 4832 | .master = &omap44xx_iva_hwmod, |
4833 | .slave = &omap44xx_sl2if_hwmod, | 4833 | .slave = &omap44xx_sl2if_hwmod, |
4834 | .clk = "dpll_iva_m5x2_ck", | 4834 | .clk = "dpll_iva_m5x2_ck", |
@@ -5362,7 +5362,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__scrm = { | |||
5362 | }; | 5362 | }; |
5363 | 5363 | ||
5364 | /* l3_main_2 -> sl2if */ | 5364 | /* l3_main_2 -> sl2if */ |
5365 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__sl2if = { | 5365 | static struct omap_hwmod_ocp_if __maybe_unused omap44xx_l3_main_2__sl2if = { |
5366 | .master = &omap44xx_l3_main_2_hwmod, | 5366 | .master = &omap44xx_l3_main_2_hwmod, |
5367 | .slave = &omap44xx_sl2if_hwmod, | 5367 | .slave = &omap44xx_sl2if_hwmod, |
5368 | .clk = "l3_div_ck", | 5368 | .clk = "l3_div_ck", |
@@ -6032,7 +6032,7 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = { | |||
6032 | &omap44xx_l4_abe__dmic, | 6032 | &omap44xx_l4_abe__dmic, |
6033 | &omap44xx_l4_abe__dmic_dma, | 6033 | &omap44xx_l4_abe__dmic_dma, |
6034 | &omap44xx_dsp__iva, | 6034 | &omap44xx_dsp__iva, |
6035 | &omap44xx_dsp__sl2if, | 6035 | /* &omap44xx_dsp__sl2if, */ |
6036 | &omap44xx_l4_cfg__dsp, | 6036 | &omap44xx_l4_cfg__dsp, |
6037 | &omap44xx_l3_main_2__dss, | 6037 | &omap44xx_l3_main_2__dss, |
6038 | &omap44xx_l4_per__dss, | 6038 | &omap44xx_l4_per__dss, |
@@ -6068,7 +6068,7 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = { | |||
6068 | &omap44xx_l4_per__i2c4, | 6068 | &omap44xx_l4_per__i2c4, |
6069 | &omap44xx_l3_main_2__ipu, | 6069 | &omap44xx_l3_main_2__ipu, |
6070 | &omap44xx_l3_main_2__iss, | 6070 | &omap44xx_l3_main_2__iss, |
6071 | &omap44xx_iva__sl2if, | 6071 | /* &omap44xx_iva__sl2if, */ |
6072 | &omap44xx_l3_main_2__iva, | 6072 | &omap44xx_l3_main_2__iva, |
6073 | &omap44xx_l4_wkup__kbd, | 6073 | &omap44xx_l4_wkup__kbd, |
6074 | &omap44xx_l4_cfg__mailbox, | 6074 | &omap44xx_l4_cfg__mailbox, |
@@ -6099,7 +6099,7 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = { | |||
6099 | &omap44xx_l4_cfg__cm_core, | 6099 | &omap44xx_l4_cfg__cm_core, |
6100 | &omap44xx_l4_wkup__prm, | 6100 | &omap44xx_l4_wkup__prm, |
6101 | &omap44xx_l4_wkup__scrm, | 6101 | &omap44xx_l4_wkup__scrm, |
6102 | &omap44xx_l3_main_2__sl2if, | 6102 | /* &omap44xx_l3_main_2__sl2if, */ |
6103 | &omap44xx_l4_abe__slimbus1, | 6103 | &omap44xx_l4_abe__slimbus1, |
6104 | &omap44xx_l4_abe__slimbus1_dma, | 6104 | &omap44xx_l4_abe__slimbus1_dma, |
6105 | &omap44xx_l4_per__slimbus2, | 6105 | &omap44xx_l4_per__slimbus2, |
diff --git a/arch/arm/mach-omap2/opp4xxx_data.c b/arch/arm/mach-omap2/opp4xxx_data.c index 2293ba27101b..c95415da23c2 100644 --- a/arch/arm/mach-omap2/opp4xxx_data.c +++ b/arch/arm/mach-omap2/opp4xxx_data.c | |||
@@ -94,7 +94,7 @@ int __init omap4_opp_init(void) | |||
94 | { | 94 | { |
95 | int r = -ENODEV; | 95 | int r = -ENODEV; |
96 | 96 | ||
97 | if (!cpu_is_omap44xx()) | 97 | if (!cpu_is_omap443x()) |
98 | return r; | 98 | return r; |
99 | 99 | ||
100 | r = omap_init_opp_table(omap44xx_opp_def_list, | 100 | r = omap_init_opp_table(omap44xx_opp_def_list, |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index e4fc88c65dbd..05bd8f02723f 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -272,21 +272,16 @@ void omap_sram_idle(void) | |||
272 | per_next_state = pwrdm_read_next_pwrst(per_pwrdm); | 272 | per_next_state = pwrdm_read_next_pwrst(per_pwrdm); |
273 | core_next_state = pwrdm_read_next_pwrst(core_pwrdm); | 273 | core_next_state = pwrdm_read_next_pwrst(core_pwrdm); |
274 | 274 | ||
275 | if (mpu_next_state < PWRDM_POWER_ON) { | 275 | pwrdm_pre_transition(NULL); |
276 | pwrdm_pre_transition(mpu_pwrdm); | ||
277 | pwrdm_pre_transition(neon_pwrdm); | ||
278 | } | ||
279 | 276 | ||
280 | /* PER */ | 277 | /* PER */ |
281 | if (per_next_state < PWRDM_POWER_ON) { | 278 | if (per_next_state < PWRDM_POWER_ON) { |
282 | pwrdm_pre_transition(per_pwrdm); | ||
283 | per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0; | 279 | per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0; |
284 | omap2_gpio_prepare_for_idle(per_going_off); | 280 | omap2_gpio_prepare_for_idle(per_going_off); |
285 | } | 281 | } |
286 | 282 | ||
287 | /* CORE */ | 283 | /* CORE */ |
288 | if (core_next_state < PWRDM_POWER_ON) { | 284 | if (core_next_state < PWRDM_POWER_ON) { |
289 | pwrdm_pre_transition(core_pwrdm); | ||
290 | if (core_next_state == PWRDM_POWER_OFF) { | 285 | if (core_next_state == PWRDM_POWER_OFF) { |
291 | omap3_core_save_context(); | 286 | omap3_core_save_context(); |
292 | omap3_cm_save_context(); | 287 | omap3_cm_save_context(); |
@@ -339,20 +334,14 @@ void omap_sram_idle(void) | |||
339 | omap2_prm_clear_mod_reg_bits(OMAP3430_AUTO_OFF_MASK, | 334 | omap2_prm_clear_mod_reg_bits(OMAP3430_AUTO_OFF_MASK, |
340 | OMAP3430_GR_MOD, | 335 | OMAP3430_GR_MOD, |
341 | OMAP3_PRM_VOLTCTRL_OFFSET); | 336 | OMAP3_PRM_VOLTCTRL_OFFSET); |
342 | pwrdm_post_transition(core_pwrdm); | ||
343 | } | 337 | } |
344 | omap3_intc_resume_idle(); | 338 | omap3_intc_resume_idle(); |
345 | 339 | ||
340 | pwrdm_post_transition(NULL); | ||
341 | |||
346 | /* PER */ | 342 | /* PER */ |
347 | if (per_next_state < PWRDM_POWER_ON) { | 343 | if (per_next_state < PWRDM_POWER_ON) |
348 | omap2_gpio_resume_after_idle(); | 344 | omap2_gpio_resume_after_idle(); |
349 | pwrdm_post_transition(per_pwrdm); | ||
350 | } | ||
351 | |||
352 | if (mpu_next_state < PWRDM_POWER_ON) { | ||
353 | pwrdm_post_transition(mpu_pwrdm); | ||
354 | pwrdm_post_transition(neon_pwrdm); | ||
355 | } | ||
356 | } | 345 | } |
357 | 346 | ||
358 | static void omap3_pm_idle(void) | 347 | static void omap3_pm_idle(void) |
diff --git a/arch/arm/mach-omap2/sleep44xx.S b/arch/arm/mach-omap2/sleep44xx.S index 9f6b83d1b193..91e71d8f46f0 100644 --- a/arch/arm/mach-omap2/sleep44xx.S +++ b/arch/arm/mach-omap2/sleep44xx.S | |||
@@ -56,9 +56,13 @@ ppa_por_params: | |||
56 | * The restore function pointer is stored at CPUx_WAKEUP_NS_PA_ADDR_OFFSET. | 56 | * The restore function pointer is stored at CPUx_WAKEUP_NS_PA_ADDR_OFFSET. |
57 | * It returns to the caller for CPU INACTIVE and ON power states or in case | 57 | * It returns to the caller for CPU INACTIVE and ON power states or in case |
58 | * CPU failed to transition to targeted OFF/DORMANT state. | 58 | * CPU failed to transition to targeted OFF/DORMANT state. |
59 | * | ||
60 | * omap4_finish_suspend() calls v7_flush_dcache_all() which doesn't save | ||
61 | * stack frame and it expects the caller to take care of it. Hence the entire | ||
62 | * stack frame is saved to avoid possible stack corruption. | ||
59 | */ | 63 | */ |
60 | ENTRY(omap4_finish_suspend) | 64 | ENTRY(omap4_finish_suspend) |
61 | stmfd sp!, {lr} | 65 | stmfd sp!, {r4-r12, lr} |
62 | cmp r0, #0x0 | 66 | cmp r0, #0x0 |
63 | beq do_WFI @ No lowpower state, jump to WFI | 67 | beq do_WFI @ No lowpower state, jump to WFI |
64 | 68 | ||
@@ -226,7 +230,7 @@ scu_gp_clear: | |||
226 | skip_scu_gp_clear: | 230 | skip_scu_gp_clear: |
227 | isb | 231 | isb |
228 | dsb | 232 | dsb |
229 | ldmfd sp!, {pc} | 233 | ldmfd sp!, {r4-r12, pc} |
230 | ENDPROC(omap4_finish_suspend) | 234 | ENDPROC(omap4_finish_suspend) |
231 | 235 | ||
232 | /* | 236 | /* |
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 2ff6d41ec6c6..2ba4f57dda86 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -260,6 +260,7 @@ static u32 notrace dmtimer_read_sched_clock(void) | |||
260 | return 0; | 260 | return 0; |
261 | } | 261 | } |
262 | 262 | ||
263 | #ifdef CONFIG_OMAP_32K_TIMER | ||
263 | /* Setup free-running counter for clocksource */ | 264 | /* Setup free-running counter for clocksource */ |
264 | static int __init omap2_sync32k_clocksource_init(void) | 265 | static int __init omap2_sync32k_clocksource_init(void) |
265 | { | 266 | { |
@@ -299,6 +300,12 @@ static int __init omap2_sync32k_clocksource_init(void) | |||
299 | 300 | ||
300 | return ret; | 301 | return ret; |
301 | } | 302 | } |
303 | #else | ||
304 | static inline int omap2_sync32k_clocksource_init(void) | ||
305 | { | ||
306 | return -ENODEV; | ||
307 | } | ||
308 | #endif | ||
302 | 309 | ||
303 | static void __init omap2_gptimer_clocksource_init(int gptimer_id, | 310 | static void __init omap2_gptimer_clocksource_init(int gptimer_id, |
304 | const char *fck_source) | 311 | const char *fck_source) |
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index de47f170ba50..db5ff6642375 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c | |||
@@ -67,6 +67,7 @@ void __init omap_pmic_init(int bus, u32 clkrate, | |||
67 | const char *pmic_type, int pmic_irq, | 67 | const char *pmic_type, int pmic_irq, |
68 | struct twl4030_platform_data *pmic_data) | 68 | struct twl4030_platform_data *pmic_data) |
69 | { | 69 | { |
70 | omap_mux_init_signal("sys_nirq", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE); | ||
70 | strncpy(pmic_i2c_board_info.type, pmic_type, | 71 | strncpy(pmic_i2c_board_info.type, pmic_type, |
71 | sizeof(pmic_i2c_board_info.type)); | 72 | sizeof(pmic_i2c_board_info.type)); |
72 | pmic_i2c_board_info.irq = pmic_irq; | 73 | pmic_i2c_board_info.irq = pmic_irq; |
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 9148b229d0de..a6cd14ab1e4e 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -109,7 +109,8 @@ void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data) | |||
109 | { | 109 | { |
110 | orion_ge00_init(eth_data, | 110 | orion_ge00_init(eth_data, |
111 | ORION5X_ETH_PHYS_BASE, IRQ_ORION5X_ETH_SUM, | 111 | ORION5X_ETH_PHYS_BASE, IRQ_ORION5X_ETH_SUM, |
112 | IRQ_ORION5X_ETH_ERR); | 112 | IRQ_ORION5X_ETH_ERR, |
113 | MV643XX_TX_CSUM_DEFAULT_LIMIT); | ||
113 | } | 114 | } |
114 | 115 | ||
115 | 116 | ||
@@ -203,6 +204,13 @@ void __init orion5x_wdt_init(void) | |||
203 | void __init orion5x_init_early(void) | 204 | void __init orion5x_init_early(void) |
204 | { | 205 | { |
205 | orion_time_set_base(TIMER_VIRT_BASE); | 206 | orion_time_set_base(TIMER_VIRT_BASE); |
207 | |||
208 | /* | ||
209 | * Some Orion5x devices allocate their coherent buffers from atomic | ||
210 | * context. Increase size of atomic coherent pool to make sure such | ||
211 | * the allocations won't fail. | ||
212 | */ | ||
213 | init_dma_coherent_pool_size(SZ_1M); | ||
206 | } | 214 | } |
207 | 215 | ||
208 | int orion5x_tclk; | 216 | int orion5x_tclk; |
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index 5905ed130e94..d89d87ae144c 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c | |||
@@ -953,12 +953,12 @@ static struct i2c_board_info raumfeld_connector_i2c_board_info __initdata = { | |||
953 | 953 | ||
954 | static struct eeti_ts_platform_data eeti_ts_pdata = { | 954 | static struct eeti_ts_platform_data eeti_ts_pdata = { |
955 | .irq_active_high = 1, | 955 | .irq_active_high = 1, |
956 | .irq_gpio = GPIO_TOUCH_IRQ, | ||
956 | }; | 957 | }; |
957 | 958 | ||
958 | static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = { | 959 | static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = { |
959 | .type = "eeti_ts", | 960 | .type = "eeti_ts", |
960 | .addr = 0x0a, | 961 | .addr = 0x0a, |
961 | .irq = PXA_GPIO_TO_IRQ(GPIO_TOUCH_IRQ), | ||
962 | .platform_data = &eeti_ts_pdata, | 962 | .platform_data = &eeti_ts_pdata, |
963 | }; | 963 | }; |
964 | 964 | ||
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig index e24961109b70..d56b0f7f2b20 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig | |||
@@ -483,7 +483,7 @@ config MACH_NEO1973_GTA02 | |||
483 | select I2C | 483 | select I2C |
484 | select POWER_SUPPLY | 484 | select POWER_SUPPLY |
485 | select MACH_NEO1973 | 485 | select MACH_NEO1973 |
486 | select S3C2410_PWM | 486 | select S3C24XX_PWM |
487 | select S3C_DEV_USB_HOST | 487 | select S3C_DEV_USB_HOST |
488 | help | 488 | help |
489 | Say Y here if you are using the Openmoko GTA02 / Freerunner GSM Phone | 489 | Say Y here if you are using the Openmoko GTA02 / Freerunner GSM Phone |
@@ -493,7 +493,7 @@ config MACH_RX1950 | |||
493 | select S3C24XX_DCLK | 493 | select S3C24XX_DCLK |
494 | select PM_H1940 if PM | 494 | select PM_H1940 if PM |
495 | select I2C | 495 | select I2C |
496 | select S3C2410_PWM | 496 | select S3C24XX_PWM |
497 | select S3C_DEV_NAND | 497 | select S3C_DEV_NAND |
498 | select S3C2410_IOTIMING if S3C2440_CPUFREQ | 498 | select S3C2410_IOTIMING if S3C2440_CPUFREQ |
499 | select S3C2440_XTAL_16934400 | 499 | select S3C2440_XTAL_16934400 |
diff --git a/arch/arm/mach-s3c24xx/include/mach/dma.h b/arch/arm/mach-s3c24xx/include/mach/dma.h index 454831b66037..ee99fd56c043 100644 --- a/arch/arm/mach-s3c24xx/include/mach/dma.h +++ b/arch/arm/mach-s3c24xx/include/mach/dma.h | |||
@@ -24,7 +24,8 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | enum dma_ch { | 26 | enum dma_ch { |
27 | DMACH_XD0, | 27 | DMACH_DT_PROP = -1, /* not yet supported, do not use */ |
28 | DMACH_XD0 = 0, | ||
28 | DMACH_XD1, | 29 | DMACH_XD1, |
29 | DMACH_SDI, | 30 | DMACH_SDI, |
30 | DMACH_SPI0, | 31 | DMACH_SPI0, |
diff --git a/arch/arm/mach-sa1100/include/mach/SA-1111.h b/arch/arm/mach-sa1100/include/mach/SA-1111.h deleted file mode 100644 index c38f60915cb6..000000000000 --- a/arch/arm/mach-sa1100/include/mach/SA-1111.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* | ||
2 | * Moved to new location | ||
3 | */ | ||
4 | #warning using old SA-1111.h - update to <asm/hardware/sa1111.h> | ||
5 | #include <asm/hardware/sa1111.h> | ||
diff --git a/arch/arm/mach-sa1100/include/mach/lart.h b/arch/arm/mach-sa1100/include/mach/lart.h deleted file mode 100644 index 8a5482d908db..000000000000 --- a/arch/arm/mach-sa1100/include/mach/lart.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef _INCLUDE_LART_H | ||
2 | #define _INCLUDE_LART_H | ||
3 | |||
4 | #define LART_GPIO_ETH0 GPIO_GPIO0 | ||
5 | #define LART_IRQ_ETH0 IRQ_GPIO0 | ||
6 | |||
7 | #define LART_GPIO_IDE GPIO_GPIO1 | ||
8 | #define LART_IRQ_IDE IRQ_GPIO1 | ||
9 | |||
10 | #define LART_GPIO_UCB1200 GPIO_GPIO18 | ||
11 | #define LART_IRQ_UCB1200 IRQ_GPIO18 | ||
12 | |||
13 | #endif | ||
diff --git a/arch/arm/mach-sa1100/leds-hackkit.c b/arch/arm/mach-sa1100/leds-hackkit.c index 6a2352436e62..f8e47235babe 100644 --- a/arch/arm/mach-sa1100/leds-hackkit.c +++ b/arch/arm/mach-sa1100/leds-hackkit.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * as cpu led, the green one is used as timer led. | 10 | * as cpu led, the green one is used as timer led. |
11 | */ | 11 | */ |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/io.h> | ||
13 | 14 | ||
14 | #include <mach/hardware.h> | 15 | #include <mach/hardware.h> |
15 | #include <asm/leds.h> | 16 | #include <asm/leds.h> |
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index cf10f92856dc..453a6e50db8b 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c | |||
@@ -520,13 +520,14 @@ static struct platform_device hdmi_lcdc_device = { | |||
520 | }; | 520 | }; |
521 | 521 | ||
522 | /* GPIO KEY */ | 522 | /* GPIO KEY */ |
523 | #define GPIO_KEY(c, g, d) { .code = c, .gpio = g, .desc = d, .active_low = 1 } | 523 | #define GPIO_KEY(c, g, d, ...) \ |
524 | { .code = c, .gpio = g, .desc = d, .active_low = 1, __VA_ARGS__ } | ||
524 | 525 | ||
525 | static struct gpio_keys_button gpio_buttons[] = { | 526 | static struct gpio_keys_button gpio_buttons[] = { |
526 | GPIO_KEY(KEY_POWER, GPIO_PORT99, "SW1"), | 527 | GPIO_KEY(KEY_POWER, GPIO_PORT99, "SW3", .wakeup = 1), |
527 | GPIO_KEY(KEY_BACK, GPIO_PORT100, "SW2"), | 528 | GPIO_KEY(KEY_BACK, GPIO_PORT100, "SW4"), |
528 | GPIO_KEY(KEY_MENU, GPIO_PORT97, "SW3"), | 529 | GPIO_KEY(KEY_MENU, GPIO_PORT97, "SW5"), |
529 | GPIO_KEY(KEY_HOME, GPIO_PORT98, "SW4"), | 530 | GPIO_KEY(KEY_HOME, GPIO_PORT98, "SW6"), |
530 | }; | 531 | }; |
531 | 532 | ||
532 | static struct gpio_keys_platform_data gpio_key_info = { | 533 | static struct gpio_keys_platform_data gpio_key_info = { |
@@ -901,8 +902,8 @@ static struct platform_device *eva_devices[] __initdata = { | |||
901 | &camera_device, | 902 | &camera_device, |
902 | &ceu0_device, | 903 | &ceu0_device, |
903 | &fsi_device, | 904 | &fsi_device, |
904 | &fsi_hdmi_device, | ||
905 | &fsi_wm8978_device, | 905 | &fsi_wm8978_device, |
906 | &fsi_hdmi_device, | ||
906 | }; | 907 | }; |
907 | 908 | ||
908 | static void __init eva_clock_init(void) | 909 | static void __init eva_clock_init(void) |
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index 53b7ea92c32c..3b8a0171c3cb 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c | |||
@@ -346,11 +346,11 @@ static struct resource sh_mmcif_resources[] = { | |||
346 | .flags = IORESOURCE_MEM, | 346 | .flags = IORESOURCE_MEM, |
347 | }, | 347 | }, |
348 | [1] = { | 348 | [1] = { |
349 | .start = gic_spi(141), | 349 | .start = gic_spi(140), |
350 | .flags = IORESOURCE_IRQ, | 350 | .flags = IORESOURCE_IRQ, |
351 | }, | 351 | }, |
352 | [2] = { | 352 | [2] = { |
353 | .start = gic_spi(140), | 353 | .start = gic_spi(141), |
354 | .flags = IORESOURCE_IRQ, | 354 | .flags = IORESOURCE_IRQ, |
355 | }, | 355 | }, |
356 | }; | 356 | }; |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 7ea2b31e3199..c129542f6aed 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -695,6 +695,7 @@ static struct platform_device usbhs0_device = { | |||
695 | * - J30 "open" | 695 | * - J30 "open" |
696 | * - modify usbhs1_get_id() USBHS_HOST -> USBHS_GADGET | 696 | * - modify usbhs1_get_id() USBHS_HOST -> USBHS_GADGET |
697 | * - add .get_vbus = usbhs_get_vbus in usbhs1_private | 697 | * - add .get_vbus = usbhs_get_vbus in usbhs1_private |
698 | * - check usbhs0_device(pio)/usbhs1_device(irq) order in mackerel_devices. | ||
698 | */ | 699 | */ |
699 | #define IRQ8 evt2irq(0x0300) | 700 | #define IRQ8 evt2irq(0x0300) |
700 | #define USB_PHY_MODE (1 << 4) | 701 | #define USB_PHY_MODE (1 << 4) |
@@ -1325,8 +1326,8 @@ static struct platform_device *mackerel_devices[] __initdata = { | |||
1325 | &nor_flash_device, | 1326 | &nor_flash_device, |
1326 | &smc911x_device, | 1327 | &smc911x_device, |
1327 | &lcdc_device, | 1328 | &lcdc_device, |
1328 | &usbhs1_device, | ||
1329 | &usbhs0_device, | 1329 | &usbhs0_device, |
1330 | &usbhs1_device, | ||
1330 | &leds_device, | 1331 | &leds_device, |
1331 | &fsi_device, | 1332 | &fsi_device, |
1332 | &fsi_ak4643_device, | 1333 | &fsi_ak4643_device, |
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index 3a528cf4366c..fcf5a47f4772 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c | |||
@@ -67,7 +67,7 @@ static struct smsc911x_platform_config smsc911x_platdata = { | |||
67 | 67 | ||
68 | static struct platform_device eth_device = { | 68 | static struct platform_device eth_device = { |
69 | .name = "smsc911x", | 69 | .name = "smsc911x", |
70 | .id = 0, | 70 | .id = -1, |
71 | .dev = { | 71 | .dev = { |
72 | .platform_data = &smsc911x_platdata, | 72 | .platform_data = &smsc911x_platdata, |
73 | }, | 73 | }, |
diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c index ee447404c857..588555a67d9c 100644 --- a/arch/arm/mach-shmobile/intc-sh73a0.c +++ b/arch/arm/mach-shmobile/intc-sh73a0.c | |||
@@ -259,9 +259,9 @@ static int sh73a0_set_wake(struct irq_data *data, unsigned int on) | |||
259 | return 0; /* always allow wakeup */ | 259 | return 0; /* always allow wakeup */ |
260 | } | 260 | } |
261 | 261 | ||
262 | #define RELOC_BASE 0x1000 | 262 | #define RELOC_BASE 0x1200 |
263 | 263 | ||
264 | /* INTCA IRQ pins at INTCS + 0x1000 to make space for GIC+INTC handling */ | 264 | /* INTCA IRQ pins at INTCS + RELOC_BASE to make space for GIC+INTC handling */ |
265 | #define INTCS_VECT_RELOC(n, vect) INTCS_VECT((n), (vect) + RELOC_BASE) | 265 | #define INTCS_VECT_RELOC(n, vect) INTCS_VECT((n), (vect) + RELOC_BASE) |
266 | 266 | ||
267 | INTC_IRQ_PINS_32(intca_irq_pins, 0xe6900000, | 267 | INTC_IRQ_PINS_32(intca_irq_pins, 0xe6900000, |
diff --git a/arch/arm/mach-tegra/board-harmony-power.c b/arch/arm/mach-tegra/board-harmony-power.c index 8fd387bf31f0..b7344beec102 100644 --- a/arch/arm/mach-tegra/board-harmony-power.c +++ b/arch/arm/mach-tegra/board-harmony-power.c | |||
@@ -51,7 +51,7 @@ static struct regulator_init_data ldo0_data = { | |||
51 | .consumer_supplies = tps658621_ldo0_supply, | 51 | .consumer_supplies = tps658621_ldo0_supply, |
52 | }; | 52 | }; |
53 | 53 | ||
54 | #define HARMONY_REGULATOR_INIT(_id, _name, _supply, _minmv, _maxmv) \ | 54 | #define HARMONY_REGULATOR_INIT(_id, _name, _supply, _minmv, _maxmv, _on)\ |
55 | static struct regulator_init_data _id##_data = { \ | 55 | static struct regulator_init_data _id##_data = { \ |
56 | .supply_regulator = _supply, \ | 56 | .supply_regulator = _supply, \ |
57 | .constraints = { \ | 57 | .constraints = { \ |
@@ -63,21 +63,22 @@ static struct regulator_init_data ldo0_data = { | |||
63 | .valid_ops_mask = (REGULATOR_CHANGE_MODE | \ | 63 | .valid_ops_mask = (REGULATOR_CHANGE_MODE | \ |
64 | REGULATOR_CHANGE_STATUS | \ | 64 | REGULATOR_CHANGE_STATUS | \ |
65 | REGULATOR_CHANGE_VOLTAGE), \ | 65 | REGULATOR_CHANGE_VOLTAGE), \ |
66 | .always_on = _on, \ | ||
66 | }, \ | 67 | }, \ |
67 | } | 68 | } |
68 | 69 | ||
69 | HARMONY_REGULATOR_INIT(sm0, "vdd_sm0", "vdd_sys", 725, 1500); | 70 | HARMONY_REGULATOR_INIT(sm0, "vdd_sm0", "vdd_sys", 725, 1500, 1); |
70 | HARMONY_REGULATOR_INIT(sm1, "vdd_sm1", "vdd_sys", 725, 1500); | 71 | HARMONY_REGULATOR_INIT(sm1, "vdd_sm1", "vdd_sys", 725, 1500, 1); |
71 | HARMONY_REGULATOR_INIT(sm2, "vdd_sm2", "vdd_sys", 3000, 4550); | 72 | HARMONY_REGULATOR_INIT(sm2, "vdd_sm2", "vdd_sys", 3000, 4550, 1); |
72 | HARMONY_REGULATOR_INIT(ldo1, "vdd_ldo1", "vdd_sm2", 725, 1500); | 73 | HARMONY_REGULATOR_INIT(ldo1, "vdd_ldo1", "vdd_sm2", 725, 1500, 1); |
73 | HARMONY_REGULATOR_INIT(ldo2, "vdd_ldo2", "vdd_sm2", 725, 1500); | 74 | HARMONY_REGULATOR_INIT(ldo2, "vdd_ldo2", "vdd_sm2", 725, 1500, 0); |
74 | HARMONY_REGULATOR_INIT(ldo3, "vdd_ldo3", "vdd_sm2", 1250, 3300); | 75 | HARMONY_REGULATOR_INIT(ldo3, "vdd_ldo3", "vdd_sm2", 1250, 3300, 1); |
75 | HARMONY_REGULATOR_INIT(ldo4, "vdd_ldo4", "vdd_sm2", 1700, 2475); | 76 | HARMONY_REGULATOR_INIT(ldo4, "vdd_ldo4", "vdd_sm2", 1700, 2475, 1); |
76 | HARMONY_REGULATOR_INIT(ldo5, "vdd_ldo5", NULL, 1250, 3300); | 77 | HARMONY_REGULATOR_INIT(ldo5, "vdd_ldo5", NULL, 1250, 3300, 1); |
77 | HARMONY_REGULATOR_INIT(ldo6, "vdd_ldo6", "vdd_sm2", 1250, 3300); | 78 | HARMONY_REGULATOR_INIT(ldo6, "vdd_ldo6", "vdd_sm2", 1250, 3300, 0); |
78 | HARMONY_REGULATOR_INIT(ldo7, "vdd_ldo7", "vdd_sm2", 1250, 3300); | 79 | HARMONY_REGULATOR_INIT(ldo7, "vdd_ldo7", "vdd_sm2", 1250, 3300, 0); |
79 | HARMONY_REGULATOR_INIT(ldo8, "vdd_ldo8", "vdd_sm2", 1250, 3300); | 80 | HARMONY_REGULATOR_INIT(ldo8, "vdd_ldo8", "vdd_sm2", 1250, 3300, 0); |
80 | HARMONY_REGULATOR_INIT(ldo9, "vdd_ldo9", "vdd_sm2", 1250, 3300); | 81 | HARMONY_REGULATOR_INIT(ldo9, "vdd_ldo9", "vdd_sm2", 1250, 3300, 1); |
81 | 82 | ||
82 | #define TPS_REG(_id, _data) \ | 83 | #define TPS_REG(_id, _data) \ |
83 | { \ | 84 | { \ |
@@ -119,9 +120,10 @@ static struct i2c_board_info __initdata harmony_regulators[] = { | |||
119 | 120 | ||
120 | int __init harmony_regulator_init(void) | 121 | int __init harmony_regulator_init(void) |
121 | { | 122 | { |
123 | regulator_register_always_on(0, "vdd_sys", | ||
124 | NULL, 0, 5000000); | ||
125 | |||
122 | if (machine_is_harmony()) { | 126 | if (machine_is_harmony()) { |
123 | regulator_register_always_on(0, "vdd_sys", | ||
124 | NULL, 0, 5000000); | ||
125 | i2c_register_board_info(3, harmony_regulators, 1); | 127 | i2c_register_board_info(3, harmony_regulators, 1); |
126 | } else { /* Harmony, booted using device tree */ | 128 | } else { /* Harmony, booted using device tree */ |
127 | struct device_node *np; | 129 | struct device_node *np; |
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index c013bbf79cac..53d3d46dec12 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig | |||
@@ -41,7 +41,6 @@ config MACH_HREFV60 | |||
41 | config MACH_SNOWBALL | 41 | config MACH_SNOWBALL |
42 | bool "U8500 Snowball platform" | 42 | bool "U8500 Snowball platform" |
43 | select MACH_MOP500 | 43 | select MACH_MOP500 |
44 | select LEDS_GPIO | ||
45 | help | 44 | help |
46 | Include support for the snowball development platform. | 45 | Include support for the snowball development platform. |
47 | 46 | ||
diff --git a/arch/arm/mach-ux500/board-mop500-msp.c b/arch/arm/mach-ux500/board-mop500-msp.c index 996048038743..df15646036aa 100644 --- a/arch/arm/mach-ux500/board-mop500-msp.c +++ b/arch/arm/mach-ux500/board-mop500-msp.c | |||
@@ -191,9 +191,9 @@ static struct platform_device *db8500_add_msp_i2s(struct device *parent, | |||
191 | return pdev; | 191 | return pdev; |
192 | } | 192 | } |
193 | 193 | ||
194 | /* Platform device for ASoC U8500 machine */ | 194 | /* Platform device for ASoC MOP500 machine */ |
195 | static struct platform_device snd_soc_u8500 = { | 195 | static struct platform_device snd_soc_mop500 = { |
196 | .name = "snd-soc-u8500", | 196 | .name = "snd-soc-mop500", |
197 | .id = 0, | 197 | .id = 0, |
198 | .dev = { | 198 | .dev = { |
199 | .platform_data = NULL, | 199 | .platform_data = NULL, |
@@ -227,8 +227,8 @@ int mop500_msp_init(struct device *parent) | |||
227 | { | 227 | { |
228 | struct platform_device *msp1; | 228 | struct platform_device *msp1; |
229 | 229 | ||
230 | pr_info("%s: Register platform-device 'snd-soc-u8500'.\n", __func__); | 230 | pr_info("%s: Register platform-device 'snd-soc-mop500'.\n", __func__); |
231 | platform_device_register(&snd_soc_u8500); | 231 | platform_device_register(&snd_soc_mop500); |
232 | 232 | ||
233 | pr_info("Initialize MSP I2S-devices.\n"); | 233 | pr_info("Initialize MSP I2S-devices.\n"); |
234 | db8500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0, | 234 | db8500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0, |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 8674a890fd1c..a534d8880de1 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -797,6 +797,7 @@ static void __init u8500_init_machine(void) | |||
797 | ARRAY_SIZE(mop500_platform_devs)); | 797 | ARRAY_SIZE(mop500_platform_devs)); |
798 | 798 | ||
799 | mop500_sdi_init(parent); | 799 | mop500_sdi_init(parent); |
800 | mop500_msp_init(parent); | ||
800 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); | 801 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); |
801 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); | 802 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); |
802 | i2c_register_board_info(2, mop500_i2c2_devices, | 803 | i2c_register_board_info(2, mop500_i2c2_devices, |
@@ -804,6 +805,8 @@ static void __init u8500_init_machine(void) | |||
804 | 805 | ||
805 | mop500_uib_init(); | 806 | mop500_uib_init(); |
806 | 807 | ||
808 | } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { | ||
809 | mop500_msp_init(parent); | ||
807 | } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) { | 810 | } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) { |
808 | /* | 811 | /* |
809 | * The HREFv60 board removed a GPIO expander and routed | 812 | * The HREFv60 board removed a GPIO expander and routed |
@@ -815,6 +818,7 @@ static void __init u8500_init_machine(void) | |||
815 | ARRAY_SIZE(mop500_platform_devs)); | 818 | ARRAY_SIZE(mop500_platform_devs)); |
816 | 819 | ||
817 | hrefv60_sdi_init(parent); | 820 | hrefv60_sdi_init(parent); |
821 | mop500_msp_init(parent); | ||
818 | 822 | ||
819 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); | 823 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); |
820 | i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES; | 824 | i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES; |
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 2a8e380501e8..97ec2565805a 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -368,14 +368,18 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask) | |||
368 | /* l2x0 controller is disabled */ | 368 | /* l2x0 controller is disabled */ |
369 | writel_relaxed(aux, l2x0_base + L2X0_AUX_CTRL); | 369 | writel_relaxed(aux, l2x0_base + L2X0_AUX_CTRL); |
370 | 370 | ||
371 | l2x0_saved_regs.aux_ctrl = aux; | ||
372 | |||
373 | l2x0_inv_all(); | 371 | l2x0_inv_all(); |
374 | 372 | ||
375 | /* enable L2X0 */ | 373 | /* enable L2X0 */ |
376 | writel_relaxed(1, l2x0_base + L2X0_CTRL); | 374 | writel_relaxed(1, l2x0_base + L2X0_CTRL); |
377 | } | 375 | } |
378 | 376 | ||
377 | /* Re-read it in case some bits are reserved. */ | ||
378 | aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); | ||
379 | |||
380 | /* Save the value for resuming. */ | ||
381 | l2x0_saved_regs.aux_ctrl = aux; | ||
382 | |||
379 | outer_cache.inv_range = l2x0_inv_range; | 383 | outer_cache.inv_range = l2x0_inv_range; |
380 | outer_cache.clean_range = l2x0_clean_range; | 384 | outer_cache.clean_range = l2x0_clean_range; |
381 | outer_cache.flush_range = l2x0_flush_range; | 385 | outer_cache.flush_range = l2x0_flush_range; |
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index 39e3fb3db801..3b172275262e 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -211,6 +211,9 @@ ENTRY(v7_coherent_user_range) | |||
211 | * isn't mapped, fail with -EFAULT. | 211 | * isn't mapped, fail with -EFAULT. |
212 | */ | 212 | */ |
213 | 9001: | 213 | 9001: |
214 | #ifdef CONFIG_ARM_ERRATA_775420 | ||
215 | dsb | ||
216 | #endif | ||
214 | mov r0, #-EFAULT | 217 | mov r0, #-EFAULT |
215 | mov pc, lr | 218 | mov pc, lr |
216 | UNWIND(.fnend ) | 219 | UNWIND(.fnend ) |
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index 119bc52ab93e..4e07eec1270d 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c | |||
@@ -63,10 +63,11 @@ static int contextidr_notifier(struct notifier_block *unused, unsigned long cmd, | |||
63 | pid = task_pid_nr(thread->task) << ASID_BITS; | 63 | pid = task_pid_nr(thread->task) << ASID_BITS; |
64 | asm volatile( | 64 | asm volatile( |
65 | " mrc p15, 0, %0, c13, c0, 1\n" | 65 | " mrc p15, 0, %0, c13, c0, 1\n" |
66 | " bfi %1, %0, #0, %2\n" | 66 | " and %0, %0, %2\n" |
67 | " mcr p15, 0, %1, c13, c0, 1\n" | 67 | " orr %0, %0, %1\n" |
68 | " mcr p15, 0, %0, c13, c0, 1\n" | ||
68 | : "=r" (contextidr), "+r" (pid) | 69 | : "=r" (contextidr), "+r" (pid) |
69 | : "I" (ASID_BITS)); | 70 | : "I" (~ASID_MASK)); |
70 | isb(); | 71 | isb(); |
71 | 72 | ||
72 | return NOTIFY_OK; | 73 | return NOTIFY_OK; |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index c2cdf6500f75..13f555d62491 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -267,17 +267,19 @@ static void __dma_free_remap(void *cpu_addr, size_t size) | |||
267 | vunmap(cpu_addr); | 267 | vunmap(cpu_addr); |
268 | } | 268 | } |
269 | 269 | ||
270 | #define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_256K | ||
271 | |||
270 | struct dma_pool { | 272 | struct dma_pool { |
271 | size_t size; | 273 | size_t size; |
272 | spinlock_t lock; | 274 | spinlock_t lock; |
273 | unsigned long *bitmap; | 275 | unsigned long *bitmap; |
274 | unsigned long nr_pages; | 276 | unsigned long nr_pages; |
275 | void *vaddr; | 277 | void *vaddr; |
276 | struct page *page; | 278 | struct page **pages; |
277 | }; | 279 | }; |
278 | 280 | ||
279 | static struct dma_pool atomic_pool = { | 281 | static struct dma_pool atomic_pool = { |
280 | .size = SZ_256K, | 282 | .size = DEFAULT_DMA_COHERENT_POOL_SIZE, |
281 | }; | 283 | }; |
282 | 284 | ||
283 | static int __init early_coherent_pool(char *p) | 285 | static int __init early_coherent_pool(char *p) |
@@ -287,6 +289,21 @@ static int __init early_coherent_pool(char *p) | |||
287 | } | 289 | } |
288 | early_param("coherent_pool", early_coherent_pool); | 290 | early_param("coherent_pool", early_coherent_pool); |
289 | 291 | ||
292 | void __init init_dma_coherent_pool_size(unsigned long size) | ||
293 | { | ||
294 | /* | ||
295 | * Catch any attempt to set the pool size too late. | ||
296 | */ | ||
297 | BUG_ON(atomic_pool.vaddr); | ||
298 | |||
299 | /* | ||
300 | * Set architecture specific coherent pool size only if | ||
301 | * it has not been changed by kernel command line parameter. | ||
302 | */ | ||
303 | if (atomic_pool.size == DEFAULT_DMA_COHERENT_POOL_SIZE) | ||
304 | atomic_pool.size = size; | ||
305 | } | ||
306 | |||
290 | /* | 307 | /* |
291 | * Initialise the coherent pool for atomic allocations. | 308 | * Initialise the coherent pool for atomic allocations. |
292 | */ | 309 | */ |
@@ -297,6 +314,7 @@ static int __init atomic_pool_init(void) | |||
297 | unsigned long nr_pages = pool->size >> PAGE_SHIFT; | 314 | unsigned long nr_pages = pool->size >> PAGE_SHIFT; |
298 | unsigned long *bitmap; | 315 | unsigned long *bitmap; |
299 | struct page *page; | 316 | struct page *page; |
317 | struct page **pages; | ||
300 | void *ptr; | 318 | void *ptr; |
301 | int bitmap_size = BITS_TO_LONGS(nr_pages) * sizeof(long); | 319 | int bitmap_size = BITS_TO_LONGS(nr_pages) * sizeof(long); |
302 | 320 | ||
@@ -304,21 +322,33 @@ static int __init atomic_pool_init(void) | |||
304 | if (!bitmap) | 322 | if (!bitmap) |
305 | goto no_bitmap; | 323 | goto no_bitmap; |
306 | 324 | ||
325 | pages = kzalloc(nr_pages * sizeof(struct page *), GFP_KERNEL); | ||
326 | if (!pages) | ||
327 | goto no_pages; | ||
328 | |||
307 | if (IS_ENABLED(CONFIG_CMA)) | 329 | if (IS_ENABLED(CONFIG_CMA)) |
308 | ptr = __alloc_from_contiguous(NULL, pool->size, prot, &page); | 330 | ptr = __alloc_from_contiguous(NULL, pool->size, prot, &page); |
309 | else | 331 | else |
310 | ptr = __alloc_remap_buffer(NULL, pool->size, GFP_KERNEL, prot, | 332 | ptr = __alloc_remap_buffer(NULL, pool->size, GFP_KERNEL, prot, |
311 | &page, NULL); | 333 | &page, NULL); |
312 | if (ptr) { | 334 | if (ptr) { |
335 | int i; | ||
336 | |||
337 | for (i = 0; i < nr_pages; i++) | ||
338 | pages[i] = page + i; | ||
339 | |||
313 | spin_lock_init(&pool->lock); | 340 | spin_lock_init(&pool->lock); |
314 | pool->vaddr = ptr; | 341 | pool->vaddr = ptr; |
315 | pool->page = page; | 342 | pool->pages = pages; |
316 | pool->bitmap = bitmap; | 343 | pool->bitmap = bitmap; |
317 | pool->nr_pages = nr_pages; | 344 | pool->nr_pages = nr_pages; |
318 | pr_info("DMA: preallocated %u KiB pool for atomic coherent allocations\n", | 345 | pr_info("DMA: preallocated %u KiB pool for atomic coherent allocations\n", |
319 | (unsigned)pool->size / 1024); | 346 | (unsigned)pool->size / 1024); |
320 | return 0; | 347 | return 0; |
321 | } | 348 | } |
349 | |||
350 | kfree(pages); | ||
351 | no_pages: | ||
322 | kfree(bitmap); | 352 | kfree(bitmap); |
323 | no_bitmap: | 353 | no_bitmap: |
324 | pr_err("DMA: failed to allocate %u KiB pool for atomic coherent allocation\n", | 354 | pr_err("DMA: failed to allocate %u KiB pool for atomic coherent allocation\n", |
@@ -358,7 +388,7 @@ void __init dma_contiguous_remap(void) | |||
358 | if (end > arm_lowmem_limit) | 388 | if (end > arm_lowmem_limit) |
359 | end = arm_lowmem_limit; | 389 | end = arm_lowmem_limit; |
360 | if (start >= end) | 390 | if (start >= end) |
361 | return; | 391 | continue; |
362 | 392 | ||
363 | map.pfn = __phys_to_pfn(start); | 393 | map.pfn = __phys_to_pfn(start); |
364 | map.virtual = __phys_to_virt(start); | 394 | map.virtual = __phys_to_virt(start); |
@@ -423,7 +453,7 @@ static void *__alloc_from_pool(size_t size, struct page **ret_page) | |||
423 | unsigned int pageno; | 453 | unsigned int pageno; |
424 | unsigned long flags; | 454 | unsigned long flags; |
425 | void *ptr = NULL; | 455 | void *ptr = NULL; |
426 | size_t align; | 456 | unsigned long align_mask; |
427 | 457 | ||
428 | if (!pool->vaddr) { | 458 | if (!pool->vaddr) { |
429 | WARN(1, "coherent pool not initialised!\n"); | 459 | WARN(1, "coherent pool not initialised!\n"); |
@@ -435,35 +465,53 @@ static void *__alloc_from_pool(size_t size, struct page **ret_page) | |||
435 | * small, so align them to their order in pages, minimum is a page | 465 | * small, so align them to their order in pages, minimum is a page |
436 | * size. This helps reduce fragmentation of the DMA space. | 466 | * size. This helps reduce fragmentation of the DMA space. |
437 | */ | 467 | */ |
438 | align = PAGE_SIZE << get_order(size); | 468 | align_mask = (1 << get_order(size)) - 1; |
439 | 469 | ||
440 | spin_lock_irqsave(&pool->lock, flags); | 470 | spin_lock_irqsave(&pool->lock, flags); |
441 | pageno = bitmap_find_next_zero_area(pool->bitmap, pool->nr_pages, | 471 | pageno = bitmap_find_next_zero_area(pool->bitmap, pool->nr_pages, |
442 | 0, count, (1 << align) - 1); | 472 | 0, count, align_mask); |
443 | if (pageno < pool->nr_pages) { | 473 | if (pageno < pool->nr_pages) { |
444 | bitmap_set(pool->bitmap, pageno, count); | 474 | bitmap_set(pool->bitmap, pageno, count); |
445 | ptr = pool->vaddr + PAGE_SIZE * pageno; | 475 | ptr = pool->vaddr + PAGE_SIZE * pageno; |
446 | *ret_page = pool->page + pageno; | 476 | *ret_page = pool->pages[pageno]; |
477 | } else { | ||
478 | pr_err_once("ERROR: %u KiB atomic DMA coherent pool is too small!\n" | ||
479 | "Please increase it with coherent_pool= kernel parameter!\n", | ||
480 | (unsigned)pool->size / 1024); | ||
447 | } | 481 | } |
448 | spin_unlock_irqrestore(&pool->lock, flags); | 482 | spin_unlock_irqrestore(&pool->lock, flags); |
449 | 483 | ||
450 | return ptr; | 484 | return ptr; |
451 | } | 485 | } |
452 | 486 | ||
487 | static bool __in_atomic_pool(void *start, size_t size) | ||
488 | { | ||
489 | struct dma_pool *pool = &atomic_pool; | ||
490 | void *end = start + size; | ||
491 | void *pool_start = pool->vaddr; | ||
492 | void *pool_end = pool->vaddr + pool->size; | ||
493 | |||
494 | if (start < pool_start || start >= pool_end) | ||
495 | return false; | ||
496 | |||
497 | if (end <= pool_end) | ||
498 | return true; | ||
499 | |||
500 | WARN(1, "Wrong coherent size(%p-%p) from atomic pool(%p-%p)\n", | ||
501 | start, end - 1, pool_start, pool_end - 1); | ||
502 | |||
503 | return false; | ||
504 | } | ||
505 | |||
453 | static int __free_from_pool(void *start, size_t size) | 506 | static int __free_from_pool(void *start, size_t size) |
454 | { | 507 | { |
455 | struct dma_pool *pool = &atomic_pool; | 508 | struct dma_pool *pool = &atomic_pool; |
456 | unsigned long pageno, count; | 509 | unsigned long pageno, count; |
457 | unsigned long flags; | 510 | unsigned long flags; |
458 | 511 | ||
459 | if (start < pool->vaddr || start > pool->vaddr + pool->size) | 512 | if (!__in_atomic_pool(start, size)) |
460 | return 0; | 513 | return 0; |
461 | 514 | ||
462 | if (start + size > pool->vaddr + pool->size) { | ||
463 | WARN(1, "freeing wrong coherent size from pool\n"); | ||
464 | return 0; | ||
465 | } | ||
466 | |||
467 | pageno = (start - pool->vaddr) >> PAGE_SHIFT; | 515 | pageno = (start - pool->vaddr) >> PAGE_SHIFT; |
468 | count = size >> PAGE_SHIFT; | 516 | count = size >> PAGE_SHIFT; |
469 | 517 | ||
@@ -648,12 +696,12 @@ void arm_dma_free(struct device *dev, size_t size, void *cpu_addr, | |||
648 | 696 | ||
649 | if (arch_is_coherent() || nommu()) { | 697 | if (arch_is_coherent() || nommu()) { |
650 | __dma_free_buffer(page, size); | 698 | __dma_free_buffer(page, size); |
699 | } else if (__free_from_pool(cpu_addr, size)) { | ||
700 | return; | ||
651 | } else if (!IS_ENABLED(CONFIG_CMA)) { | 701 | } else if (!IS_ENABLED(CONFIG_CMA)) { |
652 | __dma_free_remap(cpu_addr, size); | 702 | __dma_free_remap(cpu_addr, size); |
653 | __dma_free_buffer(page, size); | 703 | __dma_free_buffer(page, size); |
654 | } else { | 704 | } else { |
655 | if (__free_from_pool(cpu_addr, size)) | ||
656 | return; | ||
657 | /* | 705 | /* |
658 | * Non-atomic allocations cannot be freed with IRQs disabled | 706 | * Non-atomic allocations cannot be freed with IRQs disabled |
659 | */ | 707 | */ |
@@ -1090,10 +1138,22 @@ static int __iommu_remove_mapping(struct device *dev, dma_addr_t iova, size_t si | |||
1090 | return 0; | 1138 | return 0; |
1091 | } | 1139 | } |
1092 | 1140 | ||
1141 | static struct page **__atomic_get_pages(void *addr) | ||
1142 | { | ||
1143 | struct dma_pool *pool = &atomic_pool; | ||
1144 | struct page **pages = pool->pages; | ||
1145 | int offs = (addr - pool->vaddr) >> PAGE_SHIFT; | ||
1146 | |||
1147 | return pages + offs; | ||
1148 | } | ||
1149 | |||
1093 | static struct page **__iommu_get_pages(void *cpu_addr, struct dma_attrs *attrs) | 1150 | static struct page **__iommu_get_pages(void *cpu_addr, struct dma_attrs *attrs) |
1094 | { | 1151 | { |
1095 | struct vm_struct *area; | 1152 | struct vm_struct *area; |
1096 | 1153 | ||
1154 | if (__in_atomic_pool(cpu_addr, PAGE_SIZE)) | ||
1155 | return __atomic_get_pages(cpu_addr); | ||
1156 | |||
1097 | if (dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING, attrs)) | 1157 | if (dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING, attrs)) |
1098 | return cpu_addr; | 1158 | return cpu_addr; |
1099 | 1159 | ||
@@ -1103,6 +1163,34 @@ static struct page **__iommu_get_pages(void *cpu_addr, struct dma_attrs *attrs) | |||
1103 | return NULL; | 1163 | return NULL; |
1104 | } | 1164 | } |
1105 | 1165 | ||
1166 | static void *__iommu_alloc_atomic(struct device *dev, size_t size, | ||
1167 | dma_addr_t *handle) | ||
1168 | { | ||
1169 | struct page *page; | ||
1170 | void *addr; | ||
1171 | |||
1172 | addr = __alloc_from_pool(size, &page); | ||
1173 | if (!addr) | ||
1174 | return NULL; | ||
1175 | |||
1176 | *handle = __iommu_create_mapping(dev, &page, size); | ||
1177 | if (*handle == DMA_ERROR_CODE) | ||
1178 | goto err_mapping; | ||
1179 | |||
1180 | return addr; | ||
1181 | |||
1182 | err_mapping: | ||
1183 | __free_from_pool(addr, size); | ||
1184 | return NULL; | ||
1185 | } | ||
1186 | |||
1187 | static void __iommu_free_atomic(struct device *dev, struct page **pages, | ||
1188 | dma_addr_t handle, size_t size) | ||
1189 | { | ||
1190 | __iommu_remove_mapping(dev, handle, size); | ||
1191 | __free_from_pool(page_address(pages[0]), size); | ||
1192 | } | ||
1193 | |||
1106 | static void *arm_iommu_alloc_attrs(struct device *dev, size_t size, | 1194 | static void *arm_iommu_alloc_attrs(struct device *dev, size_t size, |
1107 | dma_addr_t *handle, gfp_t gfp, struct dma_attrs *attrs) | 1195 | dma_addr_t *handle, gfp_t gfp, struct dma_attrs *attrs) |
1108 | { | 1196 | { |
@@ -1113,6 +1201,9 @@ static void *arm_iommu_alloc_attrs(struct device *dev, size_t size, | |||
1113 | *handle = DMA_ERROR_CODE; | 1201 | *handle = DMA_ERROR_CODE; |
1114 | size = PAGE_ALIGN(size); | 1202 | size = PAGE_ALIGN(size); |
1115 | 1203 | ||
1204 | if (gfp & GFP_ATOMIC) | ||
1205 | return __iommu_alloc_atomic(dev, size, handle); | ||
1206 | |||
1116 | pages = __iommu_alloc_buffer(dev, size, gfp); | 1207 | pages = __iommu_alloc_buffer(dev, size, gfp); |
1117 | if (!pages) | 1208 | if (!pages) |
1118 | return NULL; | 1209 | return NULL; |
@@ -1179,6 +1270,11 @@ void arm_iommu_free_attrs(struct device *dev, size_t size, void *cpu_addr, | |||
1179 | return; | 1270 | return; |
1180 | } | 1271 | } |
1181 | 1272 | ||
1273 | if (__in_atomic_pool(cpu_addr, size)) { | ||
1274 | __iommu_free_atomic(dev, pages, handle, size); | ||
1275 | return; | ||
1276 | } | ||
1277 | |||
1182 | if (!dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING, attrs)) { | 1278 | if (!dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING, attrs)) { |
1183 | unmap_kernel_range((unsigned long)cpu_addr, size); | 1279 | unmap_kernel_range((unsigned long)cpu_addr, size); |
1184 | vunmap(cpu_addr); | 1280 | vunmap(cpu_addr); |
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index 77458548e031..40ca11ed6e5f 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c | |||
@@ -231,8 +231,6 @@ void __sync_icache_dcache(pte_t pteval) | |||
231 | struct page *page; | 231 | struct page *page; |
232 | struct address_space *mapping; | 232 | struct address_space *mapping; |
233 | 233 | ||
234 | if (!pte_present_user(pteval)) | ||
235 | return; | ||
236 | if (cache_is_vipt_nonaliasing() && !pte_exec(pteval)) | 234 | if (cache_is_vipt_nonaliasing() && !pte_exec(pteval)) |
237 | /* only flush non-aliasing VIPT caches for exec mappings */ | 235 | /* only flush non-aliasing VIPT caches for exec mappings */ |
238 | return; | 236 | return; |
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h index 6776160618ef..a8ee92da3544 100644 --- a/arch/arm/mm/mm.h +++ b/arch/arm/mm/mm.h | |||
@@ -55,6 +55,9 @@ extern void __flush_dcache_page(struct address_space *mapping, struct page *page | |||
55 | /* permanent static mappings from iotable_init() */ | 55 | /* permanent static mappings from iotable_init() */ |
56 | #define VM_ARM_STATIC_MAPPING 0x40000000 | 56 | #define VM_ARM_STATIC_MAPPING 0x40000000 |
57 | 57 | ||
58 | /* empty mapping */ | ||
59 | #define VM_ARM_EMPTY_MAPPING 0x20000000 | ||
60 | |||
58 | /* mapping type (attributes) for permanent static mappings */ | 61 | /* mapping type (attributes) for permanent static mappings */ |
59 | #define VM_ARM_MTYPE(mt) ((mt) << 20) | 62 | #define VM_ARM_MTYPE(mt) ((mt) << 20) |
60 | #define VM_ARM_MTYPE_MASK (0x1f << 20) | 63 | #define VM_ARM_MTYPE_MASK (0x1f << 20) |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 4c2d0451e84a..c2fa21d0103e 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -807,7 +807,7 @@ static void __init pmd_empty_section_gap(unsigned long addr) | |||
807 | vm = early_alloc_aligned(sizeof(*vm), __alignof__(*vm)); | 807 | vm = early_alloc_aligned(sizeof(*vm), __alignof__(*vm)); |
808 | vm->addr = (void *)addr; | 808 | vm->addr = (void *)addr; |
809 | vm->size = SECTION_SIZE; | 809 | vm->size = SECTION_SIZE; |
810 | vm->flags = VM_IOREMAP | VM_ARM_STATIC_MAPPING; | 810 | vm->flags = VM_IOREMAP | VM_ARM_EMPTY_MAPPING; |
811 | vm->caller = pmd_empty_section_gap; | 811 | vm->caller = pmd_empty_section_gap; |
812 | vm_area_add_early(vm); | 812 | vm_area_add_early(vm); |
813 | } | 813 | } |
@@ -820,7 +820,7 @@ static void __init fill_pmd_gaps(void) | |||
820 | 820 | ||
821 | /* we're still single threaded hence no lock needed here */ | 821 | /* we're still single threaded hence no lock needed here */ |
822 | for (vm = vmlist; vm; vm = vm->next) { | 822 | for (vm = vmlist; vm; vm = vm->next) { |
823 | if (!(vm->flags & VM_ARM_STATIC_MAPPING)) | 823 | if (!(vm->flags & (VM_ARM_STATIC_MAPPING | VM_ARM_EMPTY_MAPPING))) |
824 | continue; | 824 | continue; |
825 | addr = (unsigned long)vm->addr; | 825 | addr = (unsigned long)vm->addr; |
826 | if (addr < next) | 826 | if (addr < next) |
@@ -961,8 +961,8 @@ void __init sanity_check_meminfo(void) | |||
961 | * Check whether this memory bank would partially overlap | 961 | * Check whether this memory bank would partially overlap |
962 | * the vmalloc area. | 962 | * the vmalloc area. |
963 | */ | 963 | */ |
964 | if (__va(bank->start + bank->size) > vmalloc_min || | 964 | if (__va(bank->start + bank->size - 1) >= vmalloc_min || |
965 | __va(bank->start + bank->size) < __va(bank->start)) { | 965 | __va(bank->start + bank->size - 1) <= __va(bank->start)) { |
966 | unsigned long newsize = vmalloc_min - __va(bank->start); | 966 | unsigned long newsize = vmalloc_min - __va(bank->start); |
967 | printk(KERN_NOTICE "Truncating RAM at %.8llx-%.8llx " | 967 | printk(KERN_NOTICE "Truncating RAM at %.8llx-%.8llx " |
968 | "to -%.8llx (vmalloc region overlap).\n", | 968 | "to -%.8llx (vmalloc region overlap).\n", |
diff --git a/arch/arm/mm/tlb-v7.S b/arch/arm/mm/tlb-v7.S index c2021139cb56..ea94765acf9a 100644 --- a/arch/arm/mm/tlb-v7.S +++ b/arch/arm/mm/tlb-v7.S | |||
@@ -38,10 +38,10 @@ ENTRY(v7wbi_flush_user_tlb_range) | |||
38 | dsb | 38 | dsb |
39 | mov r0, r0, lsr #PAGE_SHIFT @ align address | 39 | mov r0, r0, lsr #PAGE_SHIFT @ align address |
40 | mov r1, r1, lsr #PAGE_SHIFT | 40 | mov r1, r1, lsr #PAGE_SHIFT |
41 | #ifdef CONFIG_ARM_ERRATA_720789 | ||
42 | mov r3, #0 | ||
43 | #else | ||
44 | asid r3, r3 @ mask ASID | 41 | asid r3, r3 @ mask ASID |
42 | #ifdef CONFIG_ARM_ERRATA_720789 | ||
43 | ALT_SMP(W(mov) r3, #0 ) | ||
44 | ALT_UP(W(nop) ) | ||
45 | #endif | 45 | #endif |
46 | orr r0, r3, r0, lsl #PAGE_SHIFT @ Create initial MVA | 46 | orr r0, r3, r0, lsl #PAGE_SHIFT @ Create initial MVA |
47 | mov r1, r1, lsl #PAGE_SHIFT | 47 | mov r1, r1, lsl #PAGE_SHIFT |
diff --git a/arch/arm/plat-mxc/include/mach/mx25.h b/arch/arm/plat-mxc/include/mach/mx25.h index 627d94f1b010..ec466400a200 100644 --- a/arch/arm/plat-mxc/include/mach/mx25.h +++ b/arch/arm/plat-mxc/include/mach/mx25.h | |||
@@ -98,6 +98,7 @@ | |||
98 | #define MX25_INT_UART1 (NR_IRQS_LEGACY + 45) | 98 | #define MX25_INT_UART1 (NR_IRQS_LEGACY + 45) |
99 | #define MX25_INT_GPIO2 (NR_IRQS_LEGACY + 51) | 99 | #define MX25_INT_GPIO2 (NR_IRQS_LEGACY + 51) |
100 | #define MX25_INT_GPIO1 (NR_IRQS_LEGACY + 52) | 100 | #define MX25_INT_GPIO1 (NR_IRQS_LEGACY + 52) |
101 | #define MX25_INT_GPT1 (NR_IRQS_LEGACY + 54) | ||
101 | #define MX25_INT_FEC (NR_IRQS_LEGACY + 57) | 102 | #define MX25_INT_FEC (NR_IRQS_LEGACY + 57) |
102 | 103 | ||
103 | #define MX25_DMA_REQ_SSI2_RX1 22 | 104 | #define MX25_DMA_REQ_SSI2_RX1 22 |
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 626ad8cad7a9..938b50a33439 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -189,6 +189,7 @@ struct omap_dm_timer *omap_dm_timer_request(void) | |||
189 | timer->reserved = 1; | 189 | timer->reserved = 1; |
190 | break; | 190 | break; |
191 | } | 191 | } |
192 | spin_unlock_irqrestore(&dm_timer_lock, flags); | ||
192 | 193 | ||
193 | if (timer) { | 194 | if (timer) { |
194 | ret = omap_dm_timer_prepare(timer); | 195 | ret = omap_dm_timer_prepare(timer); |
@@ -197,7 +198,6 @@ struct omap_dm_timer *omap_dm_timer_request(void) | |||
197 | timer = NULL; | 198 | timer = NULL; |
198 | } | 199 | } |
199 | } | 200 | } |
200 | spin_unlock_irqrestore(&dm_timer_lock, flags); | ||
201 | 201 | ||
202 | if (!timer) | 202 | if (!timer) |
203 | pr_debug("%s: timer request failed!\n", __func__); | 203 | pr_debug("%s: timer request failed!\n", __func__); |
@@ -220,6 +220,7 @@ struct omap_dm_timer *omap_dm_timer_request_specific(int id) | |||
220 | break; | 220 | break; |
221 | } | 221 | } |
222 | } | 222 | } |
223 | spin_unlock_irqrestore(&dm_timer_lock, flags); | ||
223 | 224 | ||
224 | if (timer) { | 225 | if (timer) { |
225 | ret = omap_dm_timer_prepare(timer); | 226 | ret = omap_dm_timer_prepare(timer); |
@@ -228,7 +229,6 @@ struct omap_dm_timer *omap_dm_timer_request_specific(int id) | |||
228 | timer = NULL; | 229 | timer = NULL; |
229 | } | 230 | } |
230 | } | 231 | } |
231 | spin_unlock_irqrestore(&dm_timer_lock, flags); | ||
232 | 232 | ||
233 | if (!timer) | 233 | if (!timer) |
234 | pr_debug("%s: timer%d request failed!\n", __func__, id); | 234 | pr_debug("%s: timer%d request failed!\n", __func__, id); |
@@ -258,7 +258,7 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_enable); | |||
258 | 258 | ||
259 | void omap_dm_timer_disable(struct omap_dm_timer *timer) | 259 | void omap_dm_timer_disable(struct omap_dm_timer *timer) |
260 | { | 260 | { |
261 | pm_runtime_put(&timer->pdev->dev); | 261 | pm_runtime_put_sync(&timer->pdev->dev); |
262 | } | 262 | } |
263 | EXPORT_SYMBOL_GPL(omap_dm_timer_disable); | 263 | EXPORT_SYMBOL_GPL(omap_dm_timer_disable); |
264 | 264 | ||
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 68b180edcfff..bb5d08a70dbc 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h | |||
@@ -372,7 +372,8 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
372 | #define cpu_class_is_omap1() (cpu_is_omap7xx() || cpu_is_omap15xx() || \ | 372 | #define cpu_class_is_omap1() (cpu_is_omap7xx() || cpu_is_omap15xx() || \ |
373 | cpu_is_omap16xx()) | 373 | cpu_is_omap16xx()) |
374 | #define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx() || \ | 374 | #define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx() || \ |
375 | cpu_is_omap44xx() || soc_is_omap54xx()) | 375 | cpu_is_omap44xx() || soc_is_omap54xx() || \ |
376 | soc_is_am33xx()) | ||
376 | 377 | ||
377 | /* Various silicon revisions for omap2 */ | 378 | /* Various silicon revisions for omap2 */ |
378 | #define OMAP242X_CLASS 0x24200024 | 379 | #define OMAP242X_CLASS 0x24200024 |
diff --git a/arch/arm/plat-omap/include/plat/multi.h b/arch/arm/plat-omap/include/plat/multi.h index 045e320f1067..324d31b14852 100644 --- a/arch/arm/plat-omap/include/plat/multi.h +++ b/arch/arm/plat-omap/include/plat/multi.h | |||
@@ -108,4 +108,13 @@ | |||
108 | # endif | 108 | # endif |
109 | #endif | 109 | #endif |
110 | 110 | ||
111 | #ifdef CONFIG_SOC_AM33XX | ||
112 | # ifdef OMAP_NAME | ||
113 | # undef MULTI_OMAP2 | ||
114 | # define MULTI_OMAP2 | ||
115 | # else | ||
116 | # define OMAP_NAME am33xx | ||
117 | # endif | ||
118 | #endif | ||
119 | |||
111 | #endif /* __PLAT_OMAP_MULTI_H */ | 120 | #endif /* __PLAT_OMAP_MULTI_H */ |
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h index b8d19a136781..7f7b112acccb 100644 --- a/arch/arm/plat-omap/include/plat/uncompress.h +++ b/arch/arm/plat-omap/include/plat/uncompress.h | |||
@@ -110,7 +110,7 @@ static inline void flush(void) | |||
110 | _DEBUG_LL_ENTRY(mach, AM33XX_UART##p##_BASE, OMAP_PORT_SHIFT, \ | 110 | _DEBUG_LL_ENTRY(mach, AM33XX_UART##p##_BASE, OMAP_PORT_SHIFT, \ |
111 | AM33XXUART##p) | 111 | AM33XXUART##p) |
112 | 112 | ||
113 | static inline void __arch_decomp_setup(unsigned long arch_id) | 113 | static inline void arch_decomp_setup(void) |
114 | { | 114 | { |
115 | int port = 0; | 115 | int port = 0; |
116 | 116 | ||
@@ -198,8 +198,6 @@ static inline void __arch_decomp_setup(unsigned long arch_id) | |||
198 | } while (0); | 198 | } while (0); |
199 | } | 199 | } |
200 | 200 | ||
201 | #define arch_decomp_setup() __arch_decomp_setup(arch_id) | ||
202 | |||
203 | /* | 201 | /* |
204 | * nothing to do | 202 | * nothing to do |
205 | */ | 203 | */ |
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 766181cb5c95..024f3b08db29 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -68,6 +68,7 @@ | |||
68 | 68 | ||
69 | static unsigned long omap_sram_start; | 69 | static unsigned long omap_sram_start; |
70 | static void __iomem *omap_sram_base; | 70 | static void __iomem *omap_sram_base; |
71 | static unsigned long omap_sram_skip; | ||
71 | static unsigned long omap_sram_size; | 72 | static unsigned long omap_sram_size; |
72 | static void __iomem *omap_sram_ceil; | 73 | static void __iomem *omap_sram_ceil; |
73 | 74 | ||
@@ -106,6 +107,7 @@ static int is_sram_locked(void) | |||
106 | */ | 107 | */ |
107 | static void __init omap_detect_sram(void) | 108 | static void __init omap_detect_sram(void) |
108 | { | 109 | { |
110 | omap_sram_skip = SRAM_BOOTLOADER_SZ; | ||
109 | if (cpu_class_is_omap2()) { | 111 | if (cpu_class_is_omap2()) { |
110 | if (is_sram_locked()) { | 112 | if (is_sram_locked()) { |
111 | if (cpu_is_omap34xx()) { | 113 | if (cpu_is_omap34xx()) { |
@@ -113,6 +115,7 @@ static void __init omap_detect_sram(void) | |||
113 | if ((omap_type() == OMAP2_DEVICE_TYPE_EMU) || | 115 | if ((omap_type() == OMAP2_DEVICE_TYPE_EMU) || |
114 | (omap_type() == OMAP2_DEVICE_TYPE_SEC)) { | 116 | (omap_type() == OMAP2_DEVICE_TYPE_SEC)) { |
115 | omap_sram_size = 0x7000; /* 28K */ | 117 | omap_sram_size = 0x7000; /* 28K */ |
118 | omap_sram_skip += SZ_16K; | ||
116 | } else { | 119 | } else { |
117 | omap_sram_size = 0x8000; /* 32K */ | 120 | omap_sram_size = 0x8000; /* 32K */ |
118 | } | 121 | } |
@@ -175,8 +178,10 @@ static void __init omap_map_sram(void) | |||
175 | return; | 178 | return; |
176 | 179 | ||
177 | #ifdef CONFIG_OMAP4_ERRATA_I688 | 180 | #ifdef CONFIG_OMAP4_ERRATA_I688 |
181 | if (cpu_is_omap44xx()) { | ||
178 | omap_sram_start += PAGE_SIZE; | 182 | omap_sram_start += PAGE_SIZE; |
179 | omap_sram_size -= SZ_16K; | 183 | omap_sram_size -= SZ_16K; |
184 | } | ||
180 | #endif | 185 | #endif |
181 | if (cpu_is_omap34xx()) { | 186 | if (cpu_is_omap34xx()) { |
182 | /* | 187 | /* |
@@ -203,8 +208,8 @@ static void __init omap_map_sram(void) | |||
203 | * Looks like we need to preserve some bootloader code at the | 208 | * Looks like we need to preserve some bootloader code at the |
204 | * beginning of SRAM for jumping to flash for reboot to work... | 209 | * beginning of SRAM for jumping to flash for reboot to work... |
205 | */ | 210 | */ |
206 | memset_io(omap_sram_base + SRAM_BOOTLOADER_SZ, 0, | 211 | memset_io(omap_sram_base + omap_sram_skip, 0, |
207 | omap_sram_size - SRAM_BOOTLOADER_SZ); | 212 | omap_sram_size - omap_sram_skip); |
208 | } | 213 | } |
209 | 214 | ||
210 | /* | 215 | /* |
@@ -218,7 +223,7 @@ void *omap_sram_push_address(unsigned long size) | |||
218 | { | 223 | { |
219 | unsigned long available, new_ceil = (unsigned long)omap_sram_ceil; | 224 | unsigned long available, new_ceil = (unsigned long)omap_sram_ceil; |
220 | 225 | ||
221 | available = omap_sram_ceil - (omap_sram_base + SRAM_BOOTLOADER_SZ); | 226 | available = omap_sram_ceil - (omap_sram_base + omap_sram_skip); |
222 | 227 | ||
223 | if (size > available) { | 228 | if (size > available) { |
224 | pr_err("Not enough space in SRAM\n"); | 229 | pr_err("Not enough space in SRAM\n"); |
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index d245a87dc014..b8b747a9d360 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c | |||
@@ -291,10 +291,12 @@ static struct platform_device orion_ge00 = { | |||
291 | void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data, | 291 | void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data, |
292 | unsigned long mapbase, | 292 | unsigned long mapbase, |
293 | unsigned long irq, | 293 | unsigned long irq, |
294 | unsigned long irq_err) | 294 | unsigned long irq_err, |
295 | unsigned int tx_csum_limit) | ||
295 | { | 296 | { |
296 | fill_resources(&orion_ge00_shared, orion_ge00_shared_resources, | 297 | fill_resources(&orion_ge00_shared, orion_ge00_shared_resources, |
297 | mapbase + 0x2000, SZ_16K - 1, irq_err); | 298 | mapbase + 0x2000, SZ_16K - 1, irq_err); |
299 | orion_ge00_shared_data.tx_csum_limit = tx_csum_limit; | ||
298 | ge_complete(&orion_ge00_shared_data, | 300 | ge_complete(&orion_ge00_shared_data, |
299 | orion_ge00_resources, irq, &orion_ge00_shared, | 301 | orion_ge00_resources, irq, &orion_ge00_shared, |
300 | eth_data, &orion_ge00); | 302 | eth_data, &orion_ge00); |
@@ -343,10 +345,12 @@ static struct platform_device orion_ge01 = { | |||
343 | void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, | 345 | void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, |
344 | unsigned long mapbase, | 346 | unsigned long mapbase, |
345 | unsigned long irq, | 347 | unsigned long irq, |
346 | unsigned long irq_err) | 348 | unsigned long irq_err, |
349 | unsigned int tx_csum_limit) | ||
347 | { | 350 | { |
348 | fill_resources(&orion_ge01_shared, orion_ge01_shared_resources, | 351 | fill_resources(&orion_ge01_shared, orion_ge01_shared_resources, |
349 | mapbase + 0x2000, SZ_16K - 1, irq_err); | 352 | mapbase + 0x2000, SZ_16K - 1, irq_err); |
353 | orion_ge01_shared_data.tx_csum_limit = tx_csum_limit; | ||
350 | ge_complete(&orion_ge01_shared_data, | 354 | ge_complete(&orion_ge01_shared_data, |
351 | orion_ge01_resources, irq, &orion_ge01_shared, | 355 | orion_ge01_resources, irq, &orion_ge01_shared, |
352 | eth_data, &orion_ge01); | 356 | eth_data, &orion_ge01); |
diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/plat-orion/include/plat/common.h index e00fdb213609..ae2377ef63e5 100644 --- a/arch/arm/plat-orion/include/plat/common.h +++ b/arch/arm/plat-orion/include/plat/common.h | |||
@@ -39,12 +39,14 @@ void __init orion_rtc_init(unsigned long mapbase, | |||
39 | void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data, | 39 | void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data, |
40 | unsigned long mapbase, | 40 | unsigned long mapbase, |
41 | unsigned long irq, | 41 | unsigned long irq, |
42 | unsigned long irq_err); | 42 | unsigned long irq_err, |
43 | unsigned int tx_csum_limit); | ||
43 | 44 | ||
44 | void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, | 45 | void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, |
45 | unsigned long mapbase, | 46 | unsigned long mapbase, |
46 | unsigned long irq, | 47 | unsigned long irq, |
47 | unsigned long irq_err); | 48 | unsigned long irq_err, |
49 | unsigned int tx_csum_limit); | ||
48 | 50 | ||
49 | void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data, | 51 | void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data, |
50 | unsigned long mapbase, | 52 | unsigned long mapbase, |
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index 28f898f75380..db98e7021f0d 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
@@ -430,7 +430,7 @@ s3c2410_dma_canload(struct s3c2410_dma_chan *chan) | |||
430 | * when necessary. | 430 | * when necessary. |
431 | */ | 431 | */ |
432 | 432 | ||
433 | int s3c2410_dma_enqueue(unsigned int channel, void *id, | 433 | int s3c2410_dma_enqueue(enum dma_ch channel, void *id, |
434 | dma_addr_t data, int size) | 434 | dma_addr_t data, int size) |
435 | { | 435 | { |
436 | struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); | 436 | struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); |
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index 7aca31c1df1f..9c3b90c3538e 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
@@ -403,7 +403,8 @@ config S5P_DEV_USB_EHCI | |||
403 | 403 | ||
404 | config S3C24XX_PWM | 404 | config S3C24XX_PWM |
405 | bool "PWM device support" | 405 | bool "PWM device support" |
406 | select HAVE_PWM | 406 | select PWM |
407 | select PWM_SAMSUNG | ||
407 | help | 408 | help |
408 | Support for exporting the PWM timer blocks via the pwm device | 409 | Support for exporting the PWM timer blocks via the pwm device |
409 | system | 410 | system |
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c index 65c5eca475e7..d1116e2dfbea 100644 --- a/arch/arm/plat-samsung/clock.c +++ b/arch/arm/plat-samsung/clock.c | |||
@@ -144,6 +144,7 @@ long clk_round_rate(struct clk *clk, unsigned long rate) | |||
144 | 144 | ||
145 | int clk_set_rate(struct clk *clk, unsigned long rate) | 145 | int clk_set_rate(struct clk *clk, unsigned long rate) |
146 | { | 146 | { |
147 | unsigned long flags; | ||
147 | int ret; | 148 | int ret; |
148 | 149 | ||
149 | if (IS_ERR(clk)) | 150 | if (IS_ERR(clk)) |
@@ -159,9 +160,9 @@ int clk_set_rate(struct clk *clk, unsigned long rate) | |||
159 | if (clk->ops == NULL || clk->ops->set_rate == NULL) | 160 | if (clk->ops == NULL || clk->ops->set_rate == NULL) |
160 | return -EINVAL; | 161 | return -EINVAL; |
161 | 162 | ||
162 | spin_lock(&clocks_lock); | 163 | spin_lock_irqsave(&clocks_lock, flags); |
163 | ret = (clk->ops->set_rate)(clk, rate); | 164 | ret = (clk->ops->set_rate)(clk, rate); |
164 | spin_unlock(&clocks_lock); | 165 | spin_unlock_irqrestore(&clocks_lock, flags); |
165 | 166 | ||
166 | return ret; | 167 | return ret; |
167 | } | 168 | } |
@@ -173,17 +174,18 @@ struct clk *clk_get_parent(struct clk *clk) | |||
173 | 174 | ||
174 | int clk_set_parent(struct clk *clk, struct clk *parent) | 175 | int clk_set_parent(struct clk *clk, struct clk *parent) |
175 | { | 176 | { |
177 | unsigned long flags; | ||
176 | int ret = 0; | 178 | int ret = 0; |
177 | 179 | ||
178 | if (IS_ERR(clk)) | 180 | if (IS_ERR(clk)) |
179 | return -EINVAL; | 181 | return -EINVAL; |
180 | 182 | ||
181 | spin_lock(&clocks_lock); | 183 | spin_lock_irqsave(&clocks_lock, flags); |
182 | 184 | ||
183 | if (clk->ops && clk->ops->set_parent) | 185 | if (clk->ops && clk->ops->set_parent) |
184 | ret = (clk->ops->set_parent)(clk, parent); | 186 | ret = (clk->ops->set_parent)(clk, parent); |
185 | 187 | ||
186 | spin_unlock(&clocks_lock); | 188 | spin_unlock_irqrestore(&clocks_lock, flags); |
187 | 189 | ||
188 | return ret; | 190 | return ret; |
189 | } | 191 | } |
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 74e31ce35538..fc49f3dabd76 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c | |||
@@ -32,6 +32,8 @@ | |||
32 | #include <linux/platform_data/s3c-hsudc.h> | 32 | #include <linux/platform_data/s3c-hsudc.h> |
33 | #include <linux/platform_data/s3c-hsotg.h> | 33 | #include <linux/platform_data/s3c-hsotg.h> |
34 | 34 | ||
35 | #include <media/s5p_hdmi.h> | ||
36 | |||
35 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
36 | #include <asm/pmu.h> | 38 | #include <asm/pmu.h> |
37 | #include <asm/mach/arch.h> | 39 | #include <asm/mach/arch.h> |
@@ -748,7 +750,8 @@ void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd) | |||
748 | if (!pd) { | 750 | if (!pd) { |
749 | pd = &default_i2c_data; | 751 | pd = &default_i2c_data; |
750 | 752 | ||
751 | if (soc_is_exynos4210()) | 753 | if (soc_is_exynos4210() || |
754 | soc_is_exynos4212() || soc_is_exynos4412()) | ||
752 | pd->bus_num = 8; | 755 | pd->bus_num = 8; |
753 | else if (soc_is_s5pv210()) | 756 | else if (soc_is_s5pv210()) |
754 | pd->bus_num = 3; | 757 | pd->bus_num = 3; |
@@ -759,6 +762,30 @@ void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd) | |||
759 | npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), | 762 | npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), |
760 | &s5p_device_i2c_hdmiphy); | 763 | &s5p_device_i2c_hdmiphy); |
761 | } | 764 | } |
765 | |||
766 | struct s5p_hdmi_platform_data s5p_hdmi_def_platdata; | ||
767 | |||
768 | void __init s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info, | ||
769 | struct i2c_board_info *mhl_info, int mhl_bus) | ||
770 | { | ||
771 | struct s5p_hdmi_platform_data *pd = &s5p_hdmi_def_platdata; | ||
772 | |||
773 | if (soc_is_exynos4210() || | ||
774 | soc_is_exynos4212() || soc_is_exynos4412()) | ||
775 | pd->hdmiphy_bus = 8; | ||
776 | else if (soc_is_s5pv210()) | ||
777 | pd->hdmiphy_bus = 3; | ||
778 | else | ||
779 | pd->hdmiphy_bus = 0; | ||
780 | |||
781 | pd->hdmiphy_info = hdmiphy_info; | ||
782 | pd->mhl_info = mhl_info; | ||
783 | pd->mhl_bus = mhl_bus; | ||
784 | |||
785 | s3c_set_platdata(pd, sizeof(struct s5p_hdmi_platform_data), | ||
786 | &s5p_device_hdmi); | ||
787 | } | ||
788 | |||
762 | #endif /* CONFIG_S5P_DEV_I2C_HDMIPHY */ | 789 | #endif /* CONFIG_S5P_DEV_I2C_HDMIPHY */ |
763 | 790 | ||
764 | /* I2S */ | 791 | /* I2S */ |
diff --git a/arch/arm/plat-samsung/include/plat/hdmi.h b/arch/arm/plat-samsung/include/plat/hdmi.h new file mode 100644 index 000000000000..331d046ac2c5 --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/hdmi.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Samsung Electronics Co.Ltd | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License as published by the | ||
6 | * Free Software Foundation; either version 2 of the License, or (at your | ||
7 | * option) any later version. | ||
8 | */ | ||
9 | |||
10 | #ifndef __PLAT_SAMSUNG_HDMI_H | ||
11 | #define __PLAT_SAMSUNG_HDMI_H __FILE__ | ||
12 | |||
13 | extern void s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info, | ||
14 | struct i2c_board_info *mhl_info, int mhl_bus); | ||
15 | |||
16 | #endif /* __PLAT_SAMSUNG_HDMI_H */ | ||
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index 64ab65f0fdbc..15070284343e 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c | |||
@@ -74,7 +74,7 @@ unsigned char pm_uart_udivslot; | |||
74 | 74 | ||
75 | #ifdef CONFIG_SAMSUNG_PM_DEBUG | 75 | #ifdef CONFIG_SAMSUNG_PM_DEBUG |
76 | 76 | ||
77 | struct pm_uart_save uart_save[CONFIG_SERIAL_SAMSUNG_UARTS]; | 77 | static struct pm_uart_save uart_save[CONFIG_SERIAL_SAMSUNG_UARTS]; |
78 | 78 | ||
79 | static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save) | 79 | static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save) |
80 | { | 80 | { |
diff --git a/arch/arm/plat-versatile/fpga-irq.c b/arch/arm/plat-versatile/fpga-irq.c index 6e70d03824a1..091ae1030045 100644 --- a/arch/arm/plat-versatile/fpga-irq.c +++ b/arch/arm/plat-versatile/fpga-irq.c | |||
@@ -5,6 +5,8 @@ | |||
5 | #include <linux/io.h> | 5 | #include <linux/io.h> |
6 | #include <linux/irqdomain.h> | 6 | #include <linux/irqdomain.h> |
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/of.h> | ||
9 | #include <linux/of_address.h> | ||
8 | 10 | ||
9 | #include <asm/exception.h> | 11 | #include <asm/exception.h> |
10 | #include <asm/mach/irq.h> | 12 | #include <asm/mach/irq.h> |
@@ -14,11 +16,17 @@ | |||
14 | #define IRQ_RAW_STATUS 0x04 | 16 | #define IRQ_RAW_STATUS 0x04 |
15 | #define IRQ_ENABLE_SET 0x08 | 17 | #define IRQ_ENABLE_SET 0x08 |
16 | #define IRQ_ENABLE_CLEAR 0x0c | 18 | #define IRQ_ENABLE_CLEAR 0x0c |
19 | #define INT_SOFT_SET 0x10 | ||
20 | #define INT_SOFT_CLEAR 0x14 | ||
21 | #define FIQ_STATUS 0x20 | ||
22 | #define FIQ_RAW_STATUS 0x24 | ||
23 | #define FIQ_ENABLE 0x28 | ||
24 | #define FIQ_ENABLE_SET 0x28 | ||
25 | #define FIQ_ENABLE_CLEAR 0x2C | ||
17 | 26 | ||
18 | /** | 27 | /** |
19 | * struct fpga_irq_data - irq data container for the FPGA IRQ controller | 28 | * struct fpga_irq_data - irq data container for the FPGA IRQ controller |
20 | * @base: memory offset in virtual memory | 29 | * @base: memory offset in virtual memory |
21 | * @irq_start: first IRQ number handled by this instance | ||
22 | * @chip: chip container for this instance | 30 | * @chip: chip container for this instance |
23 | * @domain: IRQ domain for this instance | 31 | * @domain: IRQ domain for this instance |
24 | * @valid: mask for valid IRQs on this controller | 32 | * @valid: mask for valid IRQs on this controller |
@@ -26,7 +34,6 @@ | |||
26 | */ | 34 | */ |
27 | struct fpga_irq_data { | 35 | struct fpga_irq_data { |
28 | void __iomem *base; | 36 | void __iomem *base; |
29 | unsigned int irq_start; | ||
30 | struct irq_chip chip; | 37 | struct irq_chip chip; |
31 | u32 valid; | 38 | u32 valid; |
32 | struct irq_domain *domain; | 39 | struct irq_domain *domain; |
@@ -125,34 +132,79 @@ static struct irq_domain_ops fpga_irqdomain_ops = { | |||
125 | .xlate = irq_domain_xlate_onetwocell, | 132 | .xlate = irq_domain_xlate_onetwocell, |
126 | }; | 133 | }; |
127 | 134 | ||
128 | void __init fpga_irq_init(void __iomem *base, const char *name, int irq_start, | 135 | static __init struct fpga_irq_data * |
129 | int parent_irq, u32 valid, struct device_node *node) | 136 | fpga_irq_prep_struct(void __iomem *base, const char *name, u32 valid) { |
130 | { | ||
131 | struct fpga_irq_data *f; | 137 | struct fpga_irq_data *f; |
132 | 138 | ||
133 | if (fpga_irq_id >= ARRAY_SIZE(fpga_irq_devices)) { | 139 | if (fpga_irq_id >= ARRAY_SIZE(fpga_irq_devices)) { |
134 | printk(KERN_ERR "%s: too few FPGA IRQ controllers, increase CONFIG_PLAT_VERSATILE_FPGA_IRQ_NR\n", __func__); | 140 | printk(KERN_ERR "%s: too few FPGA IRQ controllers, increase CONFIG_PLAT_VERSATILE_FPGA_IRQ_NR\n", __func__); |
135 | return; | 141 | return NULL; |
136 | } | 142 | } |
137 | |||
138 | f = &fpga_irq_devices[fpga_irq_id]; | 143 | f = &fpga_irq_devices[fpga_irq_id]; |
139 | f->base = base; | 144 | f->base = base; |
140 | f->irq_start = irq_start; | ||
141 | f->chip.name = name; | 145 | f->chip.name = name; |
142 | f->chip.irq_ack = fpga_irq_mask; | 146 | f->chip.irq_ack = fpga_irq_mask; |
143 | f->chip.irq_mask = fpga_irq_mask; | 147 | f->chip.irq_mask = fpga_irq_mask; |
144 | f->chip.irq_unmask = fpga_irq_unmask; | 148 | f->chip.irq_unmask = fpga_irq_unmask; |
145 | f->valid = valid; | 149 | f->valid = valid; |
150 | fpga_irq_id++; | ||
151 | |||
152 | return f; | ||
153 | } | ||
154 | |||
155 | void __init fpga_irq_init(void __iomem *base, const char *name, int irq_start, | ||
156 | int parent_irq, u32 valid, struct device_node *node) | ||
157 | { | ||
158 | struct fpga_irq_data *f; | ||
159 | |||
160 | f = fpga_irq_prep_struct(base, name, valid); | ||
161 | if (!f) | ||
162 | return; | ||
146 | 163 | ||
147 | if (parent_irq != -1) { | 164 | if (parent_irq != -1) { |
148 | irq_set_handler_data(parent_irq, f); | 165 | irq_set_handler_data(parent_irq, f); |
149 | irq_set_chained_handler(parent_irq, fpga_irq_handle); | 166 | irq_set_chained_handler(parent_irq, fpga_irq_handle); |
150 | } | 167 | } |
151 | 168 | ||
152 | f->domain = irq_domain_add_legacy(node, fls(valid), f->irq_start, 0, | 169 | f->domain = irq_domain_add_legacy(node, fls(valid), irq_start, 0, |
153 | &fpga_irqdomain_ops, f); | 170 | &fpga_irqdomain_ops, f); |
154 | pr_info("FPGA IRQ chip %d \"%s\" @ %p, %u irqs\n", | 171 | pr_info("FPGA IRQ chip %d \"%s\" @ %p, %u irqs\n", |
155 | fpga_irq_id, name, base, f->used_irqs); | 172 | fpga_irq_id, name, base, f->used_irqs); |
173 | } | ||
156 | 174 | ||
157 | fpga_irq_id++; | 175 | #ifdef CONFIG_OF |
176 | int __init fpga_irq_of_init(struct device_node *node, | ||
177 | struct device_node *parent) | ||
178 | { | ||
179 | struct fpga_irq_data *f; | ||
180 | void __iomem *base; | ||
181 | u32 clear_mask; | ||
182 | u32 valid_mask; | ||
183 | |||
184 | if (WARN_ON(!node)) | ||
185 | return -ENODEV; | ||
186 | |||
187 | base = of_iomap(node, 0); | ||
188 | WARN(!base, "unable to map fpga irq registers\n"); | ||
189 | |||
190 | if (of_property_read_u32(node, "clear-mask", &clear_mask)) | ||
191 | clear_mask = 0; | ||
192 | |||
193 | if (of_property_read_u32(node, "valid-mask", &valid_mask)) | ||
194 | valid_mask = 0; | ||
195 | |||
196 | f = fpga_irq_prep_struct(base, node->name, valid_mask); | ||
197 | if (!f) | ||
198 | return -ENOMEM; | ||
199 | |||
200 | writel(clear_mask, base + IRQ_ENABLE_CLEAR); | ||
201 | writel(clear_mask, base + FIQ_ENABLE_CLEAR); | ||
202 | |||
203 | f->domain = irq_domain_add_linear(node, fls(valid_mask), &fpga_irqdomain_ops, f); | ||
204 | f->used_irqs = hweight32(valid_mask); | ||
205 | |||
206 | pr_info("FPGA IRQ chip %d \"%s\" @ %p, %u irqs\n", | ||
207 | fpga_irq_id, node->name, base, f->used_irqs); | ||
208 | return 0; | ||
158 | } | 209 | } |
210 | #endif | ||
diff --git a/arch/arm/plat-versatile/include/plat/fpga-irq.h b/arch/arm/plat-versatile/include/plat/fpga-irq.h index 91bcfb67551d..1fac9651d3ca 100644 --- a/arch/arm/plat-versatile/include/plat/fpga-irq.h +++ b/arch/arm/plat-versatile/include/plat/fpga-irq.h | |||
@@ -7,5 +7,7 @@ struct pt_regs; | |||
7 | void fpga_handle_irq(struct pt_regs *regs); | 7 | void fpga_handle_irq(struct pt_regs *regs); |
8 | void fpga_irq_init(void __iomem *, const char *, int, int, u32, | 8 | void fpga_irq_init(void __iomem *, const char *, int, int, u32, |
9 | struct device_node *node); | 9 | struct device_node *node); |
10 | int fpga_irq_of_init(struct device_node *node, | ||
11 | struct device_node *parent); | ||
10 | 12 | ||
11 | #endif | 13 | #endif |
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index fb849d044bde..c834b32af275 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -719,8 +719,10 @@ static int __init vfp_init(void) | |||
719 | if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100) | 719 | if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100) |
720 | elf_hwcap |= HWCAP_NEON; | 720 | elf_hwcap |= HWCAP_NEON; |
721 | #endif | 721 | #endif |
722 | #ifdef CONFIG_VFPv3 | ||
722 | if ((fmrx(MVFR1) & 0xf0000000) == 0x10000000) | 723 | if ((fmrx(MVFR1) & 0xf0000000) == 0x10000000) |
723 | elf_hwcap |= HWCAP_VFPv4; | 724 | elf_hwcap |= HWCAP_VFPv4; |
725 | #endif | ||
724 | } | 726 | } |
725 | } | 727 | } |
726 | return 0; | 728 | return 0; |