diff options
Diffstat (limited to 'arch/arm')
264 files changed, 4916 insertions, 3407 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index d45ca1bf1de0..03e0460d5067 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -5,8 +5,9 @@ config ARM | |||
5 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE | 5 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE |
6 | select ARCH_HAVE_CUSTOM_GPIO_H | 6 | select ARCH_HAVE_CUSTOM_GPIO_H |
7 | select ARCH_WANT_IPC_PARSE_VERSION | 7 | select ARCH_WANT_IPC_PARSE_VERSION |
8 | select BUILDTIME_EXTABLE_SORT if MMU | ||
8 | select CPU_PM if (SUSPEND || CPU_IDLE) | 9 | select CPU_PM if (SUSPEND || CPU_IDLE) |
9 | select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN | 10 | select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN && MMU |
10 | select GENERIC_ATOMIC64 if (CPU_V6 || !CPU_32v6K || !AEABI) | 11 | select GENERIC_ATOMIC64 if (CPU_V6 || !CPU_32v6K || !AEABI) |
11 | select GENERIC_CLOCKEVENTS_BROADCAST if SMP | 12 | select GENERIC_CLOCKEVENTS_BROADCAST if SMP |
12 | select GENERIC_IRQ_PROBE | 13 | select GENERIC_IRQ_PROBE |
@@ -21,6 +22,7 @@ config ARM | |||
21 | select HAVE_AOUT | 22 | select HAVE_AOUT |
22 | select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL | 23 | select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL |
23 | select HAVE_ARCH_KGDB | 24 | select HAVE_ARCH_KGDB |
25 | select HAVE_ARCH_SECCOMP_FILTER | ||
24 | select HAVE_ARCH_TRACEHOOK | 26 | select HAVE_ARCH_TRACEHOOK |
25 | select HAVE_BPF_JIT | 27 | select HAVE_BPF_JIT |
26 | select HAVE_C_RECORDMCOUNT | 28 | select HAVE_C_RECORDMCOUNT |
@@ -330,6 +332,8 @@ config ARCH_AT91 | |||
330 | select IRQ_DOMAIN | 332 | select IRQ_DOMAIN |
331 | select NEED_MACH_GPIO_H | 333 | select NEED_MACH_GPIO_H |
332 | select NEED_MACH_IO_H if PCCARD | 334 | select NEED_MACH_IO_H if PCCARD |
335 | select PINCTRL | ||
336 | select PINCTRL_AT91 if USE_OF | ||
333 | help | 337 | help |
334 | This enables support for systems based on Atmel | 338 | This enables support for systems based on Atmel |
335 | AT91RM9200 and AT91SAM9* processors. | 339 | AT91RM9200 and AT91SAM9* processors. |
@@ -364,6 +368,7 @@ config ARCH_CNS3XXX | |||
364 | 368 | ||
365 | config ARCH_CLPS711X | 369 | config ARCH_CLPS711X |
366 | bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" | 370 | bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" |
371 | select ARCH_REQUIRE_GPIOLIB | ||
367 | select ARCH_USES_GETTIMEOFFSET | 372 | select ARCH_USES_GETTIMEOFFSET |
368 | select CLKDEV_LOOKUP | 373 | select CLKDEV_LOOKUP |
369 | select COMMON_CLK | 374 | select COMMON_CLK |
@@ -534,6 +539,7 @@ config ARCH_KIRKWOOD | |||
534 | select CPU_FEROCEON | 539 | select CPU_FEROCEON |
535 | select GENERIC_CLOCKEVENTS | 540 | select GENERIC_CLOCKEVENTS |
536 | select PCI | 541 | select PCI |
542 | select PCI_QUIRKS | ||
537 | select PLAT_ORION_LEGACY | 543 | select PLAT_ORION_LEGACY |
538 | help | 544 | help |
539 | Support for the following Marvell Kirkwood series SoCs: | 545 | Support for the following Marvell Kirkwood series SoCs: |
@@ -573,6 +579,7 @@ config ARCH_MMP | |||
573 | select GPIO_PXA | 579 | select GPIO_PXA |
574 | select IRQ_DOMAIN | 580 | select IRQ_DOMAIN |
575 | select NEED_MACH_GPIO_H | 581 | select NEED_MACH_GPIO_H |
582 | select PINCTRL | ||
576 | select PLAT_PXA | 583 | select PLAT_PXA |
577 | select SPARSE_IRQ | 584 | select SPARSE_IRQ |
578 | help | 585 | help |
@@ -891,6 +898,7 @@ config ARCH_NOMADIK | |||
891 | 898 | ||
892 | config PLAT_SPEAR | 899 | config PLAT_SPEAR |
893 | bool "ST SPEAr" | 900 | bool "ST SPEAr" |
901 | select ARCH_HAS_CPUFREQ | ||
894 | select ARCH_REQUIRE_GPIOLIB | 902 | select ARCH_REQUIRE_GPIOLIB |
895 | select ARM_AMBA | 903 | select ARM_AMBA |
896 | select CLKDEV_LOOKUP | 904 | select CLKDEV_LOOKUP |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 97252d86a701..20d295aca51f 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -32,6 +32,7 @@ KBUILD_DEFCONFIG := versatile_defconfig | |||
32 | # defines filename extension depending memory management type. | 32 | # defines filename extension depending memory management type. |
33 | ifeq ($(CONFIG_MMU),) | 33 | ifeq ($(CONFIG_MMU),) |
34 | MMUEXT := -nommu | 34 | MMUEXT := -nommu |
35 | KBUILD_CFLAGS += $(call cc-option,-mno-unaligned-access) | ||
35 | endif | 36 | endif |
36 | 37 | ||
37 | ifeq ($(CONFIG_FRAME_POINTER),y) | 38 | ifeq ($(CONFIG_FRAME_POINTER),y) |
@@ -290,10 +291,10 @@ zinstall uinstall install: vmlinux | |||
290 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ | 291 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ |
291 | 292 | ||
292 | %.dtb: scripts | 293 | %.dtb: scripts |
293 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ | 294 | $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@ |
294 | 295 | ||
295 | dtbs: scripts | 296 | dtbs: scripts |
296 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ | 297 | $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) dtbs |
297 | 298 | ||
298 | # We use MRPROPER_FILES and CLEAN_FILES now | 299 | # We use MRPROPER_FILES and CLEAN_FILES now |
299 | archclean: | 300 | archclean: |
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index 9137df539b61..abfce280f57b 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile | |||
@@ -15,8 +15,6 @@ ifneq ($(MACHINE),) | |||
15 | include $(srctree)/$(MACHINE)/Makefile.boot | 15 | include $(srctree)/$(MACHINE)/Makefile.boot |
16 | endif | 16 | endif |
17 | 17 | ||
18 | include $(srctree)/arch/arm/boot/dts/Makefile | ||
19 | |||
20 | # Note: the following conditions must always be true: | 18 | # Note: the following conditions must always be true: |
21 | # ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET) | 19 | # ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET) |
22 | # PARAMS_PHYS must be within 4MB of ZRELADDR | 20 | # PARAMS_PHYS must be within 4MB of ZRELADDR |
@@ -59,16 +57,6 @@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE | |||
59 | 57 | ||
60 | endif | 58 | endif |
61 | 59 | ||
62 | targets += $(dtb-y) | ||
63 | |||
64 | # Rule to build device tree blobs | ||
65 | $(obj)/%.dtb: $(src)/dts/%.dts FORCE | ||
66 | $(call if_changed_dep,dtc) | ||
67 | |||
68 | $(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y)) | ||
69 | |||
70 | clean-files := *.dtb | ||
71 | |||
72 | ifneq ($(LOADADDR),) | 60 | ifneq ($(LOADADDR),) |
73 | UIMAGE_LOADADDR=$(LOADADDR) | 61 | UIMAGE_LOADADDR=$(LOADADDR) |
74 | else | 62 | else |
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 90275f036cd1..49ca86e37b8d 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -652,6 +652,15 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size | |||
652 | mov pc, lr | 652 | mov pc, lr |
653 | ENDPROC(__setup_mmu) | 653 | ENDPROC(__setup_mmu) |
654 | 654 | ||
655 | @ Enable unaligned access on v6, to allow better code generation | ||
656 | @ for the decompressor C code: | ||
657 | __armv6_mmu_cache_on: | ||
658 | mrc p15, 0, r0, c1, c0, 0 @ read SCTLR | ||
659 | bic r0, r0, #2 @ A (no unaligned access fault) | ||
660 | orr r0, r0, #1 << 22 @ U (v6 unaligned access model) | ||
661 | mcr p15, 0, r0, c1, c0, 0 @ write SCTLR | ||
662 | b __armv4_mmu_cache_on | ||
663 | |||
655 | __arm926ejs_mmu_cache_on: | 664 | __arm926ejs_mmu_cache_on: |
656 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | 665 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH |
657 | mov r0, #4 @ put dcache in WT mode | 666 | mov r0, #4 @ put dcache in WT mode |
@@ -694,6 +703,9 @@ __armv7_mmu_cache_on: | |||
694 | bic r0, r0, #1 << 28 @ clear SCTLR.TRE | 703 | bic r0, r0, #1 << 28 @ clear SCTLR.TRE |
695 | orr r0, r0, #0x5000 @ I-cache enable, RR cache replacement | 704 | orr r0, r0, #0x5000 @ I-cache enable, RR cache replacement |
696 | orr r0, r0, #0x003c @ write buffer | 705 | orr r0, r0, #0x003c @ write buffer |
706 | bic r0, r0, #2 @ A (no unaligned access fault) | ||
707 | orr r0, r0, #1 << 22 @ U (v6 unaligned access model) | ||
708 | @ (needed for ARM1176) | ||
697 | #ifdef CONFIG_MMU | 709 | #ifdef CONFIG_MMU |
698 | #ifdef CONFIG_CPU_ENDIAN_BE8 | 710 | #ifdef CONFIG_CPU_ENDIAN_BE8 |
699 | orr r0, r0, #1 << 25 @ big-endian page tables | 711 | orr r0, r0, #1 << 25 @ big-endian page tables |
@@ -914,7 +926,7 @@ proc_types: | |||
914 | 926 | ||
915 | .word 0x0007b000 @ ARMv6 | 927 | .word 0x0007b000 @ ARMv6 |
916 | .word 0x000ff000 | 928 | .word 0x000ff000 |
917 | W(b) __armv4_mmu_cache_on | 929 | W(b) __armv6_mmu_cache_on |
918 | W(b) __armv4_mmu_cache_off | 930 | W(b) __armv4_mmu_cache_off |
919 | W(b) __armv6_mmu_cache_flush | 931 | W(b) __armv6_mmu_cache_flush |
920 | 932 | ||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 2458b69e2be6..5e98094a3e1b 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -1,21 +1,37 @@ | |||
1 | ifeq ($(CONFIG_OF),y) | 1 | ifeq ($(CONFIG_OF),y) |
2 | 2 | ||
3 | dtb-$(CONFIG_ARCH_AT91) += aks-cdu.dtb \ | 3 | # Keep at91 dtb files sorted alphabetically for each SoC |
4 | at91sam9263ek.dtb \ | 4 | # rm9200 |
5 | at91sam9g20ek_2mmc.dtb \ | 5 | dtb-$(CONFIG_ARCH_AT91) += at91rm9200ek.dtb |
6 | at91sam9g20ek.dtb \ | 6 | # sam9260 |
7 | at91sam9g25ek.dtb \ | 7 | dtb-$(CONFIG_ARCH_AT91) += animeo_ip.dtb |
8 | at91sam9m10g45ek.dtb \ | 8 | dtb-$(CONFIG_ARCH_AT91) += aks-cdu.dtb |
9 | at91sam9n12ek.dtb \ | 9 | dtb-$(CONFIG_ARCH_AT91) += ethernut5.dtb |
10 | ethernut5.dtb \ | 10 | dtb-$(CONFIG_ARCH_AT91) += evk-pro3.dtb |
11 | evk-pro3.dtb \ | 11 | dtb-$(CONFIG_ARCH_AT91) += tny_a9260.dtb |
12 | kizbox.dtb \ | 12 | dtb-$(CONFIG_ARCH_AT91) += usb_a9260.dtb |
13 | tny_a9260.dtb \ | 13 | # sam9263 |
14 | tny_a9263.dtb \ | 14 | dtb-$(CONFIG_ARCH_AT91) += at91sam9263ek.dtb |
15 | tny_a9g20.dtb \ | 15 | dtb-$(CONFIG_ARCH_AT91) += tny_a9263.dtb |
16 | usb_a9260.dtb \ | 16 | dtb-$(CONFIG_ARCH_AT91) += usb_a9263.dtb |
17 | usb_a9263.dtb \ | 17 | # sam9g20 |
18 | usb_a9g20.dtb | 18 | dtb-$(CONFIG_ARCH_AT91) += at91sam9g20ek.dtb |
19 | dtb-$(CONFIG_ARCH_AT91) += at91sam9g20ek_2mmc.dtb | ||
20 | dtb-$(CONFIG_ARCH_AT91) += kizbox.dtb | ||
21 | dtb-$(CONFIG_ARCH_AT91) += tny_a9g20.dtb | ||
22 | dtb-$(CONFIG_ARCH_AT91) += usb_a9g20.dtb | ||
23 | # sam9g45 | ||
24 | dtb-$(CONFIG_ARCH_AT91) += at91sam9m10g45ek.dtb | ||
25 | dtb-$(CONFIG_ARCH_AT91) += pm9g45.dtb | ||
26 | # sam9n12 | ||
27 | dtb-$(CONFIG_ARCH_AT91) += at91sam9n12ek.dtb | ||
28 | # sam9x5 | ||
29 | dtb-$(CONFIG_ARCH_AT91) += at91sam9g15ek.dtb | ||
30 | dtb-$(CONFIG_ARCH_AT91) += at91sam9g25ek.dtb | ||
31 | dtb-$(CONFIG_ARCH_AT91) += at91sam9g35ek.dtb | ||
32 | dtb-$(CONFIG_ARCH_AT91) += at91sam9x25ek.dtb | ||
33 | dtb-$(CONFIG_ARCH_AT91) += at91sam9x35ek.dtb | ||
34 | |||
19 | dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb | 35 | dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb |
20 | dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ | 36 | dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ |
21 | dove-cubox.dtb \ | 37 | dove-cubox.dtb \ |
@@ -106,4 +122,12 @@ dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \ | |||
106 | wm8505-ref.dtb \ | 122 | wm8505-ref.dtb \ |
107 | wm8650-mid.dtb | 123 | wm8650-mid.dtb |
108 | 124 | ||
125 | targets += dtbs | ||
109 | endif | 126 | endif |
127 | |||
128 | # *.dtb used to be generated in the directory above. Clean out the | ||
129 | # old build results so people don't accidentally use them. | ||
130 | dtbs: $(addprefix $(obj)/, $(dtb-y)) | ||
131 | $(Q)rm -f $(obj)/../*.dtb | ||
132 | |||
133 | clean-files := *.dtb | ||
diff --git a/arch/arm/boot/dts/animeo_ip.dts b/arch/arm/boot/dts/animeo_ip.dts new file mode 100644 index 000000000000..74d92cd29d87 --- /dev/null +++ b/arch/arm/boot/dts/animeo_ip.dts | |||
@@ -0,0 +1,178 @@ | |||
1 | /* | ||
2 | * animeo_ip.dts - Device Tree file for Somfy Animeo IP Boards | ||
3 | * | ||
4 | * Copyright (C) 2011-2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2 only. | ||
7 | */ | ||
8 | |||
9 | /dts-v1/; | ||
10 | /include/ "at91sam9260.dtsi" | ||
11 | |||
12 | / { | ||
13 | model = "Somfy Animeo IP"; | ||
14 | compatible = "somfy,animeo-ip", "atmel,at91sam9260", "atmel,at91sam9"; | ||
15 | |||
16 | aliases { | ||
17 | serial0 = &usart1; | ||
18 | serial1 = &usart2; | ||
19 | serial2 = &usart0; | ||
20 | serial3 = &dbgu; | ||
21 | serial4 = &usart3; | ||
22 | serial5 = &uart0; | ||
23 | serial6 = &uart1; | ||
24 | }; | ||
25 | |||
26 | chosen { | ||
27 | linux,stdout-path = &usart2; | ||
28 | }; | ||
29 | |||
30 | memory { | ||
31 | reg = <0x20000000 0x4000000>; | ||
32 | }; | ||
33 | |||
34 | clocks { | ||
35 | #address-cells = <1>; | ||
36 | #size-cells = <1>; | ||
37 | ranges; | ||
38 | |||
39 | main_clock: clock@0 { | ||
40 | compatible = "atmel,osc", "fixed-clock"; | ||
41 | clock-frequency = <18432000>; | ||
42 | }; | ||
43 | }; | ||
44 | |||
45 | ahb { | ||
46 | apb { | ||
47 | usart0: serial@fffb0000 { | ||
48 | pinctrl-0 = <&pinctrl_usart0 &pinctrl_usart0_rts>; | ||
49 | linux,rs485-enabled-at-boot-time; | ||
50 | status = "okay"; | ||
51 | }; | ||
52 | |||
53 | usart1: serial@fffb4000 { | ||
54 | pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts>; | ||
55 | linux,rs485-enabled-at-boot-time; | ||
56 | status = "okay"; | ||
57 | }; | ||
58 | |||
59 | usart2: serial@fffb8000 { | ||
60 | pinctrl-0 = <&pinctrl_usart2>; | ||
61 | status = "okay"; | ||
62 | }; | ||
63 | |||
64 | macb0: ethernet@fffc4000 { | ||
65 | pinctrl-0 = <&pinctrl_macb_rmii &pinctrl_macb_rmii_mii>; | ||
66 | phy-mode = "mii"; | ||
67 | status = "okay"; | ||
68 | }; | ||
69 | |||
70 | mmc0: mmc@fffa8000 { | ||
71 | pinctrl-0 = <&pinctrl_mmc0_clk | ||
72 | &pinctrl_mmc0_slot1_cmd_dat0 | ||
73 | &pinctrl_mmc0_slot1_dat1_3>; | ||
74 | status = "okay"; | ||
75 | |||
76 | slot@1 { | ||
77 | reg = <1>; | ||
78 | bus-width = <4>; | ||
79 | }; | ||
80 | }; | ||
81 | }; | ||
82 | |||
83 | nand0: nand@40000000 { | ||
84 | nand-bus-width = <8>; | ||
85 | nand-ecc-mode = "soft"; | ||
86 | nand-on-flash-bbt; | ||
87 | status = "okay"; | ||
88 | |||
89 | at91bootstrap@0 { | ||
90 | label = "at91bootstrap"; | ||
91 | reg = <0x0 0x8000>; | ||
92 | }; | ||
93 | |||
94 | barebox@8000 { | ||
95 | label = "barebox"; | ||
96 | reg = <0x8000 0x40000>; | ||
97 | }; | ||
98 | |||
99 | bareboxenv@48000 { | ||
100 | label = "bareboxenv"; | ||
101 | reg = <0x48000 0x8000>; | ||
102 | }; | ||
103 | |||
104 | user_block@0x50000 { | ||
105 | label = "user_block"; | ||
106 | reg = <0x50000 0xb0000>; | ||
107 | }; | ||
108 | |||
109 | kernel@100000 { | ||
110 | label = "kernel"; | ||
111 | reg = <0x100000 0x1b0000>; | ||
112 | }; | ||
113 | |||
114 | root@2b0000 { | ||
115 | label = "root"; | ||
116 | reg = <0x2b0000 0x1D50000>; | ||
117 | }; | ||
118 | }; | ||
119 | |||
120 | usb0: ohci@00500000 { | ||
121 | num-ports = <2>; | ||
122 | atmel,vbus-gpio = <&pioB 15 1>; | ||
123 | status = "okay"; | ||
124 | }; | ||
125 | }; | ||
126 | |||
127 | leds { | ||
128 | compatible = "gpio-leds"; | ||
129 | |||
130 | power_green { | ||
131 | label = "power_green"; | ||
132 | gpios = <&pioC 17 0>; | ||
133 | linux,default-trigger = "heartbeat"; | ||
134 | }; | ||
135 | |||
136 | power_red { | ||
137 | label = "power_red"; | ||
138 | gpios = <&pioA 2 0>; | ||
139 | }; | ||
140 | |||
141 | tx_green { | ||
142 | label = "tx_green"; | ||
143 | gpios = <&pioC 19 0>; | ||
144 | }; | ||
145 | |||
146 | tx_red { | ||
147 | label = "tx_red"; | ||
148 | gpios = <&pioC 18 0>; | ||
149 | }; | ||
150 | }; | ||
151 | |||
152 | gpio_keys { | ||
153 | compatible = "gpio-keys"; | ||
154 | #address-cells = <1>; | ||
155 | #size-cells = <0>; | ||
156 | |||
157 | keyswitch_in { | ||
158 | label = "keyswitch_in"; | ||
159 | gpios = <&pioB 1 0>; | ||
160 | linux,code = <28>; | ||
161 | gpio-key,wakeup; | ||
162 | }; | ||
163 | |||
164 | error_in { | ||
165 | label = "error_in"; | ||
166 | gpios = <&pioB 2 0>; | ||
167 | linux,code = <29>; | ||
168 | gpio-key,wakeup; | ||
169 | }; | ||
170 | |||
171 | btn { | ||
172 | label = "btn"; | ||
173 | gpios = <&pioC 23 0>; | ||
174 | linux,code = <31>; | ||
175 | gpio-key,wakeup; | ||
176 | }; | ||
177 | }; | ||
178 | }; | ||
diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi new file mode 100644 index 000000000000..e154f242c680 --- /dev/null +++ b/arch/arm/boot/dts/at91rm9200.dtsi | |||
@@ -0,0 +1,349 @@ | |||
1 | /* | ||
2 | * at91rm9200.dtsi - Device Tree Include file for AT91RM9200 family SoC | ||
3 | * | ||
4 | * Copyright (C) 2011 Atmel, | ||
5 | * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>, | ||
6 | * 2012 Joachim Eastwood <manabian@gmail.com> | ||
7 | * | ||
8 | * Based on at91sam9260.dtsi | ||
9 | * | ||
10 | * Licensed under GPLv2 or later. | ||
11 | */ | ||
12 | |||
13 | /include/ "skeleton.dtsi" | ||
14 | |||
15 | / { | ||
16 | model = "Atmel AT91RM9200 family SoC"; | ||
17 | compatible = "atmel,at91rm9200"; | ||
18 | interrupt-parent = <&aic>; | ||
19 | |||
20 | aliases { | ||
21 | serial0 = &dbgu; | ||
22 | serial1 = &usart0; | ||
23 | serial2 = &usart1; | ||
24 | serial3 = &usart2; | ||
25 | serial4 = &usart3; | ||
26 | gpio0 = &pioA; | ||
27 | gpio1 = &pioB; | ||
28 | gpio2 = &pioC; | ||
29 | gpio3 = &pioD; | ||
30 | tcb0 = &tcb0; | ||
31 | tcb1 = &tcb1; | ||
32 | }; | ||
33 | cpus { | ||
34 | cpu@0 { | ||
35 | compatible = "arm,arm920t"; | ||
36 | }; | ||
37 | }; | ||
38 | |||
39 | memory { | ||
40 | reg = <0x20000000 0x04000000>; | ||
41 | }; | ||
42 | |||
43 | ahb { | ||
44 | compatible = "simple-bus"; | ||
45 | #address-cells = <1>; | ||
46 | #size-cells = <1>; | ||
47 | ranges; | ||
48 | |||
49 | apb { | ||
50 | compatible = "simple-bus"; | ||
51 | #address-cells = <1>; | ||
52 | #size-cells = <1>; | ||
53 | ranges; | ||
54 | |||
55 | aic: interrupt-controller@fffff000 { | ||
56 | #interrupt-cells = <3>; | ||
57 | compatible = "atmel,at91rm9200-aic"; | ||
58 | interrupt-controller; | ||
59 | reg = <0xfffff000 0x200>; | ||
60 | atmel,external-irqs = <25 26 27 28 29 30 31>; | ||
61 | }; | ||
62 | |||
63 | ramc0: ramc@ffffff00 { | ||
64 | compatible = "atmel,at91rm9200-sdramc"; | ||
65 | reg = <0xffffff00 0x100>; | ||
66 | }; | ||
67 | |||
68 | pmc: pmc@fffffc00 { | ||
69 | compatible = "atmel,at91rm9200-pmc"; | ||
70 | reg = <0xfffffc00 0x100>; | ||
71 | }; | ||
72 | |||
73 | st: timer@fffffd00 { | ||
74 | compatible = "atmel,at91rm9200-st"; | ||
75 | reg = <0xfffffd00 0x100>; | ||
76 | interrupts = <1 4 7>; | ||
77 | }; | ||
78 | |||
79 | tcb0: timer@fffa0000 { | ||
80 | compatible = "atmel,at91rm9200-tcb"; | ||
81 | reg = <0xfffa0000 0x100>; | ||
82 | interrupts = <17 4 0 18 4 0 19 4 0>; | ||
83 | }; | ||
84 | |||
85 | tcb1: timer@fffa4000 { | ||
86 | compatible = "atmel,at91rm9200-tcb"; | ||
87 | reg = <0xfffa4000 0x100>; | ||
88 | interrupts = <20 4 0 21 4 0 22 4 0>; | ||
89 | }; | ||
90 | |||
91 | pinctrl@fffff400 { | ||
92 | #address-cells = <1>; | ||
93 | #size-cells = <1>; | ||
94 | compatible = "atmel,at91rm9200-pinctrl", "simple-bus"; | ||
95 | ranges = <0xfffff400 0xfffff400 0x800>; | ||
96 | |||
97 | atmel,mux-mask = < | ||
98 | /* A B */ | ||
99 | 0xffffffff 0xffffffff /* pioA */ | ||
100 | 0xffffffff 0x083fffff /* pioB */ | ||
101 | 0xffff3fff 0x00000000 /* pioC */ | ||
102 | 0x03ff87ff 0x0fffff80 /* pioD */ | ||
103 | >; | ||
104 | |||
105 | /* shared pinctrl settings */ | ||
106 | dbgu { | ||
107 | pinctrl_dbgu: dbgu-0 { | ||
108 | atmel,pins = | ||
109 | <0 30 0x1 0x0 /* PA30 periph A */ | ||
110 | 0 31 0x1 0x1>; /* PA31 periph with pullup */ | ||
111 | }; | ||
112 | }; | ||
113 | |||
114 | uart0 { | ||
115 | pinctrl_uart0: uart0-0 { | ||
116 | atmel,pins = | ||
117 | <0 17 0x1 0x0 /* PA17 periph A */ | ||
118 | 0 18 0x1 0x0>; /* PA18 periph A */ | ||
119 | }; | ||
120 | |||
121 | pinctrl_uart0_rts: uart0_rts-0 { | ||
122 | atmel,pins = | ||
123 | <0 20 0x1 0x0>; /* PA20 periph A */ | ||
124 | }; | ||
125 | |||
126 | pinctrl_uart0_cts: uart0_cts-0 { | ||
127 | atmel,pins = | ||
128 | <0 21 0x1 0x0>; /* PA21 periph A */ | ||
129 | }; | ||
130 | }; | ||
131 | |||
132 | uart1 { | ||
133 | pinctrl_uart1: uart1-0 { | ||
134 | atmel,pins = | ||
135 | <1 20 0x1 0x1 /* PB20 periph A with pullup */ | ||
136 | 1 21 0x1 0x0>; /* PB21 periph A */ | ||
137 | }; | ||
138 | |||
139 | pinctrl_uart1_rts: uart1_rts-0 { | ||
140 | atmel,pins = | ||
141 | <1 24 0x1 0x0>; /* PB24 periph A */ | ||
142 | }; | ||
143 | |||
144 | pinctrl_uart1_cts: uart1_cts-0 { | ||
145 | atmel,pins = | ||
146 | <1 26 0x1 0x0>; /* PB26 periph A */ | ||
147 | }; | ||
148 | |||
149 | pinctrl_uart1_dtr_dsr: uart1_dtr_dsr-0 { | ||
150 | atmel,pins = | ||
151 | <1 19 0x1 0x0 /* PB19 periph A */ | ||
152 | 1 25 0x1 0x0>; /* PB25 periph A */ | ||
153 | }; | ||
154 | |||
155 | pinctrl_uart1_dcd: uart1_dcd-0 { | ||
156 | atmel,pins = | ||
157 | <1 23 0x1 0x0>; /* PB23 periph A */ | ||
158 | }; | ||
159 | |||
160 | pinctrl_uart1_ri: uart1_ri-0 { | ||
161 | atmel,pins = | ||
162 | <1 18 0x1 0x0>; /* PB18 periph A */ | ||
163 | }; | ||
164 | }; | ||
165 | |||
166 | uart2 { | ||
167 | pinctrl_uart2: uart2-0 { | ||
168 | atmel,pins = | ||
169 | <0 22 0x1 0x0 /* PA22 periph A */ | ||
170 | 0 23 0x1 0x1>; /* PA23 periph A with pullup */ | ||
171 | }; | ||
172 | |||
173 | pinctrl_uart2_rts: uart2_rts-0 { | ||
174 | atmel,pins = | ||
175 | <0 30 0x2 0x0>; /* PA30 periph B */ | ||
176 | }; | ||
177 | |||
178 | pinctrl_uart2_cts: uart2_cts-0 { | ||
179 | atmel,pins = | ||
180 | <0 31 0x2 0x0>; /* PA31 periph B */ | ||
181 | }; | ||
182 | }; | ||
183 | |||
184 | uart3 { | ||
185 | pinctrl_uart3: uart3-0 { | ||
186 | atmel,pins = | ||
187 | <0 5 0x2 0x1 /* PA5 periph B with pullup */ | ||
188 | 0 6 0x2 0x0>; /* PA6 periph B */ | ||
189 | }; | ||
190 | |||
191 | pinctrl_uart3_rts: uart3_rts-0 { | ||
192 | atmel,pins = | ||
193 | <1 0 0x2 0x0>; /* PB0 periph B */ | ||
194 | }; | ||
195 | |||
196 | pinctrl_uart3_cts: uart3_cts-0 { | ||
197 | atmel,pins = | ||
198 | <1 1 0x2 0x0>; /* PB1 periph B */ | ||
199 | }; | ||
200 | }; | ||
201 | |||
202 | nand { | ||
203 | pinctrl_nand: nand-0 { | ||
204 | atmel,pins = | ||
205 | <2 2 0x0 0x1 /* PC2 gpio RDY pin pull_up */ | ||
206 | 1 1 0x0 0x1>; /* PB1 gpio CD pin pull_up */ | ||
207 | }; | ||
208 | }; | ||
209 | |||
210 | pioA: gpio@fffff400 { | ||
211 | compatible = "atmel,at91rm9200-gpio"; | ||
212 | reg = <0xfffff400 0x200>; | ||
213 | interrupts = <2 4 1>; | ||
214 | #gpio-cells = <2>; | ||
215 | gpio-controller; | ||
216 | interrupt-controller; | ||
217 | #interrupt-cells = <2>; | ||
218 | }; | ||
219 | |||
220 | pioB: gpio@fffff600 { | ||
221 | compatible = "atmel,at91rm9200-gpio"; | ||
222 | reg = <0xfffff600 0x200>; | ||
223 | interrupts = <3 4 1>; | ||
224 | #gpio-cells = <2>; | ||
225 | gpio-controller; | ||
226 | interrupt-controller; | ||
227 | #interrupt-cells = <2>; | ||
228 | }; | ||
229 | |||
230 | pioC: gpio@fffff800 { | ||
231 | compatible = "atmel,at91rm9200-gpio"; | ||
232 | reg = <0xfffff800 0x200>; | ||
233 | interrupts = <4 4 1>; | ||
234 | #gpio-cells = <2>; | ||
235 | gpio-controller; | ||
236 | interrupt-controller; | ||
237 | #interrupt-cells = <2>; | ||
238 | }; | ||
239 | |||
240 | pioD: gpio@fffffa00 { | ||
241 | compatible = "atmel,at91rm9200-gpio"; | ||
242 | reg = <0xfffffa00 0x200>; | ||
243 | interrupts = <5 4 1>; | ||
244 | #gpio-cells = <2>; | ||
245 | gpio-controller; | ||
246 | interrupt-controller; | ||
247 | #interrupt-cells = <2>; | ||
248 | }; | ||
249 | }; | ||
250 | |||
251 | dbgu: serial@fffff200 { | ||
252 | compatible = "atmel,at91rm9200-usart"; | ||
253 | reg = <0xfffff200 0x200>; | ||
254 | interrupts = <1 4 7>; | ||
255 | pinctrl-names = "default"; | ||
256 | pinctrl-0 = <&pinctrl_dbgu>; | ||
257 | status = "disabled"; | ||
258 | }; | ||
259 | |||
260 | usart0: serial@fffc0000 { | ||
261 | compatible = "atmel,at91rm9200-usart"; | ||
262 | reg = <0xfffc0000 0x200>; | ||
263 | interrupts = <6 4 5>; | ||
264 | atmel,use-dma-rx; | ||
265 | atmel,use-dma-tx; | ||
266 | pinctrl-names = "default"; | ||
267 | pinctrl-0 = <&pinctrl_uart0>; | ||
268 | status = "disabled"; | ||
269 | }; | ||
270 | |||
271 | usart1: serial@fffc4000 { | ||
272 | compatible = "atmel,at91rm9200-usart"; | ||
273 | reg = <0xfffc4000 0x200>; | ||
274 | interrupts = <7 4 5>; | ||
275 | atmel,use-dma-rx; | ||
276 | atmel,use-dma-tx; | ||
277 | pinctrl-names = "default"; | ||
278 | pinctrl-0 = <&pinctrl_uart1>; | ||
279 | status = "disabled"; | ||
280 | }; | ||
281 | |||
282 | usart2: serial@fffc8000 { | ||
283 | compatible = "atmel,at91rm9200-usart"; | ||
284 | reg = <0xfffc8000 0x200>; | ||
285 | interrupts = <8 4 5>; | ||
286 | atmel,use-dma-rx; | ||
287 | atmel,use-dma-tx; | ||
288 | pinctrl-names = "default"; | ||
289 | pinctrl-0 = <&pinctrl_uart2>; | ||
290 | status = "disabled"; | ||
291 | }; | ||
292 | |||
293 | usart3: serial@fffcc000 { | ||
294 | compatible = "atmel,at91rm9200-usart"; | ||
295 | reg = <0xfffcc000 0x200>; | ||
296 | interrupts = <23 4 5>; | ||
297 | atmel,use-dma-rx; | ||
298 | atmel,use-dma-tx; | ||
299 | pinctrl-names = "default"; | ||
300 | pinctrl-0 = <&pinctrl_uart3>; | ||
301 | status = "disabled"; | ||
302 | }; | ||
303 | |||
304 | usb1: gadget@fffb0000 { | ||
305 | compatible = "atmel,at91rm9200-udc"; | ||
306 | reg = <0xfffb0000 0x4000>; | ||
307 | interrupts = <11 4 2>; | ||
308 | status = "disabled"; | ||
309 | }; | ||
310 | }; | ||
311 | |||
312 | nand0: nand@40000000 { | ||
313 | compatible = "atmel,at91rm9200-nand"; | ||
314 | #address-cells = <1>; | ||
315 | #size-cells = <1>; | ||
316 | reg = <0x40000000 0x10000000>; | ||
317 | atmel,nand-addr-offset = <21>; | ||
318 | atmel,nand-cmd-offset = <22>; | ||
319 | pinctrl-names = "default"; | ||
320 | pinctrl-0 = <&pinctrl_nand>; | ||
321 | nand-ecc-mode = "soft"; | ||
322 | gpios = <&pioC 2 0 | ||
323 | 0 | ||
324 | &pioB 1 0 | ||
325 | >; | ||
326 | status = "disabled"; | ||
327 | }; | ||
328 | |||
329 | usb0: ohci@00300000 { | ||
330 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; | ||
331 | reg = <0x00300000 0x100000>; | ||
332 | interrupts = <23 4 2>; | ||
333 | status = "disabled"; | ||
334 | }; | ||
335 | }; | ||
336 | |||
337 | i2c@0 { | ||
338 | compatible = "i2c-gpio"; | ||
339 | gpios = <&pioA 23 0 /* sda */ | ||
340 | &pioA 24 0 /* scl */ | ||
341 | >; | ||
342 | i2c-gpio,sda-open-drain; | ||
343 | i2c-gpio,scl-open-drain; | ||
344 | i2c-gpio,delay-us = <2>; /* ~100 kHz */ | ||
345 | #address-cells = <1>; | ||
346 | #size-cells = <0>; | ||
347 | status = "disabled"; | ||
348 | }; | ||
349 | }; | ||
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts new file mode 100644 index 000000000000..8aa48931e0a2 --- /dev/null +++ b/arch/arm/boot/dts/at91rm9200ek.dts | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * at91rm9200ek.dts - Device Tree file for Atmel AT91RM9200 evaluation kit | ||
3 | * | ||
4 | * Copyright (C) 2012 Joachim Eastwood <manabian@gmail.com> | ||
5 | * | ||
6 | * Licensed under GPLv2 only | ||
7 | */ | ||
8 | /dts-v1/; | ||
9 | /include/ "at91rm9200.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "Atmel AT91RM9200 evaluation kit"; | ||
13 | compatible = "atmel,at91rm9200ek", "atmel,at91rm9200"; | ||
14 | |||
15 | memory { | ||
16 | reg = <0x20000000 0x4000000>; | ||
17 | }; | ||
18 | |||
19 | clocks { | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <1>; | ||
22 | ranges; | ||
23 | |||
24 | main_clock: clock@0 { | ||
25 | compatible = "atmel,osc", "fixed-clock"; | ||
26 | clock-frequency = <18432000>; | ||
27 | }; | ||
28 | }; | ||
29 | |||
30 | ahb { | ||
31 | apb { | ||
32 | dbgu: serial@fffff200 { | ||
33 | status = "okay"; | ||
34 | }; | ||
35 | |||
36 | usart1: serial@fffc4000 { | ||
37 | pinctrl-0 = | ||
38 | <&pinctrl_uart1 | ||
39 | &pinctrl_uart1_rts | ||
40 | &pinctrl_uart1_cts | ||
41 | &pinctrl_uart1_dtr_dsr | ||
42 | &pinctrl_uart1_dcd | ||
43 | &pinctrl_uart1_ri>; | ||
44 | status = "okay"; | ||
45 | }; | ||
46 | |||
47 | usb1: gadget@fffb0000 { | ||
48 | atmel,vbus-gpio = <&pioD 4 0>; | ||
49 | status = "okay"; | ||
50 | }; | ||
51 | }; | ||
52 | |||
53 | usb0: ohci@00300000 { | ||
54 | num-ports = <2>; | ||
55 | status = "okay"; | ||
56 | }; | ||
57 | }; | ||
58 | |||
59 | leds { | ||
60 | compatible = "gpio-leds"; | ||
61 | |||
62 | ds2 { | ||
63 | label = "green"; | ||
64 | gpios = <&pioB 0 0x1>; | ||
65 | linux,default-trigger = "mmc0"; | ||
66 | }; | ||
67 | |||
68 | ds4 { | ||
69 | label = "yellow"; | ||
70 | gpios = <&pioB 1 0x1>; | ||
71 | linux,default-trigger = "heartbeat"; | ||
72 | }; | ||
73 | |||
74 | ds6 { | ||
75 | label = "red"; | ||
76 | gpios = <&pioB 2 0x1>; | ||
77 | }; | ||
78 | }; | ||
79 | }; | ||
diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi index d410581a5a85..b1d3fab60e0a 100644 --- a/arch/arm/boot/dts/at91sam9260.dtsi +++ b/arch/arm/boot/dts/at91sam9260.dtsi | |||
@@ -21,8 +21,8 @@ | |||
21 | serial2 = &usart1; | 21 | serial2 = &usart1; |
22 | serial3 = &usart2; | 22 | serial3 = &usart2; |
23 | serial4 = &usart3; | 23 | serial4 = &usart3; |
24 | serial5 = &usart4; | 24 | serial5 = &uart0; |
25 | serial6 = &usart5; | 25 | serial6 = &uart1; |
26 | gpio0 = &pioA; | 26 | gpio0 = &pioA; |
27 | gpio1 = &pioB; | 27 | gpio1 = &pioB; |
28 | gpio2 = &pioC; | 28 | gpio2 = &pioC; |
@@ -98,40 +98,250 @@ | |||
98 | interrupts = <26 4 0 27 4 0 28 4 0>; | 98 | interrupts = <26 4 0 27 4 0 28 4 0>; |
99 | }; | 99 | }; |
100 | 100 | ||
101 | pioA: gpio@fffff400 { | 101 | pinctrl@fffff400 { |
102 | compatible = "atmel,at91rm9200-gpio"; | 102 | #address-cells = <1>; |
103 | reg = <0xfffff400 0x100>; | 103 | #size-cells = <1>; |
104 | interrupts = <2 4 1>; | 104 | compatible = "atmel,at91rm9200-pinctrl", "simple-bus"; |
105 | #gpio-cells = <2>; | 105 | ranges = <0xfffff400 0xfffff400 0x600>; |
106 | gpio-controller; | 106 | |
107 | interrupt-controller; | 107 | atmel,mux-mask = < |
108 | #interrupt-cells = <2>; | 108 | /* A B */ |
109 | }; | 109 | 0xffffffff 0xffc00c3b /* pioA */ |
110 | 0xffffffff 0x7fff3ccf /* pioB */ | ||
111 | 0xffffffff 0x007fffff /* pioC */ | ||
112 | >; | ||
113 | |||
114 | /* shared pinctrl settings */ | ||
115 | dbgu { | ||
116 | pinctrl_dbgu: dbgu-0 { | ||
117 | atmel,pins = | ||
118 | <1 14 0x1 0x0 /* PB14 periph A */ | ||
119 | 1 15 0x1 0x1>; /* PB15 periph with pullup */ | ||
120 | }; | ||
121 | }; | ||
110 | 122 | ||
111 | pioB: gpio@fffff600 { | 123 | usart0 { |
112 | compatible = "atmel,at91rm9200-gpio"; | 124 | pinctrl_usart0: usart0-0 { |
113 | reg = <0xfffff600 0x100>; | 125 | atmel,pins = |
114 | interrupts = <3 4 1>; | 126 | <1 4 0x1 0x0 /* PB4 periph A */ |
115 | #gpio-cells = <2>; | 127 | 1 5 0x1 0x0>; /* PB5 periph A */ |
116 | gpio-controller; | 128 | }; |
117 | interrupt-controller; | 129 | |
118 | #interrupt-cells = <2>; | 130 | pinctrl_usart0_rts: usart0_rts-0 { |
119 | }; | 131 | atmel,pins = |
132 | <1 26 0x1 0x0>; /* PB26 periph A */ | ||
133 | }; | ||
134 | |||
135 | pinctrl_usart0_cts: usart0_cts-0 { | ||
136 | atmel,pins = | ||
137 | <1 27 0x1 0x0>; /* PB27 periph A */ | ||
138 | }; | ||
139 | |||
140 | pinctrl_usart0_dtr_dsr: usart0_dtr_dsr-0 { | ||
141 | atmel,pins = | ||
142 | <1 24 0x1 0x0 /* PB24 periph A */ | ||
143 | 1 22 0x1 0x0>; /* PB22 periph A */ | ||
144 | }; | ||
145 | |||
146 | pinctrl_usart0_dcd: usart0_dcd-0 { | ||
147 | atmel,pins = | ||
148 | <1 23 0x1 0x0>; /* PB23 periph A */ | ||
149 | }; | ||
150 | |||
151 | pinctrl_usart0_ri: usart0_ri-0 { | ||
152 | atmel,pins = | ||
153 | <1 25 0x1 0x0>; /* PB25 periph A */ | ||
154 | }; | ||
155 | }; | ||
120 | 156 | ||
121 | pioC: gpio@fffff800 { | 157 | usart1 { |
122 | compatible = "atmel,at91rm9200-gpio"; | 158 | pinctrl_usart1: usart1-0 { |
123 | reg = <0xfffff800 0x100>; | 159 | atmel,pins = |
124 | interrupts = <4 4 1>; | 160 | <2 6 0x1 0x1 /* PB6 periph A with pullup */ |
125 | #gpio-cells = <2>; | 161 | 2 7 0x1 0x0>; /* PB7 periph A */ |
126 | gpio-controller; | 162 | }; |
127 | interrupt-controller; | 163 | |
128 | #interrupt-cells = <2>; | 164 | pinctrl_usart1_rts: usart1_rts-0 { |
165 | atmel,pins = | ||
166 | <1 28 0x1 0x0>; /* PB28 periph A */ | ||
167 | }; | ||
168 | |||
169 | pinctrl_usart1_cts: usart1_cts-0 { | ||
170 | atmel,pins = | ||
171 | <1 29 0x1 0x0>; /* PB29 periph A */ | ||
172 | }; | ||
173 | }; | ||
174 | |||
175 | usart2 { | ||
176 | pinctrl_usart2: usart2-0 { | ||
177 | atmel,pins = | ||
178 | <1 8 0x1 0x1 /* PB8 periph A with pullup */ | ||
179 | 1 9 0x1 0x0>; /* PB9 periph A */ | ||
180 | }; | ||
181 | |||
182 | pinctrl_usart2_rts: usart2_rts-0 { | ||
183 | atmel,pins = | ||
184 | <0 4 0x1 0x0>; /* PA4 periph A */ | ||
185 | }; | ||
186 | |||
187 | pinctrl_usart2_cts: usart2_cts-0 { | ||
188 | atmel,pins = | ||
189 | <0 5 0x1 0x0>; /* PA5 periph A */ | ||
190 | }; | ||
191 | }; | ||
192 | |||
193 | usart3 { | ||
194 | pinctrl_usart3: usart3-0 { | ||
195 | atmel,pins = | ||
196 | <2 10 0x1 0x1 /* PB10 periph A with pullup */ | ||
197 | 2 11 0x1 0x0>; /* PB11 periph A */ | ||
198 | }; | ||
199 | |||
200 | pinctrl_usart3_rts: usart3_rts-0 { | ||
201 | atmel,pins = | ||
202 | <3 8 0x2 0x0>; /* PB8 periph B */ | ||
203 | }; | ||
204 | |||
205 | pinctrl_usart3_cts: usart3_cts-0 { | ||
206 | atmel,pins = | ||
207 | <3 10 0x2 0x0>; /* PB10 periph B */ | ||
208 | }; | ||
209 | }; | ||
210 | |||
211 | uart0 { | ||
212 | pinctrl_uart0: uart0-0 { | ||
213 | atmel,pins = | ||
214 | <0 31 0x2 0x1 /* PA31 periph B with pullup */ | ||
215 | 0 30 0x2 0x0>; /* PA30 periph B */ | ||
216 | }; | ||
217 | }; | ||
218 | |||
219 | uart1 { | ||
220 | pinctrl_uart1: uart1-0 { | ||
221 | atmel,pins = | ||
222 | <2 12 0x1 0x1 /* PB12 periph A with pullup */ | ||
223 | 2 13 0x1 0x0>; /* PB13 periph A */ | ||
224 | }; | ||
225 | }; | ||
226 | |||
227 | nand { | ||
228 | pinctrl_nand: nand-0 { | ||
229 | atmel,pins = | ||
230 | <2 13 0x0 0x1 /* PC13 gpio RDY pin pull_up */ | ||
231 | 2 14 0x0 0x1>; /* PC14 gpio enable pin pull_up */ | ||
232 | }; | ||
233 | }; | ||
234 | |||
235 | macb { | ||
236 | pinctrl_macb_rmii: macb_rmii-0 { | ||
237 | atmel,pins = | ||
238 | <0 12 0x1 0x0 /* PA12 periph A */ | ||
239 | 0 13 0x1 0x0 /* PA13 periph A */ | ||
240 | 0 14 0x1 0x0 /* PA14 periph A */ | ||
241 | 0 15 0x1 0x0 /* PA15 periph A */ | ||
242 | 0 16 0x1 0x0 /* PA16 periph A */ | ||
243 | 0 17 0x1 0x0 /* PA17 periph A */ | ||
244 | 0 18 0x1 0x0 /* PA18 periph A */ | ||
245 | 0 19 0x1 0x0 /* PA19 periph A */ | ||
246 | 0 20 0x1 0x0 /* PA20 periph A */ | ||
247 | 0 21 0x1 0x0>; /* PA21 periph A */ | ||
248 | }; | ||
249 | |||
250 | pinctrl_macb_rmii_mii: macb_rmii_mii-0 { | ||
251 | atmel,pins = | ||
252 | <0 22 0x2 0x0 /* PA22 periph B */ | ||
253 | 0 23 0x2 0x0 /* PA23 periph B */ | ||
254 | 0 24 0x2 0x0 /* PA24 periph B */ | ||
255 | 0 25 0x2 0x0 /* PA25 periph B */ | ||
256 | 0 26 0x2 0x0 /* PA26 periph B */ | ||
257 | 0 27 0x2 0x0 /* PA27 periph B */ | ||
258 | 0 28 0x2 0x0 /* PA28 periph B */ | ||
259 | 0 29 0x2 0x0>; /* PA29 periph B */ | ||
260 | }; | ||
261 | |||
262 | pinctrl_macb_rmii_mii_alt: macb_rmii_mii-1 { | ||
263 | atmel,pins = | ||
264 | <0 10 0x2 0x0 /* PA10 periph B */ | ||
265 | 0 11 0x2 0x0 /* PA11 periph B */ | ||
266 | 0 24 0x2 0x0 /* PA24 periph B */ | ||
267 | 0 25 0x2 0x0 /* PA25 periph B */ | ||
268 | 0 26 0x2 0x0 /* PA26 periph B */ | ||
269 | 0 27 0x2 0x0 /* PA27 periph B */ | ||
270 | 0 28 0x2 0x0 /* PA28 periph B */ | ||
271 | 0 29 0x2 0x0>; /* PA29 periph B */ | ||
272 | }; | ||
273 | }; | ||
274 | |||
275 | mmc0 { | ||
276 | pinctrl_mmc0_clk: mmc0_clk-0 { | ||
277 | atmel,pins = | ||
278 | <0 8 0x1 0x0>; /* PA8 periph A */ | ||
279 | }; | ||
280 | |||
281 | pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 { | ||
282 | atmel,pins = | ||
283 | <0 7 0x1 0x1 /* PA7 periph A with pullup */ | ||
284 | 0 6 0x1 0x1>; /* PA6 periph A with pullup */ | ||
285 | }; | ||
286 | |||
287 | pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 { | ||
288 | atmel,pins = | ||
289 | <0 9 0x1 0x1 /* PA9 periph A with pullup */ | ||
290 | 0 10 0x1 0x1 /* PA10 periph A with pullup */ | ||
291 | 0 11 0x1 0x1>; /* PA11 periph A with pullup */ | ||
292 | }; | ||
293 | |||
294 | pinctrl_mmc0_slot1_cmd_dat0: mmc0_slot1_cmd_dat0-0 { | ||
295 | atmel,pins = | ||
296 | <0 1 0x2 0x1 /* PA1 periph B with pullup */ | ||
297 | 0 0 0x2 0x1>; /* PA0 periph B with pullup */ | ||
298 | }; | ||
299 | |||
300 | pinctrl_mmc0_slot1_dat1_3: mmc0_slot1_dat1_3-0 { | ||
301 | atmel,pins = | ||
302 | <0 5 0x2 0x1 /* PA5 periph B with pullup */ | ||
303 | 0 4 0x2 0x1 /* PA4 periph B with pullup */ | ||
304 | 0 3 0x2 0x1>; /* PA3 periph B with pullup */ | ||
305 | }; | ||
306 | }; | ||
307 | |||
308 | pioA: gpio@fffff400 { | ||
309 | compatible = "atmel,at91rm9200-gpio"; | ||
310 | reg = <0xfffff400 0x200>; | ||
311 | interrupts = <2 4 1>; | ||
312 | #gpio-cells = <2>; | ||
313 | gpio-controller; | ||
314 | interrupt-controller; | ||
315 | #interrupt-cells = <2>; | ||
316 | }; | ||
317 | |||
318 | pioB: gpio@fffff600 { | ||
319 | compatible = "atmel,at91rm9200-gpio"; | ||
320 | reg = <0xfffff600 0x200>; | ||
321 | interrupts = <3 4 1>; | ||
322 | #gpio-cells = <2>; | ||
323 | gpio-controller; | ||
324 | interrupt-controller; | ||
325 | #interrupt-cells = <2>; | ||
326 | }; | ||
327 | |||
328 | pioC: gpio@fffff800 { | ||
329 | compatible = "atmel,at91rm9200-gpio"; | ||
330 | reg = <0xfffff800 0x200>; | ||
331 | interrupts = <4 4 1>; | ||
332 | #gpio-cells = <2>; | ||
333 | gpio-controller; | ||
334 | interrupt-controller; | ||
335 | #interrupt-cells = <2>; | ||
336 | }; | ||
129 | }; | 337 | }; |
130 | 338 | ||
131 | dbgu: serial@fffff200 { | 339 | dbgu: serial@fffff200 { |
132 | compatible = "atmel,at91sam9260-usart"; | 340 | compatible = "atmel,at91sam9260-usart"; |
133 | reg = <0xfffff200 0x200>; | 341 | reg = <0xfffff200 0x200>; |
134 | interrupts = <1 4 7>; | 342 | interrupts = <1 4 7>; |
343 | pinctrl-names = "default"; | ||
344 | pinctrl-0 = <&pinctrl_dbgu>; | ||
135 | status = "disabled"; | 345 | status = "disabled"; |
136 | }; | 346 | }; |
137 | 347 | ||
@@ -141,6 +351,8 @@ | |||
141 | interrupts = <6 4 5>; | 351 | interrupts = <6 4 5>; |
142 | atmel,use-dma-rx; | 352 | atmel,use-dma-rx; |
143 | atmel,use-dma-tx; | 353 | atmel,use-dma-tx; |
354 | pinctrl-names = "default"; | ||
355 | pinctrl-0 = <&pinctrl_usart0>; | ||
144 | status = "disabled"; | 356 | status = "disabled"; |
145 | }; | 357 | }; |
146 | 358 | ||
@@ -150,6 +362,8 @@ | |||
150 | interrupts = <7 4 5>; | 362 | interrupts = <7 4 5>; |
151 | atmel,use-dma-rx; | 363 | atmel,use-dma-rx; |
152 | atmel,use-dma-tx; | 364 | atmel,use-dma-tx; |
365 | pinctrl-names = "default"; | ||
366 | pinctrl-0 = <&pinctrl_usart1>; | ||
153 | status = "disabled"; | 367 | status = "disabled"; |
154 | }; | 368 | }; |
155 | 369 | ||
@@ -159,6 +373,8 @@ | |||
159 | interrupts = <8 4 5>; | 373 | interrupts = <8 4 5>; |
160 | atmel,use-dma-rx; | 374 | atmel,use-dma-rx; |
161 | atmel,use-dma-tx; | 375 | atmel,use-dma-tx; |
376 | pinctrl-names = "default"; | ||
377 | pinctrl-0 = <&pinctrl_usart2>; | ||
162 | status = "disabled"; | 378 | status = "disabled"; |
163 | }; | 379 | }; |
164 | 380 | ||
@@ -168,24 +384,30 @@ | |||
168 | interrupts = <23 4 5>; | 384 | interrupts = <23 4 5>; |
169 | atmel,use-dma-rx; | 385 | atmel,use-dma-rx; |
170 | atmel,use-dma-tx; | 386 | atmel,use-dma-tx; |
387 | pinctrl-names = "default"; | ||
388 | pinctrl-0 = <&pinctrl_usart3>; | ||
171 | status = "disabled"; | 389 | status = "disabled"; |
172 | }; | 390 | }; |
173 | 391 | ||
174 | usart4: serial@fffd4000 { | 392 | uart0: serial@fffd4000 { |
175 | compatible = "atmel,at91sam9260-usart"; | 393 | compatible = "atmel,at91sam9260-usart"; |
176 | reg = <0xfffd4000 0x200>; | 394 | reg = <0xfffd4000 0x200>; |
177 | interrupts = <24 4 5>; | 395 | interrupts = <24 4 5>; |
178 | atmel,use-dma-rx; | 396 | atmel,use-dma-rx; |
179 | atmel,use-dma-tx; | 397 | atmel,use-dma-tx; |
398 | pinctrl-names = "default"; | ||
399 | pinctrl-0 = <&pinctrl_uart0>; | ||
180 | status = "disabled"; | 400 | status = "disabled"; |
181 | }; | 401 | }; |
182 | 402 | ||
183 | usart5: serial@fffd8000 { | 403 | uart1: serial@fffd8000 { |
184 | compatible = "atmel,at91sam9260-usart"; | 404 | compatible = "atmel,at91sam9260-usart"; |
185 | reg = <0xfffd8000 0x200>; | 405 | reg = <0xfffd8000 0x200>; |
186 | interrupts = <25 4 5>; | 406 | interrupts = <25 4 5>; |
187 | atmel,use-dma-rx; | 407 | atmel,use-dma-rx; |
188 | atmel,use-dma-tx; | 408 | atmel,use-dma-tx; |
409 | pinctrl-names = "default"; | ||
410 | pinctrl-0 = <&pinctrl_uart1>; | ||
189 | status = "disabled"; | 411 | status = "disabled"; |
190 | }; | 412 | }; |
191 | 413 | ||
@@ -193,6 +415,8 @@ | |||
193 | compatible = "cdns,at32ap7000-macb", "cdns,macb"; | 415 | compatible = "cdns,at32ap7000-macb", "cdns,macb"; |
194 | reg = <0xfffc4000 0x100>; | 416 | reg = <0xfffc4000 0x100>; |
195 | interrupts = <21 4 3>; | 417 | interrupts = <21 4 3>; |
418 | pinctrl-names = "default"; | ||
419 | pinctrl-0 = <&pinctrl_macb_rmii>; | ||
196 | status = "disabled"; | 420 | status = "disabled"; |
197 | }; | 421 | }; |
198 | 422 | ||
@@ -212,6 +436,15 @@ | |||
212 | status = "disabled"; | 436 | status = "disabled"; |
213 | }; | 437 | }; |
214 | 438 | ||
439 | mmc0: mmc@fffa8000 { | ||
440 | compatible = "atmel,hsmci"; | ||
441 | reg = <0xfffa8000 0x600>; | ||
442 | interrupts = <9 4 0>; | ||
443 | #address-cells = <1>; | ||
444 | #size-cells = <0>; | ||
445 | status = "disabled"; | ||
446 | }; | ||
447 | |||
215 | adc0: adc@fffe0000 { | 448 | adc0: adc@fffe0000 { |
216 | compatible = "atmel,at91sam9260-adc"; | 449 | compatible = "atmel,at91sam9260-adc"; |
217 | reg = <0xfffe0000 0x100>; | 450 | reg = <0xfffe0000 0x100>; |
@@ -257,6 +490,8 @@ | |||
257 | >; | 490 | >; |
258 | atmel,nand-addr-offset = <21>; | 491 | atmel,nand-addr-offset = <21>; |
259 | atmel,nand-cmd-offset = <22>; | 492 | atmel,nand-cmd-offset = <22>; |
493 | pinctrl-names = "default"; | ||
494 | pinctrl-0 = <&pinctrl_nand>; | ||
260 | gpios = <&pioC 13 0 | 495 | gpios = <&pioC 13 0 |
261 | &pioC 14 0 | 496 | &pioC 14 0 |
262 | 0 | 497 | 0 |
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi index 3e6e5c1abbf3..66106eecf1ed 100644 --- a/arch/arm/boot/dts/at91sam9263.dtsi +++ b/arch/arm/boot/dts/at91sam9263.dtsi | |||
@@ -89,60 +89,243 @@ | |||
89 | reg = <0xfffffd10 0x10>; | 89 | reg = <0xfffffd10 0x10>; |
90 | }; | 90 | }; |
91 | 91 | ||
92 | pioA: gpio@fffff200 { | 92 | pinctrl@fffff200 { |
93 | compatible = "atmel,at91rm9200-gpio"; | 93 | #address-cells = <1>; |
94 | reg = <0xfffff200 0x100>; | 94 | #size-cells = <1>; |
95 | interrupts = <2 4 1>; | 95 | compatible = "atmel,at91rm9200-pinctrl", "simple-bus"; |
96 | #gpio-cells = <2>; | 96 | ranges = <0xfffff200 0xfffff200 0xa00>; |
97 | gpio-controller; | ||
98 | interrupt-controller; | ||
99 | #interrupt-cells = <2>; | ||
100 | }; | ||
101 | 97 | ||
102 | pioB: gpio@fffff400 { | 98 | atmel,mux-mask = < |
103 | compatible = "atmel,at91rm9200-gpio"; | 99 | /* A B */ |
104 | reg = <0xfffff400 0x100>; | 100 | 0xfffffffb 0xffffe07f /* pioA */ |
105 | interrupts = <3 4 1>; | 101 | 0x0007ffff 0x39072fff /* pioB */ |
106 | #gpio-cells = <2>; | 102 | 0xffffffff 0x3ffffff8 /* pioC */ |
107 | gpio-controller; | 103 | 0xfffffbff 0xffffffff /* pioD */ |
108 | interrupt-controller; | 104 | 0xffe00fff 0xfbfcff00 /* pioE */ |
109 | #interrupt-cells = <2>; | 105 | >; |
110 | }; | ||
111 | 106 | ||
112 | pioC: gpio@fffff600 { | 107 | /* shared pinctrl settings */ |
113 | compatible = "atmel,at91rm9200-gpio"; | 108 | dbgu { |
114 | reg = <0xfffff600 0x100>; | 109 | pinctrl_dbgu: dbgu-0 { |
115 | interrupts = <4 4 1>; | 110 | atmel,pins = |
116 | #gpio-cells = <2>; | 111 | <2 30 0x1 0x0 /* PC30 periph A */ |
117 | gpio-controller; | 112 | 2 31 0x1 0x1>; /* PC31 periph with pullup */ |
118 | interrupt-controller; | 113 | }; |
119 | #interrupt-cells = <2>; | 114 | }; |
120 | }; | ||
121 | 115 | ||
122 | pioD: gpio@fffff800 { | 116 | usart0 { |
123 | compatible = "atmel,at91rm9200-gpio"; | 117 | pinctrl_usart0: usart0-0 { |
124 | reg = <0xfffff800 0x100>; | 118 | atmel,pins = |
125 | interrupts = <4 4 1>; | 119 | <0 26 0x1 0x1 /* PA26 periph A with pullup */ |
126 | #gpio-cells = <2>; | 120 | 0 27 0x1 0x0>; /* PA27 periph A */ |
127 | gpio-controller; | 121 | }; |
128 | interrupt-controller; | ||
129 | #interrupt-cells = <2>; | ||
130 | }; | ||
131 | 122 | ||
132 | pioE: gpio@fffffa00 { | 123 | pinctrl_usart0_rts: usart0_rts-0 { |
133 | compatible = "atmel,at91rm9200-gpio"; | 124 | atmel,pins = |
134 | reg = <0xfffffa00 0x100>; | 125 | <0 28 0x1 0x0>; /* PA28 periph A */ |
135 | interrupts = <4 4 1>; | 126 | }; |
136 | #gpio-cells = <2>; | 127 | |
137 | gpio-controller; | 128 | pinctrl_usart0_cts: usart0_cts-0 { |
138 | interrupt-controller; | 129 | atmel,pins = |
139 | #interrupt-cells = <2>; | 130 | <0 29 0x1 0x0>; /* PA29 periph A */ |
131 | }; | ||
132 | }; | ||
133 | |||
134 | usart1 { | ||
135 | pinctrl_usart1: usart1-0 { | ||
136 | atmel,pins = | ||
137 | <3 0 0x1 0x1 /* PD0 periph A with pullup */ | ||
138 | 3 1 0x1 0x0>; /* PD1 periph A */ | ||
139 | }; | ||
140 | |||
141 | pinctrl_usart1_rts: usart1_rts-0 { | ||
142 | atmel,pins = | ||
143 | <3 7 0x2 0x0>; /* PD7 periph B */ | ||
144 | }; | ||
145 | |||
146 | pinctrl_usart1_cts: usart1_cts-0 { | ||
147 | atmel,pins = | ||
148 | <3 8 0x2 0x0>; /* PD8 periph B */ | ||
149 | }; | ||
150 | }; | ||
151 | |||
152 | usart2 { | ||
153 | pinctrl_usart2: usart2-0 { | ||
154 | atmel,pins = | ||
155 | <3 2 0x1 0x1 /* PD2 periph A with pullup */ | ||
156 | 3 3 0x1 0x0>; /* PD3 periph A */ | ||
157 | }; | ||
158 | |||
159 | pinctrl_usart2_rts: usart2_rts-0 { | ||
160 | atmel,pins = | ||
161 | <3 5 0x2 0x0>; /* PD5 periph B */ | ||
162 | }; | ||
163 | |||
164 | pinctrl_usart2_cts: usart2_cts-0 { | ||
165 | atmel,pins = | ||
166 | <4 6 0x2 0x0>; /* PD6 periph B */ | ||
167 | }; | ||
168 | }; | ||
169 | |||
170 | nand { | ||
171 | pinctrl_nand: nand-0 { | ||
172 | atmel,pins = | ||
173 | <0 22 0x0 0x1 /* PA22 gpio RDY pin pull_up*/ | ||
174 | 3 15 0x0 0x1>; /* PD15 gpio enable pin pull_up */ | ||
175 | }; | ||
176 | }; | ||
177 | |||
178 | macb { | ||
179 | pinctrl_macb_rmii: macb_rmii-0 { | ||
180 | atmel,pins = | ||
181 | <2 25 0x2 0x0 /* PC25 periph B */ | ||
182 | 4 21 0x1 0x0 /* PE21 periph A */ | ||
183 | 4 23 0x1 0x0 /* PE23 periph A */ | ||
184 | 4 24 0x1 0x0 /* PE24 periph A */ | ||
185 | 4 25 0x1 0x0 /* PE25 periph A */ | ||
186 | 4 26 0x1 0x0 /* PE26 periph A */ | ||
187 | 4 27 0x1 0x0 /* PE27 periph A */ | ||
188 | 4 28 0x1 0x0 /* PE28 periph A */ | ||
189 | 4 29 0x1 0x0 /* PE29 periph A */ | ||
190 | 4 30 0x1 0x0>; /* PE30 periph A */ | ||
191 | }; | ||
192 | |||
193 | pinctrl_macb_rmii_mii: macb_rmii_mii-0 { | ||
194 | atmel,pins = | ||
195 | <2 20 0x2 0x0 /* PC20 periph B */ | ||
196 | 2 21 0x2 0x0 /* PC21 periph B */ | ||
197 | 2 22 0x2 0x0 /* PC22 periph B */ | ||
198 | 2 23 0x2 0x0 /* PC23 periph B */ | ||
199 | 2 24 0x2 0x0 /* PC24 periph B */ | ||
200 | 2 25 0x2 0x0 /* PC25 periph B */ | ||
201 | 2 27 0x2 0x0 /* PC27 periph B */ | ||
202 | 4 22 0x2 0x0>; /* PE22 periph B */ | ||
203 | }; | ||
204 | }; | ||
205 | |||
206 | mmc0 { | ||
207 | pinctrl_mmc0_clk: mmc0_clk-0 { | ||
208 | atmel,pins = | ||
209 | <0 12 0x1 0x0>; /* PA12 periph A */ | ||
210 | }; | ||
211 | |||
212 | pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 { | ||
213 | atmel,pins = | ||
214 | <0 1 0x1 0x1 /* PA1 periph A with pullup */ | ||
215 | 0 0 0x1 0x1>; /* PA0 periph A with pullup */ | ||
216 | }; | ||
217 | |||
218 | pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 { | ||
219 | atmel,pins = | ||
220 | <0 3 0x1 0x1 /* PA3 periph A with pullup */ | ||
221 | 0 4 0x1 0x1 /* PA4 periph A with pullup */ | ||
222 | 0 5 0x1 0x1>; /* PA5 periph A with pullup */ | ||
223 | }; | ||
224 | |||
225 | pinctrl_mmc0_slot1_cmd_dat0: mmc0_slot1_cmd_dat0-0 { | ||
226 | atmel,pins = | ||
227 | <0 16 0x1 0x1 /* PA16 periph A with pullup */ | ||
228 | 0 17 0x1 0x1>; /* PA17 periph A with pullup */ | ||
229 | }; | ||
230 | |||
231 | pinctrl_mmc0_slot1_dat1_3: mmc0_slot1_dat1_3-0 { | ||
232 | atmel,pins = | ||
233 | <0 18 0x1 0x1 /* PA18 periph A with pullup */ | ||
234 | 0 19 0x1 0x1 /* PA19 periph A with pullup */ | ||
235 | 0 20 0x1 0x1>; /* PA20 periph A with pullup */ | ||
236 | }; | ||
237 | }; | ||
238 | |||
239 | mmc1 { | ||
240 | pinctrl_mmc1_clk: mmc1_clk-0 { | ||
241 | atmel,pins = | ||
242 | <0 6 0x1 0x0>; /* PA6 periph A */ | ||
243 | }; | ||
244 | |||
245 | pinctrl_mmc1_slot0_cmd_dat0: mmc1_slot0_cmd_dat0-0 { | ||
246 | atmel,pins = | ||
247 | <0 7 0x1 0x1 /* PA7 periph A with pullup */ | ||
248 | 0 8 0x1 0x1>; /* PA8 periph A with pullup */ | ||
249 | }; | ||
250 | |||
251 | pinctrl_mmc1_slot0_dat1_3: mmc1_slot0_dat1_3-0 { | ||
252 | atmel,pins = | ||
253 | <0 9 0x1 0x1 /* PA9 periph A with pullup */ | ||
254 | 0 10 0x1 0x1 /* PA10 periph A with pullup */ | ||
255 | 0 11 0x1 0x1>; /* PA11 periph A with pullup */ | ||
256 | }; | ||
257 | |||
258 | pinctrl_mmc1_slot1_cmd_dat0: mmc1_slot1_cmd_dat0-0 { | ||
259 | atmel,pins = | ||
260 | <0 21 0x1 0x1 /* PA21 periph A with pullup */ | ||
261 | 0 22 0x1 0x1>; /* PA22 periph A with pullup */ | ||
262 | }; | ||
263 | |||
264 | pinctrl_mmc1_slot1_dat1_3: mmc1_slot1_dat1_3-0 { | ||
265 | atmel,pins = | ||
266 | <0 23 0x1 0x1 /* PA23 periph A with pullup */ | ||
267 | 0 24 0x1 0x1 /* PA24 periph A with pullup */ | ||
268 | 0 25 0x1 0x1>; /* PA25 periph A with pullup */ | ||
269 | }; | ||
270 | }; | ||
271 | |||
272 | pioA: gpio@fffff200 { | ||
273 | compatible = "atmel,at91rm9200-gpio"; | ||
274 | reg = <0xfffff200 0x200>; | ||
275 | interrupts = <2 4 1>; | ||
276 | #gpio-cells = <2>; | ||
277 | gpio-controller; | ||
278 | interrupt-controller; | ||
279 | #interrupt-cells = <2>; | ||
280 | }; | ||
281 | |||
282 | pioB: gpio@fffff400 { | ||
283 | compatible = "atmel,at91rm9200-gpio"; | ||
284 | reg = <0xfffff400 0x200>; | ||
285 | interrupts = <3 4 1>; | ||
286 | #gpio-cells = <2>; | ||
287 | gpio-controller; | ||
288 | interrupt-controller; | ||
289 | #interrupt-cells = <2>; | ||
290 | }; | ||
291 | |||
292 | pioC: gpio@fffff600 { | ||
293 | compatible = "atmel,at91rm9200-gpio"; | ||
294 | reg = <0xfffff600 0x200>; | ||
295 | interrupts = <4 4 1>; | ||
296 | #gpio-cells = <2>; | ||
297 | gpio-controller; | ||
298 | interrupt-controller; | ||
299 | #interrupt-cells = <2>; | ||
300 | }; | ||
301 | |||
302 | pioD: gpio@fffff800 { | ||
303 | compatible = "atmel,at91rm9200-gpio"; | ||
304 | reg = <0xfffff800 0x200>; | ||
305 | interrupts = <4 4 1>; | ||
306 | #gpio-cells = <2>; | ||
307 | gpio-controller; | ||
308 | interrupt-controller; | ||
309 | #interrupt-cells = <2>; | ||
310 | }; | ||
311 | |||
312 | pioE: gpio@fffffa00 { | ||
313 | compatible = "atmel,at91rm9200-gpio"; | ||
314 | reg = <0xfffffa00 0x200>; | ||
315 | interrupts = <4 4 1>; | ||
316 | #gpio-cells = <2>; | ||
317 | gpio-controller; | ||
318 | interrupt-controller; | ||
319 | #interrupt-cells = <2>; | ||
320 | }; | ||
140 | }; | 321 | }; |
141 | 322 | ||
142 | dbgu: serial@ffffee00 { | 323 | dbgu: serial@ffffee00 { |
143 | compatible = "atmel,at91sam9260-usart"; | 324 | compatible = "atmel,at91sam9260-usart"; |
144 | reg = <0xffffee00 0x200>; | 325 | reg = <0xffffee00 0x200>; |
145 | interrupts = <1 4 7>; | 326 | interrupts = <1 4 7>; |
327 | pinctrl-names = "default"; | ||
328 | pinctrl-0 = <&pinctrl_dbgu>; | ||
146 | status = "disabled"; | 329 | status = "disabled"; |
147 | }; | 330 | }; |
148 | 331 | ||
@@ -152,6 +335,8 @@ | |||
152 | interrupts = <7 4 5>; | 335 | interrupts = <7 4 5>; |
153 | atmel,use-dma-rx; | 336 | atmel,use-dma-rx; |
154 | atmel,use-dma-tx; | 337 | atmel,use-dma-tx; |
338 | pinctrl-names = "default"; | ||
339 | pinctrl-0 = <&pinctrl_usart0>; | ||
155 | status = "disabled"; | 340 | status = "disabled"; |
156 | }; | 341 | }; |
157 | 342 | ||
@@ -161,6 +346,8 @@ | |||
161 | interrupts = <8 4 5>; | 346 | interrupts = <8 4 5>; |
162 | atmel,use-dma-rx; | 347 | atmel,use-dma-rx; |
163 | atmel,use-dma-tx; | 348 | atmel,use-dma-tx; |
349 | pinctrl-names = "default"; | ||
350 | pinctrl-0 = <&pinctrl_usart1>; | ||
164 | status = "disabled"; | 351 | status = "disabled"; |
165 | }; | 352 | }; |
166 | 353 | ||
@@ -170,6 +357,8 @@ | |||
170 | interrupts = <9 4 5>; | 357 | interrupts = <9 4 5>; |
171 | atmel,use-dma-rx; | 358 | atmel,use-dma-rx; |
172 | atmel,use-dma-tx; | 359 | atmel,use-dma-tx; |
360 | pinctrl-names = "default"; | ||
361 | pinctrl-0 = <&pinctrl_usart2>; | ||
173 | status = "disabled"; | 362 | status = "disabled"; |
174 | }; | 363 | }; |
175 | 364 | ||
@@ -177,6 +366,8 @@ | |||
177 | compatible = "cdns,at32ap7000-macb", "cdns,macb"; | 366 | compatible = "cdns,at32ap7000-macb", "cdns,macb"; |
178 | reg = <0xfffbc000 0x100>; | 367 | reg = <0xfffbc000 0x100>; |
179 | interrupts = <21 4 3>; | 368 | interrupts = <21 4 3>; |
369 | pinctrl-names = "default"; | ||
370 | pinctrl-0 = <&pinctrl_macb_rmii>; | ||
180 | status = "disabled"; | 371 | status = "disabled"; |
181 | }; | 372 | }; |
182 | 373 | ||
@@ -195,6 +386,24 @@ | |||
195 | #size-cells = <0>; | 386 | #size-cells = <0>; |
196 | status = "disabled"; | 387 | status = "disabled"; |
197 | }; | 388 | }; |
389 | |||
390 | mmc0: mmc@fff80000 { | ||
391 | compatible = "atmel,hsmci"; | ||
392 | reg = <0xfff80000 0x600>; | ||
393 | interrupts = <10 4 0>; | ||
394 | #address-cells = <1>; | ||
395 | #size-cells = <0>; | ||
396 | status = "disabled"; | ||
397 | }; | ||
398 | |||
399 | mmc1: mmc@fff84000 { | ||
400 | compatible = "atmel,hsmci"; | ||
401 | reg = <0xfff84000 0x600>; | ||
402 | interrupts = <11 4 0>; | ||
403 | #address-cells = <1>; | ||
404 | #size-cells = <0>; | ||
405 | status = "disabled"; | ||
406 | }; | ||
198 | }; | 407 | }; |
199 | 408 | ||
200 | nand0: nand@40000000 { | 409 | nand0: nand@40000000 { |
@@ -206,6 +415,8 @@ | |||
206 | >; | 415 | >; |
207 | atmel,nand-addr-offset = <21>; | 416 | atmel,nand-addr-offset = <21>; |
208 | atmel,nand-cmd-offset = <22>; | 417 | atmel,nand-cmd-offset = <22>; |
418 | pinctrl-names = "default"; | ||
419 | pinctrl-0 = <&pinctrl_nand>; | ||
209 | gpios = <&pioA 22 0 | 420 | gpios = <&pioA 22 0 |
210 | &pioD 15 0 | 421 | &pioD 15 0 |
211 | 0 | 422 | 0 |
diff --git a/arch/arm/boot/dts/at91sam9263ek.dts b/arch/arm/boot/dts/at91sam9263ek.dts index f86ac4b609fc..1eb08728f527 100644 --- a/arch/arm/boot/dts/at91sam9263ek.dts +++ b/arch/arm/boot/dts/at91sam9263ek.dts | |||
@@ -38,6 +38,10 @@ | |||
38 | }; | 38 | }; |
39 | 39 | ||
40 | usart0: serial@fff8c000 { | 40 | usart0: serial@fff8c000 { |
41 | pinctrl-0 = < | ||
42 | &pinctrl_usart0 | ||
43 | &pinctrl_usart0_rts | ||
44 | &pinctrl_usart0_cts>; | ||
41 | status = "okay"; | 45 | status = "okay"; |
42 | }; | 46 | }; |
43 | 47 | ||
@@ -50,6 +54,31 @@ | |||
50 | atmel,vbus-gpio = <&pioA 25 0>; | 54 | atmel,vbus-gpio = <&pioA 25 0>; |
51 | status = "okay"; | 55 | status = "okay"; |
52 | }; | 56 | }; |
57 | |||
58 | mmc0: mmc@fff80000 { | ||
59 | pinctrl-0 = < | ||
60 | &pinctrl_board_mmc0 | ||
61 | &pinctrl_mmc0_clk | ||
62 | &pinctrl_mmc0_slot0_cmd_dat0 | ||
63 | &pinctrl_mmc0_slot0_dat1_3>; | ||
64 | status = "okay"; | ||
65 | slot@0 { | ||
66 | reg = <0>; | ||
67 | bus-width = <4>; | ||
68 | cd-gpios = <&pioE 18 0>; | ||
69 | wp-gpios = <&pioE 19 0>; | ||
70 | }; | ||
71 | }; | ||
72 | |||
73 | pinctrl@fffff200 { | ||
74 | mmc0 { | ||
75 | pinctrl_board_mmc0: mmc0-board { | ||
76 | atmel,pins = | ||
77 | <5 18 0x0 0x5 /* PE18 gpio CD pin pull up and deglitch */ | ||
78 | 5 19 0x0 0x1>; /* PE19 gpio WP pin pull up */ | ||
79 | }; | ||
80 | }; | ||
81 | }; | ||
53 | }; | 82 | }; |
54 | 83 | ||
55 | nand0: nand@40000000 { | 84 | nand0: nand@40000000 { |
diff --git a/arch/arm/boot/dts/at91sam9g15.dtsi b/arch/arm/boot/dts/at91sam9g15.dtsi new file mode 100644 index 000000000000..fbe7a7089c2a --- /dev/null +++ b/arch/arm/boot/dts/at91sam9g15.dtsi | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * at91sam9g15.dtsi - Device Tree Include file for AT91SAM9G15 SoC | ||
3 | * | ||
4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2. | ||
7 | */ | ||
8 | |||
9 | /include/ "at91sam9x5.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "Atmel AT91SAM9G15 SoC"; | ||
13 | compatible = "atmel, at91sam9g15, atmel,at91sam9x5"; | ||
14 | |||
15 | ahb { | ||
16 | apb { | ||
17 | pinctrl@fffff400 { | ||
18 | atmel,mux-mask = < | ||
19 | /* A B C */ | ||
20 | 0xffffffff 0xffe0399f 0x00000000 /* pioA */ | ||
21 | 0x00040000 0x00047e3f 0x00000000 /* pioB */ | ||
22 | 0xfdffffff 0x00000000 0xb83fffff /* pioC */ | ||
23 | 0x003fffff 0x003f8000 0x00000000 /* pioD */ | ||
24 | >; | ||
25 | }; | ||
26 | }; | ||
27 | }; | ||
28 | }; | ||
diff --git a/arch/arm/boot/dts/at91sam9g15ek.dts b/arch/arm/boot/dts/at91sam9g15ek.dts new file mode 100644 index 000000000000..86dd3f6d938f --- /dev/null +++ b/arch/arm/boot/dts/at91sam9g15ek.dts | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * at91sam9g15ek.dts - Device Tree file for AT91SAM9G15-EK board | ||
3 | * | ||
4 | * Copyright (C) 2012 Atmel, | ||
5 | * 2012 Nicolas Ferre <nicolas.ferre@atmel.com> | ||
6 | * | ||
7 | * Licensed under GPLv2 or later. | ||
8 | */ | ||
9 | /dts-v1/; | ||
10 | /include/ "at91sam9g15.dtsi" | ||
11 | /include/ "at91sam9x5ek.dtsi" | ||
12 | |||
13 | / { | ||
14 | model = "Atmel AT91SAM9G25-EK"; | ||
15 | compatible = "atmel,at91sam9g15ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; | ||
16 | }; | ||
diff --git a/arch/arm/boot/dts/at91sam9g20ek_2mmc.dts b/arch/arm/boot/dts/at91sam9g20ek_2mmc.dts index f1b2e148ac8c..66467b113126 100644 --- a/arch/arm/boot/dts/at91sam9g20ek_2mmc.dts +++ b/arch/arm/boot/dts/at91sam9g20ek_2mmc.dts | |||
@@ -12,6 +12,32 @@ | |||
12 | model = "Atmel at91sam9g20ek 2 mmc"; | 12 | model = "Atmel at91sam9g20ek 2 mmc"; |
13 | compatible = "atmel,at91sam9g20ek_2mmc", "atmel,at91sam9g20", "atmel,at91sam9"; | 13 | compatible = "atmel,at91sam9g20ek_2mmc", "atmel,at91sam9g20", "atmel,at91sam9"; |
14 | 14 | ||
15 | ahb { | ||
16 | apb{ | ||
17 | mmc0: mmc@fffa8000 { | ||
18 | /* clk already mux wuth slot0 */ | ||
19 | pinctrl-0 = < | ||
20 | &pinctrl_board_mmc0_slot0 | ||
21 | &pinctrl_mmc0_slot0_cmd_dat0 | ||
22 | &pinctrl_mmc0_slot0_dat1_3>; | ||
23 | slot@0 { | ||
24 | reg = <0>; | ||
25 | bus-width = <4>; | ||
26 | cd-gpios = <&pioC 2 0>; | ||
27 | }; | ||
28 | }; | ||
29 | |||
30 | pinctrl@fffff400 { | ||
31 | mmc0_slot0 { | ||
32 | pinctrl_board_mmc0_slot0: mmc0_slot0-board { | ||
33 | atmel,pins = | ||
34 | <2 2 0x0 0x5>; /* PC2 gpio CD pin pull up and deglitch */ | ||
35 | }; | ||
36 | }; | ||
37 | }; | ||
38 | }; | ||
39 | }; | ||
40 | |||
15 | leds { | 41 | leds { |
16 | compatible = "gpio-leds"; | 42 | compatible = "gpio-leds"; |
17 | 43 | ||
diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi index e6391a4e6649..32a500a0e481 100644 --- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi +++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi | |||
@@ -35,6 +35,13 @@ | |||
35 | }; | 35 | }; |
36 | 36 | ||
37 | usart0: serial@fffb0000 { | 37 | usart0: serial@fffb0000 { |
38 | pinctrl-0 = | ||
39 | <&pinctrl_usart0 | ||
40 | &pinctrl_usart0_rts | ||
41 | &pinctrl_usart0_cts | ||
42 | &pinctrl_usart0_dtr_dsr | ||
43 | &pinctrl_usart0_dcd | ||
44 | &pinctrl_usart0_ri>; | ||
38 | status = "okay"; | 45 | status = "okay"; |
39 | }; | 46 | }; |
40 | 47 | ||
@@ -51,6 +58,29 @@ | |||
51 | atmel,vbus-gpio = <&pioC 5 0>; | 58 | atmel,vbus-gpio = <&pioC 5 0>; |
52 | status = "okay"; | 59 | status = "okay"; |
53 | }; | 60 | }; |
61 | |||
62 | mmc0: mmc@fffa8000 { | ||
63 | pinctrl-0 = < | ||
64 | &pinctrl_board_mmc0_slot1 | ||
65 | &pinctrl_mmc0_clk | ||
66 | &pinctrl_mmc0_slot1_cmd_dat0 | ||
67 | &pinctrl_mmc0_slot1_dat1_3>; | ||
68 | status = "okay"; | ||
69 | slot@1 { | ||
70 | reg = <1>; | ||
71 | bus-width = <4>; | ||
72 | cd-gpios = <&pioC 9 0>; | ||
73 | }; | ||
74 | }; | ||
75 | |||
76 | pinctrl@fffff400 { | ||
77 | mmc0_slot1 { | ||
78 | pinctrl_board_mmc0_slot1: mmc0_slot1-board { | ||
79 | atmel,pins = | ||
80 | <2 9 0x0 0x5>; /* PC9 gpio CD pin pull up and deglitch */ | ||
81 | }; | ||
82 | }; | ||
83 | }; | ||
54 | }; | 84 | }; |
55 | 85 | ||
56 | nand0: nand@40000000 { | 86 | nand0: nand@40000000 { |
diff --git a/arch/arm/boot/dts/at91sam9g25.dtsi b/arch/arm/boot/dts/at91sam9g25.dtsi new file mode 100644 index 000000000000..05a718fb83c4 --- /dev/null +++ b/arch/arm/boot/dts/at91sam9g25.dtsi | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * at91sam9g25.dtsi - Device Tree Include file for AT91SAM9G25 SoC | ||
3 | * | ||
4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2. | ||
7 | */ | ||
8 | |||
9 | /include/ "at91sam9x5.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "Atmel AT91SAM9G25 SoC"; | ||
13 | compatible = "atmel, at91sam9g25, atmel,at91sam9x5"; | ||
14 | |||
15 | ahb { | ||
16 | apb { | ||
17 | pinctrl@fffff400 { | ||
18 | atmel,mux-mask = < | ||
19 | /* A B C */ | ||
20 | 0xffffffff 0xffe0399f 0xc000001c /* pioA */ | ||
21 | 0x0007ffff 0x8000fe3f 0x00000000 /* pioB */ | ||
22 | 0x80000000 0x07c0ffff 0xb83fffff /* pioC */ | ||
23 | 0x003fffff 0x003f8000 0x00000000 /* pioD */ | ||
24 | >; | ||
25 | }; | ||
26 | }; | ||
27 | }; | ||
28 | }; | ||
diff --git a/arch/arm/boot/dts/at91sam9g25ek.dts b/arch/arm/boot/dts/at91sam9g25ek.dts index 877c08f06763..c5ab16fba059 100644 --- a/arch/arm/boot/dts/at91sam9g25ek.dts +++ b/arch/arm/boot/dts/at91sam9g25ek.dts | |||
@@ -7,55 +7,10 @@ | |||
7 | * Licensed under GPLv2 or later. | 7 | * Licensed under GPLv2 or later. |
8 | */ | 8 | */ |
9 | /dts-v1/; | 9 | /dts-v1/; |
10 | /include/ "at91sam9x5.dtsi" | 10 | /include/ "at91sam9g25.dtsi" |
11 | /include/ "at91sam9x5cm.dtsi" | 11 | /include/ "at91sam9x5ek.dtsi" |
12 | 12 | ||
13 | / { | 13 | / { |
14 | model = "Atmel AT91SAM9G25-EK"; | 14 | model = "Atmel AT91SAM9G25-EK"; |
15 | compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; | 15 | compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; |
16 | |||
17 | chosen { | ||
18 | bootargs = "console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs"; | ||
19 | }; | ||
20 | |||
21 | ahb { | ||
22 | apb { | ||
23 | dbgu: serial@fffff200 { | ||
24 | status = "okay"; | ||
25 | }; | ||
26 | |||
27 | usart0: serial@f801c000 { | ||
28 | status = "okay"; | ||
29 | }; | ||
30 | |||
31 | macb0: ethernet@f802c000 { | ||
32 | phy-mode = "rmii"; | ||
33 | status = "okay"; | ||
34 | }; | ||
35 | |||
36 | i2c0: i2c@f8010000 { | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | |||
40 | i2c1: i2c@f8014000 { | ||
41 | status = "okay"; | ||
42 | }; | ||
43 | |||
44 | i2c2: i2c@f8018000 { | ||
45 | status = "okay"; | ||
46 | }; | ||
47 | }; | ||
48 | |||
49 | usb0: ohci@00600000 { | ||
50 | status = "okay"; | ||
51 | num-ports = <2>; | ||
52 | atmel,vbus-gpio = <&pioD 19 1 | ||
53 | &pioD 20 1 | ||
54 | >; | ||
55 | }; | ||
56 | |||
57 | usb1: ehci@00700000 { | ||
58 | status = "okay"; | ||
59 | }; | ||
60 | }; | ||
61 | }; | 16 | }; |
diff --git a/arch/arm/boot/dts/at91sam9g35.dtsi b/arch/arm/boot/dts/at91sam9g35.dtsi new file mode 100644 index 000000000000..f9d14a722794 --- /dev/null +++ b/arch/arm/boot/dts/at91sam9g35.dtsi | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * at91sam9g35.dtsi - Device Tree Include file for AT91SAM9G35 SoC | ||
3 | * | ||
4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2. | ||
7 | */ | ||
8 | |||
9 | /include/ "at91sam9x5.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "Atmel AT91SAM9G35 SoC"; | ||
13 | compatible = "atmel, at91sam9g35, atmel,at91sam9x5"; | ||
14 | |||
15 | ahb { | ||
16 | apb { | ||
17 | pinctrl@fffff400 { | ||
18 | atmel,mux-mask = < | ||
19 | /* A B C */ | ||
20 | 0xffffffff 0xffe0399f 0xc000000c /* pioA */ | ||
21 | 0x000406ff 0x00047e3f 0x00000000 /* pioB */ | ||
22 | 0xfdffffff 0x00000000 0xb83fffff /* pioC */ | ||
23 | 0x003fffff 0x003f8000 0x00000000 /* pioD */ | ||
24 | >; | ||
25 | }; | ||
26 | }; | ||
27 | }; | ||
28 | }; | ||
diff --git a/arch/arm/boot/dts/at91sam9g35ek.dts b/arch/arm/boot/dts/at91sam9g35ek.dts new file mode 100644 index 000000000000..95944bdd798d --- /dev/null +++ b/arch/arm/boot/dts/at91sam9g35ek.dts | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * at91sam9g35ek.dts - Device Tree file for AT91SAM9G35-EK board | ||
3 | * | ||
4 | * Copyright (C) 2012 Atmel, | ||
5 | * 2012 Nicolas Ferre <nicolas.ferre@atmel.com> | ||
6 | * | ||
7 | * Licensed under GPLv2 or later. | ||
8 | */ | ||
9 | /dts-v1/; | ||
10 | /include/ "at91sam9g35.dtsi" | ||
11 | /include/ "at91sam9x5ek.dtsi" | ||
12 | |||
13 | / { | ||
14 | model = "Atmel AT91SAM9G35-EK"; | ||
15 | compatible = "atmel,at91sam9g35ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; | ||
16 | }; | ||
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi index 3add030d61f8..0741caeeced1 100644 --- a/arch/arm/boot/dts/at91sam9g45.dtsi +++ b/arch/arm/boot/dts/at91sam9g45.dtsi | |||
@@ -108,60 +108,243 @@ | |||
108 | interrupts = <21 4 0>; | 108 | interrupts = <21 4 0>; |
109 | }; | 109 | }; |
110 | 110 | ||
111 | pioA: gpio@fffff200 { | 111 | pinctrl@fffff200 { |
112 | compatible = "atmel,at91rm9200-gpio"; | 112 | #address-cells = <1>; |
113 | reg = <0xfffff200 0x100>; | 113 | #size-cells = <1>; |
114 | interrupts = <2 4 1>; | 114 | compatible = "atmel,at91rm9200-pinctrl", "simple-bus"; |
115 | #gpio-cells = <2>; | 115 | ranges = <0xfffff200 0xfffff200 0xa00>; |
116 | gpio-controller; | 116 | |
117 | interrupt-controller; | 117 | atmel,mux-mask = < |
118 | #interrupt-cells = <2>; | 118 | /* A B */ |
119 | }; | 119 | 0xffffffff 0xffc003ff /* pioA */ |
120 | 0xffffffff 0x800f8f00 /* pioB */ | ||
121 | 0xffffffff 0x00000e00 /* pioC */ | ||
122 | 0xffffffff 0xff0c1381 /* pioD */ | ||
123 | 0xffffffff 0x81ffff81 /* pioE */ | ||
124 | >; | ||
125 | |||
126 | /* shared pinctrl settings */ | ||
127 | dbgu { | ||
128 | pinctrl_dbgu: dbgu-0 { | ||
129 | atmel,pins = | ||
130 | <1 12 0x1 0x0 /* PB12 periph A */ | ||
131 | 1 13 0x1 0x0>; /* PB13 periph A */ | ||
132 | }; | ||
133 | }; | ||
120 | 134 | ||
121 | pioB: gpio@fffff400 { | 135 | usart0 { |
122 | compatible = "atmel,at91rm9200-gpio"; | 136 | pinctrl_usart0: usart0-0 { |
123 | reg = <0xfffff400 0x100>; | 137 | atmel,pins = |
124 | interrupts = <3 4 1>; | 138 | <1 19 0x1 0x1 /* PB19 periph A with pullup */ |
125 | #gpio-cells = <2>; | 139 | 1 18 0x1 0x0>; /* PB18 periph A */ |
126 | gpio-controller; | 140 | }; |
127 | interrupt-controller; | 141 | |
128 | #interrupt-cells = <2>; | 142 | pinctrl_usart0_rts: usart0_rts-0 { |
129 | }; | 143 | atmel,pins = |
144 | <1 17 0x2 0x0>; /* PB17 periph B */ | ||
145 | }; | ||
146 | |||
147 | pinctrl_usart0_cts: usart0_cts-0 { | ||
148 | atmel,pins = | ||
149 | <1 15 0x2 0x0>; /* PB15 periph B */ | ||
150 | }; | ||
151 | }; | ||
130 | 152 | ||
131 | pioC: gpio@fffff600 { | 153 | uart1 { |
132 | compatible = "atmel,at91rm9200-gpio"; | 154 | pinctrl_usart1: usart1-0 { |
133 | reg = <0xfffff600 0x100>; | 155 | atmel,pins = |
134 | interrupts = <4 4 1>; | 156 | <1 4 0x1 0x1 /* PB4 periph A with pullup */ |
135 | #gpio-cells = <2>; | 157 | 1 5 0x1 0x0>; /* PB5 periph A */ |
136 | gpio-controller; | 158 | }; |
137 | interrupt-controller; | 159 | |
138 | #interrupt-cells = <2>; | 160 | pinctrl_usart1_rts: usart1_rts-0 { |
139 | }; | 161 | atmel,pins = |
162 | <3 16 0x1 0x0>; /* PD16 periph A */ | ||
163 | }; | ||
164 | |||
165 | pinctrl_usart1_cts: usart1_cts-0 { | ||
166 | atmel,pins = | ||
167 | <3 17 0x1 0x0>; /* PD17 periph A */ | ||
168 | }; | ||
169 | }; | ||
140 | 170 | ||
141 | pioD: gpio@fffff800 { | 171 | usart2 { |
142 | compatible = "atmel,at91rm9200-gpio"; | 172 | pinctrl_usart2: usart2-0 { |
143 | reg = <0xfffff800 0x100>; | 173 | atmel,pins = |
144 | interrupts = <5 4 1>; | 174 | <1 6 0x1 0x1 /* PB6 periph A with pullup */ |
145 | #gpio-cells = <2>; | 175 | 1 7 0x1 0x0>; /* PB7 periph A */ |
146 | gpio-controller; | 176 | }; |
147 | interrupt-controller; | 177 | |
148 | #interrupt-cells = <2>; | 178 | pinctrl_usart2_rts: usart2_rts-0 { |
149 | }; | 179 | atmel,pins = |
180 | <2 9 0x2 0x0>; /* PC9 periph B */ | ||
181 | }; | ||
182 | |||
183 | pinctrl_usart2_cts: usart2_cts-0 { | ||
184 | atmel,pins = | ||
185 | <2 11 0x2 0x0>; /* PC11 periph B */ | ||
186 | }; | ||
187 | }; | ||
150 | 188 | ||
151 | pioE: gpio@fffffa00 { | 189 | usart3 { |
152 | compatible = "atmel,at91rm9200-gpio"; | 190 | pinctrl_usart3: usart3-0 { |
153 | reg = <0xfffffa00 0x100>; | 191 | atmel,pins = |
154 | interrupts = <5 4 1>; | 192 | <1 8 0x1 0x1 /* PB9 periph A with pullup */ |
155 | #gpio-cells = <2>; | 193 | 1 9 0x1 0x0>; /* PB8 periph A */ |
156 | gpio-controller; | 194 | }; |
157 | interrupt-controller; | 195 | |
158 | #interrupt-cells = <2>; | 196 | pinctrl_usart3_rts: usart3_rts-0 { |
197 | atmel,pins = | ||
198 | <0 23 0x2 0x0>; /* PA23 periph B */ | ||
199 | }; | ||
200 | |||
201 | pinctrl_usart3_cts: usart3_cts-0 { | ||
202 | atmel,pins = | ||
203 | <0 24 0x2 0x0>; /* PA24 periph B */ | ||
204 | }; | ||
205 | }; | ||
206 | |||
207 | nand { | ||
208 | pinctrl_nand: nand-0 { | ||
209 | atmel,pins = | ||
210 | <2 8 0x0 0x1 /* PC8 gpio RDY pin pull_up*/ | ||
211 | 2 14 0x0 0x1>; /* PC14 gpio enable pin pull_up */ | ||
212 | }; | ||
213 | }; | ||
214 | |||
215 | macb { | ||
216 | pinctrl_macb_rmii: macb_rmii-0 { | ||
217 | atmel,pins = | ||
218 | <0 10 0x1 0x0 /* PA10 periph A */ | ||
219 | 0 11 0x1 0x0 /* PA11 periph A */ | ||
220 | 0 12 0x1 0x0 /* PA12 periph A */ | ||
221 | 0 13 0x1 0x0 /* PA13 periph A */ | ||
222 | 0 14 0x1 0x0 /* PA14 periph A */ | ||
223 | 0 15 0x1 0x0 /* PA15 periph A */ | ||
224 | 0 16 0x1 0x0 /* PA16 periph A */ | ||
225 | 0 17 0x1 0x0 /* PA17 periph A */ | ||
226 | 0 18 0x1 0x0 /* PA18 periph A */ | ||
227 | 0 19 0x1 0x0>; /* PA19 periph A */ | ||
228 | }; | ||
229 | |||
230 | pinctrl_macb_rmii_mii: macb_rmii_mii-0 { | ||
231 | atmel,pins = | ||
232 | <0 6 0x2 0x0 /* PA6 periph B */ | ||
233 | 0 7 0x2 0x0 /* PA7 periph B */ | ||
234 | 0 8 0x2 0x0 /* PA8 periph B */ | ||
235 | 0 9 0x2 0x0 /* PA9 periph B */ | ||
236 | 0 27 0x2 0x0 /* PA27 periph B */ | ||
237 | 0 28 0x2 0x0 /* PA28 periph B */ | ||
238 | 0 29 0x2 0x0 /* PA29 periph B */ | ||
239 | 0 30 0x2 0x0>; /* PA30 periph B */ | ||
240 | }; | ||
241 | }; | ||
242 | |||
243 | mmc0 { | ||
244 | pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 { | ||
245 | atmel,pins = | ||
246 | <0 0 0x1 0x0 /* PA0 periph A */ | ||
247 | 0 1 0x1 0x1 /* PA1 periph A with pullup */ | ||
248 | 0 2 0x1 0x1>; /* PA2 periph A with pullup */ | ||
249 | }; | ||
250 | |||
251 | pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 { | ||
252 | atmel,pins = | ||
253 | <0 3 0x1 0x1 /* PA3 periph A with pullup */ | ||
254 | 0 4 0x1 0x1 /* PA4 periph A with pullup */ | ||
255 | 0 5 0x1 0x1>; /* PA5 periph A with pullup */ | ||
256 | }; | ||
257 | |||
258 | pinctrl_mmc0_slot0_dat4_7: mmc0_slot0_dat4_7-0 { | ||
259 | atmel,pins = | ||
260 | <0 6 0x1 0x1 /* PA6 periph A with pullup */ | ||
261 | 0 7 0x1 0x1 /* PA7 periph A with pullup */ | ||
262 | 0 8 0x1 0x1 /* PA8 periph A with pullup */ | ||
263 | 0 9 0x1 0x1>; /* PA9 periph A with pullup */ | ||
264 | }; | ||
265 | }; | ||
266 | |||
267 | mmc1 { | ||
268 | pinctrl_mmc1_slot0_clk_cmd_dat0: mmc1_slot0_clk_cmd_dat0-0 { | ||
269 | atmel,pins = | ||
270 | <0 31 0x1 0x0 /* PA31 periph A */ | ||
271 | 0 22 0x1 0x1 /* PA22 periph A with pullup */ | ||
272 | 0 23 0x1 0x1>; /* PA23 periph A with pullup */ | ||
273 | }; | ||
274 | |||
275 | pinctrl_mmc1_slot0_dat1_3: mmc1_slot0_dat1_3-0 { | ||
276 | atmel,pins = | ||
277 | <0 24 0x1 0x1 /* PA24 periph A with pullup */ | ||
278 | 0 25 0x1 0x1 /* PA25 periph A with pullup */ | ||
279 | 0 26 0x1 0x1>; /* PA26 periph A with pullup */ | ||
280 | }; | ||
281 | |||
282 | pinctrl_mmc1_slot0_dat4_7: mmc1_slot0_dat4_7-0 { | ||
283 | atmel,pins = | ||
284 | <0 27 0x1 0x1 /* PA27 periph A with pullup */ | ||
285 | 0 28 0x1 0x1 /* PA28 periph A with pullup */ | ||
286 | 0 29 0x1 0x1 /* PA29 periph A with pullup */ | ||
287 | 0 20 0x1 0x1>; /* PA30 periph A with pullup */ | ||
288 | }; | ||
289 | }; | ||
290 | |||
291 | pioA: gpio@fffff200 { | ||
292 | compatible = "atmel,at91rm9200-gpio"; | ||
293 | reg = <0xfffff200 0x200>; | ||
294 | interrupts = <2 4 1>; | ||
295 | #gpio-cells = <2>; | ||
296 | gpio-controller; | ||
297 | interrupt-controller; | ||
298 | #interrupt-cells = <2>; | ||
299 | }; | ||
300 | |||
301 | pioB: gpio@fffff400 { | ||
302 | compatible = "atmel,at91rm9200-gpio"; | ||
303 | reg = <0xfffff400 0x200>; | ||
304 | interrupts = <3 4 1>; | ||
305 | #gpio-cells = <2>; | ||
306 | gpio-controller; | ||
307 | interrupt-controller; | ||
308 | #interrupt-cells = <2>; | ||
309 | }; | ||
310 | |||
311 | pioC: gpio@fffff600 { | ||
312 | compatible = "atmel,at91rm9200-gpio"; | ||
313 | reg = <0xfffff600 0x200>; | ||
314 | interrupts = <4 4 1>; | ||
315 | #gpio-cells = <2>; | ||
316 | gpio-controller; | ||
317 | interrupt-controller; | ||
318 | #interrupt-cells = <2>; | ||
319 | }; | ||
320 | |||
321 | pioD: gpio@fffff800 { | ||
322 | compatible = "atmel,at91rm9200-gpio"; | ||
323 | reg = <0xfffff800 0x200>; | ||
324 | interrupts = <5 4 1>; | ||
325 | #gpio-cells = <2>; | ||
326 | gpio-controller; | ||
327 | interrupt-controller; | ||
328 | #interrupt-cells = <2>; | ||
329 | }; | ||
330 | |||
331 | pioE: gpio@fffffa00 { | ||
332 | compatible = "atmel,at91rm9200-gpio"; | ||
333 | reg = <0xfffffa00 0x200>; | ||
334 | interrupts = <5 4 1>; | ||
335 | #gpio-cells = <2>; | ||
336 | gpio-controller; | ||
337 | interrupt-controller; | ||
338 | #interrupt-cells = <2>; | ||
339 | }; | ||
159 | }; | 340 | }; |
160 | 341 | ||
161 | dbgu: serial@ffffee00 { | 342 | dbgu: serial@ffffee00 { |
162 | compatible = "atmel,at91sam9260-usart"; | 343 | compatible = "atmel,at91sam9260-usart"; |
163 | reg = <0xffffee00 0x200>; | 344 | reg = <0xffffee00 0x200>; |
164 | interrupts = <1 4 7>; | 345 | interrupts = <1 4 7>; |
346 | pinctrl-names = "default"; | ||
347 | pinctrl-0 = <&pinctrl_dbgu>; | ||
165 | status = "disabled"; | 348 | status = "disabled"; |
166 | }; | 349 | }; |
167 | 350 | ||
@@ -171,6 +354,8 @@ | |||
171 | interrupts = <7 4 5>; | 354 | interrupts = <7 4 5>; |
172 | atmel,use-dma-rx; | 355 | atmel,use-dma-rx; |
173 | atmel,use-dma-tx; | 356 | atmel,use-dma-tx; |
357 | pinctrl-names = "default"; | ||
358 | pinctrl-0 = <&pinctrl_usart0>; | ||
174 | status = "disabled"; | 359 | status = "disabled"; |
175 | }; | 360 | }; |
176 | 361 | ||
@@ -180,6 +365,8 @@ | |||
180 | interrupts = <8 4 5>; | 365 | interrupts = <8 4 5>; |
181 | atmel,use-dma-rx; | 366 | atmel,use-dma-rx; |
182 | atmel,use-dma-tx; | 367 | atmel,use-dma-tx; |
368 | pinctrl-names = "default"; | ||
369 | pinctrl-0 = <&pinctrl_usart1>; | ||
183 | status = "disabled"; | 370 | status = "disabled"; |
184 | }; | 371 | }; |
185 | 372 | ||
@@ -189,6 +376,8 @@ | |||
189 | interrupts = <9 4 5>; | 376 | interrupts = <9 4 5>; |
190 | atmel,use-dma-rx; | 377 | atmel,use-dma-rx; |
191 | atmel,use-dma-tx; | 378 | atmel,use-dma-tx; |
379 | pinctrl-names = "default"; | ||
380 | pinctrl-0 = <&pinctrl_usart2>; | ||
192 | status = "disabled"; | 381 | status = "disabled"; |
193 | }; | 382 | }; |
194 | 383 | ||
@@ -198,6 +387,8 @@ | |||
198 | interrupts = <10 4 5>; | 387 | interrupts = <10 4 5>; |
199 | atmel,use-dma-rx; | 388 | atmel,use-dma-rx; |
200 | atmel,use-dma-tx; | 389 | atmel,use-dma-tx; |
390 | pinctrl-names = "default"; | ||
391 | pinctrl-0 = <&pinctrl_usart3>; | ||
201 | status = "disabled"; | 392 | status = "disabled"; |
202 | }; | 393 | }; |
203 | 394 | ||
@@ -205,6 +396,8 @@ | |||
205 | compatible = "cdns,at32ap7000-macb", "cdns,macb"; | 396 | compatible = "cdns,at32ap7000-macb", "cdns,macb"; |
206 | reg = <0xfffbc000 0x100>; | 397 | reg = <0xfffbc000 0x100>; |
207 | interrupts = <25 4 3>; | 398 | interrupts = <25 4 3>; |
399 | pinctrl-names = "default"; | ||
400 | pinctrl-0 = <&pinctrl_macb_rmii>; | ||
208 | status = "disabled"; | 401 | status = "disabled"; |
209 | }; | 402 | }; |
210 | 403 | ||
@@ -262,6 +455,24 @@ | |||
262 | trigger-value = <0x6>; | 455 | trigger-value = <0x6>; |
263 | }; | 456 | }; |
264 | }; | 457 | }; |
458 | |||
459 | mmc0: mmc@fff80000 { | ||
460 | compatible = "atmel,hsmci"; | ||
461 | reg = <0xfff80000 0x600>; | ||
462 | interrupts = <11 4 0>; | ||
463 | #address-cells = <1>; | ||
464 | #size-cells = <0>; | ||
465 | status = "disabled"; | ||
466 | }; | ||
467 | |||
468 | mmc1: mmc@fffd0000 { | ||
469 | compatible = "atmel,hsmci"; | ||
470 | reg = <0xfffd0000 0x600>; | ||
471 | interrupts = <29 4 0>; | ||
472 | #address-cells = <1>; | ||
473 | #size-cells = <0>; | ||
474 | status = "disabled"; | ||
475 | }; | ||
265 | }; | 476 | }; |
266 | 477 | ||
267 | nand0: nand@40000000 { | 478 | nand0: nand@40000000 { |
@@ -273,6 +484,8 @@ | |||
273 | >; | 484 | >; |
274 | atmel,nand-addr-offset = <21>; | 485 | atmel,nand-addr-offset = <21>; |
275 | atmel,nand-cmd-offset = <22>; | 486 | atmel,nand-cmd-offset = <22>; |
487 | pinctrl-names = "default"; | ||
488 | pinctrl-0 = <&pinctrl_nand>; | ||
276 | gpios = <&pioC 8 0 | 489 | gpios = <&pioC 8 0 |
277 | &pioC 14 0 | 490 | &pioC 14 0 |
278 | 0 | 491 | 0 |
diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts index 15e1dd43f625..20c31913c270 100644 --- a/arch/arm/boot/dts/at91sam9m10g45ek.dts +++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts | |||
@@ -39,6 +39,10 @@ | |||
39 | }; | 39 | }; |
40 | 40 | ||
41 | usart1: serial@fff90000 { | 41 | usart1: serial@fff90000 { |
42 | pinctrl-0 = | ||
43 | <&pinctrl_usart1 | ||
44 | &pinctrl_usart1_rts | ||
45 | &pinctrl_usart1_cts>; | ||
42 | status = "okay"; | 46 | status = "okay"; |
43 | }; | 47 | }; |
44 | 48 | ||
@@ -54,6 +58,50 @@ | |||
54 | i2c1: i2c@fff88000 { | 58 | i2c1: i2c@fff88000 { |
55 | status = "okay"; | 59 | status = "okay"; |
56 | }; | 60 | }; |
61 | |||
62 | mmc0: mmc@fff80000 { | ||
63 | pinctrl-0 = < | ||
64 | &pinctrl_board_mmc0 | ||
65 | &pinctrl_mmc0_slot0_clk_cmd_dat0 | ||
66 | &pinctrl_mmc0_slot0_dat1_3>; | ||
67 | status = "okay"; | ||
68 | slot@0 { | ||
69 | reg = <0>; | ||
70 | bus-width = <4>; | ||
71 | cd-gpios = <&pioD 10 0>; | ||
72 | }; | ||
73 | }; | ||
74 | |||
75 | mmc1: mmc@fffd0000 { | ||
76 | pinctrl-0 = < | ||
77 | &pinctrl_board_mmc1 | ||
78 | &pinctrl_mmc1_slot0_clk_cmd_dat0 | ||
79 | &pinctrl_mmc1_slot0_dat1_3>; | ||
80 | status = "okay"; | ||
81 | slot@0 { | ||
82 | reg = <0>; | ||
83 | bus-width = <4>; | ||
84 | cd-gpios = <&pioD 11 0>; | ||
85 | wp-gpios = <&pioD 29 0>; | ||
86 | }; | ||
87 | }; | ||
88 | |||
89 | pinctrl@fffff200 { | ||
90 | mmc0 { | ||
91 | pinctrl_board_mmc0: mmc0-board { | ||
92 | atmel,pins = | ||
93 | <3 10 0x0 0x5>; /* PD10 gpio CD pin pull up and deglitch */ | ||
94 | }; | ||
95 | }; | ||
96 | |||
97 | mmc1 { | ||
98 | pinctrl_board_mmc1: mmc1-board { | ||
99 | atmel,pins = | ||
100 | <3 11 0x0 0x5 /* PD11 gpio CD pin pull up and deglitch */ | ||
101 | 3 29 0x0 0x1>; /* PD29 gpio WP pin pull up */ | ||
102 | }; | ||
103 | }; | ||
104 | }; | ||
57 | }; | 105 | }; |
58 | 106 | ||
59 | nand0: nand@40000000 { | 107 | nand0: nand@40000000 { |
diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi index 82508d68aa7e..e9efb34f4379 100644 --- a/arch/arm/boot/dts/at91sam9n12.dtsi +++ b/arch/arm/boot/dts/at91sam9n12.dtsi | |||
@@ -84,6 +84,15 @@ | |||
84 | reg = <0xfffffe10 0x10>; | 84 | reg = <0xfffffe10 0x10>; |
85 | }; | 85 | }; |
86 | 86 | ||
87 | mmc0: mmc@f0008000 { | ||
88 | compatible = "atmel,hsmci"; | ||
89 | reg = <0xf0008000 0x600>; | ||
90 | interrupts = <12 4 0>; | ||
91 | #address-cells = <1>; | ||
92 | #size-cells = <0>; | ||
93 | status = "disabled"; | ||
94 | }; | ||
95 | |||
87 | tcb0: timer@f8008000 { | 96 | tcb0: timer@f8008000 { |
88 | compatible = "atmel,at91sam9x5-tcb"; | 97 | compatible = "atmel,at91sam9x5-tcb"; |
89 | reg = <0xf8008000 0x100>; | 98 | reg = <0xf8008000 0x100>; |
@@ -102,50 +111,186 @@ | |||
102 | interrupts = <20 4 0>; | 111 | interrupts = <20 4 0>; |
103 | }; | 112 | }; |
104 | 113 | ||
105 | pioA: gpio@fffff400 { | 114 | pinctrl@fffff400 { |
106 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | 115 | #address-cells = <1>; |
107 | reg = <0xfffff400 0x100>; | 116 | #size-cells = <1>; |
108 | interrupts = <2 4 1>; | 117 | compatible = "atmel,at91sam9x5-pinctrl", "atmel,at91rm9200-pinctrl", "simple-bus"; |
109 | #gpio-cells = <2>; | 118 | ranges = <0xfffff400 0xfffff400 0x800>; |
110 | gpio-controller; | ||
111 | interrupt-controller; | ||
112 | #interrupt-cells = <2>; | ||
113 | }; | ||
114 | 119 | ||
115 | pioB: gpio@fffff600 { | 120 | atmel,mux-mask = < |
116 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | 121 | /* A B C */ |
117 | reg = <0xfffff600 0x100>; | 122 | 0xffffffff 0xffe07983 0x00000000 /* pioA */ |
118 | interrupts = <2 4 1>; | 123 | 0x00040000 0x00047e0f 0x00000000 /* pioB */ |
119 | #gpio-cells = <2>; | 124 | 0xfdffffff 0x07c00000 0xb83fffff /* pioC */ |
120 | gpio-controller; | 125 | 0x003fffff 0x003f8000 0x00000000 /* pioD */ |
121 | interrupt-controller; | 126 | >; |
122 | #interrupt-cells = <2>; | ||
123 | }; | ||
124 | 127 | ||
125 | pioC: gpio@fffff800 { | 128 | /* shared pinctrl settings */ |
126 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | 129 | dbgu { |
127 | reg = <0xfffff800 0x100>; | 130 | pinctrl_dbgu: dbgu-0 { |
128 | interrupts = <3 4 1>; | 131 | atmel,pins = |
129 | #gpio-cells = <2>; | 132 | <0 9 0x1 0x0 /* PA9 periph A */ |
130 | gpio-controller; | 133 | 0 10 0x1 0x1>; /* PA10 periph with pullup */ |
131 | interrupt-controller; | 134 | }; |
132 | #interrupt-cells = <2>; | 135 | }; |
133 | }; | ||
134 | 136 | ||
135 | pioD: gpio@fffffa00 { | 137 | usart0 { |
136 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | 138 | pinctrl_usart0: usart0-0 { |
137 | reg = <0xfffffa00 0x100>; | 139 | atmel,pins = |
138 | interrupts = <3 4 1>; | 140 | <0 1 0x1 0x1 /* PA1 periph A with pullup */ |
139 | #gpio-cells = <2>; | 141 | 0 0 0x1 0x0>; /* PA0 periph A */ |
140 | gpio-controller; | 142 | }; |
141 | interrupt-controller; | 143 | |
142 | #interrupt-cells = <2>; | 144 | pinctrl_usart0_rts: usart0_rts-0 { |
145 | atmel,pins = | ||
146 | <0 2 0x1 0x0>; /* PA2 periph A */ | ||
147 | }; | ||
148 | |||
149 | pinctrl_usart0_cts: usart0_cts-0 { | ||
150 | atmel,pins = | ||
151 | <0 3 0x1 0x0>; /* PA3 periph A */ | ||
152 | }; | ||
153 | }; | ||
154 | |||
155 | usart1 { | ||
156 | pinctrl_usart1: usart1-0 { | ||
157 | atmel,pins = | ||
158 | <0 6 0x1 0x1 /* PA6 periph A with pullup */ | ||
159 | 0 5 0x1 0x0>; /* PA5 periph A */ | ||
160 | }; | ||
161 | }; | ||
162 | |||
163 | usart2 { | ||
164 | pinctrl_usart2: usart2-0 { | ||
165 | atmel,pins = | ||
166 | <0 8 0x1 0x1 /* PA8 periph A with pullup */ | ||
167 | 0 7 0x1 0x0>; /* PA7 periph A */ | ||
168 | }; | ||
169 | |||
170 | pinctrl_usart2_rts: usart2_rts-0 { | ||
171 | atmel,pins = | ||
172 | <1 0 0x2 0x0>; /* PB0 periph B */ | ||
173 | }; | ||
174 | |||
175 | pinctrl_usart2_cts: usart2_cts-0 { | ||
176 | atmel,pins = | ||
177 | <1 1 0x2 0x0>; /* PB1 periph B */ | ||
178 | }; | ||
179 | }; | ||
180 | |||
181 | usart3 { | ||
182 | pinctrl_usart3: usart3-0 { | ||
183 | atmel,pins = | ||
184 | <2 23 0x2 0x1 /* PC23 periph B with pullup */ | ||
185 | 2 22 0x2 0x0>; /* PC22 periph B */ | ||
186 | }; | ||
187 | |||
188 | pinctrl_usart3_rts: usart3_rts-0 { | ||
189 | atmel,pins = | ||
190 | <2 24 0x2 0x0>; /* PC24 periph B */ | ||
191 | }; | ||
192 | |||
193 | pinctrl_usart3_cts: usart3_cts-0 { | ||
194 | atmel,pins = | ||
195 | <2 25 0x2 0x0>; /* PC25 periph B */ | ||
196 | }; | ||
197 | }; | ||
198 | |||
199 | uart0 { | ||
200 | pinctrl_uart0: uart0-0 { | ||
201 | atmel,pins = | ||
202 | <2 9 0x3 0x1 /* PC9 periph C with pullup */ | ||
203 | 2 8 0x3 0x0>; /* PC8 periph C */ | ||
204 | }; | ||
205 | }; | ||
206 | |||
207 | uart1 { | ||
208 | pinctrl_uart1: uart1-0 { | ||
209 | atmel,pins = | ||
210 | <2 16 0x3 0x1 /* PC17 periph C with pullup */ | ||
211 | 2 17 0x3 0x0>; /* PC16 periph C */ | ||
212 | }; | ||
213 | }; | ||
214 | |||
215 | nand { | ||
216 | pinctrl_nand: nand-0 { | ||
217 | atmel,pins = | ||
218 | <3 5 0x0 0x1 /* PD5 gpio RDY pin pull_up*/ | ||
219 | 3 4 0x0 0x1>; /* PD4 gpio enable pin pull_up */ | ||
220 | }; | ||
221 | }; | ||
222 | |||
223 | mmc0 { | ||
224 | pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 { | ||
225 | atmel,pins = | ||
226 | <0 17 0x1 0x0 /* PA17 periph A */ | ||
227 | 0 16 0x1 0x1 /* PA16 periph A with pullup */ | ||
228 | 0 15 0x1 0x1>; /* PA15 periph A with pullup */ | ||
229 | }; | ||
230 | |||
231 | pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 { | ||
232 | atmel,pins = | ||
233 | <0 18 0x1 0x1 /* PA18 periph A with pullup */ | ||
234 | 0 19 0x1 0x1 /* PA19 periph A with pullup */ | ||
235 | 0 20 0x1 0x1>; /* PA20 periph A with pullup */ | ||
236 | }; | ||
237 | |||
238 | pinctrl_mmc0_slot0_dat4_7: mmc0_slot0_dat4_7-0 { | ||
239 | atmel,pins = | ||
240 | <0 11 0x2 0x1 /* PA11 periph B with pullup */ | ||
241 | 0 12 0x2 0x1 /* PA12 periph B with pullup */ | ||
242 | 0 13 0x2 0x1 /* PA13 periph B with pullup */ | ||
243 | 0 14 0x2 0x1>; /* PA14 periph B with pullup */ | ||
244 | }; | ||
245 | }; | ||
246 | |||
247 | pioA: gpio@fffff400 { | ||
248 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | ||
249 | reg = <0xfffff400 0x200>; | ||
250 | interrupts = <2 4 1>; | ||
251 | #gpio-cells = <2>; | ||
252 | gpio-controller; | ||
253 | interrupt-controller; | ||
254 | #interrupt-cells = <2>; | ||
255 | }; | ||
256 | |||
257 | pioB: gpio@fffff600 { | ||
258 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | ||
259 | reg = <0xfffff600 0x200>; | ||
260 | interrupts = <2 4 1>; | ||
261 | #gpio-cells = <2>; | ||
262 | gpio-controller; | ||
263 | interrupt-controller; | ||
264 | #interrupt-cells = <2>; | ||
265 | }; | ||
266 | |||
267 | pioC: gpio@fffff800 { | ||
268 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | ||
269 | reg = <0xfffff800 0x200>; | ||
270 | interrupts = <3 4 1>; | ||
271 | #gpio-cells = <2>; | ||
272 | gpio-controller; | ||
273 | interrupt-controller; | ||
274 | #interrupt-cells = <2>; | ||
275 | }; | ||
276 | |||
277 | pioD: gpio@fffffa00 { | ||
278 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | ||
279 | reg = <0xfffffa00 0x200>; | ||
280 | interrupts = <3 4 1>; | ||
281 | #gpio-cells = <2>; | ||
282 | gpio-controller; | ||
283 | interrupt-controller; | ||
284 | #interrupt-cells = <2>; | ||
285 | }; | ||
143 | }; | 286 | }; |
144 | 287 | ||
145 | dbgu: serial@fffff200 { | 288 | dbgu: serial@fffff200 { |
146 | compatible = "atmel,at91sam9260-usart"; | 289 | compatible = "atmel,at91sam9260-usart"; |
147 | reg = <0xfffff200 0x200>; | 290 | reg = <0xfffff200 0x200>; |
148 | interrupts = <1 4 7>; | 291 | interrupts = <1 4 7>; |
292 | pinctrl-names = "default"; | ||
293 | pinctrl-0 = <&pinctrl_dbgu>; | ||
149 | status = "disabled"; | 294 | status = "disabled"; |
150 | }; | 295 | }; |
151 | 296 | ||
@@ -155,6 +300,8 @@ | |||
155 | interrupts = <5 4 5>; | 300 | interrupts = <5 4 5>; |
156 | atmel,use-dma-rx; | 301 | atmel,use-dma-rx; |
157 | atmel,use-dma-tx; | 302 | atmel,use-dma-tx; |
303 | pinctrl-names = "default"; | ||
304 | pinctrl-0 = <&pinctrl_usart0>; | ||
158 | status = "disabled"; | 305 | status = "disabled"; |
159 | }; | 306 | }; |
160 | 307 | ||
@@ -164,6 +311,8 @@ | |||
164 | interrupts = <6 4 5>; | 311 | interrupts = <6 4 5>; |
165 | atmel,use-dma-rx; | 312 | atmel,use-dma-rx; |
166 | atmel,use-dma-tx; | 313 | atmel,use-dma-tx; |
314 | pinctrl-names = "default"; | ||
315 | pinctrl-0 = <&pinctrl_usart1>; | ||
167 | status = "disabled"; | 316 | status = "disabled"; |
168 | }; | 317 | }; |
169 | 318 | ||
@@ -173,6 +322,8 @@ | |||
173 | interrupts = <7 4 5>; | 322 | interrupts = <7 4 5>; |
174 | atmel,use-dma-rx; | 323 | atmel,use-dma-rx; |
175 | atmel,use-dma-tx; | 324 | atmel,use-dma-tx; |
325 | pinctrl-names = "default"; | ||
326 | pinctrl-0 = <&pinctrl_usart2>; | ||
176 | status = "disabled"; | 327 | status = "disabled"; |
177 | }; | 328 | }; |
178 | 329 | ||
@@ -182,6 +333,8 @@ | |||
182 | interrupts = <8 4 5>; | 333 | interrupts = <8 4 5>; |
183 | atmel,use-dma-rx; | 334 | atmel,use-dma-rx; |
184 | atmel,use-dma-tx; | 335 | atmel,use-dma-tx; |
336 | pinctrl-names = "default"; | ||
337 | pinctrl-0 = <&pinctrl_usart3>; | ||
185 | status = "disabled"; | 338 | status = "disabled"; |
186 | }; | 339 | }; |
187 | 340 | ||
@@ -215,6 +368,8 @@ | |||
215 | >; | 368 | >; |
216 | atmel,nand-addr-offset = <21>; | 369 | atmel,nand-addr-offset = <21>; |
217 | atmel,nand-cmd-offset = <22>; | 370 | atmel,nand-cmd-offset = <22>; |
371 | pinctrl-names = "default"; | ||
372 | pinctrl-0 = <&pinctrl_nand>; | ||
218 | gpios = <&pioD 5 0 | 373 | gpios = <&pioD 5 0 |
219 | &pioD 4 0 | 374 | &pioD 4 0 |
220 | 0 | 375 | 0 |
diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts index 912b2c283d6f..0376bf4fd66b 100644 --- a/arch/arm/boot/dts/at91sam9n12ek.dts +++ b/arch/arm/boot/dts/at91sam9n12ek.dts | |||
@@ -45,6 +45,28 @@ | |||
45 | i2c1: i2c@f8014000 { | 45 | i2c1: i2c@f8014000 { |
46 | status = "okay"; | 46 | status = "okay"; |
47 | }; | 47 | }; |
48 | |||
49 | mmc0: mmc@f0008000 { | ||
50 | pinctrl-0 = < | ||
51 | &pinctrl_board_mmc0 | ||
52 | &pinctrl_mmc0_slot0_clk_cmd_dat0 | ||
53 | &pinctrl_mmc0_slot0_dat1_3>; | ||
54 | status = "okay"; | ||
55 | slot@0 { | ||
56 | reg = <0>; | ||
57 | bus-width = <4>; | ||
58 | cd-gpios = <&pioA 7 0>; | ||
59 | }; | ||
60 | }; | ||
61 | |||
62 | pinctrl@fffff400 { | ||
63 | mmc0 { | ||
64 | pinctrl_board_mmc0: mmc0-board { | ||
65 | atmel,pins = | ||
66 | <0 7 0x0 0x5>; /* PA7 gpio CD pin pull up and deglitch */ | ||
67 | }; | ||
68 | }; | ||
69 | }; | ||
48 | }; | 70 | }; |
49 | 71 | ||
50 | nand0: nand@40000000 { | 72 | nand0: nand@40000000 { |
diff --git a/arch/arm/boot/dts/at91sam9x25.dtsi b/arch/arm/boot/dts/at91sam9x25.dtsi new file mode 100644 index 000000000000..54eb33ba6d22 --- /dev/null +++ b/arch/arm/boot/dts/at91sam9x25.dtsi | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * at91sam9x25.dtsi - Device Tree Include file for AT91SAM9X25 SoC | ||
3 | * | ||
4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2. | ||
7 | */ | ||
8 | |||
9 | /include/ "at91sam9x5.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "Atmel AT91SAM9X25 SoC"; | ||
13 | compatible = "atmel, at91sam9x25, atmel,at91sam9x5"; | ||
14 | |||
15 | ahb { | ||
16 | apb { | ||
17 | pinctrl@fffff400 { | ||
18 | atmel,mux-mask = < | ||
19 | /* A B C */ | ||
20 | 0xffffffff 0xffe03fff 0xc000001c /* pioA */ | ||
21 | 0x0007ffff 0x00047e3f 0x00000000 /* pioB */ | ||
22 | 0x80000000 0xfffd0000 0xb83fffff /* pioC */ | ||
23 | 0x003fffff 0x003f8000 0x00000000 /* pioD */ | ||
24 | >; | ||
25 | |||
26 | macb1 { | ||
27 | pinctrl_macb1_rmii: macb1_rmii-0 { | ||
28 | atmel,pins = | ||
29 | <2 16 0x2 0x0 /* PC16 periph B */ | ||
30 | 2 18 0x2 0x0 /* PC18 periph B */ | ||
31 | 2 19 0x2 0x0 /* PC19 periph B */ | ||
32 | 2 20 0x2 0x0 /* PC20 periph B */ | ||
33 | 2 21 0x2 0x0 /* PC21 periph B */ | ||
34 | 2 27 0x2 0x0 /* PC27 periph B */ | ||
35 | 2 28 0x2 0x0 /* PC28 periph B */ | ||
36 | 2 29 0x2 0x0 /* PC29 periph B */ | ||
37 | 2 30 0x2 0x0 /* PC30 periph B */ | ||
38 | 2 31 0x2 0x0>; /* PC31 periph B */ | ||
39 | }; | ||
40 | }; | ||
41 | }; | ||
42 | |||
43 | macb1: ethernet@f8030000 { | ||
44 | pinctrl-names = "default"; | ||
45 | pinctrl-0 = <&pinctrl_macb1_rmii>; | ||
46 | }; | ||
47 | }; | ||
48 | }; | ||
49 | }; | ||
diff --git a/arch/arm/boot/dts/at91sam9x25ek.dts b/arch/arm/boot/dts/at91sam9x25ek.dts new file mode 100644 index 000000000000..af907eaa1f25 --- /dev/null +++ b/arch/arm/boot/dts/at91sam9x25ek.dts | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * at91sam9x25ek.dts - Device Tree file for AT91SAM9X25-EK board | ||
3 | * | ||
4 | * Copyright (C) 2012 Atmel, | ||
5 | * 2012 Nicolas Ferre <nicolas.ferre@atmel.com> | ||
6 | * | ||
7 | * Licensed under GPLv2 or later. | ||
8 | */ | ||
9 | /dts-v1/; | ||
10 | /include/ "at91sam9x25.dtsi" | ||
11 | /include/ "at91sam9x5ek.dtsi" | ||
12 | |||
13 | / { | ||
14 | model = "Atmel AT91SAM9G25-EK"; | ||
15 | compatible = "atmel,at91sam9x25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; | ||
16 | }; | ||
diff --git a/arch/arm/boot/dts/at91sam9x35.dtsi b/arch/arm/boot/dts/at91sam9x35.dtsi new file mode 100644 index 000000000000..fb102d6126ce --- /dev/null +++ b/arch/arm/boot/dts/at91sam9x35.dtsi | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * at91sam9x35.dtsi - Device Tree Include file for AT91SAM9X35 SoC | ||
3 | * | ||
4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2. | ||
7 | */ | ||
8 | |||
9 | /include/ "at91sam9x5.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "Atmel AT91SAM9X35 SoC"; | ||
13 | compatible = "atmel, at91sam9x35, atmel,at91sam9x5"; | ||
14 | |||
15 | ahb { | ||
16 | apb { | ||
17 | pinctrl@fffff400 { | ||
18 | atmel,mux-mask = < | ||
19 | /* A B C */ | ||
20 | 0xffffffff 0xffe03fff 0xc000000c /* pioA */ | ||
21 | 0x000406ff 0x00047e3f 0x00000000 /* pioB */ | ||
22 | 0xfdffffff 0x00000000 0xb83fffff /* pioC */ | ||
23 | 0x003fffff 0x003f8000 0x00000000 /* pioD */ | ||
24 | >; | ||
25 | }; | ||
26 | }; | ||
27 | }; | ||
28 | }; | ||
diff --git a/arch/arm/boot/dts/at91sam9x35ek.dts b/arch/arm/boot/dts/at91sam9x35ek.dts new file mode 100644 index 000000000000..5ccb607b5414 --- /dev/null +++ b/arch/arm/boot/dts/at91sam9x35ek.dts | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * at91sam9x35ek.dts - Device Tree file for AT91SAM9X35-EK board | ||
3 | * | ||
4 | * Copyright (C) 2012 Atmel, | ||
5 | * 2012 Nicolas Ferre <nicolas.ferre@atmel.com> | ||
6 | * | ||
7 | * Licensed under GPLv2 or later. | ||
8 | */ | ||
9 | /dts-v1/; | ||
10 | /include/ "at91sam9x35.dtsi" | ||
11 | /include/ "at91sam9x5ek.dtsi" | ||
12 | |||
13 | / { | ||
14 | model = "Atmel AT91SAM9X35-EK"; | ||
15 | compatible = "atmel,at91sam9x35ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; | ||
16 | }; | ||
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi index 03fc136421c5..7ee49e8daf98 100644 --- a/arch/arm/boot/dts/at91sam9x5.dtsi +++ b/arch/arm/boot/dts/at91sam9x5.dtsi | |||
@@ -111,50 +111,244 @@ | |||
111 | interrupts = <21 4 0>; | 111 | interrupts = <21 4 0>; |
112 | }; | 112 | }; |
113 | 113 | ||
114 | pioA: gpio@fffff400 { | 114 | pinctrl@fffff400 { |
115 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | 115 | #address-cells = <1>; |
116 | reg = <0xfffff400 0x100>; | 116 | #size-cells = <1>; |
117 | interrupts = <2 4 1>; | 117 | compatible = "atmel,at91sam9x5-pinctrl", "atmel,at91rm9200-pinctrl", "simple-bus"; |
118 | #gpio-cells = <2>; | 118 | ranges = <0xfffff400 0xfffff400 0x800>; |
119 | gpio-controller; | 119 | |
120 | interrupt-controller; | 120 | /* shared pinctrl settings */ |
121 | #interrupt-cells = <2>; | 121 | dbgu { |
122 | }; | 122 | pinctrl_dbgu: dbgu-0 { |
123 | atmel,pins = | ||
124 | <0 9 0x1 0x0 /* PA9 periph A */ | ||
125 | 0 10 0x1 0x1>; /* PA10 periph A with pullup */ | ||
126 | }; | ||
127 | }; | ||
123 | 128 | ||
124 | pioB: gpio@fffff600 { | 129 | usart0 { |
125 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | 130 | pinctrl_usart0: usart0-0 { |
126 | reg = <0xfffff600 0x100>; | 131 | atmel,pins = |
127 | interrupts = <2 4 1>; | 132 | <0 0 0x1 0x1 /* PA0 periph A with pullup */ |
128 | #gpio-cells = <2>; | 133 | 0 1 0x1 0x0>; /* PA1 periph A */ |
129 | gpio-controller; | 134 | }; |
130 | interrupt-controller; | 135 | |
131 | #interrupt-cells = <2>; | 136 | pinctrl_usart0_rts: usart0_rts-0 { |
137 | atmel,pins = | ||
138 | <0 2 0x1 0x0>; /* PA2 periph A */ | ||
139 | }; | ||
140 | |||
141 | pinctrl_usart0_cts: usart0_cts-0 { | ||
142 | atmel,pins = | ||
143 | <0 3 0x1 0x0>; /* PA3 periph A */ | ||
144 | }; | ||
145 | }; | ||
146 | |||
147 | usart1 { | ||
148 | pinctrl_usart1: usart1-0 { | ||
149 | atmel,pins = | ||
150 | <0 5 0x1 0x1 /* PA5 periph A with pullup */ | ||
151 | 0 6 0x1 0x0>; /* PA6 periph A */ | ||
152 | }; | ||
153 | |||
154 | pinctrl_usart1_rts: usart1_rts-0 { | ||
155 | atmel,pins = | ||
156 | <3 27 0x3 0x0>; /* PC27 periph C */ | ||
157 | }; | ||
158 | |||
159 | pinctrl_usart1_cts: usart1_cts-0 { | ||
160 | atmel,pins = | ||
161 | <3 28 0x3 0x0>; /* PC28 periph C */ | ||
162 | }; | ||
163 | }; | ||
164 | |||
165 | usart2 { | ||
166 | pinctrl_usart2: usart2-0 { | ||
167 | atmel,pins = | ||
168 | <0 7 0x1 0x1 /* PA7 periph A with pullup */ | ||
169 | 0 8 0x1 0x0>; /* PA8 periph A */ | ||
170 | }; | ||
171 | |||
172 | pinctrl_uart2_rts: uart2_rts-0 { | ||
173 | atmel,pins = | ||
174 | <0 0 0x2 0x0>; /* PB0 periph B */ | ||
175 | }; | ||
176 | |||
177 | pinctrl_uart2_cts: uart2_cts-0 { | ||
178 | atmel,pins = | ||
179 | <0 1 0x2 0x0>; /* PB1 periph B */ | ||
180 | }; | ||
181 | }; | ||
182 | |||
183 | usart3 { | ||
184 | pinctrl_uart3: usart3-0 { | ||
185 | atmel,pins = | ||
186 | <3 23 0x2 0x1 /* PC22 periph B with pullup */ | ||
187 | 3 23 0x2 0x0>; /* PC23 periph B */ | ||
188 | }; | ||
189 | |||
190 | pinctrl_usart3_rts: usart3_rts-0 { | ||
191 | atmel,pins = | ||
192 | <3 24 0x2 0x0>; /* PC24 periph B */ | ||
193 | }; | ||
194 | |||
195 | pinctrl_usart3_cts: usart3_cts-0 { | ||
196 | atmel,pins = | ||
197 | <3 25 0x2 0x0>; /* PC25 periph B */ | ||
198 | }; | ||
199 | }; | ||
200 | |||
201 | uart0 { | ||
202 | pinctrl_uart0: uart0-0 { | ||
203 | atmel,pins = | ||
204 | <3 8 0x3 0x0 /* PC8 periph C */ | ||
205 | 3 9 0x3 0x1>; /* PC9 periph C with pullup */ | ||
206 | }; | ||
207 | }; | ||
208 | |||
209 | uart1 { | ||
210 | pinctrl_uart1: uart1-0 { | ||
211 | atmel,pins = | ||
212 | <3 16 0x3 0x0 /* PC16 periph C */ | ||
213 | 3 17 0x3 0x1>; /* PC17 periph C with pullup */ | ||
214 | }; | ||
215 | }; | ||
216 | |||
217 | nand { | ||
218 | pinctrl_nand: nand-0 { | ||
219 | atmel,pins = | ||
220 | <3 4 0x0 0x1 /* PD5 gpio RDY pin pull_up */ | ||
221 | 3 5 0x0 0x1>; /* PD4 gpio enable pin pull_up */ | ||
222 | }; | ||
223 | }; | ||
224 | |||
225 | macb0 { | ||
226 | pinctrl_macb0_rmii: macb0_rmii-0 { | ||
227 | atmel,pins = | ||
228 | <1 0 0x1 0x0 /* PB0 periph A */ | ||
229 | 1 1 0x1 0x0 /* PB1 periph A */ | ||
230 | 1 2 0x1 0x0 /* PB2 periph A */ | ||
231 | 1 3 0x1 0x0 /* PB3 periph A */ | ||
232 | 1 4 0x1 0x0 /* PB4 periph A */ | ||
233 | 1 5 0x1 0x0 /* PB5 periph A */ | ||
234 | 1 6 0x1 0x0 /* PB6 periph A */ | ||
235 | 1 7 0x1 0x0 /* PB7 periph A */ | ||
236 | 1 9 0x1 0x0 /* PB9 periph A */ | ||
237 | 1 10 0x1 0x0>; /* PB10 periph A */ | ||
238 | }; | ||
239 | |||
240 | pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 { | ||
241 | atmel,pins = | ||
242 | <1 8 0x1 0x0 /* PA8 periph A */ | ||
243 | 1 11 0x1 0x0 /* PA11 periph A */ | ||
244 | 1 12 0x1 0x0 /* PA12 periph A */ | ||
245 | 1 13 0x1 0x0 /* PA13 periph A */ | ||
246 | 1 14 0x1 0x0 /* PA14 periph A */ | ||
247 | 1 15 0x1 0x0 /* PA15 periph A */ | ||
248 | 1 16 0x1 0x0 /* PA16 periph A */ | ||
249 | 1 17 0x1 0x0>; /* PA17 periph A */ | ||
250 | }; | ||
251 | }; | ||
252 | |||
253 | mmc0 { | ||
254 | pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 { | ||
255 | atmel,pins = | ||
256 | <0 17 0x1 0x0 /* PA17 periph A */ | ||
257 | 0 16 0x1 0x1 /* PA16 periph A with pullup */ | ||
258 | 0 15 0x1 0x1>; /* PA15 periph A with pullup */ | ||
259 | }; | ||
260 | |||
261 | pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 { | ||
262 | atmel,pins = | ||
263 | <0 18 0x1 0x1 /* PA18 periph A with pullup */ | ||
264 | 0 19 0x1 0x1 /* PA19 periph A with pullup */ | ||
265 | 0 20 0x1 0x1>; /* PA20 periph A with pullup */ | ||
266 | }; | ||
267 | }; | ||
268 | |||
269 | mmc1 { | ||
270 | pinctrl_mmc1_slot0_clk_cmd_dat0: mmc1_slot0_clk_cmd_dat0-0 { | ||
271 | atmel,pins = | ||
272 | <0 13 0x2 0x0 /* PA13 periph B */ | ||
273 | 0 12 0x2 0x1 /* PA12 periph B with pullup */ | ||
274 | 0 11 0x2 0x1>; /* PA11 periph B with pullup */ | ||
275 | }; | ||
276 | |||
277 | pinctrl_mmc1_slot0_dat1_3: mmc1_slot0_dat1_3-0 { | ||
278 | atmel,pins = | ||
279 | <0 2 0x2 0x1 /* PA2 periph B with pullup */ | ||
280 | 0 3 0x2 0x1 /* PA3 periph B with pullup */ | ||
281 | 0 4 0x2 0x1>; /* PA4 periph B with pullup */ | ||
282 | }; | ||
283 | }; | ||
284 | |||
285 | pioA: gpio@fffff400 { | ||
286 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | ||
287 | reg = <0xfffff400 0x200>; | ||
288 | interrupts = <2 4 1>; | ||
289 | #gpio-cells = <2>; | ||
290 | gpio-controller; | ||
291 | interrupt-controller; | ||
292 | #interrupt-cells = <2>; | ||
293 | }; | ||
294 | |||
295 | pioB: gpio@fffff600 { | ||
296 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | ||
297 | reg = <0xfffff600 0x200>; | ||
298 | interrupts = <2 4 1>; | ||
299 | #gpio-cells = <2>; | ||
300 | gpio-controller; | ||
301 | #gpio-lines = <19>; | ||
302 | interrupt-controller; | ||
303 | #interrupt-cells = <2>; | ||
304 | }; | ||
305 | |||
306 | pioC: gpio@fffff800 { | ||
307 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | ||
308 | reg = <0xfffff800 0x200>; | ||
309 | interrupts = <3 4 1>; | ||
310 | #gpio-cells = <2>; | ||
311 | gpio-controller; | ||
312 | interrupt-controller; | ||
313 | #interrupt-cells = <2>; | ||
314 | }; | ||
315 | |||
316 | pioD: gpio@fffffa00 { | ||
317 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | ||
318 | reg = <0xfffffa00 0x200>; | ||
319 | interrupts = <3 4 1>; | ||
320 | #gpio-cells = <2>; | ||
321 | gpio-controller; | ||
322 | #gpio-lines = <22>; | ||
323 | interrupt-controller; | ||
324 | #interrupt-cells = <2>; | ||
325 | }; | ||
132 | }; | 326 | }; |
133 | 327 | ||
134 | pioC: gpio@fffff800 { | 328 | mmc0: mmc@f0008000 { |
135 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | 329 | compatible = "atmel,hsmci"; |
136 | reg = <0xfffff800 0x100>; | 330 | reg = <0xf0008000 0x600>; |
137 | interrupts = <3 4 1>; | 331 | interrupts = <12 4 0>; |
138 | #gpio-cells = <2>; | 332 | #address-cells = <1>; |
139 | gpio-controller; | 333 | #size-cells = <0>; |
140 | interrupt-controller; | 334 | status = "disabled"; |
141 | #interrupt-cells = <2>; | ||
142 | }; | 335 | }; |
143 | 336 | ||
144 | pioD: gpio@fffffa00 { | 337 | mmc1: mmc@f000c000 { |
145 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | 338 | compatible = "atmel,hsmci"; |
146 | reg = <0xfffffa00 0x100>; | 339 | reg = <0xf000c000 0x600>; |
147 | interrupts = <3 4 1>; | 340 | interrupts = <26 4 0>; |
148 | #gpio-cells = <2>; | 341 | #address-cells = <1>; |
149 | gpio-controller; | 342 | #size-cells = <0>; |
150 | interrupt-controller; | 343 | status = "disabled"; |
151 | #interrupt-cells = <2>; | ||
152 | }; | 344 | }; |
153 | 345 | ||
154 | dbgu: serial@fffff200 { | 346 | dbgu: serial@fffff200 { |
155 | compatible = "atmel,at91sam9260-usart"; | 347 | compatible = "atmel,at91sam9260-usart"; |
156 | reg = <0xfffff200 0x200>; | 348 | reg = <0xfffff200 0x200>; |
157 | interrupts = <1 4 7>; | 349 | interrupts = <1 4 7>; |
350 | pinctrl-names = "default"; | ||
351 | pinctrl-0 = <&pinctrl_dbgu>; | ||
158 | status = "disabled"; | 352 | status = "disabled"; |
159 | }; | 353 | }; |
160 | 354 | ||
@@ -164,6 +358,8 @@ | |||
164 | interrupts = <5 4 5>; | 358 | interrupts = <5 4 5>; |
165 | atmel,use-dma-rx; | 359 | atmel,use-dma-rx; |
166 | atmel,use-dma-tx; | 360 | atmel,use-dma-tx; |
361 | pinctrl-names = "default"; | ||
362 | pinctrl-0 = <&pinctrl_usart0>; | ||
167 | status = "disabled"; | 363 | status = "disabled"; |
168 | }; | 364 | }; |
169 | 365 | ||
@@ -173,6 +369,8 @@ | |||
173 | interrupts = <6 4 5>; | 369 | interrupts = <6 4 5>; |
174 | atmel,use-dma-rx; | 370 | atmel,use-dma-rx; |
175 | atmel,use-dma-tx; | 371 | atmel,use-dma-tx; |
372 | pinctrl-names = "default"; | ||
373 | pinctrl-0 = <&pinctrl_usart1>; | ||
176 | status = "disabled"; | 374 | status = "disabled"; |
177 | }; | 375 | }; |
178 | 376 | ||
@@ -182,6 +380,8 @@ | |||
182 | interrupts = <7 4 5>; | 380 | interrupts = <7 4 5>; |
183 | atmel,use-dma-rx; | 381 | atmel,use-dma-rx; |
184 | atmel,use-dma-tx; | 382 | atmel,use-dma-tx; |
383 | pinctrl-names = "default"; | ||
384 | pinctrl-0 = <&pinctrl_usart2>; | ||
185 | status = "disabled"; | 385 | status = "disabled"; |
186 | }; | 386 | }; |
187 | 387 | ||
@@ -189,6 +389,8 @@ | |||
189 | compatible = "cdns,at32ap7000-macb", "cdns,macb"; | 389 | compatible = "cdns,at32ap7000-macb", "cdns,macb"; |
190 | reg = <0xf802c000 0x100>; | 390 | reg = <0xf802c000 0x100>; |
191 | interrupts = <24 4 3>; | 391 | interrupts = <24 4 3>; |
392 | pinctrl-names = "default"; | ||
393 | pinctrl-0 = <&pinctrl_macb0_rmii>; | ||
192 | status = "disabled"; | 394 | status = "disabled"; |
193 | }; | 395 | }; |
194 | 396 | ||
@@ -273,6 +475,8 @@ | |||
273 | >; | 475 | >; |
274 | atmel,nand-addr-offset = <21>; | 476 | atmel,nand-addr-offset = <21>; |
275 | atmel,nand-cmd-offset = <22>; | 477 | atmel,nand-cmd-offset = <22>; |
478 | pinctrl-names = "default"; | ||
479 | pinctrl-0 = <&pinctrl_nand>; | ||
276 | gpios = <&pioD 5 0 | 480 | gpios = <&pioD 5 0 |
277 | &pioD 4 0 | 481 | &pioD 4 0 |
278 | 0 | 482 | 0 |
diff --git a/arch/arm/boot/dts/at91sam9x5ek.dtsi b/arch/arm/boot/dts/at91sam9x5ek.dtsi new file mode 100644 index 000000000000..8a7cf1d9cf5d --- /dev/null +++ b/arch/arm/boot/dts/at91sam9x5ek.dtsi | |||
@@ -0,0 +1,101 @@ | |||
1 | /* | ||
2 | * at91sam9x5ek.dtsi - Device Tree file for AT91SAM9x5CM Base board | ||
3 | * | ||
4 | * Copyright (C) 2012 Atmel, | ||
5 | * 2012 Nicolas Ferre <nicolas.ferre@atmel.com> | ||
6 | * | ||
7 | * Licensed under GPLv2 or later. | ||
8 | */ | ||
9 | /include/ "at91sam9x5cm.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "Atmel AT91SAM9X5-EK"; | ||
13 | compatible = "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "128M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs"; | ||
17 | }; | ||
18 | |||
19 | ahb { | ||
20 | apb { | ||
21 | mmc0: mmc@f0008000 { | ||
22 | pinctrl-0 = < | ||
23 | &pinctrl_board_mmc0 | ||
24 | &pinctrl_mmc0_slot0_clk_cmd_dat0 | ||
25 | &pinctrl_mmc0_slot0_dat1_3>; | ||
26 | status = "okay"; | ||
27 | slot@0 { | ||
28 | reg = <0>; | ||
29 | bus-width = <4>; | ||
30 | cd-gpios = <&pioD 15 0>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | mmc1: mmc@f000c000 { | ||
35 | pinctrl-0 = < | ||
36 | &pinctrl_board_mmc1 | ||
37 | &pinctrl_mmc1_slot0_clk_cmd_dat0 | ||
38 | &pinctrl_mmc1_slot0_dat1_3>; | ||
39 | status = "okay"; | ||
40 | slot@0 { | ||
41 | reg = <0>; | ||
42 | bus-width = <4>; | ||
43 | cd-gpios = <&pioD 14 0>; | ||
44 | }; | ||
45 | }; | ||
46 | |||
47 | dbgu: serial@fffff200 { | ||
48 | status = "okay"; | ||
49 | }; | ||
50 | |||
51 | usart0: serial@f801c000 { | ||
52 | status = "okay"; | ||
53 | }; | ||
54 | |||
55 | macb0: ethernet@f802c000 { | ||
56 | phy-mode = "rmii"; | ||
57 | status = "okay"; | ||
58 | }; | ||
59 | |||
60 | i2c0: i2c@f8010000 { | ||
61 | status = "okay"; | ||
62 | }; | ||
63 | |||
64 | i2c1: i2c@f8014000 { | ||
65 | status = "okay"; | ||
66 | }; | ||
67 | |||
68 | i2c2: i2c@f8018000 { | ||
69 | status = "okay"; | ||
70 | }; | ||
71 | |||
72 | pinctrl@fffff400 { | ||
73 | mmc0 { | ||
74 | pinctrl_board_mmc0: mmc0-board { | ||
75 | atmel,pins = | ||
76 | <3 15 0x0 0x5>; /* PD15 gpio CD pin pull up and deglitch */ | ||
77 | }; | ||
78 | }; | ||
79 | |||
80 | mmc1 { | ||
81 | pinctrl_board_mmc1: mmc1-board { | ||
82 | atmel,pins = | ||
83 | <3 14 0x0 0x5>; /* PD14 gpio CD pin pull up and deglitch */ | ||
84 | }; | ||
85 | }; | ||
86 | }; | ||
87 | }; | ||
88 | |||
89 | usb0: ohci@00600000 { | ||
90 | status = "okay"; | ||
91 | num-ports = <2>; | ||
92 | atmel,vbus-gpio = <&pioD 19 1 | ||
93 | &pioD 20 1 | ||
94 | >; | ||
95 | }; | ||
96 | |||
97 | usb1: ehci@00700000 { | ||
98 | status = "okay"; | ||
99 | }; | ||
100 | }; | ||
101 | }; | ||
diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi index 4b0e0ca08f40..731086b2fca2 100644 --- a/arch/arm/boot/dts/dbx5x0.dtsi +++ b/arch/arm/boot/dts/dbx5x0.dtsi | |||
@@ -203,6 +203,14 @@ | |||
203 | reg = <0x80157450 0xC>; | 203 | reg = <0x80157450 0xC>; |
204 | }; | 204 | }; |
205 | 205 | ||
206 | thermal@801573c0 { | ||
207 | compatible = "stericsson,db8500-thermal"; | ||
208 | reg = <0x801573c0 0x40>; | ||
209 | interrupts = <21 0x4>, <22 0x4>; | ||
210 | interrupt-names = "IRQ_HOTMON_LOW", "IRQ_HOTMON_HIGH"; | ||
211 | status = "disabled"; | ||
212 | }; | ||
213 | |||
206 | db8500-prcmu-regulators { | 214 | db8500-prcmu-regulators { |
207 | compatible = "stericsson,db8500-prcmu-regulator"; | 215 | compatible = "stericsson,db8500-prcmu-regulator"; |
208 | 216 | ||
@@ -660,5 +668,11 @@ | |||
660 | ranges = <0 0x50000000 0x4000000>; | 668 | ranges = <0 0x50000000 0x4000000>; |
661 | status = "disabled"; | 669 | status = "disabled"; |
662 | }; | 670 | }; |
671 | |||
672 | cpufreq-cooling { | ||
673 | compatible = "stericsson,db8500-cpufreq-cooling"; | ||
674 | status = "disabled"; | ||
675 | }; | ||
676 | |||
663 | }; | 677 | }; |
664 | }; | 678 | }; |
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index 55c57ea6169e..b4587b27ae42 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi | |||
@@ -799,6 +799,7 @@ | |||
799 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; | 799 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; |
800 | reg = <0x8006a000 0x2000>; | 800 | reg = <0x8006a000 0x2000>; |
801 | interrupts = <112 70 71>; | 801 | interrupts = <112 70 71>; |
802 | fsl,auart-dma-channel = <8 9>; | ||
802 | clocks = <&clks 45>; | 803 | clocks = <&clks 45>; |
803 | status = "disabled"; | 804 | status = "disabled"; |
804 | }; | 805 | }; |
diff --git a/arch/arm/boot/dts/pm9g45.dts b/arch/arm/boot/dts/pm9g45.dts new file mode 100644 index 000000000000..387fedb58988 --- /dev/null +++ b/arch/arm/boot/dts/pm9g45.dts | |||
@@ -0,0 +1,165 @@ | |||
1 | /* | ||
2 | * pm9g45.dts - Device Tree file for Ronetix pm9g45 board | ||
3 | * | ||
4 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | ||
6 | * Licensed under GPLv2. | ||
7 | */ | ||
8 | /dts-v1/; | ||
9 | /include/ "at91sam9g45.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "Ronetix pm9g45"; | ||
13 | compatible = "ronetix,pm9g45", "atmel,at91sam9g45", "atmel,at91sam9"; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "console=ttyS0,115200"; | ||
17 | }; | ||
18 | |||
19 | memory { | ||
20 | reg = <0x70000000 0x8000000>; | ||
21 | }; | ||
22 | |||
23 | clocks { | ||
24 | #address-cells = <1>; | ||
25 | #size-cells = <1>; | ||
26 | ranges; | ||
27 | |||
28 | main_clock: clock@0 { | ||
29 | compatible = "atmel,osc", "fixed-clock"; | ||
30 | clock-frequency = <12000000>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | ahb { | ||
35 | apb { | ||
36 | dbgu: serial@ffffee00 { | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | |||
40 | pinctrl@fffff200 { | ||
41 | |||
42 | board { | ||
43 | pinctrl_board_nand: nand0-board { | ||
44 | atmel,pins = | ||
45 | <3 3 0x0 0x1 /* PD3 gpio RDY pin pull_up*/ | ||
46 | 2 14 0x0 0x1>; /* PC14 gpio enable pin pull_up */ | ||
47 | }; | ||
48 | }; | ||
49 | |||
50 | mmc { | ||
51 | pinctrl_board_mmc: mmc0-board { | ||
52 | atmel,pins = | ||
53 | <3 6 0x0 0x5>; /* PD6 gpio CD pin pull_up and deglitch */ | ||
54 | }; | ||
55 | }; | ||
56 | }; | ||
57 | |||
58 | mmc0: mmc@fff80000 { | ||
59 | pinctrl-0 = < | ||
60 | &pinctrl_board_mmc | ||
61 | &pinctrl_mmc0_slot0_clk_cmd_dat0 | ||
62 | &pinctrl_mmc0_slot0_dat1_3>; | ||
63 | status = "okay"; | ||
64 | slot@0 { | ||
65 | reg = <0>; | ||
66 | bus-width = <4>; | ||
67 | cd-gpios = <&pioD 6 0>; | ||
68 | }; | ||
69 | }; | ||
70 | |||
71 | macb0: ethernet@fffbc000 { | ||
72 | phy-mode = "rmii"; | ||
73 | status = "okay"; | ||
74 | }; | ||
75 | |||
76 | }; | ||
77 | |||
78 | nand0: nand@40000000 { | ||
79 | nand-bus-width = <8>; | ||
80 | nand-ecc-mode = "soft"; | ||
81 | nand-on-flash-bbt; | ||
82 | pinctrl-0 = <&pinctrl_board_nand>; | ||
83 | |||
84 | gpios = <&pioD 3 0 | ||
85 | &pioC 14 0 | ||
86 | 0 | ||
87 | >; | ||
88 | |||
89 | status = "okay"; | ||
90 | |||
91 | at91bootstrap@0 { | ||
92 | label = "at91bootstrap"; | ||
93 | reg = <0x0 0x20000>; | ||
94 | }; | ||
95 | |||
96 | barebox@20000 { | ||
97 | label = "barebox"; | ||
98 | reg = <0x20000 0x40000>; | ||
99 | }; | ||
100 | |||
101 | bareboxenv@60000 { | ||
102 | label = "bareboxenv"; | ||
103 | reg = <0x60000 0x1A0000>; | ||
104 | }; | ||
105 | |||
106 | kernel@200000 { | ||
107 | label = "bareboxenv2"; | ||
108 | reg = <0x200000 0x300000>; | ||
109 | }; | ||
110 | |||
111 | kernel@500000 { | ||
112 | label = "root"; | ||
113 | reg = <0x500000 0x400000>; | ||
114 | }; | ||
115 | |||
116 | data@900000 { | ||
117 | label = "data"; | ||
118 | reg = <0x900000 0x8340000>; | ||
119 | }; | ||
120 | }; | ||
121 | |||
122 | usb0: ohci@00700000 { | ||
123 | status = "okay"; | ||
124 | num-ports = <2>; | ||
125 | }; | ||
126 | |||
127 | usb1: ehci@00800000 { | ||
128 | status = "okay"; | ||
129 | }; | ||
130 | }; | ||
131 | |||
132 | leds { | ||
133 | compatible = "gpio-leds"; | ||
134 | |||
135 | led0 { | ||
136 | label = "led0"; | ||
137 | gpios = <&pioD 0 1>; | ||
138 | linux,default-trigger = "nand-disk"; | ||
139 | }; | ||
140 | |||
141 | led1 { | ||
142 | label = "led1"; | ||
143 | gpios = <&pioD 31 0>; | ||
144 | linux,default-trigger = "heartbeat"; | ||
145 | }; | ||
146 | }; | ||
147 | |||
148 | gpio_keys { | ||
149 | compatible = "gpio-keys"; | ||
150 | #address-cells = <1>; | ||
151 | #size-cells = <0>; | ||
152 | |||
153 | right { | ||
154 | label = "SW4"; | ||
155 | gpios = <&pioE 7 1>; | ||
156 | linux,code = <106>; | ||
157 | }; | ||
158 | |||
159 | up { | ||
160 | label = "SW3"; | ||
161 | gpios = <&pioE 8 1>; | ||
162 | linux,code = <103>; | ||
163 | }; | ||
164 | }; | ||
165 | }; | ||
diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts index 702c0baa6004..c6f85f0bc531 100644 --- a/arch/arm/boot/dts/snowball.dts +++ b/arch/arm/boot/dts/snowball.dts | |||
@@ -99,6 +99,33 @@ | |||
99 | status = "okay"; | 99 | status = "okay"; |
100 | }; | 100 | }; |
101 | 101 | ||
102 | prcmu@80157000 { | ||
103 | thermal@801573c0 { | ||
104 | num-trips = <4>; | ||
105 | |||
106 | trip0-temp = <70000>; | ||
107 | trip0-type = "active"; | ||
108 | trip0-cdev-num = <1>; | ||
109 | trip0-cdev-name0 = "thermal-cpufreq-0"; | ||
110 | |||
111 | trip1-temp = <75000>; | ||
112 | trip1-type = "active"; | ||
113 | trip1-cdev-num = <1>; | ||
114 | trip1-cdev-name0 = "thermal-cpufreq-0"; | ||
115 | |||
116 | trip2-temp = <80000>; | ||
117 | trip2-type = "active"; | ||
118 | trip2-cdev-num = <1>; | ||
119 | trip2-cdev-name0 = "thermal-cpufreq-0"; | ||
120 | |||
121 | trip3-temp = <85000>; | ||
122 | trip3-type = "critical"; | ||
123 | trip3-cdev-num = <0>; | ||
124 | |||
125 | status = "okay"; | ||
126 | }; | ||
127 | }; | ||
128 | |||
102 | external-bus@50000000 { | 129 | external-bus@50000000 { |
103 | status = "okay"; | 130 | status = "okay"; |
104 | 131 | ||
@@ -183,5 +210,9 @@ | |||
183 | reg = <0x33>; | 210 | reg = <0x33>; |
184 | }; | 211 | }; |
185 | }; | 212 | }; |
213 | |||
214 | cpufreq-cooling { | ||
215 | status = "okay"; | ||
216 | }; | ||
186 | }; | 217 | }; |
187 | }; | 218 | }; |
diff --git a/arch/arm/boot/dts/spear1310-evb.dts b/arch/arm/boot/dts/spear1310-evb.dts index dd4358bc26e2..2e4c5727468e 100644 --- a/arch/arm/boot/dts/spear1310-evb.dts +++ b/arch/arm/boot/dts/spear1310-evb.dts | |||
@@ -181,6 +181,10 @@ | |||
181 | status = "okay"; | 181 | status = "okay"; |
182 | }; | 182 | }; |
183 | 183 | ||
184 | gpio@d8400000 { | ||
185 | status = "okay"; | ||
186 | }; | ||
187 | |||
184 | i2c0: i2c@e0280000 { | 188 | i2c0: i2c@e0280000 { |
185 | status = "okay"; | 189 | status = "okay"; |
186 | }; | 190 | }; |
diff --git a/arch/arm/boot/dts/spear1310.dtsi b/arch/arm/boot/dts/spear1310.dtsi index 419ea7413d23..7cd25eb4f8e0 100644 --- a/arch/arm/boot/dts/spear1310.dtsi +++ b/arch/arm/boot/dts/spear1310.dtsi | |||
@@ -70,6 +70,12 @@ | |||
70 | status = "disabled"; | 70 | status = "disabled"; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | pinmux: pinmux@e0700000 { | ||
74 | compatible = "st,spear1310-pinmux"; | ||
75 | reg = <0xe0700000 0x1000>; | ||
76 | #gpio-range-cells = <2>; | ||
77 | }; | ||
78 | |||
73 | spi1: spi@5d400000 { | 79 | spi1: spi@5d400000 { |
74 | compatible = "arm,pl022", "arm,primecell"; | 80 | compatible = "arm,pl022", "arm,primecell"; |
75 | reg = <0x5d400000 0x1000>; | 81 | reg = <0x5d400000 0x1000>; |
@@ -179,6 +185,27 @@ | |||
179 | thermal@e07008c4 { | 185 | thermal@e07008c4 { |
180 | st,thermal-flags = <0x7000>; | 186 | st,thermal-flags = <0x7000>; |
181 | }; | 187 | }; |
188 | |||
189 | gpiopinctrl: gpio@d8400000 { | ||
190 | compatible = "st,spear-plgpio"; | ||
191 | reg = <0xd8400000 0x1000>; | ||
192 | interrupts = <0 100 0x4>; | ||
193 | #interrupt-cells = <1>; | ||
194 | interrupt-controller; | ||
195 | gpio-controller; | ||
196 | #gpio-cells = <2>; | ||
197 | gpio-ranges = <&pinmux 0 246>; | ||
198 | status = "disabled"; | ||
199 | |||
200 | st-plgpio,ngpio = <246>; | ||
201 | st-plgpio,enb-reg = <0xd0>; | ||
202 | st-plgpio,wdata-reg = <0x90>; | ||
203 | st-plgpio,dir-reg = <0xb0>; | ||
204 | st-plgpio,ie-reg = <0x30>; | ||
205 | st-plgpio,rdata-reg = <0x70>; | ||
206 | st-plgpio,mis-reg = <0x10>; | ||
207 | st-plgpio,eit-reg = <0x50>; | ||
208 | }; | ||
182 | }; | 209 | }; |
183 | }; | 210 | }; |
184 | }; | 211 | }; |
diff --git a/arch/arm/boot/dts/spear1340-evb.dts b/arch/arm/boot/dts/spear1340-evb.dts index c9a54e06fb68..045f7123ffac 100644 --- a/arch/arm/boot/dts/spear1340-evb.dts +++ b/arch/arm/boot/dts/spear1340-evb.dts | |||
@@ -193,6 +193,10 @@ | |||
193 | status = "okay"; | 193 | status = "okay"; |
194 | }; | 194 | }; |
195 | 195 | ||
196 | gpio@e2800000 { | ||
197 | status = "okay"; | ||
198 | }; | ||
199 | |||
196 | i2c0: i2c@e0280000 { | 200 | i2c0: i2c@e0280000 { |
197 | status = "okay"; | 201 | status = "okay"; |
198 | }; | 202 | }; |
diff --git a/arch/arm/boot/dts/spear1340.dtsi b/arch/arm/boot/dts/spear1340.dtsi index d71fe2a68f09..6c09eb0a1b2b 100644 --- a/arch/arm/boot/dts/spear1340.dtsi +++ b/arch/arm/boot/dts/spear1340.dtsi | |||
@@ -24,6 +24,12 @@ | |||
24 | status = "disabled"; | 24 | status = "disabled"; |
25 | }; | 25 | }; |
26 | 26 | ||
27 | pinmux: pinmux@e0700000 { | ||
28 | compatible = "st,spear1340-pinmux"; | ||
29 | reg = <0xe0700000 0x1000>; | ||
30 | #gpio-range-cells = <2>; | ||
31 | }; | ||
32 | |||
27 | spi1: spi@5d400000 { | 33 | spi1: spi@5d400000 { |
28 | compatible = "arm,pl022", "arm,primecell"; | 34 | compatible = "arm,pl022", "arm,primecell"; |
29 | reg = <0x5d400000 0x1000>; | 35 | reg = <0x5d400000 0x1000>; |
@@ -51,6 +57,26 @@ | |||
51 | thermal@e07008c4 { | 57 | thermal@e07008c4 { |
52 | st,thermal-flags = <0x2a00>; | 58 | st,thermal-flags = <0x2a00>; |
53 | }; | 59 | }; |
60 | |||
61 | gpiopinctrl: gpio@e2800000 { | ||
62 | compatible = "st,spear-plgpio"; | ||
63 | reg = <0xe2800000 0x1000>; | ||
64 | interrupts = <0 107 0x4>; | ||
65 | #interrupt-cells = <1>; | ||
66 | interrupt-controller; | ||
67 | gpio-controller; | ||
68 | #gpio-cells = <2>; | ||
69 | gpio-ranges = <&pinmux 0 252>; | ||
70 | status = "disabled"; | ||
71 | |||
72 | st-plgpio,ngpio = <250>; | ||
73 | st-plgpio,wdata-reg = <0x40>; | ||
74 | st-plgpio,dir-reg = <0x00>; | ||
75 | st-plgpio,ie-reg = <0x80>; | ||
76 | st-plgpio,rdata-reg = <0x20>; | ||
77 | st-plgpio,mis-reg = <0xa0>; | ||
78 | st-plgpio,eit-reg = <0x60>; | ||
79 | }; | ||
54 | }; | 80 | }; |
55 | }; | 81 | }; |
56 | }; | 82 | }; |
diff --git a/arch/arm/boot/dts/spear310.dtsi b/arch/arm/boot/dts/spear310.dtsi index 62fc4fb3e5f9..930303e48df9 100644 --- a/arch/arm/boot/dts/spear310.dtsi +++ b/arch/arm/boot/dts/spear310.dtsi | |||
@@ -22,9 +22,10 @@ | |||
22 | 0xb0000000 0xb0000000 0x10000000 | 22 | 0xb0000000 0xb0000000 0x10000000 |
23 | 0xd0000000 0xd0000000 0x30000000>; | 23 | 0xd0000000 0xd0000000 0x30000000>; |
24 | 24 | ||
25 | pinmux@b4000000 { | 25 | pinmux: pinmux@b4000000 { |
26 | compatible = "st,spear310-pinmux"; | 26 | compatible = "st,spear310-pinmux"; |
27 | reg = <0xb4000000 0x1000>; | 27 | reg = <0xb4000000 0x1000>; |
28 | #gpio-range-cells = <2>; | ||
28 | }; | 29 | }; |
29 | 30 | ||
30 | fsmc: flash@44000000 { | 31 | fsmc: flash@44000000 { |
@@ -75,6 +76,25 @@ | |||
75 | reg = <0xb2200000 0x1000>; | 76 | reg = <0xb2200000 0x1000>; |
76 | status = "disabled"; | 77 | status = "disabled"; |
77 | }; | 78 | }; |
79 | |||
80 | gpiopinctrl: gpio@b4000000 { | ||
81 | compatible = "st,spear-plgpio"; | ||
82 | reg = <0xb4000000 0x1000>; | ||
83 | #interrupt-cells = <1>; | ||
84 | interrupt-controller; | ||
85 | gpio-controller; | ||
86 | #gpio-cells = <2>; | ||
87 | gpio-ranges = <&pinmux 0 102>; | ||
88 | status = "disabled"; | ||
89 | |||
90 | st-plgpio,ngpio = <102>; | ||
91 | st-plgpio,enb-reg = <0x10>; | ||
92 | st-plgpio,wdata-reg = <0x20>; | ||
93 | st-plgpio,dir-reg = <0x30>; | ||
94 | st-plgpio,ie-reg = <0x50>; | ||
95 | st-plgpio,rdata-reg = <0x40>; | ||
96 | st-plgpio,mis-reg = <0x60>; | ||
97 | }; | ||
78 | }; | 98 | }; |
79 | }; | 99 | }; |
80 | }; | 100 | }; |
diff --git a/arch/arm/boot/dts/spear320-evb.dts b/arch/arm/boot/dts/spear320-evb.dts index 082328bd64ab..ad4bfc68ee05 100644 --- a/arch/arm/boot/dts/spear320-evb.dts +++ b/arch/arm/boot/dts/spear320-evb.dts | |||
@@ -164,6 +164,10 @@ | |||
164 | status = "okay"; | 164 | status = "okay"; |
165 | }; | 165 | }; |
166 | 166 | ||
167 | gpio@b3000000 { | ||
168 | status = "okay"; | ||
169 | }; | ||
170 | |||
167 | i2c0: i2c@d0180000 { | 171 | i2c0: i2c@d0180000 { |
168 | status = "okay"; | 172 | status = "okay"; |
169 | }; | 173 | }; |
diff --git a/arch/arm/boot/dts/spear320.dtsi b/arch/arm/boot/dts/spear320.dtsi index 1f49d69595a0..67d7ada71275 100644 --- a/arch/arm/boot/dts/spear320.dtsi +++ b/arch/arm/boot/dts/spear320.dtsi | |||
@@ -21,9 +21,10 @@ | |||
21 | ranges = <0x40000000 0x40000000 0x80000000 | 21 | ranges = <0x40000000 0x40000000 0x80000000 |
22 | 0xd0000000 0xd0000000 0x30000000>; | 22 | 0xd0000000 0xd0000000 0x30000000>; |
23 | 23 | ||
24 | pinmux@b3000000 { | 24 | pinmux: pinmux@b3000000 { |
25 | compatible = "st,spear320-pinmux"; | 25 | compatible = "st,spear320-pinmux"; |
26 | reg = <0xb3000000 0x1000>; | 26 | reg = <0xb3000000 0x1000>; |
27 | #gpio-range-cells = <2>; | ||
27 | }; | 28 | }; |
28 | 29 | ||
29 | clcd@90000000 { | 30 | clcd@90000000 { |
@@ -90,6 +91,26 @@ | |||
90 | reg = <0xa4000000 0x1000>; | 91 | reg = <0xa4000000 0x1000>; |
91 | status = "disabled"; | 92 | status = "disabled"; |
92 | }; | 93 | }; |
94 | |||
95 | gpiopinctrl: gpio@b3000000 { | ||
96 | compatible = "st,spear-plgpio"; | ||
97 | reg = <0xb3000000 0x1000>; | ||
98 | #interrupt-cells = <1>; | ||
99 | interrupt-controller; | ||
100 | gpio-controller; | ||
101 | #gpio-cells = <2>; | ||
102 | gpio-ranges = <&pinmux 0 102>; | ||
103 | status = "disabled"; | ||
104 | |||
105 | st-plgpio,ngpio = <102>; | ||
106 | st-plgpio,enb-reg = <0x24>; | ||
107 | st-plgpio,wdata-reg = <0x34>; | ||
108 | st-plgpio,dir-reg = <0x44>; | ||
109 | st-plgpio,ie-reg = <0x64>; | ||
110 | st-plgpio,rdata-reg = <0x54>; | ||
111 | st-plgpio,mis-reg = <0x84>; | ||
112 | st-plgpio,eit-reg = <0x94>; | ||
113 | }; | ||
93 | }; | 114 | }; |
94 | }; | 115 | }; |
95 | }; | 116 | }; |
diff --git a/arch/arm/boot/dts/tegra20-seaboard.dts b/arch/arm/boot/dts/tegra20-seaboard.dts index 33ae81358d8e..e58a0e60f711 100644 --- a/arch/arm/boot/dts/tegra20-seaboard.dts +++ b/arch/arm/boot/dts/tegra20-seaboard.dts | |||
@@ -492,12 +492,12 @@ | |||
492 | }; | 492 | }; |
493 | 493 | ||
494 | temperature-sensor@4c { | 494 | temperature-sensor@4c { |
495 | compatible = "nct1008"; | 495 | compatible = "onnn,nct1008"; |
496 | reg = <0x4c>; | 496 | reg = <0x4c>; |
497 | }; | 497 | }; |
498 | 498 | ||
499 | magnetometer@c { | 499 | magnetometer@c { |
500 | compatible = "ak8975"; | 500 | compatible = "ak,ak8975"; |
501 | reg = <0xc>; | 501 | reg = <0xc>; |
502 | interrupt-parent = <&gpio>; | 502 | interrupt-parent = <&gpio>; |
503 | interrupts = <109 0x04>; /* gpio PN5 */ | 503 | interrupts = <109 0x04>; /* gpio PN5 */ |
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index aa5269984187..36ae03a3f5d1 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -70,6 +70,14 @@ struct gic_chip_data { | |||
70 | static DEFINE_RAW_SPINLOCK(irq_controller_lock); | 70 | static DEFINE_RAW_SPINLOCK(irq_controller_lock); |
71 | 71 | ||
72 | /* | 72 | /* |
73 | * The GIC mapping of CPU interfaces does not necessarily match | ||
74 | * the logical CPU numbering. Let's use a mapping as returned | ||
75 | * by the GIC itself. | ||
76 | */ | ||
77 | #define NR_GIC_CPU_IF 8 | ||
78 | static u8 gic_cpu_map[NR_GIC_CPU_IF] __read_mostly; | ||
79 | |||
80 | /* | ||
73 | * Supported arch specific GIC irq extension. | 81 | * Supported arch specific GIC irq extension. |
74 | * Default make them NULL. | 82 | * Default make them NULL. |
75 | */ | 83 | */ |
@@ -238,11 +246,11 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val, | |||
238 | unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask); | 246 | unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask); |
239 | u32 val, mask, bit; | 247 | u32 val, mask, bit; |
240 | 248 | ||
241 | if (cpu >= 8 || cpu >= nr_cpu_ids) | 249 | if (cpu >= NR_GIC_CPU_IF || cpu >= nr_cpu_ids) |
242 | return -EINVAL; | 250 | return -EINVAL; |
243 | 251 | ||
244 | mask = 0xff << shift; | 252 | mask = 0xff << shift; |
245 | bit = 1 << (cpu_logical_map(cpu) + shift); | 253 | bit = gic_cpu_map[cpu] << shift; |
246 | 254 | ||
247 | raw_spin_lock(&irq_controller_lock); | 255 | raw_spin_lock(&irq_controller_lock); |
248 | val = readl_relaxed(reg) & ~mask; | 256 | val = readl_relaxed(reg) & ~mask; |
@@ -349,11 +357,6 @@ static void __init gic_dist_init(struct gic_chip_data *gic) | |||
349 | u32 cpumask; | 357 | u32 cpumask; |
350 | unsigned int gic_irqs = gic->gic_irqs; | 358 | unsigned int gic_irqs = gic->gic_irqs; |
351 | void __iomem *base = gic_data_dist_base(gic); | 359 | void __iomem *base = gic_data_dist_base(gic); |
352 | u32 cpu = cpu_logical_map(smp_processor_id()); | ||
353 | |||
354 | cpumask = 1 << cpu; | ||
355 | cpumask |= cpumask << 8; | ||
356 | cpumask |= cpumask << 16; | ||
357 | 360 | ||
358 | writel_relaxed(0, base + GIC_DIST_CTRL); | 361 | writel_relaxed(0, base + GIC_DIST_CTRL); |
359 | 362 | ||
@@ -366,6 +369,7 @@ static void __init gic_dist_init(struct gic_chip_data *gic) | |||
366 | /* | 369 | /* |
367 | * Set all global interrupts to this CPU only. | 370 | * Set all global interrupts to this CPU only. |
368 | */ | 371 | */ |
372 | cpumask = readl_relaxed(base + GIC_DIST_TARGET + 0); | ||
369 | for (i = 32; i < gic_irqs; i += 4) | 373 | for (i = 32; i < gic_irqs; i += 4) |
370 | writel_relaxed(cpumask, base + GIC_DIST_TARGET + i * 4 / 4); | 374 | writel_relaxed(cpumask, base + GIC_DIST_TARGET + i * 4 / 4); |
371 | 375 | ||
@@ -389,9 +393,25 @@ static void __cpuinit gic_cpu_init(struct gic_chip_data *gic) | |||
389 | { | 393 | { |
390 | void __iomem *dist_base = gic_data_dist_base(gic); | 394 | void __iomem *dist_base = gic_data_dist_base(gic); |
391 | void __iomem *base = gic_data_cpu_base(gic); | 395 | void __iomem *base = gic_data_cpu_base(gic); |
396 | unsigned int cpu_mask, cpu = smp_processor_id(); | ||
392 | int i; | 397 | int i; |
393 | 398 | ||
394 | /* | 399 | /* |
400 | * Get what the GIC says our CPU mask is. | ||
401 | */ | ||
402 | BUG_ON(cpu >= NR_GIC_CPU_IF); | ||
403 | cpu_mask = readl_relaxed(dist_base + GIC_DIST_TARGET + 0); | ||
404 | gic_cpu_map[cpu] = cpu_mask; | ||
405 | |||
406 | /* | ||
407 | * Clear our mask from the other map entries in case they're | ||
408 | * still undefined. | ||
409 | */ | ||
410 | for (i = 0; i < NR_GIC_CPU_IF; i++) | ||
411 | if (i != cpu) | ||
412 | gic_cpu_map[i] &= ~cpu_mask; | ||
413 | |||
414 | /* | ||
395 | * Deal with the banked PPI and SGI interrupts - disable all | 415 | * Deal with the banked PPI and SGI interrupts - disable all |
396 | * PPI interrupts, ensure all SGI interrupts are enabled. | 416 | * PPI interrupts, ensure all SGI interrupts are enabled. |
397 | */ | 417 | */ |
@@ -646,7 +666,7 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start, | |||
646 | { | 666 | { |
647 | irq_hw_number_t hwirq_base; | 667 | irq_hw_number_t hwirq_base; |
648 | struct gic_chip_data *gic; | 668 | struct gic_chip_data *gic; |
649 | int gic_irqs, irq_base; | 669 | int gic_irqs, irq_base, i; |
650 | 670 | ||
651 | BUG_ON(gic_nr >= MAX_GIC_NR); | 671 | BUG_ON(gic_nr >= MAX_GIC_NR); |
652 | 672 | ||
@@ -683,6 +703,13 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start, | |||
683 | } | 703 | } |
684 | 704 | ||
685 | /* | 705 | /* |
706 | * Initialize the CPU interface map to all CPUs. | ||
707 | * It will be refined as each CPU probes its ID. | ||
708 | */ | ||
709 | for (i = 0; i < NR_GIC_CPU_IF; i++) | ||
710 | gic_cpu_map[i] = 0xff; | ||
711 | |||
712 | /* | ||
686 | * For primary GICs, skip over SGIs. | 713 | * For primary GICs, skip over SGIs. |
687 | * For secondary GICs, skip over PPIs, too. | 714 | * For secondary GICs, skip over PPIs, too. |
688 | */ | 715 | */ |
@@ -737,7 +764,7 @@ void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) | |||
737 | 764 | ||
738 | /* Convert our logical CPU mask into a physical one. */ | 765 | /* Convert our logical CPU mask into a physical one. */ |
739 | for_each_cpu(cpu, mask) | 766 | for_each_cpu(cpu, mask) |
740 | map |= 1 << cpu_logical_map(cpu); | 767 | map |= gic_cpu_map[cpu]; |
741 | 768 | ||
742 | /* | 769 | /* |
743 | * Ensure that stores to Normal memory are visible to the | 770 | * Ensure that stores to Normal memory are visible to the |
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c index df13a3ffff35..9d2d3ba339ff 100644 --- a/arch/arm/common/timer-sp.c +++ b/arch/arm/common/timer-sp.c | |||
@@ -162,7 +162,6 @@ static struct clock_event_device sp804_clockevent = { | |||
162 | .set_mode = sp804_set_mode, | 162 | .set_mode = sp804_set_mode, |
163 | .set_next_event = sp804_set_next_event, | 163 | .set_next_event = sp804_set_next_event, |
164 | .rating = 300, | 164 | .rating = 300, |
165 | .cpumask = cpu_all_mask, | ||
166 | }; | 165 | }; |
167 | 166 | ||
168 | static struct irqaction sp804_timer_irq = { | 167 | static struct irqaction sp804_timer_irq = { |
@@ -185,6 +184,7 @@ void __init sp804_clockevents_init(void __iomem *base, unsigned int irq, | |||
185 | clkevt_reload = DIV_ROUND_CLOSEST(rate, HZ); | 184 | clkevt_reload = DIV_ROUND_CLOSEST(rate, HZ); |
186 | evt->name = name; | 185 | evt->name = name; |
187 | evt->irq = irq; | 186 | evt->irq = irq; |
187 | evt->cpumask = cpu_possible_mask; | ||
188 | 188 | ||
189 | setup_irq(irq, &sp804_timer_irq); | 189 | setup_irq(irq, &sp804_timer_irq); |
190 | clockevents_config_and_register(evt, rate, 0xf, 0xffffffff); | 190 | clockevents_config_and_register(evt, rate, 0xf, 0xffffffff); |
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c index e0d538803cc3..e4df17ca90c7 100644 --- a/arch/arm/common/vic.c +++ b/arch/arm/common/vic.c | |||
@@ -218,7 +218,7 @@ static void __init vic_register(void __iomem *base, unsigned int irq, | |||
218 | v->resume_sources = resume_sources; | 218 | v->resume_sources = resume_sources; |
219 | v->irq = irq; | 219 | v->irq = irq; |
220 | vic_id++; | 220 | vic_id++; |
221 | v->domain = irq_domain_add_legacy(node, fls(valid_sources), irq, 0, | 221 | v->domain = irq_domain_add_simple(node, fls(valid_sources), irq, |
222 | &vic_irqdomain_ops, v); | 222 | &vic_irqdomain_ops, v); |
223 | } | 223 | } |
224 | 224 | ||
@@ -350,7 +350,7 @@ static void __init vic_init_st(void __iomem *base, unsigned int irq_start, | |||
350 | vic_register(base, irq_start, vic_sources, 0, node); | 350 | vic_register(base, irq_start, vic_sources, 0, node); |
351 | } | 351 | } |
352 | 352 | ||
353 | void __init __vic_init(void __iomem *base, unsigned int irq_start, | 353 | void __init __vic_init(void __iomem *base, int irq_start, |
354 | u32 vic_sources, u32 resume_sources, | 354 | u32 vic_sources, u32 resume_sources, |
355 | struct device_node *node) | 355 | struct device_node *node) |
356 | { | 356 | { |
@@ -407,7 +407,6 @@ void __init vic_init(void __iomem *base, unsigned int irq_start, | |||
407 | int __init vic_of_init(struct device_node *node, struct device_node *parent) | 407 | int __init vic_of_init(struct device_node *node, struct device_node *parent) |
408 | { | 408 | { |
409 | void __iomem *regs; | 409 | void __iomem *regs; |
410 | int irq_base; | ||
411 | 410 | ||
412 | if (WARN(parent, "non-root VICs are not supported")) | 411 | if (WARN(parent, "non-root VICs are not supported")) |
413 | return -EINVAL; | 412 | return -EINVAL; |
@@ -416,18 +415,12 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent) | |||
416 | if (WARN_ON(!regs)) | 415 | if (WARN_ON(!regs)) |
417 | return -EIO; | 416 | return -EIO; |
418 | 417 | ||
419 | irq_base = irq_alloc_descs(-1, 0, 32, numa_node_id()); | 418 | /* |
420 | if (WARN_ON(irq_base < 0)) | 419 | * Passing -1 as first IRQ makes the simple domain allocate descriptors |
421 | goto out_unmap; | 420 | */ |
422 | 421 | __vic_init(regs, -1, ~0, ~0, node); | |
423 | __vic_init(regs, irq_base, ~0, ~0, node); | ||
424 | 422 | ||
425 | return 0; | 423 | return 0; |
426 | |||
427 | out_unmap: | ||
428 | iounmap(regs); | ||
429 | |||
430 | return -EIO; | ||
431 | } | 424 | } |
432 | #endif /* CONFIG OF */ | 425 | #endif /* CONFIG OF */ |
433 | 426 | ||
diff --git a/arch/arm/configs/afeb9260_defconfig b/arch/arm/configs/afeb9260_defconfig deleted file mode 100644 index c285a9d777d9..000000000000 --- a/arch/arm/configs/afeb9260_defconfig +++ /dev/null | |||
@@ -1,106 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | CONFIG_SYSVIPC=y | ||
4 | CONFIG_LOG_BUF_SHIFT=14 | ||
5 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
6 | CONFIG_BLK_DEV_INITRD=y | ||
7 | CONFIG_SLAB=y | ||
8 | CONFIG_MODULES=y | ||
9 | CONFIG_MODULE_UNLOAD=y | ||
10 | # CONFIG_BLK_DEV_BSG is not set | ||
11 | # CONFIG_IOSCHED_DEADLINE is not set | ||
12 | # CONFIG_IOSCHED_CFQ is not set | ||
13 | CONFIG_ARCH_AT91=y | ||
14 | CONFIG_ARCH_AT91SAM9260=y | ||
15 | CONFIG_MACH_AFEB9260=y | ||
16 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y | ||
17 | CONFIG_PREEMPT=y | ||
18 | CONFIG_AEABI=y | ||
19 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
20 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
21 | CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" | ||
22 | CONFIG_FPE_NWFPE=y | ||
23 | CONFIG_NET=y | ||
24 | CONFIG_PACKET=y | ||
25 | CONFIG_UNIX=y | ||
26 | CONFIG_INET=y | ||
27 | CONFIG_IP_PNP=y | ||
28 | CONFIG_IP_PNP_BOOTP=y | ||
29 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
30 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
31 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
32 | # CONFIG_INET_LRO is not set | ||
33 | # CONFIG_IPV6 is not set | ||
34 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
35 | CONFIG_MTD=y | ||
36 | CONFIG_MTD_PARTITIONS=y | ||
37 | CONFIG_MTD_CHAR=y | ||
38 | CONFIG_MTD_BLOCK=y | ||
39 | CONFIG_MTD_DATAFLASH=y | ||
40 | CONFIG_MTD_NAND=y | ||
41 | CONFIG_MTD_NAND_ATMEL=y | ||
42 | CONFIG_BLK_DEV_RAM=y | ||
43 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
44 | CONFIG_ATMEL_SSC=y | ||
45 | CONFIG_EEPROM_AT24=y | ||
46 | CONFIG_SCSI=y | ||
47 | CONFIG_BLK_DEV_SD=y | ||
48 | CONFIG_SCSI_MULTI_LUN=y | ||
49 | CONFIG_NETDEVICES=y | ||
50 | CONFIG_NET_ETHERNET=y | ||
51 | CONFIG_MII=y | ||
52 | CONFIG_MACB=y | ||
53 | # CONFIG_NETDEV_1000 is not set | ||
54 | # CONFIG_NETDEV_10000 is not set | ||
55 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
56 | # CONFIG_INPUT_KEYBOARD is not set | ||
57 | # CONFIG_INPUT_MOUSE is not set | ||
58 | # CONFIG_SERIO is not set | ||
59 | CONFIG_SERIAL_ATMEL=y | ||
60 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
61 | # CONFIG_HW_RANDOM is not set | ||
62 | CONFIG_I2C=y | ||
63 | CONFIG_I2C_CHARDEV=y | ||
64 | CONFIG_I2C_GPIO=y | ||
65 | CONFIG_SPI=y | ||
66 | CONFIG_SPI_DEBUG=y | ||
67 | CONFIG_SPI_ATMEL=y | ||
68 | CONFIG_SPI_SPIDEV=y | ||
69 | # CONFIG_HWMON is not set | ||
70 | CONFIG_WATCHDOG=y | ||
71 | CONFIG_WATCHDOG_NOWAYOUT=y | ||
72 | # CONFIG_VGA_CONSOLE is not set | ||
73 | # CONFIG_USB_HID is not set | ||
74 | CONFIG_USB=y | ||
75 | CONFIG_USB_DEVICEFS=y | ||
76 | CONFIG_USB_MON=y | ||
77 | CONFIG_USB_OHCI_HCD=y | ||
78 | CONFIG_USB_STORAGE=y | ||
79 | CONFIG_USB_GADGET=y | ||
80 | CONFIG_USB_ZERO=m | ||
81 | CONFIG_USB_GADGETFS=m | ||
82 | CONFIG_USB_FILE_STORAGE=m | ||
83 | CONFIG_USB_G_SERIAL=m | ||
84 | CONFIG_RTC_CLASS=y | ||
85 | CONFIG_RTC_DEBUG=y | ||
86 | CONFIG_RTC_DRV_FM3130=y | ||
87 | CONFIG_EXT2_FS=y | ||
88 | CONFIG_EXT3_FS=y | ||
89 | CONFIG_INOTIFY=y | ||
90 | CONFIG_VFAT_FS=y | ||
91 | CONFIG_TMPFS=y | ||
92 | CONFIG_JFFS2_FS=y | ||
93 | CONFIG_CRAMFS=y | ||
94 | CONFIG_NFS_FS=y | ||
95 | CONFIG_NFS_V3=y | ||
96 | CONFIG_ROOT_NFS=y | ||
97 | CONFIG_NLS_CODEPAGE_437=y | ||
98 | CONFIG_NLS_CODEPAGE_850=y | ||
99 | CONFIG_NLS_ISO8859_1=y | ||
100 | CONFIG_DEBUG_KERNEL=y | ||
101 | CONFIG_DEBUG_INFO=y | ||
102 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
103 | # CONFIG_FTRACE is not set | ||
104 | CONFIG_DEBUG_USER=y | ||
105 | CONFIG_DEBUG_LL=y | ||
106 | CONFIG_CRC_T10DIF=y | ||
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig index 67bc571ed0c3..b175577d7abb 100644 --- a/arch/arm/configs/at91_dt_defconfig +++ b/arch/arm/configs/at91_dt_defconfig | |||
@@ -111,6 +111,7 @@ CONFIG_I2C=y | |||
111 | CONFIG_I2C_GPIO=y | 111 | CONFIG_I2C_GPIO=y |
112 | CONFIG_SPI=y | 112 | CONFIG_SPI=y |
113 | CONFIG_SPI_ATMEL=y | 113 | CONFIG_SPI_ATMEL=y |
114 | CONFIG_PINCTRL_AT91=y | ||
114 | # CONFIG_HWMON is not set | 115 | # CONFIG_HWMON is not set |
115 | CONFIG_WATCHDOG=y | 116 | CONFIG_WATCHDOG=y |
116 | CONFIG_AT91SAM9X_WATCHDOG=y | 117 | CONFIG_AT91SAM9X_WATCHDOG=y |
diff --git a/arch/arm/configs/at91sam9260_defconfig b/arch/arm/configs/at91sam9260_defconfig index 505b3765f87e..0ea5d2c97fc4 100644 --- a/arch/arm/configs/at91sam9260_defconfig +++ b/arch/arm/configs/at91sam9260_defconfig | |||
@@ -75,7 +75,7 @@ CONFIG_USB_STORAGE_DEBUG=y | |||
75 | CONFIG_USB_GADGET=y | 75 | CONFIG_USB_GADGET=y |
76 | CONFIG_USB_ZERO=m | 76 | CONFIG_USB_ZERO=m |
77 | CONFIG_USB_GADGETFS=m | 77 | CONFIG_USB_GADGETFS=m |
78 | CONFIG_USB_FILE_STORAGE=m | 78 | CONFIG_USB_MASS_STORAGE=m |
79 | CONFIG_USB_G_SERIAL=m | 79 | CONFIG_USB_G_SERIAL=m |
80 | CONFIG_RTC_CLASS=y | 80 | CONFIG_RTC_CLASS=y |
81 | CONFIG_RTC_DRV_AT91SAM9=y | 81 | CONFIG_RTC_DRV_AT91SAM9=y |
diff --git a/arch/arm/configs/at91sam9261_defconfig b/arch/arm/configs/at91sam9261_defconfig index 1e8712ef062e..c87beb973b37 100644 --- a/arch/arm/configs/at91sam9261_defconfig +++ b/arch/arm/configs/at91sam9261_defconfig | |||
@@ -125,7 +125,7 @@ CONFIG_USB_GADGET=y | |||
125 | CONFIG_USB_ZERO=m | 125 | CONFIG_USB_ZERO=m |
126 | CONFIG_USB_ETH=m | 126 | CONFIG_USB_ETH=m |
127 | CONFIG_USB_GADGETFS=m | 127 | CONFIG_USB_GADGETFS=m |
128 | CONFIG_USB_FILE_STORAGE=m | 128 | CONFIG_USB_MASS_STORAGE=m |
129 | CONFIG_USB_G_SERIAL=m | 129 | CONFIG_USB_G_SERIAL=m |
130 | CONFIG_MMC=y | 130 | CONFIG_MMC=y |
131 | CONFIG_MMC_ATMELMCI=m | 131 | CONFIG_MMC_ATMELMCI=m |
diff --git a/arch/arm/configs/at91sam9263_defconfig b/arch/arm/configs/at91sam9263_defconfig index d2050cada82d..c5212f43eee6 100644 --- a/arch/arm/configs/at91sam9263_defconfig +++ b/arch/arm/configs/at91sam9263_defconfig | |||
@@ -133,7 +133,7 @@ CONFIG_USB_GADGET=y | |||
133 | CONFIG_USB_ZERO=m | 133 | CONFIG_USB_ZERO=m |
134 | CONFIG_USB_ETH=m | 134 | CONFIG_USB_ETH=m |
135 | CONFIG_USB_GADGETFS=m | 135 | CONFIG_USB_GADGETFS=m |
136 | CONFIG_USB_FILE_STORAGE=m | 136 | CONFIG_USB_MASS_STORAGE=m |
137 | CONFIG_USB_G_SERIAL=m | 137 | CONFIG_USB_G_SERIAL=m |
138 | CONFIG_MMC=y | 138 | CONFIG_MMC=y |
139 | CONFIG_SDIO_UART=m | 139 | CONFIG_SDIO_UART=m |
diff --git a/arch/arm/configs/at91sam9g20_defconfig b/arch/arm/configs/at91sam9g20_defconfig index e1b0e80b54a5..3b1881033ad8 100644 --- a/arch/arm/configs/at91sam9g20_defconfig +++ b/arch/arm/configs/at91sam9g20_defconfig | |||
@@ -96,7 +96,7 @@ CONFIG_USB_STORAGE=y | |||
96 | CONFIG_USB_GADGET=y | 96 | CONFIG_USB_GADGET=y |
97 | CONFIG_USB_ZERO=m | 97 | CONFIG_USB_ZERO=m |
98 | CONFIG_USB_GADGETFS=m | 98 | CONFIG_USB_GADGETFS=m |
99 | CONFIG_USB_FILE_STORAGE=m | 99 | CONFIG_USB_MASS_STORAGE=m |
100 | CONFIG_USB_G_SERIAL=m | 100 | CONFIG_USB_G_SERIAL=m |
101 | CONFIG_MMC=y | 101 | CONFIG_MMC=y |
102 | CONFIG_MMC_ATMELMCI=m | 102 | CONFIG_MMC_ATMELMCI=m |
diff --git a/arch/arm/configs/cam60_defconfig b/arch/arm/configs/cam60_defconfig deleted file mode 100644 index 14579711d8fc..000000000000 --- a/arch/arm/configs/cam60_defconfig +++ /dev/null | |||
@@ -1,173 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | CONFIG_SYSVIPC=y | ||
4 | CONFIG_POSIX_MQUEUE=y | ||
5 | CONFIG_BSD_PROCESS_ACCT=y | ||
6 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
7 | CONFIG_AUDIT=y | ||
8 | CONFIG_IKCONFIG=y | ||
9 | CONFIG_IKCONFIG_PROC=y | ||
10 | CONFIG_BLK_DEV_INITRD=y | ||
11 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
12 | CONFIG_KALLSYMS_ALL=y | ||
13 | CONFIG_MODULES=y | ||
14 | CONFIG_MODULE_UNLOAD=y | ||
15 | CONFIG_MODVERSIONS=y | ||
16 | # CONFIG_BLK_DEV_BSG is not set | ||
17 | CONFIG_ARCH_AT91=y | ||
18 | CONFIG_ARCH_AT91SAM9260=y | ||
19 | CONFIG_MACH_CAM60=y | ||
20 | CONFIG_ZBOOT_ROM_BSS=0x20004000 | ||
21 | CONFIG_CMDLINE="console=ttyS0,115200 noinitrd root=/dev/mtdblock0 rootfstype=jffs2 mem=64M" | ||
22 | CONFIG_FPE_NWFPE=y | ||
23 | CONFIG_BINFMT_AOUT=y | ||
24 | CONFIG_BINFMT_MISC=y | ||
25 | CONFIG_PACKET=y | ||
26 | CONFIG_UNIX=y | ||
27 | CONFIG_INET=y | ||
28 | CONFIG_IP_MULTICAST=y | ||
29 | CONFIG_IP_PNP=y | ||
30 | CONFIG_IP_PNP_DHCP=y | ||
31 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
32 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
33 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
34 | # CONFIG_INET_LRO is not set | ||
35 | # CONFIG_INET_DIAG is not set | ||
36 | # CONFIG_IPV6 is not set | ||
37 | CONFIG_NETWORK_SECMARK=y | ||
38 | CONFIG_CFG80211=m | ||
39 | CONFIG_MAC80211=m | ||
40 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
41 | CONFIG_MTD=y | ||
42 | CONFIG_MTD_CONCAT=y | ||
43 | CONFIG_MTD_PARTITIONS=y | ||
44 | CONFIG_MTD_CMDLINE_PARTS=y | ||
45 | CONFIG_MTD_CHAR=y | ||
46 | CONFIG_MTD_BLOCK=y | ||
47 | CONFIG_MTD_CFI=y | ||
48 | CONFIG_MTD_COMPLEX_MAPPINGS=y | ||
49 | CONFIG_MTD_PLATRAM=m | ||
50 | CONFIG_MTD_DATAFLASH=y | ||
51 | CONFIG_MTD_NAND=y | ||
52 | CONFIG_MTD_NAND_ATMEL=y | ||
53 | CONFIG_BLK_DEV_LOOP=y | ||
54 | CONFIG_BLK_DEV_RAM=y | ||
55 | # CONFIG_MISC_DEVICES is not set | ||
56 | CONFIG_SCSI=y | ||
57 | CONFIG_SCSI_TGT=y | ||
58 | CONFIG_BLK_DEV_SD=y | ||
59 | CONFIG_CHR_DEV_SG=y | ||
60 | CONFIG_CHR_DEV_SCH=y | ||
61 | CONFIG_SCSI_MULTI_LUN=y | ||
62 | CONFIG_SCSI_LOGGING=y | ||
63 | CONFIG_SCSI_SCAN_ASYNC=y | ||
64 | CONFIG_SCSI_SPI_ATTRS=m | ||
65 | CONFIG_SCSI_FC_ATTRS=m | ||
66 | CONFIG_SCSI_ISCSI_ATTRS=m | ||
67 | CONFIG_SCSI_SAS_LIBSAS=m | ||
68 | # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set | ||
69 | # CONFIG_SCSI_LOWLEVEL is not set | ||
70 | CONFIG_NETDEVICES=y | ||
71 | CONFIG_MARVELL_PHY=m | ||
72 | CONFIG_DAVICOM_PHY=m | ||
73 | CONFIG_QSEMI_PHY=m | ||
74 | CONFIG_LXT_PHY=m | ||
75 | CONFIG_CICADA_PHY=m | ||
76 | CONFIG_VITESSE_PHY=m | ||
77 | CONFIG_SMSC_PHY=m | ||
78 | CONFIG_BROADCOM_PHY=m | ||
79 | CONFIG_NET_ETHERNET=y | ||
80 | CONFIG_MII=y | ||
81 | CONFIG_MACB=y | ||
82 | # CONFIG_NETDEV_1000 is not set | ||
83 | # CONFIG_NETDEV_10000 is not set | ||
84 | CONFIG_INPUT_EVDEV=y | ||
85 | CONFIG_KEYBOARD_LKKBD=m | ||
86 | CONFIG_KEYBOARD_NEWTON=m | ||
87 | CONFIG_KEYBOARD_STOWAWAY=m | ||
88 | CONFIG_KEYBOARD_SUNKBD=m | ||
89 | CONFIG_KEYBOARD_XTKBD=m | ||
90 | CONFIG_MOUSE_SERIAL=m | ||
91 | CONFIG_MOUSE_APPLETOUCH=m | ||
92 | CONFIG_MOUSE_VSXXXAA=m | ||
93 | # CONFIG_SERIO_SERPORT is not set | ||
94 | CONFIG_VT_HW_CONSOLE_BINDING=y | ||
95 | CONFIG_SERIAL_NONSTANDARD=y | ||
96 | CONFIG_SERIAL_ATMEL=y | ||
97 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
98 | # CONFIG_LEGACY_PTYS is not set | ||
99 | CONFIG_HW_RANDOM=y | ||
100 | CONFIG_I2C=y | ||
101 | CONFIG_I2C_CHARDEV=y | ||
102 | CONFIG_SPI=y | ||
103 | CONFIG_SPI_ATMEL=y | ||
104 | # CONFIG_HWMON is not set | ||
105 | # CONFIG_VGA_CONSOLE is not set | ||
106 | # CONFIG_HID_SUPPORT is not set | ||
107 | CONFIG_USB=y | ||
108 | CONFIG_USB_DEVICEFS=y | ||
109 | CONFIG_USB_OHCI_HCD=y | ||
110 | CONFIG_USB_STORAGE=y | ||
111 | CONFIG_USB_LIBUSUAL=y | ||
112 | CONFIG_RTC_CLASS=y | ||
113 | CONFIG_RTC_INTF_DEV_UIE_EMUL=y | ||
114 | CONFIG_RTC_DRV_TEST=m | ||
115 | CONFIG_RTC_DRV_AT91SAM9=y | ||
116 | CONFIG_EXT2_FS=y | ||
117 | CONFIG_EXT2_FS_XATTR=y | ||
118 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
119 | CONFIG_EXT3_FS=y | ||
120 | CONFIG_INOTIFY=y | ||
121 | CONFIG_QUOTA=y | ||
122 | CONFIG_AUTOFS_FS=y | ||
123 | CONFIG_AUTOFS4_FS=y | ||
124 | CONFIG_MSDOS_FS=y | ||
125 | CONFIG_VFAT_FS=y | ||
126 | CONFIG_TMPFS=y | ||
127 | CONFIG_CONFIGFS_FS=y | ||
128 | CONFIG_NFS_FS=y | ||
129 | CONFIG_NFS_V3=y | ||
130 | CONFIG_ROOT_NFS=y | ||
131 | CONFIG_NLS_DEFAULT="cp437" | ||
132 | CONFIG_NLS_CODEPAGE_437=y | ||
133 | CONFIG_NLS_ASCII=y | ||
134 | CONFIG_NLS_ISO8859_1=y | ||
135 | CONFIG_NLS_UTF8=y | ||
136 | CONFIG_PRINTK_TIME=y | ||
137 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
138 | CONFIG_MAGIC_SYSRQ=y | ||
139 | CONFIG_UNUSED_SYMBOLS=y | ||
140 | CONFIG_DEBUG_KERNEL=y | ||
141 | CONFIG_BLK_DEV_IO_TRACE=y | ||
142 | CONFIG_DEBUG_LL=y | ||
143 | CONFIG_CRYPTO=y | ||
144 | CONFIG_CRYPTO_NULL=m | ||
145 | CONFIG_CRYPTO_CRYPTD=m | ||
146 | CONFIG_CRYPTO_TEST=m | ||
147 | CONFIG_CRYPTO_CBC=m | ||
148 | CONFIG_CRYPTO_LRW=m | ||
149 | CONFIG_CRYPTO_PCBC=m | ||
150 | CONFIG_CRYPTO_HMAC=y | ||
151 | CONFIG_CRYPTO_XCBC=m | ||
152 | CONFIG_CRYPTO_MD5=y | ||
153 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
154 | CONFIG_CRYPTO_SHA1=y | ||
155 | CONFIG_CRYPTO_SHA256=y | ||
156 | CONFIG_CRYPTO_SHA512=y | ||
157 | CONFIG_CRYPTO_TGR192=m | ||
158 | CONFIG_CRYPTO_WP512=m | ||
159 | CONFIG_CRYPTO_ANUBIS=m | ||
160 | CONFIG_CRYPTO_BLOWFISH=m | ||
161 | CONFIG_CRYPTO_CAMELLIA=m | ||
162 | CONFIG_CRYPTO_CAST5=m | ||
163 | CONFIG_CRYPTO_CAST6=m | ||
164 | CONFIG_CRYPTO_DES=y | ||
165 | CONFIG_CRYPTO_FCRYPT=m | ||
166 | CONFIG_CRYPTO_KHAZAD=m | ||
167 | CONFIG_CRYPTO_SERPENT=m | ||
168 | CONFIG_CRYPTO_TEA=m | ||
169 | CONFIG_CRYPTO_TWOFISH=m | ||
170 | CONFIG_CRYPTO_DEFLATE=m | ||
171 | # CONFIG_CRYPTO_HW is not set | ||
172 | CONFIG_CRC32=m | ||
173 | CONFIG_LIBCRC32C=m | ||
diff --git a/arch/arm/configs/corgi_defconfig b/arch/arm/configs/corgi_defconfig index 4b8a25d9e686..1fd1d1de3220 100644 --- a/arch/arm/configs/corgi_defconfig +++ b/arch/arm/configs/corgi_defconfig | |||
@@ -218,7 +218,7 @@ CONFIG_USB_GADGET=y | |||
218 | CONFIG_USB_ZERO=m | 218 | CONFIG_USB_ZERO=m |
219 | CONFIG_USB_ETH=m | 219 | CONFIG_USB_ETH=m |
220 | CONFIG_USB_GADGETFS=m | 220 | CONFIG_USB_GADGETFS=m |
221 | CONFIG_USB_FILE_STORAGE=m | 221 | CONFIG_USB_MASS_STORAGE=m |
222 | CONFIG_USB_G_SERIAL=m | 222 | CONFIG_USB_G_SERIAL=m |
223 | CONFIG_MMC=y | 223 | CONFIG_MMC=y |
224 | CONFIG_MMC_PXA=y | 224 | CONFIG_MMC_PXA=y |
diff --git a/arch/arm/configs/cpu9260_defconfig b/arch/arm/configs/cpu9260_defconfig deleted file mode 100644 index 921480c23b98..000000000000 --- a/arch/arm/configs/cpu9260_defconfig +++ /dev/null | |||
@@ -1,116 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | # CONFIG_SWAP is not set | ||
4 | CONFIG_SYSVIPC=y | ||
5 | CONFIG_LOG_BUF_SHIFT=14 | ||
6 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
7 | CONFIG_MODULES=y | ||
8 | CONFIG_MODULE_UNLOAD=y | ||
9 | # CONFIG_BLK_DEV_BSG is not set | ||
10 | # CONFIG_IOSCHED_CFQ is not set | ||
11 | CONFIG_ARCH_AT91=y | ||
12 | CONFIG_ARCH_AT91SAM9260=y | ||
13 | CONFIG_MACH_CPU9260=y | ||
14 | # CONFIG_ARM_THUMB is not set | ||
15 | CONFIG_PREEMPT=y | ||
16 | CONFIG_AEABI=y | ||
17 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
18 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
19 | CONFIG_NET=y | ||
20 | CONFIG_PACKET=y | ||
21 | CONFIG_UNIX=y | ||
22 | CONFIG_INET=y | ||
23 | CONFIG_IP_PNP=y | ||
24 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
25 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
26 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
27 | # CONFIG_IPV6 is not set | ||
28 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
29 | CONFIG_MTD=y | ||
30 | CONFIG_MTD_PARTITIONS=y | ||
31 | CONFIG_MTD_CMDLINE_PARTS=y | ||
32 | CONFIG_MTD_CHAR=y | ||
33 | CONFIG_MTD_BLOCK=y | ||
34 | CONFIG_MTD_CFI=y | ||
35 | CONFIG_MTD_CFI_INTELEXT=y | ||
36 | CONFIG_MTD_PHYSMAP=y | ||
37 | CONFIG_MTD_PLATRAM=y | ||
38 | CONFIG_MTD_NAND=y | ||
39 | CONFIG_MTD_NAND_ATMEL=y | ||
40 | CONFIG_BLK_DEV_LOOP=y | ||
41 | CONFIG_BLK_DEV_NBD=y | ||
42 | CONFIG_BLK_DEV_RAM=y | ||
43 | # CONFIG_MISC_DEVICES is not set | ||
44 | CONFIG_SCSI=y | ||
45 | CONFIG_BLK_DEV_SD=y | ||
46 | CONFIG_SCSI_MULTI_LUN=y | ||
47 | # CONFIG_SCSI_LOWLEVEL is not set | ||
48 | CONFIG_NETDEVICES=y | ||
49 | CONFIG_SMSC_PHY=y | ||
50 | CONFIG_NET_ETHERNET=y | ||
51 | CONFIG_MII=y | ||
52 | CONFIG_MACB=y | ||
53 | # CONFIG_NETDEV_1000 is not set | ||
54 | # CONFIG_NETDEV_10000 is not set | ||
55 | CONFIG_PPP=y | ||
56 | CONFIG_PPP_ASYNC=y | ||
57 | CONFIG_PPP_DEFLATE=y | ||
58 | CONFIG_PPP_BSDCOMP=y | ||
59 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
60 | # CONFIG_KEYBOARD_ATKBD is not set | ||
61 | CONFIG_KEYBOARD_GPIO=y | ||
62 | # CONFIG_INPUT_MOUSE is not set | ||
63 | # CONFIG_SERIO is not set | ||
64 | CONFIG_SERIAL_ATMEL=y | ||
65 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
66 | CONFIG_LEGACY_PTY_COUNT=32 | ||
67 | # CONFIG_HW_RANDOM is not set | ||
68 | CONFIG_I2C=y | ||
69 | CONFIG_I2C_CHARDEV=y | ||
70 | CONFIG_I2C_GPIO=y | ||
71 | CONFIG_GPIO_SYSFS=y | ||
72 | # CONFIG_HWMON is not set | ||
73 | CONFIG_WATCHDOG=y | ||
74 | CONFIG_WATCHDOG_NOWAYOUT=y | ||
75 | CONFIG_AT91SAM9X_WATCHDOG=y | ||
76 | # CONFIG_VGA_CONSOLE is not set | ||
77 | # CONFIG_HID_SUPPORT is not set | ||
78 | CONFIG_USB=y | ||
79 | # CONFIG_USB_DEVICE_CLASS is not set | ||
80 | CONFIG_USB_OHCI_HCD=y | ||
81 | CONFIG_USB_STORAGE=y | ||
82 | CONFIG_USB_GADGET=y | ||
83 | CONFIG_USB_ETH=m | ||
84 | CONFIG_MMC=y | ||
85 | CONFIG_MMC_ATMELMCI=m | ||
86 | CONFIG_NEW_LEDS=y | ||
87 | CONFIG_LEDS_CLASS=y | ||
88 | CONFIG_LEDS_GPIO=y | ||
89 | CONFIG_LEDS_TRIGGERS=y | ||
90 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
91 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
92 | CONFIG_LEDS_TRIGGER_GPIO=y | ||
93 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
94 | CONFIG_RTC_CLASS=y | ||
95 | # CONFIG_RTC_HCTOSYS is not set | ||
96 | CONFIG_RTC_DRV_DS1307=y | ||
97 | CONFIG_EXT2_FS=y | ||
98 | CONFIG_EXT3_FS=y | ||
99 | # CONFIG_EXT3_FS_XATTR is not set | ||
100 | CONFIG_INOTIFY=y | ||
101 | CONFIG_AUTOFS4_FS=y | ||
102 | CONFIG_MSDOS_FS=y | ||
103 | CONFIG_VFAT_FS=y | ||
104 | CONFIG_TMPFS=y | ||
105 | CONFIG_JFFS2_FS=y | ||
106 | CONFIG_JFFS2_SUMMARY=y | ||
107 | CONFIG_CRAMFS=y | ||
108 | CONFIG_MINIX_FS=y | ||
109 | CONFIG_NFS_FS=y | ||
110 | CONFIG_NFS_V3=y | ||
111 | CONFIG_ROOT_NFS=y | ||
112 | CONFIG_PARTITION_ADVANCED=y | ||
113 | CONFIG_NLS_CODEPAGE_437=y | ||
114 | CONFIG_NLS_ISO8859_1=y | ||
115 | CONFIG_NLS_UTF8=y | ||
116 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
diff --git a/arch/arm/configs/cpu9g20_defconfig b/arch/arm/configs/cpu9g20_defconfig deleted file mode 100644 index ea116cbdffa1..000000000000 --- a/arch/arm/configs/cpu9g20_defconfig +++ /dev/null | |||
@@ -1,116 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | # CONFIG_SWAP is not set | ||
4 | CONFIG_SYSVIPC=y | ||
5 | CONFIG_LOG_BUF_SHIFT=14 | ||
6 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
7 | CONFIG_MODULES=y | ||
8 | CONFIG_MODULE_UNLOAD=y | ||
9 | # CONFIG_BLK_DEV_BSG is not set | ||
10 | # CONFIG_IOSCHED_CFQ is not set | ||
11 | CONFIG_ARCH_AT91=y | ||
12 | CONFIG_ARCH_AT91SAM9G20=y | ||
13 | CONFIG_MACH_CPU9G20=y | ||
14 | # CONFIG_ARM_THUMB is not set | ||
15 | CONFIG_PREEMPT=y | ||
16 | CONFIG_AEABI=y | ||
17 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
18 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
19 | CONFIG_NET=y | ||
20 | CONFIG_PACKET=y | ||
21 | CONFIG_UNIX=y | ||
22 | CONFIG_INET=y | ||
23 | CONFIG_IP_PNP=y | ||
24 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
25 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
26 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
27 | # CONFIG_IPV6 is not set | ||
28 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
29 | CONFIG_MTD=y | ||
30 | CONFIG_MTD_PARTITIONS=y | ||
31 | CONFIG_MTD_CMDLINE_PARTS=y | ||
32 | CONFIG_MTD_CHAR=y | ||
33 | CONFIG_MTD_BLOCK=y | ||
34 | CONFIG_MTD_CFI=y | ||
35 | CONFIG_MTD_CFI_INTELEXT=y | ||
36 | CONFIG_MTD_PHYSMAP=y | ||
37 | CONFIG_MTD_PLATRAM=y | ||
38 | CONFIG_MTD_NAND=y | ||
39 | CONFIG_MTD_NAND_ATMEL=y | ||
40 | CONFIG_BLK_DEV_LOOP=y | ||
41 | CONFIG_BLK_DEV_NBD=y | ||
42 | CONFIG_BLK_DEV_RAM=y | ||
43 | # CONFIG_MISC_DEVICES is not set | ||
44 | CONFIG_SCSI=y | ||
45 | CONFIG_BLK_DEV_SD=y | ||
46 | CONFIG_SCSI_MULTI_LUN=y | ||
47 | # CONFIG_SCSI_LOWLEVEL is not set | ||
48 | CONFIG_NETDEVICES=y | ||
49 | CONFIG_SMSC_PHY=y | ||
50 | CONFIG_NET_ETHERNET=y | ||
51 | CONFIG_MII=y | ||
52 | CONFIG_MACB=y | ||
53 | # CONFIG_NETDEV_1000 is not set | ||
54 | # CONFIG_NETDEV_10000 is not set | ||
55 | CONFIG_PPP=y | ||
56 | CONFIG_PPP_ASYNC=y | ||
57 | CONFIG_PPP_DEFLATE=y | ||
58 | CONFIG_PPP_BSDCOMP=y | ||
59 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
60 | # CONFIG_KEYBOARD_ATKBD is not set | ||
61 | CONFIG_KEYBOARD_GPIO=y | ||
62 | # CONFIG_INPUT_MOUSE is not set | ||
63 | # CONFIG_SERIO is not set | ||
64 | CONFIG_SERIAL_ATMEL=y | ||
65 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
66 | CONFIG_LEGACY_PTY_COUNT=32 | ||
67 | # CONFIG_HW_RANDOM is not set | ||
68 | CONFIG_I2C=y | ||
69 | CONFIG_I2C_CHARDEV=y | ||
70 | CONFIG_I2C_GPIO=y | ||
71 | CONFIG_GPIO_SYSFS=y | ||
72 | # CONFIG_HWMON is not set | ||
73 | CONFIG_WATCHDOG=y | ||
74 | CONFIG_WATCHDOG_NOWAYOUT=y | ||
75 | CONFIG_AT91SAM9X_WATCHDOG=y | ||
76 | # CONFIG_VGA_CONSOLE is not set | ||
77 | # CONFIG_HID_SUPPORT is not set | ||
78 | CONFIG_USB=y | ||
79 | # CONFIG_USB_DEVICE_CLASS is not set | ||
80 | CONFIG_USB_OHCI_HCD=y | ||
81 | CONFIG_USB_STORAGE=y | ||
82 | CONFIG_USB_GADGET=y | ||
83 | CONFIG_USB_ETH=m | ||
84 | CONFIG_MMC=y | ||
85 | CONFIG_MMC_ATMELMCI=m | ||
86 | CONFIG_NEW_LEDS=y | ||
87 | CONFIG_LEDS_CLASS=y | ||
88 | CONFIG_LEDS_GPIO=y | ||
89 | CONFIG_LEDS_TRIGGERS=y | ||
90 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
91 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
92 | CONFIG_LEDS_TRIGGER_GPIO=y | ||
93 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
94 | CONFIG_RTC_CLASS=y | ||
95 | # CONFIG_RTC_HCTOSYS is not set | ||
96 | CONFIG_RTC_DRV_DS1307=y | ||
97 | CONFIG_EXT2_FS=y | ||
98 | CONFIG_EXT3_FS=y | ||
99 | # CONFIG_EXT3_FS_XATTR is not set | ||
100 | CONFIG_INOTIFY=y | ||
101 | CONFIG_AUTOFS4_FS=y | ||
102 | CONFIG_MSDOS_FS=y | ||
103 | CONFIG_VFAT_FS=y | ||
104 | CONFIG_TMPFS=y | ||
105 | CONFIG_JFFS2_FS=y | ||
106 | CONFIG_JFFS2_SUMMARY=y | ||
107 | CONFIG_CRAMFS=y | ||
108 | CONFIG_MINIX_FS=y | ||
109 | CONFIG_NFS_FS=y | ||
110 | CONFIG_NFS_V3=y | ||
111 | CONFIG_ROOT_NFS=y | ||
112 | CONFIG_PARTITION_ADVANCED=y | ||
113 | CONFIG_NLS_CODEPAGE_437=y | ||
114 | CONFIG_NLS_ISO8859_1=y | ||
115 | CONFIG_NLS_UTF8=y | ||
116 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig index 67b5abb6f857..4ea7c95719d2 100644 --- a/arch/arm/configs/davinci_all_defconfig +++ b/arch/arm/configs/davinci_all_defconfig | |||
@@ -144,7 +144,7 @@ CONFIG_USB_GADGET_DEBUG_FS=y | |||
144 | CONFIG_USB_ZERO=m | 144 | CONFIG_USB_ZERO=m |
145 | CONFIG_USB_ETH=m | 145 | CONFIG_USB_ETH=m |
146 | CONFIG_USB_GADGETFS=m | 146 | CONFIG_USB_GADGETFS=m |
147 | CONFIG_USB_FILE_STORAGE=m | 147 | CONFIG_USB_MASS_STORAGE=m |
148 | CONFIG_USB_G_SERIAL=m | 148 | CONFIG_USB_G_SERIAL=m |
149 | CONFIG_USB_G_PRINTER=m | 149 | CONFIG_USB_G_PRINTER=m |
150 | CONFIG_USB_CDC_COMPOSITE=m | 150 | CONFIG_USB_CDC_COMPOSITE=m |
diff --git a/arch/arm/configs/h7202_defconfig b/arch/arm/configs/h7202_defconfig index 69405a762423..e16d3f372e2a 100644 --- a/arch/arm/configs/h7202_defconfig +++ b/arch/arm/configs/h7202_defconfig | |||
@@ -34,8 +34,7 @@ CONFIG_FB_MODE_HELPERS=y | |||
34 | CONFIG_USB_GADGET=m | 34 | CONFIG_USB_GADGET=m |
35 | CONFIG_USB_ZERO=m | 35 | CONFIG_USB_ZERO=m |
36 | CONFIG_USB_GADGETFS=m | 36 | CONFIG_USB_GADGETFS=m |
37 | CONFIG_USB_FILE_STORAGE=m | 37 | CONFIG_USB_MASS_STORAGE=m |
38 | CONFIG_USB_FILE_STORAGE_TEST=y | ||
39 | CONFIG_USB_G_SERIAL=m | 38 | CONFIG_USB_G_SERIAL=m |
40 | CONFIG_EXT2_FS=y | 39 | CONFIG_EXT2_FS=y |
41 | CONFIG_TMPFS=y | 40 | CONFIG_TMPFS=y |
diff --git a/arch/arm/configs/magician_defconfig b/arch/arm/configs/magician_defconfig index a691ef4c6008..557dd291288b 100644 --- a/arch/arm/configs/magician_defconfig +++ b/arch/arm/configs/magician_defconfig | |||
@@ -136,7 +136,7 @@ CONFIG_USB_PXA27X=y | |||
136 | CONFIG_USB_ETH=m | 136 | CONFIG_USB_ETH=m |
137 | # CONFIG_USB_ETH_RNDIS is not set | 137 | # CONFIG_USB_ETH_RNDIS is not set |
138 | CONFIG_USB_GADGETFS=m | 138 | CONFIG_USB_GADGETFS=m |
139 | CONFIG_USB_FILE_STORAGE=m | 139 | CONFIG_USB_MASS_STORAGE=m |
140 | CONFIG_USB_G_SERIAL=m | 140 | CONFIG_USB_G_SERIAL=m |
141 | CONFIG_USB_CDC_COMPOSITE=m | 141 | CONFIG_USB_CDC_COMPOSITE=m |
142 | CONFIG_USB_GPIO_VBUS=y | 142 | CONFIG_USB_GPIO_VBUS=y |
diff --git a/arch/arm/configs/mini2440_defconfig b/arch/arm/configs/mini2440_defconfig index 00630e6af45c..a07948a87caa 100644 --- a/arch/arm/configs/mini2440_defconfig +++ b/arch/arm/configs/mini2440_defconfig | |||
@@ -240,7 +240,7 @@ CONFIG_USB_GADGET_S3C2410=y | |||
240 | CONFIG_USB_ZERO=m | 240 | CONFIG_USB_ZERO=m |
241 | CONFIG_USB_ETH=m | 241 | CONFIG_USB_ETH=m |
242 | CONFIG_USB_GADGETFS=m | 242 | CONFIG_USB_GADGETFS=m |
243 | CONFIG_USB_FILE_STORAGE=m | 243 | CONFIG_USB_MASS_STORAGE=m |
244 | CONFIG_USB_G_SERIAL=m | 244 | CONFIG_USB_G_SERIAL=m |
245 | CONFIG_USB_CDC_COMPOSITE=m | 245 | CONFIG_USB_CDC_COMPOSITE=m |
246 | CONFIG_MMC=y | 246 | CONFIG_MMC=y |
diff --git a/arch/arm/configs/omap1_defconfig b/arch/arm/configs/omap1_defconfig index dde2a1af7b39..42eab9a2a0fd 100644 --- a/arch/arm/configs/omap1_defconfig +++ b/arch/arm/configs/omap1_defconfig | |||
@@ -214,8 +214,7 @@ CONFIG_USB_TEST=y | |||
214 | CONFIG_USB_GADGET=y | 214 | CONFIG_USB_GADGET=y |
215 | CONFIG_USB_ETH=m | 215 | CONFIG_USB_ETH=m |
216 | # CONFIG_USB_ETH_RNDIS is not set | 216 | # CONFIG_USB_ETH_RNDIS is not set |
217 | CONFIG_USB_FILE_STORAGE=m | 217 | CONFIG_USB_MASS_STORAGE=m |
218 | CONFIG_USB_FILE_STORAGE_TEST=y | ||
219 | CONFIG_MMC=y | 218 | CONFIG_MMC=y |
220 | CONFIG_MMC_SDHCI=y | 219 | CONFIG_MMC_SDHCI=y |
221 | CONFIG_MMC_SDHCI_PLTFM=y | 220 | CONFIG_MMC_SDHCI_PLTFM=y |
diff --git a/arch/arm/configs/prima2_defconfig b/arch/arm/configs/prima2_defconfig index 807d4e2acb17..6a936c7c078a 100644 --- a/arch/arm/configs/prima2_defconfig +++ b/arch/arm/configs/prima2_defconfig | |||
@@ -37,7 +37,6 @@ CONFIG_SPI_SIRF=y | |||
37 | CONFIG_SPI_SPIDEV=y | 37 | CONFIG_SPI_SPIDEV=y |
38 | # CONFIG_HWMON is not set | 38 | # CONFIG_HWMON is not set |
39 | CONFIG_USB_GADGET=y | 39 | CONFIG_USB_GADGET=y |
40 | CONFIG_USB_FILE_STORAGE=m | ||
41 | CONFIG_USB_MASS_STORAGE=m | 40 | CONFIG_USB_MASS_STORAGE=m |
42 | CONFIG_MMC=y | 41 | CONFIG_MMC=y |
43 | CONFIG_MMC_SDHCI=y | 42 | CONFIG_MMC_SDHCI=y |
diff --git a/arch/arm/configs/qil-a9260_defconfig b/arch/arm/configs/qil-a9260_defconfig deleted file mode 100644 index 42d5db1876ab..000000000000 --- a/arch/arm/configs/qil-a9260_defconfig +++ /dev/null | |||
@@ -1,114 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | # CONFIG_SWAP is not set | ||
4 | CONFIG_SYSVIPC=y | ||
5 | CONFIG_LOG_BUF_SHIFT=14 | ||
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
7 | CONFIG_SLAB=y | ||
8 | CONFIG_MODULES=y | ||
9 | CONFIG_MODULE_UNLOAD=y | ||
10 | # CONFIG_BLK_DEV_BSG is not set | ||
11 | # CONFIG_IOSCHED_DEADLINE is not set | ||
12 | # CONFIG_IOSCHED_CFQ is not set | ||
13 | CONFIG_ARCH_AT91=y | ||
14 | CONFIG_ARCH_AT91SAM9260=y | ||
15 | CONFIG_MACH_QIL_A9260=y | ||
16 | CONFIG_AT91_SLOW_CLOCK=y | ||
17 | CONFIG_AT91_EARLY_USART0=y | ||
18 | # CONFIG_ARM_THUMB is not set | ||
19 | CONFIG_AEABI=y | ||
20 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
21 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
22 | CONFIG_CMDLINE="mem=64M console=ttyS1,115200" | ||
23 | CONFIG_FPE_NWFPE=y | ||
24 | CONFIG_PM=y | ||
25 | CONFIG_NET=y | ||
26 | CONFIG_PACKET=y | ||
27 | CONFIG_UNIX=y | ||
28 | CONFIG_INET=y | ||
29 | CONFIG_IP_MULTICAST=y | ||
30 | CONFIG_IP_ADVANCED_ROUTER=y | ||
31 | CONFIG_IP_ROUTE_VERBOSE=y | ||
32 | CONFIG_IP_PNP=y | ||
33 | CONFIG_IP_PNP_BOOTP=y | ||
34 | CONFIG_IP_PNP_RARP=y | ||
35 | CONFIG_IP_MROUTE=y | ||
36 | CONFIG_IP_PIMSM_V1=y | ||
37 | CONFIG_IP_PIMSM_V2=y | ||
38 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
39 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
40 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
41 | # CONFIG_INET_LRO is not set | ||
42 | # CONFIG_INET_DIAG is not set | ||
43 | # CONFIG_IPV6 is not set | ||
44 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
45 | CONFIG_MTD=y | ||
46 | CONFIG_MTD_PARTITIONS=y | ||
47 | CONFIG_MTD_CMDLINE_PARTS=y | ||
48 | CONFIG_MTD_CHAR=y | ||
49 | CONFIG_MTD_BLOCK=y | ||
50 | CONFIG_MTD_DATAFLASH=y | ||
51 | CONFIG_MTD_NAND=y | ||
52 | CONFIG_MTD_NAND_ATMEL=y | ||
53 | CONFIG_BLK_DEV_LOOP=y | ||
54 | # CONFIG_MISC_DEVICES is not set | ||
55 | CONFIG_SCSI=y | ||
56 | CONFIG_BLK_DEV_SD=y | ||
57 | CONFIG_SCSI_MULTI_LUN=y | ||
58 | CONFIG_NETDEVICES=y | ||
59 | CONFIG_NET_ETHERNET=y | ||
60 | CONFIG_MII=y | ||
61 | CONFIG_MACB=y | ||
62 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
63 | CONFIG_INPUT_EVDEV=y | ||
64 | CONFIG_INPUT_EVBUG=y | ||
65 | # CONFIG_KEYBOARD_ATKBD is not set | ||
66 | CONFIG_KEYBOARD_GPIO=y | ||
67 | # CONFIG_INPUT_MOUSE is not set | ||
68 | # CONFIG_SERIO is not set | ||
69 | CONFIG_SERIAL_ATMEL=y | ||
70 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
71 | CONFIG_HW_RANDOM=y | ||
72 | CONFIG_I2C=y | ||
73 | CONFIG_I2C_CHARDEV=y | ||
74 | CONFIG_SPI=y | ||
75 | CONFIG_SPI_ATMEL=y | ||
76 | # CONFIG_HWMON is not set | ||
77 | CONFIG_WATCHDOG=y | ||
78 | CONFIG_WATCHDOG_NOWAYOUT=y | ||
79 | # CONFIG_VGA_CONSOLE is not set | ||
80 | # CONFIG_USB_HID is not set | ||
81 | CONFIG_USB=y | ||
82 | CONFIG_USB_DEVICEFS=y | ||
83 | CONFIG_USB_MON=y | ||
84 | CONFIG_USB_OHCI_HCD=y | ||
85 | CONFIG_USB_STORAGE=y | ||
86 | CONFIG_USB_GADGET=y | ||
87 | CONFIG_USB_ETH=m | ||
88 | CONFIG_MMC=y | ||
89 | CONFIG_MMC_ATMELMCI=m | ||
90 | CONFIG_NEW_LEDS=y | ||
91 | CONFIG_LEDS_CLASS=y | ||
92 | CONFIG_LEDS_GPIO=y | ||
93 | CONFIG_LEDS_TRIGGERS=y | ||
94 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
95 | CONFIG_RTC_CLASS=y | ||
96 | CONFIG_RTC_DRV_M41T94=y | ||
97 | CONFIG_EXT2_FS=y | ||
98 | CONFIG_INOTIFY=y | ||
99 | CONFIG_FUSE_FS=m | ||
100 | CONFIG_VFAT_FS=y | ||
101 | CONFIG_TMPFS=y | ||
102 | CONFIG_JFFS2_FS=y | ||
103 | CONFIG_NFS_FS=y | ||
104 | CONFIG_NFS_V3=y | ||
105 | CONFIG_NFS_V3_ACL=y | ||
106 | CONFIG_NFS_V4=y | ||
107 | CONFIG_ROOT_NFS=y | ||
108 | CONFIG_NLS_CODEPAGE_437=y | ||
109 | CONFIG_NLS_CODEPAGE_850=y | ||
110 | CONFIG_NLS_ISO8859_1=y | ||
111 | CONFIG_DEBUG_KERNEL=y | ||
112 | CONFIG_DEBUG_USER=y | ||
113 | CONFIG_DEBUG_LL=y | ||
114 | # CONFIG_CRYPTO_HW is not set | ||
diff --git a/arch/arm/configs/sam9_l9260_defconfig b/arch/arm/configs/sam9_l9260_defconfig deleted file mode 100644 index b4384af1bea6..000000000000 --- a/arch/arm/configs/sam9_l9260_defconfig +++ /dev/null | |||
@@ -1,148 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | CONFIG_SYSVIPC=y | ||
4 | CONFIG_POSIX_MQUEUE=y | ||
5 | CONFIG_BSD_PROCESS_ACCT=y | ||
6 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
7 | CONFIG_AUDIT=y | ||
8 | CONFIG_LOG_BUF_SHIFT=15 | ||
9 | CONFIG_BLK_DEV_INITRD=y | ||
10 | CONFIG_SLAB=y | ||
11 | # CONFIG_BLK_DEV_BSG is not set | ||
12 | CONFIG_ARCH_AT91=y | ||
13 | CONFIG_ARCH_AT91SAM9260=y | ||
14 | CONFIG_MACH_SAM9_L9260=y | ||
15 | CONFIG_MTD_AT91_DATAFLASH_CARD=y | ||
16 | CONFIG_PREEMPT=y | ||
17 | CONFIG_LEDS=y | ||
18 | CONFIG_LEDS_CPU=y | ||
19 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
20 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
21 | CONFIG_CMDLINE="console=ttyS0,115200 mem=64M initrd=0x21100000,4194304 root=/dev/ram0 rw" | ||
22 | CONFIG_FPE_NWFPE=y | ||
23 | CONFIG_NET=y | ||
24 | CONFIG_PACKET=y | ||
25 | CONFIG_UNIX=y | ||
26 | CONFIG_XFRM_USER=y | ||
27 | CONFIG_NET_KEY=y | ||
28 | CONFIG_INET=y | ||
29 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
30 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
31 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
32 | # CONFIG_IPV6 is not set | ||
33 | CONFIG_MTD=y | ||
34 | CONFIG_MTD_PARTITIONS=y | ||
35 | CONFIG_MTD_CHAR=y | ||
36 | CONFIG_MTD_BLOCK=y | ||
37 | CONFIG_MTD_BLOCK2MTD=y | ||
38 | CONFIG_MTD_NAND=y | ||
39 | CONFIG_MTD_NAND_ATMEL=y | ||
40 | CONFIG_MTD_NAND_PLATFORM=y | ||
41 | CONFIG_MTD_UBI=y | ||
42 | CONFIG_MTD_UBI_BEB_LIMIT=25 | ||
43 | CONFIG_MTD_UBI_GLUEBI=y | ||
44 | CONFIG_BLK_DEV_LOOP=y | ||
45 | CONFIG_BLK_DEV_RAM=y | ||
46 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
47 | # CONFIG_MISC_DEVICES is not set | ||
48 | CONFIG_RAID_ATTRS=y | ||
49 | CONFIG_SCSI=y | ||
50 | CONFIG_BLK_DEV_SD=y | ||
51 | CONFIG_CHR_DEV_SG=y | ||
52 | CONFIG_SCSI_MULTI_LUN=y | ||
53 | CONFIG_SCSI_CONSTANTS=y | ||
54 | CONFIG_SCSI_LOGGING=y | ||
55 | # CONFIG_SCSI_LOWLEVEL is not set | ||
56 | CONFIG_NETDEVICES=y | ||
57 | CONFIG_NET_ETHERNET=y | ||
58 | CONFIG_MII=y | ||
59 | CONFIG_MACB=y | ||
60 | # CONFIG_NETDEV_1000 is not set | ||
61 | # CONFIG_NETDEV_10000 is not set | ||
62 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
63 | # CONFIG_INPUT_KEYBOARD is not set | ||
64 | # CONFIG_INPUT_MOUSE is not set | ||
65 | # CONFIG_SERIO is not set | ||
66 | CONFIG_SERIAL_ATMEL=y | ||
67 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
68 | CONFIG_LEGACY_PTY_COUNT=16 | ||
69 | # CONFIG_HW_RANDOM is not set | ||
70 | # CONFIG_HWMON is not set | ||
71 | # CONFIG_VGA_CONSOLE is not set | ||
72 | # CONFIG_HID_SUPPORT is not set | ||
73 | CONFIG_USB=y | ||
74 | CONFIG_USB_DEVICEFS=y | ||
75 | CONFIG_USB_OHCI_HCD=y | ||
76 | CONFIG_USB_STORAGE=y | ||
77 | CONFIG_USB_LIBUSUAL=y | ||
78 | CONFIG_USB_GADGET=y | ||
79 | CONFIG_MMC=y | ||
80 | CONFIG_MMC_DEBUG=y | ||
81 | CONFIG_NEW_LEDS=y | ||
82 | CONFIG_LEDS_CLASS=y | ||
83 | CONFIG_LEDS_GPIO=y | ||
84 | CONFIG_LEDS_TRIGGERS=y | ||
85 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
86 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
87 | CONFIG_RTC_CLASS=y | ||
88 | CONFIG_RTC_DRV_DS1553=y | ||
89 | CONFIG_RTC_DRV_DS1742=y | ||
90 | CONFIG_RTC_DRV_M48T86=y | ||
91 | CONFIG_RTC_DRV_V3020=y | ||
92 | CONFIG_EXT2_FS=y | ||
93 | CONFIG_EXT2_FS_XATTR=y | ||
94 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
95 | CONFIG_EXT2_FS_SECURITY=y | ||
96 | CONFIG_EXT3_FS=y | ||
97 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
98 | CONFIG_EXT3_FS_SECURITY=y | ||
99 | CONFIG_INOTIFY=y | ||
100 | CONFIG_MSDOS_FS=y | ||
101 | CONFIG_VFAT_FS=y | ||
102 | CONFIG_TMPFS=y | ||
103 | CONFIG_JFFS2_FS=y | ||
104 | CONFIG_NFS_FS=y | ||
105 | CONFIG_NFS_V3=y | ||
106 | CONFIG_NLS_CODEPAGE_437=y | ||
107 | CONFIG_NLS_CODEPAGE_737=y | ||
108 | CONFIG_NLS_CODEPAGE_775=y | ||
109 | CONFIG_NLS_CODEPAGE_850=y | ||
110 | CONFIG_NLS_CODEPAGE_852=y | ||
111 | CONFIG_NLS_CODEPAGE_855=y | ||
112 | CONFIG_NLS_CODEPAGE_857=y | ||
113 | CONFIG_NLS_CODEPAGE_860=y | ||
114 | CONFIG_NLS_CODEPAGE_861=y | ||
115 | CONFIG_NLS_CODEPAGE_862=y | ||
116 | CONFIG_NLS_CODEPAGE_863=y | ||
117 | CONFIG_NLS_CODEPAGE_864=y | ||
118 | CONFIG_NLS_CODEPAGE_865=y | ||
119 | CONFIG_NLS_CODEPAGE_866=y | ||
120 | CONFIG_NLS_CODEPAGE_869=y | ||
121 | CONFIG_NLS_CODEPAGE_936=y | ||
122 | CONFIG_NLS_CODEPAGE_950=y | ||
123 | CONFIG_NLS_CODEPAGE_932=y | ||
124 | CONFIG_NLS_CODEPAGE_949=y | ||
125 | CONFIG_NLS_CODEPAGE_874=y | ||
126 | CONFIG_NLS_ISO8859_8=y | ||
127 | CONFIG_NLS_CODEPAGE_1250=y | ||
128 | CONFIG_NLS_CODEPAGE_1251=y | ||
129 | CONFIG_NLS_ASCII=y | ||
130 | CONFIG_NLS_ISO8859_1=y | ||
131 | CONFIG_NLS_ISO8859_2=y | ||
132 | CONFIG_NLS_ISO8859_3=y | ||
133 | CONFIG_NLS_ISO8859_4=y | ||
134 | CONFIG_NLS_ISO8859_5=y | ||
135 | CONFIG_NLS_ISO8859_6=y | ||
136 | CONFIG_NLS_ISO8859_7=y | ||
137 | CONFIG_NLS_ISO8859_9=y | ||
138 | CONFIG_NLS_ISO8859_13=y | ||
139 | CONFIG_NLS_ISO8859_14=y | ||
140 | CONFIG_NLS_ISO8859_15=y | ||
141 | CONFIG_NLS_KOI8_R=y | ||
142 | CONFIG_NLS_KOI8_U=y | ||
143 | CONFIG_NLS_UTF8=y | ||
144 | CONFIG_MAGIC_SYSRQ=y | ||
145 | CONFIG_UNUSED_SYMBOLS=y | ||
146 | CONFIG_DEBUG_FS=y | ||
147 | CONFIG_DEBUG_KERNEL=y | ||
148 | CONFIG_DEBUG_LL=y | ||
diff --git a/arch/arm/configs/spitz_defconfig b/arch/arm/configs/spitz_defconfig index df77931a4326..2e0419d1b964 100644 --- a/arch/arm/configs/spitz_defconfig +++ b/arch/arm/configs/spitz_defconfig | |||
@@ -214,7 +214,7 @@ CONFIG_USB_GADGET_DUMMY_HCD=y | |||
214 | CONFIG_USB_ZERO=m | 214 | CONFIG_USB_ZERO=m |
215 | CONFIG_USB_ETH=m | 215 | CONFIG_USB_ETH=m |
216 | CONFIG_USB_GADGETFS=m | 216 | CONFIG_USB_GADGETFS=m |
217 | CONFIG_USB_FILE_STORAGE=m | 217 | CONFIG_USB_MASS_STORAGE=m |
218 | CONFIG_USB_G_SERIAL=m | 218 | CONFIG_USB_G_SERIAL=m |
219 | CONFIG_MMC=y | 219 | CONFIG_MMC=y |
220 | CONFIG_MMC_PXA=y | 220 | CONFIG_MMC_PXA=y |
diff --git a/arch/arm/configs/stamp9g20_defconfig b/arch/arm/configs/stamp9g20_defconfig deleted file mode 100644 index 52f1488591c7..000000000000 --- a/arch/arm/configs/stamp9g20_defconfig +++ /dev/null | |||
@@ -1,128 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | # CONFIG_SWAP is not set | ||
4 | CONFIG_SYSVIPC=y | ||
5 | CONFIG_TREE_PREEMPT_RCU=y | ||
6 | CONFIG_LOG_BUF_SHIFT=14 | ||
7 | CONFIG_BLK_DEV_INITRD=y | ||
8 | CONFIG_SLAB=y | ||
9 | CONFIG_MODULES=y | ||
10 | CONFIG_MODULE_UNLOAD=y | ||
11 | # CONFIG_LBDAF is not set | ||
12 | # CONFIG_BLK_DEV_BSG is not set | ||
13 | # CONFIG_IOSCHED_DEADLINE is not set | ||
14 | CONFIG_ARCH_AT91=y | ||
15 | CONFIG_ARCH_AT91SAM9G20=y | ||
16 | CONFIG_MACH_PORTUXG20=y | ||
17 | CONFIG_MACH_STAMP9G20=y | ||
18 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y | ||
19 | CONFIG_AT91_SLOW_CLOCK=y | ||
20 | CONFIG_NO_HZ=y | ||
21 | CONFIG_HIGH_RES_TIMERS=y | ||
22 | CONFIG_PREEMPT=y | ||
23 | CONFIG_AEABI=y | ||
24 | # CONFIG_OABI_COMPAT is not set | ||
25 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
26 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
27 | CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" | ||
28 | CONFIG_KEXEC=y | ||
29 | CONFIG_CPU_IDLE=y | ||
30 | CONFIG_PM=y | ||
31 | CONFIG_NET=y | ||
32 | CONFIG_PACKET=y | ||
33 | CONFIG_UNIX=y | ||
34 | CONFIG_INET=y | ||
35 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
36 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
37 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
38 | # CONFIG_INET_LRO is not set | ||
39 | # CONFIG_IPV6 is not set | ||
40 | # CONFIG_WIRELESS is not set | ||
41 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
42 | CONFIG_MTD=y | ||
43 | CONFIG_MTD_CONCAT=y | ||
44 | CONFIG_MTD_PARTITIONS=y | ||
45 | CONFIG_MTD_CMDLINE_PARTS=y | ||
46 | CONFIG_MTD_CHAR=y | ||
47 | CONFIG_MTD_BLOCK=y | ||
48 | CONFIG_MTD_DATAFLASH=y | ||
49 | CONFIG_MTD_NAND=y | ||
50 | CONFIG_MTD_NAND_ATMEL=y | ||
51 | CONFIG_BLK_DEV_LOOP=y | ||
52 | CONFIG_BLK_DEV_RAM=y | ||
53 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
54 | # CONFIG_MISC_DEVICES is not set | ||
55 | CONFIG_SCSI=y | ||
56 | CONFIG_BLK_DEV_SD=y | ||
57 | CONFIG_SCSI_MULTI_LUN=y | ||
58 | # CONFIG_SCSI_LOWLEVEL is not set | ||
59 | CONFIG_NETDEVICES=y | ||
60 | CONFIG_NET_ETHERNET=y | ||
61 | CONFIG_MACB=y | ||
62 | # CONFIG_NETDEV_1000 is not set | ||
63 | # CONFIG_NETDEV_10000 is not set | ||
64 | # CONFIG_WLAN is not set | ||
65 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
66 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=320 | ||
67 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240 | ||
68 | # CONFIG_INPUT_KEYBOARD is not set | ||
69 | # CONFIG_INPUT_MOUSE is not set | ||
70 | # CONFIG_SERIO is not set | ||
71 | CONFIG_SERIAL_ATMEL=y | ||
72 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
73 | # CONFIG_LEGACY_PTYS is not set | ||
74 | # CONFIG_HW_RANDOM is not set | ||
75 | CONFIG_I2C=y | ||
76 | CONFIG_I2C_CHARDEV=y | ||
77 | CONFIG_I2C_GPIO=y | ||
78 | CONFIG_SPI=y | ||
79 | CONFIG_SPI_ATMEL=y | ||
80 | CONFIG_SPI_SPIDEV=y | ||
81 | CONFIG_GPIO_SYSFS=y | ||
82 | CONFIG_W1=y | ||
83 | CONFIG_W1_MASTER_GPIO=y | ||
84 | CONFIG_W1_SLAVE_THERM=y | ||
85 | CONFIG_W1_SLAVE_DS2431=y | ||
86 | # CONFIG_HWMON is not set | ||
87 | CONFIG_WATCHDOG=y | ||
88 | CONFIG_AT91SAM9X_WATCHDOG=y | ||
89 | # CONFIG_VGA_CONSOLE is not set | ||
90 | # CONFIG_HID_SUPPORT is not set | ||
91 | CONFIG_USB=y | ||
92 | CONFIG_USB_DEVICEFS=y | ||
93 | # CONFIG_USB_DEVICE_CLASS is not set | ||
94 | CONFIG_USB_MON=y | ||
95 | CONFIG_USB_OHCI_HCD=y | ||
96 | CONFIG_USB_STORAGE=y | ||
97 | CONFIG_USB_GADGET=m | ||
98 | CONFIG_USB_ZERO=m | ||
99 | CONFIG_USB_ETH=m | ||
100 | CONFIG_USB_FILE_STORAGE=m | ||
101 | CONFIG_USB_G_SERIAL=m | ||
102 | CONFIG_MMC=y | ||
103 | CONFIG_MMC_ATMELMCI=y | ||
104 | CONFIG_NEW_LEDS=y | ||
105 | CONFIG_LEDS_CLASS=y | ||
106 | CONFIG_LEDS_GPIO=y | ||
107 | CONFIG_LEDS_TRIGGERS=y | ||
108 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
109 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
110 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
111 | CONFIG_RTC_CLASS=y | ||
112 | CONFIG_RTC_DRV_AT91SAM9=y | ||
113 | CONFIG_EXT2_FS=y | ||
114 | CONFIG_EXT3_FS=y | ||
115 | CONFIG_INOTIFY=y | ||
116 | CONFIG_VFAT_FS=y | ||
117 | CONFIG_TMPFS=y | ||
118 | CONFIG_JFFS2_FS=y | ||
119 | CONFIG_JFFS2_SUMMARY=y | ||
120 | CONFIG_NFS_FS=y | ||
121 | CONFIG_NFS_V3=y | ||
122 | CONFIG_NLS_CODEPAGE_437=y | ||
123 | CONFIG_NLS_CODEPAGE_850=y | ||
124 | CONFIG_NLS_ISO8859_1=y | ||
125 | CONFIG_NLS_ISO8859_15=y | ||
126 | CONFIG_NLS_UTF8=y | ||
127 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
128 | # CONFIG_ARM_UNWIND is not set | ||
diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig index da6845493caa..250625d5223f 100644 --- a/arch/arm/configs/u8500_defconfig +++ b/arch/arm/configs/u8500_defconfig | |||
@@ -69,6 +69,8 @@ CONFIG_GPIO_TC3589X=y | |||
69 | CONFIG_POWER_SUPPLY=y | 69 | CONFIG_POWER_SUPPLY=y |
70 | CONFIG_AB8500_BM=y | 70 | CONFIG_AB8500_BM=y |
71 | CONFIG_AB8500_BATTERY_THERM_ON_BATCTRL=y | 71 | CONFIG_AB8500_BATTERY_THERM_ON_BATCTRL=y |
72 | CONFIG_THERMAL=y | ||
73 | CONFIG_CPU_THERMAL=y | ||
72 | CONFIG_MFD_STMPE=y | 74 | CONFIG_MFD_STMPE=y |
73 | CONFIG_MFD_TC3589X=y | 75 | CONFIG_MFD_TC3589X=y |
74 | CONFIG_AB5500_CORE=y | 76 | CONFIG_AB5500_CORE=y |
diff --git a/arch/arm/configs/usb-a9260_defconfig b/arch/arm/configs/usb-a9260_defconfig deleted file mode 100644 index a1501e1e1a90..000000000000 --- a/arch/arm/configs/usb-a9260_defconfig +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | # CONFIG_SWAP is not set | ||
4 | CONFIG_SYSVIPC=y | ||
5 | CONFIG_LOG_BUF_SHIFT=14 | ||
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
7 | CONFIG_SLAB=y | ||
8 | CONFIG_MODULES=y | ||
9 | CONFIG_MODULE_UNLOAD=y | ||
10 | # CONFIG_BLK_DEV_BSG is not set | ||
11 | # CONFIG_IOSCHED_DEADLINE is not set | ||
12 | # CONFIG_IOSCHED_CFQ is not set | ||
13 | CONFIG_ARCH_AT91=y | ||
14 | CONFIG_ARCH_AT91SAM9260=y | ||
15 | CONFIG_MACH_USB_A9260=y | ||
16 | CONFIG_AT91_SLOW_CLOCK=y | ||
17 | # CONFIG_ARM_THUMB is not set | ||
18 | CONFIG_AEABI=y | ||
19 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
20 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
21 | CONFIG_CMDLINE="mem=64M console=ttyS0,115200" | ||
22 | CONFIG_FPE_NWFPE=y | ||
23 | CONFIG_PM=y | ||
24 | CONFIG_NET=y | ||
25 | CONFIG_PACKET=y | ||
26 | CONFIG_UNIX=y | ||
27 | CONFIG_INET=y | ||
28 | CONFIG_IP_MULTICAST=y | ||
29 | CONFIG_IP_ADVANCED_ROUTER=y | ||
30 | CONFIG_IP_ROUTE_VERBOSE=y | ||
31 | CONFIG_IP_PNP=y | ||
32 | CONFIG_IP_PNP_BOOTP=y | ||
33 | CONFIG_IP_PNP_RARP=y | ||
34 | CONFIG_IP_MROUTE=y | ||
35 | CONFIG_IP_PIMSM_V1=y | ||
36 | CONFIG_IP_PIMSM_V2=y | ||
37 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
38 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
39 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
40 | # CONFIG_INET_LRO is not set | ||
41 | # CONFIG_INET_DIAG is not set | ||
42 | # CONFIG_IPV6 is not set | ||
43 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
44 | CONFIG_MTD=y | ||
45 | CONFIG_MTD_PARTITIONS=y | ||
46 | CONFIG_MTD_CMDLINE_PARTS=y | ||
47 | CONFIG_MTD_CHAR=y | ||
48 | CONFIG_MTD_BLOCK=y | ||
49 | CONFIG_MTD_DATAFLASH=y | ||
50 | CONFIG_MTD_NAND=y | ||
51 | CONFIG_MTD_NAND_ATMEL=y | ||
52 | CONFIG_BLK_DEV_LOOP=y | ||
53 | # CONFIG_MISC_DEVICES is not set | ||
54 | CONFIG_SCSI=y | ||
55 | CONFIG_BLK_DEV_SD=y | ||
56 | CONFIG_SCSI_MULTI_LUN=y | ||
57 | CONFIG_NETDEVICES=y | ||
58 | CONFIG_NET_ETHERNET=y | ||
59 | CONFIG_MII=y | ||
60 | CONFIG_MACB=y | ||
61 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
62 | CONFIG_INPUT_EVDEV=y | ||
63 | CONFIG_INPUT_EVBUG=y | ||
64 | # CONFIG_KEYBOARD_ATKBD is not set | ||
65 | CONFIG_KEYBOARD_GPIO=y | ||
66 | # CONFIG_INPUT_MOUSE is not set | ||
67 | # CONFIG_SERIO is not set | ||
68 | CONFIG_SERIAL_ATMEL=y | ||
69 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
70 | CONFIG_HW_RANDOM=y | ||
71 | CONFIG_SPI=y | ||
72 | CONFIG_SPI_ATMEL=y | ||
73 | # CONFIG_HWMON is not set | ||
74 | # CONFIG_VGA_CONSOLE is not set | ||
75 | # CONFIG_USB_HID is not set | ||
76 | CONFIG_USB=y | ||
77 | CONFIG_USB_DEVICEFS=y | ||
78 | CONFIG_USB_MON=y | ||
79 | CONFIG_USB_OHCI_HCD=y | ||
80 | CONFIG_USB_STORAGE=y | ||
81 | CONFIG_USB_GADGET=y | ||
82 | CONFIG_USB_ETH=m | ||
83 | CONFIG_NEW_LEDS=y | ||
84 | CONFIG_LEDS_CLASS=y | ||
85 | CONFIG_LEDS_GPIO=y | ||
86 | CONFIG_LEDS_TRIGGERS=y | ||
87 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
88 | CONFIG_EXT2_FS=y | ||
89 | CONFIG_INOTIFY=y | ||
90 | CONFIG_FUSE_FS=m | ||
91 | CONFIG_VFAT_FS=y | ||
92 | CONFIG_TMPFS=y | ||
93 | CONFIG_JFFS2_FS=y | ||
94 | CONFIG_NFS_FS=y | ||
95 | CONFIG_NFS_V3=y | ||
96 | CONFIG_NFS_V3_ACL=y | ||
97 | CONFIG_NFS_V4=y | ||
98 | CONFIG_ROOT_NFS=y | ||
99 | CONFIG_NLS_CODEPAGE_437=y | ||
100 | CONFIG_NLS_CODEPAGE_850=y | ||
101 | CONFIG_NLS_ISO8859_1=y | ||
102 | CONFIG_DEBUG_KERNEL=y | ||
103 | CONFIG_DEBUG_USER=y | ||
104 | CONFIG_DEBUG_LL=y | ||
105 | # CONFIG_CRYPTO_HW is not set | ||
diff --git a/arch/arm/configs/viper_defconfig b/arch/arm/configs/viper_defconfig index 1d01ddd33122..d36e0d3c86ec 100644 --- a/arch/arm/configs/viper_defconfig +++ b/arch/arm/configs/viper_defconfig | |||
@@ -139,7 +139,7 @@ CONFIG_USB_SERIAL_MCT_U232=m | |||
139 | CONFIG_USB_GADGET=m | 139 | CONFIG_USB_GADGET=m |
140 | CONFIG_USB_ETH=m | 140 | CONFIG_USB_ETH=m |
141 | CONFIG_USB_GADGETFS=m | 141 | CONFIG_USB_GADGETFS=m |
142 | CONFIG_USB_FILE_STORAGE=m | 142 | CONFIG_USB_MASS_STORAGE=m |
143 | CONFIG_USB_G_SERIAL=m | 143 | CONFIG_USB_G_SERIAL=m |
144 | CONFIG_USB_G_PRINTER=m | 144 | CONFIG_USB_G_PRINTER=m |
145 | CONFIG_RTC_CLASS=y | 145 | CONFIG_RTC_CLASS=y |
diff --git a/arch/arm/configs/zeus_defconfig b/arch/arm/configs/zeus_defconfig index 547a3c1e59db..731d4f985310 100644 --- a/arch/arm/configs/zeus_defconfig +++ b/arch/arm/configs/zeus_defconfig | |||
@@ -143,7 +143,7 @@ CONFIG_USB_GADGET=m | |||
143 | CONFIG_USB_PXA27X=y | 143 | CONFIG_USB_PXA27X=y |
144 | CONFIG_USB_ETH=m | 144 | CONFIG_USB_ETH=m |
145 | CONFIG_USB_GADGETFS=m | 145 | CONFIG_USB_GADGETFS=m |
146 | CONFIG_USB_FILE_STORAGE=m | 146 | CONFIG_USB_MASS_STORAGE=m |
147 | CONFIG_USB_G_SERIAL=m | 147 | CONFIG_USB_G_SERIAL=m |
148 | CONFIG_USB_G_PRINTER=m | 148 | CONFIG_USB_G_PRINTER=m |
149 | CONFIG_MMC=y | 149 | CONFIG_MMC=y |
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild index f70ae175a3d6..d3db39860b9c 100644 --- a/arch/arm/include/asm/Kbuild +++ b/arch/arm/include/asm/Kbuild | |||
@@ -16,7 +16,6 @@ generic-y += local64.h | |||
16 | generic-y += msgbuf.h | 16 | generic-y += msgbuf.h |
17 | generic-y += param.h | 17 | generic-y += param.h |
18 | generic-y += parport.h | 18 | generic-y += parport.h |
19 | generic-y += percpu.h | ||
20 | generic-y += poll.h | 19 | generic-y += poll.h |
21 | generic-y += resource.h | 20 | generic-y += resource.h |
22 | generic-y += sections.h | 21 | generic-y += sections.h |
@@ -31,5 +30,6 @@ generic-y += sockios.h | |||
31 | generic-y += termbits.h | 30 | generic-y += termbits.h |
32 | generic-y += termios.h | 31 | generic-y += termios.h |
33 | generic-y += timex.h | 32 | generic-y += timex.h |
33 | generic-y += trace_clock.h | ||
34 | generic-y += types.h | 34 | generic-y += types.h |
35 | generic-y += unaligned.h | 35 | generic-y += unaligned.h |
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 2ef95813fce0..eb87200aa4b5 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -250,6 +250,7 @@ | |||
250 | * Beware, it also clobers LR. | 250 | * Beware, it also clobers LR. |
251 | */ | 251 | */ |
252 | .macro safe_svcmode_maskall reg:req | 252 | .macro safe_svcmode_maskall reg:req |
253 | #if __LINUX_ARM_ARCH__ >= 6 | ||
253 | mrs \reg , cpsr | 254 | mrs \reg , cpsr |
254 | mov lr , \reg | 255 | mov lr , \reg |
255 | and lr , lr , #MODE_MASK | 256 | and lr , lr , #MODE_MASK |
@@ -266,6 +267,13 @@ THUMB( orr \reg , \reg , #PSR_T_BIT ) | |||
266 | __ERET | 267 | __ERET |
267 | 1: msr cpsr_c, \reg | 268 | 1: msr cpsr_c, \reg |
268 | 2: | 269 | 2: |
270 | #else | ||
271 | /* | ||
272 | * workaround for possibly broken pre-v6 hardware | ||
273 | * (akita, Sharp Zaurus C-1000, PXA270-based) | ||
274 | */ | ||
275 | setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, \reg | ||
276 | #endif | ||
269 | .endm | 277 | .endm |
270 | 278 | ||
271 | /* | 279 | /* |
diff --git a/arch/arm/include/asm/cpu.h b/arch/arm/include/asm/cpu.h index d797223b39d5..2744f0602550 100644 --- a/arch/arm/include/asm/cpu.h +++ b/arch/arm/include/asm/cpu.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | struct cpuinfo_arm { | 16 | struct cpuinfo_arm { |
17 | struct cpu cpu; | 17 | struct cpu cpu; |
18 | u32 cpuid; | ||
18 | #ifdef CONFIG_SMP | 19 | #ifdef CONFIG_SMP |
19 | unsigned int loops_per_jiffy; | 20 | unsigned int loops_per_jiffy; |
20 | #endif | 21 | #endif |
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h index cb47d28cbe1f..a59dcb5ab5fc 100644 --- a/arch/arm/include/asm/cputype.h +++ b/arch/arm/include/asm/cputype.h | |||
@@ -25,6 +25,19 @@ | |||
25 | #define CPUID_EXT_ISAR4 "c2, 4" | 25 | #define CPUID_EXT_ISAR4 "c2, 4" |
26 | #define CPUID_EXT_ISAR5 "c2, 5" | 26 | #define CPUID_EXT_ISAR5 "c2, 5" |
27 | 27 | ||
28 | #define MPIDR_SMP_BITMASK (0x3 << 30) | ||
29 | #define MPIDR_SMP_VALUE (0x2 << 30) | ||
30 | |||
31 | #define MPIDR_MT_BITMASK (0x1 << 24) | ||
32 | |||
33 | #define MPIDR_HWID_BITMASK 0xFFFFFF | ||
34 | |||
35 | #define MPIDR_LEVEL_BITS 8 | ||
36 | #define MPIDR_LEVEL_MASK ((1 << MPIDR_LEVEL_BITS) - 1) | ||
37 | |||
38 | #define MPIDR_AFFINITY_LEVEL(mpidr, level) \ | ||
39 | ((mpidr >> (MPIDR_LEVEL_BITS * level)) & MPIDR_LEVEL_MASK) | ||
40 | |||
28 | extern unsigned int processor_id; | 41 | extern unsigned int processor_id; |
29 | 42 | ||
30 | #ifdef CONFIG_CPU_CP15 | 43 | #ifdef CONFIG_CPU_CP15 |
diff --git a/arch/arm/include/asm/cti.h b/arch/arm/include/asm/cti.h index a0ada3ea4358..f2e5cad3f306 100644 --- a/arch/arm/include/asm/cti.h +++ b/arch/arm/include/asm/cti.h | |||
@@ -146,15 +146,7 @@ static inline void cti_irq_ack(struct cti *cti) | |||
146 | */ | 146 | */ |
147 | static inline void cti_unlock(struct cti *cti) | 147 | static inline void cti_unlock(struct cti *cti) |
148 | { | 148 | { |
149 | void __iomem *base = cti->base; | 149 | __raw_writel(LOCKCODE, cti->base + LOCKACCESS); |
150 | unsigned long val; | ||
151 | |||
152 | val = __raw_readl(base + LOCKSTATUS); | ||
153 | |||
154 | if (val & 1) { | ||
155 | val = LOCKCODE; | ||
156 | __raw_writel(val, base + LOCKACCESS); | ||
157 | } | ||
158 | } | 150 | } |
159 | 151 | ||
160 | /** | 152 | /** |
@@ -166,14 +158,6 @@ static inline void cti_unlock(struct cti *cti) | |||
166 | */ | 158 | */ |
167 | static inline void cti_lock(struct cti *cti) | 159 | static inline void cti_lock(struct cti *cti) |
168 | { | 160 | { |
169 | void __iomem *base = cti->base; | 161 | __raw_writel(~LOCKCODE, cti->base + LOCKACCESS); |
170 | unsigned long val; | ||
171 | |||
172 | val = __raw_readl(base + LOCKSTATUS); | ||
173 | |||
174 | if (!(val & 1)) { | ||
175 | val = ~LOCKCODE; | ||
176 | __raw_writel(val, base + LOCKACCESS); | ||
177 | } | ||
178 | } | 162 | } |
179 | #endif | 163 | #endif |
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h index c4c87bc12231..3b2c40b5bfa2 100644 --- a/arch/arm/include/asm/hardware/cache-l2x0.h +++ b/arch/arm/include/asm/hardware/cache-l2x0.h | |||
@@ -102,6 +102,10 @@ | |||
102 | 102 | ||
103 | #define L2X0_ADDR_FILTER_EN 1 | 103 | #define L2X0_ADDR_FILTER_EN 1 |
104 | 104 | ||
105 | #define L2X0_CTRL_EN 1 | ||
106 | |||
107 | #define L2X0_WAY_SIZE_SHIFT 3 | ||
108 | |||
105 | #ifndef __ASSEMBLY__ | 109 | #ifndef __ASSEMBLY__ |
106 | extern void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask); | 110 | extern void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask); |
107 | #if defined(CONFIG_CACHE_L2X0) && defined(CONFIG_OF) | 111 | #if defined(CONFIG_CACHE_L2X0) && defined(CONFIG_OF) |
@@ -126,6 +130,7 @@ struct l2x0_regs { | |||
126 | unsigned long filter_end; | 130 | unsigned long filter_end; |
127 | unsigned long prefetch_ctrl; | 131 | unsigned long prefetch_ctrl; |
128 | unsigned long pwr_ctrl; | 132 | unsigned long pwr_ctrl; |
133 | unsigned long ctrl; | ||
129 | }; | 134 | }; |
130 | 135 | ||
131 | extern struct l2x0_regs l2x0_saved_regs; | 136 | extern struct l2x0_regs l2x0_saved_regs; |
diff --git a/arch/arm/include/asm/hardware/sp810.h b/arch/arm/include/asm/hardware/sp810.h index 6b9b077d86b3..afd7e916472f 100644 --- a/arch/arm/include/asm/hardware/sp810.h +++ b/arch/arm/include/asm/hardware/sp810.h | |||
@@ -56,6 +56,8 @@ | |||
56 | #define SCCTRL_TIMEREN1SEL_REFCLK (0 << 17) | 56 | #define SCCTRL_TIMEREN1SEL_REFCLK (0 << 17) |
57 | #define SCCTRL_TIMEREN1SEL_TIMCLK (1 << 17) | 57 | #define SCCTRL_TIMEREN1SEL_TIMCLK (1 << 17) |
58 | 58 | ||
59 | #define SCCTRL_TIMERENnSEL_SHIFT(n) (15 + ((n) * 2)) | ||
60 | |||
59 | static inline void sysctl_soft_reset(void __iomem *base) | 61 | static inline void sysctl_soft_reset(void __iomem *base) |
60 | { | 62 | { |
61 | /* switch to slow mode */ | 63 | /* switch to slow mode */ |
diff --git a/arch/arm/include/asm/hardware/vic.h b/arch/arm/include/asm/hardware/vic.h index e14af1a1a320..2bebad36fc83 100644 --- a/arch/arm/include/asm/hardware/vic.h +++ b/arch/arm/include/asm/hardware/vic.h | |||
@@ -47,7 +47,7 @@ | |||
47 | struct device_node; | 47 | struct device_node; |
48 | struct pt_regs; | 48 | struct pt_regs; |
49 | 49 | ||
50 | void __vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources, | 50 | void __vic_init(void __iomem *base, int irq_start, u32 vic_sources, |
51 | u32 resume_sources, struct device_node *node); | 51 | u32 resume_sources, struct device_node *node); |
52 | void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources, u32 resume_sources); | 52 | void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources, u32 resume_sources); |
53 | int vic_of_init(struct device_node *node, struct device_node *parent); | 53 | int vic_of_init(struct device_node *node, struct device_node *parent); |
diff --git a/arch/arm/include/asm/hw_breakpoint.h b/arch/arm/include/asm/hw_breakpoint.h index c190bc992f0e..01169dd723f1 100644 --- a/arch/arm/include/asm/hw_breakpoint.h +++ b/arch/arm/include/asm/hw_breakpoint.h | |||
@@ -98,12 +98,12 @@ static inline void decode_ctrl_reg(u32 reg, | |||
98 | #define ARM_BASE_WCR 112 | 98 | #define ARM_BASE_WCR 112 |
99 | 99 | ||
100 | /* Accessor macros for the debug registers. */ | 100 | /* Accessor macros for the debug registers. */ |
101 | #define ARM_DBG_READ(M, OP2, VAL) do {\ | 101 | #define ARM_DBG_READ(N, M, OP2, VAL) do {\ |
102 | asm volatile("mrc p14, 0, %0, c0," #M ", " #OP2 : "=r" (VAL));\ | 102 | asm volatile("mrc p14, 0, %0, " #N "," #M ", " #OP2 : "=r" (VAL));\ |
103 | } while (0) | 103 | } while (0) |
104 | 104 | ||
105 | #define ARM_DBG_WRITE(M, OP2, VAL) do {\ | 105 | #define ARM_DBG_WRITE(N, M, OP2, VAL) do {\ |
106 | asm volatile("mcr p14, 0, %0, c0," #M ", " #OP2 : : "r" (VAL));\ | 106 | asm volatile("mcr p14, 0, %0, " #N "," #M ", " #OP2 : : "r" (VAL));\ |
107 | } while (0) | 107 | } while (0) |
108 | 108 | ||
109 | struct notifier_block; | 109 | struct notifier_block; |
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 42f042ee4ada..652b56086de7 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -374,7 +374,7 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr); | |||
374 | 374 | ||
375 | #ifdef CONFIG_MMU | 375 | #ifdef CONFIG_MMU |
376 | #define ARCH_HAS_VALID_PHYS_ADDR_RANGE | 376 | #define ARCH_HAS_VALID_PHYS_ADDR_RANGE |
377 | extern int valid_phys_addr_range(unsigned long addr, size_t size); | 377 | extern int valid_phys_addr_range(phys_addr_t addr, size_t size); |
378 | extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size); | 378 | extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size); |
379 | extern int devmem_is_allowed(unsigned long pfn); | 379 | extern int devmem_is_allowed(unsigned long pfn); |
380 | #endif | 380 | #endif |
diff --git a/arch/arm/include/asm/mach/serial_at91.h b/arch/arm/include/asm/mach/serial_at91.h deleted file mode 100644 index ea6d063923b8..000000000000 --- a/arch/arm/include/asm/mach/serial_at91.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/mach/serial_at91.h | ||
3 | * | ||
4 | * Based on serial_sa1100.h by Nicolas Pitre | ||
5 | * | ||
6 | * Copyright (C) 2002 ATMEL Rousset | ||
7 | * | ||
8 | * Low level machine dependent UART functions. | ||
9 | */ | ||
10 | |||
11 | struct uart_port; | ||
12 | |||
13 | /* | ||
14 | * This is a temporary structure for registering these | ||
15 | * functions; it is intended to be discarded after boot. | ||
16 | */ | ||
17 | struct atmel_port_fns { | ||
18 | void (*set_mctrl)(struct uart_port *, u_int); | ||
19 | u_int (*get_mctrl)(struct uart_port *); | ||
20 | void (*enable_ms)(struct uart_port *); | ||
21 | void (*pm)(struct uart_port *, u_int, u_int); | ||
22 | int (*set_wake)(struct uart_port *, u_int); | ||
23 | int (*open)(struct uart_port *); | ||
24 | void (*close)(struct uart_port *); | ||
25 | }; | ||
26 | |||
27 | #if defined(CONFIG_SERIAL_ATMEL) | ||
28 | void atmel_register_uart_fns(struct atmel_port_fns *fns); | ||
29 | #else | ||
30 | #define atmel_register_uart_fns(fns) do { } while (0) | ||
31 | #endif | ||
32 | |||
33 | |||
diff --git a/arch/arm/include/asm/mach/serial_sa1100.h b/arch/arm/include/asm/mach/serial_sa1100.h deleted file mode 100644 index d09064bf95a0..000000000000 --- a/arch/arm/include/asm/mach/serial_sa1100.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/mach/serial_sa1100.h | ||
3 | * | ||
4 | * Author: Nicolas Pitre | ||
5 | * | ||
6 | * Moved and changed lots, Russell King | ||
7 | * | ||
8 | * Low level machine dependent UART functions. | ||
9 | */ | ||
10 | |||
11 | struct uart_port; | ||
12 | struct uart_info; | ||
13 | |||
14 | /* | ||
15 | * This is a temporary structure for registering these | ||
16 | * functions; it is intended to be discarded after boot. | ||
17 | */ | ||
18 | struct sa1100_port_fns { | ||
19 | void (*set_mctrl)(struct uart_port *, u_int); | ||
20 | u_int (*get_mctrl)(struct uart_port *); | ||
21 | void (*pm)(struct uart_port *, u_int, u_int); | ||
22 | int (*set_wake)(struct uart_port *, u_int); | ||
23 | }; | ||
24 | |||
25 | #ifdef CONFIG_SERIAL_SA1100 | ||
26 | void sa1100_register_uart_fns(struct sa1100_port_fns *fns); | ||
27 | void sa1100_register_uart(int idx, int port); | ||
28 | #else | ||
29 | #define sa1100_register_uart_fns(fns) do { } while (0) | ||
30 | #define sa1100_register_uart(idx,port) do { } while (0) | ||
31 | #endif | ||
diff --git a/arch/arm/include/asm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h deleted file mode 100644 index ea297ac70bc6..000000000000 --- a/arch/arm/include/asm/mach/udc_pxa2xx.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/mach/udc_pxa2xx.h | ||
3 | * | ||
4 | * This supports machine-specific differences in how the PXA2xx | ||
5 | * USB Device Controller (UDC) is wired. | ||
6 | * | ||
7 | * It is set in linux/arch/arm/mach-pxa/<machine>.c or in | ||
8 | * linux/arch/mach-ixp4xx/<machine>.c and used in | ||
9 | * the probe routine of linux/drivers/usb/gadget/pxa2xx_udc.c | ||
10 | */ | ||
11 | |||
12 | struct pxa2xx_udc_mach_info { | ||
13 | int (*udc_is_connected)(void); /* do we see host? */ | ||
14 | void (*udc_command)(int cmd); | ||
15 | #define PXA2XX_UDC_CMD_CONNECT 0 /* let host see us */ | ||
16 | #define PXA2XX_UDC_CMD_DISCONNECT 1 /* so host won't see us */ | ||
17 | |||
18 | /* Boards following the design guidelines in the developer's manual, | ||
19 | * with on-chip GPIOs not Lubbock's weird hardware, can have a sane | ||
20 | * VBUS IRQ and omit the methods above. Store the GPIO number | ||
21 | * here. Note that sometimes the signals go through inverters... | ||
22 | */ | ||
23 | bool gpio_pullup_inverted; | ||
24 | int gpio_pullup; /* high == pullup activated */ | ||
25 | }; | ||
26 | |||
diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h index 14965658a923..9f77e7804f3b 100644 --- a/arch/arm/include/asm/mmu.h +++ b/arch/arm/include/asm/mmu.h | |||
@@ -5,18 +5,15 @@ | |||
5 | 5 | ||
6 | typedef struct { | 6 | typedef struct { |
7 | #ifdef CONFIG_CPU_HAS_ASID | 7 | #ifdef CONFIG_CPU_HAS_ASID |
8 | unsigned int id; | 8 | u64 id; |
9 | raw_spinlock_t id_lock; | ||
10 | #endif | 9 | #endif |
11 | unsigned int kvm_seq; | 10 | unsigned int vmalloc_seq; |
12 | } mm_context_t; | 11 | } mm_context_t; |
13 | 12 | ||
14 | #ifdef CONFIG_CPU_HAS_ASID | 13 | #ifdef CONFIG_CPU_HAS_ASID |
15 | #define ASID(mm) ((mm)->context.id & 255) | 14 | #define ASID_BITS 8 |
16 | 15 | #define ASID_MASK ((~0ULL) << ASID_BITS) | |
17 | /* init_mm.context.id_lock should be initialized. */ | 16 | #define ASID(mm) ((mm)->context.id & ~ASID_MASK) |
18 | #define INIT_MM_CONTEXT(name) \ | ||
19 | .context.id_lock = __RAW_SPIN_LOCK_UNLOCKED(name.context.id_lock), | ||
20 | #else | 17 | #else |
21 | #define ASID(mm) (0) | 18 | #define ASID(mm) (0) |
22 | #endif | 19 | #endif |
diff --git a/arch/arm/include/asm/mmu_context.h b/arch/arm/include/asm/mmu_context.h index 0306bc642c0d..e1f644bc7cc5 100644 --- a/arch/arm/include/asm/mmu_context.h +++ b/arch/arm/include/asm/mmu_context.h | |||
@@ -20,88 +20,12 @@ | |||
20 | #include <asm/proc-fns.h> | 20 | #include <asm/proc-fns.h> |
21 | #include <asm-generic/mm_hooks.h> | 21 | #include <asm-generic/mm_hooks.h> |
22 | 22 | ||
23 | void __check_kvm_seq(struct mm_struct *mm); | 23 | void __check_vmalloc_seq(struct mm_struct *mm); |
24 | 24 | ||
25 | #ifdef CONFIG_CPU_HAS_ASID | 25 | #ifdef CONFIG_CPU_HAS_ASID |
26 | 26 | ||
27 | /* | 27 | void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk); |
28 | * On ARMv6, we have the following structure in the Context ID: | 28 | #define init_new_context(tsk,mm) ({ mm->context.id = 0; }) |
29 | * | ||
30 | * 31 7 0 | ||
31 | * +-------------------------+-----------+ | ||
32 | * | process ID | ASID | | ||
33 | * +-------------------------+-----------+ | ||
34 | * | context ID | | ||
35 | * +-------------------------------------+ | ||
36 | * | ||
37 | * The ASID is used to tag entries in the CPU caches and TLBs. | ||
38 | * The context ID is used by debuggers and trace logic, and | ||
39 | * should be unique within all running processes. | ||
40 | */ | ||
41 | #define ASID_BITS 8 | ||
42 | #define ASID_MASK ((~0) << ASID_BITS) | ||
43 | #define ASID_FIRST_VERSION (1 << ASID_BITS) | ||
44 | |||
45 | extern unsigned int cpu_last_asid; | ||
46 | |||
47 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm); | ||
48 | void __new_context(struct mm_struct *mm); | ||
49 | void cpu_set_reserved_ttbr0(void); | ||
50 | |||
51 | static inline void switch_new_context(struct mm_struct *mm) | ||
52 | { | ||
53 | unsigned long flags; | ||
54 | |||
55 | __new_context(mm); | ||
56 | |||
57 | local_irq_save(flags); | ||
58 | cpu_switch_mm(mm->pgd, mm); | ||
59 | local_irq_restore(flags); | ||
60 | } | ||
61 | |||
62 | static inline void check_and_switch_context(struct mm_struct *mm, | ||
63 | struct task_struct *tsk) | ||
64 | { | ||
65 | if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) | ||
66 | __check_kvm_seq(mm); | ||
67 | |||
68 | /* | ||
69 | * Required during context switch to avoid speculative page table | ||
70 | * walking with the wrong TTBR. | ||
71 | */ | ||
72 | cpu_set_reserved_ttbr0(); | ||
73 | |||
74 | if (!((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) | ||
75 | /* | ||
76 | * The ASID is from the current generation, just switch to the | ||
77 | * new pgd. This condition is only true for calls from | ||
78 | * context_switch() and interrupts are already disabled. | ||
79 | */ | ||
80 | cpu_switch_mm(mm->pgd, mm); | ||
81 | else if (irqs_disabled()) | ||
82 | /* | ||
83 | * Defer the new ASID allocation until after the context | ||
84 | * switch critical region since __new_context() cannot be | ||
85 | * called with interrupts disabled (it sends IPIs). | ||
86 | */ | ||
87 | set_ti_thread_flag(task_thread_info(tsk), TIF_SWITCH_MM); | ||
88 | else | ||
89 | /* | ||
90 | * That is a direct call to switch_mm() or activate_mm() with | ||
91 | * interrupts enabled and a new context. | ||
92 | */ | ||
93 | switch_new_context(mm); | ||
94 | } | ||
95 | |||
96 | #define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0) | ||
97 | |||
98 | #define finish_arch_post_lock_switch \ | ||
99 | finish_arch_post_lock_switch | ||
100 | static inline void finish_arch_post_lock_switch(void) | ||
101 | { | ||
102 | if (test_and_clear_thread_flag(TIF_SWITCH_MM)) | ||
103 | switch_new_context(current->mm); | ||
104 | } | ||
105 | 29 | ||
106 | #else /* !CONFIG_CPU_HAS_ASID */ | 30 | #else /* !CONFIG_CPU_HAS_ASID */ |
107 | 31 | ||
@@ -110,8 +34,8 @@ static inline void finish_arch_post_lock_switch(void) | |||
110 | static inline void check_and_switch_context(struct mm_struct *mm, | 34 | static inline void check_and_switch_context(struct mm_struct *mm, |
111 | struct task_struct *tsk) | 35 | struct task_struct *tsk) |
112 | { | 36 | { |
113 | if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) | 37 | if (unlikely(mm->context.vmalloc_seq != init_mm.context.vmalloc_seq)) |
114 | __check_kvm_seq(mm); | 38 | __check_vmalloc_seq(mm); |
115 | 39 | ||
116 | if (irqs_disabled()) | 40 | if (irqs_disabled()) |
117 | /* | 41 | /* |
@@ -143,6 +67,7 @@ static inline void finish_arch_post_lock_switch(void) | |||
143 | #endif /* CONFIG_CPU_HAS_ASID */ | 67 | #endif /* CONFIG_CPU_HAS_ASID */ |
144 | 68 | ||
145 | #define destroy_context(mm) do { } while(0) | 69 | #define destroy_context(mm) do { } while(0) |
70 | #define activate_mm(prev,next) switch_mm(prev, next, NULL) | ||
146 | 71 | ||
147 | /* | 72 | /* |
148 | * This is called when "tsk" is about to enter lazy TLB mode. | 73 | * This is called when "tsk" is about to enter lazy TLB mode. |
@@ -186,6 +111,5 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
186 | } | 111 | } |
187 | 112 | ||
188 | #define deactivate_mm(tsk,mm) do { } while (0) | 113 | #define deactivate_mm(tsk,mm) do { } while (0) |
189 | #define activate_mm(prev,next) switch_mm(prev, next, NULL) | ||
190 | 114 | ||
191 | #endif | 115 | #endif |
diff --git a/arch/arm/include/asm/percpu.h b/arch/arm/include/asm/percpu.h new file mode 100644 index 000000000000..968c0a14e0a3 --- /dev/null +++ b/arch/arm/include/asm/percpu.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Calxeda, Inc. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #ifndef _ASM_ARM_PERCPU_H_ | ||
17 | #define _ASM_ARM_PERCPU_H_ | ||
18 | |||
19 | /* | ||
20 | * Same as asm-generic/percpu.h, except that we store the per cpu offset | ||
21 | * in the TPIDRPRW. TPIDRPRW only exists on V6K and V7 | ||
22 | */ | ||
23 | #if defined(CONFIG_SMP) && !defined(CONFIG_CPU_V6) | ||
24 | static inline void set_my_cpu_offset(unsigned long off) | ||
25 | { | ||
26 | /* Set TPIDRPRW */ | ||
27 | asm volatile("mcr p15, 0, %0, c13, c0, 4" : : "r" (off) : "memory"); | ||
28 | } | ||
29 | |||
30 | static inline unsigned long __my_cpu_offset(void) | ||
31 | { | ||
32 | unsigned long off; | ||
33 | /* Read TPIDRPRW */ | ||
34 | asm("mrc p15, 0, %0, c13, c0, 4" : "=r" (off) : : "memory"); | ||
35 | return off; | ||
36 | } | ||
37 | #define __my_cpu_offset __my_cpu_offset() | ||
38 | #else | ||
39 | #define set_my_cpu_offset(x) do {} while(0) | ||
40 | |||
41 | #endif /* CONFIG_SMP */ | ||
42 | |||
43 | #include <asm-generic/percpu.h> | ||
44 | |||
45 | #endif /* _ASM_ARM_PERCPU_H_ */ | ||
diff --git a/arch/arm/include/asm/perf_event.h b/arch/arm/include/asm/perf_event.h index 625cd621a436..755877527cf9 100644 --- a/arch/arm/include/asm/perf_event.h +++ b/arch/arm/include/asm/perf_event.h | |||
@@ -21,4 +21,11 @@ | |||
21 | #define C(_x) PERF_COUNT_HW_CACHE_##_x | 21 | #define C(_x) PERF_COUNT_HW_CACHE_##_x |
22 | #define CACHE_OP_UNSUPPORTED 0xFFFF | 22 | #define CACHE_OP_UNSUPPORTED 0xFFFF |
23 | 23 | ||
24 | #ifdef CONFIG_HW_PERF_EVENTS | ||
25 | struct pt_regs; | ||
26 | extern unsigned long perf_instruction_pointer(struct pt_regs *regs); | ||
27 | extern unsigned long perf_misc_flags(struct pt_regs *regs); | ||
28 | #define perf_misc_flags(regs) perf_misc_flags(regs) | ||
29 | #endif | ||
30 | |||
24 | #endif /* __ARM_PERF_EVENT_H__ */ | 31 | #endif /* __ARM_PERF_EVENT_H__ */ |
diff --git a/arch/arm/include/asm/pgtable-2level.h b/arch/arm/include/asm/pgtable-2level.h index 2317a71c8f8e..f97ee02386ee 100644 --- a/arch/arm/include/asm/pgtable-2level.h +++ b/arch/arm/include/asm/pgtable-2level.h | |||
@@ -115,6 +115,7 @@ | |||
115 | * The PTE table pointer refers to the hardware entries; the "Linux" | 115 | * The PTE table pointer refers to the hardware entries; the "Linux" |
116 | * entries are stored 1024 bytes below. | 116 | * entries are stored 1024 bytes below. |
117 | */ | 117 | */ |
118 | #define L_PTE_VALID (_AT(pteval_t, 1) << 0) /* Valid */ | ||
118 | #define L_PTE_PRESENT (_AT(pteval_t, 1) << 0) | 119 | #define L_PTE_PRESENT (_AT(pteval_t, 1) << 0) |
119 | #define L_PTE_YOUNG (_AT(pteval_t, 1) << 1) | 120 | #define L_PTE_YOUNG (_AT(pteval_t, 1) << 1) |
120 | #define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */ | 121 | #define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */ |
@@ -123,6 +124,7 @@ | |||
123 | #define L_PTE_USER (_AT(pteval_t, 1) << 8) | 124 | #define L_PTE_USER (_AT(pteval_t, 1) << 8) |
124 | #define L_PTE_XN (_AT(pteval_t, 1) << 9) | 125 | #define L_PTE_XN (_AT(pteval_t, 1) << 9) |
125 | #define L_PTE_SHARED (_AT(pteval_t, 1) << 10) /* shared(v6), coherent(xsc3) */ | 126 | #define L_PTE_SHARED (_AT(pteval_t, 1) << 10) /* shared(v6), coherent(xsc3) */ |
127 | #define L_PTE_NONE (_AT(pteval_t, 1) << 11) | ||
126 | 128 | ||
127 | /* | 129 | /* |
128 | * These are the memory types, defined to be compatible with | 130 | * These are the memory types, defined to be compatible with |
diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h index b24903549d1c..a3f37929940a 100644 --- a/arch/arm/include/asm/pgtable-3level.h +++ b/arch/arm/include/asm/pgtable-3level.h | |||
@@ -67,7 +67,8 @@ | |||
67 | * These bits overlap with the hardware bits but the naming is preserved for | 67 | * These bits overlap with the hardware bits but the naming is preserved for |
68 | * consistency with the classic page table format. | 68 | * consistency with the classic page table format. |
69 | */ | 69 | */ |
70 | #define L_PTE_PRESENT (_AT(pteval_t, 3) << 0) /* Valid */ | 70 | #define L_PTE_VALID (_AT(pteval_t, 1) << 0) /* Valid */ |
71 | #define L_PTE_PRESENT (_AT(pteval_t, 3) << 0) /* Present */ | ||
71 | #define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */ | 72 | #define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */ |
72 | #define L_PTE_USER (_AT(pteval_t, 1) << 6) /* AP[1] */ | 73 | #define L_PTE_USER (_AT(pteval_t, 1) << 6) /* AP[1] */ |
73 | #define L_PTE_RDONLY (_AT(pteval_t, 1) << 7) /* AP[2] */ | 74 | #define L_PTE_RDONLY (_AT(pteval_t, 1) << 7) /* AP[2] */ |
@@ -76,6 +77,7 @@ | |||
76 | #define L_PTE_XN (_AT(pteval_t, 1) << 54) /* XN */ | 77 | #define L_PTE_XN (_AT(pteval_t, 1) << 54) /* XN */ |
77 | #define L_PTE_DIRTY (_AT(pteval_t, 1) << 55) /* unused */ | 78 | #define L_PTE_DIRTY (_AT(pteval_t, 1) << 55) /* unused */ |
78 | #define L_PTE_SPECIAL (_AT(pteval_t, 1) << 56) /* unused */ | 79 | #define L_PTE_SPECIAL (_AT(pteval_t, 1) << 56) /* unused */ |
80 | #define L_PTE_NONE (_AT(pteval_t, 1) << 57) /* PROT_NONE */ | ||
79 | 81 | ||
80 | /* | 82 | /* |
81 | * To be used in assembly code with the upper page attributes. | 83 | * To be used in assembly code with the upper page attributes. |
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 08c12312a1f9..9c82f988c0e3 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -73,7 +73,7 @@ extern pgprot_t pgprot_kernel; | |||
73 | 73 | ||
74 | #define _MOD_PROT(p, b) __pgprot(pgprot_val(p) | (b)) | 74 | #define _MOD_PROT(p, b) __pgprot(pgprot_val(p) | (b)) |
75 | 75 | ||
76 | #define PAGE_NONE _MOD_PROT(pgprot_user, L_PTE_XN | L_PTE_RDONLY) | 76 | #define PAGE_NONE _MOD_PROT(pgprot_user, L_PTE_XN | L_PTE_RDONLY | L_PTE_NONE) |
77 | #define PAGE_SHARED _MOD_PROT(pgprot_user, L_PTE_USER | L_PTE_XN) | 77 | #define PAGE_SHARED _MOD_PROT(pgprot_user, L_PTE_USER | L_PTE_XN) |
78 | #define PAGE_SHARED_EXEC _MOD_PROT(pgprot_user, L_PTE_USER) | 78 | #define PAGE_SHARED_EXEC _MOD_PROT(pgprot_user, L_PTE_USER) |
79 | #define PAGE_COPY _MOD_PROT(pgprot_user, L_PTE_USER | L_PTE_RDONLY | L_PTE_XN) | 79 | #define PAGE_COPY _MOD_PROT(pgprot_user, L_PTE_USER | L_PTE_RDONLY | L_PTE_XN) |
@@ -83,7 +83,7 @@ extern pgprot_t pgprot_kernel; | |||
83 | #define PAGE_KERNEL _MOD_PROT(pgprot_kernel, L_PTE_XN) | 83 | #define PAGE_KERNEL _MOD_PROT(pgprot_kernel, L_PTE_XN) |
84 | #define PAGE_KERNEL_EXEC pgprot_kernel | 84 | #define PAGE_KERNEL_EXEC pgprot_kernel |
85 | 85 | ||
86 | #define __PAGE_NONE __pgprot(_L_PTE_DEFAULT | L_PTE_RDONLY | L_PTE_XN) | 86 | #define __PAGE_NONE __pgprot(_L_PTE_DEFAULT | L_PTE_RDONLY | L_PTE_XN | L_PTE_NONE) |
87 | #define __PAGE_SHARED __pgprot(_L_PTE_DEFAULT | L_PTE_USER | L_PTE_XN) | 87 | #define __PAGE_SHARED __pgprot(_L_PTE_DEFAULT | L_PTE_USER | L_PTE_XN) |
88 | #define __PAGE_SHARED_EXEC __pgprot(_L_PTE_DEFAULT | L_PTE_USER) | 88 | #define __PAGE_SHARED_EXEC __pgprot(_L_PTE_DEFAULT | L_PTE_USER) |
89 | #define __PAGE_COPY __pgprot(_L_PTE_DEFAULT | L_PTE_USER | L_PTE_RDONLY | L_PTE_XN) | 89 | #define __PAGE_COPY __pgprot(_L_PTE_DEFAULT | L_PTE_USER | L_PTE_RDONLY | L_PTE_XN) |
@@ -203,9 +203,7 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd) | |||
203 | #define pte_exec(pte) (!(pte_val(pte) & L_PTE_XN)) | 203 | #define pte_exec(pte) (!(pte_val(pte) & L_PTE_XN)) |
204 | #define pte_special(pte) (0) | 204 | #define pte_special(pte) (0) |
205 | 205 | ||
206 | #define pte_present_user(pte) \ | 206 | #define pte_present_user(pte) (pte_present(pte) && (pte_val(pte) & L_PTE_USER)) |
207 | ((pte_val(pte) & (L_PTE_PRESENT | L_PTE_USER)) == \ | ||
208 | (L_PTE_PRESENT | L_PTE_USER)) | ||
209 | 207 | ||
210 | #if __LINUX_ARM_ARCH__ < 6 | 208 | #if __LINUX_ARM_ARCH__ < 6 |
211 | static inline void __sync_icache_dcache(pte_t pteval) | 209 | static inline void __sync_icache_dcache(pte_t pteval) |
@@ -242,7 +240,7 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; } | |||
242 | 240 | ||
243 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 241 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
244 | { | 242 | { |
245 | const pteval_t mask = L_PTE_XN | L_PTE_RDONLY | L_PTE_USER; | 243 | const pteval_t mask = L_PTE_XN | L_PTE_RDONLY | L_PTE_USER | L_PTE_NONE; |
246 | pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask); | 244 | pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask); |
247 | return pte; | 245 | return pte; |
248 | } | 246 | } |
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h index a26170dce02e..f24edad26c70 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h | |||
@@ -67,19 +67,19 @@ struct arm_pmu { | |||
67 | cpumask_t active_irqs; | 67 | cpumask_t active_irqs; |
68 | char *name; | 68 | char *name; |
69 | irqreturn_t (*handle_irq)(int irq_num, void *dev); | 69 | irqreturn_t (*handle_irq)(int irq_num, void *dev); |
70 | void (*enable)(struct hw_perf_event *evt, int idx); | 70 | void (*enable)(struct perf_event *event); |
71 | void (*disable)(struct hw_perf_event *evt, int idx); | 71 | void (*disable)(struct perf_event *event); |
72 | int (*get_event_idx)(struct pmu_hw_events *hw_events, | 72 | int (*get_event_idx)(struct pmu_hw_events *hw_events, |
73 | struct hw_perf_event *hwc); | 73 | struct perf_event *event); |
74 | int (*set_event_filter)(struct hw_perf_event *evt, | 74 | int (*set_event_filter)(struct hw_perf_event *evt, |
75 | struct perf_event_attr *attr); | 75 | struct perf_event_attr *attr); |
76 | u32 (*read_counter)(int idx); | 76 | u32 (*read_counter)(struct perf_event *event); |
77 | void (*write_counter)(int idx, u32 val); | 77 | void (*write_counter)(struct perf_event *event, u32 val); |
78 | void (*start)(void); | 78 | void (*start)(struct arm_pmu *); |
79 | void (*stop)(void); | 79 | void (*stop)(struct arm_pmu *); |
80 | void (*reset)(void *); | 80 | void (*reset)(void *); |
81 | int (*request_irq)(irq_handler_t handler); | 81 | int (*request_irq)(struct arm_pmu *, irq_handler_t handler); |
82 | void (*free_irq)(void); | 82 | void (*free_irq)(struct arm_pmu *); |
83 | int (*map_event)(struct perf_event *event); | 83 | int (*map_event)(struct perf_event *event); |
84 | int num_events; | 84 | int num_events; |
85 | atomic_t active_events; | 85 | atomic_t active_events; |
@@ -93,15 +93,11 @@ struct arm_pmu { | |||
93 | 93 | ||
94 | extern const struct dev_pm_ops armpmu_dev_pm_ops; | 94 | extern const struct dev_pm_ops armpmu_dev_pm_ops; |
95 | 95 | ||
96 | int armpmu_register(struct arm_pmu *armpmu, char *name, int type); | 96 | int armpmu_register(struct arm_pmu *armpmu, int type); |
97 | 97 | ||
98 | u64 armpmu_event_update(struct perf_event *event, | 98 | u64 armpmu_event_update(struct perf_event *event); |
99 | struct hw_perf_event *hwc, | ||
100 | int idx); | ||
101 | 99 | ||
102 | int armpmu_event_set_period(struct perf_event *event, | 100 | int armpmu_event_set_period(struct perf_event *event); |
103 | struct hw_perf_event *hwc, | ||
104 | int idx); | ||
105 | 101 | ||
106 | int armpmu_map_event(struct perf_event *event, | 102 | int armpmu_map_event(struct perf_event *event, |
107 | const unsigned (*event_map)[PERF_COUNT_HW_MAX], | 103 | const unsigned (*event_map)[PERF_COUNT_HW_MAX], |
diff --git a/arch/arm/include/asm/prom.h b/arch/arm/include/asm/prom.h index aeae9c609df4..a219227c3e43 100644 --- a/arch/arm/include/asm/prom.h +++ b/arch/arm/include/asm/prom.h | |||
@@ -11,10 +11,13 @@ | |||
11 | #ifndef __ASMARM_PROM_H | 11 | #ifndef __ASMARM_PROM_H |
12 | #define __ASMARM_PROM_H | 12 | #define __ASMARM_PROM_H |
13 | 13 | ||
14 | #define HAVE_ARCH_DEVTREE_FIXUPS | ||
15 | |||
14 | #ifdef CONFIG_OF | 16 | #ifdef CONFIG_OF |
15 | 17 | ||
16 | extern struct machine_desc *setup_machine_fdt(unsigned int dt_phys); | 18 | extern struct machine_desc *setup_machine_fdt(unsigned int dt_phys); |
17 | extern void arm_dt_memblock_reserve(void); | 19 | extern void arm_dt_memblock_reserve(void); |
20 | extern void __init arm_dt_init_cpu_maps(void); | ||
18 | 21 | ||
19 | #else /* CONFIG_OF */ | 22 | #else /* CONFIG_OF */ |
20 | 23 | ||
@@ -24,6 +27,7 @@ static inline struct machine_desc *setup_machine_fdt(unsigned int dt_phys) | |||
24 | } | 27 | } |
25 | 28 | ||
26 | static inline void arm_dt_memblock_reserve(void) { } | 29 | static inline void arm_dt_memblock_reserve(void) { } |
30 | static inline void arm_dt_init_cpu_maps(void) { } | ||
27 | 31 | ||
28 | #endif /* CONFIG_OF */ | 32 | #endif /* CONFIG_OF */ |
29 | #endif /* ASMARM_PROM_H */ | 33 | #endif /* ASMARM_PROM_H */ |
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index 2e3be16c6766..d3a22bebe6ce 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
@@ -79,6 +79,7 @@ extern void cpu_die(void); | |||
79 | 79 | ||
80 | extern void arch_send_call_function_single_ipi(int cpu); | 80 | extern void arch_send_call_function_single_ipi(int cpu); |
81 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); | 81 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); |
82 | extern void arch_send_wakeup_ipi_mask(const struct cpumask *mask); | ||
82 | 83 | ||
83 | struct smp_operations { | 84 | struct smp_operations { |
84 | #ifdef CONFIG_SMP | 85 | #ifdef CONFIG_SMP |
diff --git a/arch/arm/include/asm/smp_plat.h b/arch/arm/include/asm/smp_plat.h index 558d6c80aca9..aaa61b6f50ff 100644 --- a/arch/arm/include/asm/smp_plat.h +++ b/arch/arm/include/asm/smp_plat.h | |||
@@ -5,6 +5,9 @@ | |||
5 | #ifndef __ASMARM_SMP_PLAT_H | 5 | #ifndef __ASMARM_SMP_PLAT_H |
6 | #define __ASMARM_SMP_PLAT_H | 6 | #define __ASMARM_SMP_PLAT_H |
7 | 7 | ||
8 | #include <linux/cpumask.h> | ||
9 | #include <linux/err.h> | ||
10 | |||
8 | #include <asm/cputype.h> | 11 | #include <asm/cputype.h> |
9 | 12 | ||
10 | /* | 13 | /* |
@@ -48,5 +51,19 @@ static inline int cache_ops_need_broadcast(void) | |||
48 | */ | 51 | */ |
49 | extern int __cpu_logical_map[]; | 52 | extern int __cpu_logical_map[]; |
50 | #define cpu_logical_map(cpu) __cpu_logical_map[cpu] | 53 | #define cpu_logical_map(cpu) __cpu_logical_map[cpu] |
54 | /* | ||
55 | * Retrieve logical cpu index corresponding to a given MPIDR[23:0] | ||
56 | * - mpidr: MPIDR[23:0] to be used for the look-up | ||
57 | * | ||
58 | * Returns the cpu logical index or -EINVAL on look-up error | ||
59 | */ | ||
60 | static inline int get_logical_index(u32 mpidr) | ||
61 | { | ||
62 | int cpu; | ||
63 | for (cpu = 0; cpu < nr_cpu_ids; cpu++) | ||
64 | if (cpu_logical_map(cpu) == mpidr) | ||
65 | return cpu; | ||
66 | return -EINVAL; | ||
67 | } | ||
51 | 68 | ||
52 | #endif | 69 | #endif |
diff --git a/arch/arm/include/asm/syscall.h b/arch/arm/include/asm/syscall.h index 9fdded6b1089..f1d96d4e8092 100644 --- a/arch/arm/include/asm/syscall.h +++ b/arch/arm/include/asm/syscall.h | |||
@@ -7,6 +7,8 @@ | |||
7 | #ifndef _ASM_ARM_SYSCALL_H | 7 | #ifndef _ASM_ARM_SYSCALL_H |
8 | #define _ASM_ARM_SYSCALL_H | 8 | #define _ASM_ARM_SYSCALL_H |
9 | 9 | ||
10 | #include <linux/audit.h> /* for AUDIT_ARCH_* */ | ||
11 | #include <linux/elf.h> /* for ELF_EM */ | ||
10 | #include <linux/err.h> | 12 | #include <linux/err.h> |
11 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
12 | 14 | ||
@@ -95,4 +97,11 @@ static inline void syscall_set_arguments(struct task_struct *task, | |||
95 | memcpy(®s->ARM_r0 + i, args, n * sizeof(args[0])); | 97 | memcpy(®s->ARM_r0 + i, args, n * sizeof(args[0])); |
96 | } | 98 | } |
97 | 99 | ||
100 | static inline int syscall_get_arch(struct task_struct *task, | ||
101 | struct pt_regs *regs) | ||
102 | { | ||
103 | /* ARM tasks don't change audit architectures on the fly. */ | ||
104 | return AUDIT_ARCH_ARM; | ||
105 | } | ||
106 | |||
98 | #endif /* _ASM_ARM_SYSCALL_H */ | 107 | #endif /* _ASM_ARM_SYSCALL_H */ |
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index 8477b4c1d39f..cddda1f41f0f 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
@@ -151,10 +151,10 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, | |||
151 | #define TIF_SYSCALL_TRACE 8 | 151 | #define TIF_SYSCALL_TRACE 8 |
152 | #define TIF_SYSCALL_AUDIT 9 | 152 | #define TIF_SYSCALL_AUDIT 9 |
153 | #define TIF_SYSCALL_TRACEPOINT 10 | 153 | #define TIF_SYSCALL_TRACEPOINT 10 |
154 | #define TIF_SECCOMP 11 /* seccomp syscall filtering active */ | ||
154 | #define TIF_USING_IWMMXT 17 | 155 | #define TIF_USING_IWMMXT 17 |
155 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 156 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
156 | #define TIF_RESTORE_SIGMASK 20 | 157 | #define TIF_RESTORE_SIGMASK 20 |
157 | #define TIF_SECCOMP 21 | ||
158 | #define TIF_SWITCH_MM 22 /* deferred switch_mm */ | 158 | #define TIF_SWITCH_MM 22 /* deferred switch_mm */ |
159 | 159 | ||
160 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 160 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
@@ -163,11 +163,12 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, | |||
163 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 163 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
164 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 164 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
165 | #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) | 165 | #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) |
166 | #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) | ||
167 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | 166 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
167 | #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) | ||
168 | 168 | ||
169 | /* Checks for any syscall work in entry-common.S */ | 169 | /* Checks for any syscall work in entry-common.S */ |
170 | #define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SYSCALL_TRACEPOINT) | 170 | #define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \ |
171 | _TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP) | ||
171 | 172 | ||
172 | /* | 173 | /* |
173 | * Change these and you break ASM code in entry-common.S | 174 | * Change these and you break ASM code in entry-common.S |
diff --git a/arch/arm/include/debug/vexpress.S b/arch/arm/include/debug/vexpress.S index 9f509f55d078..dc8e882a6257 100644 --- a/arch/arm/include/debug/vexpress.S +++ b/arch/arm/include/debug/vexpress.S | |||
@@ -21,14 +21,17 @@ | |||
21 | #if defined(CONFIG_DEBUG_VEXPRESS_UART0_DETECT) | 21 | #if defined(CONFIG_DEBUG_VEXPRESS_UART0_DETECT) |
22 | 22 | ||
23 | .macro addruart,rp,rv,tmp | 23 | .macro addruart,rp,rv,tmp |
24 | .arch armv7-a | ||
24 | 25 | ||
25 | @ Make an educated guess regarding the memory map: | 26 | @ Make an educated guess regarding the memory map: |
26 | @ - the original A9 core tile, which has MPCore peripherals | 27 | @ - the original A9 core tile (based on ARM Cortex-A9 r0p1) |
27 | @ located at 0x1e000000, should use UART at 0x10009000 | 28 | @ should use UART at 0x10009000 |
28 | @ - all other (RS1 complaint) tiles use UART mapped | 29 | @ - all other (RS1 complaint) tiles use UART mapped |
29 | @ at 0x1c090000 | 30 | @ at 0x1c090000 |
30 | mrc p15, 4, \tmp, c15, c0, 0 | 31 | mrc p15, 0, \rp, c0, c0, 0 |
31 | cmp \tmp, #0x1e000000 | 32 | movw \rv, #0xc091 |
33 | movt \rv, #0x410f | ||
34 | cmp \rp, \rv | ||
32 | 35 | ||
33 | @ Original memory map | 36 | @ Original memory map |
34 | moveq \rp, #DEBUG_LL_UART_OFFSET | 37 | moveq \rp, #DEBUG_LL_UART_OFFSET |
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c index bee7f9d47f02..70f1bdeb241b 100644 --- a/arch/arm/kernel/devtree.c +++ b/arch/arm/kernel/devtree.c | |||
@@ -19,8 +19,10 @@ | |||
19 | #include <linux/of_irq.h> | 19 | #include <linux/of_irq.h> |
20 | #include <linux/of_platform.h> | 20 | #include <linux/of_platform.h> |
21 | 21 | ||
22 | #include <asm/cputype.h> | ||
22 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
23 | #include <asm/page.h> | 24 | #include <asm/page.h> |
25 | #include <asm/smp_plat.h> | ||
24 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
25 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
26 | 28 | ||
@@ -61,6 +63,108 @@ void __init arm_dt_memblock_reserve(void) | |||
61 | } | 63 | } |
62 | } | 64 | } |
63 | 65 | ||
66 | /* | ||
67 | * arm_dt_init_cpu_maps - Function retrieves cpu nodes from the device tree | ||
68 | * and builds the cpu logical map array containing MPIDR values related to | ||
69 | * logical cpus | ||
70 | * | ||
71 | * Updates the cpu possible mask with the number of parsed cpu nodes | ||
72 | */ | ||
73 | void __init arm_dt_init_cpu_maps(void) | ||
74 | { | ||
75 | /* | ||
76 | * Temp logical map is initialized with UINT_MAX values that are | ||
77 | * considered invalid logical map entries since the logical map must | ||
78 | * contain a list of MPIDR[23:0] values where MPIDR[31:24] must | ||
79 | * read as 0. | ||
80 | */ | ||
81 | struct device_node *cpu, *cpus; | ||
82 | u32 i, j, cpuidx = 1; | ||
83 | u32 mpidr = is_smp() ? read_cpuid_mpidr() & MPIDR_HWID_BITMASK : 0; | ||
84 | |||
85 | u32 tmp_map[NR_CPUS] = { [0 ... NR_CPUS-1] = UINT_MAX }; | ||
86 | bool bootcpu_valid = false; | ||
87 | cpus = of_find_node_by_path("/cpus"); | ||
88 | |||
89 | if (!cpus) | ||
90 | return; | ||
91 | |||
92 | for_each_child_of_node(cpus, cpu) { | ||
93 | u32 hwid; | ||
94 | |||
95 | pr_debug(" * %s...\n", cpu->full_name); | ||
96 | /* | ||
97 | * A device tree containing CPU nodes with missing "reg" | ||
98 | * properties is considered invalid to build the | ||
99 | * cpu_logical_map. | ||
100 | */ | ||
101 | if (of_property_read_u32(cpu, "reg", &hwid)) { | ||
102 | pr_debug(" * %s missing reg property\n", | ||
103 | cpu->full_name); | ||
104 | return; | ||
105 | } | ||
106 | |||
107 | /* | ||
108 | * 8 MSBs must be set to 0 in the DT since the reg property | ||
109 | * defines the MPIDR[23:0]. | ||
110 | */ | ||
111 | if (hwid & ~MPIDR_HWID_BITMASK) | ||
112 | return; | ||
113 | |||
114 | /* | ||
115 | * Duplicate MPIDRs are a recipe for disaster. | ||
116 | * Scan all initialized entries and check for | ||
117 | * duplicates. If any is found just bail out. | ||
118 | * temp values were initialized to UINT_MAX | ||
119 | * to avoid matching valid MPIDR[23:0] values. | ||
120 | */ | ||
121 | for (j = 0; j < cpuidx; j++) | ||
122 | if (WARN(tmp_map[j] == hwid, "Duplicate /cpu reg " | ||
123 | "properties in the DT\n")) | ||
124 | return; | ||
125 | |||
126 | /* | ||
127 | * Build a stashed array of MPIDR values. Numbering scheme | ||
128 | * requires that if detected the boot CPU must be assigned | ||
129 | * logical id 0. Other CPUs get sequential indexes starting | ||
130 | * from 1. If a CPU node with a reg property matching the | ||
131 | * boot CPU MPIDR is detected, this is recorded so that the | ||
132 | * logical map built from DT is validated and can be used | ||
133 | * to override the map created in smp_setup_processor_id(). | ||
134 | */ | ||
135 | if (hwid == mpidr) { | ||
136 | i = 0; | ||
137 | bootcpu_valid = true; | ||
138 | } else { | ||
139 | i = cpuidx++; | ||
140 | } | ||
141 | |||
142 | if (WARN(cpuidx > nr_cpu_ids, "DT /cpu %u nodes greater than " | ||
143 | "max cores %u, capping them\n", | ||
144 | cpuidx, nr_cpu_ids)) { | ||
145 | cpuidx = nr_cpu_ids; | ||
146 | break; | ||
147 | } | ||
148 | |||
149 | tmp_map[i] = hwid; | ||
150 | } | ||
151 | |||
152 | if (WARN(!bootcpu_valid, "DT missing boot CPU MPIDR[23:0], " | ||
153 | "fall back to default cpu_logical_map\n")) | ||
154 | return; | ||
155 | |||
156 | /* | ||
157 | * Since the boot CPU node contains proper data, and all nodes have | ||
158 | * a reg property, the DT CPU list can be considered valid and the | ||
159 | * logical map created in smp_setup_processor_id() can be overridden | ||
160 | */ | ||
161 | for (i = 0; i < cpuidx; i++) { | ||
162 | set_cpu_possible(i, true); | ||
163 | cpu_logical_map(i) = tmp_map[i]; | ||
164 | pr_debug("cpu logical map 0x%x\n", cpu_logical_map(i)); | ||
165 | } | ||
166 | } | ||
167 | |||
64 | /** | 168 | /** |
65 | * setup_machine_fdt - Machine setup when an dtb was passed to the kernel | 169 | * setup_machine_fdt - Machine setup when an dtb was passed to the kernel |
66 | * @dt_phys: physical address of dt blob | 170 | * @dt_phys: physical address of dt blob |
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 34711757ba59..804153c0a9cf 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -417,16 +417,6 @@ local_restart: | |||
417 | ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing | 417 | ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing |
418 | stmdb sp!, {r4, r5} @ push fifth and sixth args | 418 | stmdb sp!, {r4, r5} @ push fifth and sixth args |
419 | 419 | ||
420 | #ifdef CONFIG_SECCOMP | ||
421 | tst r10, #_TIF_SECCOMP | ||
422 | beq 1f | ||
423 | mov r0, scno | ||
424 | bl __secure_computing | ||
425 | add r0, sp, #S_R0 + S_OFF @ pointer to regs | ||
426 | ldmia r0, {r0 - r3} @ have to reload r0 - r3 | ||
427 | 1: | ||
428 | #endif | ||
429 | |||
430 | tst r10, #_TIF_SYSCALL_WORK @ are we tracing syscalls? | 420 | tst r10, #_TIF_SYSCALL_WORK @ are we tracing syscalls? |
431 | bne __sys_trace | 421 | bne __sys_trace |
432 | 422 | ||
@@ -458,11 +448,13 @@ __sys_trace: | |||
458 | ldmccia r1, {r0 - r6} @ have to reload r0 - r6 | 448 | ldmccia r1, {r0 - r6} @ have to reload r0 - r6 |
459 | stmccia sp, {r4, r5} @ and update the stack args | 449 | stmccia sp, {r4, r5} @ and update the stack args |
460 | ldrcc pc, [tbl, scno, lsl #2] @ call sys_* routine | 450 | ldrcc pc, [tbl, scno, lsl #2] @ call sys_* routine |
461 | b 2b | 451 | cmp scno, #-1 @ skip the syscall? |
452 | bne 2b | ||
453 | add sp, sp, #S_OFF @ restore stack | ||
454 | b ret_slow_syscall | ||
462 | 455 | ||
463 | __sys_trace_return: | 456 | __sys_trace_return: |
464 | str r0, [sp, #S_R0 + S_OFF]! @ save returned r0 | 457 | str r0, [sp, #S_R0 + S_OFF]! @ save returned r0 |
465 | mov r1, scno | ||
466 | mov r0, sp | 458 | mov r0, sp |
467 | bl syscall_trace_exit | 459 | bl syscall_trace_exit |
468 | b ret_slow_syscall | 460 | b ret_slow_syscall |
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S index 278cfc144f44..2c228a07e58c 100644 --- a/arch/arm/kernel/head-nommu.S +++ b/arch/arm/kernel/head-nommu.S | |||
@@ -68,7 +68,7 @@ __after_proc_init: | |||
68 | * CP15 system control register value returned in r0 from | 68 | * CP15 system control register value returned in r0 from |
69 | * the CPU init function. | 69 | * the CPU init function. |
70 | */ | 70 | */ |
71 | #ifdef CONFIG_ALIGNMENT_TRAP | 71 | #if defined(CONFIG_ALIGNMENT_TRAP) && __LINUX_ARM_ARCH__ < 6 |
72 | orr r0, r0, #CR_A | 72 | orr r0, r0, #CR_A |
73 | #else | 73 | #else |
74 | bic r0, r0, #CR_A | 74 | bic r0, r0, #CR_A |
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index 281bf3301241..5ff2e77782b1 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c | |||
@@ -52,14 +52,14 @@ static u8 debug_arch; | |||
52 | /* Maximum supported watchpoint length. */ | 52 | /* Maximum supported watchpoint length. */ |
53 | static u8 max_watchpoint_len; | 53 | static u8 max_watchpoint_len; |
54 | 54 | ||
55 | #define READ_WB_REG_CASE(OP2, M, VAL) \ | 55 | #define READ_WB_REG_CASE(OP2, M, VAL) \ |
56 | case ((OP2 << 4) + M): \ | 56 | case ((OP2 << 4) + M): \ |
57 | ARM_DBG_READ(c ## M, OP2, VAL); \ | 57 | ARM_DBG_READ(c0, c ## M, OP2, VAL); \ |
58 | break | 58 | break |
59 | 59 | ||
60 | #define WRITE_WB_REG_CASE(OP2, M, VAL) \ | 60 | #define WRITE_WB_REG_CASE(OP2, M, VAL) \ |
61 | case ((OP2 << 4) + M): \ | 61 | case ((OP2 << 4) + M): \ |
62 | ARM_DBG_WRITE(c ## M, OP2, VAL);\ | 62 | ARM_DBG_WRITE(c0, c ## M, OP2, VAL); \ |
63 | break | 63 | break |
64 | 64 | ||
65 | #define GEN_READ_WB_REG_CASES(OP2, VAL) \ | 65 | #define GEN_READ_WB_REG_CASES(OP2, VAL) \ |
@@ -136,12 +136,12 @@ static u8 get_debug_arch(void) | |||
136 | 136 | ||
137 | /* Do we implement the extended CPUID interface? */ | 137 | /* Do we implement the extended CPUID interface? */ |
138 | if (((read_cpuid_id() >> 16) & 0xf) != 0xf) { | 138 | if (((read_cpuid_id() >> 16) & 0xf) != 0xf) { |
139 | pr_warning("CPUID feature registers not supported. " | 139 | pr_warn_once("CPUID feature registers not supported. " |
140 | "Assuming v6 debug is present.\n"); | 140 | "Assuming v6 debug is present.\n"); |
141 | return ARM_DEBUG_ARCH_V6; | 141 | return ARM_DEBUG_ARCH_V6; |
142 | } | 142 | } |
143 | 143 | ||
144 | ARM_DBG_READ(c0, 0, didr); | 144 | ARM_DBG_READ(c0, c0, 0, didr); |
145 | return (didr >> 16) & 0xf; | 145 | return (didr >> 16) & 0xf; |
146 | } | 146 | } |
147 | 147 | ||
@@ -169,7 +169,7 @@ static int debug_exception_updates_fsr(void) | |||
169 | static int get_num_wrp_resources(void) | 169 | static int get_num_wrp_resources(void) |
170 | { | 170 | { |
171 | u32 didr; | 171 | u32 didr; |
172 | ARM_DBG_READ(c0, 0, didr); | 172 | ARM_DBG_READ(c0, c0, 0, didr); |
173 | return ((didr >> 28) & 0xf) + 1; | 173 | return ((didr >> 28) & 0xf) + 1; |
174 | } | 174 | } |
175 | 175 | ||
@@ -177,7 +177,7 @@ static int get_num_wrp_resources(void) | |||
177 | static int get_num_brp_resources(void) | 177 | static int get_num_brp_resources(void) |
178 | { | 178 | { |
179 | u32 didr; | 179 | u32 didr; |
180 | ARM_DBG_READ(c0, 0, didr); | 180 | ARM_DBG_READ(c0, c0, 0, didr); |
181 | return ((didr >> 24) & 0xf) + 1; | 181 | return ((didr >> 24) & 0xf) + 1; |
182 | } | 182 | } |
183 | 183 | ||
@@ -228,19 +228,17 @@ static int get_num_brps(void) | |||
228 | * be put into halting debug mode at any time by an external debugger | 228 | * be put into halting debug mode at any time by an external debugger |
229 | * but there is nothing we can do to prevent that. | 229 | * but there is nothing we can do to prevent that. |
230 | */ | 230 | */ |
231 | static int enable_monitor_mode(void) | 231 | static int monitor_mode_enabled(void) |
232 | { | 232 | { |
233 | u32 dscr; | 233 | u32 dscr; |
234 | int ret = 0; | 234 | ARM_DBG_READ(c0, c1, 0, dscr); |
235 | 235 | return !!(dscr & ARM_DSCR_MDBGEN); | |
236 | ARM_DBG_READ(c1, 0, dscr); | 236 | } |
237 | 237 | ||
238 | /* Ensure that halting mode is disabled. */ | 238 | static int enable_monitor_mode(void) |
239 | if (WARN_ONCE(dscr & ARM_DSCR_HDBGEN, | 239 | { |
240 | "halting debug mode enabled. Unable to access hardware resources.\n")) { | 240 | u32 dscr; |
241 | ret = -EPERM; | 241 | ARM_DBG_READ(c0, c1, 0, dscr); |
242 | goto out; | ||
243 | } | ||
244 | 242 | ||
245 | /* If monitor mode is already enabled, just return. */ | 243 | /* If monitor mode is already enabled, just return. */ |
246 | if (dscr & ARM_DSCR_MDBGEN) | 244 | if (dscr & ARM_DSCR_MDBGEN) |
@@ -250,24 +248,27 @@ static int enable_monitor_mode(void) | |||
250 | switch (get_debug_arch()) { | 248 | switch (get_debug_arch()) { |
251 | case ARM_DEBUG_ARCH_V6: | 249 | case ARM_DEBUG_ARCH_V6: |
252 | case ARM_DEBUG_ARCH_V6_1: | 250 | case ARM_DEBUG_ARCH_V6_1: |
253 | ARM_DBG_WRITE(c1, 0, (dscr | ARM_DSCR_MDBGEN)); | 251 | ARM_DBG_WRITE(c0, c1, 0, (dscr | ARM_DSCR_MDBGEN)); |
254 | break; | 252 | break; |
255 | case ARM_DEBUG_ARCH_V7_ECP14: | 253 | case ARM_DEBUG_ARCH_V7_ECP14: |
256 | case ARM_DEBUG_ARCH_V7_1: | 254 | case ARM_DEBUG_ARCH_V7_1: |
257 | ARM_DBG_WRITE(c2, 2, (dscr | ARM_DSCR_MDBGEN)); | 255 | ARM_DBG_WRITE(c0, c2, 2, (dscr | ARM_DSCR_MDBGEN)); |
256 | isb(); | ||
258 | break; | 257 | break; |
259 | default: | 258 | default: |
260 | ret = -ENODEV; | 259 | return -ENODEV; |
261 | goto out; | ||
262 | } | 260 | } |
263 | 261 | ||
264 | /* Check that the write made it through. */ | 262 | /* Check that the write made it through. */ |
265 | ARM_DBG_READ(c1, 0, dscr); | 263 | ARM_DBG_READ(c0, c1, 0, dscr); |
266 | if (!(dscr & ARM_DSCR_MDBGEN)) | 264 | if (!(dscr & ARM_DSCR_MDBGEN)) { |
267 | ret = -EPERM; | 265 | pr_warn_once("Failed to enable monitor mode on CPU %d.\n", |
266 | smp_processor_id()); | ||
267 | return -EPERM; | ||
268 | } | ||
268 | 269 | ||
269 | out: | 270 | out: |
270 | return ret; | 271 | return 0; |
271 | } | 272 | } |
272 | 273 | ||
273 | int hw_breakpoint_slots(int type) | 274 | int hw_breakpoint_slots(int type) |
@@ -328,14 +329,9 @@ int arch_install_hw_breakpoint(struct perf_event *bp) | |||
328 | { | 329 | { |
329 | struct arch_hw_breakpoint *info = counter_arch_bp(bp); | 330 | struct arch_hw_breakpoint *info = counter_arch_bp(bp); |
330 | struct perf_event **slot, **slots; | 331 | struct perf_event **slot, **slots; |
331 | int i, max_slots, ctrl_base, val_base, ret = 0; | 332 | int i, max_slots, ctrl_base, val_base; |
332 | u32 addr, ctrl; | 333 | u32 addr, ctrl; |
333 | 334 | ||
334 | /* Ensure that we are in monitor mode and halting mode is disabled. */ | ||
335 | ret = enable_monitor_mode(); | ||
336 | if (ret) | ||
337 | goto out; | ||
338 | |||
339 | addr = info->address; | 335 | addr = info->address; |
340 | ctrl = encode_ctrl_reg(info->ctrl) | 0x1; | 336 | ctrl = encode_ctrl_reg(info->ctrl) | 0x1; |
341 | 337 | ||
@@ -362,9 +358,9 @@ int arch_install_hw_breakpoint(struct perf_event *bp) | |||
362 | } | 358 | } |
363 | } | 359 | } |
364 | 360 | ||
365 | if (WARN_ONCE(i == max_slots, "Can't find any breakpoint slot\n")) { | 361 | if (i == max_slots) { |
366 | ret = -EBUSY; | 362 | pr_warning("Can't find any breakpoint slot\n"); |
367 | goto out; | 363 | return -EBUSY; |
368 | } | 364 | } |
369 | 365 | ||
370 | /* Override the breakpoint data with the step data. */ | 366 | /* Override the breakpoint data with the step data. */ |
@@ -383,9 +379,7 @@ int arch_install_hw_breakpoint(struct perf_event *bp) | |||
383 | 379 | ||
384 | /* Setup the control register. */ | 380 | /* Setup the control register. */ |
385 | write_wb_reg(ctrl_base + i, ctrl); | 381 | write_wb_reg(ctrl_base + i, ctrl); |
386 | 382 | return 0; | |
387 | out: | ||
388 | return ret; | ||
389 | } | 383 | } |
390 | 384 | ||
391 | void arch_uninstall_hw_breakpoint(struct perf_event *bp) | 385 | void arch_uninstall_hw_breakpoint(struct perf_event *bp) |
@@ -416,8 +410,10 @@ void arch_uninstall_hw_breakpoint(struct perf_event *bp) | |||
416 | } | 410 | } |
417 | } | 411 | } |
418 | 412 | ||
419 | if (WARN_ONCE(i == max_slots, "Can't find any breakpoint slot\n")) | 413 | if (i == max_slots) { |
414 | pr_warning("Can't find any breakpoint slot\n"); | ||
420 | return; | 415 | return; |
416 | } | ||
421 | 417 | ||
422 | /* Ensure that we disable the mismatch breakpoint. */ | 418 | /* Ensure that we disable the mismatch breakpoint. */ |
423 | if (info->ctrl.type != ARM_BREAKPOINT_EXECUTE && | 419 | if (info->ctrl.type != ARM_BREAKPOINT_EXECUTE && |
@@ -596,6 +592,10 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp) | |||
596 | int ret = 0; | 592 | int ret = 0; |
597 | u32 offset, alignment_mask = 0x3; | 593 | u32 offset, alignment_mask = 0x3; |
598 | 594 | ||
595 | /* Ensure that we are in monitor debug mode. */ | ||
596 | if (!monitor_mode_enabled()) | ||
597 | return -ENODEV; | ||
598 | |||
599 | /* Build the arch_hw_breakpoint. */ | 599 | /* Build the arch_hw_breakpoint. */ |
600 | ret = arch_build_bp_info(bp); | 600 | ret = arch_build_bp_info(bp); |
601 | if (ret) | 601 | if (ret) |
@@ -858,7 +858,7 @@ static int hw_breakpoint_pending(unsigned long addr, unsigned int fsr, | |||
858 | local_irq_enable(); | 858 | local_irq_enable(); |
859 | 859 | ||
860 | /* We only handle watchpoints and hardware breakpoints. */ | 860 | /* We only handle watchpoints and hardware breakpoints. */ |
861 | ARM_DBG_READ(c1, 0, dscr); | 861 | ARM_DBG_READ(c0, c1, 0, dscr); |
862 | 862 | ||
863 | /* Perform perf callbacks. */ | 863 | /* Perform perf callbacks. */ |
864 | switch (ARM_DSCR_MOE(dscr)) { | 864 | switch (ARM_DSCR_MOE(dscr)) { |
@@ -906,7 +906,7 @@ static struct undef_hook debug_reg_hook = { | |||
906 | static void reset_ctrl_regs(void *unused) | 906 | static void reset_ctrl_regs(void *unused) |
907 | { | 907 | { |
908 | int i, raw_num_brps, err = 0, cpu = smp_processor_id(); | 908 | int i, raw_num_brps, err = 0, cpu = smp_processor_id(); |
909 | u32 dbg_power; | 909 | u32 val; |
910 | 910 | ||
911 | /* | 911 | /* |
912 | * v7 debug contains save and restore registers so that debug state | 912 | * v7 debug contains save and restore registers so that debug state |
@@ -919,23 +919,30 @@ static void reset_ctrl_regs(void *unused) | |||
919 | switch (debug_arch) { | 919 | switch (debug_arch) { |
920 | case ARM_DEBUG_ARCH_V6: | 920 | case ARM_DEBUG_ARCH_V6: |
921 | case ARM_DEBUG_ARCH_V6_1: | 921 | case ARM_DEBUG_ARCH_V6_1: |
922 | /* ARMv6 cores just need to reset the registers. */ | 922 | /* ARMv6 cores clear the registers out of reset. */ |
923 | goto reset_regs; | 923 | goto out_mdbgen; |
924 | case ARM_DEBUG_ARCH_V7_ECP14: | 924 | case ARM_DEBUG_ARCH_V7_ECP14: |
925 | /* | 925 | /* |
926 | * Ensure sticky power-down is clear (i.e. debug logic is | 926 | * Ensure sticky power-down is clear (i.e. debug logic is |
927 | * powered up). | 927 | * powered up). |
928 | */ | 928 | */ |
929 | asm volatile("mrc p14, 0, %0, c1, c5, 4" : "=r" (dbg_power)); | 929 | ARM_DBG_READ(c1, c5, 4, val); |
930 | if ((dbg_power & 0x1) == 0) | 930 | if ((val & 0x1) == 0) |
931 | err = -EPERM; | 931 | err = -EPERM; |
932 | |||
933 | /* | ||
934 | * Check whether we implement OS save and restore. | ||
935 | */ | ||
936 | ARM_DBG_READ(c1, c1, 4, val); | ||
937 | if ((val & 0x9) == 0) | ||
938 | goto clear_vcr; | ||
932 | break; | 939 | break; |
933 | case ARM_DEBUG_ARCH_V7_1: | 940 | case ARM_DEBUG_ARCH_V7_1: |
934 | /* | 941 | /* |
935 | * Ensure the OS double lock is clear. | 942 | * Ensure the OS double lock is clear. |
936 | */ | 943 | */ |
937 | asm volatile("mrc p14, 0, %0, c1, c3, 4" : "=r" (dbg_power)); | 944 | ARM_DBG_READ(c1, c3, 4, val); |
938 | if ((dbg_power & 0x1) == 1) | 945 | if ((val & 0x1) == 1) |
939 | err = -EPERM; | 946 | err = -EPERM; |
940 | break; | 947 | break; |
941 | } | 948 | } |
@@ -947,24 +954,29 @@ static void reset_ctrl_regs(void *unused) | |||
947 | } | 954 | } |
948 | 955 | ||
949 | /* | 956 | /* |
950 | * Unconditionally clear the lock by writing a value | 957 | * Unconditionally clear the OS lock by writing a value |
951 | * other than 0xC5ACCE55 to the access register. | 958 | * other than 0xC5ACCE55 to the access register. |
952 | */ | 959 | */ |
953 | asm volatile("mcr p14, 0, %0, c1, c0, 4" : : "r" (0)); | 960 | ARM_DBG_WRITE(c1, c0, 4, 0); |
954 | isb(); | 961 | isb(); |
955 | 962 | ||
956 | /* | 963 | /* |
957 | * Clear any configured vector-catch events before | 964 | * Clear any configured vector-catch events before |
958 | * enabling monitor mode. | 965 | * enabling monitor mode. |
959 | */ | 966 | */ |
960 | asm volatile("mcr p14, 0, %0, c0, c7, 0" : : "r" (0)); | 967 | clear_vcr: |
968 | ARM_DBG_WRITE(c0, c7, 0, 0); | ||
961 | isb(); | 969 | isb(); |
962 | 970 | ||
963 | reset_regs: | 971 | if (cpumask_intersects(&debug_err_mask, cpumask_of(cpu))) { |
964 | if (enable_monitor_mode()) | 972 | pr_warning("CPU %d failed to disable vector catch\n", cpu); |
965 | return; | 973 | return; |
974 | } | ||
966 | 975 | ||
967 | /* We must also reset any reserved registers. */ | 976 | /* |
977 | * The control/value register pairs are UNKNOWN out of reset so | ||
978 | * clear them to avoid spurious debug events. | ||
979 | */ | ||
968 | raw_num_brps = get_num_brp_resources(); | 980 | raw_num_brps = get_num_brp_resources(); |
969 | for (i = 0; i < raw_num_brps; ++i) { | 981 | for (i = 0; i < raw_num_brps; ++i) { |
970 | write_wb_reg(ARM_BASE_BCR + i, 0UL); | 982 | write_wb_reg(ARM_BASE_BCR + i, 0UL); |
@@ -975,6 +987,19 @@ reset_regs: | |||
975 | write_wb_reg(ARM_BASE_WCR + i, 0UL); | 987 | write_wb_reg(ARM_BASE_WCR + i, 0UL); |
976 | write_wb_reg(ARM_BASE_WVR + i, 0UL); | 988 | write_wb_reg(ARM_BASE_WVR + i, 0UL); |
977 | } | 989 | } |
990 | |||
991 | if (cpumask_intersects(&debug_err_mask, cpumask_of(cpu))) { | ||
992 | pr_warning("CPU %d failed to clear debug register pairs\n", cpu); | ||
993 | return; | ||
994 | } | ||
995 | |||
996 | /* | ||
997 | * Have a crack at enabling monitor mode. We don't actually need | ||
998 | * it yet, but reporting an error early is useful if it fails. | ||
999 | */ | ||
1000 | out_mdbgen: | ||
1001 | if (enable_monitor_mode()) | ||
1002 | cpumask_or(&debug_err_mask, &debug_err_mask, cpumask_of(cpu)); | ||
978 | } | 1003 | } |
979 | 1004 | ||
980 | static int __cpuinit dbg_reset_notify(struct notifier_block *self, | 1005 | static int __cpuinit dbg_reset_notify(struct notifier_block *self, |
@@ -992,8 +1017,6 @@ static struct notifier_block __cpuinitdata dbg_reset_nb = { | |||
992 | 1017 | ||
993 | static int __init arch_hw_breakpoint_init(void) | 1018 | static int __init arch_hw_breakpoint_init(void) |
994 | { | 1019 | { |
995 | u32 dscr; | ||
996 | |||
997 | debug_arch = get_debug_arch(); | 1020 | debug_arch = get_debug_arch(); |
998 | 1021 | ||
999 | if (!debug_arch_supported()) { | 1022 | if (!debug_arch_supported()) { |
@@ -1028,17 +1051,10 @@ static int __init arch_hw_breakpoint_init(void) | |||
1028 | core_num_brps, core_has_mismatch_brps() ? "(+1 reserved) " : | 1051 | core_num_brps, core_has_mismatch_brps() ? "(+1 reserved) " : |
1029 | "", core_num_wrps); | 1052 | "", core_num_wrps); |
1030 | 1053 | ||
1031 | ARM_DBG_READ(c1, 0, dscr); | 1054 | /* Work out the maximum supported watchpoint length. */ |
1032 | if (dscr & ARM_DSCR_HDBGEN) { | 1055 | max_watchpoint_len = get_max_wp_len(); |
1033 | max_watchpoint_len = 4; | 1056 | pr_info("maximum watchpoint size is %u bytes.\n", |
1034 | pr_warning("halting debug mode enabled. Assuming maximum watchpoint size of %u bytes.\n", | 1057 | max_watchpoint_len); |
1035 | max_watchpoint_len); | ||
1036 | } else { | ||
1037 | /* Work out the maximum supported watchpoint length. */ | ||
1038 | max_watchpoint_len = get_max_wp_len(); | ||
1039 | pr_info("maximum watchpoint size is %u bytes.\n", | ||
1040 | max_watchpoint_len); | ||
1041 | } | ||
1042 | 1058 | ||
1043 | /* Register debug fault handler. */ | 1059 | /* Register debug fault handler. */ |
1044 | hook_fault_code(FAULT_CODE_DEBUG, hw_breakpoint_pending, SIGTRAP, | 1060 | hook_fault_code(FAULT_CODE_DEBUG, hw_breakpoint_pending, SIGTRAP, |
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 53c0304b734a..f9e8657dd241 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -86,12 +86,10 @@ armpmu_map_event(struct perf_event *event, | |||
86 | return -ENOENT; | 86 | return -ENOENT; |
87 | } | 87 | } |
88 | 88 | ||
89 | int | 89 | int armpmu_event_set_period(struct perf_event *event) |
90 | armpmu_event_set_period(struct perf_event *event, | ||
91 | struct hw_perf_event *hwc, | ||
92 | int idx) | ||
93 | { | 90 | { |
94 | struct arm_pmu *armpmu = to_arm_pmu(event->pmu); | 91 | struct arm_pmu *armpmu = to_arm_pmu(event->pmu); |
92 | struct hw_perf_event *hwc = &event->hw; | ||
95 | s64 left = local64_read(&hwc->period_left); | 93 | s64 left = local64_read(&hwc->period_left); |
96 | s64 period = hwc->sample_period; | 94 | s64 period = hwc->sample_period; |
97 | int ret = 0; | 95 | int ret = 0; |
@@ -119,24 +117,22 @@ armpmu_event_set_period(struct perf_event *event, | |||
119 | 117 | ||
120 | local64_set(&hwc->prev_count, (u64)-left); | 118 | local64_set(&hwc->prev_count, (u64)-left); |
121 | 119 | ||
122 | armpmu->write_counter(idx, (u64)(-left) & 0xffffffff); | 120 | armpmu->write_counter(event, (u64)(-left) & 0xffffffff); |
123 | 121 | ||
124 | perf_event_update_userpage(event); | 122 | perf_event_update_userpage(event); |
125 | 123 | ||
126 | return ret; | 124 | return ret; |
127 | } | 125 | } |
128 | 126 | ||
129 | u64 | 127 | u64 armpmu_event_update(struct perf_event *event) |
130 | armpmu_event_update(struct perf_event *event, | ||
131 | struct hw_perf_event *hwc, | ||
132 | int idx) | ||
133 | { | 128 | { |
134 | struct arm_pmu *armpmu = to_arm_pmu(event->pmu); | 129 | struct arm_pmu *armpmu = to_arm_pmu(event->pmu); |
130 | struct hw_perf_event *hwc = &event->hw; | ||
135 | u64 delta, prev_raw_count, new_raw_count; | 131 | u64 delta, prev_raw_count, new_raw_count; |
136 | 132 | ||
137 | again: | 133 | again: |
138 | prev_raw_count = local64_read(&hwc->prev_count); | 134 | prev_raw_count = local64_read(&hwc->prev_count); |
139 | new_raw_count = armpmu->read_counter(idx); | 135 | new_raw_count = armpmu->read_counter(event); |
140 | 136 | ||
141 | if (local64_cmpxchg(&hwc->prev_count, prev_raw_count, | 137 | if (local64_cmpxchg(&hwc->prev_count, prev_raw_count, |
142 | new_raw_count) != prev_raw_count) | 138 | new_raw_count) != prev_raw_count) |
@@ -159,7 +155,7 @@ armpmu_read(struct perf_event *event) | |||
159 | if (hwc->idx < 0) | 155 | if (hwc->idx < 0) |
160 | return; | 156 | return; |
161 | 157 | ||
162 | armpmu_event_update(event, hwc, hwc->idx); | 158 | armpmu_event_update(event); |
163 | } | 159 | } |
164 | 160 | ||
165 | static void | 161 | static void |
@@ -173,14 +169,13 @@ armpmu_stop(struct perf_event *event, int flags) | |||
173 | * PERF_EF_UPDATE, see comments in armpmu_start(). | 169 | * PERF_EF_UPDATE, see comments in armpmu_start(). |
174 | */ | 170 | */ |
175 | if (!(hwc->state & PERF_HES_STOPPED)) { | 171 | if (!(hwc->state & PERF_HES_STOPPED)) { |
176 | armpmu->disable(hwc, hwc->idx); | 172 | armpmu->disable(event); |
177 | armpmu_event_update(event, hwc, hwc->idx); | 173 | armpmu_event_update(event); |
178 | hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE; | 174 | hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE; |
179 | } | 175 | } |
180 | } | 176 | } |
181 | 177 | ||
182 | static void | 178 | static void armpmu_start(struct perf_event *event, int flags) |
183 | armpmu_start(struct perf_event *event, int flags) | ||
184 | { | 179 | { |
185 | struct arm_pmu *armpmu = to_arm_pmu(event->pmu); | 180 | struct arm_pmu *armpmu = to_arm_pmu(event->pmu); |
186 | struct hw_perf_event *hwc = &event->hw; | 181 | struct hw_perf_event *hwc = &event->hw; |
@@ -200,8 +195,8 @@ armpmu_start(struct perf_event *event, int flags) | |||
200 | * get an interrupt too soon or *way* too late if the overflow has | 195 | * get an interrupt too soon or *way* too late if the overflow has |
201 | * happened since disabling. | 196 | * happened since disabling. |
202 | */ | 197 | */ |
203 | armpmu_event_set_period(event, hwc, hwc->idx); | 198 | armpmu_event_set_period(event); |
204 | armpmu->enable(hwc, hwc->idx); | 199 | armpmu->enable(event); |
205 | } | 200 | } |
206 | 201 | ||
207 | static void | 202 | static void |
@@ -233,7 +228,7 @@ armpmu_add(struct perf_event *event, int flags) | |||
233 | perf_pmu_disable(event->pmu); | 228 | perf_pmu_disable(event->pmu); |
234 | 229 | ||
235 | /* If we don't have a space for the counter then finish early. */ | 230 | /* If we don't have a space for the counter then finish early. */ |
236 | idx = armpmu->get_event_idx(hw_events, hwc); | 231 | idx = armpmu->get_event_idx(hw_events, event); |
237 | if (idx < 0) { | 232 | if (idx < 0) { |
238 | err = idx; | 233 | err = idx; |
239 | goto out; | 234 | goto out; |
@@ -244,7 +239,7 @@ armpmu_add(struct perf_event *event, int flags) | |||
244 | * sure it is disabled. | 239 | * sure it is disabled. |
245 | */ | 240 | */ |
246 | event->hw.idx = idx; | 241 | event->hw.idx = idx; |
247 | armpmu->disable(hwc, idx); | 242 | armpmu->disable(event); |
248 | hw_events->events[idx] = event; | 243 | hw_events->events[idx] = event; |
249 | 244 | ||
250 | hwc->state = PERF_HES_STOPPED | PERF_HES_UPTODATE; | 245 | hwc->state = PERF_HES_STOPPED | PERF_HES_UPTODATE; |
@@ -264,13 +259,12 @@ validate_event(struct pmu_hw_events *hw_events, | |||
264 | struct perf_event *event) | 259 | struct perf_event *event) |
265 | { | 260 | { |
266 | struct arm_pmu *armpmu = to_arm_pmu(event->pmu); | 261 | struct arm_pmu *armpmu = to_arm_pmu(event->pmu); |
267 | struct hw_perf_event fake_event = event->hw; | ||
268 | struct pmu *leader_pmu = event->group_leader->pmu; | 262 | struct pmu *leader_pmu = event->group_leader->pmu; |
269 | 263 | ||
270 | if (event->pmu != leader_pmu || event->state <= PERF_EVENT_STATE_OFF) | 264 | if (event->pmu != leader_pmu || event->state <= PERF_EVENT_STATE_OFF) |
271 | return 1; | 265 | return 1; |
272 | 266 | ||
273 | return armpmu->get_event_idx(hw_events, &fake_event) >= 0; | 267 | return armpmu->get_event_idx(hw_events, event) >= 0; |
274 | } | 268 | } |
275 | 269 | ||
276 | static int | 270 | static int |
@@ -316,7 +310,7 @@ static irqreturn_t armpmu_dispatch_irq(int irq, void *dev) | |||
316 | static void | 310 | static void |
317 | armpmu_release_hardware(struct arm_pmu *armpmu) | 311 | armpmu_release_hardware(struct arm_pmu *armpmu) |
318 | { | 312 | { |
319 | armpmu->free_irq(); | 313 | armpmu->free_irq(armpmu); |
320 | pm_runtime_put_sync(&armpmu->plat_device->dev); | 314 | pm_runtime_put_sync(&armpmu->plat_device->dev); |
321 | } | 315 | } |
322 | 316 | ||
@@ -330,7 +324,7 @@ armpmu_reserve_hardware(struct arm_pmu *armpmu) | |||
330 | return -ENODEV; | 324 | return -ENODEV; |
331 | 325 | ||
332 | pm_runtime_get_sync(&pmu_device->dev); | 326 | pm_runtime_get_sync(&pmu_device->dev); |
333 | err = armpmu->request_irq(armpmu_dispatch_irq); | 327 | err = armpmu->request_irq(armpmu, armpmu_dispatch_irq); |
334 | if (err) { | 328 | if (err) { |
335 | armpmu_release_hardware(armpmu); | 329 | armpmu_release_hardware(armpmu); |
336 | return err; | 330 | return err; |
@@ -465,13 +459,13 @@ static void armpmu_enable(struct pmu *pmu) | |||
465 | int enabled = bitmap_weight(hw_events->used_mask, armpmu->num_events); | 459 | int enabled = bitmap_weight(hw_events->used_mask, armpmu->num_events); |
466 | 460 | ||
467 | if (enabled) | 461 | if (enabled) |
468 | armpmu->start(); | 462 | armpmu->start(armpmu); |
469 | } | 463 | } |
470 | 464 | ||
471 | static void armpmu_disable(struct pmu *pmu) | 465 | static void armpmu_disable(struct pmu *pmu) |
472 | { | 466 | { |
473 | struct arm_pmu *armpmu = to_arm_pmu(pmu); | 467 | struct arm_pmu *armpmu = to_arm_pmu(pmu); |
474 | armpmu->stop(); | 468 | armpmu->stop(armpmu); |
475 | } | 469 | } |
476 | 470 | ||
477 | #ifdef CONFIG_PM_RUNTIME | 471 | #ifdef CONFIG_PM_RUNTIME |
@@ -517,12 +511,13 @@ static void __init armpmu_init(struct arm_pmu *armpmu) | |||
517 | }; | 511 | }; |
518 | } | 512 | } |
519 | 513 | ||
520 | int armpmu_register(struct arm_pmu *armpmu, char *name, int type) | 514 | int armpmu_register(struct arm_pmu *armpmu, int type) |
521 | { | 515 | { |
522 | armpmu_init(armpmu); | 516 | armpmu_init(armpmu); |
517 | pm_runtime_enable(&armpmu->plat_device->dev); | ||
523 | pr_info("enabled with %s PMU driver, %d counters available\n", | 518 | pr_info("enabled with %s PMU driver, %d counters available\n", |
524 | armpmu->name, armpmu->num_events); | 519 | armpmu->name, armpmu->num_events); |
525 | return perf_pmu_register(&armpmu->pmu, name, type); | 520 | return perf_pmu_register(&armpmu->pmu, armpmu->name, type); |
526 | } | 521 | } |
527 | 522 | ||
528 | /* | 523 | /* |
@@ -576,6 +571,10 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs) | |||
576 | { | 571 | { |
577 | struct frame_tail __user *tail; | 572 | struct frame_tail __user *tail; |
578 | 573 | ||
574 | if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) { | ||
575 | /* We don't support guest os callchain now */ | ||
576 | return; | ||
577 | } | ||
579 | 578 | ||
580 | tail = (struct frame_tail __user *)regs->ARM_fp - 1; | 579 | tail = (struct frame_tail __user *)regs->ARM_fp - 1; |
581 | 580 | ||
@@ -603,9 +602,41 @@ perf_callchain_kernel(struct perf_callchain_entry *entry, struct pt_regs *regs) | |||
603 | { | 602 | { |
604 | struct stackframe fr; | 603 | struct stackframe fr; |
605 | 604 | ||
605 | if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) { | ||
606 | /* We don't support guest os callchain now */ | ||
607 | return; | ||
608 | } | ||
609 | |||
606 | fr.fp = regs->ARM_fp; | 610 | fr.fp = regs->ARM_fp; |
607 | fr.sp = regs->ARM_sp; | 611 | fr.sp = regs->ARM_sp; |
608 | fr.lr = regs->ARM_lr; | 612 | fr.lr = regs->ARM_lr; |
609 | fr.pc = regs->ARM_pc; | 613 | fr.pc = regs->ARM_pc; |
610 | walk_stackframe(&fr, callchain_trace, entry); | 614 | walk_stackframe(&fr, callchain_trace, entry); |
611 | } | 615 | } |
616 | |||
617 | unsigned long perf_instruction_pointer(struct pt_regs *regs) | ||
618 | { | ||
619 | if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) | ||
620 | return perf_guest_cbs->get_guest_ip(); | ||
621 | |||
622 | return instruction_pointer(regs); | ||
623 | } | ||
624 | |||
625 | unsigned long perf_misc_flags(struct pt_regs *regs) | ||
626 | { | ||
627 | int misc = 0; | ||
628 | |||
629 | if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) { | ||
630 | if (perf_guest_cbs->is_user_mode()) | ||
631 | misc |= PERF_RECORD_MISC_GUEST_USER; | ||
632 | else | ||
633 | misc |= PERF_RECORD_MISC_GUEST_KERNEL; | ||
634 | } else { | ||
635 | if (user_mode(regs)) | ||
636 | misc |= PERF_RECORD_MISC_USER; | ||
637 | else | ||
638 | misc |= PERF_RECORD_MISC_KERNEL; | ||
639 | } | ||
640 | |||
641 | return misc; | ||
642 | } | ||
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c index 8d7d8d4de9d6..9a4f6307a016 100644 --- a/arch/arm/kernel/perf_event_cpu.c +++ b/arch/arm/kernel/perf_event_cpu.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/of.h> | 24 | #include <linux/of.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
27 | 28 | ||
28 | #include <asm/cputype.h> | 29 | #include <asm/cputype.h> |
@@ -45,7 +46,7 @@ const char *perf_pmu_name(void) | |||
45 | if (!cpu_pmu) | 46 | if (!cpu_pmu) |
46 | return NULL; | 47 | return NULL; |
47 | 48 | ||
48 | return cpu_pmu->pmu.name; | 49 | return cpu_pmu->name; |
49 | } | 50 | } |
50 | EXPORT_SYMBOL_GPL(perf_pmu_name); | 51 | EXPORT_SYMBOL_GPL(perf_pmu_name); |
51 | 52 | ||
@@ -70,7 +71,7 @@ static struct pmu_hw_events *cpu_pmu_get_cpu_events(void) | |||
70 | return &__get_cpu_var(cpu_hw_events); | 71 | return &__get_cpu_var(cpu_hw_events); |
71 | } | 72 | } |
72 | 73 | ||
73 | static void cpu_pmu_free_irq(void) | 74 | static void cpu_pmu_free_irq(struct arm_pmu *cpu_pmu) |
74 | { | 75 | { |
75 | int i, irq, irqs; | 76 | int i, irq, irqs; |
76 | struct platform_device *pmu_device = cpu_pmu->plat_device; | 77 | struct platform_device *pmu_device = cpu_pmu->plat_device; |
@@ -86,7 +87,7 @@ static void cpu_pmu_free_irq(void) | |||
86 | } | 87 | } |
87 | } | 88 | } |
88 | 89 | ||
89 | static int cpu_pmu_request_irq(irq_handler_t handler) | 90 | static int cpu_pmu_request_irq(struct arm_pmu *cpu_pmu, irq_handler_t handler) |
90 | { | 91 | { |
91 | int i, err, irq, irqs; | 92 | int i, err, irq, irqs; |
92 | struct platform_device *pmu_device = cpu_pmu->plat_device; | 93 | struct platform_device *pmu_device = cpu_pmu->plat_device; |
@@ -147,7 +148,7 @@ static void __devinit cpu_pmu_init(struct arm_pmu *cpu_pmu) | |||
147 | 148 | ||
148 | /* Ensure the PMU has sane values out of reset. */ | 149 | /* Ensure the PMU has sane values out of reset. */ |
149 | if (cpu_pmu && cpu_pmu->reset) | 150 | if (cpu_pmu && cpu_pmu->reset) |
150 | on_each_cpu(cpu_pmu->reset, NULL, 1); | 151 | on_each_cpu(cpu_pmu->reset, cpu_pmu, 1); |
151 | } | 152 | } |
152 | 153 | ||
153 | /* | 154 | /* |
@@ -163,7 +164,9 @@ static int __cpuinit cpu_pmu_notify(struct notifier_block *b, | |||
163 | return NOTIFY_DONE; | 164 | return NOTIFY_DONE; |
164 | 165 | ||
165 | if (cpu_pmu && cpu_pmu->reset) | 166 | if (cpu_pmu && cpu_pmu->reset) |
166 | cpu_pmu->reset(NULL); | 167 | cpu_pmu->reset(cpu_pmu); |
168 | else | ||
169 | return NOTIFY_DONE; | ||
167 | 170 | ||
168 | return NOTIFY_OK; | 171 | return NOTIFY_OK; |
169 | } | 172 | } |
@@ -195,13 +198,13 @@ static struct platform_device_id __devinitdata cpu_pmu_plat_device_ids[] = { | |||
195 | /* | 198 | /* |
196 | * CPU PMU identification and probing. | 199 | * CPU PMU identification and probing. |
197 | */ | 200 | */ |
198 | static struct arm_pmu *__devinit probe_current_pmu(void) | 201 | static int __devinit probe_current_pmu(struct arm_pmu *pmu) |
199 | { | 202 | { |
200 | struct arm_pmu *pmu = NULL; | ||
201 | int cpu = get_cpu(); | 203 | int cpu = get_cpu(); |
202 | unsigned long cpuid = read_cpuid_id(); | 204 | unsigned long cpuid = read_cpuid_id(); |
203 | unsigned long implementor = (cpuid & 0xFF000000) >> 24; | 205 | unsigned long implementor = (cpuid & 0xFF000000) >> 24; |
204 | unsigned long part_number = (cpuid & 0xFFF0); | 206 | unsigned long part_number = (cpuid & 0xFFF0); |
207 | int ret = -ENODEV; | ||
205 | 208 | ||
206 | pr_info("probing PMU on CPU %d\n", cpu); | 209 | pr_info("probing PMU on CPU %d\n", cpu); |
207 | 210 | ||
@@ -211,25 +214,25 @@ static struct arm_pmu *__devinit probe_current_pmu(void) | |||
211 | case 0xB360: /* ARM1136 */ | 214 | case 0xB360: /* ARM1136 */ |
212 | case 0xB560: /* ARM1156 */ | 215 | case 0xB560: /* ARM1156 */ |
213 | case 0xB760: /* ARM1176 */ | 216 | case 0xB760: /* ARM1176 */ |
214 | pmu = armv6pmu_init(); | 217 | ret = armv6pmu_init(pmu); |
215 | break; | 218 | break; |
216 | case 0xB020: /* ARM11mpcore */ | 219 | case 0xB020: /* ARM11mpcore */ |
217 | pmu = armv6mpcore_pmu_init(); | 220 | ret = armv6mpcore_pmu_init(pmu); |
218 | break; | 221 | break; |
219 | case 0xC080: /* Cortex-A8 */ | 222 | case 0xC080: /* Cortex-A8 */ |
220 | pmu = armv7_a8_pmu_init(); | 223 | ret = armv7_a8_pmu_init(pmu); |
221 | break; | 224 | break; |
222 | case 0xC090: /* Cortex-A9 */ | 225 | case 0xC090: /* Cortex-A9 */ |
223 | pmu = armv7_a9_pmu_init(); | 226 | ret = armv7_a9_pmu_init(pmu); |
224 | break; | 227 | break; |
225 | case 0xC050: /* Cortex-A5 */ | 228 | case 0xC050: /* Cortex-A5 */ |
226 | pmu = armv7_a5_pmu_init(); | 229 | ret = armv7_a5_pmu_init(pmu); |
227 | break; | 230 | break; |
228 | case 0xC0F0: /* Cortex-A15 */ | 231 | case 0xC0F0: /* Cortex-A15 */ |
229 | pmu = armv7_a15_pmu_init(); | 232 | ret = armv7_a15_pmu_init(pmu); |
230 | break; | 233 | break; |
231 | case 0xC070: /* Cortex-A7 */ | 234 | case 0xC070: /* Cortex-A7 */ |
232 | pmu = armv7_a7_pmu_init(); | 235 | ret = armv7_a7_pmu_init(pmu); |
233 | break; | 236 | break; |
234 | } | 237 | } |
235 | /* Intel CPUs [xscale]. */ | 238 | /* Intel CPUs [xscale]. */ |
@@ -237,43 +240,54 @@ static struct arm_pmu *__devinit probe_current_pmu(void) | |||
237 | part_number = (cpuid >> 13) & 0x7; | 240 | part_number = (cpuid >> 13) & 0x7; |
238 | switch (part_number) { | 241 | switch (part_number) { |
239 | case 1: | 242 | case 1: |
240 | pmu = xscale1pmu_init(); | 243 | ret = xscale1pmu_init(pmu); |
241 | break; | 244 | break; |
242 | case 2: | 245 | case 2: |
243 | pmu = xscale2pmu_init(); | 246 | ret = xscale2pmu_init(pmu); |
244 | break; | 247 | break; |
245 | } | 248 | } |
246 | } | 249 | } |
247 | 250 | ||
248 | put_cpu(); | 251 | put_cpu(); |
249 | return pmu; | 252 | return ret; |
250 | } | 253 | } |
251 | 254 | ||
252 | static int __devinit cpu_pmu_device_probe(struct platform_device *pdev) | 255 | static int __devinit cpu_pmu_device_probe(struct platform_device *pdev) |
253 | { | 256 | { |
254 | const struct of_device_id *of_id; | 257 | const struct of_device_id *of_id; |
255 | struct arm_pmu *(*init_fn)(void); | 258 | int (*init_fn)(struct arm_pmu *); |
256 | struct device_node *node = pdev->dev.of_node; | 259 | struct device_node *node = pdev->dev.of_node; |
260 | struct arm_pmu *pmu; | ||
261 | int ret = -ENODEV; | ||
257 | 262 | ||
258 | if (cpu_pmu) { | 263 | if (cpu_pmu) { |
259 | pr_info("attempt to register multiple PMU devices!"); | 264 | pr_info("attempt to register multiple PMU devices!"); |
260 | return -ENOSPC; | 265 | return -ENOSPC; |
261 | } | 266 | } |
262 | 267 | ||
268 | pmu = kzalloc(sizeof(struct arm_pmu), GFP_KERNEL); | ||
269 | if (!pmu) { | ||
270 | pr_info("failed to allocate PMU device!"); | ||
271 | return -ENOMEM; | ||
272 | } | ||
273 | |||
263 | if (node && (of_id = of_match_node(cpu_pmu_of_device_ids, pdev->dev.of_node))) { | 274 | if (node && (of_id = of_match_node(cpu_pmu_of_device_ids, pdev->dev.of_node))) { |
264 | init_fn = of_id->data; | 275 | init_fn = of_id->data; |
265 | cpu_pmu = init_fn(); | 276 | ret = init_fn(pmu); |
266 | } else { | 277 | } else { |
267 | cpu_pmu = probe_current_pmu(); | 278 | ret = probe_current_pmu(pmu); |
268 | } | 279 | } |
269 | 280 | ||
270 | if (!cpu_pmu) | 281 | if (ret) { |
271 | return -ENODEV; | 282 | pr_info("failed to register PMU devices!"); |
283 | kfree(pmu); | ||
284 | return ret; | ||
285 | } | ||
272 | 286 | ||
287 | cpu_pmu = pmu; | ||
273 | cpu_pmu->plat_device = pdev; | 288 | cpu_pmu->plat_device = pdev; |
274 | cpu_pmu_init(cpu_pmu); | 289 | cpu_pmu_init(cpu_pmu); |
275 | register_cpu_notifier(&cpu_pmu_hotplug_notifier); | 290 | armpmu_register(cpu_pmu, PERF_TYPE_RAW); |
276 | armpmu_register(cpu_pmu, cpu_pmu->name, PERF_TYPE_RAW); | ||
277 | 291 | ||
278 | return 0; | 292 | return 0; |
279 | } | 293 | } |
@@ -290,6 +304,16 @@ static struct platform_driver cpu_pmu_driver = { | |||
290 | 304 | ||
291 | static int __init register_pmu_driver(void) | 305 | static int __init register_pmu_driver(void) |
292 | { | 306 | { |
293 | return platform_driver_register(&cpu_pmu_driver); | 307 | int err; |
308 | |||
309 | err = register_cpu_notifier(&cpu_pmu_hotplug_notifier); | ||
310 | if (err) | ||
311 | return err; | ||
312 | |||
313 | err = platform_driver_register(&cpu_pmu_driver); | ||
314 | if (err) | ||
315 | unregister_cpu_notifier(&cpu_pmu_hotplug_notifier); | ||
316 | |||
317 | return err; | ||
294 | } | 318 | } |
295 | device_initcall(register_pmu_driver); | 319 | device_initcall(register_pmu_driver); |
diff --git a/arch/arm/kernel/perf_event_v6.c b/arch/arm/kernel/perf_event_v6.c index 6ccc07971745..f3e22ff8b6a2 100644 --- a/arch/arm/kernel/perf_event_v6.c +++ b/arch/arm/kernel/perf_event_v6.c | |||
@@ -401,9 +401,10 @@ armv6_pmcr_counter_has_overflowed(unsigned long pmcr, | |||
401 | return ret; | 401 | return ret; |
402 | } | 402 | } |
403 | 403 | ||
404 | static inline u32 | 404 | static inline u32 armv6pmu_read_counter(struct perf_event *event) |
405 | armv6pmu_read_counter(int counter) | ||
406 | { | 405 | { |
406 | struct hw_perf_event *hwc = &event->hw; | ||
407 | int counter = hwc->idx; | ||
407 | unsigned long value = 0; | 408 | unsigned long value = 0; |
408 | 409 | ||
409 | if (ARMV6_CYCLE_COUNTER == counter) | 410 | if (ARMV6_CYCLE_COUNTER == counter) |
@@ -418,10 +419,11 @@ armv6pmu_read_counter(int counter) | |||
418 | return value; | 419 | return value; |
419 | } | 420 | } |
420 | 421 | ||
421 | static inline void | 422 | static inline void armv6pmu_write_counter(struct perf_event *event, u32 value) |
422 | armv6pmu_write_counter(int counter, | ||
423 | u32 value) | ||
424 | { | 423 | { |
424 | struct hw_perf_event *hwc = &event->hw; | ||
425 | int counter = hwc->idx; | ||
426 | |||
425 | if (ARMV6_CYCLE_COUNTER == counter) | 427 | if (ARMV6_CYCLE_COUNTER == counter) |
426 | asm volatile("mcr p15, 0, %0, c15, c12, 1" : : "r"(value)); | 428 | asm volatile("mcr p15, 0, %0, c15, c12, 1" : : "r"(value)); |
427 | else if (ARMV6_COUNTER0 == counter) | 429 | else if (ARMV6_COUNTER0 == counter) |
@@ -432,12 +434,13 @@ armv6pmu_write_counter(int counter, | |||
432 | WARN_ONCE(1, "invalid counter number (%d)\n", counter); | 434 | WARN_ONCE(1, "invalid counter number (%d)\n", counter); |
433 | } | 435 | } |
434 | 436 | ||
435 | static void | 437 | static void armv6pmu_enable_event(struct perf_event *event) |
436 | armv6pmu_enable_event(struct hw_perf_event *hwc, | ||
437 | int idx) | ||
438 | { | 438 | { |
439 | unsigned long val, mask, evt, flags; | 439 | unsigned long val, mask, evt, flags; |
440 | struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); | ||
441 | struct hw_perf_event *hwc = &event->hw; | ||
440 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 442 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
443 | int idx = hwc->idx; | ||
441 | 444 | ||
442 | if (ARMV6_CYCLE_COUNTER == idx) { | 445 | if (ARMV6_CYCLE_COUNTER == idx) { |
443 | mask = 0; | 446 | mask = 0; |
@@ -473,7 +476,8 @@ armv6pmu_handle_irq(int irq_num, | |||
473 | { | 476 | { |
474 | unsigned long pmcr = armv6_pmcr_read(); | 477 | unsigned long pmcr = armv6_pmcr_read(); |
475 | struct perf_sample_data data; | 478 | struct perf_sample_data data; |
476 | struct pmu_hw_events *cpuc; | 479 | struct arm_pmu *cpu_pmu = (struct arm_pmu *)dev; |
480 | struct pmu_hw_events *cpuc = cpu_pmu->get_hw_events(); | ||
477 | struct pt_regs *regs; | 481 | struct pt_regs *regs; |
478 | int idx; | 482 | int idx; |
479 | 483 | ||
@@ -489,7 +493,6 @@ armv6pmu_handle_irq(int irq_num, | |||
489 | */ | 493 | */ |
490 | armv6_pmcr_write(pmcr); | 494 | armv6_pmcr_write(pmcr); |
491 | 495 | ||
492 | cpuc = &__get_cpu_var(cpu_hw_events); | ||
493 | for (idx = 0; idx < cpu_pmu->num_events; ++idx) { | 496 | for (idx = 0; idx < cpu_pmu->num_events; ++idx) { |
494 | struct perf_event *event = cpuc->events[idx]; | 497 | struct perf_event *event = cpuc->events[idx]; |
495 | struct hw_perf_event *hwc; | 498 | struct hw_perf_event *hwc; |
@@ -506,13 +509,13 @@ armv6pmu_handle_irq(int irq_num, | |||
506 | continue; | 509 | continue; |
507 | 510 | ||
508 | hwc = &event->hw; | 511 | hwc = &event->hw; |
509 | armpmu_event_update(event, hwc, idx); | 512 | armpmu_event_update(event); |
510 | perf_sample_data_init(&data, 0, hwc->last_period); | 513 | perf_sample_data_init(&data, 0, hwc->last_period); |
511 | if (!armpmu_event_set_period(event, hwc, idx)) | 514 | if (!armpmu_event_set_period(event)) |
512 | continue; | 515 | continue; |
513 | 516 | ||
514 | if (perf_event_overflow(event, &data, regs)) | 517 | if (perf_event_overflow(event, &data, regs)) |
515 | cpu_pmu->disable(hwc, idx); | 518 | cpu_pmu->disable(event); |
516 | } | 519 | } |
517 | 520 | ||
518 | /* | 521 | /* |
@@ -527,8 +530,7 @@ armv6pmu_handle_irq(int irq_num, | |||
527 | return IRQ_HANDLED; | 530 | return IRQ_HANDLED; |
528 | } | 531 | } |
529 | 532 | ||
530 | static void | 533 | static void armv6pmu_start(struct arm_pmu *cpu_pmu) |
531 | armv6pmu_start(void) | ||
532 | { | 534 | { |
533 | unsigned long flags, val; | 535 | unsigned long flags, val; |
534 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 536 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
@@ -540,8 +542,7 @@ armv6pmu_start(void) | |||
540 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); | 542 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); |
541 | } | 543 | } |
542 | 544 | ||
543 | static void | 545 | static void armv6pmu_stop(struct arm_pmu *cpu_pmu) |
544 | armv6pmu_stop(void) | ||
545 | { | 546 | { |
546 | unsigned long flags, val; | 547 | unsigned long flags, val; |
547 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 548 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
@@ -555,10 +556,11 @@ armv6pmu_stop(void) | |||
555 | 556 | ||
556 | static int | 557 | static int |
557 | armv6pmu_get_event_idx(struct pmu_hw_events *cpuc, | 558 | armv6pmu_get_event_idx(struct pmu_hw_events *cpuc, |
558 | struct hw_perf_event *event) | 559 | struct perf_event *event) |
559 | { | 560 | { |
561 | struct hw_perf_event *hwc = &event->hw; | ||
560 | /* Always place a cycle counter into the cycle counter. */ | 562 | /* Always place a cycle counter into the cycle counter. */ |
561 | if (ARMV6_PERFCTR_CPU_CYCLES == event->config_base) { | 563 | if (ARMV6_PERFCTR_CPU_CYCLES == hwc->config_base) { |
562 | if (test_and_set_bit(ARMV6_CYCLE_COUNTER, cpuc->used_mask)) | 564 | if (test_and_set_bit(ARMV6_CYCLE_COUNTER, cpuc->used_mask)) |
563 | return -EAGAIN; | 565 | return -EAGAIN; |
564 | 566 | ||
@@ -579,12 +581,13 @@ armv6pmu_get_event_idx(struct pmu_hw_events *cpuc, | |||
579 | } | 581 | } |
580 | } | 582 | } |
581 | 583 | ||
582 | static void | 584 | static void armv6pmu_disable_event(struct perf_event *event) |
583 | armv6pmu_disable_event(struct hw_perf_event *hwc, | ||
584 | int idx) | ||
585 | { | 585 | { |
586 | unsigned long val, mask, evt, flags; | 586 | unsigned long val, mask, evt, flags; |
587 | struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); | ||
588 | struct hw_perf_event *hwc = &event->hw; | ||
587 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 589 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
590 | int idx = hwc->idx; | ||
588 | 591 | ||
589 | if (ARMV6_CYCLE_COUNTER == idx) { | 592 | if (ARMV6_CYCLE_COUNTER == idx) { |
590 | mask = ARMV6_PMCR_CCOUNT_IEN; | 593 | mask = ARMV6_PMCR_CCOUNT_IEN; |
@@ -613,12 +616,13 @@ armv6pmu_disable_event(struct hw_perf_event *hwc, | |||
613 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); | 616 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); |
614 | } | 617 | } |
615 | 618 | ||
616 | static void | 619 | static void armv6mpcore_pmu_disable_event(struct perf_event *event) |
617 | armv6mpcore_pmu_disable_event(struct hw_perf_event *hwc, | ||
618 | int idx) | ||
619 | { | 620 | { |
620 | unsigned long val, mask, flags, evt = 0; | 621 | unsigned long val, mask, flags, evt = 0; |
622 | struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); | ||
623 | struct hw_perf_event *hwc = &event->hw; | ||
621 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 624 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
625 | int idx = hwc->idx; | ||
622 | 626 | ||
623 | if (ARMV6_CYCLE_COUNTER == idx) { | 627 | if (ARMV6_CYCLE_COUNTER == idx) { |
624 | mask = ARMV6_PMCR_CCOUNT_IEN; | 628 | mask = ARMV6_PMCR_CCOUNT_IEN; |
@@ -649,24 +653,22 @@ static int armv6_map_event(struct perf_event *event) | |||
649 | &armv6_perf_cache_map, 0xFF); | 653 | &armv6_perf_cache_map, 0xFF); |
650 | } | 654 | } |
651 | 655 | ||
652 | static struct arm_pmu armv6pmu = { | 656 | static int __devinit armv6pmu_init(struct arm_pmu *cpu_pmu) |
653 | .name = "v6", | ||
654 | .handle_irq = armv6pmu_handle_irq, | ||
655 | .enable = armv6pmu_enable_event, | ||
656 | .disable = armv6pmu_disable_event, | ||
657 | .read_counter = armv6pmu_read_counter, | ||
658 | .write_counter = armv6pmu_write_counter, | ||
659 | .get_event_idx = armv6pmu_get_event_idx, | ||
660 | .start = armv6pmu_start, | ||
661 | .stop = armv6pmu_stop, | ||
662 | .map_event = armv6_map_event, | ||
663 | .num_events = 3, | ||
664 | .max_period = (1LLU << 32) - 1, | ||
665 | }; | ||
666 | |||
667 | static struct arm_pmu *__devinit armv6pmu_init(void) | ||
668 | { | 657 | { |
669 | return &armv6pmu; | 658 | cpu_pmu->name = "v6"; |
659 | cpu_pmu->handle_irq = armv6pmu_handle_irq; | ||
660 | cpu_pmu->enable = armv6pmu_enable_event; | ||
661 | cpu_pmu->disable = armv6pmu_disable_event; | ||
662 | cpu_pmu->read_counter = armv6pmu_read_counter; | ||
663 | cpu_pmu->write_counter = armv6pmu_write_counter; | ||
664 | cpu_pmu->get_event_idx = armv6pmu_get_event_idx; | ||
665 | cpu_pmu->start = armv6pmu_start; | ||
666 | cpu_pmu->stop = armv6pmu_stop; | ||
667 | cpu_pmu->map_event = armv6_map_event; | ||
668 | cpu_pmu->num_events = 3; | ||
669 | cpu_pmu->max_period = (1LLU << 32) - 1; | ||
670 | |||
671 | return 0; | ||
670 | } | 672 | } |
671 | 673 | ||
672 | /* | 674 | /* |
@@ -683,33 +685,31 @@ static int armv6mpcore_map_event(struct perf_event *event) | |||
683 | &armv6mpcore_perf_cache_map, 0xFF); | 685 | &armv6mpcore_perf_cache_map, 0xFF); |
684 | } | 686 | } |
685 | 687 | ||
686 | static struct arm_pmu armv6mpcore_pmu = { | 688 | static int __devinit armv6mpcore_pmu_init(struct arm_pmu *cpu_pmu) |
687 | .name = "v6mpcore", | ||
688 | .handle_irq = armv6pmu_handle_irq, | ||
689 | .enable = armv6pmu_enable_event, | ||
690 | .disable = armv6mpcore_pmu_disable_event, | ||
691 | .read_counter = armv6pmu_read_counter, | ||
692 | .write_counter = armv6pmu_write_counter, | ||
693 | .get_event_idx = armv6pmu_get_event_idx, | ||
694 | .start = armv6pmu_start, | ||
695 | .stop = armv6pmu_stop, | ||
696 | .map_event = armv6mpcore_map_event, | ||
697 | .num_events = 3, | ||
698 | .max_period = (1LLU << 32) - 1, | ||
699 | }; | ||
700 | |||
701 | static struct arm_pmu *__devinit armv6mpcore_pmu_init(void) | ||
702 | { | 689 | { |
703 | return &armv6mpcore_pmu; | 690 | cpu_pmu->name = "v6mpcore"; |
691 | cpu_pmu->handle_irq = armv6pmu_handle_irq; | ||
692 | cpu_pmu->enable = armv6pmu_enable_event; | ||
693 | cpu_pmu->disable = armv6mpcore_pmu_disable_event; | ||
694 | cpu_pmu->read_counter = armv6pmu_read_counter; | ||
695 | cpu_pmu->write_counter = armv6pmu_write_counter; | ||
696 | cpu_pmu->get_event_idx = armv6pmu_get_event_idx; | ||
697 | cpu_pmu->start = armv6pmu_start; | ||
698 | cpu_pmu->stop = armv6pmu_stop; | ||
699 | cpu_pmu->map_event = armv6mpcore_map_event; | ||
700 | cpu_pmu->num_events = 3; | ||
701 | cpu_pmu->max_period = (1LLU << 32) - 1; | ||
702 | |||
703 | return 0; | ||
704 | } | 704 | } |
705 | #else | 705 | #else |
706 | static struct arm_pmu *__devinit armv6pmu_init(void) | 706 | static int armv6pmu_init(struct arm_pmu *cpu_pmu) |
707 | { | 707 | { |
708 | return NULL; | 708 | return -ENODEV; |
709 | } | 709 | } |
710 | 710 | ||
711 | static struct arm_pmu *__devinit armv6mpcore_pmu_init(void) | 711 | static int armv6mpcore_pmu_init(struct arm_pmu *cpu_pmu) |
712 | { | 712 | { |
713 | return NULL; | 713 | return -ENODEV; |
714 | } | 714 | } |
715 | #endif /* CONFIG_CPU_V6 || CONFIG_CPU_V6K */ | 715 | #endif /* CONFIG_CPU_V6 || CONFIG_CPU_V6K */ |
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index bd4b090ebcfd..7d0cce85d17e 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c | |||
@@ -18,8 +18,6 @@ | |||
18 | 18 | ||
19 | #ifdef CONFIG_CPU_V7 | 19 | #ifdef CONFIG_CPU_V7 |
20 | 20 | ||
21 | static struct arm_pmu armv7pmu; | ||
22 | |||
23 | /* | 21 | /* |
24 | * Common ARMv7 event types | 22 | * Common ARMv7 event types |
25 | * | 23 | * |
@@ -738,7 +736,8 @@ static const unsigned armv7_a7_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
738 | */ | 736 | */ |
739 | #define ARMV7_IDX_CYCLE_COUNTER 0 | 737 | #define ARMV7_IDX_CYCLE_COUNTER 0 |
740 | #define ARMV7_IDX_COUNTER0 1 | 738 | #define ARMV7_IDX_COUNTER0 1 |
741 | #define ARMV7_IDX_COUNTER_LAST (ARMV7_IDX_CYCLE_COUNTER + cpu_pmu->num_events - 1) | 739 | #define ARMV7_IDX_COUNTER_LAST(cpu_pmu) \ |
740 | (ARMV7_IDX_CYCLE_COUNTER + cpu_pmu->num_events - 1) | ||
742 | 741 | ||
743 | #define ARMV7_MAX_COUNTERS 32 | 742 | #define ARMV7_MAX_COUNTERS 32 |
744 | #define ARMV7_COUNTER_MASK (ARMV7_MAX_COUNTERS - 1) | 743 | #define ARMV7_COUNTER_MASK (ARMV7_MAX_COUNTERS - 1) |
@@ -804,49 +803,34 @@ static inline int armv7_pmnc_has_overflowed(u32 pmnc) | |||
804 | return pmnc & ARMV7_OVERFLOWED_MASK; | 803 | return pmnc & ARMV7_OVERFLOWED_MASK; |
805 | } | 804 | } |
806 | 805 | ||
807 | static inline int armv7_pmnc_counter_valid(int idx) | 806 | static inline int armv7_pmnc_counter_valid(struct arm_pmu *cpu_pmu, int idx) |
808 | { | 807 | { |
809 | return idx >= ARMV7_IDX_CYCLE_COUNTER && idx <= ARMV7_IDX_COUNTER_LAST; | 808 | return idx >= ARMV7_IDX_CYCLE_COUNTER && |
809 | idx <= ARMV7_IDX_COUNTER_LAST(cpu_pmu); | ||
810 | } | 810 | } |
811 | 811 | ||
812 | static inline int armv7_pmnc_counter_has_overflowed(u32 pmnc, int idx) | 812 | static inline int armv7_pmnc_counter_has_overflowed(u32 pmnc, int idx) |
813 | { | 813 | { |
814 | int ret = 0; | 814 | return pmnc & BIT(ARMV7_IDX_TO_COUNTER(idx)); |
815 | u32 counter; | ||
816 | |||
817 | if (!armv7_pmnc_counter_valid(idx)) { | ||
818 | pr_err("CPU%u checking wrong counter %d overflow status\n", | ||
819 | smp_processor_id(), idx); | ||
820 | } else { | ||
821 | counter = ARMV7_IDX_TO_COUNTER(idx); | ||
822 | ret = pmnc & BIT(counter); | ||
823 | } | ||
824 | |||
825 | return ret; | ||
826 | } | 815 | } |
827 | 816 | ||
828 | static inline int armv7_pmnc_select_counter(int idx) | 817 | static inline int armv7_pmnc_select_counter(int idx) |
829 | { | 818 | { |
830 | u32 counter; | 819 | u32 counter = ARMV7_IDX_TO_COUNTER(idx); |
831 | |||
832 | if (!armv7_pmnc_counter_valid(idx)) { | ||
833 | pr_err("CPU%u selecting wrong PMNC counter %d\n", | ||
834 | smp_processor_id(), idx); | ||
835 | return -EINVAL; | ||
836 | } | ||
837 | |||
838 | counter = ARMV7_IDX_TO_COUNTER(idx); | ||
839 | asm volatile("mcr p15, 0, %0, c9, c12, 5" : : "r" (counter)); | 820 | asm volatile("mcr p15, 0, %0, c9, c12, 5" : : "r" (counter)); |
840 | isb(); | 821 | isb(); |
841 | 822 | ||
842 | return idx; | 823 | return idx; |
843 | } | 824 | } |
844 | 825 | ||
845 | static inline u32 armv7pmu_read_counter(int idx) | 826 | static inline u32 armv7pmu_read_counter(struct perf_event *event) |
846 | { | 827 | { |
828 | struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); | ||
829 | struct hw_perf_event *hwc = &event->hw; | ||
830 | int idx = hwc->idx; | ||
847 | u32 value = 0; | 831 | u32 value = 0; |
848 | 832 | ||
849 | if (!armv7_pmnc_counter_valid(idx)) | 833 | if (!armv7_pmnc_counter_valid(cpu_pmu, idx)) |
850 | pr_err("CPU%u reading wrong counter %d\n", | 834 | pr_err("CPU%u reading wrong counter %d\n", |
851 | smp_processor_id(), idx); | 835 | smp_processor_id(), idx); |
852 | else if (idx == ARMV7_IDX_CYCLE_COUNTER) | 836 | else if (idx == ARMV7_IDX_CYCLE_COUNTER) |
@@ -857,9 +841,13 @@ static inline u32 armv7pmu_read_counter(int idx) | |||
857 | return value; | 841 | return value; |
858 | } | 842 | } |
859 | 843 | ||
860 | static inline void armv7pmu_write_counter(int idx, u32 value) | 844 | static inline void armv7pmu_write_counter(struct perf_event *event, u32 value) |
861 | { | 845 | { |
862 | if (!armv7_pmnc_counter_valid(idx)) | 846 | struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); |
847 | struct hw_perf_event *hwc = &event->hw; | ||
848 | int idx = hwc->idx; | ||
849 | |||
850 | if (!armv7_pmnc_counter_valid(cpu_pmu, idx)) | ||
863 | pr_err("CPU%u writing wrong counter %d\n", | 851 | pr_err("CPU%u writing wrong counter %d\n", |
864 | smp_processor_id(), idx); | 852 | smp_processor_id(), idx); |
865 | else if (idx == ARMV7_IDX_CYCLE_COUNTER) | 853 | else if (idx == ARMV7_IDX_CYCLE_COUNTER) |
@@ -878,60 +866,28 @@ static inline void armv7_pmnc_write_evtsel(int idx, u32 val) | |||
878 | 866 | ||
879 | static inline int armv7_pmnc_enable_counter(int idx) | 867 | static inline int armv7_pmnc_enable_counter(int idx) |
880 | { | 868 | { |
881 | u32 counter; | 869 | u32 counter = ARMV7_IDX_TO_COUNTER(idx); |
882 | |||
883 | if (!armv7_pmnc_counter_valid(idx)) { | ||
884 | pr_err("CPU%u enabling wrong PMNC counter %d\n", | ||
885 | smp_processor_id(), idx); | ||
886 | return -EINVAL; | ||
887 | } | ||
888 | |||
889 | counter = ARMV7_IDX_TO_COUNTER(idx); | ||
890 | asm volatile("mcr p15, 0, %0, c9, c12, 1" : : "r" (BIT(counter))); | 870 | asm volatile("mcr p15, 0, %0, c9, c12, 1" : : "r" (BIT(counter))); |
891 | return idx; | 871 | return idx; |
892 | } | 872 | } |
893 | 873 | ||
894 | static inline int armv7_pmnc_disable_counter(int idx) | 874 | static inline int armv7_pmnc_disable_counter(int idx) |
895 | { | 875 | { |
896 | u32 counter; | 876 | u32 counter = ARMV7_IDX_TO_COUNTER(idx); |
897 | |||
898 | if (!armv7_pmnc_counter_valid(idx)) { | ||
899 | pr_err("CPU%u disabling wrong PMNC counter %d\n", | ||
900 | smp_processor_id(), idx); | ||
901 | return -EINVAL; | ||
902 | } | ||
903 | |||
904 | counter = ARMV7_IDX_TO_COUNTER(idx); | ||
905 | asm volatile("mcr p15, 0, %0, c9, c12, 2" : : "r" (BIT(counter))); | 877 | asm volatile("mcr p15, 0, %0, c9, c12, 2" : : "r" (BIT(counter))); |
906 | return idx; | 878 | return idx; |
907 | } | 879 | } |
908 | 880 | ||
909 | static inline int armv7_pmnc_enable_intens(int idx) | 881 | static inline int armv7_pmnc_enable_intens(int idx) |
910 | { | 882 | { |
911 | u32 counter; | 883 | u32 counter = ARMV7_IDX_TO_COUNTER(idx); |
912 | |||
913 | if (!armv7_pmnc_counter_valid(idx)) { | ||
914 | pr_err("CPU%u enabling wrong PMNC counter IRQ enable %d\n", | ||
915 | smp_processor_id(), idx); | ||
916 | return -EINVAL; | ||
917 | } | ||
918 | |||
919 | counter = ARMV7_IDX_TO_COUNTER(idx); | ||
920 | asm volatile("mcr p15, 0, %0, c9, c14, 1" : : "r" (BIT(counter))); | 884 | asm volatile("mcr p15, 0, %0, c9, c14, 1" : : "r" (BIT(counter))); |
921 | return idx; | 885 | return idx; |
922 | } | 886 | } |
923 | 887 | ||
924 | static inline int armv7_pmnc_disable_intens(int idx) | 888 | static inline int armv7_pmnc_disable_intens(int idx) |
925 | { | 889 | { |
926 | u32 counter; | 890 | u32 counter = ARMV7_IDX_TO_COUNTER(idx); |
927 | |||
928 | if (!armv7_pmnc_counter_valid(idx)) { | ||
929 | pr_err("CPU%u disabling wrong PMNC counter IRQ enable %d\n", | ||
930 | smp_processor_id(), idx); | ||
931 | return -EINVAL; | ||
932 | } | ||
933 | |||
934 | counter = ARMV7_IDX_TO_COUNTER(idx); | ||
935 | asm volatile("mcr p15, 0, %0, c9, c14, 2" : : "r" (BIT(counter))); | 891 | asm volatile("mcr p15, 0, %0, c9, c14, 2" : : "r" (BIT(counter))); |
936 | isb(); | 892 | isb(); |
937 | /* Clear the overflow flag in case an interrupt is pending. */ | 893 | /* Clear the overflow flag in case an interrupt is pending. */ |
@@ -956,7 +912,7 @@ static inline u32 armv7_pmnc_getreset_flags(void) | |||
956 | } | 912 | } |
957 | 913 | ||
958 | #ifdef DEBUG | 914 | #ifdef DEBUG |
959 | static void armv7_pmnc_dump_regs(void) | 915 | static void armv7_pmnc_dump_regs(struct arm_pmu *cpu_pmu) |
960 | { | 916 | { |
961 | u32 val; | 917 | u32 val; |
962 | unsigned int cnt; | 918 | unsigned int cnt; |
@@ -981,7 +937,8 @@ static void armv7_pmnc_dump_regs(void) | |||
981 | asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r" (val)); | 937 | asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r" (val)); |
982 | printk(KERN_INFO "CCNT =0x%08x\n", val); | 938 | printk(KERN_INFO "CCNT =0x%08x\n", val); |
983 | 939 | ||
984 | for (cnt = ARMV7_IDX_COUNTER0; cnt <= ARMV7_IDX_COUNTER_LAST; cnt++) { | 940 | for (cnt = ARMV7_IDX_COUNTER0; |
941 | cnt <= ARMV7_IDX_COUNTER_LAST(cpu_pmu); cnt++) { | ||
985 | armv7_pmnc_select_counter(cnt); | 942 | armv7_pmnc_select_counter(cnt); |
986 | asm volatile("mrc p15, 0, %0, c9, c13, 2" : "=r" (val)); | 943 | asm volatile("mrc p15, 0, %0, c9, c13, 2" : "=r" (val)); |
987 | printk(KERN_INFO "CNT[%d] count =0x%08x\n", | 944 | printk(KERN_INFO "CNT[%d] count =0x%08x\n", |
@@ -993,10 +950,19 @@ static void armv7_pmnc_dump_regs(void) | |||
993 | } | 950 | } |
994 | #endif | 951 | #endif |
995 | 952 | ||
996 | static void armv7pmu_enable_event(struct hw_perf_event *hwc, int idx) | 953 | static void armv7pmu_enable_event(struct perf_event *event) |
997 | { | 954 | { |
998 | unsigned long flags; | 955 | unsigned long flags; |
956 | struct hw_perf_event *hwc = &event->hw; | ||
957 | struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); | ||
999 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 958 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
959 | int idx = hwc->idx; | ||
960 | |||
961 | if (!armv7_pmnc_counter_valid(cpu_pmu, idx)) { | ||
962 | pr_err("CPU%u enabling wrong PMNC counter IRQ enable %d\n", | ||
963 | smp_processor_id(), idx); | ||
964 | return; | ||
965 | } | ||
1000 | 966 | ||
1001 | /* | 967 | /* |
1002 | * Enable counter and interrupt, and set the counter to count | 968 | * Enable counter and interrupt, and set the counter to count |
@@ -1014,7 +980,7 @@ static void armv7pmu_enable_event(struct hw_perf_event *hwc, int idx) | |||
1014 | * We only need to set the event for the cycle counter if we | 980 | * We only need to set the event for the cycle counter if we |
1015 | * have the ability to perform event filtering. | 981 | * have the ability to perform event filtering. |
1016 | */ | 982 | */ |
1017 | if (armv7pmu.set_event_filter || idx != ARMV7_IDX_CYCLE_COUNTER) | 983 | if (cpu_pmu->set_event_filter || idx != ARMV7_IDX_CYCLE_COUNTER) |
1018 | armv7_pmnc_write_evtsel(idx, hwc->config_base); | 984 | armv7_pmnc_write_evtsel(idx, hwc->config_base); |
1019 | 985 | ||
1020 | /* | 986 | /* |
@@ -1030,10 +996,19 @@ static void armv7pmu_enable_event(struct hw_perf_event *hwc, int idx) | |||
1030 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); | 996 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); |
1031 | } | 997 | } |
1032 | 998 | ||
1033 | static void armv7pmu_disable_event(struct hw_perf_event *hwc, int idx) | 999 | static void armv7pmu_disable_event(struct perf_event *event) |
1034 | { | 1000 | { |
1035 | unsigned long flags; | 1001 | unsigned long flags; |
1002 | struct hw_perf_event *hwc = &event->hw; | ||
1003 | struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); | ||
1036 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 1004 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
1005 | int idx = hwc->idx; | ||
1006 | |||
1007 | if (!armv7_pmnc_counter_valid(cpu_pmu, idx)) { | ||
1008 | pr_err("CPU%u disabling wrong PMNC counter IRQ enable %d\n", | ||
1009 | smp_processor_id(), idx); | ||
1010 | return; | ||
1011 | } | ||
1037 | 1012 | ||
1038 | /* | 1013 | /* |
1039 | * Disable counter and interrupt | 1014 | * Disable counter and interrupt |
@@ -1057,7 +1032,8 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev) | |||
1057 | { | 1032 | { |
1058 | u32 pmnc; | 1033 | u32 pmnc; |
1059 | struct perf_sample_data data; | 1034 | struct perf_sample_data data; |
1060 | struct pmu_hw_events *cpuc; | 1035 | struct arm_pmu *cpu_pmu = (struct arm_pmu *)dev; |
1036 | struct pmu_hw_events *cpuc = cpu_pmu->get_hw_events(); | ||
1061 | struct pt_regs *regs; | 1037 | struct pt_regs *regs; |
1062 | int idx; | 1038 | int idx; |
1063 | 1039 | ||
@@ -1077,7 +1053,6 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev) | |||
1077 | */ | 1053 | */ |
1078 | regs = get_irq_regs(); | 1054 | regs = get_irq_regs(); |
1079 | 1055 | ||
1080 | cpuc = &__get_cpu_var(cpu_hw_events); | ||
1081 | for (idx = 0; idx < cpu_pmu->num_events; ++idx) { | 1056 | for (idx = 0; idx < cpu_pmu->num_events; ++idx) { |
1082 | struct perf_event *event = cpuc->events[idx]; | 1057 | struct perf_event *event = cpuc->events[idx]; |
1083 | struct hw_perf_event *hwc; | 1058 | struct hw_perf_event *hwc; |
@@ -1094,13 +1069,13 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev) | |||
1094 | continue; | 1069 | continue; |
1095 | 1070 | ||
1096 | hwc = &event->hw; | 1071 | hwc = &event->hw; |
1097 | armpmu_event_update(event, hwc, idx); | 1072 | armpmu_event_update(event); |
1098 | perf_sample_data_init(&data, 0, hwc->last_period); | 1073 | perf_sample_data_init(&data, 0, hwc->last_period); |
1099 | if (!armpmu_event_set_period(event, hwc, idx)) | 1074 | if (!armpmu_event_set_period(event)) |
1100 | continue; | 1075 | continue; |
1101 | 1076 | ||
1102 | if (perf_event_overflow(event, &data, regs)) | 1077 | if (perf_event_overflow(event, &data, regs)) |
1103 | cpu_pmu->disable(hwc, idx); | 1078 | cpu_pmu->disable(event); |
1104 | } | 1079 | } |
1105 | 1080 | ||
1106 | /* | 1081 | /* |
@@ -1115,7 +1090,7 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev) | |||
1115 | return IRQ_HANDLED; | 1090 | return IRQ_HANDLED; |
1116 | } | 1091 | } |
1117 | 1092 | ||
1118 | static void armv7pmu_start(void) | 1093 | static void armv7pmu_start(struct arm_pmu *cpu_pmu) |
1119 | { | 1094 | { |
1120 | unsigned long flags; | 1095 | unsigned long flags; |
1121 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 1096 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
@@ -1126,7 +1101,7 @@ static void armv7pmu_start(void) | |||
1126 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); | 1101 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); |
1127 | } | 1102 | } |
1128 | 1103 | ||
1129 | static void armv7pmu_stop(void) | 1104 | static void armv7pmu_stop(struct arm_pmu *cpu_pmu) |
1130 | { | 1105 | { |
1131 | unsigned long flags; | 1106 | unsigned long flags; |
1132 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 1107 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
@@ -1138,10 +1113,12 @@ static void armv7pmu_stop(void) | |||
1138 | } | 1113 | } |
1139 | 1114 | ||
1140 | static int armv7pmu_get_event_idx(struct pmu_hw_events *cpuc, | 1115 | static int armv7pmu_get_event_idx(struct pmu_hw_events *cpuc, |
1141 | struct hw_perf_event *event) | 1116 | struct perf_event *event) |
1142 | { | 1117 | { |
1143 | int idx; | 1118 | int idx; |
1144 | unsigned long evtype = event->config_base & ARMV7_EVTYPE_EVENT; | 1119 | struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); |
1120 | struct hw_perf_event *hwc = &event->hw; | ||
1121 | unsigned long evtype = hwc->config_base & ARMV7_EVTYPE_EVENT; | ||
1145 | 1122 | ||
1146 | /* Always place a cycle counter into the cycle counter. */ | 1123 | /* Always place a cycle counter into the cycle counter. */ |
1147 | if (evtype == ARMV7_PERFCTR_CPU_CYCLES) { | 1124 | if (evtype == ARMV7_PERFCTR_CPU_CYCLES) { |
@@ -1192,11 +1169,14 @@ static int armv7pmu_set_event_filter(struct hw_perf_event *event, | |||
1192 | 1169 | ||
1193 | static void armv7pmu_reset(void *info) | 1170 | static void armv7pmu_reset(void *info) |
1194 | { | 1171 | { |
1172 | struct arm_pmu *cpu_pmu = (struct arm_pmu *)info; | ||
1195 | u32 idx, nb_cnt = cpu_pmu->num_events; | 1173 | u32 idx, nb_cnt = cpu_pmu->num_events; |
1196 | 1174 | ||
1197 | /* The counter and interrupt enable registers are unknown at reset. */ | 1175 | /* The counter and interrupt enable registers are unknown at reset. */ |
1198 | for (idx = ARMV7_IDX_CYCLE_COUNTER; idx < nb_cnt; ++idx) | 1176 | for (idx = ARMV7_IDX_CYCLE_COUNTER; idx < nb_cnt; ++idx) { |
1199 | armv7pmu_disable_event(NULL, idx); | 1177 | armv7_pmnc_disable_counter(idx); |
1178 | armv7_pmnc_disable_intens(idx); | ||
1179 | } | ||
1200 | 1180 | ||
1201 | /* Initialize & Reset PMNC: C and P bits */ | 1181 | /* Initialize & Reset PMNC: C and P bits */ |
1202 | armv7_pmnc_write(ARMV7_PMNC_P | ARMV7_PMNC_C); | 1182 | armv7_pmnc_write(ARMV7_PMNC_P | ARMV7_PMNC_C); |
@@ -1232,17 +1212,18 @@ static int armv7_a7_map_event(struct perf_event *event) | |||
1232 | &armv7_a7_perf_cache_map, 0xFF); | 1212 | &armv7_a7_perf_cache_map, 0xFF); |
1233 | } | 1213 | } |
1234 | 1214 | ||
1235 | static struct arm_pmu armv7pmu = { | 1215 | static void armv7pmu_init(struct arm_pmu *cpu_pmu) |
1236 | .handle_irq = armv7pmu_handle_irq, | 1216 | { |
1237 | .enable = armv7pmu_enable_event, | 1217 | cpu_pmu->handle_irq = armv7pmu_handle_irq; |
1238 | .disable = armv7pmu_disable_event, | 1218 | cpu_pmu->enable = armv7pmu_enable_event; |
1239 | .read_counter = armv7pmu_read_counter, | 1219 | cpu_pmu->disable = armv7pmu_disable_event; |
1240 | .write_counter = armv7pmu_write_counter, | 1220 | cpu_pmu->read_counter = armv7pmu_read_counter; |
1241 | .get_event_idx = armv7pmu_get_event_idx, | 1221 | cpu_pmu->write_counter = armv7pmu_write_counter; |
1242 | .start = armv7pmu_start, | 1222 | cpu_pmu->get_event_idx = armv7pmu_get_event_idx; |
1243 | .stop = armv7pmu_stop, | 1223 | cpu_pmu->start = armv7pmu_start; |
1244 | .reset = armv7pmu_reset, | 1224 | cpu_pmu->stop = armv7pmu_stop; |
1245 | .max_period = (1LLU << 32) - 1, | 1225 | cpu_pmu->reset = armv7pmu_reset; |
1226 | cpu_pmu->max_period = (1LLU << 32) - 1; | ||
1246 | }; | 1227 | }; |
1247 | 1228 | ||
1248 | static u32 __devinit armv7_read_num_pmnc_events(void) | 1229 | static u32 __devinit armv7_read_num_pmnc_events(void) |
@@ -1256,70 +1237,75 @@ static u32 __devinit armv7_read_num_pmnc_events(void) | |||
1256 | return nb_cnt + 1; | 1237 | return nb_cnt + 1; |
1257 | } | 1238 | } |
1258 | 1239 | ||
1259 | static struct arm_pmu *__devinit armv7_a8_pmu_init(void) | 1240 | static int __devinit armv7_a8_pmu_init(struct arm_pmu *cpu_pmu) |
1260 | { | 1241 | { |
1261 | armv7pmu.name = "ARMv7 Cortex-A8"; | 1242 | armv7pmu_init(cpu_pmu); |
1262 | armv7pmu.map_event = armv7_a8_map_event; | 1243 | cpu_pmu->name = "ARMv7 Cortex-A8"; |
1263 | armv7pmu.num_events = armv7_read_num_pmnc_events(); | 1244 | cpu_pmu->map_event = armv7_a8_map_event; |
1264 | return &armv7pmu; | 1245 | cpu_pmu->num_events = armv7_read_num_pmnc_events(); |
1246 | return 0; | ||
1265 | } | 1247 | } |
1266 | 1248 | ||
1267 | static struct arm_pmu *__devinit armv7_a9_pmu_init(void) | 1249 | static int __devinit armv7_a9_pmu_init(struct arm_pmu *cpu_pmu) |
1268 | { | 1250 | { |
1269 | armv7pmu.name = "ARMv7 Cortex-A9"; | 1251 | armv7pmu_init(cpu_pmu); |
1270 | armv7pmu.map_event = armv7_a9_map_event; | 1252 | cpu_pmu->name = "ARMv7 Cortex-A9"; |
1271 | armv7pmu.num_events = armv7_read_num_pmnc_events(); | 1253 | cpu_pmu->map_event = armv7_a9_map_event; |
1272 | return &armv7pmu; | 1254 | cpu_pmu->num_events = armv7_read_num_pmnc_events(); |
1255 | return 0; | ||
1273 | } | 1256 | } |
1274 | 1257 | ||
1275 | static struct arm_pmu *__devinit armv7_a5_pmu_init(void) | 1258 | static int __devinit armv7_a5_pmu_init(struct arm_pmu *cpu_pmu) |
1276 | { | 1259 | { |
1277 | armv7pmu.name = "ARMv7 Cortex-A5"; | 1260 | armv7pmu_init(cpu_pmu); |
1278 | armv7pmu.map_event = armv7_a5_map_event; | 1261 | cpu_pmu->name = "ARMv7 Cortex-A5"; |
1279 | armv7pmu.num_events = armv7_read_num_pmnc_events(); | 1262 | cpu_pmu->map_event = armv7_a5_map_event; |
1280 | return &armv7pmu; | 1263 | cpu_pmu->num_events = armv7_read_num_pmnc_events(); |
1264 | return 0; | ||
1281 | } | 1265 | } |
1282 | 1266 | ||
1283 | static struct arm_pmu *__devinit armv7_a15_pmu_init(void) | 1267 | static int __devinit armv7_a15_pmu_init(struct arm_pmu *cpu_pmu) |
1284 | { | 1268 | { |
1285 | armv7pmu.name = "ARMv7 Cortex-A15"; | 1269 | armv7pmu_init(cpu_pmu); |
1286 | armv7pmu.map_event = armv7_a15_map_event; | 1270 | cpu_pmu->name = "ARMv7 Cortex-A15"; |
1287 | armv7pmu.num_events = armv7_read_num_pmnc_events(); | 1271 | cpu_pmu->map_event = armv7_a15_map_event; |
1288 | armv7pmu.set_event_filter = armv7pmu_set_event_filter; | 1272 | cpu_pmu->num_events = armv7_read_num_pmnc_events(); |
1289 | return &armv7pmu; | 1273 | cpu_pmu->set_event_filter = armv7pmu_set_event_filter; |
1274 | return 0; | ||
1290 | } | 1275 | } |
1291 | 1276 | ||
1292 | static struct arm_pmu *__devinit armv7_a7_pmu_init(void) | 1277 | static int __devinit armv7_a7_pmu_init(struct arm_pmu *cpu_pmu) |
1293 | { | 1278 | { |
1294 | armv7pmu.name = "ARMv7 Cortex-A7"; | 1279 | armv7pmu_init(cpu_pmu); |
1295 | armv7pmu.map_event = armv7_a7_map_event; | 1280 | cpu_pmu->name = "ARMv7 Cortex-A7"; |
1296 | armv7pmu.num_events = armv7_read_num_pmnc_events(); | 1281 | cpu_pmu->map_event = armv7_a7_map_event; |
1297 | armv7pmu.set_event_filter = armv7pmu_set_event_filter; | 1282 | cpu_pmu->num_events = armv7_read_num_pmnc_events(); |
1298 | return &armv7pmu; | 1283 | cpu_pmu->set_event_filter = armv7pmu_set_event_filter; |
1284 | return 0; | ||
1299 | } | 1285 | } |
1300 | #else | 1286 | #else |
1301 | static struct arm_pmu *__devinit armv7_a8_pmu_init(void) | 1287 | static inline int armv7_a8_pmu_init(struct arm_pmu *cpu_pmu) |
1302 | { | 1288 | { |
1303 | return NULL; | 1289 | return -ENODEV; |
1304 | } | 1290 | } |
1305 | 1291 | ||
1306 | static struct arm_pmu *__devinit armv7_a9_pmu_init(void) | 1292 | static inline int armv7_a9_pmu_init(struct arm_pmu *cpu_pmu) |
1307 | { | 1293 | { |
1308 | return NULL; | 1294 | return -ENODEV; |
1309 | } | 1295 | } |
1310 | 1296 | ||
1311 | static struct arm_pmu *__devinit armv7_a5_pmu_init(void) | 1297 | static inline int armv7_a5_pmu_init(struct arm_pmu *cpu_pmu) |
1312 | { | 1298 | { |
1313 | return NULL; | 1299 | return -ENODEV; |
1314 | } | 1300 | } |
1315 | 1301 | ||
1316 | static struct arm_pmu *__devinit armv7_a15_pmu_init(void) | 1302 | static inline int armv7_a15_pmu_init(struct arm_pmu *cpu_pmu) |
1317 | { | 1303 | { |
1318 | return NULL; | 1304 | return -ENODEV; |
1319 | } | 1305 | } |
1320 | 1306 | ||
1321 | static struct arm_pmu *__devinit armv7_a7_pmu_init(void) | 1307 | static inline int armv7_a7_pmu_init(struct arm_pmu *cpu_pmu) |
1322 | { | 1308 | { |
1323 | return NULL; | 1309 | return -ENODEV; |
1324 | } | 1310 | } |
1325 | #endif /* CONFIG_CPU_V7 */ | 1311 | #endif /* CONFIG_CPU_V7 */ |
diff --git a/arch/arm/kernel/perf_event_xscale.c b/arch/arm/kernel/perf_event_xscale.c index 426e19f380a2..0c8265e53d5f 100644 --- a/arch/arm/kernel/perf_event_xscale.c +++ b/arch/arm/kernel/perf_event_xscale.c | |||
@@ -224,7 +224,8 @@ xscale1pmu_handle_irq(int irq_num, void *dev) | |||
224 | { | 224 | { |
225 | unsigned long pmnc; | 225 | unsigned long pmnc; |
226 | struct perf_sample_data data; | 226 | struct perf_sample_data data; |
227 | struct pmu_hw_events *cpuc; | 227 | struct arm_pmu *cpu_pmu = (struct arm_pmu *)dev; |
228 | struct pmu_hw_events *cpuc = cpu_pmu->get_hw_events(); | ||
228 | struct pt_regs *regs; | 229 | struct pt_regs *regs; |
229 | int idx; | 230 | int idx; |
230 | 231 | ||
@@ -248,7 +249,6 @@ xscale1pmu_handle_irq(int irq_num, void *dev) | |||
248 | 249 | ||
249 | regs = get_irq_regs(); | 250 | regs = get_irq_regs(); |
250 | 251 | ||
251 | cpuc = &__get_cpu_var(cpu_hw_events); | ||
252 | for (idx = 0; idx < cpu_pmu->num_events; ++idx) { | 252 | for (idx = 0; idx < cpu_pmu->num_events; ++idx) { |
253 | struct perf_event *event = cpuc->events[idx]; | 253 | struct perf_event *event = cpuc->events[idx]; |
254 | struct hw_perf_event *hwc; | 254 | struct hw_perf_event *hwc; |
@@ -260,13 +260,13 @@ xscale1pmu_handle_irq(int irq_num, void *dev) | |||
260 | continue; | 260 | continue; |
261 | 261 | ||
262 | hwc = &event->hw; | 262 | hwc = &event->hw; |
263 | armpmu_event_update(event, hwc, idx); | 263 | armpmu_event_update(event); |
264 | perf_sample_data_init(&data, 0, hwc->last_period); | 264 | perf_sample_data_init(&data, 0, hwc->last_period); |
265 | if (!armpmu_event_set_period(event, hwc, idx)) | 265 | if (!armpmu_event_set_period(event)) |
266 | continue; | 266 | continue; |
267 | 267 | ||
268 | if (perf_event_overflow(event, &data, regs)) | 268 | if (perf_event_overflow(event, &data, regs)) |
269 | cpu_pmu->disable(hwc, idx); | 269 | cpu_pmu->disable(event); |
270 | } | 270 | } |
271 | 271 | ||
272 | irq_work_run(); | 272 | irq_work_run(); |
@@ -280,11 +280,13 @@ xscale1pmu_handle_irq(int irq_num, void *dev) | |||
280 | return IRQ_HANDLED; | 280 | return IRQ_HANDLED; |
281 | } | 281 | } |
282 | 282 | ||
283 | static void | 283 | static void xscale1pmu_enable_event(struct perf_event *event) |
284 | xscale1pmu_enable_event(struct hw_perf_event *hwc, int idx) | ||
285 | { | 284 | { |
286 | unsigned long val, mask, evt, flags; | 285 | unsigned long val, mask, evt, flags; |
286 | struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); | ||
287 | struct hw_perf_event *hwc = &event->hw; | ||
287 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 288 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
289 | int idx = hwc->idx; | ||
288 | 290 | ||
289 | switch (idx) { | 291 | switch (idx) { |
290 | case XSCALE_CYCLE_COUNTER: | 292 | case XSCALE_CYCLE_COUNTER: |
@@ -314,11 +316,13 @@ xscale1pmu_enable_event(struct hw_perf_event *hwc, int idx) | |||
314 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); | 316 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); |
315 | } | 317 | } |
316 | 318 | ||
317 | static void | 319 | static void xscale1pmu_disable_event(struct perf_event *event) |
318 | xscale1pmu_disable_event(struct hw_perf_event *hwc, int idx) | ||
319 | { | 320 | { |
320 | unsigned long val, mask, evt, flags; | 321 | unsigned long val, mask, evt, flags; |
322 | struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); | ||
323 | struct hw_perf_event *hwc = &event->hw; | ||
321 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 324 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
325 | int idx = hwc->idx; | ||
322 | 326 | ||
323 | switch (idx) { | 327 | switch (idx) { |
324 | case XSCALE_CYCLE_COUNTER: | 328 | case XSCALE_CYCLE_COUNTER: |
@@ -348,9 +352,10 @@ xscale1pmu_disable_event(struct hw_perf_event *hwc, int idx) | |||
348 | 352 | ||
349 | static int | 353 | static int |
350 | xscale1pmu_get_event_idx(struct pmu_hw_events *cpuc, | 354 | xscale1pmu_get_event_idx(struct pmu_hw_events *cpuc, |
351 | struct hw_perf_event *event) | 355 | struct perf_event *event) |
352 | { | 356 | { |
353 | if (XSCALE_PERFCTR_CCNT == event->config_base) { | 357 | struct hw_perf_event *hwc = &event->hw; |
358 | if (XSCALE_PERFCTR_CCNT == hwc->config_base) { | ||
354 | if (test_and_set_bit(XSCALE_CYCLE_COUNTER, cpuc->used_mask)) | 359 | if (test_and_set_bit(XSCALE_CYCLE_COUNTER, cpuc->used_mask)) |
355 | return -EAGAIN; | 360 | return -EAGAIN; |
356 | 361 | ||
@@ -366,8 +371,7 @@ xscale1pmu_get_event_idx(struct pmu_hw_events *cpuc, | |||
366 | } | 371 | } |
367 | } | 372 | } |
368 | 373 | ||
369 | static void | 374 | static void xscale1pmu_start(struct arm_pmu *cpu_pmu) |
370 | xscale1pmu_start(void) | ||
371 | { | 375 | { |
372 | unsigned long flags, val; | 376 | unsigned long flags, val; |
373 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 377 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
@@ -379,8 +383,7 @@ xscale1pmu_start(void) | |||
379 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); | 383 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); |
380 | } | 384 | } |
381 | 385 | ||
382 | static void | 386 | static void xscale1pmu_stop(struct arm_pmu *cpu_pmu) |
383 | xscale1pmu_stop(void) | ||
384 | { | 387 | { |
385 | unsigned long flags, val; | 388 | unsigned long flags, val; |
386 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 389 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
@@ -392,9 +395,10 @@ xscale1pmu_stop(void) | |||
392 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); | 395 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); |
393 | } | 396 | } |
394 | 397 | ||
395 | static inline u32 | 398 | static inline u32 xscale1pmu_read_counter(struct perf_event *event) |
396 | xscale1pmu_read_counter(int counter) | ||
397 | { | 399 | { |
400 | struct hw_perf_event *hwc = &event->hw; | ||
401 | int counter = hwc->idx; | ||
398 | u32 val = 0; | 402 | u32 val = 0; |
399 | 403 | ||
400 | switch (counter) { | 404 | switch (counter) { |
@@ -412,9 +416,11 @@ xscale1pmu_read_counter(int counter) | |||
412 | return val; | 416 | return val; |
413 | } | 417 | } |
414 | 418 | ||
415 | static inline void | 419 | static inline void xscale1pmu_write_counter(struct perf_event *event, u32 val) |
416 | xscale1pmu_write_counter(int counter, u32 val) | ||
417 | { | 420 | { |
421 | struct hw_perf_event *hwc = &event->hw; | ||
422 | int counter = hwc->idx; | ||
423 | |||
418 | switch (counter) { | 424 | switch (counter) { |
419 | case XSCALE_CYCLE_COUNTER: | 425 | case XSCALE_CYCLE_COUNTER: |
420 | asm volatile("mcr p14, 0, %0, c1, c0, 0" : : "r" (val)); | 426 | asm volatile("mcr p14, 0, %0, c1, c0, 0" : : "r" (val)); |
@@ -434,24 +440,22 @@ static int xscale_map_event(struct perf_event *event) | |||
434 | &xscale_perf_cache_map, 0xFF); | 440 | &xscale_perf_cache_map, 0xFF); |
435 | } | 441 | } |
436 | 442 | ||
437 | static struct arm_pmu xscale1pmu = { | 443 | static int __devinit xscale1pmu_init(struct arm_pmu *cpu_pmu) |
438 | .name = "xscale1", | ||
439 | .handle_irq = xscale1pmu_handle_irq, | ||
440 | .enable = xscale1pmu_enable_event, | ||
441 | .disable = xscale1pmu_disable_event, | ||
442 | .read_counter = xscale1pmu_read_counter, | ||
443 | .write_counter = xscale1pmu_write_counter, | ||
444 | .get_event_idx = xscale1pmu_get_event_idx, | ||
445 | .start = xscale1pmu_start, | ||
446 | .stop = xscale1pmu_stop, | ||
447 | .map_event = xscale_map_event, | ||
448 | .num_events = 3, | ||
449 | .max_period = (1LLU << 32) - 1, | ||
450 | }; | ||
451 | |||
452 | static struct arm_pmu *__devinit xscale1pmu_init(void) | ||
453 | { | 444 | { |
454 | return &xscale1pmu; | 445 | cpu_pmu->name = "xscale1"; |
446 | cpu_pmu->handle_irq = xscale1pmu_handle_irq; | ||
447 | cpu_pmu->enable = xscale1pmu_enable_event; | ||
448 | cpu_pmu->disable = xscale1pmu_disable_event; | ||
449 | cpu_pmu->read_counter = xscale1pmu_read_counter; | ||
450 | cpu_pmu->write_counter = xscale1pmu_write_counter; | ||
451 | cpu_pmu->get_event_idx = xscale1pmu_get_event_idx; | ||
452 | cpu_pmu->start = xscale1pmu_start; | ||
453 | cpu_pmu->stop = xscale1pmu_stop; | ||
454 | cpu_pmu->map_event = xscale_map_event; | ||
455 | cpu_pmu->num_events = 3; | ||
456 | cpu_pmu->max_period = (1LLU << 32) - 1; | ||
457 | |||
458 | return 0; | ||
455 | } | 459 | } |
456 | 460 | ||
457 | #define XSCALE2_OVERFLOWED_MASK 0x01f | 461 | #define XSCALE2_OVERFLOWED_MASK 0x01f |
@@ -567,7 +571,8 @@ xscale2pmu_handle_irq(int irq_num, void *dev) | |||
567 | { | 571 | { |
568 | unsigned long pmnc, of_flags; | 572 | unsigned long pmnc, of_flags; |
569 | struct perf_sample_data data; | 573 | struct perf_sample_data data; |
570 | struct pmu_hw_events *cpuc; | 574 | struct arm_pmu *cpu_pmu = (struct arm_pmu *)dev; |
575 | struct pmu_hw_events *cpuc = cpu_pmu->get_hw_events(); | ||
571 | struct pt_regs *regs; | 576 | struct pt_regs *regs; |
572 | int idx; | 577 | int idx; |
573 | 578 | ||
@@ -585,7 +590,6 @@ xscale2pmu_handle_irq(int irq_num, void *dev) | |||
585 | 590 | ||
586 | regs = get_irq_regs(); | 591 | regs = get_irq_regs(); |
587 | 592 | ||
588 | cpuc = &__get_cpu_var(cpu_hw_events); | ||
589 | for (idx = 0; idx < cpu_pmu->num_events; ++idx) { | 593 | for (idx = 0; idx < cpu_pmu->num_events; ++idx) { |
590 | struct perf_event *event = cpuc->events[idx]; | 594 | struct perf_event *event = cpuc->events[idx]; |
591 | struct hw_perf_event *hwc; | 595 | struct hw_perf_event *hwc; |
@@ -597,13 +601,13 @@ xscale2pmu_handle_irq(int irq_num, void *dev) | |||
597 | continue; | 601 | continue; |
598 | 602 | ||
599 | hwc = &event->hw; | 603 | hwc = &event->hw; |
600 | armpmu_event_update(event, hwc, idx); | 604 | armpmu_event_update(event); |
601 | perf_sample_data_init(&data, 0, hwc->last_period); | 605 | perf_sample_data_init(&data, 0, hwc->last_period); |
602 | if (!armpmu_event_set_period(event, hwc, idx)) | 606 | if (!armpmu_event_set_period(event)) |
603 | continue; | 607 | continue; |
604 | 608 | ||
605 | if (perf_event_overflow(event, &data, regs)) | 609 | if (perf_event_overflow(event, &data, regs)) |
606 | cpu_pmu->disable(hwc, idx); | 610 | cpu_pmu->disable(event); |
607 | } | 611 | } |
608 | 612 | ||
609 | irq_work_run(); | 613 | irq_work_run(); |
@@ -617,11 +621,13 @@ xscale2pmu_handle_irq(int irq_num, void *dev) | |||
617 | return IRQ_HANDLED; | 621 | return IRQ_HANDLED; |
618 | } | 622 | } |
619 | 623 | ||
620 | static void | 624 | static void xscale2pmu_enable_event(struct perf_event *event) |
621 | xscale2pmu_enable_event(struct hw_perf_event *hwc, int idx) | ||
622 | { | 625 | { |
623 | unsigned long flags, ien, evtsel; | 626 | unsigned long flags, ien, evtsel; |
627 | struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); | ||
628 | struct hw_perf_event *hwc = &event->hw; | ||
624 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 629 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
630 | int idx = hwc->idx; | ||
625 | 631 | ||
626 | ien = xscale2pmu_read_int_enable(); | 632 | ien = xscale2pmu_read_int_enable(); |
627 | evtsel = xscale2pmu_read_event_select(); | 633 | evtsel = xscale2pmu_read_event_select(); |
@@ -661,11 +667,13 @@ xscale2pmu_enable_event(struct hw_perf_event *hwc, int idx) | |||
661 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); | 667 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); |
662 | } | 668 | } |
663 | 669 | ||
664 | static void | 670 | static void xscale2pmu_disable_event(struct perf_event *event) |
665 | xscale2pmu_disable_event(struct hw_perf_event *hwc, int idx) | ||
666 | { | 671 | { |
667 | unsigned long flags, ien, evtsel, of_flags; | 672 | unsigned long flags, ien, evtsel, of_flags; |
673 | struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); | ||
674 | struct hw_perf_event *hwc = &event->hw; | ||
668 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 675 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
676 | int idx = hwc->idx; | ||
669 | 677 | ||
670 | ien = xscale2pmu_read_int_enable(); | 678 | ien = xscale2pmu_read_int_enable(); |
671 | evtsel = xscale2pmu_read_event_select(); | 679 | evtsel = xscale2pmu_read_event_select(); |
@@ -713,7 +721,7 @@ xscale2pmu_disable_event(struct hw_perf_event *hwc, int idx) | |||
713 | 721 | ||
714 | static int | 722 | static int |
715 | xscale2pmu_get_event_idx(struct pmu_hw_events *cpuc, | 723 | xscale2pmu_get_event_idx(struct pmu_hw_events *cpuc, |
716 | struct hw_perf_event *event) | 724 | struct perf_event *event) |
717 | { | 725 | { |
718 | int idx = xscale1pmu_get_event_idx(cpuc, event); | 726 | int idx = xscale1pmu_get_event_idx(cpuc, event); |
719 | if (idx >= 0) | 727 | if (idx >= 0) |
@@ -727,8 +735,7 @@ out: | |||
727 | return idx; | 735 | return idx; |
728 | } | 736 | } |
729 | 737 | ||
730 | static void | 738 | static void xscale2pmu_start(struct arm_pmu *cpu_pmu) |
731 | xscale2pmu_start(void) | ||
732 | { | 739 | { |
733 | unsigned long flags, val; | 740 | unsigned long flags, val; |
734 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 741 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
@@ -740,8 +747,7 @@ xscale2pmu_start(void) | |||
740 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); | 747 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); |
741 | } | 748 | } |
742 | 749 | ||
743 | static void | 750 | static void xscale2pmu_stop(struct arm_pmu *cpu_pmu) |
744 | xscale2pmu_stop(void) | ||
745 | { | 751 | { |
746 | unsigned long flags, val; | 752 | unsigned long flags, val; |
747 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 753 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
@@ -753,9 +759,10 @@ xscale2pmu_stop(void) | |||
753 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); | 759 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); |
754 | } | 760 | } |
755 | 761 | ||
756 | static inline u32 | 762 | static inline u32 xscale2pmu_read_counter(struct perf_event *event) |
757 | xscale2pmu_read_counter(int counter) | ||
758 | { | 763 | { |
764 | struct hw_perf_event *hwc = &event->hw; | ||
765 | int counter = hwc->idx; | ||
759 | u32 val = 0; | 766 | u32 val = 0; |
760 | 767 | ||
761 | switch (counter) { | 768 | switch (counter) { |
@@ -779,9 +786,11 @@ xscale2pmu_read_counter(int counter) | |||
779 | return val; | 786 | return val; |
780 | } | 787 | } |
781 | 788 | ||
782 | static inline void | 789 | static inline void xscale2pmu_write_counter(struct perf_event *event, u32 val) |
783 | xscale2pmu_write_counter(int counter, u32 val) | ||
784 | { | 790 | { |
791 | struct hw_perf_event *hwc = &event->hw; | ||
792 | int counter = hwc->idx; | ||
793 | |||
785 | switch (counter) { | 794 | switch (counter) { |
786 | case XSCALE_CYCLE_COUNTER: | 795 | case XSCALE_CYCLE_COUNTER: |
787 | asm volatile("mcr p14, 0, %0, c1, c1, 0" : : "r" (val)); | 796 | asm volatile("mcr p14, 0, %0, c1, c1, 0" : : "r" (val)); |
@@ -801,33 +810,31 @@ xscale2pmu_write_counter(int counter, u32 val) | |||
801 | } | 810 | } |
802 | } | 811 | } |
803 | 812 | ||
804 | static struct arm_pmu xscale2pmu = { | 813 | static int __devinit xscale2pmu_init(struct arm_pmu *cpu_pmu) |
805 | .name = "xscale2", | ||
806 | .handle_irq = xscale2pmu_handle_irq, | ||
807 | .enable = xscale2pmu_enable_event, | ||
808 | .disable = xscale2pmu_disable_event, | ||
809 | .read_counter = xscale2pmu_read_counter, | ||
810 | .write_counter = xscale2pmu_write_counter, | ||
811 | .get_event_idx = xscale2pmu_get_event_idx, | ||
812 | .start = xscale2pmu_start, | ||
813 | .stop = xscale2pmu_stop, | ||
814 | .map_event = xscale_map_event, | ||
815 | .num_events = 5, | ||
816 | .max_period = (1LLU << 32) - 1, | ||
817 | }; | ||
818 | |||
819 | static struct arm_pmu *__devinit xscale2pmu_init(void) | ||
820 | { | 814 | { |
821 | return &xscale2pmu; | 815 | cpu_pmu->name = "xscale2"; |
816 | cpu_pmu->handle_irq = xscale2pmu_handle_irq; | ||
817 | cpu_pmu->enable = xscale2pmu_enable_event; | ||
818 | cpu_pmu->disable = xscale2pmu_disable_event; | ||
819 | cpu_pmu->read_counter = xscale2pmu_read_counter; | ||
820 | cpu_pmu->write_counter = xscale2pmu_write_counter; | ||
821 | cpu_pmu->get_event_idx = xscale2pmu_get_event_idx; | ||
822 | cpu_pmu->start = xscale2pmu_start; | ||
823 | cpu_pmu->stop = xscale2pmu_stop; | ||
824 | cpu_pmu->map_event = xscale_map_event; | ||
825 | cpu_pmu->num_events = 5; | ||
826 | cpu_pmu->max_period = (1LLU << 32) - 1; | ||
827 | |||
828 | return 0; | ||
822 | } | 829 | } |
823 | #else | 830 | #else |
824 | static struct arm_pmu *__devinit xscale1pmu_init(void) | 831 | static inline int xscale1pmu_init(struct arm_pmu *cpu_pmu) |
825 | { | 832 | { |
826 | return NULL; | 833 | return -ENODEV; |
827 | } | 834 | } |
828 | 835 | ||
829 | static struct arm_pmu *__devinit xscale2pmu_init(void) | 836 | static inline int xscale2pmu_init(struct arm_pmu *cpu_pmu) |
830 | { | 837 | { |
831 | return NULL; | 838 | return -ENODEV; |
832 | } | 839 | } |
833 | #endif /* CONFIG_CPU_XSCALE */ | 840 | #endif /* CONFIG_CPU_XSCALE */ |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 90084a6de35a..44bc0b327e2b 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/leds.h> | 34 | #include <linux/leds.h> |
35 | 35 | ||
36 | #include <asm/cacheflush.h> | 36 | #include <asm/cacheflush.h> |
37 | #include <asm/idmap.h> | ||
37 | #include <asm/processor.h> | 38 | #include <asm/processor.h> |
38 | #include <asm/thread_notify.h> | 39 | #include <asm/thread_notify.h> |
39 | #include <asm/stacktrace.h> | 40 | #include <asm/stacktrace.h> |
@@ -56,8 +57,6 @@ static const char *isa_modes[] = { | |||
56 | "ARM" , "Thumb" , "Jazelle", "ThumbEE" | 57 | "ARM" , "Thumb" , "Jazelle", "ThumbEE" |
57 | }; | 58 | }; |
58 | 59 | ||
59 | extern void setup_mm_for_reboot(void); | ||
60 | |||
61 | static volatile int hlt_counter; | 60 | static volatile int hlt_counter; |
62 | 61 | ||
63 | void disable_hlt(void) | 62 | void disable_hlt(void) |
@@ -70,6 +69,7 @@ EXPORT_SYMBOL(disable_hlt); | |||
70 | void enable_hlt(void) | 69 | void enable_hlt(void) |
71 | { | 70 | { |
72 | hlt_counter--; | 71 | hlt_counter--; |
72 | BUG_ON(hlt_counter < 0); | ||
73 | } | 73 | } |
74 | 74 | ||
75 | EXPORT_SYMBOL(enable_hlt); | 75 | EXPORT_SYMBOL(enable_hlt); |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 739db3a1b2d2..03deeffd9f6d 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -916,16 +916,11 @@ enum ptrace_syscall_dir { | |||
916 | PTRACE_SYSCALL_EXIT, | 916 | PTRACE_SYSCALL_EXIT, |
917 | }; | 917 | }; |
918 | 918 | ||
919 | static int ptrace_syscall_trace(struct pt_regs *regs, int scno, | 919 | static int tracehook_report_syscall(struct pt_regs *regs, |
920 | enum ptrace_syscall_dir dir) | 920 | enum ptrace_syscall_dir dir) |
921 | { | 921 | { |
922 | unsigned long ip; | 922 | unsigned long ip; |
923 | 923 | ||
924 | current_thread_info()->syscall = scno; | ||
925 | |||
926 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | ||
927 | return scno; | ||
928 | |||
929 | /* | 924 | /* |
930 | * IP is used to denote syscall entry/exit: | 925 | * IP is used to denote syscall entry/exit: |
931 | * IP = 0 -> entry, =1 -> exit | 926 | * IP = 0 -> entry, =1 -> exit |
@@ -944,19 +939,41 @@ static int ptrace_syscall_trace(struct pt_regs *regs, int scno, | |||
944 | 939 | ||
945 | asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno) | 940 | asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno) |
946 | { | 941 | { |
947 | scno = ptrace_syscall_trace(regs, scno, PTRACE_SYSCALL_ENTER); | 942 | current_thread_info()->syscall = scno; |
943 | |||
944 | /* Do the secure computing check first; failures should be fast. */ | ||
945 | if (secure_computing(scno) == -1) | ||
946 | return -1; | ||
947 | |||
948 | if (test_thread_flag(TIF_SYSCALL_TRACE)) | ||
949 | scno = tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER); | ||
950 | |||
948 | if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) | 951 | if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) |
949 | trace_sys_enter(regs, scno); | 952 | trace_sys_enter(regs, scno); |
953 | |||
950 | audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0, regs->ARM_r1, | 954 | audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0, regs->ARM_r1, |
951 | regs->ARM_r2, regs->ARM_r3); | 955 | regs->ARM_r2, regs->ARM_r3); |
956 | |||
952 | return scno; | 957 | return scno; |
953 | } | 958 | } |
954 | 959 | ||
955 | asmlinkage int syscall_trace_exit(struct pt_regs *regs, int scno) | 960 | asmlinkage void syscall_trace_exit(struct pt_regs *regs) |
956 | { | 961 | { |
957 | scno = ptrace_syscall_trace(regs, scno, PTRACE_SYSCALL_EXIT); | 962 | /* |
958 | if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) | 963 | * Audit the syscall before anything else, as a debugger may |
959 | trace_sys_exit(regs, scno); | 964 | * come in and change the current registers. |
965 | */ | ||
960 | audit_syscall_exit(regs); | 966 | audit_syscall_exit(regs); |
961 | return scno; | 967 | |
968 | /* | ||
969 | * Note that we haven't updated the ->syscall field for the | ||
970 | * current thread. This isn't a problem because it will have | ||
971 | * been set on syscall entry and there hasn't been an opportunity | ||
972 | * for a PTRACE_SET_SYSCALL since then. | ||
973 | */ | ||
974 | if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) | ||
975 | trace_sys_exit(regs, regs_return_value(regs)); | ||
976 | |||
977 | if (test_thread_flag(TIF_SYSCALL_TRACE)) | ||
978 | tracehook_report_syscall(regs, PTRACE_SYSCALL_EXIT); | ||
962 | } | 979 | } |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index da1d1aa20ad9..9a89bf4aefe1 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -383,6 +383,12 @@ void cpu_init(void) | |||
383 | BUG(); | 383 | BUG(); |
384 | } | 384 | } |
385 | 385 | ||
386 | /* | ||
387 | * This only works on resume and secondary cores. For booting on the | ||
388 | * boot cpu, smp_prepare_boot_cpu is called after percpu area setup. | ||
389 | */ | ||
390 | set_my_cpu_offset(per_cpu_offset(cpu)); | ||
391 | |||
386 | cpu_proc_init(); | 392 | cpu_proc_init(); |
387 | 393 | ||
388 | /* | 394 | /* |
@@ -426,13 +432,14 @@ int __cpu_logical_map[NR_CPUS]; | |||
426 | void __init smp_setup_processor_id(void) | 432 | void __init smp_setup_processor_id(void) |
427 | { | 433 | { |
428 | int i; | 434 | int i; |
429 | u32 cpu = is_smp() ? read_cpuid_mpidr() & 0xff : 0; | 435 | u32 mpidr = is_smp() ? read_cpuid_mpidr() & MPIDR_HWID_BITMASK : 0; |
436 | u32 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); | ||
430 | 437 | ||
431 | cpu_logical_map(0) = cpu; | 438 | cpu_logical_map(0) = cpu; |
432 | for (i = 1; i < NR_CPUS; ++i) | 439 | for (i = 1; i < nr_cpu_ids; ++i) |
433 | cpu_logical_map(i) = i == cpu ? 0 : i; | 440 | cpu_logical_map(i) = i == cpu ? 0 : i; |
434 | 441 | ||
435 | printk(KERN_INFO "Booting Linux on physical CPU %d\n", cpu); | 442 | printk(KERN_INFO "Booting Linux on physical CPU 0x%x\n", mpidr); |
436 | } | 443 | } |
437 | 444 | ||
438 | static void __init setup_processor(void) | 445 | static void __init setup_processor(void) |
@@ -758,6 +765,7 @@ void __init setup_arch(char **cmdline_p) | |||
758 | 765 | ||
759 | unflatten_device_tree(); | 766 | unflatten_device_tree(); |
760 | 767 | ||
768 | arm_dt_init_cpu_maps(); | ||
761 | #ifdef CONFIG_SMP | 769 | #ifdef CONFIG_SMP |
762 | if (is_smp()) { | 770 | if (is_smp()) { |
763 | smp_set_ops(mdesc->smp); | 771 | smp_set_ops(mdesc->smp); |
@@ -841,12 +849,9 @@ static const char *hwcap_str[] = { | |||
841 | 849 | ||
842 | static int c_show(struct seq_file *m, void *v) | 850 | static int c_show(struct seq_file *m, void *v) |
843 | { | 851 | { |
844 | int i; | 852 | int i, j; |
853 | u32 cpuid; | ||
845 | 854 | ||
846 | seq_printf(m, "Processor\t: %s rev %d (%s)\n", | ||
847 | cpu_name, read_cpuid_id() & 15, elf_platform); | ||
848 | |||
849 | #if defined(CONFIG_SMP) | ||
850 | for_each_online_cpu(i) { | 855 | for_each_online_cpu(i) { |
851 | /* | 856 | /* |
852 | * glibc reads /proc/cpuinfo to determine the number of | 857 | * glibc reads /proc/cpuinfo to determine the number of |
@@ -854,45 +859,48 @@ static int c_show(struct seq_file *m, void *v) | |||
854 | * "processor". Give glibc what it expects. | 859 | * "processor". Give glibc what it expects. |
855 | */ | 860 | */ |
856 | seq_printf(m, "processor\t: %d\n", i); | 861 | seq_printf(m, "processor\t: %d\n", i); |
857 | seq_printf(m, "BogoMIPS\t: %lu.%02lu\n\n", | 862 | cpuid = is_smp() ? per_cpu(cpu_data, i).cpuid : read_cpuid_id(); |
863 | seq_printf(m, "model name\t: %s rev %d (%s)\n", | ||
864 | cpu_name, cpuid & 15, elf_platform); | ||
865 | |||
866 | #if defined(CONFIG_SMP) | ||
867 | seq_printf(m, "BogoMIPS\t: %lu.%02lu\n", | ||
858 | per_cpu(cpu_data, i).loops_per_jiffy / (500000UL/HZ), | 868 | per_cpu(cpu_data, i).loops_per_jiffy / (500000UL/HZ), |
859 | (per_cpu(cpu_data, i).loops_per_jiffy / (5000UL/HZ)) % 100); | 869 | (per_cpu(cpu_data, i).loops_per_jiffy / (5000UL/HZ)) % 100); |
860 | } | 870 | #else |
861 | #else /* CONFIG_SMP */ | 871 | seq_printf(m, "BogoMIPS\t: %lu.%02lu\n", |
862 | seq_printf(m, "BogoMIPS\t: %lu.%02lu\n", | 872 | loops_per_jiffy / (500000/HZ), |
863 | loops_per_jiffy / (500000/HZ), | 873 | (loops_per_jiffy / (5000/HZ)) % 100); |
864 | (loops_per_jiffy / (5000/HZ)) % 100); | ||
865 | #endif | 874 | #endif |
875 | /* dump out the processor features */ | ||
876 | seq_puts(m, "Features\t: "); | ||
866 | 877 | ||
867 | /* dump out the processor features */ | 878 | for (j = 0; hwcap_str[j]; j++) |
868 | seq_puts(m, "Features\t: "); | 879 | if (elf_hwcap & (1 << j)) |
869 | 880 | seq_printf(m, "%s ", hwcap_str[j]); | |
870 | for (i = 0; hwcap_str[i]; i++) | ||
871 | if (elf_hwcap & (1 << i)) | ||
872 | seq_printf(m, "%s ", hwcap_str[i]); | ||
873 | 881 | ||
874 | seq_printf(m, "\nCPU implementer\t: 0x%02x\n", read_cpuid_id() >> 24); | 882 | seq_printf(m, "\nCPU implementer\t: 0x%02x\n", cpuid >> 24); |
875 | seq_printf(m, "CPU architecture: %s\n", proc_arch[cpu_architecture()]); | 883 | seq_printf(m, "CPU architecture: %s\n", |
884 | proc_arch[cpu_architecture()]); | ||
876 | 885 | ||
877 | if ((read_cpuid_id() & 0x0008f000) == 0x00000000) { | 886 | if ((cpuid & 0x0008f000) == 0x00000000) { |
878 | /* pre-ARM7 */ | 887 | /* pre-ARM7 */ |
879 | seq_printf(m, "CPU part\t: %07x\n", read_cpuid_id() >> 4); | 888 | seq_printf(m, "CPU part\t: %07x\n", cpuid >> 4); |
880 | } else { | ||
881 | if ((read_cpuid_id() & 0x0008f000) == 0x00007000) { | ||
882 | /* ARM7 */ | ||
883 | seq_printf(m, "CPU variant\t: 0x%02x\n", | ||
884 | (read_cpuid_id() >> 16) & 127); | ||
885 | } else { | 889 | } else { |
886 | /* post-ARM7 */ | 890 | if ((cpuid & 0x0008f000) == 0x00007000) { |
887 | seq_printf(m, "CPU variant\t: 0x%x\n", | 891 | /* ARM7 */ |
888 | (read_cpuid_id() >> 20) & 15); | 892 | seq_printf(m, "CPU variant\t: 0x%02x\n", |
893 | (cpuid >> 16) & 127); | ||
894 | } else { | ||
895 | /* post-ARM7 */ | ||
896 | seq_printf(m, "CPU variant\t: 0x%x\n", | ||
897 | (cpuid >> 20) & 15); | ||
898 | } | ||
899 | seq_printf(m, "CPU part\t: 0x%03x\n", | ||
900 | (cpuid >> 4) & 0xfff); | ||
889 | } | 901 | } |
890 | seq_printf(m, "CPU part\t: 0x%03x\n", | 902 | seq_printf(m, "CPU revision\t: %d\n\n", cpuid & 15); |
891 | (read_cpuid_id() >> 4) & 0xfff); | ||
892 | } | 903 | } |
893 | seq_printf(m, "CPU revision\t: %d\n", read_cpuid_id() & 15); | ||
894 | |||
895 | seq_puts(m, "\n"); | ||
896 | 904 | ||
897 | seq_printf(m, "Hardware\t: %s\n", machine_name); | 905 | seq_printf(m, "Hardware\t: %s\n", machine_name); |
898 | seq_printf(m, "Revision\t: %04x\n", system_rev); | 906 | seq_printf(m, "Revision\t: %04x\n", system_rev); |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index fbc8b2623d82..84f4cbf652e5 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -281,6 +281,7 @@ static void __cpuinit smp_store_cpu_info(unsigned int cpuid) | |||
281 | struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpuid); | 281 | struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpuid); |
282 | 282 | ||
283 | cpu_info->loops_per_jiffy = loops_per_jiffy; | 283 | cpu_info->loops_per_jiffy = loops_per_jiffy; |
284 | cpu_info->cpuid = read_cpuid_id(); | ||
284 | 285 | ||
285 | store_cpu_topology(cpuid); | 286 | store_cpu_topology(cpuid); |
286 | } | 287 | } |
@@ -313,9 +314,10 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
313 | current->active_mm = mm; | 314 | current->active_mm = mm; |
314 | cpumask_set_cpu(cpu, mm_cpumask(mm)); | 315 | cpumask_set_cpu(cpu, mm_cpumask(mm)); |
315 | 316 | ||
317 | cpu_init(); | ||
318 | |||
316 | printk("CPU%u: Booted secondary processor\n", cpu); | 319 | printk("CPU%u: Booted secondary processor\n", cpu); |
317 | 320 | ||
318 | cpu_init(); | ||
319 | preempt_disable(); | 321 | preempt_disable(); |
320 | trace_hardirqs_off(); | 322 | trace_hardirqs_off(); |
321 | 323 | ||
@@ -371,6 +373,7 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
371 | 373 | ||
372 | void __init smp_prepare_boot_cpu(void) | 374 | void __init smp_prepare_boot_cpu(void) |
373 | { | 375 | { |
376 | set_my_cpu_offset(per_cpu_offset(smp_processor_id())); | ||
374 | } | 377 | } |
375 | 378 | ||
376 | void __init smp_prepare_cpus(unsigned int max_cpus) | 379 | void __init smp_prepare_cpus(unsigned int max_cpus) |
@@ -421,6 +424,11 @@ void arch_send_call_function_ipi_mask(const struct cpumask *mask) | |||
421 | smp_cross_call(mask, IPI_CALL_FUNC); | 424 | smp_cross_call(mask, IPI_CALL_FUNC); |
422 | } | 425 | } |
423 | 426 | ||
427 | void arch_send_wakeup_ipi_mask(const struct cpumask *mask) | ||
428 | { | ||
429 | smp_cross_call(mask, IPI_WAKEUP); | ||
430 | } | ||
431 | |||
424 | void arch_send_call_function_single_ipi(int cpu) | 432 | void arch_send_call_function_single_ipi(int cpu) |
425 | { | 433 | { |
426 | smp_cross_call(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE); | 434 | smp_cross_call(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE); |
@@ -443,7 +451,7 @@ void show_ipi_list(struct seq_file *p, int prec) | |||
443 | for (i = 0; i < NR_IPI; i++) { | 451 | for (i = 0; i < NR_IPI; i++) { |
444 | seq_printf(p, "%*s%u: ", prec - 1, "IPI", i); | 452 | seq_printf(p, "%*s%u: ", prec - 1, "IPI", i); |
445 | 453 | ||
446 | for_each_present_cpu(cpu) | 454 | for_each_online_cpu(cpu) |
447 | seq_printf(p, "%10u ", | 455 | seq_printf(p, "%10u ", |
448 | __get_irq_stat(cpu, ipi_irqs[i])); | 456 | __get_irq_stat(cpu, ipi_irqs[i])); |
449 | 457 | ||
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index b22d700fea27..ff07879ad95d 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -31,6 +31,8 @@ static void __iomem *twd_base; | |||
31 | 31 | ||
32 | static struct clk *twd_clk; | 32 | static struct clk *twd_clk; |
33 | static unsigned long twd_timer_rate; | 33 | static unsigned long twd_timer_rate; |
34 | static bool common_setup_called; | ||
35 | static DEFINE_PER_CPU(bool, percpu_setup_called); | ||
34 | 36 | ||
35 | static struct clock_event_device __percpu **twd_evt; | 37 | static struct clock_event_device __percpu **twd_evt; |
36 | static int twd_ppi; | 38 | static int twd_ppi; |
@@ -248,17 +250,9 @@ static struct clk *twd_get_clock(void) | |||
248 | return clk; | 250 | return clk; |
249 | } | 251 | } |
250 | 252 | ||
251 | err = clk_prepare(clk); | 253 | err = clk_prepare_enable(clk); |
252 | if (err) { | 254 | if (err) { |
253 | pr_err("smp_twd: clock failed to prepare: %d\n", err); | 255 | pr_err("smp_twd: clock failed to prepare+enable: %d\n", err); |
254 | clk_put(clk); | ||
255 | return ERR_PTR(err); | ||
256 | } | ||
257 | |||
258 | err = clk_enable(clk); | ||
259 | if (err) { | ||
260 | pr_err("smp_twd: clock failed to enable: %d\n", err); | ||
261 | clk_unprepare(clk); | ||
262 | clk_put(clk); | 256 | clk_put(clk); |
263 | return ERR_PTR(err); | 257 | return ERR_PTR(err); |
264 | } | 258 | } |
@@ -272,15 +266,45 @@ static struct clk *twd_get_clock(void) | |||
272 | static int __cpuinit twd_timer_setup(struct clock_event_device *clk) | 266 | static int __cpuinit twd_timer_setup(struct clock_event_device *clk) |
273 | { | 267 | { |
274 | struct clock_event_device **this_cpu_clk; | 268 | struct clock_event_device **this_cpu_clk; |
269 | int cpu = smp_processor_id(); | ||
270 | |||
271 | /* | ||
272 | * If the basic setup for this CPU has been done before don't | ||
273 | * bother with the below. | ||
274 | */ | ||
275 | if (per_cpu(percpu_setup_called, cpu)) { | ||
276 | __raw_writel(0, twd_base + TWD_TIMER_CONTROL); | ||
277 | clockevents_register_device(*__this_cpu_ptr(twd_evt)); | ||
278 | enable_percpu_irq(clk->irq, 0); | ||
279 | return 0; | ||
280 | } | ||
281 | per_cpu(percpu_setup_called, cpu) = true; | ||
275 | 282 | ||
276 | if (!twd_clk) | 283 | /* |
284 | * This stuff only need to be done once for the entire TWD cluster | ||
285 | * during the runtime of the system. | ||
286 | */ | ||
287 | if (!common_setup_called) { | ||
277 | twd_clk = twd_get_clock(); | 288 | twd_clk = twd_get_clock(); |
278 | 289 | ||
279 | if (!IS_ERR_OR_NULL(twd_clk)) | 290 | /* |
280 | twd_timer_rate = clk_get_rate(twd_clk); | 291 | * We use IS_ERR_OR_NULL() here, because if the clock stubs |
281 | else | 292 | * are active we will get a valid clk reference which is |
282 | twd_calibrate_rate(); | 293 | * however NULL and will return the rate 0. In that case we |
294 | * need to calibrate the rate instead. | ||
295 | */ | ||
296 | if (!IS_ERR_OR_NULL(twd_clk)) | ||
297 | twd_timer_rate = clk_get_rate(twd_clk); | ||
298 | else | ||
299 | twd_calibrate_rate(); | ||
300 | |||
301 | common_setup_called = true; | ||
302 | } | ||
283 | 303 | ||
304 | /* | ||
305 | * The following is done once per CPU the first time .setup() is | ||
306 | * called. | ||
307 | */ | ||
284 | __raw_writel(0, twd_base + TWD_TIMER_CONTROL); | 308 | __raw_writel(0, twd_base + TWD_TIMER_CONTROL); |
285 | 309 | ||
286 | clk->name = "local_timer"; | 310 | clk->name = "local_timer"; |
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index 26c12c6440fc..79282ebcd939 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c | |||
@@ -196,32 +196,7 @@ static inline void parse_dt_topology(void) {} | |||
196 | static inline void update_cpu_power(unsigned int cpuid, unsigned int mpidr) {} | 196 | static inline void update_cpu_power(unsigned int cpuid, unsigned int mpidr) {} |
197 | #endif | 197 | #endif |
198 | 198 | ||
199 | 199 | /* | |
200 | /* | ||
201 | * cpu topology management | ||
202 | */ | ||
203 | |||
204 | #define MPIDR_SMP_BITMASK (0x3 << 30) | ||
205 | #define MPIDR_SMP_VALUE (0x2 << 30) | ||
206 | |||
207 | #define MPIDR_MT_BITMASK (0x1 << 24) | ||
208 | |||
209 | /* | ||
210 | * These masks reflect the current use of the affinity levels. | ||
211 | * The affinity level can be up to 16 bits according to ARM ARM | ||
212 | */ | ||
213 | #define MPIDR_HWID_BITMASK 0xFFFFFF | ||
214 | |||
215 | #define MPIDR_LEVEL0_MASK 0x3 | ||
216 | #define MPIDR_LEVEL0_SHIFT 0 | ||
217 | |||
218 | #define MPIDR_LEVEL1_MASK 0xF | ||
219 | #define MPIDR_LEVEL1_SHIFT 8 | ||
220 | |||
221 | #define MPIDR_LEVEL2_MASK 0xFF | ||
222 | #define MPIDR_LEVEL2_SHIFT 16 | ||
223 | |||
224 | /* | ||
225 | * cpu topology table | 200 | * cpu topology table |
226 | */ | 201 | */ |
227 | struct cputopo_arm cpu_topology[NR_CPUS]; | 202 | struct cputopo_arm cpu_topology[NR_CPUS]; |
@@ -282,19 +257,14 @@ void store_cpu_topology(unsigned int cpuid) | |||
282 | 257 | ||
283 | if (mpidr & MPIDR_MT_BITMASK) { | 258 | if (mpidr & MPIDR_MT_BITMASK) { |
284 | /* core performance interdependency */ | 259 | /* core performance interdependency */ |
285 | cpuid_topo->thread_id = (mpidr >> MPIDR_LEVEL0_SHIFT) | 260 | cpuid_topo->thread_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); |
286 | & MPIDR_LEVEL0_MASK; | 261 | cpuid_topo->core_id = MPIDR_AFFINITY_LEVEL(mpidr, 1); |
287 | cpuid_topo->core_id = (mpidr >> MPIDR_LEVEL1_SHIFT) | 262 | cpuid_topo->socket_id = MPIDR_AFFINITY_LEVEL(mpidr, 2); |
288 | & MPIDR_LEVEL1_MASK; | ||
289 | cpuid_topo->socket_id = (mpidr >> MPIDR_LEVEL2_SHIFT) | ||
290 | & MPIDR_LEVEL2_MASK; | ||
291 | } else { | 263 | } else { |
292 | /* largely independent cores */ | 264 | /* largely independent cores */ |
293 | cpuid_topo->thread_id = -1; | 265 | cpuid_topo->thread_id = -1; |
294 | cpuid_topo->core_id = (mpidr >> MPIDR_LEVEL0_SHIFT) | 266 | cpuid_topo->core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); |
295 | & MPIDR_LEVEL0_MASK; | 267 | cpuid_topo->socket_id = MPIDR_AFFINITY_LEVEL(mpidr, 1); |
296 | cpuid_topo->socket_id = (mpidr >> MPIDR_LEVEL1_SHIFT) | ||
297 | & MPIDR_LEVEL1_MASK; | ||
298 | } | 268 | } |
299 | } else { | 269 | } else { |
300 | /* | 270 | /* |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 36ff15bbfdd4..b9f38e388b43 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -114,6 +114,15 @@ SECTIONS | |||
114 | 114 | ||
115 | RO_DATA(PAGE_SIZE) | 115 | RO_DATA(PAGE_SIZE) |
116 | 116 | ||
117 | . = ALIGN(4); | ||
118 | __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { | ||
119 | __start___ex_table = .; | ||
120 | #ifdef CONFIG_MMU | ||
121 | *(__ex_table) | ||
122 | #endif | ||
123 | __stop___ex_table = .; | ||
124 | } | ||
125 | |||
117 | #ifdef CONFIG_ARM_UNWIND | 126 | #ifdef CONFIG_ARM_UNWIND |
118 | /* | 127 | /* |
119 | * Stack unwinding tables | 128 | * Stack unwinding tables |
@@ -220,16 +229,6 @@ SECTIONS | |||
220 | READ_MOSTLY_DATA(L1_CACHE_BYTES) | 229 | READ_MOSTLY_DATA(L1_CACHE_BYTES) |
221 | 230 | ||
222 | /* | 231 | /* |
223 | * The exception fixup table (might need resorting at runtime) | ||
224 | */ | ||
225 | . = ALIGN(4); | ||
226 | __start___ex_table = .; | ||
227 | #ifdef CONFIG_MMU | ||
228 | *(__ex_table) | ||
229 | #endif | ||
230 | __stop___ex_table = .; | ||
231 | |||
232 | /* | ||
233 | * and the usual data section | 232 | * and the usual data section |
234 | */ | 233 | */ |
235 | DATA_DATA | 234 | DATA_DATA |
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 043624219b55..e34c1bdb804d 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -494,8 +494,17 @@ endif | |||
494 | 494 | ||
495 | comment "Generic Board Type" | 495 | comment "Generic Board Type" |
496 | 496 | ||
497 | config MACH_AT91RM9200_DT | ||
498 | bool "Atmel AT91RM9200 Evaluation Kits with device-tree support" | ||
499 | depends on SOC_AT91RM9200 | ||
500 | select USE_OF | ||
501 | help | ||
502 | Select this if you want to experiment device-tree with | ||
503 | an Atmel RM9200 Evaluation Kit. | ||
504 | |||
497 | config MACH_AT91SAM_DT | 505 | config MACH_AT91SAM_DT |
498 | bool "Atmel AT91SAM Evaluation Kits with device-tree support" | 506 | bool "Atmel AT91SAM Evaluation Kits with device-tree support" |
507 | depends on SOC_AT91SAM9 | ||
499 | select USE_OF | 508 | select USE_OF |
500 | help | 509 | help |
501 | Select this if you want to experiment device-tree with | 510 | Select this if you want to experiment device-tree with |
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index 3bb7a51efc9d..b38a1dcb79b8 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
@@ -88,6 +88,7 @@ obj-$(CONFIG_MACH_SNAPPER_9260) += board-snapper9260.o | |||
88 | obj-$(CONFIG_MACH_AT91SAM9M10G45EK) += board-sam9m10g45ek.o | 88 | obj-$(CONFIG_MACH_AT91SAM9M10G45EK) += board-sam9m10g45ek.o |
89 | 89 | ||
90 | # AT91SAM board with device-tree | 90 | # AT91SAM board with device-tree |
91 | obj-$(CONFIG_MACH_AT91RM9200_DT) += board-rm9200-dt.o | ||
91 | obj-$(CONFIG_MACH_AT91SAM_DT) += board-dt.o | 92 | obj-$(CONFIG_MACH_AT91SAM_DT) += board-dt.o |
92 | 93 | ||
93 | # AT91X40 board-specific support | 94 | # AT91X40 board-specific support |
diff --git a/arch/arm/mach-at91/include/mach/at91_aic.h b/arch/arm/mach-at91/at91_aic.h index eaea66197fa1..eaea66197fa1 100644 --- a/arch/arm/mach-at91/include/mach/at91_aic.h +++ b/arch/arm/mach-at91/at91_aic.h | |||
diff --git a/arch/arm/mach-at91/include/mach/at91_rstc.h b/arch/arm/mach-at91/at91_rstc.h index 875fa336800b..875fa336800b 100644 --- a/arch/arm/mach-at91/include/mach/at91_rstc.h +++ b/arch/arm/mach-at91/at91_rstc.h | |||
diff --git a/arch/arm/mach-at91/include/mach/at91_shdwc.h b/arch/arm/mach-at91/at91_shdwc.h index 60478ea8bd46..60478ea8bd46 100644 --- a/arch/arm/mach-at91/include/mach/at91_shdwc.h +++ b/arch/arm/mach-at91/at91_shdwc.h | |||
diff --git a/arch/arm/mach-at91/include/mach/at91_tc.h b/arch/arm/mach-at91/at91_tc.h index 46a317fd7164..46a317fd7164 100644 --- a/arch/arm/mach-at91/include/mach/at91_tc.h +++ b/arch/arm/mach-at91/at91_tc.h | |||
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 5269825194a8..8ce068240c69 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c | |||
@@ -17,11 +17,11 @@ | |||
17 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
18 | #include <asm/system_misc.h> | 18 | #include <asm/system_misc.h> |
19 | #include <mach/at91rm9200.h> | 19 | #include <mach/at91rm9200.h> |
20 | #include <mach/at91_aic.h> | ||
21 | #include <mach/at91_pmc.h> | 20 | #include <mach/at91_pmc.h> |
22 | #include <mach/at91_st.h> | 21 | #include <mach/at91_st.h> |
23 | #include <mach/cpu.h> | 22 | #include <mach/cpu.h> |
24 | 23 | ||
24 | #include "at91_aic.h" | ||
25 | #include "soc.h" | 25 | #include "soc.h" |
26 | #include "generic.h" | 26 | #include "generic.h" |
27 | #include "clock.h" | 27 | #include "clock.h" |
@@ -194,6 +194,24 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
194 | CLKDEV_CON_ID("pioB", &pioB_clk), | 194 | CLKDEV_CON_ID("pioB", &pioB_clk), |
195 | CLKDEV_CON_ID("pioC", &pioC_clk), | 195 | CLKDEV_CON_ID("pioC", &pioC_clk), |
196 | CLKDEV_CON_ID("pioD", &pioD_clk), | 196 | CLKDEV_CON_ID("pioD", &pioD_clk), |
197 | /* usart lookup table for DT entries */ | ||
198 | CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck), | ||
199 | CLKDEV_CON_DEV_ID("usart", "fffc0000.serial", &usart0_clk), | ||
200 | CLKDEV_CON_DEV_ID("usart", "fffc4000.serial", &usart1_clk), | ||
201 | CLKDEV_CON_DEV_ID("usart", "fffc8000.serial", &usart2_clk), | ||
202 | CLKDEV_CON_DEV_ID("usart", "fffcc000.serial", &usart3_clk), | ||
203 | /* tc lookup table for DT entries */ | ||
204 | CLKDEV_CON_DEV_ID("t0_clk", "fffa0000.timer", &tc0_clk), | ||
205 | CLKDEV_CON_DEV_ID("t1_clk", "fffa0000.timer", &tc1_clk), | ||
206 | CLKDEV_CON_DEV_ID("t2_clk", "fffa0000.timer", &tc2_clk), | ||
207 | CLKDEV_CON_DEV_ID("t0_clk", "fffa4000.timer", &tc3_clk), | ||
208 | CLKDEV_CON_DEV_ID("t1_clk", "fffa4000.timer", &tc4_clk), | ||
209 | CLKDEV_CON_DEV_ID("t2_clk", "fffa4000.timer", &tc5_clk), | ||
210 | CLKDEV_CON_DEV_ID("hclk", "300000.ohci", &ohci_clk), | ||
211 | CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioA_clk), | ||
212 | CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioB_clk), | ||
213 | CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioC_clk), | ||
214 | CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioD_clk), | ||
197 | }; | 215 | }; |
198 | 216 | ||
199 | static struct clk_lookup usart_clocks_lookups[] = { | 217 | static struct clk_lookup usart_clocks_lookups[] = { |
@@ -361,10 +379,10 @@ static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = { | |||
361 | 0 /* Advanced Interrupt Controller (IRQ6) */ | 379 | 0 /* Advanced Interrupt Controller (IRQ6) */ |
362 | }; | 380 | }; |
363 | 381 | ||
364 | struct at91_init_soc __initdata at91rm9200_soc = { | 382 | AT91_SOC_START(rm9200) |
365 | .map_io = at91rm9200_map_io, | 383 | .map_io = at91rm9200_map_io, |
366 | .default_irq_priority = at91rm9200_default_irq_priority, | 384 | .default_irq_priority = at91rm9200_default_irq_priority, |
367 | .ioremap_registers = at91rm9200_ioremap_registers, | 385 | .ioremap_registers = at91rm9200_ioremap_registers, |
368 | .register_clocks = at91rm9200_register_clocks, | 386 | .register_clocks = at91rm9200_register_clocks, |
369 | .init = at91rm9200_initialize, | 387 | .init = at91rm9200_initialize, |
370 | }; | 388 | AT91_SOC_END |
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index 3cee0e6ea7c3..2a1f8e67683d 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c | |||
@@ -18,11 +18,11 @@ | |||
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/i2c-gpio.h> | 19 | #include <linux/i2c-gpio.h> |
20 | 20 | ||
21 | #include <mach/board.h> | ||
22 | #include <mach/at91rm9200.h> | 21 | #include <mach/at91rm9200.h> |
23 | #include <mach/at91rm9200_mc.h> | 22 | #include <mach/at91rm9200_mc.h> |
24 | #include <mach/at91_ramc.h> | 23 | #include <mach/at91_ramc.h> |
25 | 24 | ||
25 | #include "board.h" | ||
26 | #include "generic.h" | 26 | #include "generic.h" |
27 | 27 | ||
28 | 28 | ||
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c index aaa443b48c91..cafe98836c8a 100644 --- a/arch/arm/mach-at91/at91rm9200_time.c +++ b/arch/arm/mach-at91/at91rm9200_time.c | |||
@@ -24,6 +24,9 @@ | |||
24 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
25 | #include <linux/clockchips.h> | 25 | #include <linux/clockchips.h> |
26 | #include <linux/export.h> | 26 | #include <linux/export.h> |
27 | #include <linux/of.h> | ||
28 | #include <linux/of_address.h> | ||
29 | #include <linux/of_irq.h> | ||
27 | 30 | ||
28 | #include <asm/mach/time.h> | 31 | #include <asm/mach/time.h> |
29 | 32 | ||
@@ -91,7 +94,8 @@ static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id) | |||
91 | static struct irqaction at91rm9200_timer_irq = { | 94 | static struct irqaction at91rm9200_timer_irq = { |
92 | .name = "at91_tick", | 95 | .name = "at91_tick", |
93 | .flags = IRQF_SHARED | IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | 96 | .flags = IRQF_SHARED | IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, |
94 | .handler = at91rm9200_timer_interrupt | 97 | .handler = at91rm9200_timer_interrupt, |
98 | .irq = NR_IRQS_LEGACY + AT91_ID_SYS, | ||
95 | }; | 99 | }; |
96 | 100 | ||
97 | static cycle_t read_clk32k(struct clocksource *cs) | 101 | static cycle_t read_clk32k(struct clocksource *cs) |
@@ -179,8 +183,60 @@ static struct clock_event_device clkevt = { | |||
179 | void __iomem *at91_st_base; | 183 | void __iomem *at91_st_base; |
180 | EXPORT_SYMBOL_GPL(at91_st_base); | 184 | EXPORT_SYMBOL_GPL(at91_st_base); |
181 | 185 | ||
186 | #ifdef CONFIG_OF | ||
187 | static struct of_device_id at91rm9200_st_timer_ids[] = { | ||
188 | { .compatible = "atmel,at91rm9200-st" }, | ||
189 | { /* sentinel */ } | ||
190 | }; | ||
191 | |||
192 | static int __init of_at91rm9200_st_init(void) | ||
193 | { | ||
194 | struct device_node *np; | ||
195 | int ret; | ||
196 | |||
197 | np = of_find_matching_node(NULL, at91rm9200_st_timer_ids); | ||
198 | if (!np) | ||
199 | goto err; | ||
200 | |||
201 | at91_st_base = of_iomap(np, 0); | ||
202 | if (!at91_st_base) | ||
203 | goto node_err; | ||
204 | |||
205 | /* Get the interrupts property */ | ||
206 | ret = irq_of_parse_and_map(np, 0); | ||
207 | if (!ret) | ||
208 | goto ioremap_err; | ||
209 | at91rm9200_timer_irq.irq = ret; | ||
210 | |||
211 | of_node_put(np); | ||
212 | |||
213 | return 0; | ||
214 | |||
215 | ioremap_err: | ||
216 | iounmap(at91_st_base); | ||
217 | node_err: | ||
218 | of_node_put(np); | ||
219 | err: | ||
220 | return -EINVAL; | ||
221 | } | ||
222 | #else | ||
223 | static int __init of_at91rm9200_st_init(void) | ||
224 | { | ||
225 | return -EINVAL; | ||
226 | } | ||
227 | #endif | ||
228 | |||
182 | void __init at91rm9200_ioremap_st(u32 addr) | 229 | void __init at91rm9200_ioremap_st(u32 addr) |
183 | { | 230 | { |
231 | #ifdef CONFIG_OF | ||
232 | struct device_node *np; | ||
233 | |||
234 | np = of_find_matching_node(NULL, at91rm9200_st_timer_ids); | ||
235 | if (np) { | ||
236 | of_node_put(np); | ||
237 | return; | ||
238 | } | ||
239 | #endif | ||
184 | at91_st_base = ioremap(addr, 256); | 240 | at91_st_base = ioremap(addr, 256); |
185 | if (!at91_st_base) | 241 | if (!at91_st_base) |
186 | panic("Impossible to ioremap ST\n"); | 242 | panic("Impossible to ioremap ST\n"); |
@@ -191,13 +247,16 @@ void __init at91rm9200_ioremap_st(u32 addr) | |||
191 | */ | 247 | */ |
192 | void __init at91rm9200_timer_init(void) | 248 | void __init at91rm9200_timer_init(void) |
193 | { | 249 | { |
250 | /* For device tree enabled device: initialize here */ | ||
251 | of_at91rm9200_st_init(); | ||
252 | |||
194 | /* Disable all timer interrupts, and clear any pending ones */ | 253 | /* Disable all timer interrupts, and clear any pending ones */ |
195 | at91_st_write(AT91_ST_IDR, | 254 | at91_st_write(AT91_ST_IDR, |
196 | AT91_ST_PITS | AT91_ST_WDOVF | AT91_ST_RTTINC | AT91_ST_ALMS); | 255 | AT91_ST_PITS | AT91_ST_WDOVF | AT91_ST_RTTINC | AT91_ST_ALMS); |
197 | at91_st_read(AT91_ST_SR); | 256 | at91_st_read(AT91_ST_SR); |
198 | 257 | ||
199 | /* Make IRQs happen for the system timer */ | 258 | /* Make IRQs happen for the system timer */ |
200 | setup_irq(NR_IRQS_LEGACY + AT91_ID_SYS, &at91rm9200_timer_irq); | 259 | setup_irq(at91rm9200_timer_irq.irq, &at91rm9200_timer_irq); |
201 | 260 | ||
202 | /* The 32KiHz "Slow Clock" (tick every 30517.58 nanoseconds) is used | 261 | /* The 32KiHz "Slow Clock" (tick every 30517.58 nanoseconds) is used |
203 | * directly for the clocksource and all clockevents, after adjusting | 262 | * directly for the clocksource and all clockevents, after adjusting |
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index f8202615f4a8..c65e7b8d7a81 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c | |||
@@ -20,10 +20,10 @@ | |||
20 | #include <mach/cpu.h> | 20 | #include <mach/cpu.h> |
21 | #include <mach/at91_dbgu.h> | 21 | #include <mach/at91_dbgu.h> |
22 | #include <mach/at91sam9260.h> | 22 | #include <mach/at91sam9260.h> |
23 | #include <mach/at91_aic.h> | ||
24 | #include <mach/at91_pmc.h> | 23 | #include <mach/at91_pmc.h> |
25 | #include <mach/at91_rstc.h> | ||
26 | 24 | ||
25 | #include "at91_aic.h" | ||
26 | #include "at91_rstc.h" | ||
27 | #include "soc.h" | 27 | #include "soc.h" |
28 | #include "generic.h" | 28 | #include "generic.h" |
29 | #include "clock.h" | 29 | #include "clock.h" |
@@ -230,11 +230,15 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
230 | CLKDEV_CON_DEV_ID("t1_clk", "fffdc000.timer", &tc4_clk), | 230 | CLKDEV_CON_DEV_ID("t1_clk", "fffdc000.timer", &tc4_clk), |
231 | CLKDEV_CON_DEV_ID("t2_clk", "fffdc000.timer", &tc5_clk), | 231 | CLKDEV_CON_DEV_ID("t2_clk", "fffdc000.timer", &tc5_clk), |
232 | CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &ohci_clk), | 232 | CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &ohci_clk), |
233 | CLKDEV_CON_DEV_ID("mci_clk", "fffa8000.mmc", &mmc_clk), | ||
233 | /* fake hclk clock */ | 234 | /* fake hclk clock */ |
234 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), | 235 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), |
235 | CLKDEV_CON_ID("pioA", &pioA_clk), | 236 | CLKDEV_CON_ID("pioA", &pioA_clk), |
236 | CLKDEV_CON_ID("pioB", &pioB_clk), | 237 | CLKDEV_CON_ID("pioB", &pioB_clk), |
237 | CLKDEV_CON_ID("pioC", &pioC_clk), | 238 | CLKDEV_CON_ID("pioC", &pioC_clk), |
239 | CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioA_clk), | ||
240 | CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioB_clk), | ||
241 | CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioC_clk), | ||
238 | }; | 242 | }; |
239 | 243 | ||
240 | static struct clk_lookup usart_clocks_lookups[] = { | 244 | static struct clk_lookup usart_clocks_lookups[] = { |
@@ -390,10 +394,10 @@ static unsigned int at91sam9260_default_irq_priority[NR_AIC_IRQS] __initdata = { | |||
390 | 0, /* Advanced Interrupt Controller */ | 394 | 0, /* Advanced Interrupt Controller */ |
391 | }; | 395 | }; |
392 | 396 | ||
393 | struct at91_init_soc __initdata at91sam9260_soc = { | 397 | AT91_SOC_START(sam9260) |
394 | .map_io = at91sam9260_map_io, | 398 | .map_io = at91sam9260_map_io, |
395 | .default_irq_priority = at91sam9260_default_irq_priority, | 399 | .default_irq_priority = at91sam9260_default_irq_priority, |
396 | .ioremap_registers = at91sam9260_ioremap_registers, | 400 | .ioremap_registers = at91sam9260_ioremap_registers, |
397 | .register_clocks = at91sam9260_register_clocks, | 401 | .register_clocks = at91sam9260_register_clocks, |
398 | .init = at91sam9260_initialize, | 402 | .init = at91sam9260_initialize, |
399 | }; | 403 | AT91_SOC_END |
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 414bd855fb0c..1f6fac21b2c8 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | #include <linux/platform_data/at91_adc.h> | 20 | #include <linux/platform_data/at91_adc.h> |
21 | 21 | ||
22 | #include <mach/board.h> | ||
23 | #include <mach/cpu.h> | 22 | #include <mach/cpu.h> |
24 | #include <mach/at91sam9260.h> | 23 | #include <mach/at91sam9260.h> |
25 | #include <mach/at91sam9260_matrix.h> | 24 | #include <mach/at91sam9260_matrix.h> |
@@ -27,6 +26,7 @@ | |||
27 | #include <mach/at91sam9_smc.h> | 26 | #include <mach/at91sam9_smc.h> |
28 | #include <mach/at91_adc.h> | 27 | #include <mach/at91_adc.h> |
29 | 28 | ||
29 | #include "board.h" | ||
30 | #include "generic.h" | 30 | #include "generic.h" |
31 | 31 | ||
32 | 32 | ||
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index 04295c04b3e0..9d3e9b8b9926 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -19,10 +19,10 @@ | |||
19 | #include <asm/system_misc.h> | 19 | #include <asm/system_misc.h> |
20 | #include <mach/cpu.h> | 20 | #include <mach/cpu.h> |
21 | #include <mach/at91sam9261.h> | 21 | #include <mach/at91sam9261.h> |
22 | #include <mach/at91_aic.h> | ||
23 | #include <mach/at91_pmc.h> | 22 | #include <mach/at91_pmc.h> |
24 | #include <mach/at91_rstc.h> | ||
25 | 23 | ||
24 | #include "at91_aic.h" | ||
25 | #include "at91_rstc.h" | ||
26 | #include "soc.h" | 26 | #include "soc.h" |
27 | #include "generic.h" | 27 | #include "generic.h" |
28 | #include "clock.h" | 28 | #include "clock.h" |
@@ -334,10 +334,10 @@ static unsigned int at91sam9261_default_irq_priority[NR_AIC_IRQS] __initdata = { | |||
334 | 0, /* Advanced Interrupt Controller */ | 334 | 0, /* Advanced Interrupt Controller */ |
335 | }; | 335 | }; |
336 | 336 | ||
337 | struct at91_init_soc __initdata at91sam9261_soc = { | 337 | AT91_SOC_START(sam9261) |
338 | .map_io = at91sam9261_map_io, | 338 | .map_io = at91sam9261_map_io, |
339 | .default_irq_priority = at91sam9261_default_irq_priority, | 339 | .default_irq_priority = at91sam9261_default_irq_priority, |
340 | .ioremap_registers = at91sam9261_ioremap_registers, | 340 | .ioremap_registers = at91sam9261_ioremap_registers, |
341 | .register_clocks = at91sam9261_register_clocks, | 341 | .register_clocks = at91sam9261_register_clocks, |
342 | .init = at91sam9261_initialize, | 342 | .init = at91sam9261_initialize, |
343 | }; | 343 | AT91_SOC_END |
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index cd604aad8e96..6ce6d27e2442 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -21,12 +21,12 @@ | |||
21 | #include <linux/fb.h> | 21 | #include <linux/fb.h> |
22 | #include <video/atmel_lcdc.h> | 22 | #include <video/atmel_lcdc.h> |
23 | 23 | ||
24 | #include <mach/board.h> | ||
25 | #include <mach/at91sam9261.h> | 24 | #include <mach/at91sam9261.h> |
26 | #include <mach/at91sam9261_matrix.h> | 25 | #include <mach/at91sam9261_matrix.h> |
27 | #include <mach/at91_matrix.h> | 26 | #include <mach/at91_matrix.h> |
28 | #include <mach/at91sam9_smc.h> | 27 | #include <mach/at91sam9_smc.h> |
29 | 28 | ||
29 | #include "board.h" | ||
30 | #include "generic.h" | 30 | #include "generic.h" |
31 | 31 | ||
32 | 32 | ||
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index d6f9c23927c4..82deb4d748b2 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -18,10 +18,10 @@ | |||
18 | #include <asm/mach/map.h> | 18 | #include <asm/mach/map.h> |
19 | #include <asm/system_misc.h> | 19 | #include <asm/system_misc.h> |
20 | #include <mach/at91sam9263.h> | 20 | #include <mach/at91sam9263.h> |
21 | #include <mach/at91_aic.h> | ||
22 | #include <mach/at91_pmc.h> | 21 | #include <mach/at91_pmc.h> |
23 | #include <mach/at91_rstc.h> | ||
24 | 22 | ||
23 | #include "at91_aic.h" | ||
24 | #include "at91_rstc.h" | ||
25 | #include "soc.h" | 25 | #include "soc.h" |
26 | #include "generic.h" | 26 | #include "generic.h" |
27 | #include "clock.h" | 27 | #include "clock.h" |
@@ -211,7 +211,14 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
211 | CLKDEV_CON_DEV_ID("hclk", "a00000.ohci", &ohci_clk), | 211 | CLKDEV_CON_DEV_ID("hclk", "a00000.ohci", &ohci_clk), |
212 | CLKDEV_CON_DEV_ID("spi_clk", "fffa4000.spi", &spi0_clk), | 212 | CLKDEV_CON_DEV_ID("spi_clk", "fffa4000.spi", &spi0_clk), |
213 | CLKDEV_CON_DEV_ID("spi_clk", "fffa8000.spi", &spi1_clk), | 213 | CLKDEV_CON_DEV_ID("spi_clk", "fffa8000.spi", &spi1_clk), |
214 | CLKDEV_CON_DEV_ID("mci_clk", "fff80000.mmc", &mmc0_clk), | ||
215 | CLKDEV_CON_DEV_ID("mci_clk", "fff84000.mmc", &mmc1_clk), | ||
214 | CLKDEV_CON_DEV_ID(NULL, "fff88000.i2c", &twi_clk), | 216 | CLKDEV_CON_DEV_ID(NULL, "fff88000.i2c", &twi_clk), |
217 | CLKDEV_CON_DEV_ID(NULL, "fffff200.gpio", &pioA_clk), | ||
218 | CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioB_clk), | ||
219 | CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioCDE_clk), | ||
220 | CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioCDE_clk), | ||
221 | CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioCDE_clk), | ||
215 | }; | 222 | }; |
216 | 223 | ||
217 | static struct clk_lookup usart_clocks_lookups[] = { | 224 | static struct clk_lookup usart_clocks_lookups[] = { |
@@ -365,10 +372,10 @@ static unsigned int at91sam9263_default_irq_priority[NR_AIC_IRQS] __initdata = { | |||
365 | 0, /* Advanced Interrupt Controller (IRQ1) */ | 372 | 0, /* Advanced Interrupt Controller (IRQ1) */ |
366 | }; | 373 | }; |
367 | 374 | ||
368 | struct at91_init_soc __initdata at91sam9263_soc = { | 375 | AT91_SOC_START(sam9263) |
369 | .map_io = at91sam9263_map_io, | 376 | .map_io = at91sam9263_map_io, |
370 | .default_irq_priority = at91sam9263_default_irq_priority, | 377 | .default_irq_priority = at91sam9263_default_irq_priority, |
371 | .ioremap_registers = at91sam9263_ioremap_registers, | 378 | .ioremap_registers = at91sam9263_ioremap_registers, |
372 | .register_clocks = at91sam9263_register_clocks, | 379 | .register_clocks = at91sam9263_register_clocks, |
373 | .init = at91sam9263_initialize, | 380 | .init = at91sam9263_initialize, |
374 | }; | 381 | AT91_SOC_END |
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index 9c61e59a2104..fb98163b9b3a 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -20,12 +20,12 @@ | |||
20 | #include <linux/fb.h> | 20 | #include <linux/fb.h> |
21 | #include <video/atmel_lcdc.h> | 21 | #include <video/atmel_lcdc.h> |
22 | 22 | ||
23 | #include <mach/board.h> | ||
24 | #include <mach/at91sam9263.h> | 23 | #include <mach/at91sam9263.h> |
25 | #include <mach/at91sam9263_matrix.h> | 24 | #include <mach/at91sam9263_matrix.h> |
26 | #include <mach/at91_matrix.h> | 25 | #include <mach/at91_matrix.h> |
27 | #include <mach/at91sam9_smc.h> | 26 | #include <mach/at91sam9_smc.h> |
28 | 27 | ||
28 | #include "board.h" | ||
29 | #include "generic.h" | 29 | #include "generic.h" |
30 | 30 | ||
31 | 31 | ||
diff --git a/arch/arm/mach-at91/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c index ffc0957d7623..358412f1f5f8 100644 --- a/arch/arm/mach-at91/at91sam926x_time.c +++ b/arch/arm/mach-at91/at91sam926x_time.c | |||
@@ -20,8 +20,18 @@ | |||
20 | 20 | ||
21 | #include <asm/mach/time.h> | 21 | #include <asm/mach/time.h> |
22 | 22 | ||
23 | #include <mach/at91_pit.h> | 23 | #define AT91_PIT_MR 0x00 /* Mode Register */ |
24 | 24 | #define AT91_PIT_PITIEN (1 << 25) /* Timer Interrupt Enable */ | |
25 | #define AT91_PIT_PITEN (1 << 24) /* Timer Enabled */ | ||
26 | #define AT91_PIT_PIV (0xfffff) /* Periodic Interval Value */ | ||
27 | |||
28 | #define AT91_PIT_SR 0x04 /* Status Register */ | ||
29 | #define AT91_PIT_PITS (1 << 0) /* Timer Status */ | ||
30 | |||
31 | #define AT91_PIT_PIVR 0x08 /* Periodic Interval Value Register */ | ||
32 | #define AT91_PIT_PIIR 0x0c /* Periodic Interval Image Register */ | ||
33 | #define AT91_PIT_PICNT (0xfff << 20) /* Interval Counter */ | ||
34 | #define AT91_PIT_CPIV (0xfffff) /* Inverval Value */ | ||
25 | 35 | ||
26 | #define PIT_CPIV(x) ((x) & AT91_PIT_CPIV) | 36 | #define PIT_CPIV(x) ((x) & AT91_PIT_CPIV) |
27 | #define PIT_PICNT(x) (((x) & AT91_PIT_PICNT) >> 20) | 37 | #define PIT_PICNT(x) (((x) & AT91_PIT_PICNT) >> 20) |
diff --git a/arch/arm/mach-at91/at91sam9_alt_reset.S b/arch/arm/mach-at91/at91sam9_alt_reset.S index 7af2e108b8a0..f039538d3bdb 100644 --- a/arch/arm/mach-at91/at91sam9_alt_reset.S +++ b/arch/arm/mach-at91/at91sam9_alt_reset.S | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/linkage.h> | 16 | #include <linux/linkage.h> |
17 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
18 | #include <mach/at91_ramc.h> | 18 | #include <mach/at91_ramc.h> |
19 | #include <mach/at91_rstc.h> | 19 | #include "at91_rstc.h" |
20 | 20 | ||
21 | .arm | 21 | .arm |
22 | 22 | ||
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index b7ae124c16e5..45d753d473f6 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c | |||
@@ -18,10 +18,10 @@ | |||
18 | #include <asm/mach/map.h> | 18 | #include <asm/mach/map.h> |
19 | #include <asm/system_misc.h> | 19 | #include <asm/system_misc.h> |
20 | #include <mach/at91sam9g45.h> | 20 | #include <mach/at91sam9g45.h> |
21 | #include <mach/at91_aic.h> | ||
22 | #include <mach/at91_pmc.h> | 21 | #include <mach/at91_pmc.h> |
23 | #include <mach/cpu.h> | 22 | #include <mach/cpu.h> |
24 | 23 | ||
24 | #include "at91_aic.h" | ||
25 | #include "soc.h" | 25 | #include "soc.h" |
26 | #include "generic.h" | 26 | #include "generic.h" |
27 | #include "clock.h" | 27 | #include "clock.h" |
@@ -256,10 +256,18 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
256 | CLKDEV_CON_DEV_ID("t0_clk", "fffd4000.timer", &tcb0_clk), | 256 | CLKDEV_CON_DEV_ID("t0_clk", "fffd4000.timer", &tcb0_clk), |
257 | CLKDEV_CON_DEV_ID("hclk", "700000.ohci", &uhphs_clk), | 257 | CLKDEV_CON_DEV_ID("hclk", "700000.ohci", &uhphs_clk), |
258 | CLKDEV_CON_DEV_ID("ehci_clk", "800000.ehci", &uhphs_clk), | 258 | CLKDEV_CON_DEV_ID("ehci_clk", "800000.ehci", &uhphs_clk), |
259 | CLKDEV_CON_DEV_ID("mci_clk", "fff80000.mmc", &mmc0_clk), | ||
260 | CLKDEV_CON_DEV_ID("mci_clk", "fffd0000.mmc", &mmc1_clk), | ||
259 | CLKDEV_CON_DEV_ID(NULL, "fff84000.i2c", &twi0_clk), | 261 | CLKDEV_CON_DEV_ID(NULL, "fff84000.i2c", &twi0_clk), |
260 | CLKDEV_CON_DEV_ID(NULL, "fff88000.i2c", &twi1_clk), | 262 | CLKDEV_CON_DEV_ID(NULL, "fff88000.i2c", &twi1_clk), |
261 | /* fake hclk clock */ | 263 | /* fake hclk clock */ |
262 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &uhphs_clk), | 264 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &uhphs_clk), |
265 | CLKDEV_CON_DEV_ID(NULL, "fffff200.gpio", &pioA_clk), | ||
266 | CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioB_clk), | ||
267 | CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioC_clk), | ||
268 | CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioDE_clk), | ||
269 | CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioDE_clk), | ||
270 | |||
263 | CLKDEV_CON_ID("pioA", &pioA_clk), | 271 | CLKDEV_CON_ID("pioA", &pioA_clk), |
264 | CLKDEV_CON_ID("pioB", &pioB_clk), | 272 | CLKDEV_CON_ID("pioB", &pioB_clk), |
265 | CLKDEV_CON_ID("pioC", &pioC_clk), | 273 | CLKDEV_CON_ID("pioC", &pioC_clk), |
@@ -408,10 +416,10 @@ static unsigned int at91sam9g45_default_irq_priority[NR_AIC_IRQS] __initdata = { | |||
408 | 0, /* Advanced Interrupt Controller (IRQ0) */ | 416 | 0, /* Advanced Interrupt Controller (IRQ0) */ |
409 | }; | 417 | }; |
410 | 418 | ||
411 | struct at91_init_soc __initdata at91sam9g45_soc = { | 419 | AT91_SOC_START(sam9g45) |
412 | .map_io = at91sam9g45_map_io, | 420 | .map_io = at91sam9g45_map_io, |
413 | .default_irq_priority = at91sam9g45_default_irq_priority, | 421 | .default_irq_priority = at91sam9g45_default_irq_priority, |
414 | .ioremap_registers = at91sam9g45_ioremap_registers, | 422 | .ioremap_registers = at91sam9g45_ioremap_registers, |
415 | .register_clocks = at91sam9g45_register_clocks, | 423 | .register_clocks = at91sam9g45_register_clocks, |
416 | .init = at91sam9g45_initialize, | 424 | .init = at91sam9g45_initialize, |
417 | }; | 425 | AT91_SOC_END |
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index fcd233cb33d2..e35964201a10 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <video/atmel_lcdc.h> | 26 | #include <video/atmel_lcdc.h> |
27 | 27 | ||
28 | #include <mach/at91_adc.h> | 28 | #include <mach/at91_adc.h> |
29 | #include <mach/board.h> | ||
30 | #include <mach/at91sam9g45.h> | 29 | #include <mach/at91sam9g45.h> |
31 | #include <mach/at91sam9g45_matrix.h> | 30 | #include <mach/at91sam9g45_matrix.h> |
32 | #include <mach/at91_matrix.h> | 31 | #include <mach/at91_matrix.h> |
@@ -36,6 +35,7 @@ | |||
36 | 35 | ||
37 | #include <media/atmel-isi.h> | 36 | #include <media/atmel-isi.h> |
38 | 37 | ||
38 | #include "board.h" | ||
39 | #include "generic.h" | 39 | #include "generic.h" |
40 | #include "clock.h" | 40 | #include "clock.h" |
41 | 41 | ||
diff --git a/arch/arm/mach-at91/at91sam9g45_reset.S b/arch/arm/mach-at91/at91sam9g45_reset.S index 9d457182c86c..721a1a34dd1d 100644 --- a/arch/arm/mach-at91/at91sam9g45_reset.S +++ b/arch/arm/mach-at91/at91sam9g45_reset.S | |||
@@ -13,8 +13,7 @@ | |||
13 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
15 | #include <mach/at91_ramc.h> | 15 | #include <mach/at91_ramc.h> |
16 | #include <mach/at91_rstc.h> | 16 | #include "at91_rstc.h" |
17 | |||
18 | .arm | 17 | .arm |
19 | 18 | ||
20 | .globl at91sam9g45_restart | 19 | .globl at91sam9g45_restart |
diff --git a/arch/arm/mach-at91/at91sam9n12.c b/arch/arm/mach-at91/at91sam9n12.c index 732d3d3f4ec5..5dfc8fd87103 100644 --- a/arch/arm/mach-at91/at91sam9n12.c +++ b/arch/arm/mach-at91/at91sam9n12.c | |||
@@ -15,8 +15,8 @@ | |||
15 | #include <mach/at91sam9n12.h> | 15 | #include <mach/at91sam9n12.h> |
16 | #include <mach/at91_pmc.h> | 16 | #include <mach/at91_pmc.h> |
17 | #include <mach/cpu.h> | 17 | #include <mach/cpu.h> |
18 | #include <mach/board.h> | ||
19 | 18 | ||
19 | #include "board.h" | ||
20 | #include "soc.h" | 20 | #include "soc.h" |
21 | #include "generic.h" | 21 | #include "generic.h" |
22 | #include "clock.h" | 22 | #include "clock.h" |
@@ -168,13 +168,14 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
168 | CLKDEV_CON_DEV_ID("usart", "f8028000.serial", &usart3_clk), | 168 | CLKDEV_CON_DEV_ID("usart", "f8028000.serial", &usart3_clk), |
169 | CLKDEV_CON_DEV_ID("t0_clk", "f8008000.timer", &tcb_clk), | 169 | CLKDEV_CON_DEV_ID("t0_clk", "f8008000.timer", &tcb_clk), |
170 | CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb_clk), | 170 | CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb_clk), |
171 | CLKDEV_CON_DEV_ID("mci_clk", "f0008000.mmc", &mmc_clk), | ||
171 | CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma_clk), | 172 | CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma_clk), |
172 | CLKDEV_CON_DEV_ID(NULL, "f8010000.i2c", &twi0_clk), | 173 | CLKDEV_CON_DEV_ID(NULL, "f8010000.i2c", &twi0_clk), |
173 | CLKDEV_CON_DEV_ID(NULL, "f8014000.i2c", &twi1_clk), | 174 | CLKDEV_CON_DEV_ID(NULL, "f8014000.i2c", &twi1_clk), |
174 | CLKDEV_CON_ID("pioA", &pioAB_clk), | 175 | CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioAB_clk), |
175 | CLKDEV_CON_ID("pioB", &pioAB_clk), | 176 | CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioAB_clk), |
176 | CLKDEV_CON_ID("pioC", &pioCD_clk), | 177 | CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioCD_clk), |
177 | CLKDEV_CON_ID("pioD", &pioCD_clk), | 178 | CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioCD_clk), |
178 | /* additional fake clock for macb_hclk */ | 179 | /* additional fake clock for macb_hclk */ |
179 | CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &uhp_clk), | 180 | CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &uhp_clk), |
180 | CLKDEV_CON_DEV_ID("ohci_clk", "500000.ohci", &uhp_clk), | 181 | CLKDEV_CON_DEV_ID("ohci_clk", "500000.ohci", &uhp_clk), |
@@ -223,13 +224,10 @@ static void __init at91sam9n12_map_io(void) | |||
223 | void __init at91sam9n12_initialize(void) | 224 | void __init at91sam9n12_initialize(void) |
224 | { | 225 | { |
225 | at91_extern_irq = (1 << AT91SAM9N12_ID_IRQ0); | 226 | at91_extern_irq = (1 << AT91SAM9N12_ID_IRQ0); |
226 | |||
227 | /* Register GPIO subsystem (using DT) */ | ||
228 | at91_gpio_init(NULL, 0); | ||
229 | } | 227 | } |
230 | 228 | ||
231 | struct at91_init_soc __initdata at91sam9n12_soc = { | 229 | AT91_SOC_START(sam9n12) |
232 | .map_io = at91sam9n12_map_io, | 230 | .map_io = at91sam9n12_map_io, |
233 | .register_clocks = at91sam9n12_register_clocks, | 231 | .register_clocks = at91sam9n12_register_clocks, |
234 | .init = at91sam9n12_initialize, | 232 | .init = at91sam9n12_initialize, |
235 | }; | 233 | AT91_SOC_END |
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index 72e908412222..44e3a633fda7 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c | |||
@@ -19,10 +19,10 @@ | |||
19 | #include <mach/cpu.h> | 19 | #include <mach/cpu.h> |
20 | #include <mach/at91_dbgu.h> | 20 | #include <mach/at91_dbgu.h> |
21 | #include <mach/at91sam9rl.h> | 21 | #include <mach/at91sam9rl.h> |
22 | #include <mach/at91_aic.h> | ||
23 | #include <mach/at91_pmc.h> | 22 | #include <mach/at91_pmc.h> |
24 | #include <mach/at91_rstc.h> | ||
25 | 23 | ||
24 | #include "at91_aic.h" | ||
25 | #include "at91_rstc.h" | ||
26 | #include "soc.h" | 26 | #include "soc.h" |
27 | #include "generic.h" | 27 | #include "generic.h" |
28 | #include "clock.h" | 28 | #include "clock.h" |
@@ -338,10 +338,10 @@ static unsigned int at91sam9rl_default_irq_priority[NR_AIC_IRQS] __initdata = { | |||
338 | 0, /* Advanced Interrupt Controller */ | 338 | 0, /* Advanced Interrupt Controller */ |
339 | }; | 339 | }; |
340 | 340 | ||
341 | struct at91_init_soc __initdata at91sam9rl_soc = { | 341 | AT91_SOC_START(sam9rl) |
342 | .map_io = at91sam9rl_map_io, | 342 | .map_io = at91sam9rl_map_io, |
343 | .default_irq_priority = at91sam9rl_default_irq_priority, | 343 | .default_irq_priority = at91sam9rl_default_irq_priority, |
344 | .ioremap_registers = at91sam9rl_ioremap_registers, | 344 | .ioremap_registers = at91sam9rl_ioremap_registers, |
345 | .register_clocks = at91sam9rl_register_clocks, | 345 | .register_clocks = at91sam9rl_register_clocks, |
346 | .init = at91sam9rl_initialize, | 346 | .init = at91sam9rl_initialize, |
347 | }; | 347 | AT91_SOC_END |
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index 5047bdc92adf..160384d93db2 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -17,13 +17,13 @@ | |||
17 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
18 | #include <video/atmel_lcdc.h> | 18 | #include <video/atmel_lcdc.h> |
19 | 19 | ||
20 | #include <mach/board.h> | ||
21 | #include <mach/at91sam9rl.h> | 20 | #include <mach/at91sam9rl.h> |
22 | #include <mach/at91sam9rl_matrix.h> | 21 | #include <mach/at91sam9rl_matrix.h> |
23 | #include <mach/at91_matrix.h> | 22 | #include <mach/at91_matrix.h> |
24 | #include <mach/at91sam9_smc.h> | 23 | #include <mach/at91sam9_smc.h> |
25 | #include <linux/platform_data/dma-atmel.h> | 24 | #include <linux/platform_data/dma-atmel.h> |
26 | 25 | ||
26 | #include "board.h" | ||
27 | #include "generic.h" | 27 | #include "generic.h" |
28 | 28 | ||
29 | 29 | ||
diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c index e5035380dcbc..dfb2c0c13fb5 100644 --- a/arch/arm/mach-at91/at91sam9x5.c +++ b/arch/arm/mach-at91/at91sam9x5.c | |||
@@ -15,8 +15,8 @@ | |||
15 | #include <mach/at91sam9x5.h> | 15 | #include <mach/at91sam9x5.h> |
16 | #include <mach/at91_pmc.h> | 16 | #include <mach/at91_pmc.h> |
17 | #include <mach/cpu.h> | 17 | #include <mach/cpu.h> |
18 | #include <mach/board.h> | ||
19 | 18 | ||
19 | #include "board.h" | ||
20 | #include "soc.h" | 20 | #include "soc.h" |
21 | #include "generic.h" | 21 | #include "generic.h" |
22 | #include "clock.h" | 22 | #include "clock.h" |
@@ -229,15 +229,17 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
229 | CLKDEV_CON_DEV_ID("usart", "f8028000.serial", &usart3_clk), | 229 | CLKDEV_CON_DEV_ID("usart", "f8028000.serial", &usart3_clk), |
230 | CLKDEV_CON_DEV_ID("t0_clk", "f8008000.timer", &tcb0_clk), | 230 | CLKDEV_CON_DEV_ID("t0_clk", "f8008000.timer", &tcb0_clk), |
231 | CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb0_clk), | 231 | CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb0_clk), |
232 | CLKDEV_CON_DEV_ID("mci_clk", "f0008000.mmc", &mmc0_clk), | ||
233 | CLKDEV_CON_DEV_ID("mci_clk", "f000c000.mmc", &mmc1_clk), | ||
232 | CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma0_clk), | 234 | CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma0_clk), |
233 | CLKDEV_CON_DEV_ID("dma_clk", "ffffee00.dma-controller", &dma1_clk), | 235 | CLKDEV_CON_DEV_ID("dma_clk", "ffffee00.dma-controller", &dma1_clk), |
234 | CLKDEV_CON_DEV_ID(NULL, "f8010000.i2c", &twi0_clk), | 236 | CLKDEV_CON_DEV_ID(NULL, "f8010000.i2c", &twi0_clk), |
235 | CLKDEV_CON_DEV_ID(NULL, "f8014000.i2c", &twi1_clk), | 237 | CLKDEV_CON_DEV_ID(NULL, "f8014000.i2c", &twi1_clk), |
236 | CLKDEV_CON_DEV_ID(NULL, "f8018000.i2c", &twi2_clk), | 238 | CLKDEV_CON_DEV_ID(NULL, "f8018000.i2c", &twi2_clk), |
237 | CLKDEV_CON_ID("pioA", &pioAB_clk), | 239 | CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioAB_clk), |
238 | CLKDEV_CON_ID("pioB", &pioAB_clk), | 240 | CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioAB_clk), |
239 | CLKDEV_CON_ID("pioC", &pioCD_clk), | 241 | CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioCD_clk), |
240 | CLKDEV_CON_ID("pioD", &pioCD_clk), | 242 | CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioCD_clk), |
241 | /* additional fake clock for macb_hclk */ | 243 | /* additional fake clock for macb_hclk */ |
242 | CLKDEV_CON_DEV_ID("hclk", "f802c000.ethernet", &macb0_clk), | 244 | CLKDEV_CON_DEV_ID("hclk", "f802c000.ethernet", &macb0_clk), |
243 | CLKDEV_CON_DEV_ID("hclk", "f8030000.ethernet", &macb1_clk), | 245 | CLKDEV_CON_DEV_ID("hclk", "f8030000.ethernet", &macb1_clk), |
@@ -313,18 +315,11 @@ static void __init at91sam9x5_map_io(void) | |||
313 | at91_init_sram(0, AT91SAM9X5_SRAM_BASE, AT91SAM9X5_SRAM_SIZE); | 315 | at91_init_sram(0, AT91SAM9X5_SRAM_BASE, AT91SAM9X5_SRAM_SIZE); |
314 | } | 316 | } |
315 | 317 | ||
316 | void __init at91sam9x5_initialize(void) | ||
317 | { | ||
318 | /* Register GPIO subsystem (using DT) */ | ||
319 | at91_gpio_init(NULL, 0); | ||
320 | } | ||
321 | |||
322 | /* -------------------------------------------------------------------- | 318 | /* -------------------------------------------------------------------- |
323 | * Interrupt initialization | 319 | * Interrupt initialization |
324 | * -------------------------------------------------------------------- */ | 320 | * -------------------------------------------------------------------- */ |
325 | 321 | ||
326 | struct at91_init_soc __initdata at91sam9x5_soc = { | 322 | AT91_SOC_START(sam9x5) |
327 | .map_io = at91sam9x5_map_io, | 323 | .map_io = at91sam9x5_map_io, |
328 | .register_clocks = at91sam9x5_register_clocks, | 324 | .register_clocks = at91sam9x5_register_clocks, |
329 | .init = at91sam9x5_initialize, | 325 | AT91_SOC_END |
330 | }; | ||
diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c index bb7f54474b92..19ca79396905 100644 --- a/arch/arm/mach-at91/at91x40.c +++ b/arch/arm/mach-at91/at91x40.c | |||
@@ -18,9 +18,10 @@ | |||
18 | #include <asm/system_misc.h> | 18 | #include <asm/system_misc.h> |
19 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
20 | #include <mach/at91x40.h> | 20 | #include <mach/at91x40.h> |
21 | #include <mach/at91_aic.h> | ||
22 | #include <mach/at91_st.h> | 21 | #include <mach/at91_st.h> |
23 | #include <mach/timex.h> | 22 | #include <mach/timex.h> |
23 | |||
24 | #include "at91_aic.h" | ||
24 | #include "generic.h" | 25 | #include "generic.h" |
25 | 26 | ||
26 | /* | 27 | /* |
diff --git a/arch/arm/mach-at91/at91x40_time.c b/arch/arm/mach-at91/at91x40_time.c index ee06d7bcdf76..0e57e440c061 100644 --- a/arch/arm/mach-at91/at91x40_time.c +++ b/arch/arm/mach-at91/at91x40_time.c | |||
@@ -26,7 +26,8 @@ | |||
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
28 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
29 | #include <mach/at91_tc.h> | 29 | |
30 | #include "at91_tc.h" | ||
30 | 31 | ||
31 | #define at91_tc_read(field) \ | 32 | #define at91_tc_read(field) \ |
32 | __raw_readl(AT91_IO_P2V(AT91_TC) + field) | 33 | __raw_readl(AT91_IO_P2V(AT91_TC) + field) |
diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c index 22d8856094f1..b99b5752cc10 100644 --- a/arch/arm/mach-at91/board-1arm.c +++ b/arch/arm/mach-at91/board-1arm.c | |||
@@ -34,10 +34,10 @@ | |||
34 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
35 | #include <asm/mach/irq.h> | 35 | #include <asm/mach/irq.h> |
36 | 36 | ||
37 | #include <mach/board.h> | ||
38 | #include <mach/cpu.h> | 37 | #include <mach/cpu.h> |
39 | #include <mach/at91_aic.h> | ||
40 | 38 | ||
39 | #include "at91_aic.h" | ||
40 | #include "board.h" | ||
41 | #include "generic.h" | 41 | #include "generic.h" |
42 | 42 | ||
43 | 43 | ||
diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c index 93a832f70232..854b97974287 100644 --- a/arch/arm/mach-at91/board-afeb-9260v1.c +++ b/arch/arm/mach-at91/board-afeb-9260v1.c | |||
@@ -43,9 +43,8 @@ | |||
43 | #include <asm/mach/map.h> | 43 | #include <asm/mach/map.h> |
44 | #include <asm/mach/irq.h> | 44 | #include <asm/mach/irq.h> |
45 | 45 | ||
46 | #include <mach/board.h> | 46 | #include "at91_aic.h" |
47 | #include <mach/at91_aic.h> | 47 | #include "board.h" |
48 | |||
49 | #include "generic.h" | 48 | #include "generic.h" |
50 | 49 | ||
51 | 50 | ||
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index 477e708497bc..28a18ce6d914 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c | |||
@@ -38,10 +38,10 @@ | |||
38 | #include <asm/mach/map.h> | 38 | #include <asm/mach/map.h> |
39 | #include <asm/mach/irq.h> | 39 | #include <asm/mach/irq.h> |
40 | 40 | ||
41 | #include <mach/board.h> | ||
42 | #include <mach/at91_aic.h> | ||
43 | #include <mach/at91sam9_smc.h> | 41 | #include <mach/at91sam9_smc.h> |
44 | 42 | ||
43 | #include "at91_aic.h" | ||
44 | #include "board.h" | ||
45 | #include "sam9_smc.h" | 45 | #include "sam9_smc.h" |
46 | #include "generic.h" | 46 | #include "generic.h" |
47 | 47 | ||
diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c index 71d8f362a1d5..c17bb533a949 100644 --- a/arch/arm/mach-at91/board-carmeva.c +++ b/arch/arm/mach-at91/board-carmeva.c | |||
@@ -35,9 +35,9 @@ | |||
35 | #include <asm/mach/irq.h> | 35 | #include <asm/mach/irq.h> |
36 | 36 | ||
37 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
38 | #include <mach/board.h> | ||
39 | #include <mach/at91_aic.h> | ||
40 | 38 | ||
39 | #include "at91_aic.h" | ||
40 | #include "board.h" | ||
41 | #include "generic.h" | 41 | #include "generic.h" |
42 | 42 | ||
43 | 43 | ||
diff --git a/arch/arm/mach-at91/board-cpu9krea.c b/arch/arm/mach-at91/board-cpu9krea.c index e71c473316e3..847432441ecc 100644 --- a/arch/arm/mach-at91/board-cpu9krea.c +++ b/arch/arm/mach-at91/board-cpu9krea.c | |||
@@ -40,12 +40,12 @@ | |||
40 | #include <asm/mach/irq.h> | 40 | #include <asm/mach/irq.h> |
41 | 41 | ||
42 | #include <mach/hardware.h> | 42 | #include <mach/hardware.h> |
43 | #include <mach/board.h> | ||
44 | #include <mach/at91_aic.h> | ||
45 | #include <mach/at91sam9_smc.h> | 43 | #include <mach/at91sam9_smc.h> |
46 | #include <mach/at91sam9260_matrix.h> | 44 | #include <mach/at91sam9260_matrix.h> |
47 | #include <mach/at91_matrix.h> | 45 | #include <mach/at91_matrix.h> |
48 | 46 | ||
47 | #include "at91_aic.h" | ||
48 | #include "board.h" | ||
49 | #include "sam9_smc.h" | 49 | #include "sam9_smc.h" |
50 | #include "generic.h" | 50 | #include "generic.h" |
51 | 51 | ||
diff --git a/arch/arm/mach-at91/board-cpuat91.c b/arch/arm/mach-at91/board-cpuat91.c index 2cbd1a2b6c35..2a7af7868747 100644 --- a/arch/arm/mach-at91/board-cpuat91.c +++ b/arch/arm/mach-at91/board-cpuat91.c | |||
@@ -36,12 +36,12 @@ | |||
36 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
37 | #include <asm/mach/irq.h> | 37 | #include <asm/mach/irq.h> |
38 | 38 | ||
39 | #include <mach/board.h> | ||
40 | #include <mach/at91_aic.h> | ||
41 | #include <mach/at91rm9200_mc.h> | 39 | #include <mach/at91rm9200_mc.h> |
42 | #include <mach/at91_ramc.h> | 40 | #include <mach/at91_ramc.h> |
43 | #include <mach/cpu.h> | 41 | #include <mach/cpu.h> |
44 | 42 | ||
43 | #include "at91_aic.h" | ||
44 | #include "board.h" | ||
45 | #include "generic.h" | 45 | #include "generic.h" |
46 | 46 | ||
47 | static struct gpio_led cpuat91_leds[] = { | 47 | static struct gpio_led cpuat91_leds[] = { |
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c index 3e37437a7a61..78e025074423 100644 --- a/arch/arm/mach-at91/board-csb337.c +++ b/arch/arm/mach-at91/board-csb337.c | |||
@@ -38,9 +38,9 @@ | |||
38 | #include <asm/mach/irq.h> | 38 | #include <asm/mach/irq.h> |
39 | 39 | ||
40 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
41 | #include <mach/board.h> | ||
42 | #include <mach/at91_aic.h> | ||
43 | 41 | ||
42 | #include "at91_aic.h" | ||
43 | #include "board.h" | ||
44 | #include "generic.h" | 44 | #include "generic.h" |
45 | 45 | ||
46 | 46 | ||
diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c index 872871ab1160..ec0f3abd504b 100644 --- a/arch/arm/mach-at91/board-csb637.c +++ b/arch/arm/mach-at91/board-csb637.c | |||
@@ -35,9 +35,9 @@ | |||
35 | #include <asm/mach/irq.h> | 35 | #include <asm/mach/irq.h> |
36 | 36 | ||
37 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
38 | #include <mach/board.h> | ||
39 | #include <mach/at91_aic.h> | ||
40 | 38 | ||
39 | #include "at91_aic.h" | ||
40 | #include "board.h" | ||
41 | #include "generic.h" | 41 | #include "generic.h" |
42 | 42 | ||
43 | 43 | ||
diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c index e8f45c4e0ea8..881170ce61dd 100644 --- a/arch/arm/mach-at91/board-dt.c +++ b/arch/arm/mach-at91/board-dt.c | |||
@@ -15,23 +15,20 @@ | |||
15 | #include <linux/of_irq.h> | 15 | #include <linux/of_irq.h> |
16 | #include <linux/of_platform.h> | 16 | #include <linux/of_platform.h> |
17 | 17 | ||
18 | #include <mach/board.h> | ||
19 | #include <mach/at91_aic.h> | ||
20 | |||
21 | #include <asm/setup.h> | 18 | #include <asm/setup.h> |
22 | #include <asm/irq.h> | 19 | #include <asm/irq.h> |
23 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
24 | #include <asm/mach/map.h> | 21 | #include <asm/mach/map.h> |
25 | #include <asm/mach/irq.h> | 22 | #include <asm/mach/irq.h> |
26 | 23 | ||
24 | #include "at91_aic.h" | ||
25 | #include "board.h" | ||
27 | #include "generic.h" | 26 | #include "generic.h" |
28 | 27 | ||
29 | 28 | ||
30 | static const struct of_device_id irq_of_match[] __initconst = { | 29 | static const struct of_device_id irq_of_match[] __initconst = { |
31 | 30 | ||
32 | { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init }, | 31 | { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init }, |
33 | { .compatible = "atmel,at91rm9200-gpio", .data = at91_gpio_of_irq_setup }, | ||
34 | { .compatible = "atmel,at91sam9x5-gpio", .data = at91_gpio_of_irq_setup }, | ||
35 | { /*sentinel*/ } | 32 | { /*sentinel*/ } |
36 | }; | 33 | }; |
37 | 34 | ||
diff --git a/arch/arm/mach-at91/board-eb01.c b/arch/arm/mach-at91/board-eb01.c index 01f66e99ece7..b489388a6f84 100644 --- a/arch/arm/mach-at91/board-eb01.c +++ b/arch/arm/mach-at91/board-eb01.c | |||
@@ -27,8 +27,9 @@ | |||
27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
28 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
29 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
30 | #include <mach/board.h> | 30 | |
31 | #include <mach/at91_aic.h> | 31 | #include "at91_aic.h" |
32 | #include "board.h" | ||
32 | #include "generic.h" | 33 | #include "generic.h" |
33 | 34 | ||
34 | static void __init at91eb01_init_irq(void) | 35 | static void __init at91eb01_init_irq(void) |
diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c index 0cfac16ee9d5..9f5e71c95f05 100644 --- a/arch/arm/mach-at91/board-eb9200.c +++ b/arch/arm/mach-at91/board-eb9200.c | |||
@@ -35,9 +35,8 @@ | |||
35 | #include <asm/mach/map.h> | 35 | #include <asm/mach/map.h> |
36 | #include <asm/mach/irq.h> | 36 | #include <asm/mach/irq.h> |
37 | 37 | ||
38 | #include <mach/board.h> | 38 | #include "at91_aic.h" |
39 | #include <mach/at91_aic.h> | 39 | #include "board.h" |
40 | |||
41 | #include "generic.h" | 40 | #include "generic.h" |
42 | 41 | ||
43 | 42 | ||
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c index 3d931ffac4bf..ef69e0ebe949 100644 --- a/arch/arm/mach-at91/board-ecbat91.c +++ b/arch/arm/mach-at91/board-ecbat91.c | |||
@@ -37,10 +37,10 @@ | |||
37 | #include <asm/mach/map.h> | 37 | #include <asm/mach/map.h> |
38 | #include <asm/mach/irq.h> | 38 | #include <asm/mach/irq.h> |
39 | 39 | ||
40 | #include <mach/board.h> | ||
41 | #include <mach/cpu.h> | 40 | #include <mach/cpu.h> |
42 | #include <mach/at91_aic.h> | ||
43 | 41 | ||
42 | #include "at91_aic.h" | ||
43 | #include "board.h" | ||
44 | #include "generic.h" | 44 | #include "generic.h" |
45 | 45 | ||
46 | 46 | ||
diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c index d93658a2b128..50f3d3795c05 100644 --- a/arch/arm/mach-at91/board-eco920.c +++ b/arch/arm/mach-at91/board-eco920.c | |||
@@ -24,12 +24,12 @@ | |||
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
26 | 26 | ||
27 | #include <mach/board.h> | ||
28 | #include <mach/at91_aic.h> | ||
29 | #include <mach/at91rm9200_mc.h> | 27 | #include <mach/at91rm9200_mc.h> |
30 | #include <mach/at91_ramc.h> | 28 | #include <mach/at91_ramc.h> |
31 | #include <mach/cpu.h> | 29 | #include <mach/cpu.h> |
32 | 30 | ||
31 | #include "at91_aic.h" | ||
32 | #include "board.h" | ||
33 | #include "generic.h" | 33 | #include "generic.h" |
34 | 34 | ||
35 | static void __init eco920_init_early(void) | 35 | static void __init eco920_init_early(void) |
diff --git a/arch/arm/mach-at91/board-flexibity.c b/arch/arm/mach-at91/board-flexibity.c index fa98abacb1ba..5d44eba0f20f 100644 --- a/arch/arm/mach-at91/board-flexibity.c +++ b/arch/arm/mach-at91/board-flexibity.c | |||
@@ -33,9 +33,9 @@ | |||
33 | #include <asm/mach/irq.h> | 33 | #include <asm/mach/irq.h> |
34 | 34 | ||
35 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
36 | #include <mach/board.h> | ||
37 | #include <mach/at91_aic.h> | ||
38 | 36 | ||
37 | #include "at91_aic.h" | ||
38 | #include "board.h" | ||
39 | #include "generic.h" | 39 | #include "generic.h" |
40 | 40 | ||
41 | static void __init flexibity_init_early(void) | 41 | static void __init flexibity_init_early(void) |
diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c index 6e47071d8206..191d37c16bab 100644 --- a/arch/arm/mach-at91/board-foxg20.c +++ b/arch/arm/mach-at91/board-foxg20.c | |||
@@ -41,10 +41,10 @@ | |||
41 | #include <asm/mach/map.h> | 41 | #include <asm/mach/map.h> |
42 | #include <asm/mach/irq.h> | 42 | #include <asm/mach/irq.h> |
43 | 43 | ||
44 | #include <mach/board.h> | ||
45 | #include <mach/at91_aic.h> | ||
46 | #include <mach/at91sam9_smc.h> | 44 | #include <mach/at91sam9_smc.h> |
47 | 45 | ||
46 | #include "at91_aic.h" | ||
47 | #include "board.h" | ||
48 | #include "sam9_smc.h" | 48 | #include "sam9_smc.h" |
49 | #include "generic.h" | 49 | #include "generic.h" |
50 | 50 | ||
diff --git a/arch/arm/mach-at91/board-gsia18s.c b/arch/arm/mach-at91/board-gsia18s.c index a9d5e78118c5..23a2fa17ab29 100644 --- a/arch/arm/mach-at91/board-gsia18s.c +++ b/arch/arm/mach-at91/board-gsia18s.c | |||
@@ -30,14 +30,14 @@ | |||
30 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
32 | 32 | ||
33 | #include <mach/board.h> | ||
34 | #include <mach/at91_aic.h> | ||
35 | #include <mach/at91sam9_smc.h> | 33 | #include <mach/at91sam9_smc.h> |
36 | #include <mach/gsia18s.h> | ||
37 | #include <mach/stamp9g20.h> | ||
38 | 34 | ||
35 | #include "at91_aic.h" | ||
36 | #include "board.h" | ||
39 | #include "sam9_smc.h" | 37 | #include "sam9_smc.h" |
40 | #include "generic.h" | 38 | #include "generic.h" |
39 | #include "gsia18s.h" | ||
40 | #include "stamp9g20.h" | ||
41 | 41 | ||
42 | static void __init gsia18s_init_early(void) | 42 | static void __init gsia18s_init_early(void) |
43 | { | 43 | { |
diff --git a/arch/arm/mach-at91/board-kafa.c b/arch/arm/mach-at91/board-kafa.c index 86050da3ba53..9a43d1e1a037 100644 --- a/arch/arm/mach-at91/board-kafa.c +++ b/arch/arm/mach-at91/board-kafa.c | |||
@@ -34,10 +34,10 @@ | |||
34 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
35 | #include <asm/mach/irq.h> | 35 | #include <asm/mach/irq.h> |
36 | 36 | ||
37 | #include <mach/board.h> | ||
38 | #include <mach/at91_aic.h> | ||
39 | #include <mach/cpu.h> | 37 | #include <mach/cpu.h> |
40 | 38 | ||
39 | #include "at91_aic.h" | ||
40 | #include "board.h" | ||
41 | #include "generic.h" | 41 | #include "generic.h" |
42 | 42 | ||
43 | 43 | ||
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c index abe9fed7a3e0..f168bec2369f 100644 --- a/arch/arm/mach-at91/board-kb9202.c +++ b/arch/arm/mach-at91/board-kb9202.c | |||
@@ -35,12 +35,12 @@ | |||
35 | #include <asm/mach/map.h> | 35 | #include <asm/mach/map.h> |
36 | #include <asm/mach/irq.h> | 36 | #include <asm/mach/irq.h> |
37 | 37 | ||
38 | #include <mach/board.h> | ||
39 | #include <mach/cpu.h> | 38 | #include <mach/cpu.h> |
40 | #include <mach/at91_aic.h> | ||
41 | #include <mach/at91rm9200_mc.h> | 39 | #include <mach/at91rm9200_mc.h> |
42 | #include <mach/at91_ramc.h> | 40 | #include <mach/at91_ramc.h> |
43 | 41 | ||
42 | #include "at91_aic.h" | ||
43 | #include "board.h" | ||
44 | #include "generic.h" | 44 | #include "generic.h" |
45 | 45 | ||
46 | 46 | ||
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c index 6960778af4c2..bc7a1c4a1f6a 100644 --- a/arch/arm/mach-at91/board-neocore926.c +++ b/arch/arm/mach-at91/board-neocore926.c | |||
@@ -44,10 +44,10 @@ | |||
44 | #include <asm/mach/irq.h> | 44 | #include <asm/mach/irq.h> |
45 | 45 | ||
46 | #include <mach/hardware.h> | 46 | #include <mach/hardware.h> |
47 | #include <mach/board.h> | ||
48 | #include <mach/at91_aic.h> | ||
49 | #include <mach/at91sam9_smc.h> | 47 | #include <mach/at91sam9_smc.h> |
50 | 48 | ||
49 | #include "at91_aic.h" | ||
50 | #include "board.h" | ||
51 | #include "sam9_smc.h" | 51 | #include "sam9_smc.h" |
52 | #include "generic.h" | 52 | #include "generic.h" |
53 | 53 | ||
diff --git a/arch/arm/mach-at91/board-pcontrol-g20.c b/arch/arm/mach-at91/board-pcontrol-g20.c index 9ca3e32c54cb..0299554495dd 100644 --- a/arch/arm/mach-at91/board-pcontrol-g20.c +++ b/arch/arm/mach-at91/board-pcontrol-g20.c | |||
@@ -29,13 +29,13 @@ | |||
29 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
31 | 31 | ||
32 | #include <mach/board.h> | ||
33 | #include <mach/at91_aic.h> | ||
34 | #include <mach/at91sam9_smc.h> | 32 | #include <mach/at91sam9_smc.h> |
35 | #include <mach/stamp9g20.h> | ||
36 | 33 | ||
34 | #include "at91_aic.h" | ||
35 | #include "board.h" | ||
37 | #include "sam9_smc.h" | 36 | #include "sam9_smc.h" |
38 | #include "generic.h" | 37 | #include "generic.h" |
38 | #include "stamp9g20.h" | ||
39 | 39 | ||
40 | 40 | ||
41 | static void __init pcontrol_g20_init_early(void) | 41 | static void __init pcontrol_g20_init_early(void) |
diff --git a/arch/arm/mach-at91/board-picotux200.c b/arch/arm/mach-at91/board-picotux200.c index f83e1de699e6..4938f1cd5e13 100644 --- a/arch/arm/mach-at91/board-picotux200.c +++ b/arch/arm/mach-at91/board-picotux200.c | |||
@@ -37,11 +37,11 @@ | |||
37 | #include <asm/mach/map.h> | 37 | #include <asm/mach/map.h> |
38 | #include <asm/mach/irq.h> | 38 | #include <asm/mach/irq.h> |
39 | 39 | ||
40 | #include <mach/board.h> | ||
41 | #include <mach/at91_aic.h> | ||
42 | #include <mach/at91rm9200_mc.h> | 40 | #include <mach/at91rm9200_mc.h> |
43 | #include <mach/at91_ramc.h> | 41 | #include <mach/at91_ramc.h> |
44 | 42 | ||
43 | #include "at91_aic.h" | ||
44 | #include "board.h" | ||
45 | #include "generic.h" | 45 | #include "generic.h" |
46 | 46 | ||
47 | 47 | ||
diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c index 799f214edebe..33b1628467ea 100644 --- a/arch/arm/mach-at91/board-qil-a9260.c +++ b/arch/arm/mach-at91/board-qil-a9260.c | |||
@@ -40,11 +40,11 @@ | |||
40 | #include <asm/mach/irq.h> | 40 | #include <asm/mach/irq.h> |
41 | 41 | ||
42 | #include <mach/hardware.h> | 42 | #include <mach/hardware.h> |
43 | #include <mach/board.h> | ||
44 | #include <mach/at91_aic.h> | ||
45 | #include <mach/at91sam9_smc.h> | 43 | #include <mach/at91sam9_smc.h> |
46 | #include <mach/at91_shdwc.h> | ||
47 | 44 | ||
45 | #include "at91_aic.h" | ||
46 | #include "at91_shdwc.h" | ||
47 | #include "board.h" | ||
48 | #include "sam9_smc.h" | 48 | #include "sam9_smc.h" |
49 | #include "generic.h" | 49 | #include "generic.h" |
50 | 50 | ||
diff --git a/arch/arm/mach-at91/board-rm9200-dt.c b/arch/arm/mach-at91/board-rm9200-dt.c new file mode 100644 index 000000000000..5f9ce3da3fde --- /dev/null +++ b/arch/arm/mach-at91/board-rm9200-dt.c | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * Setup code for AT91RM9200 Evaluation Kits with Device Tree support | ||
3 | * | ||
4 | * Copyright (C) 2011 Atmel, | ||
5 | * 2011 Nicolas Ferre <nicolas.ferre@atmel.com> | ||
6 | * 2012 Joachim Eastwood <manabian@gmail.com> | ||
7 | * | ||
8 | * Licensed under GPLv2 or later. | ||
9 | */ | ||
10 | |||
11 | #include <linux/types.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/gpio.h> | ||
15 | #include <linux/of.h> | ||
16 | #include <linux/of_irq.h> | ||
17 | #include <linux/of_platform.h> | ||
18 | |||
19 | #include <asm/setup.h> | ||
20 | #include <asm/irq.h> | ||
21 | #include <asm/mach/arch.h> | ||
22 | #include <asm/mach/map.h> | ||
23 | #include <asm/mach/irq.h> | ||
24 | |||
25 | #include "at91_aic.h" | ||
26 | #include "generic.h" | ||
27 | |||
28 | |||
29 | static const struct of_device_id irq_of_match[] __initconst = { | ||
30 | { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init }, | ||
31 | { /*sentinel*/ } | ||
32 | }; | ||
33 | |||
34 | static void __init at91rm9200_dt_init_irq(void) | ||
35 | { | ||
36 | of_irq_init(irq_of_match); | ||
37 | } | ||
38 | |||
39 | static void __init at91rm9200_dt_device_init(void) | ||
40 | { | ||
41 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
42 | } | ||
43 | |||
44 | static const char *at91rm9200_dt_board_compat[] __initdata = { | ||
45 | "atmel,at91rm9200", | ||
46 | NULL | ||
47 | }; | ||
48 | |||
49 | DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200 (Device Tree)") | ||
50 | .timer = &at91rm9200_timer, | ||
51 | .map_io = at91_map_io, | ||
52 | .handle_irq = at91_aic_handle_irq, | ||
53 | .init_early = at91rm9200_dt_initialize, | ||
54 | .init_irq = at91rm9200_dt_init_irq, | ||
55 | .init_machine = at91rm9200_dt_device_init, | ||
56 | .dt_compat = at91rm9200_dt_board_compat, | ||
57 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c index 66338e7ebfba..9e5061bef0d0 100644 --- a/arch/arm/mach-at91/board-rm9200dk.c +++ b/arch/arm/mach-at91/board-rm9200dk.c | |||
@@ -39,11 +39,11 @@ | |||
39 | #include <asm/mach/irq.h> | 39 | #include <asm/mach/irq.h> |
40 | 40 | ||
41 | #include <mach/hardware.h> | 41 | #include <mach/hardware.h> |
42 | #include <mach/board.h> | ||
43 | #include <mach/at91_aic.h> | ||
44 | #include <mach/at91rm9200_mc.h> | 42 | #include <mach/at91rm9200_mc.h> |
45 | #include <mach/at91_ramc.h> | 43 | #include <mach/at91_ramc.h> |
46 | 44 | ||
45 | #include "at91_aic.h" | ||
46 | #include "board.h" | ||
47 | #include "generic.h" | 47 | #include "generic.h" |
48 | 48 | ||
49 | 49 | ||
diff --git a/arch/arm/mach-at91/board-rm9200ek.c b/arch/arm/mach-at91/board-rm9200ek.c index 5d1b5729dc69..58277dbc718f 100644 --- a/arch/arm/mach-at91/board-rm9200ek.c +++ b/arch/arm/mach-at91/board-rm9200ek.c | |||
@@ -39,11 +39,11 @@ | |||
39 | #include <asm/mach/irq.h> | 39 | #include <asm/mach/irq.h> |
40 | 40 | ||
41 | #include <mach/hardware.h> | 41 | #include <mach/hardware.h> |
42 | #include <mach/board.h> | ||
43 | #include <mach/at91_aic.h> | ||
44 | #include <mach/at91rm9200_mc.h> | 42 | #include <mach/at91rm9200_mc.h> |
45 | #include <mach/at91_ramc.h> | 43 | #include <mach/at91_ramc.h> |
46 | 44 | ||
45 | #include "at91_aic.h" | ||
46 | #include "board.h" | ||
47 | #include "generic.h" | 47 | #include "generic.h" |
48 | 48 | ||
49 | 49 | ||
diff --git a/arch/arm/mach-at91/board-rsi-ews.c b/arch/arm/mach-at91/board-rsi-ews.c index a0ecf04e9ae3..2e8b8339a206 100644 --- a/arch/arm/mach-at91/board-rsi-ews.c +++ b/arch/arm/mach-at91/board-rsi-ews.c | |||
@@ -25,11 +25,11 @@ | |||
25 | #include <asm/mach/irq.h> | 25 | #include <asm/mach/irq.h> |
26 | 26 | ||
27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
28 | #include <mach/board.h> | ||
29 | #include <mach/at91_aic.h> | ||
30 | 28 | ||
31 | #include <linux/gpio.h> | 29 | #include <linux/gpio.h> |
32 | 30 | ||
31 | #include "at91_aic.h" | ||
32 | #include "board.h" | ||
33 | #include "generic.h" | 33 | #include "generic.h" |
34 | 34 | ||
35 | static void __init rsi_ews_init_early(void) | 35 | static void __init rsi_ews_init_early(void) |
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c index c5f01acce3c0..b75fbf6003a1 100644 --- a/arch/arm/mach-at91/board-sam9-l9260.c +++ b/arch/arm/mach-at91/board-sam9-l9260.c | |||
@@ -37,10 +37,10 @@ | |||
37 | #include <asm/mach/map.h> | 37 | #include <asm/mach/map.h> |
38 | #include <asm/mach/irq.h> | 38 | #include <asm/mach/irq.h> |
39 | 39 | ||
40 | #include <mach/board.h> | ||
41 | #include <mach/at91_aic.h> | ||
42 | #include <mach/at91sam9_smc.h> | 40 | #include <mach/at91sam9_smc.h> |
43 | 41 | ||
42 | #include "at91_aic.h" | ||
43 | #include "board.h" | ||
44 | #include "sam9_smc.h" | 44 | #include "sam9_smc.h" |
45 | #include "generic.h" | 45 | #include "generic.h" |
46 | 46 | ||
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c index 8cd6e679fbe0..f0135cd1d858 100644 --- a/arch/arm/mach-at91/board-sam9260ek.c +++ b/arch/arm/mach-at91/board-sam9260ek.c | |||
@@ -41,12 +41,12 @@ | |||
41 | #include <asm/mach/irq.h> | 41 | #include <asm/mach/irq.h> |
42 | 42 | ||
43 | #include <mach/hardware.h> | 43 | #include <mach/hardware.h> |
44 | #include <mach/board.h> | ||
45 | #include <mach/at91_aic.h> | ||
46 | #include <mach/at91sam9_smc.h> | 44 | #include <mach/at91sam9_smc.h> |
47 | #include <mach/at91_shdwc.h> | ||
48 | #include <mach/system_rev.h> | 45 | #include <mach/system_rev.h> |
49 | 46 | ||
47 | #include "at91_aic.h" | ||
48 | #include "at91_shdwc.h" | ||
49 | #include "board.h" | ||
50 | #include "sam9_smc.h" | 50 | #include "sam9_smc.h" |
51 | #include "generic.h" | 51 | #include "generic.h" |
52 | 52 | ||
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index a9167dd45f96..13ebaa8e4100 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c | |||
@@ -45,12 +45,12 @@ | |||
45 | #include <asm/mach/irq.h> | 45 | #include <asm/mach/irq.h> |
46 | 46 | ||
47 | #include <mach/hardware.h> | 47 | #include <mach/hardware.h> |
48 | #include <mach/board.h> | ||
49 | #include <mach/at91_aic.h> | ||
50 | #include <mach/at91sam9_smc.h> | 48 | #include <mach/at91sam9_smc.h> |
51 | #include <mach/at91_shdwc.h> | ||
52 | #include <mach/system_rev.h> | 49 | #include <mach/system_rev.h> |
53 | 50 | ||
51 | #include "at91_aic.h" | ||
52 | #include "at91_shdwc.h" | ||
53 | #include "board.h" | ||
54 | #include "sam9_smc.h" | 54 | #include "sam9_smc.h" |
55 | #include "generic.h" | 55 | #include "generic.h" |
56 | 56 | ||
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index b87dbe2be0d6..89b9608742a7 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c | |||
@@ -44,12 +44,12 @@ | |||
44 | #include <asm/mach/irq.h> | 44 | #include <asm/mach/irq.h> |
45 | 45 | ||
46 | #include <mach/hardware.h> | 46 | #include <mach/hardware.h> |
47 | #include <mach/board.h> | ||
48 | #include <mach/at91_aic.h> | ||
49 | #include <mach/at91sam9_smc.h> | 47 | #include <mach/at91sam9_smc.h> |
50 | #include <mach/at91_shdwc.h> | ||
51 | #include <mach/system_rev.h> | 48 | #include <mach/system_rev.h> |
52 | 49 | ||
50 | #include "at91_aic.h" | ||
51 | #include "at91_shdwc.h" | ||
52 | #include "board.h" | ||
53 | #include "sam9_smc.h" | 53 | #include "sam9_smc.h" |
54 | #include "generic.h" | 54 | #include "generic.h" |
55 | 55 | ||
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c index 3ab2b86a3762..7b5123802368 100644 --- a/arch/arm/mach-at91/board-sam9g20ek.c +++ b/arch/arm/mach-at91/board-sam9g20ek.c | |||
@@ -43,11 +43,11 @@ | |||
43 | #include <asm/mach/map.h> | 43 | #include <asm/mach/map.h> |
44 | #include <asm/mach/irq.h> | 44 | #include <asm/mach/irq.h> |
45 | 45 | ||
46 | #include <mach/board.h> | ||
47 | #include <mach/at91_aic.h> | ||
48 | #include <mach/at91sam9_smc.h> | 46 | #include <mach/at91sam9_smc.h> |
49 | #include <mach/system_rev.h> | 47 | #include <mach/system_rev.h> |
50 | 48 | ||
49 | #include "at91_aic.h" | ||
50 | #include "board.h" | ||
51 | #include "sam9_smc.h" | 51 | #include "sam9_smc.h" |
52 | #include "generic.h" | 52 | #include "generic.h" |
53 | 53 | ||
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c index 3d48ec154685..e4cc375e3a32 100644 --- a/arch/arm/mach-at91/board-sam9m10g45ek.c +++ b/arch/arm/mach-at91/board-sam9m10g45ek.c | |||
@@ -42,12 +42,12 @@ | |||
42 | #include <asm/mach/map.h> | 42 | #include <asm/mach/map.h> |
43 | #include <asm/mach/irq.h> | 43 | #include <asm/mach/irq.h> |
44 | 44 | ||
45 | #include <mach/board.h> | ||
46 | #include <mach/at91_aic.h> | ||
47 | #include <mach/at91sam9_smc.h> | 45 | #include <mach/at91sam9_smc.h> |
48 | #include <mach/at91_shdwc.h> | ||
49 | #include <mach/system_rev.h> | 46 | #include <mach/system_rev.h> |
50 | 47 | ||
48 | #include "at91_aic.h" | ||
49 | #include "at91_shdwc.h" | ||
50 | #include "board.h" | ||
51 | #include "sam9_smc.h" | 51 | #include "sam9_smc.h" |
52 | #include "generic.h" | 52 | #include "generic.h" |
53 | 53 | ||
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index fb89ea92e3f2..377a1097afa7 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c | |||
@@ -30,11 +30,12 @@ | |||
30 | #include <asm/mach/irq.h> | 30 | #include <asm/mach/irq.h> |
31 | 31 | ||
32 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
33 | #include <mach/board.h> | ||
34 | #include <mach/at91_aic.h> | ||
35 | #include <mach/at91sam9_smc.h> | 33 | #include <mach/at91sam9_smc.h> |
36 | #include <mach/at91_shdwc.h> | ||
37 | 34 | ||
35 | |||
36 | #include "at91_aic.h" | ||
37 | #include "at91_shdwc.h" | ||
38 | #include "board.h" | ||
38 | #include "sam9_smc.h" | 39 | #include "sam9_smc.h" |
39 | #include "generic.h" | 40 | #include "generic.h" |
40 | 41 | ||
diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c index a4e031a039fd..98771500ddb9 100644 --- a/arch/arm/mach-at91/board-snapper9260.c +++ b/arch/arm/mach-at91/board-snapper9260.c | |||
@@ -32,10 +32,10 @@ | |||
32 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
33 | 33 | ||
34 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
35 | #include <mach/board.h> | ||
36 | #include <mach/at91_aic.h> | ||
37 | #include <mach/at91sam9_smc.h> | 35 | #include <mach/at91sam9_smc.h> |
38 | 36 | ||
37 | #include "at91_aic.h" | ||
38 | #include "board.h" | ||
39 | #include "sam9_smc.h" | 39 | #include "sam9_smc.h" |
40 | #include "generic.h" | 40 | #include "generic.h" |
41 | 41 | ||
diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c index c3fb31d5116e..48a962b61fa3 100644 --- a/arch/arm/mach-at91/board-stamp9g20.c +++ b/arch/arm/mach-at91/board-stamp9g20.c | |||
@@ -25,10 +25,10 @@ | |||
25 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
26 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
27 | 27 | ||
28 | #include <mach/board.h> | ||
29 | #include <mach/at91_aic.h> | ||
30 | #include <mach/at91sam9_smc.h> | 28 | #include <mach/at91sam9_smc.h> |
31 | 29 | ||
30 | #include "at91_aic.h" | ||
31 | #include "board.h" | ||
32 | #include "sam9_smc.h" | 32 | #include "sam9_smc.h" |
33 | #include "generic.h" | 33 | #include "generic.h" |
34 | 34 | ||
diff --git a/arch/arm/mach-at91/board-usb-a926x.c b/arch/arm/mach-at91/board-usb-a926x.c index 6ea069b57335..c1060f96e589 100644 --- a/arch/arm/mach-at91/board-usb-a926x.c +++ b/arch/arm/mach-at91/board-usb-a926x.c | |||
@@ -41,11 +41,11 @@ | |||
41 | #include <asm/mach/irq.h> | 41 | #include <asm/mach/irq.h> |
42 | 42 | ||
43 | #include <mach/hardware.h> | 43 | #include <mach/hardware.h> |
44 | #include <mach/board.h> | ||
45 | #include <mach/at91_aic.h> | ||
46 | #include <mach/at91sam9_smc.h> | 44 | #include <mach/at91sam9_smc.h> |
47 | #include <mach/at91_shdwc.h> | ||
48 | 45 | ||
46 | #include "at91_aic.h" | ||
47 | #include "at91_shdwc.h" | ||
48 | #include "board.h" | ||
49 | #include "sam9_smc.h" | 49 | #include "sam9_smc.h" |
50 | #include "generic.h" | 50 | #include "generic.h" |
51 | 51 | ||
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c index f162fdfd66eb..8673aebcb85d 100644 --- a/arch/arm/mach-at91/board-yl-9200.c +++ b/arch/arm/mach-at91/board-yl-9200.c | |||
@@ -43,12 +43,12 @@ | |||
43 | #include <asm/mach/irq.h> | 43 | #include <asm/mach/irq.h> |
44 | 44 | ||
45 | #include <mach/hardware.h> | 45 | #include <mach/hardware.h> |
46 | #include <mach/board.h> | ||
47 | #include <mach/at91_aic.h> | ||
48 | #include <mach/at91rm9200_mc.h> | 46 | #include <mach/at91rm9200_mc.h> |
49 | #include <mach/at91_ramc.h> | 47 | #include <mach/at91_ramc.h> |
50 | #include <mach/cpu.h> | 48 | #include <mach/cpu.h> |
51 | 49 | ||
50 | #include "at91_aic.h" | ||
51 | #include "board.h" | ||
52 | #include "generic.h" | 52 | #include "generic.h" |
53 | 53 | ||
54 | 54 | ||
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/board.h index c55a4364ffb4..4a234fb2ab3b 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/board.h | |||
@@ -31,71 +31,24 @@ | |||
31 | #ifndef __ASM_ARCH_BOARD_H | 31 | #ifndef __ASM_ARCH_BOARD_H |
32 | #define __ASM_ARCH_BOARD_H | 32 | #define __ASM_ARCH_BOARD_H |
33 | 33 | ||
34 | #include <linux/mtd/partitions.h> | ||
35 | #include <linux/device.h> | ||
36 | #include <linux/i2c.h> | ||
37 | #include <linux/leds.h> | ||
38 | #include <linux/spi/spi.h> | ||
39 | #include <linux/usb/atmel_usba_udc.h> | ||
40 | #include <linux/atmel-mci.h> | ||
41 | #include <sound/atmel-ac97c.h> | ||
42 | #include <linux/serial.h> | ||
43 | #include <linux/platform_data/macb.h> | ||
44 | #include <linux/platform_data/atmel.h> | 34 | #include <linux/platform_data/atmel.h> |
45 | 35 | ||
46 | /* USB Device */ | 36 | /* USB Device */ |
47 | struct at91_udc_data { | ||
48 | int vbus_pin; /* high == host powering us */ | ||
49 | u8 vbus_active_low; /* vbus polarity */ | ||
50 | u8 vbus_polled; /* Use polling, not interrupt */ | ||
51 | int pullup_pin; /* active == D+ pulled up */ | ||
52 | u8 pullup_active_low; /* true == pullup_pin is active low */ | ||
53 | }; | ||
54 | extern void __init at91_add_device_udc(struct at91_udc_data *data); | 37 | extern void __init at91_add_device_udc(struct at91_udc_data *data); |
55 | 38 | ||
56 | /* USB High Speed Device */ | 39 | /* USB High Speed Device */ |
57 | extern void __init at91_add_device_usba(struct usba_platform_data *data); | 40 | extern void __init at91_add_device_usba(struct usba_platform_data *data); |
58 | 41 | ||
59 | /* Compact Flash */ | 42 | /* Compact Flash */ |
60 | struct at91_cf_data { | ||
61 | int irq_pin; /* I/O IRQ */ | ||
62 | int det_pin; /* Card detect */ | ||
63 | int vcc_pin; /* power switching */ | ||
64 | int rst_pin; /* card reset */ | ||
65 | u8 chipselect; /* EBI Chip Select number */ | ||
66 | u8 flags; | ||
67 | #define AT91_CF_TRUE_IDE 0x01 | ||
68 | #define AT91_IDE_SWAP_A0_A2 0x02 | ||
69 | }; | ||
70 | extern void __init at91_add_device_cf(struct at91_cf_data *data); | 43 | extern void __init at91_add_device_cf(struct at91_cf_data *data); |
71 | 44 | ||
72 | /* MMC / SD */ | 45 | /* MMC / SD */ |
73 | /* at91_mci platform config */ | ||
74 | struct at91_mmc_data { | ||
75 | int det_pin; /* card detect IRQ */ | ||
76 | unsigned slot_b:1; /* uses Slot B */ | ||
77 | unsigned wire4:1; /* (SD) supports DAT0..DAT3 */ | ||
78 | int wp_pin; /* (SD) writeprotect detect */ | ||
79 | int vcc_pin; /* power switching (high == on) */ | ||
80 | }; | ||
81 | extern void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data); | ||
82 | |||
83 | /* atmel-mci platform config */ | 46 | /* atmel-mci platform config */ |
84 | extern void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data); | 47 | extern void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data); |
85 | 48 | ||
86 | extern void __init at91_add_device_eth(struct macb_platform_data *data); | 49 | extern void __init at91_add_device_eth(struct macb_platform_data *data); |
87 | 50 | ||
88 | /* USB Host */ | 51 | /* USB Host */ |
89 | #define AT91_MAX_USBH_PORTS 3 | ||
90 | struct at91_usbh_data { | ||
91 | int vbus_pin[AT91_MAX_USBH_PORTS]; /* port power-control pin */ | ||
92 | int overcurrent_pin[AT91_MAX_USBH_PORTS]; | ||
93 | u8 ports; /* number of ports on root hub */ | ||
94 | u8 overcurrent_supported; | ||
95 | u8 vbus_pin_active_low[AT91_MAX_USBH_PORTS]; | ||
96 | u8 overcurrent_status[AT91_MAX_USBH_PORTS]; | ||
97 | u8 overcurrent_changed[AT91_MAX_USBH_PORTS]; | ||
98 | }; | ||
99 | extern void __init at91_add_device_usbh(struct at91_usbh_data *data); | 52 | extern void __init at91_add_device_usbh(struct at91_usbh_data *data); |
100 | extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data); | 53 | extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data); |
101 | extern void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data); | 54 | extern void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data); |
@@ -124,13 +77,6 @@ extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pin | |||
124 | 77 | ||
125 | extern struct platform_device *atmel_default_console_device; | 78 | extern struct platform_device *atmel_default_console_device; |
126 | 79 | ||
127 | struct atmel_uart_data { | ||
128 | int num; /* port num */ | ||
129 | short use_dma_tx; /* use transmit DMA? */ | ||
130 | short use_dma_rx; /* use receive DMA? */ | ||
131 | void __iomem *regs; /* virt. base address, if any */ | ||
132 | struct serial_rs485 rs485; /* rs485 settings */ | ||
133 | }; | ||
134 | extern void __init at91_add_device_serial(void); | 80 | extern void __init at91_add_device_serial(void); |
135 | 81 | ||
136 | /* | 82 | /* |
@@ -173,24 +119,13 @@ extern void __init at91_add_device_isi(struct isi_platform_data *data, | |||
173 | bool use_pck_as_mck); | 119 | bool use_pck_as_mck); |
174 | 120 | ||
175 | /* Touchscreen Controller */ | 121 | /* Touchscreen Controller */ |
176 | struct at91_tsadcc_data { | ||
177 | unsigned int adc_clock; | ||
178 | u8 pendet_debounce; | ||
179 | u8 ts_sample_hold_time; | ||
180 | }; | ||
181 | extern void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data); | 122 | extern void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data); |
182 | 123 | ||
183 | /* CAN */ | 124 | /* CAN */ |
184 | struct at91_can_data { | ||
185 | void (*transceiver_switch)(int on); | ||
186 | }; | ||
187 | extern void __init at91_add_device_can(struct at91_can_data *data); | 125 | extern void __init at91_add_device_can(struct at91_can_data *data); |
188 | 126 | ||
189 | /* LEDs */ | 127 | /* LEDs */ |
190 | extern void __init at91_gpio_leds(struct gpio_led *leds, int nr); | 128 | extern void __init at91_gpio_leds(struct gpio_led *leds, int nr); |
191 | extern void __init at91_pwm_leds(struct gpio_led *leds, int nr); | 129 | extern void __init at91_pwm_leds(struct gpio_led *leds, int nr); |
192 | 130 | ||
193 | /* FIXME: this needs a better location, but gets stuff building again */ | ||
194 | extern int at91_suspend_entering_slow_clock(void); | ||
195 | |||
196 | #endif | 131 | #endif |
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index b62f560e6c75..fc593d615e7d 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -20,6 +20,7 @@ extern void __init at91_init_sram(int bank, unsigned long base, | |||
20 | extern void __init at91rm9200_set_type(int type); | 20 | extern void __init at91rm9200_set_type(int type); |
21 | extern void __init at91_initialize(unsigned long main_clock); | 21 | extern void __init at91_initialize(unsigned long main_clock); |
22 | extern void __init at91x40_initialize(unsigned long main_clock); | 22 | extern void __init at91x40_initialize(unsigned long main_clock); |
23 | extern void __init at91rm9200_dt_initialize(void); | ||
23 | extern void __init at91_dt_initialize(void); | 24 | extern void __init at91_dt_initialize(void); |
24 | 25 | ||
25 | /* Interrupts */ | 26 | /* Interrupts */ |
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c index be42cf0e74bd..c5d7e1e9d757 100644 --- a/arch/arm/mach-at91/gpio.c +++ b/arch/arm/mach-at91/gpio.c | |||
@@ -23,8 +23,6 @@ | |||
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/irqdomain.h> | 24 | #include <linux/irqdomain.h> |
25 | #include <linux/of_address.h> | 25 | #include <linux/of_address.h> |
26 | #include <linux/of_irq.h> | ||
27 | #include <linux/of_gpio.h> | ||
28 | 26 | ||
29 | #include <asm/mach/irq.h> | 27 | #include <asm/mach/irq.h> |
30 | 28 | ||
@@ -33,6 +31,8 @@ | |||
33 | 31 | ||
34 | #include "generic.h" | 32 | #include "generic.h" |
35 | 33 | ||
34 | #define MAX_NB_GPIO_PER_BANK 32 | ||
35 | |||
36 | struct at91_gpio_chip { | 36 | struct at91_gpio_chip { |
37 | struct gpio_chip chip; | 37 | struct gpio_chip chip; |
38 | struct at91_gpio_chip *next; /* Bank sharing same clock */ | 38 | struct at91_gpio_chip *next; /* Bank sharing same clock */ |
@@ -46,6 +46,7 @@ struct at91_gpio_chip { | |||
46 | 46 | ||
47 | #define to_at91_gpio_chip(c) container_of(c, struct at91_gpio_chip, chip) | 47 | #define to_at91_gpio_chip(c) container_of(c, struct at91_gpio_chip, chip) |
48 | 48 | ||
49 | static int at91_gpiolib_request(struct gpio_chip *chip, unsigned offset); | ||
49 | static void at91_gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip); | 50 | static void at91_gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip); |
50 | static void at91_gpiolib_set(struct gpio_chip *chip, unsigned offset, int val); | 51 | static void at91_gpiolib_set(struct gpio_chip *chip, unsigned offset, int val); |
51 | static int at91_gpiolib_get(struct gpio_chip *chip, unsigned offset); | 52 | static int at91_gpiolib_get(struct gpio_chip *chip, unsigned offset); |
@@ -55,26 +56,27 @@ static int at91_gpiolib_direction_input(struct gpio_chip *chip, | |||
55 | unsigned offset); | 56 | unsigned offset); |
56 | static int at91_gpiolib_to_irq(struct gpio_chip *chip, unsigned offset); | 57 | static int at91_gpiolib_to_irq(struct gpio_chip *chip, unsigned offset); |
57 | 58 | ||
58 | #define AT91_GPIO_CHIP(name, nr_gpio) \ | 59 | #define AT91_GPIO_CHIP(name) \ |
59 | { \ | 60 | { \ |
60 | .chip = { \ | 61 | .chip = { \ |
61 | .label = name, \ | 62 | .label = name, \ |
63 | .request = at91_gpiolib_request, \ | ||
62 | .direction_input = at91_gpiolib_direction_input, \ | 64 | .direction_input = at91_gpiolib_direction_input, \ |
63 | .direction_output = at91_gpiolib_direction_output, \ | 65 | .direction_output = at91_gpiolib_direction_output, \ |
64 | .get = at91_gpiolib_get, \ | 66 | .get = at91_gpiolib_get, \ |
65 | .set = at91_gpiolib_set, \ | 67 | .set = at91_gpiolib_set, \ |
66 | .dbg_show = at91_gpiolib_dbg_show, \ | 68 | .dbg_show = at91_gpiolib_dbg_show, \ |
67 | .to_irq = at91_gpiolib_to_irq, \ | 69 | .to_irq = at91_gpiolib_to_irq, \ |
68 | .ngpio = nr_gpio, \ | 70 | .ngpio = MAX_NB_GPIO_PER_BANK, \ |
69 | }, \ | 71 | }, \ |
70 | } | 72 | } |
71 | 73 | ||
72 | static struct at91_gpio_chip gpio_chip[] = { | 74 | static struct at91_gpio_chip gpio_chip[] = { |
73 | AT91_GPIO_CHIP("pioA", 32), | 75 | AT91_GPIO_CHIP("pioA"), |
74 | AT91_GPIO_CHIP("pioB", 32), | 76 | AT91_GPIO_CHIP("pioB"), |
75 | AT91_GPIO_CHIP("pioC", 32), | 77 | AT91_GPIO_CHIP("pioC"), |
76 | AT91_GPIO_CHIP("pioD", 32), | 78 | AT91_GPIO_CHIP("pioD"), |
77 | AT91_GPIO_CHIP("pioE", 32), | 79 | AT91_GPIO_CHIP("pioE"), |
78 | }; | 80 | }; |
79 | 81 | ||
80 | static int gpio_banks; | 82 | static int gpio_banks; |
@@ -89,7 +91,7 @@ static unsigned long at91_gpio_caps; | |||
89 | 91 | ||
90 | static inline void __iomem *pin_to_controller(unsigned pin) | 92 | static inline void __iomem *pin_to_controller(unsigned pin) |
91 | { | 93 | { |
92 | pin /= 32; | 94 | pin /= MAX_NB_GPIO_PER_BANK; |
93 | if (likely(pin < gpio_banks)) | 95 | if (likely(pin < gpio_banks)) |
94 | return gpio_chip[pin].regbase; | 96 | return gpio_chip[pin].regbase; |
95 | 97 | ||
@@ -98,7 +100,7 @@ static inline void __iomem *pin_to_controller(unsigned pin) | |||
98 | 100 | ||
99 | static inline unsigned pin_to_mask(unsigned pin) | 101 | static inline unsigned pin_to_mask(unsigned pin) |
100 | { | 102 | { |
101 | return 1 << (pin % 32); | 103 | return 1 << (pin % MAX_NB_GPIO_PER_BANK); |
102 | } | 104 | } |
103 | 105 | ||
104 | 106 | ||
@@ -713,80 +715,6 @@ postcore_initcall(at91_gpio_debugfs_init); | |||
713 | */ | 715 | */ |
714 | static struct lock_class_key gpio_lock_class; | 716 | static struct lock_class_key gpio_lock_class; |
715 | 717 | ||
716 | #if defined(CONFIG_OF) | ||
717 | static int at91_gpio_irq_map(struct irq_domain *h, unsigned int virq, | ||
718 | irq_hw_number_t hw) | ||
719 | { | ||
720 | struct at91_gpio_chip *at91_gpio = h->host_data; | ||
721 | |||
722 | irq_set_lockdep_class(virq, &gpio_lock_class); | ||
723 | |||
724 | /* | ||
725 | * Can use the "simple" and not "edge" handler since it's | ||
726 | * shorter, and the AIC handles interrupts sanely. | ||
727 | */ | ||
728 | irq_set_chip_and_handler(virq, &gpio_irqchip, | ||
729 | handle_simple_irq); | ||
730 | set_irq_flags(virq, IRQF_VALID); | ||
731 | irq_set_chip_data(virq, at91_gpio); | ||
732 | |||
733 | return 0; | ||
734 | } | ||
735 | |||
736 | static struct irq_domain_ops at91_gpio_ops = { | ||
737 | .map = at91_gpio_irq_map, | ||
738 | .xlate = irq_domain_xlate_twocell, | ||
739 | }; | ||
740 | |||
741 | int __init at91_gpio_of_irq_setup(struct device_node *node, | ||
742 | struct device_node *parent) | ||
743 | { | ||
744 | struct at91_gpio_chip *prev = NULL; | ||
745 | int alias_idx = of_alias_get_id(node, "gpio"); | ||
746 | struct at91_gpio_chip *at91_gpio = &gpio_chip[alias_idx]; | ||
747 | |||
748 | /* Setup proper .irq_set_type function */ | ||
749 | if (has_pio3()) | ||
750 | gpio_irqchip.irq_set_type = alt_gpio_irq_type; | ||
751 | else | ||
752 | gpio_irqchip.irq_set_type = gpio_irq_type; | ||
753 | |||
754 | /* Disable irqs of this PIO controller */ | ||
755 | __raw_writel(~0, at91_gpio->regbase + PIO_IDR); | ||
756 | |||
757 | /* Setup irq domain */ | ||
758 | at91_gpio->domain = irq_domain_add_linear(node, at91_gpio->chip.ngpio, | ||
759 | &at91_gpio_ops, at91_gpio); | ||
760 | if (!at91_gpio->domain) | ||
761 | panic("at91_gpio.%d: couldn't allocate irq domain (DT).\n", | ||
762 | at91_gpio->pioc_idx); | ||
763 | |||
764 | /* Setup chained handler */ | ||
765 | if (at91_gpio->pioc_idx) | ||
766 | prev = &gpio_chip[at91_gpio->pioc_idx - 1]; | ||
767 | |||
768 | /* The toplevel handler handles one bank of GPIOs, except | ||
769 | * on some SoC it can handles up to three... | ||
770 | * We only set up the handler for the first of the list. | ||
771 | */ | ||
772 | if (prev && prev->next == at91_gpio) | ||
773 | return 0; | ||
774 | |||
775 | at91_gpio->pioc_virq = irq_create_mapping(irq_find_host(parent), | ||
776 | at91_gpio->pioc_hwirq); | ||
777 | irq_set_chip_data(at91_gpio->pioc_virq, at91_gpio); | ||
778 | irq_set_chained_handler(at91_gpio->pioc_virq, gpio_irq_handler); | ||
779 | |||
780 | return 0; | ||
781 | } | ||
782 | #else | ||
783 | int __init at91_gpio_of_irq_setup(struct device_node *node, | ||
784 | struct device_node *parent) | ||
785 | { | ||
786 | return -EINVAL; | ||
787 | } | ||
788 | #endif | ||
789 | |||
790 | /* | 718 | /* |
791 | * irqdomain initialization: pile up irqdomains on top of AIC range | 719 | * irqdomain initialization: pile up irqdomains on top of AIC range |
792 | */ | 720 | */ |
@@ -862,6 +790,16 @@ void __init at91_gpio_irq_setup(void) | |||
862 | } | 790 | } |
863 | 791 | ||
864 | /* gpiolib support */ | 792 | /* gpiolib support */ |
793 | static int at91_gpiolib_request(struct gpio_chip *chip, unsigned offset) | ||
794 | { | ||
795 | struct at91_gpio_chip *at91_gpio = to_at91_gpio_chip(chip); | ||
796 | void __iomem *pio = at91_gpio->regbase; | ||
797 | unsigned mask = 1 << offset; | ||
798 | |||
799 | __raw_writel(mask, pio + PIO_PER); | ||
800 | return 0; | ||
801 | } | ||
802 | |||
865 | static int at91_gpiolib_direction_input(struct gpio_chip *chip, | 803 | static int at91_gpiolib_direction_input(struct gpio_chip *chip, |
866 | unsigned offset) | 804 | unsigned offset) |
867 | { | 805 | { |
@@ -975,81 +913,11 @@ err: | |||
975 | return -EINVAL; | 913 | return -EINVAL; |
976 | } | 914 | } |
977 | 915 | ||
978 | #ifdef CONFIG_OF_GPIO | ||
979 | static void __init of_at91_gpio_init_one(struct device_node *np) | ||
980 | { | ||
981 | int alias_idx; | ||
982 | struct at91_gpio_chip *at91_gpio; | ||
983 | |||
984 | if (!np) | ||
985 | return; | ||
986 | |||
987 | alias_idx = of_alias_get_id(np, "gpio"); | ||
988 | if (alias_idx >= MAX_GPIO_BANKS) { | ||
989 | pr_err("at91_gpio, failed alias idx(%d) > MAX_GPIO_BANKS(%d), ignoring.\n", | ||
990 | alias_idx, MAX_GPIO_BANKS); | ||
991 | return; | ||
992 | } | ||
993 | |||
994 | at91_gpio = &gpio_chip[alias_idx]; | ||
995 | at91_gpio->chip.base = alias_idx * at91_gpio->chip.ngpio; | ||
996 | |||
997 | at91_gpio->regbase = of_iomap(np, 0); | ||
998 | if (!at91_gpio->regbase) { | ||
999 | pr_err("at91_gpio.%d, failed to map registers, ignoring.\n", | ||
1000 | alias_idx); | ||
1001 | return; | ||
1002 | } | ||
1003 | |||
1004 | /* Get the interrupts property */ | ||
1005 | if (of_property_read_u32(np, "interrupts", &at91_gpio->pioc_hwirq)) { | ||
1006 | pr_err("at91_gpio.%d, failed to get interrupts property, ignoring.\n", | ||
1007 | alias_idx); | ||
1008 | goto ioremap_err; | ||
1009 | } | ||
1010 | |||
1011 | /* Get capabilities from compatibility property */ | ||
1012 | if (of_device_is_compatible(np, "atmel,at91sam9x5-gpio")) | ||
1013 | at91_gpio_caps |= AT91_GPIO_CAP_PIO3; | ||
1014 | |||
1015 | /* Setup clock */ | ||
1016 | if (at91_gpio_setup_clk(alias_idx)) | ||
1017 | goto ioremap_err; | ||
1018 | |||
1019 | at91_gpio->chip.of_node = np; | ||
1020 | gpio_banks = max(gpio_banks, alias_idx + 1); | ||
1021 | at91_gpio->pioc_idx = alias_idx; | ||
1022 | return; | ||
1023 | |||
1024 | ioremap_err: | ||
1025 | iounmap(at91_gpio->regbase); | ||
1026 | } | ||
1027 | |||
1028 | static int __init of_at91_gpio_init(void) | ||
1029 | { | ||
1030 | struct device_node *np = NULL; | ||
1031 | |||
1032 | /* | ||
1033 | * This isn't ideal, but it gets things hooked up until this | ||
1034 | * driver is converted into a platform_device | ||
1035 | */ | ||
1036 | for_each_compatible_node(np, NULL, "atmel,at91rm9200-gpio") | ||
1037 | of_at91_gpio_init_one(np); | ||
1038 | |||
1039 | return gpio_banks > 0 ? 0 : -EINVAL; | ||
1040 | } | ||
1041 | #else | ||
1042 | static int __init of_at91_gpio_init(void) | ||
1043 | { | ||
1044 | return -EINVAL; | ||
1045 | } | ||
1046 | #endif | ||
1047 | |||
1048 | static void __init at91_gpio_init_one(int idx, u32 regbase, int pioc_hwirq) | 916 | static void __init at91_gpio_init_one(int idx, u32 regbase, int pioc_hwirq) |
1049 | { | 917 | { |
1050 | struct at91_gpio_chip *at91_gpio = &gpio_chip[idx]; | 918 | struct at91_gpio_chip *at91_gpio = &gpio_chip[idx]; |
1051 | 919 | ||
1052 | at91_gpio->chip.base = idx * at91_gpio->chip.ngpio; | 920 | at91_gpio->chip.base = idx * MAX_NB_GPIO_PER_BANK; |
1053 | at91_gpio->pioc_hwirq = pioc_hwirq; | 921 | at91_gpio->pioc_hwirq = pioc_hwirq; |
1054 | at91_gpio->pioc_idx = idx; | 922 | at91_gpio->pioc_idx = idx; |
1055 | 923 | ||
@@ -1079,11 +947,11 @@ void __init at91_gpio_init(struct at91_gpio_bank *data, int nr_banks) | |||
1079 | 947 | ||
1080 | BUG_ON(nr_banks > MAX_GPIO_BANKS); | 948 | BUG_ON(nr_banks > MAX_GPIO_BANKS); |
1081 | 949 | ||
1082 | if (of_at91_gpio_init() < 0) { | 950 | if (of_have_populated_dt()) |
1083 | /* No GPIO controller found in device tree */ | 951 | return; |
1084 | for (i = 0; i < nr_banks; i++) | 952 | |
1085 | at91_gpio_init_one(i, data[i].regbase, data[i].id); | 953 | for (i = 0; i < nr_banks; i++) |
1086 | } | 954 | at91_gpio_init_one(i, data[i].regbase, data[i].id); |
1087 | 955 | ||
1088 | for (i = 0; i < gpio_banks; i++) { | 956 | for (i = 0; i < gpio_banks; i++) { |
1089 | at91_gpio = &gpio_chip[i]; | 957 | at91_gpio = &gpio_chip[i]; |
diff --git a/arch/arm/mach-at91/include/mach/gsia18s.h b/arch/arm/mach-at91/gsia18s.h index 307c194926f9..307c194926f9 100644 --- a/arch/arm/mach-at91/include/mach/gsia18s.h +++ b/arch/arm/mach-at91/gsia18s.h | |||
diff --git a/arch/arm/mach-at91/include/mach/at91_pit.h b/arch/arm/mach-at91/include/mach/at91_pit.h deleted file mode 100644 index d1f80ad7f4d4..000000000000 --- a/arch/arm/mach-at91/include/mach/at91_pit.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/include/mach/at91_pit.h | ||
3 | * | ||
4 | * Copyright (C) 2007 Andrew Victor | ||
5 | * Copyright (C) 2007 Atmel Corporation. | ||
6 | * | ||
7 | * Periodic Interval Timer (PIT) - System peripherals regsters. | ||
8 | * Based on AT91SAM9261 datasheet revision D. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91_PIT_H | ||
17 | #define AT91_PIT_H | ||
18 | |||
19 | #define AT91_PIT_MR 0x00 /* Mode Register */ | ||
20 | #define AT91_PIT_PITIEN (1 << 25) /* Timer Interrupt Enable */ | ||
21 | #define AT91_PIT_PITEN (1 << 24) /* Timer Enabled */ | ||
22 | #define AT91_PIT_PIV (0xfffff) /* Periodic Interval Value */ | ||
23 | |||
24 | #define AT91_PIT_SR 0x04 /* Status Register */ | ||
25 | #define AT91_PIT_PITS (1 << 0) /* Timer Status */ | ||
26 | |||
27 | #define AT91_PIT_PIVR 0x08 /* Periodic Interval Value Register */ | ||
28 | #define AT91_PIT_PIIR 0x0c /* Periodic Interval Image Register */ | ||
29 | #define AT91_PIT_PICNT (0xfff << 20) /* Interval Counter */ | ||
30 | #define AT91_PIT_CPIV (0xfffff) /* Inverval Value */ | ||
31 | |||
32 | #endif | ||
diff --git a/arch/arm/mach-at91/include/mach/at91_rtc.h b/arch/arm/mach-at91/include/mach/at91_rtc.h deleted file mode 100644 index da1945e5f714..000000000000 --- a/arch/arm/mach-at91/include/mach/at91_rtc.h +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/include/mach/at91_rtc.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * Real Time Clock (RTC) - System peripheral registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91_RTC_H | ||
17 | #define AT91_RTC_H | ||
18 | |||
19 | #define AT91_RTC_CR 0x00 /* Control Register */ | ||
20 | #define AT91_RTC_UPDTIM (1 << 0) /* Update Request Time Register */ | ||
21 | #define AT91_RTC_UPDCAL (1 << 1) /* Update Request Calendar Register */ | ||
22 | #define AT91_RTC_TIMEVSEL (3 << 8) /* Time Event Selection */ | ||
23 | #define AT91_RTC_TIMEVSEL_MINUTE (0 << 8) | ||
24 | #define AT91_RTC_TIMEVSEL_HOUR (1 << 8) | ||
25 | #define AT91_RTC_TIMEVSEL_DAY24 (2 << 8) | ||
26 | #define AT91_RTC_TIMEVSEL_DAY12 (3 << 8) | ||
27 | #define AT91_RTC_CALEVSEL (3 << 16) /* Calendar Event Selection */ | ||
28 | #define AT91_RTC_CALEVSEL_WEEK (0 << 16) | ||
29 | #define AT91_RTC_CALEVSEL_MONTH (1 << 16) | ||
30 | #define AT91_RTC_CALEVSEL_YEAR (2 << 16) | ||
31 | |||
32 | #define AT91_RTC_MR 0x04 /* Mode Register */ | ||
33 | #define AT91_RTC_HRMOD (1 << 0) /* 12/24 Hour Mode */ | ||
34 | |||
35 | #define AT91_RTC_TIMR 0x08 /* Time Register */ | ||
36 | #define AT91_RTC_SEC (0x7f << 0) /* Current Second */ | ||
37 | #define AT91_RTC_MIN (0x7f << 8) /* Current Minute */ | ||
38 | #define AT91_RTC_HOUR (0x3f << 16) /* Current Hour */ | ||
39 | #define AT91_RTC_AMPM (1 << 22) /* Ante Meridiem Post Meridiem Indicator */ | ||
40 | |||
41 | #define AT91_RTC_CALR 0x0c /* Calendar Register */ | ||
42 | #define AT91_RTC_CENT (0x7f << 0) /* Current Century */ | ||
43 | #define AT91_RTC_YEAR (0xff << 8) /* Current Year */ | ||
44 | #define AT91_RTC_MONTH (0x1f << 16) /* Current Month */ | ||
45 | #define AT91_RTC_DAY (7 << 21) /* Current Day */ | ||
46 | #define AT91_RTC_DATE (0x3f << 24) /* Current Date */ | ||
47 | |||
48 | #define AT91_RTC_TIMALR 0x10 /* Time Alarm Register */ | ||
49 | #define AT91_RTC_SECEN (1 << 7) /* Second Alarm Enable */ | ||
50 | #define AT91_RTC_MINEN (1 << 15) /* Minute Alarm Enable */ | ||
51 | #define AT91_RTC_HOUREN (1 << 23) /* Hour Alarm Enable */ | ||
52 | |||
53 | #define AT91_RTC_CALALR 0x14 /* Calendar Alarm Register */ | ||
54 | #define AT91_RTC_MTHEN (1 << 23) /* Month Alarm Enable */ | ||
55 | #define AT91_RTC_DATEEN (1 << 31) /* Date Alarm Enable */ | ||
56 | |||
57 | #define AT91_RTC_SR 0x18 /* Status Register */ | ||
58 | #define AT91_RTC_ACKUPD (1 << 0) /* Acknowledge for Update */ | ||
59 | #define AT91_RTC_ALARM (1 << 1) /* Alarm Flag */ | ||
60 | #define AT91_RTC_SECEV (1 << 2) /* Second Event */ | ||
61 | #define AT91_RTC_TIMEV (1 << 3) /* Time Event */ | ||
62 | #define AT91_RTC_CALEV (1 << 4) /* Calendar Event */ | ||
63 | |||
64 | #define AT91_RTC_SCCR 0x1c /* Status Clear Command Register */ | ||
65 | #define AT91_RTC_IER 0x20 /* Interrupt Enable Register */ | ||
66 | #define AT91_RTC_IDR 0x24 /* Interrupt Disable Register */ | ||
67 | #define AT91_RTC_IMR 0x28 /* Interrupt Mask Register */ | ||
68 | |||
69 | #define AT91_RTC_VER 0x2c /* Valid Entry Register */ | ||
70 | #define AT91_RTC_NVTIM (1 << 0) /* Non valid Time */ | ||
71 | #define AT91_RTC_NVCAL (1 << 1) /* Non valid Calendar */ | ||
72 | #define AT91_RTC_NVTIMALR (1 << 2) /* Non valid Time Alarm */ | ||
73 | #define AT91_RTC_NVCALALR (1 << 3) /* Non valid Calendar Alarm */ | ||
74 | |||
75 | #endif | ||
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h index 711a7892d331..a832e0707611 100644 --- a/arch/arm/mach-at91/include/mach/hardware.h +++ b/arch/arm/mach-at91/include/mach/hardware.h | |||
@@ -90,9 +90,6 @@ | |||
90 | #define AT91_SRAM_MAX SZ_1M | 90 | #define AT91_SRAM_MAX SZ_1M |
91 | #define AT91_VIRT_BASE (AT91_IO_VIRT_BASE - AT91_SRAM_MAX) | 91 | #define AT91_VIRT_BASE (AT91_IO_VIRT_BASE - AT91_SRAM_MAX) |
92 | 92 | ||
93 | /* Serial ports */ | ||
94 | #define ATMEL_MAX_UART 7 /* 6 USART3's and one DBGU port (SAM9260) */ | ||
95 | |||
96 | /* External Memory Map */ | 93 | /* External Memory Map */ |
97 | #define AT91_CHIPSELECT_0 0x10000000 | 94 | #define AT91_CHIPSELECT_0 0x10000000 |
98 | #define AT91_CHIPSELECT_1 0x20000000 | 95 | #define AT91_CHIPSELECT_1 0x20000000 |
diff --git a/arch/arm/mach-at91/irq.c b/arch/arm/mach-at91/irq.c index febc2ee901a5..8e210262aeee 100644 --- a/arch/arm/mach-at91/irq.c +++ b/arch/arm/mach-at91/irq.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #include <asm/mach/irq.h> | 42 | #include <asm/mach/irq.h> |
43 | #include <asm/mach/map.h> | 43 | #include <asm/mach/map.h> |
44 | 44 | ||
45 | #include <mach/at91_aic.h> | 45 | #include "at91_aic.h" |
46 | 46 | ||
47 | void __iomem *at91_aic_base; | 47 | void __iomem *at91_aic_base; |
48 | static struct irq_domain *at91_aic_domain; | 48 | static struct irq_domain *at91_aic_domain; |
diff --git a/arch/arm/mach-at91/leds.c b/arch/arm/mach-at91/leds.c index 1b1e62b5f41b..3e22978b5547 100644 --- a/arch/arm/mach-at91/leds.c +++ b/arch/arm/mach-at91/leds.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | 17 | ||
18 | #include <mach/board.h> | 18 | #include "board.h" |
19 | 19 | ||
20 | 20 | ||
21 | /* ------------------------------------------------------------------------- */ | 21 | /* ------------------------------------------------------------------------- */ |
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 5315f05896e9..adb6db888a1f 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -25,10 +25,10 @@ | |||
25 | #include <asm/mach/time.h> | 25 | #include <asm/mach/time.h> |
26 | #include <asm/mach/irq.h> | 26 | #include <asm/mach/irq.h> |
27 | 27 | ||
28 | #include <mach/at91_aic.h> | ||
29 | #include <mach/at91_pmc.h> | 28 | #include <mach/at91_pmc.h> |
30 | #include <mach/cpu.h> | 29 | #include <mach/cpu.h> |
31 | 30 | ||
31 | #include "at91_aic.h" | ||
32 | #include "generic.h" | 32 | #include "generic.h" |
33 | #include "pm.h" | 33 | #include "pm.h" |
34 | 34 | ||
@@ -36,8 +36,8 @@ | |||
36 | * Show the reason for the previous system reset. | 36 | * Show the reason for the previous system reset. |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include <mach/at91_rstc.h> | 39 | #include "at91_rstc.h" |
40 | #include <mach/at91_shdwc.h> | 40 | #include "at91_shdwc.h" |
41 | 41 | ||
42 | static void __init show_reset_status(void) | 42 | static void __init show_reset_status(void) |
43 | { | 43 | { |
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 0b32c81730a5..9ee866ce0478 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/pm.h> | 11 | #include <linux/pm.h> |
12 | #include <linux/of_address.h> | 12 | #include <linux/of_address.h> |
13 | #include <linux/pinctrl/machine.h> | ||
13 | 14 | ||
14 | #include <asm/system_misc.h> | 15 | #include <asm/system_misc.h> |
15 | #include <asm/mach/map.h> | 16 | #include <asm/mach/map.h> |
@@ -18,8 +19,8 @@ | |||
18 | #include <mach/cpu.h> | 19 | #include <mach/cpu.h> |
19 | #include <mach/at91_dbgu.h> | 20 | #include <mach/at91_dbgu.h> |
20 | #include <mach/at91_pmc.h> | 21 | #include <mach/at91_pmc.h> |
21 | #include <mach/at91_shdwc.h> | ||
22 | 22 | ||
23 | #include "at91_shdwc.h" | ||
23 | #include "soc.h" | 24 | #include "soc.h" |
24 | #include "generic.h" | 25 | #include "generic.h" |
25 | 26 | ||
@@ -338,6 +339,7 @@ static void at91_dt_rstc(void) | |||
338 | } | 339 | } |
339 | 340 | ||
340 | static struct of_device_id ramc_ids[] = { | 341 | static struct of_device_id ramc_ids[] = { |
342 | { .compatible = "atmel,at91rm9200-sdramc" }, | ||
341 | { .compatible = "atmel,at91sam9260-sdramc" }, | 343 | { .compatible = "atmel,at91sam9260-sdramc" }, |
342 | { .compatible = "atmel,at91sam9g45-ddramc" }, | 344 | { .compatible = "atmel,at91sam9g45-ddramc" }, |
343 | { /*sentinel*/ } | 345 | { /*sentinel*/ } |
@@ -436,6 +438,19 @@ end: | |||
436 | of_node_put(np); | 438 | of_node_put(np); |
437 | } | 439 | } |
438 | 440 | ||
441 | void __init at91rm9200_dt_initialize(void) | ||
442 | { | ||
443 | at91_dt_ramc(); | ||
444 | |||
445 | /* Init clock subsystem */ | ||
446 | at91_dt_clock_init(); | ||
447 | |||
448 | /* Register the processor-specific clocks */ | ||
449 | at91_boot_soc.register_clocks(); | ||
450 | |||
451 | at91_boot_soc.init(); | ||
452 | } | ||
453 | |||
439 | void __init at91_dt_initialize(void) | 454 | void __init at91_dt_initialize(void) |
440 | { | 455 | { |
441 | at91_dt_rstc(); | 456 | at91_dt_rstc(); |
@@ -448,7 +463,8 @@ void __init at91_dt_initialize(void) | |||
448 | /* Register the processor-specific clocks */ | 463 | /* Register the processor-specific clocks */ |
449 | at91_boot_soc.register_clocks(); | 464 | at91_boot_soc.register_clocks(); |
450 | 465 | ||
451 | at91_boot_soc.init(); | 466 | if (at91_boot_soc.init) |
467 | at91_boot_soc.init(); | ||
452 | } | 468 | } |
453 | #endif | 469 | #endif |
454 | 470 | ||
@@ -463,4 +479,6 @@ void __init at91_initialize(unsigned long main_clock) | |||
463 | at91_boot_soc.register_clocks(); | 479 | at91_boot_soc.register_clocks(); |
464 | 480 | ||
465 | at91_boot_soc.init(); | 481 | at91_boot_soc.init(); |
482 | |||
483 | pinctrl_provide_dummies(); | ||
466 | } | 484 | } |
diff --git a/arch/arm/mach-at91/soc.h b/arch/arm/mach-at91/soc.h index a9cfeb153719..9c6d3d4f9a23 100644 --- a/arch/arm/mach-at91/soc.h +++ b/arch/arm/mach-at91/soc.h | |||
@@ -5,6 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | struct at91_init_soc { | 7 | struct at91_init_soc { |
8 | int builtin; | ||
8 | unsigned int *default_irq_priority; | 9 | unsigned int *default_irq_priority; |
9 | void (*map_io)(void); | 10 | void (*map_io)(void); |
10 | void (*ioremap_registers)(void); | 11 | void (*ioremap_registers)(void); |
@@ -22,9 +23,18 @@ extern struct at91_init_soc at91sam9rl_soc; | |||
22 | extern struct at91_init_soc at91sam9x5_soc; | 23 | extern struct at91_init_soc at91sam9x5_soc; |
23 | extern struct at91_init_soc at91sam9n12_soc; | 24 | extern struct at91_init_soc at91sam9n12_soc; |
24 | 25 | ||
26 | #define AT91_SOC_START(_name) \ | ||
27 | struct at91_init_soc __initdata at91##_name##_soc \ | ||
28 | __used \ | ||
29 | = { \ | ||
30 | .builtin = 1, \ | ||
31 | |||
32 | #define AT91_SOC_END \ | ||
33 | }; | ||
34 | |||
25 | static inline int at91_soc_is_enabled(void) | 35 | static inline int at91_soc_is_enabled(void) |
26 | { | 36 | { |
27 | return at91_boot_soc.init != NULL; | 37 | return at91_boot_soc.builtin; |
28 | } | 38 | } |
29 | 39 | ||
30 | #if !defined(CONFIG_SOC_AT91RM9200) | 40 | #if !defined(CONFIG_SOC_AT91RM9200) |
diff --git a/arch/arm/mach-at91/include/mach/stamp9g20.h b/arch/arm/mach-at91/stamp9g20.h index f62c0abca4b4..f62c0abca4b4 100644 --- a/arch/arm/mach-at91/include/mach/stamp9g20.h +++ b/arch/arm/mach-at91/stamp9g20.h | |||
diff --git a/arch/arm/mach-cns3xxx/Kconfig b/arch/arm/mach-cns3xxx/Kconfig index 29b13f249aa9..9ebfcc46feb1 100644 --- a/arch/arm/mach-cns3xxx/Kconfig +++ b/arch/arm/mach-cns3xxx/Kconfig | |||
@@ -3,7 +3,6 @@ menu "CNS3XXX platform type" | |||
3 | 3 | ||
4 | config MACH_CNS3420VB | 4 | config MACH_CNS3420VB |
5 | bool "Support for CNS3420 Validation Board" | 5 | bool "Support for CNS3420 Validation Board" |
6 | select MIGHT_HAVE_PCI | ||
7 | help | 6 | help |
8 | Include support for the Cavium Networks CNS3420 MPCore Platform | 7 | Include support for the Cavium Networks CNS3420 MPCore Platform |
9 | Baseboard. | 8 | Baseboard. |
diff --git a/arch/arm/mach-cns3xxx/cns3420vb.c b/arch/arm/mach-cns3xxx/cns3420vb.c index 2c5fb4c7e509..ae305397003c 100644 --- a/arch/arm/mach-cns3xxx/cns3420vb.c +++ b/arch/arm/mach-cns3xxx/cns3420vb.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <linux/mtd/mtd.h> | 24 | #include <linux/mtd/mtd.h> |
25 | #include <linux/mtd/physmap.h> | 25 | #include <linux/mtd/physmap.h> |
26 | #include <linux/mtd/partitions.h> | 26 | #include <linux/mtd/partitions.h> |
27 | #include <linux/usb/ehci_pdriver.h> | ||
28 | #include <linux/usb/ohci_pdriver.h> | ||
27 | #include <asm/setup.h> | 29 | #include <asm/setup.h> |
28 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
29 | #include <asm/hardware/gic.h> | 31 | #include <asm/hardware/gic.h> |
@@ -32,6 +34,7 @@ | |||
32 | #include <asm/mach/time.h> | 34 | #include <asm/mach/time.h> |
33 | #include <mach/cns3xxx.h> | 35 | #include <mach/cns3xxx.h> |
34 | #include <mach/irqs.h> | 36 | #include <mach/irqs.h> |
37 | #include <mach/pm.h> | ||
35 | #include "core.h" | 38 | #include "core.h" |
36 | #include "devices.h" | 39 | #include "devices.h" |
37 | 40 | ||
@@ -125,13 +128,52 @@ static struct resource cns3xxx_usb_ehci_resources[] = { | |||
125 | 128 | ||
126 | static u64 cns3xxx_usb_ehci_dma_mask = DMA_BIT_MASK(32); | 129 | static u64 cns3xxx_usb_ehci_dma_mask = DMA_BIT_MASK(32); |
127 | 130 | ||
131 | static int csn3xxx_usb_power_on(struct platform_device *pdev) | ||
132 | { | ||
133 | /* | ||
134 | * EHCI and OHCI share the same clock and power, | ||
135 | * resetting twice would cause the 1st controller been reset. | ||
136 | * Therefore only do power up at the first up device, and | ||
137 | * power down at the last down device. | ||
138 | * | ||
139 | * Set USB AHB INCR length to 16 | ||
140 | */ | ||
141 | if (atomic_inc_return(&usb_pwr_ref) == 1) { | ||
142 | cns3xxx_pwr_power_up(1 << PM_PLL_HM_PD_CTRL_REG_OFFSET_PLL_USB); | ||
143 | cns3xxx_pwr_clk_en(1 << PM_CLK_GATE_REG_OFFSET_USB_HOST); | ||
144 | cns3xxx_pwr_soft_rst(1 << PM_SOFT_RST_REG_OFFST_USB_HOST); | ||
145 | __raw_writel((__raw_readl(MISC_CHIP_CONFIG_REG) | (0X2 << 24)), | ||
146 | MISC_CHIP_CONFIG_REG); | ||
147 | } | ||
148 | |||
149 | return 0; | ||
150 | } | ||
151 | |||
152 | static void csn3xxx_usb_power_off(struct platform_device *pdev) | ||
153 | { | ||
154 | /* | ||
155 | * EHCI and OHCI share the same clock and power, | ||
156 | * resetting twice would cause the 1st controller been reset. | ||
157 | * Therefore only do power up at the first up device, and | ||
158 | * power down at the last down device. | ||
159 | */ | ||
160 | if (atomic_dec_return(&usb_pwr_ref) == 0) | ||
161 | cns3xxx_pwr_clk_dis(1 << PM_CLK_GATE_REG_OFFSET_USB_HOST); | ||
162 | } | ||
163 | |||
164 | static struct usb_ehci_pdata cns3xxx_usb_ehci_pdata = { | ||
165 | .power_on = csn3xxx_usb_power_on, | ||
166 | .power_off = csn3xxx_usb_power_off, | ||
167 | }; | ||
168 | |||
128 | static struct platform_device cns3xxx_usb_ehci_device = { | 169 | static struct platform_device cns3xxx_usb_ehci_device = { |
129 | .name = "cns3xxx-ehci", | 170 | .name = "ehci-platform", |
130 | .num_resources = ARRAY_SIZE(cns3xxx_usb_ehci_resources), | 171 | .num_resources = ARRAY_SIZE(cns3xxx_usb_ehci_resources), |
131 | .resource = cns3xxx_usb_ehci_resources, | 172 | .resource = cns3xxx_usb_ehci_resources, |
132 | .dev = { | 173 | .dev = { |
133 | .dma_mask = &cns3xxx_usb_ehci_dma_mask, | 174 | .dma_mask = &cns3xxx_usb_ehci_dma_mask, |
134 | .coherent_dma_mask = DMA_BIT_MASK(32), | 175 | .coherent_dma_mask = DMA_BIT_MASK(32), |
176 | .platform_data = &cns3xxx_usb_ehci_pdata, | ||
135 | }, | 177 | }, |
136 | }; | 178 | }; |
137 | 179 | ||
@@ -149,13 +191,20 @@ static struct resource cns3xxx_usb_ohci_resources[] = { | |||
149 | 191 | ||
150 | static u64 cns3xxx_usb_ohci_dma_mask = DMA_BIT_MASK(32); | 192 | static u64 cns3xxx_usb_ohci_dma_mask = DMA_BIT_MASK(32); |
151 | 193 | ||
194 | static struct usb_ohci_pdata cns3xxx_usb_ohci_pdata = { | ||
195 | .num_ports = 1, | ||
196 | .power_on = csn3xxx_usb_power_on, | ||
197 | .power_off = csn3xxx_usb_power_off, | ||
198 | }; | ||
199 | |||
152 | static struct platform_device cns3xxx_usb_ohci_device = { | 200 | static struct platform_device cns3xxx_usb_ohci_device = { |
153 | .name = "cns3xxx-ohci", | 201 | .name = "ohci-platform", |
154 | .num_resources = ARRAY_SIZE(cns3xxx_usb_ohci_resources), | 202 | .num_resources = ARRAY_SIZE(cns3xxx_usb_ohci_resources), |
155 | .resource = cns3xxx_usb_ohci_resources, | 203 | .resource = cns3xxx_usb_ohci_resources, |
156 | .dev = { | 204 | .dev = { |
157 | .dma_mask = &cns3xxx_usb_ohci_dma_mask, | 205 | .dma_mask = &cns3xxx_usb_ohci_dma_mask, |
158 | .coherent_dma_mask = DMA_BIT_MASK(32), | 206 | .coherent_dma_mask = DMA_BIT_MASK(32), |
207 | .platform_data = &cns3xxx_usb_ohci_pdata, | ||
159 | }, | 208 | }, |
160 | }; | 209 | }; |
161 | 210 | ||
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index f22572cee49d..f8a99ee6bffc 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -519,13 +519,11 @@ static int dm6444evm_msp430_get_pins(void) | |||
519 | char buf[4]; | 519 | char buf[4]; |
520 | struct i2c_msg msg[2] = { | 520 | struct i2c_msg msg[2] = { |
521 | { | 521 | { |
522 | .addr = dm6446evm_msp->addr, | ||
523 | .flags = 0, | 522 | .flags = 0, |
524 | .len = 2, | 523 | .len = 2, |
525 | .buf = (void __force *)txbuf, | 524 | .buf = (void __force *)txbuf, |
526 | }, | 525 | }, |
527 | { | 526 | { |
528 | .addr = dm6446evm_msp->addr, | ||
529 | .flags = I2C_M_RD, | 527 | .flags = I2C_M_RD, |
530 | .len = 4, | 528 | .len = 4, |
531 | .buf = buf, | 529 | .buf = buf, |
@@ -536,6 +534,9 @@ static int dm6444evm_msp430_get_pins(void) | |||
536 | if (!dm6446evm_msp) | 534 | if (!dm6446evm_msp) |
537 | return -ENXIO; | 535 | return -ENXIO; |
538 | 536 | ||
537 | msg[0].addr = dm6446evm_msp->addr; | ||
538 | msg[1].addr = dm6446evm_msp->addr; | ||
539 | |||
539 | /* Command 4 == get input state, returns port 2 and port3 data | 540 | /* Command 4 == get input state, returns port 2 and port3 data |
540 | * S Addr W [A] len=2 [A] cmd=4 [A] | 541 | * S Addr W [A] len=2 [A] cmd=4 [A] |
541 | * RS Addr R [A] [len=4] A [cmd=4] A [port2] A [port3] N P | 542 | * RS Addr R [A] [len=4] A [cmd=4] A [port2] A [port3] N P |
diff --git a/arch/arm/mach-davinci/devices-tnetv107x.c b/arch/arm/mach-davinci/devices-tnetv107x.c index 29b17f7d3a5f..773ab07a71a0 100644 --- a/arch/arm/mach-davinci/devices-tnetv107x.c +++ b/arch/arm/mach-davinci/devices-tnetv107x.c | |||
@@ -374,7 +374,7 @@ void __init tnetv107x_devices_init(struct tnetv107x_device_info *info) | |||
374 | * complete sample conversion in time. | 374 | * complete sample conversion in time. |
375 | */ | 375 | */ |
376 | tsc_clk = clk_get(NULL, "sys_tsc_clk"); | 376 | tsc_clk = clk_get(NULL, "sys_tsc_clk"); |
377 | if (tsc_clk) { | 377 | if (!IS_ERR(tsc_clk)) { |
378 | error = clk_set_rate(tsc_clk, 5000000); | 378 | error = clk_set_rate(tsc_clk, 5000000); |
379 | WARN_ON(error < 0); | 379 | WARN_ON(error < 0); |
380 | clk_put(tsc_clk); | 380 | clk_put(tsc_clk); |
diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h index 46b3cd11c3c2..86a01fa6d3fe 100644 --- a/arch/arm/mach-davinci/include/mach/serial.h +++ b/arch/arm/mach-davinci/include/mach/serial.h | |||
@@ -38,7 +38,7 @@ | |||
38 | 38 | ||
39 | #ifndef __ASSEMBLY__ | 39 | #ifndef __ASSEMBLY__ |
40 | struct davinci_uart_config { | 40 | struct davinci_uart_config { |
41 | /* Bit field of UARTs present; bit 0 --> UART1 */ | 41 | /* Bit field of UARTs present; bit 0 --> UART0 */ |
42 | unsigned int enabled_uarts; | 42 | unsigned int enabled_uarts; |
43 | }; | 43 | }; |
44 | 44 | ||
diff --git a/arch/arm/mach-davinci/include/mach/uncompress.h b/arch/arm/mach-davinci/include/mach/uncompress.h index 18cfd4977155..3a0ff905a69b 100644 --- a/arch/arm/mach-davinci/include/mach/uncompress.h +++ b/arch/arm/mach-davinci/include/mach/uncompress.h | |||
@@ -32,6 +32,9 @@ u32 *uart; | |||
32 | /* PORT_16C550A, in polled non-fifo mode */ | 32 | /* PORT_16C550A, in polled non-fifo mode */ |
33 | static void putc(char c) | 33 | static void putc(char c) |
34 | { | 34 | { |
35 | if (!uart) | ||
36 | return; | ||
37 | |||
35 | while (!(uart[UART_LSR] & UART_LSR_THRE)) | 38 | while (!(uart[UART_LSR] & UART_LSR_THRE)) |
36 | barrier(); | 39 | barrier(); |
37 | uart[UART_TX] = c; | 40 | uart[UART_TX] = c; |
@@ -39,6 +42,9 @@ static void putc(char c) | |||
39 | 42 | ||
40 | static inline void flush(void) | 43 | static inline void flush(void) |
41 | { | 44 | { |
45 | if (!uart) | ||
46 | return; | ||
47 | |||
42 | while (!(uart[UART_LSR] & UART_LSR_THRE)) | 48 | while (!(uart[UART_LSR] & UART_LSR_THRE)) |
43 | barrier(); | 49 | barrier(); |
44 | } | 50 | } |
diff --git a/arch/arm/mach-dove/include/mach/pm.h b/arch/arm/mach-dove/include/mach/pm.h index 7bcd0dfce4b1..b47f75038686 100644 --- a/arch/arm/mach-dove/include/mach/pm.h +++ b/arch/arm/mach-dove/include/mach/pm.h | |||
@@ -63,7 +63,7 @@ static inline int pmu_to_irq(int pin) | |||
63 | 63 | ||
64 | static inline int irq_to_pmu(int irq) | 64 | static inline int irq_to_pmu(int irq) |
65 | { | 65 | { |
66 | if (IRQ_DOVE_PMU_START < irq && irq < NR_IRQS) | 66 | if (IRQ_DOVE_PMU_START <= irq && irq < NR_IRQS) |
67 | return irq - IRQ_DOVE_PMU_START; | 67 | return irq - IRQ_DOVE_PMU_START; |
68 | 68 | ||
69 | return -EINVAL; | 69 | return -EINVAL; |
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c index 087711524e8a..bc4344aa1009 100644 --- a/arch/arm/mach-dove/irq.c +++ b/arch/arm/mach-dove/irq.c | |||
@@ -46,8 +46,20 @@ static void pmu_irq_ack(struct irq_data *d) | |||
46 | int pin = irq_to_pmu(d->irq); | 46 | int pin = irq_to_pmu(d->irq); |
47 | u32 u; | 47 | u32 u; |
48 | 48 | ||
49 | /* | ||
50 | * The PMU mask register is not RW0C: it is RW. This means that | ||
51 | * the bits take whatever value is written to them; if you write | ||
52 | * a '1', you will set the interrupt. | ||
53 | * | ||
54 | * Unfortunately this means there is NO race free way to clear | ||
55 | * these interrupts. | ||
56 | * | ||
57 | * So, let's structure the code so that the window is as small as | ||
58 | * possible. | ||
59 | */ | ||
49 | u = ~(1 << (pin & 31)); | 60 | u = ~(1 << (pin & 31)); |
50 | writel(u, PMU_INTERRUPT_CAUSE); | 61 | u &= readl_relaxed(PMU_INTERRUPT_CAUSE); |
62 | writel_relaxed(u, PMU_INTERRUPT_CAUSE); | ||
51 | } | 63 | } |
52 | 64 | ||
53 | static struct irq_chip pmu_irq_chip = { | 65 | static struct irq_chip pmu_irq_chip = { |
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index e428f3ab15c7..9f82f9dcbb98 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -21,10 +21,9 @@ | |||
21 | #include <linux/amba/bus.h> | 21 | #include <linux/amba/bus.h> |
22 | #include <linux/amba/clcd.h> | 22 | #include <linux/amba/clcd.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/platform_data/clk-integrator.h> | ||
24 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
25 | #include <linux/clkdev.h> | ||
26 | 26 | ||
27 | #include <asm/hardware/icst.h> | ||
28 | #include <mach/lm.h> | 27 | #include <mach/lm.h> |
29 | #include <mach/impd1.h> | 28 | #include <mach/impd1.h> |
30 | #include <asm/sizes.h> | 29 | #include <asm/sizes.h> |
@@ -36,45 +35,6 @@ MODULE_PARM_DESC(lmid, "logic module stack position"); | |||
36 | 35 | ||
37 | struct impd1_module { | 36 | struct impd1_module { |
38 | void __iomem *base; | 37 | void __iomem *base; |
39 | struct clk vcos[2]; | ||
40 | struct clk_lookup *clks[3]; | ||
41 | }; | ||
42 | |||
43 | static const struct icst_params impd1_vco_params = { | ||
44 | .ref = 24000000, /* 24 MHz */ | ||
45 | .vco_max = ICST525_VCO_MAX_3V, | ||
46 | .vco_min = ICST525_VCO_MIN, | ||
47 | .vd_min = 12, | ||
48 | .vd_max = 519, | ||
49 | .rd_min = 3, | ||
50 | .rd_max = 120, | ||
51 | .s2div = icst525_s2div, | ||
52 | .idx2s = icst525_idx2s, | ||
53 | }; | ||
54 | |||
55 | static void impd1_setvco(struct clk *clk, struct icst_vco vco) | ||
56 | { | ||
57 | struct impd1_module *impd1 = clk->data; | ||
58 | u32 val = vco.v | (vco.r << 9) | (vco.s << 16); | ||
59 | |||
60 | writel(0xa05f, impd1->base + IMPD1_LOCK); | ||
61 | writel(val, clk->vcoreg); | ||
62 | writel(0, impd1->base + IMPD1_LOCK); | ||
63 | |||
64 | #ifdef DEBUG | ||
65 | vco.v = val & 0x1ff; | ||
66 | vco.r = (val >> 9) & 0x7f; | ||
67 | vco.s = (val >> 16) & 7; | ||
68 | |||
69 | pr_debug("IM-PD1: VCO%d clock is %ld Hz\n", | ||
70 | vconr, icst525_hz(&impd1_vco_params, vco)); | ||
71 | #endif | ||
72 | } | ||
73 | |||
74 | static const struct clk_ops impd1_clk_ops = { | ||
75 | .round = icst_clk_round, | ||
76 | .set = icst_clk_set, | ||
77 | .setvco = impd1_setvco, | ||
78 | }; | 38 | }; |
79 | 39 | ||
80 | void impd1_tweak_control(struct device *dev, u32 mask, u32 val) | 40 | void impd1_tweak_control(struct device *dev, u32 mask, u32 val) |
@@ -344,10 +304,6 @@ static struct impd1_device impd1_devs[] = { | |||
344 | } | 304 | } |
345 | }; | 305 | }; |
346 | 306 | ||
347 | static struct clk fixed_14745600 = { | ||
348 | .rate = 14745600, | ||
349 | }; | ||
350 | |||
351 | static int impd1_probe(struct lm_device *dev) | 307 | static int impd1_probe(struct lm_device *dev) |
352 | { | 308 | { |
353 | struct impd1_module *impd1; | 309 | struct impd1_module *impd1; |
@@ -376,23 +332,7 @@ static int impd1_probe(struct lm_device *dev) | |||
376 | printk("IM-PD1 found at 0x%08lx\n", | 332 | printk("IM-PD1 found at 0x%08lx\n", |
377 | (unsigned long)dev->resource.start); | 333 | (unsigned long)dev->resource.start); |
378 | 334 | ||
379 | for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) { | 335 | integrator_impd1_clk_init(impd1->base, dev->id); |
380 | impd1->vcos[i].ops = &impd1_clk_ops, | ||
381 | impd1->vcos[i].owner = THIS_MODULE, | ||
382 | impd1->vcos[i].params = &impd1_vco_params, | ||
383 | impd1->vcos[i].data = impd1; | ||
384 | } | ||
385 | impd1->vcos[0].vcoreg = impd1->base + IMPD1_OSC1; | ||
386 | impd1->vcos[1].vcoreg = impd1->base + IMPD1_OSC2; | ||
387 | |||
388 | impd1->clks[0] = clkdev_alloc(&impd1->vcos[0], NULL, "lm%x:01000", | ||
389 | dev->id); | ||
390 | impd1->clks[1] = clkdev_alloc(&fixed_14745600, NULL, "lm%x:00100", | ||
391 | dev->id); | ||
392 | impd1->clks[2] = clkdev_alloc(&fixed_14745600, NULL, "lm%x:00200", | ||
393 | dev->id); | ||
394 | for (i = 0; i < ARRAY_SIZE(impd1->clks); i++) | ||
395 | clkdev_add(impd1->clks[i]); | ||
396 | 336 | ||
397 | for (i = 0; i < ARRAY_SIZE(impd1_devs); i++) { | 337 | for (i = 0; i < ARRAY_SIZE(impd1_devs); i++) { |
398 | struct impd1_device *idev = impd1_devs + i; | 338 | struct impd1_device *idev = impd1_devs + i; |
@@ -402,9 +342,10 @@ static int impd1_probe(struct lm_device *dev) | |||
402 | 342 | ||
403 | pc_base = dev->resource.start + idev->offset; | 343 | pc_base = dev->resource.start + idev->offset; |
404 | snprintf(devname, 32, "lm%x:%5.5lx", dev->id, idev->offset >> 12); | 344 | snprintf(devname, 32, "lm%x:%5.5lx", dev->id, idev->offset >> 12); |
405 | d = amba_ahb_device_add(&dev->dev, devname, pc_base, SZ_4K, | 345 | d = amba_ahb_device_add_res(&dev->dev, devname, pc_base, SZ_4K, |
406 | dev->irq, dev->irq, | 346 | dev->irq, dev->irq, |
407 | idev->platform_data, idev->id); | 347 | idev->platform_data, idev->id, |
348 | &dev->resource); | ||
408 | if (IS_ERR(d)) { | 349 | if (IS_ERR(d)) { |
409 | dev_err(&dev->dev, "unable to register device: %ld\n", PTR_ERR(d)); | 350 | dev_err(&dev->dev, "unable to register device: %ld\n", PTR_ERR(d)); |
410 | continue; | 351 | continue; |
@@ -431,12 +372,9 @@ static int impd1_remove_one(struct device *dev, void *data) | |||
431 | static void impd1_remove(struct lm_device *dev) | 372 | static void impd1_remove(struct lm_device *dev) |
432 | { | 373 | { |
433 | struct impd1_module *impd1 = lm_get_drvdata(dev); | 374 | struct impd1_module *impd1 = lm_get_drvdata(dev); |
434 | int i; | ||
435 | 375 | ||
436 | device_for_each_child(&dev->dev, NULL, impd1_remove_one); | 376 | device_for_each_child(&dev->dev, NULL, impd1_remove_one); |
437 | 377 | integrator_impd1_clk_exit(dev->id); | |
438 | for (i = 0; i < ARRAY_SIZE(impd1->clks); i++) | ||
439 | clkdev_drop(impd1->clks[i]); | ||
440 | 378 | ||
441 | lm_set_drvdata(dev, NULL); | 379 | lm_set_drvdata(dev, NULL); |
442 | 380 | ||
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c index 1694f01ce2b6..6d6bde3e15fa 100644 --- a/arch/arm/mach-ixp4xx/common-pci.c +++ b/arch/arm/mach-ixp4xx/common-pci.c | |||
@@ -410,6 +410,7 @@ void __init ixp4xx_pci_preinit(void) | |||
410 | * Enable the IO window to be way up high, at 0xfffffc00 | 410 | * Enable the IO window to be way up high, at 0xfffffc00 |
411 | */ | 411 | */ |
412 | local_write_config(PCI_BASE_ADDRESS_5, 4, 0xfffffc01); | 412 | local_write_config(PCI_BASE_ADDRESS_5, 4, 0xfffffc01); |
413 | local_write_config(0x40, 4, 0x000080FF); /* No TRDY time limit */ | ||
413 | } else { | 414 | } else { |
414 | printk("PCI: IXP4xx is target - No bus scan performed\n"); | 415 | printk("PCI: IXP4xx is target - No bus scan performed\n"); |
415 | } | 416 | } |
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index fdf91a160884..8c0c0e2d0727 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -67,15 +67,12 @@ static struct map_desc ixp4xx_io_desc[] __initdata = { | |||
67 | .pfn = __phys_to_pfn(IXP4XX_PCI_CFG_BASE_PHYS), | 67 | .pfn = __phys_to_pfn(IXP4XX_PCI_CFG_BASE_PHYS), |
68 | .length = IXP4XX_PCI_CFG_REGION_SIZE, | 68 | .length = IXP4XX_PCI_CFG_REGION_SIZE, |
69 | .type = MT_DEVICE | 69 | .type = MT_DEVICE |
70 | }, | 70 | }, { /* Queue Manager */ |
71 | #ifdef CONFIG_DEBUG_LL | 71 | .virtual = (unsigned long)IXP4XX_QMGR_BASE_VIRT, |
72 | { /* Debug UART mapping */ | 72 | .pfn = __phys_to_pfn(IXP4XX_QMGR_BASE_PHYS), |
73 | .virtual = (unsigned long)IXP4XX_DEBUG_UART_BASE_VIRT, | 73 | .length = IXP4XX_QMGR_REGION_SIZE, |
74 | .pfn = __phys_to_pfn(IXP4XX_DEBUG_UART_BASE_PHYS), | ||
75 | .length = IXP4XX_DEBUG_UART_REGION_SIZE, | ||
76 | .type = MT_DEVICE | 74 | .type = MT_DEVICE |
77 | } | 75 | }, |
78 | #endif | ||
79 | }; | 76 | }; |
80 | 77 | ||
81 | void __init ixp4xx_map_io(void) | 78 | void __init ixp4xx_map_io(void) |
diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c index b800a031207c..53b8348dfcc2 100644 --- a/arch/arm/mach-ixp4xx/goramo_mlr.c +++ b/arch/arm/mach-ixp4xx/goramo_mlr.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
16 | #include <asm/mach/flash.h> | 16 | #include <asm/mach/flash.h> |
17 | #include <asm/mach/pci.h> | 17 | #include <asm/mach/pci.h> |
18 | #include <asm/system_info.h> | ||
18 | 19 | ||
19 | #define SLOT_ETHA 0x0B /* IDSEL = AD21 */ | 20 | #define SLOT_ETHA 0x0B /* IDSEL = AD21 */ |
20 | #define SLOT_ETHB 0x0C /* IDSEL = AD20 */ | 21 | #define SLOT_ETHB 0x0C /* IDSEL = AD20 */ |
@@ -329,7 +330,7 @@ static struct platform_device device_hss_tab[] = { | |||
329 | }; | 330 | }; |
330 | 331 | ||
331 | 332 | ||
332 | static struct platform_device *device_tab[6] __initdata = { | 333 | static struct platform_device *device_tab[7] __initdata = { |
333 | &device_flash, /* index 0 */ | 334 | &device_flash, /* index 0 */ |
334 | }; | 335 | }; |
335 | 336 | ||
diff --git a/arch/arm/mach-ixp4xx/include/mach/debug-macro.S b/arch/arm/mach-ixp4xx/include/mach/debug-macro.S index 8c9f8d564492..ff686cbc5df4 100644 --- a/arch/arm/mach-ixp4xx/include/mach/debug-macro.S +++ b/arch/arm/mach-ixp4xx/include/mach/debug-macro.S | |||
@@ -17,8 +17,8 @@ | |||
17 | #else | 17 | #else |
18 | mov \rp, #0 | 18 | mov \rp, #0 |
19 | #endif | 19 | #endif |
20 | orr \rv, \rp, #0xff000000 @ virtual | 20 | orr \rv, \rp, #0xfe000000 @ virtual |
21 | orr \rv, \rv, #0x00b00000 | 21 | orr \rv, \rv, #0x00f00000 |
22 | orr \rp, \rp, #0xc8000000 @ physical | 22 | orr \rp, \rp, #0xc8000000 @ physical |
23 | .endm | 23 | .endm |
24 | 24 | ||
diff --git a/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h b/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h index eb68b61ce975..c5bae9c035d5 100644 --- a/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h +++ b/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h | |||
@@ -30,51 +30,43 @@ | |||
30 | * | 30 | * |
31 | * 0x50000000 0x10000000 ioremap'd EXP BUS | 31 | * 0x50000000 0x10000000 ioremap'd EXP BUS |
32 | * | 32 | * |
33 | * 0x6000000 0x00004000 ioremap'd QMgr | 33 | * 0xC8000000 0x00013000 0xFEF00000 On-Chip Peripherals |
34 | * | 34 | * |
35 | * 0xC0000000 0x00001000 0xffbff000 PCI CFG | 35 | * 0xC0000000 0x00001000 0xFEF13000 PCI CFG |
36 | * | 36 | * |
37 | * 0xC4000000 0x00001000 0xffbfe000 EXP CFG | 37 | * 0xC4000000 0x00001000 0xFEF14000 EXP CFG |
38 | * | 38 | * |
39 | * 0xC8000000 0x00013000 0xffbeb000 On-Chip Peripherals | 39 | * 0x60000000 0x00004000 0xFEF15000 QMgr |
40 | */ | 40 | */ |
41 | 41 | ||
42 | /* | 42 | /* |
43 | * Queue Manager | 43 | * Queue Manager |
44 | */ | 44 | */ |
45 | #define IXP4XX_QMGR_BASE_PHYS (0x60000000) | 45 | #define IXP4XX_QMGR_BASE_PHYS 0x60000000 |
46 | #define IXP4XX_QMGR_REGION_SIZE (0x00004000) | 46 | #define IXP4XX_QMGR_BASE_VIRT IOMEM(0xFEF15000) |
47 | #define IXP4XX_QMGR_REGION_SIZE 0x00004000 | ||
47 | 48 | ||
48 | /* | 49 | /* |
49 | * Expansion BUS Configuration registers | 50 | * Peripheral space, including debug UART. Must be section-aligned so that |
51 | * it can be used with the low-level debug code. | ||
50 | */ | 52 | */ |
51 | #define IXP4XX_EXP_CFG_BASE_PHYS (0xC4000000) | 53 | #define IXP4XX_PERIPHERAL_BASE_PHYS 0xC8000000 |
52 | #define IXP4XX_EXP_CFG_BASE_VIRT IOMEM(0xFFBFE000) | 54 | #define IXP4XX_PERIPHERAL_BASE_VIRT IOMEM(0xFEF00000) |
53 | #define IXP4XX_EXP_CFG_REGION_SIZE (0x00001000) | 55 | #define IXP4XX_PERIPHERAL_REGION_SIZE 0x00013000 |
54 | 56 | ||
55 | /* | 57 | /* |
56 | * PCI Config registers | 58 | * PCI Config registers |
57 | */ | 59 | */ |
58 | #define IXP4XX_PCI_CFG_BASE_PHYS (0xC0000000) | 60 | #define IXP4XX_PCI_CFG_BASE_PHYS 0xC0000000 |
59 | #define IXP4XX_PCI_CFG_BASE_VIRT IOMEM(0xFFBFF000) | 61 | #define IXP4XX_PCI_CFG_BASE_VIRT IOMEM(0xFEF13000) |
60 | #define IXP4XX_PCI_CFG_REGION_SIZE (0x00001000) | 62 | #define IXP4XX_PCI_CFG_REGION_SIZE 0x00001000 |
61 | |||
62 | /* | ||
63 | * Peripheral space | ||
64 | */ | ||
65 | #define IXP4XX_PERIPHERAL_BASE_PHYS (0xC8000000) | ||
66 | #define IXP4XX_PERIPHERAL_BASE_VIRT IOMEM(0xFFBEB000) | ||
67 | #define IXP4XX_PERIPHERAL_REGION_SIZE (0x00013000) | ||
68 | 63 | ||
69 | /* | 64 | /* |
70 | * Debug UART | 65 | * Expansion BUS Configuration registers |
71 | * | ||
72 | * This is basically a remap of UART1 into a region that is section | ||
73 | * aligned so that it * can be used with the low-level debug code. | ||
74 | */ | 66 | */ |
75 | #define IXP4XX_DEBUG_UART_BASE_PHYS (0xC8000000) | 67 | #define IXP4XX_EXP_CFG_BASE_PHYS 0xC4000000 |
76 | #define IXP4XX_DEBUG_UART_BASE_VIRT IOMEM(0xffb00000) | 68 | #define IXP4XX_EXP_CFG_BASE_VIRT 0xFEF14000 |
77 | #define IXP4XX_DEBUG_UART_REGION_SIZE (0x00001000) | 69 | #define IXP4XX_EXP_CFG_REGION_SIZE 0x00001000 |
78 | 70 | ||
79 | #define IXP4XX_EXP_CS0_OFFSET 0x00 | 71 | #define IXP4XX_EXP_CS0_OFFSET 0x00 |
80 | #define IXP4XX_EXP_CS1_OFFSET 0x04 | 72 | #define IXP4XX_EXP_CS1_OFFSET 0x04 |
diff --git a/arch/arm/mach-ixp4xx/include/mach/qmgr.h b/arch/arm/mach-ixp4xx/include/mach/qmgr.h index 9e7cad2d54cb..4de8da536dbb 100644 --- a/arch/arm/mach-ixp4xx/include/mach/qmgr.h +++ b/arch/arm/mach-ixp4xx/include/mach/qmgr.h | |||
@@ -86,7 +86,7 @@ void qmgr_release_queue(unsigned int queue); | |||
86 | 86 | ||
87 | static inline void qmgr_put_entry(unsigned int queue, u32 val) | 87 | static inline void qmgr_put_entry(unsigned int queue, u32 val) |
88 | { | 88 | { |
89 | extern struct qmgr_regs __iomem *qmgr_regs; | 89 | struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
90 | #if DEBUG_QMGR | 90 | #if DEBUG_QMGR |
91 | BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */ | 91 | BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */ |
92 | 92 | ||
@@ -99,7 +99,7 @@ static inline void qmgr_put_entry(unsigned int queue, u32 val) | |||
99 | static inline u32 qmgr_get_entry(unsigned int queue) | 99 | static inline u32 qmgr_get_entry(unsigned int queue) |
100 | { | 100 | { |
101 | u32 val; | 101 | u32 val; |
102 | extern struct qmgr_regs __iomem *qmgr_regs; | 102 | const struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
103 | val = __raw_readl(&qmgr_regs->acc[queue][0]); | 103 | val = __raw_readl(&qmgr_regs->acc[queue][0]); |
104 | #if DEBUG_QMGR | 104 | #if DEBUG_QMGR |
105 | BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */ | 105 | BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */ |
@@ -112,14 +112,14 @@ static inline u32 qmgr_get_entry(unsigned int queue) | |||
112 | 112 | ||
113 | static inline int __qmgr_get_stat1(unsigned int queue) | 113 | static inline int __qmgr_get_stat1(unsigned int queue) |
114 | { | 114 | { |
115 | extern struct qmgr_regs __iomem *qmgr_regs; | 115 | const struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
116 | return (__raw_readl(&qmgr_regs->stat1[queue >> 3]) | 116 | return (__raw_readl(&qmgr_regs->stat1[queue >> 3]) |
117 | >> ((queue & 7) << 2)) & 0xF; | 117 | >> ((queue & 7) << 2)) & 0xF; |
118 | } | 118 | } |
119 | 119 | ||
120 | static inline int __qmgr_get_stat2(unsigned int queue) | 120 | static inline int __qmgr_get_stat2(unsigned int queue) |
121 | { | 121 | { |
122 | extern struct qmgr_regs __iomem *qmgr_regs; | 122 | const struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
123 | BUG_ON(queue >= HALF_QUEUES); | 123 | BUG_ON(queue >= HALF_QUEUES); |
124 | return (__raw_readl(&qmgr_regs->stat2[queue >> 4]) | 124 | return (__raw_readl(&qmgr_regs->stat2[queue >> 4]) |
125 | >> ((queue & 0xF) << 1)) & 0x3; | 125 | >> ((queue & 0xF) << 1)) & 0x3; |
@@ -145,7 +145,7 @@ static inline int qmgr_stat_empty(unsigned int queue) | |||
145 | */ | 145 | */ |
146 | static inline int qmgr_stat_below_low_watermark(unsigned int queue) | 146 | static inline int qmgr_stat_below_low_watermark(unsigned int queue) |
147 | { | 147 | { |
148 | extern struct qmgr_regs __iomem *qmgr_regs; | 148 | const struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
149 | if (queue >= HALF_QUEUES) | 149 | if (queue >= HALF_QUEUES) |
150 | return (__raw_readl(&qmgr_regs->statne_h) >> | 150 | return (__raw_readl(&qmgr_regs->statne_h) >> |
151 | (queue - HALF_QUEUES)) & 0x01; | 151 | (queue - HALF_QUEUES)) & 0x01; |
@@ -172,7 +172,7 @@ static inline int qmgr_stat_above_high_watermark(unsigned int queue) | |||
172 | */ | 172 | */ |
173 | static inline int qmgr_stat_full(unsigned int queue) | 173 | static inline int qmgr_stat_full(unsigned int queue) |
174 | { | 174 | { |
175 | extern struct qmgr_regs __iomem *qmgr_regs; | 175 | const struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
176 | if (queue >= HALF_QUEUES) | 176 | if (queue >= HALF_QUEUES) |
177 | return (__raw_readl(&qmgr_regs->statf_h) >> | 177 | return (__raw_readl(&qmgr_regs->statf_h) >> |
178 | (queue - HALF_QUEUES)) & 0x01; | 178 | (queue - HALF_QUEUES)) & 0x01; |
diff --git a/arch/arm/mach-ixp4xx/include/mach/udc.h b/arch/arm/mach-ixp4xx/include/mach/udc.h index 80d6da2eafac..7bd8b96c8843 100644 --- a/arch/arm/mach-ixp4xx/include/mach/udc.h +++ b/arch/arm/mach-ixp4xx/include/mach/udc.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * arch/arm/mach-ixp4xx/include/mach/udc.h | 2 | * arch/arm/mach-ixp4xx/include/mach/udc.h |
3 | * | 3 | * |
4 | */ | 4 | */ |
5 | #include <asm/mach/udc_pxa2xx.h> | 5 | #include <linux/platform_data/pxa2xx_udc.h> |
6 | 6 | ||
7 | extern void ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info); | 7 | extern void ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info); |
8 | 8 | ||
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_npe.c b/arch/arm/mach-ixp4xx/ixp4xx_npe.c index a17ed79207a4..d4eb09a62863 100644 --- a/arch/arm/mach-ixp4xx/ixp4xx_npe.c +++ b/arch/arm/mach-ixp4xx/ixp4xx_npe.c | |||
@@ -116,7 +116,11 @@ | |||
116 | /* NPE mailbox_status value for reset */ | 116 | /* NPE mailbox_status value for reset */ |
117 | #define RESET_MBOX_STAT 0x0000F0F0 | 117 | #define RESET_MBOX_STAT 0x0000F0F0 |
118 | 118 | ||
119 | const char *npe_names[] = { "NPE-A", "NPE-B", "NPE-C" }; | 119 | #define NPE_A_FIRMWARE "NPE-A" |
120 | #define NPE_B_FIRMWARE "NPE-B" | ||
121 | #define NPE_C_FIRMWARE "NPE-C" | ||
122 | |||
123 | const char *npe_names[] = { NPE_A_FIRMWARE, NPE_B_FIRMWARE, NPE_C_FIRMWARE }; | ||
120 | 124 | ||
121 | #define print_npe(pri, npe, fmt, ...) \ | 125 | #define print_npe(pri, npe, fmt, ...) \ |
122 | printk(pri "%s: " fmt, npe_name(npe), ## __VA_ARGS__) | 126 | printk(pri "%s: " fmt, npe_name(npe), ## __VA_ARGS__) |
@@ -724,6 +728,9 @@ module_exit(npe_cleanup_module); | |||
724 | 728 | ||
725 | MODULE_AUTHOR("Krzysztof Halasa"); | 729 | MODULE_AUTHOR("Krzysztof Halasa"); |
726 | MODULE_LICENSE("GPL v2"); | 730 | MODULE_LICENSE("GPL v2"); |
731 | MODULE_FIRMWARE(NPE_A_FIRMWARE); | ||
732 | MODULE_FIRMWARE(NPE_B_FIRMWARE); | ||
733 | MODULE_FIRMWARE(NPE_C_FIRMWARE); | ||
727 | 734 | ||
728 | EXPORT_SYMBOL(npe_names); | 735 | EXPORT_SYMBOL(npe_names); |
729 | EXPORT_SYMBOL(npe_running); | 736 | EXPORT_SYMBOL(npe_running); |
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c index 852f7c9f87d0..9d1b6b7c394c 100644 --- a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c +++ b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <mach/qmgr.h> | 15 | #include <mach/qmgr.h> |
16 | 16 | ||
17 | struct qmgr_regs __iomem *qmgr_regs; | 17 | static struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
18 | static struct resource *mem_res; | 18 | static struct resource *mem_res; |
19 | static spinlock_t qmgr_lock; | 19 | static spinlock_t qmgr_lock; |
20 | static u32 used_sram_bitmap[4]; /* 128 16-dword pages */ | 20 | static u32 used_sram_bitmap[4]; /* 128 16-dword pages */ |
@@ -293,12 +293,6 @@ static int qmgr_init(void) | |||
293 | if (mem_res == NULL) | 293 | if (mem_res == NULL) |
294 | return -EBUSY; | 294 | return -EBUSY; |
295 | 295 | ||
296 | qmgr_regs = ioremap(IXP4XX_QMGR_BASE_PHYS, IXP4XX_QMGR_REGION_SIZE); | ||
297 | if (qmgr_regs == NULL) { | ||
298 | err = -ENOMEM; | ||
299 | goto error_map; | ||
300 | } | ||
301 | |||
302 | /* reset qmgr registers */ | 296 | /* reset qmgr registers */ |
303 | for (i = 0; i < 4; i++) { | 297 | for (i = 0; i < 4; i++) { |
304 | __raw_writel(0x33333333, &qmgr_regs->stat1[i]); | 298 | __raw_writel(0x33333333, &qmgr_regs->stat1[i]); |
@@ -347,8 +341,6 @@ static int qmgr_init(void) | |||
347 | error_irq2: | 341 | error_irq2: |
348 | free_irq(IRQ_IXP4XX_QM1, NULL); | 342 | free_irq(IRQ_IXP4XX_QM1, NULL); |
349 | error_irq: | 343 | error_irq: |
350 | iounmap(qmgr_regs); | ||
351 | error_map: | ||
352 | release_mem_region(IXP4XX_QMGR_BASE_PHYS, IXP4XX_QMGR_REGION_SIZE); | 344 | release_mem_region(IXP4XX_QMGR_BASE_PHYS, IXP4XX_QMGR_REGION_SIZE); |
353 | return err; | 345 | return err; |
354 | } | 346 | } |
@@ -359,7 +351,6 @@ static void qmgr_remove(void) | |||
359 | free_irq(IRQ_IXP4XX_QM2, NULL); | 351 | free_irq(IRQ_IXP4XX_QM2, NULL); |
360 | synchronize_irq(IRQ_IXP4XX_QM1); | 352 | synchronize_irq(IRQ_IXP4XX_QM1); |
361 | synchronize_irq(IRQ_IXP4XX_QM2); | 353 | synchronize_irq(IRQ_IXP4XX_QM2); |
362 | iounmap(qmgr_regs); | ||
363 | release_mem_region(IXP4XX_QMGR_BASE_PHYS, IXP4XX_QMGR_REGION_SIZE); | 354 | release_mem_region(IXP4XX_QMGR_BASE_PHYS, IXP4XX_QMGR_REGION_SIZE); |
364 | } | 355 | } |
365 | 356 | ||
@@ -369,7 +360,6 @@ module_exit(qmgr_remove); | |||
369 | MODULE_LICENSE("GPL v2"); | 360 | MODULE_LICENSE("GPL v2"); |
370 | MODULE_AUTHOR("Krzysztof Halasa"); | 361 | MODULE_AUTHOR("Krzysztof Halasa"); |
371 | 362 | ||
372 | EXPORT_SYMBOL(qmgr_regs); | ||
373 | EXPORT_SYMBOL(qmgr_set_irq); | 363 | EXPORT_SYMBOL(qmgr_set_irq); |
374 | EXPORT_SYMBOL(qmgr_enable_irq); | 364 | EXPORT_SYMBOL(qmgr_enable_irq); |
375 | EXPORT_SYMBOL(qmgr_disable_irq); | 365 | EXPORT_SYMBOL(qmgr_disable_irq); |
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c index 1e9f90ee0f5c..ef102646ba9a 100644 --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c | |||
@@ -208,14 +208,19 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) | |||
208 | return 1; | 208 | return 1; |
209 | } | 209 | } |
210 | 210 | ||
211 | /* | ||
212 | * The root complex has a hardwired class of PCI_CLASS_MEMORY_OTHER, when it | ||
213 | * is operating as a root complex this needs to be switched to | ||
214 | * PCI_CLASS_BRIDGE_HOST or Linux will errantly try to process the BAR's on | ||
215 | * the device. Decoding setup is handled by the orion code. | ||
216 | */ | ||
211 | static void __devinit rc_pci_fixup(struct pci_dev *dev) | 217 | static void __devinit rc_pci_fixup(struct pci_dev *dev) |
212 | { | 218 | { |
213 | /* | ||
214 | * Prevent enumeration of root complex. | ||
215 | */ | ||
216 | if (dev->bus->parent == NULL && dev->devfn == 0) { | 219 | if (dev->bus->parent == NULL && dev->devfn == 0) { |
217 | int i; | 220 | int i; |
218 | 221 | ||
222 | dev->class &= 0xff; | ||
223 | dev->class |= PCI_CLASS_BRIDGE_HOST << 8; | ||
219 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | 224 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { |
220 | dev->resource[i].start = 0; | 225 | dev->resource[i].start = 0; |
221 | dev->resource[i].end = 0; | 226 | dev->resource[i].end = 0; |
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c index bfa1eab91f41..22ef8a1abe08 100644 --- a/arch/arm/mach-nomadik/board-nhk8815.c +++ b/arch/arm/mach-nomadik/board-nhk8815.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/pinctrl/machine.h> | 26 | #include <linux/pinctrl/machine.h> |
27 | #include <linux/platform_data/pinctrl-nomadik.h> | ||
27 | #include <asm/hardware/vic.h> | 28 | #include <asm/hardware/vic.h> |
28 | #include <asm/sizes.h> | 29 | #include <asm/sizes.h> |
29 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
@@ -32,9 +33,7 @@ | |||
32 | #include <asm/mach/flash.h> | 33 | #include <asm/mach/flash.h> |
33 | #include <asm/mach/time.h> | 34 | #include <asm/mach/time.h> |
34 | 35 | ||
35 | #include <plat/gpio-nomadik.h> | ||
36 | #include <plat/mtu.h> | 36 | #include <plat/mtu.h> |
37 | #include <plat/pincfg.h> | ||
38 | 37 | ||
39 | #include <linux/platform_data/mtd-nomadik-nand.h> | 38 | #include <linux/platform_data/mtd-nomadik-nand.h> |
40 | #include <mach/fsmc.h> | 39 | #include <mach/fsmc.h> |
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index b617eaed0ce5..1273931303fb 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c | |||
@@ -26,8 +26,8 @@ | |||
26 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
27 | #include <linux/dma-mapping.h> | 27 | #include <linux/dma-mapping.h> |
28 | #include <linux/platform_data/clk-nomadik.h> | 28 | #include <linux/platform_data/clk-nomadik.h> |
29 | #include <linux/platform_data/pinctrl-nomadik.h> | ||
29 | 30 | ||
30 | #include <plat/gpio-nomadik.h> | ||
31 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
32 | #include <mach/irqs.h> | 32 | #include <mach/irqs.h> |
33 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-nomadik/i2c-8815nhk.c b/arch/arm/mach-nomadik/i2c-8815nhk.c index 6d14454d4609..0c2f6628299a 100644 --- a/arch/arm/mach-nomadik/i2c-8815nhk.c +++ b/arch/arm/mach-nomadik/i2c-8815nhk.c | |||
@@ -4,8 +4,7 @@ | |||
4 | #include <linux/i2c-algo-bit.h> | 4 | #include <linux/i2c-algo-bit.h> |
5 | #include <linux/i2c-gpio.h> | 5 | #include <linux/i2c-gpio.h> |
6 | #include <linux/platform_device.h> | 6 | #include <linux/platform_device.h> |
7 | #include <plat/gpio-nomadik.h> | 7 | #include <linux/platform_data/pinctrl-nomadik.h> |
8 | #include <plat/pincfg.h> | ||
9 | 8 | ||
10 | /* | 9 | /* |
11 | * There are two busses in the 8815NHK. | 10 | * There are two busses in the 8815NHK. |
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index aa6e4a19dd90..f0715a369c44 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -112,7 +112,7 @@ DT_MACHINE_START(OMAP3_GP_DT, "Generic OMAP3-GP (Flattened Device Tree)") | |||
112 | .init_machine = omap_generic_init, | 112 | .init_machine = omap_generic_init, |
113 | .timer = &omap3_secure_timer, | 113 | .timer = &omap3_secure_timer, |
114 | .dt_compat = omap3_gp_boards_compat, | 114 | .dt_compat = omap3_gp_boards_compat, |
115 | .restart = omap_prcm_restart, | 115 | .restart = omap3xxx_restart, |
116 | MACHINE_END | 116 | MACHINE_END |
117 | #endif | 117 | #endif |
118 | 118 | ||
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 3bbcde87dead..948bcaa82eb6 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
@@ -214,6 +214,9 @@ static inline void __iomem *omap4_get_scu_base(void) | |||
214 | #endif | 214 | #endif |
215 | 215 | ||
216 | extern void __init gic_init_irq(void); | 216 | extern void __init gic_init_irq(void); |
217 | extern void gic_dist_disable(void); | ||
218 | extern bool gic_dist_disabled(void); | ||
219 | extern void gic_timer_retrigger(void); | ||
217 | extern void omap_smc1(u32 fn, u32 arg); | 220 | extern void omap_smc1(u32 fn, u32 arg); |
218 | extern void __iomem *omap4_get_sar_ram_base(void); | 221 | extern void __iomem *omap4_get_sar_ram_base(void); |
219 | extern void omap_do_wfi(void); | 222 | extern void omap_do_wfi(void); |
@@ -221,6 +224,7 @@ extern void omap_do_wfi(void); | |||
221 | #ifdef CONFIG_SMP | 224 | #ifdef CONFIG_SMP |
222 | /* Needed for secondary core boot */ | 225 | /* Needed for secondary core boot */ |
223 | extern void omap_secondary_startup(void); | 226 | extern void omap_secondary_startup(void); |
227 | extern void omap_secondary_startup_4460(void); | ||
224 | extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask); | 228 | extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask); |
225 | extern void omap_auxcoreboot_addr(u32 cpu_addr); | 229 | extern void omap_auxcoreboot_addr(u32 cpu_addr); |
226 | extern u32 omap_read_auxcoreboot0(void); | 230 | extern u32 omap_read_auxcoreboot0(void); |
diff --git a/arch/arm/mach-omap2/drm.c b/arch/arm/mach-omap2/drm.c index 6282cc826613..fce5aa3fff49 100644 --- a/arch/arm/mach-omap2/drm.c +++ b/arch/arm/mach-omap2/drm.c | |||
@@ -23,15 +23,20 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
26 | #include <linux/platform_data/omap_drm.h> | ||
26 | 27 | ||
27 | #include "omap_device.h" | 28 | #include "omap_device.h" |
28 | #include "omap_hwmod.h" | 29 | #include "omap_hwmod.h" |
30 | #include <plat/cpu.h> | ||
29 | 31 | ||
30 | #if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE) | 32 | #if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE) |
31 | 33 | ||
34 | static struct omap_drm_platform_data platform_data; | ||
35 | |||
32 | static struct platform_device omap_drm_device = { | 36 | static struct platform_device omap_drm_device = { |
33 | .dev = { | 37 | .dev = { |
34 | .coherent_dma_mask = DMA_BIT_MASK(32), | 38 | .coherent_dma_mask = DMA_BIT_MASK(32), |
39 | .platform_data = &platform_data, | ||
35 | }, | 40 | }, |
36 | .name = "omapdrm", | 41 | .name = "omapdrm", |
37 | .id = 0, | 42 | .id = 0, |
@@ -52,6 +57,8 @@ static int __init omap_init_drm(void) | |||
52 | oh->name); | 57 | oh->name); |
53 | } | 58 | } |
54 | 59 | ||
60 | platform_data.omaprev = GET_OMAP_REVISION(); | ||
61 | |||
55 | return platform_device_register(&omap_drm_device); | 62 | return platform_device_register(&omap_drm_device); |
56 | 63 | ||
57 | } | 64 | } |
diff --git a/arch/arm/mach-omap2/omap-headsmp.S b/arch/arm/mach-omap2/omap-headsmp.S index 502e3135aad3..0ea09faf327b 100644 --- a/arch/arm/mach-omap2/omap-headsmp.S +++ b/arch/arm/mach-omap2/omap-headsmp.S | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <linux/linkage.h> | 18 | #include <linux/linkage.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | 20 | ||
21 | #include "omap44xx.h" | ||
22 | |||
21 | __CPUINIT | 23 | __CPUINIT |
22 | 24 | ||
23 | /* Physical address needed since MMU not enabled yet on secondary core */ | 25 | /* Physical address needed since MMU not enabled yet on secondary core */ |
@@ -64,3 +66,39 @@ hold: ldr r12,=0x103 | |||
64 | b secondary_startup | 66 | b secondary_startup |
65 | ENDPROC(omap_secondary_startup) | 67 | ENDPROC(omap_secondary_startup) |
66 | 68 | ||
69 | ENTRY(omap_secondary_startup_4460) | ||
70 | hold_2: ldr r12,=0x103 | ||
71 | dsb | ||
72 | smc #0 @ read from AuxCoreBoot0 | ||
73 | mov r0, r0, lsr #9 | ||
74 | mrc p15, 0, r4, c0, c0, 5 | ||
75 | and r4, r4, #0x0f | ||
76 | cmp r0, r4 | ||
77 | bne hold_2 | ||
78 | |||
79 | /* | ||
80 | * GIC distributor control register has changed between | ||
81 | * CortexA9 r1pX and r2pX. The Control Register secure | ||
82 | * banked version is now composed of 2 bits: | ||
83 | * bit 0 == Secure Enable | ||
84 | * bit 1 == Non-Secure Enable | ||
85 | * The Non-Secure banked register has not changed | ||
86 | * Because the ROM Code is based on the r1pX GIC, the CPU1 | ||
87 | * GIC restoration will cause a problem to CPU0 Non-Secure SW. | ||
88 | * The workaround must be: | ||
89 | * 1) Before doing the CPU1 wakeup, CPU0 must disable | ||
90 | * the GIC distributor | ||
91 | * 2) CPU1 must re-enable the GIC distributor on | ||
92 | * it's wakeup path. | ||
93 | */ | ||
94 | ldr r1, =OMAP44XX_GIC_DIST_BASE | ||
95 | ldr r0, [r1] | ||
96 | orr r0, #1 | ||
97 | str r0, [r1] | ||
98 | |||
99 | /* | ||
100 | * we've been released from the wait loop,secondary_stack | ||
101 | * should now contain the SVC stack for this core | ||
102 | */ | ||
103 | b secondary_startup | ||
104 | ENDPROC(omap_secondary_startup_4460) | ||
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c index 3f5fd7e3549d..aac46bfdbeb2 100644 --- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c +++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c | |||
@@ -68,6 +68,7 @@ struct omap4_cpu_pm_info { | |||
68 | void __iomem *scu_sar_addr; | 68 | void __iomem *scu_sar_addr; |
69 | void __iomem *wkup_sar_addr; | 69 | void __iomem *wkup_sar_addr; |
70 | void __iomem *l2x0_sar_addr; | 70 | void __iomem *l2x0_sar_addr; |
71 | void (*secondary_startup)(void); | ||
71 | }; | 72 | }; |
72 | 73 | ||
73 | static DEFINE_PER_CPU(struct omap4_cpu_pm_info, omap4_pm_info); | 74 | static DEFINE_PER_CPU(struct omap4_cpu_pm_info, omap4_pm_info); |
@@ -300,6 +301,7 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state) | |||
300 | int __cpuinit omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state) | 301 | int __cpuinit omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state) |
301 | { | 302 | { |
302 | unsigned int cpu_state = 0; | 303 | unsigned int cpu_state = 0; |
304 | struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu); | ||
303 | 305 | ||
304 | if (omap_rev() == OMAP4430_REV_ES1_0) | 306 | if (omap_rev() == OMAP4430_REV_ES1_0) |
305 | return -ENXIO; | 307 | return -ENXIO; |
@@ -309,7 +311,7 @@ int __cpuinit omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state) | |||
309 | 311 | ||
310 | clear_cpu_prev_pwrst(cpu); | 312 | clear_cpu_prev_pwrst(cpu); |
311 | set_cpu_next_pwrst(cpu, power_state); | 313 | set_cpu_next_pwrst(cpu, power_state); |
312 | set_cpu_wakeup_addr(cpu, virt_to_phys(omap_secondary_startup)); | 314 | set_cpu_wakeup_addr(cpu, virt_to_phys(pm_info->secondary_startup)); |
313 | scu_pwrst_prepare(cpu, power_state); | 315 | scu_pwrst_prepare(cpu, power_state); |
314 | 316 | ||
315 | /* | 317 | /* |
@@ -360,6 +362,11 @@ int __init omap4_mpuss_init(void) | |||
360 | pm_info->scu_sar_addr = sar_base + SCU_OFFSET1; | 362 | pm_info->scu_sar_addr = sar_base + SCU_OFFSET1; |
361 | pm_info->wkup_sar_addr = sar_base + CPU1_WAKEUP_NS_PA_ADDR_OFFSET; | 363 | pm_info->wkup_sar_addr = sar_base + CPU1_WAKEUP_NS_PA_ADDR_OFFSET; |
362 | pm_info->l2x0_sar_addr = sar_base + L2X0_SAVE_OFFSET1; | 364 | pm_info->l2x0_sar_addr = sar_base + L2X0_SAVE_OFFSET1; |
365 | if (cpu_is_omap446x()) | ||
366 | pm_info->secondary_startup = omap_secondary_startup_4460; | ||
367 | else | ||
368 | pm_info->secondary_startup = omap_secondary_startup; | ||
369 | |||
363 | pm_info->pwrdm = pwrdm_lookup("cpu1_pwrdm"); | 370 | pm_info->pwrdm = pwrdm_lookup("cpu1_pwrdm"); |
364 | if (!pm_info->pwrdm) { | 371 | if (!pm_info->pwrdm) { |
365 | pr_err("Lookup failed for CPU1 pwrdm\n"); | 372 | pr_err("Lookup failed for CPU1 pwrdm\n"); |
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c index 4d05fa8a4e48..cd42d921940d 100644 --- a/arch/arm/mach-omap2/omap-smp.c +++ b/arch/arm/mach-omap2/omap-smp.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "iomap.h" | 32 | #include "iomap.h" |
33 | #include "common.h" | 33 | #include "common.h" |
34 | #include "clockdomain.h" | 34 | #include "clockdomain.h" |
35 | #include "pm.h" | ||
35 | 36 | ||
36 | #define CPU_MASK 0xff0ffff0 | 37 | #define CPU_MASK 0xff0ffff0 |
37 | #define CPU_CORTEX_A9 0x410FC090 | 38 | #define CPU_CORTEX_A9 0x410FC090 |
@@ -39,6 +40,8 @@ | |||
39 | 40 | ||
40 | #define OMAP5_CORE_COUNT 0x2 | 41 | #define OMAP5_CORE_COUNT 0x2 |
41 | 42 | ||
43 | u16 pm44xx_errata; | ||
44 | |||
42 | /* SCU base address */ | 45 | /* SCU base address */ |
43 | static void __iomem *scu_base; | 46 | static void __iomem *scu_base; |
44 | 47 | ||
@@ -118,8 +121,37 @@ static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct * | |||
118 | * 4.3.4.2 Power States of CPU0 and CPU1 | 121 | * 4.3.4.2 Power States of CPU0 and CPU1 |
119 | */ | 122 | */ |
120 | if (booted) { | 123 | if (booted) { |
124 | /* | ||
125 | * GIC distributor control register has changed between | ||
126 | * CortexA9 r1pX and r2pX. The Control Register secure | ||
127 | * banked version is now composed of 2 bits: | ||
128 | * bit 0 == Secure Enable | ||
129 | * bit 1 == Non-Secure Enable | ||
130 | * The Non-Secure banked register has not changed | ||
131 | * Because the ROM Code is based on the r1pX GIC, the CPU1 | ||
132 | * GIC restoration will cause a problem to CPU0 Non-Secure SW. | ||
133 | * The workaround must be: | ||
134 | * 1) Before doing the CPU1 wakeup, CPU0 must disable | ||
135 | * the GIC distributor | ||
136 | * 2) CPU1 must re-enable the GIC distributor on | ||
137 | * it's wakeup path. | ||
138 | */ | ||
139 | if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD)) { | ||
140 | local_irq_disable(); | ||
141 | gic_dist_disable(); | ||
142 | } | ||
143 | |||
121 | clkdm_wakeup(cpu1_clkdm); | 144 | clkdm_wakeup(cpu1_clkdm); |
122 | clkdm_allow_idle(cpu1_clkdm); | 145 | clkdm_allow_idle(cpu1_clkdm); |
146 | |||
147 | if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD)) { | ||
148 | while (gic_dist_disabled()) { | ||
149 | udelay(1); | ||
150 | cpu_relax(); | ||
151 | } | ||
152 | gic_timer_retrigger(); | ||
153 | local_irq_enable(); | ||
154 | } | ||
123 | } else { | 155 | } else { |
124 | dsb_sev(); | 156 | dsb_sev(); |
125 | booted = true; | 157 | booted = true; |
@@ -138,7 +170,14 @@ static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct * | |||
138 | 170 | ||
139 | static void __init wakeup_secondary(void) | 171 | static void __init wakeup_secondary(void) |
140 | { | 172 | { |
173 | void *startup_addr = omap_secondary_startup; | ||
141 | void __iomem *base = omap_get_wakeupgen_base(); | 174 | void __iomem *base = omap_get_wakeupgen_base(); |
175 | |||
176 | if (cpu_is_omap446x()) { | ||
177 | startup_addr = omap_secondary_startup_4460; | ||
178 | pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD; | ||
179 | } | ||
180 | |||
142 | /* | 181 | /* |
143 | * Write the address of secondary startup routine into the | 182 | * Write the address of secondary startup routine into the |
144 | * AuxCoreBoot1 where ROM code will jump and start executing | 183 | * AuxCoreBoot1 where ROM code will jump and start executing |
@@ -146,7 +185,7 @@ static void __init wakeup_secondary(void) | |||
146 | * A barrier is added to ensure that write buffer is drained | 185 | * A barrier is added to ensure that write buffer is drained |
147 | */ | 186 | */ |
148 | if (omap_secure_apis_support()) | 187 | if (omap_secure_apis_support()) |
149 | omap_auxcoreboot_addr(virt_to_phys(omap_secondary_startup)); | 188 | omap_auxcoreboot_addr(virt_to_phys(startup_addr)); |
150 | else | 189 | else |
151 | __raw_writel(virt_to_phys(omap5_secondary_startup), | 190 | __raw_writel(virt_to_phys(omap5_secondary_startup), |
152 | base + OMAP_AUX_CORE_BOOT_1); | 191 | base + OMAP_AUX_CORE_BOOT_1); |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 5695885ea340..6897ae21bb82 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/irq.h> | ||
17 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
18 | #include <linux/memblock.h> | 19 | #include <linux/memblock.h> |
19 | #include <linux/of_irq.h> | 20 | #include <linux/of_irq.h> |
@@ -24,6 +25,7 @@ | |||
24 | #include <asm/hardware/cache-l2x0.h> | 25 | #include <asm/hardware/cache-l2x0.h> |
25 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
26 | #include <asm/memblock.h> | 27 | #include <asm/memblock.h> |
28 | #include <asm/smp_twd.h> | ||
27 | 29 | ||
28 | #include "omap-wakeupgen.h" | 30 | #include "omap-wakeupgen.h" |
29 | #include "soc.h" | 31 | #include "soc.h" |
@@ -42,6 +44,10 @@ static void __iomem *l2cache_base; | |||
42 | #endif | 44 | #endif |
43 | 45 | ||
44 | static void __iomem *sar_ram_base; | 46 | static void __iomem *sar_ram_base; |
47 | static void __iomem *gic_dist_base_addr; | ||
48 | static void __iomem *twd_base; | ||
49 | |||
50 | #define IRQ_LOCALTIMER 29 | ||
45 | 51 | ||
46 | #ifdef CONFIG_OMAP4_ERRATA_I688 | 52 | #ifdef CONFIG_OMAP4_ERRATA_I688 |
47 | /* Used to implement memory barrier on DRAM path */ | 53 | /* Used to implement memory barrier on DRAM path */ |
@@ -96,12 +102,14 @@ void __init omap_barriers_init(void) | |||
96 | void __init gic_init_irq(void) | 102 | void __init gic_init_irq(void) |
97 | { | 103 | { |
98 | void __iomem *omap_irq_base; | 104 | void __iomem *omap_irq_base; |
99 | void __iomem *gic_dist_base_addr; | ||
100 | 105 | ||
101 | /* Static mapping, never released */ | 106 | /* Static mapping, never released */ |
102 | gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K); | 107 | gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K); |
103 | BUG_ON(!gic_dist_base_addr); | 108 | BUG_ON(!gic_dist_base_addr); |
104 | 109 | ||
110 | twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_4K); | ||
111 | BUG_ON(!twd_base); | ||
112 | |||
105 | /* Static mapping, never released */ | 113 | /* Static mapping, never released */ |
106 | omap_irq_base = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512); | 114 | omap_irq_base = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512); |
107 | BUG_ON(!omap_irq_base); | 115 | BUG_ON(!omap_irq_base); |
@@ -111,6 +119,38 @@ void __init gic_init_irq(void) | |||
111 | gic_init(0, 29, gic_dist_base_addr, omap_irq_base); | 119 | gic_init(0, 29, gic_dist_base_addr, omap_irq_base); |
112 | } | 120 | } |
113 | 121 | ||
122 | void gic_dist_disable(void) | ||
123 | { | ||
124 | if (gic_dist_base_addr) | ||
125 | __raw_writel(0x0, gic_dist_base_addr + GIC_DIST_CTRL); | ||
126 | } | ||
127 | |||
128 | bool gic_dist_disabled(void) | ||
129 | { | ||
130 | return !(__raw_readl(gic_dist_base_addr + GIC_DIST_CTRL) & 0x1); | ||
131 | } | ||
132 | |||
133 | void gic_timer_retrigger(void) | ||
134 | { | ||
135 | u32 twd_int = __raw_readl(twd_base + TWD_TIMER_INTSTAT); | ||
136 | u32 gic_int = __raw_readl(gic_dist_base_addr + GIC_DIST_PENDING_SET); | ||
137 | u32 twd_ctrl = __raw_readl(twd_base + TWD_TIMER_CONTROL); | ||
138 | |||
139 | if (twd_int && !(gic_int & BIT(IRQ_LOCALTIMER))) { | ||
140 | /* | ||
141 | * The local timer interrupt got lost while the distributor was | ||
142 | * disabled. Ack the pending interrupt, and retrigger it. | ||
143 | */ | ||
144 | pr_warn("%s: lost localtimer interrupt\n", __func__); | ||
145 | __raw_writel(1, twd_base + TWD_TIMER_INTSTAT); | ||
146 | if (!(twd_ctrl & TWD_TIMER_CONTROL_PERIODIC)) { | ||
147 | __raw_writel(1, twd_base + TWD_TIMER_COUNTER); | ||
148 | twd_ctrl |= TWD_TIMER_CONTROL_ENABLE; | ||
149 | __raw_writel(twd_ctrl, twd_base + TWD_TIMER_CONTROL); | ||
150 | } | ||
151 | } | ||
152 | } | ||
153 | |||
114 | #ifdef CONFIG_CACHE_L2X0 | 154 | #ifdef CONFIG_CACHE_L2X0 |
115 | 155 | ||
116 | void __iomem *omap4_get_l2cache_base(void) | 156 | void __iomem *omap4_get_l2cache_base(void) |
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 67d66131cfa7..fc3c96d5e013 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h | |||
@@ -102,6 +102,15 @@ extern void enable_omap3630_toggle_l2_on_restore(void); | |||
102 | static inline void enable_omap3630_toggle_l2_on_restore(void) { } | 102 | static inline void enable_omap3630_toggle_l2_on_restore(void) { } |
103 | #endif /* defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) */ | 103 | #endif /* defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) */ |
104 | 104 | ||
105 | #define PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD (1 << 0) | ||
106 | |||
107 | #if defined(CONFIG_ARCH_OMAP4) | ||
108 | extern u16 pm44xx_errata; | ||
109 | #define IS_PM44XX_ERRATUM(id) (pm44xx_errata & (id)) | ||
110 | #else | ||
111 | #define IS_PM44XX_ERRATUM(id) 0 | ||
112 | #endif | ||
113 | |||
105 | #ifdef CONFIG_POWER_AVS_OMAP | 114 | #ifdef CONFIG_POWER_AVS_OMAP |
106 | extern int omap_devinit_smartreflex(void); | 115 | extern int omap_devinit_smartreflex(void); |
107 | extern void omap_enable_smartreflex_on_init(void); | 116 | extern void omap_enable_smartreflex_on_init(void); |
diff --git a/arch/arm/mach-omap2/pmu.c b/arch/arm/mach-omap2/pmu.c index 3cf79b54ce61..250d909e38bd 100644 --- a/arch/arm/mach-omap2/pmu.c +++ b/arch/arm/mach-omap2/pmu.c | |||
@@ -58,8 +58,6 @@ static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[]) | |||
58 | if (IS_ERR(omap_pmu_dev)) | 58 | if (IS_ERR(omap_pmu_dev)) |
59 | return PTR_ERR(omap_pmu_dev); | 59 | return PTR_ERR(omap_pmu_dev); |
60 | 60 | ||
61 | pm_runtime_enable(&omap_pmu_dev->dev); | ||
62 | |||
63 | return 0; | 61 | return 0; |
64 | } | 62 | } |
65 | 63 | ||
diff --git a/arch/arm/mach-pxa/include/mach/udc.h b/arch/arm/mach-pxa/include/mach/udc.h index 2f82332e81a0..9a827e32db98 100644 --- a/arch/arm/mach-pxa/include/mach/udc.h +++ b/arch/arm/mach-pxa/include/mach/udc.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * arch/arm/mach-pxa/include/mach/udc.h | 2 | * arch/arm/mach-pxa/include/mach/udc.h |
3 | * | 3 | * |
4 | */ | 4 | */ |
5 | #include <asm/mach/udc_pxa2xx.h> | 5 | #include <linux/platform_data/pxa2xx_udc.h> |
6 | 6 | ||
7 | extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info); | 7 | extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info); |
8 | 8 | ||
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 3352b37b60cf..3f5171eaf67b 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -209,6 +209,7 @@ static struct clk_lookup pxa25x_clkregs[] = { | |||
209 | INIT_CLKREG(&clk_pxa25x_gpio12, NULL, "GPIO12_CLK"), | 209 | INIT_CLKREG(&clk_pxa25x_gpio12, NULL, "GPIO12_CLK"), |
210 | INIT_CLKREG(&clk_pxa25x_mem, "pxa2xx-pcmcia", NULL), | 210 | INIT_CLKREG(&clk_pxa25x_mem, "pxa2xx-pcmcia", NULL), |
211 | INIT_CLKREG(&clk_dummy, "pxa-gpio", NULL), | 211 | INIT_CLKREG(&clk_dummy, "pxa-gpio", NULL), |
212 | INIT_CLKREG(&clk_dummy, "sa1100-rtc", NULL), | ||
212 | }; | 213 | }; |
213 | 214 | ||
214 | static struct clk_lookup pxa25x_hwuart_clkreg = | 215 | static struct clk_lookup pxa25x_hwuart_clkreg = |
@@ -338,6 +339,10 @@ void __init pxa25x_map_io(void) | |||
338 | pxa25x_get_clk_frequency_khz(1); | 339 | pxa25x_get_clk_frequency_khz(1); |
339 | } | 340 | } |
340 | 341 | ||
342 | static struct pxa_gpio_platform_data pxa25x_gpio_info __initdata = { | ||
343 | .gpio_set_wake = gpio_set_wake, | ||
344 | }; | ||
345 | |||
341 | static struct platform_device *pxa25x_devices[] __initdata = { | 346 | static struct platform_device *pxa25x_devices[] __initdata = { |
342 | &pxa25x_device_udc, | 347 | &pxa25x_device_udc, |
343 | &pxa_device_pmu, | 348 | &pxa_device_pmu, |
@@ -370,6 +375,7 @@ static int __init pxa25x_init(void) | |||
370 | register_syscore_ops(&pxa2xx_mfp_syscore_ops); | 375 | register_syscore_ops(&pxa2xx_mfp_syscore_ops); |
371 | register_syscore_ops(&pxa2xx_clock_syscore_ops); | 376 | register_syscore_ops(&pxa2xx_clock_syscore_ops); |
372 | 377 | ||
378 | pxa_register_device(&pxa_device_gpio, &pxa25x_gpio_info); | ||
373 | ret = platform_add_devices(pxa25x_devices, | 379 | ret = platform_add_devices(pxa25x_devices, |
374 | ARRAY_SIZE(pxa25x_devices)); | 380 | ARRAY_SIZE(pxa25x_devices)); |
375 | if (ret) | 381 | if (ret) |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index d3b3cd216d64..28511d43637a 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -467,6 +467,7 @@ static void __init realview_eb_init(void) | |||
467 | MACHINE_START(REALVIEW_EB, "ARM-RealView EB") | 467 | MACHINE_START(REALVIEW_EB, "ARM-RealView EB") |
468 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 468 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
469 | .atag_offset = 0x100, | 469 | .atag_offset = 0x100, |
470 | .smp = smp_ops(realview_smp_ops), | ||
470 | .fixup = realview_fixup, | 471 | .fixup = realview_fixup, |
471 | .map_io = realview_eb_map_io, | 472 | .map_io = realview_eb_map_io, |
472 | .init_early = realview_init_early, | 473 | .init_early = realview_init_early, |
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig index 2b6cb5f29c2d..d7a13d1771a3 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig | |||
@@ -400,7 +400,7 @@ config MACH_MINI2440 | |||
400 | bool "MINI2440 development board" | 400 | bool "MINI2440 development board" |
401 | select EEPROM_AT24 | 401 | select EEPROM_AT24 |
402 | select LEDS_CLASS | 402 | select LEDS_CLASS |
403 | select LEDS_TRIGGER | 403 | select LEDS_TRIGGERS |
404 | select LEDS_TRIGGER_BACKLIGHT | 404 | select LEDS_TRIGGER_BACKLIGHT |
405 | select NEW_LEDS | 405 | select NEW_LEDS |
406 | select S3C_DEV_NAND | 406 | select S3C_DEV_NAND |
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c index 6a7ad3c2a3fc..9a23739f7026 100644 --- a/arch/arm/mach-sa1100/assabet.c +++ b/arch/arm/mach-sa1100/assabet.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/ioport.h> | 16 | #include <linux/ioport.h> |
17 | #include <linux/platform_data/sa11x0-serial.h> | ||
17 | #include <linux/serial_core.h> | 18 | #include <linux/serial_core.h> |
18 | #include <linux/mfd/ucb1x00.h> | 19 | #include <linux/mfd/ucb1x00.h> |
19 | #include <linux/mtd/mtd.h> | 20 | #include <linux/mtd/mtd.h> |
@@ -37,7 +38,6 @@ | |||
37 | #include <asm/mach/flash.h> | 38 | #include <asm/mach/flash.h> |
38 | #include <asm/mach/irda.h> | 39 | #include <asm/mach/irda.h> |
39 | #include <asm/mach/map.h> | 40 | #include <asm/mach/map.h> |
40 | #include <asm/mach/serial_sa1100.h> | ||
41 | #include <mach/assabet.h> | 41 | #include <mach/assabet.h> |
42 | #include <linux/platform_data/mfd-mcp-sa11x0.h> | 42 | #include <linux/platform_data/mfd-mcp-sa11x0.h> |
43 | #include <mach/irqs.h> | 43 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c index 038df4894b0f..b2dadf3ea3df 100644 --- a/arch/arm/mach-sa1100/badge4.c +++ b/arch/arm/mach-sa1100/badge4.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/platform_data/sa11x0-serial.h> | ||
19 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
20 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
21 | #include <linux/tty.h> | 22 | #include <linux/tty.h> |
@@ -34,7 +35,6 @@ | |||
34 | #include <asm/mach/flash.h> | 35 | #include <asm/mach/flash.h> |
35 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
36 | #include <asm/hardware/sa1111.h> | 37 | #include <asm/hardware/sa1111.h> |
37 | #include <asm/mach/serial_sa1100.h> | ||
38 | 38 | ||
39 | #include <mach/badge4.h> | 39 | #include <mach/badge4.h> |
40 | 40 | ||
diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c index ad0eb08ea077..304bca4a07c0 100644 --- a/arch/arm/mach-sa1100/cerf.c +++ b/arch/arm/mach-sa1100/cerf.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/tty.h> | 15 | #include <linux/tty.h> |
16 | #include <linux/platform_data/sa11x0-serial.h> | ||
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
17 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
18 | #include <linux/mtd/mtd.h> | 19 | #include <linux/mtd/mtd.h> |
@@ -27,7 +28,6 @@ | |||
27 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/flash.h> | 29 | #include <asm/mach/flash.h> |
29 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
30 | #include <asm/mach/serial_sa1100.h> | ||
31 | 31 | ||
32 | #include <mach/cerf.h> | 32 | #include <mach/cerf.h> |
33 | #include <linux/platform_data/mfd-mcp-sa11x0.h> | 33 | #include <linux/platform_data/mfd-mcp-sa11x0.h> |
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index 170cb6107f68..45f424f5fca6 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/tty.h> | 22 | #include <linux/tty.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/platform_data/sa11x0-serial.h> | ||
24 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
25 | #include <linux/mfd/ucb1x00.h> | 26 | #include <linux/mfd/ucb1x00.h> |
26 | #include <linux/mtd/mtd.h> | 27 | #include <linux/mtd/mtd.h> |
@@ -40,7 +41,6 @@ | |||
40 | #include <asm/mach/arch.h> | 41 | #include <asm/mach/arch.h> |
41 | #include <asm/mach/flash.h> | 42 | #include <asm/mach/flash.h> |
42 | #include <asm/mach/map.h> | 43 | #include <asm/mach/map.h> |
43 | #include <asm/mach/serial_sa1100.h> | ||
44 | 44 | ||
45 | #include <asm/hardware/scoop.h> | 45 | #include <asm/hardware/scoop.h> |
46 | #include <asm/mach/sharpsl_param.h> | 46 | #include <asm/mach/sharpsl_param.h> |
diff --git a/arch/arm/mach-sa1100/h3xxx.c b/arch/arm/mach-sa1100/h3xxx.c index 63150e1ffe9e..f17e7382242a 100644 --- a/arch/arm/mach-sa1100/h3xxx.c +++ b/arch/arm/mach-sa1100/h3xxx.c | |||
@@ -17,12 +17,12 @@ | |||
17 | #include <linux/mfd/htc-egpio.h> | 17 | #include <linux/mfd/htc-egpio.h> |
18 | #include <linux/mtd/mtd.h> | 18 | #include <linux/mtd/mtd.h> |
19 | #include <linux/mtd/partitions.h> | 19 | #include <linux/mtd/partitions.h> |
20 | #include <linux/platform_data/sa11x0-serial.h> | ||
20 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
21 | #include <linux/serial_core.h> | 22 | #include <linux/serial_core.h> |
22 | 23 | ||
23 | #include <asm/mach/flash.h> | 24 | #include <asm/mach/flash.h> |
24 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
25 | #include <asm/mach/serial_sa1100.h> | ||
26 | 26 | ||
27 | #include <mach/h3xxx.h> | 27 | #include <mach/h3xxx.h> |
28 | 28 | ||
diff --git a/arch/arm/mach-sa1100/hackkit.c b/arch/arm/mach-sa1100/hackkit.c index fc106aab7c7e..d005939c41fc 100644 --- a/arch/arm/mach-sa1100/hackkit.c +++ b/arch/arm/mach-sa1100/hackkit.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/cpufreq.h> | 20 | #include <linux/cpufreq.h> |
21 | #include <linux/platform_data/sa11x0-serial.h> | ||
21 | #include <linux/serial_core.h> | 22 | #include <linux/serial_core.h> |
22 | #include <linux/mtd/mtd.h> | 23 | #include <linux/mtd/mtd.h> |
23 | #include <linux/mtd/partitions.h> | 24 | #include <linux/mtd/partitions.h> |
@@ -35,7 +36,6 @@ | |||
35 | #include <asm/mach/flash.h> | 36 | #include <asm/mach/flash.h> |
36 | #include <asm/mach/map.h> | 37 | #include <asm/mach/map.h> |
37 | #include <asm/mach/irq.h> | 38 | #include <asm/mach/irq.h> |
38 | #include <asm/mach/serial_sa1100.h> | ||
39 | 39 | ||
40 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
41 | #include <mach/irqs.h> | 41 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c index e3084f47027d..35cfc428b4d4 100644 --- a/arch/arm/mach-sa1100/jornada720.c +++ b/arch/arm/mach-sa1100/jornada720.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/tty.h> | 18 | #include <linux/tty.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/platform_data/sa11x0-serial.h> | ||
20 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
21 | #include <linux/ioport.h> | 22 | #include <linux/ioport.h> |
22 | #include <linux/mtd/mtd.h> | 23 | #include <linux/mtd/mtd.h> |
@@ -30,7 +31,6 @@ | |||
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/flash.h> | 32 | #include <asm/mach/flash.h> |
32 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
33 | #include <asm/mach/serial_sa1100.h> | ||
34 | 34 | ||
35 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
36 | #include <mach/irqs.h> | 36 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c index 3048b17e84c5..f69f78fc3ddd 100644 --- a/arch/arm/mach-sa1100/lart.c +++ b/arch/arm/mach-sa1100/lart.c | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/platform_data/sa11x0-serial.h> | ||
7 | #include <linux/tty.h> | 8 | #include <linux/tty.h> |
8 | #include <linux/gpio.h> | 9 | #include <linux/gpio.h> |
9 | #include <linux/leds.h> | 10 | #include <linux/leds.h> |
@@ -18,7 +19,6 @@ | |||
18 | 19 | ||
19 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
20 | #include <asm/mach/map.h> | 21 | #include <asm/mach/map.h> |
21 | #include <asm/mach/serial_sa1100.h> | ||
22 | #include <linux/platform_data/mfd-mcp-sa11x0.h> | 22 | #include <linux/platform_data/mfd-mcp-sa11x0.h> |
23 | #include <mach/irqs.h> | 23 | #include <mach/irqs.h> |
24 | 24 | ||
diff --git a/arch/arm/mach-sa1100/nanoengine.c b/arch/arm/mach-sa1100/nanoengine.c index 41f69d97066f..102e08f7b109 100644 --- a/arch/arm/mach-sa1100/nanoengine.c +++ b/arch/arm/mach-sa1100/nanoengine.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/platform_data/sa11x0-serial.h> | ||
16 | #include <linux/mtd/mtd.h> | 17 | #include <linux/mtd/mtd.h> |
17 | #include <linux/mtd/partitions.h> | 18 | #include <linux/mtd/partitions.h> |
18 | #include <linux/root_dev.h> | 19 | #include <linux/root_dev.h> |
@@ -24,7 +25,6 @@ | |||
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/flash.h> | 26 | #include <asm/mach/flash.h> |
26 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
27 | #include <asm/mach/serial_sa1100.h> | ||
28 | 28 | ||
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <mach/nanoengine.h> | 30 | #include <mach/nanoengine.h> |
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c index 266db873a4e4..88be0474f3d7 100644 --- a/arch/arm/mach-sa1100/neponset.c +++ b/arch/arm/mach-sa1100/neponset.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/irq.h> | 7 | #include <linux/irq.h> |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/platform_data/sa11x0-serial.h> | ||
10 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
11 | #include <linux/pm.h> | 12 | #include <linux/pm.h> |
12 | #include <linux/serial_core.h> | 13 | #include <linux/serial_core.h> |
@@ -14,7 +15,6 @@ | |||
14 | 15 | ||
15 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
16 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
17 | #include <asm/mach/serial_sa1100.h> | ||
18 | #include <asm/hardware/sa1111.h> | 18 | #include <asm/hardware/sa1111.h> |
19 | #include <asm/sizes.h> | 19 | #include <asm/sizes.h> |
20 | 20 | ||
diff --git a/arch/arm/mach-sa1100/pleb.c b/arch/arm/mach-sa1100/pleb.c index 37fe0a0a5369..c51bb63f90fb 100644 --- a/arch/arm/mach-sa1100/pleb.c +++ b/arch/arm/mach-sa1100/pleb.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/tty.h> | 7 | #include <linux/tty.h> |
8 | #include <linux/ioport.h> | 8 | #include <linux/ioport.h> |
9 | #include <linux/platform_data/sa11x0-serial.h> | ||
9 | #include <linux/platform_device.h> | 10 | #include <linux/platform_device.h> |
10 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
11 | #include <linux/io.h> | 12 | #include <linux/io.h> |
@@ -18,7 +19,6 @@ | |||
18 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
19 | #include <asm/mach/map.h> | 20 | #include <asm/mach/map.h> |
20 | #include <asm/mach/flash.h> | 21 | #include <asm/mach/flash.h> |
21 | #include <asm/mach/serial_sa1100.h> | ||
22 | #include <mach/irqs.h> | 22 | #include <mach/irqs.h> |
23 | 23 | ||
24 | #include "generic.h" | 24 | #include "generic.h" |
diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c index ff6b7b35bca9..6460d25fbb88 100644 --- a/arch/arm/mach-sa1100/shannon.c +++ b/arch/arm/mach-sa1100/shannon.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
6 | #include <linux/device.h> | 6 | #include <linux/device.h> |
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/platform_data/sa11x0-serial.h> | ||
8 | #include <linux/tty.h> | 9 | #include <linux/tty.h> |
9 | #include <linux/mtd/mtd.h> | 10 | #include <linux/mtd/mtd.h> |
10 | #include <linux/mtd/partitions.h> | 11 | #include <linux/mtd/partitions.h> |
@@ -18,7 +19,6 @@ | |||
18 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
19 | #include <asm/mach/flash.h> | 20 | #include <asm/mach/flash.h> |
20 | #include <asm/mach/map.h> | 21 | #include <asm/mach/map.h> |
21 | #include <asm/mach/serial_sa1100.h> | ||
22 | #include <linux/platform_data/mfd-mcp-sa11x0.h> | 22 | #include <linux/platform_data/mfd-mcp-sa11x0.h> |
23 | #include <mach/shannon.h> | 23 | #include <mach/shannon.h> |
24 | #include <mach/irqs.h> | 24 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c index 71790e581d93..6d65f65fcb23 100644 --- a/arch/arm/mach-sa1100/simpad.c +++ b/arch/arm/mach-sa1100/simpad.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/proc_fs.h> | 9 | #include <linux/proc_fs.h> |
10 | #include <linux/string.h> | 10 | #include <linux/string.h> |
11 | #include <linux/pm.h> | 11 | #include <linux/pm.h> |
12 | #include <linux/platform_data/sa11x0-serial.h> | ||
12 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
13 | #include <linux/mfd/ucb1x00.h> | 14 | #include <linux/mfd/ucb1x00.h> |
14 | #include <linux/mtd/mtd.h> | 15 | #include <linux/mtd/mtd.h> |
@@ -23,7 +24,6 @@ | |||
23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
24 | #include <asm/mach/flash.h> | 25 | #include <asm/mach/flash.h> |
25 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
26 | #include <asm/mach/serial_sa1100.h> | ||
27 | #include <linux/platform_data/mfd-mcp-sa11x0.h> | 27 | #include <linux/platform_data/mfd-mcp-sa11x0.h> |
28 | #include <mach/simpad.h> | 28 | #include <mach/simpad.h> |
29 | #include <mach/irqs.h> | 29 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index 0a43f3189c21..7a05de794a8c 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c | |||
@@ -548,7 +548,6 @@ static struct platform_device fsi_ak4648_device = { | |||
548 | /* I2C */ | 548 | /* I2C */ |
549 | static struct pcf857x_platform_data pcf8575_pdata = { | 549 | static struct pcf857x_platform_data pcf8575_pdata = { |
550 | .gpio_base = GPIO_PCF8575_BASE, | 550 | .gpio_base = GPIO_PCF8575_BASE, |
551 | .irq = intcs_evt2irq(0x3260), /* IRQ19 */ | ||
552 | }; | 551 | }; |
553 | 552 | ||
554 | static struct i2c_board_info i2c0_devices[] = { | 553 | static struct i2c_board_info i2c0_devices[] = { |
@@ -570,6 +569,7 @@ static struct i2c_board_info i2c1_devices[] = { | |||
570 | static struct i2c_board_info i2c3_devices[] = { | 569 | static struct i2c_board_info i2c3_devices[] = { |
571 | { | 570 | { |
572 | I2C_BOARD_INFO("pcf8575", 0x20), | 571 | I2C_BOARD_INFO("pcf8575", 0x20), |
572 | .irq = intcs_evt2irq(0x3260), /* IRQ19 */ | ||
573 | .platform_data = &pcf8575_pdata, | 573 | .platform_data = &pcf8575_pdata, |
574 | }, | 574 | }, |
575 | }; | 575 | }; |
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index d8632ebb1eaf..12f3994c43db 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c | |||
@@ -1443,8 +1443,6 @@ static struct platform_device pinctrl_device = { | |||
1443 | static struct u300_gpio_platform u300_gpio_plat = { | 1443 | static struct u300_gpio_platform u300_gpio_plat = { |
1444 | .ports = 7, | 1444 | .ports = 7, |
1445 | .gpio_base = 0, | 1445 | .gpio_base = 0, |
1446 | .gpio_irq_base = IRQ_U300_GPIO_BASE, | ||
1447 | .pinctrl_device = &pinctrl_device, | ||
1448 | }; | 1446 | }; |
1449 | 1447 | ||
1450 | static struct platform_device gpio_device = { | 1448 | static struct platform_device gpio_device = { |
@@ -1588,6 +1586,7 @@ static struct platform_device *platform_devs[] __initdata = { | |||
1588 | &i2c1_device, | 1586 | &i2c1_device, |
1589 | &keypad_device, | 1587 | &keypad_device, |
1590 | &rtc_device, | 1588 | &rtc_device, |
1589 | &pinctrl_device, | ||
1591 | &gpio_device, | 1590 | &gpio_device, |
1592 | &nand_device, | 1591 | &nand_device, |
1593 | &wdog_device, | 1592 | &wdog_device, |
@@ -1802,7 +1801,7 @@ MACHINE_START(U300, "Ericsson AB U335 S335/B335 Prototype Board") | |||
1802 | /* Maintainer: Linus Walleij <linus.walleij@stericsson.com> */ | 1801 | /* Maintainer: Linus Walleij <linus.walleij@stericsson.com> */ |
1803 | .atag_offset = 0x100, | 1802 | .atag_offset = 0x100, |
1804 | .map_io = u300_map_io, | 1803 | .map_io = u300_map_io, |
1805 | .nr_irqs = NR_IRQS_U300, | 1804 | .nr_irqs = 0, |
1806 | .init_irq = u300_init_irq, | 1805 | .init_irq = u300_init_irq, |
1807 | .handle_irq = vic_handle_irq, | 1806 | .handle_irq = vic_handle_irq, |
1808 | .timer = &u300_timer, | 1807 | .timer = &u300_timer, |
diff --git a/arch/arm/mach-u300/include/mach/irqs.h b/arch/arm/mach-u300/include/mach/irqs.h index e27425a63fa1..21d5e76a6cd3 100644 --- a/arch/arm/mach-u300/include/mach/irqs.h +++ b/arch/arm/mach-u300/include/mach/irqs.h | |||
@@ -12,79 +12,69 @@ | |||
12 | #ifndef __MACH_IRQS_H | 12 | #ifndef __MACH_IRQS_H |
13 | #define __MACH_IRQS_H | 13 | #define __MACH_IRQS_H |
14 | 14 | ||
15 | #define IRQ_U300_INTCON0_START 1 | 15 | #define IRQ_U300_INTCON0_START 32 |
16 | #define IRQ_U300_INTCON1_START 33 | 16 | #define IRQ_U300_INTCON1_START 64 |
17 | /* These are on INTCON0 - 30 lines */ | 17 | /* These are on INTCON0 - 30 lines */ |
18 | #define IRQ_U300_IRQ0_EXT 1 | 18 | #define IRQ_U300_IRQ0_EXT 32 |
19 | #define IRQ_U300_IRQ1_EXT 2 | 19 | #define IRQ_U300_IRQ1_EXT 33 |
20 | #define IRQ_U300_DMA 3 | 20 | #define IRQ_U300_DMA 34 |
21 | #define IRQ_U300_VIDEO_ENC_0 4 | 21 | #define IRQ_U300_VIDEO_ENC_0 35 |
22 | #define IRQ_U300_VIDEO_ENC_1 5 | 22 | #define IRQ_U300_VIDEO_ENC_1 36 |
23 | #define IRQ_U300_AAIF_RX 6 | 23 | #define IRQ_U300_AAIF_RX 37 |
24 | #define IRQ_U300_AAIF_TX 7 | 24 | #define IRQ_U300_AAIF_TX 38 |
25 | #define IRQ_U300_AAIF_VGPIO 8 | 25 | #define IRQ_U300_AAIF_VGPIO 39 |
26 | #define IRQ_U300_AAIF_WAKEUP 9 | 26 | #define IRQ_U300_AAIF_WAKEUP 40 |
27 | #define IRQ_U300_PCM_I2S0_FRAME 10 | 27 | #define IRQ_U300_PCM_I2S0_FRAME 41 |
28 | #define IRQ_U300_PCM_I2S0_FIFO 11 | 28 | #define IRQ_U300_PCM_I2S0_FIFO 42 |
29 | #define IRQ_U300_PCM_I2S1_FRAME 12 | 29 | #define IRQ_U300_PCM_I2S1_FRAME 43 |
30 | #define IRQ_U300_PCM_I2S1_FIFO 13 | 30 | #define IRQ_U300_PCM_I2S1_FIFO 44 |
31 | #define IRQ_U300_XGAM_GAMCON 14 | 31 | #define IRQ_U300_XGAM_GAMCON 45 |
32 | #define IRQ_U300_XGAM_CDI 15 | 32 | #define IRQ_U300_XGAM_CDI 46 |
33 | #define IRQ_U300_XGAM_CDICON 16 | 33 | #define IRQ_U300_XGAM_CDICON 47 |
34 | #define IRQ_U300_XGAM_PDI 18 | 34 | #define IRQ_U300_XGAM_PDI 49 |
35 | #define IRQ_U300_XGAM_PDICON 19 | 35 | #define IRQ_U300_XGAM_PDICON 50 |
36 | #define IRQ_U300_XGAM_GAMEACC 20 | 36 | #define IRQ_U300_XGAM_GAMEACC 51 |
37 | #define IRQ_U300_XGAM_MCIDCT 21 | 37 | #define IRQ_U300_XGAM_MCIDCT 52 |
38 | #define IRQ_U300_APEX 22 | 38 | #define IRQ_U300_APEX 53 |
39 | #define IRQ_U300_UART0 23 | 39 | #define IRQ_U300_UART0 54 |
40 | #define IRQ_U300_SPI 24 | 40 | #define IRQ_U300_SPI 55 |
41 | #define IRQ_U300_TIMER_APP_OS 25 | 41 | #define IRQ_U300_TIMER_APP_OS 56 |
42 | #define IRQ_U300_TIMER_APP_DD 26 | 42 | #define IRQ_U300_TIMER_APP_DD 57 |
43 | #define IRQ_U300_TIMER_APP_GP1 27 | 43 | #define IRQ_U300_TIMER_APP_GP1 58 |
44 | #define IRQ_U300_TIMER_APP_GP2 28 | 44 | #define IRQ_U300_TIMER_APP_GP2 59 |
45 | #define IRQ_U300_TIMER_OS 29 | 45 | #define IRQ_U300_TIMER_OS 60 |
46 | #define IRQ_U300_TIMER_MS 30 | 46 | #define IRQ_U300_TIMER_MS 61 |
47 | #define IRQ_U300_KEYPAD_KEYBF 31 | 47 | #define IRQ_U300_KEYPAD_KEYBF 62 |
48 | #define IRQ_U300_KEYPAD_KEYBR 32 | 48 | #define IRQ_U300_KEYPAD_KEYBR 63 |
49 | /* These are on INTCON1 - 32 lines */ | 49 | /* These are on INTCON1 - 32 lines */ |
50 | #define IRQ_U300_GPIO_PORT0 33 | 50 | #define IRQ_U300_GPIO_PORT0 64 |
51 | #define IRQ_U300_GPIO_PORT1 34 | 51 | #define IRQ_U300_GPIO_PORT1 65 |
52 | #define IRQ_U300_GPIO_PORT2 35 | 52 | #define IRQ_U300_GPIO_PORT2 66 |
53 | 53 | ||
54 | /* These are for DB3150, DB3200 and DB3350 */ | 54 | /* These are for DB3150, DB3200 and DB3350 */ |
55 | #define IRQ_U300_WDOG 36 | 55 | #define IRQ_U300_WDOG 67 |
56 | #define IRQ_U300_EVHIST 37 | 56 | #define IRQ_U300_EVHIST 68 |
57 | #define IRQ_U300_MSPRO 38 | 57 | #define IRQ_U300_MSPRO 69 |
58 | #define IRQ_U300_MMCSD_MCIINTR0 39 | 58 | #define IRQ_U300_MMCSD_MCIINTR0 70 |
59 | #define IRQ_U300_MMCSD_MCIINTR1 40 | 59 | #define IRQ_U300_MMCSD_MCIINTR1 71 |
60 | #define IRQ_U300_I2C0 41 | 60 | #define IRQ_U300_I2C0 72 |
61 | #define IRQ_U300_I2C1 42 | 61 | #define IRQ_U300_I2C1 73 |
62 | #define IRQ_U300_RTC 43 | 62 | #define IRQ_U300_RTC 74 |
63 | #define IRQ_U300_NFIF 44 | 63 | #define IRQ_U300_NFIF 75 |
64 | #define IRQ_U300_NFIF2 45 | 64 | #define IRQ_U300_NFIF2 76 |
65 | 65 | ||
66 | /* The DB3350-specific interrupt lines */ | 66 | /* The DB3350-specific interrupt lines */ |
67 | #define IRQ_U300_ISP_F0 46 | 67 | #define IRQ_U300_ISP_F0 77 |
68 | #define IRQ_U300_ISP_F1 47 | 68 | #define IRQ_U300_ISP_F1 78 |
69 | #define IRQ_U300_ISP_F2 48 | 69 | #define IRQ_U300_ISP_F2 79 |
70 | #define IRQ_U300_ISP_F3 49 | 70 | #define IRQ_U300_ISP_F3 80 |
71 | #define IRQ_U300_ISP_F4 50 | 71 | #define IRQ_U300_ISP_F4 81 |
72 | #define IRQ_U300_GPIO_PORT3 51 | 72 | #define IRQ_U300_GPIO_PORT3 82 |
73 | #define IRQ_U300_SYSCON_PLL_LOCK 52 | 73 | #define IRQ_U300_SYSCON_PLL_LOCK 83 |
74 | #define IRQ_U300_UART1 53 | 74 | #define IRQ_U300_UART1 84 |
75 | #define IRQ_U300_GPIO_PORT4 54 | 75 | #define IRQ_U300_GPIO_PORT4 85 |
76 | #define IRQ_U300_GPIO_PORT5 55 | 76 | #define IRQ_U300_GPIO_PORT5 86 |
77 | #define IRQ_U300_GPIO_PORT6 56 | 77 | #define IRQ_U300_GPIO_PORT6 87 |
78 | #define U300_VIC_IRQS_END 57 | 78 | #define U300_VIC_IRQS_END 88 |
79 | |||
80 | /* Maximum 8*7 GPIO lines */ | ||
81 | #ifdef CONFIG_PINCTRL_COH901 | ||
82 | #define IRQ_U300_GPIO_BASE (U300_VIC_IRQS_END) | ||
83 | #define IRQ_U300_GPIO_END (IRQ_U300_GPIO_BASE + 56) | ||
84 | #else | ||
85 | #define IRQ_U300_GPIO_END (U300_VIC_IRQS_END) | ||
86 | #endif | ||
87 | |||
88 | #define NR_IRQS_U300 (IRQ_U300_GPIO_END - IRQ_U300_INTCON0_START) | ||
89 | 79 | ||
90 | #endif | 80 | #endif |
diff --git a/arch/arm/mach-ux500/board-mop500-audio.c b/arch/arm/mach-ux500/board-mop500-audio.c index 070629a95625..33631c9f1218 100644 --- a/arch/arm/mach-ux500/board-mop500-audio.c +++ b/arch/arm/mach-ux500/board-mop500-audio.c | |||
@@ -7,9 +7,8 @@ | |||
7 | #include <linux/platform_device.h> | 7 | #include <linux/platform_device.h> |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/gpio.h> | 9 | #include <linux/gpio.h> |
10 | #include <linux/platform_data/pinctrl-nomadik.h> | ||
10 | 11 | ||
11 | #include <plat/gpio-nomadik.h> | ||
12 | #include <plat/pincfg.h> | ||
13 | #include <plat/ste_dma40.h> | 12 | #include <plat/ste_dma40.h> |
14 | 13 | ||
15 | #include <mach/devices.h> | 14 | #include <mach/devices.h> |
diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c index a267c6d30e37..c34d4efd0d5c 100644 --- a/arch/arm/mach-ux500/board-mop500-pins.c +++ b/arch/arm/mach-ux500/board-mop500-pins.c | |||
@@ -9,10 +9,9 @@ | |||
9 | #include <linux/bug.h> | 9 | #include <linux/bug.h> |
10 | #include <linux/string.h> | 10 | #include <linux/string.h> |
11 | #include <linux/pinctrl/machine.h> | 11 | #include <linux/pinctrl/machine.h> |
12 | #include <linux/platform_data/pinctrl-nomadik.h> | ||
12 | 13 | ||
13 | #include <asm/mach-types.h> | 14 | #include <asm/mach-types.h> |
14 | #include <plat/pincfg.h> | ||
15 | #include <plat/gpio-nomadik.h> | ||
16 | 15 | ||
17 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
18 | 17 | ||
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 416d436111f2..2d16b1dd5fec 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/platform_data/i2c-nomadik.h> | 18 | #include <linux/platform_data/i2c-nomadik.h> |
19 | #include <linux/platform_data/db8500_thermal.h> | ||
19 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
20 | #include <linux/amba/bus.h> | 21 | #include <linux/amba/bus.h> |
21 | #include <linux/amba/pl022.h> | 22 | #include <linux/amba/pl022.h> |
@@ -37,13 +38,13 @@ | |||
37 | #include <linux/of_platform.h> | 38 | #include <linux/of_platform.h> |
38 | #include <linux/leds.h> | 39 | #include <linux/leds.h> |
39 | #include <linux/pinctrl/consumer.h> | 40 | #include <linux/pinctrl/consumer.h> |
41 | #include <linux/platform_data/pinctrl-nomadik.h> | ||
40 | 42 | ||
41 | #include <asm/mach-types.h> | 43 | #include <asm/mach-types.h> |
42 | #include <asm/mach/arch.h> | 44 | #include <asm/mach/arch.h> |
43 | #include <asm/hardware/gic.h> | 45 | #include <asm/hardware/gic.h> |
44 | 46 | ||
45 | #include <plat/ste_dma40.h> | 47 | #include <plat/ste_dma40.h> |
46 | #include <plat/gpio-nomadik.h> | ||
47 | 48 | ||
48 | #include <mach/hardware.h> | 49 | #include <mach/hardware.h> |
49 | #include <mach/setup.h> | 50 | #include <mach/setup.h> |
@@ -229,6 +230,67 @@ static struct ab8500_platform_data ab8500_platdata = { | |||
229 | }; | 230 | }; |
230 | 231 | ||
231 | /* | 232 | /* |
233 | * Thermal Sensor | ||
234 | */ | ||
235 | |||
236 | static struct resource db8500_thsens_resources[] = { | ||
237 | { | ||
238 | .name = "IRQ_HOTMON_LOW", | ||
239 | .start = IRQ_PRCMU_HOTMON_LOW, | ||
240 | .end = IRQ_PRCMU_HOTMON_LOW, | ||
241 | .flags = IORESOURCE_IRQ, | ||
242 | }, | ||
243 | { | ||
244 | .name = "IRQ_HOTMON_HIGH", | ||
245 | .start = IRQ_PRCMU_HOTMON_HIGH, | ||
246 | .end = IRQ_PRCMU_HOTMON_HIGH, | ||
247 | .flags = IORESOURCE_IRQ, | ||
248 | }, | ||
249 | }; | ||
250 | |||
251 | static struct db8500_thsens_platform_data db8500_thsens_data = { | ||
252 | .trip_points[0] = { | ||
253 | .temp = 70000, | ||
254 | .type = THERMAL_TRIP_ACTIVE, | ||
255 | .cdev_name = { | ||
256 | [0] = "thermal-cpufreq-0", | ||
257 | }, | ||
258 | }, | ||
259 | .trip_points[1] = { | ||
260 | .temp = 75000, | ||
261 | .type = THERMAL_TRIP_ACTIVE, | ||
262 | .cdev_name = { | ||
263 | [0] = "thermal-cpufreq-0", | ||
264 | }, | ||
265 | }, | ||
266 | .trip_points[2] = { | ||
267 | .temp = 80000, | ||
268 | .type = THERMAL_TRIP_ACTIVE, | ||
269 | .cdev_name = { | ||
270 | [0] = "thermal-cpufreq-0", | ||
271 | }, | ||
272 | }, | ||
273 | .trip_points[3] = { | ||
274 | .temp = 85000, | ||
275 | .type = THERMAL_TRIP_CRITICAL, | ||
276 | }, | ||
277 | .num_trips = 4, | ||
278 | }; | ||
279 | |||
280 | static struct platform_device u8500_thsens_device = { | ||
281 | .name = "db8500-thermal", | ||
282 | .resource = db8500_thsens_resources, | ||
283 | .num_resources = ARRAY_SIZE(db8500_thsens_resources), | ||
284 | .dev = { | ||
285 | .platform_data = &db8500_thsens_data, | ||
286 | }, | ||
287 | }; | ||
288 | |||
289 | static struct platform_device u8500_cpufreq_cooling_device = { | ||
290 | .name = "db8500-cpufreq-cooling", | ||
291 | }; | ||
292 | |||
293 | /* | ||
232 | * TPS61052 | 294 | * TPS61052 |
233 | */ | 295 | */ |
234 | 296 | ||
@@ -583,6 +645,8 @@ static struct platform_device *snowball_platform_devs[] __initdata = { | |||
583 | &snowball_key_dev, | 645 | &snowball_key_dev, |
584 | &snowball_sbnet_dev, | 646 | &snowball_sbnet_dev, |
585 | &snowball_gpio_en_3v3_regulator_dev, | 647 | &snowball_gpio_en_3v3_regulator_dev, |
648 | &u8500_thsens_device, | ||
649 | &u8500_cpufreq_cooling_device, | ||
586 | }; | 650 | }; |
587 | 651 | ||
588 | static void __init mop500_init_machine(void) | 652 | static void __init mop500_init_machine(void) |
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index bcdfe6b1d453..91f028c1264a 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -17,14 +17,14 @@ | |||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/mfd/abx500/ab8500.h> | 19 | #include <linux/mfd/abx500/ab8500.h> |
20 | #include <linux/platform_data/usb-musb-ux500.h> | ||
21 | #include <linux/platform_data/pinctrl-nomadik.h> | ||
20 | 22 | ||
21 | #include <asm/pmu.h> | 23 | #include <asm/pmu.h> |
22 | #include <asm/mach/map.h> | 24 | #include <asm/mach/map.h> |
23 | #include <plat/gpio-nomadik.h> | ||
24 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
25 | #include <mach/setup.h> | 26 | #include <mach/setup.h> |
26 | #include <mach/devices.h> | 27 | #include <mach/devices.h> |
27 | #include <linux/platform_data/usb-musb-ux500.h> | ||
28 | #include <mach/db8500-regs.h> | 28 | #include <mach/db8500-regs.h> |
29 | 29 | ||
30 | #include "devices-db8500.h" | 30 | #include "devices-db8500.h" |
@@ -158,7 +158,7 @@ static void __init db8500_add_gpios(struct device *parent) | |||
158 | 158 | ||
159 | dbx500_add_gpios(parent, ARRAY_AND_SIZE(db8500_gpio_base), | 159 | dbx500_add_gpios(parent, ARRAY_AND_SIZE(db8500_gpio_base), |
160 | IRQ_DB8500_GPIO0, &pdata); | 160 | IRQ_DB8500_GPIO0, &pdata); |
161 | dbx500_add_pinctrl(parent, "pinctrl-db8500"); | 161 | dbx500_add_pinctrl(parent, "pinctrl-db8500", U8500_PRCMU_BASE); |
162 | } | 162 | } |
163 | 163 | ||
164 | static int usb_db8500_rx_dma_cfg[] = { | 164 | static int usb_db8500_rx_dma_cfg[] = { |
@@ -214,9 +214,6 @@ struct device * __init u8500_init_devices(struct ab8500_platform_data *ab8500) | |||
214 | db8500_add_gpios(parent); | 214 | db8500_add_gpios(parent); |
215 | db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg); | 215 | db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg); |
216 | 216 | ||
217 | platform_device_register_data(parent, | ||
218 | "cpufreq-u8500", -1, NULL, 0); | ||
219 | |||
220 | for (i = 0; i < ARRAY_SIZE(platform_devs); i++) | 217 | for (i = 0; i < ARRAY_SIZE(platform_devs); i++) |
221 | platform_devs[i]->dev.parent = parent; | 218 | platform_devs[i]->dev.parent = parent; |
222 | 219 | ||
@@ -236,9 +233,6 @@ struct device * __init u8500_of_init_devices(void) | |||
236 | 233 | ||
237 | db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg); | 234 | db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg); |
238 | 235 | ||
239 | platform_device_register_data(parent, | ||
240 | "cpufreq-u8500", -1, NULL, 0); | ||
241 | |||
242 | u8500_dma40_device.dev.parent = parent; | 236 | u8500_dma40_device.dev.parent = parent; |
243 | 237 | ||
244 | /* | 238 | /* |
diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c index dfdd4a54668d..692a77a1c153 100644 --- a/arch/arm/mach-ux500/devices-common.c +++ b/arch/arm/mach-ux500/devices-common.c | |||
@@ -11,8 +11,7 @@ | |||
11 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | 14 | #include <linux/platform_data/pinctrl-nomadik.h> | |
15 | #include <plat/gpio-nomadik.h> | ||
16 | 15 | ||
17 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
18 | 17 | ||
diff --git a/arch/arm/mach-ux500/devices-common.h b/arch/arm/mach-ux500/devices-common.h index 7fbf0ba336e1..96fa4ac89e2e 100644 --- a/arch/arm/mach-ux500/devices-common.h +++ b/arch/arm/mach-ux500/devices-common.h | |||
@@ -129,12 +129,18 @@ void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num, | |||
129 | int irq, struct nmk_gpio_platform_data *pdata); | 129 | int irq, struct nmk_gpio_platform_data *pdata); |
130 | 130 | ||
131 | static inline void | 131 | static inline void |
132 | dbx500_add_pinctrl(struct device *parent, const char *name) | 132 | dbx500_add_pinctrl(struct device *parent, const char *name, |
133 | resource_size_t base) | ||
133 | { | 134 | { |
135 | struct resource res[] = { | ||
136 | DEFINE_RES_MEM(base, SZ_8K), | ||
137 | }; | ||
134 | struct platform_device_info pdevinfo = { | 138 | struct platform_device_info pdevinfo = { |
135 | .parent = parent, | 139 | .parent = parent, |
136 | .name = name, | 140 | .name = name, |
137 | .id = -1, | 141 | .id = -1, |
142 | .res = res, | ||
143 | .num_res = ARRAY_SIZE(res), | ||
138 | }; | 144 | }; |
139 | 145 | ||
140 | platform_device_register_full(&pdevinfo); | 146 | platform_device_register_full(&pdevinfo); |
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 560e0df728f8..359f782c747d 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -589,7 +589,7 @@ void __init v2m_dt_init_early(void) | |||
589 | return; | 589 | return; |
590 | 590 | ||
591 | /* Confirm board type against DT property, if available */ | 591 | /* Confirm board type against DT property, if available */ |
592 | if (of_property_read_u32(allnodes, "arm,hbi", &dt_hbi) == 0) { | 592 | if (of_property_read_u32(of_allnodes, "arm,hbi", &dt_hbi) == 0) { |
593 | int site = v2m_get_master_site(); | 593 | int site = v2m_get_master_site(); |
594 | u32 id = readl(v2m_sysreg_base + (site == SYS_CFG_SITE_DB2 ? | 594 | u32 id = readl(v2m_sysreg_base + (site == SYS_CFG_SITE_DB2 ? |
595 | V2M_SYS_PROCID1 : V2M_SYS_PROCID0)); | 595 | V2M_SYS_PROCID1 : V2M_SYS_PROCID0)); |
diff --git a/arch/arm/mm/cache-aurora-l2.h b/arch/arm/mm/cache-aurora-l2.h new file mode 100644 index 000000000000..c86124769831 --- /dev/null +++ b/arch/arm/mm/cache-aurora-l2.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * AURORA shared L2 cache controller support | ||
3 | * | ||
4 | * Copyright (C) 2012 Marvell | ||
5 | * | ||
6 | * Yehuda Yitschak <yehuday@marvell.com> | ||
7 | * Gregory CLEMENT <gregory.clement@free-electrons.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARM_HARDWARE_AURORA_L2_H | ||
15 | #define __ASM_ARM_HARDWARE_AURORA_L2_H | ||
16 | |||
17 | #define AURORA_SYNC_REG 0x700 | ||
18 | #define AURORA_RANGE_BASE_ADDR_REG 0x720 | ||
19 | #define AURORA_FLUSH_PHY_ADDR_REG 0x7f0 | ||
20 | #define AURORA_INVAL_RANGE_REG 0x774 | ||
21 | #define AURORA_CLEAN_RANGE_REG 0x7b4 | ||
22 | #define AURORA_FLUSH_RANGE_REG 0x7f4 | ||
23 | |||
24 | #define AURORA_ACR_REPLACEMENT_OFFSET 27 | ||
25 | #define AURORA_ACR_REPLACEMENT_MASK \ | ||
26 | (0x3 << AURORA_ACR_REPLACEMENT_OFFSET) | ||
27 | #define AURORA_ACR_REPLACEMENT_TYPE_WAYRR \ | ||
28 | (0 << AURORA_ACR_REPLACEMENT_OFFSET) | ||
29 | #define AURORA_ACR_REPLACEMENT_TYPE_LFSR \ | ||
30 | (1 << AURORA_ACR_REPLACEMENT_OFFSET) | ||
31 | #define AURORA_ACR_REPLACEMENT_TYPE_SEMIPLRU \ | ||
32 | (3 << AURORA_ACR_REPLACEMENT_OFFSET) | ||
33 | |||
34 | #define AURORA_ACR_FORCE_WRITE_POLICY_OFFSET 0 | ||
35 | #define AURORA_ACR_FORCE_WRITE_POLICY_MASK \ | ||
36 | (0x3 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET) | ||
37 | #define AURORA_ACR_FORCE_WRITE_POLICY_DIS \ | ||
38 | (0 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET) | ||
39 | #define AURORA_ACR_FORCE_WRITE_BACK_POLICY \ | ||
40 | (1 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET) | ||
41 | #define AURORA_ACR_FORCE_WRITE_THRO_POLICY \ | ||
42 | (2 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET) | ||
43 | |||
44 | #define MAX_RANGE_SIZE 1024 | ||
45 | |||
46 | #define AURORA_WAY_SIZE_SHIFT 2 | ||
47 | |||
48 | #define AURORA_CTRL_FW 0x100 | ||
49 | |||
50 | /* chose a number outside L2X0_CACHE_ID_PART_MASK to be sure to make | ||
51 | * the distinction between a number coming from hardware and a number | ||
52 | * coming from the device tree */ | ||
53 | #define AURORA_CACHE_ID 0x100 | ||
54 | |||
55 | #endif /* __ASM_ARM_HARDWARE_AURORA_L2_H */ | ||
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 8a97e6443c62..6911b8b2745c 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-aurora-l2.h" | ||
28 | 29 | ||
29 | #define CACHE_LINE_SIZE 32 | 30 | #define CACHE_LINE_SIZE 32 |
30 | 31 | ||
@@ -34,14 +35,20 @@ static u32 l2x0_way_mask; /* Bitmask of active ways */ | |||
34 | static u32 l2x0_size; | 35 | static u32 l2x0_size; |
35 | static unsigned long sync_reg_offset = L2X0_CACHE_SYNC; | 36 | static unsigned long sync_reg_offset = L2X0_CACHE_SYNC; |
36 | 37 | ||
38 | /* Aurora don't have the cache ID register available, so we have to | ||
39 | * pass it though the device tree */ | ||
40 | static u32 cache_id_part_number_from_dt; | ||
41 | |||
37 | struct l2x0_regs l2x0_saved_regs; | 42 | struct l2x0_regs l2x0_saved_regs; |
38 | 43 | ||
39 | struct l2x0_of_data { | 44 | struct l2x0_of_data { |
40 | void (*setup)(const struct device_node *, u32 *, u32 *); | 45 | void (*setup)(const struct device_node *, u32 *, u32 *); |
41 | void (*save)(void); | 46 | void (*save)(void); |
42 | void (*resume)(void); | 47 | struct outer_cache_fns outer_cache; |
43 | }; | 48 | }; |
44 | 49 | ||
50 | static bool of_init = false; | ||
51 | |||
45 | static inline void cache_wait_way(void __iomem *reg, unsigned long mask) | 52 | static inline void cache_wait_way(void __iomem *reg, unsigned long mask) |
46 | { | 53 | { |
47 | /* wait for cache operation by line or way to complete */ | 54 | /* wait for cache operation by line or way to complete */ |
@@ -168,7 +175,7 @@ static void l2x0_inv_all(void) | |||
168 | /* invalidate all ways */ | 175 | /* invalidate all ways */ |
169 | raw_spin_lock_irqsave(&l2x0_lock, flags); | 176 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
170 | /* Invalidating when L2 is enabled is a nono */ | 177 | /* Invalidating when L2 is enabled is a nono */ |
171 | BUG_ON(readl(l2x0_base + L2X0_CTRL) & 1); | 178 | BUG_ON(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN); |
172 | writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_INV_WAY); | 179 | writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_INV_WAY); |
173 | cache_wait_way(l2x0_base + L2X0_INV_WAY, l2x0_way_mask); | 180 | cache_wait_way(l2x0_base + L2X0_INV_WAY, l2x0_way_mask); |
174 | cache_sync(); | 181 | cache_sync(); |
@@ -292,11 +299,18 @@ static void l2x0_unlock(u32 cache_id) | |||
292 | int lockregs; | 299 | int lockregs; |
293 | int i; | 300 | int i; |
294 | 301 | ||
295 | if (cache_id == L2X0_CACHE_ID_PART_L310) | 302 | switch (cache_id) { |
303 | case L2X0_CACHE_ID_PART_L310: | ||
296 | lockregs = 8; | 304 | lockregs = 8; |
297 | else | 305 | break; |
306 | case AURORA_CACHE_ID: | ||
307 | lockregs = 4; | ||
308 | break; | ||
309 | default: | ||
298 | /* L210 and unknown types */ | 310 | /* L210 and unknown types */ |
299 | lockregs = 1; | 311 | lockregs = 1; |
312 | break; | ||
313 | } | ||
300 | 314 | ||
301 | for (i = 0; i < lockregs; i++) { | 315 | for (i = 0; i < lockregs; i++) { |
302 | writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_D_BASE + | 316 | writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_D_BASE + |
@@ -312,18 +326,22 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask) | |||
312 | u32 cache_id; | 326 | u32 cache_id; |
313 | u32 way_size = 0; | 327 | u32 way_size = 0; |
314 | int ways; | 328 | int ways; |
329 | int way_size_shift = L2X0_WAY_SIZE_SHIFT; | ||
315 | const char *type; | 330 | const char *type; |
316 | 331 | ||
317 | l2x0_base = base; | 332 | l2x0_base = base; |
318 | 333 | if (cache_id_part_number_from_dt) | |
319 | cache_id = readl_relaxed(l2x0_base + L2X0_CACHE_ID); | 334 | cache_id = cache_id_part_number_from_dt; |
335 | else | ||
336 | cache_id = readl_relaxed(l2x0_base + L2X0_CACHE_ID) | ||
337 | & L2X0_CACHE_ID_PART_MASK; | ||
320 | aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); | 338 | aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); |
321 | 339 | ||
322 | aux &= aux_mask; | 340 | aux &= aux_mask; |
323 | aux |= aux_val; | 341 | aux |= aux_val; |
324 | 342 | ||
325 | /* Determine the number of ways */ | 343 | /* Determine the number of ways */ |
326 | switch (cache_id & L2X0_CACHE_ID_PART_MASK) { | 344 | switch (cache_id) { |
327 | case L2X0_CACHE_ID_PART_L310: | 345 | case L2X0_CACHE_ID_PART_L310: |
328 | if (aux & (1 << 16)) | 346 | if (aux & (1 << 16)) |
329 | ways = 16; | 347 | ways = 16; |
@@ -340,6 +358,14 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask) | |||
340 | ways = (aux >> 13) & 0xf; | 358 | ways = (aux >> 13) & 0xf; |
341 | type = "L210"; | 359 | type = "L210"; |
342 | break; | 360 | break; |
361 | |||
362 | case AURORA_CACHE_ID: | ||
363 | sync_reg_offset = AURORA_SYNC_REG; | ||
364 | ways = (aux >> 13) & 0xf; | ||
365 | ways = 2 << ((ways + 1) >> 2); | ||
366 | way_size_shift = AURORA_WAY_SIZE_SHIFT; | ||
367 | type = "Aurora"; | ||
368 | break; | ||
343 | default: | 369 | default: |
344 | /* Assume unknown chips have 8 ways */ | 370 | /* Assume unknown chips have 8 ways */ |
345 | ways = 8; | 371 | ways = 8; |
@@ -353,7 +379,8 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask) | |||
353 | * L2 cache Size = Way size * Number of ways | 379 | * L2 cache Size = Way size * Number of ways |
354 | */ | 380 | */ |
355 | way_size = (aux & L2X0_AUX_CTRL_WAY_SIZE_MASK) >> 17; | 381 | way_size = (aux & L2X0_AUX_CTRL_WAY_SIZE_MASK) >> 17; |
356 | way_size = 1 << (way_size + 3); | 382 | way_size = 1 << (way_size + way_size_shift); |
383 | |||
357 | l2x0_size = ways * way_size * SZ_1K; | 384 | l2x0_size = ways * way_size * SZ_1K; |
358 | 385 | ||
359 | /* | 386 | /* |
@@ -361,7 +388,7 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask) | |||
361 | * If you are booting from non-secure mode | 388 | * If you are booting from non-secure mode |
362 | * accessing the below registers will fault. | 389 | * accessing the below registers will fault. |
363 | */ | 390 | */ |
364 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) { | 391 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { |
365 | /* Make sure that I&D is not locked down when starting */ | 392 | /* Make sure that I&D is not locked down when starting */ |
366 | l2x0_unlock(cache_id); | 393 | l2x0_unlock(cache_id); |
367 | 394 | ||
@@ -371,7 +398,7 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask) | |||
371 | l2x0_inv_all(); | 398 | l2x0_inv_all(); |
372 | 399 | ||
373 | /* enable L2X0 */ | 400 | /* enable L2X0 */ |
374 | writel_relaxed(1, l2x0_base + L2X0_CTRL); | 401 | writel_relaxed(L2X0_CTRL_EN, l2x0_base + L2X0_CTRL); |
375 | } | 402 | } |
376 | 403 | ||
377 | /* Re-read it in case some bits are reserved. */ | 404 | /* Re-read it in case some bits are reserved. */ |
@@ -380,13 +407,15 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask) | |||
380 | /* Save the value for resuming. */ | 407 | /* Save the value for resuming. */ |
381 | l2x0_saved_regs.aux_ctrl = aux; | 408 | l2x0_saved_regs.aux_ctrl = aux; |
382 | 409 | ||
383 | outer_cache.inv_range = l2x0_inv_range; | 410 | if (!of_init) { |
384 | outer_cache.clean_range = l2x0_clean_range; | 411 | outer_cache.inv_range = l2x0_inv_range; |
385 | outer_cache.flush_range = l2x0_flush_range; | 412 | outer_cache.clean_range = l2x0_clean_range; |
386 | outer_cache.sync = l2x0_cache_sync; | 413 | outer_cache.flush_range = l2x0_flush_range; |
387 | outer_cache.flush_all = l2x0_flush_all; | 414 | outer_cache.sync = l2x0_cache_sync; |
388 | outer_cache.inv_all = l2x0_inv_all; | 415 | outer_cache.flush_all = l2x0_flush_all; |
389 | outer_cache.disable = l2x0_disable; | 416 | outer_cache.inv_all = l2x0_inv_all; |
417 | outer_cache.disable = l2x0_disable; | ||
418 | } | ||
390 | 419 | ||
391 | printk(KERN_INFO "%s cache controller enabled\n", type); | 420 | printk(KERN_INFO "%s cache controller enabled\n", type); |
392 | printk(KERN_INFO "l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x, Cache size: %d B\n", | 421 | printk(KERN_INFO "l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x, Cache size: %d B\n", |
@@ -394,6 +423,100 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask) | |||
394 | } | 423 | } |
395 | 424 | ||
396 | #ifdef CONFIG_OF | 425 | #ifdef CONFIG_OF |
426 | static int l2_wt_override; | ||
427 | |||
428 | /* | ||
429 | * Note that the end addresses passed to Linux primitives are | ||
430 | * noninclusive, while the hardware cache range operations use | ||
431 | * inclusive start and end addresses. | ||
432 | */ | ||
433 | static unsigned long calc_range_end(unsigned long start, unsigned long end) | ||
434 | { | ||
435 | /* | ||
436 | * Limit the number of cache lines processed at once, | ||
437 | * since cache range operations stall the CPU pipeline | ||
438 | * until completion. | ||
439 | */ | ||
440 | if (end > start + MAX_RANGE_SIZE) | ||
441 | end = start + MAX_RANGE_SIZE; | ||
442 | |||
443 | /* | ||
444 | * Cache range operations can't straddle a page boundary. | ||
445 | */ | ||
446 | if (end > PAGE_ALIGN(start+1)) | ||
447 | end = PAGE_ALIGN(start+1); | ||
448 | |||
449 | return end; | ||
450 | } | ||
451 | |||
452 | /* | ||
453 | * Make sure 'start' and 'end' reference the same page, as L2 is PIPT | ||
454 | * and range operations only do a TLB lookup on the start address. | ||
455 | */ | ||
456 | static void aurora_pa_range(unsigned long start, unsigned long end, | ||
457 | unsigned long offset) | ||
458 | { | ||
459 | unsigned long flags; | ||
460 | |||
461 | raw_spin_lock_irqsave(&l2x0_lock, flags); | ||
462 | writel(start, l2x0_base + AURORA_RANGE_BASE_ADDR_REG); | ||
463 | writel(end, l2x0_base + offset); | ||
464 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); | ||
465 | |||
466 | cache_sync(); | ||
467 | } | ||
468 | |||
469 | static void aurora_inv_range(unsigned long start, unsigned long end) | ||
470 | { | ||
471 | /* | ||
472 | * round start and end adresses up to cache line size | ||
473 | */ | ||
474 | start &= ~(CACHE_LINE_SIZE - 1); | ||
475 | end = ALIGN(end, CACHE_LINE_SIZE); | ||
476 | |||
477 | /* | ||
478 | * Invalidate all full cache lines between 'start' and 'end'. | ||
479 | */ | ||
480 | while (start < end) { | ||
481 | unsigned long range_end = calc_range_end(start, end); | ||
482 | aurora_pa_range(start, range_end - CACHE_LINE_SIZE, | ||
483 | AURORA_INVAL_RANGE_REG); | ||
484 | start = range_end; | ||
485 | } | ||
486 | } | ||
487 | |||
488 | static void aurora_clean_range(unsigned long start, unsigned long end) | ||
489 | { | ||
490 | /* | ||
491 | * If L2 is forced to WT, the L2 will always be clean and we | ||
492 | * don't need to do anything here. | ||
493 | */ | ||
494 | if (!l2_wt_override) { | ||
495 | start &= ~(CACHE_LINE_SIZE - 1); | ||
496 | end = ALIGN(end, CACHE_LINE_SIZE); | ||
497 | while (start != end) { | ||
498 | unsigned long range_end = calc_range_end(start, end); | ||
499 | aurora_pa_range(start, range_end - CACHE_LINE_SIZE, | ||
500 | AURORA_CLEAN_RANGE_REG); | ||
501 | start = range_end; | ||
502 | } | ||
503 | } | ||
504 | } | ||
505 | |||
506 | static void aurora_flush_range(unsigned long start, unsigned long end) | ||
507 | { | ||
508 | if (!l2_wt_override) { | ||
509 | start &= ~(CACHE_LINE_SIZE - 1); | ||
510 | end = ALIGN(end, CACHE_LINE_SIZE); | ||
511 | while (start != end) { | ||
512 | unsigned long range_end = calc_range_end(start, end); | ||
513 | aurora_pa_range(start, range_end - CACHE_LINE_SIZE, | ||
514 | AURORA_FLUSH_RANGE_REG); | ||
515 | start = range_end; | ||
516 | } | ||
517 | } | ||
518 | } | ||
519 | |||
397 | static void __init l2x0_of_setup(const struct device_node *np, | 520 | static void __init l2x0_of_setup(const struct device_node *np, |
398 | u32 *aux_val, u32 *aux_mask) | 521 | u32 *aux_val, u32 *aux_mask) |
399 | { | 522 | { |
@@ -491,9 +614,15 @@ static void __init pl310_save(void) | |||
491 | } | 614 | } |
492 | } | 615 | } |
493 | 616 | ||
617 | static void aurora_save(void) | ||
618 | { | ||
619 | l2x0_saved_regs.ctrl = readl_relaxed(l2x0_base + L2X0_CTRL); | ||
620 | l2x0_saved_regs.aux_ctrl = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); | ||
621 | } | ||
622 | |||
494 | static void l2x0_resume(void) | 623 | static void l2x0_resume(void) |
495 | { | 624 | { |
496 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) { | 625 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { |
497 | /* restore aux ctrl and enable l2 */ | 626 | /* restore aux ctrl and enable l2 */ |
498 | l2x0_unlock(readl_relaxed(l2x0_base + L2X0_CACHE_ID)); | 627 | l2x0_unlock(readl_relaxed(l2x0_base + L2X0_CACHE_ID)); |
499 | 628 | ||
@@ -502,7 +631,7 @@ static void l2x0_resume(void) | |||
502 | 631 | ||
503 | l2x0_inv_all(); | 632 | l2x0_inv_all(); |
504 | 633 | ||
505 | writel_relaxed(1, l2x0_base + L2X0_CTRL); | 634 | writel_relaxed(L2X0_CTRL_EN, l2x0_base + L2X0_CTRL); |
506 | } | 635 | } |
507 | } | 636 | } |
508 | 637 | ||
@@ -510,7 +639,7 @@ static void pl310_resume(void) | |||
510 | { | 639 | { |
511 | u32 l2x0_revision; | 640 | u32 l2x0_revision; |
512 | 641 | ||
513 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) { | 642 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { |
514 | /* restore pl310 setup */ | 643 | /* restore pl310 setup */ |
515 | writel_relaxed(l2x0_saved_regs.tag_latency, | 644 | writel_relaxed(l2x0_saved_regs.tag_latency, |
516 | l2x0_base + L2X0_TAG_LATENCY_CTRL); | 645 | l2x0_base + L2X0_TAG_LATENCY_CTRL); |
@@ -536,22 +665,108 @@ static void pl310_resume(void) | |||
536 | l2x0_resume(); | 665 | l2x0_resume(); |
537 | } | 666 | } |
538 | 667 | ||
668 | static void aurora_resume(void) | ||
669 | { | ||
670 | if (!(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { | ||
671 | writel(l2x0_saved_regs.aux_ctrl, l2x0_base + L2X0_AUX_CTRL); | ||
672 | writel(l2x0_saved_regs.ctrl, l2x0_base + L2X0_CTRL); | ||
673 | } | ||
674 | } | ||
675 | |||
676 | static void __init aurora_broadcast_l2_commands(void) | ||
677 | { | ||
678 | __u32 u; | ||
679 | /* Enable Broadcasting of cache commands to L2*/ | ||
680 | __asm__ __volatile__("mrc p15, 1, %0, c15, c2, 0" : "=r"(u)); | ||
681 | u |= AURORA_CTRL_FW; /* Set the FW bit */ | ||
682 | __asm__ __volatile__("mcr p15, 1, %0, c15, c2, 0\n" : : "r"(u)); | ||
683 | isb(); | ||
684 | } | ||
685 | |||
686 | static void __init aurora_of_setup(const struct device_node *np, | ||
687 | u32 *aux_val, u32 *aux_mask) | ||
688 | { | ||
689 | u32 val = AURORA_ACR_REPLACEMENT_TYPE_SEMIPLRU; | ||
690 | u32 mask = AURORA_ACR_REPLACEMENT_MASK; | ||
691 | |||
692 | of_property_read_u32(np, "cache-id-part", | ||
693 | &cache_id_part_number_from_dt); | ||
694 | |||
695 | /* Determine and save the write policy */ | ||
696 | l2_wt_override = of_property_read_bool(np, "wt-override"); | ||
697 | |||
698 | if (l2_wt_override) { | ||
699 | val |= AURORA_ACR_FORCE_WRITE_THRO_POLICY; | ||
700 | mask |= AURORA_ACR_FORCE_WRITE_POLICY_MASK; | ||
701 | } | ||
702 | |||
703 | *aux_val &= ~mask; | ||
704 | *aux_val |= val; | ||
705 | *aux_mask &= ~mask; | ||
706 | } | ||
707 | |||
539 | static const struct l2x0_of_data pl310_data = { | 708 | static const struct l2x0_of_data pl310_data = { |
540 | pl310_of_setup, | 709 | .setup = pl310_of_setup, |
541 | pl310_save, | 710 | .save = pl310_save, |
542 | pl310_resume, | 711 | .outer_cache = { |
712 | .resume = pl310_resume, | ||
713 | .inv_range = l2x0_inv_range, | ||
714 | .clean_range = l2x0_clean_range, | ||
715 | .flush_range = l2x0_flush_range, | ||
716 | .sync = l2x0_cache_sync, | ||
717 | .flush_all = l2x0_flush_all, | ||
718 | .inv_all = l2x0_inv_all, | ||
719 | .disable = l2x0_disable, | ||
720 | .set_debug = pl310_set_debug, | ||
721 | }, | ||
543 | }; | 722 | }; |
544 | 723 | ||
545 | static const struct l2x0_of_data l2x0_data = { | 724 | static const struct l2x0_of_data l2x0_data = { |
546 | l2x0_of_setup, | 725 | .setup = l2x0_of_setup, |
547 | NULL, | 726 | .save = NULL, |
548 | l2x0_resume, | 727 | .outer_cache = { |
728 | .resume = l2x0_resume, | ||
729 | .inv_range = l2x0_inv_range, | ||
730 | .clean_range = l2x0_clean_range, | ||
731 | .flush_range = l2x0_flush_range, | ||
732 | .sync = l2x0_cache_sync, | ||
733 | .flush_all = l2x0_flush_all, | ||
734 | .inv_all = l2x0_inv_all, | ||
735 | .disable = l2x0_disable, | ||
736 | }, | ||
737 | }; | ||
738 | |||
739 | static const struct l2x0_of_data aurora_with_outer_data = { | ||
740 | .setup = aurora_of_setup, | ||
741 | .save = aurora_save, | ||
742 | .outer_cache = { | ||
743 | .resume = aurora_resume, | ||
744 | .inv_range = aurora_inv_range, | ||
745 | .clean_range = aurora_clean_range, | ||
746 | .flush_range = aurora_flush_range, | ||
747 | .sync = l2x0_cache_sync, | ||
748 | .flush_all = l2x0_flush_all, | ||
749 | .inv_all = l2x0_inv_all, | ||
750 | .disable = l2x0_disable, | ||
751 | }, | ||
752 | }; | ||
753 | |||
754 | static const struct l2x0_of_data aurora_no_outer_data = { | ||
755 | .setup = aurora_of_setup, | ||
756 | .save = aurora_save, | ||
757 | .outer_cache = { | ||
758 | .resume = aurora_resume, | ||
759 | }, | ||
549 | }; | 760 | }; |
550 | 761 | ||
551 | static const struct of_device_id l2x0_ids[] __initconst = { | 762 | static const struct of_device_id l2x0_ids[] __initconst = { |
552 | { .compatible = "arm,pl310-cache", .data = (void *)&pl310_data }, | 763 | { .compatible = "arm,pl310-cache", .data = (void *)&pl310_data }, |
553 | { .compatible = "arm,l220-cache", .data = (void *)&l2x0_data }, | 764 | { .compatible = "arm,l220-cache", .data = (void *)&l2x0_data }, |
554 | { .compatible = "arm,l210-cache", .data = (void *)&l2x0_data }, | 765 | { .compatible = "arm,l210-cache", .data = (void *)&l2x0_data }, |
766 | { .compatible = "marvell,aurora-system-cache", | ||
767 | .data = (void *)&aurora_no_outer_data}, | ||
768 | { .compatible = "marvell,aurora-outer-cache", | ||
769 | .data = (void *)&aurora_with_outer_data}, | ||
555 | {} | 770 | {} |
556 | }; | 771 | }; |
557 | 772 | ||
@@ -577,17 +792,24 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask) | |||
577 | data = of_match_node(l2x0_ids, np)->data; | 792 | data = of_match_node(l2x0_ids, np)->data; |
578 | 793 | ||
579 | /* L2 configuration can only be changed if the cache is disabled */ | 794 | /* L2 configuration can only be changed if the cache is disabled */ |
580 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) { | 795 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { |
581 | if (data->setup) | 796 | if (data->setup) |
582 | data->setup(np, &aux_val, &aux_mask); | 797 | data->setup(np, &aux_val, &aux_mask); |
798 | |||
799 | /* For aurora cache in no outer mode select the | ||
800 | * correct mode using the coprocessor*/ | ||
801 | if (data == &aurora_no_outer_data) | ||
802 | aurora_broadcast_l2_commands(); | ||
583 | } | 803 | } |
584 | 804 | ||
585 | if (data->save) | 805 | if (data->save) |
586 | data->save(); | 806 | data->save(); |
587 | 807 | ||
808 | of_init = true; | ||
588 | l2x0_init(l2x0_base, aux_val, aux_mask); | 809 | l2x0_init(l2x0_base, aux_val, aux_mask); |
589 | 810 | ||
590 | outer_cache.resume = data->resume; | 811 | memcpy(&outer_cache, &data->outer_cache, sizeof(outer_cache)); |
812 | |||
591 | return 0; | 813 | return 0; |
592 | } | 814 | } |
593 | #endif | 815 | #endif |
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index 4e07eec1270d..bc4a5e9ebb78 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c | |||
@@ -2,6 +2,9 @@ | |||
2 | * linux/arch/arm/mm/context.c | 2 | * linux/arch/arm/mm/context.c |
3 | * | 3 | * |
4 | * Copyright (C) 2002-2003 Deep Blue Solutions Ltd, all rights reserved. | 4 | * Copyright (C) 2002-2003 Deep Blue Solutions Ltd, all rights reserved. |
5 | * Copyright (C) 2012 ARM Limited | ||
6 | * | ||
7 | * Author: Will Deacon <will.deacon@arm.com> | ||
5 | * | 8 | * |
6 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
@@ -14,14 +17,40 @@ | |||
14 | #include <linux/percpu.h> | 17 | #include <linux/percpu.h> |
15 | 18 | ||
16 | #include <asm/mmu_context.h> | 19 | #include <asm/mmu_context.h> |
20 | #include <asm/smp_plat.h> | ||
17 | #include <asm/thread_notify.h> | 21 | #include <asm/thread_notify.h> |
18 | #include <asm/tlbflush.h> | 22 | #include <asm/tlbflush.h> |
19 | 23 | ||
24 | /* | ||
25 | * On ARMv6, we have the following structure in the Context ID: | ||
26 | * | ||
27 | * 31 7 0 | ||
28 | * +-------------------------+-----------+ | ||
29 | * | process ID | ASID | | ||
30 | * +-------------------------+-----------+ | ||
31 | * | context ID | | ||
32 | * +-------------------------------------+ | ||
33 | * | ||
34 | * The ASID is used to tag entries in the CPU caches and TLBs. | ||
35 | * The context ID is used by debuggers and trace logic, and | ||
36 | * should be unique within all running processes. | ||
37 | */ | ||
38 | #define ASID_FIRST_VERSION (1ULL << ASID_BITS) | ||
39 | #define NUM_USER_ASIDS (ASID_FIRST_VERSION - 1) | ||
40 | |||
41 | #define ASID_TO_IDX(asid) ((asid & ~ASID_MASK) - 1) | ||
42 | #define IDX_TO_ASID(idx) ((idx + 1) & ~ASID_MASK) | ||
43 | |||
20 | static DEFINE_RAW_SPINLOCK(cpu_asid_lock); | 44 | static DEFINE_RAW_SPINLOCK(cpu_asid_lock); |
21 | unsigned int cpu_last_asid = ASID_FIRST_VERSION; | 45 | static atomic64_t asid_generation = ATOMIC64_INIT(ASID_FIRST_VERSION); |
46 | static DECLARE_BITMAP(asid_map, NUM_USER_ASIDS); | ||
47 | |||
48 | static DEFINE_PER_CPU(atomic64_t, active_asids); | ||
49 | static DEFINE_PER_CPU(u64, reserved_asids); | ||
50 | static cpumask_t tlb_flush_pending; | ||
22 | 51 | ||
23 | #ifdef CONFIG_ARM_LPAE | 52 | #ifdef CONFIG_ARM_LPAE |
24 | void cpu_set_reserved_ttbr0(void) | 53 | static void cpu_set_reserved_ttbr0(void) |
25 | { | 54 | { |
26 | unsigned long ttbl = __pa(swapper_pg_dir); | 55 | unsigned long ttbl = __pa(swapper_pg_dir); |
27 | unsigned long ttbh = 0; | 56 | unsigned long ttbh = 0; |
@@ -37,7 +66,7 @@ void cpu_set_reserved_ttbr0(void) | |||
37 | isb(); | 66 | isb(); |
38 | } | 67 | } |
39 | #else | 68 | #else |
40 | void cpu_set_reserved_ttbr0(void) | 69 | static void cpu_set_reserved_ttbr0(void) |
41 | { | 70 | { |
42 | u32 ttb; | 71 | u32 ttb; |
43 | /* Copy TTBR1 into TTBR0 */ | 72 | /* Copy TTBR1 into TTBR0 */ |
@@ -84,124 +113,104 @@ static int __init contextidr_notifier_init(void) | |||
84 | arch_initcall(contextidr_notifier_init); | 113 | arch_initcall(contextidr_notifier_init); |
85 | #endif | 114 | #endif |
86 | 115 | ||
87 | /* | 116 | static void flush_context(unsigned int cpu) |
88 | * We fork()ed a process, and we need a new context for the child | ||
89 | * to run in. | ||
90 | */ | ||
91 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) | ||
92 | { | 117 | { |
93 | mm->context.id = 0; | 118 | int i; |
94 | raw_spin_lock_init(&mm->context.id_lock); | 119 | u64 asid; |
95 | } | 120 | |
121 | /* Update the list of reserved ASIDs and the ASID bitmap. */ | ||
122 | bitmap_clear(asid_map, 0, NUM_USER_ASIDS); | ||
123 | for_each_possible_cpu(i) { | ||
124 | if (i == cpu) { | ||
125 | asid = 0; | ||
126 | } else { | ||
127 | asid = atomic64_xchg(&per_cpu(active_asids, i), 0); | ||
128 | __set_bit(ASID_TO_IDX(asid), asid_map); | ||
129 | } | ||
130 | per_cpu(reserved_asids, i) = asid; | ||
131 | } | ||
96 | 132 | ||
97 | static void flush_context(void) | 133 | /* Queue a TLB invalidate and flush the I-cache if necessary. */ |
98 | { | 134 | if (!tlb_ops_need_broadcast()) |
99 | cpu_set_reserved_ttbr0(); | 135 | cpumask_set_cpu(cpu, &tlb_flush_pending); |
100 | local_flush_tlb_all(); | 136 | else |
101 | if (icache_is_vivt_asid_tagged()) { | 137 | cpumask_setall(&tlb_flush_pending); |
138 | |||
139 | if (icache_is_vivt_asid_tagged()) | ||
102 | __flush_icache_all(); | 140 | __flush_icache_all(); |
103 | dsb(); | ||
104 | } | ||
105 | } | 141 | } |
106 | 142 | ||
107 | #ifdef CONFIG_SMP | 143 | static int is_reserved_asid(u64 asid) |
144 | { | ||
145 | int cpu; | ||
146 | for_each_possible_cpu(cpu) | ||
147 | if (per_cpu(reserved_asids, cpu) == asid) | ||
148 | return 1; | ||
149 | return 0; | ||
150 | } | ||
108 | 151 | ||
109 | static void set_mm_context(struct mm_struct *mm, unsigned int asid) | 152 | static void new_context(struct mm_struct *mm, unsigned int cpu) |
110 | { | 153 | { |
111 | unsigned long flags; | 154 | u64 asid = mm->context.id; |
155 | u64 generation = atomic64_read(&asid_generation); | ||
112 | 156 | ||
113 | /* | 157 | if (asid != 0 && is_reserved_asid(asid)) { |
114 | * Locking needed for multi-threaded applications where the | ||
115 | * same mm->context.id could be set from different CPUs during | ||
116 | * the broadcast. This function is also called via IPI so the | ||
117 | * mm->context.id_lock has to be IRQ-safe. | ||
118 | */ | ||
119 | raw_spin_lock_irqsave(&mm->context.id_lock, flags); | ||
120 | if (likely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) { | ||
121 | /* | 158 | /* |
122 | * Old version of ASID found. Set the new one and | 159 | * Our current ASID was active during a rollover, we can |
123 | * reset mm_cpumask(mm). | 160 | * continue to use it and this was just a false alarm. |
124 | */ | 161 | */ |
125 | mm->context.id = asid; | 162 | asid = generation | (asid & ~ASID_MASK); |
163 | } else { | ||
164 | /* | ||
165 | * Allocate a free ASID. If we can't find one, take a | ||
166 | * note of the currently active ASIDs and mark the TLBs | ||
167 | * as requiring flushes. | ||
168 | */ | ||
169 | asid = find_first_zero_bit(asid_map, NUM_USER_ASIDS); | ||
170 | if (asid == NUM_USER_ASIDS) { | ||
171 | generation = atomic64_add_return(ASID_FIRST_VERSION, | ||
172 | &asid_generation); | ||
173 | flush_context(cpu); | ||
174 | asid = find_first_zero_bit(asid_map, NUM_USER_ASIDS); | ||
175 | } | ||
176 | __set_bit(asid, asid_map); | ||
177 | asid = generation | IDX_TO_ASID(asid); | ||
126 | cpumask_clear(mm_cpumask(mm)); | 178 | cpumask_clear(mm_cpumask(mm)); |
127 | } | 179 | } |
128 | raw_spin_unlock_irqrestore(&mm->context.id_lock, flags); | ||
129 | 180 | ||
130 | /* | 181 | mm->context.id = asid; |
131 | * Set the mm_cpumask(mm) bit for the current CPU. | ||
132 | */ | ||
133 | cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm)); | ||
134 | } | 182 | } |
135 | 183 | ||
136 | /* | 184 | void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk) |
137 | * Reset the ASID on the current CPU. This function call is broadcast | ||
138 | * from the CPU handling the ASID rollover and holding cpu_asid_lock. | ||
139 | */ | ||
140 | static void reset_context(void *info) | ||
141 | { | 185 | { |
142 | unsigned int asid; | 186 | unsigned long flags; |
143 | unsigned int cpu = smp_processor_id(); | 187 | unsigned int cpu = smp_processor_id(); |
144 | struct mm_struct *mm = current->active_mm; | ||
145 | 188 | ||
146 | smp_rmb(); | 189 | if (unlikely(mm->context.vmalloc_seq != init_mm.context.vmalloc_seq)) |
147 | asid = cpu_last_asid + cpu + 1; | 190 | __check_vmalloc_seq(mm); |
148 | 191 | ||
149 | flush_context(); | 192 | /* |
150 | set_mm_context(mm, asid); | 193 | * Required during context switch to avoid speculative page table |
151 | 194 | * walking with the wrong TTBR. | |
152 | /* set the new ASID */ | 195 | */ |
153 | cpu_switch_mm(mm->pgd, mm); | 196 | cpu_set_reserved_ttbr0(); |
154 | } | ||
155 | 197 | ||
156 | #else | 198 | if (!((mm->context.id ^ atomic64_read(&asid_generation)) >> ASID_BITS) |
199 | && atomic64_xchg(&per_cpu(active_asids, cpu), mm->context.id)) | ||
200 | goto switch_mm_fastpath; | ||
157 | 201 | ||
158 | static inline void set_mm_context(struct mm_struct *mm, unsigned int asid) | 202 | raw_spin_lock_irqsave(&cpu_asid_lock, flags); |
159 | { | 203 | /* Check that our ASID belongs to the current generation. */ |
160 | mm->context.id = asid; | 204 | if ((mm->context.id ^ atomic64_read(&asid_generation)) >> ASID_BITS) |
161 | cpumask_copy(mm_cpumask(mm), cpumask_of(smp_processor_id())); | 205 | new_context(mm, cpu); |
162 | } | ||
163 | 206 | ||
164 | #endif | 207 | atomic64_set(&per_cpu(active_asids, cpu), mm->context.id); |
208 | cpumask_set_cpu(cpu, mm_cpumask(mm)); | ||
165 | 209 | ||
166 | void __new_context(struct mm_struct *mm) | 210 | if (cpumask_test_and_clear_cpu(cpu, &tlb_flush_pending)) |
167 | { | 211 | local_flush_tlb_all(); |
168 | unsigned int asid; | 212 | raw_spin_unlock_irqrestore(&cpu_asid_lock, flags); |
169 | 213 | ||
170 | raw_spin_lock(&cpu_asid_lock); | 214 | switch_mm_fastpath: |
171 | #ifdef CONFIG_SMP | 215 | cpu_switch_mm(mm->pgd, mm); |
172 | /* | ||
173 | * Check the ASID again, in case the change was broadcast from | ||
174 | * another CPU before we acquired the lock. | ||
175 | */ | ||
176 | if (unlikely(((mm->context.id ^ cpu_last_asid) >> ASID_BITS) == 0)) { | ||
177 | cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm)); | ||
178 | raw_spin_unlock(&cpu_asid_lock); | ||
179 | return; | ||
180 | } | ||
181 | #endif | ||
182 | /* | ||
183 | * At this point, it is guaranteed that the current mm (with | ||
184 | * an old ASID) isn't active on any other CPU since the ASIDs | ||
185 | * are changed simultaneously via IPI. | ||
186 | */ | ||
187 | asid = ++cpu_last_asid; | ||
188 | if (asid == 0) | ||
189 | asid = cpu_last_asid = ASID_FIRST_VERSION; | ||
190 | |||
191 | /* | ||
192 | * If we've used up all our ASIDs, we need | ||
193 | * to start a new version and flush the TLB. | ||
194 | */ | ||
195 | if (unlikely((asid & ~ASID_MASK) == 0)) { | ||
196 | asid = cpu_last_asid + smp_processor_id() + 1; | ||
197 | flush_context(); | ||
198 | #ifdef CONFIG_SMP | ||
199 | smp_wmb(); | ||
200 | smp_call_function(reset_context, NULL, 1); | ||
201 | #endif | ||
202 | cpu_last_asid += NR_CPUS; | ||
203 | } | ||
204 | |||
205 | set_mm_context(mm, asid); | ||
206 | raw_spin_unlock(&cpu_asid_lock); | ||
207 | } | 216 | } |
diff --git a/arch/arm/mm/idmap.c b/arch/arm/mm/idmap.c index ab88ed4f8e08..99db769307ec 100644 --- a/arch/arm/mm/idmap.c +++ b/arch/arm/mm/idmap.c | |||
@@ -92,6 +92,9 @@ static int __init init_static_idmap(void) | |||
92 | (long long)idmap_start, (long long)idmap_end); | 92 | (long long)idmap_start, (long long)idmap_end); |
93 | identity_mapping_add(idmap_pgd, idmap_start, idmap_end); | 93 | identity_mapping_add(idmap_pgd, idmap_start, idmap_end); |
94 | 94 | ||
95 | /* Flush L1 for the hardware to see this page table content */ | ||
96 | flush_cache_louis(); | ||
97 | |||
95 | return 0; | 98 | return 0; |
96 | } | 99 | } |
97 | early_initcall(init_static_idmap); | 100 | early_initcall(init_static_idmap); |
@@ -103,12 +106,15 @@ early_initcall(init_static_idmap); | |||
103 | */ | 106 | */ |
104 | void setup_mm_for_reboot(void) | 107 | void setup_mm_for_reboot(void) |
105 | { | 108 | { |
106 | /* Clean and invalidate L1. */ | ||
107 | flush_cache_all(); | ||
108 | |||
109 | /* Switch to the identity mapping. */ | 109 | /* Switch to the identity mapping. */ |
110 | cpu_switch_mm(idmap_pgd, &init_mm); | 110 | cpu_switch_mm(idmap_pgd, &init_mm); |
111 | 111 | ||
112 | /* Flush the TLB. */ | 112 | #ifdef CONFIG_CPU_HAS_ASID |
113 | /* | ||
114 | * We don't have a clean ASID for the identity mapping, which | ||
115 | * may clash with virtual addresses of the previous page tables | ||
116 | * and therefore potentially in the TLB. | ||
117 | */ | ||
113 | local_flush_tlb_all(); | 118 | local_flush_tlb_all(); |
119 | #endif | ||
114 | } | 120 | } |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 5dcc2fd46c46..88fd86cf3d9a 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -47,18 +47,18 @@ int ioremap_page(unsigned long virt, unsigned long phys, | |||
47 | } | 47 | } |
48 | EXPORT_SYMBOL(ioremap_page); | 48 | EXPORT_SYMBOL(ioremap_page); |
49 | 49 | ||
50 | void __check_kvm_seq(struct mm_struct *mm) | 50 | void __check_vmalloc_seq(struct mm_struct *mm) |
51 | { | 51 | { |
52 | unsigned int seq; | 52 | unsigned int seq; |
53 | 53 | ||
54 | do { | 54 | do { |
55 | seq = init_mm.context.kvm_seq; | 55 | seq = init_mm.context.vmalloc_seq; |
56 | memcpy(pgd_offset(mm, VMALLOC_START), | 56 | memcpy(pgd_offset(mm, VMALLOC_START), |
57 | pgd_offset_k(VMALLOC_START), | 57 | pgd_offset_k(VMALLOC_START), |
58 | sizeof(pgd_t) * (pgd_index(VMALLOC_END) - | 58 | sizeof(pgd_t) * (pgd_index(VMALLOC_END) - |
59 | pgd_index(VMALLOC_START))); | 59 | pgd_index(VMALLOC_START))); |
60 | mm->context.kvm_seq = seq; | 60 | mm->context.vmalloc_seq = seq; |
61 | } while (seq != init_mm.context.kvm_seq); | 61 | } while (seq != init_mm.context.vmalloc_seq); |
62 | } | 62 | } |
63 | 63 | ||
64 | #if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE) | 64 | #if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE) |
@@ -89,13 +89,13 @@ static void unmap_area_sections(unsigned long virt, unsigned long size) | |||
89 | if (!pmd_none(pmd)) { | 89 | if (!pmd_none(pmd)) { |
90 | /* | 90 | /* |
91 | * Clear the PMD from the page table, and | 91 | * Clear the PMD from the page table, and |
92 | * increment the kvm sequence so others | 92 | * increment the vmalloc sequence so others |
93 | * notice this change. | 93 | * notice this change. |
94 | * | 94 | * |
95 | * Note: this is still racy on SMP machines. | 95 | * Note: this is still racy on SMP machines. |
96 | */ | 96 | */ |
97 | pmd_clear(pmdp); | 97 | pmd_clear(pmdp); |
98 | init_mm.context.kvm_seq++; | 98 | init_mm.context.vmalloc_seq++; |
99 | 99 | ||
100 | /* | 100 | /* |
101 | * Free the page table, if there was one. | 101 | * Free the page table, if there was one. |
@@ -112,8 +112,8 @@ static void unmap_area_sections(unsigned long virt, unsigned long size) | |||
112 | * Ensure that the active_mm is up to date - we want to | 112 | * Ensure that the active_mm is up to date - we want to |
113 | * catch any use-after-iounmap cases. | 113 | * catch any use-after-iounmap cases. |
114 | */ | 114 | */ |
115 | if (current->active_mm->context.kvm_seq != init_mm.context.kvm_seq) | 115 | if (current->active_mm->context.vmalloc_seq != init_mm.context.vmalloc_seq) |
116 | __check_kvm_seq(current->active_mm); | 116 | __check_vmalloc_seq(current->active_mm); |
117 | 117 | ||
118 | flush_tlb_kernel_range(virt, end); | 118 | flush_tlb_kernel_range(virt, end); |
119 | } | 119 | } |
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index ce8cb1970d7a..10062ceadd1c 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c | |||
@@ -11,18 +11,6 @@ | |||
11 | #include <linux/random.h> | 11 | #include <linux/random.h> |
12 | #include <asm/cachetype.h> | 12 | #include <asm/cachetype.h> |
13 | 13 | ||
14 | static inline unsigned long COLOUR_ALIGN_DOWN(unsigned long addr, | ||
15 | unsigned long pgoff) | ||
16 | { | ||
17 | unsigned long base = addr & ~(SHMLBA-1); | ||
18 | unsigned long off = (pgoff << PAGE_SHIFT) & (SHMLBA-1); | ||
19 | |||
20 | if (base + off <= addr) | ||
21 | return base + off; | ||
22 | |||
23 | return base - off; | ||
24 | } | ||
25 | |||
26 | #define COLOUR_ALIGN(addr,pgoff) \ | 14 | #define COLOUR_ALIGN(addr,pgoff) \ |
27 | ((((addr)+SHMLBA-1)&~(SHMLBA-1)) + \ | 15 | ((((addr)+SHMLBA-1)&~(SHMLBA-1)) + \ |
28 | (((pgoff)<<PAGE_SHIFT) & (SHMLBA-1))) | 16 | (((pgoff)<<PAGE_SHIFT) & (SHMLBA-1))) |
@@ -69,9 +57,9 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
69 | { | 57 | { |
70 | struct mm_struct *mm = current->mm; | 58 | struct mm_struct *mm = current->mm; |
71 | struct vm_area_struct *vma; | 59 | struct vm_area_struct *vma; |
72 | unsigned long start_addr; | ||
73 | int do_align = 0; | 60 | int do_align = 0; |
74 | int aliasing = cache_is_vipt_aliasing(); | 61 | int aliasing = cache_is_vipt_aliasing(); |
62 | struct vm_unmapped_area_info info; | ||
75 | 63 | ||
76 | /* | 64 | /* |
77 | * We only need to do colour alignment if either the I or D | 65 | * We only need to do colour alignment if either the I or D |
@@ -104,46 +92,14 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
104 | (!vma || addr + len <= vma->vm_start)) | 92 | (!vma || addr + len <= vma->vm_start)) |
105 | return addr; | 93 | return addr; |
106 | } | 94 | } |
107 | if (len > mm->cached_hole_size) { | ||
108 | start_addr = addr = mm->free_area_cache; | ||
109 | } else { | ||
110 | start_addr = addr = mm->mmap_base; | ||
111 | mm->cached_hole_size = 0; | ||
112 | } | ||
113 | 95 | ||
114 | full_search: | 96 | info.flags = 0; |
115 | if (do_align) | 97 | info.length = len; |
116 | addr = COLOUR_ALIGN(addr, pgoff); | 98 | info.low_limit = mm->mmap_base; |
117 | else | 99 | info.high_limit = TASK_SIZE; |
118 | addr = PAGE_ALIGN(addr); | 100 | info.align_mask = do_align ? (PAGE_MASK & (SHMLBA - 1)) : 0; |
119 | 101 | info.align_offset = pgoff << PAGE_SHIFT; | |
120 | for (vma = find_vma(mm, addr); ; vma = vma->vm_next) { | 102 | return vm_unmapped_area(&info); |
121 | /* At this point: (!vma || addr < vma->vm_end). */ | ||
122 | if (TASK_SIZE - len < addr) { | ||
123 | /* | ||
124 | * Start a new search - just in case we missed | ||
125 | * some holes. | ||
126 | */ | ||
127 | if (start_addr != TASK_UNMAPPED_BASE) { | ||
128 | start_addr = addr = TASK_UNMAPPED_BASE; | ||
129 | mm->cached_hole_size = 0; | ||
130 | goto full_search; | ||
131 | } | ||
132 | return -ENOMEM; | ||
133 | } | ||
134 | if (!vma || addr + len <= vma->vm_start) { | ||
135 | /* | ||
136 | * Remember the place where we stopped the search: | ||
137 | */ | ||
138 | mm->free_area_cache = addr + len; | ||
139 | return addr; | ||
140 | } | ||
141 | if (addr + mm->cached_hole_size < vma->vm_start) | ||
142 | mm->cached_hole_size = vma->vm_start - addr; | ||
143 | addr = vma->vm_end; | ||
144 | if (do_align) | ||
145 | addr = COLOUR_ALIGN(addr, pgoff); | ||
146 | } | ||
147 | } | 103 | } |
148 | 104 | ||
149 | unsigned long | 105 | unsigned long |
@@ -156,6 +112,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, | |||
156 | unsigned long addr = addr0; | 112 | unsigned long addr = addr0; |
157 | int do_align = 0; | 113 | int do_align = 0; |
158 | int aliasing = cache_is_vipt_aliasing(); | 114 | int aliasing = cache_is_vipt_aliasing(); |
115 | struct vm_unmapped_area_info info; | ||
159 | 116 | ||
160 | /* | 117 | /* |
161 | * We only need to do colour alignment if either the I or D | 118 | * We only need to do colour alignment if either the I or D |
@@ -187,70 +144,27 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, | |||
187 | return addr; | 144 | return addr; |
188 | } | 145 | } |
189 | 146 | ||
190 | /* check if free_area_cache is useful for us */ | 147 | info.flags = VM_UNMAPPED_AREA_TOPDOWN; |
191 | if (len <= mm->cached_hole_size) { | 148 | info.length = len; |
192 | mm->cached_hole_size = 0; | 149 | info.low_limit = PAGE_SIZE; |
193 | mm->free_area_cache = mm->mmap_base; | 150 | info.high_limit = mm->mmap_base; |
194 | } | 151 | info.align_mask = do_align ? (PAGE_MASK & (SHMLBA - 1)) : 0; |
195 | 152 | info.align_offset = pgoff << PAGE_SHIFT; | |
196 | /* either no address requested or can't fit in requested address hole */ | 153 | addr = vm_unmapped_area(&info); |
197 | addr = mm->free_area_cache; | ||
198 | if (do_align) { | ||
199 | unsigned long base = COLOUR_ALIGN_DOWN(addr - len, pgoff); | ||
200 | addr = base + len; | ||
201 | } | ||
202 | |||
203 | /* make sure it can fit in the remaining address space */ | ||
204 | if (addr > len) { | ||
205 | vma = find_vma(mm, addr-len); | ||
206 | if (!vma || addr <= vma->vm_start) | ||
207 | /* remember the address as a hint for next time */ | ||
208 | return (mm->free_area_cache = addr-len); | ||
209 | } | ||
210 | |||
211 | if (mm->mmap_base < len) | ||
212 | goto bottomup; | ||
213 | |||
214 | addr = mm->mmap_base - len; | ||
215 | if (do_align) | ||
216 | addr = COLOUR_ALIGN_DOWN(addr, pgoff); | ||
217 | |||
218 | do { | ||
219 | /* | ||
220 | * Lookup failure means no vma is above this address, | ||
221 | * else if new region fits below vma->vm_start, | ||
222 | * return with success: | ||
223 | */ | ||
224 | vma = find_vma(mm, addr); | ||
225 | if (!vma || addr+len <= vma->vm_start) | ||
226 | /* remember the address as a hint for next time */ | ||
227 | return (mm->free_area_cache = addr); | ||
228 | 154 | ||
229 | /* remember the largest hole we saw so far */ | ||
230 | if (addr + mm->cached_hole_size < vma->vm_start) | ||
231 | mm->cached_hole_size = vma->vm_start - addr; | ||
232 | |||
233 | /* try just below the current vma->vm_start */ | ||
234 | addr = vma->vm_start - len; | ||
235 | if (do_align) | ||
236 | addr = COLOUR_ALIGN_DOWN(addr, pgoff); | ||
237 | } while (len < vma->vm_start); | ||
238 | |||
239 | bottomup: | ||
240 | /* | 155 | /* |
241 | * A failed mmap() very likely causes application failure, | 156 | * A failed mmap() very likely causes application failure, |
242 | * so fall back to the bottom-up function here. This scenario | 157 | * so fall back to the bottom-up function here. This scenario |
243 | * can happen with large stack limits and large mmap() | 158 | * can happen with large stack limits and large mmap() |
244 | * allocations. | 159 | * allocations. |
245 | */ | 160 | */ |
246 | mm->cached_hole_size = ~0UL; | 161 | if (addr & ~PAGE_MASK) { |
247 | mm->free_area_cache = TASK_UNMAPPED_BASE; | 162 | VM_BUG_ON(addr != -ENOMEM); |
248 | addr = arch_get_unmapped_area(filp, addr0, len, pgoff, flags); | 163 | info.flags = 0; |
249 | /* | 164 | info.low_limit = mm->mmap_base; |
250 | * Restore the topdown base: | 165 | info.high_limit = TASK_SIZE; |
251 | */ | 166 | addr = vm_unmapped_area(&info); |
252 | mm->free_area_cache = mm->mmap_base; | 167 | } |
253 | mm->cached_hole_size = ~0UL; | ||
254 | 168 | ||
255 | return addr; | 169 | return addr; |
256 | } | 170 | } |
@@ -279,7 +193,7 @@ void arch_pick_mmap_layout(struct mm_struct *mm) | |||
279 | * You really shouldn't be using read() or write() on /dev/mem. This | 193 | * You really shouldn't be using read() or write() on /dev/mem. This |
280 | * might go away in the future. | 194 | * might go away in the future. |
281 | */ | 195 | */ |
282 | int valid_phys_addr_range(unsigned long addr, size_t size) | 196 | int valid_phys_addr_range(phys_addr_t addr, size_t size) |
283 | { | 197 | { |
284 | if (addr < PHYS_OFFSET) | 198 | if (addr < PHYS_OFFSET) |
285 | return 0; | 199 | return 0; |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 941dfb9e9a78..99b47b950efc 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -488,7 +488,7 @@ static void __init build_mem_type_table(void) | |||
488 | #endif | 488 | #endif |
489 | 489 | ||
490 | for (i = 0; i < 16; i++) { | 490 | for (i = 0; i < 16; i++) { |
491 | unsigned long v = pgprot_val(protection_map[i]); | 491 | pteval_t v = pgprot_val(protection_map[i]); |
492 | protection_map[i] = __pgprot(v | user_pgprot); | 492 | protection_map[i] = __pgprot(v | user_pgprot); |
493 | } | 493 | } |
494 | 494 | ||
diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index b29a2265af01..eb6aa73bc8b7 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S | |||
@@ -167,6 +167,10 @@ | |||
167 | tst r1, #L_PTE_YOUNG | 167 | tst r1, #L_PTE_YOUNG |
168 | tstne r1, #L_PTE_PRESENT | 168 | tstne r1, #L_PTE_PRESENT |
169 | moveq r3, #0 | 169 | moveq r3, #0 |
170 | #ifndef CONFIG_CPU_USE_DOMAINS | ||
171 | tstne r1, #L_PTE_NONE | ||
172 | movne r3, #0 | ||
173 | #endif | ||
170 | 174 | ||
171 | str r3, [r0] | 175 | str r3, [r0] |
172 | mcr p15, 0, r0, c7, c10, 1 @ flush_pte | 176 | mcr p15, 0, r0, c7, c10, 1 @ flush_pte |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 86b8b480634f..09c5233f4dfc 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -89,7 +89,7 @@ ENTRY(cpu_v6_dcache_clean_area) | |||
89 | mov pc, lr | 89 | mov pc, lr |
90 | 90 | ||
91 | /* | 91 | /* |
92 | * cpu_arm926_switch_mm(pgd_phys, tsk) | 92 | * cpu_v6_switch_mm(pgd_phys, tsk) |
93 | * | 93 | * |
94 | * Set the translation table base pointer to be pgd_phys | 94 | * Set the translation table base pointer to be pgd_phys |
95 | * | 95 | * |
diff --git a/arch/arm/mm/proc-v7-2level.S b/arch/arm/mm/proc-v7-2level.S index fd045e706390..6d98c13ab827 100644 --- a/arch/arm/mm/proc-v7-2level.S +++ b/arch/arm/mm/proc-v7-2level.S | |||
@@ -100,7 +100,11 @@ ENTRY(cpu_v7_set_pte_ext) | |||
100 | orrne r3, r3, #PTE_EXT_XN | 100 | orrne r3, r3, #PTE_EXT_XN |
101 | 101 | ||
102 | tst r1, #L_PTE_YOUNG | 102 | tst r1, #L_PTE_YOUNG |
103 | tstne r1, #L_PTE_PRESENT | 103 | tstne r1, #L_PTE_VALID |
104 | #ifndef CONFIG_CPU_USE_DOMAINS | ||
105 | eorne r1, r1, #L_PTE_NONE | ||
106 | tstne r1, #L_PTE_NONE | ||
107 | #endif | ||
104 | moveq r3, #0 | 108 | moveq r3, #0 |
105 | 109 | ||
106 | ARM( str r3, [r0, #2048]! ) | 110 | ARM( str r3, [r0, #2048]! ) |
@@ -161,11 +165,11 @@ ENDPROC(cpu_v7_set_pte_ext) | |||
161 | * TFR EV X F I D LR S | 165 | * TFR EV X F I D LR S |
162 | * .EEE ..EE PUI. .T.T 4RVI ZWRS BLDP WCAM | 166 | * .EEE ..EE PUI. .T.T 4RVI ZWRS BLDP WCAM |
163 | * rxxx rrxx xxx0 0101 xxxx xxxx x111 xxxx < forced | 167 | * rxxx rrxx xxx0 0101 xxxx xxxx x111 xxxx < forced |
164 | * 1 0 110 0011 1100 .111 1101 < we want | 168 | * 01 0 110 0011 1100 .111 1101 < we want |
165 | */ | 169 | */ |
166 | .align 2 | 170 | .align 2 |
167 | .type v7_crval, #object | 171 | .type v7_crval, #object |
168 | v7_crval: | 172 | v7_crval: |
169 | crval clear=0x0120c302, mmuset=0x10c03c7d, ucset=0x00c01c7c | 173 | crval clear=0x2120c302, mmuset=0x10c03c7d, ucset=0x00c01c7c |
170 | 174 | ||
171 | .previous | 175 | .previous |
diff --git a/arch/arm/mm/proc-v7-3level.S b/arch/arm/mm/proc-v7-3level.S index 8de0f1dd1549..7b56386f9496 100644 --- a/arch/arm/mm/proc-v7-3level.S +++ b/arch/arm/mm/proc-v7-3level.S | |||
@@ -65,8 +65,11 @@ ENDPROC(cpu_v7_switch_mm) | |||
65 | */ | 65 | */ |
66 | ENTRY(cpu_v7_set_pte_ext) | 66 | ENTRY(cpu_v7_set_pte_ext) |
67 | #ifdef CONFIG_MMU | 67 | #ifdef CONFIG_MMU |
68 | tst r2, #L_PTE_PRESENT | 68 | tst r2, #L_PTE_VALID |
69 | beq 1f | 69 | beq 1f |
70 | tst r3, #1 << (57 - 32) @ L_PTE_NONE | ||
71 | bicne r2, #L_PTE_VALID | ||
72 | bne 1f | ||
70 | tst r3, #1 << (55 - 32) @ L_PTE_DIRTY | 73 | tst r3, #1 << (55 - 32) @ L_PTE_DIRTY |
71 | orreq r2, #L_PTE_RDONLY | 74 | orreq r2, #L_PTE_RDONLY |
72 | 1: strd r2, r3, [r0] | 75 | 1: strd r2, r3, [r0] |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 846d279f3176..42cc833aa02f 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -57,7 +57,7 @@ ENTRY(cpu_v7_reset) | |||
57 | THUMB( bic r1, r1, #1 << 30 ) @ SCTLR.TE (Thumb exceptions) | 57 | THUMB( bic r1, r1, #1 << 30 ) @ SCTLR.TE (Thumb exceptions) |
58 | mcr p15, 0, r1, c1, c0, 0 @ disable MMU | 58 | mcr p15, 0, r1, c1, c0, 0 @ disable MMU |
59 | isb | 59 | isb |
60 | mov pc, r0 | 60 | bx r0 |
61 | ENDPROC(cpu_v7_reset) | 61 | ENDPROC(cpu_v7_reset) |
62 | .popsection | 62 | .popsection |
63 | 63 | ||
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index c641fb685017..b6f305e3b908 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #define r_skb_hl ARM_R8 | 42 | #define r_skb_hl ARM_R8 |
43 | 43 | ||
44 | #define SCRATCH_SP_OFFSET 0 | 44 | #define SCRATCH_SP_OFFSET 0 |
45 | #define SCRATCH_OFF(k) (SCRATCH_SP_OFFSET + (k)) | 45 | #define SCRATCH_OFF(k) (SCRATCH_SP_OFFSET + 4 * (k)) |
46 | 46 | ||
47 | #define SEEN_MEM ((1 << BPF_MEMWORDS) - 1) | 47 | #define SEEN_MEM ((1 << BPF_MEMWORDS) - 1) |
48 | #define SEEN_MEM_WORD(k) (1 << (k)) | 48 | #define SEEN_MEM_WORD(k) (1 << (k)) |
@@ -845,7 +845,7 @@ void bpf_jit_compile(struct sk_filter *fp) | |||
845 | ctx.skf = fp; | 845 | ctx.skf = fp; |
846 | ctx.ret0_fp_idx = -1; | 846 | ctx.ret0_fp_idx = -1; |
847 | 847 | ||
848 | ctx.offsets = kzalloc(GFP_KERNEL, 4 * (ctx.skf->len + 1)); | 848 | ctx.offsets = kzalloc(4 * (ctx.skf->len + 1), GFP_KERNEL); |
849 | if (ctx.offsets == NULL) | 849 | if (ctx.offsets == NULL) |
850 | return; | 850 | return; |
851 | 851 | ||
@@ -864,7 +864,7 @@ void bpf_jit_compile(struct sk_filter *fp) | |||
864 | 864 | ||
865 | ctx.idx += ctx.imm_count; | 865 | ctx.idx += ctx.imm_count; |
866 | if (ctx.imm_count) { | 866 | if (ctx.imm_count) { |
867 | ctx.imms = kzalloc(GFP_KERNEL, 4 * ctx.imm_count); | 867 | ctx.imms = kzalloc(4 * ctx.imm_count, GFP_KERNEL); |
868 | if (ctx.imms == NULL) | 868 | if (ctx.imms == NULL) |
869 | goto out; | 869 | goto out; |
870 | } | 870 | } |
diff --git a/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h b/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h deleted file mode 100644 index c08a54d9d889..000000000000 --- a/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | /* | ||
2 | * Structures and registers for GPIO access in the Nomadik SoC | ||
3 | * | ||
4 | * Copyright (C) 2008 STMicroelectronics | ||
5 | * Author: Prafulla WADASKAR <prafulla.wadaskar@st.com> | ||
6 | * Copyright (C) 2009 Alessandro Rubini <rubini@unipv.it> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __PLAT_NOMADIK_GPIO | ||
14 | #define __PLAT_NOMADIK_GPIO | ||
15 | |||
16 | /* | ||
17 | * "nmk_gpio" and "NMK_GPIO" stand for "Nomadik GPIO", leaving | ||
18 | * the "gpio" namespace for generic and cross-machine functions | ||
19 | */ | ||
20 | |||
21 | /* Register in the logic block */ | ||
22 | #define NMK_GPIO_DAT 0x00 | ||
23 | #define NMK_GPIO_DATS 0x04 | ||
24 | #define NMK_GPIO_DATC 0x08 | ||
25 | #define NMK_GPIO_PDIS 0x0c | ||
26 | #define NMK_GPIO_DIR 0x10 | ||
27 | #define NMK_GPIO_DIRS 0x14 | ||
28 | #define NMK_GPIO_DIRC 0x18 | ||
29 | #define NMK_GPIO_SLPC 0x1c | ||
30 | #define NMK_GPIO_AFSLA 0x20 | ||
31 | #define NMK_GPIO_AFSLB 0x24 | ||
32 | #define NMK_GPIO_LOWEMI 0x28 | ||
33 | |||
34 | #define NMK_GPIO_RIMSC 0x40 | ||
35 | #define NMK_GPIO_FIMSC 0x44 | ||
36 | #define NMK_GPIO_IS 0x48 | ||
37 | #define NMK_GPIO_IC 0x4c | ||
38 | #define NMK_GPIO_RWIMSC 0x50 | ||
39 | #define NMK_GPIO_FWIMSC 0x54 | ||
40 | #define NMK_GPIO_WKS 0x58 | ||
41 | |||
42 | /* Alternate functions: function C is set in hw by setting both A and B */ | ||
43 | #define NMK_GPIO_ALT_GPIO 0 | ||
44 | #define NMK_GPIO_ALT_A 1 | ||
45 | #define NMK_GPIO_ALT_B 2 | ||
46 | #define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B) | ||
47 | |||
48 | #define NMK_GPIO_ALT_CX_SHIFT 2 | ||
49 | #define NMK_GPIO_ALT_C1 ((1<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
50 | #define NMK_GPIO_ALT_C2 ((2<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
51 | #define NMK_GPIO_ALT_C3 ((3<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
52 | #define NMK_GPIO_ALT_C4 ((4<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
53 | |||
54 | /* Pull up/down values */ | ||
55 | enum nmk_gpio_pull { | ||
56 | NMK_GPIO_PULL_NONE, | ||
57 | NMK_GPIO_PULL_UP, | ||
58 | NMK_GPIO_PULL_DOWN, | ||
59 | }; | ||
60 | |||
61 | /* Sleep mode */ | ||
62 | enum nmk_gpio_slpm { | ||
63 | NMK_GPIO_SLPM_INPUT, | ||
64 | NMK_GPIO_SLPM_WAKEUP_ENABLE = NMK_GPIO_SLPM_INPUT, | ||
65 | NMK_GPIO_SLPM_NOCHANGE, | ||
66 | NMK_GPIO_SLPM_WAKEUP_DISABLE = NMK_GPIO_SLPM_NOCHANGE, | ||
67 | }; | ||
68 | |||
69 | extern int nmk_gpio_set_slpm(int gpio, enum nmk_gpio_slpm mode); | ||
70 | extern int nmk_gpio_set_pull(int gpio, enum nmk_gpio_pull pull); | ||
71 | #ifdef CONFIG_PINCTRL_NOMADIK | ||
72 | extern int nmk_gpio_set_mode(int gpio, int gpio_mode); | ||
73 | #else | ||
74 | static inline int nmk_gpio_set_mode(int gpio, int gpio_mode) | ||
75 | { | ||
76 | return -ENODEV; | ||
77 | } | ||
78 | #endif | ||
79 | extern int nmk_gpio_get_mode(int gpio); | ||
80 | |||
81 | extern void nmk_gpio_wakeups_suspend(void); | ||
82 | extern void nmk_gpio_wakeups_resume(void); | ||
83 | |||
84 | extern void nmk_gpio_clocks_enable(void); | ||
85 | extern void nmk_gpio_clocks_disable(void); | ||
86 | |||
87 | extern void nmk_gpio_read_pull(int gpio_bank, u32 *pull_up); | ||
88 | |||
89 | /* | ||
90 | * Platform data to register a block: only the initial gpio/irq number. | ||
91 | */ | ||
92 | struct nmk_gpio_platform_data { | ||
93 | char *name; | ||
94 | int first_gpio; | ||
95 | int first_irq; | ||
96 | int num_gpio; | ||
97 | u32 (*get_secondary_status)(unsigned int bank); | ||
98 | void (*set_ioforce)(bool enable); | ||
99 | bool supports_sleepmode; | ||
100 | }; | ||
101 | |||
102 | #endif /* __PLAT_NOMADIK_GPIO */ | ||
diff --git a/arch/arm/plat-nomadik/include/plat/pincfg.h b/arch/arm/plat-nomadik/include/plat/pincfg.h deleted file mode 100644 index 3b8ec60af351..000000000000 --- a/arch/arm/plat-nomadik/include/plat/pincfg.h +++ /dev/null | |||
@@ -1,173 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * License terms: GNU General Public License, version 2 | ||
5 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | ||
6 | * | ||
7 | * Based on arch/arm/mach-pxa/include/mach/mfp.h: | ||
8 | * Copyright (C) 2007 Marvell International Ltd. | ||
9 | * eric miao <eric.miao@marvell.com> | ||
10 | */ | ||
11 | |||
12 | #ifndef __PLAT_PINCFG_H | ||
13 | #define __PLAT_PINCFG_H | ||
14 | |||
15 | /* | ||
16 | * pin configurations are represented by 32-bit integers: | ||
17 | * | ||
18 | * bit 0.. 8 - Pin Number (512 Pins Maximum) | ||
19 | * bit 9..10 - Alternate Function Selection | ||
20 | * bit 11..12 - Pull up/down state | ||
21 | * bit 13 - Sleep mode behaviour | ||
22 | * bit 14 - Direction | ||
23 | * bit 15 - Value (if output) | ||
24 | * bit 16..18 - SLPM pull up/down state | ||
25 | * bit 19..20 - SLPM direction | ||
26 | * bit 21..22 - SLPM Value (if output) | ||
27 | * bit 23..25 - PDIS value (if input) | ||
28 | * bit 26 - Gpio mode | ||
29 | * bit 27 - Sleep mode | ||
30 | * | ||
31 | * to facilitate the definition, the following macros are provided | ||
32 | * | ||
33 | * PIN_CFG_DEFAULT - default config (0): | ||
34 | * pull up/down = disabled | ||
35 | * sleep mode = input/wakeup | ||
36 | * direction = input | ||
37 | * value = low | ||
38 | * SLPM direction = same as normal | ||
39 | * SLPM pull = same as normal | ||
40 | * SLPM value = same as normal | ||
41 | * | ||
42 | * PIN_CFG - default config with alternate function | ||
43 | */ | ||
44 | |||
45 | typedef unsigned long pin_cfg_t; | ||
46 | |||
47 | #define PIN_NUM_MASK 0x1ff | ||
48 | #define PIN_NUM(x) ((x) & PIN_NUM_MASK) | ||
49 | |||
50 | #define PIN_ALT_SHIFT 9 | ||
51 | #define PIN_ALT_MASK (0x3 << PIN_ALT_SHIFT) | ||
52 | #define PIN_ALT(x) (((x) & PIN_ALT_MASK) >> PIN_ALT_SHIFT) | ||
53 | #define PIN_GPIO (NMK_GPIO_ALT_GPIO << PIN_ALT_SHIFT) | ||
54 | #define PIN_ALT_A (NMK_GPIO_ALT_A << PIN_ALT_SHIFT) | ||
55 | #define PIN_ALT_B (NMK_GPIO_ALT_B << PIN_ALT_SHIFT) | ||
56 | #define PIN_ALT_C (NMK_GPIO_ALT_C << PIN_ALT_SHIFT) | ||
57 | |||
58 | #define PIN_PULL_SHIFT 11 | ||
59 | #define PIN_PULL_MASK (0x3 << PIN_PULL_SHIFT) | ||
60 | #define PIN_PULL(x) (((x) & PIN_PULL_MASK) >> PIN_PULL_SHIFT) | ||
61 | #define PIN_PULL_NONE (NMK_GPIO_PULL_NONE << PIN_PULL_SHIFT) | ||
62 | #define PIN_PULL_UP (NMK_GPIO_PULL_UP << PIN_PULL_SHIFT) | ||
63 | #define PIN_PULL_DOWN (NMK_GPIO_PULL_DOWN << PIN_PULL_SHIFT) | ||
64 | |||
65 | #define PIN_SLPM_SHIFT 13 | ||
66 | #define PIN_SLPM_MASK (0x1 << PIN_SLPM_SHIFT) | ||
67 | #define PIN_SLPM(x) (((x) & PIN_SLPM_MASK) >> PIN_SLPM_SHIFT) | ||
68 | #define PIN_SLPM_MAKE_INPUT (NMK_GPIO_SLPM_INPUT << PIN_SLPM_SHIFT) | ||
69 | #define PIN_SLPM_NOCHANGE (NMK_GPIO_SLPM_NOCHANGE << PIN_SLPM_SHIFT) | ||
70 | /* These two replace the above in DB8500v2+ */ | ||
71 | #define PIN_SLPM_WAKEUP_ENABLE (NMK_GPIO_SLPM_WAKEUP_ENABLE << PIN_SLPM_SHIFT) | ||
72 | #define PIN_SLPM_WAKEUP_DISABLE (NMK_GPIO_SLPM_WAKEUP_DISABLE << PIN_SLPM_SHIFT) | ||
73 | #define PIN_SLPM_USE_MUX_SETTINGS_IN_SLEEP PIN_SLPM_WAKEUP_DISABLE | ||
74 | |||
75 | #define PIN_SLPM_GPIO PIN_SLPM_WAKEUP_ENABLE /* In SLPM, pin is a gpio */ | ||
76 | #define PIN_SLPM_ALTFUNC PIN_SLPM_WAKEUP_DISABLE /* In SLPM, pin is altfunc */ | ||
77 | |||
78 | #define PIN_DIR_SHIFT 14 | ||
79 | #define PIN_DIR_MASK (0x1 << PIN_DIR_SHIFT) | ||
80 | #define PIN_DIR(x) (((x) & PIN_DIR_MASK) >> PIN_DIR_SHIFT) | ||
81 | #define PIN_DIR_INPUT (0 << PIN_DIR_SHIFT) | ||
82 | #define PIN_DIR_OUTPUT (1 << PIN_DIR_SHIFT) | ||
83 | |||
84 | #define PIN_VAL_SHIFT 15 | ||
85 | #define PIN_VAL_MASK (0x1 << PIN_VAL_SHIFT) | ||
86 | #define PIN_VAL(x) (((x) & PIN_VAL_MASK) >> PIN_VAL_SHIFT) | ||
87 | #define PIN_VAL_LOW (0 << PIN_VAL_SHIFT) | ||
88 | #define PIN_VAL_HIGH (1 << PIN_VAL_SHIFT) | ||
89 | |||
90 | #define PIN_SLPM_PULL_SHIFT 16 | ||
91 | #define PIN_SLPM_PULL_MASK (0x7 << PIN_SLPM_PULL_SHIFT) | ||
92 | #define PIN_SLPM_PULL(x) \ | ||
93 | (((x) & PIN_SLPM_PULL_MASK) >> PIN_SLPM_PULL_SHIFT) | ||
94 | #define PIN_SLPM_PULL_NONE \ | ||
95 | ((1 + NMK_GPIO_PULL_NONE) << PIN_SLPM_PULL_SHIFT) | ||
96 | #define PIN_SLPM_PULL_UP \ | ||
97 | ((1 + NMK_GPIO_PULL_UP) << PIN_SLPM_PULL_SHIFT) | ||
98 | #define PIN_SLPM_PULL_DOWN \ | ||
99 | ((1 + NMK_GPIO_PULL_DOWN) << PIN_SLPM_PULL_SHIFT) | ||
100 | |||
101 | #define PIN_SLPM_DIR_SHIFT 19 | ||
102 | #define PIN_SLPM_DIR_MASK (0x3 << PIN_SLPM_DIR_SHIFT) | ||
103 | #define PIN_SLPM_DIR(x) \ | ||
104 | (((x) & PIN_SLPM_DIR_MASK) >> PIN_SLPM_DIR_SHIFT) | ||
105 | #define PIN_SLPM_DIR_INPUT ((1 + 0) << PIN_SLPM_DIR_SHIFT) | ||
106 | #define PIN_SLPM_DIR_OUTPUT ((1 + 1) << PIN_SLPM_DIR_SHIFT) | ||
107 | |||
108 | #define PIN_SLPM_VAL_SHIFT 21 | ||
109 | #define PIN_SLPM_VAL_MASK (0x3 << PIN_SLPM_VAL_SHIFT) | ||
110 | #define PIN_SLPM_VAL(x) \ | ||
111 | (((x) & PIN_SLPM_VAL_MASK) >> PIN_SLPM_VAL_SHIFT) | ||
112 | #define PIN_SLPM_VAL_LOW ((1 + 0) << PIN_SLPM_VAL_SHIFT) | ||
113 | #define PIN_SLPM_VAL_HIGH ((1 + 1) << PIN_SLPM_VAL_SHIFT) | ||
114 | |||
115 | #define PIN_SLPM_PDIS_SHIFT 23 | ||
116 | #define PIN_SLPM_PDIS_MASK (0x3 << PIN_SLPM_PDIS_SHIFT) | ||
117 | #define PIN_SLPM_PDIS(x) \ | ||
118 | (((x) & PIN_SLPM_PDIS_MASK) >> PIN_SLPM_PDIS_SHIFT) | ||
119 | #define PIN_SLPM_PDIS_NO_CHANGE (0 << PIN_SLPM_PDIS_SHIFT) | ||
120 | #define PIN_SLPM_PDIS_DISABLED (1 << PIN_SLPM_PDIS_SHIFT) | ||
121 | #define PIN_SLPM_PDIS_ENABLED (2 << PIN_SLPM_PDIS_SHIFT) | ||
122 | |||
123 | #define PIN_LOWEMI_SHIFT 25 | ||
124 | #define PIN_LOWEMI_MASK (0x1 << PIN_LOWEMI_SHIFT) | ||
125 | #define PIN_LOWEMI(x) (((x) & PIN_LOWEMI_MASK) >> PIN_LOWEMI_SHIFT) | ||
126 | #define PIN_LOWEMI_DISABLED (0 << PIN_LOWEMI_SHIFT) | ||
127 | #define PIN_LOWEMI_ENABLED (1 << PIN_LOWEMI_SHIFT) | ||
128 | |||
129 | #define PIN_GPIOMODE_SHIFT 26 | ||
130 | #define PIN_GPIOMODE_MASK (0x1 << PIN_GPIOMODE_SHIFT) | ||
131 | #define PIN_GPIOMODE(x) (((x) & PIN_GPIOMODE_MASK) >> PIN_GPIOMODE_SHIFT) | ||
132 | #define PIN_GPIOMODE_DISABLED (0 << PIN_GPIOMODE_SHIFT) | ||
133 | #define PIN_GPIOMODE_ENABLED (1 << PIN_GPIOMODE_SHIFT) | ||
134 | |||
135 | #define PIN_SLEEPMODE_SHIFT 27 | ||
136 | #define PIN_SLEEPMODE_MASK (0x1 << PIN_SLEEPMODE_SHIFT) | ||
137 | #define PIN_SLEEPMODE(x) (((x) & PIN_SLEEPMODE_MASK) >> PIN_SLEEPMODE_SHIFT) | ||
138 | #define PIN_SLEEPMODE_DISABLED (0 << PIN_SLEEPMODE_SHIFT) | ||
139 | #define PIN_SLEEPMODE_ENABLED (1 << PIN_SLEEPMODE_SHIFT) | ||
140 | |||
141 | |||
142 | /* Shortcuts. Use these instead of separate DIR, PULL, and VAL. */ | ||
143 | #define PIN_INPUT_PULLDOWN (PIN_DIR_INPUT | PIN_PULL_DOWN) | ||
144 | #define PIN_INPUT_PULLUP (PIN_DIR_INPUT | PIN_PULL_UP) | ||
145 | #define PIN_INPUT_NOPULL (PIN_DIR_INPUT | PIN_PULL_NONE) | ||
146 | #define PIN_OUTPUT_LOW (PIN_DIR_OUTPUT | PIN_VAL_LOW) | ||
147 | #define PIN_OUTPUT_HIGH (PIN_DIR_OUTPUT | PIN_VAL_HIGH) | ||
148 | |||
149 | #define PIN_SLPM_INPUT_PULLDOWN (PIN_SLPM_DIR_INPUT | PIN_SLPM_PULL_DOWN) | ||
150 | #define PIN_SLPM_INPUT_PULLUP (PIN_SLPM_DIR_INPUT | PIN_SLPM_PULL_UP) | ||
151 | #define PIN_SLPM_INPUT_NOPULL (PIN_SLPM_DIR_INPUT | PIN_SLPM_PULL_NONE) | ||
152 | #define PIN_SLPM_OUTPUT_LOW (PIN_SLPM_DIR_OUTPUT | PIN_SLPM_VAL_LOW) | ||
153 | #define PIN_SLPM_OUTPUT_HIGH (PIN_SLPM_DIR_OUTPUT | PIN_SLPM_VAL_HIGH) | ||
154 | |||
155 | #define PIN_CFG_DEFAULT (0) | ||
156 | |||
157 | #define PIN_CFG(num, alt) \ | ||
158 | (PIN_CFG_DEFAULT |\ | ||
159 | (PIN_NUM(num) | PIN_##alt)) | ||
160 | |||
161 | #define PIN_CFG_INPUT(num, alt, pull) \ | ||
162 | (PIN_CFG_DEFAULT |\ | ||
163 | (PIN_NUM(num) | PIN_##alt | PIN_INPUT_##pull)) | ||
164 | |||
165 | #define PIN_CFG_OUTPUT(num, alt, val) \ | ||
166 | (PIN_CFG_DEFAULT |\ | ||
167 | (PIN_NUM(num) | PIN_##alt | PIN_OUTPUT_##val)) | ||
168 | |||
169 | extern int nmk_config_pin(pin_cfg_t cfg, bool sleep); | ||
170 | extern int nmk_config_pins(pin_cfg_t *cfgs, int num); | ||
171 | extern int nmk_config_pins_sleep(pin_cfg_t *cfgs, int num); | ||
172 | |||
173 | #endif | ||
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h index 1957a8516e93..ff9b0aab5281 100644 --- a/arch/arm/plat-omap/include/plat/omap-serial.h +++ b/arch/arm/plat-omap/include/plat/omap-serial.h | |||
@@ -30,35 +30,6 @@ | |||
30 | */ | 30 | */ |
31 | #define OMAP_SERIAL_NAME "ttyO" | 31 | #define OMAP_SERIAL_NAME "ttyO" |
32 | 32 | ||
33 | #define OMAP_MODE13X_SPEED 230400 | ||
34 | |||
35 | #define OMAP_UART_SCR_TX_EMPTY 0x08 | ||
36 | |||
37 | /* WER = 0x7F | ||
38 | * Enable module level wakeup in WER reg | ||
39 | */ | ||
40 | #define OMAP_UART_WER_MOD_WKUP 0X7F | ||
41 | |||
42 | /* Enable XON/XOFF flow control on output */ | ||
43 | #define OMAP_UART_SW_TX 0x04 | ||
44 | |||
45 | /* Enable XON/XOFF flow control on input */ | ||
46 | #define OMAP_UART_SW_RX 0x04 | ||
47 | |||
48 | #define OMAP_UART_SYSC_RESET 0X07 | ||
49 | #define OMAP_UART_TCR_TRIG 0X0F | ||
50 | #define OMAP_UART_SW_CLR 0XF0 | ||
51 | #define OMAP_UART_FIFO_CLR 0X06 | ||
52 | |||
53 | #define OMAP_UART_DMA_CH_FREE -1 | ||
54 | |||
55 | #define OMAP_MAX_HSUART_PORTS 6 | ||
56 | |||
57 | #define MSR_SAVE_FLAGS UART_MSR_ANY_DELTA | ||
58 | |||
59 | #define UART_ERRATA_i202_MDR1_ACCESS BIT(0) | ||
60 | #define UART_ERRATA_i291_DMA_FORCEIDLE BIT(1) | ||
61 | |||
62 | struct omap_uart_port_info { | 33 | struct omap_uart_port_info { |
63 | bool dma_enabled; /* To specify DMA Mode */ | 34 | bool dma_enabled; /* To specify DMA Mode */ |
64 | unsigned int uartclk; /* UART clock rate */ | 35 | unsigned int uartclk; /* UART clock rate */ |
@@ -77,30 +48,4 @@ struct omap_uart_port_info { | |||
77 | void (*enable_wakeup)(struct device *, bool); | 48 | void (*enable_wakeup)(struct device *, bool); |
78 | }; | 49 | }; |
79 | 50 | ||
80 | struct uart_omap_dma { | ||
81 | u8 uart_dma_tx; | ||
82 | u8 uart_dma_rx; | ||
83 | int rx_dma_channel; | ||
84 | int tx_dma_channel; | ||
85 | dma_addr_t rx_buf_dma_phys; | ||
86 | dma_addr_t tx_buf_dma_phys; | ||
87 | unsigned int uart_base; | ||
88 | /* | ||
89 | * Buffer for rx dma.It is not required for tx because the buffer | ||
90 | * comes from port structure. | ||
91 | */ | ||
92 | unsigned char *rx_buf; | ||
93 | unsigned int prev_rx_dma_pos; | ||
94 | int tx_buf_size; | ||
95 | int tx_dma_used; | ||
96 | int rx_dma_used; | ||
97 | spinlock_t tx_lock; | ||
98 | spinlock_t rx_lock; | ||
99 | /* timer to poll activity on rx dma */ | ||
100 | struct timer_list rx_timer; | ||
101 | unsigned int rx_buf_size; | ||
102 | unsigned int rx_poll_rate; | ||
103 | unsigned int rx_timeout; | ||
104 | }; | ||
105 | |||
106 | #endif /* __OMAP_SERIAL_H__ */ | 51 | #endif /* __OMAP_SERIAL_H__ */ |
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index db98e7021f0d..0abd1c469887 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
@@ -473,12 +473,13 @@ int s3c2410_dma_enqueue(enum dma_ch channel, void *id, | |||
473 | pr_debug("dma%d: %s: buffer %p queued onto non-empty channel\n", | 473 | pr_debug("dma%d: %s: buffer %p queued onto non-empty channel\n", |
474 | chan->number, __func__, buf); | 474 | chan->number, __func__, buf); |
475 | 475 | ||
476 | if (chan->end == NULL) | 476 | if (chan->end == NULL) { |
477 | pr_debug("dma%d: %s: %p not empty, and chan->end==NULL?\n", | 477 | pr_debug("dma%d: %s: %p not empty, and chan->end==NULL?\n", |
478 | chan->number, __func__, chan); | 478 | chan->number, __func__, chan); |
479 | 479 | } else { | |
480 | chan->end->next = buf; | 480 | chan->end->next = buf; |
481 | chan->end = buf; | 481 | chan->end = buf; |
482 | } | ||
482 | } | 483 | } |
483 | 484 | ||
484 | /* if necessary, update the next buffer field */ | 485 | /* if necessary, update the next buffer field */ |
diff --git a/arch/arm/plat-spear/Kconfig b/arch/arm/plat-spear/Kconfig index f8db7b2deb36..87dbd81bdf51 100644 --- a/arch/arm/plat-spear/Kconfig +++ b/arch/arm/plat-spear/Kconfig | |||
@@ -12,6 +12,7 @@ config ARCH_SPEAR13XX | |||
12 | bool "ST SPEAr13xx with Device Tree" | 12 | bool "ST SPEAr13xx with Device Tree" |
13 | select ARM_GIC | 13 | select ARM_GIC |
14 | select CPU_V7 | 14 | select CPU_V7 |
15 | select GPIO_SPEAR_SPICS | ||
15 | select HAVE_SMP | 16 | select HAVE_SMP |
16 | select MIGHT_HAVE_CACHE_L2X0 | 17 | select MIGHT_HAVE_CACHE_L2X0 |
17 | select PINCTRL | 18 | select PINCTRL |
diff --git a/arch/arm/plat-versatile/Kconfig b/arch/arm/plat-versatile/Kconfig index 2a4ae8a6a081..eb50231c4efd 100644 --- a/arch/arm/plat-versatile/Kconfig +++ b/arch/arm/plat-versatile/Kconfig | |||
@@ -19,7 +19,7 @@ config PLAT_VERSATILE_LEDS | |||
19 | def_bool y if NEW_LEDS | 19 | def_bool y if NEW_LEDS |
20 | depends on ARCH_REALVIEW || ARCH_VERSATILE | 20 | depends on ARCH_REALVIEW || ARCH_VERSATILE |
21 | select LEDS_CLASS | 21 | select LEDS_CLASS |
22 | select LEDS_TRIGGER | 22 | select LEDS_TRIGGERS |
23 | 23 | ||
24 | config PLAT_VERSATILE_SCHED_CLOCK | 24 | config PLAT_VERSATILE_SCHED_CLOCK |
25 | def_bool y | 25 | def_bool y |