aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 21:36:55 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 21:36:55 -0500
commitf2c73464d7b399cf4e0c601c1c7d7b079080fa52 (patch)
tree902decd0c280757075bce5068fee679e0ccc261e /arch/arm
parent93abdb7785503c269e73e811f3c7fd23a9243b14 (diff)
parent273c2279ca502267fac40bcaecb35942380c429c (diff)
Merge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC cleanups from Olof Johansson: "This is the branch where we usually queue up cleanup efforts, moving drivers out of the architecture directory, header file restructuring, etc. Sometimes they tangle with new development so it's hard to keep it strictly to cleanups. Some of the things included in this branch are: * Atmel SAMA5 conversion to common clock * Reset framework conversion for tegra platforms - Some of this depends on tegra clock driver reworks that are shared with Mike Turquette's clk tree. * Tegra DMA refactoring, which are shared branches with the DMA tree. * Removal of some header files on exynos to prepare for multiplatform" * tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (169 commits) ARM: mvebu: move Armada 370/XP specific definitions to armada-370-xp.h ARM: mvebu: remove prototypes of non-existing functions from common.h ARM: mvebu: move ARMADA_XP_MAX_CPUS to armada-370-xp.h serial: sh-sci: Rework baud rate calculation serial: sh-sci: Compute overrun_bit without using baud rate algo serial: sh-sci: Remove unused GPIO request code serial: sh-sci: Move overrun_bit and error_mask fields out of pdata serial: sh-sci: Support resources passed through platform resources serial: sh-sci: Don't check IRQ in verify port operation serial: sh-sci: Set the UPF_FIXED_PORT flag serial: sh-sci: Remove duplicate interrupt check in verify port op serial: sh-sci: Simplify baud rate calculation algorithms serial: sh-sci: Remove baud rate calculation algorithm 5 serial: sh-sci: Sort headers alphabetically ARM: EXYNOS: Kill exynos_pm_late_initcall() ARM: EXYNOS: Consolidate selection of PM_GENERIC_DOMAINS for Exynos4 ARM: at91: switch Calao QIL-A9260 board to DT clk: at91: fix pmc_clk_ids data type attriubte PM / devfreq: use inclusion <mach/map.h> instead of <plat/map-s5p.h> ARM: EXYNOS: remove <mach/regs-clock.h> for exynos ...
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/boot/dts/Makefile1
-rw-r--r--arch/arm/boot/dts/at91-qil_a9260.dts185
-rw-r--r--arch/arm/boot/dts/sama5d3.dtsi379
-rw-r--r--arch/arm/boot/dts/sama5d3_can.dtsi20
-rw-r--r--arch/arm/boot/dts/sama5d3_emac.dtsi11
-rw-r--r--arch/arm/boot/dts/sama5d3_gmac.dtsi11
-rw-r--r--arch/arm/boot/dts/sama5d3_lcd.dtsi17
-rw-r--r--arch/arm/boot/dts/sama5d3_mci2.dtsi12
-rw-r--r--arch/arm/boot/dts/sama5d3_tcb1.dtsi12
-rw-r--r--arch/arm/boot/dts/sama5d3_uart.dtsi21
-rw-r--r--arch/arm/boot/dts/sama5d3xcm.dtsi17
-rw-r--r--arch/arm/boot/dts/tegra114.dtsi157
-rw-r--r--arch/arm/boot/dts/tegra20-paz00.dts2
-rw-r--r--arch/arm/boot/dts/tegra20.dtsi136
-rw-r--r--arch/arm/boot/dts/tegra30.dtsi175
-rw-r--r--arch/arm/configs/at91_dt_defconfig1
-rw-r--r--arch/arm/configs/at91rm9200_defconfig1
-rw-r--r--arch/arm/configs/at91sam9260_9g20_defconfig2
-rw-r--r--arch/arm/configs/at91sam9261_9g10_defconfig1
-rw-r--r--arch/arm/configs/at91sam9g45_defconfig1
-rw-r--r--arch/arm/configs/at91sam9rl_defconfig1
-rw-r--r--arch/arm/configs/sama5_defconfig1
-rw-r--r--arch/arm/mach-at91/Kconfig50
-rw-r--r--arch/arm/mach-at91/Kconfig.non_dt12
-rw-r--r--arch/arm/mach-at91/Makefile3
-rw-r--r--arch/arm/mach-at91/at91rm9200.c2
-rw-r--r--arch/arm/mach-at91/at91sam9260.c2
-rw-r--r--arch/arm/mach-at91/at91sam9261.c2
-rw-r--r--arch/arm/mach-at91/at91sam9263.c2
-rw-r--r--arch/arm/mach-at91/at91sam926x_time.c14
-rw-r--r--arch/arm/mach-at91/at91sam9g45.c2
-rw-r--r--arch/arm/mach-at91/at91sam9n12.c2
-rw-r--r--arch/arm/mach-at91/at91sam9rl.c2
-rw-r--r--arch/arm/mach-at91/at91sam9x5.c2
-rw-r--r--arch/arm/mach-at91/board-dt-sama5.c10
-rw-r--r--arch/arm/mach-at91/board-qil-a9260.c266
-rw-r--r--arch/arm/mach-at91/clock.c13
-rw-r--r--arch/arm/mach-at91/generic.h3
-rw-r--r--arch/arm/mach-at91/include/mach/at91_pmc.h190
-rw-r--r--arch/arm/mach-at91/pm.c5
-rw-r--r--arch/arm/mach-at91/pm_slowclock.S2
-rw-r--r--arch/arm/mach-at91/sama5d3.c344
-rw-r--r--arch/arm/mach-at91/setup.c8
-rw-r--r--arch/arm/mach-dove/common.c15
-rw-r--r--arch/arm/mach-exynos/Kconfig4
-rw-r--r--arch/arm/mach-exynos/common.c8
-rw-r--r--arch/arm/mach-exynos/common.h6
-rw-r--r--arch/arm/mach-exynos/cpuidle.c25
-rw-r--r--arch/arm/mach-exynos/hotplug.c2
-rw-r--r--arch/arm/mach-exynos/include/mach/pm-core.h5
-rw-r--r--arch/arm/mach-exynos/include/mach/regs-clock.h372
-rw-r--r--arch/arm/mach-exynos/include/mach/regs-irq.h19
-rw-r--r--arch/arm/mach-exynos/mach-exynos5-dt.c2
-rw-r--r--arch/arm/mach-exynos/platsmp.c6
-rw-r--r--arch/arm/mach-exynos/pm.c33
-rw-r--r--arch/arm/mach-exynos/pm_domains.c9
-rw-r--r--arch/arm/mach-exynos/pmu.c17
-rw-r--r--arch/arm/mach-exynos/regs-pmu.h (renamed from arch/arm/mach-exynos/include/mach/regs-pmu.h)53
-rw-r--r--arch/arm/mach-imx/platsmp.c3
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c40
-rw-r--r--arch/arm/mach-mmp/Kconfig3
-rw-r--r--arch/arm/mach-mmp/Makefile3
-rw-r--r--arch/arm/mach-msm/platsmp.c3
-rw-r--r--arch/arm/mach-mvebu/armada-370-xp.h4
-rw-r--r--arch/arm/mach-mvebu/coherency.c1
-rw-r--r--arch/arm/mach-mvebu/coherency.h4
-rw-r--r--arch/arm/mach-mvebu/common.h10
-rw-r--r--arch/arm/mach-mvebu/hotplug.c1
-rw-r--r--arch/arm/mach-mvebu/platsmp.c4
-rw-r--r--arch/arm/mach-mvebu/pmsu.c3
-rw-r--r--arch/arm/mach-mvebu/system-controller.c5
-rw-r--r--arch/arm/mach-orion5x/board-dt.c2
-rw-r--r--arch/arm/mach-orion5x/common.c7
-rw-r--r--arch/arm/mach-orion5x/db88f5281-setup.c2
-rw-r--r--arch/arm/mach-orion5x/irq.c1
-rw-r--r--arch/arm/mach-orion5x/pci.c4
-rw-r--r--arch/arm/mach-orion5x/rd88f5182-setup.c2
-rw-r--r--arch/arm/mach-orion5x/terastation_pro2-setup.c2
-rw-r--r--arch/arm/mach-orion5x/ts209-setup.c2
-rw-r--r--arch/arm/mach-orion5x/ts78xx-setup.c2
-rw-r--r--arch/arm/mach-prima2/platsmp.c3
-rw-r--r--arch/arm/mach-pxa/am200epd.c3
-rw-r--r--arch/arm/mach-pxa/am300epd.c3
-rw-r--r--arch/arm/mach-pxa/em-x270.c3
-rw-r--r--arch/arm/mach-pxa/irq.c4
-rw-r--r--arch/arm/mach-pxa/magician.c2
-rw-r--r--arch/arm/mach-pxa/mainstone.c2
-rw-r--r--arch/arm/mach-pxa/pcm990-baseboard.c2
-rw-r--r--arch/arm/mach-pxa/sharpsl_pm.c8
-rw-r--r--arch/arm/mach-pxa/time.c2
-rw-r--r--arch/arm/mach-pxa/trizeps4.c3
-rw-r--r--arch/arm/mach-s3c24xx/dma.c2
-rw-r--r--arch/arm/mach-s3c24xx/simtec-usb.c3
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq.c2
-rw-r--r--arch/arm/mach-shmobile/board-ape6evm.c6
-rw-r--r--arch/arm/mach-shmobile/board-bockw-reference.c1
-rw-r--r--arch/arm/mach-shmobile/board-lager-reference.c5
-rw-r--r--arch/arm/mach-shmobile/board-lager.c2
-rw-r--r--arch/arm/mach-shmobile/board-marzen.c25
-rw-r--r--arch/arm/mach-shmobile/clock-r7s72100.c3
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7790.c2
-rw-r--r--arch/arm/mach-shmobile/clock-sh7372.c9
-rw-r--r--arch/arm/mach-shmobile/clock-sh73a0.c14
-rw-r--r--arch/arm/mach-shmobile/include/mach/r8a7779.h7
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7779.c57
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7790.c7
-rw-r--r--arch/arm/mach-shmobile/setup-sh73a0.c16
-rw-r--r--arch/arm/mach-sti/platsmp.c3
-rw-r--r--arch/arm/mach-tegra/Kconfig2
-rw-r--r--arch/arm/mach-tegra/powergate.c8
-rw-r--r--arch/arm/mach-ux500/platsmp.c3
-rw-r--r--arch/arm/mach-zynq/common.c16
-rw-r--r--arch/arm/mach-zynq/common.h2
-rw-r--r--arch/arm/mach-zynq/headsmp.S6
-rw-r--r--arch/arm/mach-zynq/platsmp.c25
-rw-r--r--arch/arm/plat-orion/common.c9
-rw-r--r--arch/arm/plat-orion/time.c3
-rw-r--r--arch/arm/plat-pxa/dma.c2
-rw-r--r--arch/arm/plat-samsung/Kconfig8
-rw-r--r--arch/arm/plat-samsung/include/plat/pm.h4
-rw-r--r--arch/arm/plat-samsung/pm.c6
-rw-r--r--arch/arm/plat-samsung/s5p-irq-pm.c3
-rw-r--r--arch/arm/plat-versatile/platsmp.c3
124 files changed, 1408 insertions, 1676 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 0b6d8bf1bc34..dbe173dfa4ae 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -743,7 +743,6 @@ config ARCH_S3C64XX
743 select S3C_DEV_NAND 743 select S3C_DEV_NAND
744 select S3C_GPIO_TRACK 744 select S3C_GPIO_TRACK
745 select SAMSUNG_ATAGS 745 select SAMSUNG_ATAGS
746 select SAMSUNG_GPIOLIB_4BIT
747 select SAMSUNG_WAKEMASK 746 select SAMSUNG_WAKEMASK
748 select SAMSUNG_WDT_RESET 747 select SAMSUNG_WDT_RESET
749 select USB_ARCH_HAS_OHCI 748 select USB_ARCH_HAS_OHCI
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index d57c1a65b24f..36e0d06d3efa 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -6,6 +6,7 @@ dtb-$(CONFIG_ARCH_AT91) += at91rm9200ek.dtb
6dtb-$(CONFIG_ARCH_AT91) += mpa1600.dtb 6dtb-$(CONFIG_ARCH_AT91) += mpa1600.dtb
7# sam9260 7# sam9260
8dtb-$(CONFIG_ARCH_AT91) += animeo_ip.dtb 8dtb-$(CONFIG_ARCH_AT91) += animeo_ip.dtb
9dtb-$(CONFIG_ARCH_AT91) += at91-qil_a9260.dtb
9dtb-$(CONFIG_ARCH_AT91) += aks-cdu.dtb 10dtb-$(CONFIG_ARCH_AT91) += aks-cdu.dtb
10dtb-$(CONFIG_ARCH_AT91) += ethernut5.dtb 11dtb-$(CONFIG_ARCH_AT91) += ethernut5.dtb
11dtb-$(CONFIG_ARCH_AT91) += evk-pro3.dtb 12dtb-$(CONFIG_ARCH_AT91) += evk-pro3.dtb
diff --git a/arch/arm/boot/dts/at91-qil_a9260.dts b/arch/arm/boot/dts/at91-qil_a9260.dts
new file mode 100644
index 000000000000..5576ae8786c0
--- /dev/null
+++ b/arch/arm/boot/dts/at91-qil_a9260.dts
@@ -0,0 +1,185 @@
1/*
2 * at91-qil_a9260.dts - Device Tree file for Calao QIL A9260 board
3 *
4 * Copyright (C) 2011-2013 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
5 *
6 * Licensed under GPLv2.
7 */
8/dts-v1/;
9#include "at91sam9260.dtsi"
10/ {
11 model = "Calao QIL A9260";
12 compatible = "calao,qil-a9260", "atmel,at91sam9260", "atmel,at91sam9";
13
14 chosen {
15 bootargs = "console=ttyS0,115200";
16 };
17
18 memory {
19 reg = <0x20000000 0x4000000>;
20 };
21
22 clocks {
23 #address-cells = <1>;
24 #size-cells = <1>;
25 ranges;
26
27 main_clock: clock@0 {
28 compatible = "atmel,osc", "fixed-clock";
29 clock-frequency = <12000000>;
30 };
31 };
32
33 ahb {
34 apb {
35 usb1: gadget@fffa4000 {
36 atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
37 status = "okay";
38 };
39
40 mmc0: mmc@fffa8000 {
41 pinctrl-0 = <
42 &pinctrl_mmc0_clk
43 &pinctrl_mmc0_slot0_cmd_dat0
44 &pinctrl_mmc0_slot0_dat1_3>;
45 status = "okay";
46 slot@0 {
47 reg = <0>;
48 bus-width = <4>;
49 };
50 };
51
52 usart0: serial@fffb0000 {
53 pinctrl-0 =
54 <&pinctrl_usart0
55 &pinctrl_usart0_rts
56 &pinctrl_usart0_cts
57 &pinctrl_usart0_dtr_dsr
58 &pinctrl_usart0_dcd
59 &pinctrl_usart0_ri>;
60 status = "okay";
61 };
62
63 usart1: serial@fffb4000 {
64 pinctrl-0 =
65 <&pinctrl_usart1
66 &pinctrl_usart1_rts
67 &pinctrl_usart1_cts>;
68 status = "okay";
69 };
70
71 usart2: serial@fffb8000 {
72 pinctrl-0 =
73 <&pinctrl_usart2
74 &pinctrl_usart2_rts
75 &pinctrl_usart2_cts>;
76 status = "okay";
77 };
78
79 macb0: ethernet@fffc4000 {
80 phy-mode = "rmii";
81 status = "okay";
82 };
83
84 spi0: spi@fffc8000 {
85 status = "okay";
86 cs-gpios = <&pioA 3 GPIO_ACTIVE_HIGH>;
87
88 m41t94@0 {
89 compatible = "st,m41t94";
90 reg = <0>;
91 spi-max-frequency = <1000000>;
92 };
93
94 };
95
96 dbgu: serial@fffff200 {
97 status = "okay";
98 };
99
100 shdwc@fffffd10 {
101 atmel,wakeup-counter = <10>;
102 atmel,wakeup-rtt-timer;
103 };
104 };
105
106 usb0: ohci@00500000 {
107 num-ports = <2>;
108 status = "okay";
109 };
110
111 nand0: nand@40000000 {
112 nand-bus-width = <8>;
113 nand-ecc-mode = "soft";
114 nand-on-flash-bbt;
115 status = "okay";
116
117 at91bootstrap@0 {
118 label = "at91bootstrap";
119 reg = <0x0 0x20000>;
120 };
121
122 barebox@20000 {
123 label = "barebox";
124 reg = <0x20000 0x40000>;
125 };
126
127 bareboxenv@60000 {
128 label = "bareboxenv";
129 reg = <0x60000 0x20000>;
130 };
131
132 bareboxenv2@80000 {
133 label = "bareboxenv2";
134 reg = <0x80000 0x20000>;
135 };
136
137 oftree@a0000 {
138 label = "oftree";
139 reg = <0xa0000 0x20000>;
140 };
141
142 kernel@c0000 {
143 label = "kernel";
144 reg = <0xc0000 0x400000>;
145 };
146
147 rootfs@4c0000 {
148 label = "rootfs";
149 reg = <0x4c0000 0x7800000>;
150 };
151
152 data@7cc0000 {
153 label = "data";
154 reg = <0x7cc0000 0x8340000>;
155 };
156 };
157 };
158
159 leds {
160 compatible = "gpio-leds";
161
162 user_led {
163 label = "user_led";
164 gpios = <&pioB 21 GPIO_ACTIVE_HIGH>;
165 linux,default-trigger = "heartbeat";
166 };
167 };
168
169 gpio_keys {
170 compatible = "gpio-keys";
171 #address-cells = <1>;
172 #size-cells = <0>;
173
174 user_pb {
175 label = "user_pb";
176 gpios = <&pioB 10 GPIO_ACTIVE_LOW>;
177 linux,code = <28>;
178 gpio-key,wakeup;
179 };
180 };
181
182 i2c@0 {
183 status = "okay";
184 };
185};
diff --git a/arch/arm/boot/dts/sama5d3.dtsi b/arch/arm/boot/dts/sama5d3.dtsi
index 5cdaba4cea86..de9feced9935 100644
--- a/arch/arm/boot/dts/sama5d3.dtsi
+++ b/arch/arm/boot/dts/sama5d3.dtsi
@@ -13,6 +13,7 @@
13#include <dt-bindings/pinctrl/at91.h> 13#include <dt-bindings/pinctrl/at91.h>
14#include <dt-bindings/interrupt-controller/irq.h> 14#include <dt-bindings/interrupt-controller/irq.h>
15#include <dt-bindings/gpio/gpio.h> 15#include <dt-bindings/gpio/gpio.h>
16#include <dt-bindings/clk/at91.h>
16 17
17/ { 18/ {
18 model = "Atmel SAMA5D3 family SoC"; 19 model = "Atmel SAMA5D3 family SoC";
@@ -56,6 +57,14 @@
56 reg = <0x20000000 0x8000000>; 57 reg = <0x20000000 0x8000000>;
57 }; 58 };
58 59
60 clocks {
61 adc_op_clk: adc_op_clk{
62 compatible = "fixed-clock";
63 #clock-cells = <0>;
64 clock-frequency = <20000000>;
65 };
66 };
67
59 ahb { 68 ahb {
60 compatible = "simple-bus"; 69 compatible = "simple-bus";
61 #address-cells = <1>; 70 #address-cells = <1>;
@@ -79,6 +88,8 @@
79 status = "disabled"; 88 status = "disabled";
80 #address-cells = <1>; 89 #address-cells = <1>;
81 #size-cells = <0>; 90 #size-cells = <0>;
91 clocks = <&mci0_clk>;
92 clock-names = "mci_clk";
82 }; 93 };
83 94
84 spi0: spi@f0004000 { 95 spi0: spi@f0004000 {
@@ -92,6 +103,8 @@
92 dma-names = "tx", "rx"; 103 dma-names = "tx", "rx";
93 pinctrl-names = "default"; 104 pinctrl-names = "default";
94 pinctrl-0 = <&pinctrl_spi0>; 105 pinctrl-0 = <&pinctrl_spi0>;
106 clocks = <&spi0_clk>;
107 clock-names = "spi_clk";
95 status = "disabled"; 108 status = "disabled";
96 }; 109 };
97 110
@@ -101,6 +114,8 @@
101 interrupts = <38 IRQ_TYPE_LEVEL_HIGH 4>; 114 interrupts = <38 IRQ_TYPE_LEVEL_HIGH 4>;
102 pinctrl-names = "default"; 115 pinctrl-names = "default";
103 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 116 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
117 clocks = <&ssc0_clk>;
118 clock-names = "pclk";
104 status = "disabled"; 119 status = "disabled";
105 }; 120 };
106 121
@@ -108,6 +123,8 @@
108 compatible = "atmel,at91sam9x5-tcb"; 123 compatible = "atmel,at91sam9x5-tcb";
109 reg = <0xf0010000 0x100>; 124 reg = <0xf0010000 0x100>;
110 interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0>; 125 interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0>;
126 clocks = <&tcb0_clk>;
127 clock-names = "t0_clk";
111 }; 128 };
112 129
113 i2c0: i2c@f0014000 { 130 i2c0: i2c@f0014000 {
@@ -121,6 +138,7 @@
121 pinctrl-0 = <&pinctrl_i2c0>; 138 pinctrl-0 = <&pinctrl_i2c0>;
122 #address-cells = <1>; 139 #address-cells = <1>;
123 #size-cells = <0>; 140 #size-cells = <0>;
141 clocks = <&twi0_clk>;
124 status = "disabled"; 142 status = "disabled";
125 }; 143 };
126 144
@@ -135,6 +153,7 @@
135 pinctrl-0 = <&pinctrl_i2c1>; 153 pinctrl-0 = <&pinctrl_i2c1>;
136 #address-cells = <1>; 154 #address-cells = <1>;
137 #size-cells = <0>; 155 #size-cells = <0>;
156 clocks = <&twi1_clk>;
138 status = "disabled"; 157 status = "disabled";
139 }; 158 };
140 159
@@ -144,6 +163,8 @@
144 interrupts = <12 IRQ_TYPE_LEVEL_HIGH 5>; 163 interrupts = <12 IRQ_TYPE_LEVEL_HIGH 5>;
145 pinctrl-names = "default"; 164 pinctrl-names = "default";
146 pinctrl-0 = <&pinctrl_usart0>; 165 pinctrl-0 = <&pinctrl_usart0>;
166 clocks = <&usart0_clk>;
167 clock-names = "usart";
147 status = "disabled"; 168 status = "disabled";
148 }; 169 };
149 170
@@ -153,6 +174,8 @@
153 interrupts = <13 IRQ_TYPE_LEVEL_HIGH 5>; 174 interrupts = <13 IRQ_TYPE_LEVEL_HIGH 5>;
154 pinctrl-names = "default"; 175 pinctrl-names = "default";
155 pinctrl-0 = <&pinctrl_usart1>; 176 pinctrl-0 = <&pinctrl_usart1>;
177 clocks = <&usart1_clk>;
178 clock-names = "usart";
156 status = "disabled"; 179 status = "disabled";
157 }; 180 };
158 181
@@ -174,6 +197,8 @@
174 status = "disabled"; 197 status = "disabled";
175 #address-cells = <1>; 198 #address-cells = <1>;
176 #size-cells = <0>; 199 #size-cells = <0>;
200 clocks = <&mci1_clk>;
201 clock-names = "mci_clk";
177 }; 202 };
178 203
179 spi1: spi@f8008000 { 204 spi1: spi@f8008000 {
@@ -187,6 +212,8 @@
187 dma-names = "tx", "rx"; 212 dma-names = "tx", "rx";
188 pinctrl-names = "default"; 213 pinctrl-names = "default";
189 pinctrl-0 = <&pinctrl_spi1>; 214 pinctrl-0 = <&pinctrl_spi1>;
215 clocks = <&spi1_clk>;
216 clock-names = "spi_clk";
190 status = "disabled"; 217 status = "disabled";
191 }; 218 };
192 219
@@ -196,6 +223,8 @@
196 interrupts = <39 IRQ_TYPE_LEVEL_HIGH 4>; 223 interrupts = <39 IRQ_TYPE_LEVEL_HIGH 4>;
197 pinctrl-names = "default"; 224 pinctrl-names = "default";
198 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>; 225 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
226 clocks = <&ssc1_clk>;
227 clock-names = "pclk";
199 status = "disabled"; 228 status = "disabled";
200 }; 229 };
201 230
@@ -219,6 +248,9 @@
219 &pinctrl_adc0_ad10 248 &pinctrl_adc0_ad10
220 &pinctrl_adc0_ad11 249 &pinctrl_adc0_ad11
221 >; 250 >;
251 clocks = <&adc_clk>,
252 <&adc_op_clk>;
253 clock-names = "adc_clk", "adc_op_clk";
222 atmel,adc-channel-base = <0x50>; 254 atmel,adc-channel-base = <0x50>;
223 atmel,adc-channels-used = <0xfff>; 255 atmel,adc-channels-used = <0xfff>;
224 atmel,adc-drdy-mask = <0x1000000>; 256 atmel,adc-drdy-mask = <0x1000000>;
@@ -274,6 +306,7 @@
274 dma-names = "tx", "rx"; 306 dma-names = "tx", "rx";
275 #address-cells = <1>; 307 #address-cells = <1>;
276 #size-cells = <0>; 308 #size-cells = <0>;
309 clocks = <&twi2_clk>;
277 status = "disabled"; 310 status = "disabled";
278 }; 311 };
279 312
@@ -283,6 +316,8 @@
283 interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>; 316 interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>;
284 pinctrl-names = "default"; 317 pinctrl-names = "default";
285 pinctrl-0 = <&pinctrl_usart2>; 318 pinctrl-0 = <&pinctrl_usart2>;
319 clocks = <&usart2_clk>;
320 clock-names = "usart";
286 status = "disabled"; 321 status = "disabled";
287 }; 322 };
288 323
@@ -292,6 +327,8 @@
292 interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>; 327 interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>;
293 pinctrl-names = "default"; 328 pinctrl-names = "default";
294 pinctrl-0 = <&pinctrl_usart3>; 329 pinctrl-0 = <&pinctrl_usart3>;
330 clocks = <&usart3_clk>;
331 clock-names = "usart";
295 status = "disabled"; 332 status = "disabled";
296 }; 333 };
297 334
@@ -318,6 +355,8 @@
318 reg = <0xffffe600 0x200>; 355 reg = <0xffffe600 0x200>;
319 interrupts = <30 IRQ_TYPE_LEVEL_HIGH 0>; 356 interrupts = <30 IRQ_TYPE_LEVEL_HIGH 0>;
320 #dma-cells = <2>; 357 #dma-cells = <2>;
358 clocks = <&dma0_clk>;
359 clock-names = "dma_clk";
321 }; 360 };
322 361
323 dma1: dma-controller@ffffe800 { 362 dma1: dma-controller@ffffe800 {
@@ -325,6 +364,8 @@
325 reg = <0xffffe800 0x200>; 364 reg = <0xffffe800 0x200>;
326 interrupts = <31 IRQ_TYPE_LEVEL_HIGH 0>; 365 interrupts = <31 IRQ_TYPE_LEVEL_HIGH 0>;
327 #dma-cells = <2>; 366 #dma-cells = <2>;
367 clocks = <&dma1_clk>;
368 clock-names = "dma_clk";
328 }; 369 };
329 370
330 ramc0: ramc@ffffea00 { 371 ramc0: ramc@ffffea00 {
@@ -338,6 +379,8 @@
338 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 7>; 379 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 7>;
339 pinctrl-names = "default"; 380 pinctrl-names = "default";
340 pinctrl-0 = <&pinctrl_dbgu>; 381 pinctrl-0 = <&pinctrl_dbgu>;
382 clocks = <&dbgu_clk>;
383 clock-names = "usart";
341 status = "disabled"; 384 status = "disabled";
342 }; 385 };
343 386
@@ -626,6 +669,7 @@
626 gpio-controller; 669 gpio-controller;
627 interrupt-controller; 670 interrupt-controller;
628 #interrupt-cells = <2>; 671 #interrupt-cells = <2>;
672 clocks = <&pioA_clk>;
629 }; 673 };
630 674
631 pioB: gpio@fffff400 { 675 pioB: gpio@fffff400 {
@@ -636,6 +680,7 @@
636 gpio-controller; 680 gpio-controller;
637 interrupt-controller; 681 interrupt-controller;
638 #interrupt-cells = <2>; 682 #interrupt-cells = <2>;
683 clocks = <&pioB_clk>;
639 }; 684 };
640 685
641 pioC: gpio@fffff600 { 686 pioC: gpio@fffff600 {
@@ -646,6 +691,7 @@
646 gpio-controller; 691 gpio-controller;
647 interrupt-controller; 692 interrupt-controller;
648 #interrupt-cells = <2>; 693 #interrupt-cells = <2>;
694 clocks = <&pioC_clk>;
649 }; 695 };
650 696
651 pioD: gpio@fffff800 { 697 pioD: gpio@fffff800 {
@@ -656,6 +702,7 @@
656 gpio-controller; 702 gpio-controller;
657 interrupt-controller; 703 interrupt-controller;
658 #interrupt-cells = <2>; 704 #interrupt-cells = <2>;
705 clocks = <&pioD_clk>;
659 }; 706 };
660 707
661 pioE: gpio@fffffa00 { 708 pioE: gpio@fffffa00 {
@@ -666,12 +713,334 @@
666 gpio-controller; 713 gpio-controller;
667 interrupt-controller; 714 interrupt-controller;
668 #interrupt-cells = <2>; 715 #interrupt-cells = <2>;
716 clocks = <&pioE_clk>;
669 }; 717 };
670 }; 718 };
671 719
672 pmc: pmc@fffffc00 { 720 pmc: pmc@fffffc00 {
673 compatible = "atmel,at91rm9200-pmc"; 721 compatible = "atmel,sama5d3-pmc";
674 reg = <0xfffffc00 0x120>; 722 reg = <0xfffffc00 0x120>;
723 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
724 interrupt-controller;
725 #address-cells = <1>;
726 #size-cells = <0>;
727 #interrupt-cells = <1>;
728
729 clk32k: slck {
730 compatible = "fixed-clock";
731 #clock-cells = <0>;
732 clock-frequency = <32768>;
733 };
734
735 main: mainck {
736 compatible = "atmel,at91rm9200-clk-main";
737 #clock-cells = <0>;
738 interrupt-parent = <&pmc>;
739 interrupts = <AT91_PMC_MOSCS>;
740 clocks = <&clk32k>;
741 };
742
743 plla: pllack {
744 compatible = "atmel,sama5d3-clk-pll";
745 #clock-cells = <0>;
746 interrupt-parent = <&pmc>;
747 interrupts = <AT91_PMC_LOCKA>;
748 clocks = <&main>;
749 reg = <0>;
750 atmel,clk-input-range = <8000000 50000000>;
751 #atmel,pll-clk-output-range-cells = <4>;
752 atmel,pll-clk-output-ranges = <400000000 1000000000 0 0>;
753 };
754
755 plladiv: plladivck {
756 compatible = "atmel,at91sam9x5-clk-plldiv";
757 #clock-cells = <0>;
758 clocks = <&plla>;
759 };
760
761 utmi: utmick {
762 compatible = "atmel,at91sam9x5-clk-utmi";
763 #clock-cells = <0>;
764 interrupt-parent = <&pmc>;
765 interrupts = <AT91_PMC_LOCKU>;
766 clocks = <&main>;
767 };
768
769 mck: masterck {
770 compatible = "atmel,at91sam9x5-clk-master";
771 #clock-cells = <0>;
772 interrupt-parent = <&pmc>;
773 interrupts = <AT91_PMC_MCKRDY>;
774 clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>;
775 atmel,clk-output-range = <0 166000000>;
776 atmel,clk-divisors = <1 2 4 3>;
777 };
778
779 usb: usbck {
780 compatible = "atmel,at91sam9x5-clk-usb";
781 #clock-cells = <0>;
782 clocks = <&plladiv>, <&utmi>;
783 };
784
785 prog: progck {
786 compatible = "atmel,at91sam9x5-clk-programmable";
787 #address-cells = <1>;
788 #size-cells = <0>;
789 interrupt-parent = <&pmc>;
790 clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>, <&mck>;
791
792 prog0: prog0 {
793 #clock-cells = <0>;
794 reg = <0>;
795 interrupts = <AT91_PMC_PCKRDY(0)>;
796 };
797
798 prog1: prog1 {
799 #clock-cells = <0>;
800 reg = <1>;
801 interrupts = <AT91_PMC_PCKRDY(1)>;
802 };
803
804 prog2: prog2 {
805 #clock-cells = <0>;
806 reg = <2>;
807 interrupts = <AT91_PMC_PCKRDY(2)>;
808 };
809 };
810
811 smd: smdclk {
812 compatible = "atmel,at91sam9x5-clk-smd";
813 #clock-cells = <0>;
814 clocks = <&plladiv>, <&utmi>;
815 };
816
817 systemck {
818 compatible = "atmel,at91rm9200-clk-system";
819 #address-cells = <1>;
820 #size-cells = <0>;
821
822 ddrck: ddrck {
823 #clock-cells = <0>;
824 reg = <2>;
825 clocks = <&mck>;
826 };
827
828 smdck: smdck {
829 #clock-cells = <0>;
830 reg = <4>;
831 clocks = <&smd>;
832 };
833
834 uhpck: uhpck {
835 #clock-cells = <0>;
836 reg = <6>;
837 clocks = <&usb>;
838 };
839
840 udpck: udpck {
841 #clock-cells = <0>;
842 reg = <7>;
843 clocks = <&usb>;
844 };
845
846 pck0: pck0 {
847 #clock-cells = <0>;
848 reg = <8>;
849 clocks = <&prog0>;
850 };
851
852 pck1: pck1 {
853 #clock-cells = <0>;
854 reg = <9>;
855 clocks = <&prog1>;
856 };
857
858 pck2: pck2 {
859 #clock-cells = <0>;
860 reg = <10>;
861 clocks = <&prog2>;
862 };
863 };
864
865 periphck {
866 compatible = "atmel,at91sam9x5-clk-peripheral";
867 #address-cells = <1>;
868 #size-cells = <0>;
869 clocks = <&mck>;
870
871 dbgu_clk: dbgu_clk {
872 #clock-cells = <0>;
873 reg = <2>;
874 };
875
876 pioA_clk: pioA_clk {
877 #clock-cells = <0>;
878 reg = <6>;
879 };
880
881 pioB_clk: pioB_clk {
882 #clock-cells = <0>;
883 reg = <7>;
884 };
885
886 pioC_clk: pioC_clk {
887 #clock-cells = <0>;
888 reg = <8>;
889 };
890
891 pioD_clk: pioD_clk {
892 #clock-cells = <0>;
893 reg = <9>;
894 };
895
896 pioE_clk: pioE_clk {
897 #clock-cells = <0>;
898 reg = <10>;
899 };
900
901 usart0_clk: usart0_clk {
902 #clock-cells = <0>;
903 reg = <12>;
904 atmel,clk-output-range = <0 66000000>;
905 };
906
907 usart1_clk: usart1_clk {
908 #clock-cells = <0>;
909 reg = <13>;
910 atmel,clk-output-range = <0 66000000>;
911 };
912
913 usart2_clk: usart2_clk {
914 #clock-cells = <0>;
915 reg = <14>;
916 atmel,clk-output-range = <0 66000000>;
917 };
918
919 usart3_clk: usart3_clk {
920 #clock-cells = <0>;
921 reg = <15>;
922 atmel,clk-output-range = <0 66000000>;
923 };
924
925 twi0_clk: twi0_clk {
926 reg = <18>;
927 #clock-cells = <0>;
928 atmel,clk-output-range = <0 16625000>;
929 };
930
931 twi1_clk: twi1_clk {
932 #clock-cells = <0>;
933 reg = <19>;
934 atmel,clk-output-range = <0 16625000>;
935 };
936
937 twi2_clk: twi2_clk {
938 #clock-cells = <0>;
939 reg = <20>;
940 atmel,clk-output-range = <0 16625000>;
941 };
942
943 mci0_clk: mci0_clk {
944 #clock-cells = <0>;
945 reg = <21>;
946 };
947
948 mci1_clk: mci1_clk {
949 #clock-cells = <0>;
950 reg = <22>;
951 };
952
953 spi0_clk: spi0_clk {
954 #clock-cells = <0>;
955 reg = <24>;
956 atmel,clk-output-range = <0 133000000>;
957 };
958
959 spi1_clk: spi1_clk {
960 #clock-cells = <0>;
961 reg = <25>;
962 atmel,clk-output-range = <0 133000000>;
963 };
964
965 tcb0_clk: tcb0_clk {
966 #clock-cells = <0>;
967 reg = <26>;
968 atmel,clk-output-range = <0 133000000>;
969 };
970
971 pwm_clk: pwm_clk {
972 #clock-cells = <0>;
973 reg = <28>;
974 };
975
976 adc_clk: adc_clk {
977 #clock-cells = <0>;
978 reg = <29>;
979 atmel,clk-output-range = <0 66000000>;
980 };
981
982 dma0_clk: dma0_clk {
983 #clock-cells = <0>;
984 reg = <30>;
985 };
986
987 dma1_clk: dma1_clk {
988 #clock-cells = <0>;
989 reg = <31>;
990 };
991
992 uhphs_clk: uhphs_clk {
993 #clock-cells = <0>;
994 reg = <32>;
995 };
996
997 udphs_clk: udphs_clk {
998 #clock-cells = <0>;
999 reg = <33>;
1000 };
1001
1002 isi_clk: isi_clk {
1003 #clock-cells = <0>;
1004 reg = <37>;
1005 };
1006
1007 ssc0_clk: ssc0_clk {
1008 #clock-cells = <0>;
1009 reg = <38>;
1010 atmel,clk-output-range = <0 66000000>;
1011 };
1012
1013 ssc1_clk: ssc1_clk {
1014 #clock-cells = <0>;
1015 reg = <39>;
1016 atmel,clk-output-range = <0 66000000>;
1017 };
1018
1019 sha_clk: sha_clk {
1020 #clock-cells = <0>;
1021 reg = <42>;
1022 };
1023
1024 aes_clk: aes_clk {
1025 #clock-cells = <0>;
1026 reg = <43>;
1027 };
1028
1029 tdes_clk: tdes_clk {
1030 #clock-cells = <0>;
1031 reg = <44>;
1032 };
1033
1034 trng_clk: trng_clk {
1035 #clock-cells = <0>;
1036 reg = <45>;
1037 };
1038
1039 fuse_clk: fuse_clk {
1040 #clock-cells = <0>;
1041 reg = <48>;
1042 };
1043 };
675 }; 1044 };
676 1045
677 rstc@fffffe00 { 1046 rstc@fffffe00 {
@@ -683,6 +1052,7 @@
683 compatible = "atmel,at91sam9260-pit"; 1052 compatible = "atmel,at91sam9260-pit";
684 reg = <0xfffffe30 0xf>; 1053 reg = <0xfffffe30 0xf>;
685 interrupts = <3 IRQ_TYPE_LEVEL_HIGH 5>; 1054 interrupts = <3 IRQ_TYPE_LEVEL_HIGH 5>;
1055 clocks = <&mck>;
686 }; 1056 };
687 1057
688 watchdog@fffffe40 { 1058 watchdog@fffffe40 {
@@ -705,6 +1075,8 @@
705 reg = <0x00500000 0x100000 1075 reg = <0x00500000 0x100000
706 0xf8030000 0x4000>; 1076 0xf8030000 0x4000>;
707 interrupts = <33 IRQ_TYPE_LEVEL_HIGH 2>; 1077 interrupts = <33 IRQ_TYPE_LEVEL_HIGH 2>;
1078 clocks = <&udphs_clk>, <&utmi>;
1079 clock-names = "pclk", "hclk";
708 status = "disabled"; 1080 status = "disabled";
709 1081
710 ep0 { 1082 ep0 {
@@ -817,6 +1189,9 @@
817 compatible = "atmel,at91rm9200-ohci", "usb-ohci"; 1189 compatible = "atmel,at91rm9200-ohci", "usb-ohci";
818 reg = <0x00600000 0x100000>; 1190 reg = <0x00600000 0x100000>;
819 interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>; 1191 interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>;
1192 clocks = <&usb>, <&uhphs_clk>, <&udphs_clk>,
1193 <&uhpck>;
1194 clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck";
820 status = "disabled"; 1195 status = "disabled";
821 }; 1196 };
822 1197
@@ -824,6 +1199,8 @@
824 compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; 1199 compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
825 reg = <0x00700000 0x100000>; 1200 reg = <0x00700000 0x100000>;
826 interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>; 1201 interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>;
1202 clocks = <&usb>, <&uhphs_clk>, <&uhpck>;
1203 clock-names = "usb_clk", "ehci_clk", "uhpck";
827 status = "disabled"; 1204 status = "disabled";
828 }; 1205 };
829 1206
diff --git a/arch/arm/boot/dts/sama5d3_can.dtsi b/arch/arm/boot/dts/sama5d3_can.dtsi
index 8ed3260cef66..a0775851cce5 100644
--- a/arch/arm/boot/dts/sama5d3_can.dtsi
+++ b/arch/arm/boot/dts/sama5d3_can.dtsi
@@ -32,12 +32,30 @@
32 32
33 }; 33 };
34 34
35 pmc: pmc@fffffc00 {
36 periphck {
37 can0_clk: can0_clk {
38 #clock-cells = <0>;
39 reg = <40>;
40 atmel,clk-output-range = <0 66000000>;
41 };
42
43 can1_clk: can0_clk {
44 #clock-cells = <0>;
45 reg = <41>;
46 atmel,clk-output-range = <0 66000000>;
47 };
48 };
49 };
50
35 can0: can@f000c000 { 51 can0: can@f000c000 {
36 compatible = "atmel,at91sam9x5-can"; 52 compatible = "atmel,at91sam9x5-can";
37 reg = <0xf000c000 0x300>; 53 reg = <0xf000c000 0x300>;
38 interrupts = <40 IRQ_TYPE_LEVEL_HIGH 3>; 54 interrupts = <40 IRQ_TYPE_LEVEL_HIGH 3>;
39 pinctrl-names = "default"; 55 pinctrl-names = "default";
40 pinctrl-0 = <&pinctrl_can0_rx_tx>; 56 pinctrl-0 = <&pinctrl_can0_rx_tx>;
57 clocks = <&can0_clk>;
58 clock-names = "can_clk";
41 status = "disabled"; 59 status = "disabled";
42 }; 60 };
43 61
@@ -47,6 +65,8 @@
47 interrupts = <41 IRQ_TYPE_LEVEL_HIGH 3>; 65 interrupts = <41 IRQ_TYPE_LEVEL_HIGH 3>;
48 pinctrl-names = "default"; 66 pinctrl-names = "default";
49 pinctrl-0 = <&pinctrl_can1_rx_tx>; 67 pinctrl-0 = <&pinctrl_can1_rx_tx>;
68 clocks = <&can1_clk>;
69 clock-names = "can_clk";
50 status = "disabled"; 70 status = "disabled";
51 }; 71 };
52 }; 72 };
diff --git a/arch/arm/boot/dts/sama5d3_emac.dtsi b/arch/arm/boot/dts/sama5d3_emac.dtsi
index 4d4f351f1f9f..fe2af9276312 100644
--- a/arch/arm/boot/dts/sama5d3_emac.dtsi
+++ b/arch/arm/boot/dts/sama5d3_emac.dtsi
@@ -31,12 +31,23 @@
31 }; 31 };
32 }; 32 };
33 33
34 pmc: pmc@fffffc00 {
35 periphck {
36 macb1_clk: macb1_clk {
37 #clock-cells = <0>;
38 reg = <35>;
39 };
40 };
41 };
42
34 macb1: ethernet@f802c000 { 43 macb1: ethernet@f802c000 {
35 compatible = "cdns,at32ap7000-macb", "cdns,macb"; 44 compatible = "cdns,at32ap7000-macb", "cdns,macb";
36 reg = <0xf802c000 0x100>; 45 reg = <0xf802c000 0x100>;
37 interrupts = <35 IRQ_TYPE_LEVEL_HIGH 3>; 46 interrupts = <35 IRQ_TYPE_LEVEL_HIGH 3>;
38 pinctrl-names = "default"; 47 pinctrl-names = "default";
39 pinctrl-0 = <&pinctrl_macb1_rmii>; 48 pinctrl-0 = <&pinctrl_macb1_rmii>;
49 clocks = <&macb1_clk>, <&macb1_clk>;
50 clock-names = "hclk", "pclk";
40 status = "disabled"; 51 status = "disabled";
41 }; 52 };
42 }; 53 };
diff --git a/arch/arm/boot/dts/sama5d3_gmac.dtsi b/arch/arm/boot/dts/sama5d3_gmac.dtsi
index 0ba8be30ccd8..a6cb0508762f 100644
--- a/arch/arm/boot/dts/sama5d3_gmac.dtsi
+++ b/arch/arm/boot/dts/sama5d3_gmac.dtsi
@@ -64,12 +64,23 @@
64 }; 64 };
65 }; 65 };
66 66
67 pmc: pmc@fffffc00 {
68 periphck {
69 macb0_clk: macb0_clk {
70 #clock-cells = <0>;
71 reg = <34>;
72 };
73 };
74 };
75
67 macb0: ethernet@f0028000 { 76 macb0: ethernet@f0028000 {
68 compatible = "cdns,pc302-gem", "cdns,gem"; 77 compatible = "cdns,pc302-gem", "cdns,gem";
69 reg = <0xf0028000 0x100>; 78 reg = <0xf0028000 0x100>;
70 interrupts = <34 IRQ_TYPE_LEVEL_HIGH 3>; 79 interrupts = <34 IRQ_TYPE_LEVEL_HIGH 3>;
71 pinctrl-names = "default"; 80 pinctrl-names = "default";
72 pinctrl-0 = <&pinctrl_macb0_data_rgmii &pinctrl_macb0_signal_rgmii>; 81 pinctrl-0 = <&pinctrl_macb0_data_rgmii &pinctrl_macb0_signal_rgmii>;
82 clocks = <&macb0_clk>, <&macb0_clk>;
83 clock-names = "hclk", "pclk";
73 status = "disabled"; 84 status = "disabled";
74 }; 85 };
75 }; 86 };
diff --git a/arch/arm/boot/dts/sama5d3_lcd.dtsi b/arch/arm/boot/dts/sama5d3_lcd.dtsi
index 01f52a79f8ba..85d302701565 100644
--- a/arch/arm/boot/dts/sama5d3_lcd.dtsi
+++ b/arch/arm/boot/dts/sama5d3_lcd.dtsi
@@ -50,6 +50,23 @@
50 }; 50 };
51 }; 51 };
52 }; 52 };
53
54 pmc: pmc@fffffc00 {
55 periphck {
56 lcdc_clk: lcdc_clk {
57 #clock-cells = <0>;
58 reg = <36>;
59 };
60 };
61
62 systemck {
63 lcdck: lcdck {
64 #clock-cells = <0>;
65 reg = <3>;
66 clocks = <&mck>;
67 };
68 };
69 };
53 }; 70 };
54 }; 71 };
55}; 72};
diff --git a/arch/arm/boot/dts/sama5d3_mci2.dtsi b/arch/arm/boot/dts/sama5d3_mci2.dtsi
index 38e88e39e551..b029fe7ef17a 100644
--- a/arch/arm/boot/dts/sama5d3_mci2.dtsi
+++ b/arch/arm/boot/dts/sama5d3_mci2.dtsi
@@ -9,6 +9,7 @@
9 9
10#include <dt-bindings/pinctrl/at91.h> 10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h> 11#include <dt-bindings/interrupt-controller/irq.h>
12#include <dt-bindings/clk/at91.h>
12 13
13/ { 14/ {
14 ahb { 15 ahb {
@@ -30,6 +31,15 @@
30 }; 31 };
31 }; 32 };
32 33
34 pmc: pmc@fffffc00 {
35 periphck {
36 mci2_clk: mci2_clk {
37 #clock-cells = <0>;
38 reg = <23>;
39 };
40 };
41 };
42
33 mmc2: mmc@f8004000 { 43 mmc2: mmc@f8004000 {
34 compatible = "atmel,hsmci"; 44 compatible = "atmel,hsmci";
35 reg = <0xf8004000 0x600>; 45 reg = <0xf8004000 0x600>;
@@ -38,6 +48,8 @@
38 dma-names = "rxtx"; 48 dma-names = "rxtx";
39 pinctrl-names = "default"; 49 pinctrl-names = "default";
40 pinctrl-0 = <&pinctrl_mmc2_clk_cmd_dat0 &pinctrl_mmc2_dat1_3>; 50 pinctrl-0 = <&pinctrl_mmc2_clk_cmd_dat0 &pinctrl_mmc2_dat1_3>;
51 clocks = <&mci2_clk>;
52 clock-names = "mci_clk";
41 status = "disabled"; 53 status = "disabled";
42 #address-cells = <1>; 54 #address-cells = <1>;
43 #size-cells = <0>; 55 #size-cells = <0>;
diff --git a/arch/arm/boot/dts/sama5d3_tcb1.dtsi b/arch/arm/boot/dts/sama5d3_tcb1.dtsi
index 5264bb4a6998..382b04431f66 100644
--- a/arch/arm/boot/dts/sama5d3_tcb1.dtsi
+++ b/arch/arm/boot/dts/sama5d3_tcb1.dtsi
@@ -9,6 +9,7 @@
9 9
10#include <dt-bindings/pinctrl/at91.h> 10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h> 11#include <dt-bindings/interrupt-controller/irq.h>
12#include <dt-bindings/clk/at91.h>
12 13
13/ { 14/ {
14 aliases { 15 aliases {
@@ -17,10 +18,21 @@
17 18
18 ahb { 19 ahb {
19 apb { 20 apb {
21 pmc: pmc@fffffc00 {
22 periphck {
23 tcb1_clk: tcb1_clk {
24 #clock-cells = <0>;
25 reg = <27>;
26 };
27 };
28 };
29
20 tcb1: timer@f8014000 { 30 tcb1: timer@f8014000 {
21 compatible = "atmel,at91sam9x5-tcb"; 31 compatible = "atmel,at91sam9x5-tcb";
22 reg = <0xf8014000 0x100>; 32 reg = <0xf8014000 0x100>;
23 interrupts = <27 IRQ_TYPE_LEVEL_HIGH 0>; 33 interrupts = <27 IRQ_TYPE_LEVEL_HIGH 0>;
34 clocks = <&tcb1_clk>;
35 clock-names = "t0_clk";
24 }; 36 };
25 }; 37 };
26 }; 38 };
diff --git a/arch/arm/boot/dts/sama5d3_uart.dtsi b/arch/arm/boot/dts/sama5d3_uart.dtsi
index 98fcb2d57446..49d4d76ca6f4 100644
--- a/arch/arm/boot/dts/sama5d3_uart.dtsi
+++ b/arch/arm/boot/dts/sama5d3_uart.dtsi
@@ -9,6 +9,7 @@
9 9
10#include <dt-bindings/pinctrl/at91.h> 10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h> 11#include <dt-bindings/interrupt-controller/irq.h>
12#include <dt-bindings/clk/at91.h>
12 13
13/ { 14/ {
14 ahb { 15 ahb {
@@ -31,12 +32,30 @@
31 }; 32 };
32 }; 33 };
33 34
35 pmc: pmc@fffffc00 {
36 periphck {
37 uart0_clk: uart0_clk {
38 #clock-cells = <0>;
39 reg = <16>;
40 atmel,clk-output-range = <0 66000000>;
41 };
42
43 uart1_clk: uart1_clk {
44 #clock-cells = <0>;
45 reg = <17>;
46 atmel,clk-output-range = <0 66000000>;
47 };
48 };
49 };
50
34 uart0: serial@f0024000 { 51 uart0: serial@f0024000 {
35 compatible = "atmel,at91sam9260-usart"; 52 compatible = "atmel,at91sam9260-usart";
36 reg = <0xf0024000 0x200>; 53 reg = <0xf0024000 0x200>;
37 interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>; 54 interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
38 pinctrl-names = "default"; 55 pinctrl-names = "default";
39 pinctrl-0 = <&pinctrl_uart0>; 56 pinctrl-0 = <&pinctrl_uart0>;
57 clocks = <&uart0_clk>;
58 clock-names = "usart";
40 status = "disabled"; 59 status = "disabled";
41 }; 60 };
42 61
@@ -46,6 +65,8 @@
46 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 5>; 65 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 5>;
47 pinctrl-names = "default"; 66 pinctrl-names = "default";
48 pinctrl-0 = <&pinctrl_uart1>; 67 pinctrl-0 = <&pinctrl_uart1>;
68 clocks = <&uart1_clk>;
69 clock-names = "usart";
49 status = "disabled"; 70 status = "disabled";
50 }; 71 };
51 }; 72 };
diff --git a/arch/arm/boot/dts/sama5d3xcm.dtsi b/arch/arm/boot/dts/sama5d3xcm.dtsi
index 726a0f35100c..f55ed072c8e6 100644
--- a/arch/arm/boot/dts/sama5d3xcm.dtsi
+++ b/arch/arm/boot/dts/sama5d3xcm.dtsi
@@ -18,17 +18,6 @@
18 reg = <0x20000000 0x20000000>; 18 reg = <0x20000000 0x20000000>;
19 }; 19 };
20 20
21 clocks {
22 #address-cells = <1>;
23 #size-cells = <1>;
24 ranges;
25
26 main_clock: clock@0 {
27 compatible = "atmel,osc", "fixed-clock";
28 clock-frequency = <12000000>;
29 };
30 };
31
32 ahb { 21 ahb {
33 apb { 22 apb {
34 spi0: spi@f0004000 { 23 spi0: spi@f0004000 {
@@ -38,6 +27,12 @@
38 macb0: ethernet@f0028000 { 27 macb0: ethernet@f0028000 {
39 phy-mode = "rgmii"; 28 phy-mode = "rgmii";
40 }; 29 };
30
31 pmc: pmc@fffffc00 {
32 main: mainck {
33 clock-frequency = <12000000>;
34 };
35 };
41 }; 36 };
42 37
43 nand0: nand@60000000 { 38 nand0: nand@60000000 {
diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
index 8d42787c8ff1..731249fbe206 100644
--- a/arch/arm/boot/dts/tegra114.dtsi
+++ b/arch/arm/boot/dts/tegra114.dtsi
@@ -43,6 +43,7 @@
43 compatible = "nvidia,tegra114-car"; 43 compatible = "nvidia,tegra114-car";
44 reg = <0x60006000 0x1000>; 44 reg = <0x60006000 0x1000>;
45 #clock-cells = <1>; 45 #clock-cells = <1>;
46 #reset-cells = <1>;
46 }; 47 };
47 48
48 apbdma: dma { 49 apbdma: dma {
@@ -81,6 +82,9 @@
81 <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, 82 <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
82 <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; 83 <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
83 clocks = <&tegra_car TEGRA114_CLK_APBDMA>; 84 clocks = <&tegra_car TEGRA114_CLK_APBDMA>;
85 resets = <&tegra_car 34>;
86 reset-names = "dma";
87 #dma-cells = <1>;
84 }; 88 };
85 89
86 ahb: ahb { 90 ahb: ahb {
@@ -124,9 +128,12 @@
124 reg = <0x70006000 0x40>; 128 reg = <0x70006000 0x40>;
125 reg-shift = <2>; 129 reg-shift = <2>;
126 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; 130 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
127 nvidia,dma-request-selector = <&apbdma 8>;
128 status = "disabled";
129 clocks = <&tegra_car TEGRA114_CLK_UARTA>; 131 clocks = <&tegra_car TEGRA114_CLK_UARTA>;
132 resets = <&tegra_car 6>;
133 reset-names = "serial";
134 dmas = <&apbdma 8>, <&apbdma 8>;
135 dma-names = "rx", "tx";
136 status = "disabled";
130 }; 137 };
131 138
132 uartb: serial@70006040 { 139 uartb: serial@70006040 {
@@ -134,9 +141,12 @@
134 reg = <0x70006040 0x40>; 141 reg = <0x70006040 0x40>;
135 reg-shift = <2>; 142 reg-shift = <2>;
136 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; 143 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
137 nvidia,dma-request-selector = <&apbdma 9>;
138 status = "disabled";
139 clocks = <&tegra_car TEGRA114_CLK_UARTB>; 144 clocks = <&tegra_car TEGRA114_CLK_UARTB>;
145 resets = <&tegra_car 7>;
146 reset-names = "serial";
147 dmas = <&apbdma 9>, <&apbdma 9>;
148 dma-names = "rx", "tx";
149 status = "disabled";
140 }; 150 };
141 151
142 uartc: serial@70006200 { 152 uartc: serial@70006200 {
@@ -144,9 +154,12 @@
144 reg = <0x70006200 0x100>; 154 reg = <0x70006200 0x100>;
145 reg-shift = <2>; 155 reg-shift = <2>;
146 interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; 156 interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
147 nvidia,dma-request-selector = <&apbdma 10>;
148 status = "disabled";
149 clocks = <&tegra_car TEGRA114_CLK_UARTC>; 157 clocks = <&tegra_car TEGRA114_CLK_UARTC>;
158 resets = <&tegra_car 55>;
159 reset-names = "serial";
160 dmas = <&apbdma 10>, <&apbdma 10>;
161 dma-names = "rx", "tx";
162 status = "disabled";
150 }; 163 };
151 164
152 uartd: serial@70006300 { 165 uartd: serial@70006300 {
@@ -154,9 +167,12 @@
154 reg = <0x70006300 0x100>; 167 reg = <0x70006300 0x100>;
155 reg-shift = <2>; 168 reg-shift = <2>;
156 interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; 169 interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
157 nvidia,dma-request-selector = <&apbdma 19>;
158 status = "disabled";
159 clocks = <&tegra_car TEGRA114_CLK_UARTD>; 170 clocks = <&tegra_car TEGRA114_CLK_UARTD>;
171 resets = <&tegra_car 65>;
172 reset-names = "serial";
173 dmas = <&apbdma 19>, <&apbdma 19>;
174 dma-names = "rx", "tx";
175 status = "disabled";
160 }; 176 };
161 177
162 pwm: pwm { 178 pwm: pwm {
@@ -164,6 +180,8 @@
164 reg = <0x7000a000 0x100>; 180 reg = <0x7000a000 0x100>;
165 #pwm-cells = <2>; 181 #pwm-cells = <2>;
166 clocks = <&tegra_car TEGRA114_CLK_PWM>; 182 clocks = <&tegra_car TEGRA114_CLK_PWM>;
183 resets = <&tegra_car 17>;
184 reset-names = "pwm";
167 status = "disabled"; 185 status = "disabled";
168 }; 186 };
169 187
@@ -175,6 +193,10 @@
175 #size-cells = <0>; 193 #size-cells = <0>;
176 clocks = <&tegra_car TEGRA114_CLK_I2C1>; 194 clocks = <&tegra_car TEGRA114_CLK_I2C1>;
177 clock-names = "div-clk"; 195 clock-names = "div-clk";
196 resets = <&tegra_car 12>;
197 reset-names = "i2c";
198 dmas = <&apbdma 21>, <&apbdma 21>;
199 dma-names = "rx", "tx";
178 status = "disabled"; 200 status = "disabled";
179 }; 201 };
180 202
@@ -186,6 +208,10 @@
186 #size-cells = <0>; 208 #size-cells = <0>;
187 clocks = <&tegra_car TEGRA114_CLK_I2C2>; 209 clocks = <&tegra_car TEGRA114_CLK_I2C2>;
188 clock-names = "div-clk"; 210 clock-names = "div-clk";
211 resets = <&tegra_car 54>;
212 reset-names = "i2c";
213 dmas = <&apbdma 22>, <&apbdma 22>;
214 dma-names = "rx", "tx";
189 status = "disabled"; 215 status = "disabled";
190 }; 216 };
191 217
@@ -197,6 +223,10 @@
197 #size-cells = <0>; 223 #size-cells = <0>;
198 clocks = <&tegra_car TEGRA114_CLK_I2C3>; 224 clocks = <&tegra_car TEGRA114_CLK_I2C3>;
199 clock-names = "div-clk"; 225 clock-names = "div-clk";
226 resets = <&tegra_car 67>;
227 reset-names = "i2c";
228 dmas = <&apbdma 23>, <&apbdma 23>;
229 dma-names = "rx", "tx";
200 status = "disabled"; 230 status = "disabled";
201 }; 231 };
202 232
@@ -208,6 +238,10 @@
208 #size-cells = <0>; 238 #size-cells = <0>;
209 clocks = <&tegra_car TEGRA114_CLK_I2C4>; 239 clocks = <&tegra_car TEGRA114_CLK_I2C4>;
210 clock-names = "div-clk"; 240 clock-names = "div-clk";
241 resets = <&tegra_car 103>;
242 reset-names = "i2c";
243 dmas = <&apbdma 26>, <&apbdma 26>;
244 dma-names = "rx", "tx";
211 status = "disabled"; 245 status = "disabled";
212 }; 246 };
213 247
@@ -219,6 +253,10 @@
219 #size-cells = <0>; 253 #size-cells = <0>;
220 clocks = <&tegra_car TEGRA114_CLK_I2C5>; 254 clocks = <&tegra_car TEGRA114_CLK_I2C5>;
221 clock-names = "div-clk"; 255 clock-names = "div-clk";
256 resets = <&tegra_car 47>;
257 reset-names = "i2c";
258 dmas = <&apbdma 24>, <&apbdma 24>;
259 dma-names = "rx", "tx";
222 status = "disabled"; 260 status = "disabled";
223 }; 261 };
224 262
@@ -226,11 +264,14 @@
226 compatible = "nvidia,tegra114-spi"; 264 compatible = "nvidia,tegra114-spi";
227 reg = <0x7000d400 0x200>; 265 reg = <0x7000d400 0x200>;
228 interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>; 266 interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
229 nvidia,dma-request-selector = <&apbdma 15>;
230 #address-cells = <1>; 267 #address-cells = <1>;
231 #size-cells = <0>; 268 #size-cells = <0>;
232 clocks = <&tegra_car TEGRA114_CLK_SBC1>; 269 clocks = <&tegra_car TEGRA114_CLK_SBC1>;
233 clock-names = "spi"; 270 clock-names = "spi";
271 resets = <&tegra_car 41>;
272 reset-names = "spi";
273 dmas = <&apbdma 15>, <&apbdma 15>;
274 dma-names = "rx", "tx";
234 status = "disabled"; 275 status = "disabled";
235 }; 276 };
236 277
@@ -238,11 +279,14 @@
238 compatible = "nvidia,tegra114-spi"; 279 compatible = "nvidia,tegra114-spi";
239 reg = <0x7000d600 0x200>; 280 reg = <0x7000d600 0x200>;
240 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; 281 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
241 nvidia,dma-request-selector = <&apbdma 16>;
242 #address-cells = <1>; 282 #address-cells = <1>;
243 #size-cells = <0>; 283 #size-cells = <0>;
244 clocks = <&tegra_car TEGRA114_CLK_SBC2>; 284 clocks = <&tegra_car TEGRA114_CLK_SBC2>;
245 clock-names = "spi"; 285 clock-names = "spi";
286 resets = <&tegra_car 44>;
287 reset-names = "spi";
288 dmas = <&apbdma 16>, <&apbdma 16>;
289 dma-names = "rx", "tx";
246 status = "disabled"; 290 status = "disabled";
247 }; 291 };
248 292
@@ -250,11 +294,14 @@
250 compatible = "nvidia,tegra114-spi"; 294 compatible = "nvidia,tegra114-spi";
251 reg = <0x7000d800 0x200>; 295 reg = <0x7000d800 0x200>;
252 interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; 296 interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
253 nvidia,dma-request-selector = <&apbdma 17>;
254 #address-cells = <1>; 297 #address-cells = <1>;
255 #size-cells = <0>; 298 #size-cells = <0>;
256 clocks = <&tegra_car TEGRA114_CLK_SBC3>; 299 clocks = <&tegra_car TEGRA114_CLK_SBC3>;
257 clock-names = "spi"; 300 clock-names = "spi";
301 resets = <&tegra_car 46>;
302 reset-names = "spi";
303 dmas = <&apbdma 17>, <&apbdma 17>;
304 dma-names = "rx", "tx";
258 status = "disabled"; 305 status = "disabled";
259 }; 306 };
260 307
@@ -262,11 +309,14 @@
262 compatible = "nvidia,tegra114-spi"; 309 compatible = "nvidia,tegra114-spi";
263 reg = <0x7000da00 0x200>; 310 reg = <0x7000da00 0x200>;
264 interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; 311 interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
265 nvidia,dma-request-selector = <&apbdma 18>;
266 #address-cells = <1>; 312 #address-cells = <1>;
267 #size-cells = <0>; 313 #size-cells = <0>;
268 clocks = <&tegra_car TEGRA114_CLK_SBC4>; 314 clocks = <&tegra_car TEGRA114_CLK_SBC4>;
269 clock-names = "spi"; 315 clock-names = "spi";
316 resets = <&tegra_car 68>;
317 reset-names = "spi";
318 dmas = <&apbdma 18>, <&apbdma 18>;
319 dma-names = "rx", "tx";
270 status = "disabled"; 320 status = "disabled";
271 }; 321 };
272 322
@@ -274,11 +324,14 @@
274 compatible = "nvidia,tegra114-spi"; 324 compatible = "nvidia,tegra114-spi";
275 reg = <0x7000dc00 0x200>; 325 reg = <0x7000dc00 0x200>;
276 interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>; 326 interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
277 nvidia,dma-request-selector = <&apbdma 27>;
278 #address-cells = <1>; 327 #address-cells = <1>;
279 #size-cells = <0>; 328 #size-cells = <0>;
280 clocks = <&tegra_car TEGRA114_CLK_SBC5>; 329 clocks = <&tegra_car TEGRA114_CLK_SBC5>;
281 clock-names = "spi"; 330 clock-names = "spi";
331 resets = <&tegra_car 104>;
332 reset-names = "spi";
333 dmas = <&apbdma 27>, <&apbdma 27>;
334 dma-names = "rx", "tx";
282 status = "disabled"; 335 status = "disabled";
283 }; 336 };
284 337
@@ -286,11 +339,14 @@
286 compatible = "nvidia,tegra114-spi"; 339 compatible = "nvidia,tegra114-spi";
287 reg = <0x7000de00 0x200>; 340 reg = <0x7000de00 0x200>;
288 interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; 341 interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
289 nvidia,dma-request-selector = <&apbdma 28>;
290 #address-cells = <1>; 342 #address-cells = <1>;
291 #size-cells = <0>; 343 #size-cells = <0>;
292 clocks = <&tegra_car TEGRA114_CLK_SBC6>; 344 clocks = <&tegra_car TEGRA114_CLK_SBC6>;
293 clock-names = "spi"; 345 clock-names = "spi";
346 resets = <&tegra_car 105>;
347 reset-names = "spi";
348 dmas = <&apbdma 28>, <&apbdma 28>;
349 dma-names = "rx", "tx";
294 status = "disabled"; 350 status = "disabled";
295 }; 351 };
296 352
@@ -306,6 +362,8 @@
306 reg = <0x7000e200 0x100>; 362 reg = <0x7000e200 0x100>;
307 interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; 363 interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
308 clocks = <&tegra_car TEGRA114_CLK_KBC>; 364 clocks = <&tegra_car TEGRA114_CLK_KBC>;
365 resets = <&tegra_car 36>;
366 reset-names = "kbc";
309 status = "disabled"; 367 status = "disabled";
310 }; 368 };
311 369
@@ -333,26 +391,39 @@
333 <0x70080200 0x100>, 391 <0x70080200 0x100>,
334 <0x70081000 0x200>; 392 <0x70081000 0x200>;
335 interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; 393 interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
336 nvidia,dma-request-selector = <&apbdma 1>, <&apbdma 2>,
337 <&apbdma 3>, <&apbdma 4>, <&apbdma 6>, <&apbdma 7>,
338 <&apbdma 12>, <&apbdma 13>, <&apbdma 14>,
339 <&apbdma 29>;
340 clocks = <&tegra_car TEGRA114_CLK_D_AUDIO>, 394 clocks = <&tegra_car TEGRA114_CLK_D_AUDIO>,
341 <&tegra_car TEGRA114_CLK_APBIF>, 395 <&tegra_car TEGRA114_CLK_APBIF>;
342 <&tegra_car TEGRA114_CLK_I2S0>, 396 clock-names = "d_audio", "apbif";
343 <&tegra_car TEGRA114_CLK_I2S1>, 397 resets = <&tegra_car 106>, /* d_audio */
344 <&tegra_car TEGRA114_CLK_I2S2>, 398 <&tegra_car 107>, /* apbif */
345 <&tegra_car TEGRA114_CLK_I2S3>, 399 <&tegra_car 30>, /* i2s0 */
346 <&tegra_car TEGRA114_CLK_I2S4>, 400 <&tegra_car 11>, /* i2s1 */
347 <&tegra_car TEGRA114_CLK_DAM0>, 401 <&tegra_car 18>, /* i2s2 */
348 <&tegra_car TEGRA114_CLK_DAM1>, 402 <&tegra_car 101>, /* i2s3 */
349 <&tegra_car TEGRA114_CLK_DAM2>, 403 <&tegra_car 102>, /* i2s4 */
350 <&tegra_car TEGRA114_CLK_SPDIF_IN>, 404 <&tegra_car 108>, /* dam0 */
351 <&tegra_car TEGRA114_CLK_AMX>, 405 <&tegra_car 109>, /* dam1 */
352 <&tegra_car TEGRA114_CLK_ADX>; 406 <&tegra_car 110>, /* dam2 */
353 clock-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2", 407 <&tegra_car 10>, /* spdif */
408 <&tegra_car 153>, /* amx */
409 <&tegra_car 154>; /* adx */
410 reset-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2",
354 "i2s3", "i2s4", "dam0", "dam1", "dam2", 411 "i2s3", "i2s4", "dam0", "dam1", "dam2",
355 "spdif_in", "amx", "adx"; 412 "spdif", "amx", "adx";
413 dmas = <&apbdma 1>, <&apbdma 1>,
414 <&apbdma 2>, <&apbdma 2>,
415 <&apbdma 3>, <&apbdma 3>,
416 <&apbdma 4>, <&apbdma 4>,
417 <&apbdma 6>, <&apbdma 6>,
418 <&apbdma 7>, <&apbdma 7>,
419 <&apbdma 12>, <&apbdma 12>,
420 <&apbdma 13>, <&apbdma 13>,
421 <&apbdma 14>, <&apbdma 14>,
422 <&apbdma 29>, <&apbdma 29>;
423 dma-names = "rx0", "tx0", "rx1", "tx1", "rx2", "tx2",
424 "rx3", "tx3", "rx4", "tx4", "rx5", "tx5",
425 "rx6", "tx6", "rx7", "tx7", "rx8", "tx8",
426 "rx9", "tx9";
356 ranges; 427 ranges;
357 #address-cells = <1>; 428 #address-cells = <1>;
358 #size-cells = <1>; 429 #size-cells = <1>;
@@ -362,6 +433,8 @@
362 reg = <0x70080300 0x100>; 433 reg = <0x70080300 0x100>;
363 nvidia,ahub-cif-ids = <4 4>; 434 nvidia,ahub-cif-ids = <4 4>;
364 clocks = <&tegra_car TEGRA114_CLK_I2S0>; 435 clocks = <&tegra_car TEGRA114_CLK_I2S0>;
436 resets = <&tegra_car 30>;
437 reset-names = "i2s";
365 status = "disabled"; 438 status = "disabled";
366 }; 439 };
367 440
@@ -370,6 +443,8 @@
370 reg = <0x70080400 0x100>; 443 reg = <0x70080400 0x100>;
371 nvidia,ahub-cif-ids = <5 5>; 444 nvidia,ahub-cif-ids = <5 5>;
372 clocks = <&tegra_car TEGRA114_CLK_I2S1>; 445 clocks = <&tegra_car TEGRA114_CLK_I2S1>;
446 resets = <&tegra_car 11>;
447 reset-names = "i2s";
373 status = "disabled"; 448 status = "disabled";
374 }; 449 };
375 450
@@ -378,6 +453,8 @@
378 reg = <0x70080500 0x100>; 453 reg = <0x70080500 0x100>;
379 nvidia,ahub-cif-ids = <6 6>; 454 nvidia,ahub-cif-ids = <6 6>;
380 clocks = <&tegra_car TEGRA114_CLK_I2S2>; 455 clocks = <&tegra_car TEGRA114_CLK_I2S2>;
456 resets = <&tegra_car 18>;
457 reset-names = "i2s";
381 status = "disabled"; 458 status = "disabled";
382 }; 459 };
383 460
@@ -386,6 +463,8 @@
386 reg = <0x70080600 0x100>; 463 reg = <0x70080600 0x100>;
387 nvidia,ahub-cif-ids = <7 7>; 464 nvidia,ahub-cif-ids = <7 7>;
388 clocks = <&tegra_car TEGRA114_CLK_I2S3>; 465 clocks = <&tegra_car TEGRA114_CLK_I2S3>;
466 resets = <&tegra_car 101>;
467 reset-names = "i2s";
389 status = "disabled"; 468 status = "disabled";
390 }; 469 };
391 470
@@ -394,6 +473,8 @@
394 reg = <0x70080700 0x100>; 473 reg = <0x70080700 0x100>;
395 nvidia,ahub-cif-ids = <8 8>; 474 nvidia,ahub-cif-ids = <8 8>;
396 clocks = <&tegra_car TEGRA114_CLK_I2S4>; 475 clocks = <&tegra_car TEGRA114_CLK_I2S4>;
476 resets = <&tegra_car 102>;
477 reset-names = "i2s";
397 status = "disabled"; 478 status = "disabled";
398 }; 479 };
399 }; 480 };
@@ -403,6 +484,8 @@
403 reg = <0x78000000 0x200>; 484 reg = <0x78000000 0x200>;
404 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; 485 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
405 clocks = <&tegra_car TEGRA114_CLK_SDMMC1>; 486 clocks = <&tegra_car TEGRA114_CLK_SDMMC1>;
487 resets = <&tegra_car 14>;
488 reset-names = "sdhci";
406 status = "disable"; 489 status = "disable";
407 }; 490 };
408 491
@@ -411,6 +494,8 @@
411 reg = <0x78000200 0x200>; 494 reg = <0x78000200 0x200>;
412 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; 495 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
413 clocks = <&tegra_car TEGRA114_CLK_SDMMC2>; 496 clocks = <&tegra_car TEGRA114_CLK_SDMMC2>;
497 resets = <&tegra_car 9>;
498 reset-names = "sdhci";
414 status = "disable"; 499 status = "disable";
415 }; 500 };
416 501
@@ -419,6 +504,8 @@
419 reg = <0x78000400 0x200>; 504 reg = <0x78000400 0x200>;
420 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; 505 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
421 clocks = <&tegra_car TEGRA114_CLK_SDMMC3>; 506 clocks = <&tegra_car TEGRA114_CLK_SDMMC3>;
507 resets = <&tegra_car 69>;
508 reset-names = "sdhci";
422 status = "disable"; 509 status = "disable";
423 }; 510 };
424 511
@@ -427,6 +514,8 @@
427 reg = <0x78000600 0x200>; 514 reg = <0x78000600 0x200>;
428 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; 515 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
429 clocks = <&tegra_car TEGRA114_CLK_SDMMC4>; 516 clocks = <&tegra_car TEGRA114_CLK_SDMMC4>;
517 resets = <&tegra_car 15>;
518 reset-names = "sdhci";
430 status = "disable"; 519 status = "disable";
431 }; 520 };
432 521
@@ -436,6 +525,8 @@
436 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; 525 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
437 phy_type = "utmi"; 526 phy_type = "utmi";
438 clocks = <&tegra_car TEGRA114_CLK_USBD>; 527 clocks = <&tegra_car TEGRA114_CLK_USBD>;
528 resets = <&tegra_car 22>;
529 reset-names = "usb";
439 nvidia,phy = <&phy1>; 530 nvidia,phy = <&phy1>;
440 status = "disabled"; 531 status = "disabled";
441 }; 532 };
@@ -467,6 +558,8 @@
467 interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; 558 interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
468 phy_type = "utmi"; 559 phy_type = "utmi";
469 clocks = <&tegra_car TEGRA114_CLK_USB3>; 560 clocks = <&tegra_car TEGRA114_CLK_USB3>;
561 resets = <&tegra_car 59>;
562 reset-names = "usb";
470 nvidia,phy = <&phy3>; 563 nvidia,phy = <&phy3>;
471 status = "disabled"; 564 status = "disabled";
472 }; 565 };
diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts
index 8d71fc9d8a2f..e57fb3aefc2a 100644
--- a/arch/arm/boot/dts/tegra20-paz00.dts
+++ b/arch/arm/boot/dts/tegra20-paz00.dts
@@ -280,6 +280,8 @@
280 clocks = <&tegra_car TEGRA20_CLK_I2C3>, 280 clocks = <&tegra_car TEGRA20_CLK_I2C3>,
281 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; 281 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
282 clock-names = "div-clk", "fast-clk"; 282 clock-names = "div-clk", "fast-clk";
283 resets = <&tegra_car 67>;
284 reset-names = "i2c";
283 }; 285 };
284 286
285 i2c@7000d000 { 287 i2c@7000d000 {
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index df40b54fd8bc..c90d0aac3afe 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -22,6 +22,8 @@
22 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, /* syncpt */ 22 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, /* syncpt */
23 <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; /* general */ 23 <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; /* general */
24 clocks = <&tegra_car TEGRA20_CLK_HOST1X>; 24 clocks = <&tegra_car TEGRA20_CLK_HOST1X>;
25 resets = <&tegra_car 28>;
26 reset-names = "host1x";
25 27
26 #address-cells = <1>; 28 #address-cells = <1>;
27 #size-cells = <1>; 29 #size-cells = <1>;
@@ -33,6 +35,8 @@
33 reg = <0x54040000 0x00040000>; 35 reg = <0x54040000 0x00040000>;
34 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; 36 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
35 clocks = <&tegra_car TEGRA20_CLK_MPE>; 37 clocks = <&tegra_car TEGRA20_CLK_MPE>;
38 resets = <&tegra_car 60>;
39 reset-names = "mpe";
36 }; 40 };
37 41
38 vi { 42 vi {
@@ -40,6 +44,8 @@
40 reg = <0x54080000 0x00040000>; 44 reg = <0x54080000 0x00040000>;
41 interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>; 45 interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
42 clocks = <&tegra_car TEGRA20_CLK_VI>; 46 clocks = <&tegra_car TEGRA20_CLK_VI>;
47 resets = <&tegra_car 20>;
48 reset-names = "vi";
43 }; 49 };
44 50
45 epp { 51 epp {
@@ -47,6 +53,8 @@
47 reg = <0x540c0000 0x00040000>; 53 reg = <0x540c0000 0x00040000>;
48 interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; 54 interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
49 clocks = <&tegra_car TEGRA20_CLK_EPP>; 55 clocks = <&tegra_car TEGRA20_CLK_EPP>;
56 resets = <&tegra_car 19>;
57 reset-names = "epp";
50 }; 58 };
51 59
52 isp { 60 isp {
@@ -54,6 +62,8 @@
54 reg = <0x54100000 0x00040000>; 62 reg = <0x54100000 0x00040000>;
55 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; 63 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
56 clocks = <&tegra_car TEGRA20_CLK_ISP>; 64 clocks = <&tegra_car TEGRA20_CLK_ISP>;
65 resets = <&tegra_car 23>;
66 reset-names = "isp";
57 }; 67 };
58 68
59 gr2d { 69 gr2d {
@@ -61,12 +71,16 @@
61 reg = <0x54140000 0x00040000>; 71 reg = <0x54140000 0x00040000>;
62 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; 72 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
63 clocks = <&tegra_car TEGRA20_CLK_GR2D>; 73 clocks = <&tegra_car TEGRA20_CLK_GR2D>;
74 resets = <&tegra_car 21>;
75 reset-names = "2d";
64 }; 76 };
65 77
66 gr3d { 78 gr3d {
67 compatible = "nvidia,tegra20-gr3d"; 79 compatible = "nvidia,tegra20-gr3d";
68 reg = <0x54180000 0x00040000>; 80 reg = <0x54180000 0x00040000>;
69 clocks = <&tegra_car TEGRA20_CLK_GR3D>; 81 clocks = <&tegra_car TEGRA20_CLK_GR3D>;
82 resets = <&tegra_car 24>;
83 reset-names = "3d";
70 }; 84 };
71 85
72 dc@54200000 { 86 dc@54200000 {
@@ -75,7 +89,9 @@
75 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; 89 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
76 clocks = <&tegra_car TEGRA20_CLK_DISP1>, 90 clocks = <&tegra_car TEGRA20_CLK_DISP1>,
77 <&tegra_car TEGRA20_CLK_PLL_P>; 91 <&tegra_car TEGRA20_CLK_PLL_P>;
78 clock-names = "disp1", "parent"; 92 clock-names = "dc", "parent";
93 resets = <&tegra_car 27>;
94 reset-names = "dc";
79 95
80 rgb { 96 rgb {
81 status = "disabled"; 97 status = "disabled";
@@ -88,7 +104,9 @@
88 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; 104 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
89 clocks = <&tegra_car TEGRA20_CLK_DISP2>, 105 clocks = <&tegra_car TEGRA20_CLK_DISP2>,
90 <&tegra_car TEGRA20_CLK_PLL_P>; 106 <&tegra_car TEGRA20_CLK_PLL_P>;
91 clock-names = "disp2", "parent"; 107 clock-names = "dc", "parent";
108 resets = <&tegra_car 26>;
109 reset-names = "dc";
92 110
93 rgb { 111 rgb {
94 status = "disabled"; 112 status = "disabled";
@@ -102,6 +120,8 @@
102 clocks = <&tegra_car TEGRA20_CLK_HDMI>, 120 clocks = <&tegra_car TEGRA20_CLK_HDMI>,
103 <&tegra_car TEGRA20_CLK_PLL_D_OUT0>; 121 <&tegra_car TEGRA20_CLK_PLL_D_OUT0>;
104 clock-names = "hdmi", "parent"; 122 clock-names = "hdmi", "parent";
123 resets = <&tegra_car 51>;
124 reset-names = "hdmi";
105 status = "disabled"; 125 status = "disabled";
106 }; 126 };
107 127
@@ -117,6 +137,8 @@
117 compatible = "nvidia,tegra20-dsi"; 137 compatible = "nvidia,tegra20-dsi";
118 reg = <0x54300000 0x00040000>; 138 reg = <0x54300000 0x00040000>;
119 clocks = <&tegra_car TEGRA20_CLK_DSI>; 139 clocks = <&tegra_car TEGRA20_CLK_DSI>;
140 resets = <&tegra_car 48>;
141 reset-names = "dsi";
120 status = "disabled"; 142 status = "disabled";
121 }; 143 };
122 }; 144 };
@@ -160,6 +182,7 @@
160 compatible = "nvidia,tegra20-car"; 182 compatible = "nvidia,tegra20-car";
161 reg = <0x60006000 0x1000>; 183 reg = <0x60006000 0x1000>;
162 #clock-cells = <1>; 184 #clock-cells = <1>;
185 #reset-cells = <1>;
163 }; 186 };
164 187
165 apbdma: dma { 188 apbdma: dma {
@@ -182,6 +205,9 @@
182 <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, 205 <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
183 <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; 206 <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
184 clocks = <&tegra_car TEGRA20_CLK_APBDMA>; 207 clocks = <&tegra_car TEGRA20_CLK_APBDMA>;
208 resets = <&tegra_car 34>;
209 reset-names = "dma";
210 #dma-cells = <1>;
185 }; 211 };
186 212
187 ahb { 213 ahb {
@@ -222,8 +248,11 @@
222 compatible = "nvidia,tegra20-ac97"; 248 compatible = "nvidia,tegra20-ac97";
223 reg = <0x70002000 0x200>; 249 reg = <0x70002000 0x200>;
224 interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>; 250 interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
225 nvidia,dma-request-selector = <&apbdma 12>;
226 clocks = <&tegra_car TEGRA20_CLK_AC97>; 251 clocks = <&tegra_car TEGRA20_CLK_AC97>;
252 resets = <&tegra_car 3>;
253 reset-names = "ac97";
254 dmas = <&apbdma 12>, <&apbdma 12>;
255 dma-names = "rx", "tx";
227 status = "disabled"; 256 status = "disabled";
228 }; 257 };
229 258
@@ -231,8 +260,11 @@
231 compatible = "nvidia,tegra20-i2s"; 260 compatible = "nvidia,tegra20-i2s";
232 reg = <0x70002800 0x200>; 261 reg = <0x70002800 0x200>;
233 interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; 262 interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
234 nvidia,dma-request-selector = <&apbdma 2>;
235 clocks = <&tegra_car TEGRA20_CLK_I2S1>; 263 clocks = <&tegra_car TEGRA20_CLK_I2S1>;
264 resets = <&tegra_car 11>;
265 reset-names = "i2s";
266 dmas = <&apbdma 2>, <&apbdma 2>;
267 dma-names = "rx", "tx";
236 status = "disabled"; 268 status = "disabled";
237 }; 269 };
238 270
@@ -240,8 +272,11 @@
240 compatible = "nvidia,tegra20-i2s"; 272 compatible = "nvidia,tegra20-i2s";
241 reg = <0x70002a00 0x200>; 273 reg = <0x70002a00 0x200>;
242 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; 274 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
243 nvidia,dma-request-selector = <&apbdma 1>;
244 clocks = <&tegra_car TEGRA20_CLK_I2S2>; 275 clocks = <&tegra_car TEGRA20_CLK_I2S2>;
276 resets = <&tegra_car 18>;
277 reset-names = "i2s";
278 dmas = <&apbdma 1>, <&apbdma 1>;
279 dma-names = "rx", "tx";
245 status = "disabled"; 280 status = "disabled";
246 }; 281 };
247 282
@@ -257,8 +292,11 @@
257 reg = <0x70006000 0x40>; 292 reg = <0x70006000 0x40>;
258 reg-shift = <2>; 293 reg-shift = <2>;
259 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; 294 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
260 nvidia,dma-request-selector = <&apbdma 8>;
261 clocks = <&tegra_car TEGRA20_CLK_UARTA>; 295 clocks = <&tegra_car TEGRA20_CLK_UARTA>;
296 resets = <&tegra_car 6>;
297 reset-names = "serial";
298 dmas = <&apbdma 8>, <&apbdma 8>;
299 dma-names = "rx", "tx";
262 status = "disabled"; 300 status = "disabled";
263 }; 301 };
264 302
@@ -267,8 +305,11 @@
267 reg = <0x70006040 0x40>; 305 reg = <0x70006040 0x40>;
268 reg-shift = <2>; 306 reg-shift = <2>;
269 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; 307 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
270 nvidia,dma-request-selector = <&apbdma 9>;
271 clocks = <&tegra_car TEGRA20_CLK_UARTB>; 308 clocks = <&tegra_car TEGRA20_CLK_UARTB>;
309 resets = <&tegra_car 7>;
310 reset-names = "serial";
311 dmas = <&apbdma 9>, <&apbdma 9>;
312 dma-names = "rx", "tx";
272 status = "disabled"; 313 status = "disabled";
273 }; 314 };
274 315
@@ -277,8 +318,11 @@
277 reg = <0x70006200 0x100>; 318 reg = <0x70006200 0x100>;
278 reg-shift = <2>; 319 reg-shift = <2>;
279 interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; 320 interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
280 nvidia,dma-request-selector = <&apbdma 10>;
281 clocks = <&tegra_car TEGRA20_CLK_UARTC>; 321 clocks = <&tegra_car TEGRA20_CLK_UARTC>;
322 resets = <&tegra_car 55>;
323 reset-names = "serial";
324 dmas = <&apbdma 10>, <&apbdma 10>;
325 dma-names = "rx", "tx";
282 status = "disabled"; 326 status = "disabled";
283 }; 327 };
284 328
@@ -287,8 +331,11 @@
287 reg = <0x70006300 0x100>; 331 reg = <0x70006300 0x100>;
288 reg-shift = <2>; 332 reg-shift = <2>;
289 interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; 333 interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
290 nvidia,dma-request-selector = <&apbdma 19>;
291 clocks = <&tegra_car TEGRA20_CLK_UARTD>; 334 clocks = <&tegra_car TEGRA20_CLK_UARTD>;
335 resets = <&tegra_car 65>;
336 reset-names = "serial";
337 dmas = <&apbdma 19>, <&apbdma 19>;
338 dma-names = "rx", "tx";
292 status = "disabled"; 339 status = "disabled";
293 }; 340 };
294 341
@@ -297,8 +344,11 @@
297 reg = <0x70006400 0x100>; 344 reg = <0x70006400 0x100>;
298 reg-shift = <2>; 345 reg-shift = <2>;
299 interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>; 346 interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
300 nvidia,dma-request-selector = <&apbdma 20>;
301 clocks = <&tegra_car TEGRA20_CLK_UARTE>; 347 clocks = <&tegra_car TEGRA20_CLK_UARTE>;
348 resets = <&tegra_car 66>;
349 reset-names = "serial";
350 dmas = <&apbdma 20>, <&apbdma 20>;
351 dma-names = "rx", "tx";
302 status = "disabled"; 352 status = "disabled";
303 }; 353 };
304 354
@@ -307,6 +357,8 @@
307 reg = <0x7000a000 0x100>; 357 reg = <0x7000a000 0x100>;
308 #pwm-cells = <2>; 358 #pwm-cells = <2>;
309 clocks = <&tegra_car TEGRA20_CLK_PWM>; 359 clocks = <&tegra_car TEGRA20_CLK_PWM>;
360 resets = <&tegra_car 17>;
361 reset-names = "pwm";
310 status = "disabled"; 362 status = "disabled";
311 }; 363 };
312 364
@@ -326,6 +378,10 @@
326 clocks = <&tegra_car TEGRA20_CLK_I2C1>, 378 clocks = <&tegra_car TEGRA20_CLK_I2C1>,
327 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; 379 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
328 clock-names = "div-clk", "fast-clk"; 380 clock-names = "div-clk", "fast-clk";
381 resets = <&tegra_car 12>;
382 reset-names = "i2c";
383 dmas = <&apbdma 21>, <&apbdma 21>;
384 dma-names = "rx", "tx";
329 status = "disabled"; 385 status = "disabled";
330 }; 386 };
331 387
@@ -333,10 +389,13 @@
333 compatible = "nvidia,tegra20-sflash"; 389 compatible = "nvidia,tegra20-sflash";
334 reg = <0x7000c380 0x80>; 390 reg = <0x7000c380 0x80>;
335 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>; 391 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
336 nvidia,dma-request-selector = <&apbdma 11>;
337 #address-cells = <1>; 392 #address-cells = <1>;
338 #size-cells = <0>; 393 #size-cells = <0>;
339 clocks = <&tegra_car TEGRA20_CLK_SPI>; 394 clocks = <&tegra_car TEGRA20_CLK_SPI>;
395 resets = <&tegra_car 43>;
396 reset-names = "spi";
397 dmas = <&apbdma 11>, <&apbdma 11>;
398 dma-names = "rx", "tx";
340 status = "disabled"; 399 status = "disabled";
341 }; 400 };
342 401
@@ -349,6 +408,10 @@
349 clocks = <&tegra_car TEGRA20_CLK_I2C2>, 408 clocks = <&tegra_car TEGRA20_CLK_I2C2>,
350 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; 409 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
351 clock-names = "div-clk", "fast-clk"; 410 clock-names = "div-clk", "fast-clk";
411 resets = <&tegra_car 54>;
412 reset-names = "i2c";
413 dmas = <&apbdma 22>, <&apbdma 22>;
414 dma-names = "rx", "tx";
352 status = "disabled"; 415 status = "disabled";
353 }; 416 };
354 417
@@ -361,6 +424,10 @@
361 clocks = <&tegra_car TEGRA20_CLK_I2C3>, 424 clocks = <&tegra_car TEGRA20_CLK_I2C3>,
362 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; 425 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
363 clock-names = "div-clk", "fast-clk"; 426 clock-names = "div-clk", "fast-clk";
427 resets = <&tegra_car 67>;
428 reset-names = "i2c";
429 dmas = <&apbdma 23>, <&apbdma 23>;
430 dma-names = "rx", "tx";
364 status = "disabled"; 431 status = "disabled";
365 }; 432 };
366 433
@@ -373,6 +440,10 @@
373 clocks = <&tegra_car TEGRA20_CLK_DVC>, 440 clocks = <&tegra_car TEGRA20_CLK_DVC>,
374 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; 441 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
375 clock-names = "div-clk", "fast-clk"; 442 clock-names = "div-clk", "fast-clk";
443 resets = <&tegra_car 47>;
444 reset-names = "i2c";
445 dmas = <&apbdma 24>, <&apbdma 24>;
446 dma-names = "rx", "tx";
376 status = "disabled"; 447 status = "disabled";
377 }; 448 };
378 449
@@ -380,10 +451,13 @@
380 compatible = "nvidia,tegra20-slink"; 451 compatible = "nvidia,tegra20-slink";
381 reg = <0x7000d400 0x200>; 452 reg = <0x7000d400 0x200>;
382 interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>; 453 interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
383 nvidia,dma-request-selector = <&apbdma 15>;
384 #address-cells = <1>; 454 #address-cells = <1>;
385 #size-cells = <0>; 455 #size-cells = <0>;
386 clocks = <&tegra_car TEGRA20_CLK_SBC1>; 456 clocks = <&tegra_car TEGRA20_CLK_SBC1>;
457 resets = <&tegra_car 41>;
458 reset-names = "spi";
459 dmas = <&apbdma 15>, <&apbdma 15>;
460 dma-names = "rx", "tx";
387 status = "disabled"; 461 status = "disabled";
388 }; 462 };
389 463
@@ -391,10 +465,13 @@
391 compatible = "nvidia,tegra20-slink"; 465 compatible = "nvidia,tegra20-slink";
392 reg = <0x7000d600 0x200>; 466 reg = <0x7000d600 0x200>;
393 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; 467 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
394 nvidia,dma-request-selector = <&apbdma 16>;
395 #address-cells = <1>; 468 #address-cells = <1>;
396 #size-cells = <0>; 469 #size-cells = <0>;
397 clocks = <&tegra_car TEGRA20_CLK_SBC2>; 470 clocks = <&tegra_car TEGRA20_CLK_SBC2>;
471 resets = <&tegra_car 44>;
472 reset-names = "spi";
473 dmas = <&apbdma 16>, <&apbdma 16>;
474 dma-names = "rx", "tx";
398 status = "disabled"; 475 status = "disabled";
399 }; 476 };
400 477
@@ -402,10 +479,13 @@
402 compatible = "nvidia,tegra20-slink"; 479 compatible = "nvidia,tegra20-slink";
403 reg = <0x7000d800 0x200>; 480 reg = <0x7000d800 0x200>;
404 interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; 481 interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
405 nvidia,dma-request-selector = <&apbdma 17>;
406 #address-cells = <1>; 482 #address-cells = <1>;
407 #size-cells = <0>; 483 #size-cells = <0>;
408 clocks = <&tegra_car TEGRA20_CLK_SBC3>; 484 clocks = <&tegra_car TEGRA20_CLK_SBC3>;
485 resets = <&tegra_car 46>;
486 reset-names = "spi";
487 dmas = <&apbdma 17>, <&apbdma 17>;
488 dma-names = "rx", "tx";
409 status = "disabled"; 489 status = "disabled";
410 }; 490 };
411 491
@@ -413,10 +493,13 @@
413 compatible = "nvidia,tegra20-slink"; 493 compatible = "nvidia,tegra20-slink";
414 reg = <0x7000da00 0x200>; 494 reg = <0x7000da00 0x200>;
415 interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; 495 interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
416 nvidia,dma-request-selector = <&apbdma 18>;
417 #address-cells = <1>; 496 #address-cells = <1>;
418 #size-cells = <0>; 497 #size-cells = <0>;
419 clocks = <&tegra_car TEGRA20_CLK_SBC4>; 498 clocks = <&tegra_car TEGRA20_CLK_SBC4>;
499 resets = <&tegra_car 68>;
500 reset-names = "spi";
501 dmas = <&apbdma 18>, <&apbdma 18>;
502 dma-names = "rx", "tx";
420 status = "disabled"; 503 status = "disabled";
421 }; 504 };
422 505
@@ -425,6 +508,8 @@
425 reg = <0x7000e200 0x100>; 508 reg = <0x7000e200 0x100>;
426 interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; 509 interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
427 clocks = <&tegra_car TEGRA20_CLK_KBC>; 510 clocks = <&tegra_car TEGRA20_CLK_KBC>;
511 resets = <&tegra_car 36>;
512 reset-names = "kbc";
428 status = "disabled"; 513 status = "disabled";
429 }; 514 };
430 515
@@ -478,9 +563,12 @@
478 563
479 clocks = <&tegra_car TEGRA20_CLK_PEX>, 564 clocks = <&tegra_car TEGRA20_CLK_PEX>,
480 <&tegra_car TEGRA20_CLK_AFI>, 565 <&tegra_car TEGRA20_CLK_AFI>,
481 <&tegra_car TEGRA20_CLK_PCIE_XCLK>,
482 <&tegra_car TEGRA20_CLK_PLL_E>; 566 <&tegra_car TEGRA20_CLK_PLL_E>;
483 clock-names = "pex", "afi", "pcie_xclk", "pll_e"; 567 clock-names = "pex", "afi", "pll_e";
568 resets = <&tegra_car 70>,
569 <&tegra_car 72>,
570 <&tegra_car 74>;
571 reset-names = "pex", "afi", "pcie_x";
484 status = "disabled"; 572 status = "disabled";
485 573
486 pci@1,0 { 574 pci@1,0 {
@@ -517,6 +605,8 @@
517 phy_type = "utmi"; 605 phy_type = "utmi";
518 nvidia,has-legacy-mode; 606 nvidia,has-legacy-mode;
519 clocks = <&tegra_car TEGRA20_CLK_USBD>; 607 clocks = <&tegra_car TEGRA20_CLK_USBD>;
608 resets = <&tegra_car 22>;
609 reset-names = "usb";
520 nvidia,needs-double-reset; 610 nvidia,needs-double-reset;
521 nvidia,phy = <&phy1>; 611 nvidia,phy = <&phy1>;
522 status = "disabled"; 612 status = "disabled";
@@ -548,6 +638,8 @@
548 interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; 638 interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
549 phy_type = "ulpi"; 639 phy_type = "ulpi";
550 clocks = <&tegra_car TEGRA20_CLK_USB2>; 640 clocks = <&tegra_car TEGRA20_CLK_USB2>;
641 resets = <&tegra_car 58>;
642 reset-names = "usb";
551 nvidia,phy = <&phy2>; 643 nvidia,phy = <&phy2>;
552 status = "disabled"; 644 status = "disabled";
553 }; 645 };
@@ -569,6 +661,8 @@
569 interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; 661 interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
570 phy_type = "utmi"; 662 phy_type = "utmi";
571 clocks = <&tegra_car TEGRA20_CLK_USB3>; 663 clocks = <&tegra_car TEGRA20_CLK_USB3>;
664 resets = <&tegra_car 59>;
665 reset-names = "usb";
572 nvidia,phy = <&phy3>; 666 nvidia,phy = <&phy3>;
573 status = "disabled"; 667 status = "disabled";
574 }; 668 };
@@ -597,6 +691,8 @@
597 reg = <0xc8000000 0x200>; 691 reg = <0xc8000000 0x200>;
598 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; 692 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
599 clocks = <&tegra_car TEGRA20_CLK_SDMMC1>; 693 clocks = <&tegra_car TEGRA20_CLK_SDMMC1>;
694 resets = <&tegra_car 14>;
695 reset-names = "sdhci";
600 status = "disabled"; 696 status = "disabled";
601 }; 697 };
602 698
@@ -605,6 +701,8 @@
605 reg = <0xc8000200 0x200>; 701 reg = <0xc8000200 0x200>;
606 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; 702 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
607 clocks = <&tegra_car TEGRA20_CLK_SDMMC2>; 703 clocks = <&tegra_car TEGRA20_CLK_SDMMC2>;
704 resets = <&tegra_car 9>;
705 reset-names = "sdhci";
608 status = "disabled"; 706 status = "disabled";
609 }; 707 };
610 708
@@ -613,6 +711,8 @@
613 reg = <0xc8000400 0x200>; 711 reg = <0xc8000400 0x200>;
614 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; 712 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
615 clocks = <&tegra_car TEGRA20_CLK_SDMMC3>; 713 clocks = <&tegra_car TEGRA20_CLK_SDMMC3>;
714 resets = <&tegra_car 69>;
715 reset-names = "sdhci";
616 status = "disabled"; 716 status = "disabled";
617 }; 717 };
618 718
@@ -621,6 +721,8 @@
621 reg = <0xc8000600 0x200>; 721 reg = <0xc8000600 0x200>;
622 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; 722 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
623 clocks = <&tegra_car TEGRA20_CLK_SDMMC4>; 723 clocks = <&tegra_car TEGRA20_CLK_SDMMC4>;
724 resets = <&tegra_car 15>;
725 reset-names = "sdhci";
624 status = "disabled"; 726 status = "disabled";
625 }; 727 };
626 728
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index 2bd55cfd88ad..31259b09e7cc 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -40,10 +40,13 @@
40 40
41 clocks = <&tegra_car TEGRA30_CLK_PCIE>, 41 clocks = <&tegra_car TEGRA30_CLK_PCIE>,
42 <&tegra_car TEGRA30_CLK_AFI>, 42 <&tegra_car TEGRA30_CLK_AFI>,
43 <&tegra_car TEGRA30_CLK_PCIEX>,
44 <&tegra_car TEGRA30_CLK_PLL_E>, 43 <&tegra_car TEGRA30_CLK_PLL_E>,
45 <&tegra_car TEGRA30_CLK_CML0>; 44 <&tegra_car TEGRA30_CLK_CML0>;
46 clock-names = "pex", "afi", "pcie_xclk", "pll_e", "cml"; 45 clock-names = "pex", "afi", "pll_e", "cml";
46 resets = <&tegra_car 70>,
47 <&tegra_car 72>,
48 <&tegra_car 74>;
49 reset-names = "pex", "afi", "pcie_x";
47 status = "disabled"; 50 status = "disabled";
48 51
49 pci@1,0 { 52 pci@1,0 {
@@ -92,6 +95,8 @@
92 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, /* syncpt */ 95 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, /* syncpt */
93 <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; /* general */ 96 <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; /* general */
94 clocks = <&tegra_car TEGRA30_CLK_HOST1X>; 97 clocks = <&tegra_car TEGRA30_CLK_HOST1X>;
98 resets = <&tegra_car 28>;
99 reset-names = "host1x";
95 100
96 #address-cells = <1>; 101 #address-cells = <1>;
97 #size-cells = <1>; 102 #size-cells = <1>;
@@ -103,6 +108,8 @@
103 reg = <0x54040000 0x00040000>; 108 reg = <0x54040000 0x00040000>;
104 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; 109 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
105 clocks = <&tegra_car TEGRA30_CLK_MPE>; 110 clocks = <&tegra_car TEGRA30_CLK_MPE>;
111 resets = <&tegra_car 60>;
112 reset-names = "mpe";
106 }; 113 };
107 114
108 vi { 115 vi {
@@ -110,6 +117,8 @@
110 reg = <0x54080000 0x00040000>; 117 reg = <0x54080000 0x00040000>;
111 interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>; 118 interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
112 clocks = <&tegra_car TEGRA30_CLK_VI>; 119 clocks = <&tegra_car TEGRA30_CLK_VI>;
120 resets = <&tegra_car 20>;
121 reset-names = "vi";
113 }; 122 };
114 123
115 epp { 124 epp {
@@ -117,6 +126,8 @@
117 reg = <0x540c0000 0x00040000>; 126 reg = <0x540c0000 0x00040000>;
118 interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; 127 interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
119 clocks = <&tegra_car TEGRA30_CLK_EPP>; 128 clocks = <&tegra_car TEGRA30_CLK_EPP>;
129 resets = <&tegra_car 19>;
130 reset-names = "epp";
120 }; 131 };
121 132
122 isp { 133 isp {
@@ -124,12 +135,16 @@
124 reg = <0x54100000 0x00040000>; 135 reg = <0x54100000 0x00040000>;
125 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; 136 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
126 clocks = <&tegra_car TEGRA30_CLK_ISP>; 137 clocks = <&tegra_car TEGRA30_CLK_ISP>;
138 resets = <&tegra_car 23>;
139 reset-names = "isp";
127 }; 140 };
128 141
129 gr2d { 142 gr2d {
130 compatible = "nvidia,tegra30-gr2d"; 143 compatible = "nvidia,tegra30-gr2d";
131 reg = <0x54140000 0x00040000>; 144 reg = <0x54140000 0x00040000>;
132 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; 145 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
146 resets = <&tegra_car 21>;
147 reset-names = "2d";
133 clocks = <&tegra_car TEGRA30_CLK_GR2D>; 148 clocks = <&tegra_car TEGRA30_CLK_GR2D>;
134 }; 149 };
135 150
@@ -139,6 +154,9 @@
139 clocks = <&tegra_car TEGRA30_CLK_GR3D 154 clocks = <&tegra_car TEGRA30_CLK_GR3D
140 &tegra_car TEGRA30_CLK_GR3D2>; 155 &tegra_car TEGRA30_CLK_GR3D2>;
141 clock-names = "3d", "3d2"; 156 clock-names = "3d", "3d2";
157 resets = <&tegra_car 24>,
158 <&tegra_car 98>;
159 reset-names = "3d", "3d2";
142 }; 160 };
143 161
144 dc@54200000 { 162 dc@54200000 {
@@ -147,7 +165,9 @@
147 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; 165 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
148 clocks = <&tegra_car TEGRA30_CLK_DISP1>, 166 clocks = <&tegra_car TEGRA30_CLK_DISP1>,
149 <&tegra_car TEGRA30_CLK_PLL_P>; 167 <&tegra_car TEGRA30_CLK_PLL_P>;
150 clock-names = "disp1", "parent"; 168 clock-names = "dc", "parent";
169 resets = <&tegra_car 27>;
170 reset-names = "dc";
151 171
152 rgb { 172 rgb {
153 status = "disabled"; 173 status = "disabled";
@@ -160,7 +180,9 @@
160 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; 180 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
161 clocks = <&tegra_car TEGRA30_CLK_DISP2>, 181 clocks = <&tegra_car TEGRA30_CLK_DISP2>,
162 <&tegra_car TEGRA30_CLK_PLL_P>; 182 <&tegra_car TEGRA30_CLK_PLL_P>;
163 clock-names = "disp2", "parent"; 183 clock-names = "dc", "parent";
184 resets = <&tegra_car 26>;
185 reset-names = "dc";
164 186
165 rgb { 187 rgb {
166 status = "disabled"; 188 status = "disabled";
@@ -174,6 +196,8 @@
174 clocks = <&tegra_car TEGRA30_CLK_HDMI>, 196 clocks = <&tegra_car TEGRA30_CLK_HDMI>,
175 <&tegra_car TEGRA30_CLK_PLL_D2_OUT0>; 197 <&tegra_car TEGRA30_CLK_PLL_D2_OUT0>;
176 clock-names = "hdmi", "parent"; 198 clock-names = "hdmi", "parent";
199 resets = <&tegra_car 51>;
200 reset-names = "hdmi";
177 status = "disabled"; 201 status = "disabled";
178 }; 202 };
179 203
@@ -189,6 +213,8 @@
189 compatible = "nvidia,tegra30-dsi"; 213 compatible = "nvidia,tegra30-dsi";
190 reg = <0x54300000 0x00040000>; 214 reg = <0x54300000 0x00040000>;
191 clocks = <&tegra_car TEGRA30_CLK_DSIA>; 215 clocks = <&tegra_car TEGRA30_CLK_DSIA>;
216 resets = <&tegra_car 48>;
217 reset-names = "dsi";
192 status = "disabled"; 218 status = "disabled";
193 }; 219 };
194 }; 220 };
@@ -234,6 +260,7 @@
234 compatible = "nvidia,tegra30-car"; 260 compatible = "nvidia,tegra30-car";
235 reg = <0x60006000 0x1000>; 261 reg = <0x60006000 0x1000>;
236 #clock-cells = <1>; 262 #clock-cells = <1>;
263 #reset-cells = <1>;
237 }; 264 };
238 265
239 apbdma: dma { 266 apbdma: dma {
@@ -272,6 +299,9 @@
272 <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, 299 <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
273 <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; 300 <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
274 clocks = <&tegra_car TEGRA30_CLK_APBDMA>; 301 clocks = <&tegra_car TEGRA30_CLK_APBDMA>;
302 resets = <&tegra_car 34>;
303 reset-names = "dma";
304 #dma-cells = <1>;
275 }; 305 };
276 306
277 ahb: ahb { 307 ahb: ahb {
@@ -315,8 +345,11 @@
315 reg = <0x70006000 0x40>; 345 reg = <0x70006000 0x40>;
316 reg-shift = <2>; 346 reg-shift = <2>;
317 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; 347 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
318 nvidia,dma-request-selector = <&apbdma 8>;
319 clocks = <&tegra_car TEGRA30_CLK_UARTA>; 348 clocks = <&tegra_car TEGRA30_CLK_UARTA>;
349 resets = <&tegra_car 6>;
350 reset-names = "serial";
351 dmas = <&apbdma 8>, <&apbdma 8>;
352 dma-names = "rx", "tx";
320 status = "disabled"; 353 status = "disabled";
321 }; 354 };
322 355
@@ -325,8 +358,11 @@
325 reg = <0x70006040 0x40>; 358 reg = <0x70006040 0x40>;
326 reg-shift = <2>; 359 reg-shift = <2>;
327 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; 360 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
328 nvidia,dma-request-selector = <&apbdma 9>;
329 clocks = <&tegra_car TEGRA30_CLK_UARTB>; 361 clocks = <&tegra_car TEGRA30_CLK_UARTB>;
362 resets = <&tegra_car 7>;
363 reset-names = "serial";
364 dmas = <&apbdma 9>, <&apbdma 9>;
365 dma-names = "rx", "tx";
330 status = "disabled"; 366 status = "disabled";
331 }; 367 };
332 368
@@ -335,8 +371,11 @@
335 reg = <0x70006200 0x100>; 371 reg = <0x70006200 0x100>;
336 reg-shift = <2>; 372 reg-shift = <2>;
337 interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; 373 interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
338 nvidia,dma-request-selector = <&apbdma 10>;
339 clocks = <&tegra_car TEGRA30_CLK_UARTC>; 374 clocks = <&tegra_car TEGRA30_CLK_UARTC>;
375 resets = <&tegra_car 55>;
376 reset-names = "serial";
377 dmas = <&apbdma 10>, <&apbdma 10>;
378 dma-names = "rx", "tx";
340 status = "disabled"; 379 status = "disabled";
341 }; 380 };
342 381
@@ -345,8 +384,11 @@
345 reg = <0x70006300 0x100>; 384 reg = <0x70006300 0x100>;
346 reg-shift = <2>; 385 reg-shift = <2>;
347 interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; 386 interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
348 nvidia,dma-request-selector = <&apbdma 19>;
349 clocks = <&tegra_car TEGRA30_CLK_UARTD>; 387 clocks = <&tegra_car TEGRA30_CLK_UARTD>;
388 resets = <&tegra_car 65>;
389 reset-names = "serial";
390 dmas = <&apbdma 19>, <&apbdma 19>;
391 dma-names = "rx", "tx";
350 status = "disabled"; 392 status = "disabled";
351 }; 393 };
352 394
@@ -355,8 +397,11 @@
355 reg = <0x70006400 0x100>; 397 reg = <0x70006400 0x100>;
356 reg-shift = <2>; 398 reg-shift = <2>;
357 interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>; 399 interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
358 nvidia,dma-request-selector = <&apbdma 20>;
359 clocks = <&tegra_car TEGRA30_CLK_UARTE>; 400 clocks = <&tegra_car TEGRA30_CLK_UARTE>;
401 resets = <&tegra_car 66>;
402 reset-names = "serial";
403 dmas = <&apbdma 20>, <&apbdma 20>;
404 dma-names = "rx", "tx";
360 status = "disabled"; 405 status = "disabled";
361 }; 406 };
362 407
@@ -365,6 +410,8 @@
365 reg = <0x7000a000 0x100>; 410 reg = <0x7000a000 0x100>;
366 #pwm-cells = <2>; 411 #pwm-cells = <2>;
367 clocks = <&tegra_car TEGRA30_CLK_PWM>; 412 clocks = <&tegra_car TEGRA30_CLK_PWM>;
413 resets = <&tegra_car 17>;
414 reset-names = "pwm";
368 status = "disabled"; 415 status = "disabled";
369 }; 416 };
370 417
@@ -384,6 +431,10 @@
384 clocks = <&tegra_car TEGRA30_CLK_I2C1>, 431 clocks = <&tegra_car TEGRA30_CLK_I2C1>,
385 <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; 432 <&tegra_car TEGRA30_CLK_PLL_P_OUT3>;
386 clock-names = "div-clk", "fast-clk"; 433 clock-names = "div-clk", "fast-clk";
434 resets = <&tegra_car 12>;
435 reset-names = "i2c";
436 dmas = <&apbdma 21>, <&apbdma 21>;
437 dma-names = "rx", "tx";
387 status = "disabled"; 438 status = "disabled";
388 }; 439 };
389 440
@@ -396,6 +447,10 @@
396 clocks = <&tegra_car TEGRA30_CLK_I2C2>, 447 clocks = <&tegra_car TEGRA30_CLK_I2C2>,
397 <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; 448 <&tegra_car TEGRA30_CLK_PLL_P_OUT3>;
398 clock-names = "div-clk", "fast-clk"; 449 clock-names = "div-clk", "fast-clk";
450 resets = <&tegra_car 54>;
451 reset-names = "i2c";
452 dmas = <&apbdma 22>, <&apbdma 22>;
453 dma-names = "rx", "tx";
399 status = "disabled"; 454 status = "disabled";
400 }; 455 };
401 456
@@ -408,6 +463,10 @@
408 clocks = <&tegra_car TEGRA30_CLK_I2C3>, 463 clocks = <&tegra_car TEGRA30_CLK_I2C3>,
409 <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; 464 <&tegra_car TEGRA30_CLK_PLL_P_OUT3>;
410 clock-names = "div-clk", "fast-clk"; 465 clock-names = "div-clk", "fast-clk";
466 resets = <&tegra_car 67>;
467 reset-names = "i2c";
468 dmas = <&apbdma 23>, <&apbdma 23>;
469 dma-names = "rx", "tx";
411 status = "disabled"; 470 status = "disabled";
412 }; 471 };
413 472
@@ -419,7 +478,11 @@
419 #size-cells = <0>; 478 #size-cells = <0>;
420 clocks = <&tegra_car TEGRA30_CLK_I2C4>, 479 clocks = <&tegra_car TEGRA30_CLK_I2C4>,
421 <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; 480 <&tegra_car TEGRA30_CLK_PLL_P_OUT3>;
481 resets = <&tegra_car 103>;
482 reset-names = "i2c";
422 clock-names = "div-clk", "fast-clk"; 483 clock-names = "div-clk", "fast-clk";
484 dmas = <&apbdma 26>, <&apbdma 26>;
485 dma-names = "rx", "tx";
423 status = "disabled"; 486 status = "disabled";
424 }; 487 };
425 488
@@ -432,6 +495,10 @@
432 clocks = <&tegra_car TEGRA30_CLK_I2C5>, 495 clocks = <&tegra_car TEGRA30_CLK_I2C5>,
433 <&tegra_car TEGRA30_CLK_PLL_P_OUT3>; 496 <&tegra_car TEGRA30_CLK_PLL_P_OUT3>;
434 clock-names = "div-clk", "fast-clk"; 497 clock-names = "div-clk", "fast-clk";
498 resets = <&tegra_car 47>;
499 reset-names = "i2c";
500 dmas = <&apbdma 24>, <&apbdma 24>;
501 dma-names = "rx", "tx";
435 status = "disabled"; 502 status = "disabled";
436 }; 503 };
437 504
@@ -439,10 +506,13 @@
439 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; 506 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
440 reg = <0x7000d400 0x200>; 507 reg = <0x7000d400 0x200>;
441 interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>; 508 interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
442 nvidia,dma-request-selector = <&apbdma 15>;
443 #address-cells = <1>; 509 #address-cells = <1>;
444 #size-cells = <0>; 510 #size-cells = <0>;
445 clocks = <&tegra_car TEGRA30_CLK_SBC1>; 511 clocks = <&tegra_car TEGRA30_CLK_SBC1>;
512 resets = <&tegra_car 41>;
513 reset-names = "spi";
514 dmas = <&apbdma 15>, <&apbdma 15>;
515 dma-names = "rx", "tx";
446 status = "disabled"; 516 status = "disabled";
447 }; 517 };
448 518
@@ -450,10 +520,13 @@
450 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; 520 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
451 reg = <0x7000d600 0x200>; 521 reg = <0x7000d600 0x200>;
452 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; 522 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
453 nvidia,dma-request-selector = <&apbdma 16>;
454 #address-cells = <1>; 523 #address-cells = <1>;
455 #size-cells = <0>; 524 #size-cells = <0>;
456 clocks = <&tegra_car TEGRA30_CLK_SBC2>; 525 clocks = <&tegra_car TEGRA30_CLK_SBC2>;
526 resets = <&tegra_car 44>;
527 reset-names = "spi";
528 dmas = <&apbdma 16>, <&apbdma 16>;
529 dma-names = "rx", "tx";
457 status = "disabled"; 530 status = "disabled";
458 }; 531 };
459 532
@@ -461,10 +534,13 @@
461 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; 534 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
462 reg = <0x7000d800 0x200>; 535 reg = <0x7000d800 0x200>;
463 interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; 536 interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
464 nvidia,dma-request-selector = <&apbdma 17>;
465 #address-cells = <1>; 537 #address-cells = <1>;
466 #size-cells = <0>; 538 #size-cells = <0>;
467 clocks = <&tegra_car TEGRA30_CLK_SBC3>; 539 clocks = <&tegra_car TEGRA30_CLK_SBC3>;
540 resets = <&tegra_car 46>;
541 reset-names = "spi";
542 dmas = <&apbdma 17>, <&apbdma 17>;
543 dma-names = "rx", "tx";
468 status = "disabled"; 544 status = "disabled";
469 }; 545 };
470 546
@@ -472,10 +548,13 @@
472 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; 548 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
473 reg = <0x7000da00 0x200>; 549 reg = <0x7000da00 0x200>;
474 interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; 550 interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
475 nvidia,dma-request-selector = <&apbdma 18>;
476 #address-cells = <1>; 551 #address-cells = <1>;
477 #size-cells = <0>; 552 #size-cells = <0>;
478 clocks = <&tegra_car TEGRA30_CLK_SBC4>; 553 clocks = <&tegra_car TEGRA30_CLK_SBC4>;
554 resets = <&tegra_car 68>;
555 reset-names = "spi";
556 dmas = <&apbdma 18>, <&apbdma 18>;
557 dma-names = "rx", "tx";
479 status = "disabled"; 558 status = "disabled";
480 }; 559 };
481 560
@@ -483,10 +562,13 @@
483 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; 562 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
484 reg = <0x7000dc00 0x200>; 563 reg = <0x7000dc00 0x200>;
485 interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>; 564 interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
486 nvidia,dma-request-selector = <&apbdma 27>;
487 #address-cells = <1>; 565 #address-cells = <1>;
488 #size-cells = <0>; 566 #size-cells = <0>;
489 clocks = <&tegra_car TEGRA30_CLK_SBC5>; 567 clocks = <&tegra_car TEGRA30_CLK_SBC5>;
568 resets = <&tegra_car 104>;
569 reset-names = "spi";
570 dmas = <&apbdma 27>, <&apbdma 27>;
571 dma-names = "rx", "tx";
490 status = "disabled"; 572 status = "disabled";
491 }; 573 };
492 574
@@ -494,10 +576,13 @@
494 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; 576 compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
495 reg = <0x7000de00 0x200>; 577 reg = <0x7000de00 0x200>;
496 interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; 578 interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
497 nvidia,dma-request-selector = <&apbdma 28>;
498 #address-cells = <1>; 579 #address-cells = <1>;
499 #size-cells = <0>; 580 #size-cells = <0>;
500 clocks = <&tegra_car TEGRA30_CLK_SBC6>; 581 clocks = <&tegra_car TEGRA30_CLK_SBC6>;
582 resets = <&tegra_car 106>;
583 reset-names = "spi";
584 dmas = <&apbdma 28>, <&apbdma 28>;
585 dma-names = "rx", "tx";
501 status = "disabled"; 586 status = "disabled";
502 }; 587 };
503 588
@@ -506,6 +591,8 @@
506 reg = <0x7000e200 0x100>; 591 reg = <0x7000e200 0x100>;
507 interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; 592 interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
508 clocks = <&tegra_car TEGRA30_CLK_KBC>; 593 clocks = <&tegra_car TEGRA30_CLK_KBC>;
594 resets = <&tegra_car 36>;
595 reset-names = "kbc";
509 status = "disabled"; 596 status = "disabled";
510 }; 597 };
511 598
@@ -540,21 +627,29 @@
540 reg = <0x70080000 0x200 627 reg = <0x70080000 0x200
541 0x70080200 0x100>; 628 0x70080200 0x100>;
542 interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; 629 interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
543 nvidia,dma-request-selector = <&apbdma 1>;
544 clocks = <&tegra_car TEGRA30_CLK_D_AUDIO>, 630 clocks = <&tegra_car TEGRA30_CLK_D_AUDIO>,
545 <&tegra_car TEGRA30_CLK_APBIF>, 631 <&tegra_car TEGRA30_CLK_APBIF>;
546 <&tegra_car TEGRA30_CLK_I2S0>, 632 clock-names = "d_audio", "apbif";
547 <&tegra_car TEGRA30_CLK_I2S1>, 633 resets = <&tegra_car 106>, /* d_audio */
548 <&tegra_car TEGRA30_CLK_I2S2>, 634 <&tegra_car 107>, /* apbif */
549 <&tegra_car TEGRA30_CLK_I2S3>, 635 <&tegra_car 30>, /* i2s0 */
550 <&tegra_car TEGRA30_CLK_I2S4>, 636 <&tegra_car 11>, /* i2s1 */
551 <&tegra_car TEGRA30_CLK_DAM0>, 637 <&tegra_car 18>, /* i2s2 */
552 <&tegra_car TEGRA30_CLK_DAM1>, 638 <&tegra_car 101>, /* i2s3 */
553 <&tegra_car TEGRA30_CLK_DAM2>, 639 <&tegra_car 102>, /* i2s4 */
554 <&tegra_car TEGRA30_CLK_SPDIF_IN>; 640 <&tegra_car 108>, /* dam0 */
555 clock-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2", 641 <&tegra_car 109>, /* dam1 */
642 <&tegra_car 110>, /* dam2 */
643 <&tegra_car 10>; /* spdif */
644 reset-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2",
556 "i2s3", "i2s4", "dam0", "dam1", "dam2", 645 "i2s3", "i2s4", "dam0", "dam1", "dam2",
557 "spdif_in"; 646 "spdif";
647 dmas = <&apbdma 1>, <&apbdma 1>,
648 <&apbdma 2>, <&apbdma 2>,
649 <&apbdma 3>, <&apbdma 3>,
650 <&apbdma 4>, <&apbdma 4>;
651 dma-names = "rx0", "tx0", "rx1", "tx1", "rx2", "tx2",
652 "rx3", "tx3";
558 ranges; 653 ranges;
559 #address-cells = <1>; 654 #address-cells = <1>;
560 #size-cells = <1>; 655 #size-cells = <1>;
@@ -564,6 +659,8 @@
564 reg = <0x70080300 0x100>; 659 reg = <0x70080300 0x100>;
565 nvidia,ahub-cif-ids = <4 4>; 660 nvidia,ahub-cif-ids = <4 4>;
566 clocks = <&tegra_car TEGRA30_CLK_I2S0>; 661 clocks = <&tegra_car TEGRA30_CLK_I2S0>;
662 resets = <&tegra_car 30>;
663 reset-names = "i2s";
567 status = "disabled"; 664 status = "disabled";
568 }; 665 };
569 666
@@ -572,6 +669,8 @@
572 reg = <0x70080400 0x100>; 669 reg = <0x70080400 0x100>;
573 nvidia,ahub-cif-ids = <5 5>; 670 nvidia,ahub-cif-ids = <5 5>;
574 clocks = <&tegra_car TEGRA30_CLK_I2S1>; 671 clocks = <&tegra_car TEGRA30_CLK_I2S1>;
672 resets = <&tegra_car 11>;
673 reset-names = "i2s";
575 status = "disabled"; 674 status = "disabled";
576 }; 675 };
577 676
@@ -580,6 +679,8 @@
580 reg = <0x70080500 0x100>; 679 reg = <0x70080500 0x100>;
581 nvidia,ahub-cif-ids = <6 6>; 680 nvidia,ahub-cif-ids = <6 6>;
582 clocks = <&tegra_car TEGRA30_CLK_I2S2>; 681 clocks = <&tegra_car TEGRA30_CLK_I2S2>;
682 resets = <&tegra_car 18>;
683 reset-names = "i2s";
583 status = "disabled"; 684 status = "disabled";
584 }; 685 };
585 686
@@ -588,6 +689,8 @@
588 reg = <0x70080600 0x100>; 689 reg = <0x70080600 0x100>;
589 nvidia,ahub-cif-ids = <7 7>; 690 nvidia,ahub-cif-ids = <7 7>;
590 clocks = <&tegra_car TEGRA30_CLK_I2S3>; 691 clocks = <&tegra_car TEGRA30_CLK_I2S3>;
692 resets = <&tegra_car 101>;
693 reset-names = "i2s";
591 status = "disabled"; 694 status = "disabled";
592 }; 695 };
593 696
@@ -596,6 +699,8 @@
596 reg = <0x70080700 0x100>; 699 reg = <0x70080700 0x100>;
597 nvidia,ahub-cif-ids = <8 8>; 700 nvidia,ahub-cif-ids = <8 8>;
598 clocks = <&tegra_car TEGRA30_CLK_I2S4>; 701 clocks = <&tegra_car TEGRA30_CLK_I2S4>;
702 resets = <&tegra_car 102>;
703 reset-names = "i2s";
599 status = "disabled"; 704 status = "disabled";
600 }; 705 };
601 }; 706 };
@@ -605,6 +710,8 @@
605 reg = <0x78000000 0x200>; 710 reg = <0x78000000 0x200>;
606 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; 711 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
607 clocks = <&tegra_car TEGRA30_CLK_SDMMC1>; 712 clocks = <&tegra_car TEGRA30_CLK_SDMMC1>;
713 resets = <&tegra_car 14>;
714 reset-names = "sdhci";
608 status = "disabled"; 715 status = "disabled";
609 }; 716 };
610 717
@@ -613,6 +720,8 @@
613 reg = <0x78000200 0x200>; 720 reg = <0x78000200 0x200>;
614 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; 721 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
615 clocks = <&tegra_car TEGRA30_CLK_SDMMC2>; 722 clocks = <&tegra_car TEGRA30_CLK_SDMMC2>;
723 resets = <&tegra_car 9>;
724 reset-names = "sdhci";
616 status = "disabled"; 725 status = "disabled";
617 }; 726 };
618 727
@@ -621,6 +730,8 @@
621 reg = <0x78000400 0x200>; 730 reg = <0x78000400 0x200>;
622 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; 731 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
623 clocks = <&tegra_car TEGRA30_CLK_SDMMC3>; 732 clocks = <&tegra_car TEGRA30_CLK_SDMMC3>;
733 resets = <&tegra_car 69>;
734 reset-names = "sdhci";
624 status = "disabled"; 735 status = "disabled";
625 }; 736 };
626 737
@@ -629,6 +740,8 @@
629 reg = <0x78000600 0x200>; 740 reg = <0x78000600 0x200>;
630 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; 741 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
631 clocks = <&tegra_car TEGRA30_CLK_SDMMC4>; 742 clocks = <&tegra_car TEGRA30_CLK_SDMMC4>;
743 resets = <&tegra_car 15>;
744 reset-names = "sdhci";
632 status = "disabled"; 745 status = "disabled";
633 }; 746 };
634 747
@@ -638,6 +751,8 @@
638 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; 751 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
639 phy_type = "utmi"; 752 phy_type = "utmi";
640 clocks = <&tegra_car TEGRA30_CLK_USBD>; 753 clocks = <&tegra_car TEGRA30_CLK_USBD>;
754 resets = <&tegra_car 22>;
755 reset-names = "usb";
641 nvidia,needs-double-reset; 756 nvidia,needs-double-reset;
642 nvidia,phy = <&phy1>; 757 nvidia,phy = <&phy1>;
643 status = "disabled"; 758 status = "disabled";
@@ -671,6 +786,8 @@
671 interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; 786 interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
672 phy_type = "ulpi"; 787 phy_type = "ulpi";
673 clocks = <&tegra_car TEGRA30_CLK_USB2>; 788 clocks = <&tegra_car TEGRA30_CLK_USB2>;
789 resets = <&tegra_car 58>;
790 reset-names = "usb";
674 nvidia,phy = <&phy2>; 791 nvidia,phy = <&phy2>;
675 status = "disabled"; 792 status = "disabled";
676 }; 793 };
@@ -692,6 +809,8 @@
692 interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; 809 interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
693 phy_type = "utmi"; 810 phy_type = "utmi";
694 clocks = <&tegra_car TEGRA30_CLK_USB3>; 811 clocks = <&tegra_car TEGRA30_CLK_USB3>;
812 resets = <&tegra_car 59>;
813 reset-names = "usb";
695 nvidia,phy = <&phy3>; 814 nvidia,phy = <&phy3>;
696 status = "disabled"; 815 status = "disabled";
697 }; 816 };
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig
index 690e89273230..0b4e9b5210d8 100644
--- a/arch/arm/configs/at91_dt_defconfig
+++ b/arch/arm/configs/at91_dt_defconfig
@@ -22,7 +22,6 @@ CONFIG_SOC_AT91SAM9X5=y
22CONFIG_SOC_AT91SAM9N12=y 22CONFIG_SOC_AT91SAM9N12=y
23CONFIG_MACH_AT91RM9200_DT=y 23CONFIG_MACH_AT91RM9200_DT=y
24CONFIG_MACH_AT91SAM9_DT=y 24CONFIG_MACH_AT91SAM9_DT=y
25CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
26CONFIG_AT91_TIMER_HZ=128 25CONFIG_AT91_TIMER_HZ=128
27CONFIG_AEABI=y 26CONFIG_AEABI=y
28# CONFIG_OABI_COMPAT is not set 27# CONFIG_OABI_COMPAT is not set
diff --git a/arch/arm/configs/at91rm9200_defconfig b/arch/arm/configs/at91rm9200_defconfig
index 75502c4d222c..bf057719dab0 100644
--- a/arch/arm/configs/at91rm9200_defconfig
+++ b/arch/arm/configs/at91rm9200_defconfig
@@ -31,7 +31,6 @@ CONFIG_MACH_YL9200=y
31CONFIG_MACH_CPUAT91=y 31CONFIG_MACH_CPUAT91=y
32CONFIG_MACH_ECO920=y 32CONFIG_MACH_ECO920=y
33CONFIG_MTD_AT91_DATAFLASH_CARD=y 33CONFIG_MTD_AT91_DATAFLASH_CARD=y
34CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
35CONFIG_AT91_TIMER_HZ=100 34CONFIG_AT91_TIMER_HZ=100
36# CONFIG_ARM_THUMB is not set 35# CONFIG_ARM_THUMB is not set
37CONFIG_PCCARD=y 36CONFIG_PCCARD=y
diff --git a/arch/arm/configs/at91sam9260_9g20_defconfig b/arch/arm/configs/at91sam9260_9g20_defconfig
index 69b6928d3d9d..2cd832918e9c 100644
--- a/arch/arm/configs/at91sam9260_9g20_defconfig
+++ b/arch/arm/configs/at91sam9260_9g20_defconfig
@@ -15,7 +15,6 @@ CONFIG_MACH_AT91SAM9260EK=y
15CONFIG_MACH_CAM60=y 15CONFIG_MACH_CAM60=y
16CONFIG_MACH_SAM9_L9260=y 16CONFIG_MACH_SAM9_L9260=y
17CONFIG_MACH_AFEB9260=y 17CONFIG_MACH_AFEB9260=y
18CONFIG_MACH_QIL_A9260=y
19CONFIG_MACH_CPU9260=y 18CONFIG_MACH_CPU9260=y
20CONFIG_MACH_FLEXIBITY=y 19CONFIG_MACH_FLEXIBITY=y
21CONFIG_MACH_AT91SAM9G20EK=y 20CONFIG_MACH_AT91SAM9G20EK=y
@@ -28,7 +27,6 @@ CONFIG_MACH_PCONTROL_G20=y
28CONFIG_MACH_GSIA18S=y 27CONFIG_MACH_GSIA18S=y
29CONFIG_MACH_SNAPPER_9260=y 28CONFIG_MACH_SNAPPER_9260=y
30CONFIG_MACH_AT91SAM9_DT=y 29CONFIG_MACH_AT91SAM9_DT=y
31CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
32CONFIG_AT91_SLOW_CLOCK=y 30CONFIG_AT91_SLOW_CLOCK=y
33# CONFIG_ARM_THUMB is not set 31# CONFIG_ARM_THUMB is not set
34CONFIG_AEABI=y 32CONFIG_AEABI=y
diff --git a/arch/arm/configs/at91sam9261_9g10_defconfig b/arch/arm/configs/at91sam9261_9g10_defconfig
index 9d35cd81c611..f80e993b04ce 100644
--- a/arch/arm/configs/at91sam9261_9g10_defconfig
+++ b/arch/arm/configs/at91sam9261_9g10_defconfig
@@ -18,7 +18,6 @@ CONFIG_ARCH_AT91=y
18CONFIG_ARCH_AT91SAM9261=y 18CONFIG_ARCH_AT91SAM9261=y
19CONFIG_MACH_AT91SAM9261EK=y 19CONFIG_MACH_AT91SAM9261EK=y
20CONFIG_MACH_AT91SAM9G10EK=y 20CONFIG_MACH_AT91SAM9G10EK=y
21CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
22# CONFIG_ARM_THUMB is not set 21# CONFIG_ARM_THUMB is not set
23CONFIG_AEABI=y 22CONFIG_AEABI=y
24# CONFIG_OABI_COMPAT is not set 23# CONFIG_OABI_COMPAT is not set
diff --git a/arch/arm/configs/at91sam9g45_defconfig b/arch/arm/configs/at91sam9g45_defconfig
index 08166cd4e7d6..e181a50fd65a 100644
--- a/arch/arm/configs/at91sam9g45_defconfig
+++ b/arch/arm/configs/at91sam9g45_defconfig
@@ -18,7 +18,6 @@ CONFIG_ARCH_AT91=y
18CONFIG_ARCH_AT91SAM9G45=y 18CONFIG_ARCH_AT91SAM9G45=y
19CONFIG_MACH_AT91SAM9M10G45EK=y 19CONFIG_MACH_AT91SAM9M10G45EK=y
20CONFIG_MACH_AT91SAM9_DT=y 20CONFIG_MACH_AT91SAM9_DT=y
21CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
22CONFIG_AT91_SLOW_CLOCK=y 21CONFIG_AT91_SLOW_CLOCK=y
23CONFIG_AEABI=y 22CONFIG_AEABI=y
24# CONFIG_OABI_COMPAT is not set 23# CONFIG_OABI_COMPAT is not set
diff --git a/arch/arm/configs/at91sam9rl_defconfig b/arch/arm/configs/at91sam9rl_defconfig
index 7cf87856d63c..7b6f131cecd6 100644
--- a/arch/arm/configs/at91sam9rl_defconfig
+++ b/arch/arm/configs/at91sam9rl_defconfig
@@ -13,7 +13,6 @@ CONFIG_MODULE_UNLOAD=y
13CONFIG_ARCH_AT91=y 13CONFIG_ARCH_AT91=y
14CONFIG_ARCH_AT91SAM9RL=y 14CONFIG_ARCH_AT91SAM9RL=y
15CONFIG_MACH_AT91SAM9RLEK=y 15CONFIG_MACH_AT91SAM9RLEK=y
16CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
17# CONFIG_ARM_THUMB is not set 16# CONFIG_ARM_THUMB is not set
18CONFIG_ZBOOT_ROM_TEXT=0x0 17CONFIG_ZBOOT_ROM_TEXT=0x0
19CONFIG_ZBOOT_ROM_BSS=0x0 18CONFIG_ZBOOT_ROM_BSS=0x0
diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig
index f6e78f83c3c3..dc3881e07630 100644
--- a/arch/arm/configs/sama5_defconfig
+++ b/arch/arm/configs/sama5_defconfig
@@ -20,7 +20,6 @@ CONFIG_ARCH_AT91=y
20CONFIG_SOC_SAM_V7=y 20CONFIG_SOC_SAM_V7=y
21CONFIG_SOC_SAMA5D3=y 21CONFIG_SOC_SAMA5D3=y
22CONFIG_MACH_SAMA5_DT=y 22CONFIG_MACH_SAMA5_DT=y
23CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
24CONFIG_AEABI=y 23CONFIG_AEABI=y
25# CONFIG_OABI_COMPAT is not set 24# CONFIG_OABI_COMPAT is not set
26CONFIG_UACCESS_WITH_MEMCPY=y 25CONFIG_UACCESS_WITH_MEMCPY=y
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 699b71e7f7ec..f1bf952da747 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -1,15 +1,33 @@
1if ARCH_AT91 1if ARCH_AT91
2 2
3config HAVE_AT91_UTMI
4 bool
5
6config HAVE_AT91_USB_CLK
7 bool
8
3config HAVE_AT91_DBGU0 9config HAVE_AT91_DBGU0
4 bool 10 bool
5 11
6config HAVE_AT91_DBGU1 12config HAVE_AT91_DBGU1
7 bool 13 bool
8 14
15config AT91_USE_OLD_CLK
16 bool
17
9config AT91_PMC_UNIT 18config AT91_PMC_UNIT
10 bool 19 bool
11 default !ARCH_AT91X40 20 default !ARCH_AT91X40
12 21
22config COMMON_CLK_AT91
23 bool
24 default AT91_PMC_UNIT && USE_OF && !AT91_USE_OLD_CLK
25 select COMMON_CLK
26
27config OLD_CLK_AT91
28 bool
29 default AT91_PMC_UNIT && AT91_USE_OLD_CLK
30
13config AT91_SAM9_ALT_RESET 31config AT91_SAM9_ALT_RESET
14 bool 32 bool
15 default !ARCH_AT91X40 33 default !ARCH_AT91X40
@@ -21,6 +39,9 @@ config AT91_SAM9G45_RESET
21config AT91_SAM9_TIME 39config AT91_SAM9_TIME
22 bool 40 bool
23 41
42config HAVE_AT91_SMD
43 bool
44
24config SOC_AT91SAM9 45config SOC_AT91SAM9
25 bool 46 bool
26 select AT91_SAM9_TIME 47 select AT91_SAM9_TIME
@@ -61,10 +82,12 @@ comment "Atmel AT91 Processor"
61if SOC_SAM_V7 82if SOC_SAM_V7
62config SOC_SAMA5D3 83config SOC_SAMA5D3
63 bool "SAMA5D3 family" 84 bool "SAMA5D3 family"
64 depends on SOC_SAM_V7
65 select SOC_SAMA5 85 select SOC_SAMA5
66 select HAVE_FB_ATMEL 86 select HAVE_FB_ATMEL
67 select HAVE_AT91_DBGU1 87 select HAVE_AT91_DBGU1
88 select HAVE_AT91_UTMI
89 select HAVE_AT91_SMD
90 select HAVE_AT91_USB_CLK
68 help 91 help
69 Select this if you are using one of Atmel's SAMA5D3 family SoC. 92 Select this if you are using one of Atmel's SAMA5D3 family SoC.
70 This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35. 93 This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35.
@@ -78,11 +101,15 @@ config SOC_AT91RM9200
78 select HAVE_AT91_DBGU0 101 select HAVE_AT91_DBGU0
79 select MULTI_IRQ_HANDLER 102 select MULTI_IRQ_HANDLER
80 select SPARSE_IRQ 103 select SPARSE_IRQ
104 select AT91_USE_OLD_CLK
105 select HAVE_AT91_USB_CLK
81 106
82config SOC_AT91SAM9260 107config SOC_AT91SAM9260
83 bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20" 108 bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20"
84 select HAVE_AT91_DBGU0 109 select HAVE_AT91_DBGU0
85 select SOC_AT91SAM9 110 select SOC_AT91SAM9
111 select AT91_USE_OLD_CLK
112 select HAVE_AT91_USB_CLK
86 help 113 help
87 Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE 114 Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE
88 or AT91SAM9G20 SoC. 115 or AT91SAM9G20 SoC.
@@ -92,6 +119,8 @@ config SOC_AT91SAM9261
92 select HAVE_AT91_DBGU0 119 select HAVE_AT91_DBGU0
93 select HAVE_FB_ATMEL 120 select HAVE_FB_ATMEL
94 select SOC_AT91SAM9 121 select SOC_AT91SAM9
122 select AT91_USE_OLD_CLK
123 select HAVE_AT91_USB_CLK
95 help 124 help
96 Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC. 125 Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC.
97 126
@@ -100,18 +129,25 @@ config SOC_AT91SAM9263
100 select HAVE_AT91_DBGU1 129 select HAVE_AT91_DBGU1
101 select HAVE_FB_ATMEL 130 select HAVE_FB_ATMEL
102 select SOC_AT91SAM9 131 select SOC_AT91SAM9
132 select AT91_USE_OLD_CLK
133 select HAVE_AT91_USB_CLK
103 134
104config SOC_AT91SAM9RL 135config SOC_AT91SAM9RL
105 bool "AT91SAM9RL" 136 bool "AT91SAM9RL"
106 select HAVE_AT91_DBGU0 137 select HAVE_AT91_DBGU0
107 select HAVE_FB_ATMEL 138 select HAVE_FB_ATMEL
108 select SOC_AT91SAM9 139 select SOC_AT91SAM9
140 select AT91_USE_OLD_CLK
141 select HAVE_AT91_UTMI
109 142
110config SOC_AT91SAM9G45 143config SOC_AT91SAM9G45
111 bool "AT91SAM9G45 or AT91SAM9M10 families" 144 bool "AT91SAM9G45 or AT91SAM9M10 families"
112 select HAVE_AT91_DBGU1 145 select HAVE_AT91_DBGU1
113 select HAVE_FB_ATMEL 146 select HAVE_FB_ATMEL
114 select SOC_AT91SAM9 147 select SOC_AT91SAM9
148 select AT91_USE_OLD_CLK
149 select HAVE_AT91_UTMI
150 select HAVE_AT91_USB_CLK
115 help 151 help
116 Select this if you are using one of Atmel's AT91SAM9G45 family SoC. 152 Select this if you are using one of Atmel's AT91SAM9G45 family SoC.
117 This support covers AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11. 153 This support covers AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11.
@@ -121,6 +157,10 @@ config SOC_AT91SAM9X5
121 select HAVE_AT91_DBGU0 157 select HAVE_AT91_DBGU0
122 select HAVE_FB_ATMEL 158 select HAVE_FB_ATMEL
123 select SOC_AT91SAM9 159 select SOC_AT91SAM9
160 select AT91_USE_OLD_CLK
161 select HAVE_AT91_UTMI
162 select HAVE_AT91_SMD
163 select HAVE_AT91_USB_CLK
124 help 164 help
125 Select this if you are using one of Atmel's AT91SAM9x5 family SoC. 165 Select this if you are using one of Atmel's AT91SAM9x5 family SoC.
126 This means that your SAM9 name finishes with a '5' (except if it is 166 This means that your SAM9 name finishes with a '5' (except if it is
@@ -133,6 +173,8 @@ config SOC_AT91SAM9N12
133 select HAVE_AT91_DBGU0 173 select HAVE_AT91_DBGU0
134 select HAVE_FB_ATMEL 174 select HAVE_FB_ATMEL
135 select SOC_AT91SAM9 175 select SOC_AT91SAM9
176 select AT91_USE_OLD_CLK
177 select HAVE_AT91_USB_CLK
136 help 178 help
137 Select this if you are using Atmel's AT91SAM9N12 SoC. 179 Select this if you are using Atmel's AT91SAM9N12 SoC.
138 180
@@ -172,12 +214,6 @@ config MACH_SAMA5_DT
172 214
173comment "AT91 Feature Selections" 215comment "AT91 Feature Selections"
174 216
175config AT91_PROGRAMMABLE_CLOCKS
176 bool "Programmable Clocks"
177 help
178 Select this if you need to program one or more of the PCK0..PCK3
179 programmable clock outputs.
180
181config AT91_SLOW_CLOCK 217config AT91_SLOW_CLOCK
182 bool "Suspend-to-RAM disables main oscillator" 218 bool "Suspend-to-RAM disables main oscillator"
183 depends on SUSPEND 219 depends on SUSPEND
diff --git a/arch/arm/mach-at91/Kconfig.non_dt b/arch/arm/mach-at91/Kconfig.non_dt
index 0363dba7d3f6..1f73e9b527da 100644
--- a/arch/arm/mach-at91/Kconfig.non_dt
+++ b/arch/arm/mach-at91/Kconfig.non_dt
@@ -12,26 +12,32 @@ config ARCH_AT91_NONE
12config ARCH_AT91RM9200 12config ARCH_AT91RM9200
13 bool "AT91RM9200" 13 bool "AT91RM9200"
14 select SOC_AT91RM9200 14 select SOC_AT91RM9200
15 select AT91_USE_OLD_CLK
15 16
16config ARCH_AT91SAM9260 17config ARCH_AT91SAM9260
17 bool "AT91SAM9260 or AT91SAM9XE or AT91SAM9G20" 18 bool "AT91SAM9260 or AT91SAM9XE or AT91SAM9G20"
18 select SOC_AT91SAM9260 19 select SOC_AT91SAM9260
20 select AT91_USE_OLD_CLK
19 21
20config ARCH_AT91SAM9261 22config ARCH_AT91SAM9261
21 bool "AT91SAM9261 or AT91SAM9G10" 23 bool "AT91SAM9261 or AT91SAM9G10"
22 select SOC_AT91SAM9261 24 select SOC_AT91SAM9261
25 select AT91_USE_OLD_CLK
23 26
24config ARCH_AT91SAM9263 27config ARCH_AT91SAM9263
25 bool "AT91SAM9263" 28 bool "AT91SAM9263"
26 select SOC_AT91SAM9263 29 select SOC_AT91SAM9263
30 select AT91_USE_OLD_CLK
27 31
28config ARCH_AT91SAM9RL 32config ARCH_AT91SAM9RL
29 bool "AT91SAM9RL" 33 bool "AT91SAM9RL"
30 select SOC_AT91SAM9RL 34 select SOC_AT91SAM9RL
35 select AT91_USE_OLD_CLK
31 36
32config ARCH_AT91SAM9G45 37config ARCH_AT91SAM9G45
33 bool "AT91SAM9G45" 38 bool "AT91SAM9G45"
34 select SOC_AT91SAM9G45 39 select SOC_AT91SAM9G45
40 select AT91_USE_OLD_CLK
35 41
36config ARCH_AT91X40 42config ARCH_AT91X40
37 bool "AT91x40" 43 bool "AT91x40"
@@ -176,12 +182,6 @@ config MACH_AFEB9260
176 <svn://194.85.238.22/home/users/george/svn/arm9eb> 182 <svn://194.85.238.22/home/users/george/svn/arm9eb>
177 <http://groups.google.com/group/arm9fpga-evolution-board> 183 <http://groups.google.com/group/arm9fpga-evolution-board>
178 184
179config MACH_QIL_A9260
180 bool "CALAO QIL-A9260 board"
181 help
182 Select this if you are using a Calao Systems QIL-A9260 Board.
183 <http://www.calao-systems.com>
184
185config MACH_CPU9260 185config MACH_CPU9260
186 bool "Eukrea CPU9260 board" 186 bool "Eukrea CPU9260 board"
187 help 187 help
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index 90aab2d5a07f..78e9cec282f4 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -7,7 +7,7 @@ obj-m :=
7obj-n := 7obj-n :=
8obj- := 8obj- :=
9 9
10obj-$(CONFIG_AT91_PMC_UNIT) += clock.o 10obj-$(CONFIG_OLD_CLK_AT91) += clock.o
11obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o 11obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o
12obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o 12obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o
13obj-$(CONFIG_AT91_SAM9_TIME) += at91sam926x_time.o 13obj-$(CONFIG_AT91_SAM9_TIME) += at91sam926x_time.o
@@ -52,7 +52,6 @@ obj-$(CONFIG_MACH_RSI_EWS) += board-rsi-ews.o
52obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o 52obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
53obj-$(CONFIG_MACH_CAM60) += board-cam60.o 53obj-$(CONFIG_MACH_CAM60) += board-cam60.o
54obj-$(CONFIG_MACH_SAM9_L9260) += board-sam9-l9260.o 54obj-$(CONFIG_MACH_SAM9_L9260) += board-sam9-l9260.o
55obj-$(CONFIG_MACH_QIL_A9260) += board-qil-a9260.o
56obj-$(CONFIG_MACH_AFEB9260) += board-afeb-9260v1.o 55obj-$(CONFIG_MACH_AFEB9260) += board-afeb-9260v1.o
57obj-$(CONFIG_MACH_CPU9260) += board-cpu9krea.o 56obj-$(CONFIG_MACH_CPU9260) += board-cpu9krea.o
58obj-$(CONFIG_MACH_FLEXIBITY) += board-flexibity.o 57obj-$(CONFIG_MACH_FLEXIBITY) += board-flexibity.o
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index 25805f2f6010..e47f5fd232f5 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -12,13 +12,13 @@
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/reboot.h> 14#include <linux/reboot.h>
15#include <linux/clk/at91_pmc.h>
15 16
16#include <asm/irq.h> 17#include <asm/irq.h>
17#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
18#include <asm/mach/map.h> 19#include <asm/mach/map.h>
19#include <asm/system_misc.h> 20#include <asm/system_misc.h>
20#include <mach/at91rm9200.h> 21#include <mach/at91rm9200.h>
21#include <mach/at91_pmc.h>
22#include <mach/at91_st.h> 22#include <mach/at91_st.h>
23#include <mach/cpu.h> 23#include <mach/cpu.h>
24 24
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index d6a1fa85371d..6c821e562159 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -11,6 +11,7 @@
11 */ 11 */
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/clk/at91_pmc.h>
14 15
15#include <asm/proc-fns.h> 16#include <asm/proc-fns.h>
16#include <asm/irq.h> 17#include <asm/irq.h>
@@ -20,7 +21,6 @@
20#include <mach/cpu.h> 21#include <mach/cpu.h>
21#include <mach/at91_dbgu.h> 22#include <mach/at91_dbgu.h>
22#include <mach/at91sam9260.h> 23#include <mach/at91sam9260.h>
23#include <mach/at91_pmc.h>
24 24
25#include "at91_aic.h" 25#include "at91_aic.h"
26#include "at91_rstc.h" 26#include "at91_rstc.h"
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index 23ba1d8a1531..6276b4c1acfe 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -11,6 +11,7 @@
11 */ 11 */
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/clk/at91_pmc.h>
14 15
15#include <asm/proc-fns.h> 16#include <asm/proc-fns.h>
16#include <asm/irq.h> 17#include <asm/irq.h>
@@ -19,7 +20,6 @@
19#include <asm/system_misc.h> 20#include <asm/system_misc.h>
20#include <mach/cpu.h> 21#include <mach/cpu.h>
21#include <mach/at91sam9261.h> 22#include <mach/at91sam9261.h>
22#include <mach/at91_pmc.h>
23 23
24#include "at91_aic.h" 24#include "at91_aic.h"
25#include "at91_rstc.h" 25#include "at91_rstc.h"
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index 7eccb0fc57bc..37b90f4b990c 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -11,6 +11,7 @@
11 */ 11 */
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/clk/at91_pmc.h>
14 15
15#include <asm/proc-fns.h> 16#include <asm/proc-fns.h>
16#include <asm/irq.h> 17#include <asm/irq.h>
@@ -18,7 +19,6 @@
18#include <asm/mach/map.h> 19#include <asm/mach/map.h>
19#include <asm/system_misc.h> 20#include <asm/system_misc.h>
20#include <mach/at91sam9263.h> 21#include <mach/at91sam9263.h>
21#include <mach/at91_pmc.h>
22 22
23#include "at91_aic.h" 23#include "at91_aic.h"
24#include "at91_rstc.h" 24#include "at91_rstc.h"
diff --git a/arch/arm/mach-at91/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c
index bb392320a0dd..0f04ffe9c5a8 100644
--- a/arch/arm/mach-at91/at91sam926x_time.c
+++ b/arch/arm/mach-at91/at91sam926x_time.c
@@ -39,6 +39,7 @@
39static u32 pit_cycle; /* write-once */ 39static u32 pit_cycle; /* write-once */
40static u32 pit_cnt; /* access only w/system irq blocked */ 40static u32 pit_cnt; /* access only w/system irq blocked */
41static void __iomem *pit_base_addr __read_mostly; 41static void __iomem *pit_base_addr __read_mostly;
42static struct clk *mck;
42 43
43static inline unsigned int pit_read(unsigned int reg_offset) 44static inline unsigned int pit_read(unsigned int reg_offset)
44{ 45{
@@ -195,10 +196,14 @@ static int __init of_at91sam926x_pit_init(void)
195 if (!pit_base_addr) 196 if (!pit_base_addr)
196 goto node_err; 197 goto node_err;
197 198
199 mck = of_clk_get(np, 0);
200
198 /* Get the interrupts property */ 201 /* Get the interrupts property */
199 ret = irq_of_parse_and_map(np, 0); 202 ret = irq_of_parse_and_map(np, 0);
200 if (!ret) { 203 if (!ret) {
201 pr_crit("AT91: PIT: Unable to get IRQ from DT\n"); 204 pr_crit("AT91: PIT: Unable to get IRQ from DT\n");
205 if (!IS_ERR(mck))
206 clk_put(mck);
202 goto ioremap_err; 207 goto ioremap_err;
203 } 208 }
204 at91sam926x_pit_irq.irq = ret; 209 at91sam926x_pit_irq.irq = ret;
@@ -230,6 +235,8 @@ void __init at91sam926x_pit_init(void)
230 unsigned bits; 235 unsigned bits;
231 int ret; 236 int ret;
232 237
238 mck = ERR_PTR(-ENOENT);
239
233 /* For device tree enabled device: initialize here */ 240 /* For device tree enabled device: initialize here */
234 of_at91sam926x_pit_init(); 241 of_at91sam926x_pit_init();
235 242
@@ -237,7 +244,12 @@ void __init at91sam926x_pit_init(void)
237 * Use our actual MCK to figure out how many MCK/16 ticks per 244 * Use our actual MCK to figure out how many MCK/16 ticks per
238 * 1/HZ period (instead of a compile-time constant LATCH). 245 * 1/HZ period (instead of a compile-time constant LATCH).
239 */ 246 */
240 pit_rate = clk_get_rate(clk_get(NULL, "mck")) / 16; 247 if (IS_ERR(mck))
248 mck = clk_get(NULL, "mck");
249
250 if (IS_ERR(mck))
251 panic("AT91: PIT: Unable to get mck clk\n");
252 pit_rate = clk_get_rate(mck) / 16;
241 pit_cycle = (pit_rate + HZ/2) / HZ; 253 pit_cycle = (pit_rate + HZ/2) / HZ;
242 WARN_ON(((pit_cycle - 1) & ~AT91_PIT_PIV) != 0); 254 WARN_ON(((pit_cycle - 1) & ~AT91_PIT_PIV) != 0);
243 255
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 9405aa08b104..2f455ce35268 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -12,13 +12,13 @@
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/dma-mapping.h> 14#include <linux/dma-mapping.h>
15#include <linux/clk/at91_pmc.h>
15 16
16#include <asm/irq.h> 17#include <asm/irq.h>
17#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
18#include <asm/mach/map.h> 19#include <asm/mach/map.h>
19#include <asm/system_misc.h> 20#include <asm/system_misc.h>
20#include <mach/at91sam9g45.h> 21#include <mach/at91sam9g45.h>
21#include <mach/at91_pmc.h>
22#include <mach/cpu.h> 22#include <mach/cpu.h>
23 23
24#include "at91_aic.h" 24#include "at91_aic.h"
diff --git a/arch/arm/mach-at91/at91sam9n12.c b/arch/arm/mach-at91/at91sam9n12.c
index 388ec3aec4b9..4ef088c62eab 100644
--- a/arch/arm/mach-at91/at91sam9n12.c
+++ b/arch/arm/mach-at91/at91sam9n12.c
@@ -8,12 +8,12 @@
8 8
9#include <linux/module.h> 9#include <linux/module.h>
10#include <linux/dma-mapping.h> 10#include <linux/dma-mapping.h>
11#include <linux/clk/at91_pmc.h>
11 12
12#include <asm/irq.h> 13#include <asm/irq.h>
13#include <asm/mach/arch.h> 14#include <asm/mach/arch.h>
14#include <asm/mach/map.h> 15#include <asm/mach/map.h>
15#include <mach/at91sam9n12.h> 16#include <mach/at91sam9n12.h>
16#include <mach/at91_pmc.h>
17#include <mach/cpu.h> 17#include <mach/cpu.h>
18 18
19#include "board.h" 19#include "board.h"
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
index 0750ffb7e6b1..3651517abedf 100644
--- a/arch/arm/mach-at91/at91sam9rl.c
+++ b/arch/arm/mach-at91/at91sam9rl.c
@@ -10,6 +10,7 @@
10 */ 10 */
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/clk/at91_pmc.h>
13 14
14#include <asm/proc-fns.h> 15#include <asm/proc-fns.h>
15#include <asm/irq.h> 16#include <asm/irq.h>
@@ -19,7 +20,6 @@
19#include <mach/cpu.h> 20#include <mach/cpu.h>
20#include <mach/at91_dbgu.h> 21#include <mach/at91_dbgu.h>
21#include <mach/at91sam9rl.h> 22#include <mach/at91sam9rl.h>
22#include <mach/at91_pmc.h>
23 23
24#include "at91_aic.h" 24#include "at91_aic.h"
25#include "at91_rstc.h" 25#include "at91_rstc.h"
diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c
index e8a2e075a1b8..3e8ec26e39dc 100644
--- a/arch/arm/mach-at91/at91sam9x5.c
+++ b/arch/arm/mach-at91/at91sam9x5.c
@@ -8,12 +8,12 @@
8 8
9#include <linux/module.h> 9#include <linux/module.h>
10#include <linux/dma-mapping.h> 10#include <linux/dma-mapping.h>
11#include <linux/clk/at91_pmc.h>
11 12
12#include <asm/irq.h> 13#include <asm/irq.h>
13#include <asm/mach/arch.h> 14#include <asm/mach/arch.h>
14#include <asm/mach/map.h> 15#include <asm/mach/map.h>
15#include <mach/at91sam9x5.h> 16#include <mach/at91sam9x5.h>
16#include <mach/at91_pmc.h>
17#include <mach/cpu.h> 17#include <mach/cpu.h>
18 18
19#include "board.h" 19#include "board.h"
diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c
index bf00d15d954d..075ec0576ada 100644
--- a/arch/arm/mach-at91/board-dt-sama5.c
+++ b/arch/arm/mach-at91/board-dt-sama5.c
@@ -16,6 +16,7 @@
16#include <linux/of_irq.h> 16#include <linux/of_irq.h>
17#include <linux/of_platform.h> 17#include <linux/of_platform.h>
18#include <linux/phy.h> 18#include <linux/phy.h>
19#include <linux/clk-provider.h>
19 20
20#include <asm/setup.h> 21#include <asm/setup.h>
21#include <asm/irq.h> 22#include <asm/irq.h>
@@ -26,6 +27,13 @@
26#include "at91_aic.h" 27#include "at91_aic.h"
27#include "generic.h" 28#include "generic.h"
28 29
30static void __init sama5_dt_timer_init(void)
31{
32#if defined(CONFIG_COMMON_CLK)
33 of_clk_init(NULL);
34#endif
35 at91sam926x_pit_init();
36}
29 37
30static const struct of_device_id irq_of_match[] __initconst = { 38static const struct of_device_id irq_of_match[] __initconst = {
31 39
@@ -72,7 +80,7 @@ static const char *sama5_dt_board_compat[] __initdata = {
72 80
73DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)") 81DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)")
74 /* Maintainer: Atmel */ 82 /* Maintainer: Atmel */
75 .init_time = at91sam926x_pit_init, 83 .init_time = sama5_dt_timer_init,
76 .map_io = at91_map_io, 84 .map_io = at91_map_io,
77 .handle_irq = at91_aic5_handle_irq, 85 .handle_irq = at91_aic5_handle_irq,
78 .init_early = at91_dt_initialize, 86 .init_early = at91_dt_initialize,
diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c
deleted file mode 100644
index aa3bc9b0f150..000000000000
--- a/arch/arm/mach-at91/board-qil-a9260.c
+++ /dev/null
@@ -1,266 +0,0 @@
1/*
2 * linux/arch/arm/mach-at91/board-qil-a9260.c
3 *
4 * Copyright (C) 2005 SAN People
5 * Copyright (C) 2006 Atmel
6 * Copyright (C) 2007 Calao-systems
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 as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#include <linux/types.h>
24#include <linux/gpio.h>
25#include <linux/init.h>
26#include <linux/mm.h>
27#include <linux/module.h>
28#include <linux/platform_device.h>
29#include <linux/spi/spi.h>
30#include <linux/gpio_keys.h>
31#include <linux/input.h>
32#include <linux/clk.h>
33
34#include <asm/setup.h>
35#include <asm/mach-types.h>
36#include <asm/irq.h>
37
38#include <asm/mach/arch.h>
39#include <asm/mach/map.h>
40#include <asm/mach/irq.h>
41
42#include <mach/hardware.h>
43#include <mach/at91sam9_smc.h>
44
45#include "at91_aic.h"
46#include "at91_shdwc.h"
47#include "board.h"
48#include "sam9_smc.h"
49#include "generic.h"
50
51
52static void __init ek_init_early(void)
53{
54 /* Initialize processor: 12.000 MHz crystal */
55 at91_initialize(12000000);
56}
57
58/*
59 * USB Host port
60 */
61static struct at91_usbh_data __initdata ek_usbh_data = {
62 .ports = 2,
63 .vbus_pin = {-EINVAL, -EINVAL},
64 .overcurrent_pin= {-EINVAL, -EINVAL},
65};
66
67/*
68 * USB Device port
69 */
70static struct at91_udc_data __initdata ek_udc_data = {
71 .vbus_pin = AT91_PIN_PC5,
72 .pullup_pin = -EINVAL, /* pull-up driven by UDC */
73};
74
75/*
76 * SPI devices.
77 */
78static struct spi_board_info ek_spi_devices[] = {
79#if defined(CONFIG_RTC_DRV_M41T94)
80 { /* M41T94 RTC */
81 .modalias = "m41t94",
82 .chip_select = 0,
83 .max_speed_hz = 1 * 1000 * 1000,
84 .bus_num = 0,
85 }
86#endif
87};
88
89/*
90 * MACB Ethernet device
91 */
92static struct macb_platform_data __initdata ek_macb_data = {
93 .phy_irq_pin = AT91_PIN_PA31,
94 .is_rmii = 1,
95};
96
97/*
98 * NAND flash
99 */
100static struct mtd_partition __initdata ek_nand_partition[] = {
101 {
102 .name = "Uboot & Kernel",
103 .offset = 0,
104 .size = SZ_16M,
105 },
106 {
107 .name = "Root FS",
108 .offset = MTDPART_OFS_NXTBLK,
109 .size = 120 * SZ_1M,
110 },
111 {
112 .name = "FS",
113 .offset = MTDPART_OFS_NXTBLK,
114 .size = 120 * SZ_1M,
115 },
116};
117
118static struct atmel_nand_data __initdata ek_nand_data = {
119 .ale = 21,
120 .cle = 22,
121 .det_pin = -EINVAL,
122 .rdy_pin = AT91_PIN_PC13,
123 .enable_pin = AT91_PIN_PC14,
124 .ecc_mode = NAND_ECC_SOFT,
125 .on_flash_bbt = 1,
126 .parts = ek_nand_partition,
127 .num_parts = ARRAY_SIZE(ek_nand_partition),
128};
129
130static struct sam9_smc_config __initdata ek_nand_smc_config = {
131 .ncs_read_setup = 0,
132 .nrd_setup = 1,
133 .ncs_write_setup = 0,
134 .nwe_setup = 1,
135
136 .ncs_read_pulse = 3,
137 .nrd_pulse = 3,
138 .ncs_write_pulse = 3,
139 .nwe_pulse = 3,
140
141 .read_cycle = 5,
142 .write_cycle = 5,
143
144 .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8,
145 .tdf_cycles = 2,
146};
147
148static void __init ek_add_device_nand(void)
149{
150 /* configure chip-select 3 (NAND) */
151 sam9_smc_configure(0, 3, &ek_nand_smc_config);
152
153 at91_add_device_nand(&ek_nand_data);
154}
155
156/*
157 * MCI (SD/MMC)
158 */
159static struct mci_platform_data __initdata ek_mci0_data = {
160 .slot[0] = {
161 .bus_width = 4,
162 .detect_pin = -EINVAL,
163 .wp_pin = -EINVAL,
164 },
165};
166
167/*
168 * GPIO Buttons
169 */
170#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
171static struct gpio_keys_button ek_buttons[] = {
172 { /* USER PUSH BUTTON */
173 .code = KEY_ENTER,
174 .gpio = AT91_PIN_PB10,
175 .active_low = 1,
176 .desc = "user_pb",
177 .wakeup = 1,
178 }
179};
180
181static struct gpio_keys_platform_data ek_button_data = {
182 .buttons = ek_buttons,
183 .nbuttons = ARRAY_SIZE(ek_buttons),
184};
185
186static struct platform_device ek_button_device = {
187 .name = "gpio-keys",
188 .id = -1,
189 .num_resources = 0,
190 .dev = {
191 .platform_data = &ek_button_data,
192 }
193};
194
195static void __init ek_add_device_buttons(void)
196{
197 at91_set_GPIO_periph(AT91_PIN_PB10, 1); /* user push button, pull up enabled */
198 at91_set_deglitch(AT91_PIN_PB10, 1);
199
200 platform_device_register(&ek_button_device);
201}
202#else
203static void __init ek_add_device_buttons(void) {}
204#endif
205
206/*
207 * LEDs
208 */
209static struct gpio_led ek_leds[] = {
210 { /* user_led (green) */
211 .name = "user_led",
212 .gpio = AT91_PIN_PB21,
213 .active_low = 0,
214 .default_trigger = "heartbeat",
215 }
216};
217
218static void __init ek_board_init(void)
219{
220 /* Serial */
221 /* DBGU on ttyS0. (Rx & Tx only) */
222 at91_register_uart(0, 0, 0);
223
224 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
225 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
226 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
227 | ATMEL_UART_RI);
228
229 /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
230 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
231
232 /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */
233 at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
234 at91_add_device_serial();
235 /* USB Host */
236 at91_add_device_usbh(&ek_usbh_data);
237 /* USB Device */
238 at91_add_device_udc(&ek_udc_data);
239 /* SPI */
240 at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
241 /* NAND */
242 ek_add_device_nand();
243 /* I2C */
244 at91_add_device_i2c(NULL, 0);
245 /* Ethernet */
246 at91_add_device_eth(&ek_macb_data);
247 /* MMC */
248 at91_add_device_mci(0, &ek_mci0_data);
249 /* Push Buttons */
250 ek_add_device_buttons();
251 /* LEDs */
252 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
253 /* shutdown controller, wakeup button (5 msec low) */
254 at91_shdwc_write(AT91_SHDW_MR, AT91_SHDW_CPTWK0_(10) | AT91_SHDW_WKMODE0_LOW
255 | AT91_SHDW_RTTWKEN);
256}
257
258MACHINE_START(QIL_A9260, "CALAO QIL_A9260")
259 /* Maintainer: calao-systems */
260 .init_time = at91sam926x_pit_init,
261 .map_io = at91_map_io,
262 .handle_irq = at91_aic_handle_irq,
263 .init_early = ek_init_early,
264 .init_irq = at91_init_irq_default,
265 .init_machine = ek_board_init,
266MACHINE_END
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index 6b2630a92f71..034529d801b2 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -24,9 +24,9 @@
24#include <linux/clk.h> 24#include <linux/clk.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/of_address.h> 26#include <linux/of_address.h>
27#include <linux/clk/at91_pmc.h>
27 28
28#include <mach/hardware.h> 29#include <mach/hardware.h>
29#include <mach/at91_pmc.h>
30#include <mach/cpu.h> 30#include <mach/cpu.h>
31 31
32#include <asm/proc-fns.h> 32#include <asm/proc-fns.h>
@@ -330,8 +330,6 @@ EXPORT_SYMBOL(clk_get_rate);
330 330
331/*------------------------------------------------------------------------*/ 331/*------------------------------------------------------------------------*/
332 332
333#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
334
335/* 333/*
336 * For now, only the programmable clocks support reparenting (MCK could 334 * For now, only the programmable clocks support reparenting (MCK could
337 * do this too, with care) or rate changing (the PLLs could do this too, 335 * do this too, with care) or rate changing (the PLLs could do this too,
@@ -459,8 +457,6 @@ static void __init init_programmable_clock(struct clk *clk)
459 clk->rate_hz = parent->rate_hz / pmc_prescaler_divider(pckr); 457 clk->rate_hz = parent->rate_hz / pmc_prescaler_divider(pckr);
460} 458}
461 459
462#endif /* CONFIG_AT91_PROGRAMMABLE_CLOCKS */
463
464/*------------------------------------------------------------------------*/ 460/*------------------------------------------------------------------------*/
465 461
466#ifdef CONFIG_DEBUG_FS 462#ifdef CONFIG_DEBUG_FS
@@ -577,12 +573,10 @@ int __init clk_register(struct clk *clk)
577 clk->parent = &mck; 573 clk->parent = &mck;
578 clk->mode = pmc_sys_mode; 574 clk->mode = pmc_sys_mode;
579 } 575 }
580#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
581 else if (clk_is_programmable(clk)) { 576 else if (clk_is_programmable(clk)) {
582 clk->mode = pmc_sys_mode; 577 clk->mode = pmc_sys_mode;
583 init_programmable_clock(clk); 578 init_programmable_clock(clk);
584 } 579 }
585#endif
586 580
587 at91_clk_add(clk); 581 at91_clk_add(clk);
588 582
@@ -884,6 +878,11 @@ static int __init at91_pmc_init(unsigned long main_clock)
884#if defined(CONFIG_OF) 878#if defined(CONFIG_OF)
885static struct of_device_id pmc_ids[] = { 879static struct of_device_id pmc_ids[] = {
886 { .compatible = "atmel,at91rm9200-pmc" }, 880 { .compatible = "atmel,at91rm9200-pmc" },
881 { .compatible = "atmel,at91sam9260-pmc" },
882 { .compatible = "atmel,at91sam9g45-pmc" },
883 { .compatible = "atmel,at91sam9n12-pmc" },
884 { .compatible = "atmel,at91sam9x5-pmc" },
885 { .compatible = "atmel,sama5d3-pmc" },
887 { /*sentinel*/ } 886 { /*sentinel*/ }
888}; 887};
889 888
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h
index 26dee3ce9397..631fa3b8c16d 100644
--- a/arch/arm/mach-at91/generic.h
+++ b/arch/arm/mach-at91/generic.h
@@ -46,11 +46,12 @@ extern void at91sam926x_pit_init(void);
46extern void at91x40_timer_init(void); 46extern void at91x40_timer_init(void);
47 47
48 /* Clocks */ 48 /* Clocks */
49#ifdef CONFIG_AT91_PMC_UNIT 49#ifdef CONFIG_OLD_CLK_AT91
50extern int __init at91_clock_init(unsigned long main_clock); 50extern int __init at91_clock_init(unsigned long main_clock);
51extern int __init at91_dt_clock_init(void); 51extern int __init at91_dt_clock_init(void);
52#else 52#else
53static int inline at91_clock_init(unsigned long main_clock) { return 0; } 53static int inline at91_clock_init(unsigned long main_clock) { return 0; }
54static int inline at91_dt_clock_init(void) { return 0; }
54#endif 55#endif
55struct device; 56struct device;
56 57
diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h b/arch/arm/mach-at91/include/mach/at91_pmc.h
deleted file mode 100644
index c604cc69acb5..000000000000
--- a/arch/arm/mach-at91/include/mach/at91_pmc.h
+++ /dev/null
@@ -1,190 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_pmc.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Power Management Controller (PMC) - System peripherals 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_PMC_H
17#define AT91_PMC_H
18
19#ifndef __ASSEMBLY__
20extern void __iomem *at91_pmc_base;
21
22#define at91_pmc_read(field) \
23 __raw_readl(at91_pmc_base + field)
24
25#define at91_pmc_write(field, value) \
26 __raw_writel(value, at91_pmc_base + field)
27#else
28.extern at91_pmc_base
29#endif
30
31#define AT91_PMC_SCER 0x00 /* System Clock Enable Register */
32#define AT91_PMC_SCDR 0x04 /* System Clock Disable Register */
33
34#define AT91_PMC_SCSR 0x08 /* System Clock Status Register */
35#define AT91_PMC_PCK (1 << 0) /* Processor Clock */
36#define AT91RM9200_PMC_UDP (1 << 1) /* USB Devcice Port Clock [AT91RM9200 only] */
37#define AT91RM9200_PMC_MCKUDP (1 << 2) /* USB Device Port Master Clock Automatic Disable on Suspend [AT91RM9200 only] */
38#define AT91RM9200_PMC_UHP (1 << 4) /* USB Host Port Clock [AT91RM9200 only] */
39#define AT91SAM926x_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91SAM926x only] */
40#define AT91SAM926x_PMC_UDP (1 << 7) /* USB Devcice Port Clock [AT91SAM926x only] */
41#define AT91_PMC_PCK0 (1 << 8) /* Programmable Clock 0 */
42#define AT91_PMC_PCK1 (1 << 9) /* Programmable Clock 1 */
43#define AT91_PMC_PCK2 (1 << 10) /* Programmable Clock 2 */
44#define AT91_PMC_PCK3 (1 << 11) /* Programmable Clock 3 */
45#define AT91_PMC_PCK4 (1 << 12) /* Programmable Clock 4 [AT572D940HF only] */
46#define AT91_PMC_HCK0 (1 << 16) /* AHB Clock (USB host) [AT91SAM9261 only] */
47#define AT91_PMC_HCK1 (1 << 17) /* AHB Clock (LCD) [AT91SAM9261 only] */
48
49#define AT91_PMC_PCER 0x10 /* Peripheral Clock Enable Register */
50#define AT91_PMC_PCDR 0x14 /* Peripheral Clock Disable Register */
51#define AT91_PMC_PCSR 0x18 /* Peripheral Clock Status Register */
52
53#define AT91_CKGR_UCKR 0x1C /* UTMI Clock Register [some SAM9] */
54#define AT91_PMC_UPLLEN (1 << 16) /* UTMI PLL Enable */
55#define AT91_PMC_UPLLCOUNT (0xf << 20) /* UTMI PLL Start-up Time */
56#define AT91_PMC_BIASEN (1 << 24) /* UTMI BIAS Enable */
57#define AT91_PMC_BIASCOUNT (0xf << 28) /* UTMI BIAS Start-up Time */
58
59#define AT91_CKGR_MOR 0x20 /* Main Oscillator Register [not on SAM9RL] */
60#define AT91_PMC_MOSCEN (1 << 0) /* Main Oscillator Enable */
61#define AT91_PMC_OSCBYPASS (1 << 1) /* Oscillator Bypass */
62#define AT91_PMC_MOSCRCEN (1 << 3) /* Main On-Chip RC Oscillator Enable [some SAM9] */
63#define AT91_PMC_OSCOUNT (0xff << 8) /* Main Oscillator Start-up Time */
64#define AT91_PMC_KEY (0x37 << 16) /* MOR Writing Key */
65#define AT91_PMC_MOSCSEL (1 << 24) /* Main Oscillator Selection [some SAM9] */
66#define AT91_PMC_CFDEN (1 << 25) /* Clock Failure Detector Enable [some SAM9] */
67
68#define AT91_CKGR_MCFR 0x24 /* Main Clock Frequency Register */
69#define AT91_PMC_MAINF (0xffff << 0) /* Main Clock Frequency */
70#define AT91_PMC_MAINRDY (1 << 16) /* Main Clock Ready */
71
72#define AT91_CKGR_PLLAR 0x28 /* PLL A Register */
73#define AT91_CKGR_PLLBR 0x2c /* PLL B Register */
74#define AT91_PMC_DIV (0xff << 0) /* Divider */
75#define AT91_PMC_PLLCOUNT (0x3f << 8) /* PLL Counter */
76#define AT91_PMC_OUT (3 << 14) /* PLL Clock Frequency Range */
77#define AT91_PMC_MUL (0x7ff << 16) /* PLL Multiplier */
78#define AT91_PMC_MUL_GET(n) ((n) >> 16 & 0x7ff)
79#define AT91_PMC3_MUL (0x7f << 18) /* PLL Multiplier [SAMA5 only] */
80#define AT91_PMC3_MUL_GET(n) ((n) >> 18 & 0x7f)
81#define AT91_PMC_USBDIV (3 << 28) /* USB Divisor (PLLB only) */
82#define AT91_PMC_USBDIV_1 (0 << 28)
83#define AT91_PMC_USBDIV_2 (1 << 28)
84#define AT91_PMC_USBDIV_4 (2 << 28)
85#define AT91_PMC_USB96M (1 << 28) /* Divider by 2 Enable (PLLB only) */
86
87#define AT91_PMC_MCKR 0x30 /* Master Clock Register */
88#define AT91_PMC_CSS (3 << 0) /* Master Clock Selection */
89#define AT91_PMC_CSS_SLOW (0 << 0)
90#define AT91_PMC_CSS_MAIN (1 << 0)
91#define AT91_PMC_CSS_PLLA (2 << 0)
92#define AT91_PMC_CSS_PLLB (3 << 0)
93#define AT91_PMC_CSS_UPLL (3 << 0) /* [some SAM9 only] */
94#define PMC_PRES_OFFSET 2
95#define AT91_PMC_PRES (7 << PMC_PRES_OFFSET) /* Master Clock Prescaler */
96#define AT91_PMC_PRES_1 (0 << PMC_PRES_OFFSET)
97#define AT91_PMC_PRES_2 (1 << PMC_PRES_OFFSET)
98#define AT91_PMC_PRES_4 (2 << PMC_PRES_OFFSET)
99#define AT91_PMC_PRES_8 (3 << PMC_PRES_OFFSET)
100#define AT91_PMC_PRES_16 (4 << PMC_PRES_OFFSET)
101#define AT91_PMC_PRES_32 (5 << PMC_PRES_OFFSET)
102#define AT91_PMC_PRES_64 (6 << PMC_PRES_OFFSET)
103#define PMC_ALT_PRES_OFFSET 4
104#define AT91_PMC_ALT_PRES (7 << PMC_ALT_PRES_OFFSET) /* Master Clock Prescaler [alternate location] */
105#define AT91_PMC_ALT_PRES_1 (0 << PMC_ALT_PRES_OFFSET)
106#define AT91_PMC_ALT_PRES_2 (1 << PMC_ALT_PRES_OFFSET)
107#define AT91_PMC_ALT_PRES_4 (2 << PMC_ALT_PRES_OFFSET)
108#define AT91_PMC_ALT_PRES_8 (3 << PMC_ALT_PRES_OFFSET)
109#define AT91_PMC_ALT_PRES_16 (4 << PMC_ALT_PRES_OFFSET)
110#define AT91_PMC_ALT_PRES_32 (5 << PMC_ALT_PRES_OFFSET)
111#define AT91_PMC_ALT_PRES_64 (6 << PMC_ALT_PRES_OFFSET)
112#define AT91_PMC_MDIV (3 << 8) /* Master Clock Division */
113#define AT91RM9200_PMC_MDIV_1 (0 << 8) /* [AT91RM9200 only] */
114#define AT91RM9200_PMC_MDIV_2 (1 << 8)
115#define AT91RM9200_PMC_MDIV_3 (2 << 8)
116#define AT91RM9200_PMC_MDIV_4 (3 << 8)
117#define AT91SAM9_PMC_MDIV_1 (0 << 8) /* [SAM9 only] */
118#define AT91SAM9_PMC_MDIV_2 (1 << 8)
119#define AT91SAM9_PMC_MDIV_4 (2 << 8)
120#define AT91SAM9_PMC_MDIV_6 (3 << 8) /* [some SAM9 only] */
121#define AT91SAM9_PMC_MDIV_3 (3 << 8) /* [some SAM9 only] */
122#define AT91_PMC_PDIV (1 << 12) /* Processor Clock Division [some SAM9 only] */
123#define AT91_PMC_PDIV_1 (0 << 12)
124#define AT91_PMC_PDIV_2 (1 << 12)
125#define AT91_PMC_PLLADIV2 (1 << 12) /* PLLA divisor by 2 [some SAM9 only] */
126#define AT91_PMC_PLLADIV2_OFF (0 << 12)
127#define AT91_PMC_PLLADIV2_ON (1 << 12)
128
129#define AT91_PMC_USB 0x38 /* USB Clock Register [some SAM9 only] */
130#define AT91_PMC_USBS (0x1 << 0) /* USB OHCI Input clock selection */
131#define AT91_PMC_USBS_PLLA (0 << 0)
132#define AT91_PMC_USBS_UPLL (1 << 0)
133#define AT91_PMC_USBS_PLLB (1 << 0) /* [AT91SAMN12 only] */
134#define AT91_PMC_OHCIUSBDIV (0xF << 8) /* Divider for USB OHCI Clock */
135#define AT91_PMC_OHCIUSBDIV_1 (0x0 << 8)
136#define AT91_PMC_OHCIUSBDIV_2 (0x1 << 8)
137
138#define AT91_PMC_SMD 0x3c /* Soft Modem Clock Register [some SAM9 only] */
139#define AT91_PMC_SMDS (0x1 << 0) /* SMD input clock selection */
140#define AT91_PMC_SMD_DIV (0x1f << 8) /* SMD input clock divider */
141#define AT91_PMC_SMDDIV(n) (((n) << 8) & AT91_PMC_SMD_DIV)
142
143#define AT91_PMC_PCKR(n) (0x40 + ((n) * 4)) /* Programmable Clock 0-N Registers */
144#define AT91_PMC_ALT_PCKR_CSS (0x7 << 0) /* Programmable Clock Source Selection [alternate length] */
145#define AT91_PMC_CSS_MASTER (4 << 0) /* [some SAM9 only] */
146#define AT91_PMC_CSSMCK (0x1 << 8) /* CSS or Master Clock Selection */
147#define AT91_PMC_CSSMCK_CSS (0 << 8)
148#define AT91_PMC_CSSMCK_MCK (1 << 8)
149
150#define AT91_PMC_IER 0x60 /* Interrupt Enable Register */
151#define AT91_PMC_IDR 0x64 /* Interrupt Disable Register */
152#define AT91_PMC_SR 0x68 /* Status Register */
153#define AT91_PMC_MOSCS (1 << 0) /* MOSCS Flag */
154#define AT91_PMC_LOCKA (1 << 1) /* PLLA Lock */
155#define AT91_PMC_LOCKB (1 << 2) /* PLLB Lock */
156#define AT91_PMC_MCKRDY (1 << 3) /* Master Clock */
157#define AT91_PMC_LOCKU (1 << 6) /* UPLL Lock [some SAM9] */
158#define AT91_PMC_PCK0RDY (1 << 8) /* Programmable Clock 0 */
159#define AT91_PMC_PCK1RDY (1 << 9) /* Programmable Clock 1 */
160#define AT91_PMC_PCK2RDY (1 << 10) /* Programmable Clock 2 */
161#define AT91_PMC_PCK3RDY (1 << 11) /* Programmable Clock 3 */
162#define AT91_PMC_MOSCSELS (1 << 16) /* Main Oscillator Selection [some SAM9] */
163#define AT91_PMC_MOSCRCS (1 << 17) /* Main On-Chip RC [some SAM9] */
164#define AT91_PMC_CFDEV (1 << 18) /* Clock Failure Detector Event [some SAM9] */
165#define AT91_PMC_IMR 0x6c /* Interrupt Mask Register */
166
167#define AT91_PMC_PROT 0xe4 /* Write Protect Mode Register [some SAM9] */
168#define AT91_PMC_WPEN (0x1 << 0) /* Write Protect Enable */
169#define AT91_PMC_WPKEY (0xffffff << 8) /* Write Protect Key */
170#define AT91_PMC_PROTKEY (0x504d43 << 8) /* Activation Code */
171
172#define AT91_PMC_WPSR 0xe8 /* Write Protect Status Register [some SAM9] */
173#define AT91_PMC_WPVS (0x1 << 0) /* Write Protect Violation Status */
174#define AT91_PMC_WPVSRC (0xffff << 8) /* Write Protect Violation Source */
175
176#define AT91_PMC_PCER1 0x100 /* Peripheral Clock Enable Register 1 [SAMA5 only]*/
177#define AT91_PMC_PCDR1 0x104 /* Peripheral Clock Enable Register 1 */
178#define AT91_PMC_PCSR1 0x108 /* Peripheral Clock Enable Register 1 */
179
180#define AT91_PMC_PCR 0x10c /* Peripheral Control Register [some SAM9 and SAMA5] */
181#define AT91_PMC_PCR_PID (0x3f << 0) /* Peripheral ID */
182#define AT91_PMC_PCR_CMD (0x1 << 12) /* Command (read=0, write=1) */
183#define AT91_PMC_PCR_DIV(n) ((n) << 16) /* Divisor Value */
184#define AT91_PMC_PCR_DIV0 0x0 /* Peripheral clock is MCK */
185#define AT91_PMC_PCR_DIV2 0x1 /* Peripheral clock is MCK/2 */
186#define AT91_PMC_PCR_DIV4 0x2 /* Peripheral clock is MCK/4 */
187#define AT91_PMC_PCR_DIV8 0x3 /* Peripheral clock is MCK/8 */
188#define AT91_PMC_PCR_EN (0x1 << 28) /* Enable */
189
190#endif
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 9986542e8060..590b52dea9f7 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -19,13 +19,13 @@
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/clk/at91_pmc.h>
22 23
23#include <asm/irq.h> 24#include <asm/irq.h>
24#include <linux/atomic.h> 25#include <linux/atomic.h>
25#include <asm/mach/time.h> 26#include <asm/mach/time.h>
26#include <asm/mach/irq.h> 27#include <asm/mach/irq.h>
27 28
28#include <mach/at91_pmc.h>
29#include <mach/cpu.h> 29#include <mach/cpu.h>
30 30
31#include "at91_aic.h" 31#include "at91_aic.h"
@@ -155,9 +155,6 @@ static int at91_pm_verify_clocks(void)
155 } 155 }
156 } 156 }
157 157
158 if (!IS_ENABLED(CONFIG_AT91_PROGRAMMABLE_CLOCKS))
159 return 1;
160
161 /* PCK0..PCK3 must be disabled, or configured to use clk32k */ 158 /* PCK0..PCK3 must be disabled, or configured to use clk32k */
162 for (i = 0; i < 4; i++) { 159 for (i = 0; i < 4; i++) {
163 u32 css; 160 u32 css;
diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S
index 098c28ddf025..20018779bae7 100644
--- a/arch/arm/mach-at91/pm_slowclock.S
+++ b/arch/arm/mach-at91/pm_slowclock.S
@@ -13,8 +13,8 @@
13 */ 13 */
14 14
15#include <linux/linkage.h> 15#include <linux/linkage.h>
16#include <linux/clk/at91_pmc.h>
16#include <mach/hardware.h> 17#include <mach/hardware.h>
17#include <mach/at91_pmc.h>
18#include <mach/at91_ramc.h> 18#include <mach/at91_ramc.h>
19 19
20 20
diff --git a/arch/arm/mach-at91/sama5d3.c b/arch/arm/mach-at91/sama5d3.c
index a28873fe3049..3d775d08de08 100644
--- a/arch/arm/mach-at91/sama5d3.c
+++ b/arch/arm/mach-at91/sama5d3.c
@@ -9,360 +9,19 @@
9 9
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/dma-mapping.h> 11#include <linux/dma-mapping.h>
12#include <linux/clk/at91_pmc.h>
12 13
13#include <asm/irq.h> 14#include <asm/irq.h>
14#include <asm/mach/arch.h> 15#include <asm/mach/arch.h>
15#include <asm/mach/map.h> 16#include <asm/mach/map.h>
16#include <mach/sama5d3.h> 17#include <mach/sama5d3.h>
17#include <mach/at91_pmc.h>
18#include <mach/cpu.h> 18#include <mach/cpu.h>
19 19
20#include "soc.h" 20#include "soc.h"
21#include "generic.h" 21#include "generic.h"
22#include "clock.h"
23#include "sam9_smc.h" 22#include "sam9_smc.h"
24 23
25/* -------------------------------------------------------------------- 24/* --------------------------------------------------------------------
26 * Clocks
27 * -------------------------------------------------------------------- */
28
29/*
30 * The peripheral clocks.
31 */
32
33static struct clk pioA_clk = {
34 .name = "pioA_clk",
35 .pid = SAMA5D3_ID_PIOA,
36 .type = CLK_TYPE_PERIPHERAL,
37};
38static struct clk pioB_clk = {
39 .name = "pioB_clk",
40 .pid = SAMA5D3_ID_PIOB,
41 .type = CLK_TYPE_PERIPHERAL,
42};
43static struct clk pioC_clk = {
44 .name = "pioC_clk",
45 .pid = SAMA5D3_ID_PIOC,
46 .type = CLK_TYPE_PERIPHERAL,
47};
48static struct clk pioD_clk = {
49 .name = "pioD_clk",
50 .pid = SAMA5D3_ID_PIOD,
51 .type = CLK_TYPE_PERIPHERAL,
52};
53static struct clk pioE_clk = {
54 .name = "pioE_clk",
55 .pid = SAMA5D3_ID_PIOE,
56 .type = CLK_TYPE_PERIPHERAL,
57};
58static struct clk usart0_clk = {
59 .name = "usart0_clk",
60 .pid = SAMA5D3_ID_USART0,
61 .type = CLK_TYPE_PERIPHERAL,
62 .div = AT91_PMC_PCR_DIV2,
63};
64static struct clk usart1_clk = {
65 .name = "usart1_clk",
66 .pid = SAMA5D3_ID_USART1,
67 .type = CLK_TYPE_PERIPHERAL,
68 .div = AT91_PMC_PCR_DIV2,
69};
70static struct clk usart2_clk = {
71 .name = "usart2_clk",
72 .pid = SAMA5D3_ID_USART2,
73 .type = CLK_TYPE_PERIPHERAL,
74 .div = AT91_PMC_PCR_DIV2,
75};
76static struct clk usart3_clk = {
77 .name = "usart3_clk",
78 .pid = SAMA5D3_ID_USART3,
79 .type = CLK_TYPE_PERIPHERAL,
80 .div = AT91_PMC_PCR_DIV2,
81};
82static struct clk uart0_clk = {
83 .name = "uart0_clk",
84 .pid = SAMA5D3_ID_UART0,
85 .type = CLK_TYPE_PERIPHERAL,
86 .div = AT91_PMC_PCR_DIV2,
87};
88static struct clk uart1_clk = {
89 .name = "uart1_clk",
90 .pid = SAMA5D3_ID_UART1,
91 .type = CLK_TYPE_PERIPHERAL,
92 .div = AT91_PMC_PCR_DIV2,
93};
94static struct clk twi0_clk = {
95 .name = "twi0_clk",
96 .pid = SAMA5D3_ID_TWI0,
97 .type = CLK_TYPE_PERIPHERAL,
98 .div = AT91_PMC_PCR_DIV8,
99};
100static struct clk twi1_clk = {
101 .name = "twi1_clk",
102 .pid = SAMA5D3_ID_TWI1,
103 .type = CLK_TYPE_PERIPHERAL,
104 .div = AT91_PMC_PCR_DIV8,
105};
106static struct clk twi2_clk = {
107 .name = "twi2_clk",
108 .pid = SAMA5D3_ID_TWI2,
109 .type = CLK_TYPE_PERIPHERAL,
110 .div = AT91_PMC_PCR_DIV8,
111};
112static struct clk mmc0_clk = {
113 .name = "mci0_clk",
114 .pid = SAMA5D3_ID_HSMCI0,
115 .type = CLK_TYPE_PERIPHERAL,
116};
117static struct clk mmc1_clk = {
118 .name = "mci1_clk",
119 .pid = SAMA5D3_ID_HSMCI1,
120 .type = CLK_TYPE_PERIPHERAL,
121};
122static struct clk mmc2_clk = {
123 .name = "mci2_clk",
124 .pid = SAMA5D3_ID_HSMCI2,
125 .type = CLK_TYPE_PERIPHERAL,
126};
127static struct clk spi0_clk = {
128 .name = "spi0_clk",
129 .pid = SAMA5D3_ID_SPI0,
130 .type = CLK_TYPE_PERIPHERAL,
131};
132static struct clk spi1_clk = {
133 .name = "spi1_clk",
134 .pid = SAMA5D3_ID_SPI1,
135 .type = CLK_TYPE_PERIPHERAL,
136};
137static struct clk tcb0_clk = {
138 .name = "tcb0_clk",
139 .pid = SAMA5D3_ID_TC0,
140 .type = CLK_TYPE_PERIPHERAL,
141 .div = AT91_PMC_PCR_DIV2,
142};
143static struct clk tcb1_clk = {
144 .name = "tcb1_clk",
145 .pid = SAMA5D3_ID_TC1,
146 .type = CLK_TYPE_PERIPHERAL,
147 .div = AT91_PMC_PCR_DIV2,
148};
149static struct clk adc_clk = {
150 .name = "adc_clk",
151 .pid = SAMA5D3_ID_ADC,
152 .type = CLK_TYPE_PERIPHERAL,
153 .div = AT91_PMC_PCR_DIV2,
154};
155static struct clk adc_op_clk = {
156 .name = "adc_op_clk",
157 .type = CLK_TYPE_PERIPHERAL,
158 .rate_hz = 5000000,
159};
160static struct clk dma0_clk = {
161 .name = "dma0_clk",
162 .pid = SAMA5D3_ID_DMA0,
163 .type = CLK_TYPE_PERIPHERAL,
164};
165static struct clk dma1_clk = {
166 .name = "dma1_clk",
167 .pid = SAMA5D3_ID_DMA1,
168 .type = CLK_TYPE_PERIPHERAL,
169};
170static struct clk uhphs_clk = {
171 .name = "uhphs",
172 .pid = SAMA5D3_ID_UHPHS,
173 .type = CLK_TYPE_PERIPHERAL,
174};
175static struct clk udphs_clk = {
176 .name = "udphs_clk",
177 .pid = SAMA5D3_ID_UDPHS,
178 .type = CLK_TYPE_PERIPHERAL,
179};
180/* gmac only for sama5d33, sama5d34, sama5d35 */
181static struct clk macb0_clk = {
182 .name = "macb0_clk",
183 .pid = SAMA5D3_ID_GMAC,
184 .type = CLK_TYPE_PERIPHERAL,
185};
186/* emac only for sama5d31, sama5d35 */
187static struct clk macb1_clk = {
188 .name = "macb1_clk",
189 .pid = SAMA5D3_ID_EMAC,
190 .type = CLK_TYPE_PERIPHERAL,
191};
192/* lcd only for sama5d31, sama5d33, sama5d34 */
193static struct clk lcdc_clk = {
194 .name = "lcdc_clk",
195 .pid = SAMA5D3_ID_LCDC,
196 .type = CLK_TYPE_PERIPHERAL,
197};
198/* isi only for sama5d33, sama5d35 */
199static struct clk isi_clk = {
200 .name = "isi_clk",
201 .pid = SAMA5D3_ID_ISI,
202 .type = CLK_TYPE_PERIPHERAL,
203};
204static struct clk can0_clk = {
205 .name = "can0_clk",
206 .pid = SAMA5D3_ID_CAN0,
207 .type = CLK_TYPE_PERIPHERAL,
208 .div = AT91_PMC_PCR_DIV2,
209};
210static struct clk can1_clk = {
211 .name = "can1_clk",
212 .pid = SAMA5D3_ID_CAN1,
213 .type = CLK_TYPE_PERIPHERAL,
214 .div = AT91_PMC_PCR_DIV2,
215};
216static struct clk ssc0_clk = {
217 .name = "ssc0_clk",
218 .pid = SAMA5D3_ID_SSC0,
219 .type = CLK_TYPE_PERIPHERAL,
220 .div = AT91_PMC_PCR_DIV2,
221};
222static struct clk ssc1_clk = {
223 .name = "ssc1_clk",
224 .pid = SAMA5D3_ID_SSC1,
225 .type = CLK_TYPE_PERIPHERAL,
226 .div = AT91_PMC_PCR_DIV2,
227};
228static struct clk sha_clk = {
229 .name = "sha_clk",
230 .pid = SAMA5D3_ID_SHA,
231 .type = CLK_TYPE_PERIPHERAL,
232 .div = AT91_PMC_PCR_DIV8,
233};
234static struct clk aes_clk = {
235 .name = "aes_clk",
236 .pid = SAMA5D3_ID_AES,
237 .type = CLK_TYPE_PERIPHERAL,
238};
239static struct clk tdes_clk = {
240 .name = "tdes_clk",
241 .pid = SAMA5D3_ID_TDES,
242 .type = CLK_TYPE_PERIPHERAL,
243};
244
245static struct clk *periph_clocks[] __initdata = {
246 &pioA_clk,
247 &pioB_clk,
248 &pioC_clk,
249 &pioD_clk,
250 &pioE_clk,
251 &usart0_clk,
252 &usart1_clk,
253 &usart2_clk,
254 &usart3_clk,
255 &uart0_clk,
256 &uart1_clk,
257 &twi0_clk,
258 &twi1_clk,
259 &twi2_clk,
260 &mmc0_clk,
261 &mmc1_clk,
262 &mmc2_clk,
263 &spi0_clk,
264 &spi1_clk,
265 &tcb0_clk,
266 &tcb1_clk,
267 &adc_clk,
268 &adc_op_clk,
269 &dma0_clk,
270 &dma1_clk,
271 &uhphs_clk,
272 &udphs_clk,
273 &macb0_clk,
274 &macb1_clk,
275 &lcdc_clk,
276 &isi_clk,
277 &can0_clk,
278 &can1_clk,
279 &ssc0_clk,
280 &ssc1_clk,
281 &sha_clk,
282 &aes_clk,
283 &tdes_clk,
284};
285
286static struct clk pck0 = {
287 .name = "pck0",
288 .pmc_mask = AT91_PMC_PCK0,
289 .type = CLK_TYPE_PROGRAMMABLE,
290 .id = 0,
291};
292
293static struct clk pck1 = {
294 .name = "pck1",
295 .pmc_mask = AT91_PMC_PCK1,
296 .type = CLK_TYPE_PROGRAMMABLE,
297 .id = 1,
298};
299
300static struct clk pck2 = {
301 .name = "pck2",
302 .pmc_mask = AT91_PMC_PCK2,
303 .type = CLK_TYPE_PROGRAMMABLE,
304 .id = 2,
305};
306
307static struct clk_lookup periph_clocks_lookups[] = {
308 /* lookup table for DT entries */
309 CLKDEV_CON_DEV_ID("usart", "ffffee00.serial", &mck),
310 CLKDEV_CON_DEV_ID(NULL, "fffff200.gpio", &pioA_clk),
311 CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioB_clk),
312 CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioC_clk),
313 CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioD_clk),
314 CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioE_clk),
315 CLKDEV_CON_DEV_ID("usart", "f001c000.serial", &usart0_clk),
316 CLKDEV_CON_DEV_ID("usart", "f0020000.serial", &usart1_clk),
317 CLKDEV_CON_DEV_ID("usart", "f8020000.serial", &usart2_clk),
318 CLKDEV_CON_DEV_ID("usart", "f8024000.serial", &usart3_clk),
319 CLKDEV_CON_DEV_ID(NULL, "f0014000.i2c", &twi0_clk),
320 CLKDEV_CON_DEV_ID(NULL, "f0018000.i2c", &twi1_clk),
321 CLKDEV_CON_DEV_ID(NULL, "f801c000.i2c", &twi2_clk),
322 CLKDEV_CON_DEV_ID("mci_clk", "f0000000.mmc", &mmc0_clk),
323 CLKDEV_CON_DEV_ID("mci_clk", "f8000000.mmc", &mmc1_clk),
324 CLKDEV_CON_DEV_ID("mci_clk", "f8004000.mmc", &mmc2_clk),
325 CLKDEV_CON_DEV_ID("spi_clk", "f0004000.spi", &spi0_clk),
326 CLKDEV_CON_DEV_ID("spi_clk", "f8008000.spi", &spi1_clk),
327 CLKDEV_CON_DEV_ID("t0_clk", "f0010000.timer", &tcb0_clk),
328 CLKDEV_CON_DEV_ID("t0_clk", "f8014000.timer", &tcb1_clk),
329 CLKDEV_CON_DEV_ID("tsc_clk", "f8018000.tsadcc", &adc_clk),
330 CLKDEV_CON_DEV_ID("dma_clk", "ffffe600.dma-controller", &dma0_clk),
331 CLKDEV_CON_DEV_ID("dma_clk", "ffffe800.dma-controller", &dma1_clk),
332 CLKDEV_CON_DEV_ID("hclk", "600000.ohci", &uhphs_clk),
333 CLKDEV_CON_DEV_ID("ohci_clk", "600000.ohci", &uhphs_clk),
334 CLKDEV_CON_DEV_ID("ehci_clk", "700000.ehci", &uhphs_clk),
335 CLKDEV_CON_DEV_ID("pclk", "500000.gadget", &udphs_clk),
336 CLKDEV_CON_DEV_ID("hclk", "500000.gadget", &utmi_clk),
337 CLKDEV_CON_DEV_ID("hclk", "f0028000.ethernet", &macb0_clk),
338 CLKDEV_CON_DEV_ID("pclk", "f0028000.ethernet", &macb0_clk),
339 CLKDEV_CON_DEV_ID("hclk", "f802c000.ethernet", &macb1_clk),
340 CLKDEV_CON_DEV_ID("pclk", "f802c000.ethernet", &macb1_clk),
341 CLKDEV_CON_DEV_ID("pclk", "f0008000.ssc", &ssc0_clk),
342 CLKDEV_CON_DEV_ID("pclk", "f000c000.ssc", &ssc1_clk),
343 CLKDEV_CON_DEV_ID("can_clk", "f000c000.can", &can0_clk),
344 CLKDEV_CON_DEV_ID("can_clk", "f8010000.can", &can1_clk),
345 CLKDEV_CON_DEV_ID("sha_clk", "f8034000.sha", &sha_clk),
346 CLKDEV_CON_DEV_ID("aes_clk", "f8038000.aes", &aes_clk),
347 CLKDEV_CON_DEV_ID("tdes_clk", "f803c000.tdes", &tdes_clk),
348};
349
350static void __init sama5d3_register_clocks(void)
351{
352 int i;
353
354 for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
355 clk_register(periph_clocks[i]);
356
357 clkdev_add_table(periph_clocks_lookups,
358 ARRAY_SIZE(periph_clocks_lookups));
359
360 clk_register(&pck0);
361 clk_register(&pck1);
362 clk_register(&pck2);
363}
364
365/* --------------------------------------------------------------------
366 * AT91SAM9x5 processor initialization 25 * AT91SAM9x5 processor initialization
367 * -------------------------------------------------------------------- */ 26 * -------------------------------------------------------------------- */
368 27
@@ -378,6 +37,5 @@ static void __init sama5d3_initialize(void)
378 37
379AT91_SOC_START(sama5d3) 38AT91_SOC_START(sama5d3)
380 .map_io = sama5d3_map_io, 39 .map_io = sama5d3_map_io,
381 .register_clocks = sama5d3_register_clocks,
382 .init = sama5d3_initialize, 40 .init = sama5d3_initialize,
383AT91_SOC_END 41AT91_SOC_END
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
index 2742e00ec5d6..9dc8894c5623 100644
--- a/arch/arm/mach-at91/setup.c
+++ b/arch/arm/mach-at91/setup.c
@@ -11,6 +11,7 @@
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#include <linux/pinctrl/machine.h>
14#include <linux/clk/at91_pmc.h>
14 15
15#include <asm/system_misc.h> 16#include <asm/system_misc.h>
16#include <asm/mach/map.h> 17#include <asm/mach/map.h>
@@ -18,7 +19,6 @@
18#include <mach/hardware.h> 19#include <mach/hardware.h>
19#include <mach/cpu.h> 20#include <mach/cpu.h>
20#include <mach/at91_dbgu.h> 21#include <mach/at91_dbgu.h>
21#include <mach/at91_pmc.h>
22 22
23#include "at91_shdwc.h" 23#include "at91_shdwc.h"
24#include "soc.h" 24#include "soc.h"
@@ -491,7 +491,8 @@ void __init at91rm9200_dt_initialize(void)
491 at91_dt_clock_init(); 491 at91_dt_clock_init();
492 492
493 /* Register the processor-specific clocks */ 493 /* Register the processor-specific clocks */
494 at91_boot_soc.register_clocks(); 494 if (at91_boot_soc.register_clocks)
495 at91_boot_soc.register_clocks();
495 496
496 at91_boot_soc.init(); 497 at91_boot_soc.init();
497} 498}
@@ -506,7 +507,8 @@ void __init at91_dt_initialize(void)
506 at91_dt_clock_init(); 507 at91_dt_clock_init();
507 508
508 /* Register the processor-specific clocks */ 509 /* Register the processor-specific clocks */
509 at91_boot_soc.register_clocks(); 510 if (at91_boot_soc.register_clocks)
511 at91_boot_soc.register_clocks();
510 512
511 if (at91_boot_soc.init) 513 if (at91_boot_soc.init)
512 at91_boot_soc.init(); 514 at91_boot_soc.init();
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c
index c122bcff9f7c..0d1a89298ece 100644
--- a/arch/arm/mach-dove/common.c
+++ b/arch/arm/mach-dove/common.c
@@ -162,7 +162,7 @@ void __init dove_ge00_init(struct mv643xx_eth_platform_data *eth_data)
162/***************************************************************************** 162/*****************************************************************************
163 * SoC RTC 163 * SoC RTC
164 ****************************************************************************/ 164 ****************************************************************************/
165void __init dove_rtc_init(void) 165static void __init dove_rtc_init(void)
166{ 166{
167 orion_rtc_init(DOVE_RTC_PHYS_BASE, IRQ_DOVE_RTC); 167 orion_rtc_init(DOVE_RTC_PHYS_BASE, IRQ_DOVE_RTC);
168} 168}
@@ -257,18 +257,9 @@ void __init dove_timer_init(void)
257} 257}
258 258
259/***************************************************************************** 259/*****************************************************************************
260 * Cryptographic Engines and Security Accelerator (CESA)
261 ****************************************************************************/
262void __init dove_crypto_init(void)
263{
264 orion_crypto_init(DOVE_CRYPT_PHYS_BASE, DOVE_CESA_PHYS_BASE,
265 DOVE_CESA_SIZE, IRQ_DOVE_CRYPTO);
266}
267
268/*****************************************************************************
269 * XOR 0 260 * XOR 0
270 ****************************************************************************/ 261 ****************************************************************************/
271void __init dove_xor0_init(void) 262static void __init dove_xor0_init(void)
272{ 263{
273 orion_xor0_init(DOVE_XOR0_PHYS_BASE, DOVE_XOR0_HIGH_PHYS_BASE, 264 orion_xor0_init(DOVE_XOR0_PHYS_BASE, DOVE_XOR0_HIGH_PHYS_BASE,
274 IRQ_DOVE_XOR_00, IRQ_DOVE_XOR_01); 265 IRQ_DOVE_XOR_00, IRQ_DOVE_XOR_01);
@@ -277,7 +268,7 @@ void __init dove_xor0_init(void)
277/***************************************************************************** 268/*****************************************************************************
278 * XOR 1 269 * XOR 1
279 ****************************************************************************/ 270 ****************************************************************************/
280void __init dove_xor1_init(void) 271static void __init dove_xor1_init(void)
281{ 272{
282 orion_xor1_init(DOVE_XOR1_PHYS_BASE, DOVE_XOR1_HIGH_PHYS_BASE, 273 orion_xor1_init(DOVE_XOR1_PHYS_BASE, DOVE_XOR1_HIGH_PHYS_BASE,
283 IRQ_DOVE_XOR_10, IRQ_DOVE_XOR_11); 274 IRQ_DOVE_XOR_10, IRQ_DOVE_XOR_11);
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index f9d67a0acb2a..4c414af75ef0 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -24,6 +24,7 @@ config ARCH_EXYNOS4
24 select HAVE_SMP 24 select HAVE_SMP
25 select MIGHT_HAVE_CACHE_L2X0 25 select MIGHT_HAVE_CACHE_L2X0
26 select PINCTRL 26 select PINCTRL
27 select PM_GENERIC_DOMAINS if PM
27 select S5P_DEV_MFC 28 select S5P_DEV_MFC
28 help 29 help
29 Samsung EXYNOS4 SoCs based systems 30 Samsung EXYNOS4 SoCs based systems
@@ -48,7 +49,6 @@ config CPU_EXYNOS4210
48 select ARCH_HAS_BANDGAP 49 select ARCH_HAS_BANDGAP
49 select ARM_CPU_SUSPEND if PM 50 select ARM_CPU_SUSPEND if PM
50 select PINCTRL_EXYNOS 51 select PINCTRL_EXYNOS
51 select PM_GENERIC_DOMAINS if PM
52 select S5P_PM if PM 52 select S5P_PM if PM
53 select S5P_SLEEP if PM 53 select S5P_SLEEP if PM
54 select SAMSUNG_DMADEV 54 select SAMSUNG_DMADEV
@@ -61,7 +61,6 @@ config SOC_EXYNOS4212
61 depends on ARCH_EXYNOS4 61 depends on ARCH_EXYNOS4
62 select ARCH_HAS_BANDGAP 62 select ARCH_HAS_BANDGAP
63 select PINCTRL_EXYNOS 63 select PINCTRL_EXYNOS
64 select PM_GENERIC_DOMAINS if PM
65 select S5P_PM if PM 64 select S5P_PM if PM
66 select S5P_SLEEP if PM 65 select S5P_SLEEP if PM
67 select SAMSUNG_DMADEV 66 select SAMSUNG_DMADEV
@@ -74,7 +73,6 @@ config SOC_EXYNOS4412
74 depends on ARCH_EXYNOS4 73 depends on ARCH_EXYNOS4
75 select ARCH_HAS_BANDGAP 74 select ARCH_HAS_BANDGAP
76 select PINCTRL_EXYNOS 75 select PINCTRL_EXYNOS
77 select PM_GENERIC_DOMAINS if PM
78 select SAMSUNG_DMADEV 76 select SAMSUNG_DMADEV
79 help 77 help
80 Enable EXYNOS4412 SoC support 78 Enable EXYNOS4412 SoC support
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index 61d2906ccefb..72ae5d3a87d2 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -23,6 +23,7 @@
23#include <linux/of.h> 23#include <linux/of.h>
24#include <linux/of_fdt.h> 24#include <linux/of_fdt.h>
25#include <linux/of_irq.h> 25#include <linux/of_irq.h>
26#include <linux/pm_domain.h>
26#include <linux/export.h> 27#include <linux/export.h>
27#include <linux/irqdomain.h> 28#include <linux/irqdomain.h>
28#include <linux/of_address.h> 29#include <linux/of_address.h>
@@ -37,14 +38,13 @@
37#include <asm/mach/irq.h> 38#include <asm/mach/irq.h>
38#include <asm/cacheflush.h> 39#include <asm/cacheflush.h>
39 40
40#include <mach/regs-irq.h>
41#include <mach/regs-pmu.h>
42
43#include <plat/cpu.h> 41#include <plat/cpu.h>
44#include <plat/pm.h> 42#include <plat/pm.h>
45#include <plat/regs-serial.h> 43#include <plat/regs-serial.h>
46 44
47#include "common.h" 45#include "common.h"
46#include "regs-pmu.h"
47
48#define L2_AUX_VAL 0x7C470001 48#define L2_AUX_VAL 0x7C470001
49#define L2_AUX_MASK 0xC200ffff 49#define L2_AUX_MASK 0xC200ffff
50 50
@@ -309,7 +309,7 @@ void __init exynos_init_late(void)
309 /* to be supported later */ 309 /* to be supported later */
310 return; 310 return;
311 311
312 exynos_pm_late_initcall(); 312 pm_genpd_poweroff_unused();
313} 313}
314 314
315static int __init exynos_fdt_map_chipid(unsigned long node, const char *uname, 315static int __init exynos_fdt_map_chipid(unsigned long node, const char *uname,
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index ff9b6a9419b0..0c31b34f0de5 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -26,12 +26,6 @@ void exynos_init_late(void);
26 26
27void exynos_firmware_init(void); 27void exynos_firmware_init(void);
28 28
29#ifdef CONFIG_PM_GENERIC_DOMAINS
30int exynos_pm_late_initcall(void);
31#else
32static inline int exynos_pm_late_initcall(void) { return 0; }
33#endif
34
35extern struct smp_operations exynos_smp_ops; 29extern struct smp_operations exynos_smp_ops;
36 30
37extern void exynos_cpu_die(unsigned int cpu); 31extern void exynos_cpu_die(unsigned int cpu);
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index ddbfe8709fe7..da65b036af2b 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -22,13 +22,15 @@
22#include <asm/suspend.h> 22#include <asm/suspend.h>
23#include <asm/unified.h> 23#include <asm/unified.h>
24#include <asm/cpuidle.h> 24#include <asm/cpuidle.h>
25#include <mach/regs-clock.h>
26#include <mach/regs-pmu.h>
27 25
28#include <plat/cpu.h> 26#include <plat/cpu.h>
29#include <plat/pm.h> 27#include <plat/pm.h>
30 28
29#include <mach/pm-core.h>
30#include <mach/map.h>
31
31#include "common.h" 32#include "common.h"
33#include "regs-pmu.h"
32 34
33#define REG_DIRECTGO_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \ 35#define REG_DIRECTGO_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \
34 S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \ 36 S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
@@ -39,6 +41,25 @@
39 41
40#define S5P_CHECK_AFTR 0xFCBA0D10 42#define S5P_CHECK_AFTR 0xFCBA0D10
41 43
44#define EXYNOS5_PWR_CTRL1 (S5P_VA_CMU + 0x01020)
45#define EXYNOS5_PWR_CTRL2 (S5P_VA_CMU + 0x01024)
46
47#define PWR_CTRL1_CORE2_DOWN_RATIO (7 << 28)
48#define PWR_CTRL1_CORE1_DOWN_RATIO (7 << 16)
49#define PWR_CTRL1_DIV2_DOWN_EN (1 << 9)
50#define PWR_CTRL1_DIV1_DOWN_EN (1 << 8)
51#define PWR_CTRL1_USE_CORE1_WFE (1 << 5)
52#define PWR_CTRL1_USE_CORE0_WFE (1 << 4)
53#define PWR_CTRL1_USE_CORE1_WFI (1 << 1)
54#define PWR_CTRL1_USE_CORE0_WFI (1 << 0)
55
56#define PWR_CTRL2_DIV2_UP_EN (1 << 25)
57#define PWR_CTRL2_DIV1_UP_EN (1 << 24)
58#define PWR_CTRL2_DUR_STANDBY2_VAL (1 << 16)
59#define PWR_CTRL2_DUR_STANDBY1_VAL (1 << 8)
60#define PWR_CTRL2_CORE2_UP_RATIO (1 << 4)
61#define PWR_CTRL2_CORE1_UP_RATIO (1 << 0)
62
42static int exynos4_enter_lowpower(struct cpuidle_device *dev, 63static int exynos4_enter_lowpower(struct cpuidle_device *dev,
43 struct cpuidle_driver *drv, 64 struct cpuidle_driver *drv,
44 int index); 65 int index);
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
index af90cfa2f826..5eead530c6f8 100644
--- a/arch/arm/mach-exynos/hotplug.c
+++ b/arch/arm/mach-exynos/hotplug.c
@@ -19,10 +19,10 @@
19#include <asm/cp15.h> 19#include <asm/cp15.h>
20#include <asm/smp_plat.h> 20#include <asm/smp_plat.h>
21 21
22#include <mach/regs-pmu.h>
23#include <plat/cpu.h> 22#include <plat/cpu.h>
24 23
25#include "common.h" 24#include "common.h"
25#include "regs-pmu.h"
26 26
27static inline void cpu_enter_lowpower_a9(void) 27static inline void cpu_enter_lowpower_a9(void)
28{ 28{
diff --git a/arch/arm/mach-exynos/include/mach/pm-core.h b/arch/arm/mach-exynos/include/mach/pm-core.h
index 2b00833b6641..dc0697c2fa92 100644
--- a/arch/arm/mach-exynos/include/mach/pm-core.h
+++ b/arch/arm/mach-exynos/include/mach/pm-core.h
@@ -19,7 +19,10 @@
19#define __ASM_ARCH_PM_CORE_H __FILE__ 19#define __ASM_ARCH_PM_CORE_H __FILE__
20 20
21#include <linux/of.h> 21#include <linux/of.h>
22#include <mach/regs-pmu.h> 22#include <mach/map.h>
23
24#define S5P_EINT_WAKEUP_MASK (S5P_VA_PMU + 0x0604)
25#define S5P_WAKEUP_MASK (S5P_VA_PMU + 0x0608)
23 26
24#ifdef CONFIG_PINCTRL_EXYNOS 27#ifdef CONFIG_PINCTRL_EXYNOS
25extern u32 exynos_get_eint_wake_mask(void); 28extern u32 exynos_get_eint_wake_mask(void);
diff --git a/arch/arm/mach-exynos/include/mach/regs-clock.h b/arch/arm/mach-exynos/include/mach/regs-clock.h
deleted file mode 100644
index d36ad76ad6a4..000000000000
--- a/arch/arm/mach-exynos/include/mach/regs-clock.h
+++ /dev/null
@@ -1,372 +0,0 @@
1/* linux/arch/arm/mach-exynos4/include/mach/regs-clock.h
2 *
3 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * EXYNOS4 - Clock register definitions
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 __ASM_ARCH_REGS_CLOCK_H
14#define __ASM_ARCH_REGS_CLOCK_H __FILE__
15
16#include <plat/cpu.h>
17#include <mach/map.h>
18
19#define EXYNOS_CLKREG(x) (S5P_VA_CMU + (x))
20
21#define EXYNOS4_CLKDIV_LEFTBUS EXYNOS_CLKREG(0x04500)
22#define EXYNOS4_CLKDIV_STAT_LEFTBUS EXYNOS_CLKREG(0x04600)
23#define EXYNOS4_CLKGATE_IP_LEFTBUS EXYNOS_CLKREG(0x04800)
24
25#define EXYNOS4_CLKDIV_RIGHTBUS EXYNOS_CLKREG(0x08500)
26#define EXYNOS4_CLKDIV_STAT_RIGHTBUS EXYNOS_CLKREG(0x08600)
27#define EXYNOS4_CLKGATE_IP_RIGHTBUS EXYNOS_CLKREG(0x08800)
28
29#define EXYNOS4_EPLL_LOCK EXYNOS_CLKREG(0x0C010)
30#define EXYNOS4_VPLL_LOCK EXYNOS_CLKREG(0x0C020)
31
32#define EXYNOS4_EPLL_CON0 EXYNOS_CLKREG(0x0C110)
33#define EXYNOS4_EPLL_CON1 EXYNOS_CLKREG(0x0C114)
34#define EXYNOS4_VPLL_CON0 EXYNOS_CLKREG(0x0C120)
35#define EXYNOS4_VPLL_CON1 EXYNOS_CLKREG(0x0C124)
36
37#define EXYNOS4_CLKSRC_TOP0 EXYNOS_CLKREG(0x0C210)
38#define EXYNOS4_CLKSRC_TOP1 EXYNOS_CLKREG(0x0C214)
39#define EXYNOS4_CLKSRC_CAM EXYNOS_CLKREG(0x0C220)
40#define EXYNOS4_CLKSRC_TV EXYNOS_CLKREG(0x0C224)
41#define EXYNOS4_CLKSRC_MFC EXYNOS_CLKREG(0x0C228)
42#define EXYNOS4_CLKSRC_G3D EXYNOS_CLKREG(0x0C22C)
43#define EXYNOS4_CLKSRC_IMAGE EXYNOS_CLKREG(0x0C230)
44#define EXYNOS4_CLKSRC_LCD0 EXYNOS_CLKREG(0x0C234)
45#define EXYNOS4_CLKSRC_MAUDIO EXYNOS_CLKREG(0x0C23C)
46#define EXYNOS4_CLKSRC_FSYS EXYNOS_CLKREG(0x0C240)
47#define EXYNOS4_CLKSRC_PERIL0 EXYNOS_CLKREG(0x0C250)
48#define EXYNOS4_CLKSRC_PERIL1 EXYNOS_CLKREG(0x0C254)
49
50#define EXYNOS4_CLKSRC_MASK_TOP EXYNOS_CLKREG(0x0C310)
51#define EXYNOS4_CLKSRC_MASK_CAM EXYNOS_CLKREG(0x0C320)
52#define EXYNOS4_CLKSRC_MASK_TV EXYNOS_CLKREG(0x0C324)
53#define EXYNOS4_CLKSRC_MASK_LCD0 EXYNOS_CLKREG(0x0C334)
54#define EXYNOS4_CLKSRC_MASK_MAUDIO EXYNOS_CLKREG(0x0C33C)
55#define EXYNOS4_CLKSRC_MASK_FSYS EXYNOS_CLKREG(0x0C340)
56#define EXYNOS4_CLKSRC_MASK_PERIL0 EXYNOS_CLKREG(0x0C350)
57#define EXYNOS4_CLKSRC_MASK_PERIL1 EXYNOS_CLKREG(0x0C354)
58
59#define EXYNOS4_CLKDIV_TOP EXYNOS_CLKREG(0x0C510)
60#define EXYNOS4_CLKDIV_CAM EXYNOS_CLKREG(0x0C520)
61#define EXYNOS4_CLKDIV_TV EXYNOS_CLKREG(0x0C524)
62#define EXYNOS4_CLKDIV_MFC EXYNOS_CLKREG(0x0C528)
63#define EXYNOS4_CLKDIV_G3D EXYNOS_CLKREG(0x0C52C)
64#define EXYNOS4_CLKDIV_IMAGE EXYNOS_CLKREG(0x0C530)
65#define EXYNOS4_CLKDIV_LCD0 EXYNOS_CLKREG(0x0C534)
66#define EXYNOS4_CLKDIV_MAUDIO EXYNOS_CLKREG(0x0C53C)
67#define EXYNOS4_CLKDIV_FSYS0 EXYNOS_CLKREG(0x0C540)
68#define EXYNOS4_CLKDIV_FSYS1 EXYNOS_CLKREG(0x0C544)
69#define EXYNOS4_CLKDIV_FSYS2 EXYNOS_CLKREG(0x0C548)
70#define EXYNOS4_CLKDIV_FSYS3 EXYNOS_CLKREG(0x0C54C)
71#define EXYNOS4_CLKDIV_PERIL0 EXYNOS_CLKREG(0x0C550)
72#define EXYNOS4_CLKDIV_PERIL1 EXYNOS_CLKREG(0x0C554)
73#define EXYNOS4_CLKDIV_PERIL2 EXYNOS_CLKREG(0x0C558)
74#define EXYNOS4_CLKDIV_PERIL3 EXYNOS_CLKREG(0x0C55C)
75#define EXYNOS4_CLKDIV_PERIL4 EXYNOS_CLKREG(0x0C560)
76#define EXYNOS4_CLKDIV_PERIL5 EXYNOS_CLKREG(0x0C564)
77#define EXYNOS4_CLKDIV2_RATIO EXYNOS_CLKREG(0x0C580)
78
79#define EXYNOS4_CLKDIV_STAT_TOP EXYNOS_CLKREG(0x0C610)
80#define EXYNOS4_CLKDIV_STAT_MFC EXYNOS_CLKREG(0x0C628)
81
82#define EXYNOS4_CLKGATE_SCLKCAM EXYNOS_CLKREG(0x0C820)
83#define EXYNOS4_CLKGATE_IP_CAM EXYNOS_CLKREG(0x0C920)
84#define EXYNOS4_CLKGATE_IP_TV EXYNOS_CLKREG(0x0C924)
85#define EXYNOS4_CLKGATE_IP_MFC EXYNOS_CLKREG(0x0C928)
86#define EXYNOS4_CLKGATE_IP_G3D EXYNOS_CLKREG(0x0C92C)
87#define EXYNOS4_CLKGATE_IP_IMAGE (soc_is_exynos4210() ? \
88 EXYNOS_CLKREG(0x0C930) : \
89 EXYNOS_CLKREG(0x04930))
90#define EXYNOS4210_CLKGATE_IP_IMAGE EXYNOS_CLKREG(0x0C930)
91#define EXYNOS4212_CLKGATE_IP_IMAGE EXYNOS_CLKREG(0x04930)
92#define EXYNOS4_CLKGATE_IP_LCD0 EXYNOS_CLKREG(0x0C934)
93#define EXYNOS4_CLKGATE_IP_FSYS EXYNOS_CLKREG(0x0C940)
94#define EXYNOS4_CLKGATE_IP_GPS EXYNOS_CLKREG(0x0C94C)
95#define EXYNOS4_CLKGATE_IP_PERIL EXYNOS_CLKREG(0x0C950)
96#define EXYNOS4_CLKGATE_IP_PERIR (soc_is_exynos4210() ? \
97 EXYNOS_CLKREG(0x0C960) : \
98 EXYNOS_CLKREG(0x08960))
99#define EXYNOS4210_CLKGATE_IP_PERIR EXYNOS_CLKREG(0x0C960)
100#define EXYNOS4212_CLKGATE_IP_PERIR EXYNOS_CLKREG(0x08960)
101#define EXYNOS4_CLKGATE_BLOCK EXYNOS_CLKREG(0x0C970)
102
103#define EXYNOS4_CLKSRC_MASK_DMC EXYNOS_CLKREG(0x10300)
104#define EXYNOS4_CLKSRC_DMC EXYNOS_CLKREG(0x10200)
105#define EXYNOS4_CLKDIV_DMC0 EXYNOS_CLKREG(0x10500)
106#define EXYNOS4_CLKDIV_DMC1 EXYNOS_CLKREG(0x10504)
107#define EXYNOS4_CLKDIV_STAT_DMC0 EXYNOS_CLKREG(0x10600)
108#define EXYNOS4_CLKDIV_STAT_DMC1 EXYNOS_CLKREG(0x10604)
109#define EXYNOS4_CLKGATE_IP_DMC EXYNOS_CLKREG(0x10900)
110
111#define EXYNOS4_DMC_PAUSE_CTRL EXYNOS_CLKREG(0x11094)
112#define EXYNOS4_DMC_PAUSE_ENABLE (1 << 0)
113
114#define EXYNOS4_APLL_LOCK EXYNOS_CLKREG(0x14000)
115#define EXYNOS4_MPLL_LOCK (soc_is_exynos4210() ? \
116 EXYNOS_CLKREG(0x14004) : \
117 EXYNOS_CLKREG(0x10008))
118#define EXYNOS4_APLL_CON0 EXYNOS_CLKREG(0x14100)
119#define EXYNOS4_APLL_CON1 EXYNOS_CLKREG(0x14104)
120#define EXYNOS4_MPLL_CON0 (soc_is_exynos4210() ? \
121 EXYNOS_CLKREG(0x14108) : \
122 EXYNOS_CLKREG(0x10108))
123#define EXYNOS4_MPLL_CON1 (soc_is_exynos4210() ? \
124 EXYNOS_CLKREG(0x1410C) : \
125 EXYNOS_CLKREG(0x1010C))
126
127#define EXYNOS4_CLKSRC_CPU EXYNOS_CLKREG(0x14200)
128#define EXYNOS4_CLKMUX_STATCPU EXYNOS_CLKREG(0x14400)
129
130#define EXYNOS4_CLKDIV_CPU EXYNOS_CLKREG(0x14500)
131#define EXYNOS4_CLKDIV_CPU1 EXYNOS_CLKREG(0x14504)
132#define EXYNOS4_CLKDIV_STATCPU EXYNOS_CLKREG(0x14600)
133#define EXYNOS4_CLKDIV_STATCPU1 EXYNOS_CLKREG(0x14604)
134
135#define EXYNOS4_CLKGATE_SCLKCPU EXYNOS_CLKREG(0x14800)
136#define EXYNOS4_CLKGATE_IP_CPU EXYNOS_CLKREG(0x14900)
137
138#define EXYNOS4_CLKGATE_IP_ISP0 EXYNOS_CLKREG(0x18800)
139#define EXYNOS4_CLKGATE_IP_ISP1 EXYNOS_CLKREG(0x18804)
140
141#define EXYNOS4_APLL_LOCKTIME (0x1C20) /* 300us */
142
143#define EXYNOS4_APLLCON0_ENABLE_SHIFT (31)
144#define EXYNOS4_APLLCON0_LOCKED_SHIFT (29)
145#define EXYNOS4_APLL_VAL_1000 ((250 << 16) | (6 << 8) | 1)
146#define EXYNOS4_APLL_VAL_800 ((200 << 16) | (6 << 8) | 1)
147
148#define EXYNOS4_EPLLCON0_ENABLE_SHIFT (31)
149#define EXYNOS4_EPLLCON0_LOCKED_SHIFT (29)
150
151#define EXYNOS4_VPLLCON0_ENABLE_SHIFT (31)
152#define EXYNOS4_VPLLCON0_LOCKED_SHIFT (29)
153
154#define EXYNOS4_CLKSRC_CPU_MUXCORE_SHIFT (16)
155#define EXYNOS4_CLKMUX_STATCPU_MUXCORE_MASK (0x7 << EXYNOS4_CLKSRC_CPU_MUXCORE_SHIFT)
156
157#define EXYNOS4_CLKDIV_CPU0_CORE_SHIFT (0)
158#define EXYNOS4_CLKDIV_CPU0_CORE_MASK (0x7 << EXYNOS4_CLKDIV_CPU0_CORE_SHIFT)
159#define EXYNOS4_CLKDIV_CPU0_COREM0_SHIFT (4)
160#define EXYNOS4_CLKDIV_CPU0_COREM0_MASK (0x7 << EXYNOS4_CLKDIV_CPU0_COREM0_SHIFT)
161#define EXYNOS4_CLKDIV_CPU0_COREM1_SHIFT (8)
162#define EXYNOS4_CLKDIV_CPU0_COREM1_MASK (0x7 << EXYNOS4_CLKDIV_CPU0_COREM1_SHIFT)
163#define EXYNOS4_CLKDIV_CPU0_PERIPH_SHIFT (12)
164#define EXYNOS4_CLKDIV_CPU0_PERIPH_MASK (0x7 << EXYNOS4_CLKDIV_CPU0_PERIPH_SHIFT)
165#define EXYNOS4_CLKDIV_CPU0_ATB_SHIFT (16)
166#define EXYNOS4_CLKDIV_CPU0_ATB_MASK (0x7 << EXYNOS4_CLKDIV_CPU0_ATB_SHIFT)
167#define EXYNOS4_CLKDIV_CPU0_PCLKDBG_SHIFT (20)
168#define EXYNOS4_CLKDIV_CPU0_PCLKDBG_MASK (0x7 << EXYNOS4_CLKDIV_CPU0_PCLKDBG_SHIFT)
169#define EXYNOS4_CLKDIV_CPU0_APLL_SHIFT (24)
170#define EXYNOS4_CLKDIV_CPU0_APLL_MASK (0x7 << EXYNOS4_CLKDIV_CPU0_APLL_SHIFT)
171#define EXYNOS4_CLKDIV_CPU0_CORE2_SHIFT 28
172#define EXYNOS4_CLKDIV_CPU0_CORE2_MASK (0x7 << EXYNOS4_CLKDIV_CPU0_CORE2_SHIFT)
173
174#define EXYNOS4_CLKDIV_CPU1_COPY_SHIFT 0
175#define EXYNOS4_CLKDIV_CPU1_COPY_MASK (0x7 << EXYNOS4_CLKDIV_CPU1_COPY_SHIFT)
176#define EXYNOS4_CLKDIV_CPU1_HPM_SHIFT 4
177#define EXYNOS4_CLKDIV_CPU1_HPM_MASK (0x7 << EXYNOS4_CLKDIV_CPU1_HPM_SHIFT)
178#define EXYNOS4_CLKDIV_CPU1_CORES_SHIFT 8
179#define EXYNOS4_CLKDIV_CPU1_CORES_MASK (0x7 << EXYNOS4_CLKDIV_CPU1_CORES_SHIFT)
180
181#define EXYNOS4_CLKDIV_DMC0_ACP_SHIFT (0)
182#define EXYNOS4_CLKDIV_DMC0_ACP_MASK (0x7 << EXYNOS4_CLKDIV_DMC0_ACP_SHIFT)
183#define EXYNOS4_CLKDIV_DMC0_ACPPCLK_SHIFT (4)
184#define EXYNOS4_CLKDIV_DMC0_ACPPCLK_MASK (0x7 << EXYNOS4_CLKDIV_DMC0_ACPPCLK_SHIFT)
185#define EXYNOS4_CLKDIV_DMC0_DPHY_SHIFT (8)
186#define EXYNOS4_CLKDIV_DMC0_DPHY_MASK (0x7 << EXYNOS4_CLKDIV_DMC0_DPHY_SHIFT)
187#define EXYNOS4_CLKDIV_DMC0_DMC_SHIFT (12)
188#define EXYNOS4_CLKDIV_DMC0_DMC_MASK (0x7 << EXYNOS4_CLKDIV_DMC0_DMC_SHIFT)
189#define EXYNOS4_CLKDIV_DMC0_DMCD_SHIFT (16)
190#define EXYNOS4_CLKDIV_DMC0_DMCD_MASK (0x7 << EXYNOS4_CLKDIV_DMC0_DMCD_SHIFT)
191#define EXYNOS4_CLKDIV_DMC0_DMCP_SHIFT (20)
192#define EXYNOS4_CLKDIV_DMC0_DMCP_MASK (0x7 << EXYNOS4_CLKDIV_DMC0_DMCP_SHIFT)
193#define EXYNOS4_CLKDIV_DMC0_COPY2_SHIFT (24)
194#define EXYNOS4_CLKDIV_DMC0_COPY2_MASK (0x7 << EXYNOS4_CLKDIV_DMC0_COPY2_SHIFT)
195#define EXYNOS4_CLKDIV_DMC0_CORETI_SHIFT (28)
196#define EXYNOS4_CLKDIV_DMC0_CORETI_MASK (0x7 << EXYNOS4_CLKDIV_DMC0_CORETI_SHIFT)
197
198#define EXYNOS4_CLKDIV_DMC1_G2D_ACP_SHIFT (0)
199#define EXYNOS4_CLKDIV_DMC1_G2D_ACP_MASK (0xf << EXYNOS4_CLKDIV_DMC1_G2D_ACP_SHIFT)
200#define EXYNOS4_CLKDIV_DMC1_C2C_SHIFT (4)
201#define EXYNOS4_CLKDIV_DMC1_C2C_MASK (0x7 << EXYNOS4_CLKDIV_DMC1_C2C_SHIFT)
202#define EXYNOS4_CLKDIV_DMC1_PWI_SHIFT (8)
203#define EXYNOS4_CLKDIV_DMC1_PWI_MASK (0xf << EXYNOS4_CLKDIV_DMC1_PWI_SHIFT)
204#define EXYNOS4_CLKDIV_DMC1_C2CACLK_SHIFT (12)
205#define EXYNOS4_CLKDIV_DMC1_C2CACLK_MASK (0x7 << EXYNOS4_CLKDIV_DMC1_C2CACLK_SHIFT)
206#define EXYNOS4_CLKDIV_DMC1_DVSEM_SHIFT (16)
207#define EXYNOS4_CLKDIV_DMC1_DVSEM_MASK (0x7f << EXYNOS4_CLKDIV_DMC1_DVSEM_SHIFT)
208#define EXYNOS4_CLKDIV_DMC1_DPM_SHIFT (24)
209#define EXYNOS4_CLKDIV_DMC1_DPM_MASK (0x7f << EXYNOS4_CLKDIV_DMC1_DPM_SHIFT)
210
211#define EXYNOS4_CLKDIV_MFC_SHIFT (0)
212#define EXYNOS4_CLKDIV_MFC_MASK (0x7 << EXYNOS4_CLKDIV_MFC_SHIFT)
213
214#define EXYNOS4_CLKDIV_TOP_ACLK200_SHIFT (0)
215#define EXYNOS4_CLKDIV_TOP_ACLK200_MASK (0x7 << EXYNOS4_CLKDIV_TOP_ACLK200_SHIFT)
216#define EXYNOS4_CLKDIV_TOP_ACLK100_SHIFT (4)
217#define EXYNOS4_CLKDIV_TOP_ACLK100_MASK (0xF << EXYNOS4_CLKDIV_TOP_ACLK100_SHIFT)
218#define EXYNOS4_CLKDIV_TOP_ACLK160_SHIFT (8)
219#define EXYNOS4_CLKDIV_TOP_ACLK160_MASK (0x7 << EXYNOS4_CLKDIV_TOP_ACLK160_SHIFT)
220#define EXYNOS4_CLKDIV_TOP_ACLK133_SHIFT (12)
221#define EXYNOS4_CLKDIV_TOP_ACLK133_MASK (0x7 << EXYNOS4_CLKDIV_TOP_ACLK133_SHIFT)
222#define EXYNOS4_CLKDIV_TOP_ONENAND_SHIFT (16)
223#define EXYNOS4_CLKDIV_TOP_ONENAND_MASK (0x7 << EXYNOS4_CLKDIV_TOP_ONENAND_SHIFT)
224#define EXYNOS4_CLKDIV_TOP_ACLK266_GPS_SHIFT (20)
225#define EXYNOS4_CLKDIV_TOP_ACLK266_GPS_MASK (0x7 << EXYNOS4_CLKDIV_TOP_ACLK266_GPS_SHIFT)
226#define EXYNOS4_CLKDIV_TOP_ACLK400_MCUISP_SHIFT (24)
227#define EXYNOS4_CLKDIV_TOP_ACLK400_MCUISP_MASK (0x7 << EXYNOS4_CLKDIV_TOP_ACLK400_MCUISP_SHIFT)
228
229#define EXYNOS4_CLKDIV_BUS_GDLR_SHIFT (0)
230#define EXYNOS4_CLKDIV_BUS_GDLR_MASK (0x7 << EXYNOS4_CLKDIV_BUS_GDLR_SHIFT)
231#define EXYNOS4_CLKDIV_BUS_GPLR_SHIFT (4)
232#define EXYNOS4_CLKDIV_BUS_GPLR_MASK (0x7 << EXYNOS4_CLKDIV_BUS_GPLR_SHIFT)
233
234#define EXYNOS4_CLKDIV_CAM_FIMC0_SHIFT (0)
235#define EXYNOS4_CLKDIV_CAM_FIMC0_MASK (0xf << EXYNOS4_CLKDIV_CAM_FIMC0_SHIFT)
236#define EXYNOS4_CLKDIV_CAM_FIMC1_SHIFT (4)
237#define EXYNOS4_CLKDIV_CAM_FIMC1_MASK (0xf << EXYNOS4_CLKDIV_CAM_FIMC1_SHIFT)
238#define EXYNOS4_CLKDIV_CAM_FIMC2_SHIFT (8)
239#define EXYNOS4_CLKDIV_CAM_FIMC2_MASK (0xf << EXYNOS4_CLKDIV_CAM_FIMC2_SHIFT)
240#define EXYNOS4_CLKDIV_CAM_FIMC3_SHIFT (12)
241#define EXYNOS4_CLKDIV_CAM_FIMC3_MASK (0xf << EXYNOS4_CLKDIV_CAM_FIMC3_SHIFT)
242
243/* Only for EXYNOS4210 */
244
245#define EXYNOS4210_CLKSRC_LCD1 EXYNOS_CLKREG(0x0C238)
246#define EXYNOS4210_CLKSRC_MASK_LCD1 EXYNOS_CLKREG(0x0C338)
247#define EXYNOS4210_CLKDIV_LCD1 EXYNOS_CLKREG(0x0C538)
248#define EXYNOS4210_CLKGATE_IP_LCD1 EXYNOS_CLKREG(0x0C938)
249
250/* Only for EXYNOS4212 */
251
252#define EXYNOS4_CLKDIV_CAM1 EXYNOS_CLKREG(0x0C568)
253
254#define EXYNOS4_CLKDIV_STAT_CAM1 EXYNOS_CLKREG(0x0C668)
255
256#define EXYNOS4_CLKDIV_CAM1_JPEG_SHIFT (0)
257#define EXYNOS4_CLKDIV_CAM1_JPEG_MASK (0xf << EXYNOS4_CLKDIV_CAM1_JPEG_SHIFT)
258
259/* For EXYNOS5250 */
260
261#define EXYNOS5_APLL_LOCK EXYNOS_CLKREG(0x00000)
262#define EXYNOS5_APLL_CON0 EXYNOS_CLKREG(0x00100)
263#define EXYNOS5_CLKSRC_CPU EXYNOS_CLKREG(0x00200)
264#define EXYNOS5_CLKMUX_STATCPU EXYNOS_CLKREG(0x00400)
265#define EXYNOS5_CLKDIV_CPU0 EXYNOS_CLKREG(0x00500)
266#define EXYNOS5_CLKDIV_CPU1 EXYNOS_CLKREG(0x00504)
267#define EXYNOS5_CLKDIV_STATCPU0 EXYNOS_CLKREG(0x00600)
268#define EXYNOS5_CLKDIV_STATCPU1 EXYNOS_CLKREG(0x00604)
269
270#define EXYNOS5_PWR_CTRL1 EXYNOS_CLKREG(0x01020)
271#define EXYNOS5_PWR_CTRL2 EXYNOS_CLKREG(0x01024)
272
273#define EXYNOS5_MPLL_CON0 EXYNOS_CLKREG(0x04100)
274#define EXYNOS5_CLKSRC_CORE1 EXYNOS_CLKREG(0x04204)
275
276#define EXYNOS5_CLKGATE_IP_CORE EXYNOS_CLKREG(0x04900)
277
278#define EXYNOS5_CLKDIV_ACP EXYNOS_CLKREG(0x08500)
279
280#define EXYNOS5_EPLL_CON0 EXYNOS_CLKREG(0x10130)
281#define EXYNOS5_EPLL_CON1 EXYNOS_CLKREG(0x10134)
282#define EXYNOS5_EPLL_CON2 EXYNOS_CLKREG(0x10138)
283#define EXYNOS5_VPLL_CON0 EXYNOS_CLKREG(0x10140)
284#define EXYNOS5_VPLL_CON1 EXYNOS_CLKREG(0x10144)
285#define EXYNOS5_VPLL_CON2 EXYNOS_CLKREG(0x10148)
286#define EXYNOS5_CPLL_CON0 EXYNOS_CLKREG(0x10120)
287
288#define EXYNOS5_CLKSRC_TOP0 EXYNOS_CLKREG(0x10210)
289#define EXYNOS5_CLKSRC_TOP1 EXYNOS_CLKREG(0x10214)
290#define EXYNOS5_CLKSRC_TOP2 EXYNOS_CLKREG(0x10218)
291#define EXYNOS5_CLKSRC_TOP3 EXYNOS_CLKREG(0x1021C)
292#define EXYNOS5_CLKSRC_GSCL EXYNOS_CLKREG(0x10220)
293#define EXYNOS5_CLKSRC_DISP1_0 EXYNOS_CLKREG(0x1022C)
294#define EXYNOS5_CLKSRC_MAUDIO EXYNOS_CLKREG(0x10240)
295#define EXYNOS5_CLKSRC_FSYS EXYNOS_CLKREG(0x10244)
296#define EXYNOS5_CLKSRC_PERIC0 EXYNOS_CLKREG(0x10250)
297#define EXYNOS5_CLKSRC_PERIC1 EXYNOS_CLKREG(0x10254)
298#define EXYNOS5_SCLK_SRC_ISP EXYNOS_CLKREG(0x10270)
299
300#define EXYNOS5_CLKSRC_MASK_TOP EXYNOS_CLKREG(0x10310)
301#define EXYNOS5_CLKSRC_MASK_GSCL EXYNOS_CLKREG(0x10320)
302#define EXYNOS5_CLKSRC_MASK_DISP1_0 EXYNOS_CLKREG(0x1032C)
303#define EXYNOS5_CLKSRC_MASK_MAUDIO EXYNOS_CLKREG(0x10334)
304#define EXYNOS5_CLKSRC_MASK_FSYS EXYNOS_CLKREG(0x10340)
305#define EXYNOS5_CLKSRC_MASK_PERIC0 EXYNOS_CLKREG(0x10350)
306#define EXYNOS5_CLKSRC_MASK_PERIC1 EXYNOS_CLKREG(0x10354)
307
308#define EXYNOS5_CLKDIV_TOP0 EXYNOS_CLKREG(0x10510)
309#define EXYNOS5_CLKDIV_TOP1 EXYNOS_CLKREG(0x10514)
310#define EXYNOS5_CLKDIV_GSCL EXYNOS_CLKREG(0x10520)
311#define EXYNOS5_CLKDIV_DISP1_0 EXYNOS_CLKREG(0x1052C)
312#define EXYNOS5_CLKDIV_GEN EXYNOS_CLKREG(0x1053C)
313#define EXYNOS5_CLKDIV_MAUDIO EXYNOS_CLKREG(0x10544)
314#define EXYNOS5_CLKDIV_FSYS0 EXYNOS_CLKREG(0x10548)
315#define EXYNOS5_CLKDIV_FSYS1 EXYNOS_CLKREG(0x1054C)
316#define EXYNOS5_CLKDIV_FSYS2 EXYNOS_CLKREG(0x10550)
317#define EXYNOS5_CLKDIV_FSYS3 EXYNOS_CLKREG(0x10554)
318#define EXYNOS5_CLKDIV_PERIC0 EXYNOS_CLKREG(0x10558)
319#define EXYNOS5_CLKDIV_PERIC1 EXYNOS_CLKREG(0x1055C)
320#define EXYNOS5_CLKDIV_PERIC2 EXYNOS_CLKREG(0x10560)
321#define EXYNOS5_CLKDIV_PERIC3 EXYNOS_CLKREG(0x10564)
322#define EXYNOS5_CLKDIV_PERIC4 EXYNOS_CLKREG(0x10568)
323#define EXYNOS5_CLKDIV_PERIC5 EXYNOS_CLKREG(0x1056C)
324#define EXYNOS5_SCLK_DIV_ISP EXYNOS_CLKREG(0x10580)
325
326#define EXYNOS5_CLKGATE_IP_ACP EXYNOS_CLKREG(0x08800)
327#define EXYNOS5_CLKGATE_IP_ISP0 EXYNOS_CLKREG(0x0C800)
328#define EXYNOS5_CLKGATE_IP_ISP1 EXYNOS_CLKREG(0x0C804)
329#define EXYNOS5_CLKGATE_IP_GSCL EXYNOS_CLKREG(0x10920)
330#define EXYNOS5_CLKGATE_IP_DISP1 EXYNOS_CLKREG(0x10928)
331#define EXYNOS5_CLKGATE_IP_MFC EXYNOS_CLKREG(0x1092C)
332#define EXYNOS5_CLKGATE_IP_G3D EXYNOS_CLKREG(0x10930)
333#define EXYNOS5_CLKGATE_IP_GEN EXYNOS_CLKREG(0x10934)
334#define EXYNOS5_CLKGATE_IP_FSYS EXYNOS_CLKREG(0x10944)
335#define EXYNOS5_CLKGATE_IP_GPS EXYNOS_CLKREG(0x1094C)
336#define EXYNOS5_CLKGATE_IP_PERIC EXYNOS_CLKREG(0x10950)
337#define EXYNOS5_CLKGATE_IP_PERIS EXYNOS_CLKREG(0x10960)
338#define EXYNOS5_CLKGATE_BLOCK EXYNOS_CLKREG(0x10980)
339
340#define EXYNOS5_BPLL_CON0 EXYNOS_CLKREG(0x20110)
341#define EXYNOS5_CLKSRC_CDREX EXYNOS_CLKREG(0x20200)
342#define EXYNOS5_CLKDIV_CDREX EXYNOS_CLKREG(0x20500)
343
344#define EXYNOS5_PLL_DIV2_SEL EXYNOS_CLKREG(0x20A24)
345
346#define EXYNOS5_EPLL_LOCK EXYNOS_CLKREG(0x10030)
347
348#define EXYNOS5_EPLLCON0_LOCKED_SHIFT (29)
349
350#define PWR_CTRL1_CORE2_DOWN_RATIO (7 << 28)
351#define PWR_CTRL1_CORE1_DOWN_RATIO (7 << 16)
352#define PWR_CTRL1_DIV2_DOWN_EN (1 << 9)
353#define PWR_CTRL1_DIV1_DOWN_EN (1 << 8)
354#define PWR_CTRL1_USE_CORE1_WFE (1 << 5)
355#define PWR_CTRL1_USE_CORE0_WFE (1 << 4)
356#define PWR_CTRL1_USE_CORE1_WFI (1 << 1)
357#define PWR_CTRL1_USE_CORE0_WFI (1 << 0)
358
359#define PWR_CTRL2_DIV2_UP_EN (1 << 25)
360#define PWR_CTRL2_DIV1_UP_EN (1 << 24)
361#define PWR_CTRL2_DUR_STANDBY2_VAL (1 << 16)
362#define PWR_CTRL2_DUR_STANDBY1_VAL (1 << 8)
363#define PWR_CTRL2_CORE2_UP_RATIO (1 << 4)
364#define PWR_CTRL2_CORE1_UP_RATIO (1 << 0)
365
366/* Compatibility defines and inclusion */
367
368#include <mach/regs-pmu.h>
369
370#define S5P_EPLL_CON EXYNOS4_EPLL_CON0
371
372#endif /* __ASM_ARCH_REGS_CLOCK_H */
diff --git a/arch/arm/mach-exynos/include/mach/regs-irq.h b/arch/arm/mach-exynos/include/mach/regs-irq.h
deleted file mode 100644
index f2b50506b9f6..000000000000
--- a/arch/arm/mach-exynos/include/mach/regs-irq.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/* linux/arch/arm/mach-exynos4/include/mach/regs-irq.h
2 *
3 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * EXYNOS4 - IRQ register definitions
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 __ASM_ARCH_REGS_IRQ_H
14#define __ASM_ARCH_REGS_IRQ_H __FILE__
15
16#include <linux/irqchip/arm-gic.h>
17#include <mach/map.h>
18
19#endif /* __ASM_ARCH_REGS_IRQ_H */
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c
index 1fe075a70c1e..65a46465ac5e 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -14,10 +14,10 @@
14#include <linux/io.h> 14#include <linux/io.h>
15 15
16#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
17#include <mach/regs-pmu.h>
18#include <plat/mfc.h> 17#include <plat/mfc.h>
19 18
20#include "common.h" 19#include "common.h"
20#include "regs-pmu.h"
21 21
22static void __init exynos5_dt_machine_init(void) 22static void __init exynos5_dt_machine_init(void)
23{ 23{
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 58b43e6f9262..8ea02f63fed9 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -27,12 +27,11 @@
27#include <asm/firmware.h> 27#include <asm/firmware.h>
28 28
29#include <mach/hardware.h> 29#include <mach/hardware.h>
30#include <mach/regs-clock.h>
31#include <mach/regs-pmu.h>
32 30
33#include <plat/cpu.h> 31#include <plat/cpu.h>
34 32
35#include "common.h" 33#include "common.h"
34#include "regs-pmu.h"
36 35
37extern void exynos4_secondary_startup(void); 36extern void exynos4_secondary_startup(void);
38 37
@@ -64,8 +63,7 @@ static void write_pen_release(int val)
64{ 63{
65 pen_release = val; 64 pen_release = val;
66 smp_wmb(); 65 smp_wmb();
67 __cpuc_flush_dcache_area((void *)&pen_release, sizeof(pen_release)); 66 sync_cache_w(&pen_release);
68 outer_clean_range(__pa(&pen_release), __pa(&pen_release + 1));
69} 67}
70 68
71static void __iomem *scu_base_addr(void) 69static void __iomem *scu_base_addr(void)
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index c679db577269..e00025bbbe89 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -29,14 +29,37 @@
29#include <plat/pll.h> 29#include <plat/pll.h>
30#include <plat/regs-srom.h> 30#include <plat/regs-srom.h>
31 31
32#include <mach/regs-irq.h> 32#include <mach/map.h>
33#include <mach/regs-clock.h>
34#include <mach/regs-pmu.h>
35#include <mach/pm-core.h> 33#include <mach/pm-core.h>
36 34
37#include "common.h" 35#include "common.h"
36#include "regs-pmu.h"
38 37
39static struct sleep_save exynos4_set_clksrc[] = { 38#define EXYNOS4_EPLL_LOCK (S5P_VA_CMU + 0x0C010)
39#define EXYNOS4_VPLL_LOCK (S5P_VA_CMU + 0x0C020)
40
41#define EXYNOS4_EPLL_CON0 (S5P_VA_CMU + 0x0C110)
42#define EXYNOS4_EPLL_CON1 (S5P_VA_CMU + 0x0C114)
43#define EXYNOS4_VPLL_CON0 (S5P_VA_CMU + 0x0C120)
44#define EXYNOS4_VPLL_CON1 (S5P_VA_CMU + 0x0C124)
45
46#define EXYNOS4_CLKSRC_MASK_TOP (S5P_VA_CMU + 0x0C310)
47#define EXYNOS4_CLKSRC_MASK_CAM (S5P_VA_CMU + 0x0C320)
48#define EXYNOS4_CLKSRC_MASK_TV (S5P_VA_CMU + 0x0C324)
49#define EXYNOS4_CLKSRC_MASK_LCD0 (S5P_VA_CMU + 0x0C334)
50#define EXYNOS4_CLKSRC_MASK_MAUDIO (S5P_VA_CMU + 0x0C33C)
51#define EXYNOS4_CLKSRC_MASK_FSYS (S5P_VA_CMU + 0x0C340)
52#define EXYNOS4_CLKSRC_MASK_PERIL0 (S5P_VA_CMU + 0x0C350)
53#define EXYNOS4_CLKSRC_MASK_PERIL1 (S5P_VA_CMU + 0x0C354)
54
55#define EXYNOS4_CLKSRC_MASK_DMC (S5P_VA_CMU + 0x10300)
56
57#define EXYNOS4_EPLLCON0_LOCKED_SHIFT (29)
58#define EXYNOS4_VPLLCON0_LOCKED_SHIFT (29)
59
60#define EXYNOS4210_CLKSRC_MASK_LCD1 (S5P_VA_CMU + 0x0C338)
61
62static const struct sleep_save exynos4_set_clksrc[] = {
40 { .reg = EXYNOS4_CLKSRC_MASK_TOP , .val = 0x00000001, }, 63 { .reg = EXYNOS4_CLKSRC_MASK_TOP , .val = 0x00000001, },
41 { .reg = EXYNOS4_CLKSRC_MASK_CAM , .val = 0x11111111, }, 64 { .reg = EXYNOS4_CLKSRC_MASK_CAM , .val = 0x11111111, },
42 { .reg = EXYNOS4_CLKSRC_MASK_TV , .val = 0x00000111, }, 65 { .reg = EXYNOS4_CLKSRC_MASK_TV , .val = 0x00000111, },
@@ -48,7 +71,7 @@ static struct sleep_save exynos4_set_clksrc[] = {
48 { .reg = EXYNOS4_CLKSRC_MASK_DMC , .val = 0x00010000, }, 71 { .reg = EXYNOS4_CLKSRC_MASK_DMC , .val = 0x00010000, },
49}; 72};
50 73
51static struct sleep_save exynos4210_set_clksrc[] = { 74static const struct sleep_save exynos4210_set_clksrc[] = {
52 { .reg = EXYNOS4210_CLKSRC_MASK_LCD1 , .val = 0x00001111, }, 75 { .reg = EXYNOS4210_CLKSRC_MASK_LCD1 , .val = 0x00001111, },
53}; 76};
54 77
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index 1703593e366c..8fd24882f0b1 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -22,9 +22,10 @@
22#include <linux/of_platform.h> 22#include <linux/of_platform.h>
23#include <linux/sched.h> 23#include <linux/sched.h>
24 24
25#include <mach/regs-pmu.h>
26#include <plat/devs.h> 25#include <plat/devs.h>
27 26
27#include "regs-pmu.h"
28
28/* 29/*
29 * Exynos specific wrapper around the generic power domain 30 * Exynos specific wrapper around the generic power domain
30 */ 31 */
@@ -183,9 +184,3 @@ static __init int exynos4_pm_init_power_domain(void)
183 return 0; 184 return 0;
184} 185}
185arch_initcall(exynos4_pm_init_power_domain); 186arch_initcall(exynos4_pm_init_power_domain);
186
187int __init exynos_pm_late_initcall(void)
188{
189 pm_genpd_poweroff_unused();
190 return 0;
191}
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c
index 97d688526258..05c7ce15322a 100644
--- a/arch/arm/mach-exynos/pmu.c
+++ b/arch/arm/mach-exynos/pmu.c
@@ -13,13 +13,14 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/bug.h> 14#include <linux/bug.h>
15 15
16#include <mach/regs-clock.h> 16#include <plat/cpu.h>
17 17
18#include "common.h" 18#include "common.h"
19#include "regs-pmu.h"
19 20
20static struct exynos_pmu_conf *exynos_pmu_config; 21static const struct exynos_pmu_conf *exynos_pmu_config;
21 22
22static struct exynos_pmu_conf exynos4210_pmu_config[] = { 23static const struct exynos_pmu_conf exynos4210_pmu_config[] = {
23 /* { .reg = address, .val = { AFTR, LPA, SLEEP } */ 24 /* { .reg = address, .val = { AFTR, LPA, SLEEP } */
24 { S5P_ARM_CORE0_LOWPWR, { 0x0, 0x0, 0x2 } }, 25 { S5P_ARM_CORE0_LOWPWR, { 0x0, 0x0, 0x2 } },
25 { S5P_DIS_IRQ_CORE0, { 0x0, 0x0, 0x0 } }, 26 { S5P_DIS_IRQ_CORE0, { 0x0, 0x0, 0x0 } },
@@ -95,7 +96,7 @@ static struct exynos_pmu_conf exynos4210_pmu_config[] = {
95 { PMU_TABLE_END,}, 96 { PMU_TABLE_END,},
96}; 97};
97 98
98static struct exynos_pmu_conf exynos4x12_pmu_config[] = { 99static const struct exynos_pmu_conf exynos4x12_pmu_config[] = {
99 { S5P_ARM_CORE0_LOWPWR, { 0x0, 0x0, 0x2 } }, 100 { S5P_ARM_CORE0_LOWPWR, { 0x0, 0x0, 0x2 } },
100 { S5P_DIS_IRQ_CORE0, { 0x0, 0x0, 0x0 } }, 101 { S5P_DIS_IRQ_CORE0, { 0x0, 0x0, 0x0 } },
101 { S5P_DIS_IRQ_CENTRAL0, { 0x0, 0x0, 0x0 } }, 102 { S5P_DIS_IRQ_CENTRAL0, { 0x0, 0x0, 0x0 } },
@@ -203,7 +204,7 @@ static struct exynos_pmu_conf exynos4x12_pmu_config[] = {
203 { PMU_TABLE_END,}, 204 { PMU_TABLE_END,},
204}; 205};
205 206
206static struct exynos_pmu_conf exynos4412_pmu_config[] = { 207static const struct exynos_pmu_conf exynos4412_pmu_config[] = {
207 { S5P_ARM_CORE2_LOWPWR, { 0x0, 0x0, 0x2 } }, 208 { S5P_ARM_CORE2_LOWPWR, { 0x0, 0x0, 0x2 } },
208 { S5P_DIS_IRQ_CORE2, { 0x0, 0x0, 0x0 } }, 209 { S5P_DIS_IRQ_CORE2, { 0x0, 0x0, 0x0 } },
209 { S5P_DIS_IRQ_CENTRAL2, { 0x0, 0x0, 0x0 } }, 210 { S5P_DIS_IRQ_CENTRAL2, { 0x0, 0x0, 0x0 } },
@@ -213,7 +214,7 @@ static struct exynos_pmu_conf exynos4412_pmu_config[] = {
213 { PMU_TABLE_END,}, 214 { PMU_TABLE_END,},
214}; 215};
215 216
216static struct exynos_pmu_conf exynos5250_pmu_config[] = { 217static const struct exynos_pmu_conf exynos5250_pmu_config[] = {
217 /* { .reg = address, .val = { AFTR, LPA, SLEEP } */ 218 /* { .reg = address, .val = { AFTR, LPA, SLEEP } */
218 { EXYNOS5_ARM_CORE0_SYS_PWR_REG, { 0x0, 0x0, 0x2} }, 219 { EXYNOS5_ARM_CORE0_SYS_PWR_REG, { 0x0, 0x0, 0x2} },
219 { EXYNOS5_DIS_IRQ_ARM_CORE0_LOCAL_SYS_PWR_REG, { 0x0, 0x0, 0x0} }, 220 { EXYNOS5_DIS_IRQ_ARM_CORE0_LOCAL_SYS_PWR_REG, { 0x0, 0x0, 0x0} },
@@ -317,7 +318,7 @@ static struct exynos_pmu_conf exynos5250_pmu_config[] = {
317 { PMU_TABLE_END,}, 318 { PMU_TABLE_END,},
318}; 319};
319 320
320static void __iomem *exynos5_list_both_cnt_feed[] = { 321static void __iomem * const exynos5_list_both_cnt_feed[] = {
321 EXYNOS5_ARM_CORE0_OPTION, 322 EXYNOS5_ARM_CORE0_OPTION,
322 EXYNOS5_ARM_CORE1_OPTION, 323 EXYNOS5_ARM_CORE1_OPTION,
323 EXYNOS5_ARM_COMMON_OPTION, 324 EXYNOS5_ARM_COMMON_OPTION,
@@ -331,7 +332,7 @@ static void __iomem *exynos5_list_both_cnt_feed[] = {
331 EXYNOS5_TOP_PWR_SYSMEM_OPTION, 332 EXYNOS5_TOP_PWR_SYSMEM_OPTION,
332}; 333};
333 334
334static void __iomem *exynos5_list_diable_wfi_wfe[] = { 335static void __iomem * const exynos5_list_diable_wfi_wfe[] = {
335 EXYNOS5_ARM_CORE1_OPTION, 336 EXYNOS5_ARM_CORE1_OPTION,
336 EXYNOS5_FSYS_ARM_OPTION, 337 EXYNOS5_FSYS_ARM_OPTION,
337 EXYNOS5_ISP_ARM_OPTION, 338 EXYNOS5_ISP_ARM_OPTION,
diff --git a/arch/arm/mach-exynos/include/mach/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h
index 2cdb63e8ce5c..7c029ce27711 100644
--- a/arch/arm/mach-exynos/include/mach/regs-pmu.h
+++ b/arch/arm/mach-exynos/regs-pmu.h
@@ -24,31 +24,16 @@
24#define S5P_CENTRAL_SEQ_OPTION S5P_PMUREG(0x0208) 24#define S5P_CENTRAL_SEQ_OPTION S5P_PMUREG(0x0208)
25 25
26#define S5P_USE_STANDBY_WFI0 (1 << 16) 26#define S5P_USE_STANDBY_WFI0 (1 << 16)
27#define S5P_USE_STANDBY_WFI1 (1 << 17)
28#define S5P_USE_STANDBYWFI_ISP_ARM (1 << 18)
29#define S5P_USE_STANDBY_WFE0 (1 << 24) 27#define S5P_USE_STANDBY_WFE0 (1 << 24)
30#define S5P_USE_STANDBY_WFE1 (1 << 25)
31#define S5P_USE_STANDBYWFE_ISP_ARM (1 << 26)
32 28
33#define S5P_SWRESET S5P_PMUREG(0x0400) 29#define S5P_SWRESET S5P_PMUREG(0x0400)
34#define EXYNOS_SWRESET S5P_PMUREG(0x0400) 30#define EXYNOS_SWRESET S5P_PMUREG(0x0400)
35#define EXYNOS5440_SWRESET S5P_PMUREG(0x00C4) 31#define EXYNOS5440_SWRESET S5P_PMUREG(0x00C4)
36 32
37#define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) 33#define S5P_WAKEUP_STAT S5P_PMUREG(0x0600)
38#define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604)
39#define S5P_WAKEUP_MASK S5P_PMUREG(0x0608)
40
41#define S5P_HDMI_PHY_CONTROL S5P_PMUREG(0x0700)
42#define S5P_HDMI_PHY_ENABLE (1 << 0)
43
44#define S5P_DAC_PHY_CONTROL S5P_PMUREG(0x070C)
45#define S5P_DAC_PHY_ENABLE (1 << 0)
46 34
47#define S5P_INFORM0 S5P_PMUREG(0x0800) 35#define S5P_INFORM0 S5P_PMUREG(0x0800)
48#define S5P_INFORM1 S5P_PMUREG(0x0804) 36#define S5P_INFORM1 S5P_PMUREG(0x0804)
49#define S5P_INFORM2 S5P_PMUREG(0x0808)
50#define S5P_INFORM3 S5P_PMUREG(0x080C)
51#define S5P_INFORM4 S5P_PMUREG(0x0810)
52#define S5P_INFORM5 S5P_PMUREG(0x0814) 37#define S5P_INFORM5 S5P_PMUREG(0x0814)
53#define S5P_INFORM6 S5P_PMUREG(0x0818) 38#define S5P_INFORM6 S5P_PMUREG(0x0818)
54#define S5P_INFORM7 S5P_PMUREG(0x081C) 39#define S5P_INFORM7 S5P_PMUREG(0x081C)
@@ -119,23 +104,8 @@
119#define S5P_GPS_LOWPWR S5P_PMUREG(0x139C) 104#define S5P_GPS_LOWPWR S5P_PMUREG(0x139C)
120#define S5P_GPS_ALIVE_LOWPWR S5P_PMUREG(0x13A0) 105#define S5P_GPS_ALIVE_LOWPWR S5P_PMUREG(0x13A0)
121 106
122#define S5P_ARM_CORE0_CONFIGURATION S5P_PMUREG(0x2000)
123#define S5P_ARM_CORE0_OPTION S5P_PMUREG(0x2008)
124#define S5P_ARM_CORE1_CONFIGURATION S5P_PMUREG(0x2080) 107#define S5P_ARM_CORE1_CONFIGURATION S5P_PMUREG(0x2080)
125#define S5P_ARM_CORE1_STATUS S5P_PMUREG(0x2084) 108#define S5P_ARM_CORE1_STATUS S5P_PMUREG(0x2084)
126#define S5P_ARM_CORE1_OPTION S5P_PMUREG(0x2088)
127
128#define S5P_ARM_COMMON_OPTION S5P_PMUREG(0x2408)
129#define S5P_TOP_PWR_OPTION S5P_PMUREG(0x2C48)
130#define S5P_CAM_OPTION S5P_PMUREG(0x3C08)
131#define S5P_TV_OPTION S5P_PMUREG(0x3C28)
132#define S5P_MFC_OPTION S5P_PMUREG(0x3C48)
133#define S5P_G3D_OPTION S5P_PMUREG(0x3C68)
134#define S5P_LCD0_OPTION S5P_PMUREG(0x3C88)
135#define S5P_LCD1_OPTION S5P_PMUREG(0x3CA8)
136#define S5P_MAUDIO_OPTION S5P_PMUREG(0x3CC8)
137#define S5P_GPS_OPTION S5P_PMUREG(0x3CE8)
138#define S5P_GPS_ALIVE_OPTION S5P_PMUREG(0x3D08)
139 109
140#define S5P_PAD_RET_MAUDIO_OPTION S5P_PMUREG(0x3028) 110#define S5P_PAD_RET_MAUDIO_OPTION S5P_PMUREG(0x3028)
141#define S5P_PAD_RET_GPIO_OPTION S5P_PMUREG(0x3108) 111#define S5P_PAD_RET_GPIO_OPTION S5P_PMUREG(0x3108)
@@ -145,28 +115,12 @@
145#define S5P_PAD_RET_EBIA_OPTION S5P_PMUREG(0x3188) 115#define S5P_PAD_RET_EBIA_OPTION S5P_PMUREG(0x3188)
146#define S5P_PAD_RET_EBIB_OPTION S5P_PMUREG(0x31A8) 116#define S5P_PAD_RET_EBIB_OPTION S5P_PMUREG(0x31A8)
147 117
148#define S5P_PMU_CAM_CONF S5P_PMUREG(0x3C00)
149#define S5P_PMU_TV_CONF S5P_PMUREG(0x3C20)
150#define S5P_PMU_MFC_CONF S5P_PMUREG(0x3C40)
151#define S5P_PMU_G3D_CONF S5P_PMUREG(0x3C60)
152#define S5P_PMU_LCD0_CONF S5P_PMUREG(0x3C80)
153#define S5P_PMU_GPS_CONF S5P_PMUREG(0x3CE0)
154
155#define S5P_PMU_SATA_PHY_CONTROL_EN 0x1
156#define S5P_CORE_LOCAL_PWR_EN 0x3 118#define S5P_CORE_LOCAL_PWR_EN 0x3
157#define S5P_INT_LOCAL_PWR_EN 0x7 119#define S5P_INT_LOCAL_PWR_EN 0x7
158 120
159#define S5P_CHECK_SLEEP 0x00000BAD 121#define S5P_CHECK_SLEEP 0x00000BAD
160 122
161/* Only for EXYNOS4210 */ 123/* Only for EXYNOS4210 */
162#define S5P_USBDEVICE_PHY_CONTROL S5P_PMUREG(0x0704)
163#define S5P_USBDEVICE_PHY_ENABLE (1 << 0)
164
165#define S5P_USBHOST_PHY_CONTROL S5P_PMUREG(0x0708)
166#define S5P_USBHOST_PHY_ENABLE (1 << 0)
167
168#define S5P_PMU_SATA_PHY_CONTROL S5P_PMUREG(0x0720)
169
170#define S5P_CMU_CLKSTOP_LCD1_LOWPWR S5P_PMUREG(0x1154) 124#define S5P_CMU_CLKSTOP_LCD1_LOWPWR S5P_PMUREG(0x1154)
171#define S5P_CMU_RESET_LCD1_LOWPWR S5P_PMUREG(0x1174) 125#define S5P_CMU_RESET_LCD1_LOWPWR S5P_PMUREG(0x1174)
172#define S5P_MODIMIF_MEM_LOWPWR S5P_PMUREG(0x11C4) 126#define S5P_MODIMIF_MEM_LOWPWR S5P_PMUREG(0x11C4)
@@ -174,8 +128,6 @@
174#define S5P_SATA_MEM_LOWPWR S5P_PMUREG(0x11E4) 128#define S5P_SATA_MEM_LOWPWR S5P_PMUREG(0x11E4)
175#define S5P_LCD1_LOWPWR S5P_PMUREG(0x1394) 129#define S5P_LCD1_LOWPWR S5P_PMUREG(0x1394)
176 130
177#define S5P_PMU_LCD1_CONF S5P_PMUREG(0x3CA0)
178
179/* Only for EXYNOS4x12 */ 131/* Only for EXYNOS4x12 */
180#define S5P_ISP_ARM_LOWPWR S5P_PMUREG(0x1050) 132#define S5P_ISP_ARM_LOWPWR S5P_PMUREG(0x1050)
181#define S5P_DIS_IRQ_ISP_ARM_LOCAL_LOWPWR S5P_PMUREG(0x1054) 133#define S5P_DIS_IRQ_ISP_ARM_LOCAL_LOWPWR S5P_PMUREG(0x1054)
@@ -343,13 +295,9 @@
343#define EXYNOS5_TOP_PWR_OPTION S5P_PMUREG(0x2C48) 295#define EXYNOS5_TOP_PWR_OPTION S5P_PMUREG(0x2C48)
344#define EXYNOS5_TOP_PWR_SYSMEM_OPTION S5P_PMUREG(0x2CC8) 296#define EXYNOS5_TOP_PWR_SYSMEM_OPTION S5P_PMUREG(0x2CC8)
345#define EXYNOS5_JPEG_MEM_OPTION S5P_PMUREG(0x2F48) 297#define EXYNOS5_JPEG_MEM_OPTION S5P_PMUREG(0x2F48)
346#define EXYNOS5_GSCL_STATUS S5P_PMUREG(0x4004)
347#define EXYNOS5_ISP_STATUS S5P_PMUREG(0x4024)
348#define EXYNOS5_GSCL_OPTION S5P_PMUREG(0x4008) 298#define EXYNOS5_GSCL_OPTION S5P_PMUREG(0x4008)
349#define EXYNOS5_ISP_OPTION S5P_PMUREG(0x4028) 299#define EXYNOS5_ISP_OPTION S5P_PMUREG(0x4028)
350#define EXYNOS5_MFC_OPTION S5P_PMUREG(0x4048) 300#define EXYNOS5_MFC_OPTION S5P_PMUREG(0x4048)
351#define EXYNOS5_G3D_CONFIGURATION S5P_PMUREG(0x4060)
352#define EXYNOS5_G3D_STATUS S5P_PMUREG(0x4064)
353#define EXYNOS5_G3D_OPTION S5P_PMUREG(0x4068) 301#define EXYNOS5_G3D_OPTION S5P_PMUREG(0x4068)
354#define EXYNOS5_DISP1_OPTION S5P_PMUREG(0x40A8) 302#define EXYNOS5_DISP1_OPTION S5P_PMUREG(0x40A8)
355#define EXYNOS5_MAU_OPTION S5P_PMUREG(0x40C8) 303#define EXYNOS5_MAU_OPTION S5P_PMUREG(0x40C8)
@@ -357,7 +305,6 @@
357#define EXYNOS5_USE_SC_FEEDBACK (1 << 1) 305#define EXYNOS5_USE_SC_FEEDBACK (1 << 1)
358#define EXYNOS5_USE_SC_COUNTER (1 << 0) 306#define EXYNOS5_USE_SC_COUNTER (1 << 0)
359 307
360#define EXYNOS5_MANUAL_L2RSTDISABLE_CONTROL (1 << 2)
361#define EXYNOS5_SKIP_DEACTIVATE_ACEACP_IN_PWDN (1 << 7) 308#define EXYNOS5_SKIP_DEACTIVATE_ACEACP_IN_PWDN (1 << 7)
362 309
363#define EXYNOS5_OPTION_USE_STANDBYWFE (1 << 24) 310#define EXYNOS5_OPTION_USE_STANDBYWFE (1 << 24)
diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c
index 1f24c1fdfea4..5b57c17c06bd 100644
--- a/arch/arm/mach-imx/platsmp.c
+++ b/arch/arm/mach-imx/platsmp.c
@@ -92,8 +92,7 @@ static void __init imx_smp_prepare_cpus(unsigned int max_cpus)
92 * secondary cores when booting them. 92 * secondary cores when booting them.
93 */ 93 */
94 asm("mrc p15, 0, %0, c15, c0, 1" : "=r" (g_diag_reg) : : "cc"); 94 asm("mrc p15, 0, %0, c15, c0, 1" : "=r" (g_diag_reg) : : "cc");
95 __cpuc_flush_dcache_area(&g_diag_reg, sizeof(g_diag_reg)); 95 sync_cache_w(&g_diag_reg);
96 outer_clean_range(__pa(&g_diag_reg), __pa(&g_diag_reg + 1));
97} 96}
98 97
99struct smp_operations imx_smp_ops __initdata = { 98struct smp_operations imx_smp_ops __initdata = {
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 9caa4fe95913..78188159484d 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -10,55 +10,21 @@
10 * warranty of any kind, whether express or implied. 10 * warranty of any kind, whether express or implied.
11 */ 11 */
12 12
13#include <linux/clk.h>
13#include <linux/kernel.h> 14#include <linux/kernel.h>
14#include <linux/init.h> 15#include <linux/init.h>
15#include <linux/of.h> 16#include <linux/of.h>
16#include <linux/of_address.h> 17#include <linux/of_address.h>
17#include <linux/of_net.h> 18#include <linux/of_net.h>
18#include <linux/of_platform.h> 19#include <linux/of_platform.h>
19#include <linux/clk-provider.h>
20#include <linux/dma-mapping.h> 20#include <linux/dma-mapping.h>
21#include <linux/irqchip.h> 21#include <linux/irqchip.h>
22#include <linux/kexec.h> 22#include <linux/kexec.h>
23#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
24#include <asm/mach/map.h>
25#include <mach/bridge-regs.h> 24#include <mach/bridge-regs.h>
26#include <linux/platform_data/usb-ehci-orion.h>
27#include <plat/irq.h>
28#include <plat/common.h> 25#include <plat/common.h>
29#include "common.h" 26#include "common.h"
30 27
31/*
32 * There are still devices that doesn't know about DT yet. Get clock
33 * gates here and add a clock lookup alias, so that old platform
34 * devices still work.
35*/
36
37static void __init kirkwood_legacy_clk_init(void)
38{
39
40 struct device_node *np = of_find_compatible_node(
41 NULL, NULL, "marvell,kirkwood-gating-clock");
42 struct of_phandle_args clkspec;
43 struct clk *clk;
44
45 clkspec.np = np;
46 clkspec.args_count = 1;
47
48 /*
49 * The ethernet interfaces forget the MAC address assigned by
50 * u-boot if the clocks are turned off. Until proper DT support
51 * is available we always enable them for now.
52 */
53 clkspec.args[0] = CGC_BIT_GE0;
54 clk = of_clk_get_from_provider(&clkspec);
55 clk_prepare_enable(clk);
56
57 clkspec.args[0] = CGC_BIT_GE1;
58 clk = of_clk_get_from_provider(&clkspec);
59 clk_prepare_enable(clk);
60}
61
62#define MV643XX_ETH_MAC_ADDR_LOW 0x0414 28#define MV643XX_ETH_MAC_ADDR_LOW 0x0414
63#define MV643XX_ETH_MAC_ADDR_HIGH 0x0418 29#define MV643XX_ETH_MAC_ADDR_HIGH 0x0418
64 30
@@ -140,7 +106,7 @@ eth_fixup_skip:
140 106
141static void __init kirkwood_dt_init(void) 107static void __init kirkwood_dt_init(void)
142{ 108{
143 pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk); 109 pr_info("Kirkwood: %s.\n", kirkwood_id());
144 110
145 /* 111 /*
146 * Disable propagation of mbus errors to the CPU local bus, 112 * Disable propagation of mbus errors to the CPU local bus,
@@ -156,8 +122,6 @@ static void __init kirkwood_dt_init(void)
156 122
157 kirkwood_cpufreq_init(); 123 kirkwood_cpufreq_init();
158 kirkwood_cpuidle_init(); 124 kirkwood_cpuidle_init();
159 /* Setup clocks for legacy devices */
160 kirkwood_legacy_clk_init();
161 125
162 kirkwood_pm_init(); 126 kirkwood_pm_init();
163 kirkwood_dt_eth_fixup(); 127 kirkwood_dt_eth_fixup();
diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig
index ebdda8346a26..ebdba87b9671 100644
--- a/arch/arm/mach-mmp/Kconfig
+++ b/arch/arm/mach-mmp/Kconfig
@@ -136,4 +136,7 @@ config USB_EHCI_MV_U2O
136 help 136 help
137 Enables support for OTG controller which can be switched to host mode. 137 Enables support for OTG controller which can be switched to host mode.
138 138
139config MMP_SRAM
140 bool
141
139endif 142endif
diff --git a/arch/arm/mach-mmp/Makefile b/arch/arm/mach-mmp/Makefile
index 9b702a1dc7b0..98f0f6388e44 100644
--- a/arch/arm/mach-mmp/Makefile
+++ b/arch/arm/mach-mmp/Makefile
@@ -7,7 +7,8 @@ obj-y += common.o devices.o time.o
7# SoC support 7# SoC support
8obj-$(CONFIG_CPU_PXA168) += pxa168.o 8obj-$(CONFIG_CPU_PXA168) += pxa168.o
9obj-$(CONFIG_CPU_PXA910) += pxa910.o 9obj-$(CONFIG_CPU_PXA910) += pxa910.o
10obj-$(CONFIG_CPU_MMP2) += mmp2.o sram.o 10obj-$(CONFIG_CPU_MMP2) += mmp2.o
11obj-$(CONFIG_MMP_SRAM) += sram.o
11 12
12ifeq ($(CONFIG_COMMON_CLK), ) 13ifeq ($(CONFIG_COMMON_CLK), )
13obj-y += clock.o 14obj-y += clock.o
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c
index 3f06edcdd0ce..f10a1f58fde9 100644
--- a/arch/arm/mach-msm/platsmp.c
+++ b/arch/arm/mach-msm/platsmp.c
@@ -99,8 +99,7 @@ static int msm_boot_secondary(unsigned int cpu, struct task_struct *idle)
99 * "cpu" is Linux's internal ID. 99 * "cpu" is Linux's internal ID.
100 */ 100 */
101 pen_release = cpu_logical_map(cpu); 101 pen_release = cpu_logical_map(cpu);
102 __cpuc_flush_dcache_area((void *)&pen_release, sizeof(pen_release)); 102 sync_cache_w(&pen_release);
103 outer_clean_range(__pa(&pen_release), __pa(&pen_release + 1));
104 103
105 /* 104 /*
106 * Send the secondary CPU a soft interrupt, thereby causing 105 * Send the secondary CPU a soft interrupt, thereby causing
diff --git a/arch/arm/mach-mvebu/armada-370-xp.h b/arch/arm/mach-mvebu/armada-370-xp.h
index c612b2c4ed6c..237c86b83390 100644
--- a/arch/arm/mach-mvebu/armada-370-xp.h
+++ b/arch/arm/mach-mvebu/armada-370-xp.h
@@ -18,8 +18,12 @@
18#ifdef CONFIG_SMP 18#ifdef CONFIG_SMP
19#include <linux/cpumask.h> 19#include <linux/cpumask.h>
20 20
21#define ARMADA_XP_MAX_CPUS 4
22
21void armada_mpic_send_doorbell(const struct cpumask *mask, unsigned int irq); 23void armada_mpic_send_doorbell(const struct cpumask *mask, unsigned int irq);
22void armada_xp_mpic_smp_cpu_init(void); 24void armada_xp_mpic_smp_cpu_init(void);
25void armada_xp_secondary_startup(void);
26extern struct smp_operations armada_xp_smp_ops;
23#endif 27#endif
24 28
25#endif /* __MACH_ARMADA_370_XP_H */ 29#endif /* __MACH_ARMADA_370_XP_H */
diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c
index 58adf2fd9cfc..4e9d58148ca7 100644
--- a/arch/arm/mach-mvebu/coherency.c
+++ b/arch/arm/mach-mvebu/coherency.c
@@ -27,6 +27,7 @@
27#include <asm/smp_plat.h> 27#include <asm/smp_plat.h>
28#include <asm/cacheflush.h> 28#include <asm/cacheflush.h>
29#include "armada-370-xp.h" 29#include "armada-370-xp.h"
30#include "coherency.h"
30 31
31unsigned long coherency_phys_base; 32unsigned long coherency_phys_base;
32static void __iomem *coherency_base; 33static void __iomem *coherency_base;
diff --git a/arch/arm/mach-mvebu/coherency.h b/arch/arm/mach-mvebu/coherency.h
index df33ad8a6c08..760226c41353 100644
--- a/arch/arm/mach-mvebu/coherency.h
+++ b/arch/arm/mach-mvebu/coherency.h
@@ -14,7 +14,9 @@
14#ifndef __MACH_370_XP_COHERENCY_H 14#ifndef __MACH_370_XP_COHERENCY_H
15#define __MACH_370_XP_COHERENCY_H 15#define __MACH_370_XP_COHERENCY_H
16 16
17int set_cpu_coherent(int cpu_id, int smp_group_id); 17extern unsigned long coherency_phys_base;
18
19int set_cpu_coherent(unsigned int cpu_id, int smp_group_id);
18int coherency_init(void); 20int coherency_init(void);
19 21
20#endif /* __MACH_370_XP_COHERENCY_H */ 22#endif /* __MACH_370_XP_COHERENCY_H */
diff --git a/arch/arm/mach-mvebu/common.h b/arch/arm/mach-mvebu/common.h
index e366010e1d91..55449c487c9e 100644
--- a/arch/arm/mach-mvebu/common.h
+++ b/arch/arm/mach-mvebu/common.h
@@ -15,18 +15,10 @@
15#ifndef __ARCH_MVEBU_COMMON_H 15#ifndef __ARCH_MVEBU_COMMON_H
16#define __ARCH_MVEBU_COMMON_H 16#define __ARCH_MVEBU_COMMON_H
17 17
18#define ARMADA_XP_MAX_CPUS 4
19
20#include <linux/reboot.h> 18#include <linux/reboot.h>
21 19
22void mvebu_restart(enum reboot_mode mode, const char *cmd); 20void mvebu_restart(enum reboot_mode mode, const char *cmd);
23 21
24void armada_370_xp_init_irq(void);
25void armada_370_xp_handle_irq(struct pt_regs *regs);
26
27void armada_xp_cpu_die(unsigned int cpu); 22void armada_xp_cpu_die(unsigned int cpu);
28int armada_370_xp_coherency_init(void); 23
29int armada_370_xp_pmsu_init(void);
30void armada_xp_secondary_startup(void);
31extern struct smp_operations armada_xp_smp_ops;
32#endif 24#endif
diff --git a/arch/arm/mach-mvebu/hotplug.c b/arch/arm/mach-mvebu/hotplug.c
index b228b6a80c85..d95e91047168 100644
--- a/arch/arm/mach-mvebu/hotplug.c
+++ b/arch/arm/mach-mvebu/hotplug.c
@@ -15,6 +15,7 @@
15#include <linux/errno.h> 15#include <linux/errno.h>
16#include <linux/smp.h> 16#include <linux/smp.h>
17#include <asm/proc-fns.h> 17#include <asm/proc-fns.h>
18#include "common.h"
18 19
19/* 20/*
20 * platform-specific code to shutdown a CPU 21 * platform-specific code to shutdown a CPU
diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c
index ff69c2df298b..a6da03f5b24e 100644
--- a/arch/arm/mach-mvebu/platsmp.c
+++ b/arch/arm/mach-mvebu/platsmp.c
@@ -46,7 +46,7 @@ static struct clk *__init get_cpu_clk(int cpu)
46 return cpu_clk; 46 return cpu_clk;
47} 47}
48 48
49void __init set_secondary_cpus_clock(void) 49static void __init set_secondary_cpus_clock(void)
50{ 50{
51 int thiscpu, cpu; 51 int thiscpu, cpu;
52 unsigned long rate; 52 unsigned long rate;
@@ -94,7 +94,7 @@ static void __init armada_xp_smp_init_cpus(void)
94 set_smp_cross_call(armada_mpic_send_doorbell); 94 set_smp_cross_call(armada_mpic_send_doorbell);
95} 95}
96 96
97void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus) 97static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus)
98{ 98{
99 struct device_node *node; 99 struct device_node *node;
100 struct resource res; 100 struct resource res;
diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c
index 27fc4f049474..d71ef53107c4 100644
--- a/arch/arm/mach-mvebu/pmsu.c
+++ b/arch/arm/mach-mvebu/pmsu.c
@@ -22,6 +22,7 @@
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/smp.h> 23#include <linux/smp.h>
24#include <asm/smp_plat.h> 24#include <asm/smp_plat.h>
25#include "pmsu.h"
25 26
26static void __iomem *pmsu_mp_base; 27static void __iomem *pmsu_mp_base;
27static void __iomem *pmsu_reset_base; 28static void __iomem *pmsu_reset_base;
@@ -58,7 +59,7 @@ int armada_xp_boot_cpu(unsigned int cpu_id, void *boot_addr)
58} 59}
59#endif 60#endif
60 61
61int __init armada_370_xp_pmsu_init(void) 62static int __init armada_370_xp_pmsu_init(void)
62{ 63{
63 struct device_node *np; 64 struct device_node *np;
64 65
diff --git a/arch/arm/mach-mvebu/system-controller.c b/arch/arm/mach-mvebu/system-controller.c
index 5175083cdb34..a7fb89a5b5d9 100644
--- a/arch/arm/mach-mvebu/system-controller.c
+++ b/arch/arm/mach-mvebu/system-controller.c
@@ -27,6 +27,7 @@
27#include <linux/of_address.h> 27#include <linux/of_address.h>
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/reboot.h> 29#include <linux/reboot.h>
30#include "common.h"
30 31
31static void __iomem *system_controller_base; 32static void __iomem *system_controller_base;
32 33
@@ -39,14 +40,14 @@ struct mvebu_system_controller {
39}; 40};
40static struct mvebu_system_controller *mvebu_sc; 41static struct mvebu_system_controller *mvebu_sc;
41 42
42const struct mvebu_system_controller armada_370_xp_system_controller = { 43static const struct mvebu_system_controller armada_370_xp_system_controller = {
43 .rstoutn_mask_offset = 0x60, 44 .rstoutn_mask_offset = 0x60,
44 .system_soft_reset_offset = 0x64, 45 .system_soft_reset_offset = 0x64,
45 .rstoutn_mask_reset_out_en = 0x1, 46 .rstoutn_mask_reset_out_en = 0x1,
46 .system_soft_reset = 0x1, 47 .system_soft_reset = 0x1,
47}; 48};
48 49
49const struct mvebu_system_controller orion_system_controller = { 50static const struct mvebu_system_controller orion_system_controller = {
50 .rstoutn_mask_offset = 0x108, 51 .rstoutn_mask_offset = 0x108,
51 .system_soft_reset_offset = 0x10c, 52 .system_soft_reset_offset = 0x10c,
52 .rstoutn_mask_reset_out_en = 0x4, 53 .rstoutn_mask_reset_out_en = 0x4,
diff --git a/arch/arm/mach-orion5x/board-dt.c b/arch/arm/mach-orion5x/board-dt.c
index b91002ca92f3..c134a826070a 100644
--- a/arch/arm/mach-orion5x/board-dt.c
+++ b/arch/arm/mach-orion5x/board-dt.c
@@ -21,7 +21,7 @@
21#include <plat/irq.h> 21#include <plat/irq.h>
22#include "common.h" 22#include "common.h"
23 23
24struct of_dev_auxdata orion5x_auxdata_lookup[] __initdata = { 24static struct of_dev_auxdata orion5x_auxdata_lookup[] __initdata = {
25 OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL), 25 OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL),
26 OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0", 26 OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0",
27 NULL), 27 NULL),
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 91a5852b44f3..3f1de1111e0f 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -24,7 +24,6 @@
24#include <asm/page.h> 24#include <asm/page.h>
25#include <asm/setup.h> 25#include <asm/setup.h>
26#include <asm/system_misc.h> 26#include <asm/system_misc.h>
27#include <asm/timex.h>
28#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
29#include <asm/mach/map.h> 28#include <asm/mach/map.h>
30#include <asm/mach/time.h> 29#include <asm/mach/time.h>
@@ -135,7 +134,7 @@ void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data)
135/***************************************************************************** 134/*****************************************************************************
136 * SPI 135 * SPI
137 ****************************************************************************/ 136 ****************************************************************************/
138void __init orion5x_spi_init() 137void __init orion5x_spi_init(void)
139{ 138{
140 orion_spi_init(SPI_PHYS_BASE); 139 orion_spi_init(SPI_PHYS_BASE);
141} 140}
@@ -185,7 +184,7 @@ static void __init orion5x_crypto_init(void)
185/***************************************************************************** 184/*****************************************************************************
186 * Watchdog 185 * Watchdog
187 ****************************************************************************/ 186 ****************************************************************************/
188void __init orion5x_wdt_init(void) 187static void __init orion5x_wdt_init(void)
189{ 188{
190 orion_wdt_init(); 189 orion_wdt_init();
191} 190}
@@ -246,7 +245,7 @@ void orion5x_setup_wins(void)
246 245
247int orion5x_tclk; 246int orion5x_tclk;
248 247
249int __init orion5x_find_tclk(void) 248static int __init orion5x_find_tclk(void)
250{ 249{
251 u32 dev, rev; 250 u32 dev, rev;
252 251
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c
index 4b2aefd1d961..dc01c4ffc9a8 100644
--- a/arch/arm/mach-orion5x/db88f5281-setup.c
+++ b/arch/arm/mach-orion5x/db88f5281-setup.c
@@ -202,7 +202,7 @@ __initcall(db88f5281_7seg_init);
202 * PCI 202 * PCI
203 ****************************************************************************/ 203 ****************************************************************************/
204 204
205void __init db88f5281_pci_preinit(void) 205static void __init db88f5281_pci_preinit(void)
206{ 206{
207 int pin; 207 int pin;
208 208
diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion5x/irq.c
index 30a192b9c517..9654b0cc5892 100644
--- a/arch/arm/mach-orion5x/irq.c
+++ b/arch/arm/mach-orion5x/irq.c
@@ -16,6 +16,7 @@
16#include <mach/bridge-regs.h> 16#include <mach/bridge-regs.h>
17#include <plat/orion-gpio.h> 17#include <plat/orion-gpio.h>
18#include <plat/irq.h> 18#include <plat/irq.h>
19#include "common.h"
19 20
20static int __initdata gpio0_irqs[4] = { 21static int __initdata gpio0_irqs[4] = {
21 IRQ_ORION5X_GPIO_0_7, 22 IRQ_ORION5X_GPIO_0_7,
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c
index 7fab67053030..87a12d6930ff 100644
--- a/arch/arm/mach-orion5x/pci.c
+++ b/arch/arm/mach-orion5x/pci.c
@@ -240,11 +240,11 @@ static int __init pcie_setup(struct pci_sys_data *sys)
240#define PCI_BAR_SIZE_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc08) : \ 240#define PCI_BAR_SIZE_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc08) : \
241 ((n) == 1) ? ORION5X_PCI_REG(0xd08) : \ 241 ((n) == 1) ? ORION5X_PCI_REG(0xd08) : \
242 ((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \ 242 ((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \
243 ((n) == 3) ? ORION5X_PCI_REG(0xd0c) : 0) 243 ((n) == 3) ? ORION5X_PCI_REG(0xd0c) : NULL)
244#define PCI_BAR_REMAP_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc48) : \ 244#define PCI_BAR_REMAP_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc48) : \
245 ((n) == 1) ? ORION5X_PCI_REG(0xd48) : \ 245 ((n) == 1) ? ORION5X_PCI_REG(0xd48) : \
246 ((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \ 246 ((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \
247 ((n) == 3) ? ORION5X_PCI_REG(0xd4c) : 0) 247 ((n) == 3) ? ORION5X_PCI_REG(0xd4c) : NULL)
248#define PCI_BAR_ENABLE ORION5X_PCI_REG(0xc3c) 248#define PCI_BAR_ENABLE ORION5X_PCI_REG(0xc3c)
249#define PCI_ADDR_DECODE_CTRL ORION5X_PCI_REG(0xd3c) 249#define PCI_ADDR_DECODE_CTRL ORION5X_PCI_REG(0xd3c)
250 250
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c
index b1cf68493ffc..b576ef5f18a1 100644
--- a/arch/arm/mach-orion5x/rd88f5182-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
@@ -108,7 +108,7 @@ static struct platform_device rd88f5182_gpio_leds = {
108 * PCI 108 * PCI
109 ****************************************************************************/ 109 ****************************************************************************/
110 110
111void __init rd88f5182_pci_preinit(void) 111static void __init rd88f5182_pci_preinit(void)
112{ 112{
113 int pin; 113 int pin;
114 114
diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion5x/terastation_pro2-setup.c
index 7e9064844698..6208d125c1b9 100644
--- a/arch/arm/mach-orion5x/terastation_pro2-setup.c
+++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c
@@ -77,7 +77,7 @@ static struct platform_device tsp2_nor_flash = {
77#define TSP2_PCI_SLOT0_OFFS 7 77#define TSP2_PCI_SLOT0_OFFS 7
78#define TSP2_PCI_SLOT0_IRQ_PIN 11 78#define TSP2_PCI_SLOT0_IRQ_PIN 11
79 79
80void __init tsp2_pci_preinit(void) 80static void __init tsp2_pci_preinit(void)
81{ 81{
82 int pin; 82 int pin;
83 83
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c
index e90c0618fdad..9136797addb2 100644
--- a/arch/arm/mach-orion5x/ts209-setup.c
+++ b/arch/arm/mach-orion5x/ts209-setup.c
@@ -106,7 +106,7 @@ static struct platform_device qnap_ts209_nor_flash = {
106#define QNAP_TS209_PCI_SLOT0_IRQ_PIN 6 106#define QNAP_TS209_PCI_SLOT0_IRQ_PIN 6
107#define QNAP_TS209_PCI_SLOT1_IRQ_PIN 7 107#define QNAP_TS209_PCI_SLOT1_IRQ_PIN 7
108 108
109void __init qnap_ts209_pci_preinit(void) 109static void __init qnap_ts209_pci_preinit(void)
110{ 110{
111 int pin; 111 int pin;
112 112
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c
index e960855d32ac..db16dae441e2 100644
--- a/arch/arm/mach-orion5x/ts78xx-setup.c
+++ b/arch/arm/mach-orion5x/ts78xx-setup.c
@@ -57,7 +57,7 @@ static struct map_desc ts78xx_io_desc[] __initdata = {
57 }, 57 },
58}; 58};
59 59
60void __init ts78xx_map_io(void) 60static void __init ts78xx_map_io(void)
61{ 61{
62 orion5x_map_io(); 62 orion5x_map_io();
63 iotable_init(ts78xx_io_desc, ARRAY_SIZE(ts78xx_io_desc)); 63 iotable_init(ts78xx_io_desc, ARRAY_SIZE(ts78xx_io_desc));
diff --git a/arch/arm/mach-prima2/platsmp.c b/arch/arm/mach-prima2/platsmp.c
index 3dbcb1ab6e37..e358b0736dea 100644
--- a/arch/arm/mach-prima2/platsmp.c
+++ b/arch/arm/mach-prima2/platsmp.c
@@ -106,8 +106,7 @@ static int sirfsoc_boot_secondary(unsigned int cpu, struct task_struct *idle)
106 * "cpu" is Linux's internal ID. 106 * "cpu" is Linux's internal ID.
107 */ 107 */
108 pen_release = cpu_logical_map(cpu); 108 pen_release = cpu_logical_map(cpu);
109 __cpuc_flush_dcache_area((void *)&pen_release, sizeof(pen_release)); 109 sync_cache_w(&pen_release);
110 outer_clean_range(__pa(&pen_release), __pa(&pen_release + 1));
111 110
112 /* 111 /*
113 * Send the secondary CPU SEV, thereby causing the boot monitor to read 112 * Send the secondary CPU SEV, thereby causing the boot monitor to read
diff --git a/arch/arm/mach-pxa/am200epd.c b/arch/arm/mach-pxa/am200epd.c
index ffa6d811aad8..12fb0f4ae359 100644
--- a/arch/arm/mach-pxa/am200epd.c
+++ b/arch/arm/mach-pxa/am200epd.c
@@ -293,8 +293,7 @@ static int am200_setup_irq(struct fb_info *info)
293 int ret; 293 int ret;
294 294
295 ret = request_irq(PXA_GPIO_TO_IRQ(RDY_GPIO_PIN), am200_handle_irq, 295 ret = request_irq(PXA_GPIO_TO_IRQ(RDY_GPIO_PIN), am200_handle_irq,
296 IRQF_DISABLED|IRQF_TRIGGER_FALLING, 296 IRQF_TRIGGER_FALLING, "AM200", info->par);
297 "AM200", info->par);
298 if (ret) 297 if (ret)
299 dev_err(&am200_device->dev, "request_irq failed: %d\n", ret); 298 dev_err(&am200_device->dev, "request_irq failed: %d\n", ret);
300 299
diff --git a/arch/arm/mach-pxa/am300epd.c b/arch/arm/mach-pxa/am300epd.c
index 3dfec1ec462d..c9f309ae88c5 100644
--- a/arch/arm/mach-pxa/am300epd.c
+++ b/arch/arm/mach-pxa/am300epd.c
@@ -241,8 +241,7 @@ static int am300_setup_irq(struct fb_info *info)
241 struct broadsheetfb_par *par = info->par; 241 struct broadsheetfb_par *par = info->par;
242 242
243 ret = request_irq(PXA_GPIO_TO_IRQ(RDY_GPIO_PIN), am300_handle_irq, 243 ret = request_irq(PXA_GPIO_TO_IRQ(RDY_GPIO_PIN), am300_handle_irq,
244 IRQF_DISABLED|IRQF_TRIGGER_RISING, 244 IRQF_TRIGGER_RISING, "AM300", par);
245 "AM300", par);
246 if (ret) 245 if (ret)
247 dev_err(&am300_device->dev, "request_irq failed: %d\n", ret); 246 dev_err(&am300_device->dev, "request_irq failed: %d\n", ret);
248 247
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index 8eb4e23c561d..6915a9f6b3a3 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -564,8 +564,7 @@ static int em_x270_mci_init(struct device *dev,
564 } 564 }
565 565
566 err = request_irq(gpio_to_irq(mmc_cd), em_x270_detect_int, 566 err = request_irq(gpio_to_irq(mmc_cd), em_x270_detect_int,
567 IRQF_DISABLED | IRQF_TRIGGER_RISING | 567 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
568 IRQF_TRIGGER_FALLING,
569 "MMC card detect", data); 568 "MMC card detect", data);
570 if (err) { 569 if (err) {
571 dev_err(dev, "can't request MMC card detect IRQ: %d\n", err); 570 dev_err(dev, "can't request MMC card detect IRQ: %d\n", err);
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index b6cc1816463e..0eecd83c624e 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -235,8 +235,6 @@ static const struct of_device_id intc_ids[] __initconst = {
235void __init pxa_dt_irq_init(int (*fn)(struct irq_data *, unsigned int)) 235void __init pxa_dt_irq_init(int (*fn)(struct irq_data *, unsigned int))
236{ 236{
237 struct device_node *node; 237 struct device_node *node;
238 const struct of_device_id *of_id;
239 struct pxa_intc_conf *conf;
240 struct resource res; 238 struct resource res;
241 int n, ret; 239 int n, ret;
242 240
@@ -245,8 +243,6 @@ void __init pxa_dt_irq_init(int (*fn)(struct irq_data *, unsigned int))
245 pr_err("Failed to find interrupt controller in arch-pxa\n"); 243 pr_err("Failed to find interrupt controller in arch-pxa\n");
246 return; 244 return;
247 } 245 }
248 of_id = of_match_node(intc_ids, node);
249 conf = of_id->data;
250 246
251 ret = of_property_read_u32(node, "marvell,intc-nr-irqs", 247 ret = of_property_read_u32(node, "marvell,intc-nr-irqs",
252 &pxa_internal_irq_nr); 248 &pxa_internal_irq_nr);
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index fab30d666cc7..a9761c293028 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -634,7 +634,7 @@ static struct platform_device bq24022 = {
634static int magician_mci_init(struct device *dev, 634static int magician_mci_init(struct device *dev,
635 irq_handler_t detect_irq, void *data) 635 irq_handler_t detect_irq, void *data)
636{ 636{
637 return request_irq(IRQ_MAGICIAN_SD, detect_irq, IRQF_DISABLED, 637 return request_irq(IRQ_MAGICIAN_SD, detect_irq, 0,
638 "mmc card detect", data); 638 "mmc card detect", data);
639} 639}
640 640
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index 08ccc0718f31..78b84c0dfc79 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -401,7 +401,7 @@ static int mainstone_mci_init(struct device *dev, irq_handler_t mstone_detect_in
401 */ 401 */
402 MST_MSCWR1 &= ~MST_MSCWR1_MS_SEL; 402 MST_MSCWR1 &= ~MST_MSCWR1_MS_SEL;
403 403
404 err = request_irq(MAINSTONE_MMC_IRQ, mstone_detect_int, IRQF_DISABLED, 404 err = request_irq(MAINSTONE_MMC_IRQ, mstone_detect_int, 0,
405 "MMC card detect", data); 405 "MMC card detect", data);
406 if (err) 406 if (err)
407 printk(KERN_ERR "mainstone_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); 407 printk(KERN_ERR "mainstone_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index 9a4e470f162b..2897da2a5df6 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -327,7 +327,7 @@ static int pcm990_mci_init(struct device *dev, irq_handler_t mci_detect_int,
327{ 327{
328 int err; 328 int err;
329 329
330 err = request_irq(PCM027_MMCDET_IRQ, mci_detect_int, IRQF_DISABLED, 330 err = request_irq(PCM027_MMCDET_IRQ, mci_detect_int, 0,
331 "MMC card detect", data); 331 "MMC card detect", data);
332 if (err) 332 if (err)
333 printk(KERN_ERR "pcm990_mci_init: MMC/SD: can't request MMC " 333 printk(KERN_ERR "pcm990_mci_init: MMC/SD: can't request MMC "
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c
index 0a36d3585f26..051a6555cbf9 100644
--- a/arch/arm/mach-pxa/sharpsl_pm.c
+++ b/arch/arm/mach-pxa/sharpsl_pm.c
@@ -860,18 +860,18 @@ static int sharpsl_pm_probe(struct platform_device *pdev)
860 860
861 /* Register interrupt handlers */ 861 /* Register interrupt handlers */
862 irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_acin); 862 irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_acin);
863 if (request_irq(irq, sharpsl_ac_isr, IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, "AC Input Detect", sharpsl_ac_isr)) { 863 if (request_irq(irq, sharpsl_ac_isr, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, "AC Input Detect", sharpsl_ac_isr)) {
864 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", irq); 864 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", irq);
865 } 865 }
866 866
867 irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_batlock); 867 irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_batlock);
868 if (request_irq(irq, sharpsl_fatal_isr, IRQF_DISABLED | IRQF_TRIGGER_FALLING, "Battery Cover", sharpsl_fatal_isr)) { 868 if (request_irq(irq, sharpsl_fatal_isr, IRQF_TRIGGER_FALLING, "Battery Cover", sharpsl_fatal_isr)) {
869 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", irq); 869 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", irq);
870 } 870 }
871 871
872 if (sharpsl_pm.machinfo->gpio_fatal) { 872 if (sharpsl_pm.machinfo->gpio_fatal) {
873 irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_fatal); 873 irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_fatal);
874 if (request_irq(irq, sharpsl_fatal_isr, IRQF_DISABLED | IRQF_TRIGGER_FALLING, "Fatal Battery", sharpsl_fatal_isr)) { 874 if (request_irq(irq, sharpsl_fatal_isr, IRQF_TRIGGER_FALLING, "Fatal Battery", sharpsl_fatal_isr)) {
875 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", irq); 875 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", irq);
876 } 876 }
877 } 877 }
@@ -879,7 +879,7 @@ static int sharpsl_pm_probe(struct platform_device *pdev)
879 if (sharpsl_pm.machinfo->batfull_irq) { 879 if (sharpsl_pm.machinfo->batfull_irq) {
880 /* Register interrupt handler. */ 880 /* Register interrupt handler. */
881 irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_batfull); 881 irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_batfull);
882 if (request_irq(irq, sharpsl_chrg_full_isr, IRQF_DISABLED | IRQF_TRIGGER_RISING, "CO", sharpsl_chrg_full_isr)) { 882 if (request_irq(irq, sharpsl_chrg_full_isr, IRQF_TRIGGER_RISING, "CO", sharpsl_chrg_full_isr)) {
883 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", irq); 883 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", irq);
884 } 884 }
885 } 885 }
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index 9aa852a8fab9..5fdc9c4f05be 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -137,7 +137,7 @@ static struct clock_event_device ckevt_pxa_osmr0 = {
137 137
138static struct irqaction pxa_ost0_irq = { 138static struct irqaction pxa_ost0_irq = {
139 .name = "ost0", 139 .name = "ost0",
140 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 140 .flags = IRQF_TIMER | IRQF_IRQPOLL,
141 .handler = pxa_ost0_interrupt, 141 .handler = pxa_ost0_interrupt,
142 .dev_id = &ckevt_pxa_osmr0, 142 .dev_id = &ckevt_pxa_osmr0,
143}; 143};
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index c58043462acd..872dcb20e757 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -332,8 +332,7 @@ static int trizeps4_mci_init(struct device *dev, irq_handler_t mci_detect_int,
332 int err; 332 int err;
333 333
334 err = request_irq(TRIZEPS4_MMC_IRQ, mci_detect_int, 334 err = request_irq(TRIZEPS4_MMC_IRQ, mci_detect_int,
335 IRQF_DISABLED | IRQF_TRIGGER_RISING, 335 IRQF_TRIGGER_RISING, "MMC card detect", data);
336 "MMC card detect", data);
337 if (err) { 336 if (err) {
338 printk(KERN_ERR "trizeps4_mci_init: MMC/SD: can't request" 337 printk(KERN_ERR "trizeps4_mci_init: MMC/SD: can't request"
339 "MMC card detect IRQ\n"); 338 "MMC card detect IRQ\n");
diff --git a/arch/arm/mach-s3c24xx/dma.c b/arch/arm/mach-s3c24xx/dma.c
index 4a65cba3295d..a8dafc174fe3 100644
--- a/arch/arm/mach-s3c24xx/dma.c
+++ b/arch/arm/mach-s3c24xx/dma.c
@@ -742,7 +742,7 @@ int s3c2410_dma_request(enum dma_ch channel,
742 chan->irq_claimed = 1; 742 chan->irq_claimed = 1;
743 local_irq_restore(flags); 743 local_irq_restore(flags);
744 744
745 err = request_irq(chan->irq, s3c2410_dma_irq, IRQF_DISABLED, 745 err = request_irq(chan->irq, s3c2410_dma_irq, 0,
746 client->name, (void *)chan); 746 client->name, (void *)chan);
747 747
748 local_irq_save(flags); 748 local_irq_save(flags);
diff --git a/arch/arm/mach-s3c24xx/simtec-usb.c b/arch/arm/mach-s3c24xx/simtec-usb.c
index 8dea917e954b..b70aa66efebe 100644
--- a/arch/arm/mach-s3c24xx/simtec-usb.c
+++ b/arch/arm/mach-s3c24xx/simtec-usb.c
@@ -79,8 +79,7 @@ static void usb_simtec_enableoc(struct s3c2410_hcd_info *info, int on)
79 79
80 if (on) { 80 if (on) {
81 ret = request_irq(BAST_IRQ_USBOC, usb_simtec_ocirq, 81 ret = request_irq(BAST_IRQ_USBOC, usb_simtec_ocirq,
82 IRQF_DISABLED | IRQF_TRIGGER_RISING | 82 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
83 IRQF_TRIGGER_FALLING,
84 "USB Over-current", info); 83 "USB Over-current", info);
85 if (ret != 0) { 84 if (ret != 0) {
86 printk(KERN_ERR "failed to request usb oc irq\n"); 85 printk(KERN_ERR "failed to request usb oc irq\n");
diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c64xx/mach-smartq.c
index 5629df905fcd..6e72bd5c1d0c 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq.c
@@ -107,7 +107,7 @@ static void smartq_usb_host_enableoc(struct s3c2410_hcd_info *info, int on)
107 107
108 if (on) { 108 if (on) {
109 ret = request_irq(gpio_to_irq(S3C64XX_GPL(10)), 109 ret = request_irq(gpio_to_irq(S3C64XX_GPL(10)),
110 smartq_usb_host_ocirq, IRQF_DISABLED | 110 smartq_usb_host_ocirq,
111 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, 111 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
112 "USB host overcurrent", info); 112 "USB host overcurrent", info);
113 if (ret != 0) 113 if (ret != 0)
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c
index 0fa068e30a30..fe071a9130b7 100644
--- a/arch/arm/mach-shmobile/board-ape6evm.c
+++ b/arch/arm/mach-shmobile/board-ape6evm.c
@@ -168,7 +168,7 @@ static const struct sh_mmcif_plat_data mmcif0_pdata __initconst = {
168}; 168};
169 169
170static const struct resource mmcif0_resources[] __initconst = { 170static const struct resource mmcif0_resources[] __initconst = {
171 DEFINE_RES_MEM_NAMED(0xee200000, 0x100, "MMCIF0"), 171 DEFINE_RES_MEM(0xee200000, 0x100),
172 DEFINE_RES_IRQ(gic_spi(169)), 172 DEFINE_RES_IRQ(gic_spi(169)),
173}; 173};
174 174
@@ -179,7 +179,7 @@ static const struct sh_mobile_sdhi_info sdhi0_pdata __initconst = {
179}; 179};
180 180
181static const struct resource sdhi0_resources[] __initconst = { 181static const struct resource sdhi0_resources[] __initconst = {
182 DEFINE_RES_MEM_NAMED(0xee100000, 0x100, "SDHI0"), 182 DEFINE_RES_MEM(0xee100000, 0x100),
183 DEFINE_RES_IRQ(gic_spi(165)), 183 DEFINE_RES_IRQ(gic_spi(165)),
184}; 184};
185 185
@@ -191,7 +191,7 @@ static const struct sh_mobile_sdhi_info sdhi1_pdata __initconst = {
191}; 191};
192 192
193static const struct resource sdhi1_resources[] __initconst = { 193static const struct resource sdhi1_resources[] __initconst = {
194 DEFINE_RES_MEM_NAMED(0xee120000, 0x100, "SDHI1"), 194 DEFINE_RES_MEM(0xee120000, 0x100),
195 DEFINE_RES_IRQ(gic_spi(166)), 195 DEFINE_RES_IRQ(gic_spi(166)),
196}; 196};
197 197
diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c
index ae88fdad4b3a..1687df9b267f 100644
--- a/arch/arm/mach-shmobile/board-bockw-reference.c
+++ b/arch/arm/mach-shmobile/board-bockw-reference.c
@@ -19,7 +19,6 @@
19 */ 19 */
20 20
21#include <linux/of_platform.h> 21#include <linux/of_platform.h>
22#include <linux/pinctrl/machine.h>
23#include <mach/common.h> 22#include <mach/common.h>
24#include <mach/r8a7778.h> 23#include <mach/r8a7778.h>
25#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
index 1a1a4a888632..7df9ea0839db 100644
--- a/arch/arm/mach-shmobile/board-lager-reference.c
+++ b/arch/arm/mach-shmobile/board-lager-reference.c
@@ -20,16 +20,15 @@
20 20
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/of_platform.h> 22#include <linux/of_platform.h>
23#include <mach/rcar-gen2.h>
23#include <mach/r8a7790.h> 24#include <mach/r8a7790.h>
24#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
25 26
26static void __init lager_add_standard_devices(void) 27static void __init lager_add_standard_devices(void)
27{ 28{
28 /* clocks are setup late during boot in the case of DT */
29 r8a7790_clock_init(); 29 r8a7790_clock_init();
30
31 r8a7790_add_dt_devices(); 30 r8a7790_add_dt_devices();
32 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 31 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
33} 32}
34 33
35static const char *lager_boards_compat_dt[] __initdata = { 34static const char *lager_boards_compat_dt[] __initdata = {
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
index e0406fd37390..d1a8dddecfc8 100644
--- a/arch/arm/mach-shmobile/board-lager.c
+++ b/arch/arm/mach-shmobile/board-lager.c
@@ -148,7 +148,7 @@ static const struct sh_mmcif_plat_data mmcif1_pdata __initconst = {
148}; 148};
149 149
150static const struct resource mmcif1_resources[] __initconst = { 150static const struct resource mmcif1_resources[] __initconst = {
151 DEFINE_RES_MEM_NAMED(0xee220000, 0x80, "MMCIF1"), 151 DEFINE_RES_MEM(0xee220000, 0x80),
152 DEFINE_RES_IRQ(gic_spi(170)), 152 DEFINE_RES_IRQ(gic_spi(170)),
153}; 153};
154 154
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index da1352f5f71b..4f9e3ec42ddc 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -29,6 +29,7 @@
29#include <linux/leds.h> 29#include <linux/leds.h>
30#include <linux/dma-mapping.h> 30#include <linux/dma-mapping.h>
31#include <linux/pinctrl/machine.h> 31#include <linux/pinctrl/machine.h>
32#include <linux/platform_data/camera-rcar.h>
32#include <linux/platform_data/gpio-rcar.h> 33#include <linux/platform_data/gpio-rcar.h>
33#include <linux/platform_data/rcar-du.h> 34#include <linux/platform_data/rcar-du.h>
34#include <linux/platform_data/usb-rcar-phy.h> 35#include <linux/platform_data/usb-rcar-phy.h>
@@ -259,10 +260,30 @@ static struct platform_device leds_device = {
259 }, 260 },
260}; 261};
261 262
263/* VIN */
262static struct rcar_vin_platform_data vin_platform_data __initdata = { 264static struct rcar_vin_platform_data vin_platform_data __initdata = {
263 .flags = RCAR_VIN_BT656, 265 .flags = RCAR_VIN_BT656,
264}; 266};
265 267
268#define MARZEN_VIN(idx) \
269static struct resource vin##idx##_resources[] __initdata = { \
270 DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000), \
271 DEFINE_RES_IRQ(gic_iid(0x5f + (idx))), \
272}; \
273 \
274static struct platform_device_info vin##idx##_info __initdata = { \
275 .parent = &platform_bus, \
276 .name = "r8a7779-vin", \
277 .id = idx, \
278 .res = vin##idx##_resources, \
279 .num_res = ARRAY_SIZE(vin##idx##_resources), \
280 .dma_mask = DMA_BIT_MASK(32), \
281 .data = &vin_platform_data, \
282 .size_data = sizeof(vin_platform_data), \
283}
284MARZEN_VIN(1);
285MARZEN_VIN(3);
286
266#define MARZEN_CAMERA(idx) \ 287#define MARZEN_CAMERA(idx) \
267static struct i2c_board_info camera##idx##_info = { \ 288static struct i2c_board_info camera##idx##_info = { \
268 I2C_BOARD_INFO("adv7180", 0x20 + (idx)), \ 289 I2C_BOARD_INFO("adv7180", 0x20 + (idx)), \
@@ -367,8 +388,8 @@ static void __init marzen_init(void)
367 r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */ 388 r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */
368 389
369 r8a7779_add_standard_devices(); 390 r8a7779_add_standard_devices();
370 r8a7779_add_vin_device(1, &vin_platform_data); 391 platform_device_register_full(&vin1_info);
371 r8a7779_add_vin_device(3, &vin_platform_data); 392 platform_device_register_full(&vin3_info);
372 platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); 393 platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices));
373 marzen_add_du_device(); 394 marzen_add_du_device();
374} 395}
diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c
index 4aba20ca127e..0814a508fd61 100644
--- a/arch/arm/mach-shmobile/clock-r7s72100.c
+++ b/arch/arm/mach-shmobile/clock-r7s72100.c
@@ -170,6 +170,9 @@ static struct clk_lookup lookups[] = {
170 CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]), 170 CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]),
171 171
172 /* MSTP clocks */ 172 /* MSTP clocks */
173 CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP33]),
174
175 /* ICK */
173 CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP47]), 176 CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP47]),
174 CLKDEV_ICK_ID("sci_fck", "sh-sci.1", &mstp_clks[MSTP46]), 177 CLKDEV_ICK_ID("sci_fck", "sh-sci.1", &mstp_clks[MSTP46]),
175 CLKDEV_ICK_ID("sci_fck", "sh-sci.2", &mstp_clks[MSTP45]), 178 CLKDEV_ICK_ID("sci_fck", "sh-sci.2", &mstp_clks[MSTP45]),
diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
index a64f965c7da1..fa1b4773677a 100644
--- a/arch/arm/mach-shmobile/clock-r8a7790.c
+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
@@ -77,7 +77,7 @@ static struct sh_clk_ops followparent_clk_ops = {
77}; 77};
78 78
79static struct clk main_clk = { 79static struct clk main_clk = {
80 /* .parent will be set r8a73a4_clock_init */ 80 /* .parent will be set r8a7790_clock_init */
81 .ops = &followparent_clk_ops, 81 .ops = &followparent_clk_ops,
82}; 82};
83 83
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
index 5390c6bbbc02..28489978b09c 100644
--- a/arch/arm/mach-shmobile/clock-sh7372.c
+++ b/arch/arm/mach-shmobile/clock-sh7372.c
@@ -504,10 +504,6 @@ static struct clk_lookup lookups[] = {
504 CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), 504 CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]),
505 CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]), 505 CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]),
506 CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]), 506 CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]),
507 CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]),
508 CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]),
509 CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]),
510 CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]),
511 507
512 /* MSTP32 clocks */ 508 /* MSTP32 clocks */
513 CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ 509 CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */
@@ -574,6 +570,11 @@ static struct clk_lookup lookups[] = {
574 CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ 570 CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */
575 CLKDEV_DEV_ID("sh_cmt.2", &mstp_clks[MSTP400]), /* CMT2 */ 571 CLKDEV_DEV_ID("sh_cmt.2", &mstp_clks[MSTP400]), /* CMT2 */
576 572
573 /* ICK */
574 CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]),
575 CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]),
576 CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]),
577 CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]),
577 CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1", 578 CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1",
578 &div6_reparent_clks[DIV6_HDMI]), 579 &div6_reparent_clks[DIV6_HDMI]),
579 CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), 580 CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]),
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c
index c92c023f0d27..2aeec468cf7c 100644
--- a/arch/arm/mach-shmobile/clock-sh73a0.c
+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
@@ -625,12 +625,6 @@ static struct clk_lookup lookups[] = {
625 CLKDEV_CON_ID("sdhi0_clk", &div6_clks[DIV6_SDHI0]), 625 CLKDEV_CON_ID("sdhi0_clk", &div6_clks[DIV6_SDHI0]),
626 CLKDEV_CON_ID("sdhi1_clk", &div6_clks[DIV6_SDHI1]), 626 CLKDEV_CON_ID("sdhi1_clk", &div6_clks[DIV6_SDHI1]),
627 CLKDEV_CON_ID("sdhi2_clk", &div6_clks[DIV6_SDHI2]), 627 CLKDEV_CON_ID("sdhi2_clk", &div6_clks[DIV6_SDHI2]),
628 CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]),
629 CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]),
630 CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]),
631 CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]),
632 CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk),
633 CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk),
634 628
635 /* MSTP32 clocks */ 629 /* MSTP32 clocks */
636 CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */ 630 CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */
@@ -680,6 +674,14 @@ static struct clk_lookup lookups[] = {
680 CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* I2C4 */ 674 CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* I2C4 */
681 CLKDEV_DEV_ID("e6828000.i2c", &mstp_clks[MSTP410]), /* I2C4 */ 675 CLKDEV_DEV_ID("e6828000.i2c", &mstp_clks[MSTP410]), /* I2C4 */
682 CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ 676 CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */
677
678 /* ICK */
679 CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]),
680 CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]),
681 CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]),
682 CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]),
683 CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk),
684 CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk),
683}; 685};
684 686
685void __init sh73a0_clock_init(void) 687void __init sh73a0_clock_init(void)
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h
index 17af34ed89c8..b40e13631f6a 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7779.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h
@@ -3,8 +3,6 @@
3 3
4#include <linux/sh_clk.h> 4#include <linux/sh_clk.h>
5#include <linux/pm_domain.h> 5#include <linux/pm_domain.h>
6#include <linux/sh_eth.h>
7#include <linux/platform_data/camera-rcar.h>
8 6
9/* HPB-DMA slave IDs */ 7/* HPB-DMA slave IDs */
10enum { 8enum {
@@ -13,8 +11,6 @@ enum {
13 HPBDMA_SLAVE_SDHI0_RX, 11 HPBDMA_SLAVE_SDHI0_RX,
14}; 12};
15 13
16struct platform_device;
17
18struct r8a7779_pm_ch { 14struct r8a7779_pm_ch {
19 unsigned long chan_offs; 15 unsigned long chan_offs;
20 unsigned int chan_bit; 16 unsigned int chan_bit;
@@ -40,9 +36,6 @@ extern void r8a7779_earlytimer_init(void);
40extern void r8a7779_add_early_devices(void); 36extern void r8a7779_add_early_devices(void);
41extern void r8a7779_add_standard_devices(void); 37extern void r8a7779_add_standard_devices(void);
42extern void r8a7779_add_standard_devices_dt(void); 38extern void r8a7779_add_standard_devices_dt(void);
43extern void r8a7779_add_ether_device(struct sh_eth_plat_data *pdata);
44extern void r8a7779_add_vin_device(int idx,
45 struct rcar_vin_platform_data *pdata);
46extern void r8a7779_init_late(void); 39extern void r8a7779_init_late(void);
47extern void r8a7779_clock_init(void); 40extern void r8a7779_clock_init(void);
48extern void r8a7779_pinmux_init(void); 41extern void r8a7779_pinmux_init(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 13049e9d691c..8f9453152fb9 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -598,45 +598,6 @@ static struct platform_device ohci1_device = {
598 .resource = ohci1_resources, 598 .resource = ohci1_resources,
599}; 599};
600 600
601/* Ether */
602static struct resource ether_resources[] __initdata = {
603 {
604 .start = 0xfde00000,
605 .end = 0xfde003ff,
606 .flags = IORESOURCE_MEM,
607 }, {
608 .start = gic_iid(0xb4),
609 .flags = IORESOURCE_IRQ,
610 },
611};
612
613#define R8A7779_VIN(idx) \
614static struct resource vin##idx##_resources[] __initdata = { \
615 DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000), \
616 DEFINE_RES_IRQ(gic_iid(0x5f + (idx))), \
617}; \
618 \
619static struct platform_device_info vin##idx##_info __initdata = { \
620 .parent = &platform_bus, \
621 .name = "r8a7779-vin", \
622 .id = idx, \
623 .res = vin##idx##_resources, \
624 .num_res = ARRAY_SIZE(vin##idx##_resources), \
625 .dma_mask = DMA_BIT_MASK(32), \
626}
627
628R8A7779_VIN(0);
629R8A7779_VIN(1);
630R8A7779_VIN(2);
631R8A7779_VIN(3);
632
633static struct platform_device_info *vin_info_table[] __initdata = {
634 &vin0_info,
635 &vin1_info,
636 &vin2_info,
637 &vin3_info,
638};
639
640/* HPB-DMA */ 601/* HPB-DMA */
641 602
642/* Asynchronous mode register bits */ 603/* Asynchronous mode register bits */
@@ -825,24 +786,6 @@ void __init r8a7779_add_standard_devices(void)
825 r8a7779_register_hpb_dmae(); 786 r8a7779_register_hpb_dmae();
826} 787}
827 788
828void __init r8a7779_add_ether_device(struct sh_eth_plat_data *pdata)
829{
830 platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1,
831 ether_resources,
832 ARRAY_SIZE(ether_resources),
833 pdata, sizeof(*pdata));
834}
835
836void __init r8a7779_add_vin_device(int id, struct rcar_vin_platform_data *pdata)
837{
838 BUG_ON(id < 0 || id > 3);
839
840 vin_info_table[id]->data = pdata;
841 vin_info_table[id]->size_data = sizeof(*pdata);
842
843 platform_device_register_full(vin_info_table[id]);
844}
845
846/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ 789/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
847void __init __weak r8a7779_register_twd(void) { } 790void __init __weak r8a7779_register_twd(void) { }
848 791
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
index c47bcebbcb00..3543c3bacb75 100644
--- a/arch/arm/mach-shmobile/setup-r8a7790.c
+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
@@ -34,6 +34,10 @@ static const struct resource pfc_resources[] __initconst = {
34 DEFINE_RES_MEM(0xe6060000, 0x250), 34 DEFINE_RES_MEM(0xe6060000, 0x250),
35}; 35};
36 36
37#define r8a7790_register_pfc() \
38 platform_device_register_simple("pfc-r8a7790", -1, pfc_resources, \
39 ARRAY_SIZE(pfc_resources))
40
37#define R8A7790_GPIO(idx) \ 41#define R8A7790_GPIO(idx) \
38static const struct resource r8a7790_gpio##idx##_resources[] __initconst = { \ 42static const struct resource r8a7790_gpio##idx##_resources[] __initconst = { \
39 DEFINE_RES_MEM(0xe6050000 + 0x1000 * (idx), 0x50), \ 43 DEFINE_RES_MEM(0xe6050000 + 0x1000 * (idx), 0x50), \
@@ -65,8 +69,7 @@ R8A7790_GPIO(5);
65 69
66void __init r8a7790_pinmux_init(void) 70void __init r8a7790_pinmux_init(void)
67{ 71{
68 platform_device_register_simple("pfc-r8a7790", -1, pfc_resources, 72 r8a7790_register_pfc();
69 ARRAY_SIZE(pfc_resources));
70 r8a7790_register_gpio(0); 73 r8a7790_register_gpio(0);
71 r8a7790_register_gpio(1); 74 r8a7790_register_gpio(1);
72 r8a7790_register_gpio(2); 75 r8a7790_register_gpio(2);
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index 22de17417fd7..65151c48cbd4 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -273,7 +273,7 @@ static struct sh_timer_config tmu00_platform_data = {
273}; 273};
274 274
275static struct resource tmu00_resources[] = { 275static struct resource tmu00_resources[] = {
276 [0] = DEFINE_RES_MEM_NAMED(0xfff60008, 0xc, "TMU00"), 276 [0] = DEFINE_RES_MEM(0xfff60008, 0xc),
277 [1] = { 277 [1] = {
278 .start = intcs_evt2irq(0x0e80), /* TMU0_TUNI00 */ 278 .start = intcs_evt2irq(0x0e80), /* TMU0_TUNI00 */
279 .flags = IORESOURCE_IRQ, 279 .flags = IORESOURCE_IRQ,
@@ -298,7 +298,7 @@ static struct sh_timer_config tmu01_platform_data = {
298}; 298};
299 299
300static struct resource tmu01_resources[] = { 300static struct resource tmu01_resources[] = {
301 [0] = DEFINE_RES_MEM_NAMED(0xfff60014, 0xc, "TMU00"), 301 [0] = DEFINE_RES_MEM(0xfff60014, 0xc),
302 [1] = { 302 [1] = {
303 .start = intcs_evt2irq(0x0ea0), /* TMU0_TUNI01 */ 303 .start = intcs_evt2irq(0x0ea0), /* TMU0_TUNI01 */
304 .flags = IORESOURCE_IRQ, 304 .flags = IORESOURCE_IRQ,
@@ -316,7 +316,7 @@ static struct platform_device tmu01_device = {
316}; 316};
317 317
318static struct resource i2c0_resources[] = { 318static struct resource i2c0_resources[] = {
319 [0] = DEFINE_RES_MEM_NAMED(0xe6820000, 0x426, "IIC0"), 319 [0] = DEFINE_RES_MEM(0xe6820000, 0x426),
320 [1] = { 320 [1] = {
321 .start = gic_spi(167), 321 .start = gic_spi(167),
322 .end = gic_spi(170), 322 .end = gic_spi(170),
@@ -325,7 +325,7 @@ static struct resource i2c0_resources[] = {
325}; 325};
326 326
327static struct resource i2c1_resources[] = { 327static struct resource i2c1_resources[] = {
328 [0] = DEFINE_RES_MEM_NAMED(0xe6822000, 0x426, "IIC1"), 328 [0] = DEFINE_RES_MEM(0xe6822000, 0x426),
329 [1] = { 329 [1] = {
330 .start = gic_spi(51), 330 .start = gic_spi(51),
331 .end = gic_spi(54), 331 .end = gic_spi(54),
@@ -334,7 +334,7 @@ static struct resource i2c1_resources[] = {
334}; 334};
335 335
336static struct resource i2c2_resources[] = { 336static struct resource i2c2_resources[] = {
337 [0] = DEFINE_RES_MEM_NAMED(0xe6824000, 0x426, "IIC2"), 337 [0] = DEFINE_RES_MEM(0xe6824000, 0x426),
338 [1] = { 338 [1] = {
339 .start = gic_spi(171), 339 .start = gic_spi(171),
340 .end = gic_spi(174), 340 .end = gic_spi(174),
@@ -343,7 +343,7 @@ static struct resource i2c2_resources[] = {
343}; 343};
344 344
345static struct resource i2c3_resources[] = { 345static struct resource i2c3_resources[] = {
346 [0] = DEFINE_RES_MEM_NAMED(0xe6826000, 0x426, "IIC3"), 346 [0] = DEFINE_RES_MEM(0xe6826000, 0x426),
347 [1] = { 347 [1] = {
348 .start = gic_spi(183), 348 .start = gic_spi(183),
349 .end = gic_spi(186), 349 .end = gic_spi(186),
@@ -352,7 +352,7 @@ static struct resource i2c3_resources[] = {
352}; 352};
353 353
354static struct resource i2c4_resources[] = { 354static struct resource i2c4_resources[] = {
355 [0] = DEFINE_RES_MEM_NAMED(0xe6828000, 0x426, "IIC4"), 355 [0] = DEFINE_RES_MEM(0xe6828000, 0x426),
356 [1] = { 356 [1] = {
357 .start = gic_spi(187), 357 .start = gic_spi(187),
358 .end = gic_spi(190), 358 .end = gic_spi(190),
@@ -722,7 +722,7 @@ static struct platform_device pmu_device = {
722 722
723/* an IPMMU module for ICB */ 723/* an IPMMU module for ICB */
724static struct resource ipmmu_resources[] = { 724static struct resource ipmmu_resources[] = {
725 DEFINE_RES_MEM_NAMED(0xfe951000, 0x100, "IPMMU"), 725 DEFINE_RES_MEM(0xfe951000, 0x100),
726}; 726};
727 727
728static const char * const ipmmu_dev_names[] = { 728static const char * const ipmmu_dev_names[] = {
diff --git a/arch/arm/mach-sti/platsmp.c b/arch/arm/mach-sti/platsmp.c
index dce50d983a8e..fa2c33ffac04 100644
--- a/arch/arm/mach-sti/platsmp.c
+++ b/arch/arm/mach-sti/platsmp.c
@@ -31,8 +31,7 @@ static void write_pen_release(int val)
31{ 31{
32 pen_release = val; 32 pen_release = val;
33 smp_wmb(); 33 smp_wmb();
34 __cpuc_flush_dcache_area((void *)&pen_release, sizeof(pen_release)); 34 sync_cache_w(&pen_release);
35 outer_clean_range(__pa(&pen_release), __pa(&pen_release + 1));
36} 35}
37 36
38static DEFINE_SPINLOCK(boot_lock); 37static DEFINE_SPINLOCK(boot_lock);
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 09e740f58b27..15c09294effa 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -14,6 +14,8 @@ config ARCH_TEGRA
14 select MIGHT_HAVE_CACHE_L2X0 14 select MIGHT_HAVE_CACHE_L2X0
15 select MIGHT_HAVE_PCI 15 select MIGHT_HAVE_PCI
16 select PINCTRL 16 select PINCTRL
17 select ARCH_HAS_RESET_CONTROLLER
18 select RESET_CONTROLLER
17 select SOC_BUS 19 select SOC_BUS
18 select SPARSE_IRQ 20 select SPARSE_IRQ
19 select USB_ARCH_HAS_EHCI if USB_SUPPORT 21 select USB_ARCH_HAS_EHCI if USB_SUPPORT
diff --git a/arch/arm/mach-tegra/powergate.c b/arch/arm/mach-tegra/powergate.c
index 85d28e756bb7..f6f5b54ff95e 100644
--- a/arch/arm/mach-tegra/powergate.c
+++ b/arch/arm/mach-tegra/powergate.c
@@ -25,6 +25,7 @@
25#include <linux/export.h> 25#include <linux/export.h>
26#include <linux/init.h> 26#include <linux/init.h>
27#include <linux/io.h> 27#include <linux/io.h>
28#include <linux/reset.h>
28#include <linux/seq_file.h> 29#include <linux/seq_file.h>
29#include <linux/spinlock.h> 30#include <linux/spinlock.h>
30#include <linux/clk/tegra.h> 31#include <linux/clk/tegra.h>
@@ -144,11 +145,12 @@ int tegra_powergate_remove_clamping(int id)
144} 145}
145 146
146/* Must be called with clk disabled, and returns with clk enabled */ 147/* Must be called with clk disabled, and returns with clk enabled */
147int tegra_powergate_sequence_power_up(int id, struct clk *clk) 148int tegra_powergate_sequence_power_up(int id, struct clk *clk,
149 struct reset_control *rst)
148{ 150{
149 int ret; 151 int ret;
150 152
151 tegra_periph_reset_assert(clk); 153 reset_control_assert(rst);
152 154
153 ret = tegra_powergate_power_on(id); 155 ret = tegra_powergate_power_on(id);
154 if (ret) 156 if (ret)
@@ -165,7 +167,7 @@ int tegra_powergate_sequence_power_up(int id, struct clk *clk)
165 goto err_clamp; 167 goto err_clamp;
166 168
167 udelay(10); 169 udelay(10);
168 tegra_periph_reset_deassert(clk); 170 reset_control_deassert(rst);
169 171
170 return 0; 172 return 0;
171 173
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
index 1f296e796a4f..a44967f3168c 100644
--- a/arch/arm/mach-ux500/platsmp.c
+++ b/arch/arm/mach-ux500/platsmp.c
@@ -38,8 +38,7 @@ static void write_pen_release(int val)
38{ 38{
39 pen_release = val; 39 pen_release = val;
40 smp_wmb(); 40 smp_wmb();
41 __cpuc_flush_dcache_area((void *)&pen_release, sizeof(pen_release)); 41 sync_cache_w(&pen_release);
42 outer_clean_range(__pa(&pen_release), __pa(&pen_release + 1));
43} 42}
44 43
45static void __iomem *scu_base_addr(void) 44static void __iomem *scu_base_addr(void)
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index 9a7bd137c8fd..1db2a5ca9ab8 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -25,6 +25,8 @@
25#include <linux/of_irq.h> 25#include <linux/of_irq.h>
26#include <linux/of_platform.h> 26#include <linux/of_platform.h>
27#include <linux/of.h> 27#include <linux/of.h>
28#include <linux/irqchip.h>
29#include <linux/irqchip/arm-gic.h>
28 30
29#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
30#include <asm/mach/map.h> 32#include <asm/mach/map.h>
@@ -39,11 +41,6 @@
39 41
40void __iomem *zynq_scu_base; 42void __iomem *zynq_scu_base;
41 43
42static struct of_device_id zynq_of_bus_ids[] __initdata = {
43 { .compatible = "simple-bus", },
44 {}
45};
46
47static struct platform_device zynq_cpuidle_device = { 44static struct platform_device zynq_cpuidle_device = {
48 .name = "cpuidle-zynq", 45 .name = "cpuidle-zynq",
49}; 46};
@@ -59,7 +56,7 @@ static void __init zynq_init_machine(void)
59 */ 56 */
60 l2x0_of_init(0x02060000, 0xF0F0FFFF); 57 l2x0_of_init(0x02060000, 0xF0F0FFFF);
61 58
62 of_platform_bus_probe(NULL, zynq_of_bus_ids, NULL); 59 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
63 60
64 platform_device_register(&zynq_cpuidle_device); 61 platform_device_register(&zynq_cpuidle_device);
65} 62}
@@ -97,6 +94,12 @@ static void __init zynq_map_io(void)
97 zynq_scu_map_io(); 94 zynq_scu_map_io();
98} 95}
99 96
97static void __init zynq_irq_init(void)
98{
99 gic_arch_extn.flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND;
100 irqchip_init();
101}
102
100static void zynq_system_reset(enum reboot_mode mode, const char *cmd) 103static void zynq_system_reset(enum reboot_mode mode, const char *cmd)
101{ 104{
102 zynq_slcr_system_reset(); 105 zynq_slcr_system_reset();
@@ -110,6 +113,7 @@ static const char * const zynq_dt_match[] = {
110DT_MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") 113DT_MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform")
111 .smp = smp_ops(zynq_smp_ops), 114 .smp = smp_ops(zynq_smp_ops),
112 .map_io = zynq_map_io, 115 .map_io = zynq_map_io,
116 .init_irq = zynq_irq_init,
113 .init_machine = zynq_init_machine, 117 .init_machine = zynq_init_machine,
114 .init_time = zynq_timer_init, 118 .init_time = zynq_timer_init,
115 .dt_compat = zynq_dt_match, 119 .dt_compat = zynq_dt_match,
diff --git a/arch/arm/mach-zynq/common.h b/arch/arm/mach-zynq/common.h
index 3040d219570f..c22c92cea8cb 100644
--- a/arch/arm/mach-zynq/common.h
+++ b/arch/arm/mach-zynq/common.h
@@ -17,6 +17,8 @@
17#ifndef __MACH_ZYNQ_COMMON_H__ 17#ifndef __MACH_ZYNQ_COMMON_H__
18#define __MACH_ZYNQ_COMMON_H__ 18#define __MACH_ZYNQ_COMMON_H__
19 19
20void zynq_secondary_startup(void);
21
20extern int zynq_slcr_init(void); 22extern int zynq_slcr_init(void);
21extern void zynq_slcr_system_reset(void); 23extern void zynq_slcr_system_reset(void);
22extern void zynq_slcr_cpu_stop(int cpu); 24extern void zynq_slcr_cpu_stop(int cpu);
diff --git a/arch/arm/mach-zynq/headsmp.S b/arch/arm/mach-zynq/headsmp.S
index d4cd5f34fe5c..57a32869f0aa 100644
--- a/arch/arm/mach-zynq/headsmp.S
+++ b/arch/arm/mach-zynq/headsmp.S
@@ -18,5 +18,9 @@ zynq_secondary_trampoline_jump:
18 .word /* cpu 1 */ 18 .word /* cpu 1 */
19.globl zynq_secondary_trampoline_end 19.globl zynq_secondary_trampoline_end
20zynq_secondary_trampoline_end: 20zynq_secondary_trampoline_end:
21
22ENDPROC(zynq_secondary_trampoline) 21ENDPROC(zynq_secondary_trampoline)
22
23ENTRY(zynq_secondary_startup)
24 bl v7_invalidate_l1
25 b secondary_startup
26ENDPROC(zynq_secondary_startup)
diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c
index 689fbbc3d9c8..abc82ef085c1 100644
--- a/arch/arm/mach-zynq/platsmp.c
+++ b/arch/arm/mach-zynq/platsmp.c
@@ -39,11 +39,6 @@ int zynq_cpun_start(u32 address, int cpu)
39 u32 trampoline_code_size = &zynq_secondary_trampoline_end - 39 u32 trampoline_code_size = &zynq_secondary_trampoline_end -
40 &zynq_secondary_trampoline; 40 &zynq_secondary_trampoline;
41 41
42 if (cpu > ncores) {
43 pr_warn("CPU No. is not available in the system\n");
44 return -1;
45 }
46
47 /* MS: Expectation that SLCR are directly map and accessible */ 42 /* MS: Expectation that SLCR are directly map and accessible */
48 /* Not possible to jump to non aligned address */ 43 /* Not possible to jump to non aligned address */
49 if (!(address & 3) && (!address || (address >= trampoline_code_size))) { 44 if (!(address & 3) && (!address || (address >= trampoline_code_size))) {
@@ -95,7 +90,7 @@ EXPORT_SYMBOL(zynq_cpun_start);
95static int zynq_boot_secondary(unsigned int cpu, 90static int zynq_boot_secondary(unsigned int cpu,
96 struct task_struct *idle) 91 struct task_struct *idle)
97{ 92{
98 return zynq_cpun_start(virt_to_phys(secondary_startup), cpu); 93 return zynq_cpun_start(virt_to_phys(zynq_secondary_startup), cpu);
99} 94}
100 95
101/* 96/*
@@ -114,23 +109,23 @@ static void __init zynq_smp_init_cpus(void)
114 109
115static void __init zynq_smp_prepare_cpus(unsigned int max_cpus) 110static void __init zynq_smp_prepare_cpus(unsigned int max_cpus)
116{ 111{
117 int i;
118
119 /*
120 * Initialise the present map, which describes the set of CPUs
121 * actually populated at the present time.
122 */
123 for (i = 0; i < max_cpus; i++)
124 set_cpu_present(i, true);
125
126 scu_enable(zynq_scu_base); 112 scu_enable(zynq_scu_base);
127} 113}
128 114
115#ifdef CONFIG_HOTPLUG_CPU
116static int zynq_cpu_kill(unsigned cpu)
117{
118 zynq_slcr_cpu_stop(cpu);
119 return 1;
120}
121#endif
122
129struct smp_operations zynq_smp_ops __initdata = { 123struct smp_operations zynq_smp_ops __initdata = {
130 .smp_init_cpus = zynq_smp_init_cpus, 124 .smp_init_cpus = zynq_smp_init_cpus,
131 .smp_prepare_cpus = zynq_smp_prepare_cpus, 125 .smp_prepare_cpus = zynq_smp_prepare_cpus,
132 .smp_boot_secondary = zynq_boot_secondary, 126 .smp_boot_secondary = zynq_boot_secondary,
133#ifdef CONFIG_HOTPLUG_CPU 127#ifdef CONFIG_HOTPLUG_CPU
134 .cpu_die = zynq_platform_cpu_die, 128 .cpu_die = zynq_platform_cpu_die,
129 .cpu_kill = zynq_cpu_kill,
135#endif 130#endif
136}; 131};
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c
index c66d163d7a2a..830ff07f3385 100644
--- a/arch/arm/plat-orion/common.c
+++ b/arch/arm/plat-orion/common.c
@@ -22,6 +22,7 @@
22#include <linux/platform_data/dma-mv_xor.h> 22#include <linux/platform_data/dma-mv_xor.h>
23#include <linux/platform_data/usb-ehci-orion.h> 23#include <linux/platform_data/usb-ehci-orion.h>
24#include <mach/bridge-regs.h> 24#include <mach/bridge-regs.h>
25#include <plat/common.h>
25 26
26/* Create a clkdev entry for a given device/clk */ 27/* Create a clkdev entry for a given device/clk */
27void __init orion_clkdev_add(const char *con_id, const char *dev_id, 28void __init orion_clkdev_add(const char *con_id, const char *dev_id,
@@ -256,7 +257,7 @@ static __init void ge_complete(
256/***************************************************************************** 257/*****************************************************************************
257 * GE00 258 * GE00
258 ****************************************************************************/ 259 ****************************************************************************/
259struct mv643xx_eth_shared_platform_data orion_ge00_shared_data; 260static struct mv643xx_eth_shared_platform_data orion_ge00_shared_data;
260 261
261static struct resource orion_ge00_shared_resources[] = { 262static struct resource orion_ge00_shared_resources[] = {
262 { 263 {
@@ -322,7 +323,7 @@ void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data,
322/***************************************************************************** 323/*****************************************************************************
323 * GE01 324 * GE01
324 ****************************************************************************/ 325 ****************************************************************************/
325struct mv643xx_eth_shared_platform_data orion_ge01_shared_data; 326static struct mv643xx_eth_shared_platform_data orion_ge01_shared_data;
326 327
327static struct resource orion_ge01_shared_resources[] = { 328static struct resource orion_ge01_shared_resources[] = {
328 { 329 {
@@ -373,7 +374,7 @@ void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data,
373/***************************************************************************** 374/*****************************************************************************
374 * GE10 375 * GE10
375 ****************************************************************************/ 376 ****************************************************************************/
376struct mv643xx_eth_shared_platform_data orion_ge10_shared_data; 377static struct mv643xx_eth_shared_platform_data orion_ge10_shared_data;
377 378
378static struct resource orion_ge10_shared_resources[] = { 379static struct resource orion_ge10_shared_resources[] = {
379 { 380 {
@@ -422,7 +423,7 @@ void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data,
422/***************************************************************************** 423/*****************************************************************************
423 * GE11 424 * GE11
424 ****************************************************************************/ 425 ****************************************************************************/
425struct mv643xx_eth_shared_platform_data orion_ge11_shared_data; 426static struct mv643xx_eth_shared_platform_data orion_ge11_shared_data;
426 427
427static struct resource orion_ge11_shared_resources[] = { 428static struct resource orion_ge11_shared_resources[] = {
428 { 429 {
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c
index 9d2b2ac74938..15921a1839d7 100644
--- a/arch/arm/plat-orion/time.c
+++ b/arch/arm/plat-orion/time.c
@@ -17,6 +17,7 @@
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/irq.h> 18#include <linux/irq.h>
19#include <linux/sched_clock.h> 19#include <linux/sched_clock.h>
20#include <plat/time.h>
20 21
21/* 22/*
22 * MBus bridge block registers. 23 * MBus bridge block registers.
@@ -174,7 +175,7 @@ static irqreturn_t orion_timer_interrupt(int irq, void *dev_id)
174 175
175static struct irqaction orion_timer_irq = { 176static struct irqaction orion_timer_irq = {
176 .name = "orion_tick", 177 .name = "orion_tick",
177 .flags = IRQF_DISABLED | IRQF_TIMER, 178 .flags = IRQF_TIMER,
178 .handler = orion_timer_interrupt 179 .handler = orion_timer_interrupt
179}; 180};
180 181
diff --git a/arch/arm/plat-pxa/dma.c b/arch/arm/plat-pxa/dma.c
index 79ef102e3b2b..054fc5a1a11c 100644
--- a/arch/arm/plat-pxa/dma.c
+++ b/arch/arm/plat-pxa/dma.c
@@ -377,7 +377,7 @@ int __init pxa_init_dma(int irq, int num_ch)
377 spin_lock_init(&dma_channels[i].lock); 377 spin_lock_init(&dma_channels[i].lock);
378 } 378 }
379 379
380 ret = request_irq(irq, dma_irq_handler, IRQF_DISABLED, "DMA", NULL); 380 ret = request_irq(irq, dma_irq_handler, 0, "DMA", NULL);
381 if (ret) { 381 if (ret) {
382 printk (KERN_CRIT "Wow! Can't register IRQ for DMA\n"); 382 printk (KERN_CRIT "Wow! Can't register IRQ for DMA\n");
383 kfree(dma_channels); 383 kfree(dma_channels);
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 6d95d60276d6..58645a58d0d8 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -24,7 +24,6 @@ config PLAT_S5P
24 select S3C_GPIO_TRACK 24 select S3C_GPIO_TRACK
25 select S5P_GPIO_DRVSTR 25 select S5P_GPIO_DRVSTR
26 select SAMSUNG_CLKSRC if !COMMON_CLK 26 select SAMSUNG_CLKSRC if !COMMON_CLK
27 select SAMSUNG_GPIOLIB_4BIT
28 help 27 help
29 Base platform code for Samsung's S5P series SoC. 28 Base platform code for Samsung's S5P series SoC.
30 29
@@ -115,13 +114,6 @@ config S5P_GPIO_INT
115 114
116# options for gpio configuration support 115# options for gpio configuration support
117 116
118config SAMSUNG_GPIOLIB_4BIT
119 bool
120 help
121 GPIOlib file contains the 4 bit modification functions for gpio
122 configuration. GPIOlib shall be compiled only for S3C64XX and S5P
123 series of processors.
124
125config S5P_GPIO_DRVSTR 117config S5P_GPIO_DRVSTR
126 bool 118 bool
127 help 119 help
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h
index 6bc1a8f471e3..ff6063f0d5ea 100644
--- a/arch/arm/plat-samsung/include/plat/pm.h
+++ b/arch/arm/plat-samsung/include/plat/pm.h
@@ -101,8 +101,8 @@ struct pm_uart_save {
101/* helper functions to save/restore lists of registers. */ 101/* helper functions to save/restore lists of registers. */
102 102
103extern void s3c_pm_do_save(struct sleep_save *ptr, int count); 103extern void s3c_pm_do_save(struct sleep_save *ptr, int count);
104extern void s3c_pm_do_restore(struct sleep_save *ptr, int count); 104extern void s3c_pm_do_restore(const struct sleep_save *ptr, int count);
105extern void s3c_pm_do_restore_core(struct sleep_save *ptr, int count); 105extern void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count);
106 106
107#ifdef CONFIG_SAMSUNG_PM 107#ifdef CONFIG_SAMSUNG_PM
108extern int s3c_irq_wake(struct irq_data *data, unsigned int state); 108extern int s3c_irq_wake(struct irq_data *data, unsigned int state);
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
index d0c23010b693..e5b0f2c2d884 100644
--- a/arch/arm/plat-samsung/pm.c
+++ b/arch/arm/plat-samsung/pm.c
@@ -28,8 +28,10 @@
28#ifdef CONFIG_SAMSUNG_ATAGS 28#ifdef CONFIG_SAMSUNG_ATAGS
29#include <mach/hardware.h> 29#include <mach/hardware.h>
30#include <mach/map.h> 30#include <mach/map.h>
31#ifndef CONFIG_ARCH_EXYNOS
31#include <mach/regs-clock.h> 32#include <mach/regs-clock.h>
32#include <mach/regs-irq.h> 33#include <mach/regs-irq.h>
34#endif
33#include <mach/irqs.h> 35#include <mach/irqs.h>
34#endif 36#endif
35 37
@@ -182,7 +184,7 @@ void s3c_pm_do_save(struct sleep_save *ptr, int count)
182 * restore the UARTs state yet 184 * restore the UARTs state yet
183*/ 185*/
184 186
185void s3c_pm_do_restore(struct sleep_save *ptr, int count) 187void s3c_pm_do_restore(const struct sleep_save *ptr, int count)
186{ 188{
187 for (; count > 0; count--, ptr++) { 189 for (; count > 0; count--, ptr++) {
188 printk(KERN_DEBUG "restore %p (restore %08lx, was %08x)\n", 190 printk(KERN_DEBUG "restore %p (restore %08lx, was %08x)\n",
@@ -203,7 +205,7 @@ void s3c_pm_do_restore(struct sleep_save *ptr, int count)
203 * peripherals, as things may be changing! 205 * peripherals, as things may be changing!
204*/ 206*/
205 207
206void s3c_pm_do_restore_core(struct sleep_save *ptr, int count) 208void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count)
207{ 209{
208 for (; count > 0; count--, ptr++) 210 for (; count > 0; count--, ptr++)
209 __raw_writel(ptr->val, ptr->reg); 211 __raw_writel(ptr->val, ptr->reg);
diff --git a/arch/arm/plat-samsung/s5p-irq-pm.c b/arch/arm/plat-samsung/s5p-irq-pm.c
index 7c1e3b7072fc..591498035916 100644
--- a/arch/arm/plat-samsung/s5p-irq-pm.c
+++ b/arch/arm/plat-samsung/s5p-irq-pm.c
@@ -22,7 +22,10 @@
22#include <mach/map.h> 22#include <mach/map.h>
23 23
24#include <mach/regs-gpio.h> 24#include <mach/regs-gpio.h>
25
26#ifndef CONFIG_ARCH_EXYNOS
25#include <mach/regs-irq.h> 27#include <mach/regs-irq.h>
28#endif
26 29
27/* state for IRQs over sleep */ 30/* state for IRQs over sleep */
28 31
diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/plat-versatile/platsmp.c
index 39895d892c3b..53feb90c840c 100644
--- a/arch/arm/plat-versatile/platsmp.c
+++ b/arch/arm/plat-versatile/platsmp.c
@@ -27,8 +27,7 @@ static void write_pen_release(int val)
27{ 27{
28 pen_release = val; 28 pen_release = val;
29 smp_wmb(); 29 smp_wmb();
30 __cpuc_flush_dcache_area((void *)&pen_release, sizeof(pen_release)); 30 sync_cache_w(&pen_release);
31 outer_clean_range(__pa(&pen_release), __pa(&pen_release + 1));
32} 31}
33 32
34static DEFINE_SPINLOCK(boot_lock); 33static DEFINE_SPINLOCK(boot_lock);