diff options
Diffstat (limited to 'arch/arm')
133 files changed, 2244 insertions, 642 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c1f1a7eee953..f219c30eb4e1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -6,12 +6,13 @@ config ARM | |||
6 | select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST | 6 | select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST |
7 | select ARCH_HAVE_CUSTOM_GPIO_H | 7 | select ARCH_HAVE_CUSTOM_GPIO_H |
8 | select ARCH_MIGHT_HAVE_PC_PARPORT | 8 | select ARCH_MIGHT_HAVE_PC_PARPORT |
9 | select ARCH_USE_BUILTIN_BSWAP | ||
9 | select ARCH_USE_CMPXCHG_LOCKREF | 10 | select ARCH_USE_CMPXCHG_LOCKREF |
10 | select ARCH_WANT_IPC_PARSE_VERSION | 11 | select ARCH_WANT_IPC_PARSE_VERSION |
11 | select BUILDTIME_EXTABLE_SORT if MMU | 12 | select BUILDTIME_EXTABLE_SORT if MMU |
12 | select CLONE_BACKWARDS | 13 | select CLONE_BACKWARDS |
13 | select CPU_PM if (SUSPEND || CPU_IDLE) | 14 | select CPU_PM if (SUSPEND || CPU_IDLE) |
14 | select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN && MMU | 15 | select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS |
15 | select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI) | 16 | select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI) |
16 | select GENERIC_CLOCKEVENTS_BROADCAST if SMP | 17 | select GENERIC_CLOCKEVENTS_BROADCAST if SMP |
17 | select GENERIC_IDLE_POLL_SETUP | 18 | select GENERIC_IDLE_POLL_SETUP |
@@ -35,6 +36,7 @@ config ARM | |||
35 | select HAVE_DMA_ATTRS | 36 | select HAVE_DMA_ATTRS |
36 | select HAVE_DMA_CONTIGUOUS if MMU | 37 | select HAVE_DMA_CONTIGUOUS if MMU |
37 | select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL) | 38 | select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL) |
39 | select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU | ||
38 | select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL) | 40 | select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL) |
39 | select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL) | 41 | select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL) |
40 | select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) | 42 | select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) |
@@ -1651,9 +1653,6 @@ config HZ | |||
1651 | config SCHED_HRTICK | 1653 | config SCHED_HRTICK |
1652 | def_bool HIGH_RES_TIMERS | 1654 | def_bool HIGH_RES_TIMERS |
1653 | 1655 | ||
1654 | config SCHED_HRTICK | ||
1655 | def_bool HIGH_RES_TIMERS | ||
1656 | |||
1657 | config THUMB2_KERNEL | 1656 | config THUMB2_KERNEL |
1658 | bool "Compile the kernel in Thumb-2 mode" if !CPU_THUMBONLY | 1657 | bool "Compile the kernel in Thumb-2 mode" if !CPU_THUMBONLY |
1659 | depends on (CPU_V7 || CPU_V7M) && !CPU_V6 && !CPU_V6K | 1658 | depends on (CPU_V7 || CPU_V7M) && !CPU_V6 && !CPU_V6K |
@@ -1946,6 +1945,7 @@ config ZBOOT_ROM_BSS | |||
1946 | config ZBOOT_ROM | 1945 | config ZBOOT_ROM |
1947 | bool "Compressed boot loader in ROM/flash" | 1946 | bool "Compressed boot loader in ROM/flash" |
1948 | depends on ZBOOT_ROM_TEXT != ZBOOT_ROM_BSS | 1947 | depends on ZBOOT_ROM_TEXT != ZBOOT_ROM_BSS |
1948 | depends on !ARM_APPENDED_DTB && !XIP_KERNEL && !AUTO_ZRELADDR | ||
1949 | help | 1949 | help |
1950 | Say Y here if you intend to execute your compressed kernel image | 1950 | Say Y here if you intend to execute your compressed kernel image |
1951 | (zImage) directly from ROM or flash. If unsure, say N. | 1951 | (zImage) directly from ROM or flash. If unsure, say N. |
@@ -1981,7 +1981,7 @@ endchoice | |||
1981 | 1981 | ||
1982 | config ARM_APPENDED_DTB | 1982 | config ARM_APPENDED_DTB |
1983 | bool "Use appended device tree blob to zImage (EXPERIMENTAL)" | 1983 | bool "Use appended device tree blob to zImage (EXPERIMENTAL)" |
1984 | depends on OF && !ZBOOT_ROM | 1984 | depends on OF |
1985 | help | 1985 | help |
1986 | With this option, the boot code will look for a device tree binary | 1986 | With this option, the boot code will look for a device tree binary |
1987 | (DTB) appended to zImage | 1987 | (DTB) appended to zImage |
@@ -2069,7 +2069,7 @@ endchoice | |||
2069 | 2069 | ||
2070 | config XIP_KERNEL | 2070 | config XIP_KERNEL |
2071 | bool "Kernel Execute-In-Place from ROM" | 2071 | bool "Kernel Execute-In-Place from ROM" |
2072 | depends on !ZBOOT_ROM && !ARM_LPAE && !ARCH_MULTIPLATFORM | 2072 | depends on !ARM_LPAE && !ARCH_MULTIPLATFORM |
2073 | help | 2073 | help |
2074 | Execute-In-Place allows the kernel to run from non-volatile storage | 2074 | Execute-In-Place allows the kernel to run from non-volatile storage |
2075 | directly addressable by the CPU, such as NOR flash. This saves RAM | 2075 | directly addressable by the CPU, such as NOR flash. This saves RAM |
@@ -2132,7 +2132,6 @@ config CRASH_DUMP | |||
2132 | 2132 | ||
2133 | config AUTO_ZRELADDR | 2133 | config AUTO_ZRELADDR |
2134 | bool "Auto calculation of the decompressed kernel image address" | 2134 | bool "Auto calculation of the decompressed kernel image address" |
2135 | depends on !ZBOOT_ROM | ||
2136 | help | 2135 | help |
2137 | ZRELADDR is the physical address where the decompressed kernel | 2136 | ZRELADDR is the physical address where the decompressed kernel |
2138 | image will be placed. If AUTO_ZRELADDR is selected, the address | 2137 | image will be placed. If AUTO_ZRELADDR is selected, the address |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 5765abf5ce84..9afabbb5e798 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -2,6 +2,18 @@ menu "Kernel hacking" | |||
2 | 2 | ||
3 | source "lib/Kconfig.debug" | 3 | source "lib/Kconfig.debug" |
4 | 4 | ||
5 | config ARM_PTDUMP | ||
6 | bool "Export kernel pagetable layout to userspace via debugfs" | ||
7 | depends on DEBUG_KERNEL | ||
8 | select DEBUG_FS | ||
9 | ---help--- | ||
10 | Say Y here if you want to show the kernel pagetable layout in a | ||
11 | debugfs file. This information is only useful for kernel developers | ||
12 | who are working in architecture specific areas of the kernel. | ||
13 | It is probably not a good idea to enable this feature in a production | ||
14 | kernel. | ||
15 | If in doubt, say "N" | ||
16 | |||
5 | config STRICT_DEVMEM | 17 | config STRICT_DEVMEM |
6 | bool "Filter access to /dev/mem" | 18 | bool "Filter access to /dev/mem" |
7 | depends on MMU | 19 | depends on MMU |
@@ -94,6 +106,17 @@ choice | |||
94 | depends on ARCH_BCM2835 | 106 | depends on ARCH_BCM2835 |
95 | select DEBUG_UART_PL01X | 107 | select DEBUG_UART_PL01X |
96 | 108 | ||
109 | config DEBUG_BCM_KONA_UART | ||
110 | bool "Kernel low-level debugging messages via BCM KONA UART" | ||
111 | depends on ARCH_BCM | ||
112 | select DEBUG_UART_8250 | ||
113 | help | ||
114 | Say Y here if you want kernel low-level debugging support | ||
115 | on Broadcom SoC platforms. | ||
116 | This low level debug works for Broadcom | ||
117 | mobile SoCs in the Kona family of chips (e.g. bcm28155, | ||
118 | bcm11351, etc...) | ||
119 | |||
97 | config DEBUG_CLPS711X_UART1 | 120 | config DEBUG_CLPS711X_UART1 |
98 | bool "Kernel low-level debugging messages via UART1" | 121 | bool "Kernel low-level debugging messages via UART1" |
99 | depends on ARCH_CLPS711X | 122 | depends on ARCH_CLPS711X |
@@ -988,6 +1011,7 @@ config DEBUG_UART_PHYS | |||
988 | default 0x20064000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2 | 1011 | default 0x20064000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2 |
989 | default 0x20068000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3 | 1012 | default 0x20068000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3 |
990 | default 0x20201000 if DEBUG_BCM2835 | 1013 | default 0x20201000 if DEBUG_BCM2835 |
1014 | default 0x3e000000 if DEBUG_BCM_KONA_UART | ||
991 | default 0x4000e400 if DEBUG_LL_UART_EFM32 | 1015 | default 0x4000e400 if DEBUG_LL_UART_EFM32 |
992 | default 0x40090000 if ARCH_LPC32XX | 1016 | default 0x40090000 if ARCH_LPC32XX |
993 | default 0x40100000 if DEBUG_PXA_UART1 | 1017 | default 0x40100000 if DEBUG_PXA_UART1 |
@@ -1049,6 +1073,7 @@ config DEBUG_UART_VIRT | |||
1049 | default 0xfe018000 if DEBUG_MMP_UART3 | 1073 | default 0xfe018000 if DEBUG_MMP_UART3 |
1050 | default 0xfe100000 if DEBUG_IMX23_UART || DEBUG_IMX28_UART | 1074 | default 0xfe100000 if DEBUG_IMX23_UART || DEBUG_IMX28_UART |
1051 | default 0xfe230000 if DEBUG_PICOXCELL_UART | 1075 | default 0xfe230000 if DEBUG_PICOXCELL_UART |
1076 | default 0xfe300000 if DEBUG_BCM_KONA_UART | ||
1052 | default 0xfe800000 if ARCH_IOP32X | 1077 | default 0xfe800000 if ARCH_IOP32X |
1053 | default 0xfeb00000 if DEBUG_HI3620_UART || DEBUG_HI3716_UART | 1078 | default 0xfeb00000 if DEBUG_HI3620_UART || DEBUG_HI3716_UART |
1054 | default 0xfeb24000 if DEBUG_RK3X_UART0 | 1079 | default 0xfeb24000 if DEBUG_RK3X_UART0 |
@@ -1091,7 +1116,8 @@ config DEBUG_UART_8250_WORD | |||
1091 | default y if DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \ | 1116 | default y if DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \ |
1092 | ARCH_KEYSTONE || \ | 1117 | ARCH_KEYSTONE || \ |
1093 | DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \ | 1118 | DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \ |
1094 | DEBUG_DAVINCI_DA8XX_UART2 || DEBUG_DAVINCI_TNETV107X_UART1 | 1119 | DEBUG_DAVINCI_DA8XX_UART2 || DEBUG_DAVINCI_TNETV107X_UART1 || \ |
1120 | DEBUG_BCM_KONA_UART | ||
1095 | 1121 | ||
1096 | config DEBUG_UART_8250_FLOW_CONTROL | 1122 | config DEBUG_UART_8250_FLOW_CONTROL |
1097 | bool "Enable flow control for 8250 UART" | 1123 | bool "Enable flow control for 8250 UART" |
@@ -1150,4 +1176,15 @@ config PID_IN_CONTEXTIDR | |||
1150 | additional instructions during context switch. Say Y here only if you | 1176 | additional instructions during context switch. Say Y here only if you |
1151 | are planning to use hardware trace tools with this kernel. | 1177 | are planning to use hardware trace tools with this kernel. |
1152 | 1178 | ||
1179 | config DEBUG_SET_MODULE_RONX | ||
1180 | bool "Set loadable kernel module data as NX and text as RO" | ||
1181 | depends on MODULES | ||
1182 | ---help--- | ||
1183 | This option helps catch unintended modifications to loadable | ||
1184 | kernel module's text and read-only data. It also prevents execution | ||
1185 | of module data. Such protection may interfere with run-time code | ||
1186 | patching and dynamic kernel tracing - and they might also protect | ||
1187 | against certain classes of kernel exploits. | ||
1188 | If in doubt, say "N". | ||
1189 | |||
1153 | endmenu | 1190 | endmenu |
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index e7190bb5998e..4bb86d9a749d 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -108,12 +108,12 @@ endif | |||
108 | 108 | ||
109 | targets := vmlinux vmlinux.lds \ | 109 | targets := vmlinux vmlinux.lds \ |
110 | piggy.$(suffix_y) piggy.$(suffix_y).o \ | 110 | piggy.$(suffix_y) piggy.$(suffix_y).o \ |
111 | lib1funcs.o lib1funcs.S ashldi3.o ashldi3.S \ | 111 | lib1funcs.o lib1funcs.S ashldi3.o ashldi3.S bswapsdi2.o \ |
112 | font.o font.c head.o misc.o $(OBJS) | 112 | bswapsdi2.S font.o font.c head.o misc.o $(OBJS) |
113 | 113 | ||
114 | # Make sure files are removed during clean | 114 | # Make sure files are removed during clean |
115 | extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.lz4 \ | 115 | extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.lz4 \ |
116 | lib1funcs.S ashldi3.S $(libfdt) $(libfdt_hdrs) \ | 116 | lib1funcs.S ashldi3.S bswapsdi2.S $(libfdt) $(libfdt_hdrs) \ |
117 | hyp-stub.S | 117 | hyp-stub.S |
118 | 118 | ||
119 | ifeq ($(CONFIG_FUNCTION_TRACER),y) | 119 | ifeq ($(CONFIG_FUNCTION_TRACER),y) |
@@ -156,6 +156,12 @@ ashldi3 = $(obj)/ashldi3.o | |||
156 | $(obj)/ashldi3.S: $(srctree)/arch/$(SRCARCH)/lib/ashldi3.S | 156 | $(obj)/ashldi3.S: $(srctree)/arch/$(SRCARCH)/lib/ashldi3.S |
157 | $(call cmd,shipped) | 157 | $(call cmd,shipped) |
158 | 158 | ||
159 | # For __bswapsi2, __bswapdi2 | ||
160 | bswapsdi2 = $(obj)/bswapsdi2.o | ||
161 | |||
162 | $(obj)/bswapsdi2.S: $(srctree)/arch/$(SRCARCH)/lib/bswapsdi2.S | ||
163 | $(call cmd,shipped) | ||
164 | |||
159 | # We need to prevent any GOTOFF relocs being used with references | 165 | # We need to prevent any GOTOFF relocs being used with references |
160 | # to symbols in the .bss section since we cannot relocate them | 166 | # to symbols in the .bss section since we cannot relocate them |
161 | # independently from the rest at run time. This can be achieved by | 167 | # independently from the rest at run time. This can be achieved by |
@@ -177,7 +183,8 @@ if [ $(words $(ZRELADDR)) -gt 1 -a "$(CONFIG_AUTO_ZRELADDR)" = "" ]; then \ | |||
177 | fi | 183 | fi |
178 | 184 | ||
179 | $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \ | 185 | $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \ |
180 | $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) $(ashldi3) FORCE | 186 | $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) $(ashldi3) \ |
187 | $(bswapsdi2) FORCE | ||
181 | @$(check_for_multiple_zreladdr) | 188 | @$(check_for_multiple_zreladdr) |
182 | $(call if_changed,ld) | 189 | $(call if_changed,ld) |
183 | @$(check_for_bad_syms) | 190 | @$(check_for_bad_syms) |
diff --git a/arch/arm/boot/dts/am335x-base0033.dts b/arch/arm/boot/dts/am335x-base0033.dts index b4f95c2bbf74..72a9b3fc4251 100644 --- a/arch/arm/boot/dts/am335x-base0033.dts +++ b/arch/arm/boot/dts/am335x-base0033.dts | |||
@@ -13,4 +13,83 @@ | |||
13 | / { | 13 | / { |
14 | model = "IGEP COM AM335x on AQUILA Expansion"; | 14 | model = "IGEP COM AM335x on AQUILA Expansion"; |
15 | compatible = "isee,am335x-base0033", "isee,am335x-igep0033", "ti,am33xx"; | 15 | compatible = "isee,am335x-base0033", "isee,am335x-igep0033", "ti,am33xx"; |
16 | |||
17 | hdmi { | ||
18 | compatible = "ti,tilcdc,slave"; | ||
19 | i2c = <&i2c0>; | ||
20 | pinctrl-names = "default", "off"; | ||
21 | pinctrl-0 = <&nxp_hdmi_pins>; | ||
22 | pinctrl-1 = <&nxp_hdmi_off_pins>; | ||
23 | status = "okay"; | ||
24 | }; | ||
25 | |||
26 | leds_base { | ||
27 | pinctrl-names = "default"; | ||
28 | pinctrl-0 = <&leds_base_pins>; | ||
29 | |||
30 | compatible = "gpio-leds"; | ||
31 | |||
32 | led@0 { | ||
33 | label = "base:red:user"; | ||
34 | gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; /* gpio1_21 */ | ||
35 | default-state = "off"; | ||
36 | }; | ||
37 | |||
38 | led@1 { | ||
39 | label = "base:green:user"; | ||
40 | gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>; /* gpio2_0 */ | ||
41 | default-state = "off"; | ||
42 | }; | ||
43 | }; | ||
44 | }; | ||
45 | |||
46 | &am33xx_pinmux { | ||
47 | nxp_hdmi_pins: pinmux_nxp_hdmi_pins { | ||
48 | pinctrl-single,pins = < | ||
49 | 0x1b0 (PIN_OUTPUT | MUX_MODE3) /* xdma_event_intr0.clkout1 */ | ||
50 | 0xa0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data0 */ | ||
51 | 0xa4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data1 */ | ||
52 | 0xa8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data2 */ | ||
53 | 0xac (PIN_OUTPUT | MUX_MODE0) /* lcd_data3 */ | ||
54 | 0xb0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data4 */ | ||
55 | 0xb4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data5 */ | ||
56 | 0xb8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data6 */ | ||
57 | 0xbc (PIN_OUTPUT | MUX_MODE0) /* lcd_data7 */ | ||
58 | 0xc0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data8 */ | ||
59 | 0xc4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data9 */ | ||
60 | 0xc8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data10 */ | ||
61 | 0xcc (PIN_OUTPUT | MUX_MODE0) /* lcd_data11 */ | ||
62 | 0xd0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data12 */ | ||
63 | 0xd4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data13 */ | ||
64 | 0xd8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data14 */ | ||
65 | 0xdc (PIN_OUTPUT | MUX_MODE0) /* lcd_data15 */ | ||
66 | 0xe0 (PIN_OUTPUT | MUX_MODE0) /* lcd_vsync */ | ||
67 | 0xe4 (PIN_OUTPUT | MUX_MODE0) /* lcd_hsync */ | ||
68 | 0xe8 (PIN_OUTPUT | MUX_MODE0) /* lcd_pclk */ | ||
69 | 0xec (PIN_OUTPUT | MUX_MODE0) /* lcd_ac_bias_en */ | ||
70 | >; | ||
71 | }; | ||
72 | nxp_hdmi_off_pins: pinmux_nxp_hdmi_off_pins { | ||
73 | pinctrl-single,pins = < | ||
74 | 0x1b0 (PIN_OUTPUT | MUX_MODE3) /* xdma_event_intr0.clkout1 */ | ||
75 | >; | ||
76 | }; | ||
77 | |||
78 | leds_base_pins: pinmux_leds_base_pins { | ||
79 | pinctrl-single,pins = < | ||
80 | 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ | ||
81 | 0x88 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn3.gpio2_0 */ | ||
82 | >; | ||
83 | }; | ||
84 | }; | ||
85 | |||
86 | &lcdc { | ||
87 | status = "okay"; | ||
88 | }; | ||
89 | |||
90 | &i2c0 { | ||
91 | eeprom: eeprom@50 { | ||
92 | compatible = "at,24c256"; | ||
93 | reg = <0x50>; | ||
94 | }; | ||
16 | }; | 95 | }; |
diff --git a/arch/arm/boot/dts/am335x-igep0033.dtsi b/arch/arm/boot/dts/am335x-igep0033.dtsi index 619624479311..7063311a58d9 100644 --- a/arch/arm/boot/dts/am335x-igep0033.dtsi +++ b/arch/arm/boot/dts/am335x-igep0033.dtsi | |||
@@ -199,6 +199,35 @@ | |||
199 | pinctrl-0 = <&uart0_pins>; | 199 | pinctrl-0 = <&uart0_pins>; |
200 | }; | 200 | }; |
201 | 201 | ||
202 | &usb { | ||
203 | status = "okay"; | ||
204 | |||
205 | control@44e10000 { | ||
206 | status = "okay"; | ||
207 | }; | ||
208 | |||
209 | usb-phy@47401300 { | ||
210 | status = "okay"; | ||
211 | }; | ||
212 | |||
213 | usb-phy@47401b00 { | ||
214 | status = "okay"; | ||
215 | }; | ||
216 | |||
217 | usb@47401000 { | ||
218 | status = "okay"; | ||
219 | }; | ||
220 | |||
221 | usb@47401800 { | ||
222 | status = "okay"; | ||
223 | dr_mode = "host"; | ||
224 | }; | ||
225 | |||
226 | dma-controller@07402000 { | ||
227 | status = "okay"; | ||
228 | }; | ||
229 | }; | ||
230 | |||
202 | #include "tps65910.dtsi" | 231 | #include "tps65910.dtsi" |
203 | 232 | ||
204 | &tps { | 233 | &tps { |
diff --git a/arch/arm/boot/dts/am3517-evm.dts b/arch/arm/boot/dts/am3517-evm.dts index e99dfaf70052..03fcbf0a88a8 100644 --- a/arch/arm/boot/dts/am3517-evm.dts +++ b/arch/arm/boot/dts/am3517-evm.dts | |||
@@ -7,11 +7,11 @@ | |||
7 | */ | 7 | */ |
8 | /dts-v1/; | 8 | /dts-v1/; |
9 | 9 | ||
10 | #include "omap34xx.dtsi" | 10 | #include "am3517.dtsi" |
11 | 11 | ||
12 | / { | 12 | / { |
13 | model = "TI AM3517 EVM (AM3517/05)"; | 13 | model = "TI AM3517 EVM (AM3517/05 TMDSEVM3517)"; |
14 | compatible = "ti,am3517-evm", "ti,omap3"; | 14 | compatible = "ti,am3517-evm", "ti,am3517", "ti,omap3"; |
15 | 15 | ||
16 | memory { | 16 | memory { |
17 | device_type = "memory"; | 17 | device_type = "memory"; |
diff --git a/arch/arm/boot/dts/am3517.dtsi b/arch/arm/boot/dts/am3517.dtsi new file mode 100644 index 000000000000..2fbe02faa8b1 --- /dev/null +++ b/arch/arm/boot/dts/am3517.dtsi | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * Device Tree Source for am3517 SoC | ||
3 | * | ||
4 | * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/ | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public License | ||
7 | * version 2. This program is licensed "as is" without any warranty of any | ||
8 | * kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include "omap3.dtsi" | ||
12 | |||
13 | / { | ||
14 | aliases { | ||
15 | serial3 = &uart4; | ||
16 | }; | ||
17 | |||
18 | ocp { | ||
19 | am35x_otg_hs: am35x_otg_hs@5c040000 { | ||
20 | compatible = "ti,omap3-musb"; | ||
21 | ti,hwmods = "am35x_otg_hs"; | ||
22 | status = "disabled"; | ||
23 | reg = <0x5c040000 0x1000>; | ||
24 | interrupts = <71>; | ||
25 | interrupt-names = "mc"; | ||
26 | }; | ||
27 | |||
28 | davinci_emac: ethernet@0x5c000000 { | ||
29 | compatible = "ti,am3517-emac"; | ||
30 | ti,hwmods = "davinci_emac"; | ||
31 | status = "disabled"; | ||
32 | reg = <0x5c000000 0x30000>; | ||
33 | interrupts = <67 68 69 70>; | ||
34 | ti,davinci-ctrl-reg-offset = <0x10000>; | ||
35 | ti,davinci-ctrl-mod-reg-offset = <0>; | ||
36 | ti,davinci-ctrl-ram-offset = <0x20000>; | ||
37 | ti,davinci-ctrl-ram-size = <0x2000>; | ||
38 | ti,davinci-rmii-en = /bits/ 8 <1>; | ||
39 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
40 | }; | ||
41 | |||
42 | davinci_mdio: ethernet@0x5c030000 { | ||
43 | compatible = "ti,davinci_mdio"; | ||
44 | ti,hwmods = "davinci_mdio"; | ||
45 | status = "disabled"; | ||
46 | reg = <0x5c030000 0x1000>; | ||
47 | bus_freq = <1000000>; | ||
48 | #address-cells = <1>; | ||
49 | #size-cells = <0>; | ||
50 | }; | ||
51 | |||
52 | uart4: serial@4809e000 { | ||
53 | compatible = "ti,omap3-uart"; | ||
54 | ti,hwmods = "uart4"; | ||
55 | status = "disabled"; | ||
56 | reg = <0x4809e000 0x400>; | ||
57 | interrupts = <84>; | ||
58 | dmas = <&sdma 55 &sdma 54>; | ||
59 | dma-names = "tx", "rx"; | ||
60 | clock-frequency = <48000000>; | ||
61 | }; | ||
62 | }; | ||
63 | }; | ||
diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts index 90ce29dbe119..08a56bcfc724 100644 --- a/arch/arm/boot/dts/armada-370-db.dts +++ b/arch/arm/boot/dts/armada-370-db.dts | |||
@@ -99,22 +99,22 @@ | |||
99 | spi-max-frequency = <50000000>; | 99 | spi-max-frequency = <50000000>; |
100 | }; | 100 | }; |
101 | }; | 101 | }; |
102 | }; | ||
102 | 103 | ||
103 | pcie-controller { | 104 | pcie-controller { |
105 | status = "okay"; | ||
106 | /* | ||
107 | * The two PCIe units are accessible through | ||
108 | * both standard PCIe slots and mini-PCIe | ||
109 | * slots on the board. | ||
110 | */ | ||
111 | pcie@1,0 { | ||
112 | /* Port 0, Lane 0 */ | ||
113 | status = "okay"; | ||
114 | }; | ||
115 | pcie@2,0 { | ||
116 | /* Port 1, Lane 0 */ | ||
104 | status = "okay"; | 117 | status = "okay"; |
105 | /* | ||
106 | * The two PCIe units are accessible through | ||
107 | * both standard PCIe slots and mini-PCIe | ||
108 | * slots on the board. | ||
109 | */ | ||
110 | pcie@1,0 { | ||
111 | /* Port 0, Lane 0 */ | ||
112 | status = "okay"; | ||
113 | }; | ||
114 | pcie@2,0 { | ||
115 | /* Port 1, Lane 0 */ | ||
116 | status = "okay"; | ||
117 | }; | ||
118 | }; | 118 | }; |
119 | }; | 119 | }; |
120 | }; | 120 | }; |
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi index 00d6a798c705..7f10f627ae5b 100644 --- a/arch/arm/boot/dts/armada-370-xp.dtsi +++ b/arch/arm/boot/dts/armada-370-xp.dtsi | |||
@@ -118,7 +118,7 @@ | |||
118 | 118 | ||
119 | coherency-fabric@20200 { | 119 | coherency-fabric@20200 { |
120 | compatible = "marvell,coherency-fabric"; | 120 | compatible = "marvell,coherency-fabric"; |
121 | reg = <0x20200 0xb0>, <0x21810 0x1c>; | 121 | reg = <0x20200 0xb0>, <0x21010 0x1c>; |
122 | }; | 122 | }; |
123 | 123 | ||
124 | serial@12000 { | 124 | serial@12000 { |
diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi index 3f5e6121c730..98335fb34b7a 100644 --- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi | |||
@@ -47,7 +47,7 @@ | |||
47 | /* | 47 | /* |
48 | * MV78230 has 2 PCIe units Gen2.0: One unit can be | 48 | * MV78230 has 2 PCIe units Gen2.0: One unit can be |
49 | * configured as x4 or quad x1 lanes. One unit is | 49 | * configured as x4 or quad x1 lanes. One unit is |
50 | * x4/x1. | 50 | * x1 only. |
51 | */ | 51 | */ |
52 | pcie-controller { | 52 | pcie-controller { |
53 | compatible = "marvell,armada-xp-pcie"; | 53 | compatible = "marvell,armada-xp-pcie"; |
@@ -62,10 +62,10 @@ | |||
62 | 62 | ||
63 | ranges = | 63 | ranges = |
64 | <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000 /* Port 0.0 registers */ | 64 | <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000 /* Port 0.0 registers */ |
65 | 0x82000000 0 0x42000 MBUS_ID(0xf0, 0x01) 0x42000 0 0x00002000 /* Port 2.0 registers */ | ||
66 | 0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000 /* Port 0.1 registers */ | 65 | 0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000 /* Port 0.1 registers */ |
67 | 0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000 /* Port 0.2 registers */ | 66 | 0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000 /* Port 0.2 registers */ |
68 | 0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000 /* Port 0.3 registers */ | 67 | 0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000 /* Port 0.3 registers */ |
68 | 0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000 /* Port 1.0 registers */ | ||
69 | 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ | 69 | 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ |
70 | 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */ | 70 | 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */ |
71 | 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */ | 71 | 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */ |
@@ -74,8 +74,8 @@ | |||
74 | 0x81000000 0x3 0 MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO */ | 74 | 0x81000000 0x3 0 MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO */ |
75 | 0x82000000 0x4 0 MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */ | 75 | 0x82000000 0x4 0 MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */ |
76 | 0x81000000 0x4 0 MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO */ | 76 | 0x81000000 0x4 0 MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO */ |
77 | 0x82000000 0x9 0 MBUS_ID(0x04, 0xf8) 0 1 0 /* Port 2.0 MEM */ | 77 | 0x82000000 0x5 0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */ |
78 | 0x81000000 0x9 0 MBUS_ID(0x04, 0xf0) 0 1 0 /* Port 2.0 IO */>; | 78 | 0x81000000 0x5 0 MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO */>; |
79 | 79 | ||
80 | pcie@1,0 { | 80 | pcie@1,0 { |
81 | device_type = "pci"; | 81 | device_type = "pci"; |
@@ -145,20 +145,20 @@ | |||
145 | status = "disabled"; | 145 | status = "disabled"; |
146 | }; | 146 | }; |
147 | 147 | ||
148 | pcie@9,0 { | 148 | pcie@5,0 { |
149 | device_type = "pci"; | 149 | device_type = "pci"; |
150 | assigned-addresses = <0x82000800 0 0x42000 0 0x2000>; | 150 | assigned-addresses = <0x82000800 0 0x80000 0 0x2000>; |
151 | reg = <0x4800 0 0 0 0>; | 151 | reg = <0x2800 0 0 0 0>; |
152 | #address-cells = <3>; | 152 | #address-cells = <3>; |
153 | #size-cells = <2>; | 153 | #size-cells = <2>; |
154 | #interrupt-cells = <1>; | 154 | #interrupt-cells = <1>; |
155 | ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0 | 155 | ranges = <0x82000000 0 0 0x82000000 0x5 0 1 0 |
156 | 0x81000000 0 0 0x81000000 0x9 0 1 0>; | 156 | 0x81000000 0 0 0x81000000 0x5 0 1 0>; |
157 | interrupt-map-mask = <0 0 0 0>; | 157 | interrupt-map-mask = <0 0 0 0>; |
158 | interrupt-map = <0 0 0 0 &mpic 99>; | 158 | interrupt-map = <0 0 0 0 &mpic 62>; |
159 | marvell,pcie-port = <2>; | 159 | marvell,pcie-port = <1>; |
160 | marvell,pcie-lane = <0>; | 160 | marvell,pcie-lane = <0>; |
161 | clocks = <&gateclk 26>; | 161 | clocks = <&gateclk 9>; |
162 | status = "disabled"; | 162 | status = "disabled"; |
163 | }; | 163 | }; |
164 | }; | 164 | }; |
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi index 3e9fd1353f89..66609684d41b 100644 --- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi | |||
@@ -48,7 +48,7 @@ | |||
48 | /* | 48 | /* |
49 | * MV78260 has 3 PCIe units Gen2.0: Two units can be | 49 | * MV78260 has 3 PCIe units Gen2.0: Two units can be |
50 | * configured as x4 or quad x1 lanes. One unit is | 50 | * configured as x4 or quad x1 lanes. One unit is |
51 | * x4/x1. | 51 | * x4 only. |
52 | */ | 52 | */ |
53 | pcie-controller { | 53 | pcie-controller { |
54 | compatible = "marvell,armada-xp-pcie"; | 54 | compatible = "marvell,armada-xp-pcie"; |
@@ -68,7 +68,9 @@ | |||
68 | 0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000 /* Port 0.2 registers */ | 68 | 0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000 /* Port 0.2 registers */ |
69 | 0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000 /* Port 0.3 registers */ | 69 | 0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000 /* Port 0.3 registers */ |
70 | 0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000 /* Port 1.0 registers */ | 70 | 0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000 /* Port 1.0 registers */ |
71 | 0x82000000 0 0x82000 MBUS_ID(0xf0, 0x01) 0x82000 0 0x00002000 /* Port 3.0 registers */ | 71 | 0x82000000 0 0x84000 MBUS_ID(0xf0, 0x01) 0x84000 0 0x00002000 /* Port 1.1 registers */ |
72 | 0x82000000 0 0x88000 MBUS_ID(0xf0, 0x01) 0x88000 0 0x00002000 /* Port 1.2 registers */ | ||
73 | 0x82000000 0 0x8c000 MBUS_ID(0xf0, 0x01) 0x8c000 0 0x00002000 /* Port 1.3 registers */ | ||
72 | 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ | 74 | 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ |
73 | 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */ | 75 | 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */ |
74 | 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */ | 76 | 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */ |
@@ -77,10 +79,18 @@ | |||
77 | 0x81000000 0x3 0 MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO */ | 79 | 0x81000000 0x3 0 MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO */ |
78 | 0x82000000 0x4 0 MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */ | 80 | 0x82000000 0x4 0 MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */ |
79 | 0x81000000 0x4 0 MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO */ | 81 | 0x81000000 0x4 0 MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO */ |
80 | 0x82000000 0x9 0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */ | 82 | |
81 | 0x81000000 0x9 0 MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO */ | 83 | 0x82000000 0x5 0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */ |
82 | 0x82000000 0xa 0 MBUS_ID(0x08, 0xf8) 0 1 0 /* Port 3.0 MEM */ | 84 | 0x81000000 0x5 0 MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO */ |
83 | 0x81000000 0xa 0 MBUS_ID(0x08, 0xf0) 0 1 0 /* Port 3.0 IO */>; | 85 | 0x82000000 0x6 0 MBUS_ID(0x08, 0xd8) 0 1 0 /* Port 1.1 MEM */ |
86 | 0x81000000 0x6 0 MBUS_ID(0x08, 0xd0) 0 1 0 /* Port 1.1 IO */ | ||
87 | 0x82000000 0x7 0 MBUS_ID(0x08, 0xb8) 0 1 0 /* Port 1.2 MEM */ | ||
88 | 0x81000000 0x7 0 MBUS_ID(0x08, 0xb0) 0 1 0 /* Port 1.2 IO */ | ||
89 | 0x82000000 0x8 0 MBUS_ID(0x08, 0x78) 0 1 0 /* Port 1.3 MEM */ | ||
90 | 0x81000000 0x8 0 MBUS_ID(0x08, 0x70) 0 1 0 /* Port 1.3 IO */ | ||
91 | |||
92 | 0x82000000 0x9 0 MBUS_ID(0x04, 0xf8) 0 1 0 /* Port 2.0 MEM */ | ||
93 | 0x81000000 0x9 0 MBUS_ID(0x04, 0xf0) 0 1 0 /* Port 2.0 IO */>; | ||
84 | 94 | ||
85 | pcie@1,0 { | 95 | pcie@1,0 { |
86 | device_type = "pci"; | 96 | device_type = "pci"; |
@@ -106,8 +116,8 @@ | |||
106 | #address-cells = <3>; | 116 | #address-cells = <3>; |
107 | #size-cells = <2>; | 117 | #size-cells = <2>; |
108 | #interrupt-cells = <1>; | 118 | #interrupt-cells = <1>; |
109 | ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0 | 119 | ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0 |
110 | 0x81000000 0 0 0x81000000 0x2 0 1 0>; | 120 | 0x81000000 0 0 0x81000000 0x2 0 1 0>; |
111 | interrupt-map-mask = <0 0 0 0>; | 121 | interrupt-map-mask = <0 0 0 0>; |
112 | interrupt-map = <0 0 0 0 &mpic 59>; | 122 | interrupt-map = <0 0 0 0 &mpic 59>; |
113 | marvell,pcie-port = <0>; | 123 | marvell,pcie-port = <0>; |
@@ -150,37 +160,88 @@ | |||
150 | status = "disabled"; | 160 | status = "disabled"; |
151 | }; | 161 | }; |
152 | 162 | ||
153 | pcie@9,0 { | 163 | pcie@5,0 { |
154 | device_type = "pci"; | 164 | device_type = "pci"; |
155 | assigned-addresses = <0x82000800 0 0x42000 0 0x2000>; | 165 | assigned-addresses = <0x82000800 0 0x80000 0 0x2000>; |
156 | reg = <0x4800 0 0 0 0>; | 166 | reg = <0x2800 0 0 0 0>; |
157 | #address-cells = <3>; | 167 | #address-cells = <3>; |
158 | #size-cells = <2>; | 168 | #size-cells = <2>; |
159 | #interrupt-cells = <1>; | 169 | #interrupt-cells = <1>; |
160 | ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0 | 170 | ranges = <0x82000000 0 0 0x82000000 0x5 0 1 0 |
161 | 0x81000000 0 0 0x81000000 0x9 0 1 0>; | 171 | 0x81000000 0 0 0x81000000 0x5 0 1 0>; |
162 | interrupt-map-mask = <0 0 0 0>; | 172 | interrupt-map-mask = <0 0 0 0>; |
163 | interrupt-map = <0 0 0 0 &mpic 99>; | 173 | interrupt-map = <0 0 0 0 &mpic 62>; |
164 | marvell,pcie-port = <2>; | 174 | marvell,pcie-port = <1>; |
165 | marvell,pcie-lane = <0>; | 175 | marvell,pcie-lane = <0>; |
166 | clocks = <&gateclk 26>; | 176 | clocks = <&gateclk 9>; |
167 | status = "disabled"; | 177 | status = "disabled"; |
168 | }; | 178 | }; |
169 | 179 | ||
170 | pcie@10,0 { | 180 | pcie@6,0 { |
171 | device_type = "pci"; | 181 | device_type = "pci"; |
172 | assigned-addresses = <0x82000800 0 0x82000 0 0x2000>; | 182 | assigned-addresses = <0x82000800 0 0x84000 0 0x2000>; |
173 | reg = <0x5000 0 0 0 0>; | 183 | reg = <0x3000 0 0 0 0>; |
174 | #address-cells = <3>; | 184 | #address-cells = <3>; |
175 | #size-cells = <2>; | 185 | #size-cells = <2>; |
176 | #interrupt-cells = <1>; | 186 | #interrupt-cells = <1>; |
177 | ranges = <0x82000000 0 0 0x82000000 0xa 0 1 0 | 187 | ranges = <0x82000000 0 0 0x82000000 0x6 0 1 0 |
178 | 0x81000000 0 0 0x81000000 0xa 0 1 0>; | 188 | 0x81000000 0 0 0x81000000 0x6 0 1 0>; |
179 | interrupt-map-mask = <0 0 0 0>; | 189 | interrupt-map-mask = <0 0 0 0>; |
180 | interrupt-map = <0 0 0 0 &mpic 103>; | 190 | interrupt-map = <0 0 0 0 &mpic 63>; |
181 | marvell,pcie-port = <3>; | 191 | marvell,pcie-port = <1>; |
192 | marvell,pcie-lane = <1>; | ||
193 | clocks = <&gateclk 10>; | ||
194 | status = "disabled"; | ||
195 | }; | ||
196 | |||
197 | pcie@7,0 { | ||
198 | device_type = "pci"; | ||
199 | assigned-addresses = <0x82000800 0 0x88000 0 0x2000>; | ||
200 | reg = <0x3800 0 0 0 0>; | ||
201 | #address-cells = <3>; | ||
202 | #size-cells = <2>; | ||
203 | #interrupt-cells = <1>; | ||
204 | ranges = <0x82000000 0 0 0x82000000 0x7 0 1 0 | ||
205 | 0x81000000 0 0 0x81000000 0x7 0 1 0>; | ||
206 | interrupt-map-mask = <0 0 0 0>; | ||
207 | interrupt-map = <0 0 0 0 &mpic 64>; | ||
208 | marvell,pcie-port = <1>; | ||
209 | marvell,pcie-lane = <2>; | ||
210 | clocks = <&gateclk 11>; | ||
211 | status = "disabled"; | ||
212 | }; | ||
213 | |||
214 | pcie@8,0 { | ||
215 | device_type = "pci"; | ||
216 | assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>; | ||
217 | reg = <0x4000 0 0 0 0>; | ||
218 | #address-cells = <3>; | ||
219 | #size-cells = <2>; | ||
220 | #interrupt-cells = <1>; | ||
221 | ranges = <0x82000000 0 0 0x82000000 0x8 0 1 0 | ||
222 | 0x81000000 0 0 0x81000000 0x8 0 1 0>; | ||
223 | interrupt-map-mask = <0 0 0 0>; | ||
224 | interrupt-map = <0 0 0 0 &mpic 65>; | ||
225 | marvell,pcie-port = <1>; | ||
226 | marvell,pcie-lane = <3>; | ||
227 | clocks = <&gateclk 12>; | ||
228 | status = "disabled"; | ||
229 | }; | ||
230 | |||
231 | pcie@9,0 { | ||
232 | device_type = "pci"; | ||
233 | assigned-addresses = <0x82000800 0 0x42000 0 0x2000>; | ||
234 | reg = <0x4800 0 0 0 0>; | ||
235 | #address-cells = <3>; | ||
236 | #size-cells = <2>; | ||
237 | #interrupt-cells = <1>; | ||
238 | ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0 | ||
239 | 0x81000000 0 0 0x81000000 0x9 0 1 0>; | ||
240 | interrupt-map-mask = <0 0 0 0>; | ||
241 | interrupt-map = <0 0 0 0 &mpic 99>; | ||
242 | marvell,pcie-port = <2>; | ||
182 | marvell,pcie-lane = <0>; | 243 | marvell,pcie-lane = <0>; |
183 | clocks = <&gateclk 27>; | 244 | clocks = <&gateclk 26>; |
184 | status = "disabled"; | 245 | status = "disabled"; |
185 | }; | 246 | }; |
186 | }; | 247 | }; |
diff --git a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi index 2347e9563cef..6801106fa1f8 100644 --- a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi +++ b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi | |||
@@ -11,6 +11,10 @@ | |||
11 | #include <dt-bindings/interrupt-controller/irq.h> | 11 | #include <dt-bindings/interrupt-controller/irq.h> |
12 | 12 | ||
13 | / { | 13 | / { |
14 | aliases { | ||
15 | serial4 = &usart3; | ||
16 | }; | ||
17 | |||
14 | ahb { | 18 | ahb { |
15 | apb { | 19 | apb { |
16 | pinctrl@fffff400 { | 20 | pinctrl@fffff400 { |
diff --git a/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi b/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi index 9c18adf788f7..f577b7df9a29 100644 --- a/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi +++ b/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi | |||
@@ -44,8 +44,8 @@ | |||
44 | gpmc,wr-access-ns = <186>; | 44 | gpmc,wr-access-ns = <186>; |
45 | gpmc,cycle2cycle-samecsen; | 45 | gpmc,cycle2cycle-samecsen; |
46 | gpmc,cycle2cycle-diffcsen; | 46 | gpmc,cycle2cycle-diffcsen; |
47 | vmmc-supply = <&vddvario>; | 47 | vddvario-supply = <&vddvario>; |
48 | vmmc_aux-supply = <&vdd33a>; | 48 | vdd33a-supply = <&vdd33a>; |
49 | reg-io-width = <4>; | 49 | reg-io-width = <4>; |
50 | smsc,save-mac-address; | 50 | smsc,save-mac-address; |
51 | }; | 51 | }; |
diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts index 31a632f7effb..df33a50bc070 100644 --- a/arch/arm/boot/dts/omap3-beagle-xm.dts +++ b/arch/arm/boot/dts/omap3-beagle-xm.dts | |||
@@ -215,3 +215,10 @@ | |||
215 | &usbhsehci { | 215 | &usbhsehci { |
216 | phys = <0 &hsusb2_phy>; | 216 | phys = <0 &hsusb2_phy>; |
217 | }; | 217 | }; |
218 | |||
219 | &vaux2 { | ||
220 | regulator-name = "usb_1v8"; | ||
221 | regulator-min-microvolt = <1800000>; | ||
222 | regulator-max-microvolt = <1800000>; | ||
223 | regulator-always-on; | ||
224 | }; | ||
diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts index fa532aaacc68..3ba4a625ea5b 100644 --- a/arch/arm/boot/dts/omap3-beagle.dts +++ b/arch/arm/boot/dts/omap3-beagle.dts | |||
@@ -61,6 +61,14 @@ | |||
61 | vcc-supply = <&hsusb2_power>; | 61 | vcc-supply = <&hsusb2_power>; |
62 | }; | 62 | }; |
63 | 63 | ||
64 | sound { | ||
65 | compatible = "ti,omap-twl4030"; | ||
66 | ti,model = "omap3beagle"; | ||
67 | |||
68 | ti,mcbsp = <&mcbsp2>; | ||
69 | ti,codec = <&twl_audio>; | ||
70 | }; | ||
71 | |||
64 | gpio_keys { | 72 | gpio_keys { |
65 | compatible = "gpio-keys"; | 73 | compatible = "gpio-keys"; |
66 | 74 | ||
@@ -120,6 +128,12 @@ | |||
120 | reg = <0x48>; | 128 | reg = <0x48>; |
121 | interrupts = <7>; /* SYS_NIRQ cascaded to intc */ | 129 | interrupts = <7>; /* SYS_NIRQ cascaded to intc */ |
122 | interrupt-parent = <&intc>; | 130 | interrupt-parent = <&intc>; |
131 | |||
132 | twl_audio: audio { | ||
133 | compatible = "ti,twl4030-audio"; | ||
134 | codec { | ||
135 | }; | ||
136 | }; | ||
123 | }; | 137 | }; |
124 | }; | 138 | }; |
125 | 139 | ||
@@ -178,3 +192,10 @@ | |||
178 | mode = <3>; | 192 | mode = <3>; |
179 | power = <50>; | 193 | power = <50>; |
180 | }; | 194 | }; |
195 | |||
196 | &vaux2 { | ||
197 | regulator-name = "vdd_ehci"; | ||
198 | regulator-min-microvolt = <1800000>; | ||
199 | regulator-max-microvolt = <1800000>; | ||
200 | regulator-always-on; | ||
201 | }; | ||
diff --git a/arch/arm/boot/dts/omap3-igep.dtsi b/arch/arm/boot/dts/omap3-igep.dtsi index ba1e58b7b7e3..165aaf7591ba 100644 --- a/arch/arm/boot/dts/omap3-igep.dtsi +++ b/arch/arm/boot/dts/omap3-igep.dtsi | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Device Tree Source for IGEP Technology devices | 2 | * Common device tree for IGEP boards based on AM/DM37x |
3 | * | 3 | * |
4 | * Copyright (C) 2012 Javier Martinez Canillas <javier@collabora.co.uk> | 4 | * Copyright (C) 2012 Javier Martinez Canillas <javier@collabora.co.uk> |
5 | * Copyright (C) 2012 Enric Balletbo i Serra <eballetbo@gmail.com> | 5 | * Copyright (C) 2012 Enric Balletbo i Serra <eballetbo@gmail.com> |
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | /dts-v1/; | 11 | /dts-v1/; |
12 | 12 | ||
13 | #include "omap34xx.dtsi" | 13 | #include "omap36xx.dtsi" |
14 | 14 | ||
15 | / { | 15 | / { |
16 | memory { | 16 | memory { |
@@ -24,6 +24,25 @@ | |||
24 | ti,mcbsp = <&mcbsp2>; | 24 | ti,mcbsp = <&mcbsp2>; |
25 | ti,codec = <&twl_audio>; | 25 | ti,codec = <&twl_audio>; |
26 | }; | 26 | }; |
27 | |||
28 | vdd33: regulator-vdd33 { | ||
29 | compatible = "regulator-fixed"; | ||
30 | regulator-name = "vdd33"; | ||
31 | regulator-always-on; | ||
32 | }; | ||
33 | |||
34 | lbee1usjyc_vmmc: lbee1usjyc_vmmc { | ||
35 | pinctrl-names = "default"; | ||
36 | pinctrl-0 = <&lbee1usjyc_pins>; | ||
37 | compatible = "regulator-fixed"; | ||
38 | regulator-name = "regulator-lbee1usjyc"; | ||
39 | regulator-min-microvolt = <3300000>; | ||
40 | regulator-max-microvolt = <3300000>; | ||
41 | gpio = <&gpio5 10 GPIO_ACTIVE_HIGH>; /* gpio_138 WIFI_PDN */ | ||
42 | startup-delay-us = <10000>; | ||
43 | enable-active-high; | ||
44 | vin-supply = <&vdd33>; | ||
45 | }; | ||
27 | }; | 46 | }; |
28 | 47 | ||
29 | &omap3_pmx_core { | 48 | &omap3_pmx_core { |
@@ -48,6 +67,15 @@ | |||
48 | >; | 67 | >; |
49 | }; | 68 | }; |
50 | 69 | ||
70 | /* WiFi/BT combo */ | ||
71 | lbee1usjyc_pins: pinmux_lbee1usjyc_pins { | ||
72 | pinctrl-single,pins = < | ||
73 | 0x136 (PIN_OUTPUT | MUX_MODE4) /* sdmmc2_dat5.gpio_137 */ | ||
74 | 0x138 (PIN_OUTPUT | MUX_MODE4) /* sdmmc2_dat6.gpio_138 */ | ||
75 | 0x13a (PIN_OUTPUT | MUX_MODE4) /* sdmmc2_dat7.gpio_139 */ | ||
76 | >; | ||
77 | }; | ||
78 | |||
51 | mcbsp2_pins: pinmux_mcbsp2_pins { | 79 | mcbsp2_pins: pinmux_mcbsp2_pins { |
52 | pinctrl-single,pins = < | 80 | pinctrl-single,pins = < |
53 | 0x10c (PIN_INPUT | MUX_MODE0) /* mcbsp2_fsx.mcbsp2_fsx */ | 81 | 0x10c (PIN_INPUT | MUX_MODE0) /* mcbsp2_fsx.mcbsp2_fsx */ |
@@ -65,10 +93,17 @@ | |||
65 | 0x11a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat1.sdmmc1_dat1 */ | 93 | 0x11a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat1.sdmmc1_dat1 */ |
66 | 0x11c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat2.sdmmc1_dat2 */ | 94 | 0x11c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat2.sdmmc1_dat2 */ |
67 | 0x11e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat3.sdmmc1_dat3 */ | 95 | 0x11e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat3.sdmmc1_dat3 */ |
68 | 0x120 (PIN_INPUT | MUX_MODE0) /* sdmmc1_dat4.sdmmc1_dat4 */ | 96 | >; |
69 | 0x122 (PIN_INPUT | MUX_MODE0) /* sdmmc1_dat5.sdmmc1_dat5 */ | 97 | }; |
70 | 0x124 (PIN_INPUT | MUX_MODE0) /* sdmmc1_dat6.sdmmc1_dat6 */ | 98 | |
71 | 0x126 (PIN_INPUT | MUX_MODE0) /* sdmmc1_dat7.sdmmc1_dat7 */ | 99 | mmc2_pins: pinmux_mmc2_pins { |
100 | pinctrl-single,pins = < | ||
101 | 0x128 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk.sdmmc2_clk */ | ||
102 | 0x12a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd.sdmmc2_cmd */ | ||
103 | 0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat0.sdmmc2_dat0 */ | ||
104 | 0x12e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1.sdmmc2_dat1 */ | ||
105 | 0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2.sdmmc2_dat2 */ | ||
106 | 0x132 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat3.sdmmc2_dat3 */ | ||
72 | >; | 107 | >; |
73 | }; | 108 | }; |
74 | 109 | ||
@@ -78,10 +113,33 @@ | |||
78 | >; | 113 | >; |
79 | }; | 114 | }; |
80 | 115 | ||
116 | i2c1_pins: pinmux_i2c1_pins { | ||
117 | pinctrl-single,pins = < | ||
118 | 0x18a (PIN_INPUT | MUX_MODE0) /* i2c1_scl.i2c1_scl */ | ||
119 | 0x18c (PIN_INPUT | MUX_MODE0) /* i2c1_sda.i2c1_sda */ | ||
120 | >; | ||
121 | }; | ||
122 | |||
123 | i2c2_pins: pinmux_i2c2_pins { | ||
124 | pinctrl-single,pins = < | ||
125 | 0x18e (PIN_INPUT | MUX_MODE0) /* i2c2_scl.i2c2_scl */ | ||
126 | 0x190 (PIN_INPUT | MUX_MODE0) /* i2c2_sda.i2c2_sda */ | ||
127 | >; | ||
128 | }; | ||
129 | |||
130 | i2c3_pins: pinmux_i2c3_pins { | ||
131 | pinctrl-single,pins = < | ||
132 | 0x192 (PIN_INPUT | MUX_MODE0) /* i2c3_scl.i2c3_scl */ | ||
133 | 0x194 (PIN_INPUT | MUX_MODE0) /* i2c3_sda.i2c3_sda */ | ||
134 | >; | ||
135 | }; | ||
136 | |||
81 | leds_pins: pinmux_leds_pins { }; | 137 | leds_pins: pinmux_leds_pins { }; |
82 | }; | 138 | }; |
83 | 139 | ||
84 | &i2c1 { | 140 | &i2c1 { |
141 | pinctrl-names = "default"; | ||
142 | pinctrl-0 = <&i2c1_pins>; | ||
85 | clock-frequency = <2600000>; | 143 | clock-frequency = <2600000>; |
86 | 144 | ||
87 | twl: twl@48 { | 145 | twl: twl@48 { |
@@ -101,9 +159,16 @@ | |||
101 | #include "twl4030_omap3.dtsi" | 159 | #include "twl4030_omap3.dtsi" |
102 | 160 | ||
103 | &i2c2 { | 161 | &i2c2 { |
162 | pinctrl-names = "default"; | ||
163 | pinctrl-0 = <&i2c2_pins>; | ||
104 | clock-frequency = <400000>; | 164 | clock-frequency = <400000>; |
105 | }; | 165 | }; |
106 | 166 | ||
167 | &i2c3 { | ||
168 | pinctrl-names = "default"; | ||
169 | pinctrl-0 = <&i2c3_pins>; | ||
170 | }; | ||
171 | |||
107 | &mcbsp2 { | 172 | &mcbsp2 { |
108 | pinctrl-names = "default"; | 173 | pinctrl-names = "default"; |
109 | pinctrl-0 = <&mcbsp2_pins>; | 174 | pinctrl-0 = <&mcbsp2_pins>; |
@@ -114,11 +179,15 @@ | |||
114 | pinctrl-0 = <&mmc1_pins>; | 179 | pinctrl-0 = <&mmc1_pins>; |
115 | vmmc-supply = <&vmmc1>; | 180 | vmmc-supply = <&vmmc1>; |
116 | vmmc_aux-supply = <&vsim>; | 181 | vmmc_aux-supply = <&vsim>; |
117 | bus-width = <8>; | 182 | bus-width = <4>; |
118 | }; | 183 | }; |
119 | 184 | ||
120 | &mmc2 { | 185 | &mmc2 { |
121 | status = "disabled"; | 186 | pinctrl-names = "default"; |
187 | pinctrl-0 = <&mmc2_pins>; | ||
188 | vmmc-supply = <&lbee1usjyc_vmmc>; | ||
189 | bus-width = <4>; | ||
190 | non-removable; | ||
122 | }; | 191 | }; |
123 | 192 | ||
124 | &mmc3 { | 193 | &mmc3 { |
diff --git a/arch/arm/boot/dts/omap3-igep0020.dts b/arch/arm/boot/dts/omap3-igep0020.dts index d5cc79267250..1c7e74d2d2bc 100644 --- a/arch/arm/boot/dts/omap3-igep0020.dts +++ b/arch/arm/boot/dts/omap3-igep0020.dts | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Device Tree Source for IGEPv2 board | 2 | * Device Tree Source for IGEPv2 Rev. (TI OMAP AM/DM37x) |
3 | * | 3 | * |
4 | * Copyright (C) 2012 Javier Martinez Canillas <javier@collabora.co.uk> | 4 | * Copyright (C) 2012 Javier Martinez Canillas <javier@collabora.co.uk> |
5 | * Copyright (C) 2012 Enric Balletbo i Serra <eballetbo@gmail.com> | 5 | * Copyright (C) 2012 Enric Balletbo i Serra <eballetbo@gmail.com> |
@@ -13,7 +13,7 @@ | |||
13 | #include "omap-gpmc-smsc911x.dtsi" | 13 | #include "omap-gpmc-smsc911x.dtsi" |
14 | 14 | ||
15 | / { | 15 | / { |
16 | model = "IGEPv2"; | 16 | model = "IGEPv2 (TI OMAP AM/DM37x)"; |
17 | compatible = "isee,omap3-igep0020", "ti,omap3"; | 17 | compatible = "isee,omap3-igep0020", "ti,omap3"; |
18 | 18 | ||
19 | leds { | 19 | leds { |
@@ -67,6 +67,8 @@ | |||
67 | pinctrl-names = "default"; | 67 | pinctrl-names = "default"; |
68 | pinctrl-0 = < | 68 | pinctrl-0 = < |
69 | &hsusbb1_pins | 69 | &hsusbb1_pins |
70 | &tfp410_pins | ||
71 | &dss_pins | ||
70 | >; | 72 | >; |
71 | 73 | ||
72 | hsusbb1_pins: pinmux_hsusbb1_pins { | 74 | hsusbb1_pins: pinmux_hsusbb1_pins { |
@@ -85,6 +87,45 @@ | |||
85 | 0x5ba (PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d7.hsusb1_data3 */ | 87 | 0x5ba (PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d7.hsusb1_data3 */ |
86 | >; | 88 | >; |
87 | }; | 89 | }; |
90 | |||
91 | tfp410_pins: tfp410_dvi_pins { | ||
92 | pinctrl-single,pins = < | ||
93 | 0x196 (PIN_OUTPUT | MUX_MODE4) /* hdq_sio.gpio_170 */ | ||
94 | >; | ||
95 | }; | ||
96 | |||
97 | dss_pins: pinmux_dss_dvi_pins { | ||
98 | pinctrl-single,pins = < | ||
99 | 0x0a4 (PIN_OUTPUT | MUX_MODE0) /* dss_pclk.dss_pclk */ | ||
100 | 0x0a6 (PIN_OUTPUT | MUX_MODE0) /* dss_hsync.dss_hsync */ | ||
101 | 0x0a8 (PIN_OUTPUT | MUX_MODE0) /* dss_vsync.dss_vsync */ | ||
102 | 0x0aa (PIN_OUTPUT | MUX_MODE0) /* dss_acbias.dss_acbias */ | ||
103 | 0x0ac (PIN_OUTPUT | MUX_MODE0) /* dss_data0.dss_data0 */ | ||
104 | 0x0ae (PIN_OUTPUT | MUX_MODE0) /* dss_data1.dss_data1 */ | ||
105 | 0x0b0 (PIN_OUTPUT | MUX_MODE0) /* dss_data2.dss_data2 */ | ||
106 | 0x0b2 (PIN_OUTPUT | MUX_MODE0) /* dss_data3.dss_data3 */ | ||
107 | 0x0b4 (PIN_OUTPUT | MUX_MODE0) /* dss_data4.dss_data4 */ | ||
108 | 0x0b6 (PIN_OUTPUT | MUX_MODE0) /* dss_data5.dss_data5 */ | ||
109 | 0x0b8 (PIN_OUTPUT | MUX_MODE0) /* dss_data6.dss_data6 */ | ||
110 | 0x0ba (PIN_OUTPUT | MUX_MODE0) /* dss_data7.dss_data7 */ | ||
111 | 0x0bc (PIN_OUTPUT | MUX_MODE0) /* dss_data8.dss_data8 */ | ||
112 | 0x0be (PIN_OUTPUT | MUX_MODE0) /* dss_data9.dss_data9 */ | ||
113 | 0x0c0 (PIN_OUTPUT | MUX_MODE0) /* dss_data10.dss_data10 */ | ||
114 | 0x0c2 (PIN_OUTPUT | MUX_MODE0) /* dss_data11.dss_data11 */ | ||
115 | 0x0c4 (PIN_OUTPUT | MUX_MODE0) /* dss_data12.dss_data12 */ | ||
116 | 0x0c6 (PIN_OUTPUT | MUX_MODE0) /* dss_data13.dss_data13 */ | ||
117 | 0x0c8 (PIN_OUTPUT | MUX_MODE0) /* dss_data14.dss_data14 */ | ||
118 | 0x0ca (PIN_OUTPUT | MUX_MODE0) /* dss_data15.dss_data15 */ | ||
119 | 0x0cc (PIN_OUTPUT | MUX_MODE0) /* dss_data16.dss_data16 */ | ||
120 | 0x0ce (PIN_OUTPUT | MUX_MODE0) /* dss_data17.dss_data17 */ | ||
121 | 0x0d0 (PIN_OUTPUT | MUX_MODE0) /* dss_data18.dss_data18 */ | ||
122 | 0x0d2 (PIN_OUTPUT | MUX_MODE0) /* dss_data19.dss_data19 */ | ||
123 | 0x0d4 (PIN_OUTPUT | MUX_MODE0) /* dss_data20.dss_data20 */ | ||
124 | 0x0d6 (PIN_OUTPUT | MUX_MODE0) /* dss_data21.dss_data21 */ | ||
125 | 0x0d8 (PIN_OUTPUT | MUX_MODE0) /* dss_data22.dss_data22 */ | ||
126 | 0x0da (PIN_OUTPUT | MUX_MODE0) /* dss_data23.dss_data23 */ | ||
127 | >; | ||
128 | }; | ||
88 | }; | 129 | }; |
89 | 130 | ||
90 | &leds_pins { | 131 | &leds_pins { |
@@ -174,3 +215,8 @@ | |||
174 | &usbhsehci { | 215 | &usbhsehci { |
175 | phys = <&hsusb1_phy>; | 216 | phys = <&hsusb1_phy>; |
176 | }; | 217 | }; |
218 | |||
219 | &vpll2 { | ||
220 | /* Needed for DSS */ | ||
221 | regulator-name = "vdds_dsi"; | ||
222 | }; | ||
diff --git a/arch/arm/boot/dts/omap3-igep0030.dts b/arch/arm/boot/dts/omap3-igep0030.dts index 525e6d9b0978..02a23f8a3384 100644 --- a/arch/arm/boot/dts/omap3-igep0030.dts +++ b/arch/arm/boot/dts/omap3-igep0030.dts | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Device Tree Source for IGEP COM Module | 2 | * Device Tree Source for IGEP COM MODULE (TI OMAP AM/DM37x) |
3 | * | 3 | * |
4 | * Copyright (C) 2012 Javier Martinez Canillas <javier@collabora.co.uk> | 4 | * Copyright (C) 2012 Javier Martinez Canillas <javier@collabora.co.uk> |
5 | * Copyright (C) 2012 Enric Balletbo i Serra <eballetbo@gmail.com> | 5 | * Copyright (C) 2012 Enric Balletbo i Serra <eballetbo@gmail.com> |
@@ -12,7 +12,7 @@ | |||
12 | #include "omap3-igep.dtsi" | 12 | #include "omap3-igep.dtsi" |
13 | 13 | ||
14 | / { | 14 | / { |
15 | model = "IGEP COM Module"; | 15 | model = "IGEP COM MODULE (TI OMAP AM/DM37x)"; |
16 | compatible = "isee,omap3-igep0030", "ti,omap3"; | 16 | compatible = "isee,omap3-igep0030", "ti,omap3"; |
17 | 17 | ||
18 | leds { | 18 | leds { |
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index c4f20bfe4cce..6fc85f963530 100644 --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | /dts-v1/; | 10 | /dts-v1/; |
11 | 11 | ||
12 | #include "omap34xx.dtsi" | 12 | #include "omap34xx-hs.dtsi" |
13 | 13 | ||
14 | / { | 14 | / { |
15 | model = "Nokia N900"; | 15 | model = "Nokia N900"; |
@@ -125,6 +125,21 @@ | |||
125 | >; | 125 | >; |
126 | }; | 126 | }; |
127 | 127 | ||
128 | mmc2_pins: pinmux_mmc2_pins { | ||
129 | pinctrl-single,pins = < | ||
130 | 0x128 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk */ | ||
131 | 0x12a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd */ | ||
132 | 0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat0 */ | ||
133 | 0x12e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1 */ | ||
134 | 0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2 */ | ||
135 | 0x132 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat3 */ | ||
136 | 0x134 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat4 */ | ||
137 | 0x136 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat5 */ | ||
138 | 0x138 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat6 */ | ||
139 | 0x13a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat7 */ | ||
140 | >; | ||
141 | }; | ||
142 | |||
128 | display_pins: pinmux_display_pins { | 143 | display_pins: pinmux_display_pins { |
129 | pinctrl-single,pins = < | 144 | pinctrl-single,pins = < |
130 | 0x0d4 (PIN_OUTPUT | MUX_MODE4) /* RX51_LCD_RESET_GPIO */ | 145 | 0x0d4 (PIN_OUTPUT | MUX_MODE4) /* RX51_LCD_RESET_GPIO */ |
@@ -358,8 +373,14 @@ | |||
358 | cd-gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>; /* 160 */ | 373 | cd-gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>; /* 160 */ |
359 | }; | 374 | }; |
360 | 375 | ||
376 | /* most boards use vaux3, only some old versions use vmmc2 instead */ | ||
361 | &mmc2 { | 377 | &mmc2 { |
362 | status = "disabled"; | 378 | pinctrl-names = "default"; |
379 | pinctrl-0 = <&mmc2_pins>; | ||
380 | vmmc-supply = <&vaux3>; | ||
381 | vmmc_aux-supply = <&vsim>; | ||
382 | bus-width = <8>; | ||
383 | non-removable; | ||
363 | }; | 384 | }; |
364 | 385 | ||
365 | &mmc3 { | 386 | &mmc3 { |
diff --git a/arch/arm/boot/dts/omap3-n950-n9.dtsi b/arch/arm/boot/dts/omap3-n950-n9.dtsi index 94eb77d3b9dd..5c26c184f2c1 100644 --- a/arch/arm/boot/dts/omap3-n950-n9.dtsi +++ b/arch/arm/boot/dts/omap3-n950-n9.dtsi | |||
@@ -8,7 +8,7 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include "omap36xx.dtsi" | 11 | #include "omap36xx-hs.dtsi" |
12 | 12 | ||
13 | / { | 13 | / { |
14 | cpus { | 14 | cpus { |
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index f3a0c26ed0c2..daabf99d402a 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi | |||
@@ -82,6 +82,13 @@ | |||
82 | ranges; | 82 | ranges; |
83 | ti,hwmods = "l3_main"; | 83 | ti,hwmods = "l3_main"; |
84 | 84 | ||
85 | aes: aes@480c5000 { | ||
86 | compatible = "ti,omap3-aes"; | ||
87 | ti,hwmods = "aes"; | ||
88 | reg = <0x480c5000 0x50>; | ||
89 | interrupts = <0>; | ||
90 | }; | ||
91 | |||
85 | counter32k: counter@48320000 { | 92 | counter32k: counter@48320000 { |
86 | compatible = "ti,omap-counter32k"; | 93 | compatible = "ti,omap-counter32k"; |
87 | reg = <0x48320000 0x20>; | 94 | reg = <0x48320000 0x20>; |
@@ -260,6 +267,13 @@ | |||
260 | ti,hwmods = "i2c3"; | 267 | ti,hwmods = "i2c3"; |
261 | }; | 268 | }; |
262 | 269 | ||
270 | mailbox: mailbox@48094000 { | ||
271 | compatible = "ti,omap3-mailbox"; | ||
272 | ti,hwmods = "mailbox"; | ||
273 | reg = <0x48094000 0x200>; | ||
274 | interrupts = <26>; | ||
275 | }; | ||
276 | |||
263 | mcspi1: spi@48098000 { | 277 | mcspi1: spi@48098000 { |
264 | compatible = "ti,omap2-mcspi"; | 278 | compatible = "ti,omap2-mcspi"; |
265 | reg = <0x48098000 0x100>; | 279 | reg = <0x48098000 0x100>; |
@@ -357,6 +371,13 @@ | |||
357 | dma-names = "tx", "rx"; | 371 | dma-names = "tx", "rx"; |
358 | }; | 372 | }; |
359 | 373 | ||
374 | mmu_isp: mmu@480bd400 { | ||
375 | compatible = "ti,omap3-mmu-isp"; | ||
376 | ti,hwmods = "mmu_isp"; | ||
377 | reg = <0x480bd400 0x80>; | ||
378 | interrupts = <8>; | ||
379 | }; | ||
380 | |||
360 | wdt2: wdt@48314000 { | 381 | wdt2: wdt@48314000 { |
361 | compatible = "ti,omap3-wdt"; | 382 | compatible = "ti,omap3-wdt"; |
362 | reg = <0x48314000 0x80>; | 383 | reg = <0x48314000 0x80>; |
@@ -442,6 +463,27 @@ | |||
442 | dma-names = "tx", "rx"; | 463 | dma-names = "tx", "rx"; |
443 | }; | 464 | }; |
444 | 465 | ||
466 | sham: sham@480c3000 { | ||
467 | compatible = "ti,omap3-sham"; | ||
468 | ti,hwmods = "sham"; | ||
469 | reg = <0x480c3000 0x64>; | ||
470 | interrupts = <49>; | ||
471 | }; | ||
472 | |||
473 | smartreflex_core: smartreflex@480cb000 { | ||
474 | compatible = "ti,omap3-smartreflex-core"; | ||
475 | ti,hwmods = "smartreflex_core"; | ||
476 | reg = <0x480cb000 0x400>; | ||
477 | interrupts = <19>; | ||
478 | }; | ||
479 | |||
480 | smartreflex_mpu_iva: smartreflex@480c9000 { | ||
481 | compatible = "ti,omap3-smartreflex-iva"; | ||
482 | ti,hwmods = "smartreflex_mpu_iva"; | ||
483 | reg = <0x480c9000 0x400>; | ||
484 | interrupts = <18>; | ||
485 | }; | ||
486 | |||
445 | timer1: timer@48318000 { | 487 | timer1: timer@48318000 { |
446 | compatible = "ti,omap3430-timer"; | 488 | compatible = "ti,omap3430-timer"; |
447 | reg = <0x48318000 0x400>; | 489 | reg = <0x48318000 0x400>; |
diff --git a/arch/arm/boot/dts/omap34xx-hs.dtsi b/arch/arm/boot/dts/omap34xx-hs.dtsi new file mode 100644 index 000000000000..1ff626489546 --- /dev/null +++ b/arch/arm/boot/dts/omap34xx-hs.dtsi | |||
@@ -0,0 +1,16 @@ | |||
1 | /* Disabled modules for secure omaps */ | ||
2 | |||
3 | #include "omap34xx.dtsi" | ||
4 | |||
5 | /* Secure omaps have some devices inaccessible depending on the firmware */ | ||
6 | &aes { | ||
7 | status = "disabled"; | ||
8 | }; | ||
9 | |||
10 | &sham { | ||
11 | status = "disabled"; | ||
12 | }; | ||
13 | |||
14 | &timer12 { | ||
15 | status = "disabled"; | ||
16 | }; | ||
diff --git a/arch/arm/boot/dts/omap36xx-hs.dtsi b/arch/arm/boot/dts/omap36xx-hs.dtsi new file mode 100644 index 000000000000..2c7febb0e016 --- /dev/null +++ b/arch/arm/boot/dts/omap36xx-hs.dtsi | |||
@@ -0,0 +1,16 @@ | |||
1 | /* Disabled modules for secure omaps */ | ||
2 | |||
3 | #include "omap36xx.dtsi" | ||
4 | |||
5 | /* Secure omaps have some devices inaccessible depending on the firmware */ | ||
6 | &aes { | ||
7 | status = "disabled"; | ||
8 | }; | ||
9 | |||
10 | &sham { | ||
11 | status = "disabled"; | ||
12 | }; | ||
13 | |||
14 | &timer12 { | ||
15 | status = "disabled"; | ||
16 | }; | ||
diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi index 298e85020e1b..88c6a05cab41 100644 --- a/arch/arm/boot/dts/omap4-panda-common.dtsi +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi | |||
@@ -246,15 +246,6 @@ | |||
246 | 0xf0 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */ | 246 | 0xf0 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */ |
247 | >; | 247 | >; |
248 | }; | 248 | }; |
249 | }; | ||
250 | |||
251 | &omap4_pmx_wkup { | ||
252 | led_wkgpio_pins: pinmux_leds_wkpins { | ||
253 | pinctrl-single,pins = < | ||
254 | 0x1a (PIN_OUTPUT | MUX_MODE3) /* gpio_wk7 */ | ||
255 | 0x1c (PIN_OUTPUT | MUX_MODE3) /* gpio_wk8 */ | ||
256 | >; | ||
257 | }; | ||
258 | 249 | ||
259 | /* | 250 | /* |
260 | * wl12xx GPIO outputs for WLAN_EN, BT_EN, FM_EN, BT_WAKEUP | 251 | * wl12xx GPIO outputs for WLAN_EN, BT_EN, FM_EN, BT_WAKEUP |
@@ -274,7 +265,7 @@ | |||
274 | pinctrl-single,pins = < | 265 | pinctrl-single,pins = < |
275 | 0x38 (PIN_INPUT | MUX_MODE3) /* gpmc_ncs2.gpio_52 */ | 266 | 0x38 (PIN_INPUT | MUX_MODE3) /* gpmc_ncs2.gpio_52 */ |
276 | 0x3a (PIN_INPUT | MUX_MODE3) /* gpmc_ncs3.gpio_53 */ | 267 | 0x3a (PIN_INPUT | MUX_MODE3) /* gpmc_ncs3.gpio_53 */ |
277 | 0x108 (PIN_OUTPUT | MUX_MODE0) /* sdmmc5_clk.sdmmc5_clk */ | 268 | 0x108 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_clk.sdmmc5_clk */ |
278 | 0x10a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_cmd.sdmmc5_cmd */ | 269 | 0x10a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_cmd.sdmmc5_cmd */ |
279 | 0x10c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat0.sdmmc5_dat0 */ | 270 | 0x10c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat0.sdmmc5_dat0 */ |
280 | 0x10e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat1.sdmmc5_dat1 */ | 271 | 0x10e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat1.sdmmc5_dat1 */ |
@@ -284,6 +275,15 @@ | |||
284 | }; | 275 | }; |
285 | }; | 276 | }; |
286 | 277 | ||
278 | &omap4_pmx_wkup { | ||
279 | led_wkgpio_pins: pinmux_leds_wkpins { | ||
280 | pinctrl-single,pins = < | ||
281 | 0x1a (PIN_OUTPUT | MUX_MODE3) /* gpio_wk7 */ | ||
282 | 0x1c (PIN_OUTPUT | MUX_MODE3) /* gpio_wk8 */ | ||
283 | >; | ||
284 | }; | ||
285 | }; | ||
286 | |||
287 | &i2c1 { | 287 | &i2c1 { |
288 | pinctrl-names = "default"; | 288 | pinctrl-names = "default"; |
289 | pinctrl-0 = <&i2c1_pins>; | 289 | pinctrl-0 = <&i2c1_pins>; |
diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts index 5fc3f43c5a81..dbc81fb6ef03 100644 --- a/arch/arm/boot/dts/omap4-sdp.dts +++ b/arch/arm/boot/dts/omap4-sdp.dts | |||
@@ -300,12 +300,12 @@ | |||
300 | wl12xx_pins: pinmux_wl12xx_pins { | 300 | wl12xx_pins: pinmux_wl12xx_pins { |
301 | pinctrl-single,pins = < | 301 | pinctrl-single,pins = < |
302 | 0x3a (PIN_INPUT | MUX_MODE3) /* gpmc_ncs3.gpio_53 */ | 302 | 0x3a (PIN_INPUT | MUX_MODE3) /* gpmc_ncs3.gpio_53 */ |
303 | 0x108 (PIN_OUTPUT | MUX_MODE3) /* sdmmc5_clk.sdmmc5_clk */ | 303 | 0x108 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_clk.sdmmc5_clk */ |
304 | 0x10a (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_cmd.sdmmc5_cmd */ | 304 | 0x10a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_cmd.sdmmc5_cmd */ |
305 | 0x10c (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_dat0.sdmmc5_dat0 */ | 305 | 0x10c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat0.sdmmc5_dat0 */ |
306 | 0x10e (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_dat1.sdmmc5_dat1 */ | 306 | 0x10e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat1.sdmmc5_dat1 */ |
307 | 0x110 (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_dat2.sdmmc5_dat2 */ | 307 | 0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat2.sdmmc5_dat2 */ |
308 | 0x112 (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_dat3.sdmmc5_dat3 */ | 308 | 0x112 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat3.sdmmc5_dat3 */ |
309 | >; | 309 | >; |
310 | }; | 310 | }; |
311 | }; | 311 | }; |
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index ee845fad939b..9987dd0e9c59 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi | |||
@@ -87,9 +87,9 @@ | |||
87 | interrupts = <1 9 0xf04>; | 87 | interrupts = <1 9 0xf04>; |
88 | }; | 88 | }; |
89 | 89 | ||
90 | gpio0: gpio@ffc40000 { | 90 | gpio0: gpio@e6050000 { |
91 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | 91 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; |
92 | reg = <0 0xffc40000 0 0x2c>; | 92 | reg = <0 0xe6050000 0 0x50>; |
93 | interrupt-parent = <&gic>; | 93 | interrupt-parent = <&gic>; |
94 | interrupts = <0 4 0x4>; | 94 | interrupts = <0 4 0x4>; |
95 | #gpio-cells = <2>; | 95 | #gpio-cells = <2>; |
@@ -99,9 +99,9 @@ | |||
99 | interrupt-controller; | 99 | interrupt-controller; |
100 | }; | 100 | }; |
101 | 101 | ||
102 | gpio1: gpio@ffc41000 { | 102 | gpio1: gpio@e6051000 { |
103 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | 103 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; |
104 | reg = <0 0xffc41000 0 0x2c>; | 104 | reg = <0 0xe6051000 0 0x50>; |
105 | interrupt-parent = <&gic>; | 105 | interrupt-parent = <&gic>; |
106 | interrupts = <0 5 0x4>; | 106 | interrupts = <0 5 0x4>; |
107 | #gpio-cells = <2>; | 107 | #gpio-cells = <2>; |
@@ -111,9 +111,9 @@ | |||
111 | interrupt-controller; | 111 | interrupt-controller; |
112 | }; | 112 | }; |
113 | 113 | ||
114 | gpio2: gpio@ffc42000 { | 114 | gpio2: gpio@e6052000 { |
115 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | 115 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; |
116 | reg = <0 0xffc42000 0 0x2c>; | 116 | reg = <0 0xe6052000 0 0x50>; |
117 | interrupt-parent = <&gic>; | 117 | interrupt-parent = <&gic>; |
118 | interrupts = <0 6 0x4>; | 118 | interrupts = <0 6 0x4>; |
119 | #gpio-cells = <2>; | 119 | #gpio-cells = <2>; |
@@ -123,9 +123,9 @@ | |||
123 | interrupt-controller; | 123 | interrupt-controller; |
124 | }; | 124 | }; |
125 | 125 | ||
126 | gpio3: gpio@ffc43000 { | 126 | gpio3: gpio@e6053000 { |
127 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | 127 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; |
128 | reg = <0 0xffc43000 0 0x2c>; | 128 | reg = <0 0xe6053000 0 0x50>; |
129 | interrupt-parent = <&gic>; | 129 | interrupt-parent = <&gic>; |
130 | interrupts = <0 7 0x4>; | 130 | interrupts = <0 7 0x4>; |
131 | #gpio-cells = <2>; | 131 | #gpio-cells = <2>; |
@@ -135,9 +135,9 @@ | |||
135 | interrupt-controller; | 135 | interrupt-controller; |
136 | }; | 136 | }; |
137 | 137 | ||
138 | gpio4: gpio@ffc44000 { | 138 | gpio4: gpio@e6054000 { |
139 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | 139 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; |
140 | reg = <0 0xffc44000 0 0x2c>; | 140 | reg = <0 0xe6054000 0 0x50>; |
141 | interrupt-parent = <&gic>; | 141 | interrupt-parent = <&gic>; |
142 | interrupts = <0 8 0x4>; | 142 | interrupts = <0 8 0x4>; |
143 | #gpio-cells = <2>; | 143 | #gpio-cells = <2>; |
@@ -147,9 +147,9 @@ | |||
147 | interrupt-controller; | 147 | interrupt-controller; |
148 | }; | 148 | }; |
149 | 149 | ||
150 | gpio5: gpio@ffc45000 { | 150 | gpio5: gpio@e6055000 { |
151 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | 151 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; |
152 | reg = <0 0xffc45000 0 0x2c>; | 152 | reg = <0 0xe6055000 0 0x50>; |
153 | interrupt-parent = <&gic>; | 153 | interrupt-parent = <&gic>; |
154 | interrupts = <0 9 0x4>; | 154 | interrupts = <0 9 0x4>; |
155 | #gpio-cells = <2>; | 155 | #gpio-cells = <2>; |
@@ -241,7 +241,7 @@ | |||
241 | 241 | ||
242 | sdhi0: sdhi@ee100000 { | 242 | sdhi0: sdhi@ee100000 { |
243 | compatible = "renesas,sdhi-r8a7790"; | 243 | compatible = "renesas,sdhi-r8a7790"; |
244 | reg = <0 0xee100000 0 0x100>; | 244 | reg = <0 0xee100000 0 0x200>; |
245 | interrupt-parent = <&gic>; | 245 | interrupt-parent = <&gic>; |
246 | interrupts = <0 165 4>; | 246 | interrupts = <0 165 4>; |
247 | cap-sd-highspeed; | 247 | cap-sd-highspeed; |
@@ -250,7 +250,7 @@ | |||
250 | 250 | ||
251 | sdhi1: sdhi@ee120000 { | 251 | sdhi1: sdhi@ee120000 { |
252 | compatible = "renesas,sdhi-r8a7790"; | 252 | compatible = "renesas,sdhi-r8a7790"; |
253 | reg = <0 0xee120000 0 0x100>; | 253 | reg = <0 0xee120000 0 0x200>; |
254 | interrupt-parent = <&gic>; | 254 | interrupt-parent = <&gic>; |
255 | interrupts = <0 166 4>; | 255 | interrupts = <0 166 4>; |
256 | cap-sd-highspeed; | 256 | cap-sd-highspeed; |
diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi index 6d09b8d42fdd..f936476c2753 100644 --- a/arch/arm/boot/dts/socfpga.dtsi +++ b/arch/arm/boot/dts/socfpga.dtsi | |||
@@ -245,14 +245,14 @@ | |||
245 | 245 | ||
246 | mpu_periph_clk: mpu_periph_clk { | 246 | mpu_periph_clk: mpu_periph_clk { |
247 | #clock-cells = <0>; | 247 | #clock-cells = <0>; |
248 | compatible = "altr,socfpga-gate-clk"; | 248 | compatible = "altr,socfpga-perip-clk"; |
249 | clocks = <&mpuclk>; | 249 | clocks = <&mpuclk>; |
250 | fixed-divider = <4>; | 250 | fixed-divider = <4>; |
251 | }; | 251 | }; |
252 | 252 | ||
253 | mpu_l2_ram_clk: mpu_l2_ram_clk { | 253 | mpu_l2_ram_clk: mpu_l2_ram_clk { |
254 | #clock-cells = <0>; | 254 | #clock-cells = <0>; |
255 | compatible = "altr,socfpga-gate-clk"; | 255 | compatible = "altr,socfpga-perip-clk"; |
256 | clocks = <&mpuclk>; | 256 | clocks = <&mpuclk>; |
257 | fixed-divider = <2>; | 257 | fixed-divider = <2>; |
258 | }; | 258 | }; |
@@ -266,8 +266,9 @@ | |||
266 | 266 | ||
267 | l3_main_clk: l3_main_clk { | 267 | l3_main_clk: l3_main_clk { |
268 | #clock-cells = <0>; | 268 | #clock-cells = <0>; |
269 | compatible = "altr,socfpga-gate-clk"; | 269 | compatible = "altr,socfpga-perip-clk"; |
270 | clocks = <&mainclk>; | 270 | clocks = <&mainclk>; |
271 | fixed-divider = <1>; | ||
271 | }; | 272 | }; |
272 | 273 | ||
273 | l3_mp_clk: l3_mp_clk { | 274 | l3_mp_clk: l3_mp_clk { |
diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi index c1751a64889a..7f5878c2784a 100644 --- a/arch/arm/boot/dts/sun6i-a31.dtsi +++ b/arch/arm/boot/dts/sun6i-a31.dtsi | |||
@@ -193,7 +193,10 @@ | |||
193 | pio: pinctrl@01c20800 { | 193 | pio: pinctrl@01c20800 { |
194 | compatible = "allwinner,sun6i-a31-pinctrl"; | 194 | compatible = "allwinner,sun6i-a31-pinctrl"; |
195 | reg = <0x01c20800 0x400>; | 195 | reg = <0x01c20800 0x400>; |
196 | interrupts = <0 11 1>, <0 15 1>, <0 16 1>, <0 17 1>; | 196 | interrupts = <0 11 4>, |
197 | <0 15 4>, | ||
198 | <0 16 4>, | ||
199 | <0 17 4>; | ||
197 | clocks = <&apb1_gates 5>; | 200 | clocks = <&apb1_gates 5>; |
198 | gpio-controller; | 201 | gpio-controller; |
199 | interrupt-controller; | 202 | interrupt-controller; |
@@ -212,11 +215,11 @@ | |||
212 | timer@01c20c00 { | 215 | timer@01c20c00 { |
213 | compatible = "allwinner,sun4i-timer"; | 216 | compatible = "allwinner,sun4i-timer"; |
214 | reg = <0x01c20c00 0xa0>; | 217 | reg = <0x01c20c00 0xa0>; |
215 | interrupts = <0 18 1>, | 218 | interrupts = <0 18 4>, |
216 | <0 19 1>, | 219 | <0 19 4>, |
217 | <0 20 1>, | 220 | <0 20 4>, |
218 | <0 21 1>, | 221 | <0 21 4>, |
219 | <0 22 1>; | 222 | <0 22 4>; |
220 | clocks = <&osc24M>; | 223 | clocks = <&osc24M>; |
221 | }; | 224 | }; |
222 | 225 | ||
@@ -228,7 +231,7 @@ | |||
228 | uart0: serial@01c28000 { | 231 | uart0: serial@01c28000 { |
229 | compatible = "snps,dw-apb-uart"; | 232 | compatible = "snps,dw-apb-uart"; |
230 | reg = <0x01c28000 0x400>; | 233 | reg = <0x01c28000 0x400>; |
231 | interrupts = <0 0 1>; | 234 | interrupts = <0 0 4>; |
232 | reg-shift = <2>; | 235 | reg-shift = <2>; |
233 | reg-io-width = <4>; | 236 | reg-io-width = <4>; |
234 | clocks = <&apb2_gates 16>; | 237 | clocks = <&apb2_gates 16>; |
@@ -238,7 +241,7 @@ | |||
238 | uart1: serial@01c28400 { | 241 | uart1: serial@01c28400 { |
239 | compatible = "snps,dw-apb-uart"; | 242 | compatible = "snps,dw-apb-uart"; |
240 | reg = <0x01c28400 0x400>; | 243 | reg = <0x01c28400 0x400>; |
241 | interrupts = <0 1 1>; | 244 | interrupts = <0 1 4>; |
242 | reg-shift = <2>; | 245 | reg-shift = <2>; |
243 | reg-io-width = <4>; | 246 | reg-io-width = <4>; |
244 | clocks = <&apb2_gates 17>; | 247 | clocks = <&apb2_gates 17>; |
@@ -248,7 +251,7 @@ | |||
248 | uart2: serial@01c28800 { | 251 | uart2: serial@01c28800 { |
249 | compatible = "snps,dw-apb-uart"; | 252 | compatible = "snps,dw-apb-uart"; |
250 | reg = <0x01c28800 0x400>; | 253 | reg = <0x01c28800 0x400>; |
251 | interrupts = <0 2 1>; | 254 | interrupts = <0 2 4>; |
252 | reg-shift = <2>; | 255 | reg-shift = <2>; |
253 | reg-io-width = <4>; | 256 | reg-io-width = <4>; |
254 | clocks = <&apb2_gates 18>; | 257 | clocks = <&apb2_gates 18>; |
@@ -258,7 +261,7 @@ | |||
258 | uart3: serial@01c28c00 { | 261 | uart3: serial@01c28c00 { |
259 | compatible = "snps,dw-apb-uart"; | 262 | compatible = "snps,dw-apb-uart"; |
260 | reg = <0x01c28c00 0x400>; | 263 | reg = <0x01c28c00 0x400>; |
261 | interrupts = <0 3 1>; | 264 | interrupts = <0 3 4>; |
262 | reg-shift = <2>; | 265 | reg-shift = <2>; |
263 | reg-io-width = <4>; | 266 | reg-io-width = <4>; |
264 | clocks = <&apb2_gates 19>; | 267 | clocks = <&apb2_gates 19>; |
@@ -268,7 +271,7 @@ | |||
268 | uart4: serial@01c29000 { | 271 | uart4: serial@01c29000 { |
269 | compatible = "snps,dw-apb-uart"; | 272 | compatible = "snps,dw-apb-uart"; |
270 | reg = <0x01c29000 0x400>; | 273 | reg = <0x01c29000 0x400>; |
271 | interrupts = <0 4 1>; | 274 | interrupts = <0 4 4>; |
272 | reg-shift = <2>; | 275 | reg-shift = <2>; |
273 | reg-io-width = <4>; | 276 | reg-io-width = <4>; |
274 | clocks = <&apb2_gates 20>; | 277 | clocks = <&apb2_gates 20>; |
@@ -278,7 +281,7 @@ | |||
278 | uart5: serial@01c29400 { | 281 | uart5: serial@01c29400 { |
279 | compatible = "snps,dw-apb-uart"; | 282 | compatible = "snps,dw-apb-uart"; |
280 | reg = <0x01c29400 0x400>; | 283 | reg = <0x01c29400 0x400>; |
281 | interrupts = <0 5 1>; | 284 | interrupts = <0 5 4>; |
282 | reg-shift = <2>; | 285 | reg-shift = <2>; |
283 | reg-io-width = <4>; | 286 | reg-io-width = <4>; |
284 | clocks = <&apb2_gates 21>; | 287 | clocks = <&apb2_gates 21>; |
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index e46cfedde74c..367611a0730b 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi | |||
@@ -170,7 +170,7 @@ | |||
170 | emac: ethernet@01c0b000 { | 170 | emac: ethernet@01c0b000 { |
171 | compatible = "allwinner,sun4i-emac"; | 171 | compatible = "allwinner,sun4i-emac"; |
172 | reg = <0x01c0b000 0x1000>; | 172 | reg = <0x01c0b000 0x1000>; |
173 | interrupts = <0 55 1>; | 173 | interrupts = <0 55 4>; |
174 | clocks = <&ahb_gates 17>; | 174 | clocks = <&ahb_gates 17>; |
175 | status = "disabled"; | 175 | status = "disabled"; |
176 | }; | 176 | }; |
@@ -186,7 +186,7 @@ | |||
186 | pio: pinctrl@01c20800 { | 186 | pio: pinctrl@01c20800 { |
187 | compatible = "allwinner,sun7i-a20-pinctrl"; | 187 | compatible = "allwinner,sun7i-a20-pinctrl"; |
188 | reg = <0x01c20800 0x400>; | 188 | reg = <0x01c20800 0x400>; |
189 | interrupts = <0 28 1>; | 189 | interrupts = <0 28 4>; |
190 | clocks = <&apb0_gates 5>; | 190 | clocks = <&apb0_gates 5>; |
191 | gpio-controller; | 191 | gpio-controller; |
192 | interrupt-controller; | 192 | interrupt-controller; |
@@ -251,12 +251,12 @@ | |||
251 | timer@01c20c00 { | 251 | timer@01c20c00 { |
252 | compatible = "allwinner,sun4i-timer"; | 252 | compatible = "allwinner,sun4i-timer"; |
253 | reg = <0x01c20c00 0x90>; | 253 | reg = <0x01c20c00 0x90>; |
254 | interrupts = <0 22 1>, | 254 | interrupts = <0 22 4>, |
255 | <0 23 1>, | 255 | <0 23 4>, |
256 | <0 24 1>, | 256 | <0 24 4>, |
257 | <0 25 1>, | 257 | <0 25 4>, |
258 | <0 67 1>, | 258 | <0 67 4>, |
259 | <0 68 1>; | 259 | <0 68 4>; |
260 | clocks = <&osc24M>; | 260 | clocks = <&osc24M>; |
261 | }; | 261 | }; |
262 | 262 | ||
@@ -273,7 +273,7 @@ | |||
273 | uart0: serial@01c28000 { | 273 | uart0: serial@01c28000 { |
274 | compatible = "snps,dw-apb-uart"; | 274 | compatible = "snps,dw-apb-uart"; |
275 | reg = <0x01c28000 0x400>; | 275 | reg = <0x01c28000 0x400>; |
276 | interrupts = <0 1 1>; | 276 | interrupts = <0 1 4>; |
277 | reg-shift = <2>; | 277 | reg-shift = <2>; |
278 | reg-io-width = <4>; | 278 | reg-io-width = <4>; |
279 | clocks = <&apb1_gates 16>; | 279 | clocks = <&apb1_gates 16>; |
@@ -283,7 +283,7 @@ | |||
283 | uart1: serial@01c28400 { | 283 | uart1: serial@01c28400 { |
284 | compatible = "snps,dw-apb-uart"; | 284 | compatible = "snps,dw-apb-uart"; |
285 | reg = <0x01c28400 0x400>; | 285 | reg = <0x01c28400 0x400>; |
286 | interrupts = <0 2 1>; | 286 | interrupts = <0 2 4>; |
287 | reg-shift = <2>; | 287 | reg-shift = <2>; |
288 | reg-io-width = <4>; | 288 | reg-io-width = <4>; |
289 | clocks = <&apb1_gates 17>; | 289 | clocks = <&apb1_gates 17>; |
@@ -293,7 +293,7 @@ | |||
293 | uart2: serial@01c28800 { | 293 | uart2: serial@01c28800 { |
294 | compatible = "snps,dw-apb-uart"; | 294 | compatible = "snps,dw-apb-uart"; |
295 | reg = <0x01c28800 0x400>; | 295 | reg = <0x01c28800 0x400>; |
296 | interrupts = <0 3 1>; | 296 | interrupts = <0 3 4>; |
297 | reg-shift = <2>; | 297 | reg-shift = <2>; |
298 | reg-io-width = <4>; | 298 | reg-io-width = <4>; |
299 | clocks = <&apb1_gates 18>; | 299 | clocks = <&apb1_gates 18>; |
@@ -303,7 +303,7 @@ | |||
303 | uart3: serial@01c28c00 { | 303 | uart3: serial@01c28c00 { |
304 | compatible = "snps,dw-apb-uart"; | 304 | compatible = "snps,dw-apb-uart"; |
305 | reg = <0x01c28c00 0x400>; | 305 | reg = <0x01c28c00 0x400>; |
306 | interrupts = <0 4 1>; | 306 | interrupts = <0 4 4>; |
307 | reg-shift = <2>; | 307 | reg-shift = <2>; |
308 | reg-io-width = <4>; | 308 | reg-io-width = <4>; |
309 | clocks = <&apb1_gates 19>; | 309 | clocks = <&apb1_gates 19>; |
@@ -313,7 +313,7 @@ | |||
313 | uart4: serial@01c29000 { | 313 | uart4: serial@01c29000 { |
314 | compatible = "snps,dw-apb-uart"; | 314 | compatible = "snps,dw-apb-uart"; |
315 | reg = <0x01c29000 0x400>; | 315 | reg = <0x01c29000 0x400>; |
316 | interrupts = <0 17 1>; | 316 | interrupts = <0 17 4>; |
317 | reg-shift = <2>; | 317 | reg-shift = <2>; |
318 | reg-io-width = <4>; | 318 | reg-io-width = <4>; |
319 | clocks = <&apb1_gates 20>; | 319 | clocks = <&apb1_gates 20>; |
@@ -323,7 +323,7 @@ | |||
323 | uart5: serial@01c29400 { | 323 | uart5: serial@01c29400 { |
324 | compatible = "snps,dw-apb-uart"; | 324 | compatible = "snps,dw-apb-uart"; |
325 | reg = <0x01c29400 0x400>; | 325 | reg = <0x01c29400 0x400>; |
326 | interrupts = <0 18 1>; | 326 | interrupts = <0 18 4>; |
327 | reg-shift = <2>; | 327 | reg-shift = <2>; |
328 | reg-io-width = <4>; | 328 | reg-io-width = <4>; |
329 | clocks = <&apb1_gates 21>; | 329 | clocks = <&apb1_gates 21>; |
@@ -333,7 +333,7 @@ | |||
333 | uart6: serial@01c29800 { | 333 | uart6: serial@01c29800 { |
334 | compatible = "snps,dw-apb-uart"; | 334 | compatible = "snps,dw-apb-uart"; |
335 | reg = <0x01c29800 0x400>; | 335 | reg = <0x01c29800 0x400>; |
336 | interrupts = <0 19 1>; | 336 | interrupts = <0 19 4>; |
337 | reg-shift = <2>; | 337 | reg-shift = <2>; |
338 | reg-io-width = <4>; | 338 | reg-io-width = <4>; |
339 | clocks = <&apb1_gates 22>; | 339 | clocks = <&apb1_gates 22>; |
@@ -343,7 +343,7 @@ | |||
343 | uart7: serial@01c29c00 { | 343 | uart7: serial@01c29c00 { |
344 | compatible = "snps,dw-apb-uart"; | 344 | compatible = "snps,dw-apb-uart"; |
345 | reg = <0x01c29c00 0x400>; | 345 | reg = <0x01c29c00 0x400>; |
346 | interrupts = <0 20 1>; | 346 | interrupts = <0 20 4>; |
347 | reg-shift = <2>; | 347 | reg-shift = <2>; |
348 | reg-io-width = <4>; | 348 | reg-io-width = <4>; |
349 | clocks = <&apb1_gates 23>; | 349 | clocks = <&apb1_gates 23>; |
@@ -353,7 +353,7 @@ | |||
353 | i2c0: i2c@01c2ac00 { | 353 | i2c0: i2c@01c2ac00 { |
354 | compatible = "allwinner,sun4i-i2c"; | 354 | compatible = "allwinner,sun4i-i2c"; |
355 | reg = <0x01c2ac00 0x400>; | 355 | reg = <0x01c2ac00 0x400>; |
356 | interrupts = <0 7 1>; | 356 | interrupts = <0 7 4>; |
357 | clocks = <&apb1_gates 0>; | 357 | clocks = <&apb1_gates 0>; |
358 | clock-frequency = <100000>; | 358 | clock-frequency = <100000>; |
359 | status = "disabled"; | 359 | status = "disabled"; |
@@ -362,7 +362,7 @@ | |||
362 | i2c1: i2c@01c2b000 { | 362 | i2c1: i2c@01c2b000 { |
363 | compatible = "allwinner,sun4i-i2c"; | 363 | compatible = "allwinner,sun4i-i2c"; |
364 | reg = <0x01c2b000 0x400>; | 364 | reg = <0x01c2b000 0x400>; |
365 | interrupts = <0 8 1>; | 365 | interrupts = <0 8 4>; |
366 | clocks = <&apb1_gates 1>; | 366 | clocks = <&apb1_gates 1>; |
367 | clock-frequency = <100000>; | 367 | clock-frequency = <100000>; |
368 | status = "disabled"; | 368 | status = "disabled"; |
@@ -371,7 +371,7 @@ | |||
371 | i2c2: i2c@01c2b400 { | 371 | i2c2: i2c@01c2b400 { |
372 | compatible = "allwinner,sun4i-i2c"; | 372 | compatible = "allwinner,sun4i-i2c"; |
373 | reg = <0x01c2b400 0x400>; | 373 | reg = <0x01c2b400 0x400>; |
374 | interrupts = <0 9 1>; | 374 | interrupts = <0 9 4>; |
375 | clocks = <&apb1_gates 2>; | 375 | clocks = <&apb1_gates 2>; |
376 | clock-frequency = <100000>; | 376 | clock-frequency = <100000>; |
377 | status = "disabled"; | 377 | status = "disabled"; |
@@ -380,7 +380,7 @@ | |||
380 | i2c3: i2c@01c2b800 { | 380 | i2c3: i2c@01c2b800 { |
381 | compatible = "allwinner,sun4i-i2c"; | 381 | compatible = "allwinner,sun4i-i2c"; |
382 | reg = <0x01c2b800 0x400>; | 382 | reg = <0x01c2b800 0x400>; |
383 | interrupts = <0 88 1>; | 383 | interrupts = <0 88 4>; |
384 | clocks = <&apb1_gates 3>; | 384 | clocks = <&apb1_gates 3>; |
385 | clock-frequency = <100000>; | 385 | clock-frequency = <100000>; |
386 | status = "disabled"; | 386 | status = "disabled"; |
@@ -389,7 +389,7 @@ | |||
389 | i2c4: i2c@01c2bc00 { | 389 | i2c4: i2c@01c2bc00 { |
390 | compatible = "allwinner,sun4i-i2c"; | 390 | compatible = "allwinner,sun4i-i2c"; |
391 | reg = <0x01c2bc00 0x400>; | 391 | reg = <0x01c2bc00 0x400>; |
392 | interrupts = <0 89 1>; | 392 | interrupts = <0 89 4>; |
393 | clocks = <&apb1_gates 15>; | 393 | clocks = <&apb1_gates 15>; |
394 | clock-frequency = <100000>; | 394 | clock-frequency = <100000>; |
395 | status = "disabled"; | 395 | status = "disabled"; |
diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c index 26020a03f659..1e361abc29eb 100644 --- a/arch/arm/common/mcpm_entry.c +++ b/arch/arm/common/mcpm_entry.c | |||
@@ -35,8 +35,7 @@ void mcpm_set_early_poke(unsigned cpu, unsigned cluster, | |||
35 | unsigned long *poke = &mcpm_entry_early_pokes[cluster][cpu][0]; | 35 | unsigned long *poke = &mcpm_entry_early_pokes[cluster][cpu][0]; |
36 | poke[0] = poke_phys_addr; | 36 | poke[0] = poke_phys_addr; |
37 | poke[1] = poke_val; | 37 | poke[1] = poke_val; |
38 | __cpuc_flush_dcache_area((void *)poke, 8); | 38 | __sync_cache_range_w(poke, 2 * sizeof(*poke)); |
39 | outer_clean_range(__pa(poke), __pa(poke + 2)); | ||
40 | } | 39 | } |
41 | 40 | ||
42 | static const struct mcpm_platform_ops *platform_ops; | 41 | static const struct mcpm_platform_ops *platform_ops; |
@@ -167,7 +166,7 @@ void __mcpm_cpu_down(unsigned int cpu, unsigned int cluster) | |||
167 | dmb(); | 166 | dmb(); |
168 | mcpm_sync.clusters[cluster].cpus[cpu].cpu = CPU_DOWN; | 167 | mcpm_sync.clusters[cluster].cpus[cpu].cpu = CPU_DOWN; |
169 | sync_cache_w(&mcpm_sync.clusters[cluster].cpus[cpu].cpu); | 168 | sync_cache_w(&mcpm_sync.clusters[cluster].cpus[cpu].cpu); |
170 | dsb_sev(); | 169 | sev(); |
171 | } | 170 | } |
172 | 171 | ||
173 | /* | 172 | /* |
@@ -183,7 +182,7 @@ void __mcpm_outbound_leave_critical(unsigned int cluster, int state) | |||
183 | dmb(); | 182 | dmb(); |
184 | mcpm_sync.clusters[cluster].cluster = state; | 183 | mcpm_sync.clusters[cluster].cluster = state; |
185 | sync_cache_w(&mcpm_sync.clusters[cluster].cluster); | 184 | sync_cache_w(&mcpm_sync.clusters[cluster].cluster); |
186 | dsb_sev(); | 185 | sev(); |
187 | } | 186 | } |
188 | 187 | ||
189 | /* | 188 | /* |
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 4a5903e04827..c1df4e9db140 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig | |||
@@ -69,6 +69,7 @@ CONFIG_KS8851=y | |||
69 | CONFIG_SMSC911X=y | 69 | CONFIG_SMSC911X=y |
70 | CONFIG_STMMAC_ETH=y | 70 | CONFIG_STMMAC_ETH=y |
71 | CONFIG_MDIO_SUN4I=y | 71 | CONFIG_MDIO_SUN4I=y |
72 | CONFIG_TI_CPSW=y | ||
72 | CONFIG_KEYBOARD_SPEAR=y | 73 | CONFIG_KEYBOARD_SPEAR=y |
73 | CONFIG_SERIO_AMBAKMI=y | 74 | CONFIG_SERIO_AMBAKMI=y |
74 | CONFIG_SERIAL_8250=y | 75 | CONFIG_SERIAL_8250=y |
@@ -133,12 +134,14 @@ CONFIG_USB_GPIO_VBUS=y | |||
133 | CONFIG_USB_ISP1301=y | 134 | CONFIG_USB_ISP1301=y |
134 | CONFIG_USB_MXS_PHY=y | 135 | CONFIG_USB_MXS_PHY=y |
135 | CONFIG_MMC=y | 136 | CONFIG_MMC=y |
137 | CONFIG_MMC_BLOCK_MINORS=16 | ||
136 | CONFIG_MMC_ARMMMCI=y | 138 | CONFIG_MMC_ARMMMCI=y |
137 | CONFIG_MMC_SDHCI=y | 139 | CONFIG_MMC_SDHCI=y |
138 | CONFIG_MMC_SDHCI_PLTFM=y | 140 | CONFIG_MMC_SDHCI_PLTFM=y |
139 | CONFIG_MMC_SDHCI_ESDHC_IMX=y | 141 | CONFIG_MMC_SDHCI_ESDHC_IMX=y |
140 | CONFIG_MMC_SDHCI_TEGRA=y | 142 | CONFIG_MMC_SDHCI_TEGRA=y |
141 | CONFIG_MMC_SDHCI_SPEAR=y | 143 | CONFIG_MMC_SDHCI_SPEAR=y |
144 | CONFIG_MMC_SDHCI_BCM_KONA=y | ||
142 | CONFIG_MMC_OMAP=y | 145 | CONFIG_MMC_OMAP=y |
143 | CONFIG_MMC_OMAP_HS=y | 146 | CONFIG_MMC_OMAP_HS=y |
144 | CONFIG_EDAC=y | 147 | CONFIG_EDAC=y |
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index 98a50c309b90..bfa80a11e8c7 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig | |||
@@ -173,6 +173,7 @@ CONFIG_MFD_PALMAS=y | |||
173 | CONFIG_MFD_TPS65217=y | 173 | CONFIG_MFD_TPS65217=y |
174 | CONFIG_MFD_TPS65910=y | 174 | CONFIG_MFD_TPS65910=y |
175 | CONFIG_TWL6040_CORE=y | 175 | CONFIG_TWL6040_CORE=y |
176 | CONFIG_REGULATOR_FIXED_VOLTAGE=y | ||
176 | CONFIG_REGULATOR_PALMAS=y | 177 | CONFIG_REGULATOR_PALMAS=y |
177 | CONFIG_REGULATOR_TPS65023=y | 178 | CONFIG_REGULATOR_TPS65023=y |
178 | CONFIG_REGULATOR_TPS6507X=y | 179 | CONFIG_REGULATOR_TPS6507X=y |
diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig index d57a85badb5e..3e2259b60236 100644 --- a/arch/arm/configs/sunxi_defconfig +++ b/arch/arm/configs/sunxi_defconfig | |||
@@ -12,6 +12,9 @@ CONFIG_NET=y | |||
12 | CONFIG_PACKET=y | 12 | CONFIG_PACKET=y |
13 | CONFIG_UNIX=y | 13 | CONFIG_UNIX=y |
14 | CONFIG_INET=y | 14 | CONFIG_INET=y |
15 | CONFIG_IP_PNP=y | ||
16 | CONFIG_IP_PNP_DHCP=y | ||
17 | CONFIG_IP_PNP_BOOTP=y | ||
15 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | 18 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set |
16 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | 19 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set |
17 | # CONFIG_INET_XFRM_MODE_BEET is not set | 20 | # CONFIG_INET_XFRM_MODE_BEET is not set |
@@ -58,4 +61,8 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y | |||
58 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | 61 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y |
59 | CONFIG_COMMON_CLK_DEBUG=y | 62 | CONFIG_COMMON_CLK_DEBUG=y |
60 | # CONFIG_IOMMU_SUPPORT is not set | 63 | # CONFIG_IOMMU_SUPPORT is not set |
64 | CONFIG_TMPFS=y | ||
65 | CONFIG_NFS_FS=y | ||
66 | CONFIG_ROOT_NFS=y | ||
61 | CONFIG_NLS=y | 67 | CONFIG_NLS=y |
68 | CONFIG_PRINTK_TIME=y | ||
diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig index ac632cc38f24..c6ebc184bf68 100644 --- a/arch/arm/configs/u8500_defconfig +++ b/arch/arm/configs/u8500_defconfig | |||
@@ -22,6 +22,7 @@ CONFIG_CMDLINE="root=/dev/ram0 console=ttyAMA2,115200n8" | |||
22 | CONFIG_CPU_FREQ=y | 22 | CONFIG_CPU_FREQ=y |
23 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y | 23 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y |
24 | CONFIG_CPU_IDLE=y | 24 | CONFIG_CPU_IDLE=y |
25 | CONFIG_ARM_U8500_CPUIDLE=y | ||
25 | CONFIG_VFP=y | 26 | CONFIG_VFP=y |
26 | CONFIG_NEON=y | 27 | CONFIG_NEON=y |
27 | CONFIG_PM_RUNTIME=y | 28 | CONFIG_PM_RUNTIME=y |
@@ -109,6 +110,8 @@ CONFIG_EXT2_FS_SECURITY=y | |||
109 | CONFIG_EXT3_FS=y | 110 | CONFIG_EXT3_FS=y |
110 | CONFIG_EXT4_FS=y | 111 | CONFIG_EXT4_FS=y |
111 | CONFIG_VFAT_FS=y | 112 | CONFIG_VFAT_FS=y |
113 | CONFIG_DEVTMPFS=y | ||
114 | CONFIG_DEVTMPFS_MOUNT=y | ||
112 | CONFIG_TMPFS=y | 115 | CONFIG_TMPFS=y |
113 | CONFIG_TMPFS_POSIX_ACL=y | 116 | CONFIG_TMPFS_POSIX_ACL=y |
114 | # CONFIG_MISC_FILESYSTEMS is not set | 117 | # CONFIG_MISC_FILESYSTEMS is not set |
diff --git a/arch/arm/crypto/aesbs-core.S_shipped b/arch/arm/crypto/aesbs-core.S_shipped index 64205d453260..71e5fc7cfb18 100644 --- a/arch/arm/crypto/aesbs-core.S_shipped +++ b/arch/arm/crypto/aesbs-core.S_shipped | |||
@@ -58,7 +58,7 @@ | |||
58 | # define VFP_ABI_FRAME 0 | 58 | # define VFP_ABI_FRAME 0 |
59 | # define BSAES_ASM_EXTENDED_KEY | 59 | # define BSAES_ASM_EXTENDED_KEY |
60 | # define XTS_CHAIN_TWEAK | 60 | # define XTS_CHAIN_TWEAK |
61 | # define __ARM_ARCH__ __LINUX_ARM_ARCH__ | 61 | # define __ARM_ARCH__ 7 |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | #ifdef __thumb__ | 64 | #ifdef __thumb__ |
diff --git a/arch/arm/crypto/bsaes-armv7.pl b/arch/arm/crypto/bsaes-armv7.pl index f3d96d932573..be068db960ee 100644 --- a/arch/arm/crypto/bsaes-armv7.pl +++ b/arch/arm/crypto/bsaes-armv7.pl | |||
@@ -701,7 +701,7 @@ $code.=<<___; | |||
701 | # define VFP_ABI_FRAME 0 | 701 | # define VFP_ABI_FRAME 0 |
702 | # define BSAES_ASM_EXTENDED_KEY | 702 | # define BSAES_ASM_EXTENDED_KEY |
703 | # define XTS_CHAIN_TWEAK | 703 | # define XTS_CHAIN_TWEAK |
704 | # define __ARM_ARCH__ __LINUX_ARM_ARCH__ | 704 | # define __ARM_ARCH__ 7 |
705 | #endif | 705 | #endif |
706 | 706 | ||
707 | #ifdef __thumb__ | 707 | #ifdef __thumb__ |
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index ee753f1749cd..e9a49fe0284e 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -481,4 +481,9 @@ static inline void __sync_cache_range_r(volatile void *p, size_t size) | |||
481 | : : : "r0","r1","r2","r3","r4","r5","r6","r7", \ | 481 | : : : "r0","r1","r2","r3","r4","r5","r6","r7", \ |
482 | "r9","r10","lr","memory" ) | 482 | "r9","r10","lr","memory" ) |
483 | 483 | ||
484 | int set_memory_ro(unsigned long addr, int numpages); | ||
485 | int set_memory_rw(unsigned long addr, int numpages); | ||
486 | int set_memory_x(unsigned long addr, int numpages); | ||
487 | int set_memory_nx(unsigned long addr, int numpages); | ||
488 | |||
484 | #endif | 489 | #endif |
diff --git a/arch/arm/include/asm/checksum.h b/arch/arm/include/asm/checksum.h index 6dcc16430868..523315115478 100644 --- a/arch/arm/include/asm/checksum.h +++ b/arch/arm/include/asm/checksum.h | |||
@@ -87,19 +87,33 @@ static inline __wsum | |||
87 | csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, | 87 | csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, |
88 | unsigned short proto, __wsum sum) | 88 | unsigned short proto, __wsum sum) |
89 | { | 89 | { |
90 | __asm__( | 90 | u32 lenprot = len | proto << 16; |
91 | "adds %0, %1, %2 @ csum_tcpudp_nofold \n\ | 91 | if (__builtin_constant_p(sum) && sum == 0) { |
92 | adcs %0, %0, %3 \n" | 92 | __asm__( |
93 | "adds %0, %1, %2 @ csum_tcpudp_nofold0 \n\t" | ||
93 | #ifdef __ARMEB__ | 94 | #ifdef __ARMEB__ |
94 | "adcs %0, %0, %4 \n" | 95 | "adcs %0, %0, %3 \n\t" |
95 | #else | 96 | #else |
96 | "adcs %0, %0, %4, lsl #8 \n" | 97 | "adcs %0, %0, %3, ror #8 \n\t" |
97 | #endif | 98 | #endif |
98 | "adcs %0, %0, %5 \n\ | 99 | "adc %0, %0, #0" |
99 | adc %0, %0, #0" | 100 | : "=&r" (sum) |
100 | : "=&r"(sum) | 101 | : "r" (daddr), "r" (saddr), "r" (lenprot) |
101 | : "r" (sum), "r" (daddr), "r" (saddr), "r" (len), "Ir" (htons(proto)) | 102 | : "cc"); |
102 | : "cc"); | 103 | } else { |
104 | __asm__( | ||
105 | "adds %0, %1, %2 @ csum_tcpudp_nofold \n\t" | ||
106 | "adcs %0, %0, %3 \n\t" | ||
107 | #ifdef __ARMEB__ | ||
108 | "adcs %0, %0, %4 \n\t" | ||
109 | #else | ||
110 | "adcs %0, %0, %4, ror #8 \n\t" | ||
111 | #endif | ||
112 | "adc %0, %0, #0" | ||
113 | : "=&r"(sum) | ||
114 | : "r" (sum), "r" (daddr), "r" (saddr), "r" (lenprot) | ||
115 | : "cc"); | ||
116 | } | ||
103 | return sum; | 117 | return sum; |
104 | } | 118 | } |
105 | /* | 119 | /* |
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h index 3b2c40b5bfa2..6795ff743b3d 100644 --- a/arch/arm/include/asm/hardware/cache-l2x0.h +++ b/arch/arm/include/asm/hardware/cache-l2x0.h | |||
@@ -131,6 +131,7 @@ struct l2x0_regs { | |||
131 | unsigned long prefetch_ctrl; | 131 | unsigned long prefetch_ctrl; |
132 | unsigned long pwr_ctrl; | 132 | unsigned long pwr_ctrl; |
133 | unsigned long ctrl; | 133 | unsigned long ctrl; |
134 | unsigned long aux2_ctrl; | ||
134 | }; | 135 | }; |
135 | 136 | ||
136 | extern struct l2x0_regs l2x0_saved_regs; | 137 | extern struct l2x0_regs l2x0_saved_regs; |
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 3c597c222ef2..fbeb39c869e9 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -329,7 +329,7 @@ extern void _memset_io(volatile void __iomem *, int, size_t); | |||
329 | */ | 329 | */ |
330 | #define ioremap(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE) | 330 | #define ioremap(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE) |
331 | #define ioremap_nocache(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE) | 331 | #define ioremap_nocache(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE) |
332 | #define ioremap_cached(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_CACHED) | 332 | #define ioremap_cache(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_CACHED) |
333 | #define ioremap_wc(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_WC) | 333 | #define ioremap_wc(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_WC) |
334 | #define iounmap __arm_iounmap | 334 | #define iounmap __arm_iounmap |
335 | 335 | ||
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h index 2fe141fcc8d6..f98c7f32c9c8 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h | |||
@@ -22,18 +22,21 @@ struct map_desc { | |||
22 | }; | 22 | }; |
23 | 23 | ||
24 | /* types 0-3 are defined in asm/io.h */ | 24 | /* types 0-3 are defined in asm/io.h */ |
25 | #define MT_UNCACHED 4 | 25 | enum { |
26 | #define MT_CACHECLEAN 5 | 26 | MT_UNCACHED = 4, |
27 | #define MT_MINICLEAN 6 | 27 | MT_CACHECLEAN, |
28 | #define MT_LOW_VECTORS 7 | 28 | MT_MINICLEAN, |
29 | #define MT_HIGH_VECTORS 8 | 29 | MT_LOW_VECTORS, |
30 | #define MT_MEMORY 9 | 30 | MT_HIGH_VECTORS, |
31 | #define MT_ROM 10 | 31 | MT_MEMORY_RWX, |
32 | #define MT_MEMORY_NONCACHED 11 | 32 | MT_MEMORY_RW, |
33 | #define MT_MEMORY_DTCM 12 | 33 | MT_ROM, |
34 | #define MT_MEMORY_ITCM 13 | 34 | MT_MEMORY_RWX_NONCACHED, |
35 | #define MT_MEMORY_SO 14 | 35 | MT_MEMORY_RW_DTCM, |
36 | #define MT_MEMORY_DMA_READY 15 | 36 | MT_MEMORY_RWX_ITCM, |
37 | MT_MEMORY_RW_SO, | ||
38 | MT_MEMORY_DMA_READY, | ||
39 | }; | ||
37 | 40 | ||
38 | #ifdef CONFIG_MMU | 41 | #ifdef CONFIG_MMU |
39 | extern void iotable_init(struct map_desc *, int); | 42 | extern void iotable_init(struct map_desc *, int); |
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 9ecccc865046..8756e4bcdba0 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -100,23 +100,19 @@ | |||
100 | #define TASK_UNMAPPED_BASE UL(0x00000000) | 100 | #define TASK_UNMAPPED_BASE UL(0x00000000) |
101 | #endif | 101 | #endif |
102 | 102 | ||
103 | #ifndef PHYS_OFFSET | ||
104 | #define PHYS_OFFSET UL(CONFIG_DRAM_BASE) | ||
105 | #endif | ||
106 | |||
107 | #ifndef END_MEM | 103 | #ifndef END_MEM |
108 | #define END_MEM (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE) | 104 | #define END_MEM (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE) |
109 | #endif | 105 | #endif |
110 | 106 | ||
111 | #ifndef PAGE_OFFSET | 107 | #ifndef PAGE_OFFSET |
112 | #define PAGE_OFFSET (PHYS_OFFSET) | 108 | #define PAGE_OFFSET PLAT_PHYS_OFFSET |
113 | #endif | 109 | #endif |
114 | 110 | ||
115 | /* | 111 | /* |
116 | * The module can be at any place in ram in nommu mode. | 112 | * The module can be at any place in ram in nommu mode. |
117 | */ | 113 | */ |
118 | #define MODULES_END (END_MEM) | 114 | #define MODULES_END (END_MEM) |
119 | #define MODULES_VADDR (PHYS_OFFSET) | 115 | #define MODULES_VADDR PAGE_OFFSET |
120 | 116 | ||
121 | #define XIP_VIRT_ADDR(physaddr) (physaddr) | 117 | #define XIP_VIRT_ADDR(physaddr) (physaddr) |
122 | 118 | ||
@@ -157,6 +153,16 @@ | |||
157 | #endif | 153 | #endif |
158 | #define ARCH_PGD_MASK ((1 << ARCH_PGD_SHIFT) - 1) | 154 | #define ARCH_PGD_MASK ((1 << ARCH_PGD_SHIFT) - 1) |
159 | 155 | ||
156 | /* | ||
157 | * PLAT_PHYS_OFFSET is the offset (from zero) of the start of physical | ||
158 | * memory. This is used for XIP and NoMMU kernels, or by kernels which | ||
159 | * have their own mach/memory.h. Assembly code must always use | ||
160 | * PLAT_PHYS_OFFSET and not PHYS_OFFSET. | ||
161 | */ | ||
162 | #ifndef PLAT_PHYS_OFFSET | ||
163 | #define PLAT_PHYS_OFFSET UL(CONFIG_PHYS_OFFSET) | ||
164 | #endif | ||
165 | |||
160 | #ifndef __ASSEMBLY__ | 166 | #ifndef __ASSEMBLY__ |
161 | 167 | ||
162 | /* | 168 | /* |
@@ -239,6 +245,8 @@ static inline unsigned long __phys_to_virt(phys_addr_t x) | |||
239 | 245 | ||
240 | #else | 246 | #else |
241 | 247 | ||
248 | #define PHYS_OFFSET PLAT_PHYS_OFFSET | ||
249 | |||
242 | static inline phys_addr_t __virt_to_phys(unsigned long x) | 250 | static inline phys_addr_t __virt_to_phys(unsigned long x) |
243 | { | 251 | { |
244 | return (phys_addr_t)x - PAGE_OFFSET + PHYS_OFFSET; | 252 | return (phys_addr_t)x - PAGE_OFFSET + PHYS_OFFSET; |
@@ -251,17 +259,6 @@ static inline unsigned long __phys_to_virt(phys_addr_t x) | |||
251 | 259 | ||
252 | #endif | 260 | #endif |
253 | #endif | 261 | #endif |
254 | #endif /* __ASSEMBLY__ */ | ||
255 | |||
256 | #ifndef PHYS_OFFSET | ||
257 | #ifdef PLAT_PHYS_OFFSET | ||
258 | #define PHYS_OFFSET PLAT_PHYS_OFFSET | ||
259 | #else | ||
260 | #define PHYS_OFFSET UL(CONFIG_PHYS_OFFSET) | ||
261 | #endif | ||
262 | #endif | ||
263 | |||
264 | #ifndef __ASSEMBLY__ | ||
265 | 262 | ||
266 | /* | 263 | /* |
267 | * PFNs are used to describe any physical page; this means | 264 | * PFNs are used to describe any physical page; this means |
@@ -350,7 +347,8 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
350 | #define ARCH_PFN_OFFSET PHYS_PFN_OFFSET | 347 | #define ARCH_PFN_OFFSET PHYS_PFN_OFFSET |
351 | 348 | ||
352 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 349 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
353 | #define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) | 350 | #define virt_addr_valid(kaddr) (((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) \ |
351 | && pfn_valid(__pa(kaddr) >> PAGE_SHIFT) ) | ||
354 | 352 | ||
355 | #endif | 353 | #endif |
356 | 354 | ||
diff --git a/arch/arm/include/asm/pci.h b/arch/arm/include/asm/pci.h index a98a2e112fae..680a83e94467 100644 --- a/arch/arm/include/asm/pci.h +++ b/arch/arm/include/asm/pci.h | |||
@@ -57,12 +57,9 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
57 | extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | 57 | extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, |
58 | enum pci_mmap_state mmap_state, int write_combine); | 58 | enum pci_mmap_state mmap_state, int write_combine); |
59 | 59 | ||
60 | /* | ||
61 | * Dummy implementation; always return 0. | ||
62 | */ | ||
63 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | 60 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) |
64 | { | 61 | { |
65 | return 0; | 62 | return channel ? 15 : 14; |
66 | } | 63 | } |
67 | 64 | ||
68 | #endif /* __KERNEL__ */ | 65 | #endif /* __KERNEL__ */ |
diff --git a/arch/arm/include/asm/pgtable-2level.h b/arch/arm/include/asm/pgtable-2level.h index 86a659a19526..dfff709fda3c 100644 --- a/arch/arm/include/asm/pgtable-2level.h +++ b/arch/arm/include/asm/pgtable-2level.h | |||
@@ -160,6 +160,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr) | |||
160 | return (pmd_t *)pud; | 160 | return (pmd_t *)pud; |
161 | } | 161 | } |
162 | 162 | ||
163 | #define pmd_large(pmd) (pmd_val(pmd) & 2) | ||
163 | #define pmd_bad(pmd) (pmd_val(pmd) & 2) | 164 | #define pmd_bad(pmd) (pmd_val(pmd) & 2) |
164 | 165 | ||
165 | #define copy_pmd(pmdpd,pmdps) \ | 166 | #define copy_pmd(pmdpd,pmdps) \ |
diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h index 4f9503908dca..03243f7eeddf 100644 --- a/arch/arm/include/asm/pgtable-3level.h +++ b/arch/arm/include/asm/pgtable-3level.h | |||
@@ -142,6 +142,7 @@ | |||
142 | PMD_TYPE_TABLE) | 142 | PMD_TYPE_TABLE) |
143 | #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ | 143 | #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ |
144 | PMD_TYPE_SECT) | 144 | PMD_TYPE_SECT) |
145 | #define pmd_large(pmd) pmd_sect(pmd) | ||
145 | 146 | ||
146 | #define pud_clear(pudp) \ | 147 | #define pud_clear(pudp) \ |
147 | do { \ | 148 | do { \ |
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index be956dbf6bae..7d59b524f2af 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -61,7 +61,7 @@ extern void __pgd_error(const char *file, int line, pgd_t); | |||
61 | * mapping to be mapped at. This is particularly important for | 61 | * mapping to be mapped at. This is particularly important for |
62 | * non-high vector CPUs. | 62 | * non-high vector CPUs. |
63 | */ | 63 | */ |
64 | #define FIRST_USER_ADDRESS PAGE_SIZE | 64 | #define FIRST_USER_ADDRESS (PAGE_SIZE * 2) |
65 | 65 | ||
66 | /* | 66 | /* |
67 | * Use TASK_SIZE as the ceiling argument for free_pgtables() and | 67 | * Use TASK_SIZE as the ceiling argument for free_pgtables() and |
@@ -254,6 +254,8 @@ PTE_BIT_FUNC(mkclean, &= ~L_PTE_DIRTY); | |||
254 | PTE_BIT_FUNC(mkdirty, |= L_PTE_DIRTY); | 254 | PTE_BIT_FUNC(mkdirty, |= L_PTE_DIRTY); |
255 | PTE_BIT_FUNC(mkold, &= ~L_PTE_YOUNG); | 255 | PTE_BIT_FUNC(mkold, &= ~L_PTE_YOUNG); |
256 | PTE_BIT_FUNC(mkyoung, |= L_PTE_YOUNG); | 256 | PTE_BIT_FUNC(mkyoung, |= L_PTE_YOUNG); |
257 | PTE_BIT_FUNC(mkexec, &= ~L_PTE_XN); | ||
258 | PTE_BIT_FUNC(mknexec, |= L_PTE_XN); | ||
257 | 259 | ||
258 | static inline pte_t pte_mkspecial(pte_t pte) { return pte; } | 260 | static inline pte_t pte_mkspecial(pte_t pte) { return pte; } |
259 | 261 | ||
diff --git a/arch/arm/include/asm/word-at-a-time.h b/arch/arm/include/asm/word-at-a-time.h index 4d52f92967a6..a6d0a29861e7 100644 --- a/arch/arm/include/asm/word-at-a-time.h +++ b/arch/arm/include/asm/word-at-a-time.h | |||
@@ -48,10 +48,14 @@ static inline unsigned long find_zero(unsigned long mask) | |||
48 | return ret; | 48 | return ret; |
49 | } | 49 | } |
50 | 50 | ||
51 | #ifdef CONFIG_DCACHE_WORD_ACCESS | ||
52 | |||
53 | #define zero_bytemask(mask) (mask) | 51 | #define zero_bytemask(mask) (mask) |
54 | 52 | ||
53 | #else /* __ARMEB__ */ | ||
54 | #include <asm-generic/word-at-a-time.h> | ||
55 | #endif | ||
56 | |||
57 | #ifdef CONFIG_DCACHE_WORD_ACCESS | ||
58 | |||
55 | /* | 59 | /* |
56 | * Load an unaligned word from kernel space. | 60 | * Load an unaligned word from kernel space. |
57 | * | 61 | * |
@@ -73,7 +77,11 @@ static inline unsigned long load_unaligned_zeropad(const void *addr) | |||
73 | " bic %2, %2, #0x3\n" | 77 | " bic %2, %2, #0x3\n" |
74 | " ldr %0, [%2]\n" | 78 | " ldr %0, [%2]\n" |
75 | " lsl %1, %1, #0x3\n" | 79 | " lsl %1, %1, #0x3\n" |
80 | #ifndef __ARMEB__ | ||
76 | " lsr %0, %0, %1\n" | 81 | " lsr %0, %0, %1\n" |
82 | #else | ||
83 | " lsl %0, %0, %1\n" | ||
84 | #endif | ||
77 | " b 2b\n" | 85 | " b 2b\n" |
78 | " .popsection\n" | 86 | " .popsection\n" |
79 | " .pushsection __ex_table,\"a\"\n" | 87 | " .pushsection __ex_table,\"a\"\n" |
@@ -86,11 +94,5 @@ static inline unsigned long load_unaligned_zeropad(const void *addr) | |||
86 | return ret; | 94 | return ret; |
87 | } | 95 | } |
88 | 96 | ||
89 | |||
90 | #endif /* DCACHE_WORD_ACCESS */ | 97 | #endif /* DCACHE_WORD_ACCESS */ |
91 | |||
92 | #else /* __ARMEB__ */ | ||
93 | #include <asm-generic/word-at-a-time.h> | ||
94 | #endif | ||
95 | |||
96 | #endif /* __ASM_ARM_WORD_AT_A_TIME_H */ | 98 | #endif /* __ASM_ARM_WORD_AT_A_TIME_H */ |
diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h index 75579a9d6f76..3759cacdd7f8 100644 --- a/arch/arm/include/asm/xen/page.h +++ b/arch/arm/include/asm/xen/page.h | |||
@@ -117,6 +117,6 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn) | |||
117 | return __set_phys_to_machine(pfn, mfn); | 117 | return __set_phys_to_machine(pfn, mfn); |
118 | } | 118 | } |
119 | 119 | ||
120 | #define xen_remap(cookie, size) ioremap_cached((cookie), (size)); | 120 | #define xen_remap(cookie, size) ioremap_cache((cookie), (size)); |
121 | 121 | ||
122 | #endif /* _ASM_ARM_XEN_PAGE_H */ | 122 | #endif /* _ASM_ARM_XEN_PAGE_H */ |
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index 1f031ddd0667..85e664b6a5f1 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c | |||
@@ -35,6 +35,8 @@ extern void __ucmpdi2(void); | |||
35 | extern void __udivsi3(void); | 35 | extern void __udivsi3(void); |
36 | extern void __umodsi3(void); | 36 | extern void __umodsi3(void); |
37 | extern void __do_div64(void); | 37 | extern void __do_div64(void); |
38 | extern void __bswapsi2(void); | ||
39 | extern void __bswapdi2(void); | ||
38 | 40 | ||
39 | extern void __aeabi_idiv(void); | 41 | extern void __aeabi_idiv(void); |
40 | extern void __aeabi_idivmod(void); | 42 | extern void __aeabi_idivmod(void); |
@@ -114,6 +116,8 @@ EXPORT_SYMBOL(__ucmpdi2); | |||
114 | EXPORT_SYMBOL(__udivsi3); | 116 | EXPORT_SYMBOL(__udivsi3); |
115 | EXPORT_SYMBOL(__umodsi3); | 117 | EXPORT_SYMBOL(__umodsi3); |
116 | EXPORT_SYMBOL(__do_div64); | 118 | EXPORT_SYMBOL(__do_div64); |
119 | EXPORT_SYMBOL(__bswapsi2); | ||
120 | EXPORT_SYMBOL(__bswapdi2); | ||
117 | 121 | ||
118 | #ifdef CONFIG_AEABI | 122 | #ifdef CONFIG_AEABI |
119 | EXPORT_SYMBOL(__aeabi_idiv); | 123 | EXPORT_SYMBOL(__aeabi_idiv); |
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c index 739c3dfc1da2..34d5fd585bbb 100644 --- a/arch/arm/kernel/devtree.c +++ b/arch/arm/kernel/devtree.c | |||
@@ -171,7 +171,7 @@ void __init arm_dt_init_cpu_maps(void) | |||
171 | 171 | ||
172 | bool arch_match_cpu_phys_id(int cpu, u64 phys_id) | 172 | bool arch_match_cpu_phys_id(int cpu, u64 phys_id) |
173 | { | 173 | { |
174 | return (phys_id & MPIDR_HWID_BITMASK) == cpu_logical_map(cpu); | 174 | return phys_id == cpu_logical_map(cpu); |
175 | } | 175 | } |
176 | 176 | ||
177 | static const void * __init arch_get_next_mach(const char *const **match) | 177 | static const void * __init arch_get_next_mach(const char *const **match) |
diff --git a/arch/arm/kernel/entry-v7m.S b/arch/arm/kernel/entry-v7m.S index 52b26432c9a9..2260f1855820 100644 --- a/arch/arm/kernel/entry-v7m.S +++ b/arch/arm/kernel/entry-v7m.S | |||
@@ -14,8 +14,6 @@ | |||
14 | #include <asm/thread_notify.h> | 14 | #include <asm/thread_notify.h> |
15 | #include <asm/v7m.h> | 15 | #include <asm/v7m.h> |
16 | 16 | ||
17 | #include <mach/entry-macro.S> | ||
18 | |||
19 | #include "entry-header.S" | 17 | #include "entry-header.S" |
20 | 18 | ||
21 | #ifdef CONFIG_TRACE_IRQFLAGS | 19 | #ifdef CONFIG_TRACE_IRQFLAGS |
diff --git a/arch/arm/kernel/etm.c b/arch/arm/kernel/etm.c index 8ff0ecdc637f..131a6ab5f355 100644 --- a/arch/arm/kernel/etm.c +++ b/arch/arm/kernel/etm.c | |||
@@ -385,7 +385,6 @@ out: | |||
385 | return ret; | 385 | return ret; |
386 | 386 | ||
387 | out_unmap: | 387 | out_unmap: |
388 | amba_set_drvdata(dev, NULL); | ||
389 | iounmap(t->etb_regs); | 388 | iounmap(t->etb_regs); |
390 | 389 | ||
391 | out_release: | 390 | out_release: |
@@ -398,8 +397,6 @@ static int etb_remove(struct amba_device *dev) | |||
398 | { | 397 | { |
399 | struct tracectx *t = amba_get_drvdata(dev); | 398 | struct tracectx *t = amba_get_drvdata(dev); |
400 | 399 | ||
401 | amba_set_drvdata(dev, NULL); | ||
402 | |||
403 | iounmap(t->etb_regs); | 400 | iounmap(t->etb_regs); |
404 | t->etb_regs = NULL; | 401 | t->etb_regs = NULL; |
405 | 402 | ||
@@ -588,7 +585,6 @@ out: | |||
588 | return ret; | 585 | return ret; |
589 | 586 | ||
590 | out_unmap: | 587 | out_unmap: |
591 | amba_set_drvdata(dev, NULL); | ||
592 | iounmap(t->etm_regs); | 588 | iounmap(t->etm_regs); |
593 | 589 | ||
594 | out_release: | 590 | out_release: |
@@ -601,8 +597,6 @@ static int etm_remove(struct amba_device *dev) | |||
601 | { | 597 | { |
602 | struct tracectx *t = amba_get_drvdata(dev); | 598 | struct tracectx *t = amba_get_drvdata(dev); |
603 | 599 | ||
604 | amba_set_drvdata(dev, NULL); | ||
605 | |||
606 | iounmap(t->etm_regs); | 600 | iounmap(t->etm_regs); |
607 | t->etm_regs = NULL; | 601 | t->etm_regs = NULL; |
608 | 602 | ||
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S index 14235ba64a90..716249cc2ee1 100644 --- a/arch/arm/kernel/head-nommu.S +++ b/arch/arm/kernel/head-nommu.S | |||
@@ -68,7 +68,7 @@ ENTRY(stext) | |||
68 | 68 | ||
69 | #ifdef CONFIG_ARM_MPU | 69 | #ifdef CONFIG_ARM_MPU |
70 | /* Calculate the size of a region covering just the kernel */ | 70 | /* Calculate the size of a region covering just the kernel */ |
71 | ldr r5, =PHYS_OFFSET @ Region start: PHYS_OFFSET | 71 | ldr r5, =PLAT_PHYS_OFFSET @ Region start: PHYS_OFFSET |
72 | ldr r6, =(_end) @ Cover whole kernel | 72 | ldr r6, =(_end) @ Cover whole kernel |
73 | sub r6, r6, r5 @ Minimum size of region to map | 73 | sub r6, r6, r5 @ Minimum size of region to map |
74 | clz r6, r6 @ Region size must be 2^N... | 74 | clz r6, r6 @ Region size must be 2^N... |
@@ -213,7 +213,7 @@ ENTRY(__setup_mpu) | |||
213 | set_region_nr r0, #MPU_RAM_REGION | 213 | set_region_nr r0, #MPU_RAM_REGION |
214 | isb | 214 | isb |
215 | /* Full access from PL0, PL1, shared for CONFIG_SMP, cacheable */ | 215 | /* Full access from PL0, PL1, shared for CONFIG_SMP, cacheable */ |
216 | ldr r0, =PHYS_OFFSET @ RAM starts at PHYS_OFFSET | 216 | ldr r0, =PLAT_PHYS_OFFSET @ RAM starts at PHYS_OFFSET |
217 | ldr r5,=(MPU_AP_PL1RW_PL0RW | MPU_RGN_NORMAL) | 217 | ldr r5,=(MPU_AP_PL1RW_PL0RW | MPU_RGN_NORMAL) |
218 | 218 | ||
219 | setup_region r0, r5, r6, MPU_DATA_SIDE @ PHYS_OFFSET, shared, enabled | 219 | setup_region r0, r5, r6, MPU_DATA_SIDE @ PHYS_OFFSET, shared, enabled |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 11d59b32fb8d..32f317e5828a 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -110,7 +110,7 @@ ENTRY(stext) | |||
110 | sub r4, r3, r4 @ (PHYS_OFFSET - PAGE_OFFSET) | 110 | sub r4, r3, r4 @ (PHYS_OFFSET - PAGE_OFFSET) |
111 | add r8, r8, r4 @ PHYS_OFFSET | 111 | add r8, r8, r4 @ PHYS_OFFSET |
112 | #else | 112 | #else |
113 | ldr r8, =PHYS_OFFSET @ always constant in this case | 113 | ldr r8, =PLAT_PHYS_OFFSET @ always constant in this case |
114 | #endif | 114 | #endif |
115 | 115 | ||
116 | /* | 116 | /* |
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index 57221e349a7c..f0d180d8b29f 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
@@ -14,11 +14,12 @@ | |||
14 | #include <asm/pgalloc.h> | 14 | #include <asm/pgalloc.h> |
15 | #include <asm/mmu_context.h> | 15 | #include <asm/mmu_context.h> |
16 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
17 | #include <asm/fncpy.h> | ||
17 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
18 | #include <asm/smp_plat.h> | 19 | #include <asm/smp_plat.h> |
19 | #include <asm/system_misc.h> | 20 | #include <asm/system_misc.h> |
20 | 21 | ||
21 | extern const unsigned char relocate_new_kernel[]; | 22 | extern void relocate_new_kernel(void); |
22 | extern const unsigned int relocate_new_kernel_size; | 23 | extern const unsigned int relocate_new_kernel_size; |
23 | 24 | ||
24 | extern unsigned long kexec_start_address; | 25 | extern unsigned long kexec_start_address; |
@@ -142,6 +143,8 @@ void machine_kexec(struct kimage *image) | |||
142 | { | 143 | { |
143 | unsigned long page_list; | 144 | unsigned long page_list; |
144 | unsigned long reboot_code_buffer_phys; | 145 | unsigned long reboot_code_buffer_phys; |
146 | unsigned long reboot_entry = (unsigned long)relocate_new_kernel; | ||
147 | unsigned long reboot_entry_phys; | ||
145 | void *reboot_code_buffer; | 148 | void *reboot_code_buffer; |
146 | 149 | ||
147 | /* | 150 | /* |
@@ -168,16 +171,16 @@ void machine_kexec(struct kimage *image) | |||
168 | 171 | ||
169 | 172 | ||
170 | /* copy our kernel relocation code to the control code page */ | 173 | /* copy our kernel relocation code to the control code page */ |
171 | memcpy(reboot_code_buffer, | 174 | reboot_entry = fncpy(reboot_code_buffer, |
172 | relocate_new_kernel, relocate_new_kernel_size); | 175 | reboot_entry, |
176 | relocate_new_kernel_size); | ||
177 | reboot_entry_phys = (unsigned long)reboot_entry + | ||
178 | (reboot_code_buffer_phys - (unsigned long)reboot_code_buffer); | ||
173 | 179 | ||
174 | |||
175 | flush_icache_range((unsigned long) reboot_code_buffer, | ||
176 | (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE); | ||
177 | printk(KERN_INFO "Bye!\n"); | 180 | printk(KERN_INFO "Bye!\n"); |
178 | 181 | ||
179 | if (kexec_reinit) | 182 | if (kexec_reinit) |
180 | kexec_reinit(); | 183 | kexec_reinit(); |
181 | 184 | ||
182 | soft_restart(reboot_code_buffer_phys); | 185 | soft_restart(reboot_entry_phys); |
183 | } | 186 | } |
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c index d85055cd24ba..20d553c9f5e2 100644 --- a/arch/arm/kernel/perf_event_cpu.c +++ b/arch/arm/kernel/perf_event_cpu.c | |||
@@ -254,7 +254,7 @@ static int probe_current_pmu(struct arm_pmu *pmu) | |||
254 | static int cpu_pmu_device_probe(struct platform_device *pdev) | 254 | static int cpu_pmu_device_probe(struct platform_device *pdev) |
255 | { | 255 | { |
256 | const struct of_device_id *of_id; | 256 | const struct of_device_id *of_id; |
257 | int (*init_fn)(struct arm_pmu *); | 257 | const int (*init_fn)(struct arm_pmu *); |
258 | struct device_node *node = pdev->dev.of_node; | 258 | struct device_node *node = pdev->dev.of_node; |
259 | struct arm_pmu *pmu; | 259 | struct arm_pmu *pmu; |
260 | int ret = -ENODEV; | 260 | int ret = -ENODEV; |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 94f6b05f9e24..92f7b15dd221 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -404,6 +404,7 @@ EXPORT_SYMBOL(dump_fpu); | |||
404 | unsigned long get_wchan(struct task_struct *p) | 404 | unsigned long get_wchan(struct task_struct *p) |
405 | { | 405 | { |
406 | struct stackframe frame; | 406 | struct stackframe frame; |
407 | unsigned long stack_page; | ||
407 | int count = 0; | 408 | int count = 0; |
408 | if (!p || p == current || p->state == TASK_RUNNING) | 409 | if (!p || p == current || p->state == TASK_RUNNING) |
409 | return 0; | 410 | return 0; |
@@ -412,9 +413,11 @@ unsigned long get_wchan(struct task_struct *p) | |||
412 | frame.sp = thread_saved_sp(p); | 413 | frame.sp = thread_saved_sp(p); |
413 | frame.lr = 0; /* recovered from the stack */ | 414 | frame.lr = 0; /* recovered from the stack */ |
414 | frame.pc = thread_saved_pc(p); | 415 | frame.pc = thread_saved_pc(p); |
416 | stack_page = (unsigned long)task_stack_page(p); | ||
415 | do { | 417 | do { |
416 | int ret = unwind_frame(&frame); | 418 | if (frame.sp < stack_page || |
417 | if (ret < 0) | 419 | frame.sp >= stack_page + THREAD_SIZE || |
420 | unwind_frame(&frame) < 0) | ||
418 | return 0; | 421 | return 0; |
419 | if (!in_sched_functions(frame.pc)) | 422 | if (!in_sched_functions(frame.pc)) |
420 | return frame.pc; | 423 | return frame.pc; |
diff --git a/arch/arm/kernel/relocate_kernel.S b/arch/arm/kernel/relocate_kernel.S index d0cdedf4864d..95858966d84e 100644 --- a/arch/arm/kernel/relocate_kernel.S +++ b/arch/arm/kernel/relocate_kernel.S | |||
@@ -2,10 +2,12 @@ | |||
2 | * relocate_kernel.S - put the kernel image in place to boot | 2 | * relocate_kernel.S - put the kernel image in place to boot |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/linkage.h> | ||
5 | #include <asm/kexec.h> | 6 | #include <asm/kexec.h> |
6 | 7 | ||
7 | .globl relocate_new_kernel | 8 | .align 3 /* not needed for this code, but keeps fncpy() happy */ |
8 | relocate_new_kernel: | 9 | |
10 | ENTRY(relocate_new_kernel) | ||
9 | 11 | ||
10 | ldr r0,kexec_indirection_page | 12 | ldr r0,kexec_indirection_page |
11 | ldr r1,kexec_start_address | 13 | ldr r1,kexec_start_address |
@@ -79,6 +81,8 @@ kexec_mach_type: | |||
79 | kexec_boot_atags: | 81 | kexec_boot_atags: |
80 | .long 0x0 | 82 | .long 0x0 |
81 | 83 | ||
84 | ENDPROC(relocate_new_kernel) | ||
85 | |||
82 | relocate_new_kernel_end: | 86 | relocate_new_kernel_end: |
83 | 87 | ||
84 | .globl relocate_new_kernel_size | 88 | .globl relocate_new_kernel_size |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 6a1b8a81b1ae..061cea820e3f 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -334,7 +334,7 @@ static void __init cacheid_init(void) | |||
334 | cacheid = CACHEID_VIVT; | 334 | cacheid = CACHEID_VIVT; |
335 | } | 335 | } |
336 | 336 | ||
337 | printk("CPU: %s data cache, %s instruction cache\n", | 337 | pr_info("CPU: %s data cache, %s instruction cache\n", |
338 | cache_is_vivt() ? "VIVT" : | 338 | cache_is_vivt() ? "VIVT" : |
339 | cache_is_vipt_aliasing() ? "VIPT aliasing" : | 339 | cache_is_vipt_aliasing() ? "VIPT aliasing" : |
340 | cache_is_vipt_nonaliasing() ? "PIPT / VIPT nonaliasing" : "unknown", | 340 | cache_is_vipt_nonaliasing() ? "PIPT / VIPT nonaliasing" : "unknown", |
@@ -416,7 +416,7 @@ void notrace cpu_init(void) | |||
416 | struct stack *stk = &stacks[cpu]; | 416 | struct stack *stk = &stacks[cpu]; |
417 | 417 | ||
418 | if (cpu >= NR_CPUS) { | 418 | if (cpu >= NR_CPUS) { |
419 | printk(KERN_CRIT "CPU%u: bad primary CPU number\n", cpu); | 419 | pr_crit("CPU%u: bad primary CPU number\n", cpu); |
420 | BUG(); | 420 | BUG(); |
421 | } | 421 | } |
422 | 422 | ||
@@ -484,7 +484,7 @@ void __init smp_setup_processor_id(void) | |||
484 | */ | 484 | */ |
485 | set_my_cpu_offset(0); | 485 | set_my_cpu_offset(0); |
486 | 486 | ||
487 | printk(KERN_INFO "Booting Linux on physical CPU 0x%x\n", mpidr); | 487 | pr_info("Booting Linux on physical CPU 0x%x\n", mpidr); |
488 | } | 488 | } |
489 | 489 | ||
490 | struct mpidr_hash mpidr_hash; | 490 | struct mpidr_hash mpidr_hash; |
@@ -564,8 +564,8 @@ static void __init setup_processor(void) | |||
564 | */ | 564 | */ |
565 | list = lookup_processor_type(read_cpuid_id()); | 565 | list = lookup_processor_type(read_cpuid_id()); |
566 | if (!list) { | 566 | if (!list) { |
567 | printk("CPU configuration botched (ID %08x), unable " | 567 | pr_err("CPU configuration botched (ID %08x), unable to continue.\n", |
568 | "to continue.\n", read_cpuid_id()); | 568 | read_cpuid_id()); |
569 | while (1); | 569 | while (1); |
570 | } | 570 | } |
571 | 571 | ||
@@ -585,9 +585,9 @@ static void __init setup_processor(void) | |||
585 | cpu_cache = *list->cache; | 585 | cpu_cache = *list->cache; |
586 | #endif | 586 | #endif |
587 | 587 | ||
588 | printk("CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n", | 588 | pr_info("CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n", |
589 | cpu_name, read_cpuid_id(), read_cpuid_id() & 15, | 589 | cpu_name, read_cpuid_id(), read_cpuid_id() & 15, |
590 | proc_arch[cpu_architecture()], cr_alignment); | 590 | proc_arch[cpu_architecture()], cr_alignment); |
591 | 591 | ||
592 | snprintf(init_utsname()->machine, __NEW_UTS_LEN + 1, "%s%c", | 592 | snprintf(init_utsname()->machine, __NEW_UTS_LEN + 1, "%s%c", |
593 | list->arch_name, ENDIANNESS); | 593 | list->arch_name, ENDIANNESS); |
@@ -629,8 +629,8 @@ int __init arm_add_memory(u64 start, u64 size) | |||
629 | u64 aligned_start; | 629 | u64 aligned_start; |
630 | 630 | ||
631 | if (meminfo.nr_banks >= NR_BANKS) { | 631 | if (meminfo.nr_banks >= NR_BANKS) { |
632 | printk(KERN_CRIT "NR_BANKS too low, " | 632 | pr_crit("NR_BANKS too low, ignoring memory at 0x%08llx\n", |
633 | "ignoring memory at 0x%08llx\n", (long long)start); | 633 | (long long)start); |
634 | return -EINVAL; | 634 | return -EINVAL; |
635 | } | 635 | } |
636 | 636 | ||
@@ -643,14 +643,14 @@ int __init arm_add_memory(u64 start, u64 size) | |||
643 | 643 | ||
644 | #ifndef CONFIG_ARCH_PHYS_ADDR_T_64BIT | 644 | #ifndef CONFIG_ARCH_PHYS_ADDR_T_64BIT |
645 | if (aligned_start > ULONG_MAX) { | 645 | if (aligned_start > ULONG_MAX) { |
646 | printk(KERN_CRIT "Ignoring memory at 0x%08llx outside " | 646 | pr_crit("Ignoring memory at 0x%08llx outside 32-bit physical address space\n", |
647 | "32-bit physical address space\n", (long long)start); | 647 | (long long)start); |
648 | return -EINVAL; | 648 | return -EINVAL; |
649 | } | 649 | } |
650 | 650 | ||
651 | if (aligned_start + size > ULONG_MAX) { | 651 | if (aligned_start + size > ULONG_MAX) { |
652 | printk(KERN_CRIT "Truncating memory at 0x%08llx to fit in " | 652 | pr_crit("Truncating memory at 0x%08llx to fit in 32-bit physical address space\n", |
653 | "32-bit physical address space\n", (long long)start); | 653 | (long long)start); |
654 | /* | 654 | /* |
655 | * To ensure bank->start + bank->size is representable in | 655 | * To ensure bank->start + bank->size is representable in |
656 | * 32 bits, we use ULONG_MAX as the upper limit rather than 4GB. | 656 | * 32 bits, we use ULONG_MAX as the upper limit rather than 4GB. |
@@ -660,6 +660,20 @@ int __init arm_add_memory(u64 start, u64 size) | |||
660 | } | 660 | } |
661 | #endif | 661 | #endif |
662 | 662 | ||
663 | if (aligned_start < PHYS_OFFSET) { | ||
664 | if (aligned_start + size <= PHYS_OFFSET) { | ||
665 | pr_info("Ignoring memory below PHYS_OFFSET: 0x%08llx-0x%08llx\n", | ||
666 | aligned_start, aligned_start + size); | ||
667 | return -EINVAL; | ||
668 | } | ||
669 | |||
670 | pr_info("Ignoring memory below PHYS_OFFSET: 0x%08llx-0x%08llx\n", | ||
671 | aligned_start, (u64)PHYS_OFFSET); | ||
672 | |||
673 | size -= PHYS_OFFSET - aligned_start; | ||
674 | aligned_start = PHYS_OFFSET; | ||
675 | } | ||
676 | |||
663 | bank->start = aligned_start; | 677 | bank->start = aligned_start; |
664 | bank->size = size & ~(phys_addr_t)(PAGE_SIZE - 1); | 678 | bank->size = size & ~(phys_addr_t)(PAGE_SIZE - 1); |
665 | 679 | ||
@@ -819,16 +833,15 @@ static void __init reserve_crashkernel(void) | |||
819 | 833 | ||
820 | ret = reserve_bootmem(crash_base, crash_size, BOOTMEM_EXCLUSIVE); | 834 | ret = reserve_bootmem(crash_base, crash_size, BOOTMEM_EXCLUSIVE); |
821 | if (ret < 0) { | 835 | if (ret < 0) { |
822 | printk(KERN_WARNING "crashkernel reservation failed - " | 836 | pr_warn("crashkernel reservation failed - memory is in use (0x%lx)\n", |
823 | "memory is in use (0x%lx)\n", (unsigned long)crash_base); | 837 | (unsigned long)crash_base); |
824 | return; | 838 | return; |
825 | } | 839 | } |
826 | 840 | ||
827 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " | 841 | pr_info("Reserving %ldMB of memory at %ldMB for crashkernel (System RAM: %ldMB)\n", |
828 | "for crashkernel (System RAM: %ldMB)\n", | 842 | (unsigned long)(crash_size >> 20), |
829 | (unsigned long)(crash_size >> 20), | 843 | (unsigned long)(crash_base >> 20), |
830 | (unsigned long)(crash_base >> 20), | 844 | (unsigned long)(total_mem >> 20)); |
831 | (unsigned long)(total_mem >> 20)); | ||
832 | 845 | ||
833 | crashk_res.start = crash_base; | 846 | crashk_res.start = crash_base; |
834 | crashk_res.end = crash_base + crash_size - 1; | 847 | crashk_res.end = crash_base + crash_size - 1; |
@@ -873,8 +886,6 @@ void __init setup_arch(char **cmdline_p) | |||
873 | machine_desc = mdesc; | 886 | machine_desc = mdesc; |
874 | machine_name = mdesc->name; | 887 | machine_name = mdesc->name; |
875 | 888 | ||
876 | setup_dma_zone(mdesc); | ||
877 | |||
878 | if (mdesc->reboot_mode != REBOOT_HARD) | 889 | if (mdesc->reboot_mode != REBOOT_HARD) |
879 | reboot_mode = mdesc->reboot_mode; | 890 | reboot_mode = mdesc->reboot_mode; |
880 | 891 | ||
@@ -892,6 +903,7 @@ void __init setup_arch(char **cmdline_p) | |||
892 | sort(&meminfo.bank, meminfo.nr_banks, sizeof(meminfo.bank[0]), meminfo_cmp, NULL); | 903 | sort(&meminfo.bank, meminfo.nr_banks, sizeof(meminfo.bank[0]), meminfo_cmp, NULL); |
893 | 904 | ||
894 | early_paging_init(mdesc, lookup_processor_type(read_cpuid_id())); | 905 | early_paging_init(mdesc, lookup_processor_type(read_cpuid_id())); |
906 | setup_dma_zone(mdesc); | ||
895 | sanity_check_meminfo(); | 907 | sanity_check_meminfo(); |
896 | arm_memblock_init(&meminfo, mdesc); | 908 | arm_memblock_init(&meminfo, mdesc); |
897 | 909 | ||
diff --git a/arch/arm/kernel/sigreturn_codes.S b/arch/arm/kernel/sigreturn_codes.S index 3c5d0f2170fd..b84d0cb13682 100644 --- a/arch/arm/kernel/sigreturn_codes.S +++ b/arch/arm/kernel/sigreturn_codes.S | |||
@@ -30,6 +30,27 @@ | |||
30 | * snippets. | 30 | * snippets. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | /* | ||
34 | * In CPU_THUMBONLY case kernel arm opcodes are not allowed. | ||
35 | * Note in this case codes skips those instructions but it uses .org | ||
36 | * directive to keep correct layout of sigreturn_codes array. | ||
37 | */ | ||
38 | #ifndef CONFIG_CPU_THUMBONLY | ||
39 | #define ARM_OK(code...) code | ||
40 | #else | ||
41 | #define ARM_OK(code...) | ||
42 | #endif | ||
43 | |||
44 | .macro arm_slot n | ||
45 | .org sigreturn_codes + 12 * (\n) | ||
46 | ARM_OK( .arm ) | ||
47 | .endm | ||
48 | |||
49 | .macro thumb_slot n | ||
50 | .org sigreturn_codes + 12 * (\n) + 8 | ||
51 | .thumb | ||
52 | .endm | ||
53 | |||
33 | #if __LINUX_ARM_ARCH__ <= 4 | 54 | #if __LINUX_ARM_ARCH__ <= 4 |
34 | /* | 55 | /* |
35 | * Note we manually set minimally required arch that supports | 56 | * Note we manually set minimally required arch that supports |
@@ -45,26 +66,27 @@ | |||
45 | .global sigreturn_codes | 66 | .global sigreturn_codes |
46 | .type sigreturn_codes, #object | 67 | .type sigreturn_codes, #object |
47 | 68 | ||
48 | .arm | 69 | .align |
49 | 70 | ||
50 | sigreturn_codes: | 71 | sigreturn_codes: |
51 | 72 | ||
52 | /* ARM sigreturn syscall code snippet */ | 73 | /* ARM sigreturn syscall code snippet */ |
53 | mov r7, #(__NR_sigreturn - __NR_SYSCALL_BASE) | 74 | arm_slot 0 |
54 | swi #(__NR_sigreturn)|(__NR_OABI_SYSCALL_BASE) | 75 | ARM_OK( mov r7, #(__NR_sigreturn - __NR_SYSCALL_BASE) ) |
76 | ARM_OK( swi #(__NR_sigreturn)|(__NR_OABI_SYSCALL_BASE) ) | ||
55 | 77 | ||
56 | /* Thumb sigreturn syscall code snippet */ | 78 | /* Thumb sigreturn syscall code snippet */ |
57 | .thumb | 79 | thumb_slot 0 |
58 | movs r7, #(__NR_sigreturn - __NR_SYSCALL_BASE) | 80 | movs r7, #(__NR_sigreturn - __NR_SYSCALL_BASE) |
59 | swi #0 | 81 | swi #0 |
60 | 82 | ||
61 | /* ARM sigreturn_rt syscall code snippet */ | 83 | /* ARM sigreturn_rt syscall code snippet */ |
62 | .arm | 84 | arm_slot 1 |
63 | mov r7, #(__NR_rt_sigreturn - __NR_SYSCALL_BASE) | 85 | ARM_OK( mov r7, #(__NR_rt_sigreturn - __NR_SYSCALL_BASE) ) |
64 | swi #(__NR_rt_sigreturn)|(__NR_OABI_SYSCALL_BASE) | 86 | ARM_OK( swi #(__NR_rt_sigreturn)|(__NR_OABI_SYSCALL_BASE) ) |
65 | 87 | ||
66 | /* Thumb sigreturn_rt syscall code snippet */ | 88 | /* Thumb sigreturn_rt syscall code snippet */ |
67 | .thumb | 89 | thumb_slot 1 |
68 | movs r7, #(__NR_rt_sigreturn - __NR_SYSCALL_BASE) | 90 | movs r7, #(__NR_rt_sigreturn - __NR_SYSCALL_BASE) |
69 | swi #0 | 91 | swi #0 |
70 | 92 | ||
@@ -74,7 +96,7 @@ sigreturn_codes: | |||
74 | * it is thumb case or not, so we need additional | 96 | * it is thumb case or not, so we need additional |
75 | * word after real last entry. | 97 | * word after real last entry. |
76 | */ | 98 | */ |
77 | .arm | 99 | arm_slot 2 |
78 | .space 4 | 100 | .space 4 |
79 | 101 | ||
80 | .size sigreturn_codes, . - sigreturn_codes | 102 | .size sigreturn_codes, . - sigreturn_codes |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index dc894ab3622b..b7b4c86e338b 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -105,8 +105,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle) | |||
105 | secondary_data.pgdir = get_arch_pgd(idmap_pgd); | 105 | secondary_data.pgdir = get_arch_pgd(idmap_pgd); |
106 | secondary_data.swapper_pg_dir = get_arch_pgd(swapper_pg_dir); | 106 | secondary_data.swapper_pg_dir = get_arch_pgd(swapper_pg_dir); |
107 | #endif | 107 | #endif |
108 | __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data)); | 108 | sync_cache_w(&secondary_data); |
109 | outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1)); | ||
110 | 109 | ||
111 | /* | 110 | /* |
112 | * Now bring the CPU into our world. | 111 | * Now bring the CPU into our world. |
@@ -294,6 +293,9 @@ void __ref cpu_die(void) | |||
294 | if (smp_ops.cpu_die) | 293 | if (smp_ops.cpu_die) |
295 | smp_ops.cpu_die(cpu); | 294 | smp_ops.cpu_die(cpu); |
296 | 295 | ||
296 | pr_warn("CPU%u: smp_ops.cpu_die() returned, trying to resuscitate\n", | ||
297 | cpu); | ||
298 | |||
297 | /* | 299 | /* |
298 | * Do not return to the idle loop - jump back to the secondary | 300 | * Do not return to the idle loop - jump back to the secondary |
299 | * cpu initialisation. There's some initialisation which needs | 301 | * cpu initialisation. There's some initialisation which needs |
diff --git a/arch/arm/kernel/stacktrace.c b/arch/arm/kernel/stacktrace.c index 00f79e59985b..af4e8c8a5422 100644 --- a/arch/arm/kernel/stacktrace.c +++ b/arch/arm/kernel/stacktrace.c | |||
@@ -31,7 +31,7 @@ int notrace unwind_frame(struct stackframe *frame) | |||
31 | high = ALIGN(low, THREAD_SIZE); | 31 | high = ALIGN(low, THREAD_SIZE); |
32 | 32 | ||
33 | /* check current frame pointer is within bounds */ | 33 | /* check current frame pointer is within bounds */ |
34 | if (fp < (low + 12) || fp + 4 >= high) | 34 | if (fp < low + 12 || fp > high - 4) |
35 | return -EINVAL; | 35 | return -EINVAL; |
36 | 36 | ||
37 | /* restore the registers from the stack frame */ | 37 | /* restore the registers from the stack frame */ |
diff --git a/arch/arm/kernel/tcm.c b/arch/arm/kernel/tcm.c index f50f19e5c138..7a3be1d4d0b1 100644 --- a/arch/arm/kernel/tcm.c +++ b/arch/arm/kernel/tcm.c | |||
@@ -52,7 +52,7 @@ static struct map_desc dtcm_iomap[] __initdata = { | |||
52 | .virtual = DTCM_OFFSET, | 52 | .virtual = DTCM_OFFSET, |
53 | .pfn = __phys_to_pfn(DTCM_OFFSET), | 53 | .pfn = __phys_to_pfn(DTCM_OFFSET), |
54 | .length = 0, | 54 | .length = 0, |
55 | .type = MT_MEMORY_DTCM | 55 | .type = MT_MEMORY_RW_DTCM |
56 | } | 56 | } |
57 | }; | 57 | }; |
58 | 58 | ||
@@ -61,7 +61,7 @@ static struct map_desc itcm_iomap[] __initdata = { | |||
61 | .virtual = ITCM_OFFSET, | 61 | .virtual = ITCM_OFFSET, |
62 | .pfn = __phys_to_pfn(ITCM_OFFSET), | 62 | .pfn = __phys_to_pfn(ITCM_OFFSET), |
63 | .length = 0, | 63 | .length = 0, |
64 | .type = MT_MEMORY_ITCM | 64 | .type = MT_MEMORY_RWX_ITCM, |
65 | } | 65 | } |
66 | }; | 66 | }; |
67 | 67 | ||
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index 85a87370f144..0bc94b1fd1ae 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c | |||
@@ -68,16 +68,16 @@ struct cpu_efficiency { | |||
68 | * Processors that are not defined in the table, | 68 | * Processors that are not defined in the table, |
69 | * use the default SCHED_POWER_SCALE value for cpu_scale. | 69 | * use the default SCHED_POWER_SCALE value for cpu_scale. |
70 | */ | 70 | */ |
71 | struct cpu_efficiency table_efficiency[] = { | 71 | static const struct cpu_efficiency table_efficiency[] = { |
72 | {"arm,cortex-a15", 3891}, | 72 | {"arm,cortex-a15", 3891}, |
73 | {"arm,cortex-a7", 2048}, | 73 | {"arm,cortex-a7", 2048}, |
74 | {NULL, }, | 74 | {NULL, }, |
75 | }; | 75 | }; |
76 | 76 | ||
77 | unsigned long *__cpu_capacity; | 77 | static unsigned long *__cpu_capacity; |
78 | #define cpu_capacity(cpu) __cpu_capacity[cpu] | 78 | #define cpu_capacity(cpu) __cpu_capacity[cpu] |
79 | 79 | ||
80 | unsigned long middle_capacity = 1; | 80 | static unsigned long middle_capacity = 1; |
81 | 81 | ||
82 | /* | 82 | /* |
83 | * Iterate all CPUs' descriptor in DT and compute the efficiency | 83 | * Iterate all CPUs' descriptor in DT and compute the efficiency |
@@ -89,7 +89,7 @@ unsigned long middle_capacity = 1; | |||
89 | */ | 89 | */ |
90 | static void __init parse_dt_topology(void) | 90 | static void __init parse_dt_topology(void) |
91 | { | 91 | { |
92 | struct cpu_efficiency *cpu_eff; | 92 | const struct cpu_efficiency *cpu_eff; |
93 | struct device_node *cn = NULL; | 93 | struct device_node *cn = NULL; |
94 | unsigned long min_capacity = (unsigned long)(-1); | 94 | unsigned long min_capacity = (unsigned long)(-1); |
95 | unsigned long max_capacity = 0; | 95 | unsigned long max_capacity = 0; |
@@ -158,7 +158,7 @@ static void __init parse_dt_topology(void) | |||
158 | * boot. The update of all CPUs is in O(n^2) for heteregeneous system but the | 158 | * boot. The update of all CPUs is in O(n^2) for heteregeneous system but the |
159 | * function returns directly for SMP system. | 159 | * function returns directly for SMP system. |
160 | */ | 160 | */ |
161 | void update_cpu_power(unsigned int cpu) | 161 | static void update_cpu_power(unsigned int cpu) |
162 | { | 162 | { |
163 | if (!cpu_capacity(cpu)) | 163 | if (!cpu_capacity(cpu)) |
164 | return; | 164 | return; |
@@ -185,7 +185,7 @@ const struct cpumask *cpu_coregroup_mask(int cpu) | |||
185 | return &cpu_topology[cpu].core_sibling; | 185 | return &cpu_topology[cpu].core_sibling; |
186 | } | 186 | } |
187 | 187 | ||
188 | void update_siblings_masks(unsigned int cpuid) | 188 | static void update_siblings_masks(unsigned int cpuid) |
189 | { | 189 | { |
190 | struct cputopo_arm *cpu_topo, *cpuid_topo = &cpu_topology[cpuid]; | 190 | struct cputopo_arm *cpu_topo, *cpuid_topo = &cpu_topology[cpuid]; |
191 | int cpu; | 191 | int cpu; |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index dbf0923e8d76..172ee18ff124 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -36,7 +36,13 @@ | |||
36 | #include <asm/system_misc.h> | 36 | #include <asm/system_misc.h> |
37 | #include <asm/opcodes.h> | 37 | #include <asm/opcodes.h> |
38 | 38 | ||
39 | static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" }; | 39 | static const char *handler[]= { |
40 | "prefetch abort", | ||
41 | "data abort", | ||
42 | "address exception", | ||
43 | "interrupt", | ||
44 | "undefined instruction", | ||
45 | }; | ||
40 | 46 | ||
41 | void *vectors_page; | 47 | void *vectors_page; |
42 | 48 | ||
@@ -56,7 +62,7 @@ static void dump_mem(const char *, const char *, unsigned long, unsigned long); | |||
56 | void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame) | 62 | void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame) |
57 | { | 63 | { |
58 | #ifdef CONFIG_KALLSYMS | 64 | #ifdef CONFIG_KALLSYMS |
59 | printk("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from); | 65 | printk("[<%08lx>] (%ps) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from); |
60 | #else | 66 | #else |
61 | printk("Function entered at [<%08lx>] from [<%08lx>]\n", where, from); | 67 | printk("Function entered at [<%08lx>] from [<%08lx>]\n", where, from); |
62 | #endif | 68 | #endif |
@@ -425,9 +431,10 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs) | |||
425 | instr2 = __mem_to_opcode_thumb16(instr2); | 431 | instr2 = __mem_to_opcode_thumb16(instr2); |
426 | instr = __opcode_thumb32_compose(instr, instr2); | 432 | instr = __opcode_thumb32_compose(instr, instr2); |
427 | } | 433 | } |
428 | } else if (get_user(instr, (u32 __user *)pc)) { | 434 | } else { |
435 | if (get_user(instr, (u32 __user *)pc)) | ||
436 | goto die_sig; | ||
429 | instr = __mem_to_opcode_arm(instr); | 437 | instr = __mem_to_opcode_arm(instr); |
430 | goto die_sig; | ||
431 | } | 438 | } |
432 | 439 | ||
433 | if (call_undef_hook(regs, instr) == 0) | 440 | if (call_undef_hook(regs, instr) == 0) |
@@ -509,9 +516,10 @@ static inline int | |||
509 | __do_cache_op(unsigned long start, unsigned long end) | 516 | __do_cache_op(unsigned long start, unsigned long end) |
510 | { | 517 | { |
511 | int ret; | 518 | int ret; |
512 | unsigned long chunk = PAGE_SIZE; | ||
513 | 519 | ||
514 | do { | 520 | do { |
521 | unsigned long chunk = min(PAGE_SIZE, end - start); | ||
522 | |||
515 | if (signal_pending(current)) { | 523 | if (signal_pending(current)) { |
516 | struct thread_info *ti = current_thread_info(); | 524 | struct thread_info *ti = current_thread_info(); |
517 | 525 | ||
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 47d7338561de..0573faab96ad 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile | |||
@@ -13,7 +13,7 @@ lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \ | |||
13 | ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ | 13 | ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ |
14 | ucmpdi2.o lib1funcs.o div64.o \ | 14 | ucmpdi2.o lib1funcs.o div64.o \ |
15 | io-readsb.o io-writesb.o io-readsl.o io-writesl.o \ | 15 | io-readsb.o io-writesb.o io-readsl.o io-writesl.o \ |
16 | call_with_stack.o | 16 | call_with_stack.o bswapsdi2.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 | 19 | ||
diff --git a/arch/arm/lib/backtrace.S b/arch/arm/lib/backtrace.S index cd07b5814c23..4102be617fce 100644 --- a/arch/arm/lib/backtrace.S +++ b/arch/arm/lib/backtrace.S | |||
@@ -80,14 +80,14 @@ for_each_frame: tst frame, mask @ Check for address exceptions | |||
80 | 80 | ||
81 | ldr r1, [sv_pc, #-4] @ if stmfd sp!, {args} exists, | 81 | ldr r1, [sv_pc, #-4] @ if stmfd sp!, {args} exists, |
82 | ldr r3, .Ldsi+4 | 82 | ldr r3, .Ldsi+4 |
83 | teq r3, r1, lsr #10 | 83 | teq r3, r1, lsr #11 |
84 | ldreq r0, [frame, #-8] @ get sp | 84 | ldreq r0, [frame, #-8] @ get sp |
85 | subeq r0, r0, #4 @ point at the last arg | 85 | subeq r0, r0, #4 @ point at the last arg |
86 | bleq .Ldumpstm @ dump saved registers | 86 | bleq .Ldumpstm @ dump saved registers |
87 | 87 | ||
88 | 1004: ldr r1, [sv_pc, #0] @ if stmfd sp!, {..., fp, ip, lr, pc} | 88 | 1004: ldr r1, [sv_pc, #0] @ if stmfd sp!, {..., fp, ip, lr, pc} |
89 | ldr r3, .Ldsi @ instruction exists, | 89 | ldr r3, .Ldsi @ instruction exists, |
90 | teq r3, r1, lsr #10 | 90 | teq r3, r1, lsr #11 |
91 | subeq r0, frame, #16 | 91 | subeq r0, frame, #16 |
92 | bleq .Ldumpstm @ dump saved registers | 92 | bleq .Ldumpstm @ dump saved registers |
93 | 93 | ||
@@ -128,11 +128,11 @@ ENDPROC(c_backtrace) | |||
128 | beq 2f | 128 | beq 2f |
129 | add r7, r7, #1 | 129 | add r7, r7, #1 |
130 | teq r7, #6 | 130 | teq r7, #6 |
131 | moveq r7, #1 | 131 | moveq r7, #0 |
132 | moveq r1, #'\n' | 132 | adr r3, .Lcr |
133 | movne r1, #' ' | 133 | addne r3, r3, #1 @ skip newline |
134 | ldr r3, [stack], #-4 | 134 | ldr r2, [stack], #-4 |
135 | mov r2, reg | 135 | mov r1, reg |
136 | adr r0, .Lfp | 136 | adr r0, .Lfp |
137 | bl printk | 137 | bl printk |
138 | 2: subs reg, reg, #1 | 138 | 2: subs reg, reg, #1 |
@@ -142,11 +142,11 @@ ENDPROC(c_backtrace) | |||
142 | blne printk | 142 | blne printk |
143 | ldmfd sp!, {instr, reg, stack, r7, pc} | 143 | ldmfd sp!, {instr, reg, stack, r7, pc} |
144 | 144 | ||
145 | .Lfp: .asciz "%cr%d:%08x" | 145 | .Lfp: .asciz " r%d:%08x%s" |
146 | .Lcr: .asciz "\n" | 146 | .Lcr: .asciz "\n" |
147 | .Lbad: .asciz "Backtrace aborted due to bad frame pointer <%p>\n" | 147 | .Lbad: .asciz "Backtrace aborted due to bad frame pointer <%p>\n" |
148 | .align | 148 | .align |
149 | .Ldsi: .word 0xe92dd800 >> 10 @ stmfd sp!, {... fp, ip, lr, pc} | 149 | .Ldsi: .word 0xe92dd800 >> 11 @ stmfd sp!, {... fp, ip, lr, pc} |
150 | .word 0xe92d0000 >> 10 @ stmfd sp!, {} | 150 | .word 0xe92d0000 >> 11 @ stmfd sp!, {} |
151 | 151 | ||
152 | #endif | 152 | #endif |
diff --git a/arch/arm/lib/bswapsdi2.S b/arch/arm/lib/bswapsdi2.S new file mode 100644 index 000000000000..9fcdd154eff9 --- /dev/null +++ b/arch/arm/lib/bswapsdi2.S | |||
@@ -0,0 +1,36 @@ | |||
1 | #include <linux/linkage.h> | ||
2 | |||
3 | #if __LINUX_ARM_ARCH__ >= 6 | ||
4 | ENTRY(__bswapsi2) | ||
5 | rev r0, r0 | ||
6 | bx lr | ||
7 | ENDPROC(__bswapsi2) | ||
8 | |||
9 | ENTRY(__bswapdi2) | ||
10 | rev r3, r0 | ||
11 | rev r0, r1 | ||
12 | mov r1, r3 | ||
13 | bx lr | ||
14 | ENDPROC(__bswapdi2) | ||
15 | #else | ||
16 | ENTRY(__bswapsi2) | ||
17 | eor r3, r0, r0, ror #16 | ||
18 | mov r3, r3, lsr #8 | ||
19 | bic r3, r3, #0xff00 | ||
20 | eor r0, r3, r0, ror #8 | ||
21 | mov pc, lr | ||
22 | ENDPROC(__bswapsi2) | ||
23 | |||
24 | ENTRY(__bswapdi2) | ||
25 | mov ip, r1 | ||
26 | eor r3, ip, ip, ror #16 | ||
27 | eor r1, r0, r0, ror #16 | ||
28 | mov r1, r1, lsr #8 | ||
29 | mov r3, r3, lsr #8 | ||
30 | bic r3, r3, #0xff00 | ||
31 | bic r1, r1, #0xff00 | ||
32 | eor r1, r1, r0, ror #8 | ||
33 | eor r0, r3, ip, ror #8 | ||
34 | mov pc, lr | ||
35 | ENDPROC(__bswapdi2) | ||
36 | #endif | ||
diff --git a/arch/arm/lib/delay-loop.S b/arch/arm/lib/delay-loop.S index 36b668d8e121..bc1033b897b4 100644 --- a/arch/arm/lib/delay-loop.S +++ b/arch/arm/lib/delay-loop.S | |||
@@ -40,6 +40,7 @@ ENTRY(__loop_const_udelay) @ 0 <= r0 <= 0x7fffff06 | |||
40 | /* | 40 | /* |
41 | * loops = r0 * HZ * loops_per_jiffy / 1000000 | 41 | * loops = r0 * HZ * loops_per_jiffy / 1000000 |
42 | */ | 42 | */ |
43 | .align 3 | ||
43 | 44 | ||
44 | @ Delay routine | 45 | @ Delay routine |
45 | ENTRY(__loop_delay) | 46 | ENTRY(__loop_delay) |
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c index f607deb40f4d..bc7b363a3083 100644 --- a/arch/arm/mach-at91/at91rm9200_time.c +++ b/arch/arm/mach-at91/at91rm9200_time.c | |||
@@ -174,7 +174,6 @@ clkevt32k_next_event(unsigned long delta, struct clock_event_device *dev) | |||
174 | static struct clock_event_device clkevt = { | 174 | static struct clock_event_device clkevt = { |
175 | .name = "at91_tick", | 175 | .name = "at91_tick", |
176 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | 176 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, |
177 | .shift = 32, | ||
178 | .rating = 150, | 177 | .rating = 150, |
179 | .set_next_event = clkevt32k_next_event, | 178 | .set_next_event = clkevt32k_next_event, |
180 | .set_mode = clkevt32k_mode, | 179 | .set_mode = clkevt32k_mode, |
@@ -265,11 +264,9 @@ void __init at91rm9200_timer_init(void) | |||
265 | at91_st_write(AT91_ST_RTMR, 1); | 264 | at91_st_write(AT91_ST_RTMR, 1); |
266 | 265 | ||
267 | /* Setup timer clockevent, with minimum of two ticks (important!!) */ | 266 | /* Setup timer clockevent, with minimum of two ticks (important!!) */ |
268 | clkevt.mult = div_sc(AT91_SLOW_CLOCK, NSEC_PER_SEC, clkevt.shift); | ||
269 | clkevt.max_delta_ns = clockevent_delta2ns(AT91_ST_ALMV, &clkevt); | ||
270 | clkevt.min_delta_ns = clockevent_delta2ns(2, &clkevt) + 1; | ||
271 | clkevt.cpumask = cpumask_of(0); | 267 | clkevt.cpumask = cpumask_of(0); |
272 | clockevents_register_device(&clkevt); | 268 | clockevents_config_and_register(&clkevt, AT91_SLOW_CLOCK, |
269 | 2, AT91_ST_ALMV); | ||
273 | 270 | ||
274 | /* register clocksource */ | 271 | /* register clocksource */ |
275 | clocksource_register_hz(&clk32k, AT91_SLOW_CLOCK); | 272 | clocksource_register_hz(&clk32k, AT91_SLOW_CLOCK); |
diff --git a/arch/arm/mach-at91/pm.h b/arch/arm/mach-at91/pm.h index 3ed190ce062b..c5101dcb4fb0 100644 --- a/arch/arm/mach-at91/pm.h +++ b/arch/arm/mach-at91/pm.h | |||
@@ -16,7 +16,11 @@ | |||
16 | #include <mach/at91_ramc.h> | 16 | #include <mach/at91_ramc.h> |
17 | #include <mach/at91rm9200_sdramc.h> | 17 | #include <mach/at91rm9200_sdramc.h> |
18 | 18 | ||
19 | #ifdef CONFIG_PM | ||
19 | extern void at91_pm_set_standby(void (*at91_standby)(void)); | 20 | extern void at91_pm_set_standby(void (*at91_standby)(void)); |
21 | #else | ||
22 | static inline void at91_pm_set_standby(void (*at91_standby)(void)) { } | ||
23 | #endif | ||
20 | 24 | ||
21 | /* | 25 | /* |
22 | * The AT91RM9200 goes into self-refresh mode with this command, and will | 26 | * The AT91RM9200 goes into self-refresh mode with this command, and will |
diff --git a/arch/arm/mach-at91/sama5d3.c b/arch/arm/mach-at91/sama5d3.c index 3ea86428ee09..a28873fe3049 100644 --- a/arch/arm/mach-at91/sama5d3.c +++ b/arch/arm/mach-at91/sama5d3.c | |||
@@ -95,19 +95,19 @@ static struct clk twi0_clk = { | |||
95 | .name = "twi0_clk", | 95 | .name = "twi0_clk", |
96 | .pid = SAMA5D3_ID_TWI0, | 96 | .pid = SAMA5D3_ID_TWI0, |
97 | .type = CLK_TYPE_PERIPHERAL, | 97 | .type = CLK_TYPE_PERIPHERAL, |
98 | .div = AT91_PMC_PCR_DIV2, | 98 | .div = AT91_PMC_PCR_DIV8, |
99 | }; | 99 | }; |
100 | static struct clk twi1_clk = { | 100 | static struct clk twi1_clk = { |
101 | .name = "twi1_clk", | 101 | .name = "twi1_clk", |
102 | .pid = SAMA5D3_ID_TWI1, | 102 | .pid = SAMA5D3_ID_TWI1, |
103 | .type = CLK_TYPE_PERIPHERAL, | 103 | .type = CLK_TYPE_PERIPHERAL, |
104 | .div = AT91_PMC_PCR_DIV2, | 104 | .div = AT91_PMC_PCR_DIV8, |
105 | }; | 105 | }; |
106 | static struct clk twi2_clk = { | 106 | static struct clk twi2_clk = { |
107 | .name = "twi2_clk", | 107 | .name = "twi2_clk", |
108 | .pid = SAMA5D3_ID_TWI2, | 108 | .pid = SAMA5D3_ID_TWI2, |
109 | .type = CLK_TYPE_PERIPHERAL, | 109 | .type = CLK_TYPE_PERIPHERAL, |
110 | .div = AT91_PMC_PCR_DIV2, | 110 | .div = AT91_PMC_PCR_DIV8, |
111 | }; | 111 | }; |
112 | static struct clk mmc0_clk = { | 112 | static struct clk mmc0_clk = { |
113 | .name = "mci0_clk", | 113 | .name = "mci0_clk", |
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 094b3459c288..2742e00ec5d6 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c | |||
@@ -81,7 +81,7 @@ void __init at91_init_sram(int bank, unsigned long base, unsigned int length) | |||
81 | 81 | ||
82 | desc->pfn = __phys_to_pfn(base); | 82 | desc->pfn = __phys_to_pfn(base); |
83 | desc->length = length; | 83 | desc->length = length; |
84 | desc->type = MT_MEMORY_NONCACHED; | 84 | desc->type = MT_MEMORY_RWX_NONCACHED; |
85 | 85 | ||
86 | pr_info("AT91: sram at 0x%lx of 0x%x mapped at 0x%lx\n", | 86 | pr_info("AT91: sram at 0x%lx of 0x%x mapped at 0x%lx\n", |
87 | base, length, desc->virtual); | 87 | base, length, desc->virtual); |
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index c46eccbbd512..78829c513fdc 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
@@ -487,7 +487,7 @@ int __init da8xx_register_emac(void) | |||
487 | 487 | ||
488 | static struct resource da830_mcasp1_resources[] = { | 488 | static struct resource da830_mcasp1_resources[] = { |
489 | { | 489 | { |
490 | .name = "mcasp1", | 490 | .name = "mpu", |
491 | .start = DAVINCI_DA830_MCASP1_REG_BASE, | 491 | .start = DAVINCI_DA830_MCASP1_REG_BASE, |
492 | .end = DAVINCI_DA830_MCASP1_REG_BASE + (SZ_1K * 12) - 1, | 492 | .end = DAVINCI_DA830_MCASP1_REG_BASE + (SZ_1K * 12) - 1, |
493 | .flags = IORESOURCE_MEM, | 493 | .flags = IORESOURCE_MEM, |
@@ -515,7 +515,7 @@ static struct platform_device da830_mcasp1_device = { | |||
515 | 515 | ||
516 | static struct resource da850_mcasp_resources[] = { | 516 | static struct resource da850_mcasp_resources[] = { |
517 | { | 517 | { |
518 | .name = "mcasp", | 518 | .name = "mpu", |
519 | .start = DAVINCI_DA8XX_MCASP0_REG_BASE, | 519 | .start = DAVINCI_DA8XX_MCASP0_REG_BASE, |
520 | .end = DAVINCI_DA8XX_MCASP0_REG_BASE + (SZ_1K * 12) - 1, | 520 | .end = DAVINCI_DA8XX_MCASP0_REG_BASE + (SZ_1K * 12) - 1, |
521 | .flags = IORESOURCE_MEM, | 521 | .flags = IORESOURCE_MEM, |
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index ef9ff1fb6f52..6117fc644188 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c | |||
@@ -641,6 +641,7 @@ static struct platform_device dm355_edma_device = { | |||
641 | 641 | ||
642 | static struct resource dm355_asp1_resources[] = { | 642 | static struct resource dm355_asp1_resources[] = { |
643 | { | 643 | { |
644 | .name = "mpu", | ||
644 | .start = DAVINCI_ASP1_BASE, | 645 | .start = DAVINCI_ASP1_BASE, |
645 | .end = DAVINCI_ASP1_BASE + SZ_8K - 1, | 646 | .end = DAVINCI_ASP1_BASE + SZ_8K - 1, |
646 | .flags = IORESOURCE_MEM, | 647 | .flags = IORESOURCE_MEM, |
@@ -906,7 +907,7 @@ static struct davinci_gpio_platform_data dm355_gpio_platform_data = { | |||
906 | int __init dm355_gpio_register(void) | 907 | int __init dm355_gpio_register(void) |
907 | { | 908 | { |
908 | return davinci_gpio_register(dm355_gpio_resources, | 909 | return davinci_gpio_register(dm355_gpio_resources, |
909 | sizeof(dm355_gpio_resources), | 910 | ARRAY_SIZE(dm355_gpio_resources), |
910 | &dm355_gpio_platform_data); | 911 | &dm355_gpio_platform_data); |
911 | } | 912 | } |
912 | /*----------------------------------------------------------------------*/ | 913 | /*----------------------------------------------------------------------*/ |
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index 1511a0680f9a..d7c6f85d3fc9 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -720,7 +720,7 @@ static struct davinci_gpio_platform_data dm365_gpio_platform_data = { | |||
720 | int __init dm365_gpio_register(void) | 720 | int __init dm365_gpio_register(void) |
721 | { | 721 | { |
722 | return davinci_gpio_register(dm365_gpio_resources, | 722 | return davinci_gpio_register(dm365_gpio_resources, |
723 | sizeof(dm365_gpio_resources), | 723 | ARRAY_SIZE(dm365_gpio_resources), |
724 | &dm365_gpio_platform_data); | 724 | &dm365_gpio_platform_data); |
725 | } | 725 | } |
726 | 726 | ||
@@ -942,6 +942,7 @@ static struct platform_device dm365_edma_device = { | |||
942 | 942 | ||
943 | static struct resource dm365_asp_resources[] = { | 943 | static struct resource dm365_asp_resources[] = { |
944 | { | 944 | { |
945 | .name = "mpu", | ||
945 | .start = DAVINCI_DM365_ASP0_BASE, | 946 | .start = DAVINCI_DM365_ASP0_BASE, |
946 | .end = DAVINCI_DM365_ASP0_BASE + SZ_8K - 1, | 947 | .end = DAVINCI_DM365_ASP0_BASE + SZ_8K - 1, |
947 | .flags = IORESOURCE_MEM, | 948 | .flags = IORESOURCE_MEM, |
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 143a3217e8ef..3ce47997bb46 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
@@ -572,6 +572,7 @@ static struct platform_device dm644x_edma_device = { | |||
572 | /* DM6446 EVM uses ASP0; line-out is a pair of RCA jacks */ | 572 | /* DM6446 EVM uses ASP0; line-out is a pair of RCA jacks */ |
573 | static struct resource dm644x_asp_resources[] = { | 573 | static struct resource dm644x_asp_resources[] = { |
574 | { | 574 | { |
575 | .name = "mpu", | ||
575 | .start = DAVINCI_ASP0_BASE, | 576 | .start = DAVINCI_ASP0_BASE, |
576 | .end = DAVINCI_ASP0_BASE + SZ_8K - 1, | 577 | .end = DAVINCI_ASP0_BASE + SZ_8K - 1, |
577 | .flags = IORESOURCE_MEM, | 578 | .flags = IORESOURCE_MEM, |
@@ -792,7 +793,7 @@ static struct davinci_gpio_platform_data dm644_gpio_platform_data = { | |||
792 | int __init dm644x_gpio_register(void) | 793 | int __init dm644x_gpio_register(void) |
793 | { | 794 | { |
794 | return davinci_gpio_register(dm644_gpio_resources, | 795 | return davinci_gpio_register(dm644_gpio_resources, |
795 | sizeof(dm644_gpio_resources), | 796 | ARRAY_SIZE(dm644_gpio_resources), |
796 | &dm644_gpio_platform_data); | 797 | &dm644_gpio_platform_data); |
797 | } | 798 | } |
798 | /*----------------------------------------------------------------------*/ | 799 | /*----------------------------------------------------------------------*/ |
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index 2a73f299c1d0..0e81fea65e7f 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c | |||
@@ -621,7 +621,7 @@ static struct platform_device dm646x_edma_device = { | |||
621 | 621 | ||
622 | static struct resource dm646x_mcasp0_resources[] = { | 622 | static struct resource dm646x_mcasp0_resources[] = { |
623 | { | 623 | { |
624 | .name = "mcasp0", | 624 | .name = "mpu", |
625 | .start = DAVINCI_DM646X_MCASP0_REG_BASE, | 625 | .start = DAVINCI_DM646X_MCASP0_REG_BASE, |
626 | .end = DAVINCI_DM646X_MCASP0_REG_BASE + (SZ_1K << 1) - 1, | 626 | .end = DAVINCI_DM646X_MCASP0_REG_BASE + (SZ_1K << 1) - 1, |
627 | .flags = IORESOURCE_MEM, | 627 | .flags = IORESOURCE_MEM, |
@@ -641,7 +641,7 @@ static struct resource dm646x_mcasp0_resources[] = { | |||
641 | 641 | ||
642 | static struct resource dm646x_mcasp1_resources[] = { | 642 | static struct resource dm646x_mcasp1_resources[] = { |
643 | { | 643 | { |
644 | .name = "mcasp1", | 644 | .name = "mpu", |
645 | .start = DAVINCI_DM646X_MCASP1_REG_BASE, | 645 | .start = DAVINCI_DM646X_MCASP1_REG_BASE, |
646 | .end = DAVINCI_DM646X_MCASP1_REG_BASE + (SZ_1K << 1) - 1, | 646 | .end = DAVINCI_DM646X_MCASP1_REG_BASE + (SZ_1K << 1) - 1, |
647 | .flags = IORESOURCE_MEM, | 647 | .flags = IORESOURCE_MEM, |
@@ -769,7 +769,7 @@ static struct davinci_gpio_platform_data dm646x_gpio_platform_data = { | |||
769 | int __init dm646x_gpio_register(void) | 769 | int __init dm646x_gpio_register(void) |
770 | { | 770 | { |
771 | return davinci_gpio_register(dm646x_gpio_resources, | 771 | return davinci_gpio_register(dm646x_gpio_resources, |
772 | sizeof(dm646x_gpio_resources), | 772 | ARRAY_SIZE(dm646x_gpio_resources), |
773 | &dm646x_gpio_platform_data); | 773 | &dm646x_gpio_platform_data); |
774 | } | 774 | } |
775 | /*----------------------------------------------------------------------*/ | 775 | /*----------------------------------------------------------------------*/ |
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c index 2739ca2c1334..9e8220e38398 100644 --- a/arch/arm/mach-footbridge/common.c +++ b/arch/arm/mach-footbridge/common.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | #include <video/vga.h> | ||
18 | 19 | ||
19 | #include <asm/pgtable.h> | 20 | #include <asm/pgtable.h> |
20 | #include <asm/page.h> | 21 | #include <asm/page.h> |
@@ -142,11 +143,6 @@ static struct map_desc fb_common_io_desc[] __initdata = { | |||
142 | .pfn = __phys_to_pfn(DC21285_ARMCSR_BASE), | 143 | .pfn = __phys_to_pfn(DC21285_ARMCSR_BASE), |
143 | .length = ARMCSR_SIZE, | 144 | .length = ARMCSR_SIZE, |
144 | .type = MT_DEVICE, | 145 | .type = MT_DEVICE, |
145 | }, { | ||
146 | .virtual = XBUS_BASE, | ||
147 | .pfn = __phys_to_pfn(0x40000000), | ||
148 | .length = XBUS_SIZE, | ||
149 | .type = MT_DEVICE, | ||
150 | } | 146 | } |
151 | }; | 147 | }; |
152 | 148 | ||
@@ -196,6 +192,8 @@ void __init footbridge_map_io(void) | |||
196 | iotable_init(ebsa285_host_io_desc, ARRAY_SIZE(ebsa285_host_io_desc)); | 192 | iotable_init(ebsa285_host_io_desc, ARRAY_SIZE(ebsa285_host_io_desc)); |
197 | pci_map_io_early(__phys_to_pfn(DC21285_PCI_IO)); | 193 | pci_map_io_early(__phys_to_pfn(DC21285_PCI_IO)); |
198 | } | 194 | } |
195 | |||
196 | vga_base = PCIMEM_BASE; | ||
199 | } | 197 | } |
200 | 198 | ||
201 | void footbridge_restart(enum reboot_mode mode, const char *cmd) | 199 | void footbridge_restart(enum reboot_mode mode, const char *cmd) |
diff --git a/arch/arm/mach-footbridge/common.h b/arch/arm/mach-footbridge/common.h index 56607b3a773e..b911e5587ecf 100644 --- a/arch/arm/mach-footbridge/common.h +++ b/arch/arm/mach-footbridge/common.h | |||
@@ -10,3 +10,5 @@ extern void footbridge_init_irq(void); | |||
10 | 10 | ||
11 | extern void isa_init_irq(unsigned int irq); | 11 | extern void isa_init_irq(unsigned int irq); |
12 | extern void footbridge_restart(enum reboot_mode, const char *); | 12 | extern void footbridge_restart(enum reboot_mode, const char *); |
13 | |||
14 | extern void footbridge_sched_clock(void); | ||
diff --git a/arch/arm/mach-footbridge/dc21285-timer.c b/arch/arm/mach-footbridge/dc21285-timer.c index 9ee78f7b4990..3971104d32d4 100644 --- a/arch/arm/mach-footbridge/dc21285-timer.c +++ b/arch/arm/mach-footbridge/dc21285-timer.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
11 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
12 | #include <linux/sched_clock.h> | ||
12 | 13 | ||
13 | #include <asm/irq.h> | 14 | #include <asm/irq.h> |
14 | 15 | ||
@@ -46,6 +47,16 @@ static struct clocksource cksrc_dc21285 = { | |||
46 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 47 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
47 | }; | 48 | }; |
48 | 49 | ||
50 | static int ckevt_dc21285_set_next_event(unsigned long delta, | ||
51 | struct clock_event_device *c) | ||
52 | { | ||
53 | *CSR_TIMER1_CLR = 0; | ||
54 | *CSR_TIMER1_LOAD = delta; | ||
55 | *CSR_TIMER1_CNTL = TIMER_CNTL_ENABLE | TIMER_CNTL_DIV16; | ||
56 | |||
57 | return 0; | ||
58 | } | ||
59 | |||
49 | static void ckevt_dc21285_set_mode(enum clock_event_mode mode, | 60 | static void ckevt_dc21285_set_mode(enum clock_event_mode mode, |
50 | struct clock_event_device *c) | 61 | struct clock_event_device *c) |
51 | { | 62 | { |
@@ -58,7 +69,9 @@ static void ckevt_dc21285_set_mode(enum clock_event_mode mode, | |||
58 | TIMER_CNTL_DIV16; | 69 | TIMER_CNTL_DIV16; |
59 | break; | 70 | break; |
60 | 71 | ||
61 | default: | 72 | case CLOCK_EVT_MODE_ONESHOT: |
73 | case CLOCK_EVT_MODE_UNUSED: | ||
74 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
62 | *CSR_TIMER1_CNTL = 0; | 75 | *CSR_TIMER1_CNTL = 0; |
63 | break; | 76 | break; |
64 | } | 77 | } |
@@ -66,9 +79,11 @@ static void ckevt_dc21285_set_mode(enum clock_event_mode mode, | |||
66 | 79 | ||
67 | static struct clock_event_device ckevt_dc21285 = { | 80 | static struct clock_event_device ckevt_dc21285 = { |
68 | .name = "dc21285_timer1", | 81 | .name = "dc21285_timer1", |
69 | .features = CLOCK_EVT_FEAT_PERIODIC, | 82 | .features = CLOCK_EVT_FEAT_PERIODIC | |
83 | CLOCK_EVT_FEAT_ONESHOT, | ||
70 | .rating = 200, | 84 | .rating = 200, |
71 | .irq = IRQ_TIMER1, | 85 | .irq = IRQ_TIMER1, |
86 | .set_next_event = ckevt_dc21285_set_next_event, | ||
72 | .set_mode = ckevt_dc21285_set_mode, | 87 | .set_mode = ckevt_dc21285_set_mode, |
73 | }; | 88 | }; |
74 | 89 | ||
@@ -78,6 +93,10 @@ static irqreturn_t timer1_interrupt(int irq, void *dev_id) | |||
78 | 93 | ||
79 | *CSR_TIMER1_CLR = 0; | 94 | *CSR_TIMER1_CLR = 0; |
80 | 95 | ||
96 | /* Stop the timer if in one-shot mode */ | ||
97 | if (ce->mode == CLOCK_EVT_MODE_ONESHOT) | ||
98 | *CSR_TIMER1_CNTL = 0; | ||
99 | |||
81 | ce->event_handler(ce); | 100 | ce->event_handler(ce); |
82 | 101 | ||
83 | return IRQ_HANDLED; | 102 | return IRQ_HANDLED; |
@@ -96,11 +115,28 @@ static struct irqaction footbridge_timer_irq = { | |||
96 | void __init footbridge_timer_init(void) | 115 | void __init footbridge_timer_init(void) |
97 | { | 116 | { |
98 | struct clock_event_device *ce = &ckevt_dc21285; | 117 | struct clock_event_device *ce = &ckevt_dc21285; |
118 | unsigned rate = DIV_ROUND_CLOSEST(mem_fclk_21285, 16); | ||
99 | 119 | ||
100 | clocksource_register_hz(&cksrc_dc21285, (mem_fclk_21285 + 8) / 16); | 120 | clocksource_register_hz(&cksrc_dc21285, rate); |
101 | 121 | ||
102 | setup_irq(ce->irq, &footbridge_timer_irq); | 122 | setup_irq(ce->irq, &footbridge_timer_irq); |
103 | 123 | ||
104 | ce->cpumask = cpumask_of(smp_processor_id()); | 124 | ce->cpumask = cpumask_of(smp_processor_id()); |
105 | clockevents_config_and_register(ce, mem_fclk_21285, 0x4, 0xffffff); | 125 | clockevents_config_and_register(ce, rate, 0x4, 0xffffff); |
126 | } | ||
127 | |||
128 | static u32 notrace footbridge_read_sched_clock(void) | ||
129 | { | ||
130 | return ~*CSR_TIMER3_VALUE; | ||
131 | } | ||
132 | |||
133 | void __init footbridge_sched_clock(void) | ||
134 | { | ||
135 | unsigned rate = DIV_ROUND_CLOSEST(mem_fclk_21285, 16); | ||
136 | |||
137 | *CSR_TIMER3_LOAD = 0; | ||
138 | *CSR_TIMER3_CLR = 0; | ||
139 | *CSR_TIMER3_CNTL = TIMER_CNTL_ENABLE | TIMER_CNTL_DIV16; | ||
140 | |||
141 | setup_sched_clock(footbridge_read_sched_clock, 24, rate); | ||
106 | } | 142 | } |
diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c index 3490a24f969e..7c2fdae9a38b 100644 --- a/arch/arm/mach-footbridge/dc21285.c +++ b/arch/arm/mach-footbridge/dc21285.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <video/vga.h> | ||
22 | 21 | ||
23 | #include <asm/irq.h> | 22 | #include <asm/irq.h> |
24 | #include <asm/mach/pci.h> | 23 | #include <asm/mach/pci.h> |
@@ -291,7 +290,6 @@ void __init dc21285_preinit(void) | |||
291 | int cfn_mode; | 290 | int cfn_mode; |
292 | 291 | ||
293 | pcibios_min_mem = 0x81000000; | 292 | pcibios_min_mem = 0x81000000; |
294 | vga_base = PCIMEM_BASE; | ||
295 | 293 | ||
296 | mem_size = (unsigned int)high_memory - PAGE_OFFSET; | 294 | mem_size = (unsigned int)high_memory - PAGE_OFFSET; |
297 | for (mem_mask = 0x00100000; mem_mask < 0x10000000; mem_mask <<= 1) | 295 | for (mem_mask = 0x00100000; mem_mask < 0x10000000; mem_mask <<= 1) |
diff --git a/arch/arm/mach-footbridge/ebsa285.c b/arch/arm/mach-footbridge/ebsa285.c index b08243500e2e..aee8300f3490 100644 --- a/arch/arm/mach-footbridge/ebsa285.c +++ b/arch/arm/mach-footbridge/ebsa285.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * EBSA285 machine fixup | 4 | * EBSA285 machine fixup |
5 | */ | 5 | */ |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/io.h> | ||
7 | #include <linux/spinlock.h> | 8 | #include <linux/spinlock.h> |
8 | #include <linux/slab.h> | 9 | #include <linux/slab.h> |
9 | #include <linux/leds.h> | 10 | #include <linux/leds.h> |
@@ -17,6 +18,11 @@ | |||
17 | 18 | ||
18 | /* LEDs */ | 19 | /* LEDs */ |
19 | #if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS) | 20 | #if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS) |
21 | #define XBUS_AMBER_L BIT(0) | ||
22 | #define XBUS_GREEN_L BIT(1) | ||
23 | #define XBUS_RED_L BIT(2) | ||
24 | #define XBUS_TOGGLE BIT(7) | ||
25 | |||
20 | struct ebsa285_led { | 26 | struct ebsa285_led { |
21 | struct led_classdev cdev; | 27 | struct led_classdev cdev; |
22 | u8 mask; | 28 | u8 mask; |
@@ -30,21 +36,25 @@ static const struct { | |||
30 | const char *name; | 36 | const char *name; |
31 | const char *trigger; | 37 | const char *trigger; |
32 | } ebsa285_leds[] = { | 38 | } ebsa285_leds[] = { |
33 | { "ebsa285:amber", "heartbeat", }, | 39 | { "ebsa285:amber", "cpu0", }, |
34 | { "ebsa285:green", "cpu0", }, | 40 | { "ebsa285:green", "heartbeat", }, |
35 | { "ebsa285:red",}, | 41 | { "ebsa285:red",}, |
36 | }; | 42 | }; |
37 | 43 | ||
44 | static unsigned char hw_led_state; | ||
45 | static void __iomem *xbus; | ||
46 | |||
38 | static void ebsa285_led_set(struct led_classdev *cdev, | 47 | static void ebsa285_led_set(struct led_classdev *cdev, |
39 | enum led_brightness b) | 48 | enum led_brightness b) |
40 | { | 49 | { |
41 | struct ebsa285_led *led = container_of(cdev, | 50 | struct ebsa285_led *led = container_of(cdev, |
42 | struct ebsa285_led, cdev); | 51 | struct ebsa285_led, cdev); |
43 | 52 | ||
44 | if (b != LED_OFF) | 53 | if (b == LED_OFF) |
45 | *XBUS_LEDS |= led->mask; | 54 | hw_led_state |= led->mask; |
46 | else | 55 | else |
47 | *XBUS_LEDS &= ~led->mask; | 56 | hw_led_state &= ~led->mask; |
57 | writeb(hw_led_state, xbus); | ||
48 | } | 58 | } |
49 | 59 | ||
50 | static enum led_brightness ebsa285_led_get(struct led_classdev *cdev) | 60 | static enum led_brightness ebsa285_led_get(struct led_classdev *cdev) |
@@ -52,18 +62,23 @@ static enum led_brightness ebsa285_led_get(struct led_classdev *cdev) | |||
52 | struct ebsa285_led *led = container_of(cdev, | 62 | struct ebsa285_led *led = container_of(cdev, |
53 | struct ebsa285_led, cdev); | 63 | struct ebsa285_led, cdev); |
54 | 64 | ||
55 | return (*XBUS_LEDS & led->mask) ? LED_FULL : LED_OFF; | 65 | return hw_led_state & led->mask ? LED_OFF : LED_FULL; |
56 | } | 66 | } |
57 | 67 | ||
58 | static int __init ebsa285_leds_init(void) | 68 | static int __init ebsa285_leds_init(void) |
59 | { | 69 | { |
60 | int i; | 70 | int i; |
61 | 71 | ||
62 | if (machine_is_ebsa285()) | 72 | if (!machine_is_ebsa285()) |
63 | return -ENODEV; | 73 | return -ENODEV; |
64 | 74 | ||
65 | /* 3 LEDS All ON */ | 75 | xbus = ioremap(XBUS_CS2, SZ_4K); |
66 | *XBUS_LEDS |= XBUS_LED_AMBER | XBUS_LED_GREEN | XBUS_LED_RED; | 76 | if (!xbus) |
77 | return -ENOMEM; | ||
78 | |||
79 | /* 3 LEDS all off */ | ||
80 | hw_led_state = XBUS_AMBER_L | XBUS_GREEN_L | XBUS_RED_L; | ||
81 | writeb(hw_led_state, xbus); | ||
67 | 82 | ||
68 | for (i = 0; i < ARRAY_SIZE(ebsa285_leds); i++) { | 83 | for (i = 0; i < ARRAY_SIZE(ebsa285_leds); i++) { |
69 | struct ebsa285_led *led; | 84 | struct ebsa285_led *led; |
@@ -100,6 +115,7 @@ MACHINE_START(EBSA285, "EBSA285") | |||
100 | .video_start = 0x000a0000, | 115 | .video_start = 0x000a0000, |
101 | .video_end = 0x000bffff, | 116 | .video_end = 0x000bffff, |
102 | .map_io = footbridge_map_io, | 117 | .map_io = footbridge_map_io, |
118 | .init_early = footbridge_sched_clock, | ||
103 | .init_irq = footbridge_init_irq, | 119 | .init_irq = footbridge_init_irq, |
104 | .init_time = footbridge_timer_init, | 120 | .init_time = footbridge_timer_init, |
105 | .restart = footbridge_restart, | 121 | .restart = footbridge_restart, |
diff --git a/arch/arm/mach-footbridge/include/mach/hardware.h b/arch/arm/mach-footbridge/include/mach/hardware.h index e3d6ccac2162..02f6d7a706b1 100644 --- a/arch/arm/mach-footbridge/include/mach/hardware.h +++ b/arch/arm/mach-footbridge/include/mach/hardware.h | |||
@@ -51,11 +51,7 @@ | |||
51 | #define PCIMEM_SIZE 0x01000000 | 51 | #define PCIMEM_SIZE 0x01000000 |
52 | #define PCIMEM_BASE MMU_IO(0xf0000000, 0x80000000) | 52 | #define PCIMEM_BASE MMU_IO(0xf0000000, 0x80000000) |
53 | 53 | ||
54 | #define XBUS_LEDS ((volatile unsigned char *)(XBUS_BASE + 0x12000)) | 54 | #define XBUS_CS2 0x40012000 |
55 | #define XBUS_LED_AMBER (1 << 0) | ||
56 | #define XBUS_LED_GREEN (1 << 1) | ||
57 | #define XBUS_LED_RED (1 << 2) | ||
58 | #define XBUS_LED_TOGGLE (1 << 8) | ||
59 | 55 | ||
60 | #define XBUS_SWITCH ((volatile unsigned char *)(XBUS_BASE + 0x12000)) | 56 | #define XBUS_SWITCH ((volatile unsigned char *)(XBUS_BASE + 0x12000)) |
61 | #define XBUS_SWITCH_SWITCH ((*XBUS_SWITCH) & 15) | 57 | #define XBUS_SWITCH_SWITCH ((*XBUS_SWITCH) & 15) |
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index b3d7e5634b83..c7de89b263dd 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c | |||
@@ -17,12 +17,15 @@ | |||
17 | #include <linux/clkdev.h> | 17 | #include <linux/clkdev.h> |
18 | #include <linux/clocksource.h> | 18 | #include <linux/clocksource.h> |
19 | #include <linux/dma-mapping.h> | 19 | #include <linux/dma-mapping.h> |
20 | #include <linux/input.h> | ||
20 | #include <linux/io.h> | 21 | #include <linux/io.h> |
21 | #include <linux/irqchip.h> | 22 | #include <linux/irqchip.h> |
23 | #include <linux/mailbox.h> | ||
22 | #include <linux/of.h> | 24 | #include <linux/of.h> |
23 | #include <linux/of_irq.h> | 25 | #include <linux/of_irq.h> |
24 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
25 | #include <linux/of_address.h> | 27 | #include <linux/of_address.h> |
28 | #include <linux/reboot.h> | ||
26 | #include <linux/amba/bus.h> | 29 | #include <linux/amba/bus.h> |
27 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
28 | 31 | ||
@@ -50,6 +53,7 @@ static void __init highbank_scu_map_io(void) | |||
50 | 53 | ||
51 | static void highbank_l2x0_disable(void) | 54 | static void highbank_l2x0_disable(void) |
52 | { | 55 | { |
56 | outer_flush_all(); | ||
53 | /* Disable PL310 L2 Cache controller */ | 57 | /* Disable PL310 L2 Cache controller */ |
54 | highbank_smc1(0x102, 0x0); | 58 | highbank_smc1(0x102, 0x0); |
55 | } | 59 | } |
@@ -130,6 +134,24 @@ static struct platform_device highbank_cpuidle_device = { | |||
130 | .name = "cpuidle-calxeda", | 134 | .name = "cpuidle-calxeda", |
131 | }; | 135 | }; |
132 | 136 | ||
137 | static int hb_keys_notifier(struct notifier_block *nb, unsigned long event, void *data) | ||
138 | { | ||
139 | u32 key = *(u32 *)data; | ||
140 | |||
141 | if (event != 0x1000) | ||
142 | return 0; | ||
143 | |||
144 | if (key == KEY_POWER) | ||
145 | orderly_poweroff(false); | ||
146 | else if (key == 0xffff) | ||
147 | ctrl_alt_del(); | ||
148 | |||
149 | return 0; | ||
150 | } | ||
151 | static struct notifier_block hb_keys_nb = { | ||
152 | .notifier_call = hb_keys_notifier, | ||
153 | }; | ||
154 | |||
133 | static void __init highbank_init(void) | 155 | static void __init highbank_init(void) |
134 | { | 156 | { |
135 | struct device_node *np; | 157 | struct device_node *np; |
@@ -145,6 +167,8 @@ static void __init highbank_init(void) | |||
145 | bus_register_notifier(&platform_bus_type, &highbank_platform_nb); | 167 | bus_register_notifier(&platform_bus_type, &highbank_platform_nb); |
146 | bus_register_notifier(&amba_bustype, &highbank_amba_nb); | 168 | bus_register_notifier(&amba_bustype, &highbank_amba_nb); |
147 | 169 | ||
170 | pl320_ipc_register_notifier(&hb_keys_nb); | ||
171 | |||
148 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 172 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
149 | 173 | ||
150 | if (psci_ops.cpu_suspend) | 174 | if (psci_ops.cpu_suspend) |
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 7a6e6f710068..fae0578fec7e 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -3,7 +3,6 @@ config ARCH_MXC | |||
3 | select ARCH_REQUIRE_GPIOLIB | 3 | select ARCH_REQUIRE_GPIOLIB |
4 | select ARM_CPU_SUSPEND if PM | 4 | select ARM_CPU_SUSPEND if PM |
5 | select ARM_PATCH_PHYS_VIRT | 5 | select ARM_PATCH_PHYS_VIRT |
6 | select AUTO_ZRELADDR if !ZBOOT_ROM | ||
7 | select CLKSRC_MMIO | 6 | select CLKSRC_MMIO |
8 | select COMMON_CLK | 7 | select COMMON_CLK |
9 | select GENERIC_ALLOCATOR | 8 | select GENERIC_ALLOCATOR |
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 19f1652e94cf..8d972ff18c56 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -131,6 +131,24 @@ DT_MACHINE_START(OMAP3_GP_DT, "Generic OMAP3-GP (Flattened Device Tree)") | |||
131 | .dt_compat = omap3_gp_boards_compat, | 131 | .dt_compat = omap3_gp_boards_compat, |
132 | .restart = omap3xxx_restart, | 132 | .restart = omap3xxx_restart, |
133 | MACHINE_END | 133 | MACHINE_END |
134 | |||
135 | static const char *am3517_boards_compat[] __initdata = { | ||
136 | "ti,am3517", | ||
137 | NULL, | ||
138 | }; | ||
139 | |||
140 | DT_MACHINE_START(AM3517_DT, "Generic AM3517 (Flattened Device Tree)") | ||
141 | .reserve = omap_reserve, | ||
142 | .map_io = omap3_map_io, | ||
143 | .init_early = am35xx_init_early, | ||
144 | .init_irq = omap_intc_of_init, | ||
145 | .handle_irq = omap3_intc_handle_irq, | ||
146 | .init_machine = omap_generic_init, | ||
147 | .init_late = omap3_init_late, | ||
148 | .init_time = omap3_gptimer_timer_init, | ||
149 | .dt_compat = am3517_boards_compat, | ||
150 | .restart = omap3xxx_restart, | ||
151 | MACHINE_END | ||
134 | #endif | 152 | #endif |
135 | 153 | ||
136 | #ifdef CONFIG_SOC_AM33XX | 154 | #ifdef CONFIG_SOC_AM33XX |
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index 4ec8d82b0492..44a59c3abfb0 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -242,12 +242,18 @@ static void __init ldp_display_init(void) | |||
242 | 242 | ||
243 | static int ldp_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio) | 243 | static int ldp_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio) |
244 | { | 244 | { |
245 | int res; | ||
246 | |||
245 | /* LCD enable GPIO */ | 247 | /* LCD enable GPIO */ |
246 | ldp_lcd_pdata.enable_gpio = gpio + 7; | 248 | ldp_lcd_pdata.enable_gpio = gpio + 7; |
247 | 249 | ||
248 | /* Backlight enable GPIO */ | 250 | /* Backlight enable GPIO */ |
249 | ldp_lcd_pdata.backlight_gpio = gpio + 15; | 251 | ldp_lcd_pdata.backlight_gpio = gpio + 15; |
250 | 252 | ||
253 | res = platform_device_register(&ldp_lcd_device); | ||
254 | if (res) | ||
255 | pr_err("Unable to register LCD: %d\n", res); | ||
256 | |||
251 | return 0; | 257 | return 0; |
252 | } | 258 | } |
253 | 259 | ||
@@ -346,7 +352,6 @@ static struct omap2_hsmmc_info mmc[] __initdata = { | |||
346 | 352 | ||
347 | static struct platform_device *ldp_devices[] __initdata = { | 353 | static struct platform_device *ldp_devices[] __initdata = { |
348 | &ldp_gpio_keys_device, | 354 | &ldp_gpio_keys_device, |
349 | &ldp_lcd_device, | ||
350 | }; | 355 | }; |
351 | 356 | ||
352 | #ifdef CONFIG_OMAP_MUX | 357 | #ifdef CONFIG_OMAP_MUX |
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index 58347bb874a0..4cf165502b35 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c | |||
@@ -101,13 +101,51 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initconst = { | |||
101 | { "dss_hdmi", "omapdss_hdmi", -1 }, | 101 | { "dss_hdmi", "omapdss_hdmi", -1 }, |
102 | }; | 102 | }; |
103 | 103 | ||
104 | static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes) | ||
105 | { | ||
106 | u32 enable_mask, enable_shift; | ||
107 | u32 pipd_mask, pipd_shift; | ||
108 | u32 reg; | ||
109 | |||
110 | if (dsi_id == 0) { | ||
111 | enable_mask = OMAP4_DSI1_LANEENABLE_MASK; | ||
112 | enable_shift = OMAP4_DSI1_LANEENABLE_SHIFT; | ||
113 | pipd_mask = OMAP4_DSI1_PIPD_MASK; | ||
114 | pipd_shift = OMAP4_DSI1_PIPD_SHIFT; | ||
115 | } else if (dsi_id == 1) { | ||
116 | enable_mask = OMAP4_DSI2_LANEENABLE_MASK; | ||
117 | enable_shift = OMAP4_DSI2_LANEENABLE_SHIFT; | ||
118 | pipd_mask = OMAP4_DSI2_PIPD_MASK; | ||
119 | pipd_shift = OMAP4_DSI2_PIPD_SHIFT; | ||
120 | } else { | ||
121 | return -ENODEV; | ||
122 | } | ||
123 | |||
124 | reg = omap4_ctrl_pad_readl(OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY); | ||
125 | |||
126 | reg &= ~enable_mask; | ||
127 | reg &= ~pipd_mask; | ||
128 | |||
129 | reg |= (lanes << enable_shift) & enable_mask; | ||
130 | reg |= (lanes << pipd_shift) & pipd_mask; | ||
131 | |||
132 | omap4_ctrl_pad_writel(reg, OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY); | ||
133 | |||
134 | return 0; | ||
135 | } | ||
136 | |||
104 | static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask) | 137 | static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask) |
105 | { | 138 | { |
139 | if (cpu_is_omap44xx()) | ||
140 | return omap4_dsi_mux_pads(dsi_id, lane_mask); | ||
141 | |||
106 | return 0; | 142 | return 0; |
107 | } | 143 | } |
108 | 144 | ||
109 | static void omap_dsi_disable_pads(int dsi_id, unsigned lane_mask) | 145 | static void omap_dsi_disable_pads(int dsi_id, unsigned lane_mask) |
110 | { | 146 | { |
147 | if (cpu_is_omap44xx()) | ||
148 | omap4_dsi_mux_pads(dsi_id, 0); | ||
111 | } | 149 | } |
112 | 150 | ||
113 | static int omap_dss_set_min_bus_tput(struct device *dev, unsigned long tput) | 151 | static int omap_dss_set_min_bus_tput(struct device *dev, unsigned long tput) |
diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c index 365bfd3d9c68..dadccc91488c 100644 --- a/arch/arm/mach-omap2/dss-common.c +++ b/arch/arm/mach-omap2/dss-common.c | |||
@@ -223,7 +223,7 @@ void __init omap_4430sdp_display_init_of(void) | |||
223 | static struct connector_dvi_platform_data omap3_igep2_dvi_connector_pdata = { | 223 | static struct connector_dvi_platform_data omap3_igep2_dvi_connector_pdata = { |
224 | .name = "dvi", | 224 | .name = "dvi", |
225 | .source = "tfp410.0", | 225 | .source = "tfp410.0", |
226 | .i2c_bus_num = 3, | 226 | .i2c_bus_num = 2, |
227 | }; | 227 | }; |
228 | 228 | ||
229 | static struct platform_device omap3_igep2_dvi_connector_device = { | 229 | static struct platform_device omap3_igep2_dvi_connector_device = { |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index cd22262a2cc0..07b68d5a7940 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -244,7 +244,7 @@ static struct map_desc omap44xx_io_desc[] __initdata = { | |||
244 | .virtual = OMAP4_SRAM_VA, | 244 | .virtual = OMAP4_SRAM_VA, |
245 | .pfn = __phys_to_pfn(OMAP4_SRAM_PA), | 245 | .pfn = __phys_to_pfn(OMAP4_SRAM_PA), |
246 | .length = PAGE_SIZE, | 246 | .length = PAGE_SIZE, |
247 | .type = MT_MEMORY_SO, | 247 | .type = MT_MEMORY_RW_SO, |
248 | }, | 248 | }, |
249 | #endif | 249 | #endif |
250 | 250 | ||
@@ -282,7 +282,7 @@ static struct map_desc omap54xx_io_desc[] __initdata = { | |||
282 | .virtual = OMAP4_SRAM_VA, | 282 | .virtual = OMAP4_SRAM_VA, |
283 | .pfn = __phys_to_pfn(OMAP4_SRAM_PA), | 283 | .pfn = __phys_to_pfn(OMAP4_SRAM_PA), |
284 | .length = PAGE_SIZE, | 284 | .length = PAGE_SIZE, |
285 | .type = MT_MEMORY_SO, | 285 | .type = MT_MEMORY_RW_SO, |
286 | }, | 286 | }, |
287 | #endif | 287 | #endif |
288 | }; | 288 | }; |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index b39efd46abf9..dd893ec4c8f2 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -87,7 +87,7 @@ void __init omap_barriers_init(void) | |||
87 | dram_io_desc[0].virtual = OMAP4_DRAM_BARRIER_VA; | 87 | dram_io_desc[0].virtual = OMAP4_DRAM_BARRIER_VA; |
88 | dram_io_desc[0].pfn = __phys_to_pfn(paddr); | 88 | dram_io_desc[0].pfn = __phys_to_pfn(paddr); |
89 | dram_io_desc[0].length = size; | 89 | dram_io_desc[0].length = size; |
90 | dram_io_desc[0].type = MT_MEMORY_SO; | 90 | dram_io_desc[0].type = MT_MEMORY_RW_SO; |
91 | iotable_init(dram_io_desc, ARRAY_SIZE(dram_io_desc)); | 91 | iotable_init(dram_io_desc, ARRAY_SIZE(dram_io_desc)); |
92 | dram_sync = (void __iomem *) dram_io_desc[0].virtual; | 92 | dram_sync = (void __iomem *) dram_io_desc[0].virtual; |
93 | sram_sync = (void __iomem *) OMAP4_SRAM_VA; | 93 | sram_sync = (void __iomem *) OMAP4_SRAM_VA; |
@@ -162,6 +162,7 @@ void __iomem *omap4_get_l2cache_base(void) | |||
162 | 162 | ||
163 | static void omap4_l2x0_disable(void) | 163 | static void omap4_l2x0_disable(void) |
164 | { | 164 | { |
165 | outer_flush_all(); | ||
165 | /* Disable PL310 L2 Cache controller */ | 166 | /* Disable PL310 L2 Cache controller */ |
166 | omap_smc1(0x102, 0x0); | 167 | omap_smc1(0x102, 0x0); |
167 | } | 168 | } |
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index 53f0735817bb..e0a398cf28d8 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c | |||
@@ -183,6 +183,10 @@ static int omap_device_build_from_dt(struct platform_device *pdev) | |||
183 | odbfd_exit1: | 183 | odbfd_exit1: |
184 | kfree(hwmods); | 184 | kfree(hwmods); |
185 | odbfd_exit: | 185 | odbfd_exit: |
186 | /* if data/we are at fault.. load up a fail handler */ | ||
187 | if (ret) | ||
188 | pdev->dev.pm_domain = &omap_device_fail_pm_domain; | ||
189 | |||
186 | return ret; | 190 | return ret; |
187 | } | 191 | } |
188 | 192 | ||
@@ -604,6 +608,19 @@ static int _od_runtime_resume(struct device *dev) | |||
604 | 608 | ||
605 | return pm_generic_runtime_resume(dev); | 609 | return pm_generic_runtime_resume(dev); |
606 | } | 610 | } |
611 | |||
612 | static int _od_fail_runtime_suspend(struct device *dev) | ||
613 | { | ||
614 | dev_warn(dev, "%s: FIXME: missing hwmod/omap_dev info\n", __func__); | ||
615 | return -ENODEV; | ||
616 | } | ||
617 | |||
618 | static int _od_fail_runtime_resume(struct device *dev) | ||
619 | { | ||
620 | dev_warn(dev, "%s: FIXME: missing hwmod/omap_dev info\n", __func__); | ||
621 | return -ENODEV; | ||
622 | } | ||
623 | |||
607 | #endif | 624 | #endif |
608 | 625 | ||
609 | #ifdef CONFIG_SUSPEND | 626 | #ifdef CONFIG_SUSPEND |
@@ -657,6 +674,13 @@ static int _od_resume_noirq(struct device *dev) | |||
657 | #define _od_resume_noirq NULL | 674 | #define _od_resume_noirq NULL |
658 | #endif | 675 | #endif |
659 | 676 | ||
677 | struct dev_pm_domain omap_device_fail_pm_domain = { | ||
678 | .ops = { | ||
679 | SET_RUNTIME_PM_OPS(_od_fail_runtime_suspend, | ||
680 | _od_fail_runtime_resume, NULL) | ||
681 | } | ||
682 | }; | ||
683 | |||
660 | struct dev_pm_domain omap_device_pm_domain = { | 684 | struct dev_pm_domain omap_device_pm_domain = { |
661 | .ops = { | 685 | .ops = { |
662 | SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, | 686 | SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, |
diff --git a/arch/arm/mach-omap2/omap_device.h b/arch/arm/mach-omap2/omap_device.h index 17ca1aec2710..78c02b355179 100644 --- a/arch/arm/mach-omap2/omap_device.h +++ b/arch/arm/mach-omap2/omap_device.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "omap_hwmod.h" | 29 | #include "omap_hwmod.h" |
30 | 30 | ||
31 | extern struct dev_pm_domain omap_device_pm_domain; | 31 | extern struct dev_pm_domain omap_device_pm_domain; |
32 | extern struct dev_pm_domain omap_device_fail_pm_domain; | ||
32 | 33 | ||
33 | /* omap_device._state values */ | 34 | /* omap_device._state values */ |
34 | #define OMAP_DEVICE_STATE_UNKNOWN 0 | 35 | #define OMAP_DEVICE_STATE_UNKNOWN 0 |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index e3f0ecaf87dd..8a1b5e0bad40 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -399,7 +399,7 @@ static int _set_clockactivity(struct omap_hwmod *oh, u8 clockact, u32 *v) | |||
399 | } | 399 | } |
400 | 400 | ||
401 | /** | 401 | /** |
402 | * _set_softreset: set OCP_SYSCONFIG.CLOCKACTIVITY bits in @v | 402 | * _set_softreset: set OCP_SYSCONFIG.SOFTRESET bit in @v |
403 | * @oh: struct omap_hwmod * | 403 | * @oh: struct omap_hwmod * |
404 | * @v: pointer to register contents to modify | 404 | * @v: pointer to register contents to modify |
405 | * | 405 | * |
@@ -427,6 +427,36 @@ static int _set_softreset(struct omap_hwmod *oh, u32 *v) | |||
427 | } | 427 | } |
428 | 428 | ||
429 | /** | 429 | /** |
430 | * _clear_softreset: clear OCP_SYSCONFIG.SOFTRESET bit in @v | ||
431 | * @oh: struct omap_hwmod * | ||
432 | * @v: pointer to register contents to modify | ||
433 | * | ||
434 | * Clear the SOFTRESET bit in @v for hwmod @oh. Returns -EINVAL upon | ||
435 | * error or 0 upon success. | ||
436 | */ | ||
437 | static int _clear_softreset(struct omap_hwmod *oh, u32 *v) | ||
438 | { | ||
439 | u32 softrst_mask; | ||
440 | |||
441 | if (!oh->class->sysc || | ||
442 | !(oh->class->sysc->sysc_flags & SYSC_HAS_SOFTRESET)) | ||
443 | return -EINVAL; | ||
444 | |||
445 | if (!oh->class->sysc->sysc_fields) { | ||
446 | WARN(1, | ||
447 | "omap_hwmod: %s: sysc_fields absent for sysconfig class\n", | ||
448 | oh->name); | ||
449 | return -EINVAL; | ||
450 | } | ||
451 | |||
452 | softrst_mask = (0x1 << oh->class->sysc->sysc_fields->srst_shift); | ||
453 | |||
454 | *v &= ~softrst_mask; | ||
455 | |||
456 | return 0; | ||
457 | } | ||
458 | |||
459 | /** | ||
430 | * _wait_softreset_complete - wait for an OCP softreset to complete | 460 | * _wait_softreset_complete - wait for an OCP softreset to complete |
431 | * @oh: struct omap_hwmod * to wait on | 461 | * @oh: struct omap_hwmod * to wait on |
432 | * | 462 | * |
@@ -785,6 +815,7 @@ static int _init_interface_clks(struct omap_hwmod *oh) | |||
785 | pr_warning("omap_hwmod: %s: cannot clk_get interface_clk %s\n", | 815 | pr_warning("omap_hwmod: %s: cannot clk_get interface_clk %s\n", |
786 | oh->name, os->clk); | 816 | oh->name, os->clk); |
787 | ret = -EINVAL; | 817 | ret = -EINVAL; |
818 | continue; | ||
788 | } | 819 | } |
789 | os->_clk = c; | 820 | os->_clk = c; |
790 | /* | 821 | /* |
@@ -821,6 +852,7 @@ static int _init_opt_clks(struct omap_hwmod *oh) | |||
821 | pr_warning("omap_hwmod: %s: cannot clk_get opt_clk %s\n", | 852 | pr_warning("omap_hwmod: %s: cannot clk_get opt_clk %s\n", |
822 | oh->name, oc->clk); | 853 | oh->name, oc->clk); |
823 | ret = -EINVAL; | 854 | ret = -EINVAL; |
855 | continue; | ||
824 | } | 856 | } |
825 | oc->_clk = c; | 857 | oc->_clk = c; |
826 | /* | 858 | /* |
@@ -1911,6 +1943,12 @@ static int _ocp_softreset(struct omap_hwmod *oh) | |||
1911 | ret = _set_softreset(oh, &v); | 1943 | ret = _set_softreset(oh, &v); |
1912 | if (ret) | 1944 | if (ret) |
1913 | goto dis_opt_clks; | 1945 | goto dis_opt_clks; |
1946 | |||
1947 | _write_sysconfig(v, oh); | ||
1948 | ret = _clear_softreset(oh, &v); | ||
1949 | if (ret) | ||
1950 | goto dis_opt_clks; | ||
1951 | |||
1914 | _write_sysconfig(v, oh); | 1952 | _write_sysconfig(v, oh); |
1915 | 1953 | ||
1916 | if (oh->class->sysc->srst_udelay) | 1954 | if (oh->class->sysc->srst_udelay) |
@@ -2326,38 +2364,80 @@ static int _shutdown(struct omap_hwmod *oh) | |||
2326 | return 0; | 2364 | return 0; |
2327 | } | 2365 | } |
2328 | 2366 | ||
2367 | static int of_dev_find_hwmod(struct device_node *np, | ||
2368 | struct omap_hwmod *oh) | ||
2369 | { | ||
2370 | int count, i, res; | ||
2371 | const char *p; | ||
2372 | |||
2373 | count = of_property_count_strings(np, "ti,hwmods"); | ||
2374 | if (count < 1) | ||
2375 | return -ENODEV; | ||
2376 | |||
2377 | for (i = 0; i < count; i++) { | ||
2378 | res = of_property_read_string_index(np, "ti,hwmods", | ||
2379 | i, &p); | ||
2380 | if (res) | ||
2381 | continue; | ||
2382 | if (!strcmp(p, oh->name)) { | ||
2383 | pr_debug("omap_hwmod: dt %s[%i] uses hwmod %s\n", | ||
2384 | np->name, i, oh->name); | ||
2385 | return i; | ||
2386 | } | ||
2387 | } | ||
2388 | |||
2389 | return -ENODEV; | ||
2390 | } | ||
2391 | |||
2329 | /** | 2392 | /** |
2330 | * of_dev_hwmod_lookup - look up needed hwmod from dt blob | 2393 | * of_dev_hwmod_lookup - look up needed hwmod from dt blob |
2331 | * @np: struct device_node * | 2394 | * @np: struct device_node * |
2332 | * @oh: struct omap_hwmod * | 2395 | * @oh: struct omap_hwmod * |
2396 | * @index: index of the entry found | ||
2397 | * @found: struct device_node * found or NULL | ||
2333 | * | 2398 | * |
2334 | * Parse the dt blob and find out needed hwmod. Recursive function is | 2399 | * Parse the dt blob and find out needed hwmod. Recursive function is |
2335 | * implemented to take care hierarchical dt blob parsing. | 2400 | * implemented to take care hierarchical dt blob parsing. |
2336 | * Return: The device node on success or NULL on failure. | 2401 | * Return: Returns 0 on success, -ENODEV when not found. |
2337 | */ | 2402 | */ |
2338 | static struct device_node *of_dev_hwmod_lookup(struct device_node *np, | 2403 | static int of_dev_hwmod_lookup(struct device_node *np, |
2339 | struct omap_hwmod *oh) | 2404 | struct omap_hwmod *oh, |
2405 | int *index, | ||
2406 | struct device_node **found) | ||
2340 | { | 2407 | { |
2341 | struct device_node *np0 = NULL, *np1 = NULL; | 2408 | struct device_node *np0 = NULL; |
2342 | const char *p; | 2409 | int res; |
2410 | |||
2411 | res = of_dev_find_hwmod(np, oh); | ||
2412 | if (res >= 0) { | ||
2413 | *found = np; | ||
2414 | *index = res; | ||
2415 | return 0; | ||
2416 | } | ||
2343 | 2417 | ||
2344 | for_each_child_of_node(np, np0) { | 2418 | for_each_child_of_node(np, np0) { |
2345 | if (of_find_property(np0, "ti,hwmods", NULL)) { | 2419 | struct device_node *fc; |
2346 | p = of_get_property(np0, "ti,hwmods", NULL); | 2420 | int i; |
2347 | if (!strcmp(p, oh->name)) | 2421 | |
2348 | return np0; | 2422 | res = of_dev_hwmod_lookup(np0, oh, &i, &fc); |
2349 | np1 = of_dev_hwmod_lookup(np0, oh); | 2423 | if (res == 0) { |
2350 | if (np1) | 2424 | *found = fc; |
2351 | return np1; | 2425 | *index = i; |
2426 | return 0; | ||
2352 | } | 2427 | } |
2353 | } | 2428 | } |
2354 | return NULL; | 2429 | |
2430 | *found = NULL; | ||
2431 | *index = 0; | ||
2432 | |||
2433 | return -ENODEV; | ||
2355 | } | 2434 | } |
2356 | 2435 | ||
2357 | /** | 2436 | /** |
2358 | * _init_mpu_rt_base - populate the virtual address for a hwmod | 2437 | * _init_mpu_rt_base - populate the virtual address for a hwmod |
2359 | * @oh: struct omap_hwmod * to locate the virtual address | 2438 | * @oh: struct omap_hwmod * to locate the virtual address |
2360 | * @data: (unused, caller should pass NULL) | 2439 | * @data: (unused, caller should pass NULL) |
2440 | * @index: index of the reg entry iospace in device tree | ||
2361 | * @np: struct device_node * of the IP block's device node in the DT data | 2441 | * @np: struct device_node * of the IP block's device node in the DT data |
2362 | * | 2442 | * |
2363 | * Cache the virtual address used by the MPU to access this IP block's | 2443 | * Cache the virtual address used by the MPU to access this IP block's |
@@ -2368,7 +2448,7 @@ static struct device_node *of_dev_hwmod_lookup(struct device_node *np, | |||
2368 | * -ENXIO on absent or invalid register target address space. | 2448 | * -ENXIO on absent or invalid register target address space. |
2369 | */ | 2449 | */ |
2370 | static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data, | 2450 | static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data, |
2371 | struct device_node *np) | 2451 | int index, struct device_node *np) |
2372 | { | 2452 | { |
2373 | struct omap_hwmod_addr_space *mem; | 2453 | struct omap_hwmod_addr_space *mem; |
2374 | void __iomem *va_start = NULL; | 2454 | void __iomem *va_start = NULL; |
@@ -2390,13 +2470,17 @@ static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data, | |||
2390 | if (!np) | 2470 | if (!np) |
2391 | return -ENXIO; | 2471 | return -ENXIO; |
2392 | 2472 | ||
2393 | va_start = of_iomap(np, oh->mpu_rt_idx); | 2473 | va_start = of_iomap(np, index + oh->mpu_rt_idx); |
2394 | } else { | 2474 | } else { |
2395 | va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start); | 2475 | va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start); |
2396 | } | 2476 | } |
2397 | 2477 | ||
2398 | if (!va_start) { | 2478 | if (!va_start) { |
2399 | pr_err("omap_hwmod: %s: Could not ioremap\n", oh->name); | 2479 | if (mem) |
2480 | pr_err("omap_hwmod: %s: Could not ioremap\n", oh->name); | ||
2481 | else | ||
2482 | pr_err("omap_hwmod: %s: Missing dt reg%i for %s\n", | ||
2483 | oh->name, index, np->full_name); | ||
2400 | return -ENXIO; | 2484 | return -ENXIO; |
2401 | } | 2485 | } |
2402 | 2486 | ||
@@ -2422,17 +2506,29 @@ static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data, | |||
2422 | */ | 2506 | */ |
2423 | static int __init _init(struct omap_hwmod *oh, void *data) | 2507 | static int __init _init(struct omap_hwmod *oh, void *data) |
2424 | { | 2508 | { |
2425 | int r; | 2509 | int r, index; |
2426 | struct device_node *np = NULL; | 2510 | struct device_node *np = NULL; |
2427 | 2511 | ||
2428 | if (oh->_state != _HWMOD_STATE_REGISTERED) | 2512 | if (oh->_state != _HWMOD_STATE_REGISTERED) |
2429 | return 0; | 2513 | return 0; |
2430 | 2514 | ||
2431 | if (of_have_populated_dt()) | 2515 | if (of_have_populated_dt()) { |
2432 | np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh); | 2516 | struct device_node *bus; |
2517 | |||
2518 | bus = of_find_node_by_name(NULL, "ocp"); | ||
2519 | if (!bus) | ||
2520 | return -ENODEV; | ||
2521 | |||
2522 | r = of_dev_hwmod_lookup(bus, oh, &index, &np); | ||
2523 | if (r) | ||
2524 | pr_debug("omap_hwmod: %s missing dt data\n", oh->name); | ||
2525 | else if (np && index) | ||
2526 | pr_warn("omap_hwmod: %s using broken dt data from %s\n", | ||
2527 | oh->name, np->name); | ||
2528 | } | ||
2433 | 2529 | ||
2434 | if (oh->class->sysc) { | 2530 | if (oh->class->sysc) { |
2435 | r = _init_mpu_rt_base(oh, NULL, np); | 2531 | r = _init_mpu_rt_base(oh, NULL, index, np); |
2436 | if (r < 0) { | 2532 | if (r < 0) { |
2437 | WARN(1, "omap_hwmod: %s: doesn't have mpu register target base\n", | 2533 | WARN(1, "omap_hwmod: %s: doesn't have mpu register target base\n", |
2438 | oh->name); | 2534 | oh->name); |
@@ -3169,6 +3265,11 @@ int omap_hwmod_softreset(struct omap_hwmod *oh) | |||
3169 | goto error; | 3265 | goto error; |
3170 | _write_sysconfig(v, oh); | 3266 | _write_sysconfig(v, oh); |
3171 | 3267 | ||
3268 | ret = _clear_softreset(oh, &v); | ||
3269 | if (ret) | ||
3270 | goto error; | ||
3271 | _write_sysconfig(v, oh); | ||
3272 | |||
3172 | error: | 3273 | error: |
3173 | return ret; | 3274 | return ret; |
3174 | } | 3275 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c index 56cebb05509e..d23c77fadb31 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | |||
@@ -796,7 +796,7 @@ struct omap_hwmod omap2xxx_counter_32k_hwmod = { | |||
796 | 796 | ||
797 | /* gpmc */ | 797 | /* gpmc */ |
798 | static struct omap_hwmod_irq_info omap2xxx_gpmc_irqs[] = { | 798 | static struct omap_hwmod_irq_info omap2xxx_gpmc_irqs[] = { |
799 | { .irq = 20 }, | 799 | { .irq = 20 + OMAP_INTC_START, }, |
800 | { .irq = -1 } | 800 | { .irq = -1 } |
801 | }; | 801 | }; |
802 | 802 | ||
@@ -841,7 +841,7 @@ static struct omap_hwmod_class omap2_rng_hwmod_class = { | |||
841 | }; | 841 | }; |
842 | 842 | ||
843 | static struct omap_hwmod_irq_info omap2_rng_mpu_irqs[] = { | 843 | static struct omap_hwmod_irq_info omap2_rng_mpu_irqs[] = { |
844 | { .irq = 52 }, | 844 | { .irq = 52 + OMAP_INTC_START, }, |
845 | { .irq = -1 } | 845 | { .irq = -1 } |
846 | }; | 846 | }; |
847 | 847 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 9e56fabd7fa3..4c3b1e6df508 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -1943,7 +1943,8 @@ static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = { | |||
1943 | .syss_offs = 0x0014, | 1943 | .syss_offs = 0x0014, |
1944 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY | | 1944 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY | |
1945 | SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP | | 1945 | SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP | |
1946 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | 1946 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | |
1947 | SYSS_HAS_RESET_STATUS), | ||
1947 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | 1948 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
1948 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | 1949 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), |
1949 | .sysc_fields = &omap_hwmod_sysc_type1, | 1950 | .sysc_fields = &omap_hwmod_sysc_type1, |
@@ -2021,15 +2022,7 @@ static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = { | |||
2021 | * hence HWMOD_SWSUP_MSTANDBY | 2022 | * hence HWMOD_SWSUP_MSTANDBY |
2022 | */ | 2023 | */ |
2023 | 2024 | ||
2024 | /* | 2025 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, |
2025 | * During system boot; If the hwmod framework resets the module | ||
2026 | * the module will have smart idle settings; which can lead to deadlock | ||
2027 | * (above Errata Id:i660); so, dont reset the module during boot; | ||
2028 | * Use HWMOD_INIT_NO_RESET. | ||
2029 | */ | ||
2030 | |||
2031 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY | | ||
2032 | HWMOD_INIT_NO_RESET, | ||
2033 | }; | 2026 | }; |
2034 | 2027 | ||
2035 | /* | 2028 | /* |
@@ -2172,7 +2165,7 @@ static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class = { | |||
2172 | }; | 2165 | }; |
2173 | 2166 | ||
2174 | static struct omap_hwmod_irq_info omap3xxx_gpmc_irqs[] = { | 2167 | static struct omap_hwmod_irq_info omap3xxx_gpmc_irqs[] = { |
2175 | { .irq = 20 }, | 2168 | { .irq = 20 + OMAP_INTC_START, }, |
2176 | { .irq = -1 } | 2169 | { .irq = -1 } |
2177 | }; | 2170 | }; |
2178 | 2171 | ||
@@ -3006,7 +2999,7 @@ static struct omap_mmu_dev_attr mmu_isp_dev_attr = { | |||
3006 | 2999 | ||
3007 | static struct omap_hwmod omap3xxx_mmu_isp_hwmod; | 3000 | static struct omap_hwmod omap3xxx_mmu_isp_hwmod; |
3008 | static struct omap_hwmod_irq_info omap3xxx_mmu_isp_irqs[] = { | 3001 | static struct omap_hwmod_irq_info omap3xxx_mmu_isp_irqs[] = { |
3009 | { .irq = 24 }, | 3002 | { .irq = 24 + OMAP_INTC_START, }, |
3010 | { .irq = -1 } | 3003 | { .irq = -1 } |
3011 | }; | 3004 | }; |
3012 | 3005 | ||
@@ -3048,7 +3041,7 @@ static struct omap_mmu_dev_attr mmu_iva_dev_attr = { | |||
3048 | 3041 | ||
3049 | static struct omap_hwmod omap3xxx_mmu_iva_hwmod; | 3042 | static struct omap_hwmod omap3xxx_mmu_iva_hwmod; |
3050 | static struct omap_hwmod_irq_info omap3xxx_mmu_iva_irqs[] = { | 3043 | static struct omap_hwmod_irq_info omap3xxx_mmu_iva_irqs[] = { |
3051 | { .irq = 28 }, | 3044 | { .irq = 28 + OMAP_INTC_START, }, |
3052 | { .irq = -1 } | 3045 | { .irq = -1 } |
3053 | }; | 3046 | }; |
3054 | 3047 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 1e5b12cb8246..3318cae96e7d 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -2937,7 +2937,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_usb_host_hs_sysc = { | |||
2937 | .sysc_offs = 0x0010, | 2937 | .sysc_offs = 0x0010, |
2938 | .syss_offs = 0x0014, | 2938 | .syss_offs = 0x0014, |
2939 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE | | 2939 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE | |
2940 | SYSC_HAS_SOFTRESET), | 2940 | SYSC_HAS_SOFTRESET | SYSC_HAS_RESET_STATUS), |
2941 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | 2941 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
2942 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | 2942 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | |
2943 | MSTANDBY_SMART | MSTANDBY_SMART_WKUP), | 2943 | MSTANDBY_SMART | MSTANDBY_SMART_WKUP), |
@@ -3001,15 +3001,7 @@ static struct omap_hwmod omap44xx_usb_host_hs_hwmod = { | |||
3001 | * hence HWMOD_SWSUP_MSTANDBY | 3001 | * hence HWMOD_SWSUP_MSTANDBY |
3002 | */ | 3002 | */ |
3003 | 3003 | ||
3004 | /* | 3004 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, |
3005 | * During system boot; If the hwmod framework resets the module | ||
3006 | * the module will have smart idle settings; which can lead to deadlock | ||
3007 | * (above Errata Id:i660); so, dont reset the module during boot; | ||
3008 | * Use HWMOD_INIT_NO_RESET. | ||
3009 | */ | ||
3010 | |||
3011 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY | | ||
3012 | HWMOD_INIT_NO_RESET, | ||
3013 | }; | 3005 | }; |
3014 | 3006 | ||
3015 | /* | 3007 | /* |
diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c index 9e08d6994a0b..e297d6231c3a 100644 --- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c | |||
@@ -1544,7 +1544,8 @@ static struct omap_hwmod_class_sysconfig omap54xx_usb_host_hs_sysc = { | |||
1544 | .rev_offs = 0x0000, | 1544 | .rev_offs = 0x0000, |
1545 | .sysc_offs = 0x0010, | 1545 | .sysc_offs = 0x0010, |
1546 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS | | 1546 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS | |
1547 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | 1547 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | |
1548 | SYSC_HAS_RESET_STATUS), | ||
1548 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | 1549 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
1549 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | 1550 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | |
1550 | MSTANDBY_SMART | MSTANDBY_SMART_WKUP), | 1551 | MSTANDBY_SMART | MSTANDBY_SMART_WKUP), |
@@ -1598,15 +1599,7 @@ static struct omap_hwmod omap54xx_usb_host_hs_hwmod = { | |||
1598 | * hence HWMOD_SWSUP_MSTANDBY | 1599 | * hence HWMOD_SWSUP_MSTANDBY |
1599 | */ | 1600 | */ |
1600 | 1601 | ||
1601 | /* | 1602 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, |
1602 | * During system boot; If the hwmod framework resets the module | ||
1603 | * the module will have smart idle settings; which can lead to deadlock | ||
1604 | * (above Errata Id:i660); so, dont reset the module during boot; | ||
1605 | * Use HWMOD_INIT_NO_RESET. | ||
1606 | */ | ||
1607 | |||
1608 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY | | ||
1609 | HWMOD_INIT_NO_RESET, | ||
1610 | .main_clk = "l3init_60m_fclk", | 1603 | .main_clk = "l3init_60m_fclk", |
1611 | .prcm = { | 1604 | .prcm = { |
1612 | .omap4 = { | 1605 | .omap4 = { |
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c index db32d5380b11..18f333c440db 100644 --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c | |||
@@ -1637,7 +1637,7 @@ static struct omap_hwmod dra7xx_uart1_hwmod = { | |||
1637 | .class = &dra7xx_uart_hwmod_class, | 1637 | .class = &dra7xx_uart_hwmod_class, |
1638 | .clkdm_name = "l4per_clkdm", | 1638 | .clkdm_name = "l4per_clkdm", |
1639 | .main_clk = "uart1_gfclk_mux", | 1639 | .main_clk = "uart1_gfclk_mux", |
1640 | .flags = HWMOD_SWSUP_SIDLE_ACT, | 1640 | .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP2UART1_FLAGS, |
1641 | .prcm = { | 1641 | .prcm = { |
1642 | .omap4 = { | 1642 | .omap4 = { |
1643 | .clkctrl_offs = DRA7XX_CM_L4PER_UART1_CLKCTRL_OFFSET, | 1643 | .clkctrl_offs = DRA7XX_CM_L4PER_UART1_CLKCTRL_OFFSET, |
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 10c71450cf63..39f020c982e8 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c | |||
@@ -139,6 +139,7 @@ struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { | |||
139 | 139 | ||
140 | static struct pdata_init pdata_quirks[] __initdata = { | 140 | static struct pdata_init pdata_quirks[] __initdata = { |
141 | #ifdef CONFIG_ARCH_OMAP3 | 141 | #ifdef CONFIG_ARCH_OMAP3 |
142 | { "nokia,omap3-n900", hsmmc2_internal_input_clk, }, | ||
142 | { "nokia,omap3-n9", hsmmc2_internal_input_clk, }, | 143 | { "nokia,omap3-n9", hsmmc2_internal_input_clk, }, |
143 | { "nokia,omap3-n950", hsmmc2_internal_input_clk, }, | 144 | { "nokia,omap3-n950", hsmmc2_internal_input_clk, }, |
144 | { "isee,omap3-igep0020", omap3_igep0020_legacy_init, }, | 145 | { "isee,omap3-igep0020", omap3_igep0020_legacy_init, }, |
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index e233dfcbc186..93a2a6e4260f 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -128,7 +128,8 @@ skip_voltdm: | |||
128 | for (i = 0; i < pwrdm->banks; i++) | 128 | for (i = 0; i < pwrdm->banks; i++) |
129 | pwrdm->ret_mem_off_counter[i] = 0; | 129 | pwrdm->ret_mem_off_counter[i] = 0; |
130 | 130 | ||
131 | arch_pwrdm->pwrdm_wait_transition(pwrdm); | 131 | if (arch_pwrdm && arch_pwrdm->pwrdm_wait_transition) |
132 | arch_pwrdm->pwrdm_wait_transition(pwrdm); | ||
132 | pwrdm->state = pwrdm_read_pwrst(pwrdm); | 133 | pwrdm->state = pwrdm_read_pwrst(pwrdm); |
133 | pwrdm->state_counter[pwrdm->state] = 1; | 134 | pwrdm->state_counter[pwrdm->state] = 1; |
134 | 135 | ||
diff --git a/arch/arm/mach-pxa/include/mach/lubbock.h b/arch/arm/mach-pxa/include/mach/lubbock.h index 2a086e8373eb..958cd6af9384 100644 --- a/arch/arm/mach-pxa/include/mach/lubbock.h +++ b/arch/arm/mach-pxa/include/mach/lubbock.h | |||
@@ -10,6 +10,8 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <mach/irqs.h> | ||
14 | |||
13 | #define LUBBOCK_ETH_PHYS PXA_CS3_PHYS | 15 | #define LUBBOCK_ETH_PHYS PXA_CS3_PHYS |
14 | 16 | ||
15 | #define LUBBOCK_FPGA_PHYS PXA_CS2_PHYS | 17 | #define LUBBOCK_FPGA_PHYS PXA_CS2_PHYS |
diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c index 0d5dd646f61f..263b15249b5b 100644 --- a/arch/arm/mach-pxa/reset.c +++ b/arch/arm/mach-pxa/reset.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <mach/regs-ost.h> | 14 | #include <mach/regs-ost.h> |
15 | #include <mach/reset.h> | 15 | #include <mach/reset.h> |
16 | #include <mach/smemc.h> | ||
16 | 17 | ||
17 | unsigned int reset_status; | 18 | unsigned int reset_status; |
18 | EXPORT_SYMBOL(reset_status); | 19 | EXPORT_SYMBOL(reset_status); |
@@ -81,6 +82,12 @@ static void do_hw_reset(void) | |||
81 | writel_relaxed(OSSR_M3, OSSR); | 82 | writel_relaxed(OSSR_M3, OSSR); |
82 | /* ... in 100 ms */ | 83 | /* ... in 100 ms */ |
83 | writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3); | 84 | writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3); |
85 | /* | ||
86 | * SDRAM hangs on watchdog reset on Marvell PXA270 (erratum 71) | ||
87 | * we put SDRAM into self-refresh to prevent that | ||
88 | */ | ||
89 | while (1) | ||
90 | writel_relaxed(MDREFR_SLFRSH, MDREFR); | ||
84 | } | 91 | } |
85 | 92 | ||
86 | void pxa_restart(enum reboot_mode mode, const char *cmd) | 93 | void pxa_restart(enum reboot_mode mode, const char *cmd) |
@@ -104,4 +111,3 @@ void pxa_restart(enum reboot_mode mode, const char *cmd) | |||
104 | break; | 111 | break; |
105 | } | 112 | } |
106 | } | 113 | } |
107 | |||
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 0206b915a6f6..ef5557b807ed 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -425,57 +425,57 @@ static struct platform_device tosa_power_device = { | |||
425 | * Tosa Keyboard | 425 | * Tosa Keyboard |
426 | */ | 426 | */ |
427 | static const uint32_t tosakbd_keymap[] = { | 427 | static const uint32_t tosakbd_keymap[] = { |
428 | KEY(0, 2, KEY_W), | 428 | KEY(0, 1, KEY_W), |
429 | KEY(0, 6, KEY_K), | 429 | KEY(0, 5, KEY_K), |
430 | KEY(0, 7, KEY_BACKSPACE), | 430 | KEY(0, 6, KEY_BACKSPACE), |
431 | KEY(0, 8, KEY_P), | 431 | KEY(0, 7, KEY_P), |
432 | KEY(1, 1, KEY_Q), | 432 | KEY(1, 0, KEY_Q), |
433 | KEY(1, 2, KEY_E), | 433 | KEY(1, 1, KEY_E), |
434 | KEY(1, 3, KEY_T), | 434 | KEY(1, 2, KEY_T), |
435 | KEY(1, 4, KEY_Y), | 435 | KEY(1, 3, KEY_Y), |
436 | KEY(1, 6, KEY_O), | 436 | KEY(1, 5, KEY_O), |
437 | KEY(1, 7, KEY_I), | 437 | KEY(1, 6, KEY_I), |
438 | KEY(1, 8, KEY_COMMA), | 438 | KEY(1, 7, KEY_COMMA), |
439 | KEY(2, 1, KEY_A), | 439 | KEY(2, 0, KEY_A), |
440 | KEY(2, 2, KEY_D), | 440 | KEY(2, 1, KEY_D), |
441 | KEY(2, 3, KEY_G), | 441 | KEY(2, 2, KEY_G), |
442 | KEY(2, 4, KEY_U), | 442 | KEY(2, 3, KEY_U), |
443 | KEY(2, 6, KEY_L), | 443 | KEY(2, 5, KEY_L), |
444 | KEY(2, 7, KEY_ENTER), | 444 | KEY(2, 6, KEY_ENTER), |
445 | KEY(2, 8, KEY_DOT), | 445 | KEY(2, 7, KEY_DOT), |
446 | KEY(3, 1, KEY_Z), | 446 | KEY(3, 0, KEY_Z), |
447 | KEY(3, 2, KEY_C), | 447 | KEY(3, 1, KEY_C), |
448 | KEY(3, 3, KEY_V), | 448 | KEY(3, 2, KEY_V), |
449 | KEY(3, 4, KEY_J), | 449 | KEY(3, 3, KEY_J), |
450 | KEY(3, 5, TOSA_KEY_ADDRESSBOOK), | 450 | KEY(3, 4, TOSA_KEY_ADDRESSBOOK), |
451 | KEY(3, 6, TOSA_KEY_CANCEL), | 451 | KEY(3, 5, TOSA_KEY_CANCEL), |
452 | KEY(3, 7, TOSA_KEY_CENTER), | 452 | KEY(3, 6, TOSA_KEY_CENTER), |
453 | KEY(3, 8, TOSA_KEY_OK), | 453 | KEY(3, 7, TOSA_KEY_OK), |
454 | KEY(3, 9, KEY_LEFTSHIFT), | 454 | KEY(3, 8, KEY_LEFTSHIFT), |
455 | KEY(4, 1, KEY_S), | 455 | KEY(4, 0, KEY_S), |
456 | KEY(4, 2, KEY_R), | 456 | KEY(4, 1, KEY_R), |
457 | KEY(4, 3, KEY_B), | 457 | KEY(4, 2, KEY_B), |
458 | KEY(4, 4, KEY_N), | 458 | KEY(4, 3, KEY_N), |
459 | KEY(4, 5, TOSA_KEY_CALENDAR), | 459 | KEY(4, 4, TOSA_KEY_CALENDAR), |
460 | KEY(4, 6, TOSA_KEY_HOMEPAGE), | 460 | KEY(4, 5, TOSA_KEY_HOMEPAGE), |
461 | KEY(4, 7, KEY_LEFTCTRL), | 461 | KEY(4, 6, KEY_LEFTCTRL), |
462 | KEY(4, 8, TOSA_KEY_LIGHT), | 462 | KEY(4, 7, TOSA_KEY_LIGHT), |
463 | KEY(4, 10, KEY_RIGHTSHIFT), | 463 | KEY(4, 9, KEY_RIGHTSHIFT), |
464 | KEY(5, 1, KEY_TAB), | 464 | KEY(5, 0, KEY_TAB), |
465 | KEY(5, 2, KEY_SLASH), | 465 | KEY(5, 1, KEY_SLASH), |
466 | KEY(5, 3, KEY_H), | 466 | KEY(5, 2, KEY_H), |
467 | KEY(5, 4, KEY_M), | 467 | KEY(5, 3, KEY_M), |
468 | KEY(5, 5, TOSA_KEY_MENU), | 468 | KEY(5, 4, TOSA_KEY_MENU), |
469 | KEY(5, 7, KEY_UP), | 469 | KEY(5, 6, KEY_UP), |
470 | KEY(5, 11, TOSA_KEY_FN), | 470 | KEY(5, 10, TOSA_KEY_FN), |
471 | KEY(6, 1, KEY_X), | 471 | KEY(6, 0, KEY_X), |
472 | KEY(6, 2, KEY_F), | 472 | KEY(6, 1, KEY_F), |
473 | KEY(6, 3, KEY_SPACE), | 473 | KEY(6, 2, KEY_SPACE), |
474 | KEY(6, 4, KEY_APOSTROPHE), | 474 | KEY(6, 3, KEY_APOSTROPHE), |
475 | KEY(6, 5, TOSA_KEY_MAIL), | 475 | KEY(6, 4, TOSA_KEY_MAIL), |
476 | KEY(6, 6, KEY_LEFT), | 476 | KEY(6, 5, KEY_LEFT), |
477 | KEY(6, 7, KEY_DOWN), | 477 | KEY(6, 6, KEY_DOWN), |
478 | KEY(6, 8, KEY_RIGHT), | 478 | KEY(6, 7, KEY_RIGHT), |
479 | }; | 479 | }; |
480 | 480 | ||
481 | static struct matrix_keymap_data tosakbd_keymap_data = { | 481 | static struct matrix_keymap_data tosakbd_keymap_data = { |
diff --git a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c index 7eb9a10fc1af..2fddf38192df 100644 --- a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c +++ b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | |||
@@ -8,8 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/clk-provider.h> | ||
12 | #include <linux/irqchip.h> | ||
13 | #include <linux/of_platform.h> | 11 | #include <linux/of_platform.h> |
14 | 12 | ||
15 | #include <asm/mach/arch.h> | 13 | #include <asm/mach/arch.h> |
@@ -48,15 +46,9 @@ static void __init s3c64xx_dt_map_io(void) | |||
48 | panic("SoC is not S3C64xx!"); | 46 | panic("SoC is not S3C64xx!"); |
49 | } | 47 | } |
50 | 48 | ||
51 | static void __init s3c64xx_dt_init_irq(void) | ||
52 | { | ||
53 | of_clk_init(NULL); | ||
54 | samsung_wdt_reset_of_init(); | ||
55 | irqchip_init(); | ||
56 | }; | ||
57 | |||
58 | static void __init s3c64xx_dt_init_machine(void) | 49 | static void __init s3c64xx_dt_init_machine(void) |
59 | { | 50 | { |
51 | samsung_wdt_reset_of_init(); | ||
60 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 52 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
61 | } | 53 | } |
62 | 54 | ||
@@ -79,7 +71,6 @@ DT_MACHINE_START(S3C6400_DT, "Samsung S3C64xx (Flattened Device Tree)") | |||
79 | /* Maintainer: Tomasz Figa <tomasz.figa@gmail.com> */ | 71 | /* Maintainer: Tomasz Figa <tomasz.figa@gmail.com> */ |
80 | .dt_compat = s3c64xx_dt_compat, | 72 | .dt_compat = s3c64xx_dt_compat, |
81 | .map_io = s3c64xx_dt_map_io, | 73 | .map_io = s3c64xx_dt_map_io, |
82 | .init_irq = s3c64xx_dt_init_irq, | ||
83 | .init_machine = s3c64xx_dt_init_machine, | 74 | .init_machine = s3c64xx_dt_init_machine, |
84 | .restart = s3c64xx_dt_restart, | 75 | .restart = s3c64xx_dt_restart, |
85 | MACHINE_END | 76 | MACHINE_END |
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c index c9808c684152..8443a27bca2f 100644 --- a/arch/arm/mach-sa1100/assabet.c +++ b/arch/arm/mach-sa1100/assabet.c | |||
@@ -75,12 +75,143 @@ void ASSABET_BCR_frob(unsigned int mask, unsigned int val) | |||
75 | 75 | ||
76 | EXPORT_SYMBOL(ASSABET_BCR_frob); | 76 | EXPORT_SYMBOL(ASSABET_BCR_frob); |
77 | 77 | ||
78 | /* | ||
79 | * The codec reset goes to three devices, so we need to release | ||
80 | * the rest when any one of these requests it. However, that | ||
81 | * causes the ADV7171 to consume around 100mA - more than half | ||
82 | * the LCD-blanked power. | ||
83 | * | ||
84 | * With the ADV7171, LCD and backlight enabled, we go over | ||
85 | * budget on the MAX846 Li-Ion charger, and if no Li-Ion battery | ||
86 | * is connected, the Assabet crashes. | ||
87 | */ | ||
88 | #define RST_UCB1X00 (1 << 0) | ||
89 | #define RST_UDA1341 (1 << 1) | ||
90 | #define RST_ADV7171 (1 << 2) | ||
91 | |||
92 | #define SDA GPIO_GPIO(15) | ||
93 | #define SCK GPIO_GPIO(18) | ||
94 | #define MOD GPIO_GPIO(17) | ||
95 | |||
96 | static void adv7171_start(void) | ||
97 | { | ||
98 | GPSR = SCK; | ||
99 | udelay(1); | ||
100 | GPSR = SDA; | ||
101 | udelay(2); | ||
102 | GPCR = SDA; | ||
103 | } | ||
104 | |||
105 | static void adv7171_stop(void) | ||
106 | { | ||
107 | GPSR = SCK; | ||
108 | udelay(2); | ||
109 | GPSR = SDA; | ||
110 | udelay(1); | ||
111 | } | ||
112 | |||
113 | static void adv7171_send(unsigned byte) | ||
114 | { | ||
115 | unsigned i; | ||
116 | |||
117 | for (i = 0; i < 8; i++, byte <<= 1) { | ||
118 | GPCR = SCK; | ||
119 | udelay(1); | ||
120 | if (byte & 0x80) | ||
121 | GPSR = SDA; | ||
122 | else | ||
123 | GPCR = SDA; | ||
124 | udelay(1); | ||
125 | GPSR = SCK; | ||
126 | udelay(1); | ||
127 | } | ||
128 | GPCR = SCK; | ||
129 | udelay(1); | ||
130 | GPSR = SDA; | ||
131 | udelay(1); | ||
132 | GPDR &= ~SDA; | ||
133 | GPSR = SCK; | ||
134 | udelay(1); | ||
135 | if (GPLR & SDA) | ||
136 | printk(KERN_WARNING "No ACK from ADV7171\n"); | ||
137 | udelay(1); | ||
138 | GPCR = SCK | SDA; | ||
139 | udelay(1); | ||
140 | GPDR |= SDA; | ||
141 | udelay(1); | ||
142 | } | ||
143 | |||
144 | static void adv7171_write(unsigned reg, unsigned val) | ||
145 | { | ||
146 | unsigned gpdr = GPDR; | ||
147 | unsigned gplr = GPLR; | ||
148 | |||
149 | ASSABET_BCR = BCR_value | ASSABET_BCR_AUDIO_ON; | ||
150 | udelay(100); | ||
151 | |||
152 | GPCR = SDA | SCK | MOD; /* clear L3 mode to ensure UDA1341 doesn't respond */ | ||
153 | GPDR = (GPDR | SCK | MOD) & ~SDA; | ||
154 | udelay(10); | ||
155 | if (!(GPLR & SDA)) | ||
156 | printk(KERN_WARNING "Something dragging SDA down?\n"); | ||
157 | GPDR |= SDA; | ||
158 | |||
159 | adv7171_start(); | ||
160 | adv7171_send(0x54); | ||
161 | adv7171_send(reg); | ||
162 | adv7171_send(val); | ||
163 | adv7171_stop(); | ||
164 | |||
165 | /* Restore GPIO state for L3 bus */ | ||
166 | GPSR = gplr & (SDA | SCK | MOD); | ||
167 | GPCR = (~gplr) & (SDA | SCK | MOD); | ||
168 | GPDR = gpdr; | ||
169 | } | ||
170 | |||
171 | static void adv7171_sleep(void) | ||
172 | { | ||
173 | /* Put the ADV7171 into sleep mode */ | ||
174 | adv7171_write(0x04, 0x40); | ||
175 | } | ||
176 | |||
177 | static unsigned codec_nreset; | ||
178 | |||
179 | static void assabet_codec_reset(unsigned mask, int set) | ||
180 | { | ||
181 | unsigned long flags; | ||
182 | bool old; | ||
183 | |||
184 | local_irq_save(flags); | ||
185 | old = !codec_nreset; | ||
186 | if (set) | ||
187 | codec_nreset &= ~mask; | ||
188 | else | ||
189 | codec_nreset |= mask; | ||
190 | |||
191 | if (old != !codec_nreset) { | ||
192 | if (codec_nreset) { | ||
193 | ASSABET_BCR_set(ASSABET_BCR_NCODEC_RST); | ||
194 | adv7171_sleep(); | ||
195 | } else { | ||
196 | ASSABET_BCR_clear(ASSABET_BCR_NCODEC_RST); | ||
197 | } | ||
198 | } | ||
199 | local_irq_restore(flags); | ||
200 | } | ||
201 | |||
78 | static void assabet_ucb1x00_reset(enum ucb1x00_reset state) | 202 | static void assabet_ucb1x00_reset(enum ucb1x00_reset state) |
79 | { | 203 | { |
80 | if (state == UCB_RST_PROBE) | 204 | int set = state == UCB_RST_REMOVE || state == UCB_RST_SUSPEND || |
81 | ASSABET_BCR_set(ASSABET_BCR_CODEC_RST); | 205 | state == UCB_RST_PROBE_FAIL; |
206 | assabet_codec_reset(RST_UCB1X00, set); | ||
82 | } | 207 | } |
83 | 208 | ||
209 | void assabet_uda1341_reset(int set) | ||
210 | { | ||
211 | assabet_codec_reset(RST_UDA1341, set); | ||
212 | } | ||
213 | EXPORT_SYMBOL(assabet_uda1341_reset); | ||
214 | |||
84 | 215 | ||
85 | /* | 216 | /* |
86 | * Assabet flash support code. | 217 | * Assabet flash support code. |
@@ -155,12 +286,9 @@ static int assabet_irda_set_power(struct device *dev, unsigned int state) | |||
155 | 0 | 286 | 0 |
156 | }; | 287 | }; |
157 | 288 | ||
158 | if (state < 4) { | 289 | if (state < 4) |
159 | state = bcr_state[state]; | 290 | ASSABET_BCR_frob(ASSABET_BCR_IRDA_MD1 | ASSABET_BCR_IRDA_MD0, |
160 | ASSABET_BCR_clear(state ^ (ASSABET_BCR_IRDA_MD1| | 291 | bcr_state[state]); |
161 | ASSABET_BCR_IRDA_MD0)); | ||
162 | ASSABET_BCR_set(state); | ||
163 | } | ||
164 | return 0; | 292 | return 0; |
165 | } | 293 | } |
166 | 294 | ||
@@ -180,6 +308,7 @@ static struct irda_platform_data assabet_irda_data = { | |||
180 | static struct ucb1x00_plat_data assabet_ucb1x00_data = { | 308 | static struct ucb1x00_plat_data assabet_ucb1x00_data = { |
181 | .reset = assabet_ucb1x00_reset, | 309 | .reset = assabet_ucb1x00_reset, |
182 | .gpio_base = -1, | 310 | .gpio_base = -1, |
311 | .can_wakeup = 1, | ||
183 | }; | 312 | }; |
184 | 313 | ||
185 | static struct mcp_plat_data assabet_mcp_data = { | 314 | static struct mcp_plat_data assabet_mcp_data = { |
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index 7fb96ebdc0fb..831a15824ec8 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <linux/mtd/mtd.h> | 27 | #include <linux/mtd/mtd.h> |
28 | #include <linux/mtd/partitions.h> | 28 | #include <linux/mtd/partitions.h> |
29 | #include <linux/timer.h> | 29 | #include <linux/timer.h> |
30 | #include <linux/gpio_keys.h> | ||
31 | #include <linux/input.h> | ||
30 | #include <linux/gpio.h> | 32 | #include <linux/gpio.h> |
31 | #include <linux/pda_power.h> | 33 | #include <linux/pda_power.h> |
32 | 34 | ||
@@ -242,10 +244,43 @@ struct platform_device collie_locomo_device = { | |||
242 | .resource = locomo_resources, | 244 | .resource = locomo_resources, |
243 | }; | 245 | }; |
244 | 246 | ||
247 | static struct gpio_keys_button collie_gpio_keys[] = { | ||
248 | { | ||
249 | .type = EV_PWR, | ||
250 | .code = KEY_RESERVED, | ||
251 | .gpio = COLLIE_GPIO_ON_KEY, | ||
252 | .desc = "On key", | ||
253 | .wakeup = 1, | ||
254 | .active_low = 1, | ||
255 | }, | ||
256 | { | ||
257 | .type = EV_PWR, | ||
258 | .code = KEY_WAKEUP, | ||
259 | .gpio = COLLIE_GPIO_WAKEUP, | ||
260 | .desc = "Sync", | ||
261 | .wakeup = 1, | ||
262 | .active_low = 1, | ||
263 | }, | ||
264 | }; | ||
265 | |||
266 | static struct gpio_keys_platform_data collie_gpio_keys_data = { | ||
267 | .buttons = collie_gpio_keys, | ||
268 | .nbuttons = ARRAY_SIZE(collie_gpio_keys), | ||
269 | }; | ||
270 | |||
271 | static struct platform_device collie_gpio_keys_device = { | ||
272 | .name = "gpio-keys", | ||
273 | .id = -1, | ||
274 | .dev = { | ||
275 | .platform_data = &collie_gpio_keys_data, | ||
276 | }, | ||
277 | }; | ||
278 | |||
245 | static struct platform_device *devices[] __initdata = { | 279 | static struct platform_device *devices[] __initdata = { |
246 | &collie_locomo_device, | 280 | &collie_locomo_device, |
247 | &colliescoop_device, | 281 | &colliescoop_device, |
248 | &collie_power_device, | 282 | &collie_power_device, |
283 | &collie_gpio_keys_device, | ||
249 | }; | 284 | }; |
250 | 285 | ||
251 | static struct mtd_partition collie_partitions[] = { | 286 | static struct mtd_partition collie_partitions[] = { |
diff --git a/arch/arm/mach-sa1100/h3100.c b/arch/arm/mach-sa1100/h3100.c index b8f2b151539b..daa27c474c13 100644 --- a/arch/arm/mach-sa1100/h3100.c +++ b/arch/arm/mach-sa1100/h3100.c | |||
@@ -28,15 +28,35 @@ | |||
28 | /* | 28 | /* |
29 | * helper for sa1100fb | 29 | * helper for sa1100fb |
30 | */ | 30 | */ |
31 | static struct gpio h3100_lcd_gpio[] = { | ||
32 | { H3100_GPIO_LCD_3V_ON, GPIOF_OUT_INIT_LOW, "LCD 3V" }, | ||
33 | { H3XXX_EGPIO_LCD_ON, GPIOF_OUT_INIT_LOW, "LCD ON" }, | ||
34 | }; | ||
35 | |||
36 | static bool h3100_lcd_request(void) | ||
37 | { | ||
38 | static bool h3100_lcd_ok; | ||
39 | int rc; | ||
40 | |||
41 | if (h3100_lcd_ok) | ||
42 | return true; | ||
43 | |||
44 | rc = gpio_request_array(h3100_lcd_gpio, ARRAY_SIZE(h3100_lcd_gpio)); | ||
45 | if (rc) | ||
46 | pr_err("%s: can't request GPIOs\n", __func__); | ||
47 | else | ||
48 | h3100_lcd_ok = true; | ||
49 | |||
50 | return h3100_lcd_ok; | ||
51 | } | ||
52 | |||
31 | static void h3100_lcd_power(int enable) | 53 | static void h3100_lcd_power(int enable) |
32 | { | 54 | { |
33 | if (!gpio_request(H3XXX_EGPIO_LCD_ON, "LCD ON")) { | 55 | if (!h3100_lcd_request()) |
34 | gpio_set_value(H3100_GPIO_LCD_3V_ON, enable); | 56 | return; |
35 | gpio_direction_output(H3XXX_EGPIO_LCD_ON, enable); | 57 | |
36 | gpio_free(H3XXX_EGPIO_LCD_ON); | 58 | gpio_set_value(H3100_GPIO_LCD_3V_ON, enable); |
37 | } else { | 59 | gpio_set_value(H3XXX_EGPIO_LCD_ON, enable); |
38 | pr_err("%s: can't request H3XXX_EGPIO_LCD_ON\n", __func__); | ||
39 | } | ||
40 | } | 60 | } |
41 | 61 | ||
42 | static struct sa1100fb_mach_info h3100_lcd_info = { | 62 | static struct sa1100fb_mach_info h3100_lcd_info = { |
@@ -69,6 +89,11 @@ static void __init h3100_map_io(void) | |||
69 | /* | 89 | /* |
70 | * This turns the IRDA power on or off on the Compaq H3100 | 90 | * This turns the IRDA power on or off on the Compaq H3100 |
71 | */ | 91 | */ |
92 | static struct gpio h3100_irda_gpio[] = { | ||
93 | { H3100_GPIO_IR_ON, GPIOF_OUT_INIT_LOW, "IrDA power" }, | ||
94 | { H3100_GPIO_IR_FSEL, GPIOF_OUT_INIT_LOW, "IrDA fsel" }, | ||
95 | }; | ||
96 | |||
72 | static int h3100_irda_set_power(struct device *dev, unsigned int state) | 97 | static int h3100_irda_set_power(struct device *dev, unsigned int state) |
73 | { | 98 | { |
74 | gpio_set_value(H3100_GPIO_IR_ON, state); | 99 | gpio_set_value(H3100_GPIO_IR_ON, state); |
@@ -80,18 +105,27 @@ static void h3100_irda_set_speed(struct device *dev, unsigned int speed) | |||
80 | gpio_set_value(H3100_GPIO_IR_FSEL, !(speed < 4000000)); | 105 | gpio_set_value(H3100_GPIO_IR_FSEL, !(speed < 4000000)); |
81 | } | 106 | } |
82 | 107 | ||
108 | static int h3100_irda_startup(struct device *dev) | ||
109 | { | ||
110 | return gpio_request_array(h3100_irda_gpio, sizeof(h3100_irda_gpio)); | ||
111 | } | ||
112 | |||
113 | static void h3100_irda_shutdown(struct device *dev) | ||
114 | { | ||
115 | return gpio_free_array(h3100_irda_gpio, sizeof(h3100_irda_gpio)); | ||
116 | } | ||
117 | |||
83 | static struct irda_platform_data h3100_irda_data = { | 118 | static struct irda_platform_data h3100_irda_data = { |
84 | .set_power = h3100_irda_set_power, | 119 | .set_power = h3100_irda_set_power, |
85 | .set_speed = h3100_irda_set_speed, | 120 | .set_speed = h3100_irda_set_speed, |
121 | .startup = h3100_irda_startup, | ||
122 | .shutdown = h3100_irda_shutdown, | ||
86 | }; | 123 | }; |
87 | 124 | ||
88 | static struct gpio_default_state h3100_default_gpio[] = { | 125 | static struct gpio_default_state h3100_default_gpio[] = { |
89 | { H3100_GPIO_IR_ON, GPIO_MODE_OUT0, "IrDA power" }, | ||
90 | { H3100_GPIO_IR_FSEL, GPIO_MODE_OUT0, "IrDA fsel" }, | ||
91 | { H3XXX_GPIO_COM_DCD, GPIO_MODE_IN, "COM DCD" }, | 126 | { H3XXX_GPIO_COM_DCD, GPIO_MODE_IN, "COM DCD" }, |
92 | { H3XXX_GPIO_COM_CTS, GPIO_MODE_IN, "COM CTS" }, | 127 | { H3XXX_GPIO_COM_CTS, GPIO_MODE_IN, "COM CTS" }, |
93 | { H3XXX_GPIO_COM_RTS, GPIO_MODE_OUT0, "COM RTS" }, | 128 | { H3XXX_GPIO_COM_RTS, GPIO_MODE_OUT0, "COM RTS" }, |
94 | { H3100_GPIO_LCD_3V_ON, GPIO_MODE_OUT0, "LCD 3v" }, | ||
95 | }; | 129 | }; |
96 | 130 | ||
97 | static void __init h3100_mach_init(void) | 131 | static void __init h3100_mach_init(void) |
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c index b8dc5bd22623..a663e7230141 100644 --- a/arch/arm/mach-sa1100/h3600.c +++ b/arch/arm/mach-sa1100/h3600.c | |||
@@ -28,35 +28,39 @@ | |||
28 | /* | 28 | /* |
29 | * helper for sa1100fb | 29 | * helper for sa1100fb |
30 | */ | 30 | */ |
31 | static struct gpio h3600_lcd_gpio[] = { | ||
32 | { H3XXX_EGPIO_LCD_ON, GPIOF_OUT_INIT_LOW, "LCD power" }, | ||
33 | { H3600_EGPIO_LCD_PCI, GPIOF_OUT_INIT_LOW, "LCD control" }, | ||
34 | { H3600_EGPIO_LCD_5V_ON, GPIOF_OUT_INIT_LOW, "LCD 5v" }, | ||
35 | { H3600_EGPIO_LVDD_ON, GPIOF_OUT_INIT_LOW, "LCD 9v/-6.5v" }, | ||
36 | }; | ||
37 | |||
38 | static bool h3600_lcd_request(void) | ||
39 | { | ||
40 | static bool h3600_lcd_ok; | ||
41 | int rc; | ||
42 | |||
43 | if (h3600_lcd_ok) | ||
44 | return true; | ||
45 | |||
46 | rc = gpio_request_array(h3600_lcd_gpio, ARRAY_SIZE(h3600_lcd_gpio)); | ||
47 | if (rc) | ||
48 | pr_err("%s: can't request GPIOs\n", __func__); | ||
49 | else | ||
50 | h3600_lcd_ok = true; | ||
51 | |||
52 | return h3600_lcd_ok; | ||
53 | } | ||
54 | |||
31 | static void h3600_lcd_power(int enable) | 55 | static void h3600_lcd_power(int enable) |
32 | { | 56 | { |
33 | if (gpio_request(H3XXX_EGPIO_LCD_ON, "LCD power")) { | 57 | if (!h3600_lcd_request()) |
34 | pr_err("%s: can't request H3XXX_EGPIO_LCD_ON\n", __func__); | 58 | return; |
35 | goto err1; | ||
36 | } | ||
37 | if (gpio_request(H3600_EGPIO_LCD_PCI, "LCD control")) { | ||
38 | pr_err("%s: can't request H3XXX_EGPIO_LCD_PCI\n", __func__); | ||
39 | goto err2; | ||
40 | } | ||
41 | if (gpio_request(H3600_EGPIO_LCD_5V_ON, "LCD 5v")) { | ||
42 | pr_err("%s: can't request H3XXX_EGPIO_LCD_5V_ON\n", __func__); | ||
43 | goto err3; | ||
44 | } | ||
45 | if (gpio_request(H3600_EGPIO_LVDD_ON, "LCD 9v/-6.5v")) { | ||
46 | pr_err("%s: can't request H3600_EGPIO_LVDD_ON\n", __func__); | ||
47 | goto err4; | ||
48 | } | ||
49 | 59 | ||
50 | gpio_direction_output(H3XXX_EGPIO_LCD_ON, enable); | 60 | gpio_direction_output(H3XXX_EGPIO_LCD_ON, enable); |
51 | gpio_direction_output(H3600_EGPIO_LCD_PCI, enable); | 61 | gpio_direction_output(H3600_EGPIO_LCD_PCI, enable); |
52 | gpio_direction_output(H3600_EGPIO_LCD_5V_ON, enable); | 62 | gpio_direction_output(H3600_EGPIO_LCD_5V_ON, enable); |
53 | gpio_direction_output(H3600_EGPIO_LVDD_ON, enable); | 63 | gpio_direction_output(H3600_EGPIO_LVDD_ON, enable); |
54 | |||
55 | gpio_free(H3600_EGPIO_LVDD_ON); | ||
56 | err4: gpio_free(H3600_EGPIO_LCD_5V_ON); | ||
57 | err3: gpio_free(H3600_EGPIO_LCD_PCI); | ||
58 | err2: gpio_free(H3XXX_EGPIO_LCD_ON); | ||
59 | err1: return; | ||
60 | } | 64 | } |
61 | 65 | ||
62 | static const struct sa1100fb_rgb h3600_rgb_16 = { | 66 | static const struct sa1100fb_rgb h3600_rgb_16 = { |
@@ -93,6 +97,11 @@ static void __init h3600_map_io(void) | |||
93 | /* | 97 | /* |
94 | * This turns the IRDA power on or off on the Compaq H3600 | 98 | * This turns the IRDA power on or off on the Compaq H3600 |
95 | */ | 99 | */ |
100 | static struct gpio h3600_irda_gpio[] = { | ||
101 | { H3600_EGPIO_IR_ON, GPIOF_OUT_INIT_LOW, "IrDA power" }, | ||
102 | { H3600_EGPIO_IR_FSEL, GPIOF_OUT_INIT_LOW, "IrDA fsel" }, | ||
103 | }; | ||
104 | |||
96 | static int h3600_irda_set_power(struct device *dev, unsigned int state) | 105 | static int h3600_irda_set_power(struct device *dev, unsigned int state) |
97 | { | 106 | { |
98 | gpio_set_value(H3600_EGPIO_IR_ON, state); | 107 | gpio_set_value(H3600_EGPIO_IR_ON, state); |
@@ -106,29 +115,12 @@ static void h3600_irda_set_speed(struct device *dev, unsigned int speed) | |||
106 | 115 | ||
107 | static int h3600_irda_startup(struct device *dev) | 116 | static int h3600_irda_startup(struct device *dev) |
108 | { | 117 | { |
109 | int err = gpio_request(H3600_EGPIO_IR_ON, "IrDA power"); | 118 | return gpio_request_array(h3600_irda_gpio, sizeof(h3600_irda_gpio)); |
110 | if (err) | ||
111 | goto err1; | ||
112 | err = gpio_direction_output(H3600_EGPIO_IR_ON, 0); | ||
113 | if (err) | ||
114 | goto err2; | ||
115 | err = gpio_request(H3600_EGPIO_IR_FSEL, "IrDA fsel"); | ||
116 | if (err) | ||
117 | goto err2; | ||
118 | err = gpio_direction_output(H3600_EGPIO_IR_FSEL, 0); | ||
119 | if (err) | ||
120 | goto err3; | ||
121 | return 0; | ||
122 | |||
123 | err3: gpio_free(H3600_EGPIO_IR_FSEL); | ||
124 | err2: gpio_free(H3600_EGPIO_IR_ON); | ||
125 | err1: return err; | ||
126 | } | 119 | } |
127 | 120 | ||
128 | static void h3600_irda_shutdown(struct device *dev) | 121 | static void h3600_irda_shutdown(struct device *dev) |
129 | { | 122 | { |
130 | gpio_free(H3600_EGPIO_IR_ON); | 123 | return gpio_free_array(h3600_irda_gpio, sizeof(h3600_irda_gpio)); |
131 | gpio_free(H3600_EGPIO_IR_FSEL); | ||
132 | } | 124 | } |
133 | 125 | ||
134 | static struct irda_platform_data h3600_irda_data = { | 126 | static struct irda_platform_data h3600_irda_data = { |
diff --git a/arch/arm/mach-sa1100/include/mach/assabet.h b/arch/arm/mach-sa1100/include/mach/assabet.h index 307391488c22..c23fcdb047a5 100644 --- a/arch/arm/mach-sa1100/include/mach/assabet.h +++ b/arch/arm/mach-sa1100/include/mach/assabet.h | |||
@@ -39,8 +39,8 @@ extern unsigned long SCR_value; | |||
39 | 39 | ||
40 | #define ASSABET_BCR_CF_PWR (1<<0) /* Compact Flash Power (1 = 3.3v, 0 = off) */ | 40 | #define ASSABET_BCR_CF_PWR (1<<0) /* Compact Flash Power (1 = 3.3v, 0 = off) */ |
41 | #define ASSABET_BCR_CF_RST (1<<1) /* Compact Flash Reset (1 = power up reset) */ | 41 | #define ASSABET_BCR_CF_RST (1<<1) /* Compact Flash Reset (1 = power up reset) */ |
42 | #define ASSABET_BCR_GFX_RST (1<<1) /* Graphics Accelerator Reset (0 = hold reset) */ | 42 | #define ASSABET_BCR_NGFX_RST (1<<1) /* Graphics Accelerator Reset (0 = hold reset) */ |
43 | #define ASSABET_BCR_CODEC_RST (1<<2) /* 0 = Holds UCB1300, ADI7171, and UDA1341 in reset */ | 43 | #define ASSABET_BCR_NCODEC_RST (1<<2) /* 0 = Holds UCB1300, ADI7171, and UDA1341 in reset */ |
44 | #define ASSABET_BCR_IRDA_FSEL (1<<3) /* IRDA Frequency select (0 = SIR, 1 = MIR/ FIR) */ | 44 | #define ASSABET_BCR_IRDA_FSEL (1<<3) /* IRDA Frequency select (0 = SIR, 1 = MIR/ FIR) */ |
45 | #define ASSABET_BCR_IRDA_MD0 (1<<4) /* Range/Power select */ | 45 | #define ASSABET_BCR_IRDA_MD0 (1<<4) /* Range/Power select */ |
46 | #define ASSABET_BCR_IRDA_MD1 (1<<5) /* Range/Power select */ | 46 | #define ASSABET_BCR_IRDA_MD1 (1<<5) /* Range/Power select */ |
@@ -69,6 +69,8 @@ extern void ASSABET_BCR_frob(unsigned int mask, unsigned int set); | |||
69 | #define ASSABET_BCR_frob(x,y) do { } while (0) | 69 | #define ASSABET_BCR_frob(x,y) do { } while (0) |
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | extern void assabet_uda1341_reset(int set); | ||
73 | |||
72 | #define ASSABET_BCR_set(x) ASSABET_BCR_frob((x), (x)) | 74 | #define ASSABET_BCR_set(x) ASSABET_BCR_frob((x), (x)) |
73 | #define ASSABET_BCR_clear(x) ASSABET_BCR_frob((x), 0) | 75 | #define ASSABET_BCR_clear(x) ASSABET_BCR_frob((x), 0) |
74 | 76 | ||
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 958e3cbf0ac2..c18689123023 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c | |||
@@ -614,6 +614,11 @@ static struct regulator_consumer_supply fixed3v3_power_consumers[] = { | |||
614 | REGULATOR_SUPPLY("vqmmc", "sh_mmcif"), | 614 | REGULATOR_SUPPLY("vqmmc", "sh_mmcif"), |
615 | }; | 615 | }; |
616 | 616 | ||
617 | /* Fixed 3.3V regulator used by LCD backlight */ | ||
618 | static struct regulator_consumer_supply fixed5v0_power_consumers[] = { | ||
619 | REGULATOR_SUPPLY("power", "pwm-backlight.0"), | ||
620 | }; | ||
621 | |||
617 | /* Fixed 3.3V regulator to be used by SDHI0 */ | 622 | /* Fixed 3.3V regulator to be used by SDHI0 */ |
618 | static struct regulator_consumer_supply vcc_sdhi0_consumers[] = { | 623 | static struct regulator_consumer_supply vcc_sdhi0_consumers[] = { |
619 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), | 624 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), |
@@ -1196,6 +1201,8 @@ static void __init eva_init(void) | |||
1196 | 1201 | ||
1197 | regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers, | 1202 | regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers, |
1198 | ARRAY_SIZE(fixed3v3_power_consumers), 3300000); | 1203 | ARRAY_SIZE(fixed3v3_power_consumers), 3300000); |
1204 | regulator_register_always_on(3, "fixed-5.0V", fixed5v0_power_consumers, | ||
1205 | ARRAY_SIZE(fixed5v0_power_consumers), 5000000); | ||
1199 | 1206 | ||
1200 | pinctrl_register_mappings(eva_pinctrl_map, ARRAY_SIZE(eva_pinctrl_map)); | 1207 | pinctrl_register_mappings(eva_pinctrl_map, ARRAY_SIZE(eva_pinctrl_map)); |
1201 | pwm_add_table(pwm_lookup, ARRAY_SIZE(pwm_lookup)); | 1208 | pwm_add_table(pwm_lookup, ARRAY_SIZE(pwm_lookup)); |
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 38611526fe9a..3c4995aebd22 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c | |||
@@ -679,7 +679,7 @@ static void __init bockw_init(void) | |||
679 | .id = i, | 679 | .id = i, |
680 | .data = &rsnd_card_info[i], | 680 | .data = &rsnd_card_info[i], |
681 | .size_data = sizeof(struct asoc_simple_card_info), | 681 | .size_data = sizeof(struct asoc_simple_card_info), |
682 | .dma_mask = ~0, | 682 | .dma_mask = DMA_BIT_MASK(32), |
683 | }; | 683 | }; |
684 | 684 | ||
685 | platform_device_register_full(&cardinfo); | 685 | platform_device_register_full(&cardinfo); |
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index a8d3ce646fb9..e0406fd37390 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c | |||
@@ -245,7 +245,9 @@ static void __init lager_init(void) | |||
245 | { | 245 | { |
246 | lager_add_standard_devices(); | 246 | lager_add_standard_devices(); |
247 | 247 | ||
248 | phy_register_fixup_for_id("r8a7790-ether-ff:01", lager_ksz8041_fixup); | 248 | if (IS_ENABLED(CONFIG_PHYLIB)) |
249 | phy_register_fixup_for_id("r8a7790-ether-ff:01", | ||
250 | lager_ksz8041_fixup); | ||
249 | } | 251 | } |
250 | 252 | ||
251 | static const char * const lager_boards_compat_dt[] __initconst = { | 253 | static const char * const lager_boards_compat_dt[] __initconst = { |
diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig index 037100a1563a..aee77f06f887 100644 --- a/arch/arm/mach-socfpga/Kconfig +++ b/arch/arm/mach-socfpga/Kconfig | |||
@@ -10,6 +10,7 @@ config ARCH_SOCFPGA | |||
10 | select GENERIC_CLOCKEVENTS | 10 | select GENERIC_CLOCKEVENTS |
11 | select GPIO_PL061 if GPIOLIB | 11 | select GPIO_PL061 if GPIOLIB |
12 | select HAVE_ARM_SCU | 12 | select HAVE_ARM_SCU |
13 | select HAVE_ARM_TWD if SMP | ||
13 | select HAVE_SMP | 14 | select HAVE_SMP |
14 | select MFD_SYSCON | 15 | select MFD_SYSCON |
15 | select SPARSE_IRQ | 16 | select SPARSE_IRQ |
diff --git a/arch/arm/mach-tegra/fuse.c b/arch/arm/mach-tegra/fuse.c index 9a4e910c3796..3a9c1f1c219d 100644 --- a/arch/arm/mach-tegra/fuse.c +++ b/arch/arm/mach-tegra/fuse.c | |||
@@ -198,10 +198,12 @@ void __init tegra_init_fuse(void) | |||
198 | switch (tegra_chip_id) { | 198 | switch (tegra_chip_id) { |
199 | case TEGRA20: | 199 | case TEGRA20: |
200 | tegra20_fuse_init_randomness(); | 200 | tegra20_fuse_init_randomness(); |
201 | break; | ||
201 | case TEGRA30: | 202 | case TEGRA30: |
202 | case TEGRA114: | 203 | case TEGRA114: |
203 | default: | 204 | default: |
204 | tegra30_fuse_init_randomness(); | 205 | tegra30_fuse_init_randomness(); |
206 | break; | ||
205 | } | 207 | } |
206 | 208 | ||
207 | pr_info("Tegra Revision: %s SKU: %d CPU Process: %d Core Process: %d\n", | 209 | pr_info("Tegra Revision: %s SKU: %d CPU Process: %d Core Process: %d\n", |
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 2e85c1e72535..12c7e5c03ea4 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -140,6 +140,10 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { | |||
140 | /* Requires call-back bindings. */ | 140 | /* Requires call-back bindings. */ |
141 | OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata), | 141 | OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata), |
142 | /* Requires DMA bindings. */ | 142 | /* Requires DMA bindings. */ |
143 | OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0", &mop500_sdi0_data), | ||
144 | OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1", &mop500_sdi1_data), | ||
145 | OF_DEV_AUXDATA("arm,pl18x", 0x80005000, "sdi2", &mop500_sdi2_data), | ||
146 | OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4", &mop500_sdi4_data), | ||
143 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000, | 147 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000, |
144 | "ux500-msp-i2s.0", &msp0_platform_data), | 148 | "ux500-msp-i2s.0", &msp0_platform_data), |
145 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000, | 149 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000, |
diff --git a/arch/arm/mach-ux500/setup.h b/arch/arm/mach-ux500/setup.h index bdb356498a74..b1dd8584bed4 100644 --- a/arch/arm/mach-ux500/setup.h +++ b/arch/arm/mach-ux500/setup.h | |||
@@ -43,7 +43,7 @@ extern void ux500_timer_init(void); | |||
43 | .virtual = IO_ADDRESS(x), \ | 43 | .virtual = IO_ADDRESS(x), \ |
44 | .pfn = __phys_to_pfn(x), \ | 44 | .pfn = __phys_to_pfn(x), \ |
45 | .length = sz, \ | 45 | .length = sz, \ |
46 | .type = MT_MEMORY, \ | 46 | .type = MT_MEMORY_RWX, \ |
47 | } | 47 | } |
48 | 48 | ||
49 | extern struct smp_operations ux500_smp_ops; | 49 | extern struct smp_operations ux500_smp_ops; |
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile index ecfe6e53f6e0..7f39ce2f841f 100644 --- a/arch/arm/mm/Makefile +++ b/arch/arm/mm/Makefile | |||
@@ -12,6 +12,7 @@ ifneq ($(CONFIG_MMU),y) | |||
12 | obj-y += nommu.o | 12 | obj-y += nommu.o |
13 | endif | 13 | endif |
14 | 14 | ||
15 | obj-$(CONFIG_ARM_PTDUMP) += dump.o | ||
15 | obj-$(CONFIG_MODULES) += proc-syms.o | 16 | obj-$(CONFIG_MODULES) += proc-syms.o |
16 | 17 | ||
17 | obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o | 18 | obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o |
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 447da6ffadd5..7abde2ce8973 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <asm/cacheflush.h> | 26 | #include <asm/cacheflush.h> |
27 | #include <asm/hardware/cache-l2x0.h> | 27 | #include <asm/hardware/cache-l2x0.h> |
28 | #include "cache-tauros3.h" | ||
28 | #include "cache-aurora-l2.h" | 29 | #include "cache-aurora-l2.h" |
29 | 30 | ||
30 | #define CACHE_LINE_SIZE 32 | 31 | #define CACHE_LINE_SIZE 32 |
@@ -767,6 +768,14 @@ static void aurora_save(void) | |||
767 | l2x0_saved_regs.aux_ctrl = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); | 768 | l2x0_saved_regs.aux_ctrl = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); |
768 | } | 769 | } |
769 | 770 | ||
771 | static void __init tauros3_save(void) | ||
772 | { | ||
773 | l2x0_saved_regs.aux2_ctrl = | ||
774 | readl_relaxed(l2x0_base + TAUROS3_AUX2_CTRL); | ||
775 | l2x0_saved_regs.prefetch_ctrl = | ||
776 | readl_relaxed(l2x0_base + L2X0_PREFETCH_CTRL); | ||
777 | } | ||
778 | |||
770 | static void l2x0_resume(void) | 779 | static void l2x0_resume(void) |
771 | { | 780 | { |
772 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { | 781 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { |
@@ -821,6 +830,18 @@ static void aurora_resume(void) | |||
821 | } | 830 | } |
822 | } | 831 | } |
823 | 832 | ||
833 | static void tauros3_resume(void) | ||
834 | { | ||
835 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { | ||
836 | writel_relaxed(l2x0_saved_regs.aux2_ctrl, | ||
837 | l2x0_base + TAUROS3_AUX2_CTRL); | ||
838 | writel_relaxed(l2x0_saved_regs.prefetch_ctrl, | ||
839 | l2x0_base + L2X0_PREFETCH_CTRL); | ||
840 | } | ||
841 | |||
842 | l2x0_resume(); | ||
843 | } | ||
844 | |||
824 | static void __init aurora_broadcast_l2_commands(void) | 845 | static void __init aurora_broadcast_l2_commands(void) |
825 | { | 846 | { |
826 | __u32 u; | 847 | __u32 u; |
@@ -906,6 +927,15 @@ static const struct l2x0_of_data aurora_no_outer_data = { | |||
906 | }, | 927 | }, |
907 | }; | 928 | }; |
908 | 929 | ||
930 | static const struct l2x0_of_data tauros3_data = { | ||
931 | .setup = NULL, | ||
932 | .save = tauros3_save, | ||
933 | /* Tauros3 broadcasts L1 cache operations to L2 */ | ||
934 | .outer_cache = { | ||
935 | .resume = tauros3_resume, | ||
936 | }, | ||
937 | }; | ||
938 | |||
909 | static const struct l2x0_of_data bcm_l2x0_data = { | 939 | static const struct l2x0_of_data bcm_l2x0_data = { |
910 | .setup = pl310_of_setup, | 940 | .setup = pl310_of_setup, |
911 | .save = pl310_save, | 941 | .save = pl310_save, |
@@ -922,17 +952,19 @@ static const struct l2x0_of_data bcm_l2x0_data = { | |||
922 | }; | 952 | }; |
923 | 953 | ||
924 | static const struct of_device_id l2x0_ids[] __initconst = { | 954 | static const struct of_device_id l2x0_ids[] __initconst = { |
925 | { .compatible = "arm,pl310-cache", .data = (void *)&pl310_data }, | ||
926 | { .compatible = "arm,l220-cache", .data = (void *)&l2x0_data }, | ||
927 | { .compatible = "arm,l210-cache", .data = (void *)&l2x0_data }, | 955 | { .compatible = "arm,l210-cache", .data = (void *)&l2x0_data }, |
928 | { .compatible = "marvell,aurora-system-cache", | 956 | { .compatible = "arm,l220-cache", .data = (void *)&l2x0_data }, |
929 | .data = (void *)&aurora_no_outer_data}, | 957 | { .compatible = "arm,pl310-cache", .data = (void *)&pl310_data }, |
930 | { .compatible = "marvell,aurora-outer-cache", | ||
931 | .data = (void *)&aurora_with_outer_data}, | ||
932 | { .compatible = "brcm,bcm11351-a2-pl310-cache", | ||
933 | .data = (void *)&bcm_l2x0_data}, | ||
934 | { .compatible = "bcm,bcm11351-a2-pl310-cache", /* deprecated name */ | 958 | { .compatible = "bcm,bcm11351-a2-pl310-cache", /* deprecated name */ |
935 | .data = (void *)&bcm_l2x0_data}, | 959 | .data = (void *)&bcm_l2x0_data}, |
960 | { .compatible = "brcm,bcm11351-a2-pl310-cache", | ||
961 | .data = (void *)&bcm_l2x0_data}, | ||
962 | { .compatible = "marvell,aurora-outer-cache", | ||
963 | .data = (void *)&aurora_with_outer_data}, | ||
964 | { .compatible = "marvell,aurora-system-cache", | ||
965 | .data = (void *)&aurora_no_outer_data}, | ||
966 | { .compatible = "marvell,tauros3-cache", | ||
967 | .data = (void *)&tauros3_data }, | ||
936 | {} | 968 | {} |
937 | }; | 969 | }; |
938 | 970 | ||
diff --git a/arch/arm/mm/cache-tauros3.h b/arch/arm/mm/cache-tauros3.h new file mode 100644 index 000000000000..02c0a97cbc02 --- /dev/null +++ b/arch/arm/mm/cache-tauros3.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * Marvell Tauros3 cache controller includes | ||
3 | * | ||
4 | * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | ||
5 | * | ||
6 | * based on GPL'ed 2.6 kernel sources | ||
7 | * (c) Marvell International Ltd. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | |||
23 | #ifndef __ASM_ARM_HARDWARE_TAUROS3_H | ||
24 | #define __ASM_ARM_HARDWARE_TAUROS3_H | ||
25 | |||
26 | /* | ||
27 | * Marvell Tauros3 L2CC is compatible with PL310 r0p0 | ||
28 | * but with PREFETCH_CTRL (r2p0) and an additional event counter. | ||
29 | * Also, there is AUX2_CTRL for some Marvell specific control. | ||
30 | */ | ||
31 | |||
32 | #define TAUROS3_EVENT_CNT2_CFG 0x224 | ||
33 | #define TAUROS3_EVENT_CNT2_VAL 0x228 | ||
34 | #define TAUROS3_INV_ALL 0x780 | ||
35 | #define TAUROS3_CLEAN_ALL 0x784 | ||
36 | #define TAUROS3_AUX2_CTRL 0x820 | ||
37 | |||
38 | /* Registers shifts and masks */ | ||
39 | #define TAUROS3_AUX2_CTRL_LINEFILL_BURST8_EN (1 << 2) | ||
40 | |||
41 | #endif | ||
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index b5c467a65c27..778bcf88ee79 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -146,18 +146,18 @@ flush_levels: | |||
146 | ldr r7, =0x7fff | 146 | ldr r7, =0x7fff |
147 | ands r7, r7, r1, lsr #13 @ extract max number of the index size | 147 | ands r7, r7, r1, lsr #13 @ extract max number of the index size |
148 | loop1: | 148 | loop1: |
149 | mov r9, r4 @ create working copy of max way size | 149 | mov r9, r7 @ create working copy of max index |
150 | loop2: | 150 | loop2: |
151 | ARM( orr r11, r10, r9, lsl r5 ) @ factor way and cache number into r11 | 151 | ARM( orr r11, r10, r4, lsl r5 ) @ factor way and cache number into r11 |
152 | THUMB( lsl r6, r9, r5 ) | 152 | THUMB( lsl r6, r4, r5 ) |
153 | THUMB( orr r11, r10, r6 ) @ factor way and cache number into r11 | 153 | THUMB( orr r11, r10, r6 ) @ factor way and cache number into r11 |
154 | ARM( orr r11, r11, r7, lsl r2 ) @ factor index number into r11 | 154 | ARM( orr r11, r11, r9, lsl r2 ) @ factor index number into r11 |
155 | THUMB( lsl r6, r7, r2 ) | 155 | THUMB( lsl r6, r9, r2 ) |
156 | THUMB( orr r11, r11, r6 ) @ factor index number into r11 | 156 | THUMB( orr r11, r11, r6 ) @ factor index number into r11 |
157 | mcr p15, 0, r11, c7, c14, 2 @ clean & invalidate by set/way | 157 | mcr p15, 0, r11, c7, c14, 2 @ clean & invalidate by set/way |
158 | subs r9, r9, #1 @ decrement the way | 158 | subs r9, r9, #1 @ decrement the index |
159 | bge loop2 | 159 | bge loop2 |
160 | subs r7, r7, #1 @ decrement the index | 160 | subs r4, r4, #1 @ decrement the way |
161 | bge loop1 | 161 | bge loop1 |
162 | skip: | 162 | skip: |
163 | add r10, r10, #2 @ increment cache number | 163 | add r10, r10, #2 @ increment cache number |
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index 84e6f772e204..6eb97b3a7481 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c | |||
@@ -36,8 +36,8 @@ | |||
36 | * The context ID is used by debuggers and trace logic, and | 36 | * The context ID is used by debuggers and trace logic, and |
37 | * should be unique within all running processes. | 37 | * should be unique within all running processes. |
38 | * | 38 | * |
39 | * In big endian operation, the two 32 bit words are swapped if accesed by | 39 | * In big endian operation, the two 32 bit words are swapped if accessed |
40 | * non 64-bit operations. | 40 | * by non-64-bit operations. |
41 | */ | 41 | */ |
42 | #define ASID_FIRST_VERSION (1ULL << ASID_BITS) | 42 | #define ASID_FIRST_VERSION (1ULL << ASID_BITS) |
43 | #define NUM_USER_ASIDS ASID_FIRST_VERSION | 43 | #define NUM_USER_ASIDS ASID_FIRST_VERSION |
@@ -78,20 +78,21 @@ void a15_erratum_get_cpumask(int this_cpu, struct mm_struct *mm, | |||
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | #ifdef CONFIG_ARM_LPAE | 80 | #ifdef CONFIG_ARM_LPAE |
81 | static void cpu_set_reserved_ttbr0(void) | 81 | /* |
82 | { | 82 | * With LPAE, the ASID and page tables are updated atomicly, so there is |
83 | /* | 83 | * no need for a reserved set of tables (the active ASID tracking prevents |
84 | * Set TTBR0 to swapper_pg_dir which contains only global entries. The | 84 | * any issues across a rollover). |
85 | * ASID is set to 0. | 85 | */ |
86 | */ | 86 | #define cpu_set_reserved_ttbr0() |
87 | cpu_set_ttbr(0, __pa(swapper_pg_dir)); | ||
88 | isb(); | ||
89 | } | ||
90 | #else | 87 | #else |
91 | static void cpu_set_reserved_ttbr0(void) | 88 | static void cpu_set_reserved_ttbr0(void) |
92 | { | 89 | { |
93 | u32 ttb; | 90 | u32 ttb; |
94 | /* Copy TTBR1 into TTBR0 */ | 91 | /* |
92 | * Copy TTBR1 into TTBR0. | ||
93 | * This points at swapper_pg_dir, which contains only global | ||
94 | * entries so any speculative walks are perfectly safe. | ||
95 | */ | ||
95 | asm volatile( | 96 | asm volatile( |
96 | " mrc p15, 0, %0, c2, c0, 1 @ read TTBR1\n" | 97 | " mrc p15, 0, %0, c2, c0, 1 @ read TTBR1\n" |
97 | " mcr p15, 0, %0, c2, c0, 0 @ set TTBR0\n" | 98 | " mcr p15, 0, %0, c2, c0, 0 @ set TTBR0\n" |
@@ -179,6 +180,7 @@ static int is_reserved_asid(u64 asid) | |||
179 | 180 | ||
180 | static u64 new_context(struct mm_struct *mm, unsigned int cpu) | 181 | static u64 new_context(struct mm_struct *mm, unsigned int cpu) |
181 | { | 182 | { |
183 | static u32 cur_idx = 1; | ||
182 | u64 asid = atomic64_read(&mm->context.id); | 184 | u64 asid = atomic64_read(&mm->context.id); |
183 | u64 generation = atomic64_read(&asid_generation); | 185 | u64 generation = atomic64_read(&asid_generation); |
184 | 186 | ||
@@ -193,10 +195,13 @@ static u64 new_context(struct mm_struct *mm, unsigned int cpu) | |||
193 | * Allocate a free ASID. If we can't find one, take a | 195 | * Allocate a free ASID. If we can't find one, take a |
194 | * note of the currently active ASIDs and mark the TLBs | 196 | * note of the currently active ASIDs and mark the TLBs |
195 | * as requiring flushes. We always count from ASID #1, | 197 | * as requiring flushes. We always count from ASID #1, |
196 | * as we reserve ASID #0 to switch via TTBR0 and indicate | 198 | * as we reserve ASID #0 to switch via TTBR0 and to |
197 | * rollover events. | 199 | * avoid speculative page table walks from hitting in |
200 | * any partial walk caches, which could be populated | ||
201 | * from overlapping level-1 descriptors used to map both | ||
202 | * the module area and the userspace stack. | ||
198 | */ | 203 | */ |
199 | asid = find_next_zero_bit(asid_map, NUM_USER_ASIDS, 1); | 204 | asid = find_next_zero_bit(asid_map, NUM_USER_ASIDS, cur_idx); |
200 | if (asid == NUM_USER_ASIDS) { | 205 | if (asid == NUM_USER_ASIDS) { |
201 | generation = atomic64_add_return(ASID_FIRST_VERSION, | 206 | generation = atomic64_add_return(ASID_FIRST_VERSION, |
202 | &asid_generation); | 207 | &asid_generation); |
@@ -204,6 +209,7 @@ static u64 new_context(struct mm_struct *mm, unsigned int cpu) | |||
204 | asid = find_next_zero_bit(asid_map, NUM_USER_ASIDS, 1); | 209 | asid = find_next_zero_bit(asid_map, NUM_USER_ASIDS, 1); |
205 | } | 210 | } |
206 | __set_bit(asid, asid_map); | 211 | __set_bit(asid, asid_map); |
212 | cur_idx = asid; | ||
207 | asid |= generation; | 213 | asid |= generation; |
208 | cpumask_clear(mm_cpumask(mm)); | 214 | cpumask_clear(mm_cpumask(mm)); |
209 | } | 215 | } |
@@ -221,8 +227,9 @@ void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk) | |||
221 | __check_vmalloc_seq(mm); | 227 | __check_vmalloc_seq(mm); |
222 | 228 | ||
223 | /* | 229 | /* |
224 | * Required during context switch to avoid speculative page table | 230 | * We cannot update the pgd and the ASID atomicly with classic |
225 | * walking with the wrong TTBR. | 231 | * MMU, so switch exclusively to global mappings to avoid |
232 | * speculative page table walking with the wrong TTBR. | ||
226 | */ | 233 | */ |
227 | cpu_set_reserved_ttbr0(); | 234 | cpu_set_reserved_ttbr0(); |
228 | 235 | ||
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 79f8b39801a8..1a77450e728a 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * | 9 | * |
10 | * DMA uncached mapping support. | 10 | * DMA uncached mapping support. |
11 | */ | 11 | */ |
12 | #include <linux/bootmem.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
14 | #include <linux/gfp.h> | 15 | #include <linux/gfp.h> |
@@ -157,6 +158,44 @@ struct dma_map_ops arm_coherent_dma_ops = { | |||
157 | }; | 158 | }; |
158 | EXPORT_SYMBOL(arm_coherent_dma_ops); | 159 | EXPORT_SYMBOL(arm_coherent_dma_ops); |
159 | 160 | ||
161 | static int __dma_supported(struct device *dev, u64 mask, bool warn) | ||
162 | { | ||
163 | unsigned long max_dma_pfn; | ||
164 | |||
165 | /* | ||
166 | * If the mask allows for more memory than we can address, | ||
167 | * and we actually have that much memory, then we must | ||
168 | * indicate that DMA to this device is not supported. | ||
169 | */ | ||
170 | if (sizeof(mask) != sizeof(dma_addr_t) && | ||
171 | mask > (dma_addr_t)~0 && | ||
172 | dma_to_pfn(dev, ~0) < max_pfn) { | ||
173 | if (warn) { | ||
174 | dev_warn(dev, "Coherent DMA mask %#llx is larger than dma_addr_t allows\n", | ||
175 | mask); | ||
176 | dev_warn(dev, "Driver did not use or check the return value from dma_set_coherent_mask()?\n"); | ||
177 | } | ||
178 | return 0; | ||
179 | } | ||
180 | |||
181 | max_dma_pfn = min(max_pfn, arm_dma_pfn_limit); | ||
182 | |||
183 | /* | ||
184 | * Translate the device's DMA mask to a PFN limit. This | ||
185 | * PFN number includes the page which we can DMA to. | ||
186 | */ | ||
187 | if (dma_to_pfn(dev, mask) < max_dma_pfn) { | ||
188 | if (warn) | ||
189 | dev_warn(dev, "Coherent DMA mask %#llx (pfn %#lx-%#lx) covers a smaller range of system memory than the DMA zone pfn 0x0-%#lx\n", | ||
190 | mask, | ||
191 | dma_to_pfn(dev, 0), dma_to_pfn(dev, mask) + 1, | ||
192 | max_dma_pfn + 1); | ||
193 | return 0; | ||
194 | } | ||
195 | |||
196 | return 1; | ||
197 | } | ||
198 | |||
160 | static u64 get_coherent_dma_mask(struct device *dev) | 199 | static u64 get_coherent_dma_mask(struct device *dev) |
161 | { | 200 | { |
162 | u64 mask = (u64)DMA_BIT_MASK(32); | 201 | u64 mask = (u64)DMA_BIT_MASK(32); |
@@ -173,32 +212,8 @@ static u64 get_coherent_dma_mask(struct device *dev) | |||
173 | return 0; | 212 | return 0; |
174 | } | 213 | } |
175 | 214 | ||
176 | /* | 215 | if (!__dma_supported(dev, mask, true)) |
177 | * If the mask allows for more memory than we can address, | ||
178 | * and we actually have that much memory, then fail the | ||
179 | * allocation. | ||
180 | */ | ||
181 | if (sizeof(mask) != sizeof(dma_addr_t) && | ||
182 | mask > (dma_addr_t)~0 && | ||
183 | dma_to_pfn(dev, ~0) > arm_dma_pfn_limit) { | ||
184 | dev_warn(dev, "Coherent DMA mask %#llx is larger than dma_addr_t allows\n", | ||
185 | mask); | ||
186 | dev_warn(dev, "Driver did not use or check the return value from dma_set_coherent_mask()?\n"); | ||
187 | return 0; | ||
188 | } | ||
189 | |||
190 | /* | ||
191 | * Now check that the mask, when translated to a PFN, | ||
192 | * fits within the allowable addresses which we can | ||
193 | * allocate. | ||
194 | */ | ||
195 | if (dma_to_pfn(dev, mask) < arm_dma_pfn_limit) { | ||
196 | dev_warn(dev, "Coherent DMA mask %#llx (pfn %#lx-%#lx) covers a smaller range of system memory than the DMA zone pfn 0x0-%#lx\n", | ||
197 | mask, | ||
198 | dma_to_pfn(dev, 0), dma_to_pfn(dev, mask) + 1, | ||
199 | arm_dma_pfn_limit + 1); | ||
200 | return 0; | 216 | return 0; |
201 | } | ||
202 | } | 217 | } |
203 | 218 | ||
204 | return mask; | 219 | return mask; |
@@ -361,7 +376,7 @@ void __init init_dma_coherent_pool_size(unsigned long size) | |||
361 | static int __init atomic_pool_init(void) | 376 | static int __init atomic_pool_init(void) |
362 | { | 377 | { |
363 | struct dma_pool *pool = &atomic_pool; | 378 | struct dma_pool *pool = &atomic_pool; |
364 | pgprot_t prot = pgprot_dmacoherent(pgprot_kernel); | 379 | pgprot_t prot = pgprot_dmacoherent(PAGE_KERNEL); |
365 | gfp_t gfp = GFP_KERNEL | GFP_DMA; | 380 | gfp_t gfp = GFP_KERNEL | GFP_DMA; |
366 | unsigned long nr_pages = pool->size >> PAGE_SHIFT; | 381 | unsigned long nr_pages = pool->size >> PAGE_SHIFT; |
367 | unsigned long *bitmap; | 382 | unsigned long *bitmap; |
@@ -609,7 +624,7 @@ static void __free_from_contiguous(struct device *dev, struct page *page, | |||
609 | if (PageHighMem(page)) | 624 | if (PageHighMem(page)) |
610 | __dma_free_remap(cpu_addr, size); | 625 | __dma_free_remap(cpu_addr, size); |
611 | else | 626 | else |
612 | __dma_remap(page, size, pgprot_kernel); | 627 | __dma_remap(page, size, PAGE_KERNEL); |
613 | dma_release_from_contiguous(dev, page, size >> PAGE_SHIFT); | 628 | dma_release_from_contiguous(dev, page, size >> PAGE_SHIFT); |
614 | } | 629 | } |
615 | 630 | ||
@@ -1027,28 +1042,7 @@ void arm_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, | |||
1027 | */ | 1042 | */ |
1028 | int dma_supported(struct device *dev, u64 mask) | 1043 | int dma_supported(struct device *dev, u64 mask) |
1029 | { | 1044 | { |
1030 | unsigned long limit; | 1045 | return __dma_supported(dev, mask, false); |
1031 | |||
1032 | /* | ||
1033 | * If the mask allows for more memory than we can address, | ||
1034 | * and we actually have that much memory, then we must | ||
1035 | * indicate that DMA to this device is not supported. | ||
1036 | */ | ||
1037 | if (sizeof(mask) != sizeof(dma_addr_t) && | ||
1038 | mask > (dma_addr_t)~0 && | ||
1039 | dma_to_pfn(dev, ~0) > arm_dma_pfn_limit) | ||
1040 | return 0; | ||
1041 | |||
1042 | /* | ||
1043 | * Translate the device's DMA mask to a PFN limit. This | ||
1044 | * PFN number includes the page which we can DMA to. | ||
1045 | */ | ||
1046 | limit = dma_to_pfn(dev, mask); | ||
1047 | |||
1048 | if (limit < arm_dma_pfn_limit) | ||
1049 | return 0; | ||
1050 | |||
1051 | return 1; | ||
1052 | } | 1046 | } |
1053 | EXPORT_SYMBOL(dma_supported); | 1047 | EXPORT_SYMBOL(dma_supported); |
1054 | 1048 | ||
@@ -1357,7 +1351,7 @@ static void __iommu_free_atomic(struct device *dev, void *cpu_addr, | |||
1357 | static void *arm_iommu_alloc_attrs(struct device *dev, size_t size, | 1351 | static void *arm_iommu_alloc_attrs(struct device *dev, size_t size, |
1358 | dma_addr_t *handle, gfp_t gfp, struct dma_attrs *attrs) | 1352 | dma_addr_t *handle, gfp_t gfp, struct dma_attrs *attrs) |
1359 | { | 1353 | { |
1360 | pgprot_t prot = __get_dma_pgprot(attrs, pgprot_kernel); | 1354 | pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL); |
1361 | struct page **pages; | 1355 | struct page **pages; |
1362 | void *addr = NULL; | 1356 | void *addr = NULL; |
1363 | 1357 | ||
diff --git a/arch/arm/mm/dump.c b/arch/arm/mm/dump.c new file mode 100644 index 000000000000..2b3a56414271 --- /dev/null +++ b/arch/arm/mm/dump.c | |||
@@ -0,0 +1,345 @@ | |||
1 | /* | ||
2 | * Debug helper to dump the current kernel pagetables of the system | ||
3 | * so that we can see what the various memory ranges are set to. | ||
4 | * | ||
5 | * Derived from x86 implementation: | ||
6 | * (C) Copyright 2008 Intel Corporation | ||
7 | * | ||
8 | * Author: Arjan van de Ven <arjan@linux.intel.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or | ||
11 | * modify it under the terms of the GNU General Public License | ||
12 | * as published by the Free Software Foundation; version 2 | ||
13 | * of the License. | ||
14 | */ | ||
15 | #include <linux/debugfs.h> | ||
16 | #include <linux/fs.h> | ||
17 | #include <linux/mm.h> | ||
18 | #include <linux/seq_file.h> | ||
19 | |||
20 | #include <asm/fixmap.h> | ||
21 | #include <asm/pgtable.h> | ||
22 | |||
23 | struct addr_marker { | ||
24 | unsigned long start_address; | ||
25 | const char *name; | ||
26 | }; | ||
27 | |||
28 | static struct addr_marker address_markers[] = { | ||
29 | { MODULES_VADDR, "Modules" }, | ||
30 | { PAGE_OFFSET, "Kernel Mapping" }, | ||
31 | { 0, "vmalloc() Area" }, | ||
32 | { VMALLOC_END, "vmalloc() End" }, | ||
33 | { FIXADDR_START, "Fixmap Area" }, | ||
34 | { CONFIG_VECTORS_BASE, "Vectors" }, | ||
35 | { CONFIG_VECTORS_BASE + PAGE_SIZE * 2, "Vectors End" }, | ||
36 | { -1, NULL }, | ||
37 | }; | ||
38 | |||
39 | struct pg_state { | ||
40 | struct seq_file *seq; | ||
41 | const struct addr_marker *marker; | ||
42 | unsigned long start_address; | ||
43 | unsigned level; | ||
44 | u64 current_prot; | ||
45 | }; | ||
46 | |||
47 | struct prot_bits { | ||
48 | u64 mask; | ||
49 | u64 val; | ||
50 | const char *set; | ||
51 | const char *clear; | ||
52 | }; | ||
53 | |||
54 | static const struct prot_bits pte_bits[] = { | ||
55 | { | ||
56 | .mask = L_PTE_USER, | ||
57 | .val = L_PTE_USER, | ||
58 | .set = "USR", | ||
59 | .clear = " ", | ||
60 | }, { | ||
61 | .mask = L_PTE_RDONLY, | ||
62 | .val = L_PTE_RDONLY, | ||
63 | .set = "ro", | ||
64 | .clear = "RW", | ||
65 | }, { | ||
66 | .mask = L_PTE_XN, | ||
67 | .val = L_PTE_XN, | ||
68 | .set = "NX", | ||
69 | .clear = "x ", | ||
70 | }, { | ||
71 | .mask = L_PTE_SHARED, | ||
72 | .val = L_PTE_SHARED, | ||
73 | .set = "SHD", | ||
74 | .clear = " ", | ||
75 | }, { | ||
76 | .mask = L_PTE_MT_MASK, | ||
77 | .val = L_PTE_MT_UNCACHED, | ||
78 | .set = "SO/UNCACHED", | ||
79 | }, { | ||
80 | .mask = L_PTE_MT_MASK, | ||
81 | .val = L_PTE_MT_BUFFERABLE, | ||
82 | .set = "MEM/BUFFERABLE/WC", | ||
83 | }, { | ||
84 | .mask = L_PTE_MT_MASK, | ||
85 | .val = L_PTE_MT_WRITETHROUGH, | ||
86 | .set = "MEM/CACHED/WT", | ||
87 | }, { | ||
88 | .mask = L_PTE_MT_MASK, | ||
89 | .val = L_PTE_MT_WRITEBACK, | ||
90 | .set = "MEM/CACHED/WBRA", | ||
91 | #ifndef CONFIG_ARM_LPAE | ||
92 | }, { | ||
93 | .mask = L_PTE_MT_MASK, | ||
94 | .val = L_PTE_MT_MINICACHE, | ||
95 | .set = "MEM/MINICACHE", | ||
96 | #endif | ||
97 | }, { | ||
98 | .mask = L_PTE_MT_MASK, | ||
99 | .val = L_PTE_MT_WRITEALLOC, | ||
100 | .set = "MEM/CACHED/WBWA", | ||
101 | }, { | ||
102 | .mask = L_PTE_MT_MASK, | ||
103 | .val = L_PTE_MT_DEV_SHARED, | ||
104 | .set = "DEV/SHARED", | ||
105 | #ifndef CONFIG_ARM_LPAE | ||
106 | }, { | ||
107 | .mask = L_PTE_MT_MASK, | ||
108 | .val = L_PTE_MT_DEV_NONSHARED, | ||
109 | .set = "DEV/NONSHARED", | ||
110 | #endif | ||
111 | }, { | ||
112 | .mask = L_PTE_MT_MASK, | ||
113 | .val = L_PTE_MT_DEV_WC, | ||
114 | .set = "DEV/WC", | ||
115 | }, { | ||
116 | .mask = L_PTE_MT_MASK, | ||
117 | .val = L_PTE_MT_DEV_CACHED, | ||
118 | .set = "DEV/CACHED", | ||
119 | }, | ||
120 | }; | ||
121 | |||
122 | static const struct prot_bits section_bits[] = { | ||
123 | #ifndef CONFIG_ARM_LPAE | ||
124 | /* These are approximate */ | ||
125 | { | ||
126 | .mask = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, | ||
127 | .val = 0, | ||
128 | .set = " ro", | ||
129 | }, { | ||
130 | .mask = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, | ||
131 | .val = PMD_SECT_AP_WRITE, | ||
132 | .set = " RW", | ||
133 | }, { | ||
134 | .mask = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, | ||
135 | .val = PMD_SECT_AP_READ, | ||
136 | .set = "USR ro", | ||
137 | }, { | ||
138 | .mask = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, | ||
139 | .val = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE, | ||
140 | .set = "USR RW", | ||
141 | #else | ||
142 | { | ||
143 | .mask = PMD_SECT_USER, | ||
144 | .val = PMD_SECT_USER, | ||
145 | .set = "USR", | ||
146 | }, { | ||
147 | .mask = PMD_SECT_RDONLY, | ||
148 | .val = PMD_SECT_RDONLY, | ||
149 | .set = "ro", | ||
150 | .clear = "RW", | ||
151 | #endif | ||
152 | }, { | ||
153 | .mask = PMD_SECT_XN, | ||
154 | .val = PMD_SECT_XN, | ||
155 | .set = "NX", | ||
156 | .clear = "x ", | ||
157 | }, { | ||
158 | .mask = PMD_SECT_S, | ||
159 | .val = PMD_SECT_S, | ||
160 | .set = "SHD", | ||
161 | .clear = " ", | ||
162 | }, | ||
163 | }; | ||
164 | |||
165 | struct pg_level { | ||
166 | const struct prot_bits *bits; | ||
167 | size_t num; | ||
168 | u64 mask; | ||
169 | }; | ||
170 | |||
171 | static struct pg_level pg_level[] = { | ||
172 | { | ||
173 | }, { /* pgd */ | ||
174 | }, { /* pud */ | ||
175 | }, { /* pmd */ | ||
176 | .bits = section_bits, | ||
177 | .num = ARRAY_SIZE(section_bits), | ||
178 | }, { /* pte */ | ||
179 | .bits = pte_bits, | ||
180 | .num = ARRAY_SIZE(pte_bits), | ||
181 | }, | ||
182 | }; | ||
183 | |||
184 | static void dump_prot(struct pg_state *st, const struct prot_bits *bits, size_t num) | ||
185 | { | ||
186 | unsigned i; | ||
187 | |||
188 | for (i = 0; i < num; i++, bits++) { | ||
189 | const char *s; | ||
190 | |||
191 | if ((st->current_prot & bits->mask) == bits->val) | ||
192 | s = bits->set; | ||
193 | else | ||
194 | s = bits->clear; | ||
195 | |||
196 | if (s) | ||
197 | seq_printf(st->seq, " %s", s); | ||
198 | } | ||
199 | } | ||
200 | |||
201 | static void note_page(struct pg_state *st, unsigned long addr, unsigned level, u64 val) | ||
202 | { | ||
203 | static const char units[] = "KMGTPE"; | ||
204 | u64 prot = val & pg_level[level].mask; | ||
205 | |||
206 | if (addr < USER_PGTABLES_CEILING) | ||
207 | return; | ||
208 | |||
209 | if (!st->level) { | ||
210 | st->level = level; | ||
211 | st->current_prot = prot; | ||
212 | seq_printf(st->seq, "---[ %s ]---\n", st->marker->name); | ||
213 | } else if (prot != st->current_prot || level != st->level || | ||
214 | addr >= st->marker[1].start_address) { | ||
215 | const char *unit = units; | ||
216 | unsigned long delta; | ||
217 | |||
218 | if (st->current_prot) { | ||
219 | seq_printf(st->seq, "0x%08lx-0x%08lx ", | ||
220 | st->start_address, addr); | ||
221 | |||
222 | delta = (addr - st->start_address) >> 10; | ||
223 | while (!(delta & 1023) && unit[1]) { | ||
224 | delta >>= 10; | ||
225 | unit++; | ||
226 | } | ||
227 | seq_printf(st->seq, "%9lu%c", delta, *unit); | ||
228 | if (pg_level[st->level].bits) | ||
229 | dump_prot(st, pg_level[st->level].bits, pg_level[st->level].num); | ||
230 | seq_printf(st->seq, "\n"); | ||
231 | } | ||
232 | |||
233 | if (addr >= st->marker[1].start_address) { | ||
234 | st->marker++; | ||
235 | seq_printf(st->seq, "---[ %s ]---\n", st->marker->name); | ||
236 | } | ||
237 | st->start_address = addr; | ||
238 | st->current_prot = prot; | ||
239 | st->level = level; | ||
240 | } | ||
241 | } | ||
242 | |||
243 | static void walk_pte(struct pg_state *st, pmd_t *pmd, unsigned long start) | ||
244 | { | ||
245 | pte_t *pte = pte_offset_kernel(pmd, 0); | ||
246 | unsigned long addr; | ||
247 | unsigned i; | ||
248 | |||
249 | for (i = 0; i < PTRS_PER_PTE; i++, pte++) { | ||
250 | addr = start + i * PAGE_SIZE; | ||
251 | note_page(st, addr, 4, pte_val(*pte)); | ||
252 | } | ||
253 | } | ||
254 | |||
255 | static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start) | ||
256 | { | ||
257 | pmd_t *pmd = pmd_offset(pud, 0); | ||
258 | unsigned long addr; | ||
259 | unsigned i; | ||
260 | |||
261 | for (i = 0; i < PTRS_PER_PMD; i++, pmd++) { | ||
262 | addr = start + i * PMD_SIZE; | ||
263 | if (pmd_none(*pmd) || pmd_large(*pmd) || !pmd_present(*pmd)) | ||
264 | note_page(st, addr, 3, pmd_val(*pmd)); | ||
265 | else | ||
266 | walk_pte(st, pmd, addr); | ||
267 | } | ||
268 | } | ||
269 | |||
270 | static void walk_pud(struct pg_state *st, pgd_t *pgd, unsigned long start) | ||
271 | { | ||
272 | pud_t *pud = pud_offset(pgd, 0); | ||
273 | unsigned long addr; | ||
274 | unsigned i; | ||
275 | |||
276 | for (i = 0; i < PTRS_PER_PUD; i++, pud++) { | ||
277 | addr = start + i * PUD_SIZE; | ||
278 | if (!pud_none(*pud)) { | ||
279 | walk_pmd(st, pud, addr); | ||
280 | } else { | ||
281 | note_page(st, addr, 2, pud_val(*pud)); | ||
282 | } | ||
283 | } | ||
284 | } | ||
285 | |||
286 | static void walk_pgd(struct seq_file *m) | ||
287 | { | ||
288 | pgd_t *pgd = swapper_pg_dir; | ||
289 | struct pg_state st; | ||
290 | unsigned long addr; | ||
291 | unsigned i, pgdoff = USER_PGTABLES_CEILING / PGDIR_SIZE; | ||
292 | |||
293 | memset(&st, 0, sizeof(st)); | ||
294 | st.seq = m; | ||
295 | st.marker = address_markers; | ||
296 | |||
297 | pgd += pgdoff; | ||
298 | |||
299 | for (i = pgdoff; i < PTRS_PER_PGD; i++, pgd++) { | ||
300 | addr = i * PGDIR_SIZE; | ||
301 | if (!pgd_none(*pgd)) { | ||
302 | walk_pud(&st, pgd, addr); | ||
303 | } else { | ||
304 | note_page(&st, addr, 1, pgd_val(*pgd)); | ||
305 | } | ||
306 | } | ||
307 | |||
308 | note_page(&st, 0, 0, 0); | ||
309 | } | ||
310 | |||
311 | static int ptdump_show(struct seq_file *m, void *v) | ||
312 | { | ||
313 | walk_pgd(m); | ||
314 | return 0; | ||
315 | } | ||
316 | |||
317 | static int ptdump_open(struct inode *inode, struct file *file) | ||
318 | { | ||
319 | return single_open(file, ptdump_show, NULL); | ||
320 | } | ||
321 | |||
322 | static const struct file_operations ptdump_fops = { | ||
323 | .open = ptdump_open, | ||
324 | .read = seq_read, | ||
325 | .llseek = seq_lseek, | ||
326 | .release = single_release, | ||
327 | }; | ||
328 | |||
329 | static int ptdump_init(void) | ||
330 | { | ||
331 | struct dentry *pe; | ||
332 | unsigned i, j; | ||
333 | |||
334 | for (i = 0; i < ARRAY_SIZE(pg_level); i++) | ||
335 | if (pg_level[i].bits) | ||
336 | for (j = 0; j < pg_level[i].num; j++) | ||
337 | pg_level[i].mask |= pg_level[i].bits[j].mask; | ||
338 | |||
339 | address_markers[2].start_address = VMALLOC_START; | ||
340 | |||
341 | pe = debugfs_create_file("kernel_page_tables", 0400, NULL, NULL, | ||
342 | &ptdump_fops); | ||
343 | return pe ? 0 : -ENOMEM; | ||
344 | } | ||
345 | __initcall(ptdump_init); | ||
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index 6d5ba9afb16a..3387e60e4ea3 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c | |||
@@ -175,16 +175,16 @@ void __flush_dcache_page(struct address_space *mapping, struct page *page) | |||
175 | unsigned long i; | 175 | unsigned long i; |
176 | if (cache_is_vipt_nonaliasing()) { | 176 | if (cache_is_vipt_nonaliasing()) { |
177 | for (i = 0; i < (1 << compound_order(page)); i++) { | 177 | for (i = 0; i < (1 << compound_order(page)); i++) { |
178 | void *addr = kmap_atomic(page); | 178 | void *addr = kmap_atomic(page + i); |
179 | __cpuc_flush_dcache_area(addr, PAGE_SIZE); | 179 | __cpuc_flush_dcache_area(addr, PAGE_SIZE); |
180 | kunmap_atomic(addr); | 180 | kunmap_atomic(addr); |
181 | } | 181 | } |
182 | } else { | 182 | } else { |
183 | for (i = 0; i < (1 << compound_order(page)); i++) { | 183 | for (i = 0; i < (1 << compound_order(page)); i++) { |
184 | void *addr = kmap_high_get(page); | 184 | void *addr = kmap_high_get(page + i); |
185 | if (addr) { | 185 | if (addr) { |
186 | __cpuc_flush_dcache_area(addr, PAGE_SIZE); | 186 | __cpuc_flush_dcache_area(addr, PAGE_SIZE); |
187 | kunmap_high(page); | 187 | kunmap_high(page + i); |
188 | } | 188 | } |
189 | } | 189 | } |
190 | } | 190 | } |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index f123d6eb074b..f9c32ba73544 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -392,9 +392,9 @@ __arm_ioremap_exec(phys_addr_t phys_addr, size_t size, bool cached) | |||
392 | unsigned int mtype; | 392 | unsigned int mtype; |
393 | 393 | ||
394 | if (cached) | 394 | if (cached) |
395 | mtype = MT_MEMORY; | 395 | mtype = MT_MEMORY_RWX; |
396 | else | 396 | else |
397 | mtype = MT_MEMORY_NONCACHED; | 397 | mtype = MT_MEMORY_RWX_NONCACHED; |
398 | 398 | ||
399 | return __arm_ioremap_caller(phys_addr, size, mtype, | 399 | return __arm_ioremap_caller(phys_addr, size, mtype, |
400 | __builtin_return_address(0)); | 400 | __builtin_return_address(0)); |
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index d27158c38eb0..5e85ed371364 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c | |||
@@ -146,7 +146,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, | |||
146 | 146 | ||
147 | info.flags = VM_UNMAPPED_AREA_TOPDOWN; | 147 | info.flags = VM_UNMAPPED_AREA_TOPDOWN; |
148 | info.length = len; | 148 | info.length = len; |
149 | info.low_limit = PAGE_SIZE; | 149 | info.low_limit = FIRST_USER_ADDRESS; |
150 | info.high_limit = mm->mmap_base; | 150 | info.high_limit = mm->mmap_base; |
151 | info.align_mask = do_align ? (PAGE_MASK & (SHMLBA - 1)) : 0; | 151 | info.align_mask = do_align ? (PAGE_MASK & (SHMLBA - 1)) : 0; |
152 | info.align_offset = pgoff << PAGE_SHIFT; | 152 | info.align_offset = pgoff << PAGE_SHIFT; |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 580ef2de82d7..4f08c133cc25 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/cputype.h> | 22 | #include <asm/cputype.h> |
23 | #include <asm/sections.h> | 23 | #include <asm/sections.h> |
24 | #include <asm/cachetype.h> | 24 | #include <asm/cachetype.h> |
25 | #include <asm/sections.h> | ||
25 | #include <asm/setup.h> | 26 | #include <asm/setup.h> |
26 | #include <asm/smp_plat.h> | 27 | #include <asm/smp_plat.h> |
27 | #include <asm/tlb.h> | 28 | #include <asm/tlb.h> |
@@ -287,36 +288,43 @@ static struct mem_type mem_types[] = { | |||
287 | .prot_l1 = PMD_TYPE_TABLE, | 288 | .prot_l1 = PMD_TYPE_TABLE, |
288 | .domain = DOMAIN_USER, | 289 | .domain = DOMAIN_USER, |
289 | }, | 290 | }, |
290 | [MT_MEMORY] = { | 291 | [MT_MEMORY_RWX] = { |
291 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY, | 292 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY, |
292 | .prot_l1 = PMD_TYPE_TABLE, | 293 | .prot_l1 = PMD_TYPE_TABLE, |
293 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, | 294 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, |
294 | .domain = DOMAIN_KERNEL, | 295 | .domain = DOMAIN_KERNEL, |
295 | }, | 296 | }, |
297 | [MT_MEMORY_RW] = { | ||
298 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | | ||
299 | L_PTE_XN, | ||
300 | .prot_l1 = PMD_TYPE_TABLE, | ||
301 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, | ||
302 | .domain = DOMAIN_KERNEL, | ||
303 | }, | ||
296 | [MT_ROM] = { | 304 | [MT_ROM] = { |
297 | .prot_sect = PMD_TYPE_SECT, | 305 | .prot_sect = PMD_TYPE_SECT, |
298 | .domain = DOMAIN_KERNEL, | 306 | .domain = DOMAIN_KERNEL, |
299 | }, | 307 | }, |
300 | [MT_MEMORY_NONCACHED] = { | 308 | [MT_MEMORY_RWX_NONCACHED] = { |
301 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | | 309 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | |
302 | L_PTE_MT_BUFFERABLE, | 310 | L_PTE_MT_BUFFERABLE, |
303 | .prot_l1 = PMD_TYPE_TABLE, | 311 | .prot_l1 = PMD_TYPE_TABLE, |
304 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, | 312 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, |
305 | .domain = DOMAIN_KERNEL, | 313 | .domain = DOMAIN_KERNEL, |
306 | }, | 314 | }, |
307 | [MT_MEMORY_DTCM] = { | 315 | [MT_MEMORY_RW_DTCM] = { |
308 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | | 316 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | |
309 | L_PTE_XN, | 317 | L_PTE_XN, |
310 | .prot_l1 = PMD_TYPE_TABLE, | 318 | .prot_l1 = PMD_TYPE_TABLE, |
311 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, | 319 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, |
312 | .domain = DOMAIN_KERNEL, | 320 | .domain = DOMAIN_KERNEL, |
313 | }, | 321 | }, |
314 | [MT_MEMORY_ITCM] = { | 322 | [MT_MEMORY_RWX_ITCM] = { |
315 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY, | 323 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY, |
316 | .prot_l1 = PMD_TYPE_TABLE, | 324 | .prot_l1 = PMD_TYPE_TABLE, |
317 | .domain = DOMAIN_KERNEL, | 325 | .domain = DOMAIN_KERNEL, |
318 | }, | 326 | }, |
319 | [MT_MEMORY_SO] = { | 327 | [MT_MEMORY_RW_SO] = { |
320 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | | 328 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | |
321 | L_PTE_MT_UNCACHED | L_PTE_XN, | 329 | L_PTE_MT_UNCACHED | L_PTE_XN, |
322 | .prot_l1 = PMD_TYPE_TABLE, | 330 | .prot_l1 = PMD_TYPE_TABLE, |
@@ -325,7 +333,8 @@ static struct mem_type mem_types[] = { | |||
325 | .domain = DOMAIN_KERNEL, | 333 | .domain = DOMAIN_KERNEL, |
326 | }, | 334 | }, |
327 | [MT_MEMORY_DMA_READY] = { | 335 | [MT_MEMORY_DMA_READY] = { |
328 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY, | 336 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | |
337 | L_PTE_XN, | ||
329 | .prot_l1 = PMD_TYPE_TABLE, | 338 | .prot_l1 = PMD_TYPE_TABLE, |
330 | .domain = DOMAIN_KERNEL, | 339 | .domain = DOMAIN_KERNEL, |
331 | }, | 340 | }, |
@@ -337,6 +346,44 @@ const struct mem_type *get_mem_type(unsigned int type) | |||
337 | } | 346 | } |
338 | EXPORT_SYMBOL(get_mem_type); | 347 | EXPORT_SYMBOL(get_mem_type); |
339 | 348 | ||
349 | #define PTE_SET_FN(_name, pteop) \ | ||
350 | static int pte_set_##_name(pte_t *ptep, pgtable_t token, unsigned long addr, \ | ||
351 | void *data) \ | ||
352 | { \ | ||
353 | pte_t pte = pteop(*ptep); \ | ||
354 | \ | ||
355 | set_pte_ext(ptep, pte, 0); \ | ||
356 | return 0; \ | ||
357 | } \ | ||
358 | |||
359 | #define SET_MEMORY_FN(_name, callback) \ | ||
360 | int set_memory_##_name(unsigned long addr, int numpages) \ | ||
361 | { \ | ||
362 | unsigned long start = addr; \ | ||
363 | unsigned long size = PAGE_SIZE*numpages; \ | ||
364 | unsigned end = start + size; \ | ||
365 | \ | ||
366 | if (start < MODULES_VADDR || start >= MODULES_END) \ | ||
367 | return -EINVAL;\ | ||
368 | \ | ||
369 | if (end < MODULES_VADDR || end >= MODULES_END) \ | ||
370 | return -EINVAL; \ | ||
371 | \ | ||
372 | apply_to_page_range(&init_mm, start, size, callback, NULL); \ | ||
373 | flush_tlb_kernel_range(start, end); \ | ||
374 | return 0;\ | ||
375 | } | ||
376 | |||
377 | PTE_SET_FN(ro, pte_wrprotect) | ||
378 | PTE_SET_FN(rw, pte_mkwrite) | ||
379 | PTE_SET_FN(x, pte_mkexec) | ||
380 | PTE_SET_FN(nx, pte_mknexec) | ||
381 | |||
382 | SET_MEMORY_FN(ro, pte_set_ro) | ||
383 | SET_MEMORY_FN(rw, pte_set_rw) | ||
384 | SET_MEMORY_FN(x, pte_set_x) | ||
385 | SET_MEMORY_FN(nx, pte_set_nx) | ||
386 | |||
340 | /* | 387 | /* |
341 | * Adjust the PMD section entries according to the CPU in use. | 388 | * Adjust the PMD section entries according to the CPU in use. |
342 | */ | 389 | */ |
@@ -410,6 +457,9 @@ static void __init build_mem_type_table(void) | |||
410 | mem_types[MT_DEVICE_NONSHARED].prot_sect |= PMD_SECT_XN; | 457 | mem_types[MT_DEVICE_NONSHARED].prot_sect |= PMD_SECT_XN; |
411 | mem_types[MT_DEVICE_CACHED].prot_sect |= PMD_SECT_XN; | 458 | mem_types[MT_DEVICE_CACHED].prot_sect |= PMD_SECT_XN; |
412 | mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_XN; | 459 | mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_XN; |
460 | |||
461 | /* Also setup NX memory mapping */ | ||
462 | mem_types[MT_MEMORY_RW].prot_sect |= PMD_SECT_XN; | ||
413 | } | 463 | } |
414 | if (cpu_arch >= CPU_ARCH_ARMv7 && (cr & CR_TRE)) { | 464 | if (cpu_arch >= CPU_ARCH_ARMv7 && (cr & CR_TRE)) { |
415 | /* | 465 | /* |
@@ -487,11 +537,13 @@ static void __init build_mem_type_table(void) | |||
487 | mem_types[MT_DEVICE_WC].prot_pte |= L_PTE_SHARED; | 537 | mem_types[MT_DEVICE_WC].prot_pte |= L_PTE_SHARED; |
488 | mem_types[MT_DEVICE_CACHED].prot_sect |= PMD_SECT_S; | 538 | mem_types[MT_DEVICE_CACHED].prot_sect |= PMD_SECT_S; |
489 | mem_types[MT_DEVICE_CACHED].prot_pte |= L_PTE_SHARED; | 539 | mem_types[MT_DEVICE_CACHED].prot_pte |= L_PTE_SHARED; |
490 | mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S; | 540 | mem_types[MT_MEMORY_RWX].prot_sect |= PMD_SECT_S; |
491 | mem_types[MT_MEMORY].prot_pte |= L_PTE_SHARED; | 541 | mem_types[MT_MEMORY_RWX].prot_pte |= L_PTE_SHARED; |
542 | mem_types[MT_MEMORY_RW].prot_sect |= PMD_SECT_S; | ||
543 | mem_types[MT_MEMORY_RW].prot_pte |= L_PTE_SHARED; | ||
492 | mem_types[MT_MEMORY_DMA_READY].prot_pte |= L_PTE_SHARED; | 544 | mem_types[MT_MEMORY_DMA_READY].prot_pte |= L_PTE_SHARED; |
493 | mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_S; | 545 | mem_types[MT_MEMORY_RWX_NONCACHED].prot_sect |= PMD_SECT_S; |
494 | mem_types[MT_MEMORY_NONCACHED].prot_pte |= L_PTE_SHARED; | 546 | mem_types[MT_MEMORY_RWX_NONCACHED].prot_pte |= L_PTE_SHARED; |
495 | } | 547 | } |
496 | } | 548 | } |
497 | 549 | ||
@@ -502,15 +554,15 @@ static void __init build_mem_type_table(void) | |||
502 | if (cpu_arch >= CPU_ARCH_ARMv6) { | 554 | if (cpu_arch >= CPU_ARCH_ARMv6) { |
503 | if (cpu_arch >= CPU_ARCH_ARMv7 && (cr & CR_TRE)) { | 555 | if (cpu_arch >= CPU_ARCH_ARMv7 && (cr & CR_TRE)) { |
504 | /* Non-cacheable Normal is XCB = 001 */ | 556 | /* Non-cacheable Normal is XCB = 001 */ |
505 | mem_types[MT_MEMORY_NONCACHED].prot_sect |= | 557 | mem_types[MT_MEMORY_RWX_NONCACHED].prot_sect |= |
506 | PMD_SECT_BUFFERED; | 558 | PMD_SECT_BUFFERED; |
507 | } else { | 559 | } else { |
508 | /* For both ARMv6 and non-TEX-remapping ARMv7 */ | 560 | /* For both ARMv6 and non-TEX-remapping ARMv7 */ |
509 | mem_types[MT_MEMORY_NONCACHED].prot_sect |= | 561 | mem_types[MT_MEMORY_RWX_NONCACHED].prot_sect |= |
510 | PMD_SECT_TEX(1); | 562 | PMD_SECT_TEX(1); |
511 | } | 563 | } |
512 | } else { | 564 | } else { |
513 | mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_BUFFERABLE; | 565 | mem_types[MT_MEMORY_RWX_NONCACHED].prot_sect |= PMD_SECT_BUFFERABLE; |
514 | } | 566 | } |
515 | 567 | ||
516 | #ifdef CONFIG_ARM_LPAE | 568 | #ifdef CONFIG_ARM_LPAE |
@@ -543,10 +595,12 @@ static void __init build_mem_type_table(void) | |||
543 | 595 | ||
544 | mem_types[MT_LOW_VECTORS].prot_l1 |= ecc_mask; | 596 | mem_types[MT_LOW_VECTORS].prot_l1 |= ecc_mask; |
545 | mem_types[MT_HIGH_VECTORS].prot_l1 |= ecc_mask; | 597 | mem_types[MT_HIGH_VECTORS].prot_l1 |= ecc_mask; |
546 | mem_types[MT_MEMORY].prot_sect |= ecc_mask | cp->pmd; | 598 | mem_types[MT_MEMORY_RWX].prot_sect |= ecc_mask | cp->pmd; |
547 | mem_types[MT_MEMORY].prot_pte |= kern_pgprot; | 599 | mem_types[MT_MEMORY_RWX].prot_pte |= kern_pgprot; |
600 | mem_types[MT_MEMORY_RW].prot_sect |= ecc_mask | cp->pmd; | ||
601 | mem_types[MT_MEMORY_RW].prot_pte |= kern_pgprot; | ||
548 | mem_types[MT_MEMORY_DMA_READY].prot_pte |= kern_pgprot; | 602 | mem_types[MT_MEMORY_DMA_READY].prot_pte |= kern_pgprot; |
549 | mem_types[MT_MEMORY_NONCACHED].prot_sect |= ecc_mask; | 603 | mem_types[MT_MEMORY_RWX_NONCACHED].prot_sect |= ecc_mask; |
550 | mem_types[MT_ROM].prot_sect |= cp->pmd; | 604 | mem_types[MT_ROM].prot_sect |= cp->pmd; |
551 | 605 | ||
552 | switch (cp->pmd) { | 606 | switch (cp->pmd) { |
@@ -1296,6 +1350,8 @@ static void __init kmap_init(void) | |||
1296 | static void __init map_lowmem(void) | 1350 | static void __init map_lowmem(void) |
1297 | { | 1351 | { |
1298 | struct memblock_region *reg; | 1352 | struct memblock_region *reg; |
1353 | unsigned long kernel_x_start = round_down(__pa(_stext), SECTION_SIZE); | ||
1354 | unsigned long kernel_x_end = round_up(__pa(__init_end), SECTION_SIZE); | ||
1299 | 1355 | ||
1300 | /* Map all the lowmem memory banks. */ | 1356 | /* Map all the lowmem memory banks. */ |
1301 | for_each_memblock(memory, reg) { | 1357 | for_each_memblock(memory, reg) { |
@@ -1308,12 +1364,40 @@ static void __init map_lowmem(void) | |||
1308 | if (start >= end) | 1364 | if (start >= end) |
1309 | break; | 1365 | break; |
1310 | 1366 | ||
1311 | map.pfn = __phys_to_pfn(start); | 1367 | if (end < kernel_x_start || start >= kernel_x_end) { |
1312 | map.virtual = __phys_to_virt(start); | 1368 | map.pfn = __phys_to_pfn(start); |
1313 | map.length = end - start; | 1369 | map.virtual = __phys_to_virt(start); |
1314 | map.type = MT_MEMORY; | 1370 | map.length = end - start; |
1371 | map.type = MT_MEMORY_RWX; | ||
1315 | 1372 | ||
1316 | create_mapping(&map); | 1373 | create_mapping(&map); |
1374 | } else { | ||
1375 | /* This better cover the entire kernel */ | ||
1376 | if (start < kernel_x_start) { | ||
1377 | map.pfn = __phys_to_pfn(start); | ||
1378 | map.virtual = __phys_to_virt(start); | ||
1379 | map.length = kernel_x_start - start; | ||
1380 | map.type = MT_MEMORY_RW; | ||
1381 | |||
1382 | create_mapping(&map); | ||
1383 | } | ||
1384 | |||
1385 | map.pfn = __phys_to_pfn(kernel_x_start); | ||
1386 | map.virtual = __phys_to_virt(kernel_x_start); | ||
1387 | map.length = kernel_x_end - kernel_x_start; | ||
1388 | map.type = MT_MEMORY_RWX; | ||
1389 | |||
1390 | create_mapping(&map); | ||
1391 | |||
1392 | if (kernel_x_end < end) { | ||
1393 | map.pfn = __phys_to_pfn(kernel_x_end); | ||
1394 | map.virtual = __phys_to_virt(kernel_x_end); | ||
1395 | map.length = end - kernel_x_end; | ||
1396 | map.type = MT_MEMORY_RW; | ||
1397 | |||
1398 | create_mapping(&map); | ||
1399 | } | ||
1400 | } | ||
1317 | } | 1401 | } |
1318 | } | 1402 | } |
1319 | 1403 | ||
diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c index 0acb089d0f70..249379535be2 100644 --- a/arch/arm/mm/pgd.c +++ b/arch/arm/mm/pgd.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #define __pgd_alloc() kmalloc(PTRS_PER_PGD * sizeof(pgd_t), GFP_KERNEL) | 23 | #define __pgd_alloc() kmalloc(PTRS_PER_PGD * sizeof(pgd_t), GFP_KERNEL) |
24 | #define __pgd_free(pgd) kfree(pgd) | 24 | #define __pgd_free(pgd) kfree(pgd) |
25 | #else | 25 | #else |
26 | #define __pgd_alloc() (pgd_t *)__get_free_pages(GFP_KERNEL, 2) | 26 | #define __pgd_alloc() (pgd_t *)__get_free_pages(GFP_KERNEL | __GFP_REPEAT, 2) |
27 | #define __pgd_free(pgd) free_pages((unsigned long)pgd, 2) | 27 | #define __pgd_free(pgd) free_pages((unsigned long)pgd, 2) |
28 | #endif | 28 | #endif |
29 | 29 | ||
@@ -87,7 +87,8 @@ pgd_t *pgd_alloc(struct mm_struct *mm) | |||
87 | init_pud = pud_offset(init_pgd, 0); | 87 | init_pud = pud_offset(init_pgd, 0); |
88 | init_pmd = pmd_offset(init_pud, 0); | 88 | init_pmd = pmd_offset(init_pud, 0); |
89 | init_pte = pte_offset_map(init_pmd, 0); | 89 | init_pte = pte_offset_map(init_pmd, 0); |
90 | set_pte_ext(new_pte, *init_pte, 0); | 90 | set_pte_ext(new_pte + 0, init_pte[0], 0); |
91 | set_pte_ext(new_pte + 1, init_pte[1], 0); | ||
91 | pte_unmap(init_pte); | 92 | pte_unmap(init_pte); |
92 | pte_unmap(new_pte); | 93 | pte_unmap(new_pte); |
93 | } | 94 | } |
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h index fb92abb91628..2861b155485a 100644 --- a/arch/arm/plat-omap/include/plat/dmtimer.h +++ b/arch/arm/plat-omap/include/plat/dmtimer.h | |||
@@ -336,8 +336,11 @@ static inline void __omap_dm_timer_enable_posted(struct omap_dm_timer *timer) | |||
336 | if (timer->posted) | 336 | if (timer->posted) |
337 | return; | 337 | return; |
338 | 338 | ||
339 | if (timer->errata & OMAP_TIMER_ERRATA_I103_I767) | 339 | if (timer->errata & OMAP_TIMER_ERRATA_I103_I767) { |
340 | timer->posted = OMAP_TIMER_NONPOSTED; | ||
341 | __omap_dm_timer_write(timer, OMAP_TIMER_IF_CTRL_REG, 0, 0); | ||
340 | return; | 342 | return; |
343 | } | ||
341 | 344 | ||
342 | __omap_dm_timer_write(timer, OMAP_TIMER_IF_CTRL_REG, | 345 | __omap_dm_timer_write(timer, OMAP_TIMER_IF_CTRL_REG, |
343 | OMAP_TIMER_CTRL_POSTED, 0); | 346 | OMAP_TIMER_CTRL_POSTED, 0); |
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index 83e4f959ee47..85501238b425 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c | |||
@@ -96,7 +96,7 @@ static int remap_pte_fn(pte_t *ptep, pgtable_t token, unsigned long addr, | |||
96 | struct remap_data *info = data; | 96 | struct remap_data *info = data; |
97 | struct page *page = info->pages[info->index++]; | 97 | struct page *page = info->pages[info->index++]; |
98 | unsigned long pfn = page_to_pfn(page); | 98 | unsigned long pfn = page_to_pfn(page); |
99 | pte_t pte = pfn_pte(pfn, info->prot); | 99 | pte_t pte = pte_mkspecial(pfn_pte(pfn, info->prot)); |
100 | 100 | ||
101 | if (map_foreign_page(pfn, info->fgmfn, info->domid)) | 101 | if (map_foreign_page(pfn, info->fgmfn, info->domid)) |
102 | return -EFAULT; | 102 | return -EFAULT; |
@@ -224,10 +224,10 @@ static int __init xen_guest_init(void) | |||
224 | } | 224 | } |
225 | if (of_address_to_resource(node, GRANT_TABLE_PHYSADDR, &res)) | 225 | if (of_address_to_resource(node, GRANT_TABLE_PHYSADDR, &res)) |
226 | return 0; | 226 | return 0; |
227 | xen_hvm_resume_frames = res.start >> PAGE_SHIFT; | 227 | xen_hvm_resume_frames = res.start; |
228 | xen_events_irq = irq_of_parse_and_map(node, 0); | 228 | xen_events_irq = irq_of_parse_and_map(node, 0); |
229 | pr_info("Xen %s support found, events_irq=%d gnttab_frame_pfn=%lx\n", | 229 | pr_info("Xen %s support found, events_irq=%d gnttab_frame_pfn=%lx\n", |
230 | version, xen_events_irq, xen_hvm_resume_frames); | 230 | version, xen_events_irq, (xen_hvm_resume_frames >> PAGE_SHIFT)); |
231 | xen_domain_type = XEN_HVM_DOMAIN; | 231 | xen_domain_type = XEN_HVM_DOMAIN; |
232 | 232 | ||
233 | xen_setup_features(); | 233 | xen_setup_features(); |
diff --git a/arch/arm/xen/p2m.c b/arch/arm/xen/p2m.c index 23732cdff551..b31ee1b275b0 100644 --- a/arch/arm/xen/p2m.c +++ b/arch/arm/xen/p2m.c | |||
@@ -25,8 +25,9 @@ struct xen_p2m_entry { | |||
25 | struct rb_node rbnode_phys; | 25 | struct rb_node rbnode_phys; |
26 | }; | 26 | }; |
27 | 27 | ||
28 | rwlock_t p2m_lock; | 28 | static rwlock_t p2m_lock; |
29 | struct rb_root phys_to_mach = RB_ROOT; | 29 | struct rb_root phys_to_mach = RB_ROOT; |
30 | EXPORT_SYMBOL_GPL(phys_to_mach); | ||
30 | static struct rb_root mach_to_phys = RB_ROOT; | 31 | static struct rb_root mach_to_phys = RB_ROOT; |
31 | 32 | ||
32 | static int xen_add_phys_to_mach_entry(struct xen_p2m_entry *new) | 33 | static int xen_add_phys_to_mach_entry(struct xen_p2m_entry *new) |
@@ -200,7 +201,7 @@ bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn) | |||
200 | } | 201 | } |
201 | EXPORT_SYMBOL_GPL(__set_phys_to_machine); | 202 | EXPORT_SYMBOL_GPL(__set_phys_to_machine); |
202 | 203 | ||
203 | int p2m_init(void) | 204 | static int p2m_init(void) |
204 | { | 205 | { |
205 | rwlock_init(&p2m_lock); | 206 | rwlock_init(&p2m_lock); |
206 | return 0; | 207 | return 0; |