aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-05 16:51:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-05 16:51:19 -0400
commitdfc25e4503aef6b82a1de4a0fbe19aafa8648fbe (patch)
tree0a4f3a07e2286918298e635186e42726f4658cbd
parent9f800363bb0ea459e15bef0928a72c88d374e489 (diff)
parent8f881c67368f82d0e20e1072b50b21132cc2440d (diff)
Merge tag 'cleanup-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC cleanups from Arnd Bergmann: "These cleanup patches are mainly move stuff around and should all be harmless. They are mainly split out so that other branches can be based on top to avoid conflicts. Notable changes are: - We finally remove all mach/timex.h, after CLOCK_TICK_RATE is no longer used (Uwe Kleine-König) - The Qualcomm MSM platform is split out into legacy mach-msm and new-style mach-qcom, to allow easier maintainance of the new hardware support without regressions (Kumar Gala) - A rework of some of the Kconfig logic to simplify multiplatform support (Rob Herring) - Samsung Exynos gets closer to supporting multiplatform (Sachin Kamat and others) - mach-bcm3528 gets merged into mach-bcm (Stephen Warren) - at91 gains some common clock framework support (Alexandre Belloni, Jean-Jacques Hiblot and other French people)" * tag 'cleanup-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (89 commits) ARM: hisi: select HAVE_ARM_SCU only for SMP ARM: efm32: allow uncompress debug output ARM: prima2: build reset code standalone ARM: at91: add PWM clock ARM: at91: move sam9261 SoC to common clk ARM: at91: prepare common clk transition for sam9261 SoC ARM: at91: updated the at91_dt_defconfig with support for the ADS7846 ARM: at91: dt: sam9261: Device Tree support for the at91sam9261ek ARM: at91: dt: defconfig: Added the sam9261 to the list of DT-enabled SOCs ARM: at91: dt: Add at91sam9261 dt SoC support ARM: at91: switch sam9rl to common clock framework ARM: at91/dt: define main clk frequency of at91sam9rlek ARM: at91/dt: define at91sam9rl clocks ARM: at91: prepare common clk transition for sam9rl SoCs ARM: at91: prepare sam9 dt boards transition to common clk ARM: at91: dt: sam9rl: Device Tree for the at91sam9rlek ARM: at91/defconfig: Add the sam9rl to the list of DT-enabled SOCs ARM: at91: Add at91sam9rl DT SoC support ARM: at91: prepare at91sam9rl DT transition ARM: at91/defconfig: refresh at91sam9260_9g20_defconfig ...
-rw-r--r--Documentation/devicetree/bindings/reset/sirf,rstc.txt42
-rw-r--r--Documentation/devicetree/bindings/serial/atmel-usart.txt3
-rw-r--r--MAINTAINERS10
-rw-r--r--arch/arm/Kconfig27
-rw-r--r--arch/arm/Kconfig.debug7
-rw-r--r--arch/arm/Makefile3
-rw-r--r--arch/arm/boot/dts/Makefile10
-rw-r--r--arch/arm/boot/dts/at91sam9261.dtsi735
-rw-r--r--arch/arm/boot/dts/at91sam9261ek.dts211
-rw-r--r--arch/arm/boot/dts/at91sam9rl.dtsi802
-rw-r--r--arch/arm/boot/dts/at91sam9rlek.dts157
-rw-r--r--arch/arm/boot/dts/atlas6.dtsi3
-rw-r--r--arch/arm/boot/dts/marco.dtsi3
-rw-r--r--arch/arm/boot/dts/prima2.dtsi3
-rw-r--r--arch/arm/boot/dts/qcom-msm8660-surf.dts59
-rw-r--r--arch/arm/boot/dts/qcom-msm8660.dtsi63
-rw-r--r--arch/arm/boot/dts/qcom-msm8960-cdp.dts66
-rw-r--r--arch/arm/boot/dts/qcom-msm8960.dtsi70
-rw-r--r--arch/arm/configs/at91_dt_defconfig3
-rw-r--r--arch/arm/configs/at91sam9260_9g20_defconfig9
-rw-r--r--arch/arm/configs/at91sam9rl_defconfig10
-rw-r--r--arch/arm/configs/bcm2835_defconfig1
-rw-r--r--arch/arm/configs/clps711x_defconfig3
-rw-r--r--arch/arm/include/asm/timex.h6
-rw-r--r--arch/arm/include/debug/samsung.S2
-rw-r--r--arch/arm/mach-at91/Kconfig2
-rw-r--r--arch/arm/mach-at91/at91rm9200.c1
-rw-r--r--arch/arm/mach-at91/at91rm9200_devices.c11
-rw-r--r--arch/arm/mach-at91/at91rm9200_time.c1
-rw-r--r--arch/arm/mach-at91/at91sam9260.c1
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c8
-rw-r--r--arch/arm/mach-at91/at91sam9261.c26
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c5
-rw-r--r--arch/arm/mach-at91/at91sam9263.c2
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c5
-rw-r--r--arch/arm/mach-at91/at91sam926x_time.c1
-rw-r--r--arch/arm/mach-at91/at91sam9g45.c2
-rw-r--r--arch/arm/mach-at91/at91sam9g45_devices.c6
-rw-r--r--arch/arm/mach-at91/at91sam9n12.c1
-rw-r--r--arch/arm/mach-at91/at91sam9rl.c25
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c6
-rw-r--r--arch/arm/mach-at91/at91sam9x5.c1
-rw-r--r--arch/arm/mach-at91/at91x40.c2
-rw-r--r--arch/arm/mach-at91/at91x40_time.c1
-rw-r--r--arch/arm/mach-at91/board-dt-sam9.c11
-rw-r--r--arch/arm/mach-at91/board-gsia18s.c1
-rw-r--r--arch/arm/mach-at91/board-pcontrol-g20.c1
-rw-r--r--arch/arm/mach-at91/board-stamp9g20.c1
-rw-r--r--arch/arm/mach-at91/include/mach/at91x40.h2
-rw-r--r--arch/arm/mach-at91/include/mach/timex.h37
-rw-r--r--arch/arm/mach-at91/pm.c1
-rw-r--r--arch/arm/mach-bcm/Kconfig21
-rw-r--r--arch/arm/mach-bcm/Makefile2
-rw-r--r--arch/arm/mach-bcm/board_bcm281xx.c83
-rw-r--r--arch/arm/mach-bcm/board_bcm2835.c (renamed from arch/arm/mach-bcm2835/bcm2835.c)0
-rw-r--r--arch/arm/mach-bcm/kona.c64
-rw-r--r--arch/arm/mach-bcm/kona.h7
-rw-r--r--arch/arm/mach-bcm2835/Kconfig15
-rw-r--r--arch/arm/mach-bcm2835/Makefile1
-rw-r--r--arch/arm/mach-berlin/Kconfig4
-rw-r--r--arch/arm/mach-clps711x/Kconfig14
-rw-r--r--arch/arm/mach-clps711x/include/mach/hardware.h17
-rw-r--r--arch/arm/mach-clps711x/include/mach/timex.h2
-rw-r--r--arch/arm/mach-cns3xxx/Kconfig3
-rw-r--r--arch/arm/mach-davinci/include/mach/timex.h22
-rw-r--r--arch/arm/mach-dove/include/mach/timex.h9
-rw-r--r--arch/arm/mach-ebsa110/include/mach/timex.h19
-rw-r--r--arch/arm/mach-efm32/include/mach/entry-macro.S4
-rw-r--r--arch/arm/mach-efm32/include/mach/timex.h3
-rw-r--r--arch/arm/mach-ep93xx/core.c2
-rw-r--r--arch/arm/mach-ep93xx/include/mach/timex.h5
-rw-r--r--arch/arm/mach-exynos/common.c2
-rw-r--r--arch/arm/mach-exynos/include/mach/timex.h29
-rw-r--r--arch/arm/mach-exynos/include/mach/uncompress.h48
-rw-r--r--arch/arm/mach-exynos/pm_domains.c2
-rw-r--r--arch/arm/mach-footbridge/include/mach/timex.h18
-rw-r--r--arch/arm/mach-gemini/include/mach/timex.h13
-rw-r--r--arch/arm/mach-highbank/Kconfig7
-rw-r--r--arch/arm/mach-hisi/Kconfig6
-rw-r--r--arch/arm/mach-imx/Kconfig14
-rw-r--r--arch/arm/mach-integrator/include/mach/timex.h26
-rw-r--r--arch/arm/mach-iop13xx/include/mach/timex.h1
-rw-r--r--arch/arm/mach-iop32x/include/mach/timex.h6
-rw-r--r--arch/arm/mach-iop33x/include/mach/timex.h6
-rw-r--r--arch/arm/mach-ixp4xx/common.c14
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/timex.h16
-rw-r--r--arch/arm/mach-keystone/Kconfig4
-rw-r--r--arch/arm/mach-kirkwood/include/mach/timex.h10
-rw-r--r--arch/arm/mach-ks8695/include/mach/timex.h21
-rw-r--r--arch/arm/mach-lpc32xx/include/mach/timex.h28
-rw-r--r--arch/arm/mach-mmp/include/mach/timex.h13
-rw-r--r--arch/arm/mach-mmp/time.c12
-rw-r--r--arch/arm/mach-moxart/Kconfig5
-rw-r--r--arch/arm/mach-msm/Kconfig54
-rw-r--r--arch/arm/mach-msm/Makefile8
-rw-r--r--arch/arm/mach-msm/common.h1
-rw-r--r--arch/arm/mach-msm/headsmp.S39
-rw-r--r--arch/arm/mach-msm/hotplug.c74
-rw-r--r--arch/arm/mach-msm/include/mach/timex.h21
-rw-r--r--arch/arm/mach-mv78xx0/include/mach/timex.h9
-rw-r--r--arch/arm/mach-mvebu/Kconfig6
-rw-r--r--arch/arm/mach-mvebu/Makefile3
-rw-r--r--arch/arm/mach-mvebu/armada-370-xp.c6
-rw-r--r--arch/arm/mach-mvebu/system-controller.c9
-rw-r--r--arch/arm/mach-mxs/Kconfig4
-rw-r--r--arch/arm/mach-netx/include/mach/timex.h20
-rw-r--r--arch/arm/mach-netx/time.c11
-rw-r--r--arch/arm/mach-nomadik/Kconfig5
-rw-r--r--arch/arm/mach-nspire/Kconfig5
-rw-r--r--arch/arm/mach-omap1/include/mach/timex.h5
-rw-r--r--arch/arm/mach-omap2/Kconfig17
-rw-r--r--arch/arm/mach-omap2/include/mach/timex.h5
-rw-r--r--arch/arm/mach-orion5x/include/mach/timex.h11
-rw-r--r--arch/arm/mach-picoxcell/Kconfig5
-rw-r--r--arch/arm/mach-prima2/Kconfig7
-rw-r--r--arch/arm/mach-prima2/common.c11
-rw-r--r--arch/arm/mach-prima2/common.h1
-rw-r--r--arch/arm/mach-prima2/l2x0.c9
-rw-r--r--arch/arm/mach-prima2/platsmp.c6
-rw-r--r--arch/arm/mach-prima2/rstc.c99
-rw-r--r--arch/arm/mach-prima2/rtciobrg.c2
-rw-r--r--arch/arm/mach-pxa/include/mach/timex.h34
-rw-r--r--arch/arm/mach-qcom/Kconfig33
-rw-r--r--arch/arm/mach-qcom/Makefile5
-rw-r--r--arch/arm/mach-qcom/board.c (renamed from arch/arm/mach-msm/board-dt.c)15
-rw-r--r--arch/arm/mach-qcom/platsmp.c (renamed from arch/arm/mach-msm/platsmp.c)66
-rw-r--r--arch/arm/mach-qcom/scm-boot.c (renamed from arch/arm/mach-msm/scm-boot.c)0
-rw-r--r--arch/arm/mach-qcom/scm-boot.h (renamed from arch/arm/mach-msm/scm-boot.h)0
-rw-r--r--arch/arm/mach-qcom/scm.c (renamed from arch/arm/mach-msm/scm.c)0
-rw-r--r--arch/arm/mach-qcom/scm.h (renamed from arch/arm/mach-msm/scm.h)0
-rw-r--r--arch/arm/mach-realview/include/mach/timex.h23
-rw-r--r--arch/arm/mach-rockchip/Kconfig3
-rw-r--r--arch/arm/mach-rpc/include/mach/timex.h17
-rw-r--r--arch/arm/mach-rpc/time.c15
-rw-r--r--arch/arm/mach-s3c24xx/Kconfig2
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2410.c3
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2412.c3
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2440.c2
-rw-r--r--arch/arm/mach-s3c24xx/common.c3
-rw-r--r--arch/arm/mach-s3c24xx/dma-s3c2410.c2
-rw-r--r--arch/arm/mach-s3c24xx/dma-s3c2412.c2
-rw-r--r--arch/arm/mach-s3c24xx/dma-s3c2440.c2
-rw-r--r--arch/arm/mach-s3c24xx/dma-s3c2443.c2
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/rtc-core.h (renamed from arch/arm/plat-samsung/include/plat/rtc-core.h)13
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/tick.h15
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/timex.h24
-rw-r--r--arch/arm/mach-s3c24xx/mach-amlm5900.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-anubis.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-at2440evb.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-bast.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-gta02.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-h1940.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-jive.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-mini2440.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-n30.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-nexcoder.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-osiris.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-otom.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-qt2410.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-rx1950.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-rx3715.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-s3c2416-dt.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2410.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2413.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2416.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2440.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2443.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-tct_hammer.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-vr1000.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-vstms.c2
-rw-r--r--arch/arm/mach-s3c24xx/pm.c2
-rw-r--r--arch/arm/mach-s3c24xx/s3c2410.c2
-rw-r--r--arch/arm/mach-s3c24xx/s3c2412.c2
-rw-r--r--arch/arm/mach-s3c24xx/s3c2416.c2
-rw-r--r--arch/arm/mach-s3c24xx/s3c2443.c2
-rw-r--r--arch/arm/mach-s3c24xx/s3c244x.c2
-rw-r--r--arch/arm/mach-s3c24xx/sleep-s3c2410.S2
-rw-r--r--arch/arm/mach-s3c24xx/sleep.S2
-rw-r--r--arch/arm/mach-s3c64xx/common.c2
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/tick.h31
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/timex.h24
-rw-r--r--arch/arm/mach-s3c64xx/irq-pm.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-anw6410.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-hmt.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-mini6410.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-ncp.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-real6410.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6400.c3
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6410.c2
-rw-r--r--arch/arm/mach-s3c64xx/s3c6400.c2
-rw-r--r--arch/arm/mach-s3c64xx/s3c6410.c2
-rw-r--r--arch/arm/mach-s5p64x0/common.c2
-rw-r--r--arch/arm/mach-s5p64x0/include/mach/debug-macro.S3
-rw-r--r--arch/arm/mach-s5p64x0/include/mach/timex.h27
-rw-r--r--arch/arm/mach-s5p64x0/irq-pm.c2
-rw-r--r--arch/arm/mach-s5p64x0/mach-smdk6440.c2
-rw-r--r--arch/arm/mach-s5p64x0/mach-smdk6450.c2
-rw-r--r--arch/arm/mach-s5pc100/common.c2
-rw-r--r--arch/arm/mach-s5pc100/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s5pc100/include/mach/tick.h31
-rw-r--r--arch/arm/mach-s5pc100/include/mach/timex.h24
-rw-r--r--arch/arm/mach-s5pc100/mach-smdkc100.c2
-rw-r--r--arch/arm/mach-s5pv210/common.c2
-rw-r--r--arch/arm/mach-s5pv210/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s5pv210/include/mach/timex.h29
-rw-r--r--arch/arm/mach-s5pv210/mach-aquila.c2
-rw-r--r--arch/arm/mach-s5pv210/mach-goni.c2
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkc110.c2
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkv210.c2
-rw-r--r--arch/arm/mach-s5pv210/mach-torbreck.c2
-rw-r--r--arch/arm/mach-sa1100/include/mach/timex.h12
-rw-r--r--arch/arm/mach-sa1100/time.c8
-rw-r--r--arch/arm/mach-shmobile/Kconfig5
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7779.c7
-rw-r--r--arch/arm/mach-shmobile/include/mach/common.h1
-rw-r--r--arch/arm/mach-shmobile/include/mach/timex.h6
-rw-r--r--arch/arm/mach-shmobile/setup-emev2.c2
-rw-r--r--arch/arm/mach-socfpga/Kconfig7
-rw-r--r--arch/arm/mach-spear/Kconfig10
-rw-r--r--arch/arm/mach-spear/include/mach/timex.h19
-rw-r--r--arch/arm/mach-sti/Kconfig4
-rw-r--r--arch/arm/mach-sunxi/Kconfig5
-rw-r--r--arch/arm/mach-tegra/Kconfig8
-rw-r--r--arch/arm/mach-u300/Kconfig6
-rw-r--r--arch/arm/mach-ux500/Kconfig6
-rw-r--r--arch/arm/mach-versatile/include/mach/timex.h23
-rw-r--r--arch/arm/mach-vexpress/Kconfig5
-rw-r--r--arch/arm/mach-virt/Kconfig10
-rw-r--r--arch/arm/mach-virt/Makefile5
-rw-r--r--arch/arm/mach-virt/virt.c41
-rw-r--r--arch/arm/mach-vt8500/Kconfig4
-rw-r--r--arch/arm/mach-w90x900/include/mach/timex.h25
-rw-r--r--arch/arm/mach-zynq/Kconfig7
-rw-r--r--arch/arm/plat-omap/include/plat/timex.h33
-rw-r--r--arch/arm/plat-samsung/clock.c2
-rw-r--r--arch/arm/plat-samsung/cpu.c7
-rw-r--r--arch/arm/plat-samsung/devs.c12
-rw-r--r--arch/arm/plat-samsung/include/plat/cpu.h1
-rw-r--r--arch/arm/plat-samsung/include/plat/regs-serial.h1
-rw-r--r--arch/arm/plat-samsung/include/plat/uncompress.h2
-rw-r--r--arch/arm/plat-samsung/init.c3
-rw-r--r--arch/arm/plat-samsung/pm-gpio.c5
-rw-r--r--arch/arm/plat-samsung/pm.c3
-rw-r--r--arch/arm/plat-samsung/s5p-irq-pm.c13
-rw-r--r--drivers/clocksource/Kconfig3
-rw-r--r--drivers/clocksource/Makefile1
-rw-r--r--drivers/clocksource/exynos_mct.c2
-rw-r--r--drivers/clocksource/qcom-timer.c (renamed from arch/arm/mach-msm/timer.c)29
-rw-r--r--drivers/clocksource/timer-marco.c13
-rw-r--r--drivers/clocksource/timer-prima2.c16
-rw-r--r--drivers/input/misc/ixp4xx-beeper.c2
-rw-r--r--drivers/irqchip/exynos-combiner.c3
-rw-r--r--drivers/irqchip/irq-mmp.c2
-rw-r--r--drivers/rtc/rtc-at91sam9.c2
-rw-r--r--drivers/rtc/rtc-pxa.c1
-rw-r--r--drivers/tty/serial/atmel_serial.c49
-rw-r--r--include/linux/platform_data/atmel.h1
261 files changed, 2696 insertions, 1832 deletions
diff --git a/Documentation/devicetree/bindings/reset/sirf,rstc.txt b/Documentation/devicetree/bindings/reset/sirf,rstc.txt
new file mode 100644
index 000000000000..0505de742d30
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/sirf,rstc.txt
@@ -0,0 +1,42 @@
1CSR SiRFSoC Reset Controller
2======================================
3
4Please also refer to reset.txt in this directory for common reset
5controller binding usage.
6
7Required properties:
8- compatible: Should be "sirf,prima2-rstc" or "sirf,marco-rstc"
9- reg: should be register base and length as documented in the
10 datasheet
11- #reset-cells: 1, see below
12
13example:
14
15rstc: reset-controller@88010000 {
16 compatible = "sirf,prima2-rstc";
17 reg = <0x88010000 0x1000>;
18 #reset-cells = <1>;
19};
20
21Specifying reset lines connected to IP modules
22==============================================
23
24The reset controller(rstc) manages various reset sources. This module provides
25reset signals for most blocks in system. Those device nodes should specify the
26reset line on the rstc in their resets property, containing a phandle to the
27rstc device node and a RESET_INDEX specifying which module to reset, as described
28in reset.txt.
29
30For SiRFSoC, RESET_INDEX is just reset_bit defined in SW_RST0 and SW_RST1 registers.
31For modules whose rest_bit is in SW_RST0, its RESET_INDEX is 0~31. For modules whose
32rest_bit is in SW_RST1, its RESET_INDEX is 32~63.
33
34example:
35
36vpp@90020000 {
37 compatible = "sirf,prima2-vpp";
38 reg = <0x90020000 0x10000>;
39 interrupts = <31>;
40 clocks = <&clks 35>;
41 resets = <&rstc 6>;
42};
diff --git a/Documentation/devicetree/bindings/serial/atmel-usart.txt b/Documentation/devicetree/bindings/serial/atmel-usart.txt
index 9c5d19ac935c..17c1042b2df8 100644
--- a/Documentation/devicetree/bindings/serial/atmel-usart.txt
+++ b/Documentation/devicetree/bindings/serial/atmel-usart.txt
@@ -13,6 +13,8 @@ Required properties:
13Optional properties: 13Optional properties:
14- atmel,use-dma-rx: use of PDC or DMA for receiving data 14- atmel,use-dma-rx: use of PDC or DMA for receiving data
15- atmel,use-dma-tx: use of PDC or DMA for transmitting data 15- atmel,use-dma-tx: use of PDC or DMA for transmitting data
16- rts-gpios: specify a GPIO for RTS line. It will use specified PIO instead of the peripheral
17 function pin for the USART RTS feature. If unsure, don't specify this property.
16- add dma bindings for dma transfer: 18- add dma bindings for dma transfer:
17 - dmas: DMA specifier, consisting of a phandle to DMA controller node, 19 - dmas: DMA specifier, consisting of a phandle to DMA controller node,
18 memory peripheral interface and USART DMA channel ID, FIFO configuration. 20 memory peripheral interface and USART DMA channel ID, FIFO configuration.
@@ -33,6 +35,7 @@ Example:
33 clock-names = "usart"; 35 clock-names = "usart";
34 atmel,use-dma-rx; 36 atmel,use-dma-rx;
35 atmel,use-dma-tx; 37 atmel,use-dma-tx;
38 rts-gpios = <&pioD 15 0>;
36 }; 39 };
37 40
38- use DMA: 41- use DMA:
diff --git a/MAINTAINERS b/MAINTAINERS
index ebb6c6f30c56..74e33b8913bf 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1175,6 +1175,14 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
1175W: http://www.arm.linux.org.uk/ 1175W: http://www.arm.linux.org.uk/
1176S: Maintained 1176S: Maintained
1177 1177
1178ARM/QUALCOMM SUPPORT
1179M: Kumar Gala <galak@codeaurora.org>
1180M: David Brown <davidb@codeaurora.org>
1181L: linux-arm-msm@vger.kernel.org
1182S: Maintained
1183F: arch/arm/mach-qcom/
1184T: git git://git.kernel.org/pub/scm/linux/kernel/git/galak/linux-qcom.git
1185
1178ARM/RADISYS ENP2611 MACHINE SUPPORT 1186ARM/RADISYS ENP2611 MACHINE SUPPORT
1179M: Lennert Buytenhek <kernel@wantstofly.org> 1187M: Lennert Buytenhek <kernel@wantstofly.org>
1180L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 1188L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@ -1894,7 +1902,7 @@ M: Stephen Warren <swarren@wwwdotorg.org>
1894L: linux-rpi-kernel@lists.infradead.org (moderated for non-subscribers) 1902L: linux-rpi-kernel@lists.infradead.org (moderated for non-subscribers)
1895T: git git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-rpi.git 1903T: git git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-rpi.git
1896S: Maintained 1904S: Maintained
1897F: arch/arm/mach-bcm2835/ 1905F: arch/arm/mach-bcm/board_bcm2835.c
1898F: arch/arm/boot/dts/bcm2835* 1906F: arch/arm/boot/dts/bcm2835*
1899F: arch/arm/configs/bcm2835_defconfig 1907F: arch/arm/configs/bcm2835_defconfig
1900F: drivers/*/*bcm2835* 1908F: drivers/*/*bcm2835*
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 79bea0b34d1f..83912d0251ca 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -309,9 +309,11 @@ choice
309config ARCH_MULTIPLATFORM 309config ARCH_MULTIPLATFORM
310 bool "Allow multiple platforms to be selected" 310 bool "Allow multiple platforms to be selected"
311 depends on MMU 311 depends on MMU
312 select ARCH_WANT_OPTIONAL_GPIOLIB
312 select ARM_PATCH_PHYS_VIRT 313 select ARM_PATCH_PHYS_VIRT
313 select AUTO_ZRELADDR 314 select AUTO_ZRELADDR
314 select COMMON_CLK 315 select COMMON_CLK
316 select GENERIC_CLOCKEVENTS
315 select MULTI_IRQ_HANDLER 317 select MULTI_IRQ_HANDLER
316 select SPARSE_IRQ 318 select SPARSE_IRQ
317 select USE_OF 319 select USE_OF
@@ -425,9 +427,6 @@ config ARCH_EFM32
425 select ARCH_REQUIRE_GPIOLIB 427 select ARCH_REQUIRE_GPIOLIB
426 select AUTO_ZRELADDR 428 select AUTO_ZRELADDR
427 select ARM_NVIC 429 select ARM_NVIC
428 # CLKSRC_MMIO is wrong here, but needed until a proper fix is merged,
429 # i.e. CLKSRC_EFM32 selecting CLKSRC_MMIO
430 select CLKSRC_MMIO
431 select CLKSRC_OF 430 select CLKSRC_OF
432 select COMMON_CLK 431 select COMMON_CLK
433 select CPU_V7M 432 select CPU_V7M
@@ -659,9 +658,8 @@ config ARCH_PXA
659 help 658 help
660 Support for Intel/Marvell's PXA2xx/PXA3xx processor line. 659 Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
661 660
662config ARCH_MSM_NODT 661config ARCH_MSM
663 bool "Qualcomm MSM" 662 bool "Qualcomm MSM (non-multiplatform)"
664 select ARCH_MSM
665 select ARCH_REQUIRE_GPIOLIB 663 select ARCH_REQUIRE_GPIOLIB
666 select COMMON_CLK 664 select COMMON_CLK
667 select GENERIC_CLOCKEVENTS 665 select GENERIC_CLOCKEVENTS
@@ -921,16 +919,18 @@ config ARCH_MULTI_V4_V5
921config ARCH_MULTI_V6 919config ARCH_MULTI_V6
922 bool "ARMv6 based platforms (ARM11)" 920 bool "ARMv6 based platforms (ARM11)"
923 select ARCH_MULTI_V6_V7 921 select ARCH_MULTI_V6_V7
924 select CPU_V6 922 select CPU_V6K
925 923
926config ARCH_MULTI_V7 924config ARCH_MULTI_V7
927 bool "ARMv7 based platforms (Cortex-A, PJ4, Scorpion, Krait)" 925 bool "ARMv7 based platforms (Cortex-A, PJ4, Scorpion, Krait)"
928 default y 926 default y
929 select ARCH_MULTI_V6_V7 927 select ARCH_MULTI_V6_V7
930 select CPU_V7 928 select CPU_V7
929 select HAVE_SMP
931 930
932config ARCH_MULTI_V6_V7 931config ARCH_MULTI_V6_V7
933 bool 932 bool
933 select MIGHT_HAVE_CACHE_L2X0
934 934
935config ARCH_MULTI_CPU_AUTO 935config ARCH_MULTI_CPU_AUTO
936 def_bool !(ARCH_MULTI_V4 || ARCH_MULTI_V4T || ARCH_MULTI_V6_V7) 936 def_bool !(ARCH_MULTI_V4 || ARCH_MULTI_V4T || ARCH_MULTI_V6_V7)
@@ -938,6 +938,13 @@ config ARCH_MULTI_CPU_AUTO
938 938
939endmenu 939endmenu
940 940
941config ARCH_VIRT
942 bool "Dummy Virtual Machine" if ARCH_MULTI_V7
943 select ARM_AMBA
944 select ARM_GIC
945 select ARM_PSCI
946 select HAVE_ARM_ARCH_TIMER
947
941# 948#
942# This is sorted alphabetically by mach-* pathname. However, plat-* 949# This is sorted alphabetically by mach-* pathname. However, plat-*
943# Kconfigs may be included either alphabetically (according to the 950# Kconfigs may be included either alphabetically (according to the
@@ -949,8 +956,6 @@ source "arch/arm/mach-at91/Kconfig"
949 956
950source "arch/arm/mach-bcm/Kconfig" 957source "arch/arm/mach-bcm/Kconfig"
951 958
952source "arch/arm/mach-bcm2835/Kconfig"
953
954source "arch/arm/mach-berlin/Kconfig" 959source "arch/arm/mach-berlin/Kconfig"
955 960
956source "arch/arm/mach-clps711x/Kconfig" 961source "arch/arm/mach-clps711x/Kconfig"
@@ -1018,6 +1023,8 @@ source "arch/arm/plat-pxa/Kconfig"
1018 1023
1019source "arch/arm/mach-mmp/Kconfig" 1024source "arch/arm/mach-mmp/Kconfig"
1020 1025
1026source "arch/arm/mach-qcom/Kconfig"
1027
1021source "arch/arm/mach-realview/Kconfig" 1028source "arch/arm/mach-realview/Kconfig"
1022 1029
1023source "arch/arm/mach-rockchip/Kconfig" 1030source "arch/arm/mach-rockchip/Kconfig"
@@ -1061,8 +1068,6 @@ source "arch/arm/mach-versatile/Kconfig"
1061source "arch/arm/mach-vexpress/Kconfig" 1068source "arch/arm/mach-vexpress/Kconfig"
1062source "arch/arm/plat-versatile/Kconfig" 1069source "arch/arm/plat-versatile/Kconfig"
1063 1070
1064source "arch/arm/mach-virt/Kconfig"
1065
1066source "arch/arm/mach-vt8500/Kconfig" 1071source "arch/arm/mach-vt8500/Kconfig"
1067 1072
1068source "arch/arm/mach-w90x900/Kconfig" 1073source "arch/arm/mach-w90x900/Kconfig"
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 0531da8e5216..76ee27829c34 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -956,7 +956,7 @@ config DEBUG_STI_UART
956 956
957config DEBUG_MSM_UART 957config DEBUG_MSM_UART
958 bool 958 bool
959 depends on ARCH_MSM 959 depends on ARCH_MSM || ARCH_QCOM
960 960
961config DEBUG_LL_INCLUDE 961config DEBUG_LL_INCLUDE
962 string 962 string
@@ -1145,7 +1145,7 @@ config DEBUG_UART_8250_FLOW_CONTROL
1145 1145
1146config DEBUG_UNCOMPRESS 1146config DEBUG_UNCOMPRESS
1147 bool 1147 bool
1148 depends on ARCH_MULTIPLATFORM || ARCH_MSM 1148 depends on ARCH_MULTIPLATFORM || ARCH_MSM || ARCH_EXYNOS
1149 default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ 1149 default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
1150 (!DEBUG_TEGRA_UART || !ZBOOT_ROM) 1150 (!DEBUG_TEGRA_UART || !ZBOOT_ROM)
1151 help 1151 help
@@ -1161,7 +1161,8 @@ config DEBUG_UNCOMPRESS
1161 1161
1162config UNCOMPRESS_INCLUDE 1162config UNCOMPRESS_INCLUDE
1163 string 1163 string
1164 default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM 1164 default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \
1165 ARCH_EXYNOS || ARCH_EFM32
1165 default "mach/uncompress.h" 1166 default "mach/uncompress.h"
1166 1167
1167config EARLY_PRINTK 1168config EARLY_PRINTK
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index fddf4beaee45..41c1931f0155 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -143,7 +143,6 @@ textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
143# by CONFIG_* macro name. 143# by CONFIG_* macro name.
144machine-$(CONFIG_ARCH_AT91) += at91 144machine-$(CONFIG_ARCH_AT91) += at91
145machine-$(CONFIG_ARCH_BCM) += bcm 145machine-$(CONFIG_ARCH_BCM) += bcm
146machine-$(CONFIG_ARCH_BCM2835) += bcm2835
147machine-$(CONFIG_ARCH_BERLIN) += berlin 146machine-$(CONFIG_ARCH_BERLIN) += berlin
148machine-$(CONFIG_ARCH_CLPS711X) += clps711x 147machine-$(CONFIG_ARCH_CLPS711X) += clps711x
149machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx 148machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx
@@ -180,6 +179,7 @@ machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2
180machine-$(CONFIG_ARCH_ORION5X) += orion5x 179machine-$(CONFIG_ARCH_ORION5X) += orion5x
181machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell 180machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell
182machine-$(CONFIG_ARCH_PXA) += pxa 181machine-$(CONFIG_ARCH_PXA) += pxa
182machine-$(CONFIG_ARCH_QCOM) += qcom
183machine-$(CONFIG_ARCH_REALVIEW) += realview 183machine-$(CONFIG_ARCH_REALVIEW) += realview
184machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip 184machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip
185machine-$(CONFIG_ARCH_RPC) += rpc 185machine-$(CONFIG_ARCH_RPC) += rpc
@@ -199,7 +199,6 @@ machine-$(CONFIG_ARCH_U300) += u300
199machine-$(CONFIG_ARCH_U8500) += ux500 199machine-$(CONFIG_ARCH_U8500) += ux500
200machine-$(CONFIG_ARCH_VERSATILE) += versatile 200machine-$(CONFIG_ARCH_VERSATILE) += versatile
201machine-$(CONFIG_ARCH_VEXPRESS) += vexpress 201machine-$(CONFIG_ARCH_VEXPRESS) += vexpress
202machine-$(CONFIG_ARCH_VIRT) += virt
203machine-$(CONFIG_ARCH_VT8500) += vt8500 202machine-$(CONFIG_ARCH_VT8500) += vt8500
204machine-$(CONFIG_ARCH_W90X900) += w90x900 203machine-$(CONFIG_ARCH_W90X900) += w90x900
205machine-$(CONFIG_ARCH_ZYNQ) += zynq 204machine-$(CONFIG_ARCH_ZYNQ) += zynq
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index d3cb0126a102..ec4dd7c3ed37 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -12,6 +12,8 @@ dtb-$(CONFIG_ARCH_AT91) += ethernut5.dtb
12dtb-$(CONFIG_ARCH_AT91) += evk-pro3.dtb 12dtb-$(CONFIG_ARCH_AT91) += evk-pro3.dtb
13dtb-$(CONFIG_ARCH_AT91) += tny_a9260.dtb 13dtb-$(CONFIG_ARCH_AT91) += tny_a9260.dtb
14dtb-$(CONFIG_ARCH_AT91) += usb_a9260.dtb 14dtb-$(CONFIG_ARCH_AT91) += usb_a9260.dtb
15# sam9261
16dtb-$(CONFIG_ARCH_AT91) += at91sam9261ek.dtb
15# sam9263 17# sam9263
16dtb-$(CONFIG_ARCH_AT91) += at91sam9263ek.dtb 18dtb-$(CONFIG_ARCH_AT91) += at91sam9263ek.dtb
17dtb-$(CONFIG_ARCH_AT91) += tny_a9263.dtb 19dtb-$(CONFIG_ARCH_AT91) += tny_a9263.dtb
@@ -29,6 +31,8 @@ dtb-$(CONFIG_ARCH_AT91) += at91sam9m10g45ek.dtb
29dtb-$(CONFIG_ARCH_AT91) += pm9g45.dtb 31dtb-$(CONFIG_ARCH_AT91) += pm9g45.dtb
30# sam9n12 32# sam9n12
31dtb-$(CONFIG_ARCH_AT91) += at91sam9n12ek.dtb 33dtb-$(CONFIG_ARCH_AT91) += at91sam9n12ek.dtb
34# sam9rl
35dtb-$(CONFIG_ARCH_AT91) += at91sam9rlek.dtb
32# sam9x5 36# sam9x5
33dtb-$(CONFIG_ARCH_AT91) += at91-ariag25.dtb 37dtb-$(CONFIG_ARCH_AT91) += at91-ariag25.dtb
34dtb-$(CONFIG_ARCH_AT91) += at91-cosino_mega2560.dtb 38dtb-$(CONFIG_ARCH_AT91) += at91-cosino_mega2560.dtb
@@ -119,9 +123,6 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
119 kirkwood-ts219-6282.dtb 123 kirkwood-ts219-6282.dtb
120dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb 124dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb
121dtb-$(CONFIG_ARCH_MOXART) += moxart-uc7112lx.dtb 125dtb-$(CONFIG_ARCH_MOXART) += moxart-uc7112lx.dtb
122dtb-$(CONFIG_ARCH_MSM) += qcom-msm8660-surf.dtb \
123 qcom-msm8960-cdp.dtb \
124 qcom-apq8074-dragonboard.dtb
125dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ 126dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
126 armada-370-mirabox.dtb \ 127 armada-370-mirabox.dtb \
127 armada-370-netgear-rn102.dtb \ 128 armada-370-netgear-rn102.dtb \
@@ -234,6 +235,9 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
234 dra7-evm.dtb 235 dra7-evm.dtb
235dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb 236dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb
236dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb 237dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
238dtb-$(CONFIG_ARCH_QCOM) += qcom-msm8660-surf.dtb \
239 qcom-msm8960-cdp.dtb \
240 qcom-apq8074-dragonboard.dtb
237dtb-$(CONFIG_ARCH_U8500) += ste-snowball.dtb \ 241dtb-$(CONFIG_ARCH_U8500) += ste-snowball.dtb \
238 ste-hrefprev60-stuib.dtb \ 242 ste-hrefprev60-stuib.dtb \
239 ste-hrefprev60-tvk.dtb \ 243 ste-hrefprev60-tvk.dtb \
diff --git a/arch/arm/boot/dts/at91sam9261.dtsi b/arch/arm/boot/dts/at91sam9261.dtsi
new file mode 100644
index 000000000000..e21dda0e8986
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9261.dtsi
@@ -0,0 +1,735 @@
1/*
2 * at91sam9261.dtsi - Device Tree Include file for AT91SAM9261 SoC
3 *
4 * Copyright (C) 2013 Jean-Jacques Hiblot <jjhiblot@traphandler.com>
5 *
6 * Licensed under GPLv2 only.
7 */
8
9#include "skeleton.dtsi"
10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12#include <dt-bindings/gpio/gpio.h>
13#include <dt-bindings/clk/at91.h>
14
15/ {
16 model = "Atmel AT91SAM9261 family SoC";
17 compatible = "atmel,at91sam9261";
18 interrupt-parent = <&aic>;
19
20 aliases {
21 serial0 = &dbgu;
22 serial1 = &usart0;
23 serial2 = &usart1;
24 serial3 = &usart2;
25 gpio0 = &pioA;
26 gpio1 = &pioB;
27 gpio2 = &pioC;
28 tcb0 = &tcb0;
29 i2c0 = &i2c0;
30 ssc0 = &ssc0;
31 ssc1 = &ssc1;
32 };
33
34 cpus {
35 #address-cells = <0>;
36 #size-cells = <0>;
37
38 cpu {
39 compatible = "arm,arm926ej-s";
40 device_type = "cpu";
41 };
42 };
43
44 memory {
45 reg = <0x20000000 0x08000000>;
46 };
47
48 ahb {
49 compatible = "simple-bus";
50 #address-cells = <1>;
51 #size-cells = <1>;
52 ranges;
53
54 usb0: ohci@00500000 {
55 compatible = "atmel,at91rm9200-ohci", "usb-ohci";
56 reg = <0x00500000 0x100000>;
57 interrupts = <20 IRQ_TYPE_LEVEL_HIGH 2>;
58 clocks = <&usb>, <&ohci_clk>, <&hclk0>, <&uhpck>;
59 clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck";
60 status = "disabled";
61 };
62
63 fb0: fb@0x00600000 {
64 compatible = "atmel,at91sam9261-lcdc";
65 reg = <0x00600000 0x1000>;
66 interrupts = <21 IRQ_TYPE_LEVEL_HIGH 3>;
67 pinctrl-names = "default";
68 pinctrl-0 = <&pinctrl_fb>;
69 clocks = <&lcd_clk>, <&hclk1>;
70 clock-names = "lcdc_clk", "hclk";
71 status = "disabled";
72 };
73
74 nand0: nand@40000000 {
75 compatible = "atmel,at91rm9200-nand";
76 #address-cells = <1>;
77 #size-cells = <1>;
78 reg = <0x40000000 0x10000000>;
79 atmel,nand-addr-offset = <22>;
80 atmel,nand-cmd-offset = <21>;
81 pinctrl-names = "default";
82 pinctrl-0 = <&pinctrl_nand>;
83
84 gpios = <&pioC 15 GPIO_ACTIVE_HIGH>,
85 <&pioC 14 GPIO_ACTIVE_HIGH>,
86 <0>;
87 status = "disabled";
88 };
89
90 apb {
91 compatible = "simple-bus";
92 #address-cells = <1>;
93 #size-cells = <1>;
94 ranges;
95
96 tcb0: timer@fffa0000 {
97 compatible = "atmel,at91rm9200-tcb";
98 reg = <0xfffa0000 0x100>;
99 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>,
100 <18 IRQ_TYPE_LEVEL_HIGH 0>,
101 <19 IRQ_TYPE_LEVEL_HIGH 0>;
102 clocks = <&tc0_clk>, <&tc1_clk>, <&tc2_clk>;
103 clock-names = "t0_clk", "t1_clk", "t2_clk";
104 };
105
106 usb1: gadget@fffa4000 {
107 compatible = "atmel,at91rm9200-udc";
108 reg = <0xfffa4000 0x4000>;
109 interrupts = <10 IRQ_TYPE_LEVEL_HIGH 2>;
110 clocks = <&usb>, <&udc_clk>, <&udpck>;
111 clock-names = "usb_clk", "udc_clk", "udpck";
112 status = "disabled";
113 };
114
115 mmc0: mmc@fffa8000 {
116 compatible = "atmel,hsmci";
117 reg = <0xfffa8000 0x600>;
118 interrupts = <9 IRQ_TYPE_LEVEL_HIGH 0>;
119 pinctrl-names = "default";
120 pinctrl-0 = <&pinctrl_mmc0_clk>, <&pinctrl_mmc0_slot0_cmd_dat0>, <&pinctrl_mmc0_slot0_dat1_3>;
121 #address-cells = <1>;
122 #size-cells = <0>;
123 clocks = <&mci0_clk>;
124 clock-names = "mci_clk";
125 status = "disabled";
126 };
127
128 i2c0: i2c@fffac000 {
129 compatible = "atmel,at91sam9261-i2c";
130 pinctrl-names = "default";
131 pinctrl-0 = <&pinctrl_i2c_twi>;
132 reg = <0xfffac000 0x100>;
133 interrupts = <11 IRQ_TYPE_LEVEL_HIGH 6>;
134 #address-cells = <1>;
135 #size-cells = <0>;
136 clocks = <&twi0_clk>;
137 status = "disabled";
138 };
139
140 usart0: serial@fffb0000 {
141 compatible = "atmel,at91sam9260-usart";
142 reg = <0xfffb0000 0x200>;
143 interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
144 atmel,use-dma-rx;
145 atmel,use-dma-tx;
146 pinctrl-names = "default";
147 pinctrl-0 = <&pinctrl_usart0>;
148 clocks = <&usart0_clk>;
149 clock-names = "usart";
150 status = "disabled";
151 };
152
153 usart1: serial@fffb4000 {
154 compatible = "atmel,at91sam9260-usart";
155 reg = <0xfffb4000 0x200>;
156 interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
157 atmel,use-dma-rx;
158 atmel,use-dma-tx;
159 pinctrl-names = "default";
160 pinctrl-0 = <&pinctrl_usart1>;
161 clocks = <&usart1_clk>;
162 clock-names = "usart";
163 status = "disabled";
164 };
165
166 usart2: serial@fffb8000{
167 compatible = "atmel,at91sam9260-usart";
168 reg = <0xfffb8000 0x200>;
169 interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
170 atmel,use-dma-rx;
171 atmel,use-dma-tx;
172 pinctrl-names = "default";
173 pinctrl-0 = <&pinctrl_usart2>;
174 clocks = <&usart2_clk>;
175 clock-names = "usart";
176 status = "disabled";
177 };
178
179 ssc0: ssc@fffbc000 {
180 compatible = "atmel,at91rm9200-ssc";
181 reg = <0xfffbc000 0x4000>;
182 interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>;
183 pinctrl-names = "default";
184 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
185 status = "disabled";
186 };
187
188 ssc1: ssc@fffc0000 {
189 compatible = "atmel,at91rm9200-ssc";
190 reg = <0xfffc0000 0x4000>;
191 interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>;
192 pinctrl-names = "default";
193 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
194 status = "disabled";
195 };
196
197 spi0: spi@fffc8000 {
198 #address-cells = <1>;
199 #size-cells = <0>;
200 compatible = "atmel,at91rm9200-spi";
201 reg = <0xfffc8000 0x200>;
202 cs-gpios = <0>, <0>, <0>, <0>;
203 interrupts = <12 IRQ_TYPE_LEVEL_HIGH 3>;
204 pinctrl-names = "default";
205 pinctrl-0 = <&pinctrl_spi0>;
206 clocks = <&spi0_clk>;
207 clock-names = "spi_clk";
208 status = "disabled";
209 };
210
211 spi1: spi@fffcc000 {
212 #address-cells = <1>;
213 #size-cells = <0>;
214 compatible = "atmel,at91rm9200-spi";
215 reg = <0xfffcc000 0x200>;
216 interrupts = <13 IRQ_TYPE_LEVEL_HIGH 3>;
217 pinctrl-names = "default";
218 pinctrl-0 = <&pinctrl_spi1>;
219 clocks = <&spi1_clk>;
220 clock-names = "spi_clk";
221 status = "disabled";
222 };
223
224 ramc: ramc@ffffea00 {
225 compatible = "atmel,at91sam9260-sdramc";
226 reg = <0xffffea00 0x200>;
227 };
228
229 matrix: matrix@ffffee00 {
230 compatible = "atmel,at91sam9260-bus-matrix";
231 reg = <0xffffee00 0x200>;
232 };
233
234 aic: interrupt-controller@fffff000 {
235 #interrupt-cells = <3>;
236 compatible = "atmel,at91rm9200-aic";
237 interrupt-controller;
238 reg = <0xfffff000 0x200>;
239 atmel,external-irqs = <29 30 31>;
240 };
241
242 dbgu: serial@fffff200 {
243 compatible = "atmel,at91sam9260-usart";
244 reg = <0xfffff200 0x200>;
245 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
246 pinctrl-names = "default";
247 pinctrl-0 = <&pinctrl_dbgu>;
248 clocks = <&mck>;
249 clock-names = "usart";
250 status = "disabled";
251 };
252
253 pinctrl@fffff400 {
254 #address-cells = <1>;
255 #size-cells = <1>;
256 compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
257 ranges = <0xfffff400 0xfffff400 0x600>;
258
259 atmel,mux-mask =
260 /* A B */
261 <0xffffffff 0xfffffff7>, /* pioA */
262 <0xffffffff 0xfffffff4>, /* pioB */
263 <0xffffffff 0xffffff07>; /* pioC */
264
265 /* shared pinctrl settings */
266 dbgu {
267 pinctrl_dbgu: dbgu-0 {
268 atmel,pins =
269 <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE>,
270 <AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
271 };
272 };
273
274 usart0 {
275 pinctrl_usart0: usart0-0 {
276 atmel,pins =
277 <AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
278 <AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE>;
279 };
280
281 pinctrl_usart0_rts: usart0_rts-0 {
282 atmel,pins =
283 <AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_NONE>;
284 };
285
286 pinctrl_usart0_cts: usart0_cts-0 {
287 atmel,pins =
288 <AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_NONE>;
289 };
290 };
291
292 usart1 {
293 pinctrl_usart1: usart1-0 {
294 atmel,pins =
295 <AT91_PIOC 12 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
296 <AT91_PIOC 13 AT91_PERIPH_A AT91_PINCTRL_NONE>;
297 };
298
299 pinctrl_usart1_rts: usart1_rts-0 {
300 atmel,pins =
301 <AT91_PIOA 12 AT91_PERIPH_B AT91_PINCTRL_NONE>;
302 };
303
304 pinctrl_usart1_cts: usart1_cts-0 {
305 atmel,pins =
306 <AT91_PIOA 13 AT91_PERIPH_B AT91_PINCTRL_NONE>;
307 };
308 };
309
310 usart2 {
311 pinctrl_usart2: usart2-0 {
312 atmel,pins =
313 <AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
314 <AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_NONE>;
315 };
316
317 pinctrl_usart2_rts: usart2_rts-0 {
318 atmel,pins =
319 <AT91_PIOA 15 AT91_PERIPH_B AT91_PINCTRL_NONE>;
320 };
321
322 pinctrl_usart2_cts: usart2_cts-0 {
323 atmel,pins =
324 <AT91_PIOA 16 AT91_PERIPH_B AT91_PINCTRL_NONE>;
325 };
326 };
327
328 nand {
329 pinctrl_nand: nand-0 {
330 atmel,pins =
331 <AT91_PIOC 15 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>,
332 <AT91_PIOC 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
333 };
334 };
335
336 mmc0 {
337 pinctrl_mmc0_clk: mmc0_clk-0 {
338 atmel,pins =
339 <AT91_PIOA 2 AT91_PERIPH_B AT91_PINCTRL_NONE>;
340 };
341
342 pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 {
343 atmel,pins =
344 <AT91_PIOA 1 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>,
345 <AT91_PIOA 0 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;
346 };
347
348 pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
349 atmel,pins =
350 <AT91_PIOA 4 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>,
351 <AT91_PIOA 5 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>,
352 <AT91_PIOA 6 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;
353 };
354 };
355
356 ssc0 {
357 pinctrl_ssc0_tx: ssc0_tx-0 {
358 atmel,pins =
359 <AT91_PIOB 21 AT91_PERIPH_A AT91_PINCTRL_NONE>,
360 <AT91_PIOB 22 AT91_PERIPH_A AT91_PINCTRL_NONE>,
361 <AT91_PIOB 23 AT91_PERIPH_A AT91_PINCTRL_NONE>;
362 };
363
364 pinctrl_ssc0_rx: ssc0_rx-0 {
365 atmel,pins =
366 <AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_NONE>,
367 <AT91_PIOB 25 AT91_PERIPH_A AT91_PINCTRL_NONE>,
368 <AT91_PIOB 26 AT91_PERIPH_A AT91_PINCTRL_NONE>;
369 };
370 };
371
372 ssc1 {
373 pinctrl_ssc1_tx: ssc1_tx-0 {
374 atmel,pins =
375 <AT91_PIOA 17 AT91_PERIPH_B AT91_PINCTRL_NONE>,
376 <AT91_PIOA 18 AT91_PERIPH_B AT91_PINCTRL_NONE>,
377 <AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_NONE>;
378 };
379
380 pinctrl_ssc1_rx: ssc1_rx-0 {
381 atmel,pins =
382 <AT91_PIOA 20 AT91_PERIPH_B AT91_PINCTRL_NONE>,
383 <AT91_PIOA 21 AT91_PERIPH_B AT91_PINCTRL_NONE>,
384 <AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE>;
385 };
386 };
387
388 spi0 {
389 pinctrl_spi0: spi0-0 {
390 atmel,pins =
391 <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE>,
392 <AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE>,
393 <AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>;
394 };
395 };
396
397 spi1 {
398 pinctrl_spi1: spi1-0 {
399 atmel,pins =
400 <AT91_PIOB 30 AT91_PERIPH_A AT91_PINCTRL_NONE>,
401 <AT91_PIOB 31 AT91_PERIPH_A AT91_PINCTRL_NONE>,
402 <AT91_PIOB 29 AT91_PERIPH_A AT91_PINCTRL_NONE>;
403 };
404 };
405
406 tcb0 {
407 pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
408 atmel,pins = <AT91_PIOC 16 AT91_PERIPH_B AT91_PINCTRL_NONE>;
409 };
410
411 pinctrl_tcb0_tclk1: tcb0_tclk1-0 {
412 atmel,pins = <AT91_PIOC 17 AT91_PERIPH_B AT91_PINCTRL_NONE>;
413 };
414
415 pinctrl_tcb0_tclk2: tcb0_tclk2-0 {
416 atmel,pins = <AT91_PIOC 18 AT91_PERIPH_B AT91_PINCTRL_NONE>;
417 };
418
419 pinctrl_tcb0_tioa0: tcb0_tioa0-0 {
420 atmel,pins = <AT91_PIOC 19 AT91_PERIPH_B AT91_PINCTRL_NONE>;
421 };
422
423 pinctrl_tcb0_tioa1: tcb0_tioa1-0 {
424 atmel,pins = <AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE>;
425 };
426
427 pinctrl_tcb0_tioa2: tcb0_tioa2-0 {
428 atmel,pins = <AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE>;
429 };
430
431 pinctrl_tcb0_tiob0: tcb0_tiob0-0 {
432 atmel,pins = <AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE>;
433 };
434
435 pinctrl_tcb0_tiob1: tcb0_tiob1-0 {
436 atmel,pins = <AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_NONE>;
437 };
438
439 pinctrl_tcb0_tiob2: tcb0_tiob2-0 {
440 atmel,pins = <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE>;
441 };
442 };
443
444 i2c0 {
445 pinctrl_i2c_bitbang: i2c-0-bitbang {
446 atmel,pins =
447 <AT91_PIOA 7 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>,
448 <AT91_PIOA 8 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
449 };
450 pinctrl_i2c_twi: i2c-0-twi {
451 atmel,pins =
452 <AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE>,
453 <AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE>;
454 };
455 };
456
457 fb {
458 pinctrl_fb: fb-0 {
459 atmel,pins =
460 <AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE>,
461 <AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE>,
462 <AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE>,
463 <AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE>,
464 <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE>,
465 <AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE>,
466 <AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>,
467 <AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE>,
468 <AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE>,
469 <AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE>,
470 <AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE>,
471 <AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE>,
472 <AT91_PIOB 18 AT91_PERIPH_A AT91_PINCTRL_NONE>,
473 <AT91_PIOB 19 AT91_PERIPH_A AT91_PINCTRL_NONE>,
474 <AT91_PIOB 20 AT91_PERIPH_A AT91_PINCTRL_NONE>,
475 <AT91_PIOB 23 AT91_PERIPH_B AT91_PINCTRL_NONE>,
476 <AT91_PIOB 24 AT91_PERIPH_B AT91_PINCTRL_NONE>,
477 <AT91_PIOB 25 AT91_PERIPH_B AT91_PINCTRL_NONE>,
478 <AT91_PIOB 26 AT91_PERIPH_B AT91_PINCTRL_NONE>,
479 <AT91_PIOB 27 AT91_PERIPH_B AT91_PINCTRL_NONE>,
480 <AT91_PIOB 28 AT91_PERIPH_B AT91_PINCTRL_NONE>;
481 };
482 };
483
484 pioA: gpio@fffff400 {
485 compatible = "atmel,at91rm9200-gpio";
486 reg = <0xfffff400 0x200>;
487 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
488 #gpio-cells = <2>;
489 gpio-controller;
490 interrupt-controller;
491 #interrupt-cells = <2>;
492 clocks = <&pioA_clk>;
493 };
494
495 pioB: gpio@fffff600 {
496 compatible = "atmel,at91rm9200-gpio";
497 reg = <0xfffff600 0x200>;
498 interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
499 #gpio-cells = <2>;
500 gpio-controller;
501 interrupt-controller;
502 #interrupt-cells = <2>;
503 clocks = <&pioB_clk>;
504 };
505
506 pioC: gpio@fffff800 {
507 compatible = "atmel,at91rm9200-gpio";
508 reg = <0xfffff800 0x200>;
509 interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
510 #gpio-cells = <2>;
511 gpio-controller;
512 interrupt-controller;
513 #interrupt-cells = <2>;
514 clocks = <&pioC_clk>;
515 };
516 };
517
518 pmc: pmc@fffffc00 {
519 compatible = "atmel,at91rm9200-pmc";
520 reg = <0xfffffc00 0x100>;
521 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
522 interrupt-controller;
523 #address-cells = <1>;
524 #size-cells = <0>;
525 #interrupt-cells = <1>;
526
527 clk32k: slck {
528 compatible = "fixed-clock";
529 #clock-cells = <0>;
530 clock-frequency = <32768>;
531 };
532
533 main: mainck {
534 compatible = "atmel,at91rm9200-clk-main";
535 #clock-cells = <0>;
536 interrupts-extended = <&pmc AT91_PMC_MOSCS>;
537 clocks = <&clk32k>;
538 };
539
540 plla: pllack {
541 compatible = "atmel,at91rm9200-clk-pll";
542 #clock-cells = <0>;
543 interrupts-extended = <&pmc AT91_PMC_LOCKA>;
544 clocks = <&main>;
545 reg = <0>;
546 atmel,clk-input-range = <1000000 32000000>;
547 #atmel,pll-clk-output-range-cells = <4>;
548 atmel,pll-clk-output-ranges = <80000000 200000000 190000000 240000000>;
549 };
550
551 pllb: pllbck {
552 compatible = "atmel,at91rm9200-clk-pll";
553 #clock-cells = <0>;
554 interrupts-extended = <&pmc AT91_PMC_LOCKB>;
555 clocks = <&main>;
556 reg = <1>;
557 atmel,clk-input-range = <1000000 32000000>;
558 #atmel,pll-clk-output-range-cells = <4>;
559 atmel,pll-clk-output-ranges = <80000000 200000000 190000000 240000000>;
560 };
561
562 mck: masterck {
563 compatible = "atmel,at91rm9200-clk-master";
564 #clock-cells = <0>;
565 interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
566 clocks = <&clk32k>, <&main>, <&plla>, <&pllb>;
567 atmel,clk-output-range = <0 94000000>;
568 atmel,clk-divisors = <1 2 4 3>;
569 };
570
571 usb: usbck {
572 compatible = "atmel,at91rm9200-clk-usb";
573 #clock-cells = <0>;
574 atmel,clk-divisors = <1 2 4 3>;
575 clocks = <&pllb>;
576 };
577
578 systemck {
579 compatible = "atmel,at91rm9200-clk-system";
580 #address-cells = <1>;
581 #size-cells = <0>;
582
583 uhpck: uhpck {
584 #clock-cells = <0>;
585 reg = <6>;
586 clocks = <&usb>;
587 };
588
589 udpck: udpck {
590 #clock-cells = <0>;
591 reg = <7>;
592 clocks = <&usb>;
593 };
594
595 hclk0: hclk0 {
596 #clock-cells = <0>;
597 reg = <16>;
598 clocks = <&mck>;
599 };
600
601 hclk1: hclk1 {
602 #clock-cells = <0>;
603 reg = <17>;
604 clocks = <&mck>;
605 };
606 };
607
608 periphck {
609 compatible = "atmel,at91rm9200-clk-peripheral";
610 #address-cells = <1>;
611 #size-cells = <0>;
612 clocks = <&mck>;
613
614 pioA_clk: pioA_clk {
615 #clock-cells = <0>;
616 reg = <2>;
617 };
618
619 pioB_clk: pioB_clk {
620 #clock-cells = <0>;
621 reg = <3>;
622 };
623
624 pioC_clk: pioC_clk {
625 #clock-cells = <0>;
626 reg = <4>;
627 };
628
629 usart0_clk: usart0_clk {
630 #clock-cells = <0>;
631 reg = <6>;
632 };
633
634 usart1_clk: usart1_clk {
635 #clock-cells = <0>;
636 reg = <7>;
637 };
638
639 usart2_clk: usart2_clk {
640 #clock-cells = <0>;
641 reg = <8>;
642 };
643
644 mci0_clk: mci0_clk {
645 #clock-cells = <0>;
646 reg = <9>;
647 };
648
649 udc_clk: udc_clk {
650 #clock-cells = <0>;
651 reg = <10>;
652 };
653
654 twi0_clk: twi0_clk {
655 reg = <11>;
656 #clock-cells = <0>;
657 };
658
659 spi0_clk: spi0_clk {
660 #clock-cells = <0>;
661 reg = <12>;
662 };
663
664 spi1_clk: spi1_clk {
665 #clock-cells = <0>;
666 reg = <13>;
667 };
668
669 tc0_clk: tc0_clk {
670 #clock-cells = <0>;
671 reg = <17>;
672 };
673
674 tc1_clk: tc1_clk {
675 #clock-cells = <0>;
676 reg = <18>;
677 };
678
679 tc2_clk: tc2_clk {
680 #clock-cells = <0>;
681 reg = <19>;
682 };
683
684 ohci_clk: ohci_clk {
685 #clock-cells = <0>;
686 reg = <20>;
687 };
688
689 lcd_clk: lcd_clk {
690 #clock-cells = <0>;
691 reg = <21>;
692 };
693 };
694 };
695
696 rstc@fffffd00 {
697 compatible = "atmel,at91sam9260-rstc";
698 reg = <0xfffffd00 0x10>;
699 };
700
701 shdwc@fffffd10 {
702 compatible = "atmel,at91sam9260-shdwc";
703 reg = <0xfffffd10 0x10>;
704 };
705
706 pit: timer@fffffd30 {
707 compatible = "atmel,at91sam9260-pit";
708 reg = <0xfffffd30 0xf>;
709 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
710 clocks = <&mck>;
711 };
712
713 watchdog@fffffd40 {
714 compatible = "atmel,at91sam9260-wdt";
715 reg = <0xfffffd40 0x10>;
716 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
717 status = "disabled";
718 };
719 };
720 };
721
722 i2c@0 {
723 compatible = "i2c-gpio";
724 pinctrl-names = "default";
725 pinctrl-0 = <&pinctrl_i2c_bitbang>;
726 gpios = <&pioA 7 GPIO_ACTIVE_HIGH>, /* sda */
727 <&pioA 8 GPIO_ACTIVE_HIGH>; /* scl */
728 i2c-gpio,sda-open-drain;
729 i2c-gpio,scl-open-drain;
730 i2c-gpio,delay-us = <2>; /* ~100 kHz */
731 #address-cells = <1>;
732 #size-cells = <0>;
733 status = "disabled";
734 };
735};
diff --git a/arch/arm/boot/dts/at91sam9261ek.dts b/arch/arm/boot/dts/at91sam9261ek.dts
new file mode 100644
index 000000000000..2ce527e70c7a
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9261ek.dts
@@ -0,0 +1,211 @@
1/*
2 * at91sam9261ek.dts - Device Tree file for Atmel at91sam9261 reference board
3 *
4 * Copyright (C) 2013 Jean-Jacques Hiblot <jjhiblot@traphandler.com>
5 *
6 * Licensed under GPLv2 only.
7 */
8/dts-v1/;
9#include "at91sam9261.dtsi"
10
11/ {
12 model = "Atmel at91sam9261ek";
13 compatible = "atmel,at91sam9261ek", "atmel,at91sam9261", "atmel,at91sam9";
14
15 chosen {
16 bootargs = "console=ttyS0,115200 rootfstype=ubifs ubi.mtd=5 root=ubi0:rootfs rw";
17 };
18
19 memory {
20 reg = <0x20000000 0x4000000>;
21 };
22
23 clocks {
24 #address-cells = <1>;
25 #size-cells = <1>;
26 ranges;
27
28 main_clock: clock@0 {
29 compatible = "atmel,osc", "fixed-clock";
30 clock-frequency = <18432000>;
31 };
32 };
33
34 ahb {
35 usb0: ohci@00500000 {
36 status = "okay";
37 };
38
39 fb0: fb@0x00600000 {
40 display = <&display0>;
41 atmel,power-control-gpio = <&pioA 12 GPIO_ACTIVE_LOW>;
42 status = "okay";
43
44 display0: display {
45 bits-per-pixel = <16>;
46 atmel,lcdcon-backlight;
47 atmel,dmacon = <0x1>;
48 atmel,lcdcon2 = <0x80008002>;
49 atmel,guard-time = <1>;
50 atmel,lcd-wiring-mode = "BRG";
51
52 display-timings {
53 native-mode = <&timing0>;
54 timing0: timing0 {
55 clock-frequency = <4965000>;
56 hactive = <240>;
57 vactive = <320>;
58 hback-porch = <1>;
59 hfront-porch = <33>;
60 vback-porch = <1>;
61 vfront-porch = <0>;
62 hsync-len = <5>;
63 vsync-len = <1>;
64 hsync-active = <1>;
65 vsync-active = <1>;
66 };
67 };
68 };
69 };
70
71 nand0: nand@40000000 {
72 nand-bus-width = <8>;
73 nand-ecc-mode = "soft";
74 nand-on-flash-bbt;
75 status = "okay";
76
77 at91bootstrap@0 {
78 label = "at91bootstrap";
79 reg = <0x0 0x40000>;
80 };
81
82 bootloader@40000 {
83 label = "bootloader";
84 reg = <0x40000 0x80000>;
85 };
86
87 bootloaderenv@c0000 {
88 label = "bootloader env";
89 reg = <0xc0000 0xc0000>;
90 };
91
92 dtb@180000 {
93 label = "device tree";
94 reg = <0x180000 0x80000>;
95 };
96
97 kernel@200000 {
98 label = "kernel";
99 reg = <0x200000 0x600000>;
100 };
101
102 rootfs@800000 {
103 label = "rootfs";
104 reg = <0x800000 0x0f800000>;
105 };
106 };
107
108 apb {
109 usb1: gadget@fffa4000 {
110 atmel,vbus-gpio = <&pioB 29 GPIO_ACTIVE_HIGH>;
111 status = "okay";
112 };
113
114 spi0: spi@fffc8000 {
115 cs-gpios = <&pioA 3 0>, <0>, <&pioA 28 0>, <0>;
116 status = "okay";
117
118 mtd_dataflash@0 {
119 compatible = "atmel,at45", "atmel,dataflash";
120 reg = <0>;
121 spi-max-frequency = <15000000>;
122 };
123
124 tsc2046@0 {
125 reg = <2>;
126 compatible = "ti,ads7843";
127 interrupts-extended = <&pioC 2 IRQ_TYPE_EDGE_BOTH>;
128 spi-max-frequency = <3000000>;
129 pendown-gpio = <&pioC 2 GPIO_ACTIVE_HIGH>;
130
131 ti,x-min = /bits/ 16 <150>;
132 ti,x-max = /bits/ 16 <3830>;
133 ti,y-min = /bits/ 16 <190>;
134 ti,y-max = /bits/ 16 <3830>;
135 ti,vref-delay-usecs = /bits/ 16 <450>;
136 ti,x-plate-ohms = /bits/ 16 <450>;
137 ti,y-plate-ohms = /bits/ 16 <250>;
138 ti,pressure-max = /bits/ 16 <15000>;
139 ti,debounce-rep = /bits/ 16 <0>;
140 ti,debounce-tol = /bits/ 16 <65535>;
141 ti,debounce-max = /bits/ 16 <1>;
142
143 linux,wakeup;
144 };
145 };
146
147 dbgu: serial@fffff200 {
148 status = "okay";
149 };
150
151 watchdog@fffffd40 {
152 status = "okay";
153 };
154
155 };
156 };
157
158 leds {
159 compatible = "gpio-leds";
160
161 ds8 {
162 label = "ds8";
163 gpios = <&pioA 13 GPIO_ACTIVE_LOW>;
164 linux,default-trigger = "none";
165 };
166
167 ds7 {
168 label = "ds7";
169 gpios = <&pioA 14 GPIO_ACTIVE_LOW>;
170 linux,default-trigger = "nand-disk";
171 };
172
173 ds1 {
174 label = "ds1";
175 gpios = <&pioA 23 GPIO_ACTIVE_LOW>;
176 linux,default-trigger = "heartbeat";
177 };
178 };
179
180 gpio_keys {
181 compatible = "gpio-keys";
182
183 button_0 {
184 label = "button_0";
185 gpios = <&pioA 27 GPIO_ACTIVE_LOW>;
186 linux,code = <256>;
187 gpio-key,wakeup;
188 };
189
190 button_1 {
191 label = "button_1";
192 gpios = <&pioA 26 GPIO_ACTIVE_LOW>;
193 linux,code = <257>;
194 gpio-key,wakeup;
195 };
196
197 button_2 {
198 label = "button_2";
199 gpios = <&pioA 25 GPIO_ACTIVE_LOW>;
200 linux,code = <258>;
201 gpio-key,wakeup;
202 };
203
204 button_3 {
205 label = "button_3";
206 gpios = <&pioA 24 GPIO_ACTIVE_LOW>;
207 linux,code = <259>;
208 gpio-key,wakeup;
209 };
210 };
211};
diff --git a/arch/arm/boot/dts/at91sam9rl.dtsi b/arch/arm/boot/dts/at91sam9rl.dtsi
new file mode 100644
index 000000000000..63e1784d272c
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9rl.dtsi
@@ -0,0 +1,802 @@
1/*
2 * at91sam9rl.dtsi - Device Tree Include file for AT91SAM9RL family SoC
3 *
4 * Copyright (C) 2014 Alexandre Belloni <alexandre.belloni@free-electrons.com>
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#include "skeleton.dtsi"
10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/clk/at91.h>
12#include <dt-bindings/interrupt-controller/irq.h>
13#include <dt-bindings/gpio/gpio.h>
14
15/ {
16 model = "Atmel AT91SAM9RL family SoC";
17 compatible = "atmel,at91sam9rl", "atmel,at91sam9";
18 interrupt-parent = <&aic>;
19
20 aliases {
21 serial0 = &dbgu;
22 serial1 = &usart0;
23 serial2 = &usart1;
24 serial3 = &usart2;
25 serial4 = &usart3;
26 gpio0 = &pioA;
27 gpio1 = &pioB;
28 gpio2 = &pioC;
29 gpio3 = &pioD;
30 tcb0 = &tcb0;
31 i2c0 = &i2c0;
32 i2c1 = &i2c1;
33 ssc0 = &ssc0;
34 ssc1 = &ssc1;
35 };
36
37 cpus {
38 #address-cells = <0>;
39 #size-cells = <0>;
40
41 cpu {
42 compatible = "arm,arm926ej-s";
43 device_type = "cpu";
44 };
45 };
46
47 memory {
48 reg = <0x20000000 0x04000000>;
49 };
50
51 ahb {
52 compatible = "simple-bus";
53 #address-cells = <1>;
54 #size-cells = <1>;
55 ranges;
56
57 nand0: nand@40000000 {
58 compatible = "atmel,at91rm9200-nand";
59 #address-cells = <1>;
60 #size-cells = <1>;
61 reg = <0x40000000 0x10000000>,
62 <0xffffe800 0x200>;
63 atmel,nand-addr-offset = <21>;
64 atmel,nand-cmd-offset = <22>;
65 pinctrl-names = "default";
66 pinctrl-0 = <&pinctrl_nand>;
67 gpios = <&pioD 17 GPIO_ACTIVE_HIGH>,
68 <&pioB 6 GPIO_ACTIVE_HIGH>,
69 <0>;
70 status = "disabled";
71 };
72
73 apb {
74 compatible = "simple-bus";
75 #address-cells = <1>;
76 #size-cells = <1>;
77 ranges;
78
79 tcb0: timer@fffa0000 {
80 compatible = "atmel,at91rm9200-tcb";
81 reg = <0xfffa0000 0x100>;
82 interrupts = <16 IRQ_TYPE_LEVEL_HIGH 0>,
83 <17 IRQ_TYPE_LEVEL_HIGH 0>,
84 <18 IRQ_TYPE_LEVEL_HIGH 0>;
85 clocks = <&tc0_clk>, <&tc1_clk>, <&tc2_clk>;
86 clock-names = "t0_clk", "t1_clk", "t2_clk";
87 };
88
89 mmc0: mmc@fffa4000 {
90 compatible = "atmel,hsmci";
91 reg = <0xfffa4000 0x600>;
92 interrupts = <10 IRQ_TYPE_LEVEL_HIGH 0>;
93 #address-cells = <1>;
94 #size-cells = <0>;
95 pinctrl-names = "default";
96 clocks = <&mci0_clk>;
97 clock-names = "mci_clk";
98 status = "disabled";
99 };
100
101 i2c0: i2c@fffa8000 {
102 compatible = "atmel,at91sam9260-i2c";
103 reg = <0xfffa8000 0x100>;
104 interrupts = <11 IRQ_TYPE_LEVEL_HIGH 6>;
105 #address-cells = <1>;
106 #size-cells = <0>;
107 clocks = <&twi0_clk>;
108 status = "disabled";
109 };
110
111 i2c1: i2c@fffac000 {
112 compatible = "atmel,at91sam9260-i2c";
113 reg = <0xfffac000 0x100>;
114 interrupts = <12 IRQ_TYPE_LEVEL_HIGH 6>;
115 #address-cells = <1>;
116 #size-cells = <0>;
117 status = "disabled";
118 };
119
120 usart0: serial@fffb0000 {
121 compatible = "atmel,at91sam9260-usart";
122 reg = <0xfffb0000 0x200>;
123 interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
124 atmel,use-dma-rx;
125 atmel,use-dma-tx;
126 pinctrl-names = "default";
127 pinctrl-0 = <&pinctrl_usart0>;
128 clocks = <&usart0_clk>;
129 clock-names = "usart";
130 status = "disabled";
131 };
132
133 usart1: serial@fffb4000 {
134 compatible = "atmel,at91sam9260-usart";
135 reg = <0xfffb4000 0x200>;
136 interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
137 atmel,use-dma-rx;
138 atmel,use-dma-tx;
139 pinctrl-names = "default";
140 pinctrl-0 = <&pinctrl_usart1>;
141 clocks = <&usart1_clk>;
142 clock-names = "usart";
143 status = "disabled";
144 };
145
146 usart2: serial@fffb8000 {
147 compatible = "atmel,at91sam9260-usart";
148 reg = <0xfffb8000 0x200>;
149 interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
150 atmel,use-dma-rx;
151 atmel,use-dma-tx;
152 pinctrl-names = "default";
153 pinctrl-0 = <&pinctrl_usart2>;
154 clocks = <&usart2_clk>;
155 clock-names = "usart";
156 status = "disabled";
157 };
158
159 usart3: serial@fffbc000 {
160 compatible = "atmel,at91sam9260-usart";
161 reg = <0xfffbc000 0x200>;
162 interrupts = <9 IRQ_TYPE_LEVEL_HIGH 5>;
163 atmel,use-dma-rx;
164 atmel,use-dma-tx;
165 pinctrl-names = "default";
166 pinctrl-0 = <&pinctrl_usart3>;
167 clocks = <&usart3_clk>;
168 clock-names = "usart";
169 status = "disabled";
170 };
171
172 ssc0: ssc@fffc0000 {
173 compatible = "atmel,at91rm9200-ssc";
174 reg = <0xfffc0000 0x4000>;
175 interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>;
176 pinctrl-names = "default";
177 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
178 status = "disabled";
179 };
180
181 ssc1: ssc@fffc4000 {
182 compatible = "atmel,at91rm9200-ssc";
183 reg = <0xfffc4000 0x4000>;
184 interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>;
185 pinctrl-names = "default";
186 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
187 status = "disabled";
188 };
189
190 spi0: spi@fffcc000 {
191 #address-cells = <1>;
192 #size-cells = <0>;
193 compatible = "atmel,at91rm9200-spi";
194 reg = <0xfffcc000 0x200>;
195 interrupts = <13 IRQ_TYPE_LEVEL_HIGH 3>;
196 pinctrl-names = "default";
197 pinctrl-0 = <&pinctrl_spi0>;
198 clocks = <&spi0_clk>;
199 clock-names = "spi_clk";
200 status = "disabled";
201 };
202
203 ramc0: ramc@ffffea00 {
204 compatible = "atmel,at91sam9260-sdramc";
205 reg = <0xffffea00 0x200>;
206 };
207
208 aic: interrupt-controller@fffff000 {
209 #interrupt-cells = <3>;
210 compatible = "atmel,at91rm9200-aic";
211 interrupt-controller;
212 reg = <0xfffff000 0x200>;
213 atmel,external-irqs = <31>;
214 };
215
216 dbgu: serial@fffff200 {
217 compatible = "atmel,at91sam9260-usart";
218 reg = <0xfffff200 0x200>;
219 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
220 pinctrl-names = "default";
221 pinctrl-0 = <&pinctrl_dbgu>;
222 clocks = <&mck>;
223 clock-names = "usart";
224 status = "disabled";
225 };
226
227 pinctrl@fffff400 {
228 #address-cells = <1>;
229 #size-cells = <1>;
230 compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
231 ranges = <0xfffff400 0xfffff400 0x800>;
232
233 atmel,mux-mask =
234 /* A B */
235 <0xffffffff 0xe05c6738>, /* pioA */
236 <0xffffffff 0x0000c780>, /* pioB */
237 <0xffffffff 0xe3ffff0e>, /* pioC */
238 <0x003fffff 0x0001ff3c>; /* pioD */
239
240 /* shared pinctrl settings */
241 dbgu {
242 pinctrl_dbgu: dbgu-0 {
243 atmel,pins =
244 <AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE>,
245 <AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
246 };
247 };
248
249 i2c_gpio0 {
250 pinctrl_i2c_gpio0: i2c_gpio0-0 {
251 atmel,pins =
252 <AT91_PIOA 23 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>,
253 <AT91_PIOA 24 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
254 };
255 };
256
257 i2c_gpio1 {
258 pinctrl_i2c_gpio1: i2c_gpio1-0 {
259 atmel,pins =
260 <AT91_PIOD 10 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>,
261 <AT91_PIOD 11 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
262 };
263 };
264
265 mmc0 {
266 pinctrl_mmc0_clk: mmc0_clk-0 {
267 atmel,pins =
268 <AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>;
269 };
270
271 pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 {
272 atmel,pins =
273 <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
274 <AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
275 };
276
277 pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
278 atmel,pins =
279 <AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
280 <AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
281 <AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
282 };
283 };
284
285 nand {
286 pinctrl_nand: nand-0 {
287 atmel,pins =
288 <AT91_PIOD 17 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>,
289 <AT91_PIOB 6 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
290 };
291
292 pinctrl_nand0_ale_cle: nand_ale_cle-0 {
293 atmel,pins =
294 <AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE>,
295 <AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE>;
296 };
297
298 pinctrl_nand0_oe_we: nand_oe_we-0 {
299 atmel,pins =
300 <AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE>,
301 <AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE>;
302 };
303
304 pinctrl_nand0_cs: nand_cs-0 {
305 atmel,pins =
306 <AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE>;
307 };
308 };
309
310 ssc0 {
311 pinctrl_ssc0_tx: ssc0_tx-0 {
312 atmel,pins =
313 <AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE>,
314 <AT91_PIOC 0 AT91_PERIPH_A AT91_PINCTRL_NONE>,
315 <AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE>;
316 };
317
318 pinctrl_ssc0_rx: ssc0_rx-0 {
319 atmel,pins =
320 <AT91_PIOA 10 AT91_PERIPH_B AT91_PINCTRL_NONE>,
321 <AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_NONE>,
322 <AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE>;
323 };
324 };
325
326 ssc1 {
327 pinctrl_ssc1_tx: ssc1_tx-0 {
328 atmel,pins =
329 <AT91_PIOA 13 AT91_PERIPH_B AT91_PINCTRL_NONE>,
330 <AT91_PIOA 29 AT91_PERIPH_B AT91_PINCTRL_NONE>,
331 <AT91_PIOA 30 AT91_PERIPH_B AT91_PINCTRL_NONE>;
332 };
333
334 pinctrl_ssc1_rx: ssc1_rx-0 {
335 atmel,pins =
336 <AT91_PIOA 8 AT91_PERIPH_B AT91_PINCTRL_NONE>,
337 <AT91_PIOA 9 AT91_PERIPH_B AT91_PINCTRL_NONE>,
338 <AT91_PIOA 14 AT91_PERIPH_B AT91_PINCTRL_NONE>;
339 };
340 };
341
342 spi0 {
343 pinctrl_spi0: spi0-0 {
344 atmel,pins =
345 <AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE>,
346 <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE>,
347 <AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE>;
348 };
349 };
350
351 tcb0 {
352 pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
353 atmel,pins = <AT91_PIOA 3 AT91_PERIPH_B AT91_PINCTRL_NONE>;
354 };
355
356 pinctrl_tcb0_tclk1: tcb0_tclk1-0 {
357 atmel,pins = <AT91_PIOC 31 AT91_PERIPH_B AT91_PINCTRL_NONE>;
358 };
359
360 pinctrl_tcb0_tclk2: tcb0_tclk2-0 {
361 atmel,pins = <AT91_PIOD 21 AT91_PERIPH_A AT91_PINCTRL_NONE>;
362 };
363
364 pinctrl_tcb0_tioa0: tcb0_tioa0-0 {
365 atmel,pins = <AT91_PIOA 4 AT91_PERIPH_B AT91_PINCTRL_NONE>;
366 };
367
368 pinctrl_tcb0_tioa1: tcb0_tioa1-0 {
369 atmel,pins = <AT91_PIOC 29 AT91_PERIPH_B AT91_PINCTRL_NONE>;
370 };
371
372 pinctrl_tcb0_tioa2: tcb0_tioa2-0 {
373 atmel,pins = <AT91_PIOD 10 AT91_PERIPH_B AT91_PINCTRL_NONE>;
374 };
375
376 pinctrl_tcb0_tiob0: tcb0_tiob0-0 {
377 atmel,pins = <AT91_PIOA 5 AT91_PERIPH_B AT91_PINCTRL_NONE>;
378 };
379
380 pinctrl_tcb0_tiob1: tcb0_tiob1-0 {
381 atmel,pins = <AT91_PIOC 30 AT91_PERIPH_B AT91_PINCTRL_NONE>;
382 };
383
384 pinctrl_tcb0_tiob2: tcb0_tiob2-0 {
385 atmel,pins = <AT91_PIOD 11 AT91_PERIPH_B AT91_PINCTRL_NONE>;
386 };
387 };
388
389 usart0 {
390 pinctrl_usart0: usart0-0 {
391 atmel,pins =
392 <AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE>,
393 <AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
394 };
395
396 pinctrl_usart0_rts: usart0_rts-0 {
397 atmel,pins =
398 <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE>;
399 };
400
401 pinctrl_usart0_cts: usart0_cts-0 {
402 atmel,pins =
403 <AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE>;
404 };
405
406 pinctrl_usart0_dtr_dsr: usart0_dtr_dsr-0 {
407 atmel,pins =
408 <AT91_PIOD 14 AT91_PERIPH_A AT91_PINCTRL_NONE>,
409 <AT91_PIOD 15 AT91_PERIPH_A AT91_PINCTRL_NONE>;
410 };
411
412 pinctrl_usart0_dcd: usart0_dcd-0 {
413 atmel,pins =
414 <AT91_PIOD 16 AT91_PERIPH_A AT91_PINCTRL_NONE>;
415 };
416
417 pinctrl_usart0_ri: usart0_ri-0 {
418 atmel,pins =
419 <AT91_PIOD 17 AT91_PERIPH_A AT91_PINCTRL_NONE>;
420 };
421
422 pinctrl_usart0_sck: usart0_sck-0 {
423 atmel,pins =
424 <AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE>;
425 };
426 };
427
428 usart1 {
429 pinctrl_usart1: usart1-0 {
430 atmel,pins =
431 <AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
432 <AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE>;
433 };
434
435 pinctrl_usart1_rts: usart1_rts-0 {
436 atmel,pins =
437 <AT91_PIOA 18 AT91_PERIPH_B AT91_PINCTRL_NONE>;
438 };
439
440 pinctrl_usart1_cts: usart1_cts-0 {
441 atmel,pins =
442 <AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_NONE>;
443 };
444
445 pinctrl_usart1_sck: usart1_sck-0 {
446 atmel,pins =
447 <AT91_PIOD 2 AT91_PERIPH_B AT91_PINCTRL_NONE>;
448 };
449 };
450
451 usart2 {
452 pinctrl_usart2: usart2-0 {
453 atmel,pins =
454 <AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
455 <AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE>;
456 };
457
458 pinctrl_usart2_rts: usart2_rts-0 {
459 atmel,pins =
460 <AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE>;
461 };
462
463 pinctrl_usart2_cts: usart2_cts-0 {
464 atmel,pins =
465 <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_NONE>;
466 };
467
468 pinctrl_usart2_sck: usart2_sck-0 {
469 atmel,pins =
470 <AT91_PIOD 9 AT91_PERIPH_A AT91_PINCTRL_NONE>;
471 };
472 };
473
474 usart3 {
475 pinctrl_usart3: usart3-0 {
476 atmel,pins =
477 <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
478 <AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE>;
479 };
480
481 pinctrl_usart3_rts: usart3_rts-0 {
482 atmel,pins =
483 <AT91_PIOD 4 AT91_PERIPH_B AT91_PINCTRL_NONE>;
484 };
485
486 pinctrl_usart3_cts: usart3_cts-0 {
487 atmel,pins =
488 <AT91_PIOD 3 AT91_PERIPH_B AT91_PINCTRL_NONE>;
489 };
490
491 pinctrl_usart3_sck: usart3_sck-0 {
492 atmel,pins =
493 <AT91_PIOA 20 AT91_PERIPH_B AT91_PINCTRL_NONE>;
494 };
495 };
496
497 pioA: gpio@fffff400 {
498 compatible = "atmel,at91rm9200-gpio";
499 reg = <0xfffff400 0x200>;
500 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
501 #gpio-cells = <2>;
502 gpio-controller;
503 interrupt-controller;
504 #interrupt-cells = <2>;
505 clocks = <&pioA_clk>;
506 };
507
508 pioB: gpio@fffff600 {
509 compatible = "atmel,at91rm9200-gpio";
510 reg = <0xfffff600 0x200>;
511 interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
512 #gpio-cells = <2>;
513 gpio-controller;
514 interrupt-controller;
515 #interrupt-cells = <2>;
516 clocks = <&pioB_clk>;
517 };
518
519 pioC: gpio@fffff800 {
520 compatible = "atmel,at91rm9200-gpio";
521 reg = <0xfffff800 0x200>;
522 interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
523 #gpio-cells = <2>;
524 gpio-controller;
525 interrupt-controller;
526 #interrupt-cells = <2>;
527 clocks = <&pioC_clk>;
528 };
529
530 pioD: gpio@fffffa00 {
531 compatible = "atmel,at91rm9200-gpio";
532 reg = <0xfffffa00 0x200>;
533 interrupts = <5 IRQ_TYPE_LEVEL_HIGH 1>;
534 #gpio-cells = <2>;
535 gpio-controller;
536 interrupt-controller;
537 #interrupt-cells = <2>;
538 clocks = <&pioD_clk>;
539 };
540 };
541
542 pmc: pmc@fffffc00 {
543 compatible = "atmel,at91sam9g45-pmc";
544 reg = <0xfffffc00 0x100>;
545 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
546 interrupt-controller;
547 #address-cells = <1>;
548 #size-cells = <0>;
549 #interrupt-cells = <1>;
550
551 clk32k: slck {
552 compatible = "fixed-clock";
553 #clock-cells = <0>;
554 clock-frequency = <32768>;
555 };
556
557 main: mainck {
558 compatible = "atmel,at91rm9200-clk-main";
559 #clock-cells = <0>;
560 interrupts-extended = <&pmc AT91_PMC_MOSCS>;
561 clocks = <&clk32k>;
562 };
563
564 plla: pllack {
565 compatible = "atmel,at91rm9200-clk-pll";
566 #clock-cells = <0>;
567 interrupts-extended = <&pmc AT91_PMC_LOCKA>;
568 clocks = <&main>;
569 reg = <0>;
570 atmel,clk-input-range = <1000000 32000000>;
571 #atmel,pll-clk-output-range-cells = <4>;
572 atmel,pll-clk-output-ranges = <80000000 200000000 190000000 240000000>;
573 };
574
575 utmi: utmick {
576 compatible = "atmel,at91sam9x5-clk-utmi";
577 #clock-cells = <0>;
578 interrupt-parent = <&pmc>;
579 interrupts = <AT91_PMC_LOCKU>;
580 clocks = <&main>;
581 };
582
583 mck: masterck {
584 compatible = "atmel,at91rm9200-clk-master";
585 #clock-cells = <0>;
586 interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
587 clocks = <&clk32k>, <&main>, <&plla>, <&utmi>;
588 atmel,clk-output-range = <0 94000000>;
589 atmel,clk-divisors = <1 2 4 3>;
590 };
591
592 prog: progck {
593 compatible = "atmel,at91rm9200-clk-programmable";
594 #address-cells = <1>;
595 #size-cells = <0>;
596 interrupt-parent = <&pmc>;
597 clocks = <&clk32k>, <&main>, <&plla>, <&utmi>, <&mck>;
598
599 prog0: prog0 {
600 #clock-cells = <0>;
601 reg = <0>;
602 interrupts = <AT91_PMC_PCKRDY(0)>;
603 };
604
605 prog1: prog1 {
606 #clock-cells = <0>;
607 reg = <1>;
608 interrupts = <AT91_PMC_PCKRDY(1)>;
609 };
610 };
611
612 systemck {
613 compatible = "atmel,at91rm9200-clk-system";
614 #address-cells = <1>;
615 #size-cells = <0>;
616
617 pck0: pck0 {
618 #clock-cells = <0>;
619 reg = <8>;
620 clocks = <&prog0>;
621 };
622
623 pck1: pck1 {
624 #clock-cells = <0>;
625 reg = <9>;
626 clocks = <&prog1>;
627 };
628
629 };
630
631 periphck {
632 compatible = "atmel,at91rm9200-clk-peripheral";
633 #address-cells = <1>;
634 #size-cells = <0>;
635 clocks = <&mck>;
636
637 pioA_clk: pioA_clk {
638 #clock-cells = <0>;
639 reg = <2>;
640 };
641
642 pioB_clk: pioB_clk {
643 #clock-cells = <0>;
644 reg = <3>;
645 };
646
647 pioC_clk: pioC_clk {
648 #clock-cells = <0>;
649 reg = <4>;
650 };
651
652 pioD_clk: pioD_clk {
653 #clock-cells = <0>;
654 reg = <5>;
655 };
656
657 usart0_clk: usart0_clk {
658 #clock-cells = <0>;
659 reg = <6>;
660 };
661
662 usart1_clk: usart1_clk {
663 #clock-cells = <0>;
664 reg = <7>;
665 };
666
667 usart2_clk: usart2_clk {
668 #clock-cells = <0>;
669 reg = <8>;
670 };
671
672 usart3_clk: usart3_clk {
673 #clock-cells = <0>;
674 reg = <9>;
675 };
676
677 mci0_clk: mci0_clk {
678 #clock-cells = <0>;
679 reg = <10>;
680 };
681
682 twi0_clk: twi0_clk {
683 #clock-cells = <0>;
684 reg = <11>;
685 };
686
687 twi1_clk: twi1_clk {
688 #clock-cells = <0>;
689 reg = <12>;
690 };
691
692 spi0_clk: spi0_clk {
693 #clock-cells = <0>;
694 reg = <13>;
695 };
696
697 ssc0_clk: ssc0_clk {
698 #clock-cells = <0>;
699 reg = <14>;
700 };
701
702 ssc1_clk: ssc1_clk {
703 #clock-cells = <0>;
704 reg = <15>;
705 };
706
707 tc0_clk: tc0_clk {
708 #clock-cells = <0>;
709 reg = <16>;
710 };
711
712 tc1_clk: tc1_clk {
713 #clock-cells = <0>;
714 reg = <17>;
715 };
716
717 tc2_clk: tc2_clk {
718 #clock-cells = <0>;
719 reg = <18>;
720 };
721
722 pwm_clk: pwm_clk {
723 #clock-cells = <0>;
724 reg = <19>;
725 };
726
727 adc_clk: adc_clk {
728 #clock-cells = <0>;
729 reg = <20>;
730 };
731
732 dma0_clk: dma0_clk {
733 #clock-cells = <0>;
734 reg = <21>;
735 };
736
737 udphs_clk: udphs_clk {
738 #clock-cells = <0>;
739 reg = <22>;
740 };
741
742 lcd_clk: lcd_clk {
743 #clock-cells = <0>;
744 reg = <23>;
745 };
746 };
747 };
748
749 rstc@fffffd00 {
750 compatible = "atmel,at91sam9260-rstc";
751 reg = <0xfffffd00 0x10>;
752 };
753
754 shdwc@fffffd10 {
755 compatible = "atmel,at91sam9260-shdwc";
756 reg = <0xfffffd10 0x10>;
757 };
758
759 pit: timer@fffffd30 {
760 compatible = "atmel,at91sam9260-pit";
761 reg = <0xfffffd30 0xf>;
762 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
763 clocks = <&mck>;
764 };
765
766 watchdog@fffffd40 {
767 compatible = "atmel,at91sam9260-wdt";
768 reg = <0xfffffd40 0x10>;
769 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
770 status = "disabled";
771 };
772 };
773 };
774
775 i2c@0 {
776 compatible = "i2c-gpio";
777 gpios = <&pioA 23 GPIO_ACTIVE_HIGH>, /* sda */
778 <&pioA 24 GPIO_ACTIVE_HIGH>; /* scl */
779 i2c-gpio,sda-open-drain;
780 i2c-gpio,scl-open-drain;
781 i2c-gpio,delay-us = <2>; /* ~100 kHz */
782 #address-cells = <1>;
783 #size-cells = <0>;
784 pinctrl-names = "default";
785 pinctrl-0 = <&pinctrl_i2c_gpio0>;
786 status = "disabled";
787 };
788
789 i2c@1 {
790 compatible = "i2c-gpio";
791 gpios = <&pioD 10 GPIO_ACTIVE_HIGH>, /* sda */
792 <&pioD 11 GPIO_ACTIVE_HIGH>; /* scl */
793 i2c-gpio,sda-open-drain;
794 i2c-gpio,scl-open-drain;
795 i2c-gpio,delay-us = <2>; /* ~100 kHz */
796 #address-cells = <1>;
797 #size-cells = <0>;
798 pinctrl-names = "default";
799 pinctrl-0 = <&pinctrl_i2c_gpio1>;
800 status = "disabled";
801 };
802};
diff --git a/arch/arm/boot/dts/at91sam9rlek.dts b/arch/arm/boot/dts/at91sam9rlek.dts
new file mode 100644
index 000000000000..cddb37825fad
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9rlek.dts
@@ -0,0 +1,157 @@
1/*
2 * at91sam9rlek.dts - Device Tree file for Atmel at91sam9rl reference board
3 *
4 * Copyright (C) 2014 Alexandre Belloni <alexandre.belloni@free-electrons.com>
5 *
6 * Licensed under GPLv2 only
7 */
8/dts-v1/;
9#include "at91sam9rl.dtsi"
10
11/ {
12 model = "Atmel at91sam9rlek";
13 compatible = "atmel,at91sam9rlek", "atmel,at91sam9rl", "atmel,at91sam9";
14
15 chosen {
16 bootargs = "console=ttyS0,115200 rootfstype=ubifs root=ubi0:rootfs ubi.mtd=5 rw";
17 };
18
19 memory {
20 reg = <0x20000000 0x4000000>;
21 };
22
23 clocks {
24 #address-cells = <1>;
25 #size-cells = <1>;
26 ranges;
27
28 main_clock: clock {
29 compatible = "atmel,osc", "fixed-clock";
30 clock-frequency = <12000000>;
31 };
32 };
33
34 ahb {
35 nand0: nand@40000000 {
36 nand-bus-width = <8>;
37 nand-ecc-mode = "soft";
38 nand-on-flash-bbt = <1>;
39 status = "okay";
40
41 at91bootstrap@0 {
42 label = "at91bootstrap";
43 reg = <0x0 0x40000>;
44 };
45
46 bootloader@40000 {
47 label = "bootloader";
48 reg = <0x40000 0x80000>;
49 };
50
51 bootloaderenv@c0000 {
52 label = "bootloader env";
53 reg = <0xc0000 0xc0000>;
54 };
55
56 dtb@180000 {
57 label = "device tree";
58 reg = <0x180000 0x80000>;
59 };
60
61 kernel@200000 {
62 label = "kernel";
63 reg = <0x200000 0x600000>;
64 };
65
66 rootfs@800000 {
67 label = "rootfs";
68 reg = <0x800000 0x0f800000>;
69 };
70 };
71
72 apb {
73 mmc0: mmc@fffa4000 {
74 pinctrl-0 = <
75 &pinctrl_board_mmc0
76 &pinctrl_mmc0_clk
77 &pinctrl_mmc0_slot0_cmd_dat0
78 &pinctrl_mmc0_slot0_dat1_3>;
79 status = "okay";
80 slot@0 {
81 reg = <0>;
82 bus-width = <4>;
83 cd-gpios = <&pioA 15 GPIO_ACTIVE_HIGH>;
84 };
85 };
86
87 usart0: serial@fffb0000 {
88 pinctrl-0 = <
89 &pinctrl_usart0
90 &pinctrl_usart0_rts
91 &pinctrl_usart0_cts>;
92 status = "okay";
93 };
94
95 dbgu: serial@fffff200 {
96 status = "okay";
97 };
98
99 pinctrl@fffff400 {
100 mmc0 {
101 pinctrl_board_mmc0: mmc0-board {
102 atmel,pins =
103 <AT91_PIOA 15 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
104 };
105 };
106 };
107
108 pmc: pmc@fffffc00 {
109 main: mainck {
110 clock-frequency = <12000000>;
111 };
112 };
113
114 watchdog@fffffd40 {
115 status = "okay";
116 };
117 };
118 };
119
120 leds {
121 compatible = "gpio-leds";
122
123 ds1 {
124 label = "ds1";
125 gpios = <&pioD 15 GPIO_ACTIVE_LOW>;
126 };
127
128 ds2 {
129 label = "ds2";
130 gpios = <&pioD 16 GPIO_ACTIVE_LOW>;
131 };
132
133 ds3 {
134 label = "ds3";
135 gpios = <&pioD 14 GPIO_ACTIVE_HIGH>;
136 linux,default-trigger = "heartbeat";
137 };
138 };
139
140 gpio_keys {
141 compatible = "gpio-keys";
142
143 right_click {
144 label = "right_click";
145 gpios = <&pioB 0 GPIO_ACTIVE_LOW>;
146 linux,code = <273>;
147 gpio-key,wakeup;
148 };
149
150 left_click {
151 label = "left_click";
152 gpios = <&pioB 1 GPIO_ACTIVE_LOW>;
153 linux,code = <272>;
154 gpio-key,wakeup;
155 };
156 };
157};
diff --git a/arch/arm/boot/dts/atlas6.dtsi b/arch/arm/boot/dts/atlas6.dtsi
index 0c81dc945aed..55d3f79c2ef5 100644
--- a/arch/arm/boot/dts/atlas6.dtsi
+++ b/arch/arm/boot/dts/atlas6.dtsi
@@ -65,9 +65,10 @@
65 #clock-cells = <1>; 65 #clock-cells = <1>;
66 }; 66 };
67 67
68 reset-controller@88010000 { 68 rstc: reset-controller@88010000 {
69 compatible = "sirf,prima2-rstc"; 69 compatible = "sirf,prima2-rstc";
70 reg = <0x88010000 0x1000>; 70 reg = <0x88010000 0x1000>;
71 #reset-cells = <1>;
71 }; 72 };
72 73
73 rsc-controller@88020000 { 74 rsc-controller@88020000 {
diff --git a/arch/arm/boot/dts/marco.dtsi b/arch/arm/boot/dts/marco.dtsi
index 1579c3491ccd..0c9647d28765 100644
--- a/arch/arm/boot/dts/marco.dtsi
+++ b/arch/arm/boot/dts/marco.dtsi
@@ -58,9 +58,10 @@
58 #size-cells = <1>; 58 #size-cells = <1>;
59 ranges = <0xc2000000 0xc2000000 0x1000000>; 59 ranges = <0xc2000000 0xc2000000 0x1000000>;
60 60
61 reset-controller@c2000000 { 61 rstc: reset-controller@c2000000 {
62 compatible = "sirf,marco-rstc"; 62 compatible = "sirf,marco-rstc";
63 reg = <0xc2000000 0x10000>; 63 reg = <0xc2000000 0x10000>;
64 #reset-cells = <1>;
64 }; 65 };
65 }; 66 };
66 67
diff --git a/arch/arm/boot/dts/prima2.dtsi b/arch/arm/boot/dts/prima2.dtsi
index 8582ae41a583..20145526cd7b 100644
--- a/arch/arm/boot/dts/prima2.dtsi
+++ b/arch/arm/boot/dts/prima2.dtsi
@@ -76,9 +76,10 @@
76 #clock-cells = <1>; 76 #clock-cells = <1>;
77 }; 77 };
78 78
79 reset-controller@88010000 { 79 rstc: reset-controller@88010000 {
80 compatible = "sirf,prima2-rstc"; 80 compatible = "sirf,prima2-rstc";
81 reg = <0x88010000 0x1000>; 81 reg = <0x88010000 0x1000>;
82 #reset-cells = <1>;
82 }; 83 };
83 84
84 rsc-controller@88020000 { 85 rsc-controller@88020000 {
diff --git a/arch/arm/boot/dts/qcom-msm8660-surf.dts b/arch/arm/boot/dts/qcom-msm8660-surf.dts
index 68a72f5507b9..169bad90dac9 100644
--- a/arch/arm/boot/dts/qcom-msm8660-surf.dts
+++ b/arch/arm/boot/dts/qcom-msm8660-surf.dts
@@ -1,63 +1,6 @@
1/dts-v1/; 1#include "qcom-msm8660.dtsi"
2
3/include/ "skeleton.dtsi"
4
5#include <dt-bindings/clock/qcom,gcc-msm8660.h>
6 2
7/ { 3/ {
8 model = "Qualcomm MSM8660 SURF"; 4 model = "Qualcomm MSM8660 SURF";
9 compatible = "qcom,msm8660-surf", "qcom,msm8660"; 5 compatible = "qcom,msm8660-surf", "qcom,msm8660";
10 interrupt-parent = <&intc>;
11
12 intc: interrupt-controller@2080000 {
13 compatible = "qcom,msm-8660-qgic";
14 interrupt-controller;
15 #interrupt-cells = <3>;
16 reg = < 0x02080000 0x1000 >,
17 < 0x02081000 0x1000 >;
18 };
19
20 timer@2000000 {
21 compatible = "qcom,scss-timer", "qcom,msm-timer";
22 interrupts = <1 0 0x301>,
23 <1 1 0x301>,
24 <1 2 0x301>;
25 reg = <0x02000000 0x100>;
26 clock-frequency = <27000000>,
27 <32768>;
28 cpu-offset = <0x40000>;
29 };
30
31 msmgpio: gpio@800000 {
32 compatible = "qcom,msm-gpio";
33 reg = <0x00800000 0x4000>;
34 gpio-controller;
35 #gpio-cells = <2>;
36 ngpio = <173>;
37 interrupts = <0 16 0x4>;
38 interrupt-controller;
39 #interrupt-cells = <2>;
40 };
41
42 gcc: clock-controller@900000 {
43 compatible = "qcom,gcc-msm8660";
44 #clock-cells = <1>;
45 #reset-cells = <1>;
46 reg = <0x900000 0x4000>;
47 };
48
49 serial@19c40000 {
50 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
51 reg = <0x19c40000 0x1000>,
52 <0x19c00000 0x1000>;
53 interrupts = <0 195 0x0>;
54 clocks = <&gcc GSBI12_UART_CLK>, <&gcc GSBI12_H_CLK>;
55 clock-names = "core", "iface";
56 };
57
58 qcom,ssbi@500000 {
59 compatible = "qcom,ssbi";
60 reg = <0x500000 0x1000>;
61 qcom,controller-type = "pmic-arbiter";
62 };
63}; 6};
diff --git a/arch/arm/boot/dts/qcom-msm8660.dtsi b/arch/arm/boot/dts/qcom-msm8660.dtsi
new file mode 100644
index 000000000000..69d6c4edea30
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-msm8660.dtsi
@@ -0,0 +1,63 @@
1/dts-v1/;
2
3/include/ "skeleton.dtsi"
4
5#include <dt-bindings/clock/qcom,gcc-msm8660.h>
6
7/ {
8 model = "Qualcomm MSM8660";
9 compatible = "qcom,msm8660";
10 interrupt-parent = <&intc>;
11
12 intc: interrupt-controller@2080000 {
13 compatible = "qcom,msm-8660-qgic";
14 interrupt-controller;
15 #interrupt-cells = <3>;
16 reg = < 0x02080000 0x1000 >,
17 < 0x02081000 0x1000 >;
18 };
19
20 timer@2000000 {
21 compatible = "qcom,scss-timer", "qcom,msm-timer";
22 interrupts = <1 0 0x301>,
23 <1 1 0x301>,
24 <1 2 0x301>;
25 reg = <0x02000000 0x100>;
26 clock-frequency = <27000000>,
27 <32768>;
28 cpu-offset = <0x40000>;
29 };
30
31 msmgpio: gpio@800000 {
32 compatible = "qcom,msm-gpio";
33 reg = <0x00800000 0x4000>;
34 gpio-controller;
35 #gpio-cells = <2>;
36 ngpio = <173>;
37 interrupts = <0 16 0x4>;
38 interrupt-controller;
39 #interrupt-cells = <2>;
40 };
41
42 gcc: clock-controller@900000 {
43 compatible = "qcom,gcc-msm8660";
44 #clock-cells = <1>;
45 #reset-cells = <1>;
46 reg = <0x900000 0x4000>;
47 };
48
49 serial@19c40000 {
50 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
51 reg = <0x19c40000 0x1000>,
52 <0x19c00000 0x1000>;
53 interrupts = <0 195 0x0>;
54 clocks = <&gcc GSBI12_UART_CLK>, <&gcc GSBI12_H_CLK>;
55 clock-names = "core", "iface";
56 };
57
58 qcom,ssbi@500000 {
59 compatible = "qcom,ssbi";
60 reg = <0x500000 0x1000>;
61 qcom,controller-type = "pmic-arbiter";
62 };
63};
diff --git a/arch/arm/boot/dts/qcom-msm8960-cdp.dts b/arch/arm/boot/dts/qcom-msm8960-cdp.dts
index 7c30de4fa302..a58fb88315f6 100644
--- a/arch/arm/boot/dts/qcom-msm8960-cdp.dts
+++ b/arch/arm/boot/dts/qcom-msm8960-cdp.dts
@@ -1,70 +1,6 @@
1/dts-v1/; 1#include "qcom-msm8960.dtsi"
2
3/include/ "skeleton.dtsi"
4
5#include <dt-bindings/clock/qcom,gcc-msm8960.h>
6 2
7/ { 3/ {
8 model = "Qualcomm MSM8960 CDP"; 4 model = "Qualcomm MSM8960 CDP";
9 compatible = "qcom,msm8960-cdp", "qcom,msm8960"; 5 compatible = "qcom,msm8960-cdp", "qcom,msm8960";
10 interrupt-parent = <&intc>;
11
12 intc: interrupt-controller@2000000 {
13 compatible = "qcom,msm-qgic2";
14 interrupt-controller;
15 #interrupt-cells = <3>;
16 reg = < 0x02000000 0x1000 >,
17 < 0x02002000 0x1000 >;
18 };
19
20 timer@200a000 {
21 compatible = "qcom,kpss-timer", "qcom,msm-timer";
22 interrupts = <1 1 0x301>,
23 <1 2 0x301>,
24 <1 3 0x301>;
25 reg = <0x0200a000 0x100>;
26 clock-frequency = <27000000>,
27 <32768>;
28 cpu-offset = <0x80000>;
29 };
30
31 msmgpio: gpio@800000 {
32 compatible = "qcom,msm-gpio";
33 gpio-controller;
34 #gpio-cells = <2>;
35 ngpio = <150>;
36 interrupts = <0 16 0x4>;
37 interrupt-controller;
38 #interrupt-cells = <2>;
39 reg = <0x800000 0x4000>;
40 };
41
42 gcc: clock-controller@900000 {
43 compatible = "qcom,gcc-msm8960";
44 #clock-cells = <1>;
45 #reset-cells = <1>;
46 reg = <0x900000 0x4000>;
47 };
48
49 clock-controller@4000000 {
50 compatible = "qcom,mmcc-msm8960";
51 reg = <0x4000000 0x1000>;
52 #clock-cells = <1>;
53 #reset-cells = <1>;
54 };
55
56 serial@16440000 {
57 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
58 reg = <0x16440000 0x1000>,
59 <0x16400000 0x1000>;
60 interrupts = <0 154 0x0>;
61 clocks = <&gcc GSBI5_UART_CLK>, <&gcc GSBI5_H_CLK>;
62 clock-names = "core", "iface";
63 };
64
65 qcom,ssbi@500000 {
66 compatible = "qcom,ssbi";
67 reg = <0x500000 0x1000>;
68 qcom,controller-type = "pmic-arbiter";
69 };
70}; 6};
diff --git a/arch/arm/boot/dts/qcom-msm8960.dtsi b/arch/arm/boot/dts/qcom-msm8960.dtsi
new file mode 100644
index 000000000000..ff002826552a
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-msm8960.dtsi
@@ -0,0 +1,70 @@
1/dts-v1/;
2
3/include/ "skeleton.dtsi"
4
5#include <dt-bindings/clock/qcom,gcc-msm8960.h>
6
7/ {
8 model = "Qualcomm MSM8960";
9 compatible = "qcom,msm8960";
10 interrupt-parent = <&intc>;
11
12 intc: interrupt-controller@2000000 {
13 compatible = "qcom,msm-qgic2";
14 interrupt-controller;
15 #interrupt-cells = <3>;
16 reg = < 0x02000000 0x1000 >,
17 < 0x02002000 0x1000 >;
18 };
19
20 timer@200a000 {
21 compatible = "qcom,kpss-timer", "qcom,msm-timer";
22 interrupts = <1 1 0x301>,
23 <1 2 0x301>,
24 <1 3 0x301>;
25 reg = <0x0200a000 0x100>;
26 clock-frequency = <27000000>,
27 <32768>;
28 cpu-offset = <0x80000>;
29 };
30
31 msmgpio: gpio@800000 {
32 compatible = "qcom,msm-gpio";
33 gpio-controller;
34 #gpio-cells = <2>;
35 ngpio = <150>;
36 interrupts = <0 16 0x4>;
37 interrupt-controller;
38 #interrupt-cells = <2>;
39 reg = <0x800000 0x4000>;
40 };
41
42 gcc: clock-controller@900000 {
43 compatible = "qcom,gcc-msm8960";
44 #clock-cells = <1>;
45 #reset-cells = <1>;
46 reg = <0x900000 0x4000>;
47 };
48
49 clock-controller@4000000 {
50 compatible = "qcom,mmcc-msm8960";
51 reg = <0x4000000 0x1000>;
52 #clock-cells = <1>;
53 #reset-cells = <1>;
54 };
55
56 serial@16440000 {
57 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
58 reg = <0x16440000 0x1000>,
59 <0x16400000 0x1000>;
60 interrupts = <0 154 0x0>;
61 clocks = <&gcc GSBI5_UART_CLK>, <&gcc GSBI5_H_CLK>;
62 clock-names = "core", "iface";
63 };
64
65 qcom,ssbi@500000 {
66 compatible = "qcom,ssbi";
67 reg = <0x500000 0x1000>;
68 qcom,controller-type = "pmic-arbiter";
69 };
70};
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig
index 0b4e9b5210d8..300ded9acbe9 100644
--- a/arch/arm/configs/at91_dt_defconfig
+++ b/arch/arm/configs/at91_dt_defconfig
@@ -16,10 +16,12 @@ CONFIG_MODULE_UNLOAD=y
16CONFIG_ARCH_AT91=y 16CONFIG_ARCH_AT91=y
17CONFIG_SOC_AT91RM9200=y 17CONFIG_SOC_AT91RM9200=y
18CONFIG_SOC_AT91SAM9260=y 18CONFIG_SOC_AT91SAM9260=y
19CONFIG_SOC_AT91SAM9261=y
19CONFIG_SOC_AT91SAM9263=y 20CONFIG_SOC_AT91SAM9263=y
20CONFIG_SOC_AT91SAM9G45=y 21CONFIG_SOC_AT91SAM9G45=y
21CONFIG_SOC_AT91SAM9X5=y 22CONFIG_SOC_AT91SAM9X5=y
22CONFIG_SOC_AT91SAM9N12=y 23CONFIG_SOC_AT91SAM9N12=y
24CONFIG_SOC_AT91SAM9RL=y
23CONFIG_MACH_AT91RM9200_DT=y 25CONFIG_MACH_AT91RM9200_DT=y
24CONFIG_MACH_AT91SAM9_DT=y 26CONFIG_MACH_AT91SAM9_DT=y
25CONFIG_AT91_TIMER_HZ=128 27CONFIG_AT91_TIMER_HZ=128
@@ -119,6 +121,7 @@ CONFIG_INPUT_EVDEV=y
119CONFIG_KEYBOARD_GPIO=y 121CONFIG_KEYBOARD_GPIO=y
120# CONFIG_INPUT_MOUSE is not set 122# CONFIG_INPUT_MOUSE is not set
121CONFIG_INPUT_TOUCHSCREEN=y 123CONFIG_INPUT_TOUCHSCREEN=y
124CONFIG_TOUCHSCREEN_ADS7846=y
122# CONFIG_SERIO is not set 125# CONFIG_SERIO is not set
123CONFIG_LEGACY_PTY_COUNT=4 126CONFIG_LEGACY_PTY_COUNT=4
124CONFIG_SERIAL_ATMEL=y 127CONFIG_SERIAL_ATMEL=y
diff --git a/arch/arm/configs/at91sam9260_9g20_defconfig b/arch/arm/configs/at91sam9260_9g20_defconfig
index 2cd832918e9c..c4c160fc8791 100644
--- a/arch/arm/configs/at91sam9260_9g20_defconfig
+++ b/arch/arm/configs/at91sam9260_9g20_defconfig
@@ -3,6 +3,7 @@
3CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
4CONFIG_LOG_BUF_SHIFT=14 4CONFIG_LOG_BUF_SHIFT=14
5CONFIG_BLK_DEV_INITRD=y 5CONFIG_BLK_DEV_INITRD=y
6CONFIG_EMBEDDED=y
6CONFIG_SLAB=y 7CONFIG_SLAB=y
7CONFIG_MODULES=y 8CONFIG_MODULES=y
8CONFIG_MODULE_UNLOAD=y 9CONFIG_MODULE_UNLOAD=y
@@ -30,15 +31,12 @@ CONFIG_MACH_AT91SAM9_DT=y
30CONFIG_AT91_SLOW_CLOCK=y 31CONFIG_AT91_SLOW_CLOCK=y
31# CONFIG_ARM_THUMB is not set 32# CONFIG_ARM_THUMB is not set
32CONFIG_AEABI=y 33CONFIG_AEABI=y
33CONFIG_LEDS=y
34CONFIG_LEDS_CPU=y
35CONFIG_ZBOOT_ROM_TEXT=0x0 34CONFIG_ZBOOT_ROM_TEXT=0x0
36CONFIG_ZBOOT_ROM_BSS=0x0 35CONFIG_ZBOOT_ROM_BSS=0x0
37CONFIG_ARM_APPENDED_DTB=y 36CONFIG_ARM_APPENDED_DTB=y
38CONFIG_ARM_ATAG_DTB_COMPAT=y 37CONFIG_ARM_ATAG_DTB_COMPAT=y
39CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" 38CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
40CONFIG_AUTO_ZRELADDR=y 39CONFIG_AUTO_ZRELADDR=y
41CONFIG_FPE_NWFPE=y
42CONFIG_NET=y 40CONFIG_NET=y
43CONFIG_PACKET=y 41CONFIG_PACKET=y
44CONFIG_UNIX=y 42CONFIG_UNIX=y
@@ -57,15 +55,14 @@ CONFIG_DEVTMPFS_MOUNT=y
57CONFIG_MTD=y 55CONFIG_MTD=y
58CONFIG_MTD_CMDLINE_PARTS=y 56CONFIG_MTD_CMDLINE_PARTS=y
59CONFIG_MTD_OF_PARTS=y 57CONFIG_MTD_OF_PARTS=y
60CONFIG_MTD_CHAR=y
61CONFIG_MTD_BLOCK=y 58CONFIG_MTD_BLOCK=y
62CONFIG_MTD_DATAFLASH=y 59CONFIG_MTD_DATAFLASH=y
63CONFIG_MTD_NAND=y 60CONFIG_MTD_NAND=y
64CONFIG_MTD_NAND_ATMEL=y 61CONFIG_MTD_NAND_ATMEL=y
62CONFIG_MTD_UBI=y
65CONFIG_BLK_DEV_LOOP=y 63CONFIG_BLK_DEV_LOOP=y
66CONFIG_BLK_DEV_RAM=y 64CONFIG_BLK_DEV_RAM=y
67CONFIG_BLK_DEV_RAM_SIZE=8192 65CONFIG_BLK_DEV_RAM_SIZE=8192
68CONFIG_MISC_DEVICES=y
69CONFIG_EEPROM_AT25=y 66CONFIG_EEPROM_AT25=y
70CONFIG_SCSI=y 67CONFIG_SCSI=y
71CONFIG_BLK_DEV_SD=y 68CONFIG_BLK_DEV_SD=y
@@ -112,8 +109,6 @@ CONFIG_SND_PCM_OSS=y
112CONFIG_SND_SEQUENCER_OSS=y 109CONFIG_SND_SEQUENCER_OSS=y
113# CONFIG_SND_VERBOSE_PROCFS is not set 110# CONFIG_SND_VERBOSE_PROCFS is not set
114CONFIG_USB=y 111CONFIG_USB=y
115CONFIG_USB_DEVICEFS=y
116# CONFIG_USB_DEVICE_CLASS is not set
117CONFIG_USB_MON=y 112CONFIG_USB_MON=y
118CONFIG_USB_OHCI_HCD=y 113CONFIG_USB_OHCI_HCD=y
119CONFIG_USB_STORAGE=y 114CONFIG_USB_STORAGE=y
diff --git a/arch/arm/configs/at91sam9rl_defconfig b/arch/arm/configs/at91sam9rl_defconfig
index 7b6f131cecd6..85f846ae9ff2 100644
--- a/arch/arm/configs/at91sam9rl_defconfig
+++ b/arch/arm/configs/at91sam9rl_defconfig
@@ -1,8 +1,8 @@
1CONFIG_EXPERIMENTAL=y
2# CONFIG_LOCALVERSION_AUTO is not set 1# CONFIG_LOCALVERSION_AUTO is not set
3# CONFIG_SWAP is not set 2# CONFIG_SWAP is not set
4CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
5CONFIG_LOG_BUF_SHIFT=14 4CONFIG_LOG_BUF_SHIFT=14
5CONFIG_EMBEDDED=y
6CONFIG_BLK_DEV_INITRD=y 6CONFIG_BLK_DEV_INITRD=y
7CONFIG_SLAB=y 7CONFIG_SLAB=y
8CONFIG_MODULES=y 8CONFIG_MODULES=y
@@ -14,20 +14,23 @@ CONFIG_ARCH_AT91=y
14CONFIG_ARCH_AT91SAM9RL=y 14CONFIG_ARCH_AT91SAM9RL=y
15CONFIG_MACH_AT91SAM9RLEK=y 15CONFIG_MACH_AT91SAM9RLEK=y
16# CONFIG_ARM_THUMB is not set 16# CONFIG_ARM_THUMB is not set
17CONFIG_AEABI=y
17CONFIG_ZBOOT_ROM_TEXT=0x0 18CONFIG_ZBOOT_ROM_TEXT=0x0
18CONFIG_ZBOOT_ROM_BSS=0x0 19CONFIG_ZBOOT_ROM_BSS=0x0
19CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,17105363 root=/dev/ram0 rw" 20CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,17105363 root=/dev/ram0 rw"
20CONFIG_FPE_NWFPE=y 21CONFIG_AUTO_ZRELADDR=y
21CONFIG_NET=y 22CONFIG_NET=y
22CONFIG_UNIX=y 23CONFIG_UNIX=y
23CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 24CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
25CONFIG_DEVTMPFS=y
26CONFIG_DEVTMPFS_MOUNT=y
24CONFIG_MTD=y 27CONFIG_MTD=y
25CONFIG_MTD_CMDLINE_PARTS=y 28CONFIG_MTD_CMDLINE_PARTS=y
26CONFIG_MTD_CHAR=y
27CONFIG_MTD_BLOCK=y 29CONFIG_MTD_BLOCK=y
28CONFIG_MTD_DATAFLASH=y 30CONFIG_MTD_DATAFLASH=y
29CONFIG_MTD_NAND=y 31CONFIG_MTD_NAND=y
30CONFIG_MTD_NAND_ATMEL=y 32CONFIG_MTD_NAND_ATMEL=y
33CONFIG_MTD_UBI=y
31CONFIG_BLK_DEV_LOOP=y 34CONFIG_BLK_DEV_LOOP=y
32CONFIG_BLK_DEV_RAM=y 35CONFIG_BLK_DEV_RAM=y
33CONFIG_BLK_DEV_RAM_COUNT=4 36CONFIG_BLK_DEV_RAM_COUNT=4
@@ -66,6 +69,7 @@ CONFIG_EXT2_FS=y
66CONFIG_MSDOS_FS=y 69CONFIG_MSDOS_FS=y
67CONFIG_VFAT_FS=y 70CONFIG_VFAT_FS=y
68CONFIG_TMPFS=y 71CONFIG_TMPFS=y
72CONFIG_UBIFS_FS=y
69CONFIG_CRAMFS=y 73CONFIG_CRAMFS=y
70CONFIG_NLS_CODEPAGE_437=y 74CONFIG_NLS_CODEPAGE_437=y
71CONFIG_NLS_CODEPAGE_850=y 75CONFIG_NLS_CODEPAGE_850=y
diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig
index f43392dc2dcf..0302d293fba0 100644
--- a/arch/arm/configs/bcm2835_defconfig
+++ b/arch/arm/configs/bcm2835_defconfig
@@ -31,6 +31,7 @@ CONFIG_OPROFILE=y
31CONFIG_JUMP_LABEL=y 31CONFIG_JUMP_LABEL=y
32CONFIG_ARCH_MULTI_V6=y 32CONFIG_ARCH_MULTI_V6=y
33# CONFIG_ARCH_MULTI_V7 is not set 33# CONFIG_ARCH_MULTI_V7 is not set
34CONFIG_ARCH_BCM=y
34CONFIG_ARCH_BCM2835=y 35CONFIG_ARCH_BCM2835=y
35CONFIG_PREEMPT_VOLUNTARY=y 36CONFIG_PREEMPT_VOLUNTARY=y
36CONFIG_AEABI=y 37CONFIG_AEABI=y
diff --git a/arch/arm/configs/clps711x_defconfig b/arch/arm/configs/clps711x_defconfig
index 9e8c8316d6b0..0facf9da047c 100644
--- a/arch/arm/configs/clps711x_defconfig
+++ b/arch/arm/configs/clps711x_defconfig
@@ -15,7 +15,6 @@ CONFIG_ARCH_CDB89712=y
15CONFIG_ARCH_CLEP7312=y 15CONFIG_ARCH_CLEP7312=y
16CONFIG_ARCH_EDB7211=y 16CONFIG_ARCH_EDB7211=y
17CONFIG_ARCH_P720T=y 17CONFIG_ARCH_P720T=y
18CONFIG_ARCH_FORTUNET=y
19CONFIG_AEABI=y 18CONFIG_AEABI=y
20CONFIG_ZBOOT_ROM_TEXT=0x0 19CONFIG_ZBOOT_ROM_TEXT=0x0
21CONFIG_ZBOOT_ROM_BSS=0x0 20CONFIG_ZBOOT_ROM_BSS=0x0
@@ -27,7 +26,6 @@ CONFIG_INET=y
27# CONFIG_IPV6 is not set 26# CONFIG_IPV6 is not set
28CONFIG_IRDA=y 27CONFIG_IRDA=y
29CONFIG_IRTTY_SIR=y 28CONFIG_IRTTY_SIR=y
30CONFIG_EP7211_DONGLE=y
31# CONFIG_WIRELESS is not set 29# CONFIG_WIRELESS is not set
32CONFIG_MTD=y 30CONFIG_MTD=y
33CONFIG_MTD_CMDLINE_PARTS=y 31CONFIG_MTD_CMDLINE_PARTS=y
@@ -58,6 +56,7 @@ CONFIG_CS89x0_PLATFORM=y
58# CONFIG_INPUT is not set 56# CONFIG_INPUT is not set
59# CONFIG_SERIO is not set 57# CONFIG_SERIO is not set
60# CONFIG_VT is not set 58# CONFIG_VT is not set
59CONFIG_SERIAL_CLPS711X=y
61CONFIG_SERIAL_CLPS711X_CONSOLE=y 60CONFIG_SERIAL_CLPS711X_CONSOLE=y
62# CONFIG_HW_RANDOM is not set 61# CONFIG_HW_RANDOM is not set
63CONFIG_I2C=y 62CONFIG_I2C=y
diff --git a/arch/arm/include/asm/timex.h b/arch/arm/include/asm/timex.h
index 83f2aa83899c..f6fcc67ef06e 100644
--- a/arch/arm/include/asm/timex.h
+++ b/arch/arm/include/asm/timex.h
@@ -12,12 +12,6 @@
12#ifndef _ASMARM_TIMEX_H 12#ifndef _ASMARM_TIMEX_H
13#define _ASMARM_TIMEX_H 13#define _ASMARM_TIMEX_H
14 14
15#ifdef CONFIG_ARCH_MULTIPLATFORM
16#define CLOCK_TICK_RATE 1000000
17#else
18#include <mach/timex.h>
19#endif
20
21typedef unsigned long cycles_t; 15typedef unsigned long cycles_t;
22#define get_cycles() ({ cycles_t c; read_current_timer(&c) ? 0 : c; }) 16#define get_cycles() ({ cycles_t c; read_current_timer(&c) ? 0 : c; })
23 17
diff --git a/arch/arm/include/debug/samsung.S b/arch/arm/include/debug/samsung.S
index f3a9cff6d5d4..8d8d922e5e44 100644
--- a/arch/arm/include/debug/samsung.S
+++ b/arch/arm/include/debug/samsung.S
@@ -9,7 +9,7 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10*/ 10*/
11 11
12#include <plat/regs-serial.h> 12#include <linux/serial_s3c.h>
13 13
14/* The S5PV210/S5PC110 implementations are as belows. */ 14/* The S5PV210/S5PC110 implementations are as belows. */
15 15
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 9968f208b7df..b2d2cf4dc052 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -131,7 +131,6 @@ config SOC_AT91SAM9261
131 select HAVE_AT91_DBGU0 131 select HAVE_AT91_DBGU0
132 select HAVE_FB_ATMEL 132 select HAVE_FB_ATMEL
133 select SOC_AT91SAM9 133 select SOC_AT91SAM9
134 select AT91_USE_OLD_CLK
135 select HAVE_AT91_USB_CLK 134 select HAVE_AT91_USB_CLK
136 help 135 help
137 Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC. 136 Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC.
@@ -149,7 +148,6 @@ config SOC_AT91SAM9RL
149 select HAVE_AT91_DBGU0 148 select HAVE_AT91_DBGU0
150 select HAVE_FB_ATMEL 149 select HAVE_FB_ATMEL
151 select SOC_AT91SAM9 150 select SOC_AT91SAM9
152 select AT91_USE_OLD_CLK
153 select HAVE_AT91_UTMI 151 select HAVE_AT91_UTMI
154 152
155config SOC_AT91SAM9G45 153config SOC_AT91SAM9G45
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index e47f5fd232f5..787bb50a4dff 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -21,6 +21,7 @@
21#include <mach/at91rm9200.h> 21#include <mach/at91rm9200.h>
22#include <mach/at91_st.h> 22#include <mach/at91_st.h>
23#include <mach/cpu.h> 23#include <mach/cpu.h>
24#include <mach/hardware.h>
24 25
25#include "at91_aic.h" 26#include "at91_aic.h"
26#include "soc.h" 27#include "soc.h"
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index 3ebc9792560c..f3f19f21352a 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -21,6 +21,7 @@
21#include <mach/at91rm9200.h> 21#include <mach/at91rm9200.h>
22#include <mach/at91rm9200_mc.h> 22#include <mach/at91rm9200_mc.h>
23#include <mach/at91_ramc.h> 23#include <mach/at91_ramc.h>
24#include <mach/hardware.h>
24 25
25#include "board.h" 26#include "board.h"
26#include "generic.h" 27#include "generic.h"
@@ -922,6 +923,7 @@ static struct resource dbgu_resources[] = {
922static struct atmel_uart_data dbgu_data = { 923static struct atmel_uart_data dbgu_data = {
923 .use_dma_tx = 0, 924 .use_dma_tx = 0,
924 .use_dma_rx = 0, /* DBGU not capable of receive DMA */ 925 .use_dma_rx = 0, /* DBGU not capable of receive DMA */
926 .rts_gpio = -EINVAL,
925}; 927};
926 928
927static u64 dbgu_dmamask = DMA_BIT_MASK(32); 929static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@ -960,6 +962,7 @@ static struct resource uart0_resources[] = {
960static struct atmel_uart_data uart0_data = { 962static struct atmel_uart_data uart0_data = {
961 .use_dma_tx = 1, 963 .use_dma_tx = 1,
962 .use_dma_rx = 1, 964 .use_dma_rx = 1,
965 .rts_gpio = -EINVAL,
963}; 966};
964 967
965static u64 uart0_dmamask = DMA_BIT_MASK(32); 968static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@ -987,9 +990,10 @@ static inline void configure_usart0_pins(unsigned pins)
987 if (pins & ATMEL_UART_RTS) { 990 if (pins & ATMEL_UART_RTS) {
988 /* 991 /*
989 * AT91RM9200 Errata #39 - RTS0 is not internally connected to PA21. 992 * AT91RM9200 Errata #39 - RTS0 is not internally connected to PA21.
990 * We need to drive the pin manually. Default is off (RTS is active low). 993 * We need to drive the pin manually. The serial driver will driver
994 * this to high when initializing.
991 */ 995 */
992 at91_set_gpio_output(AT91_PIN_PA21, 1); 996 uart0_data.rts_gpio = AT91_PIN_PA21;
993 } 997 }
994} 998}
995 999
@@ -1009,6 +1013,7 @@ static struct resource uart1_resources[] = {
1009static struct atmel_uart_data uart1_data = { 1013static struct atmel_uart_data uart1_data = {
1010 .use_dma_tx = 1, 1014 .use_dma_tx = 1,
1011 .use_dma_rx = 1, 1015 .use_dma_rx = 1,
1016 .rts_gpio = -EINVAL,
1012}; 1017};
1013 1018
1014static u64 uart1_dmamask = DMA_BIT_MASK(32); 1019static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@ -1060,6 +1065,7 @@ static struct resource uart2_resources[] = {
1060static struct atmel_uart_data uart2_data = { 1065static struct atmel_uart_data uart2_data = {
1061 .use_dma_tx = 1, 1066 .use_dma_tx = 1,
1062 .use_dma_rx = 1, 1067 .use_dma_rx = 1,
1068 .rts_gpio = -EINVAL,
1063}; 1069};
1064 1070
1065static u64 uart2_dmamask = DMA_BIT_MASK(32); 1071static u64 uart2_dmamask = DMA_BIT_MASK(32);
@@ -1103,6 +1109,7 @@ static struct resource uart3_resources[] = {
1103static struct atmel_uart_data uart3_data = { 1109static struct atmel_uart_data uart3_data = {
1104 .use_dma_tx = 1, 1110 .use_dma_tx = 1,
1105 .use_dma_rx = 1, 1111 .use_dma_rx = 1,
1112 .rts_gpio = -EINVAL,
1106}; 1113};
1107 1114
1108static u64 uart3_dmamask = DMA_BIT_MASK(32); 1115static u64 uart3_dmamask = DMA_BIT_MASK(32);
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c
index bc7b363a3083..7fd13aef9827 100644
--- a/arch/arm/mach-at91/at91rm9200_time.c
+++ b/arch/arm/mach-at91/at91rm9200_time.c
@@ -31,6 +31,7 @@
31#include <asm/mach/time.h> 31#include <asm/mach/time.h>
32 32
33#include <mach/at91_st.h> 33#include <mach/at91_st.h>
34#include <mach/hardware.h>
34 35
35static unsigned long last_crtr; 36static unsigned long last_crtr;
36static u32 irqmask; 37static u32 irqmask;
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index 6c821e562159..c3d22be73b7c 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -21,6 +21,7 @@
21#include <mach/cpu.h> 21#include <mach/cpu.h>
22#include <mach/at91_dbgu.h> 22#include <mach/at91_dbgu.h>
23#include <mach/at91sam9260.h> 23#include <mach/at91sam9260.h>
24#include <mach/hardware.h>
24 25
25#include "at91_aic.h" 26#include "at91_aic.h"
26#include "at91_rstc.h" 27#include "at91_rstc.h"
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 1630ae64d3fb..8b1b0a870025 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -25,6 +25,7 @@
25#include <mach/at91_matrix.h> 25#include <mach/at91_matrix.h>
26#include <mach/at91sam9_smc.h> 26#include <mach/at91sam9_smc.h>
27#include <mach/at91_adc.h> 27#include <mach/at91_adc.h>
28#include <mach/hardware.h>
28 29
29#include "board.h" 30#include "board.h"
30#include "generic.h" 31#include "generic.h"
@@ -819,6 +820,7 @@ static struct resource dbgu_resources[] = {
819static struct atmel_uart_data dbgu_data = { 820static struct atmel_uart_data dbgu_data = {
820 .use_dma_tx = 0, 821 .use_dma_tx = 0,
821 .use_dma_rx = 0, /* DBGU not capable of receive DMA */ 822 .use_dma_rx = 0, /* DBGU not capable of receive DMA */
823 .rts_gpio = -EINVAL,
822}; 824};
823 825
824static u64 dbgu_dmamask = DMA_BIT_MASK(32); 826static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@ -857,6 +859,7 @@ static struct resource uart0_resources[] = {
857static struct atmel_uart_data uart0_data = { 859static struct atmel_uart_data uart0_data = {
858 .use_dma_tx = 1, 860 .use_dma_tx = 1,
859 .use_dma_rx = 1, 861 .use_dma_rx = 1,
862 .rts_gpio = -EINVAL,
860}; 863};
861 864
862static u64 uart0_dmamask = DMA_BIT_MASK(32); 865static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@ -908,6 +911,7 @@ static struct resource uart1_resources[] = {
908static struct atmel_uart_data uart1_data = { 911static struct atmel_uart_data uart1_data = {
909 .use_dma_tx = 1, 912 .use_dma_tx = 1,
910 .use_dma_rx = 1, 913 .use_dma_rx = 1,
914 .rts_gpio = -EINVAL,
911}; 915};
912 916
913static u64 uart1_dmamask = DMA_BIT_MASK(32); 917static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@ -951,6 +955,7 @@ static struct resource uart2_resources[] = {
951static struct atmel_uart_data uart2_data = { 955static struct atmel_uart_data uart2_data = {
952 .use_dma_tx = 1, 956 .use_dma_tx = 1,
953 .use_dma_rx = 1, 957 .use_dma_rx = 1,
958 .rts_gpio = -EINVAL,
954}; 959};
955 960
956static u64 uart2_dmamask = DMA_BIT_MASK(32); 961static u64 uart2_dmamask = DMA_BIT_MASK(32);
@@ -994,6 +999,7 @@ static struct resource uart3_resources[] = {
994static struct atmel_uart_data uart3_data = { 999static struct atmel_uart_data uart3_data = {
995 .use_dma_tx = 1, 1000 .use_dma_tx = 1,
996 .use_dma_rx = 1, 1001 .use_dma_rx = 1,
1002 .rts_gpio = -EINVAL,
997}; 1003};
998 1004
999static u64 uart3_dmamask = DMA_BIT_MASK(32); 1005static u64 uart3_dmamask = DMA_BIT_MASK(32);
@@ -1037,6 +1043,7 @@ static struct resource uart4_resources[] = {
1037static struct atmel_uart_data uart4_data = { 1043static struct atmel_uart_data uart4_data = {
1038 .use_dma_tx = 1, 1044 .use_dma_tx = 1,
1039 .use_dma_rx = 1, 1045 .use_dma_rx = 1,
1046 .rts_gpio = -EINVAL,
1040}; 1047};
1041 1048
1042static u64 uart4_dmamask = DMA_BIT_MASK(32); 1049static u64 uart4_dmamask = DMA_BIT_MASK(32);
@@ -1075,6 +1082,7 @@ static struct resource uart5_resources[] = {
1075static struct atmel_uart_data uart5_data = { 1082static struct atmel_uart_data uart5_data = {
1076 .use_dma_tx = 1, 1083 .use_dma_tx = 1,
1077 .use_dma_rx = 1, 1084 .use_dma_rx = 1,
1085 .rts_gpio = -EINVAL,
1078}; 1086};
1079 1087
1080static u64 uart5_dmamask = DMA_BIT_MASK(32); 1088static u64 uart5_dmamask = DMA_BIT_MASK(32);
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index 6276b4c1acfe..fb164a5d04a9 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -20,15 +20,18 @@
20#include <asm/system_misc.h> 20#include <asm/system_misc.h>
21#include <mach/cpu.h> 21#include <mach/cpu.h>
22#include <mach/at91sam9261.h> 22#include <mach/at91sam9261.h>
23#include <mach/hardware.h>
23 24
24#include "at91_aic.h" 25#include "at91_aic.h"
25#include "at91_rstc.h" 26#include "at91_rstc.h"
26#include "soc.h" 27#include "soc.h"
27#include "generic.h" 28#include "generic.h"
28#include "clock.h"
29#include "sam9_smc.h" 29#include "sam9_smc.h"
30#include "pm.h" 30#include "pm.h"
31 31
32#if defined(CONFIG_OLD_CLK_AT91)
33#include "clock.h"
34
32/* -------------------------------------------------------------------- 35/* --------------------------------------------------------------------
33 * Clocks 36 * Clocks
34 * -------------------------------------------------------------------- */ 37 * -------------------------------------------------------------------- */
@@ -189,6 +192,23 @@ static struct clk_lookup periph_clocks_lookups[] = {
189 CLKDEV_CON_ID("pioA", &pioA_clk), 192 CLKDEV_CON_ID("pioA", &pioA_clk),
190 CLKDEV_CON_ID("pioB", &pioB_clk), 193 CLKDEV_CON_ID("pioB", &pioB_clk),
191 CLKDEV_CON_ID("pioC", &pioC_clk), 194 CLKDEV_CON_ID("pioC", &pioC_clk),
195 /* more lookup table for DT entries */
196 CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck),
197 CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk),
198 CLKDEV_CON_DEV_ID("usart", "ffffb400.serial", &usart1_clk),
199 CLKDEV_CON_DEV_ID("usart", "fff94000.serial", &usart2_clk),
200 CLKDEV_CON_DEV_ID("t0_clk", "fffa0000.timer", &tc0_clk),
201 CLKDEV_CON_DEV_ID("t1_clk", "fffa0000.timer", &tc1_clk),
202 CLKDEV_CON_DEV_ID("t2_clk", "fffa0000.timer", &tc2_clk),
203 CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &hck0),
204 CLKDEV_CON_DEV_ID("hclk", "600000.fb", &hck1),
205 CLKDEV_CON_DEV_ID("spi_clk", "fffc8000.spi", &spi0_clk),
206 CLKDEV_CON_DEV_ID("spi_clk", "fffcc000.spi", &spi1_clk),
207 CLKDEV_CON_DEV_ID("mci_clk", "fffa8000.mmc", &mmc_clk),
208 CLKDEV_CON_DEV_ID(NULL, "fffac000.i2c", &twi_clk),
209 CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioA_clk),
210 CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioB_clk),
211 CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioC_clk),
192}; 212};
193 213
194static struct clk_lookup usart_clocks_lookups[] = { 214static struct clk_lookup usart_clocks_lookups[] = {
@@ -247,7 +267,9 @@ static void __init at91sam9261_register_clocks(void)
247 clk_register(&hck0); 267 clk_register(&hck0);
248 clk_register(&hck1); 268 clk_register(&hck1);
249} 269}
250 270#else
271#define at91sam9261_register_clocks NULL
272#endif
251/* -------------------------------------------------------------------- 273/* --------------------------------------------------------------------
252 * GPIO 274 * GPIO
253 * -------------------------------------------------------------------- */ 275 * -------------------------------------------------------------------- */
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index b2a34740146a..80e35895d28f 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -25,6 +25,7 @@
25#include <mach/at91sam9261_matrix.h> 25#include <mach/at91sam9261_matrix.h>
26#include <mach/at91_matrix.h> 26#include <mach/at91_matrix.h>
27#include <mach/at91sam9_smc.h> 27#include <mach/at91sam9_smc.h>
28#include <mach/hardware.h>
28 29
29#include "board.h" 30#include "board.h"
30#include "generic.h" 31#include "generic.h"
@@ -880,6 +881,7 @@ static struct resource dbgu_resources[] = {
880static struct atmel_uart_data dbgu_data = { 881static struct atmel_uart_data dbgu_data = {
881 .use_dma_tx = 0, 882 .use_dma_tx = 0,
882 .use_dma_rx = 0, /* DBGU not capable of receive DMA */ 883 .use_dma_rx = 0, /* DBGU not capable of receive DMA */
884 .rts_gpio = -EINVAL,
883}; 885};
884 886
885static u64 dbgu_dmamask = DMA_BIT_MASK(32); 887static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@ -918,6 +920,7 @@ static struct resource uart0_resources[] = {
918static struct atmel_uart_data uart0_data = { 920static struct atmel_uart_data uart0_data = {
919 .use_dma_tx = 1, 921 .use_dma_tx = 1,
920 .use_dma_rx = 1, 922 .use_dma_rx = 1,
923 .rts_gpio = -EINVAL,
921}; 924};
922 925
923static u64 uart0_dmamask = DMA_BIT_MASK(32); 926static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@ -961,6 +964,7 @@ static struct resource uart1_resources[] = {
961static struct atmel_uart_data uart1_data = { 964static struct atmel_uart_data uart1_data = {
962 .use_dma_tx = 1, 965 .use_dma_tx = 1,
963 .use_dma_rx = 1, 966 .use_dma_rx = 1,
967 .rts_gpio = -EINVAL,
964}; 968};
965 969
966static u64 uart1_dmamask = DMA_BIT_MASK(32); 970static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@ -1004,6 +1008,7 @@ static struct resource uart2_resources[] = {
1004static struct atmel_uart_data uart2_data = { 1008static struct atmel_uart_data uart2_data = {
1005 .use_dma_tx = 1, 1009 .use_dma_tx = 1,
1006 .use_dma_rx = 1, 1010 .use_dma_rx = 1,
1011 .rts_gpio = -EINVAL,
1007}; 1012};
1008 1013
1009static u64 uart2_dmamask = DMA_BIT_MASK(32); 1014static u64 uart2_dmamask = DMA_BIT_MASK(32);
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index 37b90f4b990c..f30290572293 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -19,6 +19,7 @@
19#include <asm/mach/map.h> 19#include <asm/mach/map.h>
20#include <asm/system_misc.h> 20#include <asm/system_misc.h>
21#include <mach/at91sam9263.h> 21#include <mach/at91sam9263.h>
22#include <mach/hardware.h>
22 23
23#include "at91_aic.h" 24#include "at91_aic.h"
24#include "at91_rstc.h" 25#include "at91_rstc.h"
@@ -223,6 +224,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
223 CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioCDE_clk), 224 CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioCDE_clk),
224 CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioCDE_clk), 225 CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioCDE_clk),
225 CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioCDE_clk), 226 CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioCDE_clk),
227 CLKDEV_CON_DEV_ID(NULL, "fffb8000.pwm", &pwm_clk),
226}; 228};
227 229
228static struct clk_lookup usart_clocks_lookups[] = { 230static struct clk_lookup usart_clocks_lookups[] = {
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 4aeadddbc181..43d53d6156dd 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -24,6 +24,7 @@
24#include <mach/at91sam9263_matrix.h> 24#include <mach/at91sam9263_matrix.h>
25#include <mach/at91_matrix.h> 25#include <mach/at91_matrix.h>
26#include <mach/at91sam9_smc.h> 26#include <mach/at91sam9_smc.h>
27#include <mach/hardware.h>
27 28
28#include "board.h" 29#include "board.h"
29#include "generic.h" 30#include "generic.h"
@@ -1324,6 +1325,7 @@ static struct resource dbgu_resources[] = {
1324static struct atmel_uart_data dbgu_data = { 1325static struct atmel_uart_data dbgu_data = {
1325 .use_dma_tx = 0, 1326 .use_dma_tx = 0,
1326 .use_dma_rx = 0, /* DBGU not capable of receive DMA */ 1327 .use_dma_rx = 0, /* DBGU not capable of receive DMA */
1328 .rts_gpio = -EINVAL,
1327}; 1329};
1328 1330
1329static u64 dbgu_dmamask = DMA_BIT_MASK(32); 1331static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@ -1362,6 +1364,7 @@ static struct resource uart0_resources[] = {
1362static struct atmel_uart_data uart0_data = { 1364static struct atmel_uart_data uart0_data = {
1363 .use_dma_tx = 1, 1365 .use_dma_tx = 1,
1364 .use_dma_rx = 1, 1366 .use_dma_rx = 1,
1367 .rts_gpio = -EINVAL,
1365}; 1368};
1366 1369
1367static u64 uart0_dmamask = DMA_BIT_MASK(32); 1370static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@ -1405,6 +1408,7 @@ static struct resource uart1_resources[] = {
1405static struct atmel_uart_data uart1_data = { 1408static struct atmel_uart_data uart1_data = {
1406 .use_dma_tx = 1, 1409 .use_dma_tx = 1,
1407 .use_dma_rx = 1, 1410 .use_dma_rx = 1,
1411 .rts_gpio = -EINVAL,
1408}; 1412};
1409 1413
1410static u64 uart1_dmamask = DMA_BIT_MASK(32); 1414static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@ -1448,6 +1452,7 @@ static struct resource uart2_resources[] = {
1448static struct atmel_uart_data uart2_data = { 1452static struct atmel_uart_data uart2_data = {
1449 .use_dma_tx = 1, 1453 .use_dma_tx = 1,
1450 .use_dma_rx = 1, 1454 .use_dma_rx = 1,
1455 .rts_gpio = -EINVAL,
1451}; 1456};
1452 1457
1453static u64 uart2_dmamask = DMA_BIT_MASK(32); 1458static u64 uart2_dmamask = DMA_BIT_MASK(32);
diff --git a/arch/arm/mach-at91/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c
index 0f04ffe9c5a8..0a9e2fc8f796 100644
--- a/arch/arm/mach-at91/at91sam926x_time.c
+++ b/arch/arm/mach-at91/at91sam926x_time.c
@@ -19,6 +19,7 @@
19#include <linux/of_irq.h> 19#include <linux/of_irq.h>
20 20
21#include <asm/mach/time.h> 21#include <asm/mach/time.h>
22#include <mach/hardware.h>
22 23
23#define AT91_PIT_MR 0x00 /* Mode Register */ 24#define AT91_PIT_MR 0x00 /* Mode Register */
24#define AT91_PIT_PITIEN (1 << 25) /* Timer Interrupt Enable */ 25#define AT91_PIT_PITIEN (1 << 25) /* Timer Interrupt Enable */
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 2f455ce35268..5e6f498db0a8 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -20,6 +20,7 @@
20#include <asm/system_misc.h> 20#include <asm/system_misc.h>
21#include <mach/at91sam9g45.h> 21#include <mach/at91sam9g45.h>
22#include <mach/cpu.h> 22#include <mach/cpu.h>
23#include <mach/hardware.h>
23 24
24#include "at91_aic.h" 25#include "at91_aic.h"
25#include "soc.h" 26#include "soc.h"
@@ -284,6 +285,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
284 CLKDEV_CON_ID("pioE", &pioDE_clk), 285 CLKDEV_CON_ID("pioE", &pioDE_clk),
285 /* Fake adc clock */ 286 /* Fake adc clock */
286 CLKDEV_CON_ID("adc_clk", &tsc_clk), 287 CLKDEV_CON_ID("adc_clk", &tsc_clk),
288 CLKDEV_CON_DEV_ID(NULL, "fffb8000.pwm", &pwm_clk),
287}; 289};
288 290
289static struct clk_lookup usart_clocks_lookups[] = { 291static struct clk_lookup usart_clocks_lookups[] = {
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index cb36fa872d30..77b04c2edd78 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -32,6 +32,7 @@
32#include <mach/at91sam9_smc.h> 32#include <mach/at91sam9_smc.h>
33#include <linux/platform_data/dma-atmel.h> 33#include <linux/platform_data/dma-atmel.h>
34#include <mach/atmel-mci.h> 34#include <mach/atmel-mci.h>
35#include <mach/hardware.h>
35 36
36#include <media/atmel-isi.h> 37#include <media/atmel-isi.h>
37 38
@@ -1587,6 +1588,7 @@ static struct resource dbgu_resources[] = {
1587static struct atmel_uart_data dbgu_data = { 1588static struct atmel_uart_data dbgu_data = {
1588 .use_dma_tx = 0, 1589 .use_dma_tx = 0,
1589 .use_dma_rx = 0, 1590 .use_dma_rx = 0,
1591 .rts_gpio = -EINVAL,
1590}; 1592};
1591 1593
1592static u64 dbgu_dmamask = DMA_BIT_MASK(32); 1594static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@ -1625,6 +1627,7 @@ static struct resource uart0_resources[] = {
1625static struct atmel_uart_data uart0_data = { 1627static struct atmel_uart_data uart0_data = {
1626 .use_dma_tx = 1, 1628 .use_dma_tx = 1,
1627 .use_dma_rx = 1, 1629 .use_dma_rx = 1,
1630 .rts_gpio = -EINVAL,
1628}; 1631};
1629 1632
1630static u64 uart0_dmamask = DMA_BIT_MASK(32); 1633static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@ -1668,6 +1671,7 @@ static struct resource uart1_resources[] = {
1668static struct atmel_uart_data uart1_data = { 1671static struct atmel_uart_data uart1_data = {
1669 .use_dma_tx = 1, 1672 .use_dma_tx = 1,
1670 .use_dma_rx = 1, 1673 .use_dma_rx = 1,
1674 .rts_gpio = -EINVAL,
1671}; 1675};
1672 1676
1673static u64 uart1_dmamask = DMA_BIT_MASK(32); 1677static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@ -1711,6 +1715,7 @@ static struct resource uart2_resources[] = {
1711static struct atmel_uart_data uart2_data = { 1715static struct atmel_uart_data uart2_data = {
1712 .use_dma_tx = 1, 1716 .use_dma_tx = 1,
1713 .use_dma_rx = 1, 1717 .use_dma_rx = 1,
1718 .rts_gpio = -EINVAL,
1714}; 1719};
1715 1720
1716static u64 uart2_dmamask = DMA_BIT_MASK(32); 1721static u64 uart2_dmamask = DMA_BIT_MASK(32);
@@ -1754,6 +1759,7 @@ static struct resource uart3_resources[] = {
1754static struct atmel_uart_data uart3_data = { 1759static struct atmel_uart_data uart3_data = {
1755 .use_dma_tx = 1, 1760 .use_dma_tx = 1,
1756 .use_dma_rx = 1, 1761 .use_dma_rx = 1,
1762 .rts_gpio = -EINVAL,
1757}; 1763};
1758 1764
1759static u64 uart3_dmamask = DMA_BIT_MASK(32); 1765static u64 uart3_dmamask = DMA_BIT_MASK(32);
diff --git a/arch/arm/mach-at91/at91sam9n12.c b/arch/arm/mach-at91/at91sam9n12.c
index 4ef088c62eab..f2ea7b0a02da 100644
--- a/arch/arm/mach-at91/at91sam9n12.c
+++ b/arch/arm/mach-at91/at91sam9n12.c
@@ -182,6 +182,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
182 /* additional fake clock for macb_hclk */ 182 /* additional fake clock for macb_hclk */
183 CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &uhp_clk), 183 CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &uhp_clk),
184 CLKDEV_CON_DEV_ID("ohci_clk", "500000.ohci", &uhp_clk), 184 CLKDEV_CON_DEV_ID("ohci_clk", "500000.ohci", &uhp_clk),
185 CLKDEV_CON_DEV_ID(NULL, "f8034000.pwm", &pwm_clk),
185}; 186};
186 187
187/* 188/*
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
index 3651517abedf..57f12d86c0e6 100644
--- a/arch/arm/mach-at91/at91sam9rl.c
+++ b/arch/arm/mach-at91/at91sam9rl.c
@@ -20,18 +20,20 @@
20#include <mach/cpu.h> 20#include <mach/cpu.h>
21#include <mach/at91_dbgu.h> 21#include <mach/at91_dbgu.h>
22#include <mach/at91sam9rl.h> 22#include <mach/at91sam9rl.h>
23#include <mach/hardware.h>
23 24
24#include "at91_aic.h" 25#include "at91_aic.h"
25#include "at91_rstc.h" 26#include "at91_rstc.h"
26#include "soc.h" 27#include "soc.h"
27#include "generic.h" 28#include "generic.h"
28#include "clock.h"
29#include "sam9_smc.h" 29#include "sam9_smc.h"
30#include "pm.h" 30#include "pm.h"
31 31
32/* -------------------------------------------------------------------- 32/* --------------------------------------------------------------------
33 * Clocks 33 * Clocks
34 * -------------------------------------------------------------------- */ 34 * -------------------------------------------------------------------- */
35#if defined(CONFIG_OLD_CLK_AT91)
36#include "clock.h"
35 37
36/* 38/*
37 * The peripheral clocks. 39 * The peripheral clocks.
@@ -196,6 +198,24 @@ static struct clk_lookup periph_clocks_lookups[] = {
196 CLKDEV_CON_ID("pioB", &pioB_clk), 198 CLKDEV_CON_ID("pioB", &pioB_clk),
197 CLKDEV_CON_ID("pioC", &pioC_clk), 199 CLKDEV_CON_ID("pioC", &pioC_clk),
198 CLKDEV_CON_ID("pioD", &pioD_clk), 200 CLKDEV_CON_ID("pioD", &pioD_clk),
201 /* more lookup table for DT entries */
202 CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck),
203 CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk),
204 CLKDEV_CON_DEV_ID("usart", "ffffb400.serial", &usart1_clk),
205 CLKDEV_CON_DEV_ID("usart", "ffffb800.serial", &usart2_clk),
206 CLKDEV_CON_DEV_ID("usart", "ffffbc00.serial", &usart3_clk),
207 CLKDEV_CON_DEV_ID("t0_clk", "fffa0000.timer", &tc0_clk),
208 CLKDEV_CON_DEV_ID("t1_clk", "fffa0000.timer", &tc1_clk),
209 CLKDEV_CON_DEV_ID("t2_clk", "fffa0000.timer", &tc2_clk),
210 CLKDEV_CON_DEV_ID("mci_clk", "fffa4000.mmc", &mmc_clk),
211 CLKDEV_CON_DEV_ID(NULL, "fffa8000.i2c", &twi0_clk),
212 CLKDEV_CON_DEV_ID(NULL, "fffac000.i2c", &twi1_clk),
213 CLKDEV_CON_DEV_ID(NULL, "fffc8000.pwm", &pwm_clk),
214 CLKDEV_CON_DEV_ID(NULL, "ffffc800.pwm", &pwm_clk),
215 CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioA_clk),
216 CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioB_clk),
217 CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioC_clk),
218 CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioD_clk),
199}; 219};
200 220
201static struct clk_lookup usart_clocks_lookups[] = { 221static struct clk_lookup usart_clocks_lookups[] = {
@@ -238,6 +258,7 @@ static void __init at91sam9rl_register_clocks(void)
238 clk_register(&pck0); 258 clk_register(&pck0);
239 clk_register(&pck1); 259 clk_register(&pck1);
240} 260}
261#endif
241 262
242/* -------------------------------------------------------------------- 263/* --------------------------------------------------------------------
243 * GPIO 264 * GPIO
@@ -350,6 +371,8 @@ AT91_SOC_START(at91sam9rl)
350 .default_irq_priority = at91sam9rl_default_irq_priority, 371 .default_irq_priority = at91sam9rl_default_irq_priority,
351 .extern_irq = (1 << AT91SAM9RL_ID_IRQ0), 372 .extern_irq = (1 << AT91SAM9RL_ID_IRQ0),
352 .ioremap_registers = at91sam9rl_ioremap_registers, 373 .ioremap_registers = at91sam9rl_ioremap_registers,
374#if defined(CONFIG_OLD_CLK_AT91)
353 .register_clocks = at91sam9rl_register_clocks, 375 .register_clocks = at91sam9rl_register_clocks,
376#endif
354 .init = at91sam9rl_initialize, 377 .init = at91sam9rl_initialize,
355AT91_SOC_END 378AT91_SOC_END
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index a698bdab2cce..428fc412aaf1 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -21,6 +21,7 @@
21#include <mach/at91sam9rl_matrix.h> 21#include <mach/at91sam9rl_matrix.h>
22#include <mach/at91_matrix.h> 22#include <mach/at91_matrix.h>
23#include <mach/at91sam9_smc.h> 23#include <mach/at91sam9_smc.h>
24#include <mach/hardware.h>
24#include <linux/platform_data/dma-atmel.h> 25#include <linux/platform_data/dma-atmel.h>
25 26
26#include "board.h" 27#include "board.h"
@@ -956,6 +957,7 @@ static struct resource dbgu_resources[] = {
956static struct atmel_uart_data dbgu_data = { 957static struct atmel_uart_data dbgu_data = {
957 .use_dma_tx = 0, 958 .use_dma_tx = 0,
958 .use_dma_rx = 0, /* DBGU not capable of receive DMA */ 959 .use_dma_rx = 0, /* DBGU not capable of receive DMA */
960 .rts_gpio = -EINVAL,
959}; 961};
960 962
961static u64 dbgu_dmamask = DMA_BIT_MASK(32); 963static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@ -994,6 +996,7 @@ static struct resource uart0_resources[] = {
994static struct atmel_uart_data uart0_data = { 996static struct atmel_uart_data uart0_data = {
995 .use_dma_tx = 1, 997 .use_dma_tx = 1,
996 .use_dma_rx = 1, 998 .use_dma_rx = 1,
999 .rts_gpio = -EINVAL,
997}; 1000};
998 1001
999static u64 uart0_dmamask = DMA_BIT_MASK(32); 1002static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@ -1045,6 +1048,7 @@ static struct resource uart1_resources[] = {
1045static struct atmel_uart_data uart1_data = { 1048static struct atmel_uart_data uart1_data = {
1046 .use_dma_tx = 1, 1049 .use_dma_tx = 1,
1047 .use_dma_rx = 1, 1050 .use_dma_rx = 1,
1051 .rts_gpio = -EINVAL,
1048}; 1052};
1049 1053
1050static u64 uart1_dmamask = DMA_BIT_MASK(32); 1054static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@ -1088,6 +1092,7 @@ static struct resource uart2_resources[] = {
1088static struct atmel_uart_data uart2_data = { 1092static struct atmel_uart_data uart2_data = {
1089 .use_dma_tx = 1, 1093 .use_dma_tx = 1,
1090 .use_dma_rx = 1, 1094 .use_dma_rx = 1,
1095 .rts_gpio = -EINVAL,
1091}; 1096};
1092 1097
1093static u64 uart2_dmamask = DMA_BIT_MASK(32); 1098static u64 uart2_dmamask = DMA_BIT_MASK(32);
@@ -1131,6 +1136,7 @@ static struct resource uart3_resources[] = {
1131static struct atmel_uart_data uart3_data = { 1136static struct atmel_uart_data uart3_data = {
1132 .use_dma_tx = 1, 1137 .use_dma_tx = 1,
1133 .use_dma_rx = 1, 1138 .use_dma_rx = 1,
1139 .rts_gpio = -EINVAL,
1134}; 1140};
1135 1141
1136static u64 uart3_dmamask = DMA_BIT_MASK(32); 1142static u64 uart3_dmamask = DMA_BIT_MASK(32);
diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c
index 3e8ec26e39dc..9ad781d5ee7c 100644
--- a/arch/arm/mach-at91/at91sam9x5.c
+++ b/arch/arm/mach-at91/at91sam9x5.c
@@ -253,6 +253,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
253 CLKDEV_CON_DEV_ID("ehci_clk", "700000.ehci", &uhphs_clk), 253 CLKDEV_CON_DEV_ID("ehci_clk", "700000.ehci", &uhphs_clk),
254 CLKDEV_CON_DEV_ID("hclk", "500000.gadget", &utmi_clk), 254 CLKDEV_CON_DEV_ID("hclk", "500000.gadget", &utmi_clk),
255 CLKDEV_CON_DEV_ID("pclk", "500000.gadget", &udphs_clk), 255 CLKDEV_CON_DEV_ID("pclk", "500000.gadget", &udphs_clk),
256 CLKDEV_CON_DEV_ID(NULL, "f8034000.pwm", &pwm_clk),
256}; 257};
257 258
258/* 259/*
diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c
index bad94b84a46f..7523f1cdfe1d 100644
--- a/arch/arm/mach-at91/at91x40.c
+++ b/arch/arm/mach-at91/at91x40.c
@@ -19,7 +19,7 @@
19#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
20#include <mach/at91x40.h> 20#include <mach/at91x40.h>
21#include <mach/at91_st.h> 21#include <mach/at91_st.h>
22#include <mach/timex.h> 22#include <mach/hardware.h>
23 23
24#include "at91_aic.h" 24#include "at91_aic.h"
25#include "generic.h" 25#include "generic.h"
diff --git a/arch/arm/mach-at91/at91x40_time.c b/arch/arm/mach-at91/at91x40_time.c
index c0e637adf65d..07d0bf2ac2da 100644
--- a/arch/arm/mach-at91/at91x40_time.c
+++ b/arch/arm/mach-at91/at91x40_time.c
@@ -25,6 +25,7 @@
25#include <linux/time.h> 25#include <linux/time.h>
26#include <linux/io.h> 26#include <linux/io.h>
27#include <mach/hardware.h> 27#include <mach/hardware.h>
28#include <mach/at91x40.h>
28#include <asm/mach/time.h> 29#include <asm/mach/time.h>
29 30
30#include "at91_tc.h" 31#include "at91_tc.h"
diff --git a/arch/arm/mach-at91/board-dt-sam9.c b/arch/arm/mach-at91/board-dt-sam9.c
index 3dab868b02fa..575b0be66ca8 100644
--- a/arch/arm/mach-at91/board-dt-sam9.c
+++ b/arch/arm/mach-at91/board-dt-sam9.c
@@ -13,6 +13,7 @@
13#include <linux/gpio.h> 13#include <linux/gpio.h>
14#include <linux/of.h> 14#include <linux/of.h>
15#include <linux/of_irq.h> 15#include <linux/of_irq.h>
16#include <linux/clk-provider.h>
16 17
17#include <asm/setup.h> 18#include <asm/setup.h>
18#include <asm/irq.h> 19#include <asm/irq.h>
@@ -25,6 +26,14 @@
25#include "generic.h" 26#include "generic.h"
26 27
27 28
29static void __init sam9_dt_timer_init(void)
30{
31#if defined(CONFIG_COMMON_CLK)
32 of_clk_init(NULL);
33#endif
34 at91sam926x_pit_init();
35}
36
28static const struct of_device_id irq_of_match[] __initconst = { 37static const struct of_device_id irq_of_match[] __initconst = {
29 38
30 { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init }, 39 { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init },
@@ -43,7 +52,7 @@ static const char *at91_dt_board_compat[] __initdata = {
43 52
44DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)") 53DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)")
45 /* Maintainer: Atmel */ 54 /* Maintainer: Atmel */
46 .init_time = at91sam926x_pit_init, 55 .init_time = sam9_dt_timer_init,
47 .map_io = at91_map_io, 56 .map_io = at91_map_io,
48 .handle_irq = at91_aic_handle_irq, 57 .handle_irq = at91_aic_handle_irq,
49 .init_early = at91_dt_initialize, 58 .init_early = at91_dt_initialize,
diff --git a/arch/arm/mach-at91/board-gsia18s.c b/arch/arm/mach-at91/board-gsia18s.c
index c1d61d247790..416bae8435ee 100644
--- a/arch/arm/mach-at91/board-gsia18s.c
+++ b/arch/arm/mach-at91/board-gsia18s.c
@@ -31,6 +31,7 @@
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32 32
33#include <mach/at91sam9_smc.h> 33#include <mach/at91sam9_smc.h>
34#include <mach/hardware.h>
34 35
35#include "at91_aic.h" 36#include "at91_aic.h"
36#include "board.h" 37#include "board.h"
diff --git a/arch/arm/mach-at91/board-pcontrol-g20.c b/arch/arm/mach-at91/board-pcontrol-g20.c
index 65c0d6b5ecba..5f25fa54eb93 100644
--- a/arch/arm/mach-at91/board-pcontrol-g20.c
+++ b/arch/arm/mach-at91/board-pcontrol-g20.c
@@ -30,6 +30,7 @@
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31 31
32#include <mach/at91sam9_smc.h> 32#include <mach/at91sam9_smc.h>
33#include <mach/hardware.h>
33 34
34#include "at91_aic.h" 35#include "at91_aic.h"
35#include "board.h" 36#include "board.h"
diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c
index 869cbecf00b7..e4a5ac17cdbc 100644
--- a/arch/arm/mach-at91/board-stamp9g20.c
+++ b/arch/arm/mach-at91/board-stamp9g20.c
@@ -26,6 +26,7 @@
26#include <asm/mach/arch.h> 26#include <asm/mach/arch.h>
27 27
28#include <mach/at91sam9_smc.h> 28#include <mach/at91sam9_smc.h>
29#include <mach/hardware.h>
29 30
30#include "at91_aic.h" 31#include "at91_aic.h"
31#include "board.h" 32#include "board.h"
diff --git a/arch/arm/mach-at91/include/mach/at91x40.h b/arch/arm/mach-at91/include/mach/at91x40.h
index 90680217064e..38dca2bb027f 100644
--- a/arch/arm/mach-at91/include/mach/at91x40.h
+++ b/arch/arm/mach-at91/include/mach/at91x40.h
@@ -55,4 +55,6 @@
55#define AT91_PS_CR (AT91_PS + 0) /* PS Control register */ 55#define AT91_PS_CR (AT91_PS + 0) /* PS Control register */
56#define AT91_PS_CR_CPU (1 << 0) /* CPU clock disable bit */ 56#define AT91_PS_CR_CPU (1 << 0) /* CPU clock disable bit */
57 57
58#define AT91X40_MASTER_CLOCK 40000000
59
58#endif /* AT91X40_H */ 60#endif /* AT91X40_H */
diff --git a/arch/arm/mach-at91/include/mach/timex.h b/arch/arm/mach-at91/include/mach/timex.h
deleted file mode 100644
index 5e917a66edd7..000000000000
--- a/arch/arm/mach-at91/include/mach/timex.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/timex.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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 */
20
21#ifndef __ASM_ARCH_TIMEX_H
22#define __ASM_ARCH_TIMEX_H
23
24#include <mach/hardware.h>
25
26#ifdef CONFIG_ARCH_AT91X40
27
28#define AT91X40_MASTER_CLOCK 40000000
29#define CLOCK_TICK_RATE (AT91X40_MASTER_CLOCK)
30
31#else
32
33#define CLOCK_TICK_RATE 12345678
34
35#endif
36
37#endif /* __ASM_ARCH_TIMEX_H */
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 590b52dea9f7..8bda1cefdf96 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -27,6 +27,7 @@
27#include <asm/mach/irq.h> 27#include <asm/mach/irq.h>
28 28
29#include <mach/cpu.h> 29#include <mach/cpu.h>
30#include <mach/hardware.h>
30 31
31#include "at91_aic.h" 32#include "at91_aic.h"
32#include "generic.h" 33#include "generic.h"
diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
index b1aa6a9b3bd1..396d05c8b570 100644
--- a/arch/arm/mach-bcm/Kconfig
+++ b/arch/arm/mach-bcm/Kconfig
@@ -16,12 +16,7 @@ config ARCH_BCM_MOBILE
16 select ARM_ERRATA_754322 16 select ARM_ERRATA_754322
17 select ARM_ERRATA_764369 if SMP 17 select ARM_ERRATA_764369 if SMP
18 select ARM_GIC 18 select ARM_GIC
19 select CPU_V7
20 select CLKSRC_OF
21 select GENERIC_CLOCKEVENTS
22 select GENERIC_TIME
23 select GPIO_BCM_KONA 19 select GPIO_BCM_KONA
24 select SPARSE_IRQ
25 select TICK_ONESHOT 20 select TICK_ONESHOT
26 select CACHE_L2X0 21 select CACHE_L2X0
27 select HAVE_ARM_ARCH_TIMER 22 select HAVE_ARM_ARCH_TIMER
@@ -32,6 +27,22 @@ config ARCH_BCM_MOBILE
32 BCM11130, BCM11140, BCM11351, BCM28145 and 27 BCM11130, BCM11140, BCM11351, BCM28145 and
33 BCM28155 variants. 28 BCM28155 variants.
34 29
30config ARCH_BCM2835
31 bool "Broadcom BCM2835 family" if ARCH_MULTI_V6
32 select ARCH_REQUIRE_GPIOLIB
33 select ARM_AMBA
34 select ARM_ERRATA_411920
35 select ARM_TIMER_SP804
36 select CLKDEV_LOOKUP
37 select CLKSRC_OF
38 select CPU_V6
39 select GENERIC_CLOCKEVENTS
40 select PINCTRL
41 select PINCTRL_BCM2835
42 help
43 This enables support for the Broadcom BCM2835 SoC. This SoC is
44 used in the Raspberry Pi and Roku 2 devices.
45
35endmenu 46endmenu
36 47
37endif 48endif
diff --git a/arch/arm/mach-bcm/Makefile b/arch/arm/mach-bcm/Makefile
index c2ccd5a0f772..0ad293882079 100644
--- a/arch/arm/mach-bcm/Makefile
+++ b/arch/arm/mach-bcm/Makefile
@@ -11,5 +11,7 @@
11# GNU General Public License for more details. 11# GNU General Public License for more details.
12 12
13obj-$(CONFIG_ARCH_BCM_MOBILE) := board_bcm281xx.o bcm_kona_smc.o bcm_kona_smc_asm.o kona.o 13obj-$(CONFIG_ARCH_BCM_MOBILE) := board_bcm281xx.o bcm_kona_smc.o bcm_kona_smc_asm.o kona.o
14obj-$(CONFIG_ARCH_BCM2835) += board_bcm2835.o
15
14plus_sec := $(call as-instr,.arch_extension sec,+sec) 16plus_sec := $(call as-instr,.arch_extension sec,+sec)
15AFLAGS_bcm_kona_smc_asm.o :=-Wa,-march=armv7-a$(plus_sec) 17AFLAGS_bcm_kona_smc_asm.o :=-Wa,-march=armv7-a$(plus_sec)
diff --git a/arch/arm/mach-bcm/board_bcm281xx.c b/arch/arm/mach-bcm/board_bcm281xx.c
index cb3dc364405c..6be54c10f8cb 100644
--- a/arch/arm/mach-bcm/board_bcm281xx.c
+++ b/arch/arm/mach-bcm/board_bcm281xx.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2012-2013 Broadcom Corporation 2 * Copyright (C) 2012-2014 Broadcom Corporation
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as 5 * modify it under the terms of the GNU General Public License as
@@ -11,64 +11,65 @@
11 * GNU General Public License for more details. 11 * GNU General Public License for more details.
12 */ 12 */
13 13
14#include <linux/of_platform.h>
15#include <linux/init.h>
16#include <linux/device.h>
17#include <linux/platform_device.h>
18#include <linux/clocksource.h> 14#include <linux/clocksource.h>
15#include <linux/of_address.h>
16#include <linux/of_platform.h>
19 17
20#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
21#include <asm/mach/time.h>
22#include <asm/hardware/cache-l2x0.h>
23 19
24#include "bcm_kona_smc.h"
25#include "kona.h" 20#include "kona.h"
26 21
27static int __init kona_l2_cache_init(void) 22#define SECWDOG_OFFSET 0x00000000
23#define SECWDOG_RESERVED_MASK 0xe2000000
24#define SECWDOG_WD_LOAD_FLAG_MASK 0x10000000
25#define SECWDOG_EN_MASK 0x08000000
26#define SECWDOG_SRSTEN_MASK 0x04000000
27#define SECWDOG_CLKS_SHIFT 20
28#define SECWDOG_COUNT_SHIFT 0
29
30static void bcm281xx_restart(enum reboot_mode mode, const char *cmd)
28{ 31{
29 if (!IS_ENABLED(CONFIG_CACHE_L2X0)) 32 uint32_t val;
30 return 0; 33 void __iomem *base;
34 struct device_node *np_wdog;
31 35
32 if (bcm_kona_smc_init() < 0) { 36 np_wdog = of_find_compatible_node(NULL, NULL, "brcm,kona-wdt");
33 pr_info("Kona secure API not available. Skipping L2 init\n"); 37 if (!np_wdog) {
34 return 0; 38 pr_emerg("Couldn't find brcm,kona-wdt\n");
39 return;
40 }
41 base = of_iomap(np_wdog, 0);
42 if (!base) {
43 pr_emerg("Couldn't map brcm,kona-wdt\n");
44 return;
35 } 45 }
36 46
37 bcm_kona_smc(SSAPI_ENABLE_L2_CACHE, 0, 0, 0, 0); 47 /* Enable watchdog with short timeout (244us). */
38 48 val = readl(base + SECWDOG_OFFSET);
39 /* 49 val &= SECWDOG_RESERVED_MASK | SECWDOG_WD_LOAD_FLAG_MASK;
40 * The aux_val and aux_mask have no effect since L2 cache is already 50 val |= SECWDOG_EN_MASK | SECWDOG_SRSTEN_MASK |
41 * enabled. Pass 0s for aux_val and 1s for aux_mask for default value. 51 (0x15 << SECWDOG_CLKS_SHIFT) |
42 */ 52 (0x8 << SECWDOG_COUNT_SHIFT);
43 return l2x0_of_init(0, ~0); 53 writel(val, base + SECWDOG_OFFSET);
44}
45
46static void bcm_board_setup_restart(void)
47{
48 struct device_node *np;
49 54
50 np = of_find_compatible_node(NULL, NULL, "brcm,bcm11351"); 55 /* Wait for reset */
51 if (np) { 56 while (1);
52 if (of_device_is_available(np))
53 bcm_kona_setup_restart();
54 of_node_put(np);
55 }
56 /* Restart setup for other boards goes here */
57} 57}
58 58
59static void __init board_init(void) 59static void __init bcm281xx_init(void)
60{ 60{
61 of_platform_populate(NULL, of_default_bus_match_table, NULL, 61 of_platform_populate(NULL, of_default_bus_match_table, NULL,
62 &platform_bus); 62 &platform_bus);
63
64 bcm_board_setup_restart();
65 kona_l2_cache_init(); 63 kona_l2_cache_init();
66} 64}
67 65
68static const char * const bcm11351_dt_compat[] = { "brcm,bcm11351", NULL, }; 66static const char * const bcm281xx_dt_compat[] = {
67 "brcm,bcm11351", /* Have to use the first number upstreamed */
68 NULL,
69};
69 70
70DT_MACHINE_START(BCM11351_DT, "BCM281xx Broadcom Application Processor") 71DT_MACHINE_START(BCM281XX_DT, "BCM281xx Broadcom Application Processor")
71 .init_machine = board_init, 72 .init_machine = bcm281xx_init,
72 .restart = bcm_kona_restart, 73 .restart = bcm281xx_restart,
73 .dt_compat = bcm11351_dt_compat, 74 .dt_compat = bcm281xx_dt_compat,
74MACHINE_END 75MACHINE_END
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm/board_bcm2835.c
index 70f2f3925f0e..70f2f3925f0e 100644
--- a/arch/arm/mach-bcm2835/bcm2835.c
+++ b/arch/arm/mach-bcm/board_bcm2835.c
diff --git a/arch/arm/mach-bcm/kona.c b/arch/arm/mach-bcm/kona.c
index 6939d9017f63..768bc2837bf5 100644
--- a/arch/arm/mach-bcm/kona.c
+++ b/arch/arm/mach-bcm/kona.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2013 Broadcom Corporation 2 * Copyright (C) 2012-2014 Broadcom Corporation
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as 5 * modify it under the terms of the GNU General Public License as
@@ -11,55 +11,33 @@
11 * GNU General Public License for more details. 11 * GNU General Public License for more details.
12 */ 12 */
13 13
14#include <linux/of_address.h> 14#include <linux/of_platform.h>
15#include <asm/io.h> 15#include <asm/hardware/cache-l2x0.h>
16 16
17#include "bcm_kona_smc.h"
17#include "kona.h" 18#include "kona.h"
18 19
19static void __iomem *watchdog_base; 20void __init kona_l2_cache_init(void)
20
21void bcm_kona_setup_restart(void)
22{ 21{
23 struct device_node *np_wdog; 22 int ret;
24 23
25 /* 24 if (!IS_ENABLED(CONFIG_CACHE_L2X0))
26 * The assumption is that whoever calls bcm_kona_setup_restart()
27 * also needs a Kona Watchdog Timer entry in Device Tree, i.e. we
28 * report an error if the DT entry is missing.
29 */
30 np_wdog = of_find_compatible_node(NULL, NULL, "brcm,kona-wdt");
31 if (!np_wdog) {
32 pr_err("brcm,kona-wdt not found in DT, reboot disabled\n");
33 return; 25 return;
34 }
35 watchdog_base = of_iomap(np_wdog, 0);
36 WARN(!watchdog_base, "failed to map watchdog base");
37 of_node_put(np_wdog);
38}
39
40#define SECWDOG_OFFSET 0x00000000
41#define SECWDOG_RESERVED_MASK 0xE2000000
42#define SECWDOG_WD_LOAD_FLAG_MASK 0x10000000
43#define SECWDOG_EN_MASK 0x08000000
44#define SECWDOG_SRSTEN_MASK 0x04000000
45#define SECWDOG_CLKS_SHIFT 20
46#define SECWDOG_LOCK_SHIFT 0
47 26
48void bcm_kona_restart(enum reboot_mode mode, const char *cmd) 27 ret = bcm_kona_smc_init();
49{ 28 if (ret) {
50 uint32_t val; 29 pr_info("Secure API not available (%d). Skipping L2 init.\n",
51 30 ret);
52 if (!watchdog_base) 31 return;
53 panic("Watchdog not mapped. Reboot failed.\n"); 32 }
54 33
55 /* Enable watchdog2 with very short timeout. */ 34 bcm_kona_smc(SSAPI_ENABLE_L2_CACHE, 0, 0, 0, 0);
56 val = readl(watchdog_base + SECWDOG_OFFSET);
57 val &= SECWDOG_RESERVED_MASK | SECWDOG_WD_LOAD_FLAG_MASK;
58 val |= SECWDOG_EN_MASK | SECWDOG_SRSTEN_MASK |
59 (0x8 << SECWDOG_CLKS_SHIFT) |
60 (0x8 << SECWDOG_LOCK_SHIFT);
61 writel(val, watchdog_base + SECWDOG_OFFSET);
62 35
63 while (1) 36 /*
64 ; 37 * The aux_val and aux_mask have no effect since L2 cache is already
38 * enabled. Pass 0s for aux_val and 1s for aux_mask for default value.
39 */
40 ret = l2x0_of_init(0, ~0);
41 if (ret)
42 pr_err("Couldn't enable L2 cache: %d\n", ret);
65} 43}
diff --git a/arch/arm/mach-bcm/kona.h b/arch/arm/mach-bcm/kona.h
index 291eca3e06ff..3a7a017c29cd 100644
--- a/arch/arm/mach-bcm/kona.h
+++ b/arch/arm/mach-bcm/kona.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2013 Broadcom Corporation 2 * Copyright (C) 2012-2014 Broadcom Corporation
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as 5 * modify it under the terms of the GNU General Public License as
@@ -11,7 +11,4 @@
11 * GNU General Public License for more details. 11 * GNU General Public License for more details.
12 */ 12 */
13 13
14#include <linux/reboot.h> 14void __init kona_l2_cache_init(void);
15
16void bcm_kona_setup_restart(void);
17void bcm_kona_restart(enum reboot_mode mode, const char *cmd);
diff --git a/arch/arm/mach-bcm2835/Kconfig b/arch/arm/mach-bcm2835/Kconfig
deleted file mode 100644
index d1f9612f8c15..000000000000
--- a/arch/arm/mach-bcm2835/Kconfig
+++ /dev/null
@@ -1,15 +0,0 @@
1config ARCH_BCM2835
2 bool "Broadcom BCM2835 family" if ARCH_MULTI_V6
3 select ARCH_REQUIRE_GPIOLIB
4 select ARM_AMBA
5 select ARM_ERRATA_411920
6 select ARM_TIMER_SP804
7 select CLKDEV_LOOKUP
8 select CLKSRC_OF
9 select CPU_V6
10 select GENERIC_CLOCKEVENTS
11 select PINCTRL
12 select PINCTRL_BCM2835
13 help
14 This enables support for the Broadcom BCM2835 SoC. This SoC is
15 used in the Raspberry Pi and Roku 2 devices.
diff --git a/arch/arm/mach-bcm2835/Makefile b/arch/arm/mach-bcm2835/Makefile
deleted file mode 100644
index 4c3892fe02c3..000000000000
--- a/arch/arm/mach-bcm2835/Makefile
+++ /dev/null
@@ -1 +0,0 @@
1obj-y += bcm2835.o
diff --git a/arch/arm/mach-berlin/Kconfig b/arch/arm/mach-berlin/Kconfig
index 7a02d222c378..b0cb0722acd2 100644
--- a/arch/arm/mach-berlin/Kconfig
+++ b/arch/arm/mach-berlin/Kconfig
@@ -1,9 +1,7 @@
1config ARCH_BERLIN 1config ARCH_BERLIN
2 bool "Marvell Berlin SoCs" if ARCH_MULTI_V7 2 bool "Marvell Berlin SoCs" if ARCH_MULTI_V7
3 select ARM_GIC 3 select ARM_GIC
4 select GENERIC_CLOCKEVENTS
5 select GENERIC_IRQ_CHIP 4 select GENERIC_IRQ_CHIP
6 select COMMON_CLK
7 select DW_APB_ICTL 5 select DW_APB_ICTL
8 select DW_APB_TIMER_OF 6 select DW_APB_TIMER_OF
9 7
@@ -16,12 +14,10 @@ config MACH_BERLIN_BG2
16 select CACHE_L2X0 14 select CACHE_L2X0
17 select CPU_PJ4B 15 select CPU_PJ4B
18 select HAVE_ARM_TWD if SMP 16 select HAVE_ARM_TWD if SMP
19 select HAVE_SMP
20 17
21config MACH_BERLIN_BG2CD 18config MACH_BERLIN_BG2CD
22 bool "Marvell Armada 1500-mini (BG2CD)" 19 bool "Marvell Armada 1500-mini (BG2CD)"
23 select CACHE_L2X0 20 select CACHE_L2X0
24 select CPU_V7
25 select HAVE_ARM_TWD if SMP 21 select HAVE_ARM_TWD if SMP
26 22
27endmenu 23endmenu
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index bea6295c8c59..f711498c180c 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -33,20 +33,6 @@ config ARCH_P720T
33 Say Y here if you intend to run this kernel on the ARM Prospector 33 Say Y here if you intend to run this kernel on the ARM Prospector
34 720T. 34 720T.
35 35
36config EP72XX_ROM_BOOT
37 bool "EP721x/EP731x ROM boot"
38 help
39 If you say Y here, your CLPS711x-based kernel will use the bootstrap
40 mode memory map instead of the normal memory map.
41
42 Processors derived from the Cirrus CLPS711X core support two boot
43 modes. Normal mode boots from the external memory device at CS0.
44 Bootstrap mode rearranges parts of the memory map, placing an
45 internal 128 byte bootstrap ROM at CS0. This option performs the
46 address map changes required to support booting in this mode.
47
48 You almost surely want to say N here.
49
50endmenu 36endmenu
51 37
52endif 38endif
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index c5a8ea6839ef..5d6afda1c0e8 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -38,13 +38,6 @@
38#define clps_writel(val,off) writel(val, CLPS711X_VIRT_BASE + (off)) 38#define clps_writel(val,off) writel(val, CLPS711X_VIRT_BASE + (off))
39#endif 39#endif
40 40
41/*
42 * The physical addresses that the external chip select signals map to is
43 * dependent on the setting of the nMEDCHG signal on EP7211 and EP7212
44 * processors. CONFIG_EP72XX_BOOT_ROM is only available if these
45 * processors are in use.
46 */
47#ifndef CONFIG_EP72XX_ROM_BOOT
48#define CS0_PHYS_BASE (0x00000000) 41#define CS0_PHYS_BASE (0x00000000)
49#define CS1_PHYS_BASE (0x10000000) 42#define CS1_PHYS_BASE (0x10000000)
50#define CS2_PHYS_BASE (0x20000000) 43#define CS2_PHYS_BASE (0x20000000)
@@ -53,16 +46,6 @@
53#define CS5_PHYS_BASE (0x50000000) 46#define CS5_PHYS_BASE (0x50000000)
54#define CS6_PHYS_BASE (0x60000000) 47#define CS6_PHYS_BASE (0x60000000)
55#define CS7_PHYS_BASE (0x70000000) 48#define CS7_PHYS_BASE (0x70000000)
56#else
57#define CS0_PHYS_BASE (0x70000000)
58#define CS1_PHYS_BASE (0x60000000)
59#define CS2_PHYS_BASE (0x50000000)
60#define CS3_PHYS_BASE (0x40000000)
61#define CS4_PHYS_BASE (0x30000000)
62#define CS5_PHYS_BASE (0x20000000)
63#define CS6_PHYS_BASE (0x10000000)
64#define CS7_PHYS_BASE (0x00000000)
65#endif
66 49
67#define CLPS711X_SRAM_BASE CS6_PHYS_BASE 50#define CLPS711X_SRAM_BASE CS6_PHYS_BASE
68#define CLPS711X_SRAM_SIZE (48 * 1024) 51#define CLPS711X_SRAM_SIZE (48 * 1024)
diff --git a/arch/arm/mach-clps711x/include/mach/timex.h b/arch/arm/mach-clps711x/include/mach/timex.h
deleted file mode 100644
index de6fd192d1c3..000000000000
--- a/arch/arm/mach-clps711x/include/mach/timex.h
+++ /dev/null
@@ -1,2 +0,0 @@
1/* Bogus value */
2#define CLOCK_TICK_RATE 512000
diff --git a/arch/arm/mach-cns3xxx/Kconfig b/arch/arm/mach-cns3xxx/Kconfig
index dbf0df8bb0ac..dce8decd5d46 100644
--- a/arch/arm/mach-cns3xxx/Kconfig
+++ b/arch/arm/mach-cns3xxx/Kconfig
@@ -1,9 +1,6 @@
1config ARCH_CNS3XXX 1config ARCH_CNS3XXX
2 bool "Cavium Networks CNS3XXX family" if ARCH_MULTI_V6 2 bool "Cavium Networks CNS3XXX family" if ARCH_MULTI_V6
3 select ARM_GIC 3 select ARM_GIC
4 select CPU_V6K
5 select GENERIC_CLOCKEVENTS
6 select MIGHT_HAVE_CACHE_L2X0
7 select MIGHT_HAVE_PCI 4 select MIGHT_HAVE_PCI
8 select PCI_DOMAINS if PCI 5 select PCI_DOMAINS if PCI
9 help 6 help
diff --git a/arch/arm/mach-davinci/include/mach/timex.h b/arch/arm/mach-davinci/include/mach/timex.h
deleted file mode 100644
index 9b885298f106..000000000000
--- a/arch/arm/mach-davinci/include/mach/timex.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * DaVinci timer defines
3 *
4 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11#ifndef __ASM_ARCH_TIMEX_H
12#define __ASM_ARCH_TIMEX_H
13
14/*
15 * Alert: Not all timers of the DaVinci family run at a frequency of 27MHz,
16 * but we should be fine as long as CLOCK_TICK_RATE or LATCH (see include/
17 * linux/jiffies.h) are not used directly in code. Currently none of the
18 * code relevant to DaVinci platform depends on these values directly.
19 */
20#define CLOCK_TICK_RATE 27000000
21
22#endif /* __ASM_ARCH_TIMEX_H__ */
diff --git a/arch/arm/mach-dove/include/mach/timex.h b/arch/arm/mach-dove/include/mach/timex.h
deleted file mode 100644
index 251d538541db..000000000000
--- a/arch/arm/mach-dove/include/mach/timex.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * arch/arm/mach-dove/include/mach/timex.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#define CLOCK_TICK_RATE (100 * HZ)
diff --git a/arch/arm/mach-ebsa110/include/mach/timex.h b/arch/arm/mach-ebsa110/include/mach/timex.h
deleted file mode 100644
index 4fb43b22a102..000000000000
--- a/arch/arm/mach-ebsa110/include/mach/timex.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/timex.h
3 *
4 * Copyright (C) 1997, 1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * EBSA110 architecture timex specifications
11 */
12
13/*
14 * On the EBSA, the clock ticks at weird rates.
15 * This is therefore not used to calculate the
16 * divisor.
17 */
18#define CLOCK_TICK_RATE 47894000
19
diff --git a/arch/arm/mach-efm32/include/mach/entry-macro.S b/arch/arm/mach-efm32/include/mach/entry-macro.S
deleted file mode 100644
index 322159d5ed91..000000000000
--- a/arch/arm/mach-efm32/include/mach/entry-macro.S
+++ /dev/null
@@ -1,4 +0,0 @@
1/*
2 * Empty file waiting for deletion once <mach/entry-macro.S> isn't needed any
3 * more. Patch "ARM: v7-M: drop using mach/entry-macro.S" sitting in next.
4 */
diff --git a/arch/arm/mach-efm32/include/mach/timex.h b/arch/arm/mach-efm32/include/mach/timex.h
deleted file mode 100644
index 7a8b26da6599..000000000000
--- a/arch/arm/mach-efm32/include/mach/timex.h
+++ /dev/null
@@ -1,3 +0,0 @@
1/*
2 * Empty file waiting for deletion once <mach/timex.h> isn't needed any more.
3 */
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index fd021ba539fe..0e571f1749d6 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -117,7 +117,7 @@ void __init ep93xx_map_io(void)
117#define EP93XX_TIMER4_CLOCK 983040 117#define EP93XX_TIMER4_CLOCK 983040
118 118
119#define TIMER1_RELOAD ((EP93XX_TIMER123_CLOCK / HZ) - 1) 119#define TIMER1_RELOAD ((EP93XX_TIMER123_CLOCK / HZ) - 1)
120#define TIMER4_TICKS_PER_JIFFY DIV_ROUND_CLOSEST(CLOCK_TICK_RATE, HZ) 120#define TIMER4_TICKS_PER_JIFFY DIV_ROUND_CLOSEST(EP93XX_TIMER4_CLOCK, HZ)
121 121
122static unsigned int last_jiffy_time; 122static unsigned int last_jiffy_time;
123 123
diff --git a/arch/arm/mach-ep93xx/include/mach/timex.h b/arch/arm/mach-ep93xx/include/mach/timex.h
deleted file mode 100644
index 6b3503b01fa6..000000000000
--- a/arch/arm/mach-ep93xx/include/mach/timex.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/timex.h
3 */
4
5#define CLOCK_TICK_RATE 983040
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index 8d0042c9d4d3..b2f9bb071557 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -20,6 +20,7 @@
20#include <clocksource/samsung_pwm.h> 20#include <clocksource/samsung_pwm.h>
21#include <linux/sched.h> 21#include <linux/sched.h>
22#include <linux/serial_core.h> 22#include <linux/serial_core.h>
23#include <linux/serial_s3c.h>
23#include <linux/of.h> 24#include <linux/of.h>
24#include <linux/of_fdt.h> 25#include <linux/of_fdt.h>
25#include <linux/of_irq.h> 26#include <linux/of_irq.h>
@@ -40,7 +41,6 @@
40 41
41#include <plat/cpu.h> 42#include <plat/cpu.h>
42#include <plat/pm.h> 43#include <plat/pm.h>
43#include <plat/regs-serial.h>
44 44
45#include "common.h" 45#include "common.h"
46#include "regs-pmu.h" 46#include "regs-pmu.h"
diff --git a/arch/arm/mach-exynos/include/mach/timex.h b/arch/arm/mach-exynos/include/mach/timex.h
deleted file mode 100644
index 6d138750a708..000000000000
--- a/arch/arm/mach-exynos/include/mach/timex.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/* linux/arch/arm/mach-exynos4/include/mach/timex.h
2 *
3 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * Copyright (c) 2003-2010 Simtec Electronics
7 * Ben Dooks <ben@simtec.co.uk>
8 *
9 * Based on arch/arm/mach-s5p6442/include/mach/timex.h
10 *
11 * EXYNOS4 - time parameters
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
16*/
17
18#ifndef __ASM_ARCH_TIMEX_H
19#define __ASM_ARCH_TIMEX_H __FILE__
20
21/* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it
22 * a variable is useless. It seems as long as we make our timers an
23 * exact multiple of HZ, any value that makes a 1->1 correspondence
24 * for the time conversion functions to/from jiffies is acceptable.
25*/
26
27#define CLOCK_TICK_RATE 12000000
28
29#endif /* __ASM_ARCH_TIMEX_H */
diff --git a/arch/arm/mach-exynos/include/mach/uncompress.h b/arch/arm/mach-exynos/include/mach/uncompress.h
deleted file mode 100644
index 5d7ce36be46f..000000000000
--- a/arch/arm/mach-exynos/include/mach/uncompress.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * Copyright (c) 2010-2012 Samsung Electronics Co., Ltd.
3 * http://www.samsung.com
4 *
5 * EXYNOS - uncompress code
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#ifndef __ASM_ARCH_UNCOMPRESS_H
13#define __ASM_ARCH_UNCOMPRESS_H __FILE__
14
15#include <asm/mach-types.h>
16
17#include <mach/map.h>
18#include <plat/uncompress.h>
19
20static unsigned int __raw_readl(unsigned int ptr)
21{
22 return *((volatile unsigned int *)ptr);
23}
24
25static void arch_detect_cpu(void)
26{
27 u32 chip_id = __raw_readl(EXYNOS_PA_CHIPID);
28
29 /*
30 * product_id is bits 31:12
31 * bits 23:20 describe the exynosX family
32 * bits 27:24 describe the exynosX family in exynos5420
33 */
34 chip_id >>= 20;
35
36 if ((chip_id & 0x0f) == 0x5 || (chip_id & 0xf0) == 0x50)
37 uart_base = (volatile u8 *)EXYNOS5_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
38 else
39 uart_base = (volatile u8 *)EXYNOS4_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
40
41 /*
42 * For preventing FIFO overrun or infinite loop of UART console,
43 * fifo_max should be the minimum fifo size of all of the UART channels
44 */
45 fifo_mask = S5PV210_UFSTAT_TXMASK;
46 fifo_max = 15 << S5PV210_UFSTAT_TXSHIFT;
47}
48#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index 8fd24882f0b1..fe6570ebbdde 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -22,8 +22,6 @@
22#include <linux/of_platform.h> 22#include <linux/of_platform.h>
23#include <linux/sched.h> 23#include <linux/sched.h>
24 24
25#include <plat/devs.h>
26
27#include "regs-pmu.h" 25#include "regs-pmu.h"
28 26
29/* 27/*
diff --git a/arch/arm/mach-footbridge/include/mach/timex.h b/arch/arm/mach-footbridge/include/mach/timex.h
deleted file mode 100644
index d0fea9d6d4ab..000000000000
--- a/arch/arm/mach-footbridge/include/mach/timex.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * arch/arm/mach-footbridge/include/mach/timex.h
3 *
4 * Copyright (C) 1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * EBSA285 architecture timex specifications
11 */
12
13/*
14 * We assume a constant here; this satisfies the maths in linux/timex.h
15 * and linux/time.h. CLOCK_TICK_RATE is actually system dependent, but
16 * this must be a constant.
17 */
18#define CLOCK_TICK_RATE (50000000/16)
diff --git a/arch/arm/mach-gemini/include/mach/timex.h b/arch/arm/mach-gemini/include/mach/timex.h
deleted file mode 100644
index dc5690ba975c..000000000000
--- a/arch/arm/mach-gemini/include/mach/timex.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * Gemini timex specifications
3 *
4 * Copyright (C) 2008-2009 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 */
11
12/* When AHB bus frequency is 150MHz */
13#define CLOCK_TICK_RATE 38000000
diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
index 0aded64a9ebc..830b76e70250 100644
--- a/arch/arm/mach-highbank/Kconfig
+++ b/arch/arm/mach-highbank/Kconfig
@@ -5,7 +5,6 @@ config ARCH_HIGHBANK
5 select ARCH_HAS_HOLES_MEMORYMODEL 5 select ARCH_HAS_HOLES_MEMORYMODEL
6 select ARCH_HAS_OPP 6 select ARCH_HAS_OPP
7 select ARCH_SUPPORTS_BIG_ENDIAN 7 select ARCH_SUPPORTS_BIG_ENDIAN
8 select ARCH_WANT_OPTIONAL_GPIOLIB
9 select ARM_AMBA 8 select ARM_AMBA
10 select ARM_ERRATA_764369 if SMP 9 select ARM_ERRATA_764369 if SMP
11 select ARM_ERRATA_775420 10 select ARM_ERRATA_775420
@@ -14,14 +13,8 @@ config ARCH_HIGHBANK
14 select ARM_PSCI 13 select ARM_PSCI
15 select ARM_TIMER_SP804 14 select ARM_TIMER_SP804
16 select CACHE_L2X0 15 select CACHE_L2X0
17 select COMMON_CLK
18 select CPU_V7
19 select GENERIC_CLOCKEVENTS
20 select HAVE_ARM_SCU 16 select HAVE_ARM_SCU
21 select HAVE_ARM_TWD if SMP 17 select HAVE_ARM_TWD if SMP
22 select HAVE_SMP
23 select MAILBOX 18 select MAILBOX
24 select PL320_MBOX 19 select PL320_MBOX
25 select SPARSE_IRQ
26 select USE_OF
27 select ZONE_DMA if ARM_LPAE 20 select ZONE_DMA if ARM_LPAE
diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig
index 1abae5f6a418..feee4dbb0760 100644
--- a/arch/arm/mach-hisi/Kconfig
+++ b/arch/arm/mach-hisi/Kconfig
@@ -3,13 +3,9 @@ config ARCH_HI3xxx
3 select ARM_AMBA 3 select ARM_AMBA
4 select ARM_GIC 4 select ARM_GIC
5 select ARM_TIMER_SP804 5 select ARM_TIMER_SP804
6 select ARCH_WANT_OPTIONAL_GPIOLIB
7 select CACHE_L2X0 6 select CACHE_L2X0
8 select CLKSRC_OF 7 select HAVE_ARM_SCU if SMP
9 select GENERIC_CLOCKEVENTS
10 select HAVE_ARM_SCU
11 select HAVE_ARM_TWD if SMP 8 select HAVE_ARM_TWD if SMP
12 select HAVE_SMP
13 select PINCTRL 9 select PINCTRL
14 select PINCTRL_SINGLE 10 select PINCTRL_SINGLE
15 help 11 help
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 33567aa5880f..41ffd433f709 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -2,18 +2,11 @@ config ARCH_MXC
2 bool "Freescale i.MX family" if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 2 bool "Freescale i.MX family" if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7
3 select ARCH_REQUIRE_GPIOLIB 3 select ARCH_REQUIRE_GPIOLIB
4 select ARM_CPU_SUSPEND if PM 4 select ARM_CPU_SUSPEND if PM
5 select ARM_PATCH_PHYS_VIRT
6 select CLKSRC_MMIO 5 select CLKSRC_MMIO
7 select COMMON_CLK
8 select GENERIC_ALLOCATOR 6 select GENERIC_ALLOCATOR
9 select GENERIC_CLOCKEVENTS
10 select GENERIC_IRQ_CHIP 7 select GENERIC_IRQ_CHIP
11 select MIGHT_HAVE_CACHE_L2X0 if ARCH_MULTI_V6_V7
12 select MULTI_IRQ_HANDLER
13 select PINCTRL 8 select PINCTRL
14 select SOC_BUS 9 select SOC_BUS
15 select SPARSE_IRQ
16 select USE_OF
17 help 10 help
18 Support for Freescale MXC/iMX-based family of processors 11 Support for Freescale MXC/iMX-based family of processors
19 12
@@ -121,7 +114,6 @@ config SOC_IMX31
121config SOC_IMX35 114config SOC_IMX35
122 bool 115 bool
123 select ARCH_MXC_IOMUX_V3 116 select ARCH_MXC_IOMUX_V3
124 select CPU_V6K
125 select HAVE_EPIT 117 select HAVE_EPIT
126 select MXC_AVIC 118 select MXC_AVIC
127 select SMP_ON_UP if SMP 119 select SMP_ON_UP if SMP
@@ -132,7 +124,6 @@ config SOC_IMX5
132 select ARCH_HAS_CPUFREQ 124 select ARCH_HAS_CPUFREQ
133 select ARCH_HAS_OPP 125 select ARCH_HAS_OPP
134 select ARCH_MXC_IOMUX_V3 126 select ARCH_MXC_IOMUX_V3
135 select CPU_V7
136 select MXC_TZIC 127 select MXC_TZIC
137 128
138config SOC_IMX51 129config SOC_IMX51
@@ -792,14 +783,12 @@ config SOC_IMX6Q
792 select ARM_ERRATA_764369 if SMP 783 select ARM_ERRATA_764369 if SMP
793 select ARM_ERRATA_775420 784 select ARM_ERRATA_775420
794 select ARM_GIC 785 select ARM_GIC
795 select CPU_V7
796 select HAVE_ARM_SCU if SMP 786 select HAVE_ARM_SCU if SMP
797 select HAVE_ARM_TWD if SMP 787 select HAVE_ARM_TWD if SMP
798 select HAVE_IMX_ANATOP 788 select HAVE_IMX_ANATOP
799 select HAVE_IMX_GPC 789 select HAVE_IMX_GPC
800 select HAVE_IMX_MMDC 790 select HAVE_IMX_MMDC
801 select HAVE_IMX_SRC 791 select HAVE_IMX_SRC
802 select HAVE_SMP
803 select MFD_SYSCON 792 select MFD_SYSCON
804 select MIGHT_HAVE_PCI 793 select MIGHT_HAVE_PCI
805 select PCI_DOMAINS if PCI 794 select PCI_DOMAINS if PCI
@@ -817,7 +806,6 @@ config SOC_IMX6SL
817 select ARM_ERRATA_754322 806 select ARM_ERRATA_754322
818 select ARM_ERRATA_775420 807 select ARM_ERRATA_775420
819 select ARM_GIC 808 select ARM_GIC
820 select CPU_V7
821 select HAVE_IMX_ANATOP 809 select HAVE_IMX_ANATOP
822 select HAVE_IMX_GPC 810 select HAVE_IMX_GPC
823 select HAVE_IMX_MMDC 811 select HAVE_IMX_MMDC
@@ -833,9 +821,7 @@ config SOC_IMX6SL
833 821
834config SOC_VF610 822config SOC_VF610
835 bool "Vybrid Family VF610 support" 823 bool "Vybrid Family VF610 support"
836 select CPU_V7
837 select ARM_GIC 824 select ARM_GIC
838 select CLKSRC_OF
839 select PINCTRL_VF610 825 select PINCTRL_VF610
840 select VF_PIT_TIMER 826 select VF_PIT_TIMER
841 select PL310_ERRATA_588369 if CACHE_PL310 827 select PL310_ERRATA_588369 if CACHE_PL310
diff --git a/arch/arm/mach-integrator/include/mach/timex.h b/arch/arm/mach-integrator/include/mach/timex.h
deleted file mode 100644
index 1dcb42028c82..000000000000
--- a/arch/arm/mach-integrator/include/mach/timex.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * arch/arm/mach-integrator/include/mach/timex.h
3 *
4 * Integrator architecture timex specifications
5 *
6 * Copyright (C) 1999 ARM Limited
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23/*
24 * ??
25 */
26#define CLOCK_TICK_RATE (50000000 / 16)
diff --git a/arch/arm/mach-iop13xx/include/mach/timex.h b/arch/arm/mach-iop13xx/include/mach/timex.h
deleted file mode 100644
index 45fb2745bb54..000000000000
--- a/arch/arm/mach-iop13xx/include/mach/timex.h
+++ /dev/null
@@ -1 +0,0 @@
1#define CLOCK_TICK_RATE (100 * HZ)
diff --git a/arch/arm/mach-iop32x/include/mach/timex.h b/arch/arm/mach-iop32x/include/mach/timex.h
deleted file mode 100644
index 7262ab81419d..000000000000
--- a/arch/arm/mach-iop32x/include/mach/timex.h
+++ /dev/null
@@ -1,6 +0,0 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/timex.h
3 *
4 * IOP32x architecture timex specifications
5 */
6#define CLOCK_TICK_RATE (100 * HZ)
diff --git a/arch/arm/mach-iop33x/include/mach/timex.h b/arch/arm/mach-iop33x/include/mach/timex.h
deleted file mode 100644
index 54c589091d6e..000000000000
--- a/arch/arm/mach-iop33x/include/mach/timex.h
+++ /dev/null
@@ -1,6 +0,0 @@
1/*
2 * arch/arm/mach-iop33x/include/mach/timex.h
3 *
4 * IOP3xx architecture timex specifications
5 */
6#define CLOCK_TICK_RATE (100 * HZ)
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index be882c95bd36..fc4b7b24265e 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -23,7 +23,6 @@
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/bitops.h> 24#include <linux/bitops.h>
25#include <linux/time.h> 25#include <linux/time.h>
26#include <linux/timex.h>
27#include <linux/clocksource.h> 26#include <linux/clocksource.h>
28#include <linux/clockchips.h> 27#include <linux/clockchips.h>
29#include <linux/io.h> 28#include <linux/io.h>
@@ -44,6 +43,17 @@
44#include <asm/mach/irq.h> 43#include <asm/mach/irq.h>
45#include <asm/mach/time.h> 44#include <asm/mach/time.h>
46 45
46#define IXP4XX_TIMER_FREQ 66666000
47
48/*
49 * The timer register doesn't allow to specify the two least significant bits of
50 * the timeout value and assumes them being zero. So make sure IXP4XX_LATCH is
51 * the best value with the two least significant bits unset.
52 */
53#define IXP4XX_LATCH DIV_ROUND_CLOSEST(IXP4XX_TIMER_FREQ, \
54 (IXP4XX_OST_RELOAD_MASK + 1) * HZ) * \
55 (IXP4XX_OST_RELOAD_MASK + 1)
56
47static void __init ixp4xx_clocksource_init(void); 57static void __init ixp4xx_clocksource_init(void);
48static void __init ixp4xx_clockevent_init(void); 58static void __init ixp4xx_clockevent_init(void);
49static struct clock_event_device clockevent_ixp4xx; 59static struct clock_event_device clockevent_ixp4xx;
@@ -519,7 +529,7 @@ static void ixp4xx_set_mode(enum clock_event_mode mode,
519 529
520 switch (mode) { 530 switch (mode) {
521 case CLOCK_EVT_MODE_PERIODIC: 531 case CLOCK_EVT_MODE_PERIODIC:
522 osrt = LATCH & ~IXP4XX_OST_RELOAD_MASK; 532 osrt = IXP4XX_LATCH & ~IXP4XX_OST_RELOAD_MASK;
523 opts = IXP4XX_OST_ENABLE; 533 opts = IXP4XX_OST_ENABLE;
524 break; 534 break;
525 case CLOCK_EVT_MODE_ONESHOT: 535 case CLOCK_EVT_MODE_ONESHOT:
diff --git a/arch/arm/mach-ixp4xx/include/mach/timex.h b/arch/arm/mach-ixp4xx/include/mach/timex.h
deleted file mode 100644
index 0396d89f947c..000000000000
--- a/arch/arm/mach-ixp4xx/include/mach/timex.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/timex.h
3 *
4 */
5
6#include <mach/ixp4xx-regs.h>
7
8/*
9 * We use IXP425 General purpose timer for our timer needs, it runs at
10 * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the
11 * timer register ignores the bottom 2 bits of the LATCH value.
12 */
13#define IXP4XX_TIMER_FREQ 66666000
14#define CLOCK_TICK_RATE \
15 (((IXP4XX_TIMER_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
16
diff --git a/arch/arm/mach-keystone/Kconfig b/arch/arm/mach-keystone/Kconfig
index 90a708fef541..f50bc936cb84 100644
--- a/arch/arm/mach-keystone/Kconfig
+++ b/arch/arm/mach-keystone/Kconfig
@@ -1,13 +1,9 @@
1config ARCH_KEYSTONE 1config ARCH_KEYSTONE
2 bool "Texas Instruments Keystone Devices" 2 bool "Texas Instruments Keystone Devices"
3 depends on ARCH_MULTI_V7 3 depends on ARCH_MULTI_V7
4 select CPU_V7
5 select ARM_GIC 4 select ARM_GIC
6 select HAVE_ARM_ARCH_TIMER 5 select HAVE_ARM_ARCH_TIMER
7 select HAVE_SMP
8 select CLKSRC_MMIO 6 select CLKSRC_MMIO
9 select GENERIC_CLOCKEVENTS
10 select ARCH_WANT_OPTIONAL_GPIOLIB
11 select ARM_ERRATA_798181 if SMP 7 select ARM_ERRATA_798181 if SMP
12 select COMMON_CLK_KEYSTONE 8 select COMMON_CLK_KEYSTONE
13 select ARCH_SUPPORTS_BIG_ENDIAN 9 select ARCH_SUPPORTS_BIG_ENDIAN
diff --git a/arch/arm/mach-kirkwood/include/mach/timex.h b/arch/arm/mach-kirkwood/include/mach/timex.h
deleted file mode 100644
index c923cd169b9c..000000000000
--- a/arch/arm/mach-kirkwood/include/mach/timex.h
+++ /dev/null
@@ -1,10 +0,0 @@
1/*
2 * arch/arm/mach-kirkwood/include/mach/timex.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#define CLOCK_TICK_RATE (100 * HZ)
10
diff --git a/arch/arm/mach-ks8695/include/mach/timex.h b/arch/arm/mach-ks8695/include/mach/timex.h
deleted file mode 100644
index 10f716371bd3..000000000000
--- a/arch/arm/mach-ks8695/include/mach/timex.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/timex.h
3 *
4 * Copyright (C) 2006 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * KS8695 - Time Parameters
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
14#ifndef __ASM_ARCH_TIMEX_H
15#define __ASM_ARCH_TIMEX_H
16
17#include <mach/hardware.h>
18
19#define CLOCK_TICK_RATE KS8695_CLOCK_RATE
20
21#endif
diff --git a/arch/arm/mach-lpc32xx/include/mach/timex.h b/arch/arm/mach-lpc32xx/include/mach/timex.h
deleted file mode 100644
index 8d4066b16b3f..000000000000
--- a/arch/arm/mach-lpc32xx/include/mach/timex.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * arch/arm/mach-lpc32xx/include/mach/timex.h
3 *
4 * Author: Kevin Wells <kevin.wells@nxp.com>
5 *
6 * Copyright (C) 2010 NXP Semiconductors
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 */
18
19#ifndef __ASM_ARCH_TIMEX_H
20#define __ASM_ARCH_TIMEX_H
21
22/*
23 * Rate in Hz of the main system oscillator. This value should match
24 * the value 'MAIN_OSC_FREQ' in platform.h
25 */
26#define CLOCK_TICK_RATE 13000000
27
28#endif
diff --git a/arch/arm/mach-mmp/include/mach/timex.h b/arch/arm/mach-mmp/include/mach/timex.h
deleted file mode 100644
index 70c9f1d88c02..000000000000
--- a/arch/arm/mach-mmp/include/mach/timex.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * linux/arch/arm/mach-mmp/include/mach/timex.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifdef CONFIG_CPU_MMP2
10#define CLOCK_TICK_RATE 6500000
11#else
12#define CLOCK_TICK_RATE 3250000
13#endif
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
index bbcd2322fd27..2756351dbb35 100644
--- a/arch/arm/mach-mmp/time.c
+++ b/arch/arm/mach-mmp/time.c
@@ -39,6 +39,12 @@
39 39
40#include "clock.h" 40#include "clock.h"
41 41
42#ifdef CONFIG_CPU_MMP2
43#define MMP_CLOCK_FREQ 6500000
44#else
45#define MMP_CLOCK_FREQ 3250000
46#endif
47
42#define TIMERS_VIRT_BASE TIMERS1_VIRT_BASE 48#define TIMERS_VIRT_BASE TIMERS1_VIRT_BASE
43 49
44#define MAX_DELTA (0xfffffffe) 50#define MAX_DELTA (0xfffffffe)
@@ -195,14 +201,14 @@ void __init timer_init(int irq)
195{ 201{
196 timer_config(); 202 timer_config();
197 203
198 sched_clock_register(mmp_read_sched_clock, 32, CLOCK_TICK_RATE); 204 sched_clock_register(mmp_read_sched_clock, 32, MMP_CLOCK_FREQ);
199 205
200 ckevt.cpumask = cpumask_of(0); 206 ckevt.cpumask = cpumask_of(0);
201 207
202 setup_irq(irq, &timer_irq); 208 setup_irq(irq, &timer_irq);
203 209
204 clocksource_register_hz(&cksrc, CLOCK_TICK_RATE); 210 clocksource_register_hz(&cksrc, MMP_CLOCK_FREQ);
205 clockevents_config_and_register(&ckevt, CLOCK_TICK_RATE, 211 clockevents_config_and_register(&ckevt, MMP_CLOCK_FREQ,
206 MIN_DELTA, MAX_DELTA); 212 MIN_DELTA, MAX_DELTA);
207} 213}
208 214
diff --git a/arch/arm/mach-moxart/Kconfig b/arch/arm/mach-moxart/Kconfig
index e9b45bb58263..82a4ba8578a2 100644
--- a/arch/arm/mach-moxart/Kconfig
+++ b/arch/arm/mach-moxart/Kconfig
@@ -2,14 +2,9 @@ config ARCH_MOXART
2 bool "MOXA ART SoC" if ARCH_MULTI_V4 2 bool "MOXA ART SoC" if ARCH_MULTI_V4
3 select CPU_FA526 3 select CPU_FA526
4 select ARM_DMA_MEM_BUFFERABLE 4 select ARM_DMA_MEM_BUFFERABLE
5 select USE_OF
6 select CLKSRC_OF
7 select CLKSRC_MMIO 5 select CLKSRC_MMIO
8 select HAVE_CLK
9 select COMMON_CLK
10 select GENERIC_IRQ_CHIP 6 select GENERIC_IRQ_CHIP
11 select ARCH_REQUIRE_GPIOLIB 7 select ARCH_REQUIRE_GPIOLIB
12 select GENERIC_CLOCKEVENTS
13 select PHYLIB if NETDEVICES 8 select PHYLIB if NETDEVICES
14 help 9 help
15 Say Y here if you want to run your kernel on hardware with a 10 Say Y here if you want to run your kernel on hardware with a
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index 9625cf378931..a7f959e58c3d 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -1,50 +1,9 @@
1config ARCH_MSM
2 bool
3
4config ARCH_MSM_DT
5 bool "Qualcomm MSM DT Support" if ARCH_MULTI_V7
6 select ARCH_MSM
7 select ARCH_REQUIRE_GPIOLIB
8 select CLKSRC_OF
9 select GENERIC_CLOCKEVENTS
10 help
11 Support for Qualcomm's devicetree based MSM systems.
12
13if ARCH_MSM 1if ARCH_MSM
14 2
15menu "Qualcomm MSM SoC Selection"
16 depends on ARCH_MSM_DT
17
18config ARCH_MSM8X60
19 bool "Enable support for MSM8X60"
20 select ARM_GIC
21 select CPU_V7
22 select HAVE_SMP
23 select MSM_SCM if SMP
24 select MSM_TIMER
25
26config ARCH_MSM8960
27 bool "Enable support for MSM8960"
28 select ARM_GIC
29 select CPU_V7
30 select HAVE_SMP
31 select MSM_SCM if SMP
32 select MSM_TIMER
33
34config ARCH_MSM8974
35 bool "Enable support for MSM8974"
36 select ARM_GIC
37 select CPU_V7
38 select HAVE_ARM_ARCH_TIMER
39 select HAVE_SMP
40 select MSM_SCM if SMP
41
42endmenu
43
44choice 3choice
45 prompt "Qualcomm MSM SoC Type" 4 prompt "Qualcomm MSM SoC Type"
46 default ARCH_MSM7X00A 5 default ARCH_MSM7X00A
47 depends on ARCH_MSM_NODT 6 depends on ARCH_MSM
48 7
49config ARCH_MSM7X00A 8config ARCH_MSM7X00A
50 bool "MSM7x00A / MSM7x01A" 9 bool "MSM7x00A / MSM7x01A"
@@ -54,7 +13,7 @@ config ARCH_MSM7X00A
54 select MACH_TROUT if !MACH_HALIBUT 13 select MACH_TROUT if !MACH_HALIBUT
55 select MSM_PROC_COMM 14 select MSM_PROC_COMM
56 select MSM_SMD 15 select MSM_SMD
57 select MSM_TIMER 16 select CLKSRC_QCOM
58 select MSM_SMD_PKG3 17 select MSM_SMD_PKG3
59 18
60config ARCH_MSM7X30 19config ARCH_MSM7X30
@@ -66,7 +25,7 @@ config ARCH_MSM7X30
66 select MSM_GPIOMUX 25 select MSM_GPIOMUX
67 select MSM_PROC_COMM 26 select MSM_PROC_COMM
68 select MSM_SMD 27 select MSM_SMD
69 select MSM_TIMER 28 select CLKSRC_QCOM
70 select MSM_VIC 29 select MSM_VIC
71 30
72config ARCH_QSD8X50 31config ARCH_QSD8X50
@@ -78,7 +37,7 @@ config ARCH_QSD8X50
78 select MSM_GPIOMUX 37 select MSM_GPIOMUX
79 select MSM_PROC_COMM 38 select MSM_PROC_COMM
80 select MSM_SMD 39 select MSM_SMD
81 select MSM_TIMER 40 select CLKSRC_QCOM
82 select MSM_VIC 41 select MSM_VIC
83 42
84endchoice 43endchoice
@@ -99,7 +58,7 @@ config MSM_VIC
99 bool 58 bool
100 59
101menu "Qualcomm MSM Board Type" 60menu "Qualcomm MSM Board Type"
102 depends on ARCH_MSM_NODT 61 depends on ARCH_MSM
103 62
104config MACH_HALIBUT 63config MACH_HALIBUT
105 depends on ARCH_MSM 64 depends on ARCH_MSM
@@ -153,7 +112,4 @@ config MSM_GPIOMUX
153config MSM_SCM 112config MSM_SCM
154 bool 113 bool
155 114
156config MSM_TIMER
157 bool
158
159endif 115endif
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index 8e307a10d3c3..27c078a568df 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
@@ -1,4 +1,3 @@
1obj-$(CONFIG_MSM_TIMER) += timer.o
2obj-$(CONFIG_MSM_PROC_COMM) += clock.o 1obj-$(CONFIG_MSM_PROC_COMM) += clock.o
3 2
4obj-$(CONFIG_MSM_VIC) += irq-vic.o 3obj-$(CONFIG_MSM_VIC) += irq-vic.o
@@ -14,18 +13,11 @@ obj-$(CONFIG_ARCH_QSD8X50) += dma.o io.o
14 13
15obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o 14obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o
16obj-$(CONFIG_MSM_SMD) += last_radio_log.o 15obj-$(CONFIG_MSM_SMD) += last_radio_log.o
17obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o
18
19CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
20
21obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
22obj-$(CONFIG_SMP) += headsmp.o platsmp.o
23 16
24obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o devices-msm7x00.o 17obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o devices-msm7x00.o
25obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o board-trout-panel.o devices-msm7x00.o 18obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o board-trout-panel.o devices-msm7x00.o
26obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o devices-msm7x00.o 19obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o devices-msm7x00.o
27obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o 20obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o
28obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o 21obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o
29obj-$(CONFIG_ARCH_MSM_DT) += board-dt.o
30obj-$(CONFIG_MSM_GPIOMUX) += gpiomux.o 22obj-$(CONFIG_MSM_GPIOMUX) += gpiomux.o
31obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o 23obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o
diff --git a/arch/arm/mach-msm/common.h b/arch/arm/mach-msm/common.h
index 33c7725adae2..0a4899b7d85c 100644
--- a/arch/arm/mach-msm/common.h
+++ b/arch/arm/mach-msm/common.h
@@ -24,7 +24,6 @@ extern void __iomem *__msm_ioremap_caller(phys_addr_t phys_addr, size_t size,
24 unsigned int mtype, void *caller); 24 unsigned int mtype, void *caller);
25 25
26extern struct smp_operations msm_smp_ops; 26extern struct smp_operations msm_smp_ops;
27extern void msm_cpu_die(unsigned int cpu);
28 27
29struct msm_mmc_platform_data; 28struct msm_mmc_platform_data;
30 29
diff --git a/arch/arm/mach-msm/headsmp.S b/arch/arm/mach-msm/headsmp.S
deleted file mode 100644
index 6c62c3f82fe6..000000000000
--- a/arch/arm/mach-msm/headsmp.S
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * linux/arch/arm/mach-realview/headsmp.S
3 *
4 * Copyright (c) 2003 ARM Limited
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#include <linux/linkage.h>
12#include <linux/init.h>
13
14/*
15 * MSM specific entry point for secondary CPUs. This provides
16 * a "holding pen" into which all secondary cores are held until we're
17 * ready for them to initialise.
18 */
19ENTRY(msm_secondary_startup)
20 mrc p15, 0, r0, c0, c0, 5
21 and r0, r0, #15
22 adr r4, 1f
23 ldmia r4, {r5, r6}
24 sub r4, r4, r5
25 add r6, r6, r4
26pen: ldr r7, [r6]
27 cmp r7, r0
28 bne pen
29
30 /*
31 * we've been released from the holding pen: secondary_stack
32 * should now contain the SVC stack for this core
33 */
34 b secondary_startup
35ENDPROC(msm_secondary_startup)
36
37 .align
381: .long .
39 .long pen_release
diff --git a/arch/arm/mach-msm/hotplug.c b/arch/arm/mach-msm/hotplug.c
deleted file mode 100644
index 326a87261f9a..000000000000
--- a/arch/arm/mach-msm/hotplug.c
+++ /dev/null
@@ -1,74 +0,0 @@
1/*
2 * Copyright (C) 2002 ARM Ltd.
3 * All Rights Reserved
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9#include <linux/kernel.h>
10#include <linux/errno.h>
11#include <linux/smp.h>
12
13#include <asm/smp_plat.h>
14
15#include "common.h"
16
17static inline void cpu_enter_lowpower(void)
18{
19}
20
21static inline void cpu_leave_lowpower(void)
22{
23}
24
25static inline void platform_do_lowpower(unsigned int cpu)
26{
27 /* Just enter wfi for now. TODO: Properly shut off the cpu. */
28 for (;;) {
29 /*
30 * here's the WFI
31 */
32 asm("wfi"
33 :
34 :
35 : "memory", "cc");
36
37 if (pen_release == cpu_logical_map(cpu)) {
38 /*
39 * OK, proper wakeup, we're done
40 */
41 break;
42 }
43
44 /*
45 * getting here, means that we have come out of WFI without
46 * having been woken up - this shouldn't happen
47 *
48 * The trouble is, letting people know about this is not really
49 * possible, since we are currently running incoherently, and
50 * therefore cannot safely call printk() or anything else
51 */
52 pr_debug("CPU%u: spurious wakeup call\n", cpu);
53 }
54}
55
56/*
57 * platform-specific code to shutdown a CPU
58 *
59 * Called with IRQs disabled
60 */
61void __ref msm_cpu_die(unsigned int cpu)
62{
63 /*
64 * we're ready for shutdown now, so do it
65 */
66 cpu_enter_lowpower();
67 platform_do_lowpower(cpu);
68
69 /*
70 * bring this CPU back into the world of cache
71 * coherency, and then restore interrupts
72 */
73 cpu_leave_lowpower();
74}
diff --git a/arch/arm/mach-msm/include/mach/timex.h b/arch/arm/mach-msm/include/mach/timex.h
deleted file mode 100644
index a62e6b215aec..000000000000
--- a/arch/arm/mach-msm/include/mach/timex.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/* arch/arm/mach-msm/include/mach/timex.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARCH_MSM_TIMEX_H
17#define __ASM_ARCH_MSM_TIMEX_H
18
19#define CLOCK_TICK_RATE 1000000
20
21#endif
diff --git a/arch/arm/mach-mv78xx0/include/mach/timex.h b/arch/arm/mach-mv78xx0/include/mach/timex.h
deleted file mode 100644
index 0e8c443c723a..000000000000
--- a/arch/arm/mach-mv78xx0/include/mach/timex.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * arch/arm/mach-mv78xx0/include/mach/timex.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#define CLOCK_TICK_RATE (100 * HZ)
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index df9e7d270810..ca004aceaf8e 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -2,15 +2,10 @@ config ARCH_MVEBU
2 bool "Marvell SOCs with Device Tree support" if ARCH_MULTI_V7 2 bool "Marvell SOCs with Device Tree support" if ARCH_MULTI_V7
3 select ARCH_SUPPORTS_BIG_ENDIAN 3 select ARCH_SUPPORTS_BIG_ENDIAN
4 select CLKSRC_MMIO 4 select CLKSRC_MMIO
5 select COMMON_CLK
6 select GENERIC_CLOCKEVENTS
7 select GENERIC_IRQ_CHIP 5 select GENERIC_IRQ_CHIP
8 select IRQ_DOMAIN 6 select IRQ_DOMAIN
9 select MULTI_IRQ_HANDLER
10 select PINCTRL 7 select PINCTRL
11 select PLAT_ORION 8 select PLAT_ORION
12 select SPARSE_IRQ
13 select CLKDEV_LOOKUP
14 select MVEBU_MBUS 9 select MVEBU_MBUS
15 select ZONE_DMA if ARM_LPAE 10 select ZONE_DMA if ARM_LPAE
16 select ARCH_REQUIRE_GPIOLIB 11 select ARCH_REQUIRE_GPIOLIB
@@ -25,7 +20,6 @@ menu "Marvell SOC with device tree"
25config MACH_ARMADA_370_XP 20config MACH_ARMADA_370_XP
26 bool 21 bool
27 select ARMADA_370_XP_TIMER 22 select ARMADA_370_XP_TIMER
28 select HAVE_SMP
29 select CACHE_L2X0 23 select CACHE_L2X0
30 select CPU_PJ4B 24 select CPU_PJ4B
31 25
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index 878aebe98dcc..d99846103bbb 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -3,8 +3,7 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
3 3
4AFLAGS_coherency_ll.o := -Wa,-march=armv7-a 4AFLAGS_coherency_ll.o := -Wa,-march=armv7-a
5 5
6obj-y += system-controller.o mvebu-soc-id.o 6obj-y += coherency.o coherency_ll.o pmsu.o system-controller.o mvebu-soc-id.o
7obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o 7obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o
8obj-$(CONFIG_ARCH_MVEBU) += coherency.o coherency_ll.o pmsu.o
9obj-$(CONFIG_SMP) += platsmp.o headsmp.o 8obj-$(CONFIG_SMP) += platsmp.o headsmp.o
10obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 9obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c
index 5b793ebb0a24..a57cb36d52af 100644
--- a/arch/arm/mach-mvebu/armada-370-xp.c
+++ b/arch/arm/mach-mvebu/armada-370-xp.c
@@ -32,11 +32,6 @@
32#include "coherency.h" 32#include "coherency.h"
33#include "mvebu-soc-id.h" 33#include "mvebu-soc-id.h"
34 34
35static void __init armada_370_xp_map_io(void)
36{
37 debug_ll_io_init();
38}
39
40static void __init armada_370_xp_timer_and_clk_init(void) 35static void __init armada_370_xp_timer_and_clk_init(void)
41{ 36{
42 of_clk_init(NULL); 37 of_clk_init(NULL);
@@ -91,7 +86,6 @@ static const char * const armada_370_xp_dt_compat[] = {
91DT_MACHINE_START(ARMADA_XP_DT, "Marvell Armada 370/XP (Device Tree)") 86DT_MACHINE_START(ARMADA_XP_DT, "Marvell Armada 370/XP (Device Tree)")
92 .smp = smp_ops(armada_xp_smp_ops), 87 .smp = smp_ops(armada_xp_smp_ops),
93 .init_machine = armada_370_xp_dt_init, 88 .init_machine = armada_370_xp_dt_init,
94 .map_io = armada_370_xp_map_io,
95 .init_time = armada_370_xp_timer_and_clk_init, 89 .init_time = armada_370_xp_timer_and_clk_init,
96 .restart = mvebu_restart, 90 .restart = mvebu_restart,
97 .dt_compat = armada_370_xp_dt_compat, 91 .dt_compat = armada_370_xp_dt_compat,
diff --git a/arch/arm/mach-mvebu/system-controller.c b/arch/arm/mach-mvebu/system-controller.c
index a7fb89a5b5d9..e6e300afe836 100644
--- a/arch/arm/mach-mvebu/system-controller.c
+++ b/arch/arm/mach-mvebu/system-controller.c
@@ -54,7 +54,7 @@ static const struct mvebu_system_controller orion_system_controller = {
54 .system_soft_reset = 0x1, 54 .system_soft_reset = 0x1,
55}; 55};
56 56
57static struct of_device_id of_system_controller_table[] = { 57static const struct of_device_id of_system_controller_table[] = {
58 { 58 {
59 .compatible = "marvell,orion-system-controller", 59 .compatible = "marvell,orion-system-controller",
60 .data = (void *) &orion_system_controller, 60 .data = (void *) &orion_system_controller,
@@ -90,13 +90,12 @@ void mvebu_restart(enum reboot_mode mode, const char *cmd)
90 90
91static int __init mvebu_system_controller_init(void) 91static int __init mvebu_system_controller_init(void)
92{ 92{
93 const struct of_device_id *match;
93 struct device_node *np; 94 struct device_node *np;
94 95
95 np = of_find_matching_node(NULL, of_system_controller_table); 96 np = of_find_matching_node_and_match(NULL, of_system_controller_table,
97 &match);
96 if (np) { 98 if (np) {
97 const struct of_device_id *match =
98 of_match_node(of_system_controller_table, np);
99 BUG_ON(!match);
100 system_controller_base = of_iomap(np, 0); 99 system_controller_base = of_iomap(np, 0);
101 mvebu_sc = (struct mvebu_system_controller *)match->data; 100 mvebu_sc = (struct mvebu_system_controller *)match->data;
102 of_node_put(np); 101 of_node_put(np);
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index 8cde9e05b5d6..84794137b175 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -16,11 +16,7 @@ config ARCH_MXS
16 bool "Freescale MXS (i.MX23, i.MX28) support" 16 bool "Freescale MXS (i.MX23, i.MX28) support"
17 depends on ARCH_MULTI_V5 17 depends on ARCH_MULTI_V5
18 select ARCH_REQUIRE_GPIOLIB 18 select ARCH_REQUIRE_GPIOLIB
19 select CLKDEV_LOOKUP
20 select CLKSRC_MMIO 19 select CLKSRC_MMIO
21 select CLKSRC_OF
22 select GENERIC_CLOCKEVENTS
23 select HAVE_CLK_PREPARE
24 select PINCTRL 20 select PINCTRL
25 select SOC_BUS 21 select SOC_BUS
26 select SOC_IMX23 22 select SOC_IMX23
diff --git a/arch/arm/mach-netx/include/mach/timex.h b/arch/arm/mach-netx/include/mach/timex.h
deleted file mode 100644
index 1120dd0ba393..000000000000
--- a/arch/arm/mach-netx/include/mach/timex.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * arch/arm/mach-netx/include/mach/timex.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
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 */
19
20#define CLOCK_TICK_RATE 100000000
diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c
index 3177c7a40930..5fb2a590ec17 100644
--- a/arch/arm/mach-netx/time.c
+++ b/arch/arm/mach-netx/time.c
@@ -28,6 +28,9 @@
28#include <asm/mach/time.h> 28#include <asm/mach/time.h>
29#include <mach/netx-regs.h> 29#include <mach/netx-regs.h>
30 30
31#define NETX_CLOCK_FREQ 100000000
32#define NETX_LATCH DIV_ROUND_CLOSEST(NETX_CLOCK_FREQ, HZ)
33
31#define TIMER_CLOCKEVENT 0 34#define TIMER_CLOCKEVENT 0
32#define TIMER_CLOCKSOURCE 1 35#define TIMER_CLOCKSOURCE 1
33 36
@@ -41,7 +44,7 @@ static void netx_set_mode(enum clock_event_mode mode,
41 44
42 switch (mode) { 45 switch (mode) {
43 case CLOCK_EVT_MODE_PERIODIC: 46 case CLOCK_EVT_MODE_PERIODIC:
44 writel(LATCH, NETX_GPIO_COUNTER_MAX(TIMER_CLOCKEVENT)); 47 writel(NETX_LATCH, NETX_GPIO_COUNTER_MAX(TIMER_CLOCKEVENT));
45 tmode = NETX_GPIO_COUNTER_CTRL_RST_EN | 48 tmode = NETX_GPIO_COUNTER_CTRL_RST_EN |
46 NETX_GPIO_COUNTER_CTRL_IRQ_EN | 49 NETX_GPIO_COUNTER_CTRL_IRQ_EN |
47 NETX_GPIO_COUNTER_CTRL_RUN; 50 NETX_GPIO_COUNTER_CTRL_RUN;
@@ -114,7 +117,7 @@ void __init netx_timer_init(void)
114 /* Reset the timer value to zero */ 117 /* Reset the timer value to zero */
115 writel(0, NETX_GPIO_COUNTER_CURRENT(0)); 118 writel(0, NETX_GPIO_COUNTER_CURRENT(0));
116 119
117 writel(LATCH, NETX_GPIO_COUNTER_MAX(0)); 120 writel(NETX_LATCH, NETX_GPIO_COUNTER_MAX(0));
118 121
119 /* acknowledge interrupt */ 122 /* acknowledge interrupt */
120 writel(COUNTER_BIT(0), NETX_GPIO_IRQ); 123 writel(COUNTER_BIT(0), NETX_GPIO_IRQ);
@@ -137,11 +140,11 @@ void __init netx_timer_init(void)
137 NETX_GPIO_COUNTER_CTRL(TIMER_CLOCKSOURCE)); 140 NETX_GPIO_COUNTER_CTRL(TIMER_CLOCKSOURCE));
138 141
139 clocksource_mmio_init(NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE), 142 clocksource_mmio_init(NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE),
140 "netx_timer", CLOCK_TICK_RATE, 200, 32, clocksource_mmio_readl_up); 143 "netx_timer", NETX_CLOCK_FREQ, 200, 32, clocksource_mmio_readl_up);
141 144
142 /* with max_delta_ns >= delta2ns(0x800) the system currently runs fine. 145 /* with max_delta_ns >= delta2ns(0x800) the system currently runs fine.
143 * Adding some safety ... */ 146 * Adding some safety ... */
144 netx_clockevent.cpumask = cpumask_of(0); 147 netx_clockevent.cpumask = cpumask_of(0);
145 clockevents_config_and_register(&netx_clockevent, CLOCK_TICK_RATE, 148 clockevents_config_and_register(&netx_clockevent, NETX_CLOCK_FREQ,
146 0xa00, 0xfffffffe); 149 0xa00, 0xfffffffe);
147} 150}
diff --git a/arch/arm/mach-nomadik/Kconfig b/arch/arm/mach-nomadik/Kconfig
index 4d42da49753c..486d301f43fd 100644
--- a/arch/arm/mach-nomadik/Kconfig
+++ b/arch/arm/mach-nomadik/Kconfig
@@ -6,16 +6,11 @@ config ARCH_NOMADIK
6 select ARM_VIC 6 select ARM_VIC
7 select CLKSRC_NOMADIK_MTU 7 select CLKSRC_NOMADIK_MTU
8 select CLKSRC_NOMADIK_MTU_SCHED_CLOCK 8 select CLKSRC_NOMADIK_MTU_SCHED_CLOCK
9 select CLKSRC_OF
10 select COMMON_CLK
11 select CPU_ARM926T 9 select CPU_ARM926T
12 select GENERIC_CLOCKEVENTS
13 select MIGHT_HAVE_CACHE_L2X0 10 select MIGHT_HAVE_CACHE_L2X0
14 select PINCTRL 11 select PINCTRL
15 select PINCTRL_NOMADIK 12 select PINCTRL_NOMADIK
16 select PINCTRL_STN8815 13 select PINCTRL_STN8815
17 select SPARSE_IRQ
18 select USE_OF
19 help 14 help
20 Support for the Nomadik platform by ST-Ericsson 15 Support for the Nomadik platform by ST-Ericsson
21 16
diff --git a/arch/arm/mach-nspire/Kconfig b/arch/arm/mach-nspire/Kconfig
index 59d8f0a70919..bc41f26c1a12 100644
--- a/arch/arm/mach-nspire/Kconfig
+++ b/arch/arm/mach-nspire/Kconfig
@@ -3,14 +3,9 @@ config ARCH_NSPIRE
3 depends on ARCH_MULTI_V4_V5 3 depends on ARCH_MULTI_V4_V5
4 depends on MMU 4 depends on MMU
5 select CPU_ARM926T 5 select CPU_ARM926T
6 select COMMON_CLK
7 select GENERIC_CLOCKEVENTS
8 select GENERIC_IRQ_CHIP 6 select GENERIC_IRQ_CHIP
9 select SPARSE_IRQ
10 select ARM_AMBA 7 select ARM_AMBA
11 select ARM_VIC 8 select ARM_VIC
12 select ARM_TIMER_SP804 9 select ARM_TIMER_SP804
13 select USE_OF
14 select CLKSRC_OF
15 help 10 help
16 This enables support for systems using the TI-NSPIRE CPU 11 This enables support for systems using the TI-NSPIRE CPU
diff --git a/arch/arm/mach-omap1/include/mach/timex.h b/arch/arm/mach-omap1/include/mach/timex.h
deleted file mode 100644
index 4793790d53cc..000000000000
--- a/arch/arm/mach-omap1/include/mach/timex.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * arch/arm/mach-omap1/include/mach/timex.h
3 */
4
5#include <plat/timex.h>
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index ac4882511749..27fc52d418a5 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -6,7 +6,6 @@ config ARCH_OMAP2
6 depends on ARCH_MULTI_V6 6 depends on ARCH_MULTI_V6
7 select ARCH_OMAP2PLUS 7 select ARCH_OMAP2PLUS
8 select CPU_V6 8 select CPU_V6
9 select MULTI_IRQ_HANDLER
10 select SOC_HAS_OMAP2_SDRC 9 select SOC_HAS_OMAP2_SDRC
11 10
12config ARCH_OMAP3 11config ARCH_OMAP3
@@ -15,8 +14,6 @@ config ARCH_OMAP3
15 select ARCH_OMAP2PLUS 14 select ARCH_OMAP2PLUS
16 select ARCH_HAS_OPP 15 select ARCH_HAS_OPP
17 select ARM_CPU_SUSPEND if PM 16 select ARM_CPU_SUSPEND if PM
18 select CPU_V7
19 select MULTI_IRQ_HANDLER
20 select OMAP_INTERCONNECT 17 select OMAP_INTERCONNECT
21 select PM_OPP if PM 18 select PM_OPP if PM
22 select PM_RUNTIME if CPU_IDLE 19 select PM_RUNTIME if CPU_IDLE
@@ -32,10 +29,8 @@ config ARCH_OMAP4
32 select ARM_ERRATA_720789 29 select ARM_ERRATA_720789
33 select ARM_GIC 30 select ARM_GIC
34 select CACHE_L2X0 31 select CACHE_L2X0
35 select CPU_V7
36 select HAVE_ARM_SCU if SMP 32 select HAVE_ARM_SCU if SMP
37 select HAVE_ARM_TWD if SMP 33 select HAVE_ARM_TWD if SMP
38 select HAVE_SMP
39 select OMAP_INTERCONNECT 34 select OMAP_INTERCONNECT
40 select PL310_ERRATA_588369 35 select PL310_ERRATA_588369
41 select PL310_ERRATA_727915 36 select PL310_ERRATA_727915
@@ -51,10 +46,8 @@ config SOC_OMAP5
51 select ARCH_HAS_OPP 46 select ARCH_HAS_OPP
52 select ARM_CPU_SUSPEND if PM 47 select ARM_CPU_SUSPEND if PM
53 select ARM_GIC 48 select ARM_GIC
54 select CPU_V7
55 select HAVE_ARM_SCU if SMP 49 select HAVE_ARM_SCU if SMP
56 select HAVE_ARM_TWD if SMP 50 select HAVE_ARM_TWD if SMP
57 select HAVE_SMP
58 select HAVE_ARM_ARCH_TIMER 51 select HAVE_ARM_ARCH_TIMER
59 select ARM_ERRATA_798181 if SMP 52 select ARM_ERRATA_798181 if SMP
60 53
@@ -64,16 +57,12 @@ config SOC_AM33XX
64 select ARCH_OMAP2PLUS 57 select ARCH_OMAP2PLUS
65 select ARCH_HAS_OPP 58 select ARCH_HAS_OPP
66 select ARM_CPU_SUSPEND if PM 59 select ARM_CPU_SUSPEND if PM
67 select CPU_V7
68 select MULTI_IRQ_HANDLER
69 60
70config SOC_AM43XX 61config SOC_AM43XX
71 bool "TI AM43x" 62 bool "TI AM43x"
72 depends on ARCH_MULTI_V7 63 depends on ARCH_MULTI_V7
73 select CPU_V7
74 select ARCH_OMAP2PLUS 64 select ARCH_OMAP2PLUS
75 select ARCH_HAS_OPP 65 select ARCH_HAS_OPP
76 select MULTI_IRQ_HANDLER
77 select ARM_GIC 66 select ARM_GIC
78 select MACH_OMAP_GENERIC 67 select MACH_OMAP_GENERIC
79 68
@@ -84,8 +73,6 @@ config SOC_DRA7XX
84 select ARCH_HAS_OPP 73 select ARCH_HAS_OPP
85 select ARM_CPU_SUSPEND if PM 74 select ARM_CPU_SUSPEND if PM
86 select ARM_GIC 75 select ARM_GIC
87 select CPU_V7
88 select HAVE_SMP
89 select HAVE_ARM_ARCH_TIMER 76 select HAVE_ARM_ARCH_TIMER
90 77
91config ARCH_OMAP2PLUS 78config ARCH_OMAP2PLUS
@@ -96,16 +83,12 @@ config ARCH_OMAP2PLUS
96 select ARCH_OMAP 83 select ARCH_OMAP
97 select ARCH_REQUIRE_GPIOLIB 84 select ARCH_REQUIRE_GPIOLIB
98 select CLKSRC_MMIO 85 select CLKSRC_MMIO
99 select COMMON_CLK
100 select GENERIC_CLOCKEVENTS
101 select GENERIC_IRQ_CHIP 86 select GENERIC_IRQ_CHIP
102 select MACH_OMAP_GENERIC 87 select MACH_OMAP_GENERIC
103 select OMAP_DM_TIMER 88 select OMAP_DM_TIMER
104 select PINCTRL 89 select PINCTRL
105 select SOC_BUS 90 select SOC_BUS
106 select SPARSE_IRQ
107 select TI_PRIV_EDMA 91 select TI_PRIV_EDMA
108 select USE_OF
109 help 92 help
110 Systems based on OMAP2, OMAP3, OMAP4 or OMAP5 93 Systems based on OMAP2, OMAP3, OMAP4 or OMAP5
111 94
diff --git a/arch/arm/mach-omap2/include/mach/timex.h b/arch/arm/mach-omap2/include/mach/timex.h
deleted file mode 100644
index de9f8fc40e7c..000000000000
--- a/arch/arm/mach-omap2/include/mach/timex.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * arch/arm/mach-omap2/include/mach/timex.h
3 */
4
5#include <plat/timex.h>
diff --git a/arch/arm/mach-orion5x/include/mach/timex.h b/arch/arm/mach-orion5x/include/mach/timex.h
deleted file mode 100644
index 4c69820e0810..000000000000
--- a/arch/arm/mach-orion5x/include/mach/timex.h
+++ /dev/null
@@ -1,11 +0,0 @@
1/*
2 * arch/arm/mach-orion5x/include/mach/timex.h
3 *
4 * Tzachi Perelstein <tzachi@marvell.com>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#define CLOCK_TICK_RATE (100 * HZ)
diff --git a/arch/arm/mach-picoxcell/Kconfig b/arch/arm/mach-picoxcell/Kconfig
index b1022f4315f7..eca9eb1c5931 100644
--- a/arch/arm/mach-picoxcell/Kconfig
+++ b/arch/arm/mach-picoxcell/Kconfig
@@ -1,12 +1,7 @@
1config ARCH_PICOXCELL 1config ARCH_PICOXCELL
2 bool "Picochip PicoXcell" if ARCH_MULTI_V6 2 bool "Picochip PicoXcell" if ARCH_MULTI_V6
3 select ARCH_REQUIRE_GPIOLIB 3 select ARCH_REQUIRE_GPIOLIB
4 select ARM_PATCH_PHYS_VIRT
5 select ARM_VIC 4 select ARM_VIC
6 select CPU_V6K
7 select DW_APB_TIMER_OF 5 select DW_APB_TIMER_OF
8 select GENERIC_CLOCKEVENTS
9 select HAVE_TCM 6 select HAVE_TCM
10 select NO_IOPORT 7 select NO_IOPORT
11 select SPARSE_IRQ
12 select USE_OF
diff --git a/arch/arm/mach-prima2/Kconfig b/arch/arm/mach-prima2/Kconfig
index 6988b117fc17..3e8189186a5b 100644
--- a/arch/arm/mach-prima2/Kconfig
+++ b/arch/arm/mach-prima2/Kconfig
@@ -1,9 +1,8 @@
1config ARCH_SIRF 1config ARCH_SIRF
2 bool "CSR SiRF" if ARCH_MULTI_V7 2 bool "CSR SiRF" if ARCH_MULTI_V7
3 select ARCH_HAS_RESET_CONTROLLER
3 select ARCH_REQUIRE_GPIOLIB 4 select ARCH_REQUIRE_GPIOLIB
4 select GENERIC_CLOCKEVENTS
5 select GENERIC_IRQ_CHIP 5 select GENERIC_IRQ_CHIP
6 select MIGHT_HAVE_CACHE_L2X0
7 select NO_IOPORT 6 select NO_IOPORT
8 select PINCTRL 7 select PINCTRL
9 select PINCTRL_SIRF 8 select PINCTRL_SIRF
@@ -17,7 +16,6 @@ menu "CSR SiRF atlas6/primaII/Marco/Polo Specific Features"
17config ARCH_ATLAS6 16config ARCH_ATLAS6
18 bool "CSR SiRFSoC ATLAS6 ARM Cortex A9 Platform" 17 bool "CSR SiRFSoC ATLAS6 ARM Cortex A9 Platform"
19 default y 18 default y
20 select CPU_V7
21 select SIRF_IRQ 19 select SIRF_IRQ
22 help 20 help
23 Support for CSR SiRFSoC ARM Cortex A9 Platform 21 Support for CSR SiRFSoC ARM Cortex A9 Platform
@@ -25,7 +23,6 @@ config ARCH_ATLAS6
25config ARCH_PRIMA2 23config ARCH_PRIMA2
26 bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform" 24 bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
27 default y 25 default y
28 select CPU_V7
29 select SIRF_IRQ 26 select SIRF_IRQ
30 select ZONE_DMA 27 select ZONE_DMA
31 help 28 help
@@ -35,9 +32,7 @@ config ARCH_MARCO
35 bool "CSR SiRFSoC MARCO ARM Cortex A9 Platform" 32 bool "CSR SiRFSoC MARCO ARM Cortex A9 Platform"
36 default y 33 default y
37 select ARM_GIC 34 select ARM_GIC
38 select CPU_V7
39 select HAVE_ARM_SCU if SMP 35 select HAVE_ARM_SCU if SMP
40 select HAVE_SMP
41 select SMP_ON_UP if SMP 36 select SMP_ON_UP if SMP
42 help 37 help
43 Support for CSR SiRFSoC ARM Cortex A9 Platform 38 Support for CSR SiRFSoC ARM Cortex A9 Platform
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c
index d49aff74de98..47c7819edb9b 100644
--- a/arch/arm/mach-prima2/common.c
+++ b/arch/arm/mach-prima2/common.c
@@ -15,7 +15,7 @@
15#include <linux/of_platform.h> 15#include <linux/of_platform.h>
16#include "common.h" 16#include "common.h"
17 17
18void __init sirfsoc_init_late(void) 18static void __init sirfsoc_init_late(void)
19{ 19{
20 sirfsoc_pm_init(); 20 sirfsoc_pm_init();
21} 21}
@@ -27,7 +27,7 @@ static __init void sirfsoc_map_io(void)
27} 27}
28 28
29#ifdef CONFIG_ARCH_ATLAS6 29#ifdef CONFIG_ARCH_ATLAS6
30static const char *atlas6_dt_match[] __initdata = { 30static const char *atlas6_dt_match[] __initconst = {
31 "sirf,atlas6", 31 "sirf,atlas6",
32 NULL 32 NULL
33}; 33};
@@ -37,12 +37,11 @@ DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)")
37 .map_io = sirfsoc_map_io, 37 .map_io = sirfsoc_map_io,
38 .init_late = sirfsoc_init_late, 38 .init_late = sirfsoc_init_late,
39 .dt_compat = atlas6_dt_match, 39 .dt_compat = atlas6_dt_match,
40 .restart = sirfsoc_restart,
41MACHINE_END 40MACHINE_END
42#endif 41#endif
43 42
44#ifdef CONFIG_ARCH_PRIMA2 43#ifdef CONFIG_ARCH_PRIMA2
45static const char *prima2_dt_match[] __initdata = { 44static const char *prima2_dt_match[] __initconst = {
46 "sirf,prima2", 45 "sirf,prima2",
47 NULL 46 NULL
48}; 47};
@@ -53,12 +52,11 @@ DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
53 .dma_zone_size = SZ_256M, 52 .dma_zone_size = SZ_256M,
54 .init_late = sirfsoc_init_late, 53 .init_late = sirfsoc_init_late,
55 .dt_compat = prima2_dt_match, 54 .dt_compat = prima2_dt_match,
56 .restart = sirfsoc_restart,
57MACHINE_END 55MACHINE_END
58#endif 56#endif
59 57
60#ifdef CONFIG_ARCH_MARCO 58#ifdef CONFIG_ARCH_MARCO
61static const char *marco_dt_match[] __initdata = { 59static const char *marco_dt_match[] __initconst = {
62 "sirf,marco", 60 "sirf,marco",
63 NULL 61 NULL
64}; 62};
@@ -69,6 +67,5 @@ DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)")
69 .map_io = sirfsoc_map_io, 67 .map_io = sirfsoc_map_io,
70 .init_late = sirfsoc_init_late, 68 .init_late = sirfsoc_init_late,
71 .dt_compat = marco_dt_match, 69 .dt_compat = marco_dt_match,
72 .restart = sirfsoc_restart,
73MACHINE_END 70MACHINE_END
74#endif 71#endif
diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h
index 4b768060a858..07d3e5ed9264 100644
--- a/arch/arm/mach-prima2/common.h
+++ b/arch/arm/mach-prima2/common.h
@@ -23,7 +23,6 @@ extern void sirfsoc_secondary_startup(void);
23extern void sirfsoc_cpu_die(unsigned int cpu); 23extern void sirfsoc_cpu_die(unsigned int cpu);
24 24
25extern void __init sirfsoc_of_irq_init(void); 25extern void __init sirfsoc_of_irq_init(void);
26extern void sirfsoc_restart(enum reboot_mode, const char *);
27extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs); 26extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs);
28 27
29#ifndef CONFIG_DEBUG_LL 28#ifndef CONFIG_DEBUG_LL
diff --git a/arch/arm/mach-prima2/l2x0.c b/arch/arm/mach-prima2/l2x0.c
index cbcbe9cb094c..c7102539c0b0 100644
--- a/arch/arm/mach-prima2/l2x0.c
+++ b/arch/arm/mach-prima2/l2x0.c
@@ -11,24 +11,23 @@
11#include <linux/of.h> 11#include <linux/of.h>
12#include <asm/hardware/cache-l2x0.h> 12#include <asm/hardware/cache-l2x0.h>
13 13
14struct l2x0_aux 14struct l2x0_aux {
15{
16 u32 val; 15 u32 val;
17 u32 mask; 16 u32 mask;
18}; 17};
19 18
20static struct l2x0_aux prima2_l2x0_aux __initconst = { 19static const struct l2x0_aux prima2_l2x0_aux __initconst = {
21 .val = 2 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT, 20 .val = 2 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT,
22 .mask = 0, 21 .mask = 0,
23}; 22};
24 23
25static struct l2x0_aux marco_l2x0_aux __initconst = { 24static const struct l2x0_aux marco_l2x0_aux __initconst = {
26 .val = (2 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) | 25 .val = (2 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) |
27 (1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT), 26 (1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT),
28 .mask = L2X0_AUX_CTRL_MASK, 27 .mask = L2X0_AUX_CTRL_MASK,
29}; 28};
30 29
31static struct of_device_id sirf_l2x0_ids[] __initconst = { 30static const struct of_device_id sirf_l2x0_ids[] __initconst = {
32 { .compatible = "sirf,prima2-pl310-cache", .data = &prima2_l2x0_aux, }, 31 { .compatible = "sirf,prima2-pl310-cache", .data = &prima2_l2x0_aux, },
33 { .compatible = "sirf,marco-pl310-cache", .data = &marco_l2x0_aux, }, 32 { .compatible = "sirf,marco-pl310-cache", .data = &marco_l2x0_aux, },
34 {}, 33 {},
diff --git a/arch/arm/mach-prima2/platsmp.c b/arch/arm/mach-prima2/platsmp.c
index e358b0736dea..335c12e92262 100644
--- a/arch/arm/mach-prima2/platsmp.c
+++ b/arch/arm/mach-prima2/platsmp.c
@@ -138,9 +138,9 @@ static void __init sirfsoc_smp_prepare_cpus(unsigned int max_cpus)
138} 138}
139 139
140struct smp_operations sirfsoc_smp_ops __initdata = { 140struct smp_operations sirfsoc_smp_ops __initdata = {
141 .smp_prepare_cpus = sirfsoc_smp_prepare_cpus, 141 .smp_prepare_cpus = sirfsoc_smp_prepare_cpus,
142 .smp_secondary_init = sirfsoc_secondary_init, 142 .smp_secondary_init = sirfsoc_secondary_init,
143 .smp_boot_secondary = sirfsoc_boot_secondary, 143 .smp_boot_secondary = sirfsoc_boot_secondary,
144#ifdef CONFIG_HOTPLUG_CPU 144#ifdef CONFIG_HOTPLUG_CPU
145 .cpu_die = sirfsoc_cpu_die, 145 .cpu_die = sirfsoc_cpu_die,
146#endif 146#endif
diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c
index ccb53391147a..4887a2a4c698 100644
--- a/arch/arm/mach-prima2/rstc.c
+++ b/arch/arm/mach-prima2/rstc.c
@@ -13,57 +13,38 @@
13#include <linux/device.h> 13#include <linux/device.h>
14#include <linux/of.h> 14#include <linux/of.h>
15#include <linux/of_address.h> 15#include <linux/of_address.h>
16#include <linux/platform_device.h>
16#include <linux/reboot.h> 17#include <linux/reboot.h>
18#include <linux/reset-controller.h>
17 19
18void __iomem *sirfsoc_rstc_base; 20#include <asm/system_misc.h>
19static DEFINE_MUTEX(rstc_lock);
20
21static struct of_device_id rstc_ids[] = {
22 { .compatible = "sirf,prima2-rstc" },
23 { .compatible = "sirf,marco-rstc" },
24 {},
25};
26 21
27static int __init sirfsoc_of_rstc_init(void) 22#define SIRFSOC_RSTBIT_NUM 64
28{
29 struct device_node *np;
30 23
31 np = of_find_matching_node(NULL, rstc_ids); 24static void __iomem *sirfsoc_rstc_base;
32 if (!np) { 25static DEFINE_MUTEX(rstc_lock);
33 pr_err("unable to find compatible sirf rstc node in dtb\n");
34 return -ENOENT;
35 }
36
37 sirfsoc_rstc_base = of_iomap(np, 0);
38 if (!sirfsoc_rstc_base)
39 panic("unable to map rstc cpu registers\n");
40
41 of_node_put(np);
42
43 return 0;
44}
45early_initcall(sirfsoc_of_rstc_init);
46 26
47int sirfsoc_reset_device(struct device *dev) 27static int sirfsoc_reset_module(struct reset_controller_dev *rcdev,
28 unsigned long sw_reset_idx)
48{ 29{
49 u32 reset_bit; 30 u32 reset_bit = sw_reset_idx;
50 31
51 if (of_property_read_u32(dev->of_node, "reset-bit", &reset_bit)) 32 if (reset_bit >= SIRFSOC_RSTBIT_NUM)
52 return -EINVAL; 33 return -EINVAL;
53 34
54 mutex_lock(&rstc_lock); 35 mutex_lock(&rstc_lock);
55 36
56 if (of_device_is_compatible(dev->of_node, "sirf,prima2-rstc")) { 37 if (of_device_is_compatible(rcdev->of_node, "sirf,prima2-rstc")) {
57 /* 38 /*
58 * Writing 1 to this bit resets corresponding block. Writing 0 to this 39 * Writing 1 to this bit resets corresponding block. Writing 0 to this
59 * bit de-asserts reset signal of the corresponding block. 40 * bit de-asserts reset signal of the corresponding block.
60 * datasheet doesn't require explicit delay between the set and clear 41 * datasheet doesn't require explicit delay between the set and clear
61 * of reset bit. it could be shorter if tests pass. 42 * of reset bit. it could be shorter if tests pass.
62 */ 43 */
63 writel(readl(sirfsoc_rstc_base + (reset_bit / 32) * 4) | reset_bit, 44 writel(readl(sirfsoc_rstc_base + (reset_bit / 32) * 4) | (1 << reset_bit),
64 sirfsoc_rstc_base + (reset_bit / 32) * 4); 45 sirfsoc_rstc_base + (reset_bit / 32) * 4);
65 msleep(10); 46 msleep(10);
66 writel(readl(sirfsoc_rstc_base + (reset_bit / 32) * 4) & ~reset_bit, 47 writel(readl(sirfsoc_rstc_base + (reset_bit / 32) * 4) & ~(1 << reset_bit),
67 sirfsoc_rstc_base + (reset_bit / 32) * 4); 48 sirfsoc_rstc_base + (reset_bit / 32) * 4);
68 } else { 49 } else {
69 /* 50 /*
@@ -73,9 +54,9 @@ int sirfsoc_reset_device(struct device *dev)
73 * datasheet doesn't require explicit delay between the set and clear 54 * datasheet doesn't require explicit delay between the set and clear
74 * of reset bit. it could be shorter if tests pass. 55 * of reset bit. it could be shorter if tests pass.
75 */ 56 */
76 writel(reset_bit, sirfsoc_rstc_base + (reset_bit / 32) * 8); 57 writel(1 << reset_bit, sirfsoc_rstc_base + (reset_bit / 32) * 8);
77 msleep(10); 58 msleep(10);
78 writel(reset_bit, sirfsoc_rstc_base + (reset_bit / 32) * 8 + 4); 59 writel(1 << reset_bit, sirfsoc_rstc_base + (reset_bit / 32) * 8 + 4);
79 } 60 }
80 61
81 mutex_unlock(&rstc_lock); 62 mutex_unlock(&rstc_lock);
@@ -83,9 +64,57 @@ int sirfsoc_reset_device(struct device *dev)
83 return 0; 64 return 0;
84} 65}
85 66
67static struct reset_control_ops sirfsoc_rstc_ops = {
68 .reset = sirfsoc_reset_module,
69};
70
71static struct reset_controller_dev sirfsoc_reset_controller = {
72 .ops = &sirfsoc_rstc_ops,
73 .nr_resets = SIRFSOC_RSTBIT_NUM,
74};
75
86#define SIRFSOC_SYS_RST_BIT BIT(31) 76#define SIRFSOC_SYS_RST_BIT BIT(31)
87 77
88void sirfsoc_restart(enum reboot_mode mode, const char *cmd) 78static void sirfsoc_restart(enum reboot_mode mode, const char *cmd)
89{ 79{
90 writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base); 80 writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base);
91} 81}
82
83static int sirfsoc_rstc_probe(struct platform_device *pdev)
84{
85 struct device_node *np = pdev->dev.of_node;
86 sirfsoc_rstc_base = of_iomap(np, 0);
87 if (!sirfsoc_rstc_base) {
88 dev_err(&pdev->dev, "unable to map rstc cpu registers\n");
89 return -ENOMEM;
90 }
91
92 sirfsoc_reset_controller.of_node = np;
93 arm_pm_restart = sirfsoc_restart;
94
95 if (IS_ENABLED(CONFIG_RESET_CONTROLLER))
96 reset_controller_register(&sirfsoc_reset_controller);
97
98 return 0;
99}
100
101static const struct of_device_id rstc_ids[] = {
102 { .compatible = "sirf,prima2-rstc" },
103 { .compatible = "sirf,marco-rstc" },
104 {},
105};
106
107static struct platform_driver sirfsoc_rstc_driver = {
108 .probe = sirfsoc_rstc_probe,
109 .driver = {
110 .name = "sirfsoc_rstc",
111 .owner = THIS_MODULE,
112 .of_match_table = rstc_ids,
113 },
114};
115
116static int __init sirfsoc_rstc_init(void)
117{
118 return platform_driver_register(&sirfsoc_rstc_driver);
119}
120subsys_initcall(sirfsoc_rstc_init);
diff --git a/arch/arm/mach-prima2/rtciobrg.c b/arch/arm/mach-prima2/rtciobrg.c
index 9f2da2eec4dc..a17c88b74fa1 100644
--- a/arch/arm/mach-prima2/rtciobrg.c
+++ b/arch/arm/mach-prima2/rtciobrg.c
@@ -137,4 +137,4 @@ postcore_initcall(sirfsoc_rtciobrg_init);
137MODULE_AUTHOR("Zhiwu Song <zhiwu.song@csr.com>, " 137MODULE_AUTHOR("Zhiwu Song <zhiwu.song@csr.com>, "
138 "Barry Song <baohua.song@csr.com>"); 138 "Barry Song <baohua.song@csr.com>");
139MODULE_DESCRIPTION("CSR SiRFprimaII rtc io bridge"); 139MODULE_DESCRIPTION("CSR SiRFprimaII rtc io bridge");
140MODULE_LICENSE("GPL"); 140MODULE_LICENSE("GPL v2");
diff --git a/arch/arm/mach-pxa/include/mach/timex.h b/arch/arm/mach-pxa/include/mach/timex.h
deleted file mode 100644
index af6760a50e1a..000000000000
--- a/arch/arm/mach-pxa/include/mach/timex.h
+++ /dev/null
@@ -1,34 +0,0 @@
1/*
2 * arch/arm/mach-pxa/include/mach/timex.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13/* Various drivers are still using the constant of CLOCK_TICK_RATE, for
14 * those drivers to at least work, the definition is provided here.
15 *
16 * NOTE: this is no longer accurate when multiple processors and boards
17 * are selected, newer drivers should not depend on this any more. Use
18 * either the clocksource/clockevent or get this at run-time by calling
19 * get_clock_tick_rate() (as defined in generic.c).
20 */
21
22#if defined(CONFIG_PXA25x)
23/* PXA250/210 timer base */
24#define CLOCK_TICK_RATE 3686400
25#elif defined(CONFIG_PXA27x)
26/* PXA27x timer base */
27#ifdef CONFIG_MACH_MAINSTONE
28#define CLOCK_TICK_RATE 3249600
29#else
30#define CLOCK_TICK_RATE 3250000
31#endif
32#else
33#define CLOCK_TICK_RATE 3250000
34#endif
diff --git a/arch/arm/mach-qcom/Kconfig b/arch/arm/mach-qcom/Kconfig
new file mode 100644
index 000000000000..a028be234334
--- /dev/null
+++ b/arch/arm/mach-qcom/Kconfig
@@ -0,0 +1,33 @@
1config ARCH_QCOM
2 bool "Qualcomm Support" if ARCH_MULTI_V7
3 select ARCH_REQUIRE_GPIOLIB
4 select ARM_GIC
5 select CLKSRC_OF
6 select GENERIC_CLOCKEVENTS
7 select HAVE_SMP
8 select QCOM_SCM if SMP
9 help
10 Support for Qualcomm's devicetree based systems.
11
12if ARCH_QCOM
13
14menu "Qualcomm SoC Selection"
15
16config ARCH_MSM8X60
17 bool "Enable support for MSM8X60"
18 select CLKSRC_QCOM
19
20config ARCH_MSM8960
21 bool "Enable support for MSM8960"
22 select CLKSRC_QCOM
23
24config ARCH_MSM8974
25 bool "Enable support for MSM8974"
26 select HAVE_ARM_ARCH_TIMER
27
28endmenu
29
30config QCOM_SCM
31 bool
32
33endif
diff --git a/arch/arm/mach-qcom/Makefile b/arch/arm/mach-qcom/Makefile
new file mode 100644
index 000000000000..8f756ae1ae31
--- /dev/null
+++ b/arch/arm/mach-qcom/Makefile
@@ -0,0 +1,5 @@
1obj-y := board.o
2obj-$(CONFIG_SMP) += platsmp.o
3obj-$(CONFIG_QCOM_SCM) += scm.o scm-boot.o
4
5CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
diff --git a/arch/arm/mach-msm/board-dt.c b/arch/arm/mach-qcom/board.c
index 1f11d93e700e..830f69c3a3ce 100644
--- a/arch/arm/mach-msm/board-dt.c
+++ b/arch/arm/mach-qcom/board.c
@@ -1,4 +1,4 @@
1/* Copyright (c) 2010-2012,2013 The Linux Foundation. All rights reserved. 1/* Copyright (c) 2010-2014 The Linux Foundation. All rights reserved.
2 * 2 *
3 * This program is free software; you can redistribute it and/or modify 3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and 4 * it under the terms of the GNU General Public License version 2 and
@@ -17,10 +17,9 @@
17#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
18#include <asm/mach/map.h> 18#include <asm/mach/map.h>
19 19
20#include "common.h" 20extern struct smp_operations qcom_smp_ops;
21 21
22static const char * const msm_dt_match[] __initconst = { 22static const char * const qcom_dt_match[] __initconst = {
23 "qcom,msm8660-fluid",
24 "qcom,msm8660-surf", 23 "qcom,msm8660-surf",
25 "qcom,msm8960-cdp", 24 "qcom,msm8960-cdp",
26 NULL 25 NULL
@@ -31,11 +30,11 @@ static const char * const apq8074_dt_match[] __initconst = {
31 NULL 30 NULL
32}; 31};
33 32
34DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)") 33DT_MACHINE_START(QCOM_DT, "Qualcomm (Flattened Device Tree)")
35 .smp = smp_ops(msm_smp_ops), 34 .smp = smp_ops(qcom_smp_ops),
36 .dt_compat = msm_dt_match, 35 .dt_compat = qcom_dt_match,
37MACHINE_END 36MACHINE_END
38 37
39DT_MACHINE_START(APQ_DT, "Qualcomm MSM (Flattened Device Tree)") 38DT_MACHINE_START(APQ_DT, "Qualcomm (Flattened Device Tree)")
40 .dt_compat = apq8074_dt_match, 39 .dt_compat = apq8074_dt_match,
41MACHINE_END 40MACHINE_END
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-qcom/platsmp.c
index f10a1f58fde9..9c53ea70550d 100644
--- a/arch/arm/mach-msm/platsmp.c
+++ b/arch/arm/mach-qcom/platsmp.c
@@ -2,6 +2,7 @@
2 * Copyright (C) 2002 ARM Ltd. 2 * Copyright (C) 2002 ARM Ltd.
3 * All Rights Reserved 3 * All Rights Reserved
4 * Copyright (c) 2010, Code Aurora Forum. All rights reserved. 4 * Copyright (c) 2010, Code Aurora Forum. All rights reserved.
5 * Copyright (c) 2014 The Linux Foundation. All rights reserved.
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as 8 * it under the terms of the GNU General Public License version 2 as
@@ -12,42 +13,38 @@
12#include <linux/errno.h> 13#include <linux/errno.h>
13#include <linux/delay.h> 14#include <linux/delay.h>
14#include <linux/device.h> 15#include <linux/device.h>
15#include <linux/jiffies.h>
16#include <linux/smp.h> 16#include <linux/smp.h>
17#include <linux/io.h> 17#include <linux/io.h>
18 18
19#include <asm/cacheflush.h>
20#include <asm/cputype.h> 19#include <asm/cputype.h>
21#include <asm/mach-types.h>
22#include <asm/smp_plat.h> 20#include <asm/smp_plat.h>
23 21
24#include "scm-boot.h" 22#include "scm-boot.h"
25#include "common.h"
26 23
27#define VDD_SC1_ARRAY_CLAMP_GFS_CTL 0x15A0 24#define VDD_SC1_ARRAY_CLAMP_GFS_CTL 0x15A0
28#define SCSS_CPU1CORE_RESET 0xD80 25#define SCSS_CPU1CORE_RESET 0xD80
29#define SCSS_DBG_STATUS_CORE_PWRDUP 0xE64 26#define SCSS_DBG_STATUS_CORE_PWRDUP 0xE64
30 27
31extern void msm_secondary_startup(void); 28extern void secondary_startup(void);
32 29
33static DEFINE_SPINLOCK(boot_lock); 30static DEFINE_SPINLOCK(boot_lock);
34 31
32#ifdef CONFIG_HOTPLUG_CPU
33static void __ref qcom_cpu_die(unsigned int cpu)
34{
35 wfi();
36}
37#endif
38
35static inline int get_core_count(void) 39static inline int get_core_count(void)
36{ 40{
37 /* 1 + the PART[1:0] field of MIDR */ 41 /* 1 + the PART[1:0] field of MIDR */
38 return ((read_cpuid_id() >> 4) & 3) + 1; 42 return ((read_cpuid_id() >> 4) & 3) + 1;
39} 43}
40 44
41static void msm_secondary_init(unsigned int cpu) 45static void qcom_secondary_init(unsigned int cpu)
42{ 46{
43 /* 47 /*
44 * let the primary processor know we're out of the
45 * pen, then head off into the C entry point
46 */
47 pen_release = -1;
48 smp_wmb();
49
50 /*
51 * Synchronise with the boot thread. 48 * Synchronise with the boot thread.
52 */ 49 */
53 spin_lock(&boot_lock); 50 spin_lock(&boot_lock);
@@ -57,7 +54,7 @@ static void msm_secondary_init(unsigned int cpu)
57static void prepare_cold_cpu(unsigned int cpu) 54static void prepare_cold_cpu(unsigned int cpu)
58{ 55{
59 int ret; 56 int ret;
60 ret = scm_set_boot_addr(virt_to_phys(msm_secondary_startup), 57 ret = scm_set_boot_addr(virt_to_phys(secondary_startup),
61 SCM_FLAG_COLDBOOT_CPU1); 58 SCM_FLAG_COLDBOOT_CPU1);
62 if (ret == 0) { 59 if (ret == 0) {
63 void __iomem *sc1_base_ptr; 60 void __iomem *sc1_base_ptr;
@@ -73,9 +70,8 @@ static void prepare_cold_cpu(unsigned int cpu)
73 "address\n"); 70 "address\n");
74} 71}
75 72
76static int msm_boot_secondary(unsigned int cpu, struct task_struct *idle) 73static int qcom_boot_secondary(unsigned int cpu, struct task_struct *idle)
77{ 74{
78 unsigned long timeout;
79 static int cold_boot_done; 75 static int cold_boot_done;
80 76
81 /* Only need to bring cpu out of reset this way once */ 77 /* Only need to bring cpu out of reset this way once */
@@ -91,39 +87,19 @@ static int msm_boot_secondary(unsigned int cpu, struct task_struct *idle)
91 spin_lock(&boot_lock); 87 spin_lock(&boot_lock);
92 88
93 /* 89 /*
94 * The secondary processor is waiting to be released from
95 * the holding pen - release it, then wait for it to flag
96 * that it has been released by resetting pen_release.
97 *
98 * Note that "pen_release" is the hardware CPU ID, whereas
99 * "cpu" is Linux's internal ID.
100 */
101 pen_release = cpu_logical_map(cpu);
102 sync_cache_w(&pen_release);
103
104 /*
105 * Send the secondary CPU a soft interrupt, thereby causing 90 * Send the secondary CPU a soft interrupt, thereby causing
106 * the boot monitor to read the system wide flags register, 91 * the boot monitor to read the system wide flags register,
107 * and branch to the address found there. 92 * and branch to the address found there.
108 */ 93 */
109 arch_send_wakeup_ipi_mask(cpumask_of(cpu)); 94 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
110 95
111 timeout = jiffies + (1 * HZ);
112 while (time_before(jiffies, timeout)) {
113 smp_rmb();
114 if (pen_release == -1)
115 break;
116
117 udelay(10);
118 }
119
120 /* 96 /*
121 * now the secondary core is starting up let it run its 97 * now the secondary core is starting up let it run its
122 * calibrations, then wait for it to finish 98 * calibrations, then wait for it to finish
123 */ 99 */
124 spin_unlock(&boot_lock); 100 spin_unlock(&boot_lock);
125 101
126 return pen_release != -1 ? -ENOSYS : 0; 102 return 0;
127} 103}
128 104
129/* 105/*
@@ -132,7 +108,7 @@ static int msm_boot_secondary(unsigned int cpu, struct task_struct *idle)
132 * does not support the ARM SCU, so just set the possible cpu mask to 108 * does not support the ARM SCU, so just set the possible cpu mask to
133 * NR_CPUS. 109 * NR_CPUS.
134 */ 110 */
135static void __init msm_smp_init_cpus(void) 111static void __init qcom_smp_init_cpus(void)
136{ 112{
137 unsigned int i, ncores = get_core_count(); 113 unsigned int i, ncores = get_core_count();
138 114
@@ -146,16 +122,16 @@ static void __init msm_smp_init_cpus(void)
146 set_cpu_possible(i, true); 122 set_cpu_possible(i, true);
147} 123}
148 124
149static void __init msm_smp_prepare_cpus(unsigned int max_cpus) 125static void __init qcom_smp_prepare_cpus(unsigned int max_cpus)
150{ 126{
151} 127}
152 128
153struct smp_operations msm_smp_ops __initdata = { 129struct smp_operations qcom_smp_ops __initdata = {
154 .smp_init_cpus = msm_smp_init_cpus, 130 .smp_init_cpus = qcom_smp_init_cpus,
155 .smp_prepare_cpus = msm_smp_prepare_cpus, 131 .smp_prepare_cpus = qcom_smp_prepare_cpus,
156 .smp_secondary_init = msm_secondary_init, 132 .smp_secondary_init = qcom_secondary_init,
157 .smp_boot_secondary = msm_boot_secondary, 133 .smp_boot_secondary = qcom_boot_secondary,
158#ifdef CONFIG_HOTPLUG_CPU 134#ifdef CONFIG_HOTPLUG_CPU
159 .cpu_die = msm_cpu_die, 135 .cpu_die = qcom_cpu_die,
160#endif 136#endif
161}; 137};
diff --git a/arch/arm/mach-msm/scm-boot.c b/arch/arm/mach-qcom/scm-boot.c
index 45cee3e469a5..45cee3e469a5 100644
--- a/arch/arm/mach-msm/scm-boot.c
+++ b/arch/arm/mach-qcom/scm-boot.c
diff --git a/arch/arm/mach-msm/scm-boot.h b/arch/arm/mach-qcom/scm-boot.h
index 7be32ff5d687..7be32ff5d687 100644
--- a/arch/arm/mach-msm/scm-boot.h
+++ b/arch/arm/mach-qcom/scm-boot.h
diff --git a/arch/arm/mach-msm/scm.c b/arch/arm/mach-qcom/scm.c
index c536fd6bf827..c536fd6bf827 100644
--- a/arch/arm/mach-msm/scm.c
+++ b/arch/arm/mach-qcom/scm.c
diff --git a/arch/arm/mach-msm/scm.h b/arch/arm/mach-qcom/scm.h
index 00b31ea58f29..00b31ea58f29 100644
--- a/arch/arm/mach-msm/scm.h
+++ b/arch/arm/mach-qcom/scm.h
diff --git a/arch/arm/mach-realview/include/mach/timex.h b/arch/arm/mach-realview/include/mach/timex.h
deleted file mode 100644
index 4eeb069373c2..000000000000
--- a/arch/arm/mach-realview/include/mach/timex.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * arch/arm/mach-realview/include/mach/timex.h
3 *
4 * RealView architecture timex specifications
5 *
6 * Copyright (C) 2003 ARM Limited
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#define CLOCK_TICK_RATE (50000000 / 16)
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index cf073dea5784..6b2f58645a73 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -6,9 +6,6 @@ config ARCH_ROCKCHIP
6 select ARM_GIC 6 select ARM_GIC
7 select CACHE_L2X0 7 select CACHE_L2X0
8 select HAVE_ARM_TWD if SMP 8 select HAVE_ARM_TWD if SMP
9 select HAVE_SMP
10 select COMMON_CLK
11 select GENERIC_CLOCKEVENTS
12 select DW_APB_TIMER_OF 9 select DW_APB_TIMER_OF
13 select ARM_GLOBAL_TIMER 10 select ARM_GLOBAL_TIMER
14 select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK 11 select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
diff --git a/arch/arm/mach-rpc/include/mach/timex.h b/arch/arm/mach-rpc/include/mach/timex.h
deleted file mode 100644
index dd75e7387bbe..000000000000
--- a/arch/arm/mach-rpc/include/mach/timex.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * arch/arm/mach-rpc/include/mach/timex.h
3 *
4 * Copyright (C) 1997, 1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * RiscPC architecture timex specifications
11 */
12
13/*
14 * On the RiscPC, the clock ticks at 2MHz.
15 */
16#define CLOCK_TICK_RATE 2000000
17
diff --git a/arch/arm/mach-rpc/time.c b/arch/arm/mach-rpc/time.c
index 9a5158861ca9..2689771c1d38 100644
--- a/arch/arm/mach-rpc/time.c
+++ b/arch/arm/mach-rpc/time.c
@@ -24,6 +24,9 @@
24 24
25#include <asm/mach/time.h> 25#include <asm/mach/time.h>
26 26
27#define RPC_CLOCK_FREQ 2000000
28#define RPC_LATCH DIV_ROUND_CLOSEST(RPC_CLOCK_FREQ, HZ)
29
27static u32 ioc_timer_gettimeoffset(void) 30static u32 ioc_timer_gettimeoffset(void)
28{ 31{
29 unsigned int count1, count2, status; 32 unsigned int count1, count2, status;
@@ -46,23 +49,23 @@ static u32 ioc_timer_gettimeoffset(void)
46 * and count2. 49 * and count2.
47 */ 50 */
48 if (status & (1 << 5)) 51 if (status & (1 << 5))
49 offset -= LATCH; 52 offset -= RPC_LATCH;
50 } else if (count2 > count1) { 53 } else if (count2 > count1) {
51 /* 54 /*
52 * We have just had another interrupt between reading 55 * We have just had another interrupt between reading
53 * count1 and count2. 56 * count1 and count2.
54 */ 57 */
55 offset -= LATCH; 58 offset -= RPC_LATCH;
56 } 59 }
57 60
58 offset = (LATCH - offset) * (tick_nsec / 1000); 61 offset = (RPC_LATCH - offset) * (tick_nsec / 1000);
59 return ((offset + LATCH/2) / LATCH) * 1000; 62 return DIV_ROUND_CLOSEST(offset, RPC_LATCH) * 1000;
60} 63}
61 64
62void __init ioctime_init(void) 65void __init ioctime_init(void)
63{ 66{
64 ioc_writeb(LATCH & 255, IOC_T0LTCHL); 67 ioc_writeb(RPC_LATCH & 255, IOC_T0LTCHL);
65 ioc_writeb(LATCH >> 8, IOC_T0LTCHH); 68 ioc_writeb(RPC_LATCH >> 8, IOC_T0LTCHH);
66 ioc_writeb(0, IOC_T0GO); 69 ioc_writeb(0, IOC_T0GO);
67} 70}
68 71
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index f2727f2cc661..ba1cc6246778 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -521,7 +521,6 @@ config MACH_ANUBIS
521 select HAVE_PATA_PLATFORM 521 select HAVE_PATA_PLATFORM
522 select S3C2440_XTAL_12000000 522 select S3C2440_XTAL_12000000
523 select S3C24XX_DCLK 523 select S3C24XX_DCLK
524 select S3C24XX_GPIO_EXTRA64
525 select S3C24XX_SIMTEC_PM if PM 524 select S3C24XX_SIMTEC_PM if PM
526 select S3C_DEV_USB_HOST 525 select S3C_DEV_USB_HOST
527 help 526 help
@@ -562,7 +561,6 @@ config MACH_OSIRIS
562 select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ 561 select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ
563 select S3C2440_XTAL_12000000 562 select S3C2440_XTAL_12000000
564 select S3C24XX_DCLK 563 select S3C24XX_DCLK
565 select S3C24XX_GPIO_EXTRA128
566 select S3C24XX_SIMTEC_PM if PM 564 select S3C24XX_SIMTEC_PM if PM
567 select S3C_DEV_NAND 565 select S3C_DEV_NAND
568 select S3C_DEV_USB_HOST 566 select S3C_DEV_USB_HOST
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2410.c b/arch/arm/mach-s3c24xx/clock-s3c2410.c
index d39d3c787580..d1afcf9252d1 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2410.c
@@ -30,13 +30,12 @@
30#include <linux/mutex.h> 30#include <linux/mutex.h>
31#include <linux/delay.h> 31#include <linux/delay.h>
32#include <linux/serial_core.h> 32#include <linux/serial_core.h>
33#include <linux/serial_s3c.h>
33#include <linux/io.h> 34#include <linux/io.h>
34 35
35#include <asm/mach/map.h> 36#include <asm/mach/map.h>
36 37
37#include <mach/hardware.h> 38#include <mach/hardware.h>
38
39#include <plat/regs-serial.h>
40#include <mach/regs-clock.h> 39#include <mach/regs-clock.h>
41#include <mach/regs-gpio.h> 40#include <mach/regs-gpio.h>
42 41
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2412.c b/arch/arm/mach-s3c24xx/clock-s3c2412.c
index 11b3b28457bb..192a5b2550b0 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2412.c
@@ -31,13 +31,12 @@
31#include <linux/mutex.h> 31#include <linux/mutex.h>
32#include <linux/delay.h> 32#include <linux/delay.h>
33#include <linux/serial_core.h> 33#include <linux/serial_core.h>
34#include <linux/serial_s3c.h>
34#include <linux/io.h> 35#include <linux/io.h>
35 36
36#include <asm/mach/map.h> 37#include <asm/mach/map.h>
37 38
38#include <mach/hardware.h> 39#include <mach/hardware.h>
39
40#include <plat/regs-serial.h>
41#include <mach/regs-clock.h> 40#include <mach/regs-clock.h>
42#include <mach/regs-gpio.h> 41#include <mach/regs-gpio.h>
43 42
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2440.c b/arch/arm/mach-s3c24xx/clock-s3c2440.c
index aaf006d1d6dc..5527226fd61f 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2440.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2440.c
@@ -34,6 +34,7 @@
34#include <linux/clk.h> 34#include <linux/clk.h>
35#include <linux/io.h> 35#include <linux/io.h>
36#include <linux/serial_core.h> 36#include <linux/serial_core.h>
37#include <linux/serial_s3c.h>
37 38
38#include <mach/hardware.h> 39#include <mach/hardware.h>
39#include <linux/atomic.h> 40#include <linux/atomic.h>
@@ -43,7 +44,6 @@
43 44
44#include <plat/clock.h> 45#include <plat/clock.h>
45#include <plat/cpu.h> 46#include <plat/cpu.h>
46#include <plat/regs-serial.h>
47 47
48/* S3C2440 extended clock support */ 48/* S3C2440 extended clock support */
49 49
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index 1d77d709ec22..1bc8e73c94f9 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -27,6 +27,7 @@
27#include <linux/interrupt.h> 27#include <linux/interrupt.h>
28#include <linux/ioport.h> 28#include <linux/ioport.h>
29#include <linux/serial_core.h> 29#include <linux/serial_core.h>
30#include <linux/serial_s3c.h>
30#include <clocksource/samsung_pwm.h> 31#include <clocksource/samsung_pwm.h>
31#include <linux/platform_device.h> 32#include <linux/platform_device.h>
32#include <linux/delay.h> 33#include <linux/delay.h>
@@ -44,7 +45,6 @@
44#include <asm/mach/map.h> 45#include <asm/mach/map.h>
45 46
46#include <mach/regs-gpio.h> 47#include <mach/regs-gpio.h>
47#include <plat/regs-serial.h>
48#include <mach/dma.h> 48#include <mach/dma.h>
49 49
50#include <plat/cpu.h> 50#include <plat/cpu.h>
@@ -240,7 +240,6 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
240 } else { 240 } else {
241 samsung_cpu_id = s3c24xx_read_idcode_v4(); 241 samsung_cpu_id = s3c24xx_read_idcode_v4();
242 } 242 }
243 s3c24xx_init_cpu();
244 243
245 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); 244 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
246 245
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2410.c b/arch/arm/mach-s3c24xx/dma-s3c2410.c
index 30aa53ff07a6..09aa12da1789 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2410.c
@@ -16,6 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/device.h> 17#include <linux/device.h>
18#include <linux/serial_core.h> 18#include <linux/serial_core.h>
19#include <linux/serial_s3c.h>
19 20
20#include <mach/map.h> 21#include <mach/map.h>
21#include <mach/dma.h> 22#include <mach/dma.h>
@@ -23,7 +24,6 @@
23#include <plat/cpu.h> 24#include <plat/cpu.h>
24#include <plat/dma-s3c24xx.h> 25#include <plat/dma-s3c24xx.h>
25 26
26#include <plat/regs-serial.h>
27#include <mach/regs-gpio.h> 27#include <mach/regs-gpio.h>
28#include <plat/regs-dma.h> 28#include <plat/regs-dma.h>
29#include <mach/regs-lcd.h> 29#include <mach/regs-lcd.h>
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2412.c b/arch/arm/mach-s3c24xx/dma-s3c2412.c
index b7e094671522..0c0106d1a4d1 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2412.c
@@ -16,6 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/device.h> 17#include <linux/device.h>
18#include <linux/serial_core.h> 18#include <linux/serial_core.h>
19#include <linux/serial_s3c.h>
19#include <linux/io.h> 20#include <linux/io.h>
20 21
21#include <mach/dma.h> 22#include <mach/dma.h>
@@ -23,7 +24,6 @@
23#include <plat/dma-s3c24xx.h> 24#include <plat/dma-s3c24xx.h>
24#include <plat/cpu.h> 25#include <plat/cpu.h>
25 26
26#include <plat/regs-serial.h>
27#include <mach/regs-gpio.h> 27#include <mach/regs-gpio.h>
28#include <plat/regs-dma.h> 28#include <plat/regs-dma.h>
29#include <mach/regs-lcd.h> 29#include <mach/regs-lcd.h>
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2440.c b/arch/arm/mach-s3c24xx/dma-s3c2440.c
index cd25de28804c..2f8e8a3017df 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2440.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2440.c
@@ -16,6 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/device.h> 17#include <linux/device.h>
18#include <linux/serial_core.h> 18#include <linux/serial_core.h>
19#include <linux/serial_s3c.h>
19 20
20#include <mach/map.h> 21#include <mach/map.h>
21#include <mach/dma.h> 22#include <mach/dma.h>
@@ -23,7 +24,6 @@
23#include <plat/dma-s3c24xx.h> 24#include <plat/dma-s3c24xx.h>
24#include <plat/cpu.h> 25#include <plat/cpu.h>
25 26
26#include <plat/regs-serial.h>
27#include <mach/regs-gpio.h> 27#include <mach/regs-gpio.h>
28#include <plat/regs-dma.h> 28#include <plat/regs-dma.h>
29#include <mach/regs-lcd.h> 29#include <mach/regs-lcd.h>
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2443.c b/arch/arm/mach-s3c24xx/dma-s3c2443.c
index 95b9f759fe97..f4096ec0700a 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2443.c
@@ -16,6 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/device.h> 17#include <linux/device.h>
18#include <linux/serial_core.h> 18#include <linux/serial_core.h>
19#include <linux/serial_s3c.h>
19#include <linux/io.h> 20#include <linux/io.h>
20 21
21#include <mach/dma.h> 22#include <mach/dma.h>
@@ -23,7 +24,6 @@
23#include <plat/dma-s3c24xx.h> 24#include <plat/dma-s3c24xx.h>
24#include <plat/cpu.h> 25#include <plat/cpu.h>
25 26
26#include <plat/regs-serial.h>
27#include <mach/regs-gpio.h> 27#include <mach/regs-gpio.h>
28#include <plat/regs-dma.h> 28#include <plat/regs-dma.h>
29#include <mach/regs-lcd.h> 29#include <mach/regs-lcd.h>
diff --git a/arch/arm/mach-s3c24xx/include/mach/debug-macro.S b/arch/arm/mach-s3c24xx/include/mach/debug-macro.S
index 2558952e3147..2f39737544c0 100644
--- a/arch/arm/mach-s3c24xx/include/mach/debug-macro.S
+++ b/arch/arm/mach-s3c24xx/include/mach/debug-macro.S
@@ -14,7 +14,7 @@
14 14
15#include <mach/map.h> 15#include <mach/map.h>
16#include <mach/regs-gpio.h> 16#include <mach/regs-gpio.h>
17#include <plat/regs-serial.h> 17#include <linux/serial_s3c.h>
18 18
19#define S3C2410_UART1_OFF (0x4000) 19#define S3C2410_UART1_OFF (0x4000)
20#define SHIFT_2440TXF (14-9) 20#define SHIFT_2440TXF (14-9)
diff --git a/arch/arm/plat-samsung/include/plat/rtc-core.h b/arch/arm/mach-s3c24xx/include/mach/rtc-core.h
index 7b542f7b7938..4d5f5768f700 100644
--- a/arch/arm/plat-samsung/include/plat/rtc-core.h
+++ b/arch/arm/mach-s3c24xx/include/mach/rtc-core.h
@@ -1,5 +1,4 @@
1/* linux/arch/arm/plat-samsung/include/plat/rtc-core.h 1/*
2 *
3 * Copyright (c) 2011 Heiko Stuebner <heiko@sntech.de> 2 * Copyright (c) 2011 Heiko Stuebner <heiko@sntech.de>
4 * 3 *
5 * Samsung RTC Controller core functions 4 * Samsung RTC Controller core functions
@@ -9,19 +8,19 @@
9 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
10*/ 9*/
11 10
12#ifndef __ASM_PLAT_RTC_CORE_H 11#ifndef __RTC_CORE_H
13#define __ASM_PLAT_RTC_CORE_H __FILE__ 12#define __RTC_CORE_H __FILE__
14 13
15/* These functions are only for use with the core support code, such as 14/* These functions are only for use with the core support code, such as
16 * the cpu specific initialisation code 15 * the cpu specific initialisation code
17 */ 16 */
18 17
18extern struct platform_device s3c_device_rtc;
19
19/* re-define device name depending on support. */ 20/* re-define device name depending on support. */
20static inline void s3c_rtc_setname(char *name) 21static inline void s3c_rtc_setname(char *name)
21{ 22{
22#if defined(CONFIG_S3C_DEV_RTC) || defined(CONFIG_PLAT_S3C24XX)
23 s3c_device_rtc.name = name; 23 s3c_device_rtc.name = name;
24#endif
25} 24}
26 25
27#endif /* __ASM_PLAT_RTC_CORE_H */ 26#endif /* __RTC_CORE_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/tick.h b/arch/arm/mach-s3c24xx/include/mach/tick.h
deleted file mode 100644
index 544da41979db..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/tick.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/* linux/arch/arm/mach-s3c2410/include/mach/tick.h
2 *
3 * Copyright 2008 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/
6 *
7 * S3C2410 - timer tick support
8 */
9
10#define SRCPND_TIMER4 (1<<(IRQ_TIMER4 - IRQ_EINT0))
11
12static inline int s3c24xx_ostimer_pending(void)
13{
14 return __raw_readl(S3C2410_SRCPND) & SRCPND_TIMER4;
15}
diff --git a/arch/arm/mach-s3c24xx/include/mach/timex.h b/arch/arm/mach-s3c24xx/include/mach/timex.h
deleted file mode 100644
index fe9ca1ffd51b..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/timex.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/timex.h
2 *
3 * Copyright (c) 2003-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - time parameters
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_TIMEX_H
14#define __ASM_ARCH_TIMEX_H
15
16/* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it
17 * a variable is useless. It seems as long as we make our timers an
18 * exact multiple of HZ, any value that makes a 1->1 correspondence
19 * for the time conversion functions to/from jiffies is acceptable.
20*/
21
22#define CLOCK_TICK_RATE 12000000
23
24#endif /* __ASM_ARCH_TIMEX_H */
diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c24xx/mach-amlm5900.c
index 284ea1f44205..8ac9554aa996 100644
--- a/arch/arm/mach-s3c24xx/mach-amlm5900.c
+++ b/arch/arm/mach-s3c24xx/mach-amlm5900.c
@@ -37,6 +37,7 @@
37#include <linux/platform_device.h> 37#include <linux/platform_device.h>
38#include <linux/proc_fs.h> 38#include <linux/proc_fs.h>
39#include <linux/serial_core.h> 39#include <linux/serial_core.h>
40#include <linux/serial_s3c.h>
40#include <linux/io.h> 41#include <linux/io.h>
41 42
42#include <asm/mach/arch.h> 43#include <asm/mach/arch.h>
@@ -49,7 +50,6 @@
49#include <asm/mach-types.h> 50#include <asm/mach-types.h>
50#include <mach/fb.h> 51#include <mach/fb.h>
51 52
52#include <plat/regs-serial.h>
53#include <mach/regs-lcd.h> 53#include <mach/regs-lcd.h>
54#include <mach/regs-gpio.h> 54#include <mach/regs-gpio.h>
55#include <mach/gpio-samsung.h> 55#include <mach/gpio-samsung.h>
diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24xx/mach-anubis.c
index 2a16f8fb3584..81a270af2336 100644
--- a/arch/arm/mach-s3c24xx/mach-anubis.c
+++ b/arch/arm/mach-s3c24xx/mach-anubis.c
@@ -17,6 +17,7 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/gpio.h> 18#include <linux/gpio.h>
19#include <linux/serial_core.h> 19#include <linux/serial_core.h>
20#include <linux/serial_s3c.h>
20#include <linux/platform_device.h> 21#include <linux/platform_device.h>
21#include <linux/ata_platform.h> 22#include <linux/ata_platform.h>
22#include <linux/i2c.h> 23#include <linux/i2c.h>
@@ -32,7 +33,6 @@
32#include <asm/irq.h> 33#include <asm/irq.h>
33#include <asm/mach-types.h> 34#include <asm/mach-types.h>
34 35
35#include <plat/regs-serial.h>
36#include <mach/regs-gpio.h> 36#include <mach/regs-gpio.h>
37#include <mach/regs-lcd.h> 37#include <mach/regs-lcd.h>
38#include <mach/gpio-samsung.h> 38#include <mach/gpio-samsung.h>
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c
index 6beab674c147..d8f6bb1096cb 100644
--- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
+++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c
@@ -21,6 +21,7 @@
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/serial_core.h> 23#include <linux/serial_core.h>
24#include <linux/serial_s3c.h>
24#include <linux/dm9000.h> 25#include <linux/dm9000.h>
25#include <linux/platform_device.h> 26#include <linux/platform_device.h>
26 27
@@ -33,7 +34,6 @@
33#include <asm/irq.h> 34#include <asm/irq.h>
34#include <asm/mach-types.h> 35#include <asm/mach-types.h>
35 36
36#include <plat/regs-serial.h>
37#include <mach/regs-gpio.h> 37#include <mach/regs-gpio.h>
38#include <mach/regs-lcd.h> 38#include <mach/regs-lcd.h>
39#include <mach/gpio-samsung.h> 39#include <mach/gpio-samsung.h>
diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/mach-bast.c
index 981ba1eb9fdc..e371ff53a408 100644
--- a/arch/arm/mach-s3c24xx/mach-bast.c
+++ b/arch/arm/mach-s3c24xx/mach-bast.c
@@ -19,6 +19,7 @@
19#include <linux/gpio.h> 19#include <linux/gpio.h>
20#include <linux/syscore_ops.h> 20#include <linux/syscore_ops.h>
21#include <linux/serial_core.h> 21#include <linux/serial_core.h>
22#include <linux/serial_s3c.h>
22#include <linux/platform_device.h> 23#include <linux/platform_device.h>
23#include <linux/dm9000.h> 24#include <linux/dm9000.h>
24#include <linux/ata_platform.h> 25#include <linux/ata_platform.h>
@@ -55,7 +56,6 @@
55#include <plat/cpu-freq.h> 56#include <plat/cpu-freq.h>
56#include <plat/devs.h> 57#include <plat/devs.h>
57#include <plat/gpio-cfg.h> 58#include <plat/gpio-cfg.h>
58#include <plat/regs-serial.h>
59#include <plat/samsung-time.h> 59#include <plat/samsung-time.h>
60 60
61#include "bast.h" 61#include "bast.h"
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index ee7bb2905a99..dc4db849f0fd 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -35,6 +35,7 @@
35#include <linux/workqueue.h> 35#include <linux/workqueue.h>
36#include <linux/platform_device.h> 36#include <linux/platform_device.h>
37#include <linux/serial_core.h> 37#include <linux/serial_core.h>
38#include <linux/serial_s3c.h>
38#include <linux/input.h> 39#include <linux/input.h>
39#include <linux/io.h> 40#include <linux/io.h>
40#include <linux/i2c.h> 41#include <linux/i2c.h>
@@ -81,7 +82,6 @@
81#include <plat/devs.h> 82#include <plat/devs.h>
82#include <plat/gpio-cfg.h> 83#include <plat/gpio-cfg.h>
83#include <plat/pm.h> 84#include <plat/pm.h>
84#include <plat/regs-serial.h>
85#include <plat/samsung-time.h> 85#include <plat/samsung-time.h>
86 86
87#include "common.h" 87#include "common.h"
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index de0832181d8c..e453acd92cbf 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -19,6 +19,7 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/device.h> 20#include <linux/device.h>
21#include <linux/serial_core.h> 21#include <linux/serial_core.h>
22#include <linux/serial_s3c.h>
22#include <linux/platform_device.h> 23#include <linux/platform_device.h>
23#include <linux/io.h> 24#include <linux/io.h>
24#include <linux/gpio.h> 25#include <linux/gpio.h>
@@ -62,7 +63,6 @@
62#include <plat/gpio-cfg.h> 63#include <plat/gpio-cfg.h>
63#include <plat/pll.h> 64#include <plat/pll.h>
64#include <plat/pm.h> 65#include <plat/pm.h>
65#include <plat/regs-serial.h>
66#include <plat/samsung-time.h> 66#include <plat/samsung-time.h>
67 67
68#include "common.h" 68#include "common.h"
diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c
index 67cb8e948b7e..5faa7239e7d6 100644
--- a/arch/arm/mach-s3c24xx/mach-jive.c
+++ b/arch/arm/mach-s3c24xx/mach-jive.c
@@ -19,6 +19,7 @@
19#include <linux/gpio.h> 19#include <linux/gpio.h>
20#include <linux/syscore_ops.h> 20#include <linux/syscore_ops.h>
21#include <linux/serial_core.h> 21#include <linux/serial_core.h>
22#include <linux/serial_s3c.h>
22#include <linux/platform_device.h> 23#include <linux/platform_device.h>
23#include <linux/i2c.h> 24#include <linux/i2c.h>
24 25
@@ -31,7 +32,6 @@
31#include <asm/mach/map.h> 32#include <asm/mach/map.h>
32#include <asm/mach/irq.h> 33#include <asm/mach/irq.h>
33 34
34#include <plat/regs-serial.h>
35#include <linux/platform_data/mtd-nand-s3c2410.h> 35#include <linux/platform_data/mtd-nand-s3c2410.h>
36#include <linux/platform_data/i2c-s3c2410.h> 36#include <linux/platform_data/i2c-s3c2410.h>
37 37
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index 1f1559713d8b..9e57fd9f4f3b 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -23,6 +23,7 @@
23#include <linux/input.h> 23#include <linux/input.h>
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/serial_core.h> 25#include <linux/serial_core.h>
26#include <linux/serial_s3c.h>
26#include <linux/dm9000.h> 27#include <linux/dm9000.h>
27#include <linux/platform_data/at24.h> 28#include <linux/platform_data/at24.h>
28#include <linux/platform_device.h> 29#include <linux/platform_device.h>
@@ -37,7 +38,6 @@
37#include <mach/fb.h> 38#include <mach/fb.h>
38#include <asm/mach-types.h> 39#include <asm/mach-types.h>
39 40
40#include <plat/regs-serial.h>
41#include <mach/regs-gpio.h> 41#include <mach/regs-gpio.h>
42#include <linux/platform_data/leds-s3c24xx.h> 42#include <linux/platform_data/leds-s3c24xx.h>
43#include <mach/regs-lcd.h> 43#include <mach/regs-lcd.h>
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
index 997684f17930..4cccaad34847 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c24xx/mach-n30.c
@@ -24,6 +24,7 @@
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <linux/serial_core.h> 26#include <linux/serial_core.h>
27#include <linux/serial_s3c.h>
27#include <linux/timer.h> 28#include <linux/timer.h>
28#include <linux/io.h> 29#include <linux/io.h>
29#include <linux/mmc/host.h> 30#include <linux/mmc/host.h>
@@ -43,7 +44,6 @@
43#include <asm/mach/map.h> 44#include <asm/mach/map.h>
44 45
45#include <linux/platform_data/i2c-s3c2410.h> 46#include <linux/platform_data/i2c-s3c2410.h>
46#include <plat/regs-serial.h>
47 47
48#include <plat/clock.h> 48#include <plat/clock.h>
49#include <plat/cpu.h> 49#include <plat/cpu.h>
diff --git a/arch/arm/mach-s3c24xx/mach-nexcoder.c b/arch/arm/mach-s3c24xx/mach-nexcoder.c
index 575d28c9e6c6..3066851f584d 100644
--- a/arch/arm/mach-s3c24xx/mach-nexcoder.c
+++ b/arch/arm/mach-s3c24xx/mach-nexcoder.c
@@ -21,6 +21,7 @@
21#include <linux/gpio.h> 21#include <linux/gpio.h>
22#include <linux/string.h> 22#include <linux/string.h>
23#include <linux/serial_core.h> 23#include <linux/serial_core.h>
24#include <linux/serial_s3c.h>
24#include <linux/platform_device.h> 25#include <linux/platform_device.h>
25#include <linux/io.h> 26#include <linux/io.h>
26 27
@@ -38,7 +39,6 @@
38//#include <asm/debug-ll.h> 39//#include <asm/debug-ll.h>
39#include <mach/regs-gpio.h> 40#include <mach/regs-gpio.h>
40#include <mach/gpio-samsung.h> 41#include <mach/gpio-samsung.h>
41#include <plat/regs-serial.h>
42#include <linux/platform_data/i2c-s3c2410.h> 42#include <linux/platform_data/i2c-s3c2410.h>
43 43
44#include <plat/gpio-cfg.h> 44#include <plat/gpio-cfg.h>
diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c
index f84f2a4c0c6d..a4ae4bb3666d 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris.c
@@ -18,6 +18,7 @@
18#include <linux/device.h> 18#include <linux/device.h>
19#include <linux/syscore_ops.h> 19#include <linux/syscore_ops.h>
20#include <linux/serial_core.h> 20#include <linux/serial_core.h>
21#include <linux/serial_s3c.h>
21#include <linux/clk.h> 22#include <linux/clk.h>
22#include <linux/i2c.h> 23#include <linux/i2c.h>
23#include <linux/io.h> 24#include <linux/io.h>
@@ -44,7 +45,6 @@
44#include <plat/cpu-freq.h> 45#include <plat/cpu-freq.h>
45#include <plat/devs.h> 46#include <plat/devs.h>
46#include <plat/gpio-cfg.h> 47#include <plat/gpio-cfg.h>
47#include <plat/regs-serial.h>
48#include <plat/samsung-time.h> 48#include <plat/samsung-time.h>
49 49
50#include <mach/hardware.h> 50#include <mach/hardware.h>
diff --git a/arch/arm/mach-s3c24xx/mach-otom.c b/arch/arm/mach-s3c24xx/mach-otom.c
index 7e16b0740ec1..bdb3faac2d9b 100644
--- a/arch/arm/mach-s3c24xx/mach-otom.c
+++ b/arch/arm/mach-s3c24xx/mach-otom.c
@@ -15,6 +15,7 @@
15#include <linux/timer.h> 15#include <linux/timer.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/serial_core.h> 17#include <linux/serial_core.h>
18#include <linux/serial_s3c.h>
18#include <linux/platform_device.h> 19#include <linux/platform_device.h>
19#include <linux/io.h> 20#include <linux/io.h>
20 21
@@ -32,7 +33,6 @@
32#include <plat/clock.h> 33#include <plat/clock.h>
33#include <plat/cpu.h> 34#include <plat/cpu.h>
34#include <plat/devs.h> 35#include <plat/devs.h>
35#include <plat/regs-serial.h>
36#include <plat/samsung-time.h> 36#include <plat/samsung-time.h>
37 37
38#include "common.h" 38#include "common.h"
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index b534b76812e3..8c12787a8fd3 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -31,6 +31,7 @@
31#include <linux/device.h> 31#include <linux/device.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <linux/serial_core.h> 33#include <linux/serial_core.h>
34#include <linux/serial_s3c.h>
34#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
35#include <linux/spi/spi_gpio.h> 36#include <linux/spi/spi_gpio.h>
36#include <linux/io.h> 37#include <linux/io.h>
@@ -49,7 +50,6 @@
49 50
50#include <linux/platform_data/leds-s3c24xx.h> 51#include <linux/platform_data/leds-s3c24xx.h>
51#include <mach/regs-lcd.h> 52#include <mach/regs-lcd.h>
52#include <plat/regs-serial.h>
53#include <mach/fb.h> 53#include <mach/fb.h>
54#include <linux/platform_data/mtd-nand-s3c2410.h> 54#include <linux/platform_data/mtd-nand-s3c2410.h>
55#include <linux/platform_data/usb-s3c2410_udc.h> 55#include <linux/platform_data/usb-s3c2410_udc.h>
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 0a5456cda1bc..afb784e934c8 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -21,6 +21,7 @@
21#include <linux/gpio.h> 21#include <linux/gpio.h>
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/serial_core.h> 23#include <linux/serial_core.h>
24#include <linux/serial_s3c.h>
24#include <linux/input.h> 25#include <linux/input.h>
25#include <linux/gpio_keys.h> 26#include <linux/gpio_keys.h>
26#include <linux/device.h> 27#include <linux/device.h>
@@ -57,7 +58,6 @@
57#include <plat/cpu.h> 58#include <plat/cpu.h>
58#include <plat/devs.h> 59#include <plat/devs.h>
59#include <plat/pm.h> 60#include <plat/pm.h>
60#include <plat/regs-serial.h>
61#include <plat/samsung-time.h> 61#include <plat/samsung-time.h>
62#include <plat/gpio-cfg.h> 62#include <plat/gpio-cfg.h>
63 63
diff --git a/arch/arm/mach-s3c24xx/mach-rx3715.c b/arch/arm/mach-s3c24xx/mach-rx3715.c
index b36edce8b2b8..e6535ce1bc5c 100644
--- a/arch/arm/mach-s3c24xx/mach-rx3715.c
+++ b/arch/arm/mach-s3c24xx/mach-rx3715.c
@@ -23,6 +23,7 @@
23#include <linux/device.h> 23#include <linux/device.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/serial_core.h> 25#include <linux/serial_core.h>
26#include <linux/serial_s3c.h>
26#include <linux/serial.h> 27#include <linux/serial.h>
27#include <linux/io.h> 28#include <linux/io.h>
28#include <linux/mtd/mtd.h> 29#include <linux/mtd/mtd.h>
@@ -49,7 +50,6 @@
49#include <plat/cpu.h> 50#include <plat/cpu.h>
50#include <plat/devs.h> 51#include <plat/devs.h>
51#include <plat/pm.h> 52#include <plat/pm.h>
52#include <plat/regs-serial.h>
53#include <plat/samsung-time.h> 53#include <plat/samsung-time.h>
54 54
55#include "common.h" 55#include "common.h"
diff --git a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
index f50454a34f72..70f0900d4bca 100644
--- a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
+++ b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
@@ -19,13 +19,13 @@
19#include <linux/irqchip.h> 19#include <linux/irqchip.h>
20#include <linux/of_platform.h> 20#include <linux/of_platform.h>
21#include <linux/serial_core.h> 21#include <linux/serial_core.h>
22#include <linux/serial_s3c.h>
22 23
23#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
24#include <mach/map.h> 25#include <mach/map.h>
25 26
26#include <plat/cpu.h> 27#include <plat/cpu.h>
27#include <plat/pm.h> 28#include <plat/pm.h>
28#include <plat/regs-serial.h>
29 29
30#include "common.h" 30#include "common.h"
31 31
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2410.c b/arch/arm/mach-s3c24xx/mach-smdk2410.c
index a773789e4f38..f32924ee0e9f 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2410.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2410.c
@@ -35,6 +35,7 @@
35#include <linux/timer.h> 35#include <linux/timer.h>
36#include <linux/init.h> 36#include <linux/init.h>
37#include <linux/serial_core.h> 37#include <linux/serial_core.h>
38#include <linux/serial_s3c.h>
38#include <linux/platform_device.h> 39#include <linux/platform_device.h>
39#include <linux/io.h> 40#include <linux/io.h>
40 41
@@ -46,7 +47,6 @@
46#include <asm/irq.h> 47#include <asm/irq.h>
47#include <asm/mach-types.h> 48#include <asm/mach-types.h>
48 49
49#include <plat/regs-serial.h>
50#include <linux/platform_data/i2c-s3c2410.h> 50#include <linux/platform_data/i2c-s3c2410.h>
51 51
52#include <plat/devs.h> 52#include <plat/devs.h>
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2413.c b/arch/arm/mach-s3c24xx/mach-smdk2413.c
index f5bc721217e3..233fe52d2015 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2413.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2413.c
@@ -19,6 +19,7 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/gpio.h> 20#include <linux/gpio.h>
21#include <linux/serial_core.h> 21#include <linux/serial_core.h>
22#include <linux/serial_s3c.h>
22#include <linux/platform_device.h> 23#include <linux/platform_device.h>
23#include <linux/io.h> 24#include <linux/io.h>
24 25
@@ -33,7 +34,6 @@
33#include <asm/mach-types.h> 34#include <asm/mach-types.h>
34 35
35//#include <asm/debug-ll.h> 36//#include <asm/debug-ll.h>
36#include <plat/regs-serial.h>
37#include <mach/regs-gpio.h> 37#include <mach/regs-gpio.h>
38#include <mach/regs-lcd.h> 38#include <mach/regs-lcd.h>
39 39
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c
index 12023cae4378..b3b54d8e1410 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2416.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c
@@ -18,6 +18,7 @@
18#include <linux/timer.h> 18#include <linux/timer.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/serial_core.h> 20#include <linux/serial_core.h>
21#include <linux/serial_s3c.h>
21#include <linux/platform_device.h> 22#include <linux/platform_device.h>
22#include <linux/io.h> 23#include <linux/io.h>
23#include <linux/mtd/partitions.h> 24#include <linux/mtd/partitions.h>
@@ -34,7 +35,6 @@
34#include <asm/irq.h> 35#include <asm/irq.h>
35#include <asm/mach-types.h> 36#include <asm/mach-types.h>
36 37
37#include <plat/regs-serial.h>
38#include <mach/regs-gpio.h> 38#include <mach/regs-gpio.h>
39#include <mach/regs-lcd.h> 39#include <mach/regs-lcd.h>
40#include <mach/regs-s3c2443-clock.h> 40#include <mach/regs-s3c2443-clock.h>
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2440.c b/arch/arm/mach-s3c24xx/mach-smdk2440.c
index de2e5d39a847..d071dcfea548 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2440.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2440.c
@@ -20,6 +20,7 @@
20#include <linux/timer.h> 20#include <linux/timer.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/serial_core.h> 22#include <linux/serial_core.h>
23#include <linux/serial_s3c.h>
23#include <linux/platform_device.h> 24#include <linux/platform_device.h>
24#include <linux/io.h> 25#include <linux/io.h>
25 26
@@ -31,7 +32,6 @@
31#include <asm/irq.h> 32#include <asm/irq.h>
32#include <asm/mach-types.h> 33#include <asm/mach-types.h>
33 34
34#include <plat/regs-serial.h>
35#include <mach/regs-gpio.h> 35#include <mach/regs-gpio.h>
36#include <mach/regs-lcd.h> 36#include <mach/regs-lcd.h>
37 37
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2443.c b/arch/arm/mach-s3c24xx/mach-smdk2443.c
index d9933fcc6cc8..06c4d77de3a5 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2443.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2443.c
@@ -20,6 +20,7 @@
20#include <linux/timer.h> 20#include <linux/timer.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/serial_core.h> 22#include <linux/serial_core.h>
23#include <linux/serial_s3c.h>
23#include <linux/platform_device.h> 24#include <linux/platform_device.h>
24#include <linux/io.h> 25#include <linux/io.h>
25 26
@@ -31,7 +32,6 @@
31#include <asm/irq.h> 32#include <asm/irq.h>
32#include <asm/mach-types.h> 33#include <asm/mach-types.h>
33 34
34#include <plat/regs-serial.h>
35#include <mach/regs-gpio.h> 35#include <mach/regs-gpio.h>
36#include <mach/regs-lcd.h> 36#include <mach/regs-lcd.h>
37 37
diff --git a/arch/arm/mach-s3c24xx/mach-tct_hammer.c b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
index 7fad8f055cab..4108b2f0cede 100644
--- a/arch/arm/mach-s3c24xx/mach-tct_hammer.c
+++ b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
@@ -33,6 +33,7 @@
33#include <linux/device.h> 33#include <linux/device.h>
34#include <linux/platform_device.h> 34#include <linux/platform_device.h>
35#include <linux/serial_core.h> 35#include <linux/serial_core.h>
36#include <linux/serial_s3c.h>
36#include <linux/io.h> 37#include <linux/io.h>
37 38
38#include <asm/mach/arch.h> 39#include <asm/mach/arch.h>
@@ -44,7 +45,6 @@
44#include <asm/irq.h> 45#include <asm/irq.h>
45#include <asm/mach-types.h> 46#include <asm/mach-types.h>
46 47
47#include <plat/regs-serial.h>
48#include <linux/platform_data/i2c-s3c2410.h> 48#include <linux/platform_data/i2c-s3c2410.h>
49#include <plat/devs.h> 49#include <plat/devs.h>
50#include <plat/cpu.h> 50#include <plat/cpu.h>
diff --git a/arch/arm/mach-s3c24xx/mach-vr1000.c b/arch/arm/mach-s3c24xx/mach-vr1000.c
index 755df489a45f..1cc5b1bd51cd 100644
--- a/arch/arm/mach-s3c24xx/mach-vr1000.c
+++ b/arch/arm/mach-s3c24xx/mach-vr1000.c
@@ -25,6 +25,7 @@
25#include <linux/tty.h> 25#include <linux/tty.h>
26#include <linux/serial_8250.h> 26#include <linux/serial_8250.h>
27#include <linux/serial_reg.h> 27#include <linux/serial_reg.h>
28#include <linux/serial_s3c.h>
28#include <linux/io.h> 29#include <linux/io.h>
29 30
30#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
@@ -45,7 +46,6 @@
45#include <plat/clock.h> 46#include <plat/clock.h>
46#include <plat/cpu.h> 47#include <plat/cpu.h>
47#include <plat/devs.h> 48#include <plat/devs.h>
48#include <plat/regs-serial.h>
49#include <plat/samsung-time.h> 49#include <plat/samsung-time.h>
50 50
51#include "bast.h" 51#include "bast.h"
diff --git a/arch/arm/mach-s3c24xx/mach-vstms.c b/arch/arm/mach-s3c24xx/mach-vstms.c
index f7ec9c550787..40868c0e0a68 100644
--- a/arch/arm/mach-s3c24xx/mach-vstms.c
+++ b/arch/arm/mach-s3c24xx/mach-vstms.c
@@ -16,6 +16,7 @@
16#include <linux/timer.h> 16#include <linux/timer.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/serial_core.h> 18#include <linux/serial_core.h>
19#include <linux/serial_s3c.h>
19#include <linux/platform_device.h> 20#include <linux/platform_device.h>
20#include <linux/io.h> 21#include <linux/io.h>
21#include <linux/mtd/mtd.h> 22#include <linux/mtd/mtd.h>
@@ -32,7 +33,6 @@
32#include <asm/irq.h> 33#include <asm/irq.h>
33#include <asm/mach-types.h> 34#include <asm/mach-types.h>
34 35
35#include <plat/regs-serial.h>
36#include <mach/regs-gpio.h> 36#include <mach/regs-gpio.h>
37#include <mach/regs-lcd.h> 37#include <mach/regs-lcd.h>
38 38
diff --git a/arch/arm/mach-s3c24xx/pm.c b/arch/arm/mach-s3c24xx/pm.c
index 052ca23393a7..68ea5b7e5dc7 100644
--- a/arch/arm/mach-s3c24xx/pm.c
+++ b/arch/arm/mach-s3c24xx/pm.c
@@ -33,9 +33,9 @@
33#include <linux/gpio.h> 33#include <linux/gpio.h>
34#include <linux/interrupt.h> 34#include <linux/interrupt.h>
35#include <linux/serial_core.h> 35#include <linux/serial_core.h>
36#include <linux/serial_s3c.h>
36#include <linux/io.h> 37#include <linux/io.h>
37 38
38#include <plat/regs-serial.h>
39#include <mach/regs-clock.h> 39#include <mach/regs-clock.h>
40#include <mach/regs-gpio.h> 40#include <mach/regs-gpio.h>
41#include <mach/regs-irq.h> 41#include <mach/regs-irq.h>
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c
index ffb92cbca08c..04b58cb49888 100644
--- a/arch/arm/mach-s3c24xx/s3c2410.c
+++ b/arch/arm/mach-s3c24xx/s3c2410.c
@@ -21,6 +21,7 @@
21#include <linux/device.h> 21#include <linux/device.h>
22#include <linux/syscore_ops.h> 22#include <linux/syscore_ops.h>
23#include <linux/serial_core.h> 23#include <linux/serial_core.h>
24#include <linux/serial_s3c.h>
24#include <linux/platform_device.h> 25#include <linux/platform_device.h>
25#include <linux/reboot.h> 26#include <linux/reboot.h>
26#include <linux/io.h> 27#include <linux/io.h>
@@ -37,7 +38,6 @@
37#include <plat/cpu-freq.h> 38#include <plat/cpu-freq.h>
38 39
39#include <mach/regs-clock.h> 40#include <mach/regs-clock.h>
40#include <plat/regs-serial.h>
41 41
42#include <plat/cpu.h> 42#include <plat/cpu.h>
43#include <plat/devs.h> 43#include <plat/devs.h>
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
index 0251650cbf80..657cbaca80ac 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c24xx/s3c2412.c
@@ -20,6 +20,7 @@
20#include <linux/device.h> 20#include <linux/device.h>
21#include <linux/syscore_ops.h> 21#include <linux/syscore_ops.h>
22#include <linux/serial_core.h> 22#include <linux/serial_core.h>
23#include <linux/serial_s3c.h>
23#include <linux/platform_device.h> 24#include <linux/platform_device.h>
24#include <linux/io.h> 25#include <linux/io.h>
25#include <linux/reboot.h> 26#include <linux/reboot.h>
@@ -43,7 +44,6 @@
43#include <plat/nand-core.h> 44#include <plat/nand-core.h>
44#include <plat/pll.h> 45#include <plat/pll.h>
45#include <plat/pm.h> 46#include <plat/pm.h>
46#include <plat/regs-serial.h>
47#include <plat/regs-spi.h> 47#include <plat/regs-spi.h>
48 48
49#include "common.h" 49#include "common.h"
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c
index 8e01b4f2df35..9fe260ae11e1 100644
--- a/arch/arm/mach-s3c24xx/s3c2416.c
+++ b/arch/arm/mach-s3c24xx/s3c2416.c
@@ -48,6 +48,7 @@
48#include <asm/system_misc.h> 48#include <asm/system_misc.h>
49 49
50#include <mach/regs-s3c2443-clock.h> 50#include <mach/regs-s3c2443-clock.h>
51#include <mach/rtc-core.h>
51 52
52#include <plat/gpio-core.h> 53#include <plat/gpio-core.h>
53#include <plat/gpio-cfg.h> 54#include <plat/gpio-cfg.h>
@@ -61,7 +62,6 @@
61#include <plat/fb-core.h> 62#include <plat/fb-core.h>
62#include <plat/nand-core.h> 63#include <plat/nand-core.h>
63#include <plat/adc-core.h> 64#include <plat/adc-core.h>
64#include <plat/rtc-core.h>
65#include <plat/spi-core.h> 65#include <plat/spi-core.h>
66 66
67#include "common.h" 67#include "common.h"
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c
index 886c2147062b..c7a804d0348e 100644
--- a/arch/arm/mach-s3c24xx/s3c2443.c
+++ b/arch/arm/mach-s3c24xx/s3c2443.c
@@ -34,6 +34,7 @@
34#include <asm/system_misc.h> 34#include <asm/system_misc.h>
35 35
36#include <mach/regs-s3c2443-clock.h> 36#include <mach/regs-s3c2443-clock.h>
37#include <mach/rtc-core.h>
37 38
38#include <plat/gpio-core.h> 39#include <plat/gpio-core.h>
39#include <plat/gpio-cfg.h> 40#include <plat/gpio-cfg.h>
@@ -43,7 +44,6 @@
43#include <plat/fb-core.h> 44#include <plat/fb-core.h>
44#include <plat/nand-core.h> 45#include <plat/nand-core.h>
45#include <plat/adc-core.h> 46#include <plat/adc-core.h>
46#include <plat/rtc-core.h>
47#include <plat/spi-core.h> 47#include <plat/spi-core.h>
48 48
49static struct map_desc s3c2443_iodesc[] __initdata = { 49static struct map_desc s3c2443_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
index 911b555029fc..fe30ebb234d2 100644
--- a/arch/arm/mach-s3c24xx/s3c244x.c
+++ b/arch/arm/mach-s3c24xx/s3c244x.c
@@ -17,6 +17,7 @@
17#include <linux/timer.h> 17#include <linux/timer.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/serial_core.h> 19#include <linux/serial_core.h>
20#include <linux/serial_s3c.h>
20#include <linux/platform_device.h> 21#include <linux/platform_device.h>
21#include <linux/reboot.h> 22#include <linux/reboot.h>
22#include <linux/device.h> 23#include <linux/device.h>
@@ -35,7 +36,6 @@
35#include <plat/cpu-freq.h> 36#include <plat/cpu-freq.h>
36 37
37#include <mach/regs-clock.h> 38#include <mach/regs-clock.h>
38#include <plat/regs-serial.h>
39#include <mach/regs-gpio.h> 39#include <mach/regs-gpio.h>
40 40
41#include <plat/clock.h> 41#include <plat/clock.h>
diff --git a/arch/arm/mach-s3c24xx/sleep-s3c2410.S b/arch/arm/mach-s3c24xx/sleep-s3c2410.S
index dd47c8fa07fa..c9b91223697c 100644
--- a/arch/arm/mach-s3c24xx/sleep-s3c2410.S
+++ b/arch/arm/mach-s3c24xx/sleep-s3c2410.S
@@ -25,13 +25,13 @@
25*/ 25*/
26 26
27#include <linux/linkage.h> 27#include <linux/linkage.h>
28#include <linux/serial_s3c.h>
28#include <asm/assembler.h> 29#include <asm/assembler.h>
29#include <mach/hardware.h> 30#include <mach/hardware.h>
30#include <mach/map.h> 31#include <mach/map.h>
31 32
32#include <mach/regs-gpio.h> 33#include <mach/regs-gpio.h>
33#include <mach/regs-clock.h> 34#include <mach/regs-clock.h>
34#include <plat/regs-serial.h>
35 35
36#include "regs-mem.h" 36#include "regs-mem.h"
37 37
diff --git a/arch/arm/mach-s3c24xx/sleep.S b/arch/arm/mach-s3c24xx/sleep.S
index 7f378b662da6..d833d616bd2e 100644
--- a/arch/arm/mach-s3c24xx/sleep.S
+++ b/arch/arm/mach-s3c24xx/sleep.S
@@ -25,13 +25,13 @@
25*/ 25*/
26 26
27#include <linux/linkage.h> 27#include <linux/linkage.h>
28#include <linux/serial_s3c.h>
28#include <asm/assembler.h> 29#include <asm/assembler.h>
29#include <mach/hardware.h> 30#include <mach/hardware.h>
30#include <mach/map.h> 31#include <mach/map.h>
31 32
32#include <mach/regs-gpio.h> 33#include <mach/regs-gpio.h>
33#include <mach/regs-clock.h> 34#include <mach/regs-clock.h>
34#include <plat/regs-serial.h>
35 35
36/* CONFIG_DEBUG_RESUME is dangerous if your bootloader does not 36/* CONFIG_DEBUG_RESUME is dangerous if your bootloader does not
37 * reset the UART configuration, only enable if you really need this! 37 * reset the UART configuration, only enable if you really need this!
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
index 76ab595d849b..5c45aae675b6 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c64xx/common.c
@@ -25,6 +25,7 @@
25#include <linux/interrupt.h> 25#include <linux/interrupt.h>
26#include <linux/ioport.h> 26#include <linux/ioport.h>
27#include <linux/serial_core.h> 27#include <linux/serial_core.h>
28#include <linux/serial_s3c.h>
28#include <linux/platform_device.h> 29#include <linux/platform_device.h>
29#include <linux/reboot.h> 30#include <linux/reboot.h>
30#include <linux/io.h> 31#include <linux/io.h>
@@ -50,7 +51,6 @@
50#include <plat/irq-uart.h> 51#include <plat/irq-uart.h>
51#include <plat/pwm-core.h> 52#include <plat/pwm-core.h>
52#include <plat/regs-irqtype.h> 53#include <plat/regs-irqtype.h>
53#include <plat/regs-serial.h>
54#include <plat/watchdog-reset.h> 54#include <plat/watchdog-reset.h>
55 55
56#include "common.h" 56#include "common.h"
diff --git a/arch/arm/mach-s3c64xx/include/mach/debug-macro.S b/arch/arm/mach-s3c64xx/include/mach/debug-macro.S
index dd9ccca5de1f..c9b95325b672 100644
--- a/arch/arm/mach-s3c64xx/include/mach/debug-macro.S
+++ b/arch/arm/mach-s3c64xx/include/mach/debug-macro.S
@@ -12,8 +12,8 @@
12 12
13/* pull in the relevant register and map files. */ 13/* pull in the relevant register and map files. */
14 14
15#include <linux/serial_s3c.h>
15#include <mach/map.h> 16#include <mach/map.h>
16#include <plat/regs-serial.h>
17 17
18 /* note, for the boot process to work we have to keep the UART 18 /* note, for the boot process to work we have to keep the UART
19 * virtual address aligned to an 1MiB boundary for the L1 19 * virtual address aligned to an 1MiB boundary for the L1
diff --git a/arch/arm/mach-s3c64xx/include/mach/tick.h b/arch/arm/mach-s3c64xx/include/mach/tick.h
deleted file mode 100644
index db9c1b1d56a4..000000000000
--- a/arch/arm/mach-s3c64xx/include/mach/tick.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/* linux/arch/arm/mach-s3c6400/include/mach/tick.h
2 *
3 * Copyright 2008 Openmoko, Inc.
4 * Copyright 2008 Simtec Electronics
5 * http://armlinux.simtec.co.uk/
6 * Ben Dooks <ben@simtec.co.uk>
7 *
8 * S3C64XX - Timer tick support definitions
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#ifndef __ASM_ARCH_TICK_H
16#define __ASM_ARCH_TICK_H __FILE__
17
18#include <linux/irqchip/arm-vic.h>
19
20/* note, the timer interrutps turn up in 2 places, the vic and then
21 * the timer block. We take the VIC as the base at the moment.
22 */
23static inline u32 s3c24xx_ostimer_pending(void)
24{
25 u32 pend = __raw_readl(VA_VIC0 + VIC_RAW_STATUS);
26 return pend & 1 << (IRQ_TIMER4_VIC - S3C64XX_IRQ_VIC0(0));
27}
28
29#define TICK_MAX (0xffffffff)
30
31#endif /* __ASM_ARCH_6400_TICK_H */
diff --git a/arch/arm/mach-s3c64xx/include/mach/timex.h b/arch/arm/mach-s3c64xx/include/mach/timex.h
deleted file mode 100644
index fb2e8cd40829..000000000000
--- a/arch/arm/mach-s3c64xx/include/mach/timex.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/* arch/arm/mach-s3c64xx/include/mach/timex.h
2 *
3 * Copyright (c) 2003-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C6400 - time parameters
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_TIMEX_H
14#define __ASM_ARCH_TIMEX_H
15
16/* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it
17 * a variable is useless. It seems as long as we make our timers an
18 * exact multiple of HZ, any value that makes a 1->1 correspondence
19 * for the time conversion functions to/from jiffies is acceptable.
20*/
21
22#define CLOCK_TICK_RATE 12000000
23
24#endif /* __ASM_ARCH_TIMEX_H */
diff --git a/arch/arm/mach-s3c64xx/irq-pm.c b/arch/arm/mach-s3c64xx/irq-pm.c
index ddf65583a5d8..ae4ea7601f60 100644
--- a/arch/arm/mach-s3c64xx/irq-pm.c
+++ b/arch/arm/mach-s3c64xx/irq-pm.c
@@ -20,13 +20,13 @@
20#include <linux/syscore_ops.h> 20#include <linux/syscore_ops.h>
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/serial_core.h> 22#include <linux/serial_core.h>
23#include <linux/serial_s3c.h>
23#include <linux/irq.h> 24#include <linux/irq.h>
24#include <linux/io.h> 25#include <linux/io.h>
25#include <linux/of.h> 26#include <linux/of.h>
26 27
27#include <mach/map.h> 28#include <mach/map.h>
28 29
29#include <plat/regs-serial.h>
30#include <mach/regs-gpio.h> 30#include <mach/regs-gpio.h>
31#include <plat/cpu.h> 31#include <plat/cpu.h>
32#include <plat/pm.h> 32#include <plat/pm.h>
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c
index ddeb0e51a962..55eb6a69655b 100644
--- a/arch/arm/mach-s3c64xx/mach-anw6410.c
+++ b/arch/arm/mach-s3c64xx/mach-anw6410.c
@@ -20,6 +20,7 @@
20#include <linux/timer.h> 20#include <linux/timer.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/serial_core.h> 22#include <linux/serial_core.h>
23#include <linux/serial_s3c.h>
23#include <linux/platform_device.h> 24#include <linux/platform_device.h>
24#include <linux/io.h> 25#include <linux/io.h>
25#include <linux/i2c.h> 26#include <linux/i2c.h>
@@ -41,7 +42,6 @@
41#include <asm/irq.h> 42#include <asm/irq.h>
42#include <asm/mach-types.h> 43#include <asm/mach-types.h>
43 44
44#include <plat/regs-serial.h>
45#include <linux/platform_data/i2c-s3c2410.h> 45#include <linux/platform_data/i2c-s3c2410.h>
46#include <plat/fb.h> 46#include <plat/fb.h>
47 47
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index 3df3c372ee1f..4b0199fff9f5 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -14,6 +14,7 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/list.h> 15#include <linux/list.h>
16#include <linux/serial_core.h> 16#include <linux/serial_core.h>
17#include <linux/serial_s3c.h>
17#include <linux/platform_device.h> 18#include <linux/platform_device.h>
18#include <linux/fb.h> 19#include <linux/fb.h>
19#include <linux/io.h> 20#include <linux/io.h>
@@ -51,7 +52,6 @@
51#include <mach/regs-gpio.h> 52#include <mach/regs-gpio.h>
52#include <mach/gpio-samsung.h> 53#include <mach/gpio-samsung.h>
53 54
54#include <plat/regs-serial.h>
55#include <plat/fb.h> 55#include <plat/fb.h>
56#include <plat/sdhci.h> 56#include <plat/sdhci.h>
57#include <plat/gpio-cfg.h> 57#include <plat/gpio-cfg.h>
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
index 0431016925b9..72cee08c8bf5 100644
--- a/arch/arm/mach-s3c64xx/mach-hmt.c
+++ b/arch/arm/mach-s3c64xx/mach-hmt.c
@@ -11,6 +11,7 @@
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/serial_core.h> 13#include <linux/serial_core.h>
14#include <linux/serial_s3c.h>
14#include <linux/platform_device.h> 15#include <linux/platform_device.h>
15#include <linux/io.h> 16#include <linux/io.h>
16#include <linux/i2c.h> 17#include <linux/i2c.h>
@@ -33,7 +34,6 @@
33#include <asm/irq.h> 34#include <asm/irq.h>
34#include <asm/mach-types.h> 35#include <asm/mach-types.h>
35 36
36#include <plat/regs-serial.h>
37#include <linux/platform_data/i2c-s3c2410.h> 37#include <linux/platform_data/i2c-s3c2410.h>
38#include <mach/gpio-samsung.h> 38#include <mach/gpio-samsung.h>
39#include <plat/fb.h> 39#include <plat/fb.h>
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
index 8d553a418e1c..9cbc07602ef3 100644
--- a/arch/arm/mach-s3c64xx/mach-mini6410.c
+++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
@@ -22,6 +22,7 @@
22#include <linux/mtd/mtd.h> 22#include <linux/mtd/mtd.h>
23#include <linux/mtd/partitions.h> 23#include <linux/mtd/partitions.h>
24#include <linux/serial_core.h> 24#include <linux/serial_core.h>
25#include <linux/serial_s3c.h>
25#include <linux/types.h> 26#include <linux/types.h>
26 27
27#include <asm/mach-types.h> 28#include <asm/mach-types.h>
@@ -38,7 +39,6 @@
38#include <plat/fb.h> 39#include <plat/fb.h>
39#include <linux/platform_data/mtd-nand-s3c2410.h> 40#include <linux/platform_data/mtd-nand-s3c2410.h>
40#include <linux/platform_data/mmc-sdhci-s3c.h> 41#include <linux/platform_data/mmc-sdhci-s3c.h>
41#include <plat/regs-serial.h>
42#include <plat/sdhci.h> 42#include <plat/sdhci.h>
43#include <linux/platform_data/touchscreen-s3c2410.h> 43#include <linux/platform_data/touchscreen-s3c2410.h>
44 44
diff --git a/arch/arm/mach-s3c64xx/mach-ncp.c b/arch/arm/mach-s3c64xx/mach-ncp.c
index 2067b0bf55b4..67f06a9ae656 100644
--- a/arch/arm/mach-s3c64xx/mach-ncp.c
+++ b/arch/arm/mach-s3c64xx/mach-ncp.c
@@ -16,6 +16,7 @@
16#include <linux/timer.h> 16#include <linux/timer.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/serial_core.h> 18#include <linux/serial_core.h>
19#include <linux/serial_s3c.h>
19#include <linux/platform_device.h> 20#include <linux/platform_device.h>
20#include <linux/io.h> 21#include <linux/io.h>
21#include <linux/i2c.h> 22#include <linux/i2c.h>
@@ -36,7 +37,6 @@
36#include <asm/irq.h> 37#include <asm/irq.h>
37#include <asm/mach-types.h> 38#include <asm/mach-types.h>
38 39
39#include <plat/regs-serial.h>
40#include <linux/platform_data/i2c-s3c2410.h> 40#include <linux/platform_data/i2c-s3c2410.h>
41#include <plat/fb.h> 41#include <plat/fb.h>
42 42
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
index 5152026f0e19..fbad2af1ef16 100644
--- a/arch/arm/mach-s3c64xx/mach-real6410.c
+++ b/arch/arm/mach-s3c64xx/mach-real6410.c
@@ -23,6 +23,7 @@
23#include <linux/mtd/partitions.h> 23#include <linux/mtd/partitions.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/serial_core.h> 25#include <linux/serial_core.h>
26#include <linux/serial_s3c.h>
26#include <linux/types.h> 27#include <linux/types.h>
27 28
28#include <asm/mach-types.h> 29#include <asm/mach-types.h>
@@ -38,7 +39,6 @@
38#include <plat/devs.h> 39#include <plat/devs.h>
39#include <plat/fb.h> 40#include <plat/fb.h>
40#include <linux/platform_data/mtd-nand-s3c2410.h> 41#include <linux/platform_data/mtd-nand-s3c2410.h>
41#include <plat/regs-serial.h>
42#include <linux/platform_data/touchscreen-s3c2410.h> 42#include <linux/platform_data/touchscreen-s3c2410.h>
43 43
44#include <video/platform_lcd.h> 44#include <video/platform_lcd.h>
diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c64xx/mach-smartq.c
index 6e72bd5c1d0c..78dd6f73c072 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq.c
@@ -16,6 +16,7 @@
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/pwm_backlight.h> 17#include <linux/pwm_backlight.h>
18#include <linux/serial_core.h> 18#include <linux/serial_core.h>
19#include <linux/serial_s3c.h>
19#include <linux/spi/spi_gpio.h> 20#include <linux/spi/spi_gpio.h>
20#include <linux/usb/gpio_vbus.h> 21#include <linux/usb/gpio_vbus.h>
21#include <linux/platform_data/s3c-hsotg.h> 22#include <linux/platform_data/s3c-hsotg.h>
@@ -33,7 +34,6 @@
33#include <linux/platform_data/i2c-s3c2410.h> 34#include <linux/platform_data/i2c-s3c2410.h>
34#include <plat/gpio-cfg.h> 35#include <plat/gpio-cfg.h>
35#include <linux/platform_data/hwmon-s3c.h> 36#include <linux/platform_data/hwmon-s3c.h>
36#include <plat/regs-serial.h>
37#include <linux/platform_data/usb-ohci-s3c2410.h> 37#include <linux/platform_data/usb-ohci-s3c2410.h>
38#include <plat/sdhci.h> 38#include <plat/sdhci.h>
39#include <linux/platform_data/touchscreen-s3c2410.h> 39#include <linux/platform_data/touchscreen-s3c2410.h>
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c64xx/mach-smdk6400.c
index 150f55fb9e33..c85d1cbe769f 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6400.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6400.c
@@ -16,6 +16,7 @@
16#include <linux/timer.h> 16#include <linux/timer.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/serial_core.h> 18#include <linux/serial_core.h>
19#include <linux/serial_s3c.h>
19#include <linux/platform_device.h> 20#include <linux/platform_device.h>
20#include <linux/i2c.h> 21#include <linux/i2c.h>
21#include <linux/io.h> 22#include <linux/io.h>
@@ -29,8 +30,6 @@
29#include <mach/hardware.h> 30#include <mach/hardware.h>
30#include <mach/map.h> 31#include <mach/map.h>
31 32
32#include <plat/regs-serial.h>
33
34#include <plat/clock.h> 33#include <plat/clock.h>
35#include <plat/devs.h> 34#include <plat/devs.h>
36#include <plat/cpu.h> 35#include <plat/cpu.h>
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index 43261d24a0a5..c6a8b2ab0240 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -19,6 +19,7 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/input.h> 20#include <linux/input.h>
21#include <linux/serial_core.h> 21#include <linux/serial_core.h>
22#include <linux/serial_s3c.h>
22#include <linux/platform_device.h> 23#include <linux/platform_device.h>
23#include <linux/io.h> 24#include <linux/io.h>
24#include <linux/i2c.h> 25#include <linux/i2c.h>
@@ -55,7 +56,6 @@
55#include <asm/irq.h> 56#include <asm/irq.h>
56#include <asm/mach-types.h> 57#include <asm/mach-types.h>
57 58
58#include <plat/regs-serial.h>
59#include <mach/regs-gpio.h> 59#include <mach/regs-gpio.h>
60#include <mach/gpio-samsung.h> 60#include <mach/gpio-samsung.h>
61#include <linux/platform_data/ata-samsung_cf.h> 61#include <linux/platform_data/ata-samsung_cf.h>
diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c64xx/s3c6400.c
index 3db0c98222f7..8c42807bf579 100644
--- a/arch/arm/mach-s3c64xx/s3c6400.c
+++ b/arch/arm/mach-s3c64xx/s3c6400.c
@@ -23,6 +23,7 @@
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/device.h> 24#include <linux/device.h>
25#include <linux/serial_core.h> 25#include <linux/serial_core.h>
26#include <linux/serial_s3c.h>
26#include <linux/platform_device.h> 27#include <linux/platform_device.h>
27#include <linux/of.h> 28#include <linux/of.h>
28 29
@@ -34,7 +35,6 @@
34#include <asm/irq.h> 35#include <asm/irq.h>
35 36
36#include <plat/cpu-freq.h> 37#include <plat/cpu-freq.h>
37#include <plat/regs-serial.h>
38#include <mach/regs-clock.h> 38#include <mach/regs-clock.h>
39 39
40#include <plat/cpu.h> 40#include <plat/cpu.h>
diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c
index 72b2278953a8..5be3f09bac92 100644
--- a/arch/arm/mach-s3c64xx/s3c6410.c
+++ b/arch/arm/mach-s3c64xx/s3c6410.c
@@ -24,6 +24,7 @@
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/device.h> 25#include <linux/device.h>
26#include <linux/serial_core.h> 26#include <linux/serial_core.h>
27#include <linux/serial_s3c.h>
27#include <linux/platform_device.h> 28#include <linux/platform_device.h>
28#include <linux/of.h> 29#include <linux/of.h>
29 30
@@ -35,7 +36,6 @@
35#include <asm/irq.h> 36#include <asm/irq.h>
36 37
37#include <plat/cpu-freq.h> 38#include <plat/cpu-freq.h>
38#include <plat/regs-serial.h>
39#include <mach/regs-clock.h> 39#include <mach/regs-clock.h>
40 40
41#include <plat/cpu.h> 41#include <plat/cpu.h>
diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c
index f07edc304efb..9a43be002d78 100644
--- a/arch/arm/mach-s5p64x0/common.c
+++ b/arch/arm/mach-s5p64x0/common.c
@@ -19,6 +19,7 @@
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/device.h> 20#include <linux/device.h>
21#include <linux/serial_core.h> 21#include <linux/serial_core.h>
22#include <linux/serial_s3c.h>
22#include <clocksource/samsung_pwm.h> 23#include <clocksource/samsung_pwm.h>
23#include <linux/platform_device.h> 24#include <linux/platform_device.h>
24#include <linux/sched.h> 25#include <linux/sched.h>
@@ -50,7 +51,6 @@
50#include <plat/gpio-cfg.h> 51#include <plat/gpio-cfg.h>
51#include <plat/pwm-core.h> 52#include <plat/pwm-core.h>
52#include <plat/regs-irqtype.h> 53#include <plat/regs-irqtype.h>
53#include <plat/regs-serial.h>
54#include <plat/watchdog-reset.h> 54#include <plat/watchdog-reset.h>
55 55
56#include "common.h" 56#include "common.h"
diff --git a/arch/arm/mach-s5p64x0/include/mach/debug-macro.S b/arch/arm/mach-s5p64x0/include/mach/debug-macro.S
index 5e2916fb19a9..8759e7882bcb 100644
--- a/arch/arm/mach-s5p64x0/include/mach/debug-macro.S
+++ b/arch/arm/mach-s5p64x0/include/mach/debug-macro.S
@@ -10,11 +10,10 @@
10 10
11/* pull in the relevant register and map files. */ 11/* pull in the relevant register and map files. */
12 12
13#include <linux/serial_s3c.h>
13#include <plat/map-base.h> 14#include <plat/map-base.h>
14#include <plat/map-s5p.h> 15#include <plat/map-s5p.h>
15 16
16#include <plat/regs-serial.h>
17
18 .macro addruart, rp, rv, tmp 17 .macro addruart, rp, rv, tmp
19 mov \rp, #0xE0000000 18 mov \rp, #0xE0000000
20 orr \rp, \rp, #0x00100000 19 orr \rp, \rp, #0x00100000
diff --git a/arch/arm/mach-s5p64x0/include/mach/timex.h b/arch/arm/mach-s5p64x0/include/mach/timex.h
deleted file mode 100644
index 4b91faa195a8..000000000000
--- a/arch/arm/mach-s5p64x0/include/mach/timex.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/* linux/arch/arm/mach-s5p64x0/include/mach/timex.h
2 *
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * Copyright (c) 2003-2005 Simtec Electronics
7 * Ben Dooks <ben@simtec.co.uk>
8 *
9 * S5P64X0 - time parameters
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14*/
15
16#ifndef __ASM_ARCH_TIMEX_H
17#define __ASM_ARCH_TIMEX_H
18
19/* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it
20 * a variable is useless. It seems as long as we make our timers an
21 * exact multiple of HZ, any value that makes a 1->1 correspondence
22 * for the time conversion functions to/from jiffies is acceptable.
23*/
24
25#define CLOCK_TICK_RATE 12000000
26
27#endif /* __ASM_ARCH_TIMEX_H */
diff --git a/arch/arm/mach-s5p64x0/irq-pm.c b/arch/arm/mach-s5p64x0/irq-pm.c
index d5f0fd66b635..2ed921e095dc 100644
--- a/arch/arm/mach-s5p64x0/irq-pm.c
+++ b/arch/arm/mach-s5p64x0/irq-pm.c
@@ -14,9 +14,9 @@
14 14
15#include <linux/syscore_ops.h> 15#include <linux/syscore_ops.h>
16#include <linux/serial_core.h> 16#include <linux/serial_core.h>
17#include <linux/serial_s3c.h>
17#include <linux/io.h> 18#include <linux/io.h>
18 19
19#include <plat/regs-serial.h>
20#include <plat/pm.h> 20#include <plat/pm.h>
21 21
22#include <mach/regs-gpio.h> 22#include <mach/regs-gpio.h>
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c
index 9efdcc03df3b..6840e197cb2d 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6440.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c
@@ -17,6 +17,7 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/i2c.h> 18#include <linux/i2c.h>
19#include <linux/serial_core.h> 19#include <linux/serial_core.h>
20#include <linux/serial_s3c.h>
20#include <linux/platform_device.h> 21#include <linux/platform_device.h>
21#include <linux/io.h> 22#include <linux/io.h>
22#include <linux/module.h> 23#include <linux/module.h>
@@ -39,7 +40,6 @@
39#include <mach/regs-clock.h> 40#include <mach/regs-clock.h>
40#include <mach/regs-gpio.h> 41#include <mach/regs-gpio.h>
41 42
42#include <plat/regs-serial.h>
43#include <plat/gpio-cfg.h> 43#include <plat/gpio-cfg.h>
44#include <plat/clock.h> 44#include <plat/clock.h>
45#include <plat/devs.h> 45#include <plat/devs.h>
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c
index c3cacc067efe..fa1341c074ca 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6450.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c
@@ -17,6 +17,7 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/i2c.h> 18#include <linux/i2c.h>
19#include <linux/serial_core.h> 19#include <linux/serial_core.h>
20#include <linux/serial_s3c.h>
20#include <linux/platform_device.h> 21#include <linux/platform_device.h>
21#include <linux/io.h> 22#include <linux/io.h>
22#include <linux/module.h> 23#include <linux/module.h>
@@ -39,7 +40,6 @@
39#include <mach/regs-clock.h> 40#include <mach/regs-clock.h>
40#include <mach/regs-gpio.h> 41#include <mach/regs-gpio.h>
41 42
42#include <plat/regs-serial.h>
43#include <plat/gpio-cfg.h> 43#include <plat/gpio-cfg.h>
44#include <plat/clock.h> 44#include <plat/clock.h>
45#include <plat/devs.h> 45#include <plat/devs.h>
diff --git a/arch/arm/mach-s5pc100/common.c b/arch/arm/mach-s5pc100/common.c
index c5a8eeacf81c..6a41bf7dacf6 100644
--- a/arch/arm/mach-s5pc100/common.c
+++ b/arch/arm/mach-s5pc100/common.c
@@ -22,6 +22,7 @@
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/device.h> 23#include <linux/device.h>
24#include <linux/serial_core.h> 24#include <linux/serial_core.h>
25#include <linux/serial_s3c.h>
25#include <clocksource/samsung_pwm.h> 26#include <clocksource/samsung_pwm.h>
26#include <linux/platform_device.h> 27#include <linux/platform_device.h>
27#include <linux/sched.h> 28#include <linux/sched.h>
@@ -49,7 +50,6 @@
49#include <plat/onenand-core.h> 50#include <plat/onenand-core.h>
50#include <plat/pwm-core.h> 51#include <plat/pwm-core.h>
51#include <plat/spi-core.h> 52#include <plat/spi-core.h>
52#include <plat/regs-serial.h>
53#include <plat/watchdog-reset.h> 53#include <plat/watchdog-reset.h>
54 54
55#include "common.h" 55#include "common.h"
diff --git a/arch/arm/mach-s5pc100/include/mach/debug-macro.S b/arch/arm/mach-s5pc100/include/mach/debug-macro.S
index 66cb7f16bf2a..22c23859e45e 100644
--- a/arch/arm/mach-s5pc100/include/mach/debug-macro.S
+++ b/arch/arm/mach-s5pc100/include/mach/debug-macro.S
@@ -13,8 +13,8 @@
13 13
14/* pull in the relevant register and map files. */ 14/* pull in the relevant register and map files. */
15 15
16#include <linux/serial_s3c.h>
16#include <mach/map.h> 17#include <mach/map.h>
17#include <plat/regs-serial.h>
18 18
19 /* note, for the boot process to work we have to keep the UART 19 /* note, for the boot process to work we have to keep the UART
20 * virtual address aligned to an 1MiB boundary for the L1 20 * virtual address aligned to an 1MiB boundary for the L1
diff --git a/arch/arm/mach-s5pc100/include/mach/tick.h b/arch/arm/mach-s5pc100/include/mach/tick.h
deleted file mode 100644
index 0af8e41230ed..000000000000
--- a/arch/arm/mach-s5pc100/include/mach/tick.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/* linux/arch/arm/mach-s5pc100/include/mach/tick.h
2 *
3 * Copyright 2009 Samsung Electronics Co.
4 * Byungho Min <bhmin@samsung.com>
5 *
6 * S3C64XX - Timer tick support definitions
7 *
8 * Based on mach-s3c6400/include/mach/tick.h
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#ifndef __ASM_ARCH_TICK_H
16#define __ASM_ARCH_TICK_H __FILE__
17
18#include <linux/irqchip/arm-vic.h>
19
20/* note, the timer interrutps turn up in 2 places, the vic and then
21 * the timer block. We take the VIC as the base at the moment.
22 */
23static inline u32 s3c24xx_ostimer_pending(void)
24{
25 u32 pend = __raw_readl(VA_VIC0 + VIC_RAW_STATUS);
26 return pend & (1 << (IRQ_TIMER4_VIC - S5P_IRQ_VIC0(0)));
27}
28
29#define TICK_MAX (0xffffffff)
30
31#endif /* __ASM_ARCH_TICK_H */
diff --git a/arch/arm/mach-s5pc100/include/mach/timex.h b/arch/arm/mach-s5pc100/include/mach/timex.h
deleted file mode 100644
index 47ffb17aff96..000000000000
--- a/arch/arm/mach-s5pc100/include/mach/timex.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/* arch/arm/mach-s5pc100/include/mach/timex.h
2 *
3 * Copyright (c) 2003-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C6400 - time parameters
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_TIMEX_H
14#define __ASM_ARCH_TIMEX_H
15
16/* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it
17 * a variable is useless. It seems as long as we make our timers an
18 * exact multiple of HZ, any value that makes a 1->1 correspondence
19 * for the time conversion functions to/from jiffies is acceptable.
20*/
21
22#define CLOCK_TICK_RATE 12000000
23
24#endif /* __ASM_ARCH_TIMEX_H */
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c
index 9e256b9fc930..668af3ac31f3 100644
--- a/arch/arm/mach-s5pc100/mach-smdkc100.c
+++ b/arch/arm/mach-s5pc100/mach-smdkc100.c
@@ -16,6 +16,7 @@
16#include <linux/timer.h> 16#include <linux/timer.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/serial_core.h> 18#include <linux/serial_core.h>
19#include <linux/serial_s3c.h>
19#include <linux/platform_device.h> 20#include <linux/platform_device.h>
20#include <linux/io.h> 21#include <linux/io.h>
21#include <linux/gpio.h> 22#include <linux/gpio.h>
@@ -37,7 +38,6 @@
37#include <asm/irq.h> 38#include <asm/irq.h>
38#include <asm/mach-types.h> 39#include <asm/mach-types.h>
39 40
40#include <plat/regs-serial.h>
41#include <plat/gpio-cfg.h> 41#include <plat/gpio-cfg.h>
42 42
43#include <plat/clock.h> 43#include <plat/clock.h>
diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c
index 26027a29b8a1..7024dcd0e40a 100644
--- a/arch/arm/mach-s5pv210/common.c
+++ b/arch/arm/mach-s5pv210/common.c
@@ -24,6 +24,7 @@
24#include <linux/sched.h> 24#include <linux/sched.h>
25#include <linux/dma-mapping.h> 25#include <linux/dma-mapping.h>
26#include <linux/serial_core.h> 26#include <linux/serial_core.h>
27#include <linux/serial_s3c.h>
27 28
28#include <asm/proc-fns.h> 29#include <asm/proc-fns.h>
29#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
@@ -46,7 +47,6 @@
46#include <plat/pwm-core.h> 47#include <plat/pwm-core.h>
47#include <plat/tv-core.h> 48#include <plat/tv-core.h>
48#include <plat/spi-core.h> 49#include <plat/spi-core.h>
49#include <plat/regs-serial.h>
50 50
51#include "common.h" 51#include "common.h"
52 52
diff --git a/arch/arm/mach-s5pv210/include/mach/debug-macro.S b/arch/arm/mach-s5pv210/include/mach/debug-macro.S
index 80c21996c943..30b511a580aa 100644
--- a/arch/arm/mach-s5pv210/include/mach/debug-macro.S
+++ b/arch/arm/mach-s5pv210/include/mach/debug-macro.S
@@ -12,8 +12,8 @@
12 12
13/* pull in the relevant register and map files. */ 13/* pull in the relevant register and map files. */
14 14
15#include <linux/serial_s3c.h>
15#include <mach/map.h> 16#include <mach/map.h>
16#include <plat/regs-serial.h>
17 17
18 /* note, for the boot process to work we have to keep the UART 18 /* note, for the boot process to work we have to keep the UART
19 * virtual address aligned to an 1MiB boundary for the L1 19 * virtual address aligned to an 1MiB boundary for the L1
diff --git a/arch/arm/mach-s5pv210/include/mach/timex.h b/arch/arm/mach-s5pv210/include/mach/timex.h
deleted file mode 100644
index 73dc85496a83..000000000000
--- a/arch/arm/mach-s5pv210/include/mach/timex.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/* linux/arch/arm/mach-s5pv210/include/mach/timex.h
2 *
3 * Copyright (c) 2003-2010 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
7 * http://www.samsung.com/
8 *
9 * Based on arch/arm/mach-s5p6442/include/mach/timex.h
10 *
11 * S5PV210 - time parameters
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
16*/
17
18#ifndef __ASM_ARCH_TIMEX_H
19#define __ASM_ARCH_TIMEX_H __FILE__
20
21/* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it
22 * a variable is useless. It seems as long as we make our timers an
23 * exact multiple of HZ, any value that makes a 1->1 correspondence
24 * for the time conversion functions to/from jiffies is acceptable.
25*/
26
27#define CLOCK_TICK_RATE 12000000
28
29#endif /* __ASM_ARCH_TIMEX_H */
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c
index ad40ab0f5dbd..cc37edacda26 100644
--- a/arch/arm/mach-s5pv210/mach-aquila.c
+++ b/arch/arm/mach-s5pv210/mach-aquila.c
@@ -12,6 +12,7 @@
12#include <linux/types.h> 12#include <linux/types.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/serial_core.h> 14#include <linux/serial_core.h>
15#include <linux/serial_s3c.h>
15#include <linux/fb.h> 16#include <linux/fb.h>
16#include <linux/i2c.h> 17#include <linux/i2c.h>
17#include <linux/i2c-gpio.h> 18#include <linux/i2c-gpio.h>
@@ -32,7 +33,6 @@
32#include <mach/regs-clock.h> 33#include <mach/regs-clock.h>
33 34
34#include <plat/gpio-cfg.h> 35#include <plat/gpio-cfg.h>
35#include <plat/regs-serial.h>
36#include <plat/devs.h> 36#include <plat/devs.h>
37#include <plat/cpu.h> 37#include <plat/cpu.h>
38#include <plat/fb.h> 38#include <plat/fb.h>
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index e5cd9fbf19e9..b41a38a75844 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -12,6 +12,7 @@
12#include <linux/types.h> 12#include <linux/types.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/serial_core.h> 14#include <linux/serial_core.h>
15#include <linux/serial_s3c.h>
15#include <linux/fb.h> 16#include <linux/fb.h>
16#include <linux/i2c.h> 17#include <linux/i2c.h>
17#include <linux/i2c-gpio.h> 18#include <linux/i2c-gpio.h>
@@ -39,7 +40,6 @@
39#include <mach/regs-clock.h> 40#include <mach/regs-clock.h>
40 41
41#include <plat/gpio-cfg.h> 42#include <plat/gpio-cfg.h>
42#include <plat/regs-serial.h>
43#include <plat/devs.h> 43#include <plat/devs.h>
44#include <plat/cpu.h> 44#include <plat/cpu.h>
45#include <plat/fb.h> 45#include <plat/fb.h>
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c
index 7c0ed07a78a3..448e1d2eeed6 100644
--- a/arch/arm/mach-s5pv210/mach-smdkc110.c
+++ b/arch/arm/mach-s5pv210/mach-smdkc110.c
@@ -12,6 +12,7 @@
12#include <linux/types.h> 12#include <linux/types.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/serial_core.h> 14#include <linux/serial_core.h>
15#include <linux/serial_s3c.h>
15#include <linux/i2c.h> 16#include <linux/i2c.h>
16#include <linux/device.h> 17#include <linux/device.h>
17 18
@@ -23,7 +24,6 @@
23#include <mach/map.h> 24#include <mach/map.h>
24#include <mach/regs-clock.h> 25#include <mach/regs-clock.h>
25 26
26#include <plat/regs-serial.h>
27#include <plat/devs.h> 27#include <plat/devs.h>
28#include <plat/cpu.h> 28#include <plat/cpu.h>
29#include <linux/platform_data/ata-samsung_cf.h> 29#include <linux/platform_data/ata-samsung_cf.h>
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
index f52cc15c2d85..2a6655fb63e7 100644
--- a/arch/arm/mach-s5pv210/mach-smdkv210.c
+++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
@@ -13,6 +13,7 @@
13#include <linux/i2c.h> 13#include <linux/i2c.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/serial_core.h> 15#include <linux/serial_core.h>
16#include <linux/serial_s3c.h>
16#include <linux/device.h> 17#include <linux/device.h>
17#include <linux/dm9000.h> 18#include <linux/dm9000.h>
18#include <linux/fb.h> 19#include <linux/fb.h>
@@ -32,7 +33,6 @@
32#include <mach/map.h> 33#include <mach/map.h>
33#include <mach/regs-clock.h> 34#include <mach/regs-clock.h>
34 35
35#include <plat/regs-serial.h>
36#include <plat/regs-srom.h> 36#include <plat/regs-srom.h>
37#include <plat/gpio-cfg.h> 37#include <plat/gpio-cfg.h>
38#include <plat/devs.h> 38#include <plat/devs.h>
diff --git a/arch/arm/mach-s5pv210/mach-torbreck.c b/arch/arm/mach-s5pv210/mach-torbreck.c
index 579afe89842a..157805529f26 100644
--- a/arch/arm/mach-s5pv210/mach-torbreck.c
+++ b/arch/arm/mach-s5pv210/mach-torbreck.c
@@ -13,6 +13,7 @@
13#include <linux/i2c.h> 13#include <linux/i2c.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/serial_core.h> 15#include <linux/serial_core.h>
16#include <linux/serial_s3c.h>
16 17
17#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
18#include <asm/mach/map.h> 19#include <asm/mach/map.h>
@@ -22,7 +23,6 @@
22#include <mach/map.h> 23#include <mach/map.h>
23#include <mach/regs-clock.h> 24#include <mach/regs-clock.h>
24 25
25#include <plat/regs-serial.h>
26#include <plat/devs.h> 26#include <plat/devs.h>
27#include <plat/cpu.h> 27#include <plat/cpu.h>
28#include <linux/platform_data/i2c-s3c2410.h> 28#include <linux/platform_data/i2c-s3c2410.h>
diff --git a/arch/arm/mach-sa1100/include/mach/timex.h b/arch/arm/mach-sa1100/include/mach/timex.h
deleted file mode 100644
index 7a5d017b58b3..000000000000
--- a/arch/arm/mach-sa1100/include/mach/timex.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/timex.h
3 *
4 * SA1100 architecture timex specifications
5 *
6 * Copyright (C) 1998
7 */
8
9/*
10 * SA1100 timer
11 */
12#define CLOCK_TICK_RATE 3686400
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
index 4852c08cb526..1dea6cfafb31 100644
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -9,6 +9,7 @@
9 * 9 *
10 */ 10 */
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/kernel.h>
12#include <linux/errno.h> 13#include <linux/errno.h>
13#include <linux/interrupt.h> 14#include <linux/interrupt.h>
14#include <linux/irq.h> 15#include <linux/irq.h>
@@ -20,6 +21,9 @@
20#include <mach/hardware.h> 21#include <mach/hardware.h>
21#include <mach/irqs.h> 22#include <mach/irqs.h>
22 23
24#define SA1100_CLOCK_FREQ 3686400
25#define SA1100_LATCH DIV_ROUND_CLOSEST(SA1100_CLOCK_FREQ, HZ)
26
23static u64 notrace sa1100_read_sched_clock(void) 27static u64 notrace sa1100_read_sched_clock(void)
24{ 28{
25 return readl_relaxed(OSCR); 29 return readl_relaxed(OSCR);
@@ -93,7 +97,7 @@ static void sa1100_timer_resume(struct clock_event_device *cedev)
93 /* 97 /*
94 * OSMR0 is the system timer: make sure OSCR is sufficiently behind 98 * OSMR0 is the system timer: make sure OSCR is sufficiently behind
95 */ 99 */
96 writel_relaxed(OSMR0 - LATCH, OSCR); 100 writel_relaxed(OSMR0 - SA1100_LATCH, OSCR);
97} 101}
98#else 102#else
99#define sa1100_timer_suspend NULL 103#define sa1100_timer_suspend NULL
@@ -128,7 +132,7 @@ void __init sa1100_timer_init(void)
128 132
129 setup_irq(IRQ_OST0, &sa1100_timer_irq); 133 setup_irq(IRQ_OST0, &sa1100_timer_irq);
130 134
131 clocksource_mmio_init(OSCR, "oscr", CLOCK_TICK_RATE, 200, 32, 135 clocksource_mmio_init(OSCR, "oscr", SA1100_CLOCK_FREQ, 200, 32,
132 clocksource_mmio_readl_up); 136 clocksource_mmio_readl_up);
133 clockevents_config_and_register(&ckevt_sa1100_osmr0, 3686400, 137 clockevents_config_and_register(&ckevt_sa1100_osmr0, 3686400,
134 MIN_OSCR_DELTA * 2, 0x7fffffff); 138 MIN_OSCR_DELTA * 2, 0x7fffffff);
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 3b8c87461d67..efd53848947d 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -5,18 +5,13 @@ config ARCH_SHMOBILE_MULTI
5 bool "Renesas ARM SoCs" if ARCH_MULTI_V7 5 bool "Renesas ARM SoCs" if ARCH_MULTI_V7
6 depends on MMU 6 depends on MMU
7 select ARCH_SHMOBILE 7 select ARCH_SHMOBILE
8 select CPU_V7
9 select GENERIC_CLOCKEVENTS
10 select HAVE_ARM_SCU if SMP 8 select HAVE_ARM_SCU if SMP
11 select HAVE_ARM_TWD if SMP 9 select HAVE_ARM_TWD if SMP
12 select HAVE_SMP
13 select ARM_GIC 10 select ARM_GIC
14 select MIGHT_HAVE_CACHE_L2X0
15 select MIGHT_HAVE_PCI 11 select MIGHT_HAVE_PCI
16 select NO_IOPORT 12 select NO_IOPORT
17 select PINCTRL 13 select PINCTRL
18 select ARCH_REQUIRE_GPIOLIB 14 select ARCH_REQUIRE_GPIOLIB
19 select CLKDEV_LOOKUP
20 15
21if ARCH_SHMOBILE_MULTI 16if ARCH_SHMOBILE_MULTI
22 17
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
index f1fb89b76786..cabedebd7648 100644
--- a/arch/arm/mach-shmobile/clock-r8a7779.c
+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
@@ -47,17 +47,10 @@
47 47
48#define MD(nr) BIT(nr) 48#define MD(nr) BIT(nr)
49 49
50#define FRQMR IOMEM(0xffc80014)
51#define MSTPCR0 IOMEM(0xffc80030) 50#define MSTPCR0 IOMEM(0xffc80030)
52#define MSTPCR1 IOMEM(0xffc80034) 51#define MSTPCR1 IOMEM(0xffc80034)
53#define MSTPCR3 IOMEM(0xffc8003c) 52#define MSTPCR3 IOMEM(0xffc8003c)
54#define MSTPSR1 IOMEM(0xffc80044) 53#define MSTPSR1 IOMEM(0xffc80044)
55#define MSTPSR4 IOMEM(0xffc80048)
56#define MSTPSR6 IOMEM(0xffc8004c)
57#define MSTPCR4 IOMEM(0xffc80050)
58#define MSTPCR5 IOMEM(0xffc80054)
59#define MSTPCR6 IOMEM(0xffc80058)
60#define MSTPCR7 IOMEM(0xffc80040)
61 54
62#define MODEMR 0xffcc0020 55#define MODEMR 0xffcc0020
63 56
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index e31980590eb4..cb8e32deb2a3 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -25,7 +25,6 @@ extern int shmobile_smp_apmu_boot_secondary(unsigned int cpu,
25 struct task_struct *idle); 25 struct task_struct *idle);
26extern void shmobile_smp_apmu_cpu_die(unsigned int cpu); 26extern void shmobile_smp_apmu_cpu_die(unsigned int cpu);
27extern int shmobile_smp_apmu_cpu_kill(unsigned int cpu); 27extern int shmobile_smp_apmu_cpu_kill(unsigned int cpu);
28extern void shmobile_invalidate_start(void);
29struct clk; 28struct clk;
30extern int shmobile_clk_init(void); 29extern int shmobile_clk_init(void);
31extern void shmobile_handle_irq_intc(struct pt_regs *); 30extern void shmobile_handle_irq_intc(struct pt_regs *);
diff --git a/arch/arm/mach-shmobile/include/mach/timex.h b/arch/arm/mach-shmobile/include/mach/timex.h
deleted file mode 100644
index ae0d8d825c23..000000000000
--- a/arch/arm/mach-shmobile/include/mach/timex.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_MACH_TIMEX_H
2#define __ASM_MACH_TIMEX_H
3
4#define CLOCK_TICK_RATE 1193180 /* unused i8253 PIT value */
5
6#endif /* __ASM_MACH_TIMEX_H */
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
index c8f2a1a69a52..c71d667007b8 100644
--- a/arch/arm/mach-shmobile/setup-emev2.c
+++ b/arch/arm/mach-shmobile/setup-emev2.c
@@ -58,7 +58,7 @@ static void __init emev2_add_standard_devices_dt(void)
58 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 58 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
59} 59}
60 60
61static const char *emev2_boards_compat_dt[] __initdata = { 61static const char *emev2_boards_compat_dt[] __initconst = {
62 "renesas,emev2", 62 "renesas,emev2",
63 NULL, 63 NULL,
64}; 64};
diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
index aee77f06f887..b5f8d75d51a0 100644
--- a/arch/arm/mach-socfpga/Kconfig
+++ b/arch/arm/mach-socfpga/Kconfig
@@ -1,17 +1,10 @@
1config ARCH_SOCFPGA 1config ARCH_SOCFPGA
2 bool "Altera SOCFPGA family" if ARCH_MULTI_V7 2 bool "Altera SOCFPGA family" if ARCH_MULTI_V7
3 select ARCH_WANT_OPTIONAL_GPIOLIB
4 select ARM_AMBA 3 select ARM_AMBA
5 select ARM_GIC 4 select ARM_GIC
6 select CACHE_L2X0 5 select CACHE_L2X0
7 select COMMON_CLK
8 select CPU_V7
9 select DW_APB_TIMER_OF 6 select DW_APB_TIMER_OF
10 select GENERIC_CLOCKEVENTS
11 select GPIO_PL061 if GPIOLIB 7 select GPIO_PL061 if GPIOLIB
12 select HAVE_ARM_SCU 8 select HAVE_ARM_SCU
13 select HAVE_ARM_TWD if SMP 9 select HAVE_ARM_TWD if SMP
14 select HAVE_SMP
15 select MFD_SYSCON 10 select MFD_SYSCON
16 select SPARSE_IRQ
17 select USE_OF
diff --git a/arch/arm/mach-spear/Kconfig b/arch/arm/mach-spear/Kconfig
index 308d5b5b3055..0786249b2832 100644
--- a/arch/arm/mach-spear/Kconfig
+++ b/arch/arm/mach-spear/Kconfig
@@ -8,8 +8,6 @@ menuconfig PLAT_SPEAR
8 select ARCH_REQUIRE_GPIOLIB 8 select ARCH_REQUIRE_GPIOLIB
9 select ARM_AMBA 9 select ARM_AMBA
10 select CLKSRC_MMIO 10 select CLKSRC_MMIO
11 select COMMON_CLK
12 select GENERIC_CLOCKEVENTS
13 11
14if PLAT_SPEAR 12if PLAT_SPEAR
15 13
@@ -18,14 +16,10 @@ config ARCH_SPEAR13XX
18 depends on ARCH_MULTI_V7 || PLAT_SPEAR_SINGLE 16 depends on ARCH_MULTI_V7 || PLAT_SPEAR_SINGLE
19 select ARCH_HAS_CPUFREQ 17 select ARCH_HAS_CPUFREQ
20 select ARM_GIC 18 select ARM_GIC
21 select CPU_V7
22 select GPIO_SPEAR_SPICS 19 select GPIO_SPEAR_SPICS
23 select HAVE_ARM_SCU if SMP 20 select HAVE_ARM_SCU if SMP
24 select HAVE_ARM_TWD if SMP 21 select HAVE_ARM_TWD if SMP
25 select HAVE_SMP
26 select MIGHT_HAVE_CACHE_L2X0
27 select PINCTRL 22 select PINCTRL
28 select USE_OF
29 help 23 help
30 Supports for ARM's SPEAR13XX family 24 Supports for ARM's SPEAR13XX family
31 25
@@ -50,9 +44,7 @@ config ARCH_SPEAR3XX
50 depends on ARCH_MULTI_V5 || PLAT_SPEAR_SINGLE 44 depends on ARCH_MULTI_V5 || PLAT_SPEAR_SINGLE
51 depends on !ARCH_SPEAR13XX 45 depends on !ARCH_SPEAR13XX
52 select ARM_VIC 46 select ARM_VIC
53 select CPU_ARM926T
54 select PINCTRL 47 select PINCTRL
55 select USE_OF
56 help 48 help
57 Supports for ARM's SPEAR3XX family 49 Supports for ARM's SPEAR3XX family
58 50
@@ -83,14 +75,12 @@ config ARCH_SPEAR6XX
83 depends on ARCH_MULTI_V5 || PLAT_SPEAR_SINGLE 75 depends on ARCH_MULTI_V5 || PLAT_SPEAR_SINGLE
84 depends on !ARCH_SPEAR13XX 76 depends on !ARCH_SPEAR13XX
85 select ARM_VIC 77 select ARM_VIC
86 select CPU_ARM926T
87 help 78 help
88 Supports for ARM's SPEAR6XX family 79 Supports for ARM's SPEAR6XX family
89 80
90config MACH_SPEAR600 81config MACH_SPEAR600
91 def_bool y 82 def_bool y
92 depends on ARCH_SPEAR6XX 83 depends on ARCH_SPEAR6XX
93 select USE_OF
94 help 84 help
95 Supports ST SPEAr600 boards configured via the device-tree 85 Supports ST SPEAr600 boards configured via the device-tree
96 86
diff --git a/arch/arm/mach-spear/include/mach/timex.h b/arch/arm/mach-spear/include/mach/timex.h
deleted file mode 100644
index ef95e5b780bd..000000000000
--- a/arch/arm/mach-spear/include/mach/timex.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/plat-spear/include/plat/timex.h
3 *
4 * SPEAr platform specific timex definitions
5 *
6 * Copyright (C) 2009 ST Microelectronics
7 * Viresh Kumar <viresh.linux@gmail.com>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef __PLAT_TIMEX_H
15#define __PLAT_TIMEX_H
16
17#define CLOCK_TICK_RATE 48000000
18
19#endif /* __PLAT_TIMEX_H */
diff --git a/arch/arm/mach-sti/Kconfig b/arch/arm/mach-sti/Kconfig
index d71654bc8d54..d2c13ba1190b 100644
--- a/arch/arm/mach-sti/Kconfig
+++ b/arch/arm/mach-sti/Kconfig
@@ -1,14 +1,10 @@
1menuconfig ARCH_STI 1menuconfig ARCH_STI
2 bool "STMicroelectronics Consumer Electronics SOCs with Device Trees" if ARCH_MULTI_V7 2 bool "STMicroelectronics Consumer Electronics SOCs with Device Trees" if ARCH_MULTI_V7
3 select GENERIC_CLOCKEVENTS
4 select CLKDEV_LOOKUP
5 select ARM_GIC 3 select ARM_GIC
6 select ARM_GLOBAL_TIMER 4 select ARM_GLOBAL_TIMER
7 select PINCTRL 5 select PINCTRL
8 select PINCTRL_ST 6 select PINCTRL_ST
9 select MFD_SYSCON 7 select MFD_SYSCON
10 select MIGHT_HAVE_CACHE_L2X0
11 select HAVE_SMP
12 select HAVE_ARM_SCU if SMP 8 select HAVE_ARM_SCU if SMP
13 select ARCH_REQUIRE_GPIOLIB 9 select ARCH_REQUIRE_GPIOLIB
14 select ARM_ERRATA_754322 10 select ARM_ERRATA_754322
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index b9d6cad8669b..9de27cfa688f 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -5,14 +5,9 @@ config ARCH_SUNXI
5 select ARM_GIC 5 select ARM_GIC
6 select ARM_PSCI 6 select ARM_PSCI
7 select CLKSRC_MMIO 7 select CLKSRC_MMIO
8 select CLKSRC_OF
9 select COMMON_CLK
10 select GENERIC_CLOCKEVENTS
11 select GENERIC_IRQ_CHIP 8 select GENERIC_IRQ_CHIP
12 select HAVE_SMP
13 select PINCTRL 9 select PINCTRL
14 select PINCTRL_SUNXI 10 select PINCTRL_SUNXI
15 select RESET_CONTROLLER 11 select RESET_CONTROLLER
16 select SPARSE_IRQ
17 select SUN4I_TIMER 12 select SUN4I_TIMER
18 select SUN5I_HSTIMER 13 select SUN5I_HSTIMER
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 4926bd11f190..92d660f9610f 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -5,23 +5,15 @@ config ARCH_TEGRA
5 select ARCH_SUPPORTS_TRUSTED_FOUNDATIONS 5 select ARCH_SUPPORTS_TRUSTED_FOUNDATIONS
6 select ARM_GIC 6 select ARM_GIC
7 select CLKSRC_MMIO 7 select CLKSRC_MMIO
8 select CLKSRC_OF
9 select COMMON_CLK
10 select CPU_V7
11 select GENERIC_CLOCKEVENTS
12 select HAVE_ARM_SCU if SMP 8 select HAVE_ARM_SCU if SMP
13 select HAVE_ARM_TWD if SMP 9 select HAVE_ARM_TWD if SMP
14 select HAVE_SMP
15 select MIGHT_HAVE_CACHE_L2X0
16 select MIGHT_HAVE_PCI 10 select MIGHT_HAVE_PCI
17 select PINCTRL 11 select PINCTRL
18 select ARCH_HAS_RESET_CONTROLLER 12 select ARCH_HAS_RESET_CONTROLLER
19 select RESET_CONTROLLER 13 select RESET_CONTROLLER
20 select SOC_BUS 14 select SOC_BUS
21 select SPARSE_IRQ
22 select USB_ULPI if USB_PHY 15 select USB_ULPI if USB_PHY
23 select USB_ULPI_VIEWPORT if USB_PHY 16 select USB_ULPI_VIEWPORT if USB_PHY
24 select USE_OF
25 help 17 help
26 This enables support for NVIDIA Tegra based systems. 18 This enables support for NVIDIA Tegra based systems.
27 19
diff --git a/arch/arm/mach-u300/Kconfig b/arch/arm/mach-u300/Kconfig
index 8e23071bd1b3..e3a96d7302e9 100644
--- a/arch/arm/mach-u300/Kconfig
+++ b/arch/arm/mach-u300/Kconfig
@@ -3,20 +3,14 @@ config ARCH_U300
3 depends on MMU 3 depends on MMU
4 select ARCH_REQUIRE_GPIOLIB 4 select ARCH_REQUIRE_GPIOLIB
5 select ARM_AMBA 5 select ARM_AMBA
6 select ARM_PATCH_PHYS_VIRT
7 select ARM_VIC 6 select ARM_VIC
8 select CLKSRC_MMIO 7 select CLKSRC_MMIO
9 select CLKSRC_OF
10 select COMMON_CLK
11 select CPU_ARM926T 8 select CPU_ARM926T
12 select GENERIC_CLOCKEVENTS
13 select HAVE_TCM 9 select HAVE_TCM
14 select PINCTRL 10 select PINCTRL
15 select PINCTRL_COH901 11 select PINCTRL_COH901
16 select PINCTRL_U300 12 select PINCTRL_U300
17 select SPARSE_IRQ
18 select MFD_SYSCON 13 select MFD_SYSCON
19 select USE_OF
20 help 14 help
21 Support for ST-Ericsson U300 series mobile platforms. 15 Support for ST-Ericsson U300 series mobile platforms.
22 16
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
index 0034d2cd6973..8052bd52450d 100644
--- a/arch/arm/mach-ux500/Kconfig
+++ b/arch/arm/mach-ux500/Kconfig
@@ -11,13 +11,8 @@ config ARCH_U8500
11 select ARM_GIC 11 select ARM_GIC
12 select CACHE_L2X0 12 select CACHE_L2X0
13 select CLKSRC_NOMADIK_MTU 13 select CLKSRC_NOMADIK_MTU
14 select COMMON_CLK
15 select CPU_V7
16 select GENERIC_CLOCKEVENTS
17 select HAVE_ARM_SCU if SMP 14 select HAVE_ARM_SCU if SMP
18 select HAVE_ARM_TWD if SMP 15 select HAVE_ARM_TWD if SMP
19 select HAVE_SMP
20 select MIGHT_HAVE_CACHE_L2X0
21 select PINCTRL 16 select PINCTRL
22 select PINCTRL_ABX500 17 select PINCTRL_ABX500
23 select PINCTRL_NOMADIK 18 select PINCTRL_NOMADIK
@@ -76,7 +71,6 @@ config UX500_AUTO_PLATFORM
76config MACH_UX500_DT 71config MACH_UX500_DT
77 bool "Generic U8500 support using device tree" 72 bool "Generic U8500 support using device tree"
78 depends on MACH_MOP500 73 depends on MACH_MOP500
79 select USE_OF
80 74
81endmenu 75endmenu
82 76
diff --git a/arch/arm/mach-versatile/include/mach/timex.h b/arch/arm/mach-versatile/include/mach/timex.h
deleted file mode 100644
index 426199b1add5..000000000000
--- a/arch/arm/mach-versatile/include/mach/timex.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * arch/arm/mach-versatile/include/mach/timex.h
3 *
4 * Versatile architecture timex specifications
5 *
6 * Copyright (C) 2003 ARM Limited
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#define CLOCK_TICK_RATE (50000000 / 16)
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index 4a70be485ff8..80b4be36f10a 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -5,16 +5,11 @@ config ARCH_VEXPRESS
5 select ARM_AMBA 5 select ARM_AMBA
6 select ARM_GIC 6 select ARM_GIC
7 select ARM_TIMER_SP804 7 select ARM_TIMER_SP804
8 select COMMON_CLK
9 select COMMON_CLK_VERSATILE 8 select COMMON_CLK_VERSATILE
10 select CPU_V7
11 select GENERIC_CLOCKEVENTS
12 select HAVE_ARM_SCU if SMP 9 select HAVE_ARM_SCU if SMP
13 select HAVE_ARM_TWD if SMP 10 select HAVE_ARM_TWD if SMP
14 select HAVE_PATA_PLATFORM 11 select HAVE_PATA_PLATFORM
15 select HAVE_SMP
16 select ICST 12 select ICST
17 select MIGHT_HAVE_CACHE_L2X0
18 select NO_IOPORT 13 select NO_IOPORT
19 select PLAT_VERSATILE 14 select PLAT_VERSATILE
20 select PLAT_VERSATILE_CLCD 15 select PLAT_VERSATILE_CLCD
diff --git a/arch/arm/mach-virt/Kconfig b/arch/arm/mach-virt/Kconfig
deleted file mode 100644
index 081d46929436..000000000000
--- a/arch/arm/mach-virt/Kconfig
+++ /dev/null
@@ -1,10 +0,0 @@
1config ARCH_VIRT
2 bool "Dummy Virtual Machine" if ARCH_MULTI_V7
3 select ARCH_WANT_OPTIONAL_GPIOLIB
4 select ARM_GIC
5 select HAVE_ARM_ARCH_TIMER
6 select ARM_PSCI
7 select HAVE_SMP
8 select CPU_V7
9 select SPARSE_IRQ
10 select USE_OF
diff --git a/arch/arm/mach-virt/Makefile b/arch/arm/mach-virt/Makefile
deleted file mode 100644
index 7ddbfa60227f..000000000000
--- a/arch/arm/mach-virt/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
1#
2# Makefile for the linux kernel.
3#
4
5obj-y := virt.o
diff --git a/arch/arm/mach-virt/virt.c b/arch/arm/mach-virt/virt.c
deleted file mode 100644
index b184e57d1854..000000000000
--- a/arch/arm/mach-virt/virt.c
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * Dummy Virtual Machine - does what it says on the tin.
3 *
4 * Copyright (C) 2012 ARM Ltd
5 * Authors: Will Deacon <will.deacon@arm.com>,
6 * Marc Zyngier <marc.zyngier@arm.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * 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, see <http://www.gnu.org/licenses/>.
19 */
20
21#include <linux/of_irq.h>
22#include <linux/of_platform.h>
23#include <linux/smp.h>
24
25#include <asm/mach/arch.h>
26
27static void __init virt_init(void)
28{
29 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
30}
31
32static const char *virt_dt_match[] = {
33 "linux,dummy-virt",
34 "xen,xenvm",
35 NULL
36};
37
38DT_MACHINE_START(VIRT, "Dummy Virtual Machine")
39 .init_machine = virt_init,
40 .dt_compat = virt_dt_match,
41MACHINE_END
diff --git a/arch/arm/mach-vt8500/Kconfig b/arch/arm/mach-vt8500/Kconfig
index 927be93b692e..08f56a41cb55 100644
--- a/arch/arm/mach-vt8500/Kconfig
+++ b/arch/arm/mach-vt8500/Kconfig
@@ -3,8 +3,6 @@ config ARCH_VT8500
3 select ARCH_HAS_CPUFREQ 3 select ARCH_HAS_CPUFREQ
4 select ARCH_REQUIRE_GPIOLIB 4 select ARCH_REQUIRE_GPIOLIB
5 select CLKDEV_LOOKUP 5 select CLKDEV_LOOKUP
6 select CLKSRC_OF
7 select GENERIC_CLOCKEVENTS
8 select VT8500_TIMER 6 select VT8500_TIMER
9 select PINCTRL 7 select PINCTRL
10 help 8 help
@@ -21,7 +19,6 @@ config ARCH_WM8750
21 bool "WonderMedia WM8750" 19 bool "WonderMedia WM8750"
22 depends on ARCH_MULTI_V6 20 depends on ARCH_MULTI_V6
23 select ARCH_VT8500 21 select ARCH_VT8500
24 select CPU_V6
25 help 22 help
26 Support for WonderMedia WM8750 System-on-Chip. 23 Support for WonderMedia WM8750 System-on-Chip.
27 24
@@ -29,6 +26,5 @@ config ARCH_WM8850
29 bool "WonderMedia WM8850" 26 bool "WonderMedia WM8850"
30 depends on ARCH_MULTI_V7 27 depends on ARCH_MULTI_V7
31 select ARCH_VT8500 28 select ARCH_VT8500
32 select CPU_V7
33 help 29 help
34 Support for WonderMedia WM8850 System-on-Chip. 30 Support for WonderMedia WM8850 System-on-Chip.
diff --git a/arch/arm/mach-w90x900/include/mach/timex.h b/arch/arm/mach-w90x900/include/mach/timex.h
deleted file mode 100644
index 164dce0b64db..000000000000
--- a/arch/arm/mach-w90x900/include/mach/timex.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * arch/arm/mach-w90x900/include/mach/timex.h
3 *
4 * Copyright (c) 2008 Nuvoton technology corporation
5 * All rights reserved.
6 *
7 * Wan ZongShun <mcuos.com@gmail.com>
8 *
9 * Based on arch/arm/mach-s3c2410/include/mach/timex.h
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 */
17
18#ifndef __ASM_ARCH_TIMEX_H
19#define __ASM_ARCH_TIMEX_H
20
21/* CLOCK_TICK_RATE Now, I don't use it. */
22
23#define CLOCK_TICK_RATE 15000000
24
25#endif /* __ASM_ARCH_TIMEX_H */
diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
index f03e75bd0b2b..0e001a489a79 100644
--- a/arch/arm/mach-zynq/Kconfig
+++ b/arch/arm/mach-zynq/Kconfig
@@ -4,16 +4,9 @@ config ARCH_ZYNQ
4 select ARM_GIC 4 select ARM_GIC
5 select ARCH_HAS_CPUFREQ 5 select ARCH_HAS_CPUFREQ
6 select ARCH_HAS_OPP 6 select ARCH_HAS_OPP
7 select COMMON_CLK
8 select CPU_V7
9 select GENERIC_CLOCKEVENTS
10 select HAVE_ARM_SCU if SMP 7 select HAVE_ARM_SCU if SMP
11 select HAVE_ARM_TWD if SMP 8 select HAVE_ARM_TWD if SMP
12 select ICST 9 select ICST
13 select MIGHT_HAVE_CACHE_L2X0
14 select USE_OF
15 select HAVE_SMP
16 select SPARSE_IRQ
17 select CADENCE_TTC_TIMER 10 select CADENCE_TTC_TIMER
18 select ARM_GLOBAL_TIMER if !CPU_FREQ 11 select ARM_GLOBAL_TIMER if !CPU_FREQ
19 help 12 help
diff --git a/arch/arm/plat-omap/include/plat/timex.h b/arch/arm/plat-omap/include/plat/timex.h
deleted file mode 100644
index e27d2daa7790..000000000000
--- a/arch/arm/plat-omap/include/plat/timex.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * arch/arm/plat-omap/include/mach/timex.h
3 *
4 * Copyright (C) 2000 RidgeRun, Inc.
5 * Author: Greg Lonnon <glonnon@ridgerun.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
15 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28#if !defined(__ASM_ARCH_OMAP_TIMEX_H)
29#define __ASM_ARCH_OMAP_TIMEX_H
30
31#define CLOCK_TICK_RATE (HZ * 100000UL)
32
33#endif /* __ASM_ARCH_OMAP_TIMEX_H */
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c
index 47c9fad43f00..ddfebddb4105 100644
--- a/arch/arm/plat-samsung/clock.c
+++ b/arch/arm/plat-samsung/clock.c
@@ -52,7 +52,7 @@
52#include <plat/cpu.h> 52#include <plat/cpu.h>
53 53
54#include <linux/serial_core.h> 54#include <linux/serial_core.h>
55#include <plat/regs-serial.h> /* for s3c24xx_uart_devs */ 55#include <linux/serial_s3c.h> /* for s3c24xx_uart_devs */
56 56
57/* clock information */ 57/* clock information */
58 58
diff --git a/arch/arm/plat-samsung/cpu.c b/arch/arm/plat-samsung/cpu.c
index 46b426e8aff5..364963a0a344 100644
--- a/arch/arm/plat-samsung/cpu.c
+++ b/arch/arm/plat-samsung/cpu.c
@@ -28,13 +28,6 @@ unsigned int samsung_rev(void)
28} 28}
29EXPORT_SYMBOL(samsung_rev); 29EXPORT_SYMBOL(samsung_rev);
30 30
31void __init s3c24xx_init_cpu(void)
32{
33 /* nothing here yet */
34
35 samsung_cpu_rev = 0;
36}
37
38void __init s3c64xx_init_cpu(void) 31void __init s3c64xx_init_cpu(void)
39{ 32{
40 samsung_cpu_id = __raw_readl(S3C_VA_SYS + 0x118); 33 samsung_cpu_id = __raw_readl(S3C_VA_SYS + 0x118);
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index ac07e871f6a7..c64a39ac1b04 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -18,6 +18,7 @@
18#include <linux/timer.h> 18#include <linux/timer.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/serial_core.h> 20#include <linux/serial_core.h>
21#include <linux/serial_s3c.h>
21#include <linux/platform_device.h> 22#include <linux/platform_device.h>
22#include <linux/io.h> 23#include <linux/io.h>
23#include <linux/slab.h> 24#include <linux/slab.h>
@@ -64,7 +65,6 @@
64#include <linux/platform_data/usb-s3c2410_udc.h> 65#include <linux/platform_data/usb-s3c2410_udc.h>
65#include <linux/platform_data/usb-ohci-s3c2410.h> 66#include <linux/platform_data/usb-ohci-s3c2410.h>
66#include <plat/usb-phy.h> 67#include <plat/usb-phy.h>
67#include <plat/regs-serial.h>
68#include <plat/regs-spi.h> 68#include <plat/regs-spi.h>
69#include <linux/platform_data/spi-s3c64xx.h> 69#include <linux/platform_data/spi-s3c64xx.h>
70 70
@@ -744,10 +744,7 @@ void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd)
744 if (!pd) { 744 if (!pd) {
745 pd = &default_i2c_data; 745 pd = &default_i2c_data;
746 746
747 if (soc_is_exynos4210() || 747 if (soc_is_s5pv210())
748 soc_is_exynos4212() || soc_is_exynos4412())
749 pd->bus_num = 8;
750 else if (soc_is_s5pv210())
751 pd->bus_num = 3; 748 pd->bus_num = 3;
752 else 749 else
753 pd->bus_num = 0; 750 pd->bus_num = 0;
@@ -764,10 +761,7 @@ void __init s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info,
764{ 761{
765 struct s5p_hdmi_platform_data *pd = &s5p_hdmi_def_platdata; 762 struct s5p_hdmi_platform_data *pd = &s5p_hdmi_def_platdata;
766 763
767 if (soc_is_exynos4210() || 764 if (soc_is_s5pv210())
768 soc_is_exynos4212() || soc_is_exynos4412())
769 pd->hdmiphy_bus = 8;
770 else if (soc_is_s5pv210())
771 pd->hdmiphy_bus = 3; 765 pd->hdmiphy_bus = 3;
772 else 766 else
773 pd->hdmiphy_bus = 0; 767 pd->hdmiphy_bus = 0;
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index 335beb341355..31164b34d4c4 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -199,7 +199,6 @@ extern void s5p_init_irq(u32 *vic, u32 num_vic);
199 199
200extern void s3c24xx_init_io(struct map_desc *mach_desc, int size); 200extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
201 201
202extern void s3c24xx_init_cpu(void);
203extern void s3c64xx_init_cpu(void); 202extern void s3c64xx_init_cpu(void);
204extern void s5p_init_cpu(void __iomem *cpuid_addr); 203extern void s5p_init_cpu(void __iomem *cpuid_addr);
205 204
diff --git a/arch/arm/plat-samsung/include/plat/regs-serial.h b/arch/arm/plat-samsung/include/plat/regs-serial.h
deleted file mode 100644
index f05f2afa440d..000000000000
--- a/arch/arm/plat-samsung/include/plat/regs-serial.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <linux/serial_s3c.h>
diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h
index f48dc0a4736c..61054fd88d43 100644
--- a/arch/arm/plat-samsung/include/plat/uncompress.h
+++ b/arch/arm/plat-samsung/include/plat/uncompress.h
@@ -29,7 +29,7 @@ static void arch_detect_cpu(void);
29 29
30/* defines for UART registers */ 30/* defines for UART registers */
31 31
32#include <plat/regs-serial.h> 32#include <linux/serial_s3c.h>
33 33
34/* working in physical space... */ 34/* working in physical space... */
35#define S3C_WDOGREG(x) ((S3C_PA_WDT + (x))) 35#define S3C_WDOGREG(x) ((S3C_PA_WDT + (x)))
diff --git a/arch/arm/plat-samsung/init.c b/arch/arm/plat-samsung/init.c
index a30df396ca34..c32df1f202eb 100644
--- a/arch/arm/plat-samsung/init.c
+++ b/arch/arm/plat-samsung/init.c
@@ -21,6 +21,7 @@
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/ioport.h> 22#include <linux/ioport.h>
23#include <linux/serial_core.h> 23#include <linux/serial_core.h>
24#include <linux/serial_s3c.h>
24#include <linux/platform_device.h> 25#include <linux/platform_device.h>
25#include <linux/of.h> 26#include <linux/of.h>
26 27
@@ -33,8 +34,6 @@
33#include <plat/devs.h> 34#include <plat/devs.h>
34#include <plat/clock.h> 35#include <plat/clock.h>
35 36
36#include <plat/regs-serial.h>
37
38static struct cpu_table *cpu; 37static struct cpu_table *cpu;
39 38
40static struct cpu_table * __init s3c_lookup_cpu(unsigned long idcode, 39static struct cpu_table * __init s3c_lookup_cpu(unsigned long idcode,
diff --git a/arch/arm/plat-samsung/pm-gpio.c b/arch/arm/plat-samsung/pm-gpio.c
index dd4c15d0d68f..da268813901b 100644
--- a/arch/arm/plat-samsung/pm-gpio.c
+++ b/arch/arm/plat-samsung/pm-gpio.c
@@ -196,8 +196,7 @@ struct samsung_gpio_pm samsung_gpio_pm_2bit = {
196 .resume = samsung_gpio_pm_2bit_resume, 196 .resume = samsung_gpio_pm_2bit_resume,
197}; 197};
198 198
199#if defined(CONFIG_ARCH_S3C64XX) || defined(CONFIG_PLAT_S5P) \ 199#if defined(CONFIG_ARCH_S3C64XX) || defined(CONFIG_PLAT_S5P)
200 || defined(CONFIG_ARCH_EXYNOS)
201static void samsung_gpio_pm_4bit_save(struct samsung_gpio_chip *chip) 200static void samsung_gpio_pm_4bit_save(struct samsung_gpio_chip *chip)
202{ 201{
203 chip->pm_save[1] = __raw_readl(chip->base + OFFS_CON); 202 chip->pm_save[1] = __raw_readl(chip->base + OFFS_CON);
@@ -307,7 +306,7 @@ struct samsung_gpio_pm samsung_gpio_pm_4bit = {
307 .save = samsung_gpio_pm_4bit_save, 306 .save = samsung_gpio_pm_4bit_save,
308 .resume = samsung_gpio_pm_4bit_resume, 307 .resume = samsung_gpio_pm_4bit_resume,
309}; 308};
310#endif /* CONFIG_ARCH_S3C64XX || CONFIG_PLAT_S5P || CONFIG_ARCH_EXYNOS */ 309#endif /* CONFIG_ARCH_S3C64XX || CONFIG_PLAT_S5P */
311 310
312/** 311/**
313 * samsung_pm_save_gpio() - save gpio chip data for suspend 312 * samsung_pm_save_gpio() - save gpio chip data for suspend
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
index e5b0f2c2d884..ae9baa2d6381 100644
--- a/arch/arm/plat-samsung/pm.c
+++ b/arch/arm/plat-samsung/pm.c
@@ -18,13 +18,12 @@
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/of.h> 19#include <linux/of.h>
20#include <linux/serial_core.h> 20#include <linux/serial_core.h>
21#include <linux/serial_s3c.h>
21#include <linux/io.h> 22#include <linux/io.h>
22 23
23#include <asm/cacheflush.h> 24#include <asm/cacheflush.h>
24#include <asm/suspend.h> 25#include <asm/suspend.h>
25 26
26#include <plat/regs-serial.h>
27
28#ifdef CONFIG_SAMSUNG_ATAGS 27#ifdef CONFIG_SAMSUNG_ATAGS
29#include <mach/hardware.h> 28#include <mach/hardware.h>
30#include <mach/map.h> 29#include <mach/map.h>
diff --git a/arch/arm/plat-samsung/s5p-irq-pm.c b/arch/arm/plat-samsung/s5p-irq-pm.c
index 591498035916..52b16943617e 100644
--- a/arch/arm/plat-samsung/s5p-irq-pm.c
+++ b/arch/arm/plat-samsung/s5p-irq-pm.c
@@ -22,10 +22,7 @@
22#include <mach/map.h> 22#include <mach/map.h>
23 23
24#include <mach/regs-gpio.h> 24#include <mach/regs-gpio.h>
25
26#ifndef CONFIG_ARCH_EXYNOS
27#include <mach/regs-irq.h> 25#include <mach/regs-irq.h>
28#endif
29 26
30/* state for IRQs over sleep */ 27/* state for IRQs over sleep */
31 28
@@ -43,18 +40,8 @@ int s3c_irq_wake(struct irq_data *data, unsigned int state)
43 unsigned long irqbit; 40 unsigned long irqbit;
44 unsigned int irq_rtc_tic, irq_rtc_alarm; 41 unsigned int irq_rtc_tic, irq_rtc_alarm;
45 42
46#ifdef CONFIG_ARCH_EXYNOS
47 if (soc_is_exynos5250()) {
48 irq_rtc_tic = EXYNOS5_IRQ_RTC_TIC;
49 irq_rtc_alarm = EXYNOS5_IRQ_RTC_ALARM;
50 } else {
51 irq_rtc_tic = EXYNOS4_IRQ_RTC_TIC;
52 irq_rtc_alarm = EXYNOS4_IRQ_RTC_ALARM;
53 }
54#else
55 irq_rtc_tic = IRQ_RTC_TIC; 43 irq_rtc_tic = IRQ_RTC_TIC;
56 irq_rtc_alarm = IRQ_RTC_ALARM; 44 irq_rtc_alarm = IRQ_RTC_ALARM;
57#endif
58 45
59 if (data->irq == irq_rtc_tic || data->irq == irq_rtc_alarm) { 46 if (data->irq == irq_rtc_tic || data->irq == irq_rtc_alarm) {
60 irqbit = 1 << (data->irq + 1 - irq_rtc_alarm); 47 irqbit = 1 << (data->irq + 1 - irq_rtc_alarm);
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 52e9329e3c51..96918e1f26a3 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -188,3 +188,6 @@ config EM_TIMER_STI
188 This enables build of a clocksource and clockevent driver for 188 This enables build of a clocksource and clockevent driver for
189 the 48-bit System Timer (STI) hardware available on a SoCs 189 the 48-bit System Timer (STI) hardware available on a SoCs
190 such as EMEV2 from former NEC Electronics. 190 such as EMEV2 from former NEC Electronics.
191
192config CLKSRC_QCOM
193 bool
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
index f3fe4cb4974b..98cb6c51aa87 100644
--- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile
@@ -32,6 +32,7 @@ obj-$(CONFIG_CLKSRC_EFM32) += time-efm32.o
32obj-$(CONFIG_CLKSRC_EXYNOS_MCT) += exynos_mct.o 32obj-$(CONFIG_CLKSRC_EXYNOS_MCT) += exynos_mct.o
33obj-$(CONFIG_CLKSRC_SAMSUNG_PWM) += samsung_pwm_timer.o 33obj-$(CONFIG_CLKSRC_SAMSUNG_PWM) += samsung_pwm_timer.o
34obj-$(CONFIG_VF_PIT_TIMER) += vf_pit_timer.o 34obj-$(CONFIG_VF_PIT_TIMER) += vf_pit_timer.o
35obj-$(CONFIG_CLKSRC_QCOM) += qcom-timer.o
35 36
36obj-$(CONFIG_ARM_ARCH_TIMER) += arm_arch_timer.o 37obj-$(CONFIG_ARM_ARCH_TIMER) += arm_arch_timer.o
37obj-$(CONFIG_ARM_GLOBAL_TIMER) += arm_global_timer.o 38obj-$(CONFIG_ARM_GLOBAL_TIMER) += arm_global_timer.o
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index c2e390efbdca..a6ee6d7cd63f 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -25,8 +25,6 @@
25#include <linux/of_address.h> 25#include <linux/of_address.h>
26#include <linux/clocksource.h> 26#include <linux/clocksource.h>
27 27
28#include <asm/mach/time.h>
29
30#define EXYNOS4_MCTREG(x) (x) 28#define EXYNOS4_MCTREG(x) (x)
31#define EXYNOS4_MCT_G_CNT_L EXYNOS4_MCTREG(0x100) 29#define EXYNOS4_MCT_G_CNT_L EXYNOS4_MCTREG(0x100)
32#define EXYNOS4_MCT_G_CNT_U EXYNOS4_MCTREG(0x104) 30#define EXYNOS4_MCT_G_CNT_U EXYNOS4_MCTREG(0x104)
diff --git a/arch/arm/mach-msm/timer.c b/drivers/clocksource/qcom-timer.c
index fd1644987534..e807acf4c665 100644
--- a/arch/arm/mach-msm/timer.c
+++ b/drivers/clocksource/qcom-timer.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * 2 *
3 * Copyright (C) 2007 Google, Inc. 3 * Copyright (C) 2007 Google, Inc.
4 * Copyright (c) 2009-2012, The Linux Foundation. All rights reserved. 4 * Copyright (c) 2009-2012,2014, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This software is licensed under the terms of the GNU General Public 6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and 7 * License version 2, as published by the Free Software Foundation, and
@@ -26,10 +26,6 @@
26#include <linux/of_irq.h> 26#include <linux/of_irq.h>
27#include <linux/sched_clock.h> 27#include <linux/sched_clock.h>
28 28
29#include <asm/mach/time.h>
30
31#include "common.h"
32
33#define TIMER_MATCH_VAL 0x0000 29#define TIMER_MATCH_VAL 0x0000
34#define TIMER_COUNT_VAL 0x0004 30#define TIMER_COUNT_VAL 0x0004
35#define TIMER_ENABLE 0x0008 31#define TIMER_ENABLE 0x0008
@@ -110,15 +106,6 @@ static notrace cycle_t msm_read_timer_count(struct clocksource *cs)
110 return readl_relaxed(source_base + TIMER_COUNT_VAL); 106 return readl_relaxed(source_base + TIMER_COUNT_VAL);
111} 107}
112 108
113static notrace cycle_t msm_read_timer_count_shift(struct clocksource *cs)
114{
115 /*
116 * Shift timer count down by a constant due to unreliable lower bits
117 * on some targets.
118 */
119 return msm_read_timer_count(cs) >> MSM_DGT_SHIFT;
120}
121
122static struct clocksource msm_clocksource = { 109static struct clocksource msm_clocksource = {
123 .name = "dg_timer", 110 .name = "dg_timer",
124 .rating = 300, 111 .rating = 300,
@@ -232,7 +219,7 @@ err:
232 sched_clock_register(msm_sched_clock_read, sched_bits, dgt_hz); 219 sched_clock_register(msm_sched_clock_read, sched_bits, dgt_hz);
233} 220}
234 221
235#ifdef CONFIG_OF 222#ifdef CONFIG_ARCH_QCOM
236static void __init msm_dt_timer_init(struct device_node *np) 223static void __init msm_dt_timer_init(struct device_node *np)
237{ 224{
238 u32 freq; 225 u32 freq;
@@ -285,7 +272,7 @@ static void __init msm_dt_timer_init(struct device_node *np)
285} 272}
286CLOCKSOURCE_OF_DECLARE(kpss_timer, "qcom,kpss-timer", msm_dt_timer_init); 273CLOCKSOURCE_OF_DECLARE(kpss_timer, "qcom,kpss-timer", msm_dt_timer_init);
287CLOCKSOURCE_OF_DECLARE(scss_timer, "qcom,scss-timer", msm_dt_timer_init); 274CLOCKSOURCE_OF_DECLARE(scss_timer, "qcom,scss-timer", msm_dt_timer_init);
288#endif 275#else
289 276
290static int __init msm_timer_map(phys_addr_t addr, u32 event, u32 source, 277static int __init msm_timer_map(phys_addr_t addr, u32 event, u32 source,
291 u32 sts) 278 u32 sts)
@@ -305,6 +292,15 @@ static int __init msm_timer_map(phys_addr_t addr, u32 event, u32 source,
305 return 0; 292 return 0;
306} 293}
307 294
295static notrace cycle_t msm_read_timer_count_shift(struct clocksource *cs)
296{
297 /*
298 * Shift timer count down by a constant due to unreliable lower bits
299 * on some targets.
300 */
301 return msm_read_timer_count(cs) >> MSM_DGT_SHIFT;
302}
303
308void __init msm7x01_timer_init(void) 304void __init msm7x01_timer_init(void)
309{ 305{
310 struct clocksource *cs = &msm_clocksource; 306 struct clocksource *cs = &msm_clocksource;
@@ -331,3 +327,4 @@ void __init qsd8x50_timer_init(void)
331 return; 327 return;
332 msm_timer_init(19200000 / 4, 32, 7, false); 328 msm_timer_init(19200000 / 4, 32, 7, false);
333} 329}
330#endif
diff --git a/drivers/clocksource/timer-marco.c b/drivers/clocksource/timer-marco.c
index 09a17d9a6594..b52e1c078b99 100644
--- a/drivers/clocksource/timer-marco.c
+++ b/drivers/clocksource/timer-marco.c
@@ -19,7 +19,8 @@
19#include <linux/of_irq.h> 19#include <linux/of_irq.h>
20#include <linux/of_address.h> 20#include <linux/of_address.h>
21#include <linux/sched_clock.h> 21#include <linux/sched_clock.h>
22#include <asm/mach/time.h> 22
23#define MARCO_CLOCK_FREQ 1000000
23 24
24#define SIRFSOC_TIMER_32COUNTER_0_CTRL 0x0000 25#define SIRFSOC_TIMER_32COUNTER_0_CTRL 0x0000
25#define SIRFSOC_TIMER_32COUNTER_1_CTRL 0x0004 26#define SIRFSOC_TIMER_32COUNTER_1_CTRL 0x0004
@@ -191,7 +192,7 @@ static int sirfsoc_local_timer_setup(struct clock_event_device *ce)
191 ce->rating = 200; 192 ce->rating = 200;
192 ce->set_mode = sirfsoc_timer_set_mode; 193 ce->set_mode = sirfsoc_timer_set_mode;
193 ce->set_next_event = sirfsoc_timer_set_next_event; 194 ce->set_next_event = sirfsoc_timer_set_next_event;
194 clockevents_calc_mult_shift(ce, CLOCK_TICK_RATE, 60); 195 clockevents_calc_mult_shift(ce, MARCO_CLOCK_FREQ, 60);
195 ce->max_delta_ns = clockevent_delta2ns(-2, ce); 196 ce->max_delta_ns = clockevent_delta2ns(-2, ce);
196 ce->min_delta_ns = clockevent_delta2ns(2, ce); 197 ce->min_delta_ns = clockevent_delta2ns(2, ce);
197 ce->cpumask = cpumask_of(cpu); 198 ce->cpumask = cpumask_of(cpu);
@@ -263,11 +264,11 @@ static void __init sirfsoc_marco_timer_init(void)
263 BUG_ON(IS_ERR(clk)); 264 BUG_ON(IS_ERR(clk));
264 rate = clk_get_rate(clk); 265 rate = clk_get_rate(clk);
265 266
266 BUG_ON(rate < CLOCK_TICK_RATE); 267 BUG_ON(rate < MARCO_CLOCK_FREQ);
267 BUG_ON(rate % CLOCK_TICK_RATE); 268 BUG_ON(rate % MARCO_CLOCK_FREQ);
268 269
269 /* Initialize the timer dividers */ 270 /* Initialize the timer dividers */
270 timer_div = rate / CLOCK_TICK_RATE - 1; 271 timer_div = rate / MARCO_CLOCK_FREQ - 1;
271 writel_relaxed(timer_div << 16, sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL); 272 writel_relaxed(timer_div << 16, sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
272 writel_relaxed(timer_div << 16, sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL); 273 writel_relaxed(timer_div << 16, sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL);
273 writel_relaxed(timer_div << 16, sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_1_CTRL); 274 writel_relaxed(timer_div << 16, sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_1_CTRL);
@@ -283,7 +284,7 @@ static void __init sirfsoc_marco_timer_init(void)
283 /* Clear all interrupts */ 284 /* Clear all interrupts */
284 writel_relaxed(0xFFFF, sirfsoc_timer_base + SIRFSOC_TIMER_INTR_STATUS); 285 writel_relaxed(0xFFFF, sirfsoc_timer_base + SIRFSOC_TIMER_INTR_STATUS);
285 286
286 BUG_ON(clocksource_register_hz(&sirfsoc_clocksource, CLOCK_TICK_RATE)); 287 BUG_ON(clocksource_register_hz(&sirfsoc_clocksource, MARCO_CLOCK_FREQ));
287 288
288 sirfsoc_clockevent_init(); 289 sirfsoc_clockevent_init();
289} 290}
diff --git a/drivers/clocksource/timer-prima2.c b/drivers/clocksource/timer-prima2.c
index 8a492d34ff9f..1a6b2d6356d6 100644
--- a/drivers/clocksource/timer-prima2.c
+++ b/drivers/clocksource/timer-prima2.c
@@ -21,6 +21,8 @@
21#include <linux/sched_clock.h> 21#include <linux/sched_clock.h>
22#include <asm/mach/time.h> 22#include <asm/mach/time.h>
23 23
24#define PRIMA2_CLOCK_FREQ 1000000
25
24#define SIRFSOC_TIMER_COUNTER_LO 0x0000 26#define SIRFSOC_TIMER_COUNTER_LO 0x0000
25#define SIRFSOC_TIMER_COUNTER_HI 0x0004 27#define SIRFSOC_TIMER_COUNTER_HI 0x0004
26#define SIRFSOC_TIMER_MATCH_0 0x0008 28#define SIRFSOC_TIMER_MATCH_0 0x0008
@@ -173,7 +175,7 @@ static u64 notrace sirfsoc_read_sched_clock(void)
173static void __init sirfsoc_clockevent_init(void) 175static void __init sirfsoc_clockevent_init(void)
174{ 176{
175 sirfsoc_clockevent.cpumask = cpumask_of(0); 177 sirfsoc_clockevent.cpumask = cpumask_of(0);
176 clockevents_config_and_register(&sirfsoc_clockevent, CLOCK_TICK_RATE, 178 clockevents_config_and_register(&sirfsoc_clockevent, PRIMA2_CLOCK_FREQ,
177 2, -2); 179 2, -2);
178} 180}
179 181
@@ -190,8 +192,8 @@ static void __init sirfsoc_prima2_timer_init(struct device_node *np)
190 192
191 rate = clk_get_rate(clk); 193 rate = clk_get_rate(clk);
192 194
193 BUG_ON(rate < CLOCK_TICK_RATE); 195 BUG_ON(rate < PRIMA2_CLOCK_FREQ);
194 BUG_ON(rate % CLOCK_TICK_RATE); 196 BUG_ON(rate % PRIMA2_CLOCK_FREQ);
195 197
196 sirfsoc_timer_base = of_iomap(np, 0); 198 sirfsoc_timer_base = of_iomap(np, 0);
197 if (!sirfsoc_timer_base) 199 if (!sirfsoc_timer_base)
@@ -199,14 +201,16 @@ static void __init sirfsoc_prima2_timer_init(struct device_node *np)
199 201
200 sirfsoc_timer_irq.irq = irq_of_parse_and_map(np, 0); 202 sirfsoc_timer_irq.irq = irq_of_parse_and_map(np, 0);
201 203
202 writel_relaxed(rate / CLOCK_TICK_RATE / 2 - 1, sirfsoc_timer_base + SIRFSOC_TIMER_DIV); 204 writel_relaxed(rate / PRIMA2_CLOCK_FREQ / 2 - 1,
205 sirfsoc_timer_base + SIRFSOC_TIMER_DIV);
203 writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_LO); 206 writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_LO);
204 writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_HI); 207 writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_HI);
205 writel_relaxed(BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_STATUS); 208 writel_relaxed(BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_STATUS);
206 209
207 BUG_ON(clocksource_register_hz(&sirfsoc_clocksource, CLOCK_TICK_RATE)); 210 BUG_ON(clocksource_register_hz(&sirfsoc_clocksource,
211 PRIMA2_CLOCK_FREQ));
208 212
209 sched_clock_register(sirfsoc_read_sched_clock, 64, CLOCK_TICK_RATE); 213 sched_clock_register(sirfsoc_read_sched_clock, 64, PRIMA2_CLOCK_FREQ);
210 214
211 BUG_ON(setup_irq(sirfsoc_timer_irq.irq, &sirfsoc_timer_irq)); 215 BUG_ON(setup_irq(sirfsoc_timer_irq.irq, &sirfsoc_timer_irq));
212 216
diff --git a/drivers/input/misc/ixp4xx-beeper.c b/drivers/input/misc/ixp4xx-beeper.c
index 17ccba88d636..ed8e5e8449d3 100644
--- a/drivers/input/misc/ixp4xx-beeper.c
+++ b/drivers/input/misc/ixp4xx-beeper.c
@@ -67,7 +67,7 @@ static int ixp4xx_spkr_event(struct input_dev *dev, unsigned int type, unsigned
67 } 67 }
68 68
69 if (value > 20 && value < 32767) 69 if (value > 20 && value < 32767)
70 count = (IXP4XX_TIMER_FREQ / (value * 4)) - 1; 70 count = (ixp4xx_timer_freq / (value * 4)) - 1;
71 71
72 ixp4xx_spkr_control(pin, count); 72 ixp4xx_spkr_control(pin, count);
73 73
diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c
index 40e6440348ff..f8636a650cf6 100644
--- a/drivers/irqchip/exynos-combiner.c
+++ b/drivers/irqchip/exynos-combiner.c
@@ -17,7 +17,6 @@
17#include <linux/irqchip/chained_irq.h> 17#include <linux/irqchip/chained_irq.h>
18#include <linux/of_address.h> 18#include <linux/of_address.h>
19#include <linux/of_irq.h> 19#include <linux/of_irq.h>
20#include <asm/mach/irq.h>
21 20
22#include "irqchip.h" 21#include "irqchip.h"
23 22
@@ -81,7 +80,7 @@ static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
81 cascade_irq = irq_find_mapping(combiner_irq_domain, combiner_irq); 80 cascade_irq = irq_find_mapping(combiner_irq_domain, combiner_irq);
82 81
83 if (unlikely(!cascade_irq)) 82 if (unlikely(!cascade_irq))
84 do_bad_IRQ(irq, desc); 83 handle_bad_irq(irq, desc);
85 else 84 else
86 generic_handle_irq(cascade_irq); 85 generic_handle_irq(cascade_irq);
87 86
diff --git a/drivers/irqchip/irq-mmp.c b/drivers/irqchip/irq-mmp.c
index 3c8827fe83f3..1c3e2c9b46ba 100644
--- a/drivers/irqchip/irq-mmp.c
+++ b/drivers/irqchip/irq-mmp.c
@@ -22,7 +22,7 @@
22#include <linux/of_irq.h> 22#include <linux/of_irq.h>
23 23
24#include <asm/exception.h> 24#include <asm/exception.h>
25#include <asm/mach/irq.h> 25#include <asm/hardirq.h>
26 26
27#include "irqchip.h" 27#include "irqchip.h"
28 28
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
index 309b8b342d9c..596374304532 100644
--- a/drivers/rtc/rtc-at91sam9.c
+++ b/drivers/rtc/rtc-at91sam9.c
@@ -24,7 +24,7 @@
24 24
25#include <mach/at91_rtt.h> 25#include <mach/at91_rtt.h>
26#include <mach/cpu.h> 26#include <mach/cpu.h>
27 27#include <mach/hardware.h>
28 28
29/* 29/*
30 * This driver uses two configurable hardware resources that live in the 30 * This driver uses two configurable hardware resources that live in the
diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c
index a355f2b82bb8..cccbf9d89729 100644
--- a/drivers/rtc/rtc-pxa.c
+++ b/drivers/rtc/rtc-pxa.c
@@ -32,7 +32,6 @@
32 32
33#include <mach/hardware.h> 33#include <mach/hardware.h>
34 34
35#define TIMER_FREQ CLOCK_TICK_RATE
36#define RTC_DEF_DIVIDER (32768 - 1) 35#define RTC_DEF_DIVIDER (32768 - 1)
37#define RTC_DEF_TRIM 0 36#define RTC_DEF_TRIM 0
38#define MAXFREQ_PERIODIC 1000 37#define MAXFREQ_PERIODIC 1000
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index b0603e1f7d82..53eeea13ff16 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -35,21 +35,18 @@
35#include <linux/platform_device.h> 35#include <linux/platform_device.h>
36#include <linux/of.h> 36#include <linux/of.h>
37#include <linux/of_device.h> 37#include <linux/of_device.h>
38#include <linux/of_gpio.h>
38#include <linux/dma-mapping.h> 39#include <linux/dma-mapping.h>
39#include <linux/atmel_pdc.h> 40#include <linux/atmel_pdc.h>
40#include <linux/atmel_serial.h> 41#include <linux/atmel_serial.h>
41#include <linux/uaccess.h> 42#include <linux/uaccess.h>
42#include <linux/platform_data/atmel.h> 43#include <linux/platform_data/atmel.h>
43#include <linux/timer.h> 44#include <linux/timer.h>
45#include <linux/gpio.h>
44 46
45#include <asm/io.h> 47#include <asm/io.h>
46#include <asm/ioctls.h> 48#include <asm/ioctls.h>
47 49
48#ifdef CONFIG_ARM
49#include <mach/cpu.h>
50#include <asm/gpio.h>
51#endif
52
53#define PDC_BUFFER_SIZE 512 50#define PDC_BUFFER_SIZE 512
54/* Revisit: We should calculate this based on the actual port settings */ 51/* Revisit: We should calculate this based on the actual port settings */
55#define PDC_RX_TIMEOUT (3 * 10) /* 3 bytes */ 52#define PDC_RX_TIMEOUT (3 * 10) /* 3 bytes */
@@ -165,6 +162,7 @@ struct atmel_uart_port {
165 struct circ_buf rx_ring; 162 struct circ_buf rx_ring;
166 163
167 struct serial_rs485 rs485; /* rs485 settings */ 164 struct serial_rs485 rs485; /* rs485 settings */
165 int rts_gpio; /* optional RTS GPIO */
168 unsigned int tx_done_mask; 166 unsigned int tx_done_mask;
169 bool is_usart; /* usart or uart */ 167 bool is_usart; /* usart or uart */
170 struct timer_list uart_timer; /* uart timer */ 168 struct timer_list uart_timer; /* uart timer */
@@ -298,20 +296,16 @@ static void atmel_set_mctrl(struct uart_port *port, u_int mctrl)
298 unsigned int mode; 296 unsigned int mode;
299 struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); 297 struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
300 298
301#ifdef CONFIG_ARCH_AT91RM9200 299 /*
302 if (cpu_is_at91rm9200()) { 300 * AT91RM9200 Errata #39: RTS0 is not internally connected
303 /* 301 * to PA21. We need to drive the pin as a GPIO.
304 * AT91RM9200 Errata #39: RTS0 is not internally connected 302 */
305 * to PA21. We need to drive the pin manually. 303 if (gpio_is_valid(atmel_port->rts_gpio)) {
306 */ 304 if (mctrl & TIOCM_RTS)
307 if (port->mapbase == AT91RM9200_BASE_US0) { 305 gpio_set_value(atmel_port->rts_gpio, 0);
308 if (mctrl & TIOCM_RTS) 306 else
309 at91_set_gpio_value(AT91_PIN_PA21, 0); 307 gpio_set_value(atmel_port->rts_gpio, 1);
310 else
311 at91_set_gpio_value(AT91_PIN_PA21, 1);
312 }
313 } 308 }
314#endif
315 309
316 if (mctrl & TIOCM_RTS) 310 if (mctrl & TIOCM_RTS)
317 control |= ATMEL_US_RTSEN; 311 control |= ATMEL_US_RTSEN;
@@ -2365,6 +2359,25 @@ static int atmel_serial_probe(struct platform_device *pdev)
2365 port = &atmel_ports[ret]; 2359 port = &atmel_ports[ret];
2366 port->backup_imr = 0; 2360 port->backup_imr = 0;
2367 port->uart.line = ret; 2361 port->uart.line = ret;
2362 port->rts_gpio = -EINVAL; /* Invalid, zero could be valid */
2363 if (pdata)
2364 port->rts_gpio = pdata->rts_gpio;
2365 else if (np)
2366 port->rts_gpio = of_get_named_gpio(np, "rts-gpios", 0);
2367
2368 if (gpio_is_valid(port->rts_gpio)) {
2369 ret = devm_gpio_request(&pdev->dev, port->rts_gpio, "RTS");
2370 if (ret) {
2371 dev_err(&pdev->dev, "error requesting RTS GPIO\n");
2372 goto err;
2373 }
2374 /* Default to 1 as RTS is active low */
2375 ret = gpio_direction_output(port->rts_gpio, 1);
2376 if (ret) {
2377 dev_err(&pdev->dev, "error setting up RTS GPIO\n");
2378 goto err;
2379 }
2380 }
2368 2381
2369 ret = atmel_init_port(port, pdev); 2382 ret = atmel_init_port(port, pdev);
2370 if (ret) 2383 if (ret)
diff --git a/include/linux/platform_data/atmel.h b/include/linux/platform_data/atmel.h
index cea9f70133c5..e26b0c14edea 100644
--- a/include/linux/platform_data/atmel.h
+++ b/include/linux/platform_data/atmel.h
@@ -84,6 +84,7 @@ struct atmel_uart_data {
84 short use_dma_rx; /* use receive DMA? */ 84 short use_dma_rx; /* use receive DMA? */
85 void __iomem *regs; /* virt. base address, if any */ 85 void __iomem *regs; /* virt. base address, if any */
86 struct serial_rs485 rs485; /* rs485 settings */ 86 struct serial_rs485 rs485; /* rs485 settings */
87 int rts_gpio; /* optional RTS GPIO */
87}; 88};
88 89
89 /* Touchscreen Controller */ 90 /* Touchscreen Controller */