aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-09 17:18:35 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-09 17:18:35 -0500
commit6c9e92476bc924ede6d6d2f0bfed2c06ae148d29 (patch)
tree1c9972cf4f4b484d6203844c396b0c232379f1f1 /arch/arm
parent0563fdc0d9fbd4d8896956d4aeb01fad09146acc (diff)
parentef1dfa7332e9205b532da1c2d286757ce511cd1d (diff)
Merge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC cleanups from Arnd Bergmann: "The remaining cleanups for 3.19 are to a large part result of devicetree conversion nearing completion on two other platforms besides AT91: - Like AT91, Renesas shmobile is in the process to migrate to DT and multiplatform, but using a different approach of doing it one SoC at a time. For 3.19, the r8a7791 platform and associated "Koelsch" board are considered complete and we remove the non-DT non-multiplatform support for this. - The ARM Versatile Express has supported DT and multiplatform for a long time, but we have still kept the legacy board files around, because not all drivers were fully working before. We have finally taken the last step to remove the board files. Other changes in this branch are preparation for the later branches or just unrelated to the more interesting changes: - The dts files for arm64 get moved into per-vendor directories for a clearer structure. - Some dead code removal (zynq, exynos, davinci, imx) - Using pr_*() macros more consistently instead of printk(KERN_*) in some platform code" * tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (71 commits) ARM: zynq: Remove secondary_startup() declaration from header ARM: vexpress: Enable regulator framework when MMCI is in use ARM: vexpress: Remove non-DT code ARM: imx: Remove unneeded .map_io initialization ARM: dts: imx6qdl-sabresd: Fix the microphone route ARM: imx: refactor mxc_iomux_mode() ARM: imx: simplify clk_pllv3_prepare() ARM: imx6q: drop unnecessary semicolon ARM: imx: clean up machine mxc_arch_reset_init_dt reset init ARM: dts: imx6qdl-rex: Remove unneeded 'fsl,mode' property ARM: dts: imx6qdl-gw5x: Remove unneeded 'fsl,mode' property ARM: dts: imx6qdl-sabresd: Use IMX6QDL_CLK_CKO define ARM: at91: remove useless init_time for DT-only SoCs ARM: davinci: Remove redundant casts ARM: davinci: Use standard logging styles ARM: shmobile: r8a7779: Spelling/grammar s/entity/identity/, s/map/mapping/ ARM: shmobile: sh7372: Spelling/grammar s/entity map/identity mapping/ ARM: shmobile: sh73a0: Spelling/grammar s/entity map/identity mapping/ ARM: EXYNOS: Remove unused static iomapping ARM: at91: fix build breakage due to legacy board removals ...
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig2
-rw-r--r--arch/arm/Makefile8
-rw-r--r--arch/arm/boot/dts/Makefile27
-rw-r--r--arch/arm/boot/dts/emev2-kzm9d.dts63
-rw-r--r--arch/arm/boot/dts/emev2.dtsi12
-rw-r--r--arch/arm/boot/dts/imx6qdl-gw52xx.dtsi1
-rw-r--r--arch/arm/boot/dts/imx6qdl-gw53xx.dtsi1
-rw-r--r--arch/arm/boot/dts/imx6qdl-gw54xx.dtsi2
-rw-r--r--arch/arm/boot/dts/imx6qdl-rex.dtsi1
-rw-r--r--arch/arm/boot/dts/imx6qdl-sabresd.dtsi8
-rw-r--r--arch/arm/boot/dts/r7s72100-genmai.dts3
-rw-r--r--arch/arm/boot/dts/r7s72100.dtsi202
-rw-r--r--arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts3
-rw-r--r--arch/arm/boot/dts/r8a73a4.dtsi232
-rw-r--r--arch/arm/boot/dts/r8a7740-armadillo800eva.dts1
-rw-r--r--arch/arm/boot/dts/r8a7778-bockw-reference.dts3
-rw-r--r--arch/arm/boot/dts/r8a7779-marzen.dts84
-rw-r--r--arch/arm/boot/dts/r8a7779.dtsi24
-rw-r--r--arch/arm/boot/dts/r8a7790-lager.dts54
-rw-r--r--arch/arm/boot/dts/r8a7790.dtsi90
-rw-r--r--arch/arm/boot/dts/r8a7791-henninger.dts1
-rw-r--r--arch/arm/boot/dts/r8a7791-koelsch.dts19
-rw-r--r--arch/arm/boot/dts/r8a7791.dtsi69
-rw-r--r--arch/arm/boot/dts/r8a7794-alt.dts1
-rw-r--r--arch/arm/boot/dts/r8a77xx-aa104xd12-panel.dtsi41
-rw-r--r--arch/arm/boot/dts/sh73a0-kzm9g-reference.dts1
-rw-r--r--arch/arm/configs/koelsch_defconfig113
-rw-r--r--arch/arm/configs/shmobile_defconfig1
-rw-r--r--arch/arm/mach-at91/at91sam9g45.c1
-rw-r--r--arch/arm/mach-at91/at91sam9rl.c1
-rw-r--r--arch/arm/mach-davinci/board-da830-evm.c89
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c9
-rw-r--r--arch/arm/mach-davinci/board-dm644x-evm.c10
-rw-r--r--arch/arm/mach-davinci/board-mityomapl138.c45
-rw-r--r--arch/arm/mach-davinci/board-neuros-osd2.c5
-rw-r--r--arch/arm/mach-davinci/clock.c2
-rw-r--r--arch/arm/mach-davinci/mux.c15
-rw-r--r--arch/arm/mach-davinci/time.c13
-rw-r--r--arch/arm/mach-exynos/Makefile3
-rw-r--r--arch/arm/mach-exynos/common.h2
-rw-r--r--arch/arm/mach-exynos/exynos.c50
-rw-r--r--arch/arm/mach-exynos/hotplug.c91
-rw-r--r--arch/arm/mach-exynos/include/mach/map.h23
-rw-r--r--arch/arm/mach-exynos/platsmp.c113
-rw-r--r--arch/arm/mach-exynos/regs-pmu.h3
-rw-r--r--arch/arm/mach-imx/clk-imx6q.c2
-rw-r--r--arch/arm/mach-imx/clk-pllv3.c7
-rw-r--r--arch/arm/mach-imx/common.h1
-rw-r--r--arch/arm/mach-imx/imx25-dt.c9
-rw-r--r--arch/arm/mach-imx/imx27-dt.c3
-rw-r--r--arch/arm/mach-imx/imx31-dt.c9
-rw-r--r--arch/arm/mach-imx/imx35-dt.c10
-rw-r--r--arch/arm/mach-imx/iomux-imx31.c8
-rw-r--r--arch/arm/mach-imx/iomux-mx3.h2
-rw-r--r--arch/arm/mach-imx/mach-imx50.c9
-rw-r--r--arch/arm/mach-imx/mach-imx51.c2
-rw-r--r--arch/arm/mach-imx/mach-imx53.c2
-rw-r--r--arch/arm/mach-imx/mach-imx6q.c3
-rw-r--r--arch/arm/mach-imx/mach-imx6sl.c4
-rw-r--r--arch/arm/mach-imx/mach-imx6sx.c4
-rw-r--r--arch/arm/mach-imx/mach-vf610.c10
-rw-r--r--arch/arm/mach-imx/system.c15
-rw-r--r--arch/arm/mach-shmobile/Kconfig20
-rw-r--r--arch/arm/mach-shmobile/Makefile5
-rw-r--r--arch/arm/mach-shmobile/Makefile.boot1
-rw-r--r--arch/arm/mach-shmobile/board-ape6evm-reference.c4
-rw-r--r--arch/arm/mach-shmobile/board-ape6evm.c4
-rw-r--r--arch/arm/mach-shmobile/board-armadillo800eva.c45
-rw-r--r--arch/arm/mach-shmobile/board-bockw-reference.c4
-rw-r--r--arch/arm/mach-shmobile/board-bockw.c4
-rw-r--r--arch/arm/mach-shmobile/board-koelsch-reference.c117
-rw-r--r--arch/arm/mach-shmobile/board-koelsch.c527
-rw-r--r--arch/arm/mach-shmobile/board-kzm9g-reference.c4
-rw-r--r--arch/arm/mach-shmobile/board-kzm9g.c4
-rw-r--r--arch/arm/mach-shmobile/board-lager-reference.c84
-rw-r--r--arch/arm/mach-shmobile/board-lager.c4
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c4
-rw-r--r--arch/arm/mach-shmobile/board-marzen-reference.c5
-rw-r--r--arch/arm/mach-shmobile/board-marzen.c4
-rw-r--r--arch/arm/mach-shmobile/clock-r8a73a4.c4
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7740.c4
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7778.c4
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7779.c4
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7790.c4
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7791.c342
-rw-r--r--arch/arm/mach-shmobile/clock-sh7372.c4
-rw-r--r--arch/arm/mach-shmobile/clock-sh73a0.c4
-rw-r--r--arch/arm/mach-shmobile/clock.c36
-rw-r--r--arch/arm/mach-shmobile/clock.h14
-rw-r--r--arch/arm/mach-shmobile/console.c4
-rw-r--r--arch/arm/mach-shmobile/headsmp-scu.S5
-rw-r--r--arch/arm/mach-shmobile/intc-sh7372.c4
-rw-r--r--arch/arm/mach-shmobile/intc-sh73a0.c4
-rw-r--r--arch/arm/mach-shmobile/r8a7740.h4
-rw-r--r--arch/arm/mach-shmobile/r8a7778.h5
-rw-r--r--arch/arm/mach-shmobile/r8a7791.h3
-rw-r--r--arch/arm/mach-shmobile/setup-emev2.c4
-rw-r--r--arch/arm/mach-shmobile/setup-r7s72100.c4
-rw-r--r--arch/arm/mach-shmobile/setup-r8a73a4.c4
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7740.c4
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7778.c11
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7779.c10
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7790.c4
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7791.c185
-rw-r--r--arch/arm/mach-shmobile/setup-rcar-gen2.c4
-rw-r--r--arch/arm/mach-shmobile/setup-sh7372.c6
-rw-r--r--arch/arm/mach-shmobile/setup-sh73a0.c15
-rw-r--r--arch/arm/mach-shmobile/sh73a0.h1
-rw-r--r--arch/arm/mach-shmobile/sleep-sh7372.S5
-rw-r--r--arch/arm/mach-shmobile/smp-emev2.c4
-rw-r--r--arch/arm/mach-shmobile/smp-r8a7779.c4
-rw-r--r--arch/arm/mach-shmobile/smp-sh73a0.c4
-rw-r--r--arch/arm/mach-shmobile/timer.c5
-rw-r--r--arch/arm/mach-vexpress/Kconfig4
-rw-r--r--arch/arm/mach-vexpress/Makefile3
-rw-r--r--arch/arm/mach-vexpress/core.h7
-rw-r--r--arch/arm/mach-vexpress/ct-ca9x4.c212
-rw-r--r--arch/arm/mach-vexpress/include/mach/ct-ca9x4.h47
-rw-r--r--arch/arm/mach-vexpress/include/mach/hardware.h1
-rw-r--r--arch/arm/mach-vexpress/include/mach/irqs.h6
-rw-r--r--arch/arm/mach-vexpress/include/mach/motherboard.h88
-rw-r--r--arch/arm/mach-vexpress/platsmp.c42
-rw-r--r--arch/arm/mach-vexpress/v2m.c374
-rw-r--r--arch/arm/mach-zynq/Makefile2
-rw-r--r--arch/arm/mach-zynq/common.h1
-rw-r--r--arch/arm/mach-zynq/hotplug.c14
-rw-r--r--arch/arm/plat-samsung/include/plat/map-s5p.h21
-rw-r--r--arch/arm/plat-versatile/Kconfig2
128 files changed, 904 insertions, 3125 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 92dbde801d9c..fd4515ca8358 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -350,6 +350,7 @@ config ARCH_REALVIEW
350 select ICST 350 select ICST
351 select NEED_MACH_MEMORY_H 351 select NEED_MACH_MEMORY_H
352 select PLAT_VERSATILE 352 select PLAT_VERSATILE
353 select PLAT_VERSATILE_SCHED_CLOCK
353 help 354 help
354 This enables support for ARM Ltd RealView boards. 355 This enables support for ARM Ltd RealView boards.
355 356
@@ -365,6 +366,7 @@ config ARCH_VERSATILE
365 select ICST 366 select ICST
366 select PLAT_VERSATILE 367 select PLAT_VERSATILE
367 select PLAT_VERSATILE_CLOCK 368 select PLAT_VERSATILE_CLOCK
369 select PLAT_VERSATILE_SCHED_CLOCK
368 select VERSATILE_FPGA_IRQ 370 select VERSATILE_FPGA_IRQ
369 help 371 help
370 This enables support for ARM Ltd Versatile board. 372 This enables support for ARM Ltd Versatile board.
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 034a94904d69..c1785eec2cf7 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -312,8 +312,12 @@ $(INSTALL_TARGETS):
312 $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@ 312 $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
313 313
314PHONY += dtbs dtbs_install 314PHONY += dtbs dtbs_install
315dtbs dtbs_install: prepare scripts 315
316 $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $@ 316dtbs: prepare scripts
317 $(Q)$(MAKE) $(build)=$(boot)/dts
318
319dtbs_install:
320 $(Q)$(MAKE) $(dtbinst)=$(boot)/dts
317 321
318# We use MRPROPER_FILES and CLEAN_FILES now 322# We use MRPROPER_FILES and CLEAN_FILES now
319archclean: 323archclean:
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 38c89cafa1ab..fe92f5df9d3c 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -376,25 +376,24 @@ dtb-$(CONFIG_ARCH_S5PV210) += s5pv210-aquila.dtb \
376 s5pv210-smdkc110.dtb \ 376 s5pv210-smdkc110.dtb \
377 s5pv210-smdkv210.dtb \ 377 s5pv210-smdkv210.dtb \
378 s5pv210-torbreck.dtb 378 s5pv210-torbreck.dtb
379dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += r7s72100-genmai.dtb \ 379dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += \
380 r8a73a4-ape6evm.dtb \
381 r8a73a4-ape6evm-reference.dtb \
380 r8a7740-armadillo800eva.dtb \ 382 r8a7740-armadillo800eva.dtb \
381 r8a7778-bockw.dtb \ 383 r8a7778-bockw.dtb \
382 r8a7778-bockw-reference.dtb \ 384 r8a7778-bockw-reference.dtb \
383 r8a7779-marzen.dtb \ 385 r8a7779-marzen.dtb \
384 r8a7791-koelsch.dtb \
385 r8a7790-lager.dtb \ 386 r8a7790-lager.dtb \
387 sh7372-mackerel.dtb \
386 sh73a0-kzm9g.dtb \ 388 sh73a0-kzm9g.dtb \
387 sh73a0-kzm9g-reference.dtb \ 389 sh73a0-kzm9g-reference.dtb
388 r8a73a4-ape6evm.dtb \
389 r8a73a4-ape6evm-reference.dtb \
390 sh7372-mackerel.dtb
391dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \ 390dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \
392 r7s72100-genmai.dtb \ 391 r7s72100-genmai.dtb \
393 r8a7740-armadillo800eva.dtb \ 392 r8a7740-armadillo800eva.dtb \
393 r8a7779-marzen.dtb \
394 r8a7790-lager.dtb \
394 r8a7791-henninger.dtb \ 395 r8a7791-henninger.dtb \
395 r8a7791-koelsch.dtb \ 396 r8a7791-koelsch.dtb \
396 r8a7790-lager.dtb \
397 r8a7779-marzen.dtb \
398 r8a7794-alt.dtb 397 r8a7794-alt.dtb
399dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_arria5_socdk.dtb \ 398dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_arria5_socdk.dtb \
400 socfpga_cyclone5_socdk.dtb \ 399 socfpga_cyclone5_socdk.dtb \
@@ -517,15 +516,7 @@ dtb-$(CONFIG_MACH_DOVE) += dove-cm-a510.dtb \
517 dove-dove-db.dtb 516 dove-dove-db.dtb
518dtb-$(CONFIG_ARCH_MEDIATEK) += mt6589-aquaris5.dtb 517dtb-$(CONFIG_ARCH_MEDIATEK) += mt6589-aquaris5.dtb
519 518
520targets += dtbs dtbs_install
521targets += $(dtb-y)
522endif 519endif
523 520
524# *.dtb used to be generated in the directory above. Clean out the 521always := $(dtb-y)
525# old build results so people don't accidentally use them. 522clean-files := *.dtb
526dtbs: $(addprefix $(obj)/, $(dtb-y))
527 $(Q)rm -f $(obj)/../*.dtb
528
529clean-files := *.dtb
530
531dtbs_install: $(addsuffix _dtbinst_, $(dtb-y))
diff --git a/arch/arm/boot/dts/emev2-kzm9d.dts b/arch/arm/boot/dts/emev2-kzm9d.dts
index 50ccd151091e..667d323e80a3 100644
--- a/arch/arm/boot/dts/emev2-kzm9d.dts
+++ b/arch/arm/boot/dts/emev2-kzm9d.dts
@@ -25,37 +25,7 @@
25 25
26 chosen { 26 chosen {
27 bootargs = "console=ttyS1,115200n81 ignore_loglevel root=/dev/nfs ip=dhcp"; 27 bootargs = "console=ttyS1,115200n81 ignore_loglevel root=/dev/nfs ip=dhcp";
28 }; 28 stdout-path = &uart1;
29
30 reg_1p8v: regulator@0 {
31 compatible = "regulator-fixed";
32 regulator-name = "fixed-1.8V";
33 regulator-min-microvolt = <1800000>;
34 regulator-max-microvolt = <1800000>;
35 regulator-always-on;
36 regulator-boot-on;
37 };
38
39 reg_3p3v: regulator@1 {
40 compatible = "regulator-fixed";
41 regulator-name = "fixed-3.3V";
42 regulator-min-microvolt = <3300000>;
43 regulator-max-microvolt = <3300000>;
44 regulator-always-on;
45 regulator-boot-on;
46 };
47
48 lan9220@20000000 {
49 compatible = "smsc,lan9220", "smsc,lan9115";
50 reg = <0x20000000 0x10000>;
51 phy-mode = "mii";
52 interrupt-parent = <&gpio0>;
53 interrupts = <1 IRQ_TYPE_EDGE_RISING>;
54 reg-io-width = <4>;
55 smsc,irq-active-high;
56 smsc,irq-push-pull;
57 vddvario-supply = <&reg_1p8v>;
58 vdd33a-supply = <&reg_3p3v>;
59 }; 29 };
60 30
61 gpio_keys { 31 gpio_keys {
@@ -92,4 +62,35 @@
92 gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; 62 gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
93 }; 63 };
94 }; 64 };
65
66 reg_1p8v: regulator@0 {
67 compatible = "regulator-fixed";
68 regulator-name = "fixed-1.8V";
69 regulator-min-microvolt = <1800000>;
70 regulator-max-microvolt = <1800000>;
71 regulator-always-on;
72 regulator-boot-on;
73 };
74
75 reg_3p3v: regulator@1 {
76 compatible = "regulator-fixed";
77 regulator-name = "fixed-3.3V";
78 regulator-min-microvolt = <3300000>;
79 regulator-max-microvolt = <3300000>;
80 regulator-always-on;
81 regulator-boot-on;
82 };
83
84 lan9220@20000000 {
85 compatible = "smsc,lan9220", "smsc,lan9115";
86 reg = <0x20000000 0x10000>;
87 phy-mode = "mii";
88 interrupt-parent = <&gpio0>;
89 interrupts = <1 IRQ_TYPE_EDGE_RISING>;
90 reg-io-width = <4>;
91 smsc,irq-active-high;
92 smsc,irq-push-pull;
93 vddvario-supply = <&reg_1p8v>;
94 vdd33a-supply = <&reg_3p3v>;
95 };
95}; 96};
diff --git a/arch/arm/boot/dts/emev2.dtsi b/arch/arm/boot/dts/emev2.dtsi
index 00eeed3721b6..cc7bfe0ba40a 100644
--- a/arch/arm/boot/dts/emev2.dtsi
+++ b/arch/arm/boot/dts/emev2.dtsi
@@ -55,7 +55,7 @@
55 <0 121 IRQ_TYPE_LEVEL_HIGH>; 55 <0 121 IRQ_TYPE_LEVEL_HIGH>;
56 }; 56 };
57 57
58 smu@e0110000 { 58 clocks@e0110000 {
59 compatible = "renesas,emev2-smu"; 59 compatible = "renesas,emev2-smu";
60 reg = <0xe0110000 0x10000>; 60 reg = <0xe0110000 0x10000>;
61 #address-cells = <2>; 61 #address-cells = <2>;
@@ -129,7 +129,7 @@
129 }; 129 };
130 }; 130 };
131 131
132 sti@e0180000 { 132 timer@e0180000 {
133 compatible = "renesas,em-sti"; 133 compatible = "renesas,em-sti";
134 reg = <0xe0180000 0x54>; 134 reg = <0xe0180000 0x54>;
135 interrupts = <0 125 IRQ_TYPE_LEVEL_HIGH>; 135 interrupts = <0 125 IRQ_TYPE_LEVEL_HIGH>;
@@ -137,7 +137,7 @@
137 clock-names = "sclk"; 137 clock-names = "sclk";
138 }; 138 };
139 139
140 uart@e1020000 { 140 uart0: serial@e1020000 {
141 compatible = "renesas,em-uart"; 141 compatible = "renesas,em-uart";
142 reg = <0xe1020000 0x38>; 142 reg = <0xe1020000 0x38>;
143 interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>; 143 interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>;
@@ -145,7 +145,7 @@
145 clock-names = "sclk"; 145 clock-names = "sclk";
146 }; 146 };
147 147
148 uart@e1030000 { 148 uart1: serial@e1030000 {
149 compatible = "renesas,em-uart"; 149 compatible = "renesas,em-uart";
150 reg = <0xe1030000 0x38>; 150 reg = <0xe1030000 0x38>;
151 interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; 151 interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
@@ -153,7 +153,7 @@
153 clock-names = "sclk"; 153 clock-names = "sclk";
154 }; 154 };
155 155
156 uart@e1040000 { 156 uart2: serial@e1040000 {
157 compatible = "renesas,em-uart"; 157 compatible = "renesas,em-uart";
158 reg = <0xe1040000 0x38>; 158 reg = <0xe1040000 0x38>;
159 interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>; 159 interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>;
@@ -161,7 +161,7 @@
161 clock-names = "sclk"; 161 clock-names = "sclk";
162 }; 162 };
163 163
164 uart@e1050000 { 164 uart3: serial@e1050000 {
165 compatible = "renesas,em-uart"; 165 compatible = "renesas,em-uart";
166 reg = <0xe1050000 0x38>; 166 reg = <0xe1050000 0x38>;
167 interrupts = <0 11 IRQ_TYPE_LEVEL_HIGH>; 167 interrupts = <0 11 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
index d3c0bf5c84e3..b5756c21ea1d 100644
--- a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
@@ -282,7 +282,6 @@
282}; 282};
283 283
284&ssi1 { 284&ssi1 {
285 fsl,mode = "i2s-slave";
286 status = "okay"; 285 status = "okay";
287}; 286};
288 287
diff --git a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
index cade1bdc97e9..86f03c1b147c 100644
--- a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
@@ -287,7 +287,6 @@
287}; 287};
288 288
289&ssi1 { 289&ssi1 {
290 fsl,mode = "i2s-slave";
291 status = "okay"; 290 status = "okay";
292}; 291};
293 292
diff --git a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
index cf13239a1619..4a8d97f47759 100644
--- a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
@@ -376,12 +376,10 @@
376}; 376};
377 377
378&ssi1 { 378&ssi1 {
379 fsl,mode = "i2s-slave";
380 status = "okay"; 379 status = "okay";
381}; 380};
382 381
383&ssi2 { 382&ssi2 {
384 fsl,mode = "i2s-slave";
385 status = "okay"; 383 status = "okay";
386}; 384};
387 385
diff --git a/arch/arm/boot/dts/imx6qdl-rex.dtsi b/arch/arm/boot/dts/imx6qdl-rex.dtsi
index df7bcf86c156..488a640796ac 100644
--- a/arch/arm/boot/dts/imx6qdl-rex.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-rex.dtsi
@@ -308,7 +308,6 @@
308}; 308};
309 309
310&ssi1 { 310&ssi1 {
311 fsl,mode = "i2s-slave";
312 status = "okay"; 311 status = "okay";
313}; 312};
314 313
diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
index baf2f00d519a..5db4a2417d94 100644
--- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
@@ -107,10 +107,8 @@
107 "Headphone Jack", "HPOUTR", 107 "Headphone Jack", "HPOUTR",
108 "Ext Spk", "SPKOUTL", 108 "Ext Spk", "SPKOUTL",
109 "Ext Spk", "SPKOUTR", 109 "Ext Spk", "SPKOUTR",
110 "MICBIAS", "AMIC", 110 "AMIC", "MICBIAS",
111 "IN3R", "MICBIAS", 111 "IN3R", "AMIC";
112 "DMIC", "MICBIAS",
113 "DMICDAT", "DMIC";
114 mux-int-port = <2>; 112 mux-int-port = <2>;
115 mux-ext-port = <3>; 113 mux-ext-port = <3>;
116 }; 114 };
@@ -179,7 +177,7 @@
179 codec: wm8962@1a { 177 codec: wm8962@1a {
180 compatible = "wlf,wm8962"; 178 compatible = "wlf,wm8962";
181 reg = <0x1a>; 179 reg = <0x1a>;
182 clocks = <&clks 201>; 180 clocks = <&clks IMX6QDL_CLK_CKO>;
183 DCVDD-supply = <&reg_audio>; 181 DCVDD-supply = <&reg_audio>;
184 DBVDD-supply = <&reg_audio>; 182 DBVDD-supply = <&reg_audio>;
185 AVDD-supply = <&reg_audio>; 183 AVDD-supply = <&reg_audio>;
diff --git a/arch/arm/boot/dts/r7s72100-genmai.dts b/arch/arm/boot/dts/r7s72100-genmai.dts
index a3ed23c0a8f5..1518c5bcca33 100644
--- a/arch/arm/boot/dts/r7s72100-genmai.dts
+++ b/arch/arm/boot/dts/r7s72100-genmai.dts
@@ -21,7 +21,8 @@
21 }; 21 };
22 22
23 chosen { 23 chosen {
24 bootargs = "console=ttySC2,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp"; 24 bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
25 stdout-path = &scif2;
25 }; 26 };
26 27
27 memory { 28 memory {
diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi
index 801a556e264b..277e73c110e5 100644
--- a/arch/arm/boot/dts/r7s72100.dtsi
+++ b/arch/arm/boot/dts/r7s72100.dtsi
@@ -52,16 +52,6 @@
52 clock-output-names = "usb_x1"; 52 clock-output-names = "usb_x1";
53 }; 53 };
54 54
55 /* Special CPG clocks */
56 cpg_clocks: cpg_clocks@fcfe0000 {
57 #clock-cells = <1>;
58 compatible = "renesas,r7s72100-cpg-clocks",
59 "renesas,rz-cpg-clocks";
60 reg = <0xfcfe0000 0x18>;
61 clocks = <&extal_clk>, <&usb_x1_clk>;
62 clock-output-names = "pll", "i", "g";
63 };
64
65 /* Fixed factor clocks */ 55 /* Fixed factor clocks */
66 b_clk: b_clk { 56 b_clk: b_clk {
67 #clock-cells = <0>; 57 #clock-cells = <0>;
@@ -88,6 +78,16 @@
88 clock-output-names = "p0"; 78 clock-output-names = "p0";
89 }; 79 };
90 80
81 /* Special CPG clocks */
82 cpg_clocks: cpg_clocks@fcfe0000 {
83 #clock-cells = <1>;
84 compatible = "renesas,r7s72100-cpg-clocks",
85 "renesas,rz-cpg-clocks";
86 reg = <0xfcfe0000 0x18>;
87 clocks = <&extal_clk>, <&usb_x1_clk>;
88 clock-output-names = "pll", "i", "g";
89 };
90
91 /* MSTP clocks */ 91 /* MSTP clocks */
92 mstp3_clks: mstp3_clks@fcfe0420 { 92 mstp3_clks: mstp3_clks@fcfe0420 {
93 #clock-cells = <1>; 93 #clock-cells = <1>;
@@ -148,97 +148,6 @@
148 }; 148 };
149 }; 149 };
150 150
151 gic: interrupt-controller@e8201000 {
152 compatible = "arm,cortex-a9-gic";
153 #interrupt-cells = <3>;
154 #address-cells = <0>;
155 interrupt-controller;
156 reg = <0xe8201000 0x1000>,
157 <0xe8202000 0x1000>;
158 };
159
160 i2c0: i2c@fcfee000 {
161 #address-cells = <1>;
162 #size-cells = <0>;
163 compatible = "renesas,riic-r7s72100", "renesas,riic-rz";
164 reg = <0xfcfee000 0x44>;
165 interrupts = <0 157 IRQ_TYPE_LEVEL_HIGH>,
166 <0 158 IRQ_TYPE_EDGE_RISING>,
167 <0 159 IRQ_TYPE_EDGE_RISING>,
168 <0 160 IRQ_TYPE_LEVEL_HIGH>,
169 <0 161 IRQ_TYPE_LEVEL_HIGH>,
170 <0 162 IRQ_TYPE_LEVEL_HIGH>,
171 <0 163 IRQ_TYPE_LEVEL_HIGH>,
172 <0 164 IRQ_TYPE_LEVEL_HIGH>;
173 clocks = <&mstp9_clks R7S72100_CLK_I2C0>;
174 clock-frequency = <100000>;
175 status = "disabled";
176 };
177
178 i2c1: i2c@fcfee400 {
179 #address-cells = <1>;
180 #size-cells = <0>;
181 compatible = "renesas,riic-r7s72100", "renesas,riic-rz";
182 reg = <0xfcfee400 0x44>;
183 interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>,
184 <0 166 IRQ_TYPE_EDGE_RISING>,
185 <0 167 IRQ_TYPE_EDGE_RISING>,
186 <0 168 IRQ_TYPE_LEVEL_HIGH>,
187 <0 169 IRQ_TYPE_LEVEL_HIGH>,
188 <0 170 IRQ_TYPE_LEVEL_HIGH>,
189 <0 171 IRQ_TYPE_LEVEL_HIGH>,
190 <0 172 IRQ_TYPE_LEVEL_HIGH>;
191 clocks = <&mstp9_clks R7S72100_CLK_I2C1>;
192 clock-frequency = <100000>;
193 status = "disabled";
194 };
195
196 i2c2: i2c@fcfee800 {
197 #address-cells = <1>;
198 #size-cells = <0>;
199 compatible = "renesas,riic-r7s72100", "renesas,riic-rz";
200 reg = <0xfcfee800 0x44>;
201 interrupts = <0 173 IRQ_TYPE_LEVEL_HIGH>,
202 <0 174 IRQ_TYPE_EDGE_RISING>,
203 <0 175 IRQ_TYPE_EDGE_RISING>,
204 <0 176 IRQ_TYPE_LEVEL_HIGH>,
205 <0 177 IRQ_TYPE_LEVEL_HIGH>,
206 <0 178 IRQ_TYPE_LEVEL_HIGH>,
207 <0 179 IRQ_TYPE_LEVEL_HIGH>,
208 <0 180 IRQ_TYPE_LEVEL_HIGH>;
209 clocks = <&mstp9_clks R7S72100_CLK_I2C2>;
210 clock-frequency = <100000>;
211 status = "disabled";
212 };
213
214 i2c3: i2c@fcfeec00 {
215 #address-cells = <1>;
216 #size-cells = <0>;
217 compatible = "renesas,riic-r7s72100", "renesas,riic-rz";
218 reg = <0xfcfeec00 0x44>;
219 interrupts = <0 181 IRQ_TYPE_LEVEL_HIGH>,
220 <0 182 IRQ_TYPE_EDGE_RISING>,
221 <0 183 IRQ_TYPE_EDGE_RISING>,
222 <0 184 IRQ_TYPE_LEVEL_HIGH>,
223 <0 185 IRQ_TYPE_LEVEL_HIGH>,
224 <0 186 IRQ_TYPE_LEVEL_HIGH>,
225 <0 187 IRQ_TYPE_LEVEL_HIGH>,
226 <0 188 IRQ_TYPE_LEVEL_HIGH>;
227 clocks = <&mstp9_clks R7S72100_CLK_I2C3>;
228 clock-frequency = <100000>;
229 status = "disabled";
230 };
231
232 mtu2: timer@fcff0000 {
233 compatible = "renesas,mtu2-r7s72100", "renesas,mtu2";
234 reg = <0xfcff0000 0x400>;
235 interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
236 interrupt-names = "tgi0a";
237 clocks = <&mstp3_clks R7S72100_CLK_MTU2>;
238 clock-names = "fck";
239 status = "disabled";
240 };
241
242 scif0: serial@e8007000 { 151 scif0: serial@e8007000 {
243 compatible = "renesas,scif-r7s72100", "renesas,scif"; 152 compatible = "renesas,scif-r7s72100", "renesas,scif";
244 reg = <0xe8007000 64>; 153 reg = <0xe8007000 64>;
@@ -404,4 +313,95 @@
404 #size-cells = <0>; 313 #size-cells = <0>;
405 status = "disabled"; 314 status = "disabled";
406 }; 315 };
316
317 gic: interrupt-controller@e8201000 {
318 compatible = "arm,cortex-a9-gic";
319 #interrupt-cells = <3>;
320 #address-cells = <0>;
321 interrupt-controller;
322 reg = <0xe8201000 0x1000>,
323 <0xe8202000 0x1000>;
324 };
325
326 i2c0: i2c@fcfee000 {
327 #address-cells = <1>;
328 #size-cells = <0>;
329 compatible = "renesas,riic-r7s72100", "renesas,riic-rz";
330 reg = <0xfcfee000 0x44>;
331 interrupts = <0 157 IRQ_TYPE_LEVEL_HIGH>,
332 <0 158 IRQ_TYPE_EDGE_RISING>,
333 <0 159 IRQ_TYPE_EDGE_RISING>,
334 <0 160 IRQ_TYPE_LEVEL_HIGH>,
335 <0 161 IRQ_TYPE_LEVEL_HIGH>,
336 <0 162 IRQ_TYPE_LEVEL_HIGH>,
337 <0 163 IRQ_TYPE_LEVEL_HIGH>,
338 <0 164 IRQ_TYPE_LEVEL_HIGH>;
339 clocks = <&mstp9_clks R7S72100_CLK_I2C0>;
340 clock-frequency = <100000>;
341 status = "disabled";
342 };
343
344 i2c1: i2c@fcfee400 {
345 #address-cells = <1>;
346 #size-cells = <0>;
347 compatible = "renesas,riic-r7s72100", "renesas,riic-rz";
348 reg = <0xfcfee400 0x44>;
349 interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>,
350 <0 166 IRQ_TYPE_EDGE_RISING>,
351 <0 167 IRQ_TYPE_EDGE_RISING>,
352 <0 168 IRQ_TYPE_LEVEL_HIGH>,
353 <0 169 IRQ_TYPE_LEVEL_HIGH>,
354 <0 170 IRQ_TYPE_LEVEL_HIGH>,
355 <0 171 IRQ_TYPE_LEVEL_HIGH>,
356 <0 172 IRQ_TYPE_LEVEL_HIGH>;
357 clocks = <&mstp9_clks R7S72100_CLK_I2C1>;
358 clock-frequency = <100000>;
359 status = "disabled";
360 };
361
362 i2c2: i2c@fcfee800 {
363 #address-cells = <1>;
364 #size-cells = <0>;
365 compatible = "renesas,riic-r7s72100", "renesas,riic-rz";
366 reg = <0xfcfee800 0x44>;
367 interrupts = <0 173 IRQ_TYPE_LEVEL_HIGH>,
368 <0 174 IRQ_TYPE_EDGE_RISING>,
369 <0 175 IRQ_TYPE_EDGE_RISING>,
370 <0 176 IRQ_TYPE_LEVEL_HIGH>,
371 <0 177 IRQ_TYPE_LEVEL_HIGH>,
372 <0 178 IRQ_TYPE_LEVEL_HIGH>,
373 <0 179 IRQ_TYPE_LEVEL_HIGH>,
374 <0 180 IRQ_TYPE_LEVEL_HIGH>;
375 clocks = <&mstp9_clks R7S72100_CLK_I2C2>;
376 clock-frequency = <100000>;
377 status = "disabled";
378 };
379
380 i2c3: i2c@fcfeec00 {
381 #address-cells = <1>;
382 #size-cells = <0>;
383 compatible = "renesas,riic-r7s72100", "renesas,riic-rz";
384 reg = <0xfcfeec00 0x44>;
385 interrupts = <0 181 IRQ_TYPE_LEVEL_HIGH>,
386 <0 182 IRQ_TYPE_EDGE_RISING>,
387 <0 183 IRQ_TYPE_EDGE_RISING>,
388 <0 184 IRQ_TYPE_LEVEL_HIGH>,
389 <0 185 IRQ_TYPE_LEVEL_HIGH>,
390 <0 186 IRQ_TYPE_LEVEL_HIGH>,
391 <0 187 IRQ_TYPE_LEVEL_HIGH>,
392 <0 188 IRQ_TYPE_LEVEL_HIGH>;
393 clocks = <&mstp9_clks R7S72100_CLK_I2C3>;
394 clock-frequency = <100000>;
395 status = "disabled";
396 };
397
398 mtu2: timer@fcff0000 {
399 compatible = "renesas,mtu2-r7s72100", "renesas,mtu2";
400 reg = <0xfcff0000 0x400>;
401 interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
402 interrupt-names = "tgi0a";
403 clocks = <&mstp3_clks R7S72100_CLK_MTU2>;
404 clock-names = "fck";
405 status = "disabled";
406 };
407}; 407};
diff --git a/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts b/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
index a860f32bca27..2bcf69124a6a 100644
--- a/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
+++ b/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
@@ -21,7 +21,8 @@
21 }; 21 };
22 22
23 chosen { 23 chosen {
24 bootargs = "console=ttySC0,115200 ignore_loglevel rw"; 24 bootargs = "ignore_loglevel rw";
25 stdout-path = &scifa0;
25 }; 26 };
26 27
27 memory@40000000 { 28 memory@40000000 {
diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi
index ef152e384822..c17afef92e8d 100644
--- a/arch/arm/boot/dts/r8a73a4.dtsi
+++ b/arch/arm/boot/dts/r8a73a4.dtsi
@@ -30,18 +30,6 @@
30 }; 30 };
31 }; 31 };
32 32
33 gic: interrupt-controller@f1001000 {
34 compatible = "arm,cortex-a15-gic";
35 #interrupt-cells = <3>;
36 #address-cells = <0>;
37 interrupt-controller;
38 reg = <0 0xf1001000 0 0x1000>,
39 <0 0xf1002000 0 0x1000>,
40 <0 0xf1004000 0 0x2000>,
41 <0 0xf1006000 0 0x2000>;
42 interrupts = <1 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
43 };
44
45 timer { 33 timer {
46 compatible = "arm,armv7-timer"; 34 compatible = "arm,armv7-timer";
47 interrupts = <1 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 35 interrupts = <1 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
@@ -50,6 +38,80 @@
50 <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; 38 <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
51 }; 39 };
52 40
41 dmac: dma-multiplexer {
42 compatible = "renesas,shdma-mux";
43 #dma-cells = <1>;
44 dma-channels = <20>;
45 dma-requests = <256>;
46 #address-cells = <2>;
47 #size-cells = <2>;
48 ranges;
49
50 dma0: dma-controller@e6700020 {
51 compatible = "renesas,shdma-r8a73a4";
52 reg = <0 0xe6700020 0 0x89e0>;
53 interrupts = <0 220 IRQ_TYPE_LEVEL_HIGH
54 0 200 IRQ_TYPE_LEVEL_HIGH
55 0 201 IRQ_TYPE_LEVEL_HIGH
56 0 202 IRQ_TYPE_LEVEL_HIGH
57 0 203 IRQ_TYPE_LEVEL_HIGH
58 0 204 IRQ_TYPE_LEVEL_HIGH
59 0 205 IRQ_TYPE_LEVEL_HIGH
60 0 206 IRQ_TYPE_LEVEL_HIGH
61 0 207 IRQ_TYPE_LEVEL_HIGH
62 0 208 IRQ_TYPE_LEVEL_HIGH
63 0 209 IRQ_TYPE_LEVEL_HIGH
64 0 210 IRQ_TYPE_LEVEL_HIGH
65 0 211 IRQ_TYPE_LEVEL_HIGH
66 0 212 IRQ_TYPE_LEVEL_HIGH
67 0 213 IRQ_TYPE_LEVEL_HIGH
68 0 214 IRQ_TYPE_LEVEL_HIGH
69 0 215 IRQ_TYPE_LEVEL_HIGH
70 0 216 IRQ_TYPE_LEVEL_HIGH
71 0 217 IRQ_TYPE_LEVEL_HIGH
72 0 218 IRQ_TYPE_LEVEL_HIGH
73 0 219 IRQ_TYPE_LEVEL_HIGH>;
74 interrupt-names = "error",
75 "ch0", "ch1", "ch2", "ch3",
76 "ch4", "ch5", "ch6", "ch7",
77 "ch8", "ch9", "ch10", "ch11",
78 "ch12", "ch13", "ch14", "ch15",
79 "ch16", "ch17", "ch18", "ch19";
80 };
81 };
82
83 pfc: pfc@e6050000 {
84 compatible = "renesas,pfc-r8a73a4";
85 reg = <0 0xe6050000 0 0x9000>;
86 gpio-controller;
87 #gpio-cells = <2>;
88 interrupts-extended =
89 <&irqc0 0 0>, <&irqc0 1 0>, <&irqc0 2 0>, <&irqc0 3 0>,
90 <&irqc0 4 0>, <&irqc0 5 0>, <&irqc0 6 0>, <&irqc0 7 0>,
91 <&irqc0 8 0>, <&irqc0 9 0>, <&irqc0 10 0>, <&irqc0 11 0>,
92 <&irqc0 12 0>, <&irqc0 13 0>, <&irqc0 14 0>, <&irqc0 15 0>,
93 <&irqc0 16 0>, <&irqc0 17 0>, <&irqc0 18 0>, <&irqc0 19 0>,
94 <&irqc0 20 0>, <&irqc0 21 0>, <&irqc0 22 0>, <&irqc0 23 0>,
95 <&irqc0 24 0>, <&irqc0 25 0>, <&irqc0 26 0>, <&irqc0 27 0>,
96 <&irqc0 28 0>, <&irqc0 29 0>, <&irqc0 30 0>, <&irqc0 31 0>,
97 <&irqc1 0 0>, <&irqc1 1 0>, <&irqc1 2 0>, <&irqc1 3 0>,
98 <&irqc1 4 0>, <&irqc1 5 0>, <&irqc1 6 0>, <&irqc1 7 0>,
99 <&irqc1 8 0>, <&irqc1 9 0>, <&irqc1 10 0>, <&irqc1 11 0>,
100 <&irqc1 12 0>, <&irqc1 13 0>, <&irqc1 14 0>, <&irqc1 15 0>,
101 <&irqc1 16 0>, <&irqc1 17 0>, <&irqc1 18 0>, <&irqc1 19 0>,
102 <&irqc1 20 0>, <&irqc1 21 0>, <&irqc1 22 0>, <&irqc1 23 0>,
103 <&irqc1 24 0>, <&irqc1 25 0>;
104 };
105
106 i2c5: i2c@e60b0000 {
107 #address-cells = <1>;
108 #size-cells = <0>;
109 compatible = "renesas,rmobile-iic";
110 reg = <0 0xe60b0000 0 0x428>;
111 interrupts = <0 179 IRQ_TYPE_LEVEL_HIGH>;
112 status = "disabled";
113 };
114
53 irqc0: interrupt-controller@e61c0000 { 115 irqc0: interrupt-controller@e61c0000 {
54 compatible = "renesas,irqc-r8a73a4", "renesas,irqc"; 116 compatible = "renesas,irqc-r8a73a4", "renesas,irqc";
55 #interrupt-cells = <2>; 117 #interrupt-cells = <2>;
@@ -122,48 +184,6 @@
122 <0 57 IRQ_TYPE_LEVEL_HIGH>; 184 <0 57 IRQ_TYPE_LEVEL_HIGH>;
123 }; 185 };
124 186
125 dmac: dma-multiplexer@0 {
126 compatible = "renesas,shdma-mux";
127 #dma-cells = <1>;
128 dma-channels = <20>;
129 dma-requests = <256>;
130 #address-cells = <2>;
131 #size-cells = <2>;
132 ranges;
133
134 dma0: dma-controller@e6700020 {
135 compatible = "renesas,shdma-r8a73a4";
136 reg = <0 0xe6700020 0 0x89e0>;
137 interrupts = <0 220 IRQ_TYPE_LEVEL_HIGH
138 0 200 IRQ_TYPE_LEVEL_HIGH
139 0 201 IRQ_TYPE_LEVEL_HIGH
140 0 202 IRQ_TYPE_LEVEL_HIGH
141 0 203 IRQ_TYPE_LEVEL_HIGH
142 0 204 IRQ_TYPE_LEVEL_HIGH
143 0 205 IRQ_TYPE_LEVEL_HIGH
144 0 206 IRQ_TYPE_LEVEL_HIGH
145 0 207 IRQ_TYPE_LEVEL_HIGH
146 0 208 IRQ_TYPE_LEVEL_HIGH
147 0 209 IRQ_TYPE_LEVEL_HIGH
148 0 210 IRQ_TYPE_LEVEL_HIGH
149 0 211 IRQ_TYPE_LEVEL_HIGH
150 0 212 IRQ_TYPE_LEVEL_HIGH
151 0 213 IRQ_TYPE_LEVEL_HIGH
152 0 214 IRQ_TYPE_LEVEL_HIGH
153 0 215 IRQ_TYPE_LEVEL_HIGH
154 0 216 IRQ_TYPE_LEVEL_HIGH
155 0 217 IRQ_TYPE_LEVEL_HIGH
156 0 218 IRQ_TYPE_LEVEL_HIGH
157 0 219 IRQ_TYPE_LEVEL_HIGH>;
158 interrupt-names = "error",
159 "ch0", "ch1", "ch2", "ch3",
160 "ch4", "ch5", "ch6", "ch7",
161 "ch8", "ch9", "ch10", "ch11",
162 "ch12", "ch13", "ch14", "ch15",
163 "ch16", "ch17", "ch18", "ch19";
164 };
165 };
166
167 thermal@e61f0000 { 187 thermal@e61f0000 {
168 compatible = "renesas,thermal-r8a73a4", "renesas,rcar-thermal"; 188 compatible = "renesas,thermal-r8a73a4", "renesas,rcar-thermal";
169 reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>, 189 reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>,
@@ -216,15 +236,6 @@
216 status = "disabled"; 236 status = "disabled";
217 }; 237 };
218 238
219 i2c5: i2c@e60b0000 {
220 #address-cells = <1>;
221 #size-cells = <0>;
222 compatible = "renesas,rmobile-iic";
223 reg = <0 0xe60b0000 0 0x428>;
224 interrupts = <0 179 IRQ_TYPE_LEVEL_HIGH>;
225 status = "disabled";
226 };
227
228 i2c6: i2c@e6550000 { 239 i2c6: i2c@e6550000 {
229 #address-cells = <1>; 240 #address-cells = <1>;
230 #size-cells = <0>; 241 #size-cells = <0>;
@@ -252,20 +263,6 @@
252 status = "disabled"; 263 status = "disabled";
253 }; 264 };
254 265
255 scifa0: serial@e6c40000 {
256 compatible = "renesas,scifa-r8a73a4", "renesas,scifa";
257 reg = <0 0xe6c40000 0 0x100>;
258 interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>;
259 status = "disabled";
260 };
261
262 scifa1: serial@e6c50000 {
263 compatible = "renesas,scifa-r8a73a4", "renesas,scifa";
264 reg = <0 0xe6c50000 0 0x100>;
265 interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>;
266 status = "disabled";
267 };
268
269 scifb2: serial@e6c20000 { 266 scifb2: serial@e6c20000 {
270 compatible = "renesas,scifb-r8a73a4", "renesas,scifb"; 267 compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
271 reg = <0 0xe6c20000 0 0x100>; 268 reg = <0 0xe6c20000 0 0x100>;
@@ -280,6 +277,20 @@
280 status = "disabled"; 277 status = "disabled";
281 }; 278 };
282 279
280 scifa0: serial@e6c40000 {
281 compatible = "renesas,scifa-r8a73a4", "renesas,scifa";
282 reg = <0 0xe6c40000 0 0x100>;
283 interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>;
284 status = "disabled";
285 };
286
287 scifa1: serial@e6c50000 {
288 compatible = "renesas,scifa-r8a73a4", "renesas,scifa";
289 reg = <0 0xe6c50000 0 0x100>;
290 interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>;
291 status = "disabled";
292 };
293
283 scifb4: serial@e6ce0000 { 294 scifb4: serial@e6ce0000 {
284 compatible = "renesas,scifb-r8a73a4", "renesas,scifb"; 295 compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
285 reg = <0 0xe6ce0000 0 0x100>; 296 reg = <0 0xe6ce0000 0 0x100>;
@@ -294,45 +305,6 @@
294 status = "disabled"; 305 status = "disabled";
295 }; 306 };
296 307
297 mmcif0: mmc@ee200000 {
298 compatible = "renesas,sh-mmcif";
299 reg = <0 0xee200000 0 0x80>;
300 interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
301 reg-io-width = <4>;
302 status = "disabled";
303 };
304
305 mmcif1: mmc@ee220000 {
306 compatible = "renesas,sh-mmcif";
307 reg = <0 0xee220000 0 0x80>;
308 interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>;
309 reg-io-width = <4>;
310 status = "disabled";
311 };
312
313 pfc: pfc@e6050000 {
314 compatible = "renesas,pfc-r8a73a4";
315 reg = <0 0xe6050000 0 0x9000>;
316 gpio-controller;
317 #gpio-cells = <2>;
318 interrupts-extended =
319 <&irqc0 0 0>, <&irqc0 1 0>, <&irqc0 2 0>, <&irqc0 3 0>,
320 <&irqc0 4 0>, <&irqc0 5 0>, <&irqc0 6 0>, <&irqc0 7 0>,
321 <&irqc0 8 0>, <&irqc0 9 0>, <&irqc0 10 0>, <&irqc0 11 0>,
322 <&irqc0 12 0>, <&irqc0 13 0>, <&irqc0 14 0>, <&irqc0 15 0>,
323 <&irqc0 16 0>, <&irqc0 17 0>, <&irqc0 18 0>, <&irqc0 19 0>,
324 <&irqc0 20 0>, <&irqc0 21 0>, <&irqc0 22 0>, <&irqc0 23 0>,
325 <&irqc0 24 0>, <&irqc0 25 0>, <&irqc0 26 0>, <&irqc0 27 0>,
326 <&irqc0 28 0>, <&irqc0 29 0>, <&irqc0 30 0>, <&irqc0 31 0>,
327 <&irqc1 0 0>, <&irqc1 1 0>, <&irqc1 2 0>, <&irqc1 3 0>,
328 <&irqc1 4 0>, <&irqc1 5 0>, <&irqc1 6 0>, <&irqc1 7 0>,
329 <&irqc1 8 0>, <&irqc1 9 0>, <&irqc1 10 0>, <&irqc1 11 0>,
330 <&irqc1 12 0>, <&irqc1 13 0>, <&irqc1 14 0>, <&irqc1 15 0>,
331 <&irqc1 16 0>, <&irqc1 17 0>, <&irqc1 18 0>, <&irqc1 19 0>,
332 <&irqc1 20 0>, <&irqc1 21 0>, <&irqc1 22 0>, <&irqc1 23 0>,
333 <&irqc1 24 0>, <&irqc1 25 0>;
334 };
335
336 sdhi0: sd@ee100000 { 308 sdhi0: sd@ee100000 {
337 compatible = "renesas,sdhi-r8a73a4"; 309 compatible = "renesas,sdhi-r8a73a4";
338 reg = <0 0xee100000 0 0x100>; 310 reg = <0 0xee100000 0 0x100>;
@@ -356,4 +328,32 @@
356 cap-sd-highspeed; 328 cap-sd-highspeed;
357 status = "disabled"; 329 status = "disabled";
358 }; 330 };
331
332 mmcif0: mmc@ee200000 {
333 compatible = "renesas,sh-mmcif";
334 reg = <0 0xee200000 0 0x80>;
335 interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
336 reg-io-width = <4>;
337 status = "disabled";
338 };
339
340 mmcif1: mmc@ee220000 {
341 compatible = "renesas,sh-mmcif";
342 reg = <0 0xee220000 0 0x80>;
343 interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>;
344 reg-io-width = <4>;
345 status = "disabled";
346 };
347
348 gic: interrupt-controller@f1001000 {
349 compatible = "arm,cortex-a15-gic";
350 #interrupt-cells = <3>;
351 #address-cells = <0>;
352 interrupt-controller;
353 reg = <0 0xf1001000 0 0x1000>,
354 <0 0xf1002000 0 0x1000>,
355 <0 0xf1004000 0 0x2000>,
356 <0 0xf1006000 0 0x2000>;
357 interrupts = <1 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
358 };
359}; 359};
diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva.dts
index effb7b46f131..2703428557fc 100644
--- a/arch/arm/boot/dts/r8a7740-armadillo800eva.dts
+++ b/arch/arm/boot/dts/r8a7740-armadillo800eva.dts
@@ -25,6 +25,7 @@
25 25
26 chosen { 26 chosen {
27 bootargs = "console=tty0 console=ttySC1,115200 earlyprintk=sh-sci.1,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw"; 27 bootargs = "console=tty0 console=ttySC1,115200 earlyprintk=sh-sci.1,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw";
28 stdout-path = &scifa1;
28 }; 29 };
29 30
30 memory { 31 memory {
diff --git a/arch/arm/boot/dts/r8a7778-bockw-reference.dts b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
index 3342c74c5de8..fba294905ff4 100644
--- a/arch/arm/boot/dts/r8a7778-bockw-reference.dts
+++ b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
@@ -28,7 +28,8 @@
28 }; 28 };
29 29
30 chosen { 30 chosen {
31 bootargs = "console=ttySC0,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw"; 31 bootargs = "ignore_loglevel root=/dev/nfs ip=dhcp rw";
32 stdout-path = &scif0;
32 }; 33 };
33 34
34 memory { 35 memory {
diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts
index c160404e4d40..e83d40e24bcd 100644
--- a/arch/arm/boot/dts/r8a7779-marzen.dts
+++ b/arch/arm/boot/dts/r8a7779-marzen.dts
@@ -25,6 +25,7 @@
25 25
26 chosen { 26 chosen {
27 bootargs = "console=ttySC2,115200 ignore_loglevel root=/dev/nfs ip=on"; 27 bootargs = "console=ttySC2,115200 ignore_loglevel root=/dev/nfs ip=on";
28 stdout-path = &scif2;
28 }; 29 };
29 30
30 memory { 31 memory {
@@ -68,6 +69,78 @@
68 gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>; 69 gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;
69 }; 70 };
70 }; 71 };
72
73 vga-encoder {
74 compatible = "adi,adv7123";
75
76 ports {
77 #address-cells = <1>;
78 #size-cells = <0>;
79
80 port@0 {
81 reg = <0>;
82 vga_enc_in: endpoint {
83 remote-endpoint = <&du_out_rgb0>;
84 };
85 };
86 port@1 {
87 reg = <1>;
88 vga_enc_out: endpoint {
89 remote-endpoint = <&vga_in>;
90 };
91 };
92 };
93 };
94
95 vga {
96 compatible = "vga-connector";
97
98 port {
99 vga_in: endpoint {
100 remote-endpoint = <&vga_enc_out>;
101 };
102 };
103 };
104
105 lvds-encoder {
106 compatible = "thine,thc63lvdm83d";
107
108 ports {
109 #address-cells = <1>;
110 #size-cells = <0>;
111
112 port@0 {
113 reg = <0>;
114 lvds_enc_in: endpoint {
115 remote-endpoint = <&du_out_rgb1>;
116 };
117 };
118 port@1 {
119 reg = <1>;
120 lvds_connector: endpoint {
121 };
122 };
123 };
124 };
125};
126
127&du {
128 pinctrl-0 = <&du_pins>;
129 pinctrl-names = "default";
130 status = "okay";
131
132 ports {
133 port@0 {
134 endpoint {
135 remote-endpoint = <&vga_enc_in>;
136 };
137 };
138 port@1 {
139 endpoint {
140 remote-endpoint = <&lvds_enc_in>;
141 };
142 };
143 };
71}; 144};
72 145
73&irqpin0 { 146&irqpin0 {
@@ -83,6 +156,17 @@
83}; 156};
84 157
85&pfc { 158&pfc {
159 du_pins: du {
160 du0 {
161 renesas,groups = "du0_rgb888", "du0_sync_1", "du0_clk_out_0";
162 renesas,function = "du0";
163 };
164 du1 {
165 renesas,groups = "du1_rgb666", "du1_sync_1", "du1_clk_out";
166 renesas,function = "du1";
167 };
168 };
169
86 lan0_pins: lan0 { 170 lan0_pins: lan0 {
87 intc { 171 intc {
88 renesas,groups = "intc_irq1_b"; 172 renesas,groups = "intc_irq1_b";
diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
index 7cfba9aa1b41..fda814ed191d 100644
--- a/arch/arm/boot/dts/r8a7779.dtsi
+++ b/arch/arm/boot/dts/r8a7779.dtsi
@@ -379,6 +379,30 @@
379 status = "disabled"; 379 status = "disabled";
380 }; 380 };
381 381
382 du: display@fff80000 {
383 compatible = "renesas,du-r8a7779";
384 reg = <0 0xfff80000 0 0x40000>;
385 interrupts = <0 31 IRQ_TYPE_LEVEL_HIGH>;
386 clocks = <&mstp1_clks R8A7779_CLK_DU>;
387 status = "disabled";
388
389 ports {
390 #address-cells = <1>;
391 #size-cells = <0>;
392
393 port@0 {
394 reg = <0>;
395 du_out_rgb0: endpoint {
396 };
397 };
398 port@1 {
399 reg = <1>;
400 du_out_rgb1: endpoint {
401 };
402 };
403 };
404 };
405
382 clocks { 406 clocks {
383 #address-cells = <1>; 407 #address-cells = <1>;
384 #size-cells = <1>; 408 #size-cells = <1>;
diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 69098b906b39..acab2e153382 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -25,6 +25,7 @@
25 25
26 chosen { 26 chosen {
27 bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp"; 27 bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
28 stdout-path = &scifa0;
28 }; 29 };
29 30
30 memory@40000000 { 31 memory@40000000 {
@@ -144,6 +145,56 @@
144 states = <3300000 1 145 states = <3300000 1
145 1800000 0>; 146 1800000 0>;
146 }; 147 };
148
149 vga-encoder {
150 compatible = "adi,adv7123";
151
152 ports {
153 #address-cells = <1>;
154 #size-cells = <0>;
155
156 port@0 {
157 reg = <0>;
158 adv7123_in: endpoint {
159 remote-endpoint = <&du_out_rgb>;
160 };
161 };
162 port@1 {
163 reg = <1>;
164 adv7123_out: endpoint {
165 remote-endpoint = <&vga_in>;
166 };
167 };
168 };
169 };
170
171 vga {
172 compatible = "vga-connector";
173
174 port {
175 vga_in: endpoint {
176 remote-endpoint = <&adv7123_out>;
177 };
178 };
179 };
180};
181
182&du {
183 pinctrl-0 = <&du_pins>;
184 pinctrl-names = "default";
185 status = "okay";
186
187 ports {
188 port@0 {
189 endpoint {
190 remote-endpoint = <&adv7123_in>;
191 };
192 };
193 port@2 {
194 lvds_connector: endpoint {
195 };
196 };
197 };
147}; 198};
148 199
149&extal_clk { 200&extal_clk {
@@ -151,9 +202,6 @@
151}; 202};
152 203
153&pfc { 204&pfc {
154 pinctrl-0 = <&du_pins>;
155 pinctrl-names = "default";
156
157 du_pins: du { 205 du_pins: du {
158 renesas,groups = "du_rgb666", "du_sync_1", "du_clk_out_0"; 206 renesas,groups = "du_rgb666", "du_sync_1", "du_clk_out_0";
159 renesas,function = "du"; 207 renesas,function = "du";
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index e20affe156c1..0c20c90d8c06 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -600,6 +600,96 @@
600 status = "disabled"; 600 status = "disabled";
601 }; 601 };
602 602
603 vsp1@fe920000 {
604 compatible = "renesas,vsp1";
605 reg = <0 0xfe920000 0 0x8000>;
606 interrupts = <0 266 IRQ_TYPE_LEVEL_HIGH>;
607 clocks = <&mstp1_clks R8A7790_CLK_VSP1_R>;
608
609 renesas,has-sru;
610 renesas,#rpf = <5>;
611 renesas,#uds = <1>;
612 renesas,#wpf = <4>;
613 };
614
615 vsp1@fe928000 {
616 compatible = "renesas,vsp1";
617 reg = <0 0xfe928000 0 0x8000>;
618 interrupts = <0 267 IRQ_TYPE_LEVEL_HIGH>;
619 clocks = <&mstp1_clks R8A7790_CLK_VSP1_S>;
620
621 renesas,has-lut;
622 renesas,has-sru;
623 renesas,#rpf = <5>;
624 renesas,#uds = <3>;
625 renesas,#wpf = <4>;
626 };
627
628 vsp1@fe930000 {
629 compatible = "renesas,vsp1";
630 reg = <0 0xfe930000 0 0x8000>;
631 interrupts = <0 246 IRQ_TYPE_LEVEL_HIGH>;
632 clocks = <&mstp1_clks R8A7790_CLK_VSP1_DU0>;
633
634 renesas,has-lif;
635 renesas,has-lut;
636 renesas,#rpf = <4>;
637 renesas,#uds = <1>;
638 renesas,#wpf = <4>;
639 };
640
641 vsp1@fe938000 {
642 compatible = "renesas,vsp1";
643 reg = <0 0xfe938000 0 0x8000>;
644 interrupts = <0 247 IRQ_TYPE_LEVEL_HIGH>;
645 clocks = <&mstp1_clks R8A7790_CLK_VSP1_DU1>;
646
647 renesas,has-lif;
648 renesas,has-lut;
649 renesas,#rpf = <4>;
650 renesas,#uds = <1>;
651 renesas,#wpf = <4>;
652 };
653
654 du: display@feb00000 {
655 compatible = "renesas,du-r8a7790";
656 reg = <0 0xfeb00000 0 0x70000>,
657 <0 0xfeb90000 0 0x1c>,
658 <0 0xfeb94000 0 0x1c>;
659 reg-names = "du", "lvds.0", "lvds.1";
660 interrupts = <0 256 IRQ_TYPE_LEVEL_HIGH>,
661 <0 268 IRQ_TYPE_LEVEL_HIGH>,
662 <0 269 IRQ_TYPE_LEVEL_HIGH>;
663 clocks = <&mstp7_clks R8A7790_CLK_DU0>,
664 <&mstp7_clks R8A7790_CLK_DU1>,
665 <&mstp7_clks R8A7790_CLK_DU2>,
666 <&mstp7_clks R8A7790_CLK_LVDS0>,
667 <&mstp7_clks R8A7790_CLK_LVDS1>;
668 clock-names = "du.0", "du.1", "du.2", "lvds.0", "lvds.1";
669 status = "disabled";
670
671 ports {
672 #address-cells = <1>;
673 #size-cells = <0>;
674
675 port@0 {
676 reg = <0>;
677 du_out_rgb: endpoint {
678 };
679 };
680 port@1 {
681 reg = <1>;
682 du_out_lvds0: endpoint {
683 };
684 };
685 port@2 {
686 reg = <2>;
687 du_out_lvds1: endpoint {
688 };
689 };
690 };
691 };
692
603 clocks { 693 clocks {
604 #address-cells = <2>; 694 #address-cells = <2>;
605 #size-cells = <2>; 695 #size-cells = <2>;
diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts
index f1b56de10205..0868899882e3 100644
--- a/arch/arm/boot/dts/r8a7791-henninger.dts
+++ b/arch/arm/boot/dts/r8a7791-henninger.dts
@@ -23,6 +23,7 @@
23 23
24 chosen { 24 chosen {
25 bootargs = "console=ttySC0,38400 ignore_loglevel rw root=/dev/nfs ip=dhcp"; 25 bootargs = "console=ttySC0,38400 ignore_loglevel rw root=/dev/nfs ip=dhcp";
26 stdout-path = &scif0;
26 }; 27 };
27 28
28 memory@40000000 { 29 memory@40000000 {
diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
index 07550e775e80..924183817b02 100644
--- a/arch/arm/boot/dts/r8a7791-koelsch.dts
+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
@@ -25,7 +25,8 @@
25 }; 25 };
26 26
27 chosen { 27 chosen {
28 bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp"; 28 bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
29 stdout-path = &scif0;
29 }; 30 };
30 31
31 memory@40000000 { 32 memory@40000000 {
@@ -211,14 +212,24 @@
211 }; 212 };
212}; 213};
213 214
215&du {
216 pinctrl-0 = <&du_pins>;
217 pinctrl-names = "default";
218 status = "okay";
219
220 ports {
221 port@1 {
222 lvds_connector: endpoint {
223 };
224 };
225 };
226};
227
214&extal_clk { 228&extal_clk {
215 clock-frequency = <20000000>; 229 clock-frequency = <20000000>;
216}; 230};
217 231
218&pfc { 232&pfc {
219 pinctrl-0 = <&du_pins>;
220 pinctrl-names = "default";
221
222 i2c2_pins: i2c2 { 233 i2c2_pins: i2c2 {
223 renesas,groups = "i2c2"; 234 renesas,groups = "i2c2";
224 renesas,function = "i2c2"; 235 renesas,function = "i2c2";
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index e06c11fa8698..e4a7170f368b 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -637,6 +637,75 @@
637 status = "disabled"; 637 status = "disabled";
638 }; 638 };
639 639
640 vsp1@fe928000 {
641 compatible = "renesas,vsp1";
642 reg = <0 0xfe928000 0 0x8000>;
643 interrupts = <0 267 IRQ_TYPE_LEVEL_HIGH>;
644 clocks = <&mstp1_clks R8A7791_CLK_VSP1_S>;
645
646 renesas,has-lut;
647 renesas,has-sru;
648 renesas,#rpf = <5>;
649 renesas,#uds = <3>;
650 renesas,#wpf = <4>;
651 };
652
653 vsp1@fe930000 {
654 compatible = "renesas,vsp1";
655 reg = <0 0xfe930000 0 0x8000>;
656 interrupts = <0 246 IRQ_TYPE_LEVEL_HIGH>;
657 clocks = <&mstp1_clks R8A7791_CLK_VSP1_DU0>;
658
659 renesas,has-lif;
660 renesas,has-lut;
661 renesas,#rpf = <4>;
662 renesas,#uds = <1>;
663 renesas,#wpf = <4>;
664 };
665
666 vsp1@fe938000 {
667 compatible = "renesas,vsp1";
668 reg = <0 0xfe938000 0 0x8000>;
669 interrupts = <0 247 IRQ_TYPE_LEVEL_HIGH>;
670 clocks = <&mstp1_clks R8A7791_CLK_VSP1_DU1>;
671
672 renesas,has-lif;
673 renesas,has-lut;
674 renesas,#rpf = <4>;
675 renesas,#uds = <1>;
676 renesas,#wpf = <4>;
677 };
678
679 du: display@feb00000 {
680 compatible = "renesas,du-r8a7791";
681 reg = <0 0xfeb00000 0 0x40000>,
682 <0 0xfeb90000 0 0x1c>;
683 reg-names = "du", "lvds.0";
684 interrupts = <0 256 IRQ_TYPE_LEVEL_HIGH>,
685 <0 268 IRQ_TYPE_LEVEL_HIGH>;
686 clocks = <&mstp7_clks R8A7791_CLK_DU0>,
687 <&mstp7_clks R8A7791_CLK_DU1>,
688 <&mstp7_clks R8A7791_CLK_LVDS0>;
689 clock-names = "du.0", "du.1", "lvds.0";
690 status = "disabled";
691
692 ports {
693 #address-cells = <1>;
694 #size-cells = <0>;
695
696 port@0 {
697 reg = <0>;
698 du_out_rgb: endpoint {
699 };
700 };
701 port@1 {
702 reg = <1>;
703 du_out_lvds0: endpoint {
704 };
705 };
706 };
707 };
708
640 clocks { 709 clocks {
641 #address-cells = <2>; 710 #address-cells = <2>;
642 #size-cells = <2>; 711 #size-cells = <2>;
diff --git a/arch/arm/boot/dts/r8a7794-alt.dts b/arch/arm/boot/dts/r8a7794-alt.dts
index 79d06ef017a0..8aec51268b7d 100644
--- a/arch/arm/boot/dts/r8a7794-alt.dts
+++ b/arch/arm/boot/dts/r8a7794-alt.dts
@@ -21,6 +21,7 @@
21 21
22 chosen { 22 chosen {
23 bootargs = "console=ttySC0,38400 ignore_loglevel rw root=/dev/nfs ip=dhcp"; 23 bootargs = "console=ttySC0,38400 ignore_loglevel rw root=/dev/nfs ip=dhcp";
24 stdout-path = &scif2;
24 }; 25 };
25 26
26 memory@40000000 { 27 memory@40000000 {
diff --git a/arch/arm/boot/dts/r8a77xx-aa104xd12-panel.dtsi b/arch/arm/boot/dts/r8a77xx-aa104xd12-panel.dtsi
new file mode 100644
index 000000000000..65cb50f0c29f
--- /dev/null
+++ b/arch/arm/boot/dts/r8a77xx-aa104xd12-panel.dtsi
@@ -0,0 +1,41 @@
1/*
2 * Common file for the AA104XD12 panel connected to Renesas R-Car boards
3 *
4 * Copyright (C) 2014 Renesas Electronics Corp.
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10
11/ {
12 panel {
13 compatible = "mitsubishi,aa104xd12", "panel-dpi";
14
15 width-mm = <210>;
16 height-mm = <158>;
17
18 panel-timing {
19 /* 1024x768 @65Hz */
20 clock-frequency = <65000000>;
21 hactive = <1024>;
22 vactive = <768>;
23 hsync-len = <136>;
24 hfront-porch = <20>;
25 hback-porch = <160>;
26 vfront-porch = <3>;
27 vback-porch = <29>;
28 vsync-len = <6>;
29 };
30
31 port {
32 panel_in: endpoint {
33 remote-endpoint = <&lvds_connector>;
34 };
35 };
36 };
37};
38
39&lvds_connector {
40 remote-endpoint = <&panel_in>;
41};
diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
index 30ef97e99dc5..0dac0e66ccad 100644
--- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
+++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
@@ -40,6 +40,7 @@
40 40
41 chosen { 41 chosen {
42 bootargs = "console=tty0 console=ttySC4,115200 root=/dev/nfs ip=dhcp ignore_loglevel rw"; 42 bootargs = "console=tty0 console=ttySC4,115200 root=/dev/nfs ip=dhcp ignore_loglevel rw";
43 stdout-path = &scifa4;
43 }; 44 };
44 45
45 memory { 46 memory {
diff --git a/arch/arm/configs/koelsch_defconfig b/arch/arm/configs/koelsch_defconfig
deleted file mode 100644
index b33d19b7f134..000000000000
--- a/arch/arm/configs/koelsch_defconfig
+++ /dev/null
@@ -1,113 +0,0 @@
1CONFIG_SYSVIPC=y
2CONFIG_NO_HZ=y
3CONFIG_IKCONFIG=y
4CONFIG_IKCONFIG_PROC=y
5CONFIG_LOG_BUF_SHIFT=16
6CONFIG_CC_OPTIMIZE_FOR_SIZE=y
7CONFIG_SYSCTL_SYSCALL=y
8CONFIG_EMBEDDED=y
9CONFIG_PERF_EVENTS=y
10CONFIG_SLAB=y
11CONFIG_ARCH_SHMOBILE_LEGACY=y
12CONFIG_ARCH_R8A7791=y
13CONFIG_MACH_KOELSCH=y
14# CONFIG_SWP_EMULATE is not set
15CONFIG_CPU_BPREDICT_DISABLE=y
16CONFIG_PL310_ERRATA_588369=y
17CONFIG_ARM_ERRATA_754322=y
18CONFIG_PCI=y
19CONFIG_PCI_RCAR_GEN2=y
20CONFIG_PCI_RCAR_GEN2_PCIE=y
21CONFIG_SMP=y
22CONFIG_SCHED_MC=y
23CONFIG_NR_CPUS=8
24CONFIG_AEABI=y
25CONFIG_ZBOOT_ROM_TEXT=0x0
26CONFIG_ZBOOT_ROM_BSS=0x0
27CONFIG_ARM_APPENDED_DTB=y
28CONFIG_KEXEC=y
29CONFIG_AUTO_ZRELADDR=y
30CONFIG_VFP=y
31CONFIG_NEON=y
32# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
33CONFIG_PM_RUNTIME=y
34CONFIG_NET=y
35CONFIG_PACKET=y
36CONFIG_UNIX=y
37CONFIG_INET=y
38CONFIG_IP_PNP=y
39CONFIG_IP_PNP_DHCP=y
40CONFIG_DEVTMPFS=y
41CONFIG_DEVTMPFS_MOUNT=y
42CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
43CONFIG_BLK_DEV_SD=y
44CONFIG_ATA=y
45CONFIG_SATA_RCAR=y
46CONFIG_MTD=y
47CONFIG_MTD_M25P80=y
48CONFIG_MTD_SPI_NOR=y
49CONFIG_EEPROM_AT24=y
50CONFIG_NETDEVICES=y
51# CONFIG_NET_VENDOR_ARC is not set
52# CONFIG_NET_CADENCE is not set
53# CONFIG_NET_VENDOR_BROADCOM is not set
54# CONFIG_NET_VENDOR_CIRRUS is not set
55# CONFIG_NET_VENDOR_FARADAY is not set
56# CONFIG_NET_VENDOR_INTEL is not set
57# CONFIG_NET_VENDOR_MARVELL is not set
58# CONFIG_NET_VENDOR_MICREL is not set
59# CONFIG_NET_VENDOR_NATSEMI is not set
60CONFIG_SH_ETH=y
61# CONFIG_NET_VENDOR_SEEQ is not set
62# CONFIG_NET_VENDOR_SMSC is not set
63# CONFIG_NET_VENDOR_STMICRO is not set
64# CONFIG_NET_VENDOR_VIA is not set
65# CONFIG_NET_VENDOR_WIZNET is not set
66# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
67CONFIG_KEYBOARD_GPIO=y
68# CONFIG_INPUT_MOUSE is not set
69# CONFIG_LEGACY_PTYS is not set
70CONFIG_SERIAL_SH_SCI=y
71CONFIG_SERIAL_SH_SCI_NR_UARTS=20
72CONFIG_SERIAL_SH_SCI_CONSOLE=y
73CONFIG_I2C=y
74CONFIG_I2C_MUX=y
75CONFIG_I2C_SH_MOBILE=y
76CONFIG_I2C_RCAR=y
77CONFIG_SPI=y
78CONFIG_SPI_RSPI=y
79CONFIG_SPI_SH_MSIOF=y
80CONFIG_GPIOLIB=y
81CONFIG_GPIO_RCAR=y
82# CONFIG_HWMON is not set
83CONFIG_THERMAL=y
84CONFIG_RCAR_THERMAL=y
85CONFIG_REGULATOR=y
86CONFIG_REGULATOR_FIXED_VOLTAGE=y
87CONFIG_REGULATOR_DA9210=y
88CONFIG_REGULATOR_GPIO=y
89CONFIG_MEDIA_SUPPORT=y
90CONFIG_MEDIA_CAMERA_SUPPORT=y
91CONFIG_V4L_PLATFORM_DRIVERS=y
92CONFIG_SOC_CAMERA=y
93CONFIG_SOC_CAMERA_PLATFORM=y
94CONFIG_VIDEO_RCAR_VIN=y
95# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
96CONFIG_VIDEO_ADV7180=y
97# CONFIG_HID is not set
98# CONFIG_USB_SUPPORT is not set
99CONFIG_MMC=y
100CONFIG_MMC_SDHI=y
101CONFIG_NEW_LEDS=y
102CONFIG_LEDS_CLASS=y
103CONFIG_LEDS_GPIO=y
104# CONFIG_IOMMU_SUPPORT is not set
105# CONFIG_DNOTIFY is not set
106CONFIG_TMPFS=y
107CONFIG_CONFIGFS_FS=y
108# CONFIG_MISC_FILESYSTEMS is not set
109CONFIG_NFS_FS=y
110CONFIG_ROOT_NFS=y
111# CONFIG_ENABLE_WARN_DEPRECATED is not set
112# CONFIG_ENABLE_MUST_CHECK is not set
113# CONFIG_ARM_UNWIND is not set
diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
index d7346ad51043..c8201a93b54d 100644
--- a/arch/arm/configs/shmobile_defconfig
+++ b/arch/arm/configs/shmobile_defconfig
@@ -17,7 +17,6 @@ CONFIG_ARCH_R8A7779=y
17CONFIG_ARCH_R8A7790=y 17CONFIG_ARCH_R8A7790=y
18CONFIG_ARCH_R8A7791=y 18CONFIG_ARCH_R8A7791=y
19CONFIG_ARCH_R8A7794=y 19CONFIG_ARCH_R8A7794=y
20CONFIG_MACH_KOELSCH=y
21CONFIG_MACH_LAGER=y 20CONFIG_MACH_LAGER=y
22CONFIG_MACH_MARZEN=y 21CONFIG_MACH_MARZEN=y
23# CONFIG_SWP_EMULATE is not set 22# CONFIG_SWP_EMULATE is not set
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 3d225105e0d1..b6117bea9a6f 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -11,6 +11,7 @@
11 */ 11 */
12 12
13#include <asm/system_misc.h> 13#include <asm/system_misc.h>
14#include <asm/irq.h>
14#include <mach/hardware.h> 15#include <mach/hardware.h>
15 16
16#include "soc.h" 17#include "soc.h"
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
index bd7e56889b43..f25b9aec9c50 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 <asm/system_misc.h> 12#include <asm/system_misc.h>
13#include <asm/irq.h>
13#include <mach/cpu.h> 14#include <mach/cpu.h>
14#include <mach/at91_dbgu.h> 15#include <mach/at91_dbgu.h>
15#include <mach/hardware.h> 16#include <mach/hardware.h>
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index 5623131c4f0b..f8f62fbaa915 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -80,8 +80,8 @@ static int da830_evm_usb_ocic_notify(da8xx_ocic_handler_t handler)
80 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, 80 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
81 "OHCI over-current indicator", NULL); 81 "OHCI over-current indicator", NULL);
82 if (error) 82 if (error)
83 printk(KERN_ERR "%s: could not request IRQ to watch " 83 pr_err("%s: could not request IRQ to watch over-current indicator changes\n",
84 "over-current indicator changes\n", __func__); 84 __func__);
85 } else 85 } else
86 free_irq(irq, NULL); 86 free_irq(irq, NULL);
87 87
@@ -145,8 +145,7 @@ static __init void da830_evm_usb_init(void)
145 /* USB_REFCLKIN is not used. */ 145 /* USB_REFCLKIN is not used. */
146 ret = davinci_cfg_reg(DA830_USB0_DRVVBUS); 146 ret = davinci_cfg_reg(DA830_USB0_DRVVBUS);
147 if (ret) 147 if (ret)
148 pr_warning("%s: USB 2.0 PinMux setup failed: %d\n", 148 pr_warn("%s: USB 2.0 PinMux setup failed: %d\n", __func__, ret);
149 __func__, ret);
150 else { 149 else {
151 /* 150 /*
152 * TPS2065 switch @ 5V supplies 1 A (sustains 1.5 A), 151 * TPS2065 switch @ 5V supplies 1 A (sustains 1.5 A),
@@ -154,37 +153,35 @@ static __init void da830_evm_usb_init(void)
154 */ 153 */
155 ret = da8xx_register_usb20(1000, 3); 154 ret = da8xx_register_usb20(1000, 3);
156 if (ret) 155 if (ret)
157 pr_warning("%s: USB 2.0 registration failed: %d\n", 156 pr_warn("%s: USB 2.0 registration failed: %d\n",
158 __func__, ret); 157 __func__, ret);
159 } 158 }
160 159
161 ret = davinci_cfg_reg_list(da830_evm_usb11_pins); 160 ret = davinci_cfg_reg_list(da830_evm_usb11_pins);
162 if (ret) { 161 if (ret) {
163 pr_warning("%s: USB 1.1 PinMux setup failed: %d\n", 162 pr_warn("%s: USB 1.1 PinMux setup failed: %d\n", __func__, ret);
164 __func__, ret);
165 return; 163 return;
166 } 164 }
167 165
168 ret = gpio_request(ON_BD_USB_DRV, "ON_BD_USB_DRV"); 166 ret = gpio_request(ON_BD_USB_DRV, "ON_BD_USB_DRV");
169 if (ret) { 167 if (ret) {
170 printk(KERN_ERR "%s: failed to request GPIO for USB 1.1 port " 168 pr_err("%s: failed to request GPIO for USB 1.1 port power control: %d\n",
171 "power control: %d\n", __func__, ret); 169 __func__, ret);
172 return; 170 return;
173 } 171 }
174 gpio_direction_output(ON_BD_USB_DRV, 0); 172 gpio_direction_output(ON_BD_USB_DRV, 0);
175 173
176 ret = gpio_request(ON_BD_USB_OVC, "ON_BD_USB_OVC"); 174 ret = gpio_request(ON_BD_USB_OVC, "ON_BD_USB_OVC");
177 if (ret) { 175 if (ret) {
178 printk(KERN_ERR "%s: failed to request GPIO for USB 1.1 port " 176 pr_err("%s: failed to request GPIO for USB 1.1 port over-current indicator: %d\n",
179 "over-current indicator: %d\n", __func__, ret); 177 __func__, ret);
180 return; 178 return;
181 } 179 }
182 gpio_direction_input(ON_BD_USB_OVC); 180 gpio_direction_input(ON_BD_USB_OVC);
183 181
184 ret = da8xx_register_usb11(&da830_evm_usb11_pdata); 182 ret = da8xx_register_usb11(&da830_evm_usb11_pdata);
185 if (ret) 183 if (ret)
186 pr_warning("%s: USB 1.1 registration failed: %d\n", 184 pr_warn("%s: USB 1.1 registration failed: %d\n", __func__, ret);
187 __func__, ret);
188} 185}
189 186
190static const short da830_evm_mcasp1_pins[] = { 187static const short da830_evm_mcasp1_pins[] = {
@@ -252,31 +249,29 @@ static inline void da830_evm_init_mmc(void)
252 249
253 ret = davinci_cfg_reg_list(da830_evm_mmc_sd_pins); 250 ret = davinci_cfg_reg_list(da830_evm_mmc_sd_pins);
254 if (ret) { 251 if (ret) {
255 pr_warning("da830_evm_init: mmc/sd mux setup failed: %d\n", 252 pr_warn("%s: mmc/sd mux setup failed: %d\n", __func__, ret);
256 ret);
257 return; 253 return;
258 } 254 }
259 255
260 ret = gpio_request(DA830_MMCSD_WP_PIN, "MMC WP"); 256 ret = gpio_request(DA830_MMCSD_WP_PIN, "MMC WP");
261 if (ret) { 257 if (ret) {
262 pr_warning("da830_evm_init: can not open GPIO %d\n", 258 pr_warn("%s: can not open GPIO %d\n",
263 DA830_MMCSD_WP_PIN); 259 __func__, DA830_MMCSD_WP_PIN);
264 return; 260 return;
265 } 261 }
266 gpio_direction_input(DA830_MMCSD_WP_PIN); 262 gpio_direction_input(DA830_MMCSD_WP_PIN);
267 263
268 ret = gpio_request(DA830_MMCSD_CD_PIN, "MMC CD\n"); 264 ret = gpio_request(DA830_MMCSD_CD_PIN, "MMC CD\n");
269 if (ret) { 265 if (ret) {
270 pr_warning("da830_evm_init: can not open GPIO %d\n", 266 pr_warn("%s: can not open GPIO %d\n",
271 DA830_MMCSD_CD_PIN); 267 __func__, DA830_MMCSD_CD_PIN);
272 return; 268 return;
273 } 269 }
274 gpio_direction_input(DA830_MMCSD_CD_PIN); 270 gpio_direction_input(DA830_MMCSD_CD_PIN);
275 271
276 ret = da8xx_register_mmcsd0(&da830_evm_mmc_config); 272 ret = da8xx_register_mmcsd0(&da830_evm_mmc_config);
277 if (ret) { 273 if (ret) {
278 pr_warning("da830_evm_init: mmc/sd registration failed: %d\n", 274 pr_warn("%s: mmc/sd registration failed: %d\n", __func__, ret);
279 ret);
280 gpio_free(DA830_MMCSD_WP_PIN); 275 gpio_free(DA830_MMCSD_WP_PIN);
281 } 276 }
282} 277}
@@ -404,23 +399,21 @@ static inline void da830_evm_init_nand(int mux_mode)
404 int ret; 399 int ret;
405 400
406 if (HAS_MMC) { 401 if (HAS_MMC) {
407 pr_warning("WARNING: both MMC/SD and NAND are " 402 pr_warn("WARNING: both MMC/SD and NAND are enabled, but they share AEMIF pins\n"
408 "enabled, but they share AEMIF pins.\n" 403 "\tDisable MMC/SD for NAND support\n");
409 "\tDisable MMC/SD for NAND support.\n");
410 return; 404 return;
411 } 405 }
412 406
413 ret = davinci_cfg_reg_list(da830_evm_emif25_pins); 407 ret = davinci_cfg_reg_list(da830_evm_emif25_pins);
414 if (ret) 408 if (ret)
415 pr_warning("da830_evm_init: emif25 mux setup failed: %d\n", 409 pr_warn("%s: emif25 mux setup failed: %d\n", __func__, ret);
416 ret);
417 410
418 ret = platform_device_register(&da830_evm_nand_device); 411 ret = platform_device_register(&da830_evm_nand_device);
419 if (ret) 412 if (ret)
420 pr_warning("da830_evm_init: NAND device not registered.\n"); 413 pr_warn("%s: NAND device not registered\n", __func__);
421 414
422 if (davinci_aemif_setup(&da830_evm_nand_device)) 415 if (davinci_aemif_setup(&da830_evm_nand_device))
423 pr_warn("%s: Cannot configure AEMIF.\n", __func__); 416 pr_warn("%s: Cannot configure AEMIF\n", __func__);
424 417
425 gpio_direction_output(mux_mode, 1); 418 gpio_direction_output(mux_mode, 1);
426} 419}
@@ -435,12 +428,11 @@ static inline void da830_evm_init_lcdc(int mux_mode)
435 428
436 ret = davinci_cfg_reg_list(da830_lcdcntl_pins); 429 ret = davinci_cfg_reg_list(da830_lcdcntl_pins);
437 if (ret) 430 if (ret)
438 pr_warning("da830_evm_init: lcdcntl mux setup failed: %d\n", 431 pr_warn("%s: lcdcntl mux setup failed: %d\n", __func__, ret);
439 ret);
440 432
441 ret = da8xx_register_lcdc(&sharp_lcd035q3dg01_pdata); 433 ret = da8xx_register_lcdc(&sharp_lcd035q3dg01_pdata);
442 if (ret) 434 if (ret)
443 pr_warning("da830_evm_init: lcd setup failed: %d\n", ret); 435 pr_warn("%s: lcd setup failed: %d\n", __func__, ret);
444 436
445 gpio_direction_output(mux_mode, 0); 437 gpio_direction_output(mux_mode, 0);
446} 438}
@@ -598,22 +590,19 @@ static __init void da830_evm_init(void)
598 590
599 ret = da830_register_gpio(); 591 ret = da830_register_gpio();
600 if (ret) 592 if (ret)
601 pr_warn("da830_evm_init: GPIO init failed: %d\n", ret); 593 pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
602 594
603 ret = da830_register_edma(da830_edma_rsv); 595 ret = da830_register_edma(da830_edma_rsv);
604 if (ret) 596 if (ret)
605 pr_warning("da830_evm_init: edma registration failed: %d\n", 597 pr_warn("%s: edma registration failed: %d\n", __func__, ret);
606 ret);
607 598
608 ret = davinci_cfg_reg_list(da830_i2c0_pins); 599 ret = davinci_cfg_reg_list(da830_i2c0_pins);
609 if (ret) 600 if (ret)
610 pr_warning("da830_evm_init: i2c0 mux setup failed: %d\n", 601 pr_warn("%s: i2c0 mux setup failed: %d\n", __func__, ret);
611 ret);
612 602
613 ret = da8xx_register_i2c(0, &da830_evm_i2c_0_pdata); 603 ret = da8xx_register_i2c(0, &da830_evm_i2c_0_pdata);
614 if (ret) 604 if (ret)
615 pr_warning("da830_evm_init: i2c0 registration failed: %d\n", 605 pr_warn("%s: i2c0 registration failed: %d\n", __func__, ret);
616 ret);
617 606
618 da830_evm_usb_init(); 607 da830_evm_usb_init();
619 608
@@ -622,18 +611,16 @@ static __init void da830_evm_init(void)
622 611
623 ret = davinci_cfg_reg_list(da830_cpgmac_pins); 612 ret = davinci_cfg_reg_list(da830_cpgmac_pins);
624 if (ret) 613 if (ret)
625 pr_warning("da830_evm_init: cpgmac mux setup failed: %d\n", 614 pr_warn("%s: cpgmac mux setup failed: %d\n", __func__, ret);
626 ret);
627 615
628 ret = da8xx_register_emac(); 616 ret = da8xx_register_emac();
629 if (ret) 617 if (ret)
630 pr_warning("da830_evm_init: emac registration failed: %d\n", 618 pr_warn("%s: emac registration failed: %d\n", __func__, ret);
631 ret);
632 619
633 ret = da8xx_register_watchdog(); 620 ret = da8xx_register_watchdog();
634 if (ret) 621 if (ret)
635 pr_warning("da830_evm_init: watchdog registration failed: %d\n", 622 pr_warn("%s: watchdog registration failed: %d\n",
636 ret); 623 __func__, ret);
637 624
638 davinci_serial_init(da8xx_serial_device); 625 davinci_serial_init(da8xx_serial_device);
639 i2c_register_board_info(1, da830_evm_i2c_devices, 626 i2c_register_board_info(1, da830_evm_i2c_devices,
@@ -641,8 +628,7 @@ static __init void da830_evm_init(void)
641 628
642 ret = davinci_cfg_reg_list(da830_evm_mcasp1_pins); 629 ret = davinci_cfg_reg_list(da830_evm_mcasp1_pins);
643 if (ret) 630 if (ret)
644 pr_warning("da830_evm_init: mcasp1 mux setup failed: %d\n", 631 pr_warn("%s: mcasp1 mux setup failed: %d\n", __func__, ret);
645 ret);
646 632
647 da8xx_register_mcasp(1, &da830_evm_snd_data); 633 da8xx_register_mcasp(1, &da830_evm_snd_data);
648 634
@@ -650,18 +636,17 @@ static __init void da830_evm_init(void)
650 636
651 ret = da8xx_register_rtc(); 637 ret = da8xx_register_rtc();
652 if (ret) 638 if (ret)
653 pr_warning("da830_evm_init: rtc setup failed: %d\n", ret); 639 pr_warn("%s: rtc setup failed: %d\n", __func__, ret);
654 640
655 ret = spi_register_board_info(da830evm_spi_info, 641 ret = spi_register_board_info(da830evm_spi_info,
656 ARRAY_SIZE(da830evm_spi_info)); 642 ARRAY_SIZE(da830evm_spi_info));
657 if (ret) 643 if (ret)
658 pr_warn("%s: spi info registration failed: %d\n", __func__, 644 pr_warn("%s: spi info registration failed: %d\n",
659 ret); 645 __func__, ret);
660 646
661 ret = da8xx_register_spi_bus(0, ARRAY_SIZE(da830evm_spi_info)); 647 ret = da8xx_register_spi_bus(0, ARRAY_SIZE(da830evm_spi_info));
662 if (ret) 648 if (ret)
663 pr_warning("da830_evm_init: spi 0 registration failed: %d\n", 649 pr_warn("%s: spi 0 registration failed: %d\n", __func__, ret);
664 ret);
665} 650}
666 651
667#ifdef CONFIG_SERIAL_8250_CONSOLE 652#ifdef CONFIG_SERIAL_8250_CONSOLE
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index fa11415e906a..6b5a97da9fe3 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -452,8 +452,7 @@ static void da850_evm_ui_keys_init(unsigned gpio)
452 for (i = 0; i < DA850_N_UI_PB; i++) { 452 for (i = 0; i < DA850_N_UI_PB; i++) {
453 button = &da850_evm_ui_keys[i]; 453 button = &da850_evm_ui_keys[i];
454 button->code = KEY_F8 - i; 454 button->code = KEY_F8 - i;
455 button->desc = (char *) 455 button->desc = da850_evm_ui_exp[DA850_EVM_UI_EXP_PB8 + i];
456 da850_evm_ui_exp[DA850_EVM_UI_EXP_PB8 + i];
457 button->gpio = gpio + DA850_EVM_UI_EXP_PB8 + i; 456 button->gpio = gpio + DA850_EVM_UI_EXP_PB8 + i;
458 } 457 }
459} 458}
@@ -628,15 +627,13 @@ static void da850_evm_bb_keys_init(unsigned gpio)
628 struct gpio_keys_button *button; 627 struct gpio_keys_button *button;
629 628
630 button = &da850_evm_bb_keys[0]; 629 button = &da850_evm_bb_keys[0];
631 button->desc = (char *) 630 button->desc = da850_evm_bb_exp[DA850_EVM_BB_EXP_USER_PB1];
632 da850_evm_bb_exp[DA850_EVM_BB_EXP_USER_PB1];
633 button->gpio = gpio + DA850_EVM_BB_EXP_USER_PB1; 631 button->gpio = gpio + DA850_EVM_BB_EXP_USER_PB1;
634 632
635 for (i = 0; i < DA850_N_BB_USER_SW; i++) { 633 for (i = 0; i < DA850_N_BB_USER_SW; i++) {
636 button = &da850_evm_bb_keys[i + 1]; 634 button = &da850_evm_bb_keys[i + 1];
637 button->code = SW_LID + i; 635 button->code = SW_LID + i;
638 button->desc = (char *) 636 button->desc = da850_evm_bb_exp[DA850_EVM_BB_EXP_USER_SW1 + i];
639 da850_evm_bb_exp[DA850_EVM_BB_EXP_USER_SW1 + i];
640 button->gpio = gpio + DA850_EVM_BB_EXP_USER_SW1 + i; 637 button->gpio = gpio + DA850_EVM_BB_EXP_USER_SW1 + i;
641 } 638 }
642} 639}
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index e583e58b5e1e..1a0898c1c17e 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -767,9 +767,8 @@ static __init void davinci_evm_init(void)
767 767
768 if (HAS_ATA) { 768 if (HAS_ATA) {
769 if (HAS_NAND || HAS_NOR) 769 if (HAS_NAND || HAS_NOR)
770 pr_warning("WARNING: both IDE and Flash are " 770 pr_warn("WARNING: both IDE and Flash are enabled, but they share AEMIF pins\n"
771 "enabled, but they share AEMIF pins.\n" 771 "\tDisable IDE for NAND/NOR support\n");
772 "\tDisable IDE for NAND/NOR support.\n");
773 davinci_init_ide(); 772 davinci_init_ide();
774 } else if (HAS_NAND || HAS_NOR) { 773 } else if (HAS_NAND || HAS_NOR) {
775 davinci_cfg_reg(DM644X_HPIEN_DISABLE); 774 davinci_cfg_reg(DM644X_HPIEN_DISABLE);
@@ -780,13 +779,12 @@ static __init void davinci_evm_init(void)
780 platform_device_register(&davinci_evm_nandflash_device); 779 platform_device_register(&davinci_evm_nandflash_device);
781 780
782 if (davinci_aemif_setup(&davinci_evm_nandflash_device)) 781 if (davinci_aemif_setup(&davinci_evm_nandflash_device))
783 pr_warn("%s: Cannot configure AEMIF.\n", 782 pr_warn("%s: Cannot configure AEMIF\n",
784 __func__); 783 __func__);
785 784
786 evm_leds[7].default_trigger = "nand-disk"; 785 evm_leds[7].default_trigger = "nand-disk";
787 if (HAS_NOR) 786 if (HAS_NOR)
788 pr_warning("WARNING: both NAND and NOR flash " 787 pr_warn("WARNING: both NAND and NOR flash are enabled; disable one of them.\n");
789 "are enabled; disable one of them.\n");
790 } else if (HAS_NOR) 788 } else if (HAS_NOR)
791 platform_device_register(&davinci_evm_norflash_device); 789 platform_device_register(&davinci_evm_norflash_device);
792 } 790 }
diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c
index 96fc00a167f5..8cfbfe084535 100644
--- a/arch/arm/mach-davinci/board-mityomapl138.c
+++ b/arch/arm/mach-davinci/board-mityomapl138.c
@@ -8,6 +8,8 @@
8 * any kind, whether express or implied. 8 * any kind, whether express or implied.
9 */ 9 */
10 10
11#define pr_fmt(fmt) "MityOMAPL138: " fmt
12
11#include <linux/kernel.h> 13#include <linux/kernel.h>
12#include <linux/init.h> 14#include <linux/init.h>
13#include <linux/console.h> 15#include <linux/console.h>
@@ -107,7 +109,7 @@ static void mityomapl138_cpufreq_init(const char *partnum)
107 109
108 ret = da850_register_cpufreq("pll0_sysclk3"); 110 ret = da850_register_cpufreq("pll0_sysclk3");
109 if (ret) 111 if (ret)
110 pr_warning("cpufreq registration failed: %d\n", ret); 112 pr_warn("cpufreq registration failed: %d\n", ret);
111} 113}
112#else 114#else
113static void mityomapl138_cpufreq_init(const char *partnum) { } 115static void mityomapl138_cpufreq_init(const char *partnum) { }
@@ -121,33 +123,31 @@ static void read_factory_config(struct memory_accessor *a, void *context)
121 123
122 ret = a->read(a, (char *)&factory_config, 0, sizeof(factory_config)); 124 ret = a->read(a, (char *)&factory_config, 0, sizeof(factory_config));
123 if (ret != sizeof(struct factory_config)) { 125 if (ret != sizeof(struct factory_config)) {
124 pr_warning("MityOMAPL138: Read Factory Config Failed: %d\n", 126 pr_warn("Read Factory Config Failed: %d\n", ret);
125 ret);
126 goto bad_config; 127 goto bad_config;
127 } 128 }
128 129
129 if (factory_config.magic != FACTORY_CONFIG_MAGIC) { 130 if (factory_config.magic != FACTORY_CONFIG_MAGIC) {
130 pr_warning("MityOMAPL138: Factory Config Magic Wrong (%X)\n", 131 pr_warn("Factory Config Magic Wrong (%X)\n",
131 factory_config.magic); 132 factory_config.magic);
132 goto bad_config; 133 goto bad_config;
133 } 134 }
134 135
135 if (factory_config.version != FACTORY_CONFIG_VERSION) { 136 if (factory_config.version != FACTORY_CONFIG_VERSION) {
136 pr_warning("MityOMAPL138: Factory Config Version Wrong (%X)\n", 137 pr_warn("Factory Config Version Wrong (%X)\n",
137 factory_config.version); 138 factory_config.version);
138 goto bad_config; 139 goto bad_config;
139 } 140 }
140 141
141 pr_info("MityOMAPL138: Found MAC = %pM\n", factory_config.mac); 142 pr_info("Found MAC = %pM\n", factory_config.mac);
142 if (is_valid_ether_addr(factory_config.mac)) 143 if (is_valid_ether_addr(factory_config.mac))
143 memcpy(soc_info->emac_pdata->mac_addr, 144 memcpy(soc_info->emac_pdata->mac_addr,
144 factory_config.mac, ETH_ALEN); 145 factory_config.mac, ETH_ALEN);
145 else 146 else
146 pr_warning("MityOMAPL138: Invalid MAC found " 147 pr_warn("Invalid MAC found in factory config block\n");
147 "in factory config block\n");
148 148
149 partnum = factory_config.partnum; 149 partnum = factory_config.partnum;
150 pr_info("MityOMAPL138: Part Number = %s\n", partnum); 150 pr_info("Part Number = %s\n", partnum);
151 151
152bad_config: 152bad_config:
153 /* default maximum speed is valid for all platforms */ 153 /* default maximum speed is valid for all platforms */
@@ -435,7 +435,7 @@ static void __init mityomapl138_setup_nand(void)
435 ARRAY_SIZE(mityomapl138_devices)); 435 ARRAY_SIZE(mityomapl138_devices));
436 436
437 if (davinci_aemif_setup(&mityomapl138_nandflash_device)) 437 if (davinci_aemif_setup(&mityomapl138_nandflash_device))
438 pr_warn("%s: Cannot configure AEMIF.\n", __func__); 438 pr_warn("%s: Cannot configure AEMIF\n", __func__);
439} 439}
440 440
441static const short mityomap_mii_pins[] = { 441static const short mityomap_mii_pins[] = {
@@ -478,7 +478,7 @@ static void __init mityomapl138_config_emac(void)
478 } 478 }
479 479
480 if (ret) { 480 if (ret) {
481 pr_warning("mii/rmii mux setup failed: %d\n", ret); 481 pr_warn("mii/rmii mux setup failed: %d\n", ret);
482 return; 482 return;
483 } 483 }
484 484
@@ -489,7 +489,7 @@ static void __init mityomapl138_config_emac(void)
489 489
490 ret = da8xx_register_emac(); 490 ret = da8xx_register_emac();
491 if (ret) 491 if (ret)
492 pr_warning("emac registration failed: %d\n", ret); 492 pr_warn("emac registration failed: %d\n", ret);
493} 493}
494 494
495static struct davinci_pm_config da850_pm_pdata = { 495static struct davinci_pm_config da850_pm_pdata = {
@@ -511,21 +511,21 @@ static void __init mityomapl138_init(void)
511 /* for now, no special EDMA channels are reserved */ 511 /* for now, no special EDMA channels are reserved */
512 ret = da850_register_edma(NULL); 512 ret = da850_register_edma(NULL);
513 if (ret) 513 if (ret)
514 pr_warning("edma registration failed: %d\n", ret); 514 pr_warn("edma registration failed: %d\n", ret);
515 515
516 ret = da8xx_register_watchdog(); 516 ret = da8xx_register_watchdog();
517 if (ret) 517 if (ret)
518 pr_warning("watchdog registration failed: %d\n", ret); 518 pr_warn("watchdog registration failed: %d\n", ret);
519 519
520 davinci_serial_init(da8xx_serial_device); 520 davinci_serial_init(da8xx_serial_device);
521 521
522 ret = da8xx_register_i2c(0, &mityomap_i2c_0_pdata); 522 ret = da8xx_register_i2c(0, &mityomap_i2c_0_pdata);
523 if (ret) 523 if (ret)
524 pr_warning("i2c0 registration failed: %d\n", ret); 524 pr_warn("i2c0 registration failed: %d\n", ret);
525 525
526 ret = pmic_tps65023_init(); 526 ret = pmic_tps65023_init();
527 if (ret) 527 if (ret)
528 pr_warning("TPS65023 PMIC init failed: %d\n", ret); 528 pr_warn("TPS65023 PMIC init failed: %d\n", ret);
529 529
530 mityomapl138_setup_nand(); 530 mityomapl138_setup_nand();
531 531
@@ -537,22 +537,21 @@ static void __init mityomapl138_init(void)
537 ret = da8xx_register_spi_bus(1, 537 ret = da8xx_register_spi_bus(1,
538 ARRAY_SIZE(mityomapl138_spi_flash_info)); 538 ARRAY_SIZE(mityomapl138_spi_flash_info));
539 if (ret) 539 if (ret)
540 pr_warning("spi 1 registration failed: %d\n", ret); 540 pr_warn("spi 1 registration failed: %d\n", ret);
541 541
542 mityomapl138_config_emac(); 542 mityomapl138_config_emac();
543 543
544 ret = da8xx_register_rtc(); 544 ret = da8xx_register_rtc();
545 if (ret) 545 if (ret)
546 pr_warning("rtc setup failed: %d\n", ret); 546 pr_warn("rtc setup failed: %d\n", ret);
547 547
548 ret = da8xx_register_cpuidle(); 548 ret = da8xx_register_cpuidle();
549 if (ret) 549 if (ret)
550 pr_warning("cpuidle registration failed: %d\n", ret); 550 pr_warn("cpuidle registration failed: %d\n", ret);
551 551
552 ret = da850_register_pm(&da850_pm_device); 552 ret = da850_register_pm(&da850_pm_device);
553 if (ret) 553 if (ret)
554 pr_warning("da850_evm_init: suspend registration failed: %d\n", 554 pr_warn("suspend registration failed: %d\n", ret);
555 ret);
556} 555}
557 556
558#ifdef CONFIG_SERIAL_8250_CONSOLE 557#ifdef CONFIG_SERIAL_8250_CONSOLE
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c
index bb680af98374..8fcdcf87c47c 100644
--- a/arch/arm/mach-davinci/board-neuros-osd2.c
+++ b/arch/arm/mach-davinci/board-neuros-osd2.c
@@ -183,9 +183,8 @@ static __init void davinci_ntosd2_init(void)
183 183
184 if (HAS_ATA) { 184 if (HAS_ATA) {
185 if (HAS_NAND) 185 if (HAS_NAND)
186 pr_warning("WARNING: both IDE and Flash are " 186 pr_warn("WARNING: both IDE and Flash are enabled, but they share AEMIF pins\n"
187 "enabled, but they share AEMIF pins.\n" 187 "\tDisable IDE for NAND/NOR support\n");
188 "\tDisable IDE for NAND/NOR support.\n");
189 davinci_init_ide(); 188 davinci_init_ide();
190 } else if (HAS_NAND) { 189 } else if (HAS_NAND) {
191 davinci_cfg_reg(DM644X_HPIEN_DISABLE); 190 davinci_cfg_reg(DM644X_HPIEN_DISABLE);
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
index 985e5fd00fb2..c70bb0a4dfb4 100644
--- a/arch/arm/mach-davinci/clock.c
+++ b/arch/arm/mach-davinci/clock.c
@@ -564,7 +564,7 @@ int davinci_set_refclk_rate(unsigned long rate)
564 564
565 refclk = clk_get(NULL, "ref"); 565 refclk = clk_get(NULL, "ref");
566 if (IS_ERR(refclk)) { 566 if (IS_ERR(refclk)) {
567 pr_err("%s: failed to get reference clock.\n", __func__); 567 pr_err("%s: failed to get reference clock\n", __func__);
568 return PTR_ERR(refclk); 568 return PTR_ERR(refclk);
569 } 569 }
570 570
diff --git a/arch/arm/mach-davinci/mux.c b/arch/arm/mach-davinci/mux.c
index f34a8dcdae2b..a8eb909a2b6c 100644
--- a/arch/arm/mach-davinci/mux.c
+++ b/arch/arm/mach-davinci/mux.c
@@ -15,6 +15,9 @@
15 * 15 *
16 * Copyright (C) 2008 Texas Instruments. 16 * Copyright (C) 2008 Texas Instruments.
17 */ 17 */
18
19#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
20
18#include <linux/io.h> 21#include <linux/io.h>
19#include <linux/module.h> 22#include <linux/module.h>
20#include <linux/spinlock.h> 23#include <linux/spinlock.h>
@@ -46,7 +49,7 @@ int __init_or_module davinci_cfg_reg(const unsigned long index)
46 } 49 }
47 50
48 if (index >= soc_info->pinmux_pins_num) { 51 if (index >= soc_info->pinmux_pins_num) {
49 printk(KERN_ERR "Invalid pin mux index: %lu (%lu)\n", 52 pr_err("Invalid pin mux index: %lu (%lu)\n",
50 index, soc_info->pinmux_pins_num); 53 index, soc_info->pinmux_pins_num);
51 dump_stack(); 54 dump_stack();
52 return -ENODEV; 55 return -ENODEV;
@@ -55,7 +58,7 @@ int __init_or_module davinci_cfg_reg(const unsigned long index)
55 cfg = &soc_info->pinmux_pins[index]; 58 cfg = &soc_info->pinmux_pins[index];
56 59
57 if (cfg->name == NULL) { 60 if (cfg->name == NULL) {
58 printk(KERN_ERR "No entry for the specified index\n"); 61 pr_err("No entry for the specified index\n");
59 return -ENODEV; 62 return -ENODEV;
60 } 63 }
61 64
@@ -82,15 +85,15 @@ int __init_or_module davinci_cfg_reg(const unsigned long index)
82 85
83 if (warn) { 86 if (warn) {
84#ifdef CONFIG_DAVINCI_MUX_WARNINGS 87#ifdef CONFIG_DAVINCI_MUX_WARNINGS
85 printk(KERN_WARNING "MUX: initialized %s\n", cfg->name); 88 pr_warn("initialized %s\n", cfg->name);
86#endif 89#endif
87 } 90 }
88 91
89#ifdef CONFIG_DAVINCI_MUX_DEBUG 92#ifdef CONFIG_DAVINCI_MUX_DEBUG
90 if (cfg->debug || warn) { 93 if (cfg->debug || warn) {
91 printk(KERN_WARNING "MUX: Setting register %s\n", cfg->name); 94 pr_warn("Setting register %s\n", cfg->name);
92 printk(KERN_WARNING " %s (0x%08x) = 0x%08x -> 0x%08x\n", 95 pr_warn(" %s (0x%08x) = 0x%08x -> 0x%08x\n",
93 cfg->mux_reg_name, cfg->mux_reg, reg_orig, reg); 96 cfg->mux_reg_name, cfg->mux_reg, reg_orig, reg);
94 } 97 }
95#endif 98#endif
96 99
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index 24ad30f32ae3..160c9602f490 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -342,8 +342,6 @@ void __init davinci_timer_init(void)
342 struct davinci_soc_info *soc_info = &davinci_soc_info; 342 struct davinci_soc_info *soc_info = &davinci_soc_info;
343 unsigned int clockevent_id; 343 unsigned int clockevent_id;
344 unsigned int clocksource_id; 344 unsigned int clocksource_id;
345 static char err[] __initdata = KERN_ERR
346 "%s: can't register clocksource!\n";
347 int i; 345 int i;
348 346
349 clockevent_id = soc_info->timer_info->clockevent_id; 347 clockevent_id = soc_info->timer_info->clockevent_id;
@@ -364,12 +362,12 @@ void __init davinci_timer_init(void)
364 362
365 /* Only bottom timers can use compare regs */ 363 /* Only bottom timers can use compare regs */
366 if (IS_TIMER_TOP(clockevent_id)) 364 if (IS_TIMER_TOP(clockevent_id))
367 pr_warning("davinci_timer_init: Invalid use" 365 pr_warn("%s: Invalid use of system timers. Results unpredictable.\n",
368 " of system timers. Results unpredictable.\n"); 366 __func__);
369 else if ((dtip[event_timer].cmp_off == 0) 367 else if ((dtip[event_timer].cmp_off == 0)
370 || (dtip[event_timer].cmp_irq == 0)) 368 || (dtip[event_timer].cmp_irq == 0))
371 pr_warning("davinci_timer_init: Invalid timer instance" 369 pr_warn("%s: Invalid timer instance setup. Results unpredictable.\n",
372 " setup. Results unpredictable.\n"); 370 __func__);
373 else { 371 else {
374 timers[TID_CLOCKEVENT].opts |= TIMER_OPTS_USE_COMPARE; 372 timers[TID_CLOCKEVENT].opts |= TIMER_OPTS_USE_COMPARE;
375 clockevent_davinci.features = CLOCK_EVT_FEAT_ONESHOT; 373 clockevent_davinci.features = CLOCK_EVT_FEAT_ONESHOT;
@@ -389,7 +387,8 @@ void __init davinci_timer_init(void)
389 clocksource_davinci.name = id_to_name[clocksource_id]; 387 clocksource_davinci.name = id_to_name[clocksource_id];
390 if (clocksource_register_hz(&clocksource_davinci, 388 if (clocksource_register_hz(&clocksource_davinci,
391 davinci_clock_tick_rate)) 389 davinci_clock_tick_rate))
392 printk(err, clocksource_davinci.name); 390 pr_err("%s: can't register clocksource!\n",
391 clocksource_davinci.name);
393 392
394 sched_clock_register(davinci_read_sched_clock, 32, 393 sched_clock_register(davinci_read_sched_clock, 32,
395 davinci_clock_tick_rate); 394 davinci_clock_tick_rate);
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index 27ae6144679c..d634de588d96 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -16,9 +16,6 @@ obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
16 16
17obj-$(CONFIG_SMP) += platsmp.o headsmp.o 17obj-$(CONFIG_SMP) += platsmp.o headsmp.o
18 18
19obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
20CFLAGS_hotplug.o += -march=armv7-a
21
22plus_sec := $(call as-instr,.arch_extension sec,+sec) 19plus_sec := $(call as-instr,.arch_extension sec,+sec)
23AFLAGS_exynos-smc.o :=-Wa,-march=armv7-a$(plus_sec) 20AFLAGS_exynos-smc.o :=-Wa,-march=armv7-a$(plus_sec)
24 21
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 47b904b3b973..3d3e6af9d015 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -130,8 +130,6 @@ extern void exynos_cpu_resume(void);
130 130
131extern struct smp_operations exynos_smp_ops; 131extern struct smp_operations exynos_smp_ops;
132 132
133extern void exynos_cpu_die(unsigned int cpu);
134
135/* PMU(Power Management Unit) support */ 133/* PMU(Power Management Unit) support */
136 134
137#define PMU_TABLE_END (-1U) 135#define PMU_TABLE_END (-1U)
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 6b283eb3202e..6de7cf5ef2b2 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -41,41 +41,11 @@ static struct map_desc exynos4_iodesc[] __initdata = {
41 .length = SZ_64K, 41 .length = SZ_64K,
42 .type = MT_DEVICE, 42 .type = MT_DEVICE,
43 }, { 43 }, {
44 .virtual = (unsigned long)S3C_VA_TIMER,
45 .pfn = __phys_to_pfn(EXYNOS4_PA_TIMER),
46 .length = SZ_16K,
47 .type = MT_DEVICE,
48 }, {
49 .virtual = (unsigned long)S3C_VA_WATCHDOG,
50 .pfn = __phys_to_pfn(EXYNOS4_PA_WATCHDOG),
51 .length = SZ_4K,
52 .type = MT_DEVICE,
53 }, {
54 .virtual = (unsigned long)S5P_VA_SROMC, 44 .virtual = (unsigned long)S5P_VA_SROMC,
55 .pfn = __phys_to_pfn(EXYNOS4_PA_SROMC), 45 .pfn = __phys_to_pfn(EXYNOS4_PA_SROMC),
56 .length = SZ_4K, 46 .length = SZ_4K,
57 .type = MT_DEVICE, 47 .type = MT_DEVICE,
58 }, { 48 }, {
59 .virtual = (unsigned long)S5P_VA_SYSTIMER,
60 .pfn = __phys_to_pfn(EXYNOS4_PA_SYSTIMER),
61 .length = SZ_4K,
62 .type = MT_DEVICE,
63 }, {
64 .virtual = (unsigned long)S5P_VA_COMBINER_BASE,
65 .pfn = __phys_to_pfn(EXYNOS4_PA_COMBINER),
66 .length = SZ_4K,
67 .type = MT_DEVICE,
68 }, {
69 .virtual = (unsigned long)S5P_VA_GIC_CPU,
70 .pfn = __phys_to_pfn(EXYNOS4_PA_GIC_CPU),
71 .length = SZ_64K,
72 .type = MT_DEVICE,
73 }, {
74 .virtual = (unsigned long)S5P_VA_GIC_DIST,
75 .pfn = __phys_to_pfn(EXYNOS4_PA_GIC_DIST),
76 .length = SZ_64K,
77 .type = MT_DEVICE,
78 }, {
79 .virtual = (unsigned long)S5P_VA_CMU, 49 .virtual = (unsigned long)S5P_VA_CMU,
80 .pfn = __phys_to_pfn(EXYNOS4_PA_CMU), 50 .pfn = __phys_to_pfn(EXYNOS4_PA_CMU),
81 .length = SZ_128K, 51 .length = SZ_128K,
@@ -86,11 +56,6 @@ static struct map_desc exynos4_iodesc[] __initdata = {
86 .length = SZ_8K, 56 .length = SZ_8K,
87 .type = MT_DEVICE, 57 .type = MT_DEVICE,
88 }, { 58 }, {
89 .virtual = (unsigned long)S5P_VA_L2CC,
90 .pfn = __phys_to_pfn(EXYNOS4_PA_L2CC),
91 .length = SZ_4K,
92 .type = MT_DEVICE,
93 }, {
94 .virtual = (unsigned long)S5P_VA_DMC0, 59 .virtual = (unsigned long)S5P_VA_DMC0,
95 .pfn = __phys_to_pfn(EXYNOS4_PA_DMC0), 60 .pfn = __phys_to_pfn(EXYNOS4_PA_DMC0),
96 .length = SZ_64K, 61 .length = SZ_64K,
@@ -100,11 +65,6 @@ static struct map_desc exynos4_iodesc[] __initdata = {
100 .pfn = __phys_to_pfn(EXYNOS4_PA_DMC1), 65 .pfn = __phys_to_pfn(EXYNOS4_PA_DMC1),
101 .length = SZ_64K, 66 .length = SZ_64K,
102 .type = MT_DEVICE, 67 .type = MT_DEVICE,
103 }, {
104 .virtual = (unsigned long)S3C_VA_USB_HSPHY,
105 .pfn = __phys_to_pfn(EXYNOS4_PA_HSPHY),
106 .length = SZ_4K,
107 .type = MT_DEVICE,
108 }, 68 },
109}; 69};
110 70
@@ -115,16 +75,6 @@ static struct map_desc exynos5_iodesc[] __initdata = {
115 .length = SZ_64K, 75 .length = SZ_64K,
116 .type = MT_DEVICE, 76 .type = MT_DEVICE,
117 }, { 77 }, {
118 .virtual = (unsigned long)S3C_VA_TIMER,
119 .pfn = __phys_to_pfn(EXYNOS5_PA_TIMER),
120 .length = SZ_16K,
121 .type = MT_DEVICE,
122 }, {
123 .virtual = (unsigned long)S3C_VA_WATCHDOG,
124 .pfn = __phys_to_pfn(EXYNOS5_PA_WATCHDOG),
125 .length = SZ_4K,
126 .type = MT_DEVICE,
127 }, {
128 .virtual = (unsigned long)S5P_VA_SROMC, 78 .virtual = (unsigned long)S5P_VA_SROMC,
129 .pfn = __phys_to_pfn(EXYNOS5_PA_SROMC), 79 .pfn = __phys_to_pfn(EXYNOS5_PA_SROMC),
130 .length = SZ_4K, 80 .length = SZ_4K,
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
deleted file mode 100644
index 4d86961a7957..000000000000
--- a/arch/arm/mach-exynos/hotplug.c
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * Cloned from linux/arch/arm/mach-realview/hotplug.c
3 *
4 * Copyright (C) 2002 ARM Ltd.
5 * All Rights Reserved
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10*/
11
12#include <linux/kernel.h>
13#include <linux/errno.h>
14#include <linux/smp.h>
15#include <linux/io.h>
16
17#include <asm/cacheflush.h>
18#include <asm/cp15.h>
19#include <asm/smp_plat.h>
20
21#include "common.h"
22#include "regs-pmu.h"
23
24static inline void cpu_leave_lowpower(void)
25{
26 unsigned int v;
27
28 asm volatile(
29 "mrc p15, 0, %0, c1, c0, 0\n"
30 " orr %0, %0, %1\n"
31 " mcr p15, 0, %0, c1, c0, 0\n"
32 " mrc p15, 0, %0, c1, c0, 1\n"
33 " orr %0, %0, %2\n"
34 " mcr p15, 0, %0, c1, c0, 1\n"
35 : "=&r" (v)
36 : "Ir" (CR_C), "Ir" (0x40)
37 : "cc");
38}
39
40static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
41{
42 u32 mpidr = cpu_logical_map(cpu);
43 u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
44
45 for (;;) {
46
47 /* Turn the CPU off on next WFI instruction. */
48 exynos_cpu_power_down(core_id);
49
50 wfi();
51
52 if (pen_release == core_id) {
53 /*
54 * OK, proper wakeup, we're done
55 */
56 break;
57 }
58
59 /*
60 * Getting here, means that we have come out of WFI without
61 * having been woken up - this shouldn't happen
62 *
63 * Just note it happening - when we're woken, we can report
64 * its occurrence.
65 */
66 (*spurious)++;
67 }
68}
69
70/*
71 * platform-specific code to shutdown a CPU
72 *
73 * Called with IRQs disabled
74 */
75void __ref exynos_cpu_die(unsigned int cpu)
76{
77 int spurious = 0;
78
79 v7_exit_coherency_flush(louis);
80
81 platform_do_lowpower(cpu, &spurious);
82
83 /*
84 * bring this CPU back into the world of cache
85 * coherency, and then restore interrupts
86 */
87 cpu_leave_lowpower();
88
89 if (spurious)
90 pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious);
91}
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h
index f0b7e92bad6c..1ad3f496ef56 100644
--- a/arch/arm/mach-exynos/include/mach/map.h
+++ b/arch/arm/mach-exynos/include/mach/map.h
@@ -30,40 +30,17 @@
30#define EXYNOS4_PA_CMU 0x10030000 30#define EXYNOS4_PA_CMU 0x10030000
31#define EXYNOS5_PA_CMU 0x10010000 31#define EXYNOS5_PA_CMU 0x10010000
32 32
33#define EXYNOS4_PA_SYSTIMER 0x10050000
34
35#define EXYNOS4_PA_WATCHDOG 0x10060000
36#define EXYNOS5_PA_WATCHDOG 0x101D0000
37
38#define EXYNOS4_PA_DMC0 0x10400000 33#define EXYNOS4_PA_DMC0 0x10400000
39#define EXYNOS4_PA_DMC1 0x10410000 34#define EXYNOS4_PA_DMC1 0x10410000
40 35
41#define EXYNOS4_PA_COMBINER 0x10440000
42#define EXYNOS5_PA_COMBINER 0x10440000
43
44#define EXYNOS4_PA_GIC_CPU 0x10480000
45#define EXYNOS4_PA_GIC_DIST 0x10490000
46#define EXYNOS5_PA_GIC_CPU 0x10482000
47#define EXYNOS5_PA_GIC_DIST 0x10481000
48
49#define EXYNOS4_PA_COREPERI 0x10500000 36#define EXYNOS4_PA_COREPERI 0x10500000
50#define EXYNOS4_PA_L2CC 0x10502000 37#define EXYNOS4_PA_L2CC 0x10502000
51 38
52#define EXYNOS4_PA_SROMC 0x12570000 39#define EXYNOS4_PA_SROMC 0x12570000
53#define EXYNOS5_PA_SROMC 0x12250000 40#define EXYNOS5_PA_SROMC 0x12250000
54 41
55#define EXYNOS4_PA_HSPHY 0x125B0000
56
57#define EXYNOS4_PA_UART 0x13800000
58#define EXYNOS5_PA_UART 0x12C00000
59
60#define EXYNOS4_PA_TIMER 0x139D0000
61#define EXYNOS5_PA_TIMER 0x12DD0000
62
63/* Compatibility UART */ 42/* Compatibility UART */
64 43
65#define EXYNOS5440_PA_UART0 0x000B0000 44#define EXYNOS5440_PA_UART0 0x000B0000
66 45
67#define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET))
68
69#endif /* __ASM_ARCH_MAP_H */ 46#endif /* __ASM_ARCH_MAP_H */
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 41ae28d69e6f..9c6dd1451136 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -22,6 +22,7 @@
22#include <linux/of_address.h> 22#include <linux/of_address.h>
23 23
24#include <asm/cacheflush.h> 24#include <asm/cacheflush.h>
25#include <asm/cp15.h>
25#include <asm/smp_plat.h> 26#include <asm/smp_plat.h>
26#include <asm/smp_scu.h> 27#include <asm/smp_scu.h>
27#include <asm/firmware.h> 28#include <asm/firmware.h>
@@ -33,6 +34,88 @@
33 34
34extern void exynos4_secondary_startup(void); 35extern void exynos4_secondary_startup(void);
35 36
37/*
38 * Set or clear the USE_DELAYED_RESET_ASSERTION option, set on Exynos4 SoCs
39 * during hot-(un)plugging CPUx.
40 *
41 * The feature can be cleared safely during first boot of secondary CPU.
42 *
43 * Exynos4 SoCs require setting USE_DELAYED_RESET_ASSERTION during powering
44 * down a CPU so the CPU idle clock down feature could properly detect global
45 * idle state when CPUx is off.
46 */
47static void exynos_set_delayed_reset_assertion(u32 core_id, bool enable)
48{
49 if (soc_is_exynos4()) {
50 unsigned int tmp;
51
52 tmp = pmu_raw_readl(EXYNOS_ARM_CORE_OPTION(core_id));
53 if (enable)
54 tmp |= S5P_USE_DELAYED_RESET_ASSERTION;
55 else
56 tmp &= ~(S5P_USE_DELAYED_RESET_ASSERTION);
57 pmu_raw_writel(tmp, EXYNOS_ARM_CORE_OPTION(core_id));
58 }
59}
60
61#ifdef CONFIG_HOTPLUG_CPU
62static inline void cpu_leave_lowpower(u32 core_id)
63{
64 unsigned int v;
65
66 asm volatile(
67 "mrc p15, 0, %0, c1, c0, 0\n"
68 " orr %0, %0, %1\n"
69 " mcr p15, 0, %0, c1, c0, 0\n"
70 " mrc p15, 0, %0, c1, c0, 1\n"
71 " orr %0, %0, %2\n"
72 " mcr p15, 0, %0, c1, c0, 1\n"
73 : "=&r" (v)
74 : "Ir" (CR_C), "Ir" (0x40)
75 : "cc");
76
77 exynos_set_delayed_reset_assertion(core_id, false);
78}
79
80static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
81{
82 u32 mpidr = cpu_logical_map(cpu);
83 u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
84
85 for (;;) {
86
87 /* Turn the CPU off on next WFI instruction. */
88 exynos_cpu_power_down(core_id);
89
90 /*
91 * Exynos4 SoCs require setting
92 * USE_DELAYED_RESET_ASSERTION so the CPU idle
93 * clock down feature could properly detect
94 * global idle state when CPUx is off.
95 */
96 exynos_set_delayed_reset_assertion(core_id, true);
97
98 wfi();
99
100 if (pen_release == core_id) {
101 /*
102 * OK, proper wakeup, we're done
103 */
104 break;
105 }
106
107 /*
108 * Getting here, means that we have come out of WFI without
109 * having been woken up - this shouldn't happen
110 *
111 * Just note it happening - when we're woken, we can report
112 * its occurrence.
113 */
114 (*spurious)++;
115 }
116}
117#endif /* CONFIG_HOTPLUG_CPU */
118
36/** 119/**
37 * exynos_core_power_down : power down the specified cpu 120 * exynos_core_power_down : power down the specified cpu
38 * @cpu : the cpu to power down 121 * @cpu : the cpu to power down
@@ -237,6 +320,9 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
237 udelay(10); 320 udelay(10);
238 } 321 }
239 322
323 /* No harm if this is called during first boot of secondary CPU */
324 exynos_set_delayed_reset_assertion(core_id, false);
325
240 /* 326 /*
241 * now the secondary core is starting up let it run its 327 * now the secondary core is starting up let it run its
242 * calibrations, then wait for it to finish 328 * calibrations, then wait for it to finish
@@ -318,6 +404,33 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
318 } 404 }
319} 405}
320 406
407#ifdef CONFIG_HOTPLUG_CPU
408/*
409 * platform-specific code to shutdown a CPU
410 *
411 * Called with IRQs disabled
412 */
413static void exynos_cpu_die(unsigned int cpu)
414{
415 int spurious = 0;
416 u32 mpidr = cpu_logical_map(cpu);
417 u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
418
419 v7_exit_coherency_flush(louis);
420
421 platform_do_lowpower(cpu, &spurious);
422
423 /*
424 * bring this CPU back into the world of cache
425 * coherency, and then restore interrupts
426 */
427 cpu_leave_lowpower(core_id);
428
429 if (spurious)
430 pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious);
431}
432#endif /* CONFIG_HOTPLUG_CPU */
433
321struct smp_operations exynos_smp_ops __initdata = { 434struct smp_operations exynos_smp_ops __initdata = {
322 .smp_init_cpus = exynos_smp_init_cpus, 435 .smp_init_cpus = exynos_smp_init_cpus,
323 .smp_prepare_cpus = exynos_smp_prepare_cpus, 436 .smp_prepare_cpus = exynos_smp_prepare_cpus,
diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h
index 96a1569262b5..4e9b4440e2bd 100644
--- a/arch/arm/mach-exynos/regs-pmu.h
+++ b/arch/arm/mach-exynos/regs-pmu.h
@@ -20,6 +20,7 @@
20 20
21#define S5P_USE_STANDBY_WFI0 (1 << 16) 21#define S5P_USE_STANDBY_WFI0 (1 << 16)
22#define S5P_USE_STANDBY_WFE0 (1 << 24) 22#define S5P_USE_STANDBY_WFE0 (1 << 24)
23#define S5P_USE_DELAYED_RESET_ASSERTION BIT(12)
23 24
24#define EXYNOS_SWRESET 0x0400 25#define EXYNOS_SWRESET 0x0400
25#define EXYNOS5440_SWRESET 0x00C4 26#define EXYNOS5440_SWRESET 0x00C4
@@ -106,6 +107,8 @@
106 (EXYNOS_ARM_CORE0_CONFIGURATION + (0x80 * (_nr))) 107 (EXYNOS_ARM_CORE0_CONFIGURATION + (0x80 * (_nr)))
107#define EXYNOS_ARM_CORE_STATUS(_nr) \ 108#define EXYNOS_ARM_CORE_STATUS(_nr) \
108 (EXYNOS_ARM_CORE_CONFIGURATION(_nr) + 0x4) 109 (EXYNOS_ARM_CORE_CONFIGURATION(_nr) + 0x4)
110#define EXYNOS_ARM_CORE_OPTION(_nr) \
111 (EXYNOS_ARM_CORE_CONFIGURATION(_nr) + 0x8)
109 112
110#define EXYNOS_ARM_COMMON_CONFIGURATION 0x2500 113#define EXYNOS_ARM_COMMON_CONFIGURATION 0x2500
111#define EXYNOS_COMMON_CONFIGURATION(_nr) \ 114#define EXYNOS_COMMON_CONFIGURATION(_nr) \
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index 4e79da7c5e30..5951660d1bd2 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -145,7 +145,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
145 post_div_table[2].div = 1; 145 post_div_table[2].div = 1;
146 video_div_table[1].div = 1; 146 video_div_table[1].div = 1;
147 video_div_table[2].div = 1; 147 video_div_table[2].div = 1;
148 }; 148 }
149 149
150 clk[IMX6QDL_PLL1_BYPASS_SRC] = imx_clk_mux("pll1_bypass_src", base + 0x00, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); 150 clk[IMX6QDL_PLL1_BYPASS_SRC] = imx_clk_mux("pll1_bypass_src", base + 0x00, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels));
151 clk[IMX6QDL_PLL2_BYPASS_SRC] = imx_clk_mux("pll2_bypass_src", base + 0x30, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); 151 clk[IMX6QDL_PLL2_BYPASS_SRC] = imx_clk_mux("pll2_bypass_src", base + 0x30, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels));
diff --git a/arch/arm/mach-imx/clk-pllv3.c b/arch/arm/mach-imx/clk-pllv3.c
index 57de74da0acf..0ad6e5442fd8 100644
--- a/arch/arm/mach-imx/clk-pllv3.c
+++ b/arch/arm/mach-imx/clk-pllv3.c
@@ -69,7 +69,6 @@ static int clk_pllv3_prepare(struct clk_hw *hw)
69{ 69{
70 struct clk_pllv3 *pll = to_clk_pllv3(hw); 70 struct clk_pllv3 *pll = to_clk_pllv3(hw);
71 u32 val; 71 u32 val;
72 int ret;
73 72
74 val = readl_relaxed(pll->base); 73 val = readl_relaxed(pll->base);
75 if (pll->powerup_set) 74 if (pll->powerup_set)
@@ -78,11 +77,7 @@ static int clk_pllv3_prepare(struct clk_hw *hw)
78 val &= ~BM_PLL_POWER; 77 val &= ~BM_PLL_POWER;
79 writel_relaxed(val, pll->base); 78 writel_relaxed(val, pll->base);
80 79
81 ret = clk_pllv3_wait_lock(pll); 80 return clk_pllv3_wait_lock(pll);
82 if (ret)
83 return ret;
84
85 return 0;
86} 81}
87 82
88static void clk_pllv3_unprepare(struct clk_hw *hw) 83static void clk_pllv3_unprepare(struct clk_hw *hw)
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h
index 66662a1e36de..3d383cb5e6d1 100644
--- a/arch/arm/mach-imx/common.h
+++ b/arch/arm/mach-imx/common.h
@@ -61,7 +61,6 @@ struct platform_device *mxc_register_gpio(char *name, int id,
61void mxc_set_cpu_type(unsigned int type); 61void mxc_set_cpu_type(unsigned int type);
62void mxc_restart(enum reboot_mode, const char *); 62void mxc_restart(enum reboot_mode, const char *);
63void mxc_arch_reset_init(void __iomem *); 63void mxc_arch_reset_init(void __iomem *);
64void mxc_arch_reset_init_dt(void);
65int mx51_revision(void); 64int mx51_revision(void);
66int mx53_revision(void); 65int mx53_revision(void);
67void imx_set_aips(void __iomem *); 66void imx_set_aips(void __iomem *);
diff --git a/arch/arm/mach-imx/imx25-dt.c b/arch/arm/mach-imx/imx25-dt.c
index cf8032bae277..25defbdb06c4 100644
--- a/arch/arm/mach-imx/imx25-dt.c
+++ b/arch/arm/mach-imx/imx25-dt.c
@@ -17,13 +17,6 @@
17#include "common.h" 17#include "common.h"
18#include "mx25.h" 18#include "mx25.h"
19 19
20static void __init imx25_dt_init(void)
21{
22 mxc_arch_reset_init_dt();
23
24 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
25}
26
27static const char * const imx25_dt_board_compat[] __initconst = { 20static const char * const imx25_dt_board_compat[] __initconst = {
28 "fsl,imx25", 21 "fsl,imx25",
29 NULL 22 NULL
@@ -33,7 +26,5 @@ DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)")
33 .map_io = mx25_map_io, 26 .map_io = mx25_map_io,
34 .init_early = imx25_init_early, 27 .init_early = imx25_init_early,
35 .init_irq = mx25_init_irq, 28 .init_irq = mx25_init_irq,
36 .init_machine = imx25_dt_init,
37 .dt_compat = imx25_dt_board_compat, 29 .dt_compat = imx25_dt_board_compat,
38 .restart = mxc_restart,
39MACHINE_END 30MACHINE_END
diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
index dc8f1a6f45f2..bd42d1bd10af 100644
--- a/arch/arm/mach-imx/imx27-dt.c
+++ b/arch/arm/mach-imx/imx27-dt.c
@@ -22,8 +22,6 @@ static void __init imx27_dt_init(void)
22{ 22{
23 struct platform_device_info devinfo = { .name = "cpufreq-dt", }; 23 struct platform_device_info devinfo = { .name = "cpufreq-dt", };
24 24
25 mxc_arch_reset_init_dt();
26
27 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 25 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
28 26
29 platform_device_register_full(&devinfo); 27 platform_device_register_full(&devinfo);
@@ -40,5 +38,4 @@ DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)")
40 .init_irq = mx27_init_irq, 38 .init_irq = mx27_init_irq,
41 .init_machine = imx27_dt_init, 39 .init_machine = imx27_dt_init,
42 .dt_compat = imx27_dt_board_compat, 40 .dt_compat = imx27_dt_board_compat,
43 .restart = mxc_restart,
44MACHINE_END 41MACHINE_END
diff --git a/arch/arm/mach-imx/imx31-dt.c b/arch/arm/mach-imx/imx31-dt.c
index 418dbc82adc4..32100222a017 100644
--- a/arch/arm/mach-imx/imx31-dt.c
+++ b/arch/arm/mach-imx/imx31-dt.c
@@ -18,13 +18,6 @@
18#include "common.h" 18#include "common.h"
19#include "mx31.h" 19#include "mx31.h"
20 20
21static void __init imx31_dt_init(void)
22{
23 mxc_arch_reset_init_dt();
24
25 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
26}
27
28static const char * const imx31_dt_board_compat[] __initconst = { 21static const char * const imx31_dt_board_compat[] __initconst = {
29 "fsl,imx31", 22 "fsl,imx31",
30 NULL 23 NULL
@@ -40,7 +33,5 @@ DT_MACHINE_START(IMX31_DT, "Freescale i.MX31 (Device Tree Support)")
40 .init_early = imx31_init_early, 33 .init_early = imx31_init_early,
41 .init_irq = mx31_init_irq, 34 .init_irq = mx31_init_irq,
42 .init_time = imx31_dt_timer_init, 35 .init_time = imx31_dt_timer_init,
43 .init_machine = imx31_dt_init,
44 .dt_compat = imx31_dt_board_compat, 36 .dt_compat = imx31_dt_board_compat,
45 .restart = mxc_restart,
46MACHINE_END 37MACHINE_END
diff --git a/arch/arm/mach-imx/imx35-dt.c b/arch/arm/mach-imx/imx35-dt.c
index 584fbe105579..e9396037235d 100644
--- a/arch/arm/mach-imx/imx35-dt.c
+++ b/arch/arm/mach-imx/imx35-dt.c
@@ -20,14 +20,6 @@
20#include "common.h" 20#include "common.h"
21#include "mx35.h" 21#include "mx35.h"
22 22
23static void __init imx35_dt_init(void)
24{
25 mxc_arch_reset_init_dt();
26
27 of_platform_populate(NULL, of_default_bus_match_table,
28 NULL, NULL);
29}
30
31static void __init imx35_irq_init(void) 23static void __init imx35_irq_init(void)
32{ 24{
33 imx_init_l2cache(); 25 imx_init_l2cache();
@@ -43,7 +35,5 @@ DT_MACHINE_START(IMX35_DT, "Freescale i.MX35 (Device Tree Support)")
43 .map_io = mx35_map_io, 35 .map_io = mx35_map_io,
44 .init_early = imx35_init_early, 36 .init_early = imx35_init_early,
45 .init_irq = imx35_irq_init, 37 .init_irq = imx35_irq_init,
46 .init_machine = imx35_dt_init,
47 .dt_compat = imx35_dt_board_compat, 38 .dt_compat = imx35_dt_board_compat,
48 .restart = mxc_restart,
49MACHINE_END 39MACHINE_END
diff --git a/arch/arm/mach-imx/iomux-imx31.c b/arch/arm/mach-imx/iomux-imx31.c
index 1657fe64cd0f..d6a30753ca7c 100644
--- a/arch/arm/mach-imx/iomux-imx31.c
+++ b/arch/arm/mach-imx/iomux-imx31.c
@@ -44,9 +44,11 @@ static unsigned long mxc_pin_alloc_map[NB_PORTS * 32 / BITS_PER_LONG];
44/* 44/*
45 * set the mode for a IOMUX pin. 45 * set the mode for a IOMUX pin.
46 */ 46 */
47int mxc_iomux_mode(unsigned int pin_mode) 47void mxc_iomux_mode(unsigned int pin_mode)
48{ 48{
49 u32 field, l, mode, ret = 0; 49 u32 field;
50 u32 l;
51 u32 mode;
50 void __iomem *reg; 52 void __iomem *reg;
51 53
52 reg = IOMUXSW_MUX_CTL + (pin_mode & IOMUX_REG_MASK); 54 reg = IOMUXSW_MUX_CTL + (pin_mode & IOMUX_REG_MASK);
@@ -61,8 +63,6 @@ int mxc_iomux_mode(unsigned int pin_mode)
61 __raw_writel(l, reg); 63 __raw_writel(l, reg);
62 64
63 spin_unlock(&gpio_mux_lock); 65 spin_unlock(&gpio_mux_lock);
64
65 return ret;
66} 66}
67 67
68/* 68/*
diff --git a/arch/arm/mach-imx/iomux-mx3.h b/arch/arm/mach-imx/iomux-mx3.h
index f79f78a1c0ed..0a5adba61e0b 100644
--- a/arch/arm/mach-imx/iomux-mx3.h
+++ b/arch/arm/mach-imx/iomux-mx3.h
@@ -144,7 +144,7 @@ void mxc_iomux_set_gpr(enum iomux_gp_func, bool en);
144 * It is called by the setup functions and should not be called directly anymore. 144 * It is called by the setup functions and should not be called directly anymore.
145 * It is here visible for backward compatibility 145 * It is here visible for backward compatibility
146 */ 146 */
147int mxc_iomux_mode(unsigned int pin_mode); 147void mxc_iomux_mode(unsigned int pin_mode);
148 148
149#define IOMUX_PADNUM_MASK 0x1ff 149#define IOMUX_PADNUM_MASK 0x1ff
150#define IOMUX_GPIONUM_SHIFT 9 150#define IOMUX_GPIONUM_SHIFT 9
diff --git a/arch/arm/mach-imx/mach-imx50.c b/arch/arm/mach-imx/mach-imx50.c
index b1e56a94a382..ecf58b9e974b 100644
--- a/arch/arm/mach-imx/mach-imx50.c
+++ b/arch/arm/mach-imx/mach-imx50.c
@@ -16,13 +16,6 @@
16 16
17#include "common.h" 17#include "common.h"
18 18
19static void __init imx50_dt_init(void)
20{
21 mxc_arch_reset_init_dt();
22
23 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
24}
25
26static const char * const imx50_dt_board_compat[] __initconst = { 19static const char * const imx50_dt_board_compat[] __initconst = {
27 "fsl,imx50", 20 "fsl,imx50",
28 NULL 21 NULL
@@ -30,7 +23,5 @@ static const char * const imx50_dt_board_compat[] __initconst = {
30 23
31DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)") 24DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)")
32 .init_irq = tzic_init_irq, 25 .init_irq = tzic_init_irq,
33 .init_machine = imx50_dt_init,
34 .dt_compat = imx50_dt_board_compat, 26 .dt_compat = imx50_dt_board_compat,
35 .restart = mxc_restart,
36MACHINE_END 27MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c
index 2c5fcaf8675b..b015129e4045 100644
--- a/arch/arm/mach-imx/mach-imx51.c
+++ b/arch/arm/mach-imx/mach-imx51.c
@@ -53,7 +53,6 @@ static void __init imx51_dt_init(void)
53{ 53{
54 struct platform_device_info devinfo = { .name = "cpufreq-dt", }; 54 struct platform_device_info devinfo = { .name = "cpufreq-dt", };
55 55
56 mxc_arch_reset_init_dt();
57 imx51_ipu_mipi_setup(); 56 imx51_ipu_mipi_setup();
58 imx_src_init(); 57 imx_src_init();
59 58
@@ -78,5 +77,4 @@ DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
78 .init_machine = imx51_dt_init, 77 .init_machine = imx51_dt_init,
79 .init_late = imx51_init_late, 78 .init_late = imx51_init_late,
80 .dt_compat = imx51_dt_board_compat, 79 .dt_compat = imx51_dt_board_compat,
81 .restart = mxc_restart,
82MACHINE_END 80MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c
index 03dd6ea13acc..18b5c5c136db 100644
--- a/arch/arm/mach-imx/mach-imx53.c
+++ b/arch/arm/mach-imx/mach-imx53.c
@@ -30,7 +30,6 @@ static void __init imx53_init_early(void)
30 30
31static void __init imx53_dt_init(void) 31static void __init imx53_dt_init(void)
32{ 32{
33 mxc_arch_reset_init_dt();
34 imx_src_init(); 33 imx_src_init();
35 34
36 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 35 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
@@ -54,5 +53,4 @@ DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)")
54 .init_machine = imx53_dt_init, 53 .init_machine = imx53_dt_init,
55 .init_late = imx53_init_late, 54 .init_late = imx53_init_late,
56 .dt_compat = imx53_dt_board_compat, 55 .dt_compat = imx53_dt_board_compat,
57 .restart = mxc_restart,
58MACHINE_END 56MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index d51c6e99a2e9..5057d61298b7 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -268,8 +268,6 @@ static void __init imx6q_init_machine(void)
268 imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q", 268 imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q",
269 imx_get_soc_revision()); 269 imx_get_soc_revision());
270 270
271 mxc_arch_reset_init_dt();
272
273 parent = imx_soc_device_init(); 271 parent = imx_soc_device_init();
274 if (parent == NULL) 272 if (parent == NULL)
275 pr_warn("failed to initialize soc device\n"); 273 pr_warn("failed to initialize soc device\n");
@@ -409,5 +407,4 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad/DualLite (Device Tree)")
409 .init_machine = imx6q_init_machine, 407 .init_machine = imx6q_init_machine,
410 .init_late = imx6q_init_late, 408 .init_late = imx6q_init_late,
411 .dt_compat = imx6q_dt_compat, 409 .dt_compat = imx6q_dt_compat,
412 .restart = mxc_restart,
413MACHINE_END 410MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c
index ed263a21d928..24bfaaf944c8 100644
--- a/arch/arm/mach-imx/mach-imx6sl.c
+++ b/arch/arm/mach-imx/mach-imx6sl.c
@@ -48,8 +48,6 @@ static void __init imx6sl_init_machine(void)
48{ 48{
49 struct device *parent; 49 struct device *parent;
50 50
51 mxc_arch_reset_init_dt();
52
53 parent = imx_soc_device_init(); 51 parent = imx_soc_device_init();
54 if (parent == NULL) 52 if (parent == NULL)
55 pr_warn("failed to initialize soc device\n"); 53 pr_warn("failed to initialize soc device\n");
@@ -76,10 +74,8 @@ static const char * const imx6sl_dt_compat[] __initconst = {
76}; 74};
77 75
78DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)") 76DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)")
79 .map_io = debug_ll_io_init,
80 .init_irq = imx6sl_init_irq, 77 .init_irq = imx6sl_init_irq,
81 .init_machine = imx6sl_init_machine, 78 .init_machine = imx6sl_init_machine,
82 .init_late = imx6sl_init_late, 79 .init_late = imx6sl_init_late,
83 .dt_compat = imx6sl_dt_compat, 80 .dt_compat = imx6sl_dt_compat,
84 .restart = mxc_restart,
85MACHINE_END 81MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c
index 3de3b7369aef..4111c0fa8d09 100644
--- a/arch/arm/mach-imx/mach-imx6sx.c
+++ b/arch/arm/mach-imx/mach-imx6sx.c
@@ -18,8 +18,6 @@ static void __init imx6sx_init_machine(void)
18{ 18{
19 struct device *parent; 19 struct device *parent;
20 20
21 mxc_arch_reset_init_dt();
22
23 parent = imx_soc_device_init(); 21 parent = imx_soc_device_init();
24 if (parent == NULL) 22 if (parent == NULL)
25 pr_warn("failed to initialize soc device\n"); 23 pr_warn("failed to initialize soc device\n");
@@ -53,10 +51,8 @@ static const char * const imx6sx_dt_compat[] __initconst = {
53}; 51};
54 52
55DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)") 53DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)")
56 .map_io = debug_ll_io_init,
57 .init_irq = imx6sx_init_irq, 54 .init_irq = imx6sx_init_irq,
58 .init_machine = imx6sx_init_machine, 55 .init_machine = imx6sx_init_machine,
59 .dt_compat = imx6sx_dt_compat, 56 .dt_compat = imx6sx_dt_compat,
60 .init_late = imx6sx_init_late, 57 .init_late = imx6sx_init_late,
61 .restart = mxc_restart,
62MACHINE_END 58MACHINE_END
diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c
index ee7e57b752a7..c11ab6a1dc87 100644
--- a/arch/arm/mach-imx/mach-vf610.c
+++ b/arch/arm/mach-imx/mach-vf610.c
@@ -12,14 +12,6 @@
12#include <asm/mach/arch.h> 12#include <asm/mach/arch.h>
13#include <asm/hardware/cache-l2x0.h> 13#include <asm/hardware/cache-l2x0.h>
14 14
15#include "common.h"
16
17static void __init vf610_init_machine(void)
18{
19 mxc_arch_reset_init_dt();
20 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
21}
22
23static const char * const vf610_dt_compat[] __initconst = { 15static const char * const vf610_dt_compat[] __initconst = {
24 "fsl,vf610", 16 "fsl,vf610",
25 NULL, 17 NULL,
@@ -28,7 +20,5 @@ static const char * const vf610_dt_compat[] __initconst = {
28DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)") 20DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)")
29 .l2c_aux_val = 0, 21 .l2c_aux_val = 0,
30 .l2c_aux_mask = ~0, 22 .l2c_aux_mask = ~0,
31 .init_machine = vf610_init_machine,
32 .dt_compat = vf610_dt_compat, 23 .dt_compat = vf610_dt_compat,
33 .restart = mxc_restart,
34MACHINE_END 24MACHINE_END
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index d14c33fd6b03..51c35013b673 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -89,21 +89,6 @@ void __init mxc_arch_reset_init(void __iomem *base)
89 clk_prepare(wdog_clk); 89 clk_prepare(wdog_clk);
90} 90}
91 91
92void __init mxc_arch_reset_init_dt(void)
93{
94 struct device_node *np;
95
96 np = of_find_compatible_node(NULL, NULL, "fsl,imx21-wdt");
97 wdog_base = of_iomap(np, 0);
98 WARN_ON(!wdog_base);
99
100 wdog_clk = of_clk_get(np, 0);
101 if (IS_ERR(wdog_clk))
102 pr_warn("%s: failed to get wdog clock\n", __func__);
103 else
104 clk_prepare(wdog_clk);
105}
106
107#ifdef CONFIG_CACHE_L2X0 92#ifdef CONFIG_CACHE_L2X0
108void __init imx_init_l2cache(void) 93void __init imx_init_l2cache(void)
109{ 94{
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 21f457b56c01..0f2539550f1b 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -36,7 +36,6 @@ menuconfig ARCH_SHMOBILE_MULTI
36 select NO_IOPORT_MAP 36 select NO_IOPORT_MAP
37 select PINCTRL 37 select PINCTRL
38 select ARCH_REQUIRE_GPIOLIB 38 select ARCH_REQUIRE_GPIOLIB
39 select ARCH_HAS_OPP
40 39
41if ARCH_SHMOBILE_MULTI 40if ARCH_SHMOBILE_MULTI
42 41
@@ -73,11 +72,6 @@ config ARCH_R8A7794
73 72
74comment "Renesas ARM SoCs Board Type" 73comment "Renesas ARM SoCs Board Type"
75 74
76config MACH_KOELSCH
77 bool "Koelsch board"
78 depends on ARCH_R8A7791
79 select MICREL_PHY if SH_ETH
80
81config MACH_LAGER 75config MACH_LAGER
82 bool "Lager board" 76 bool "Lager board"
83 depends on ARCH_R8A7790 77 depends on ARCH_R8A7790
@@ -145,14 +139,6 @@ config ARCH_R8A7790
145 select MIGHT_HAVE_PCI 139 select MIGHT_HAVE_PCI
146 select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE 140 select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
147 141
148config ARCH_R8A7791
149 bool "R-Car M2-W (R8A77910)"
150 select ARCH_RCAR_GEN2
151 select ARCH_WANT_OPTIONAL_GPIOLIB
152 select ARM_GIC
153 select MIGHT_HAVE_PCI
154 select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
155
156comment "Renesas ARM SoCs Board Type" 142comment "Renesas ARM SoCs Board Type"
157 143
158config MACH_APE6EVM 144config MACH_APE6EVM
@@ -227,12 +213,6 @@ config MACH_LAGER
227 select MICREL_PHY if SH_ETH 213 select MICREL_PHY if SH_ETH
228 select SND_SOC_AK4642 if SND_SIMPLE_CARD 214 select SND_SOC_AK4642 if SND_SIMPLE_CARD
229 215
230config MACH_KOELSCH
231 bool "Koelsch board"
232 depends on ARCH_R8A7791
233 select USE_OF
234 select MICREL_PHY if SH_ETH
235
236config MACH_KZM9G 216config MACH_KZM9G
237 bool "KZM-A9-GT board" 217 bool "KZM-A9-GT board"
238 depends on ARCH_SH73A0 218 depends on ARCH_SH73A0
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index e20f2786ec72..7d68eba53be3 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -19,8 +19,8 @@ obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o
19obj-$(CONFIG_ARCH_R7S72100) += setup-r7s72100.o 19obj-$(CONFIG_ARCH_R7S72100) += setup-r7s72100.o
20 20
21# Clock objects 21# Clock objects
22obj-y += clock.o
23ifndef CONFIG_COMMON_CLK 22ifndef CONFIG_COMMON_CLK
23obj-y += clock.o
24obj-$(CONFIG_ARCH_SH7372) += clock-sh7372.o 24obj-$(CONFIG_ARCH_SH7372) += clock-sh7372.o
25obj-$(CONFIG_ARCH_SH73A0) += clock-sh73a0.o 25obj-$(CONFIG_ARCH_SH73A0) += clock-sh73a0.o
26obj-$(CONFIG_ARCH_R8A73A4) += clock-r8a73a4.o 26obj-$(CONFIG_ARCH_R8A73A4) += clock-r8a73a4.o
@@ -28,7 +28,6 @@ obj-$(CONFIG_ARCH_R8A7740) += clock-r8a7740.o
28obj-$(CONFIG_ARCH_R8A7778) += clock-r8a7778.o 28obj-$(CONFIG_ARCH_R8A7778) += clock-r8a7778.o
29obj-$(CONFIG_ARCH_R8A7779) += clock-r8a7779.o 29obj-$(CONFIG_ARCH_R8A7779) += clock-r8a7779.o
30obj-$(CONFIG_ARCH_R8A7790) += clock-r8a7790.o 30obj-$(CONFIG_ARCH_R8A7790) += clock-r8a7790.o
31obj-$(CONFIG_ARCH_R8A7791) += clock-r8a7791.o
32endif 31endif
33 32
34# CPU reset vector handling objects 33# CPU reset vector handling objects
@@ -57,7 +56,6 @@ obj-$(CONFIG_ARCH_SH7372) += entry-intc.o sleep-sh7372.o
57 56
58# Board objects 57# Board objects
59ifdef CONFIG_ARCH_SHMOBILE_MULTI 58ifdef CONFIG_ARCH_SHMOBILE_MULTI
60obj-$(CONFIG_MACH_KOELSCH) += board-koelsch-reference.o
61obj-$(CONFIG_MACH_LAGER) += board-lager-reference.o 59obj-$(CONFIG_MACH_LAGER) += board-lager-reference.o
62obj-$(CONFIG_MACH_MARZEN) += board-marzen-reference.o 60obj-$(CONFIG_MACH_MARZEN) += board-marzen-reference.o
63else 61else
@@ -69,7 +67,6 @@ obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o
69obj-$(CONFIG_MACH_MARZEN) += board-marzen.o 67obj-$(CONFIG_MACH_MARZEN) += board-marzen.o
70obj-$(CONFIG_MACH_LAGER) += board-lager.o 68obj-$(CONFIG_MACH_LAGER) += board-lager.o
71obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o 69obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o
72obj-$(CONFIG_MACH_KOELSCH) += board-koelsch.o
73obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o 70obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o
74obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o 71obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o
75endif 72endif
diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot
index de9a23852fc8..57d00ed6ec0c 100644
--- a/arch/arm/mach-shmobile/Makefile.boot
+++ b/arch/arm/mach-shmobile/Makefile.boot
@@ -5,7 +5,6 @@ loadaddr-$(CONFIG_MACH_APE6EVM_REFERENCE) += 0x40008000
5loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000 5loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000
6loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 6loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000
7loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000 7loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000
8loadaddr-$(CONFIG_MACH_KOELSCH) += 0x40008000
9loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 8loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000
10loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 9loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000
11loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 10loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000
diff --git a/arch/arm/mach-shmobile/board-ape6evm-reference.c b/arch/arm/mach-shmobile/board-ape6evm-reference.c
index a6503d8c77de..004ed92ee598 100644
--- a/arch/arm/mach-shmobile/board-ape6evm-reference.c
+++ b/arch/arm/mach-shmobile/board-ape6evm-reference.c
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 15 */
20 16
21#include <linux/gpio.h> 17#include <linux/gpio.h>
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c
index b222f68d55b7..66f67816a844 100644
--- a/arch/arm/mach-shmobile/board-ape6evm.c
+++ b/arch/arm/mach-shmobile/board-ape6evm.c
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 15 */
20 16
21#include <linux/gpio.h> 17#include <linux/gpio.h>
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index e70983534403..de95181c7de4 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -12,53 +12,48 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 */ 15 */
21 16
22#include <linux/clk.h> 17#include <linux/clk.h>
23#include <linux/delay.h> 18#include <linux/delay.h>
24#include <linux/err.h> 19#include <linux/err.h>
25#include <linux/kernel.h>
26#include <linux/input.h>
27#include <linux/platform_data/st1232_pdata.h>
28#include <linux/irq.h>
29#include <linux/platform_device.h>
30#include <linux/gpio.h> 20#include <linux/gpio.h>
31#include <linux/gpio_keys.h> 21#include <linux/gpio_keys.h>
32#include <linux/regulator/driver.h> 22#include <linux/i2c-gpio.h>
23#include <linux/input.h>
24#include <linux/irq.h>
25#include <linux/kernel.h>
26#include <linux/mfd/tmio.h>
27#include <linux/mmc/host.h>
28#include <linux/mmc/sh_mmcif.h>
29#include <linux/mmc/sh_mobile_sdhi.h>
33#include <linux/pinctrl/machine.h> 30#include <linux/pinctrl/machine.h>
31#include <linux/platform_data/st1232_pdata.h>
32#include <linux/platform_device.h>
34#include <linux/pwm.h> 33#include <linux/pwm.h>
35#include <linux/pwm_backlight.h> 34#include <linux/pwm_backlight.h>
35#include <linux/reboot.h>
36#include <linux/regulator/driver.h>
36#include <linux/regulator/fixed.h> 37#include <linux/regulator/fixed.h>
37#include <linux/regulator/gpio-regulator.h> 38#include <linux/regulator/gpio-regulator.h>
38#include <linux/regulator/machine.h> 39#include <linux/regulator/machine.h>
39#include <linux/sh_eth.h> 40#include <linux/sh_eth.h>
40#include <linux/videodev2.h>
41#include <linux/usb/renesas_usbhs.h> 41#include <linux/usb/renesas_usbhs.h>
42#include <linux/mfd/tmio.h> 42#include <linux/videodev2.h>
43#include <linux/mmc/host.h>
44#include <linux/mmc/sh_mmcif.h>
45#include <linux/mmc/sh_mobile_sdhi.h>
46#include <linux/i2c-gpio.h>
47#include <linux/reboot.h>
48 43
49#include <media/mt9t112.h> 44#include <asm/hardware/cache-l2x0.h>
50#include <media/sh_mobile_ceu.h>
51#include <media/soc_camera.h>
52#include <asm/page.h>
53#include <asm/mach-types.h> 45#include <asm/mach-types.h>
54#include <asm/mach/arch.h> 46#include <asm/mach/arch.h>
55#include <asm/mach/map.h> 47#include <asm/mach/map.h>
56#include <asm/mach/time.h> 48#include <asm/mach/time.h>
57#include <asm/hardware/cache-l2x0.h> 49#include <asm/page.h>
58#include <video/sh_mobile_lcdc.h> 50#include <media/mt9t112.h>
59#include <video/sh_mobile_hdmi.h> 51#include <media/sh_mobile_ceu.h>
52#include <media/soc_camera.h>
60#include <sound/sh_fsi.h> 53#include <sound/sh_fsi.h>
61#include <sound/simple_card.h> 54#include <sound/simple_card.h>
55#include <video/sh_mobile_hdmi.h>
56#include <video/sh_mobile_lcdc.h>
62 57
63#include "common.h" 58#include "common.h"
64#include "irqs.h" 59#include "irqs.h"
diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c
index 79c47847f200..d649ade4a202 100644
--- a/arch/arm/mach-shmobile/board-bockw-reference.c
+++ b/arch/arm/mach-shmobile/board-bockw-reference.c
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 15 */
20 16
21#include <linux/of_platform.h> 17#include <linux/of_platform.h>
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
index 1cf2c75dacfb..f27b5a833bf0 100644
--- a/arch/arm/mach-shmobile/board-bockw.c
+++ b/arch/arm/mach-shmobile/board-bockw.c
@@ -13,10 +13,6 @@
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details. 15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */ 16 */
21 17
22#include <linux/mfd/tmio.h> 18#include <linux/mfd/tmio.h>
diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
deleted file mode 100644
index 46aa540133d6..000000000000
--- a/arch/arm/mach-shmobile/board-koelsch-reference.c
+++ /dev/null
@@ -1,117 +0,0 @@
1/*
2 * Koelsch board support - Reference DT implementation
3 *
4 * Copyright (C) 2013 Renesas Electronics Corporation
5 * Copyright (C) 2013 Renesas Solutions Corp.
6 * Copyright (C) 2013 Magnus Damm
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; version 2 of the License.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#include <linux/dma-mapping.h>
23#include <linux/kernel.h>
24#include <linux/of_platform.h>
25#include <linux/platform_data/rcar-du.h>
26
27#include <asm/mach/arch.h>
28
29#include "clock.h"
30#include "common.h"
31#include "irqs.h"
32#include "r8a7791.h"
33#include "rcar-gen2.h"
34
35/* DU */
36static struct rcar_du_encoder_data koelsch_du_encoders[] = {
37 {
38 .type = RCAR_DU_ENCODER_NONE,
39 .output = RCAR_DU_OUTPUT_LVDS0,
40 .connector.lvds.panel = {
41 .width_mm = 210,
42 .height_mm = 158,
43 .mode = {
44 .pixelclock = 65000000,
45 .hactive = 1024,
46 .hfront_porch = 20,
47 .hback_porch = 160,
48 .hsync_len = 136,
49 .vactive = 768,
50 .vfront_porch = 3,
51 .vback_porch = 29,
52 .vsync_len = 6,
53 },
54 },
55 },
56};
57
58static struct rcar_du_platform_data koelsch_du_pdata = {
59 .encoders = koelsch_du_encoders,
60 .num_encoders = ARRAY_SIZE(koelsch_du_encoders),
61};
62
63static const struct resource du_resources[] __initconst = {
64 DEFINE_RES_MEM(0xfeb00000, 0x40000),
65 DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"),
66 DEFINE_RES_IRQ(gic_spi(256)),
67 DEFINE_RES_IRQ(gic_spi(268)),
68};
69
70static void __init koelsch_add_du_device(void)
71{
72 struct platform_device_info info = {
73 .name = "rcar-du-r8a7791",
74 .id = -1,
75 .res = du_resources,
76 .num_res = ARRAY_SIZE(du_resources),
77 .data = &koelsch_du_pdata,
78 .size_data = sizeof(koelsch_du_pdata),
79 .dma_mask = DMA_BIT_MASK(32),
80 };
81
82 platform_device_register_full(&info);
83}
84
85/*
86 * This is a really crude hack to provide clkdev support to platform
87 * devices until they get moved to DT.
88 */
89static const struct clk_name clk_names[] __initconst = {
90 { "du0", "du.0", "rcar-du-r8a7791" },
91 { "du1", "du.1", "rcar-du-r8a7791" },
92 { "lvds0", "lvds.0", "rcar-du-r8a7791" },
93};
94
95static void __init koelsch_add_standard_devices(void)
96{
97 shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
98 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
99
100 koelsch_add_du_device();
101}
102
103static const char * const koelsch_boards_compat_dt[] __initconst = {
104 "renesas,koelsch",
105 "renesas,koelsch-reference",
106 NULL,
107};
108
109DT_MACHINE_START(KOELSCH_DT, "koelsch")
110 .smp = smp_ops(r8a7791_smp_ops),
111 .init_early = shmobile_init_delay,
112 .init_time = rcar_gen2_timer_init,
113 .init_machine = koelsch_add_standard_devices,
114 .init_late = shmobile_init_late,
115 .reserve = rcar_gen2_reserve,
116 .dt_compat = koelsch_boards_compat_dt,
117MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
deleted file mode 100644
index 7111b5c1d67b..000000000000
--- a/arch/arm/mach-shmobile/board-koelsch.c
+++ /dev/null
@@ -1,527 +0,0 @@
1/*
2 * Koelsch board support
3 *
4 * Copyright (C) 2013 Renesas Electronics Corporation
5 * Copyright (C) 2013-2014 Renesas Solutions Corp.
6 * Copyright (C) 2013 Magnus Damm
7 * Copyright (C) 2014 Cogent Embedded, Inc.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; version 2 of the License.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#include <linux/dma-mapping.h>
24#include <linux/gpio.h>
25#include <linux/gpio_keys.h>
26#include <linux/input.h>
27#include <linux/irq.h>
28#include <linux/kernel.h>
29#include <linux/leds.h>
30#include <linux/mfd/tmio.h>
31#include <linux/mmc/host.h>
32#include <linux/mmc/sh_mobile_sdhi.h>
33#include <linux/mtd/mtd.h>
34#include <linux/mtd/partitions.h>
35#include <linux/phy.h>
36#include <linux/pinctrl/machine.h>
37#include <linux/platform_data/gpio-rcar.h>
38#include <linux/platform_data/rcar-du.h>
39#include <linux/platform_device.h>
40#include <linux/regulator/driver.h>
41#include <linux/regulator/fixed.h>
42#include <linux/regulator/gpio-regulator.h>
43#include <linux/regulator/machine.h>
44#include <linux/sh_eth.h>
45#include <linux/spi/flash.h>
46#include <linux/spi/rspi.h>
47#include <linux/spi/spi.h>
48
49#include <asm/mach-types.h>
50#include <asm/mach/arch.h>
51
52#include "common.h"
53#include "irqs.h"
54#include "r8a7791.h"
55#include "rcar-gen2.h"
56
57/* DU */
58static struct rcar_du_encoder_data koelsch_du_encoders[] = {
59 {
60 .type = RCAR_DU_ENCODER_NONE,
61 .output = RCAR_DU_OUTPUT_LVDS0,
62 .connector.lvds.panel = {
63 .width_mm = 210,
64 .height_mm = 158,
65 .mode = {
66 .pixelclock = 65000000,
67 .hactive = 1024,
68 .hfront_porch = 20,
69 .hback_porch = 160,
70 .hsync_len = 136,
71 .vactive = 768,
72 .vfront_porch = 3,
73 .vback_porch = 29,
74 .vsync_len = 6,
75 },
76 },
77 },
78};
79
80static const struct rcar_du_platform_data koelsch_du_pdata __initconst = {
81 .encoders = koelsch_du_encoders,
82 .num_encoders = ARRAY_SIZE(koelsch_du_encoders),
83};
84
85static const struct resource du_resources[] __initconst = {
86 DEFINE_RES_MEM(0xfeb00000, 0x40000),
87 DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"),
88 DEFINE_RES_IRQ(gic_spi(256)),
89 DEFINE_RES_IRQ(gic_spi(268)),
90};
91
92static void __init koelsch_add_du_device(void)
93{
94 struct platform_device_info info = {
95 .name = "rcar-du-r8a7791",
96 .id = -1,
97 .res = du_resources,
98 .num_res = ARRAY_SIZE(du_resources),
99 .data = &koelsch_du_pdata,
100 .size_data = sizeof(koelsch_du_pdata),
101 .dma_mask = DMA_BIT_MASK(32),
102 };
103
104 platform_device_register_full(&info);
105}
106
107/* Ether */
108static const struct sh_eth_plat_data ether_pdata __initconst = {
109 .phy = 0x1,
110 .phy_irq = irq_pin(0),
111 .edmac_endian = EDMAC_LITTLE_ENDIAN,
112 .phy_interface = PHY_INTERFACE_MODE_RMII,
113 .ether_link_active_low = 1,
114};
115
116static const struct resource ether_resources[] __initconst = {
117 DEFINE_RES_MEM(0xee700000, 0x400),
118 DEFINE_RES_IRQ(gic_spi(162)),
119};
120
121static const struct platform_device_info ether_info __initconst = {
122 .name = "r8a7791-ether",
123 .id = -1,
124 .res = ether_resources,
125 .num_res = ARRAY_SIZE(ether_resources),
126 .data = &ether_pdata,
127 .size_data = sizeof(ether_pdata),
128 .dma_mask = DMA_BIT_MASK(32),
129};
130
131/* LEDS */
132static struct gpio_led koelsch_leds[] = {
133 {
134 .name = "led8",
135 .gpio = RCAR_GP_PIN(2, 21),
136 .default_state = LEDS_GPIO_DEFSTATE_ON,
137 }, {
138 .name = "led7",
139 .gpio = RCAR_GP_PIN(2, 20),
140 .default_state = LEDS_GPIO_DEFSTATE_ON,
141 }, {
142 .name = "led6",
143 .gpio = RCAR_GP_PIN(2, 19),
144 .default_state = LEDS_GPIO_DEFSTATE_ON,
145 },
146};
147
148static const struct gpio_led_platform_data koelsch_leds_pdata __initconst = {
149 .leds = koelsch_leds,
150 .num_leds = ARRAY_SIZE(koelsch_leds),
151};
152
153/* GPIO KEY */
154#define GPIO_KEY(c, g, d, ...) \
155 { .code = c, .gpio = g, .desc = d, .active_low = 1, \
156 .wakeup = 1, .debounce_interval = 20 }
157
158static struct gpio_keys_button gpio_buttons[] = {
159 GPIO_KEY(KEY_4, RCAR_GP_PIN(5, 3), "SW2-pin4"),
160 GPIO_KEY(KEY_3, RCAR_GP_PIN(5, 2), "SW2-pin3"),
161 GPIO_KEY(KEY_2, RCAR_GP_PIN(5, 1), "SW2-pin2"),
162 GPIO_KEY(KEY_1, RCAR_GP_PIN(5, 0), "SW2-pin1"),
163 GPIO_KEY(KEY_G, RCAR_GP_PIN(7, 6), "SW36"),
164 GPIO_KEY(KEY_F, RCAR_GP_PIN(7, 5), "SW35"),
165 GPIO_KEY(KEY_E, RCAR_GP_PIN(7, 4), "SW34"),
166 GPIO_KEY(KEY_D, RCAR_GP_PIN(7, 3), "SW33"),
167 GPIO_KEY(KEY_C, RCAR_GP_PIN(7, 2), "SW32"),
168 GPIO_KEY(KEY_B, RCAR_GP_PIN(7, 1), "SW31"),
169 GPIO_KEY(KEY_A, RCAR_GP_PIN(7, 0), "SW30"),
170};
171
172static const struct gpio_keys_platform_data koelsch_keys_pdata __initconst = {
173 .buttons = gpio_buttons,
174 .nbuttons = ARRAY_SIZE(gpio_buttons),
175};
176
177/* QSPI */
178static const struct resource qspi_resources[] __initconst = {
179 DEFINE_RES_MEM(0xe6b10000, 0x1000),
180 DEFINE_RES_IRQ_NAMED(gic_spi(184), "mux"),
181};
182
183static const struct rspi_plat_data qspi_pdata __initconst = {
184 .num_chipselect = 1,
185};
186
187/* SPI Flash memory (Spansion S25FL512SAGMFIG11 64 MiB) */
188static struct mtd_partition spi_flash_part[] = {
189 {
190 .name = "loader",
191 .offset = 0x00000000,
192 .size = 512 * 1024,
193 .mask_flags = MTD_WRITEABLE,
194 },
195 {
196 .name = "bootenv",
197 .offset = MTDPART_OFS_APPEND,
198 .size = 512 * 1024,
199 .mask_flags = MTD_WRITEABLE,
200 },
201 {
202 .name = "data",
203 .offset = MTDPART_OFS_APPEND,
204 .size = MTDPART_SIZ_FULL,
205 },
206};
207
208static const struct flash_platform_data spi_flash_data = {
209 .name = "m25p80",
210 .parts = spi_flash_part,
211 .nr_parts = ARRAY_SIZE(spi_flash_part),
212 .type = "s25fl512s",
213};
214
215static const struct spi_board_info spi_info[] __initconst = {
216 {
217 .modalias = "m25p80",
218 .platform_data = &spi_flash_data,
219 .mode = SPI_MODE_0 | SPI_TX_QUAD | SPI_RX_QUAD,
220 .max_speed_hz = 30000000,
221 .bus_num = 0,
222 .chip_select = 0,
223 },
224};
225
226/* SATA0 */
227static const struct resource sata0_resources[] __initconst = {
228 DEFINE_RES_MEM(0xee300000, 0x2000),
229 DEFINE_RES_IRQ(gic_spi(105)),
230};
231
232static const struct platform_device_info sata0_info __initconst = {
233 .name = "sata-r8a7791",
234 .id = 0,
235 .res = sata0_resources,
236 .num_res = ARRAY_SIZE(sata0_resources),
237 .dma_mask = DMA_BIT_MASK(32),
238};
239
240/* I2C */
241static const struct resource i2c_resources[] __initconst = {
242 /* I2C0 */
243 DEFINE_RES_MEM(0xE6508000, 0x40),
244 DEFINE_RES_IRQ(gic_spi(287)),
245 /* I2C1 */
246 DEFINE_RES_MEM(0xE6518000, 0x40),
247 DEFINE_RES_IRQ(gic_spi(288)),
248 /* I2C2 */
249 DEFINE_RES_MEM(0xE6530000, 0x40),
250 DEFINE_RES_IRQ(gic_spi(286)),
251 /* I2C3 */
252 DEFINE_RES_MEM(0xE6540000, 0x40),
253 DEFINE_RES_IRQ(gic_spi(290)),
254 /* I2C4 */
255 DEFINE_RES_MEM(0xE6520000, 0x40),
256 DEFINE_RES_IRQ(gic_spi(19)),
257 /* I2C5 */
258 DEFINE_RES_MEM(0xE6528000, 0x40),
259 DEFINE_RES_IRQ(gic_spi(20)),
260};
261
262static void __init koelsch_add_i2c(unsigned idx)
263{
264 unsigned res_idx = idx * 2;
265
266 BUG_ON(res_idx >= ARRAY_SIZE(i2c_resources));
267
268 platform_device_register_simple("i2c-rcar_gen2", idx,
269 i2c_resources + res_idx, 2);
270}
271
272#define SDHI_REGULATOR(idx, vdd_pin, vccq_pin) \
273static struct regulator_consumer_supply vcc_sdhi##idx##_consumer = \
274 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi." #idx); \
275 \
276static struct regulator_init_data vcc_sdhi##idx##_init_data = { \
277 .constraints = { \
278 .valid_ops_mask = REGULATOR_CHANGE_STATUS, \
279 }, \
280 .consumer_supplies = &vcc_sdhi##idx##_consumer, \
281 .num_consumer_supplies = 1, \
282}; \
283 \
284static const struct fixed_voltage_config vcc_sdhi##idx##_info __initconst = {\
285 .supply_name = "SDHI" #idx "Vcc", \
286 .microvolts = 3300000, \
287 .gpio = vdd_pin, \
288 .enable_high = 1, \
289 .init_data = &vcc_sdhi##idx##_init_data, \
290}; \
291 \
292static struct regulator_consumer_supply vccq_sdhi##idx##_consumer = \
293 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi." #idx); \
294 \
295static struct regulator_init_data vccq_sdhi##idx##_init_data = { \
296 .constraints = { \
297 .input_uV = 3300000, \
298 .min_uV = 1800000, \
299 .max_uV = 3300000, \
300 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | \
301 REGULATOR_CHANGE_STATUS, \
302 }, \
303 .consumer_supplies = &vccq_sdhi##idx##_consumer, \
304 .num_consumer_supplies = 1, \
305}; \
306 \
307static struct gpio vccq_sdhi##idx##_gpio = \
308 { vccq_pin, GPIOF_OUT_INIT_HIGH, "vccq-sdhi" #idx }; \
309 \
310static struct gpio_regulator_state vccq_sdhi##idx##_states[] = { \
311 { .value = 1800000, .gpios = 0 }, \
312 { .value = 3300000, .gpios = 1 }, \
313}; \
314 \
315static const struct gpio_regulator_config vccq_sdhi##idx##_info __initconst = {\
316 .supply_name = "vqmmc", \
317 .gpios = &vccq_sdhi##idx##_gpio, \
318 .nr_gpios = 1, \
319 .states = vccq_sdhi##idx##_states, \
320 .nr_states = ARRAY_SIZE(vccq_sdhi##idx##_states), \
321 .type = REGULATOR_VOLTAGE, \
322 .init_data = &vccq_sdhi##idx##_init_data, \
323};
324
325SDHI_REGULATOR(0, RCAR_GP_PIN(7, 17), RCAR_GP_PIN(2, 12));
326SDHI_REGULATOR(1, RCAR_GP_PIN(7, 18), RCAR_GP_PIN(2, 13));
327SDHI_REGULATOR(2, RCAR_GP_PIN(7, 19), RCAR_GP_PIN(2, 26));
328
329/* SDHI0 */
330static struct sh_mobile_sdhi_info sdhi0_info __initdata = {
331 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
332 MMC_CAP_POWER_OFF_CARD,
333 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
334};
335
336static struct resource sdhi0_resources[] __initdata = {
337 DEFINE_RES_MEM(0xee100000, 0x200),
338 DEFINE_RES_IRQ(gic_spi(165)),
339};
340
341/* SDHI1 */
342static struct sh_mobile_sdhi_info sdhi1_info __initdata = {
343 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
344 MMC_CAP_POWER_OFF_CARD,
345 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
346};
347
348static struct resource sdhi1_resources[] __initdata = {
349 DEFINE_RES_MEM(0xee140000, 0x100),
350 DEFINE_RES_IRQ(gic_spi(167)),
351};
352
353/* SDHI2 */
354static struct sh_mobile_sdhi_info sdhi2_info __initdata = {
355 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
356 MMC_CAP_POWER_OFF_CARD,
357 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT |
358 TMIO_MMC_WRPROTECT_DISABLE,
359};
360
361static struct resource sdhi2_resources[] __initdata = {
362 DEFINE_RES_MEM(0xee160000, 0x100),
363 DEFINE_RES_IRQ(gic_spi(168)),
364};
365
366static const struct pinctrl_map koelsch_pinctrl_map[] = {
367 /* DU */
368 PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791",
369 "du_rgb666", "du"),
370 PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791",
371 "du_sync", "du"),
372 PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791",
373 "du_clk_out_0", "du"),
374 /* Ether */
375 PIN_MAP_MUX_GROUP_DEFAULT("r8a7791-ether", "pfc-r8a7791",
376 "eth_link", "eth"),
377 PIN_MAP_MUX_GROUP_DEFAULT("r8a7791-ether", "pfc-r8a7791",
378 "eth_mdio", "eth"),
379 PIN_MAP_MUX_GROUP_DEFAULT("r8a7791-ether", "pfc-r8a7791",
380 "eth_rmii", "eth"),
381 PIN_MAP_MUX_GROUP_DEFAULT("r8a7791-ether", "pfc-r8a7791",
382 "intc_irq0", "intc"),
383 /* QSPI */
384 PIN_MAP_MUX_GROUP_DEFAULT("qspi.0", "pfc-r8a7791",
385 "qspi_ctrl", "qspi"),
386 PIN_MAP_MUX_GROUP_DEFAULT("qspi.0", "pfc-r8a7791",
387 "qspi_data4", "qspi"),
388 /* SCIF0 (CN19: DEBUG SERIAL0) */
389 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7791",
390 "scif0_data_d", "scif0"),
391 /* SCIF1 (CN20: DEBUG SERIAL1) */
392 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7791",
393 "scif1_data_d", "scif1"),
394 /* I2C1 */
395 PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar_gen2.1", "pfc-r8a7791",
396 "i2c1_e", "i2c1"),
397 /* I2C2 */
398 PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar_gen2.2", "pfc-r8a7791",
399 "i2c2", "i2c2"),
400 /* I2C4 */
401 PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar_gen2.4", "pfc-r8a7791",
402 "i2c4_c", "i2c4"),
403 /* SDHI0 */
404 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791",
405 "sdhi0_data4", "sdhi0"),
406 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791",
407 "sdhi0_ctrl", "sdhi0"),
408 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791",
409 "sdhi0_cd", "sdhi0"),
410 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791",
411 "sdhi0_wp", "sdhi0"),
412 /* SDHI2 */
413 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791",
414 "sdhi1_data4", "sdhi1"),
415 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791",
416 "sdhi1_ctrl", "sdhi1"),
417 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791",
418 "sdhi1_cd", "sdhi1"),
419 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791",
420 "sdhi1_wp", "sdhi1"),
421 /* SDHI2 */
422 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7791",
423 "sdhi2_data4", "sdhi2"),
424 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7791",
425 "sdhi2_ctrl", "sdhi2"),
426 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7791",
427 "sdhi2_cd", "sdhi2"),
428};
429
430static void __init koelsch_add_standard_devices(void)
431{
432 r8a7791_clock_init();
433 pinctrl_register_mappings(koelsch_pinctrl_map,
434 ARRAY_SIZE(koelsch_pinctrl_map));
435 r8a7791_pinmux_init();
436 r8a7791_add_standard_devices();
437 platform_device_register_full(&ether_info);
438 platform_device_register_data(NULL, "leds-gpio", -1,
439 &koelsch_leds_pdata,
440 sizeof(koelsch_leds_pdata));
441 platform_device_register_data(NULL, "gpio-keys", -1,
442 &koelsch_keys_pdata,
443 sizeof(koelsch_keys_pdata));
444 platform_device_register_resndata(NULL, "qspi", 0,
445 qspi_resources,
446 ARRAY_SIZE(qspi_resources),
447 &qspi_pdata, sizeof(qspi_pdata));
448 spi_register_board_info(spi_info, ARRAY_SIZE(spi_info));
449
450 koelsch_add_du_device();
451
452 platform_device_register_full(&sata0_info);
453
454 koelsch_add_i2c(1);
455 koelsch_add_i2c(2);
456 koelsch_add_i2c(4);
457 koelsch_add_i2c(5);
458
459 platform_device_register_data(NULL, "reg-fixed-voltage", 0,
460 &vcc_sdhi0_info, sizeof(struct fixed_voltage_config));
461 platform_device_register_data(NULL, "reg-fixed-voltage", 1,
462 &vcc_sdhi1_info, sizeof(struct fixed_voltage_config));
463 platform_device_register_data(NULL, "reg-fixed-voltage", 2,
464 &vcc_sdhi2_info, sizeof(struct fixed_voltage_config));
465 platform_device_register_data(NULL, "gpio-regulator", 0,
466 &vccq_sdhi0_info, sizeof(struct gpio_regulator_config));
467 platform_device_register_data(NULL, "gpio-regulator", 1,
468 &vccq_sdhi1_info, sizeof(struct gpio_regulator_config));
469 platform_device_register_data(NULL, "gpio-regulator", 2,
470 &vccq_sdhi2_info, sizeof(struct gpio_regulator_config));
471
472 platform_device_register_resndata(NULL, "sh_mobile_sdhi", 0,
473 sdhi0_resources, ARRAY_SIZE(sdhi0_resources),
474 &sdhi0_info, sizeof(struct sh_mobile_sdhi_info));
475
476 platform_device_register_resndata(NULL, "sh_mobile_sdhi", 1,
477 sdhi1_resources, ARRAY_SIZE(sdhi1_resources),
478 &sdhi1_info, sizeof(struct sh_mobile_sdhi_info));
479
480 platform_device_register_resndata(NULL, "sh_mobile_sdhi", 2,
481 sdhi2_resources, ARRAY_SIZE(sdhi2_resources),
482 &sdhi2_info, sizeof(struct sh_mobile_sdhi_info));
483
484}
485
486/*
487 * Ether LEDs on the Koelsch board are named LINK and ACTIVE which corresponds
488 * to non-default 01 setting of the Micrel KSZ8041 PHY control register 1 bits
489 * 14-15. We have to set them back to 01 from the default 00 value each time
490 * the PHY is reset. It's also important because the PHY's LED0 signal is
491 * connected to SoC's ETH_LINK signal and in the PHY's default mode it will
492 * bounce on and off after each packet, which we apparently want to avoid.
493 */
494static int koelsch_ksz8041_fixup(struct phy_device *phydev)
495{
496 u16 phyctrl1 = phy_read(phydev, 0x1e);
497
498 phyctrl1 &= ~0xc000;
499 phyctrl1 |= 0x4000;
500 return phy_write(phydev, 0x1e, phyctrl1);
501}
502
503static void __init koelsch_init(void)
504{
505 koelsch_add_standard_devices();
506
507 irq_set_irq_type(irq_pin(0), IRQ_TYPE_LEVEL_LOW);
508
509 if (IS_ENABLED(CONFIG_PHYLIB))
510 phy_register_fixup_for_id("r8a7791-ether-ff:01",
511 koelsch_ksz8041_fixup);
512}
513
514static const char * const koelsch_boards_compat_dt[] __initconst = {
515 "renesas,koelsch",
516 NULL,
517};
518
519DT_MACHINE_START(KOELSCH_DT, "koelsch")
520 .smp = smp_ops(r8a7791_smp_ops),
521 .init_early = shmobile_init_delay,
522 .init_time = rcar_gen2_timer_init,
523 .init_machine = koelsch_init,
524 .init_late = shmobile_init_late,
525 .reserve = rcar_gen2_reserve,
526 .dt_compat = koelsch_boards_compat_dt,
527MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c
index d9cdf9a97e23..f2ef759b6e96 100644
--- a/arch/arm/mach-shmobile/board-kzm9g-reference.c
+++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c
@@ -14,10 +14,6 @@
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details. 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 */ 17 */
22 18
23#include <linux/delay.h> 19#include <linux/delay.h>
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index 77e36fa0b142..7c9b63bdde9f 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -11,10 +11,6 @@
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */ 14 */
19 15
20#include <linux/delay.h> 16#include <linux/delay.h>
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
index bc4b48357dde..fa06bdba61df 100644
--- a/arch/arm/mach-shmobile/board-lager-reference.c
+++ b/arch/arm/mach-shmobile/board-lager-reference.c
@@ -12,100 +12,17 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 15 */
20 16
21#include <linux/dma-mapping.h>
22#include <linux/init.h> 17#include <linux/init.h>
23#include <linux/of_platform.h> 18#include <linux/of_platform.h>
24#include <linux/platform_data/rcar-du.h>
25 19
26#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
27 21
28#include "clock.h"
29#include "common.h" 22#include "common.h"
30#include "irqs.h"
31#include "r8a7790.h" 23#include "r8a7790.h"
32#include "rcar-gen2.h" 24#include "rcar-gen2.h"
33 25
34/* DU */
35static struct rcar_du_encoder_data lager_du_encoders[] = {
36 {
37 .type = RCAR_DU_ENCODER_VGA,
38 .output = RCAR_DU_OUTPUT_DPAD0,
39 }, {
40 .type = RCAR_DU_ENCODER_NONE,
41 .output = RCAR_DU_OUTPUT_LVDS1,
42 .connector.lvds.panel = {
43 .width_mm = 210,
44 .height_mm = 158,
45 .mode = {
46 .pixelclock = 65000000,
47 .hactive = 1024,
48 .hfront_porch = 20,
49 .hback_porch = 160,
50 .hsync_len = 136,
51 .vactive = 768,
52 .vfront_porch = 3,
53 .vback_porch = 29,
54 .vsync_len = 6,
55 },
56 },
57 },
58};
59
60static struct rcar_du_platform_data lager_du_pdata = {
61 .encoders = lager_du_encoders,
62 .num_encoders = ARRAY_SIZE(lager_du_encoders),
63};
64
65static const struct resource du_resources[] __initconst = {
66 DEFINE_RES_MEM(0xfeb00000, 0x70000),
67 DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"),
68 DEFINE_RES_MEM_NAMED(0xfeb94000, 0x1c, "lvds.1"),
69 DEFINE_RES_IRQ(gic_spi(256)),
70 DEFINE_RES_IRQ(gic_spi(268)),
71 DEFINE_RES_IRQ(gic_spi(269)),
72};
73
74static void __init lager_add_du_device(void)
75{
76 struct platform_device_info info = {
77 .name = "rcar-du-r8a7790",
78 .id = -1,
79 .res = du_resources,
80 .num_res = ARRAY_SIZE(du_resources),
81 .data = &lager_du_pdata,
82 .size_data = sizeof(lager_du_pdata),
83 .dma_mask = DMA_BIT_MASK(32),
84 };
85
86 platform_device_register_full(&info);
87}
88
89/*
90 * This is a really crude hack to provide clkdev support to platform
91 * devices until they get moved to DT.
92 */
93static const struct clk_name clk_names[] __initconst = {
94 { "du0", "du.0", "rcar-du-r8a7790" },
95 { "du1", "du.1", "rcar-du-r8a7790" },
96 { "du2", "du.2", "rcar-du-r8a7790" },
97 { "lvds0", "lvds.0", "rcar-du-r8a7790" },
98 { "lvds1", "lvds.1", "rcar-du-r8a7790" },
99};
100
101static void __init lager_add_standard_devices(void)
102{
103 shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
104 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
105
106 lager_add_du_device();
107}
108
109static const char *lager_boards_compat_dt[] __initdata = { 26static const char *lager_boards_compat_dt[] __initdata = {
110 "renesas,lager", 27 "renesas,lager",
111 "renesas,lager-reference", 28 "renesas,lager-reference",
@@ -116,7 +33,6 @@ DT_MACHINE_START(LAGER_DT, "lager")
116 .smp = smp_ops(r8a7790_smp_ops), 33 .smp = smp_ops(r8a7790_smp_ops),
117 .init_early = shmobile_init_delay, 34 .init_early = shmobile_init_delay,
118 .init_time = rcar_gen2_timer_init, 35 .init_time = rcar_gen2_timer_init,
119 .init_machine = lager_add_standard_devices,
120 .init_late = shmobile_init_late, 36 .init_late = shmobile_init_late,
121 .reserve = rcar_gen2_reserve, 37 .reserve = rcar_gen2_reserve,
122 .dt_compat = lager_boards_compat_dt, 38 .dt_compat = lager_boards_compat_dt,
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
index 571327b1c942..b47262afb240 100644
--- a/arch/arm/mach-shmobile/board-lager.c
+++ b/arch/arm/mach-shmobile/board-lager.c
@@ -13,10 +13,6 @@
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details. 15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */ 16 */
21 17
22#include <linux/gpio.h> 18#include <linux/gpio.h>
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index ca5d34b92aa7..ed1087031c5d 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -16,10 +16,6 @@
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details. 18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 */ 19 */
24#include <linux/delay.h> 20#include <linux/delay.h>
25#include <linux/kernel.h> 21#include <linux/kernel.h>
diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
index 38d9cdd26587..b15eb923263f 100644
--- a/arch/arm/mach-shmobile/board-marzen-reference.c
+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
@@ -13,10 +13,6 @@
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details. 15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */ 16 */
21 17
22#include <linux/clk/shmobile.h> 18#include <linux/clk/shmobile.h>
@@ -26,7 +22,6 @@
26#include <asm/irq.h> 22#include <asm/irq.h>
27#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
28 24
29#include "clock.h"
30#include "common.h" 25#include "common.h"
31#include "irqs.h" 26#include "irqs.h"
32#include "r8a7779.h" 27#include "r8a7779.h"
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index ce33d7825c49..994dc7d86ae2 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -13,10 +13,6 @@
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details. 15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */ 16 */
21 17
22#include <linux/kernel.h> 18#include <linux/kernel.h>
diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c
index c2330ea1802c..1cf44dc6d718 100644
--- a/arch/arm/mach-shmobile/clock-r8a73a4.c
+++ b/arch/arm/mach-shmobile/clock-r8a73a4.c
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 15 */
20#include <linux/init.h> 16#include <linux/init.h>
21#include <linux/io.h> 17#include <linux/io.h>
diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
index 19df9cb30495..9cac8247c72b 100644
--- a/arch/arm/mach-shmobile/clock-r8a7740.c
+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 15 */
20#include <linux/init.h> 16#include <linux/init.h>
21#include <linux/kernel.h> 17#include <linux/kernel.h>
diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c
index 67980a08a601..e8510c35558c 100644
--- a/arch/arm/mach-shmobile/clock-r8a7778.c
+++ b/arch/arm/mach-shmobile/clock-r8a7778.c
@@ -17,10 +17,6 @@
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details. 19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */ 20 */
25 21
26/* 22/*
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
index c51f9db3f66f..fa8ab2cc9187 100644
--- a/arch/arm/mach-shmobile/clock-r8a7779.c
+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 15 */
20#include <linux/bitops.h> 16#include <linux/bitops.h>
21#include <linux/init.h> 17#include <linux/init.h>
diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
index f62265200592..f9bbc5f0a9a1 100644
--- a/arch/arm/mach-shmobile/clock-r8a7790.c
+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 15 */
20#include <linux/init.h> 16#include <linux/init.h>
21#include <linux/io.h> 17#include <linux/io.h>
diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
deleted file mode 100644
index 453b23129cfa..000000000000
--- a/arch/arm/mach-shmobile/clock-r8a7791.c
+++ /dev/null
@@ -1,342 +0,0 @@
1/*
2 * r8a7791 clock framework support
3 *
4 * Copyright (C) 2013 Renesas Electronics Corporation
5 * Copyright (C) 2013 Renesas Solutions Corp.
6 * Copyright (C) 2013 Magnus Damm
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; version 2 of the License.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21#include <linux/init.h>
22#include <linux/io.h>
23#include <linux/kernel.h>
24#include <linux/sh_clk.h>
25#include <linux/clkdev.h>
26#include "clock.h"
27#include "common.h"
28#include "rcar-gen2.h"
29
30/*
31 * MD EXTAL PLL0 PLL1 PLL3
32 * 14 13 19 (MHz) *1 *1
33 *---------------------------------------------------
34 * 0 0 0 15 x 1 x172/2 x208/2 x106
35 * 0 0 1 15 x 1 x172/2 x208/2 x88
36 * 0 1 0 20 x 1 x130/2 x156/2 x80
37 * 0 1 1 20 x 1 x130/2 x156/2 x66
38 * 1 0 0 26 / 2 x200/2 x240/2 x122
39 * 1 0 1 26 / 2 x200/2 x240/2 x102
40 * 1 1 0 30 / 2 x172/2 x208/2 x106
41 * 1 1 1 30 / 2 x172/2 x208/2 x88
42 *
43 * *1 : Table 7.6 indicates VCO ouput (PLLx = VCO/2)
44 * see "p1 / 2" on R8A7791_CLOCK_ROOT() below
45 */
46
47#define CPG_BASE 0xe6150000
48#define CPG_LEN 0x1000
49
50#define SMSTPCR0 0xE6150130
51#define SMSTPCR1 0xE6150134
52#define SMSTPCR2 0xe6150138
53#define SMSTPCR3 0xE615013C
54#define SMSTPCR5 0xE6150144
55#define SMSTPCR7 0xe615014c
56#define SMSTPCR8 0xE6150990
57#define SMSTPCR9 0xE6150994
58#define SMSTPCR10 0xE6150998
59#define SMSTPCR11 0xE615099C
60
61#define MSTPSR1 IOMEM(0xe6150038)
62#define MSTPSR2 IOMEM(0xe6150040)
63#define MSTPSR3 IOMEM(0xe6150048)
64#define MSTPSR5 IOMEM(0xe615003c)
65#define MSTPSR7 IOMEM(0xe61501c4)
66#define MSTPSR8 IOMEM(0xe61509a0)
67#define MSTPSR9 IOMEM(0xe61509a4)
68#define MSTPSR11 IOMEM(0xe61509ac)
69
70#define SDCKCR 0xE6150074
71#define SD1CKCR 0xE6150078
72#define SD2CKCR 0xE615026c
73#define MMC0CKCR 0xE6150240
74#define MMC1CKCR 0xE6150244
75#define SSPCKCR 0xE6150248
76#define SSPRSCKCR 0xE615024C
77
78static struct clk_mapping cpg_mapping = {
79 .phys = CPG_BASE,
80 .len = CPG_LEN,
81};
82
83static struct clk extal_clk = {
84 /* .rate will be updated on r8a7791_clock_init() */
85 .mapping = &cpg_mapping,
86};
87
88static struct sh_clk_ops followparent_clk_ops = {
89 .recalc = followparent_recalc,
90};
91
92static struct clk main_clk = {
93 /* .parent will be set r8a73a4_clock_init */
94 .ops = &followparent_clk_ops,
95};
96
97/*
98 * clock ratio of these clock will be updated
99 * on r8a7791_clock_init()
100 */
101SH_FIXED_RATIO_CLK_SET(pll1_clk, main_clk, 1, 1);
102SH_FIXED_RATIO_CLK_SET(pll3_clk, main_clk, 1, 1);
103SH_FIXED_RATIO_CLK_SET(qspi_clk, pll1_clk, 1, 1);
104
105/* fixed ratio clock */
106SH_FIXED_RATIO_CLK_SET(extal_div2_clk, extal_clk, 1, 2);
107SH_FIXED_RATIO_CLK_SET(cp_clk, extal_clk, 1, 2);
108
109SH_FIXED_RATIO_CLK_SET(pll1_div2_clk, pll1_clk, 1, 2);
110SH_FIXED_RATIO_CLK_SET(hp_clk, pll1_clk, 1, 12);
111SH_FIXED_RATIO_CLK_SET(p_clk, pll1_clk, 1, 24);
112SH_FIXED_RATIO_CLK_SET(rclk_clk, pll1_clk, 1, (48 * 1024));
113SH_FIXED_RATIO_CLK_SET(mp_clk, pll1_div2_clk, 1, 15);
114SH_FIXED_RATIO_CLK_SET(zg_clk, pll1_clk, 1, 3);
115SH_FIXED_RATIO_CLK_SET(zx_clk, pll1_clk, 1, 3);
116SH_FIXED_RATIO_CLK_SET(zs_clk, pll1_clk, 1, 6);
117
118static struct clk *main_clks[] = {
119 &extal_clk,
120 &extal_div2_clk,
121 &main_clk,
122 &pll1_clk,
123 &pll1_div2_clk,
124 &pll3_clk,
125 &hp_clk,
126 &p_clk,
127 &qspi_clk,
128 &rclk_clk,
129 &mp_clk,
130 &cp_clk,
131 &zg_clk,
132 &zx_clk,
133 &zs_clk,
134};
135
136/* SDHI (DIV4) clock */
137static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 18, 24, 0, 36, 48, 10 };
138
139static struct clk_div_mult_table div4_div_mult_table = {
140 .divisors = divisors,
141 .nr_divisors = ARRAY_SIZE(divisors),
142};
143
144static struct clk_div4_table div4_table = {
145 .div_mult_table = &div4_div_mult_table,
146};
147
148enum {
149 DIV4_SDH, DIV4_SD0,
150 DIV4_NR
151};
152
153static struct clk div4_clks[DIV4_NR] = {
154 [DIV4_SDH] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 8, 0x0dff, CLK_ENABLE_ON_INIT),
155 [DIV4_SD0] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 4, 0x1df0, CLK_ENABLE_ON_INIT),
156};
157
158/* DIV6 clocks */
159enum {
160 DIV6_SD1, DIV6_SD2,
161 DIV6_NR
162};
163
164static struct clk div6_clks[DIV6_NR] = {
165 [DIV6_SD1] = SH_CLK_DIV6(&pll1_div2_clk, SD1CKCR, 0),
166 [DIV6_SD2] = SH_CLK_DIV6(&pll1_div2_clk, SD2CKCR, 0),
167};
168
169/* MSTP */
170enum {
171 MSTP1108, MSTP1107, MSTP1106,
172 MSTP931, MSTP930, MSTP929, MSTP928, MSTP927, MSTP925,
173 MSTP917,
174 MSTP815, MSTP814,
175 MSTP813,
176 MSTP811, MSTP810, MSTP809,
177 MSTP726, MSTP724, MSTP723, MSTP721, MSTP720,
178 MSTP719, MSTP718, MSTP715, MSTP714,
179 MSTP522,
180 MSTP314, MSTP312, MSTP311,
181 MSTP216, MSTP207, MSTP206,
182 MSTP204, MSTP203, MSTP202,
183 MSTP124,
184 MSTP_NR
185};
186
187static struct clk mstp_clks[MSTP_NR] = {
188 [MSTP1108] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 8, MSTPSR11, 0), /* SCIFA5 */
189 [MSTP1107] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 7, MSTPSR11, 0), /* SCIFA4 */
190 [MSTP1106] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 6, MSTPSR11, 0), /* SCIFA3 */
191 [MSTP931] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 31, MSTPSR9, 0), /* I2C0 */
192 [MSTP930] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 30, MSTPSR9, 0), /* I2C1 */
193 [MSTP929] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 29, MSTPSR9, 0), /* I2C2 */
194 [MSTP928] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */
195 [MSTP927] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 27, MSTPSR9, 0), /* I2C4 */
196 [MSTP925] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 25, MSTPSR9, 0), /* I2C5 */
197 [MSTP917] = SH_CLK_MSTP32_STS(&qspi_clk, SMSTPCR9, 17, MSTPSR9, 0), /* QSPI */
198 [MSTP815] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 15, MSTPSR8, 0), /* SATA0 */
199 [MSTP814] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 14, MSTPSR8, 0), /* SATA1 */
200 [MSTP813] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR8, 13, MSTPSR8, 0), /* Ether */
201 [MSTP811] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 11, MSTPSR8, 0), /* VIN0 */
202 [MSTP810] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 10, MSTPSR8, 0), /* VIN1 */
203 [MSTP809] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 9, MSTPSR8, 0), /* VIN2 */
204 [MSTP726] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 26, MSTPSR7, 0), /* LVDS0 */
205 [MSTP724] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 24, MSTPSR7, 0), /* DU0 */
206 [MSTP723] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 23, MSTPSR7, 0), /* DU1 */
207 [MSTP721] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 21, MSTPSR7, 0), /* SCIF0 */
208 [MSTP720] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 20, MSTPSR7, 0), /* SCIF1 */
209 [MSTP719] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 19, MSTPSR7, 0), /* SCIF2 */
210 [MSTP718] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 18, MSTPSR7, 0), /* SCIF3 */
211 [MSTP715] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 15, MSTPSR7, 0), /* SCIF4 */
212 [MSTP714] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 14, MSTPSR7, 0), /* SCIF5 */
213 [MSTP522] = SH_CLK_MSTP32_STS(&extal_clk, SMSTPCR5, 22, MSTPSR5, 0), /* Thermal */
214 [MSTP314] = SH_CLK_MSTP32_STS(&div4_clks[DIV4_SD0], SMSTPCR3, 14, MSTPSR3, 0), /* SDHI0 */
215 [MSTP312] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_SD1], SMSTPCR3, 12, MSTPSR3, 0), /* SDHI1 */
216 [MSTP311] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_SD2], SMSTPCR3, 11, MSTPSR3, 0), /* SDHI2 */
217 [MSTP216] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 16, MSTPSR2, 0), /* SCIFB2 */
218 [MSTP207] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 7, MSTPSR2, 0), /* SCIFB1 */
219 [MSTP206] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 6, MSTPSR2, 0), /* SCIFB0 */
220 [MSTP204] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 4, MSTPSR2, 0), /* SCIFA0 */
221 [MSTP203] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 3, MSTPSR2, 0), /* SCIFA1 */
222 [MSTP202] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 2, MSTPSR2, 0), /* SCIFA2 */
223 [MSTP124] = SH_CLK_MSTP32_STS(&rclk_clk, SMSTPCR1, 24, MSTPSR1, 0), /* CMT0 */
224};
225
226static struct clk_lookup lookups[] = {
227
228 /* main clocks */
229 CLKDEV_CON_ID("extal", &extal_clk),
230 CLKDEV_CON_ID("extal_div2", &extal_div2_clk),
231 CLKDEV_CON_ID("main", &main_clk),
232 CLKDEV_CON_ID("pll1", &pll1_clk),
233 CLKDEV_CON_ID("pll1_div2", &pll1_div2_clk),
234 CLKDEV_CON_ID("pll3", &pll3_clk),
235 CLKDEV_CON_ID("zg", &zg_clk),
236 CLKDEV_CON_ID("zs", &zs_clk),
237 CLKDEV_CON_ID("hp", &hp_clk),
238 CLKDEV_CON_ID("p", &p_clk),
239 CLKDEV_CON_ID("qspi", &qspi_clk),
240 CLKDEV_CON_ID("rclk", &rclk_clk),
241 CLKDEV_CON_ID("mp", &mp_clk),
242 CLKDEV_CON_ID("cp", &cp_clk),
243 CLKDEV_CON_ID("peripheral_clk", &hp_clk),
244
245 /* MSTP */
246 CLKDEV_ICK_ID("lvds.0", "rcar-du-r8a7791", &mstp_clks[MSTP726]),
247 CLKDEV_ICK_ID("du.0", "rcar-du-r8a7791", &mstp_clks[MSTP724]),
248 CLKDEV_ICK_ID("du.1", "rcar-du-r8a7791", &mstp_clks[MSTP723]),
249 CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */
250 CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */
251 CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), /* SCIFB0 */
252 CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP207]), /* SCIFB1 */
253 CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]), /* SCIFB2 */
254 CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP202]), /* SCIFA2 */
255 CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP721]), /* SCIF0 */
256 CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]), /* SCIF1 */
257 CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP719]), /* SCIF2 */
258 CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP718]), /* SCIF3 */
259 CLKDEV_DEV_ID("sh-sci.10", &mstp_clks[MSTP715]), /* SCIF4 */
260 CLKDEV_DEV_ID("sh-sci.11", &mstp_clks[MSTP714]), /* SCIF5 */
261 CLKDEV_DEV_ID("sh-sci.12", &mstp_clks[MSTP1106]), /* SCIFA3 */
262 CLKDEV_DEV_ID("sh-sci.13", &mstp_clks[MSTP1107]), /* SCIFA4 */
263 CLKDEV_DEV_ID("sh-sci.14", &mstp_clks[MSTP1108]), /* SCIFA5 */
264 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]),
265 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP312]),
266 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]),
267 CLKDEV_ICK_ID("fck", "sh-cmt-48-gen2.0", &mstp_clks[MSTP124]),
268 CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]),
269 CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
270 CLKDEV_DEV_ID("i2c-rcar_gen2.0", &mstp_clks[MSTP931]),
271 CLKDEV_DEV_ID("i2c-rcar_gen2.1", &mstp_clks[MSTP930]),
272 CLKDEV_DEV_ID("i2c-rcar_gen2.2", &mstp_clks[MSTP929]),
273 CLKDEV_DEV_ID("i2c-rcar_gen2.3", &mstp_clks[MSTP928]),
274 CLKDEV_DEV_ID("i2c-rcar_gen2.4", &mstp_clks[MSTP927]),
275 CLKDEV_DEV_ID("i2c-rcar_gen2.5", &mstp_clks[MSTP925]),
276 CLKDEV_DEV_ID("r8a7791-ether", &mstp_clks[MSTP813]), /* Ether */
277 CLKDEV_DEV_ID("r8a7791-vin.0", &mstp_clks[MSTP811]),
278 CLKDEV_DEV_ID("r8a7791-vin.1", &mstp_clks[MSTP810]),
279 CLKDEV_DEV_ID("r8a7791-vin.2", &mstp_clks[MSTP809]),
280 CLKDEV_DEV_ID("sata-r8a7791.0", &mstp_clks[MSTP815]),
281 CLKDEV_DEV_ID("sata-r8a7791.1", &mstp_clks[MSTP814]),
282};
283
284#define R8A7791_CLOCK_ROOT(e, m, p0, p1, p30, p31) \
285 extal_clk.rate = e * 1000 * 1000; \
286 main_clk.parent = m; \
287 SH_CLK_SET_RATIO(&pll1_clk_ratio, p1 / 2, 1); \
288 if (mode & MD(19)) \
289 SH_CLK_SET_RATIO(&pll3_clk_ratio, p31, 1); \
290 else \
291 SH_CLK_SET_RATIO(&pll3_clk_ratio, p30, 1)
292
293
294void __init r8a7791_clock_init(void)
295{
296 u32 mode = rcar_gen2_read_mode_pins();
297 int k, ret = 0;
298
299 switch (mode & (MD(14) | MD(13))) {
300 case 0:
301 R8A7791_CLOCK_ROOT(15, &extal_clk, 172, 208, 106, 88);
302 break;
303 case MD(13):
304 R8A7791_CLOCK_ROOT(20, &extal_clk, 130, 156, 80, 66);
305 break;
306 case MD(14):
307 R8A7791_CLOCK_ROOT(26, &extal_div2_clk, 200, 240, 122, 102);
308 break;
309 case MD(13) | MD(14):
310 R8A7791_CLOCK_ROOT(30, &extal_div2_clk, 172, 208, 106, 88);
311 break;
312 }
313
314 if ((mode & (MD(3) | MD(2) | MD(1))) == MD(2))
315 SH_CLK_SET_RATIO(&qspi_clk_ratio, 1, 16);
316 else
317 SH_CLK_SET_RATIO(&qspi_clk_ratio, 1, 20);
318
319 for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++)
320 ret = clk_register(main_clks[k]);
321
322 if (!ret)
323 ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table);
324
325 if (!ret)
326 ret = sh_clk_div6_register(div6_clks, DIV6_NR);
327
328 if (!ret)
329 ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
330
331 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
332
333 if (!ret)
334 shmobile_clk_init();
335 else
336 goto epanic;
337
338 return;
339
340epanic:
341 panic("failed to setup r8a7791 clocks\n");
342}
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
index 7071676145c4..3bc92f46060e 100644
--- a/arch/arm/mach-shmobile/clock-sh7372.c
+++ b/arch/arm/mach-shmobile/clock-sh7372.c
@@ -11,10 +11,6 @@
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 14 */
19#include <linux/init.h> 15#include <linux/init.h>
20#include <linux/kernel.h> 16#include <linux/kernel.h>
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c
index 02a6f45a0b9e..6b4c1f313cc9 100644
--- a/arch/arm/mach-shmobile/clock-sh73a0.c
+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
@@ -11,10 +11,6 @@
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 14 */
19#include <linux/init.h> 15#include <linux/init.h>
20#include <linux/kernel.h> 16#include <linux/kernel.h>
diff --git a/arch/arm/mach-shmobile/clock.c b/arch/arm/mach-shmobile/clock.c
index 806f94038cc4..34f056fc3756 100644
--- a/arch/arm/mach-shmobile/clock.c
+++ b/arch/arm/mach-shmobile/clock.c
@@ -14,41 +14,13 @@
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details. 15 * GNU General Public License for more details.
16 * 16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 *
21 */ 17 */
18
19#include <linux/export.h>
22#include <linux/kernel.h> 20#include <linux/kernel.h>
23#include <linux/init.h> 21#include <linux/init.h>
24
25#ifdef CONFIG_COMMON_CLK
26#include <linux/clk.h>
27#include <linux/clkdev.h>
28#include "clock.h"
29
30void __init shmobile_clk_workaround(const struct clk_name *clks,
31 int nr_clks, bool enable)
32{
33 const struct clk_name *clkn;
34 struct clk *clk;
35 unsigned int i;
36
37 for (i = 0; i < nr_clks; ++i) {
38 clkn = clks + i;
39 clk = clk_get(NULL, clkn->clk);
40 if (!IS_ERR(clk)) {
41 clk_register_clkdev(clk, clkn->con_id, clkn->dev_id);
42 if (enable)
43 clk_prepare_enable(clk);
44 clk_put(clk);
45 }
46 }
47}
48
49#else /* CONFIG_COMMON_CLK */
50#include <linux/sh_clk.h> 22#include <linux/sh_clk.h>
51#include <linux/export.h> 23
52#include "clock.h" 24#include "clock.h"
53#include "common.h" 25#include "common.h"
54 26
@@ -84,5 +56,3 @@ void __clk_put(struct clk *clk)
84{ 56{
85} 57}
86EXPORT_SYMBOL(__clk_put); 58EXPORT_SYMBOL(__clk_put);
87
88#endif /* CONFIG_COMMON_CLK */
diff --git a/arch/arm/mach-shmobile/clock.h b/arch/arm/mach-shmobile/clock.h
index 31b6417463e6..cf3552ea1019 100644
--- a/arch/arm/mach-shmobile/clock.h
+++ b/arch/arm/mach-shmobile/clock.h
@@ -1,19 +1,6 @@
1#ifndef CLOCK_H 1#ifndef CLOCK_H
2#define CLOCK_H 2#define CLOCK_H
3 3
4#ifdef CONFIG_COMMON_CLK
5/* temporary clock configuration helper for platform devices */
6
7struct clk_name {
8 const char *clk;
9 const char *con_id;
10 const char *dev_id;
11};
12
13void shmobile_clk_workaround(const struct clk_name *clks, int nr_clks,
14 bool enable);
15
16#else /* CONFIG_COMMON_CLK */
17/* legacy clock implementation */ 4/* legacy clock implementation */
18 5
19struct clk; 6struct clk;
@@ -52,5 +39,4 @@ do { \
52 (p)->div = d; \ 39 (p)->div = d; \
53} while (0) 40} while (0)
54 41
55#endif /* CONFIG_COMMON_CLK */
56#endif 42#endif
diff --git a/arch/arm/mach-shmobile/console.c b/arch/arm/mach-shmobile/console.c
index f2e79f2376e1..e329ccbd0a67 100644
--- a/arch/arm/mach-shmobile/console.c
+++ b/arch/arm/mach-shmobile/console.c
@@ -11,10 +11,6 @@
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */ 14 */
19#include <linux/kernel.h> 15#include <linux/kernel.h>
20#include <linux/init.h> 16#include <linux/init.h>
diff --git a/arch/arm/mach-shmobile/headsmp-scu.S b/arch/arm/mach-shmobile/headsmp-scu.S
index f45dde701d7b..69df8bfac167 100644
--- a/arch/arm/mach-shmobile/headsmp-scu.S
+++ b/arch/arm/mach-shmobile/headsmp-scu.S
@@ -12,11 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
19 * MA 02111-1307 USA
20 */ 15 */
21 16
22#include <linux/linkage.h> 17#include <linux/linkage.h>
diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c
index e2af00b1bd9d..1ccf49cb485f 100644
--- a/arch/arm/mach-shmobile/intc-sh7372.c
+++ b/arch/arm/mach-shmobile/intc-sh7372.c
@@ -11,10 +11,6 @@
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */ 14 */
19#include <linux/kernel.h> 15#include <linux/kernel.h>
20#include <linux/init.h> 16#include <linux/init.h>
diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c
index 44457a94897b..9e3618028acc 100644
--- a/arch/arm/mach-shmobile/intc-sh73a0.c
+++ b/arch/arm/mach-shmobile/intc-sh73a0.c
@@ -11,10 +11,6 @@
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */ 14 */
19#include <linux/kernel.h> 15#include <linux/kernel.h>
20#include <linux/init.h> 16#include <linux/init.h>
diff --git a/arch/arm/mach-shmobile/r8a7740.h b/arch/arm/mach-shmobile/r8a7740.h
index f369b4b0863d..ca7805ad7ea3 100644
--- a/arch/arm/mach-shmobile/r8a7740.h
+++ b/arch/arm/mach-shmobile/r8a7740.h
@@ -10,10 +10,6 @@
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */ 13 */
18 14
19#ifndef __ASM_R8A7740_H__ 15#ifndef __ASM_R8A7740_H__
diff --git a/arch/arm/mach-shmobile/r8a7778.h b/arch/arm/mach-shmobile/r8a7778.h
index f4076a50e970..f64fedb1f2cc 100644
--- a/arch/arm/mach-shmobile/r8a7778.h
+++ b/arch/arm/mach-shmobile/r8a7778.h
@@ -11,10 +11,6 @@
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */ 14 */
19#ifndef __ASM_R8A7778_H__ 15#ifndef __ASM_R8A7778_H__
20#define __ASM_R8A7778_H__ 16#define __ASM_R8A7778_H__
@@ -71,7 +67,6 @@ extern void r8a7778_add_standard_devices_dt(void);
71extern void r8a7778_add_dt_devices(void); 67extern void r8a7778_add_dt_devices(void);
72 68
73extern void r8a7778_init_late(void); 69extern void r8a7778_init_late(void);
74extern void r8a7778_init_delay(void);
75extern void r8a7778_init_irq_dt(void); 70extern void r8a7778_init_irq_dt(void);
76extern void r8a7778_clock_init(void); 71extern void r8a7778_clock_init(void);
77extern void r8a7778_init_irq_extpin(int irlm); 72extern void r8a7778_init_irq_extpin(int irlm);
diff --git a/arch/arm/mach-shmobile/r8a7791.h b/arch/arm/mach-shmobile/r8a7791.h
index c1bf7abefa5a..6cf11eb69d10 100644
--- a/arch/arm/mach-shmobile/r8a7791.h
+++ b/arch/arm/mach-shmobile/r8a7791.h
@@ -1,9 +1,6 @@
1#ifndef __ASM_R8A7791_H__ 1#ifndef __ASM_R8A7791_H__
2#define __ASM_R8A7791_H__ 2#define __ASM_R8A7791_H__
3 3
4void r8a7791_add_standard_devices(void);
5void r8a7791_clock_init(void);
6void r8a7791_pinmux_init(void);
7void r8a7791_pm_init(void); 4void r8a7791_pm_init(void);
8extern struct smp_operations r8a7791_smp_ops; 5extern struct smp_operations r8a7791_smp_ops;
9 6
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
index b06a9e8f59a5..aad97be9cbe1 100644
--- a/arch/arm/mach-shmobile/setup-emev2.c
+++ b/arch/arm/mach-shmobile/setup-emev2.c
@@ -11,10 +11,6 @@
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */ 14 */
19#include <linux/kernel.h> 15#include <linux/kernel.h>
20#include <linux/init.h> 16#include <linux/init.h>
diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c
index 4122104359f9..171174777b6f 100644
--- a/arch/arm/mach-shmobile/setup-r7s72100.c
+++ b/arch/arm/mach-shmobile/setup-r7s72100.c
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 15 */
20 16
21#include <linux/kernel.h> 17#include <linux/kernel.h>
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
index 53f40b70680d..b88b88a40a3c 100644
--- a/arch/arm/mach-shmobile/setup-r8a73a4.c
+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 15 */
20#include <linux/irq.h> 16#include <linux/irq.h>
21#include <linux/kernel.h> 17#include <linux/kernel.h>
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 8894e1b7ab0e..fe15dd26d15d 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 15 */
20#include <linux/delay.h> 16#include <linux/delay.h>
21#include <linux/dma-mapping.h> 17#include <linux/dma-mapping.h>
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index 85fe016d6a87..45bd3588fa15 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -13,10 +13,6 @@
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details. 15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */ 16 */
21 17
22#include <linux/kernel.h> 18#include <linux/kernel.h>
@@ -572,11 +568,6 @@ void __init r8a7778_init_irq_extpin(int irlm)
572 &irqpin_platform_data, sizeof(irqpin_platform_data)); 568 &irqpin_platform_data, sizeof(irqpin_platform_data));
573} 569}
574 570
575void __init r8a7778_init_delay(void)
576{
577 shmobile_init_delay();
578}
579
580#ifdef CONFIG_USE_OF 571#ifdef CONFIG_USE_OF
581#define INT2SMSKCR0 0x82288 /* 0xfe782288 */ 572#define INT2SMSKCR0 0x82288 /* 0xfe782288 */
582#define INT2SMSKCR1 0x8228c /* 0xfe78228c */ 573#define INT2SMSKCR1 0x8228c /* 0xfe78228c */
@@ -608,7 +599,7 @@ static const char *r8a7778_compat_dt[] __initdata = {
608}; 599};
609 600
610DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)") 601DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)")
611 .init_early = r8a7778_init_delay, 602 .init_early = shmobile_init_delay,
612 .init_irq = r8a7778_init_irq_dt, 603 .init_irq = r8a7778_init_irq_dt,
613 .init_late = shmobile_init_late, 604 .init_late = shmobile_init_late,
614 .dt_compat = r8a7778_compat_dt, 605 .dt_compat = r8a7778_compat_dt,
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 136078ab9407..645d7cca6238 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -13,10 +13,6 @@
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details. 15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */ 16 */
21#include <linux/kernel.h> 17#include <linux/kernel.h>
22#include <linux/init.h> 18#include <linux/init.h>
@@ -52,14 +48,14 @@
52#include "r8a7779.h" 48#include "r8a7779.h"
53 49
54static struct map_desc r8a7779_io_desc[] __initdata = { 50static struct map_desc r8a7779_io_desc[] __initdata = {
55 /* 2M entity map for 0xf0000000 (MPCORE) */ 51 /* 2M identity mapping for 0xf0000000 (MPCORE) */
56 { 52 {
57 .virtual = 0xf0000000, 53 .virtual = 0xf0000000,
58 .pfn = __phys_to_pfn(0xf0000000), 54 .pfn = __phys_to_pfn(0xf0000000),
59 .length = SZ_2M, 55 .length = SZ_2M,
60 .type = MT_DEVICE_NONSHARED 56 .type = MT_DEVICE_NONSHARED
61 }, 57 },
62 /* 16M entity map for 0xfexxxxxx (DMAC-S/HPBREG/INTC2/LRAM/DBSC) */ 58 /* 16M identity mapping for 0xfexxxxxx (DMAC-S/HPBREG/INTC2/LRAM/DBSC) */
63 { 59 {
64 .virtual = 0xfe000000, 60 .virtual = 0xfe000000,
65 .pfn = __phys_to_pfn(0xfe000000), 61 .pfn = __phys_to_pfn(0xfe000000),
@@ -683,7 +679,7 @@ void __init r8a7779_add_early_devices(void)
683 679
684 /* Early serial console setup is not included here due to 680 /* Early serial console setup is not included here due to
685 * memory map collisions. The SCIF serial ports in r8a7779 681 * memory map collisions. The SCIF serial ports in r8a7779
686 * are difficult to entity map 1:1 due to collision with the 682 * are difficult to identity map 1:1 due to collision with the
687 * virtual memory range used by the coherent DMA code on ARM. 683 * virtual memory range used by the coherent DMA code on ARM.
688 * 684 *
689 * Anyone wanting to debug early can remove UPF_IOREMAP from 685 * Anyone wanting to debug early can remove UPF_IOREMAP from
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
index 877fdeb985d0..ec7d97dca4de 100644
--- a/arch/arm/mach-shmobile/setup-r8a7790.c
+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 15 */
20 16
21#include <linux/irq.h> 17#include <linux/irq.h>
diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
index 35d78639244f..ef8eb3af586d 100644
--- a/arch/arm/mach-shmobile/setup-r8a7791.c
+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
@@ -13,198 +13,16 @@
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details. 15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */ 16 */
21 17
22#include <linux/irq.h> 18#include <linux/init.h>
23#include <linux/kernel.h>
24#include <linux/of_platform.h>
25#include <linux/platform_data/gpio-rcar.h>
26#include <linux/platform_data/irq-renesas-irqc.h>
27#include <linux/serial_sci.h>
28#include <linux/sh_timer.h>
29 19
30#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
31 21
32#include "common.h" 22#include "common.h"
33#include "irqs.h"
34#include "r8a7791.h" 23#include "r8a7791.h"
35#include "rcar-gen2.h" 24#include "rcar-gen2.h"
36 25
37static const struct resource pfc_resources[] __initconst = {
38 DEFINE_RES_MEM(0xe6060000, 0x250),
39};
40
41#define r8a7791_register_pfc() \
42 platform_device_register_simple("pfc-r8a7791", -1, pfc_resources, \
43 ARRAY_SIZE(pfc_resources))
44
45#define R8A7791_GPIO(idx, base, nr) \
46static const struct resource r8a7791_gpio##idx##_resources[] __initconst = { \
47 DEFINE_RES_MEM((base), 0x50), \
48 DEFINE_RES_IRQ(gic_spi(4 + (idx))), \
49}; \
50 \
51static const struct gpio_rcar_config \
52r8a7791_gpio##idx##_platform_data __initconst = { \
53 .gpio_base = 32 * (idx), \
54 .irq_base = 0, \
55 .number_of_pins = (nr), \
56 .pctl_name = "pfc-r8a7791", \
57 .has_both_edge_trigger = 1, \
58}; \
59
60R8A7791_GPIO(0, 0xe6050000, 32);
61R8A7791_GPIO(1, 0xe6051000, 32);
62R8A7791_GPIO(2, 0xe6052000, 32);
63R8A7791_GPIO(3, 0xe6053000, 32);
64R8A7791_GPIO(4, 0xe6054000, 32);
65R8A7791_GPIO(5, 0xe6055000, 32);
66R8A7791_GPIO(6, 0xe6055400, 32);
67R8A7791_GPIO(7, 0xe6055800, 26);
68
69#define r8a7791_register_gpio(idx) \
70 platform_device_register_resndata(NULL, "gpio_rcar", idx, \
71 r8a7791_gpio##idx##_resources, \
72 ARRAY_SIZE(r8a7791_gpio##idx##_resources), \
73 &r8a7791_gpio##idx##_platform_data, \
74 sizeof(r8a7791_gpio##idx##_platform_data))
75
76void __init r8a7791_pinmux_init(void)
77{
78 r8a7791_register_pfc();
79 r8a7791_register_gpio(0);
80 r8a7791_register_gpio(1);
81 r8a7791_register_gpio(2);
82 r8a7791_register_gpio(3);
83 r8a7791_register_gpio(4);
84 r8a7791_register_gpio(5);
85 r8a7791_register_gpio(6);
86 r8a7791_register_gpio(7);
87}
88
89#define __R8A7791_SCIF(scif_type, index, baseaddr, irq) \
90static struct plat_sci_port scif##index##_platform_data = { \
91 .type = scif_type, \
92 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \
93 .scscr = SCSCR_RE | SCSCR_TE, \
94}; \
95 \
96static struct resource scif##index##_resources[] = { \
97 DEFINE_RES_MEM(baseaddr, 0x100), \
98 DEFINE_RES_IRQ(irq), \
99}
100
101#define R8A7791_SCIF(index, baseaddr, irq) \
102 __R8A7791_SCIF(PORT_SCIF, index, baseaddr, irq)
103
104#define R8A7791_SCIFA(index, baseaddr, irq) \
105 __R8A7791_SCIF(PORT_SCIFA, index, baseaddr, irq)
106
107#define R8A7791_SCIFB(index, baseaddr, irq) \
108 __R8A7791_SCIF(PORT_SCIFB, index, baseaddr, irq)
109
110R8A7791_SCIFA(0, 0xe6c40000, gic_spi(144)); /* SCIFA0 */
111R8A7791_SCIFA(1, 0xe6c50000, gic_spi(145)); /* SCIFA1 */
112R8A7791_SCIFB(2, 0xe6c20000, gic_spi(148)); /* SCIFB0 */
113R8A7791_SCIFB(3, 0xe6c30000, gic_spi(149)); /* SCIFB1 */
114R8A7791_SCIFB(4, 0xe6ce0000, gic_spi(150)); /* SCIFB2 */
115R8A7791_SCIFA(5, 0xe6c60000, gic_spi(151)); /* SCIFA2 */
116R8A7791_SCIF(6, 0xe6e60000, gic_spi(152)); /* SCIF0 */
117R8A7791_SCIF(7, 0xe6e68000, gic_spi(153)); /* SCIF1 */
118R8A7791_SCIF(8, 0xe6e58000, gic_spi(22)); /* SCIF2 */
119R8A7791_SCIF(9, 0xe6ea8000, gic_spi(23)); /* SCIF3 */
120R8A7791_SCIF(10, 0xe6ee0000, gic_spi(24)); /* SCIF4 */
121R8A7791_SCIF(11, 0xe6ee8000, gic_spi(25)); /* SCIF5 */
122R8A7791_SCIFA(12, 0xe6c70000, gic_spi(29)); /* SCIFA3 */
123R8A7791_SCIFA(13, 0xe6c78000, gic_spi(30)); /* SCIFA4 */
124R8A7791_SCIFA(14, 0xe6c80000, gic_spi(31)); /* SCIFA5 */
125
126#define r8a7791_register_scif(index) \
127 platform_device_register_resndata(NULL, "sh-sci", index, \
128 scif##index##_resources, \
129 ARRAY_SIZE(scif##index##_resources), \
130 &scif##index##_platform_data, \
131 sizeof(scif##index##_platform_data))
132
133static struct sh_timer_config cmt0_platform_data = {
134 .channels_mask = 0x60,
135};
136
137static struct resource cmt0_resources[] = {
138 DEFINE_RES_MEM(0xffca0000, 0x1004),
139 DEFINE_RES_IRQ(gic_spi(142)),
140};
141
142#define r8a7791_register_cmt(idx) \
143 platform_device_register_resndata(NULL, "sh-cmt-48-gen2", \
144 idx, cmt##idx##_resources, \
145 ARRAY_SIZE(cmt##idx##_resources), \
146 &cmt##idx##_platform_data, \
147 sizeof(struct sh_timer_config))
148
149static struct renesas_irqc_config irqc0_data = {
150 .irq_base = irq_pin(0), /* IRQ0 -> IRQ9 */
151};
152
153static struct resource irqc0_resources[] = {
154 DEFINE_RES_MEM(0xe61c0000, 0x200), /* IRQC Event Detector Block_0 */
155 DEFINE_RES_IRQ(gic_spi(0)), /* IRQ0 */
156 DEFINE_RES_IRQ(gic_spi(1)), /* IRQ1 */
157 DEFINE_RES_IRQ(gic_spi(2)), /* IRQ2 */
158 DEFINE_RES_IRQ(gic_spi(3)), /* IRQ3 */
159 DEFINE_RES_IRQ(gic_spi(12)), /* IRQ4 */
160 DEFINE_RES_IRQ(gic_spi(13)), /* IRQ5 */
161 DEFINE_RES_IRQ(gic_spi(14)), /* IRQ6 */
162 DEFINE_RES_IRQ(gic_spi(15)), /* IRQ7 */
163 DEFINE_RES_IRQ(gic_spi(16)), /* IRQ8 */
164 DEFINE_RES_IRQ(gic_spi(17)), /* IRQ9 */
165};
166
167#define r8a7791_register_irqc(idx) \
168 platform_device_register_resndata(NULL, "renesas_irqc", \
169 idx, irqc##idx##_resources, \
170 ARRAY_SIZE(irqc##idx##_resources), \
171 &irqc##idx##_data, \
172 sizeof(struct renesas_irqc_config))
173
174static const struct resource thermal_resources[] __initconst = {
175 DEFINE_RES_MEM(0xe61f0000, 0x14),
176 DEFINE_RES_MEM(0xe61f0100, 0x38),
177 DEFINE_RES_IRQ(gic_spi(69)),
178};
179
180#define r8a7791_register_thermal() \
181 platform_device_register_simple("rcar_thermal", -1, \
182 thermal_resources, \
183 ARRAY_SIZE(thermal_resources))
184
185void __init r8a7791_add_standard_devices(void)
186{
187 r8a7791_register_scif(0);
188 r8a7791_register_scif(1);
189 r8a7791_register_scif(2);
190 r8a7791_register_scif(3);
191 r8a7791_register_scif(4);
192 r8a7791_register_scif(5);
193 r8a7791_register_scif(6);
194 r8a7791_register_scif(7);
195 r8a7791_register_scif(8);
196 r8a7791_register_scif(9);
197 r8a7791_register_scif(10);
198 r8a7791_register_scif(11);
199 r8a7791_register_scif(12);
200 r8a7791_register_scif(13);
201 r8a7791_register_scif(14);
202 r8a7791_register_cmt(0);
203 r8a7791_register_irqc(0);
204 r8a7791_register_thermal();
205}
206
207#ifdef CONFIG_USE_OF
208static const char *r8a7791_boards_compat_dt[] __initdata = { 26static const char *r8a7791_boards_compat_dt[] __initdata = {
209 "renesas,r8a7791", 27 "renesas,r8a7791",
210 NULL, 28 NULL,
@@ -218,4 +36,3 @@ DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)")
218 .reserve = rcar_gen2_reserve, 36 .reserve = rcar_gen2_reserve,
219 .dt_compat = r8a7791_boards_compat_dt, 37 .dt_compat = r8a7791_boards_compat_dt,
220MACHINE_END 38MACHINE_END
221#endif /* CONFIG_USE_OF */
diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
index 42d5b4308923..a669377aea57 100644
--- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 15 */
20 16
21#include <linux/clk/shmobile.h> 17#include <linux/clk/shmobile.h>
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index d646c8d12423..ca2b80b9bc90 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 15 */
20#include <linux/kernel.h> 16#include <linux/kernel.h>
21#include <linux/init.h> 17#include <linux/init.h>
@@ -47,7 +43,7 @@
47#include "sh7372.h" 43#include "sh7372.h"
48 44
49static struct map_desc sh7372_io_desc[] __initdata = { 45static struct map_desc sh7372_io_desc[] __initdata = {
50 /* create a 1:1 entity map for 0xe6xxxxxx 46 /* create a 1:1 identity mapping for 0xe6xxxxxx
51 * used by CPGA, INTC and PFC. 47 * used by CPGA, INTC and PFC.
52 */ 48 */
53 { 49 {
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index 328657d011d5..1ff4bd65e647 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -13,10 +13,6 @@
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details. 15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */ 16 */
21#include <linux/kernel.h> 17#include <linux/kernel.h>
22#include <linux/init.h> 18#include <linux/init.h>
@@ -46,7 +42,7 @@
46#include "sh73a0.h" 42#include "sh73a0.h"
47 43
48static struct map_desc sh73a0_io_desc[] __initdata = { 44static struct map_desc sh73a0_io_desc[] __initdata = {
49 /* create a 1:1 entity map for 0xe6xxxxxx 45 /* create a 1:1 identity mapping for 0xe6xxxxxx
50 * used by CPGA, INTC and PFC. 46 * used by CPGA, INTC and PFC.
51 */ 47 */
52 { 48 {
@@ -760,17 +756,12 @@ void __init sh73a0_add_standard_devices(void)
760 ARRAY_SIZE(sh73a0_late_devices)); 756 ARRAY_SIZE(sh73a0_late_devices));
761} 757}
762 758
763void __init sh73a0_init_delay(void)
764{
765 shmobile_init_delay();
766}
767
768/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ 759/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
769void __init __weak sh73a0_register_twd(void) { } 760void __init __weak sh73a0_register_twd(void) { }
770 761
771void __init sh73a0_earlytimer_init(void) 762void __init sh73a0_earlytimer_init(void)
772{ 763{
773 sh73a0_init_delay(); 764 shmobile_init_delay();
774 sh73a0_clock_init(); 765 sh73a0_clock_init();
775 shmobile_earlytimer_init(); 766 shmobile_earlytimer_init();
776 sh73a0_register_twd(); 767 sh73a0_register_twd();
@@ -803,7 +794,7 @@ static const char *sh73a0_boards_compat_dt[] __initdata = {
803DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)") 794DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)")
804 .smp = smp_ops(sh73a0_smp_ops), 795 .smp = smp_ops(sh73a0_smp_ops),
805 .map_io = sh73a0_map_io, 796 .map_io = sh73a0_map_io,
806 .init_early = sh73a0_init_delay, 797 .init_early = shmobile_init_delay,
807 .init_machine = sh73a0_add_standard_devices_dt, 798 .init_machine = sh73a0_add_standard_devices_dt,
808 .init_late = shmobile_init_late, 799 .init_late = shmobile_init_late,
809 .dt_compat = sh73a0_boards_compat_dt, 800 .dt_compat = sh73a0_boards_compat_dt,
diff --git a/arch/arm/mach-shmobile/sh73a0.h b/arch/arm/mach-shmobile/sh73a0.h
index 359b582dc270..f037c64b14fc 100644
--- a/arch/arm/mach-shmobile/sh73a0.h
+++ b/arch/arm/mach-shmobile/sh73a0.h
@@ -71,7 +71,6 @@ enum {
71#define SH73A0_PINT0_IRQ(irq) ((irq) + 700) 71#define SH73A0_PINT0_IRQ(irq) ((irq) + 700)
72#define SH73A0_PINT1_IRQ(irq) ((irq) + 732) 72#define SH73A0_PINT1_IRQ(irq) ((irq) + 732)
73 73
74extern void sh73a0_init_delay(void);
75extern void sh73a0_init_irq(void); 74extern void sh73a0_init_irq(void);
76extern void sh73a0_init_irq_dt(void); 75extern void sh73a0_init_irq_dt(void);
77extern void sh73a0_map_io(void); 76extern void sh73a0_map_io(void);
diff --git a/arch/arm/mach-shmobile/sleep-sh7372.S b/arch/arm/mach-shmobile/sleep-sh7372.S
index 9782862899e8..146b8de16432 100644
--- a/arch/arm/mach-shmobile/sleep-sh7372.S
+++ b/arch/arm/mach-shmobile/sleep-sh7372.S
@@ -22,11 +22,6 @@
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of 22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the 23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the
24 * GNU General Public License for more details. 24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
29 * MA 02111-1307 USA
30 */ 25 */
31 26
32#include <linux/linkage.h> 27#include <linux/linkage.h>
diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c
index 6ff1df1df9a7..baff3b5efed8 100644
--- a/arch/arm/mach-shmobile/smp-emev2.c
+++ b/arch/arm/mach-shmobile/smp-emev2.c
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 15 */
20#include <linux/kernel.h> 16#include <linux/kernel.h>
21#include <linux/init.h> 17#include <linux/init.h>
diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
index 3100e355c3fd..3f761f839043 100644
--- a/arch/arm/mach-shmobile/smp-r8a7779.c
+++ b/arch/arm/mach-shmobile/smp-r8a7779.c
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 15 */
20#include <linux/kernel.h> 16#include <linux/kernel.h>
21#include <linux/init.h> 17#include <linux/init.h>
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c
index 22d8f87b23e9..c16dbfe9836c 100644
--- a/arch/arm/mach-shmobile/smp-sh73a0.c
+++ b/arch/arm/mach-shmobile/smp-sh73a0.c
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 15 */
20#include <linux/kernel.h> 16#include <linux/kernel.h>
21#include <linux/init.h> 17#include <linux/init.h>
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c
index 87c6be1e79bd..1081b763e0f3 100644
--- a/arch/arm/mach-shmobile/timer.c
+++ b/arch/arm/mach-shmobile/timer.c
@@ -12,11 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 */ 15 */
21#include <linux/platform_device.h> 16#include <linux/platform_device.h>
22#include <linux/clocksource.h> 17#include <linux/clocksource.h>
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index b2cfba16c4e8..d6b16d9a7838 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -16,6 +16,7 @@ menuconfig ARCH_VEXPRESS
16 select POWER_RESET 16 select POWER_RESET
17 select POWER_RESET_VEXPRESS 17 select POWER_RESET_VEXPRESS
18 select POWER_SUPPLY 18 select POWER_SUPPLY
19 select REGULATOR if MMC_ARMMMCI
19 select REGULATOR_FIXED_VOLTAGE if REGULATOR 20 select REGULATOR_FIXED_VOLTAGE if REGULATOR
20 select VEXPRESS_CONFIG 21 select VEXPRESS_CONFIG
21 select VEXPRESS_SYSCFG 22 select VEXPRESS_SYSCFG
@@ -49,9 +50,6 @@ config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA
49 build a working kernel, you must also enable relevant core 50 build a working kernel, you must also enable relevant core
50 tile support or Flattened Device Tree based support options. 51 tile support or Flattened Device Tree based support options.
51 52
52config ARCH_VEXPRESS_CA9X4
53 bool "Versatile Express Cortex-A9x4 tile"
54
55config ARCH_VEXPRESS_DCSCB 53config ARCH_VEXPRESS_DCSCB
56 bool "Dual Cluster System Control Block (DCSCB) support" 54 bool "Dual Cluster System Control Block (DCSCB) support"
57 depends on MCPM 55 depends on MCPM
diff --git a/arch/arm/mach-vexpress/Makefile b/arch/arm/mach-vexpress/Makefile
index fc649bc09d0c..f5c1006dd6a1 100644
--- a/arch/arm/mach-vexpress/Makefile
+++ b/arch/arm/mach-vexpress/Makefile
@@ -1,11 +1,10 @@
1# 1#
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ 4ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := \
5 -I$(srctree)/arch/arm/plat-versatile/include 5 -I$(srctree)/arch/arm/plat-versatile/include
6 6
7obj-y := v2m.o 7obj-y := v2m.o
8obj-$(CONFIG_ARCH_VEXPRESS_CA9X4) += ct-ca9x4.o
9obj-$(CONFIG_ARCH_VEXPRESS_DCSCB) += dcscb.o dcscb_setup.o 8obj-$(CONFIG_ARCH_VEXPRESS_DCSCB) += dcscb.o dcscb_setup.o
10CFLAGS_dcscb.o += -march=armv7-a 9CFLAGS_dcscb.o += -march=armv7-a
11CFLAGS_REMOVE_dcscb.o = -pg 10CFLAGS_REMOVE_dcscb.o = -pg
diff --git a/arch/arm/mach-vexpress/core.h b/arch/arm/mach-vexpress/core.h
index 152fad91b3ae..2a11d3ac8c68 100644
--- a/arch/arm/mach-vexpress/core.h
+++ b/arch/arm/mach-vexpress/core.h
@@ -1,12 +1,5 @@
1/* 2MB large area for motherboard's peripherals static mapping */
2#define V2M_PERIPH 0xf8000000
3
4/* Tile's peripherals static mappings should start here */
5#define V2T_PERIPH 0xf8200000
6
7bool vexpress_smp_init_ops(void); 1bool vexpress_smp_init_ops(void);
8 2
9extern struct smp_operations vexpress_smp_ops;
10extern struct smp_operations vexpress_smp_dt_ops; 3extern struct smp_operations vexpress_smp_dt_ops;
11 4
12extern void vexpress_cpu_die(unsigned int cpu); 5extern void vexpress_cpu_die(unsigned int cpu);
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c
deleted file mode 100644
index 27bea049380a..000000000000
--- a/arch/arm/mach-vexpress/ct-ca9x4.c
+++ /dev/null
@@ -1,212 +0,0 @@
1/*
2 * Versatile Express Core Tile Cortex A9x4 Support
3 */
4#include <linux/init.h>
5#include <linux/gfp.h>
6#include <linux/device.h>
7#include <linux/dma-mapping.h>
8#include <linux/platform_device.h>
9#include <linux/amba/bus.h>
10#include <linux/amba/clcd.h>
11#include <linux/platform_data/video-clcd-versatile.h>
12#include <linux/clkdev.h>
13#include <linux/vexpress.h>
14#include <linux/irqchip/arm-gic.h>
15
16#include <asm/hardware/arm_timer.h>
17#include <asm/hardware/cache-l2x0.h>
18#include <asm/smp_scu.h>
19#include <asm/smp_twd.h>
20
21#include <mach/ct-ca9x4.h>
22
23#include <asm/hardware/timer-sp.h>
24
25#include <asm/mach/map.h>
26#include <asm/mach/time.h>
27
28#include "core.h"
29
30#include <mach/motherboard.h>
31#include <mach/irqs.h>
32
33static struct map_desc ct_ca9x4_io_desc[] __initdata = {
34 {
35 .virtual = V2T_PERIPH,
36 .pfn = __phys_to_pfn(CT_CA9X4_MPIC),
37 .length = SZ_8K,
38 .type = MT_DEVICE,
39 },
40};
41
42static void __init ct_ca9x4_map_io(void)
43{
44 iotable_init(ct_ca9x4_io_desc, ARRAY_SIZE(ct_ca9x4_io_desc));
45}
46
47static void __init ca9x4_l2_init(void)
48{
49#ifdef CONFIG_CACHE_L2X0
50 void __iomem *l2x0_base = ioremap(CT_CA9X4_L2CC, SZ_4K);
51
52 if (l2x0_base) {
53 /* set RAM latencies to 1 cycle for this core tile. */
54 writel(0, l2x0_base + L310_TAG_LATENCY_CTRL);
55 writel(0, l2x0_base + L310_DATA_LATENCY_CTRL);
56
57 l2x0_init(l2x0_base, 0x00400000, 0xfe0fffff);
58 } else {
59 pr_err("L2C: unable to map L2 cache controller\n");
60 }
61#endif
62}
63
64#ifdef CONFIG_HAVE_ARM_TWD
65static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, A9_MPCORE_TWD, IRQ_LOCALTIMER);
66
67static void __init ca9x4_twd_init(void)
68{
69 int err = twd_local_timer_register(&twd_local_timer);
70 if (err)
71 pr_err("twd_local_timer_register failed %d\n", err);
72}
73#else
74#define ca9x4_twd_init() do {} while(0)
75#endif
76
77static void __init ct_ca9x4_init_irq(void)
78{
79 gic_init(0, 29, ioremap(A9_MPCORE_GIC_DIST, SZ_4K),
80 ioremap(A9_MPCORE_GIC_CPU, SZ_256));
81 ca9x4_twd_init();
82 ca9x4_l2_init();
83}
84
85static int ct_ca9x4_clcd_setup(struct clcd_fb *fb)
86{
87 unsigned long framesize = 1024 * 768 * 2;
88
89 fb->panel = versatile_clcd_get_panel("XVGA");
90 if (!fb->panel)
91 return -EINVAL;
92
93 return versatile_clcd_setup_dma(fb, framesize);
94}
95
96static struct clcd_board ct_ca9x4_clcd_data = {
97 .name = "CT-CA9X4",
98 .caps = CLCD_CAP_5551 | CLCD_CAP_565,
99 .check = clcdfb_check,
100 .decode = clcdfb_decode,
101 .setup = ct_ca9x4_clcd_setup,
102 .mmap = versatile_clcd_mmap_dma,
103 .remove = versatile_clcd_remove_dma,
104};
105
106static AMBA_AHB_DEVICE(clcd, "ct:clcd", 0, CT_CA9X4_CLCDC, IRQ_CT_CA9X4_CLCDC, &ct_ca9x4_clcd_data);
107static AMBA_APB_DEVICE(dmc, "ct:dmc", 0, CT_CA9X4_DMC, IRQ_CT_CA9X4_DMC, NULL);
108static AMBA_APB_DEVICE(smc, "ct:smc", 0, CT_CA9X4_SMC, IRQ_CT_CA9X4_SMC, NULL);
109static AMBA_APB_DEVICE(gpio, "ct:gpio", 0, CT_CA9X4_GPIO, IRQ_CT_CA9X4_GPIO, NULL);
110
111static struct amba_device *ct_ca9x4_amba_devs[] __initdata = {
112 &clcd_device,
113 &dmc_device,
114 &smc_device,
115 &gpio_device,
116};
117
118static struct resource pmu_resources[] = {
119 [0] = {
120 .start = IRQ_CT_CA9X4_PMU_CPU0,
121 .end = IRQ_CT_CA9X4_PMU_CPU0,
122 .flags = IORESOURCE_IRQ,
123 },
124 [1] = {
125 .start = IRQ_CT_CA9X4_PMU_CPU1,
126 .end = IRQ_CT_CA9X4_PMU_CPU1,
127 .flags = IORESOURCE_IRQ,
128 },
129 [2] = {
130 .start = IRQ_CT_CA9X4_PMU_CPU2,
131 .end = IRQ_CT_CA9X4_PMU_CPU2,
132 .flags = IORESOURCE_IRQ,
133 },
134 [3] = {
135 .start = IRQ_CT_CA9X4_PMU_CPU3,
136 .end = IRQ_CT_CA9X4_PMU_CPU3,
137 .flags = IORESOURCE_IRQ,
138 },
139};
140
141static struct platform_device pmu_device = {
142 .name = "arm-pmu",
143 .id = -1,
144 .num_resources = ARRAY_SIZE(pmu_resources),
145 .resource = pmu_resources,
146};
147
148static struct clk_lookup osc1_lookup = {
149 .dev_id = "ct:clcd",
150};
151
152static struct platform_device osc1_device = {
153 .name = "vexpress-osc",
154 .id = 1,
155 .num_resources = 1,
156 .resource = (struct resource []) {
157 VEXPRESS_RES_FUNC(0xf, 1),
158 },
159 .dev.platform_data = &osc1_lookup,
160};
161
162static void __init ct_ca9x4_init(void)
163{
164 int i;
165
166 for (i = 0; i < ARRAY_SIZE(ct_ca9x4_amba_devs); i++)
167 amba_device_register(ct_ca9x4_amba_devs[i], &iomem_resource);
168
169 platform_device_register(&pmu_device);
170 vexpress_syscfg_device_register(&osc1_device);
171}
172
173#ifdef CONFIG_SMP
174static void *ct_ca9x4_scu_base __initdata;
175
176static void __init ct_ca9x4_init_cpu_map(void)
177{
178 int i, ncores;
179
180 ct_ca9x4_scu_base = ioremap(A9_MPCORE_SCU, SZ_128);
181 if (WARN_ON(!ct_ca9x4_scu_base))
182 return;
183
184 ncores = scu_get_core_count(ct_ca9x4_scu_base);
185
186 if (ncores > nr_cpu_ids) {
187 pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
188 ncores, nr_cpu_ids);
189 ncores = nr_cpu_ids;
190 }
191
192 for (i = 0; i < ncores; ++i)
193 set_cpu_possible(i, true);
194}
195
196static void __init ct_ca9x4_smp_enable(unsigned int max_cpus)
197{
198 scu_enable(ct_ca9x4_scu_base);
199}
200#endif
201
202struct ct_desc ct_ca9x4_desc __initdata = {
203 .id = V2M_CT_ID_CA9,
204 .name = "CA9x4",
205 .map_io = ct_ca9x4_map_io,
206 .init_irq = ct_ca9x4_init_irq,
207 .init_tile = ct_ca9x4_init,
208#ifdef CONFIG_SMP
209 .init_cpu_map = ct_ca9x4_init_cpu_map,
210 .smp_enable = ct_ca9x4_smp_enable,
211#endif
212};
diff --git a/arch/arm/mach-vexpress/include/mach/ct-ca9x4.h b/arch/arm/mach-vexpress/include/mach/ct-ca9x4.h
deleted file mode 100644
index 84acf8439d4b..000000000000
--- a/arch/arm/mach-vexpress/include/mach/ct-ca9x4.h
+++ /dev/null
@@ -1,47 +0,0 @@
1#ifndef __MACH_CT_CA9X4_H
2#define __MACH_CT_CA9X4_H
3
4/*
5 * Physical base addresses
6 */
7#define CT_CA9X4_CLCDC (0x10020000)
8#define CT_CA9X4_AXIRAM (0x10060000)
9#define CT_CA9X4_DMC (0x100e0000)
10#define CT_CA9X4_SMC (0x100e1000)
11#define CT_CA9X4_SCC (0x100e2000)
12#define CT_CA9X4_SP804_TIMER (0x100e4000)
13#define CT_CA9X4_SP805_WDT (0x100e5000)
14#define CT_CA9X4_TZPC (0x100e6000)
15#define CT_CA9X4_GPIO (0x100e8000)
16#define CT_CA9X4_FASTAXI (0x100e9000)
17#define CT_CA9X4_SLOWAXI (0x100ea000)
18#define CT_CA9X4_TZASC (0x100ec000)
19#define CT_CA9X4_CORESIGHT (0x10200000)
20#define CT_CA9X4_MPIC (0x1e000000)
21#define CT_CA9X4_SYSTIMER (0x1e004000)
22#define CT_CA9X4_SYSWDT (0x1e007000)
23#define CT_CA9X4_L2CC (0x1e00a000)
24
25#define A9_MPCORE_SCU (CT_CA9X4_MPIC + 0x0000)
26#define A9_MPCORE_GIC_CPU (CT_CA9X4_MPIC + 0x0100)
27#define A9_MPCORE_GIT (CT_CA9X4_MPIC + 0x0200)
28#define A9_MPCORE_TWD (CT_CA9X4_MPIC + 0x0600)
29#define A9_MPCORE_GIC_DIST (CT_CA9X4_MPIC + 0x1000)
30
31/*
32 * Interrupts. Those in {} are for AMBA devices
33 */
34#define IRQ_CT_CA9X4_CLCDC { 76 }
35#define IRQ_CT_CA9X4_DMC { 0 }
36#define IRQ_CT_CA9X4_SMC { 77, 78 }
37#define IRQ_CT_CA9X4_TIMER0 80
38#define IRQ_CT_CA9X4_TIMER1 81
39#define IRQ_CT_CA9X4_GPIO { 82 }
40#define IRQ_CT_CA9X4_PMU_CPU0 92
41#define IRQ_CT_CA9X4_PMU_CPU1 93
42#define IRQ_CT_CA9X4_PMU_CPU2 94
43#define IRQ_CT_CA9X4_PMU_CPU3 95
44
45extern struct ct_desc ct_ca9x4_desc;
46
47#endif
diff --git a/arch/arm/mach-vexpress/include/mach/hardware.h b/arch/arm/mach-vexpress/include/mach/hardware.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-vexpress/include/mach/hardware.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-vexpress/include/mach/irqs.h b/arch/arm/mach-vexpress/include/mach/irqs.h
deleted file mode 100644
index f8f7f782eb55..000000000000
--- a/arch/arm/mach-vexpress/include/mach/irqs.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#define IRQ_LOCALTIMER 29
2#define IRQ_LOCALWDOG 30
3
4#ifndef CONFIG_SPARSE_IRQ
5#define NR_IRQS 256
6#endif
diff --git a/arch/arm/mach-vexpress/include/mach/motherboard.h b/arch/arm/mach-vexpress/include/mach/motherboard.h
deleted file mode 100644
index 68abc8b72781..000000000000
--- a/arch/arm/mach-vexpress/include/mach/motherboard.h
+++ /dev/null
@@ -1,88 +0,0 @@
1#ifndef __MACH_MOTHERBOARD_H
2#define __MACH_MOTHERBOARD_H
3
4/*
5 * Physical addresses, offset from V2M_PA_CS0-3
6 */
7#define V2M_NOR0 (V2M_PA_CS0)
8#define V2M_NOR1 (V2M_PA_CS1)
9#define V2M_SRAM (V2M_PA_CS2)
10#define V2M_VIDEO_SRAM (V2M_PA_CS3 + 0x00000000)
11#define V2M_LAN9118 (V2M_PA_CS3 + 0x02000000)
12#define V2M_ISP1761 (V2M_PA_CS3 + 0x03000000)
13
14/*
15 * Physical addresses, offset from V2M_PA_CS7
16 */
17#define V2M_SYSREGS (V2M_PA_CS7 + 0x00000000)
18#define V2M_SYSCTL (V2M_PA_CS7 + 0x00001000)
19#define V2M_SERIAL_BUS_PCI (V2M_PA_CS7 + 0x00002000)
20
21#define V2M_AACI (V2M_PA_CS7 + 0x00004000)
22#define V2M_MMCI (V2M_PA_CS7 + 0x00005000)
23#define V2M_KMI0 (V2M_PA_CS7 + 0x00006000)
24#define V2M_KMI1 (V2M_PA_CS7 + 0x00007000)
25
26#define V2M_UART0 (V2M_PA_CS7 + 0x00009000)
27#define V2M_UART1 (V2M_PA_CS7 + 0x0000a000)
28#define V2M_UART2 (V2M_PA_CS7 + 0x0000b000)
29#define V2M_UART3 (V2M_PA_CS7 + 0x0000c000)
30
31#define V2M_WDT (V2M_PA_CS7 + 0x0000f000)
32
33#define V2M_TIMER01 (V2M_PA_CS7 + 0x00011000)
34#define V2M_TIMER23 (V2M_PA_CS7 + 0x00012000)
35
36#define V2M_SERIAL_BUS_DVI (V2M_PA_CS7 + 0x00016000)
37#define V2M_RTC (V2M_PA_CS7 + 0x00017000)
38
39#define V2M_CF (V2M_PA_CS7 + 0x0001a000)
40#define V2M_CLCD (V2M_PA_CS7 + 0x0001f000)
41
42
43/*
44 * Interrupts. Those in {} are for AMBA devices
45 */
46#define IRQ_V2M_WDT { (32 + 0) }
47#define IRQ_V2M_TIMER0 (32 + 2)
48#define IRQ_V2M_TIMER1 (32 + 2)
49#define IRQ_V2M_TIMER2 (32 + 3)
50#define IRQ_V2M_TIMER3 (32 + 3)
51#define IRQ_V2M_RTC { (32 + 4) }
52#define IRQ_V2M_UART0 { (32 + 5) }
53#define IRQ_V2M_UART1 { (32 + 6) }
54#define IRQ_V2M_UART2 { (32 + 7) }
55#define IRQ_V2M_UART3 { (32 + 8) }
56#define IRQ_V2M_MMCI { (32 + 9), (32 + 10) }
57#define IRQ_V2M_AACI { (32 + 11) }
58#define IRQ_V2M_KMI0 { (32 + 12) }
59#define IRQ_V2M_KMI1 { (32 + 13) }
60#define IRQ_V2M_CLCD { (32 + 14) }
61#define IRQ_V2M_LAN9118 (32 + 15)
62#define IRQ_V2M_ISP1761 (32 + 16)
63#define IRQ_V2M_PCIE (32 + 17)
64
65
66/*
67 * Core tile IDs
68 */
69#define V2M_CT_ID_CA9 0x0c000191
70#define V2M_CT_ID_UNSUPPORTED 0xff000191
71#define V2M_CT_ID_MASK 0xff000fff
72
73struct ct_desc {
74 u32 id;
75 const char *name;
76 void (*map_io)(void);
77 void (*init_early)(void);
78 void (*init_irq)(void);
79 void (*init_tile)(void);
80#ifdef CONFIG_SMP
81 void (*init_cpu_map)(void);
82 void (*smp_enable)(unsigned int);
83#endif
84};
85
86extern struct ct_desc *ct_desc;
87
88#endif
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c
index a1f3804fd5a5..83188cf1875d 100644
--- a/arch/arm/mach-vexpress/platsmp.c
+++ b/arch/arm/mach-vexpress/platsmp.c
@@ -19,48 +19,10 @@
19#include <asm/smp_scu.h> 19#include <asm/smp_scu.h>
20#include <asm/mach/map.h> 20#include <asm/mach/map.h>
21 21
22#include <mach/motherboard.h>
23
24#include <plat/platsmp.h> 22#include <plat/platsmp.h>
25 23
26#include "core.h" 24#include "core.h"
27 25
28/*
29 * Initialise the CPU possible map early - this describes the CPUs
30 * which may be present or become present in the system.
31 */
32static void __init vexpress_smp_init_cpus(void)
33{
34 ct_desc->init_cpu_map();
35}
36
37static void __init vexpress_smp_prepare_cpus(unsigned int max_cpus)
38{
39 /*
40 * Initialise the present map, which describes the set of CPUs
41 * actually populated at the present time.
42 */
43 ct_desc->smp_enable(max_cpus);
44
45 /*
46 * Write the address of secondary startup into the
47 * system-wide flags register. The boot monitor waits
48 * until it receives a soft interrupt, and then the
49 * secondary CPU branches to this address.
50 */
51 vexpress_flags_set(virt_to_phys(versatile_secondary_startup));
52}
53
54struct smp_operations __initdata vexpress_smp_ops = {
55 .smp_init_cpus = vexpress_smp_init_cpus,
56 .smp_prepare_cpus = vexpress_smp_prepare_cpus,
57 .smp_secondary_init = versatile_secondary_init,
58 .smp_boot_secondary = versatile_boot_secondary,
59#ifdef CONFIG_HOTPLUG_CPU
60 .cpu_die = vexpress_cpu_die,
61#endif
62};
63
64bool __init vexpress_smp_init_ops(void) 26bool __init vexpress_smp_init_ops(void)
65{ 27{
66#ifdef CONFIG_MCPM 28#ifdef CONFIG_MCPM
@@ -79,8 +41,6 @@ bool __init vexpress_smp_init_ops(void)
79 return false; 41 return false;
80} 42}
81 43
82#if defined(CONFIG_OF)
83
84static const struct of_device_id vexpress_smp_dt_scu_match[] __initconst = { 44static const struct of_device_id vexpress_smp_dt_scu_match[] __initconst = {
85 { .compatible = "arm,cortex-a5-scu", }, 45 { .compatible = "arm,cortex-a5-scu", },
86 { .compatible = "arm,cortex-a9-scu", }, 46 { .compatible = "arm,cortex-a9-scu", },
@@ -112,5 +72,3 @@ struct smp_operations __initdata vexpress_smp_dt_ops = {
112 .cpu_die = vexpress_cpu_die, 72 .cpu_die = vexpress_cpu_die,
113#endif 73#endif
114}; 74};
115
116#endif
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 6ff681a24ba7..a0400f4cca89 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -1,380 +1,7 @@
1/*
2 * Versatile Express V2M Motherboard Support
3 */
4#include <linux/device.h>
5#include <linux/amba/bus.h>
6#include <linux/amba/mmci.h>
7#include <linux/io.h>
8#include <linux/smp.h>
9#include <linux/init.h>
10#include <linux/of_address.h>
11#include <linux/of_fdt.h>
12#include <linux/of_irq.h>
13#include <linux/of_platform.h>
14#include <linux/platform_device.h>
15#include <linux/ata_platform.h>
16#include <linux/smsc911x.h>
17#include <linux/spinlock.h>
18#include <linux/usb/isp1760.h>
19#include <linux/mtd/physmap.h>
20#include <linux/regulator/fixed.h>
21#include <linux/regulator/machine.h>
22#include <linux/vexpress.h>
23#include <linux/clkdev.h>
24
25#include <asm/mach-types.h>
26#include <asm/sizes.h>
27#include <asm/mach/arch.h> 1#include <asm/mach/arch.h>
28#include <asm/mach/map.h>
29#include <asm/mach/time.h>
30#include <asm/hardware/arm_timer.h>
31#include <asm/hardware/cache-l2x0.h>
32#include <asm/hardware/timer-sp.h>
33
34#include <mach/ct-ca9x4.h>
35#include <mach/motherboard.h>
36
37#include <plat/sched_clock.h>
38#include <plat/platsmp.h>
39 2
40#include "core.h" 3#include "core.h"
41 4
42#define V2M_PA_CS0 0x40000000
43#define V2M_PA_CS1 0x44000000
44#define V2M_PA_CS2 0x48000000
45#define V2M_PA_CS3 0x4c000000
46#define V2M_PA_CS7 0x10000000
47
48static struct map_desc v2m_io_desc[] __initdata = {
49 {
50 .virtual = V2M_PERIPH,
51 .pfn = __phys_to_pfn(V2M_PA_CS7),
52 .length = SZ_128K,
53 .type = MT_DEVICE,
54 },
55};
56
57static void __init v2m_sp804_init(void __iomem *base, unsigned int irq)
58{
59 if (WARN_ON(!base || irq == NO_IRQ))
60 return;
61
62 sp804_clocksource_init(base + TIMER_2_BASE, "v2m-timer1");
63 sp804_clockevents_init(base + TIMER_1_BASE, irq, "v2m-timer0");
64}
65
66
67static struct resource v2m_pcie_i2c_resource = {
68 .start = V2M_SERIAL_BUS_PCI,
69 .end = V2M_SERIAL_BUS_PCI + SZ_4K - 1,
70 .flags = IORESOURCE_MEM,
71};
72
73static struct platform_device v2m_pcie_i2c_device = {
74 .name = "versatile-i2c",
75 .id = 0,
76 .num_resources = 1,
77 .resource = &v2m_pcie_i2c_resource,
78};
79
80static struct resource v2m_ddc_i2c_resource = {
81 .start = V2M_SERIAL_BUS_DVI,
82 .end = V2M_SERIAL_BUS_DVI + SZ_4K - 1,
83 .flags = IORESOURCE_MEM,
84};
85
86static struct platform_device v2m_ddc_i2c_device = {
87 .name = "versatile-i2c",
88 .id = 1,
89 .num_resources = 1,
90 .resource = &v2m_ddc_i2c_resource,
91};
92
93static struct resource v2m_eth_resources[] = {
94 {
95 .start = V2M_LAN9118,
96 .end = V2M_LAN9118 + SZ_64K - 1,
97 .flags = IORESOURCE_MEM,
98 }, {
99 .start = IRQ_V2M_LAN9118,
100 .end = IRQ_V2M_LAN9118,
101 .flags = IORESOURCE_IRQ,
102 },
103};
104
105static struct smsc911x_platform_config v2m_eth_config = {
106 .flags = SMSC911X_USE_32BIT,
107 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
108 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
109 .phy_interface = PHY_INTERFACE_MODE_MII,
110};
111
112static struct platform_device v2m_eth_device = {
113 .name = "smsc911x",
114 .id = -1,
115 .resource = v2m_eth_resources,
116 .num_resources = ARRAY_SIZE(v2m_eth_resources),
117 .dev.platform_data = &v2m_eth_config,
118};
119
120static struct regulator_consumer_supply v2m_eth_supplies[] = {
121 REGULATOR_SUPPLY("vddvario", "smsc911x"),
122 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
123};
124
125static struct resource v2m_usb_resources[] = {
126 {
127 .start = V2M_ISP1761,
128 .end = V2M_ISP1761 + SZ_128K - 1,
129 .flags = IORESOURCE_MEM,
130 }, {
131 .start = IRQ_V2M_ISP1761,
132 .end = IRQ_V2M_ISP1761,
133 .flags = IORESOURCE_IRQ,
134 },
135};
136
137static struct isp1760_platform_data v2m_usb_config = {
138 .is_isp1761 = true,
139 .bus_width_16 = false,
140 .port1_otg = true,
141 .analog_oc = false,
142 .dack_polarity_high = false,
143 .dreq_polarity_high = false,
144};
145
146static struct platform_device v2m_usb_device = {
147 .name = "isp1760",
148 .id = -1,
149 .resource = v2m_usb_resources,
150 .num_resources = ARRAY_SIZE(v2m_usb_resources),
151 .dev.platform_data = &v2m_usb_config,
152};
153
154static struct physmap_flash_data v2m_flash_data = {
155 .width = 4,
156};
157
158static struct resource v2m_flash_resources[] = {
159 {
160 .start = V2M_NOR0,
161 .end = V2M_NOR0 + SZ_64M - 1,
162 .flags = IORESOURCE_MEM,
163 }, {
164 .start = V2M_NOR1,
165 .end = V2M_NOR1 + SZ_64M - 1,
166 .flags = IORESOURCE_MEM,
167 },
168};
169
170static struct platform_device v2m_flash_device = {
171 .name = "physmap-flash",
172 .id = -1,
173 .resource = v2m_flash_resources,
174 .num_resources = ARRAY_SIZE(v2m_flash_resources),
175 .dev.platform_data = &v2m_flash_data,
176};
177
178static struct pata_platform_info v2m_pata_data = {
179 .ioport_shift = 2,
180};
181
182static struct resource v2m_pata_resources[] = {
183 {
184 .start = V2M_CF,
185 .end = V2M_CF + 0xff,
186 .flags = IORESOURCE_MEM,
187 }, {
188 .start = V2M_CF + 0x100,
189 .end = V2M_CF + SZ_4K - 1,
190 .flags = IORESOURCE_MEM,
191 },
192};
193
194static struct platform_device v2m_cf_device = {
195 .name = "pata_platform",
196 .id = -1,
197 .resource = v2m_pata_resources,
198 .num_resources = ARRAY_SIZE(v2m_pata_resources),
199 .dev.platform_data = &v2m_pata_data,
200};
201
202static struct mmci_platform_data v2m_mmci_data = {
203 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
204 .status = vexpress_get_mci_cardin,
205 .gpio_cd = -1,
206 .gpio_wp = -1,
207};
208
209static struct resource v2m_sysreg_resources[] = {
210 {
211 .start = V2M_SYSREGS,
212 .end = V2M_SYSREGS + 0xfff,
213 .flags = IORESOURCE_MEM,
214 },
215};
216
217static struct platform_device v2m_sysreg_device = {
218 .name = "vexpress-sysreg",
219 .id = -1,
220 .resource = v2m_sysreg_resources,
221 .num_resources = ARRAY_SIZE(v2m_sysreg_resources),
222};
223
224static struct platform_device v2m_muxfpga_device = {
225 .name = "vexpress-muxfpga",
226 .id = 0,
227 .num_resources = 1,
228 .resource = (struct resource []) {
229 VEXPRESS_RES_FUNC(0, 7),
230 }
231};
232
233static struct platform_device v2m_shutdown_device = {
234 .name = "vexpress-shutdown",
235 .id = 0,
236 .num_resources = 1,
237 .resource = (struct resource []) {
238 VEXPRESS_RES_FUNC(0, 8),
239 }
240};
241
242static struct platform_device v2m_reboot_device = {
243 .name = "vexpress-reboot",
244 .id = 0,
245 .num_resources = 1,
246 .resource = (struct resource []) {
247 VEXPRESS_RES_FUNC(0, 9),
248 }
249};
250
251static struct platform_device v2m_dvimode_device = {
252 .name = "vexpress-dvimode",
253 .id = 0,
254 .num_resources = 1,
255 .resource = (struct resource []) {
256 VEXPRESS_RES_FUNC(0, 11),
257 }
258};
259
260static AMBA_APB_DEVICE(aaci, "mb:aaci", 0, V2M_AACI, IRQ_V2M_AACI, NULL);
261static AMBA_APB_DEVICE(mmci, "mb:mmci", 0, V2M_MMCI, IRQ_V2M_MMCI, &v2m_mmci_data);
262static AMBA_APB_DEVICE(kmi0, "mb:kmi0", 0, V2M_KMI0, IRQ_V2M_KMI0, NULL);
263static AMBA_APB_DEVICE(kmi1, "mb:kmi1", 0, V2M_KMI1, IRQ_V2M_KMI1, NULL);
264static AMBA_APB_DEVICE(uart0, "mb:uart0", 0, V2M_UART0, IRQ_V2M_UART0, NULL);
265static AMBA_APB_DEVICE(uart1, "mb:uart1", 0, V2M_UART1, IRQ_V2M_UART1, NULL);
266static AMBA_APB_DEVICE(uart2, "mb:uart2", 0, V2M_UART2, IRQ_V2M_UART2, NULL);
267static AMBA_APB_DEVICE(uart3, "mb:uart3", 0, V2M_UART3, IRQ_V2M_UART3, NULL);
268static AMBA_APB_DEVICE(wdt, "mb:wdt", 0, V2M_WDT, IRQ_V2M_WDT, NULL);
269static AMBA_APB_DEVICE(rtc, "mb:rtc", 0, V2M_RTC, IRQ_V2M_RTC, NULL);
270
271static struct amba_device *v2m_amba_devs[] __initdata = {
272 &aaci_device,
273 &mmci_device,
274 &kmi0_device,
275 &kmi1_device,
276 &uart0_device,
277 &uart1_device,
278 &uart2_device,
279 &uart3_device,
280 &wdt_device,
281 &rtc_device,
282};
283
284static void __init v2m_timer_init(void)
285{
286 vexpress_clk_init(ioremap(V2M_SYSCTL, SZ_4K));
287 v2m_sp804_init(ioremap(V2M_TIMER01, SZ_4K), IRQ_V2M_TIMER0);
288}
289
290static void __init v2m_init_early(void)
291{
292 if (ct_desc->init_early)
293 ct_desc->init_early();
294 versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), 24000000);
295}
296
297struct ct_desc *ct_desc;
298
299static struct ct_desc *ct_descs[] __initdata = {
300#ifdef CONFIG_ARCH_VEXPRESS_CA9X4
301 &ct_ca9x4_desc,
302#endif
303};
304
305static void __init v2m_populate_ct_desc(void)
306{
307 int i;
308 u32 current_tile_id;
309
310 ct_desc = NULL;
311 current_tile_id = vexpress_get_procid(VEXPRESS_SITE_MASTER)
312 & V2M_CT_ID_MASK;
313
314 for (i = 0; i < ARRAY_SIZE(ct_descs) && !ct_desc; ++i)
315 if (ct_descs[i]->id == current_tile_id)
316 ct_desc = ct_descs[i];
317
318 if (!ct_desc)
319 panic("vexpress: this kernel does not support core tile ID 0x%08x when booting via ATAGs.\n"
320 "You may need a device tree blob or a different kernel to boot on this board.\n",
321 current_tile_id);
322}
323
324static void __init v2m_map_io(void)
325{
326 iotable_init(v2m_io_desc, ARRAY_SIZE(v2m_io_desc));
327 vexpress_sysreg_early_init(ioremap(V2M_SYSREGS, SZ_4K));
328 v2m_populate_ct_desc();
329 ct_desc->map_io();
330}
331
332static void __init v2m_init_irq(void)
333{
334 ct_desc->init_irq();
335}
336
337static void __init v2m_init(void)
338{
339 int i;
340
341 regulator_register_fixed(0, v2m_eth_supplies,
342 ARRAY_SIZE(v2m_eth_supplies));
343
344 platform_device_register(&v2m_sysreg_device);
345 platform_device_register(&v2m_pcie_i2c_device);
346 platform_device_register(&v2m_ddc_i2c_device);
347 platform_device_register(&v2m_flash_device);
348 platform_device_register(&v2m_cf_device);
349 platform_device_register(&v2m_eth_device);
350 platform_device_register(&v2m_usb_device);
351
352 for (i = 0; i < ARRAY_SIZE(v2m_amba_devs); i++)
353 amba_device_register(v2m_amba_devs[i], &iomem_resource);
354
355 vexpress_syscfg_device_register(&v2m_muxfpga_device);
356 vexpress_syscfg_device_register(&v2m_shutdown_device);
357 vexpress_syscfg_device_register(&v2m_reboot_device);
358 vexpress_syscfg_device_register(&v2m_dvimode_device);
359
360 ct_desc->init_tile();
361}
362
363MACHINE_START(VEXPRESS, "ARM-Versatile Express")
364 .atag_offset = 0x100,
365 .smp = smp_ops(vexpress_smp_ops),
366 .map_io = v2m_map_io,
367 .init_early = v2m_init_early,
368 .init_irq = v2m_init_irq,
369 .init_time = v2m_timer_init,
370 .init_machine = v2m_init,
371MACHINE_END
372
373static void __init v2m_dt_init(void)
374{
375 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
376}
377
378static const char * const v2m_dt_match[] __initconst = { 5static const char * const v2m_dt_match[] __initconst = {
379 "arm,vexpress", 6 "arm,vexpress",
380 NULL, 7 NULL,
@@ -386,5 +13,4 @@ DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express")
386 .l2c_aux_mask = 0xfe0fffff, 13 .l2c_aux_mask = 0xfe0fffff,
387 .smp = smp_ops(vexpress_smp_dt_ops), 14 .smp = smp_ops(vexpress_smp_dt_ops),
388 .smp_init = smp_init_ops(vexpress_smp_init_ops), 15 .smp_init = smp_init_ops(vexpress_smp_init_ops),
389 .init_machine = v2m_dt_init,
390MACHINE_END 16MACHINE_END
diff --git a/arch/arm/mach-zynq/Makefile b/arch/arm/mach-zynq/Makefile
index c85fb3f7d5cd..b03a97eb7501 100644
--- a/arch/arm/mach-zynq/Makefile
+++ b/arch/arm/mach-zynq/Makefile
@@ -4,6 +4,4 @@
4 4
5# Common support 5# Common support
6obj-y := common.o slcr.o pm.o 6obj-y := common.o slcr.o pm.o
7CFLAGS_REMOVE_hotplug.o =-march=armv6k
8CFLAGS_hotplug.o =-Wa,-march=armv7-a -mcpu=cortex-a9
9obj-$(CONFIG_SMP) += headsmp.o platsmp.o 7obj-$(CONFIG_SMP) += headsmp.o platsmp.o
diff --git a/arch/arm/mach-zynq/common.h b/arch/arm/mach-zynq/common.h
index 2bc71273c73c..382c60e9aa16 100644
--- a/arch/arm/mach-zynq/common.h
+++ b/arch/arm/mach-zynq/common.h
@@ -29,7 +29,6 @@ extern void zynq_slcr_cpu_state_write(int cpu, bool die);
29extern u32 zynq_slcr_get_device_id(void); 29extern u32 zynq_slcr_get_device_id(void);
30 30
31#ifdef CONFIG_SMP 31#ifdef CONFIG_SMP
32extern void secondary_startup(void);
33extern char zynq_secondary_trampoline; 32extern char zynq_secondary_trampoline;
34extern char zynq_secondary_trampoline_jump; 33extern char zynq_secondary_trampoline_jump;
35extern char zynq_secondary_trampoline_end; 34extern char zynq_secondary_trampoline_end;
diff --git a/arch/arm/mach-zynq/hotplug.c b/arch/arm/mach-zynq/hotplug.c
deleted file mode 100644
index b685c89f11e4..000000000000
--- a/arch/arm/mach-zynq/hotplug.c
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * Copyright (C) 2012-2013 Xilinx
3 *
4 * based on linux/arch/arm/mach-realview/hotplug.c
5 *
6 * Copyright (C) 2002 ARM Ltd.
7 * All Rights Reserved
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13#include <asm/proc-fns.h>
14
diff --git a/arch/arm/plat-samsung/include/plat/map-s5p.h b/arch/arm/plat-samsung/include/plat/map-s5p.h
index f5b9d3ff9cd4..f5cf2bd208e0 100644
--- a/arch/arm/plat-samsung/include/plat/map-s5p.h
+++ b/arch/arm/plat-samsung/include/plat/map-s5p.h
@@ -15,43 +15,22 @@
15 15
16#define S5P_VA_CHIPID S3C_ADDR(0x02000000) 16#define S5P_VA_CHIPID S3C_ADDR(0x02000000)
17#define S5P_VA_CMU S3C_ADDR(0x02100000) 17#define S5P_VA_CMU S3C_ADDR(0x02100000)
18#define S5P_VA_GPIO S3C_ADDR(0x02200000)
19#define S5P_VA_GPIO1 S5P_VA_GPIO
20#define S5P_VA_GPIO2 S3C_ADDR(0x02240000)
21#define S5P_VA_GPIO3 S3C_ADDR(0x02280000)
22 18
23#define S5P_VA_SYSRAM S3C_ADDR(0x02400000)
24#define S5P_VA_SYSRAM_NS S3C_ADDR(0x02410000)
25#define S5P_VA_DMC0 S3C_ADDR(0x02440000) 19#define S5P_VA_DMC0 S3C_ADDR(0x02440000)
26#define S5P_VA_DMC1 S3C_ADDR(0x02480000) 20#define S5P_VA_DMC1 S3C_ADDR(0x02480000)
27#define S5P_VA_SROMC S3C_ADDR(0x024C0000) 21#define S5P_VA_SROMC S3C_ADDR(0x024C0000)
28 22
29#define S5P_VA_SYSTIMER S3C_ADDR(0x02500000)
30#define S5P_VA_L2CC S3C_ADDR(0x02600000)
31
32#define S5P_VA_COMBINER_BASE S3C_ADDR(0x02700000)
33#define S5P_VA_COMBINER(x) (S5P_VA_COMBINER_BASE + ((x) >> 2) * 0x10)
34
35#define S5P_VA_COREPERI_BASE S3C_ADDR(0x02800000) 23#define S5P_VA_COREPERI_BASE S3C_ADDR(0x02800000)
36#define S5P_VA_COREPERI(x) (S5P_VA_COREPERI_BASE + (x)) 24#define S5P_VA_COREPERI(x) (S5P_VA_COREPERI_BASE + (x))
37#define S5P_VA_SCU S5P_VA_COREPERI(0x0) 25#define S5P_VA_SCU S5P_VA_COREPERI(0x0)
38#define S5P_VA_TWD S5P_VA_COREPERI(0x600) 26#define S5P_VA_TWD S5P_VA_COREPERI(0x600)
39 27
40#define S5P_VA_GIC_CPU S3C_ADDR(0x02810000)
41#define S5P_VA_GIC_DIST S3C_ADDR(0x02820000)
42
43#define VA_VIC(x) (S3C_VA_IRQ + ((x) * 0x10000)) 28#define VA_VIC(x) (S3C_VA_IRQ + ((x) * 0x10000))
44#define VA_VIC0 VA_VIC(0) 29#define VA_VIC0 VA_VIC(0)
45#define VA_VIC1 VA_VIC(1) 30#define VA_VIC1 VA_VIC(1)
46#define VA_VIC2 VA_VIC(2) 31#define VA_VIC2 VA_VIC(2)
47#define VA_VIC3 VA_VIC(3) 32#define VA_VIC3 VA_VIC(3)
48 33
49#define S5P_VA_UART(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET))
50#define S5P_VA_UART0 S5P_VA_UART(0)
51#define S5P_VA_UART1 S5P_VA_UART(1)
52#define S5P_VA_UART2 S5P_VA_UART(2)
53#define S5P_VA_UART3 S5P_VA_UART(3)
54
55#ifndef S3C_UART_OFFSET 34#ifndef S3C_UART_OFFSET
56#define S3C_UART_OFFSET (0x400) 35#define S3C_UART_OFFSET (0x400)
57#endif 36#endif
diff --git a/arch/arm/plat-versatile/Kconfig b/arch/arm/plat-versatile/Kconfig
index a301ca2c7d00..49b8ef91584a 100644
--- a/arch/arm/plat-versatile/Kconfig
+++ b/arch/arm/plat-versatile/Kconfig
@@ -4,6 +4,6 @@ config PLAT_VERSATILE_CLOCK
4 bool 4 bool
5 5
6config PLAT_VERSATILE_SCHED_CLOCK 6config PLAT_VERSATILE_SCHED_CLOCK
7 def_bool y 7 bool
8 8
9endif 9endif