aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-02 12:38:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-02 12:38:16 -0400
commit99c6bcf46d2233d33e441834e958ed0bc22b190a (patch)
tree25abf5e856bc0f08d75e623715eb5acc4d4de2b2 /arch
parent97b1007a2924aaa9126398623f6755a8c3c6a616 (diff)
parent2fdfe1c26fb9f24cfdf124384abb35396ca2cd3f (diff)
Merge tag 'multiplatform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC multiplatform updates from Olof Johansson: "More multiplatform enablement for ARM platforms. The ones converted in this branch are: - bcm2835 - cns3xxx - sirf - nomadik - msx - spear - tegra - ux500 We're getting close to having most of them converted! One of the larger platforms remaining is Samsung Exynos, and there are a bunch of supporting patches in this merge window for it. There was a patch in this branch to a early version of multiplatform conversion, but it ended up being reverted due to need of more bake time. The revert commit is part of the branch since it would have required rebasing multiple dependent branches and they were stable by then" * tag 'multiplatform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (70 commits) mmc: sdhci-s3c: Fix operation on non-single image Samsung platforms clocksource: nomadik-mtu: fix up clocksource/timer Revert "ARM: exynos: enable multiplatform support" ARM: SPEAr13xx: Fix typo "ARCH_HAVE_CPUFREQ" ARM: exynos: enable multiplatform support rtc: s3c: make header file local mtd: onenand/samsung: make regs-onenand.h file local thermal/exynos: remove unnecessary header inclusions mmc: sdhci-s3c: remove platform dependencies ARM: samsung: move mfc device definition to s5p-dev-mfc.c ARM: exynos: move debug-macro.S to include/debug/ ARM: exynos: prepare for sparse IRQ ARM: exynos: introduce EXYNOS_ATAGS symbol ARM: tegra: build assembly files with -march=armv7-a ARM: Push selects for TWD/SCU into machine entries ARM: ux500: build hotplug.o for ARMv7-a ARM: ux500: move to multiplatform ARM: ux500: make remaining headers local ARM: ux500: make irqs.h local to platform ARM: ux500: get rid of <mach/[hardware|db8500-regs].h> ...
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig135
-rw-r--r--arch/arm/Kconfig.debug39
-rw-r--r--arch/arm/Makefile5
-rw-r--r--arch/arm/configs/bcm2835_defconfig2
-rw-r--r--arch/arm/configs/cns3420vb_defconfig3
-rw-r--r--arch/arm/configs/multi_v7_defconfig23
-rw-r--r--arch/arm/configs/mxs_defconfig2
-rw-r--r--arch/arm/configs/nhk8815_defconfig42
-rw-r--r--arch/arm/configs/spear3xx_defconfig2
-rw-r--r--arch/arm/configs/spear6xx_defconfig1
-rw-r--r--arch/arm/include/debug/bcm2835.S (renamed from arch/arm/mach-bcm2835/include/mach/debug-macro.S)3
-rw-r--r--arch/arm/include/debug/cns3xxx.S (renamed from arch/arm/mach-cns3xxx/include/mach/debug-macro.S)0
-rw-r--r--arch/arm/include/debug/exynos.S (renamed from arch/arm/mach-exynos/include/mach/debug-macro.S)12
-rw-r--r--arch/arm/include/debug/mxs.S (renamed from arch/arm/mach-mxs/include/mach/debug-macro.S)0
-rw-r--r--arch/arm/include/debug/nomadik.S (renamed from arch/arm/mach-nomadik/include/mach/debug-macro.S)0
-rw-r--r--arch/arm/include/debug/samsung.S (renamed from arch/arm/plat-samsung/include/plat/debug-macro.S)0
-rw-r--r--arch/arm/include/debug/sirf.S (renamed from arch/arm/mach-prima2/include/mach/uart.h)29
-rw-r--r--arch/arm/include/debug/ux500.S48
-rw-r--r--arch/arm/mach-bcm2835/Kconfig15
-rw-r--r--arch/arm/mach-bcm2835/Makefile.boot1
-rw-r--r--arch/arm/mach-bcm2835/bcm2835.c6
-rw-r--r--arch/arm/mach-bcm2835/include/mach/bcm2835_soc.h29
-rw-r--r--arch/arm/mach-bcm2835/include/mach/gpio.h1
-rw-r--r--arch/arm/mach-bcm2835/include/mach/timex.h26
-rw-r--r--arch/arm/mach-bcm2835/include/mach/uncompress.h44
-rw-r--r--arch/arm/mach-cns3xxx/Kconfig12
-rw-r--r--arch/arm/mach-cns3xxx/Makefile8
-rw-r--r--arch/arm/mach-cns3xxx/cns3420vb.c6
-rw-r--r--arch/arm/mach-cns3xxx/cns3xxx.h (renamed from arch/arm/mach-cns3xxx/include/mach/cns3xxx.h)7
-rw-r--r--arch/arm/mach-cns3xxx/core.c121
-rw-r--r--arch/arm/mach-cns3xxx/devices.c5
-rw-r--r--arch/arm/mach-cns3xxx/include/mach/irqs.h24
-rw-r--r--arch/arm/mach-cns3xxx/include/mach/timex.h12
-rw-r--r--arch/arm/mach-cns3xxx/include/mach/uncompress.h53
-rw-r--r--arch/arm/mach-cns3xxx/pcie.c2
-rw-r--r--arch/arm/mach-cns3xxx/pm.c4
-rw-r--r--arch/arm/mach-cns3xxx/pm.h (renamed from arch/arm/mach-cns3xxx/include/mach/pm.h)0
-rw-r--r--arch/arm/mach-exynos/Kconfig17
-rw-r--r--arch/arm/mach-exynos/dev-uart.c1
-rw-r--r--arch/arm/mach-exynos/include/mach/irqs.h5
-rw-r--r--arch/arm/mach-exynos/mach-armlex4210.c1
-rw-r--r--arch/arm/mach-exynos/mach-nuri.c1
-rw-r--r--arch/arm/mach-exynos/mach-origen.c1
-rw-r--r--arch/arm/mach-exynos/mach-smdk4x12.c1
-rw-r--r--arch/arm/mach-exynos/mach-smdkv310.c1
-rw-r--r--arch/arm/mach-exynos/setup-sdhci-gpio.c2
-rw-r--r--arch/arm/mach-highbank/Kconfig1
-rw-r--r--arch/arm/mach-imx/Kconfig3
-rw-r--r--arch/arm/mach-msm/Kconfig7
-rw-r--r--arch/arm/mach-mxs/Kconfig22
-rw-r--r--arch/arm/mach-mxs/Makefile2
-rw-r--r--arch/arm/mach-mxs/Makefile.boot1
-rw-r--r--arch/arm/mach-mxs/include/mach/timex.h21
-rw-r--r--arch/arm/mach-mxs/include/mach/uncompress.h76
-rw-r--r--arch/arm/mach-mxs/mach-mxs.c3
-rw-r--r--arch/arm/mach-mxs/pm.c4
-rw-r--r--arch/arm/mach-mxs/pm.h14
-rw-r--r--arch/arm/mach-nomadik/Kconfig25
-rw-r--r--arch/arm/mach-nomadik/Makefile.boot4
-rw-r--r--arch/arm/mach-nomadik/cpu-8815.c1
-rw-r--r--arch/arm/mach-nomadik/include/mach/irqs.h79
-rw-r--r--arch/arm/mach-nomadik/include/mach/timex.h6
-rw-r--r--arch/arm/mach-nomadik/include/mach/uncompress.h60
-rw-r--r--arch/arm/mach-omap2/Kconfig2
-rw-r--r--arch/arm/mach-prima2/Kconfig13
-rw-r--r--arch/arm/mach-prima2/Makefile5
-rw-r--r--arch/arm/mach-prima2/common.c26
-rw-r--r--arch/arm/mach-prima2/common.h4
-rw-r--r--arch/arm/mach-prima2/include/mach/clkdev.h15
-rw-r--r--arch/arm/mach-prima2/include/mach/debug-macro.S29
-rw-r--r--arch/arm/mach-prima2/include/mach/entry-macro.S22
-rw-r--r--arch/arm/mach-prima2/include/mach/hardware.h15
-rw-r--r--arch/arm/mach-prima2/include/mach/irqs.h17
-rw-r--r--arch/arm/mach-prima2/include/mach/map.h18
-rw-r--r--arch/arm/mach-prima2/include/mach/timex.h14
-rw-r--r--arch/arm/mach-prima2/include/mach/uncompress.h41
-rw-r--r--arch/arm/mach-prima2/irq.c129
-rw-r--r--arch/arm/mach-prima2/lluart.c14
-rw-r--r--arch/arm/mach-prima2/platsmp.c1
-rw-r--r--arch/arm/mach-prima2/timer-marco.c316
-rw-r--r--arch/arm/mach-prima2/timer-prima2.c241
-rw-r--r--arch/arm/mach-realview/Kconfig8
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s5p64x0/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s5pc100/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s5pc100/setup-sdhci-gpio.c1
-rw-r--r--arch/arm/mach-s5pv210/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-s5pv210/setup-sdhci-gpio.c1
-rw-r--r--arch/arm/mach-spear/Kconfig105
-rw-r--r--arch/arm/mach-spear/Makefile26
-rw-r--r--arch/arm/mach-spear/Makefile.boot (renamed from arch/arm/mach-spear13xx/Makefile.boot)0
-rw-r--r--arch/arm/mach-spear/generic.h (renamed from arch/arm/mach-spear13xx/include/mach/generic.h)30
-rw-r--r--arch/arm/mach-spear/headsmp.S (renamed from arch/arm/mach-spear13xx/headsmp.S)0
-rw-r--r--arch/arm/mach-spear/hotplug.c (renamed from arch/arm/mach-spear13xx/hotplug.c)0
-rw-r--r--arch/arm/mach-spear/include/mach/debug-macro.S (renamed from arch/arm/plat-spear/include/plat/debug-macro.S)0
-rw-r--r--arch/arm/mach-spear/include/mach/irqs.h (renamed from arch/arm/mach-spear6xx/include/mach/irqs.h)22
-rw-r--r--arch/arm/mach-spear/include/mach/misc_regs.h (renamed from arch/arm/mach-spear3xx/include/mach/misc_regs.h)2
-rw-r--r--arch/arm/mach-spear/include/mach/spear.h95
-rw-r--r--arch/arm/mach-spear/include/mach/timex.h (renamed from arch/arm/plat-spear/include/plat/timex.h)0
-rw-r--r--arch/arm/mach-spear/include/mach/uncompress.h (renamed from arch/arm/plat-spear/include/plat/uncompress.h)0
-rw-r--r--arch/arm/mach-spear/pl080.c (renamed from arch/arm/plat-spear/pl080.c)0
-rw-r--r--arch/arm/mach-spear/pl080.h (renamed from arch/arm/plat-spear/include/plat/pl080.h)0
-rw-r--r--arch/arm/mach-spear/platsmp.c (renamed from arch/arm/mach-spear13xx/platsmp.c)2
-rw-r--r--arch/arm/mach-spear/restart.c (renamed from arch/arm/plat-spear/restart.c)5
-rw-r--r--arch/arm/mach-spear/spear1310.c (renamed from arch/arm/mach-spear13xx/spear1310.c)4
-rw-r--r--arch/arm/mach-spear/spear1340.c (renamed from arch/arm/mach-spear13xx/spear1340.c)5
-rw-r--r--arch/arm/mach-spear/spear13xx-dma.h (renamed from arch/arm/mach-spear13xx/include/mach/dma.h)0
-rw-r--r--arch/arm/mach-spear/spear13xx.c (renamed from arch/arm/mach-spear13xx/spear13xx.c)9
-rw-r--r--arch/arm/mach-spear/spear300.c (renamed from arch/arm/mach-spear3xx/spear300.c)4
-rw-r--r--arch/arm/mach-spear/spear310.c (renamed from arch/arm/mach-spear3xx/spear310.c)4
-rw-r--r--arch/arm/mach-spear/spear320.c (renamed from arch/arm/mach-spear3xx/spear320.c)7
-rw-r--r--arch/arm/mach-spear/spear3xx.c (renamed from arch/arm/mach-spear3xx/spear3xx.c)17
-rw-r--r--arch/arm/mach-spear/spear6xx.c (renamed from arch/arm/mach-spear6xx/spear6xx.c)25
-rw-r--r--arch/arm/mach-spear/time.c (renamed from arch/arm/plat-spear/time.c)2
-rw-r--r--arch/arm/mach-spear13xx/Kconfig20
-rw-r--r--arch/arm/mach-spear13xx/Makefile10
-rw-r--r--arch/arm/mach-spear13xx/include/mach/debug-macro.S14
-rw-r--r--arch/arm/mach-spear13xx/include/mach/hardware.h1
-rw-r--r--arch/arm/mach-spear13xx/include/mach/irqs.h20
-rw-r--r--arch/arm/mach-spear13xx/include/mach/spear.h54
-rw-r--r--arch/arm/mach-spear13xx/include/mach/timex.h19
-rw-r--r--arch/arm/mach-spear13xx/include/mach/uncompress.h19
-rw-r--r--arch/arm/mach-spear3xx/Kconfig26
-rw-r--r--arch/arm/mach-spear3xx/Makefile15
-rw-r--r--arch/arm/mach-spear3xx/Makefile.boot3
-rw-r--r--arch/arm/mach-spear3xx/include/mach/debug-macro.S14
-rw-r--r--arch/arm/mach-spear3xx/include/mach/generic.h36
-rw-r--r--arch/arm/mach-spear3xx/include/mach/hardware.h1
-rw-r--r--arch/arm/mach-spear3xx/include/mach/irqs.h19
-rw-r--r--arch/arm/mach-spear3xx/include/mach/spear.h60
-rw-r--r--arch/arm/mach-spear3xx/include/mach/timex.h19
-rw-r--r--arch/arm/mach-spear3xx/include/mach/uncompress.h19
-rw-r--r--arch/arm/mach-spear6xx/Kconfig10
-rw-r--r--arch/arm/mach-spear6xx/Makefile6
-rw-r--r--arch/arm/mach-spear6xx/Makefile.boot3
-rw-r--r--arch/arm/mach-spear6xx/include/mach/debug-macro.S14
-rw-r--r--arch/arm/mach-spear6xx/include/mach/generic.h23
-rw-r--r--arch/arm/mach-spear6xx/include/mach/hardware.h1
-rw-r--r--arch/arm/mach-spear6xx/include/mach/misc_regs.h22
-rw-r--r--arch/arm/mach-spear6xx/include/mach/spear.h46
-rw-r--r--arch/arm/mach-spear6xx/include/mach/timex.h19
-rw-r--r--arch/arm/mach-spear6xx/include/mach/uncompress.h19
-rw-r--r--arch/arm/mach-tegra/Kconfig29
-rw-r--r--arch/arm/mach-tegra/Makefile2
-rw-r--r--arch/arm/mach-tegra/Makefile.boot3
-rw-r--r--arch/arm/mach-tegra/board.h1
-rw-r--r--arch/arm/mach-tegra/common.c2
-rw-r--r--arch/arm/mach-tegra/include/mach/powergate.h54
-rw-r--r--arch/arm/mach-tegra/include/mach/timex.h26
-rw-r--r--arch/arm/mach-tegra/include/mach/uncompress.h175
-rw-r--r--arch/arm/mach-tegra/pcie.c3
-rw-r--r--arch/arm/mach-tegra/powergate.c3
-rw-r--r--arch/arm/mach-ux500/Kconfig16
-rw-r--r--arch/arm/mach-ux500/Makefile4
-rw-r--r--arch/arm/mach-ux500/board-mop500-audio.c7
-rw-r--r--arch/arm/mach-ux500/board-mop500-pins.c2
-rw-r--r--arch/arm/mach-ux500/board-mop500-sdi.c4
-rw-r--r--arch/arm/mach-ux500/board-mop500-u8500uib.c9
-rw-r--r--arch/arm/mach-ux500/board-mop500-uib.c1
-rw-r--r--arch/arm/mach-ux500/board-mop500.c66
-rw-r--r--arch/arm/mach-ux500/board-mop500.h4
-rw-r--r--arch/arm/mach-ux500/cache-l2x0.c2
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c12
-rw-r--r--arch/arm/mach-ux500/cpu.c33
-rw-r--r--arch/arm/mach-ux500/cpuidle.c5
-rw-r--r--arch/arm/mach-ux500/db8500-regs.h (renamed from arch/arm/mach-ux500/include/mach/db8500-regs.h)28
-rw-r--r--arch/arm/mach-ux500/devices-common.c3
-rw-r--r--arch/arm/mach-ux500/devices-db8500.c8
-rw-r--r--arch/arm/mach-ux500/devices-db8500.h3
-rw-r--r--arch/arm/mach-ux500/devices.c5
-rw-r--r--arch/arm/mach-ux500/devices.h (renamed from arch/arm/mach-ux500/include/mach/devices.h)0
-rw-r--r--arch/arm/mach-ux500/hotplug.c2
-rw-r--r--arch/arm/mach-ux500/id.c4
-rw-r--r--arch/arm/mach-ux500/include/mach/debug-macro.S39
-rw-r--r--arch/arm/mach-ux500/include/mach/hardware.h47
-rw-r--r--arch/arm/mach-ux500/include/mach/msp.h27
-rw-r--r--arch/arm/mach-ux500/include/mach/timex.h6
-rw-r--r--arch/arm/mach-ux500/include/mach/uncompress.h57
-rw-r--r--arch/arm/mach-ux500/irqs-board-mop500.h (renamed from arch/arm/mach-ux500/include/mach/irqs-board-mop500.h)0
-rw-r--r--arch/arm/mach-ux500/irqs-db8500.h (renamed from arch/arm/mach-ux500/include/mach/irqs-db8500.h)25
-rw-r--r--arch/arm/mach-ux500/irqs.h (renamed from arch/arm/mach-ux500/include/mach/irqs.h)6
-rw-r--r--arch/arm/mach-ux500/platsmp.c4
-rw-r--r--arch/arm/mach-ux500/pm.c167
-rw-r--r--arch/arm/mach-ux500/setup.h (renamed from arch/arm/mach-ux500/include/mach/setup.h)0
-rw-r--r--arch/arm/mach-ux500/timer.c6
-rw-r--r--arch/arm/mach-ux500/usb.c2
-rw-r--r--arch/arm/mach-vexpress/Kconfig2
-rw-r--r--arch/arm/mach-zynq/Kconfig2
-rw-r--r--arch/arm/plat-samsung/devs.c45
-rw-r--r--arch/arm/plat-samsung/include/plat/regs-onenand.h63
-rw-r--r--arch/arm/plat-samsung/include/plat/regs-rtc.h71
-rw-r--r--arch/arm/plat-samsung/include/plat/regs-sdhci.h87
-rw-r--r--arch/arm/plat-samsung/include/plat/sdhci.h56
-rw-r--r--arch/arm/plat-samsung/irq-vic-timer.c1
-rw-r--r--arch/arm/plat-samsung/pm.c1
-rw-r--r--arch/arm/plat-samsung/s5p-dev-mfc.c42
-rw-r--r--arch/arm/plat-samsung/s5p-irq.c1
-rw-r--r--arch/arm/plat-spear/Kconfig47
-rw-r--r--arch/arm/plat-spear/Makefile9
200 files changed, 1150 insertions, 3098 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index bf11bf5427da..4ed24b4aa714 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -362,37 +362,6 @@ config ARCH_AT91
362 This enables support for systems based on Atmel 362 This enables support for systems based on Atmel
363 AT91RM9200 and AT91SAM9* processors. 363 AT91RM9200 and AT91SAM9* processors.
364 364
365config ARCH_BCM2835
366 bool "Broadcom BCM2835 family"
367 select ARCH_REQUIRE_GPIOLIB
368 select ARM_AMBA
369 select ARM_ERRATA_411920
370 select ARM_TIMER_SP804
371 select CLKDEV_LOOKUP
372 select CLKSRC_OF
373 select COMMON_CLK
374 select CPU_V6
375 select GENERIC_CLOCKEVENTS
376 select MULTI_IRQ_HANDLER
377 select PINCTRL
378 select PINCTRL_BCM2835
379 select SPARSE_IRQ
380 select USE_OF
381 help
382 This enables support for the Broadcom BCM2835 SoC. This SoC is
383 use in the Raspberry Pi, and Roku 2 devices.
384
385config ARCH_CNS3XXX
386 bool "Cavium Networks CNS3XXX family"
387 select ARM_GIC
388 select CPU_V6K
389 select GENERIC_CLOCKEVENTS
390 select MIGHT_HAVE_CACHE_L2X0
391 select MIGHT_HAVE_PCI
392 select PCI_DOMAINS if PCI
393 help
394 Support for Cavium Networks CNS3XXX platform.
395
396config ARCH_CLPS711X 365config ARCH_CLPS711X
397 bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" 366 bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
398 select ARCH_REQUIRE_GPIOLIB 367 select ARCH_REQUIRE_GPIOLIB
@@ -416,21 +385,6 @@ config ARCH_GEMINI
416 help 385 help
417 Support for the Cortina Systems Gemini family SoCs 386 Support for the Cortina Systems Gemini family SoCs
418 387
419config ARCH_SIRF
420 bool "CSR SiRF"
421 select ARCH_REQUIRE_GPIOLIB
422 select AUTO_ZRELADDR
423 select COMMON_CLK
424 select GENERIC_CLOCKEVENTS
425 select GENERIC_IRQ_CHIP
426 select MIGHT_HAVE_CACHE_L2X0
427 select NO_IOPORT
428 select PINCTRL
429 select PINCTRL_SIRF
430 select USE_OF
431 help
432 Support for CSR SiRFprimaII/Marco/Polo platforms
433
434config ARCH_EBSA110 388config ARCH_EBSA110
435 bool "EBSA-110" 389 bool "EBSA-110"
436 select ARCH_USES_GETTIMEOFFSET 390 select ARCH_USES_GETTIMEOFFSET
@@ -470,23 +424,6 @@ config ARCH_FOOTBRIDGE
470 Support for systems based on the DC21285 companion chip 424 Support for systems based on the DC21285 companion chip
471 ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. 425 ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
472 426
473config ARCH_MXS
474 bool "Freescale MXS-based"
475 select ARCH_REQUIRE_GPIOLIB
476 select CLKDEV_LOOKUP
477 select CLKSRC_MMIO
478 select CLKSRC_OF
479 select COMMON_CLK
480 select GENERIC_CLOCKEVENTS
481 select HAVE_CLK_PREPARE
482 select MULTI_IRQ_HANDLER
483 select PINCTRL
484 select SPARSE_IRQ
485 select STMP_DEVICE
486 select USE_OF
487 help
488 Support for Freescale MXS-based family of processors
489
490config ARCH_NETX 427config ARCH_NETX
491 bool "Hilscher NetX based" 428 bool "Hilscher NetX based"
492 select ARM_VIC 429 select ARM_VIC
@@ -659,25 +596,6 @@ config ARCH_LPC32XX
659 help 596 help
660 Support for the NXP LPC32XX family of processors 597 Support for the NXP LPC32XX family of processors
661 598
662config ARCH_TEGRA
663 bool "NVIDIA Tegra"
664 select ARCH_HAS_CPUFREQ
665 select ARCH_REQUIRE_GPIOLIB
666 select CLKDEV_LOOKUP
667 select CLKSRC_MMIO
668 select CLKSRC_OF
669 select COMMON_CLK
670 select GENERIC_CLOCKEVENTS
671 select HAVE_CLK
672 select HAVE_SMP
673 select MIGHT_HAVE_CACHE_L2X0
674 select SOC_BUS
675 select SPARSE_IRQ
676 select USE_OF
677 help
678 This enables support for NVIDIA Tegra based systems (Tegra APX,
679 Tegra 6xx and Tegra 2 series).
680
681config ARCH_PXA 599config ARCH_PXA
682 bool "PXA2xx/PXA3xx-based" 600 bool "PXA2xx/PXA3xx-based"
683 depends on MMU 601 depends on MMU
@@ -715,6 +633,8 @@ config ARCH_SHMOBILE
715 bool "Renesas SH-Mobile / R-Mobile" 633 bool "Renesas SH-Mobile / R-Mobile"
716 select CLKDEV_LOOKUP 634 select CLKDEV_LOOKUP
717 select GENERIC_CLOCKEVENTS 635 select GENERIC_CLOCKEVENTS
636 select HAVE_ARM_SCU if SMP
637 select HAVE_ARM_TWD if LOCAL_TIMERS
718 select HAVE_CLK 638 select HAVE_CLK
719 select HAVE_MACH_CLKDEV 639 select HAVE_MACH_CLKDEV
720 select HAVE_SMP 640 select HAVE_SMP
@@ -900,51 +820,6 @@ config ARCH_U300
900 help 820 help
901 Support for ST-Ericsson U300 series mobile platforms. 821 Support for ST-Ericsson U300 series mobile platforms.
902 822
903config ARCH_U8500
904 bool "ST-Ericsson U8500 Series"
905 depends on MMU
906 select ARCH_HAS_CPUFREQ
907 select ARCH_REQUIRE_GPIOLIB
908 select ARM_AMBA
909 select CLKDEV_LOOKUP
910 select CPU_V7
911 select GENERIC_CLOCKEVENTS
912 select HAVE_SMP
913 select MIGHT_HAVE_CACHE_L2X0
914 select SPARSE_IRQ
915 help
916 Support for ST-Ericsson's Ux500 architecture
917
918config ARCH_NOMADIK
919 bool "STMicroelectronics Nomadik"
920 select ARCH_REQUIRE_GPIOLIB
921 select ARM_AMBA
922 select ARM_VIC
923 select CLKSRC_NOMADIK_MTU
924 select COMMON_CLK
925 select CPU_ARM926T
926 select GENERIC_CLOCKEVENTS
927 select MIGHT_HAVE_CACHE_L2X0
928 select USE_OF
929 select PINCTRL
930 select PINCTRL_STN8815
931 select SPARSE_IRQ
932 help
933 Support for the Nomadik platform by ST-Ericsson
934
935config PLAT_SPEAR
936 bool "ST SPEAr"
937 select ARCH_HAS_CPUFREQ
938 select ARCH_REQUIRE_GPIOLIB
939 select ARM_AMBA
940 select CLKDEV_LOOKUP
941 select CLKSRC_MMIO
942 select COMMON_CLK
943 select GENERIC_CLOCKEVENTS
944 select HAVE_CLK
945 help
946 Support for ST's SPEAr platform (SPEAr3xx, SPEAr6xx and SPEAr13xx).
947
948config ARCH_DAVINCI 823config ARCH_DAVINCI
949 bool "TI DaVinci" 824 bool "TI DaVinci"
950 select ARCH_HAS_HOLES_MEMORYMODEL 825 select ARCH_HAS_HOLES_MEMORYMODEL
@@ -1036,6 +911,8 @@ source "arch/arm/mach-at91/Kconfig"
1036 911
1037source "arch/arm/mach-bcm/Kconfig" 912source "arch/arm/mach-bcm/Kconfig"
1038 913
914source "arch/arm/mach-bcm2835/Kconfig"
915
1039source "arch/arm/mach-clps711x/Kconfig" 916source "arch/arm/mach-clps711x/Kconfig"
1040 917
1041source "arch/arm/mach-cns3xxx/Kconfig" 918source "arch/arm/mach-cns3xxx/Kconfig"
@@ -1101,7 +978,7 @@ source "arch/arm/plat-samsung/Kconfig"
1101 978
1102source "arch/arm/mach-socfpga/Kconfig" 979source "arch/arm/mach-socfpga/Kconfig"
1103 980
1104source "arch/arm/plat-spear/Kconfig" 981source "arch/arm/mach-spear/Kconfig"
1105 982
1106source "arch/arm/mach-s3c24xx/Kconfig" 983source "arch/arm/mach-s3c24xx/Kconfig"
1107 984
@@ -1528,7 +1405,6 @@ config SMP
1528 depends on GENERIC_CLOCKEVENTS 1405 depends on GENERIC_CLOCKEVENTS
1529 depends on HAVE_SMP 1406 depends on HAVE_SMP
1530 depends on MMU 1407 depends on MMU
1531 select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP
1532 select USE_GENERIC_SMP_HELPERS 1408 select USE_GENERIC_SMP_HELPERS
1533 help 1409 help
1534 This enables support for systems with more than one CPU. If you have 1410 This enables support for systems with more than one CPU. If you have
@@ -1653,7 +1529,6 @@ config LOCAL_TIMERS
1653 bool "Use local timer interrupts" 1529 bool "Use local timer interrupts"
1654 depends on SMP 1530 depends on SMP
1655 default y 1531 default y
1656 select HAVE_ARM_TWD if (!ARCH_MSM_SCORPIONMP && !EXYNOS4_MCT)
1657 help 1532 help
1658 Enable support for local timers on SMP platforms, rather then the 1533 Enable support for local timers on SMP platforms, rather then the
1659 legacy IPI broadcast method. Local timers allows the system 1534 legacy IPI broadcast method. Local timers allows the system
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 9b31f4311ea2..54d6fdc03e04 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -89,6 +89,10 @@ choice
89 bool "Kernel low-level debugging on 9263 and 9g45" 89 bool "Kernel low-level debugging on 9263 and 9g45"
90 depends on HAVE_AT91_DBGU1 90 depends on HAVE_AT91_DBGU1
91 91
92 config DEBUG_BCM2835
93 bool "Kernel low-level debugging on BCM2835 PL011 UART"
94 depends on ARCH_BCM2835
95
92 config DEBUG_CLPS711X_UART1 96 config DEBUG_CLPS711X_UART1
93 bool "Kernel low-level debugging messages via UART1" 97 bool "Kernel low-level debugging messages via UART1"
94 depends on ARCH_CLPS711X 98 depends on ARCH_CLPS711X
@@ -103,6 +107,13 @@ choice
103 Say Y here if you want the debug print routines to direct 107 Say Y here if you want the debug print routines to direct
104 their output to the second serial port on these devices. 108 their output to the second serial port on these devices.
105 109
110 config DEBUG_CNS3XXX
111 bool "Kernel Kernel low-level debugging on Cavium Networks CNS3xxx"
112 depends on ARCH_CNS3XXX
113 help
114 Say Y here if you want the debug print routines to direct
115 their output to the CNS3xxx UART0.
116
106 config DEBUG_DAVINCI_DA8XX_UART1 117 config DEBUG_DAVINCI_DA8XX_UART1
107 bool "Kernel low-level debugging on DaVinci DA8XX using UART1" 118 bool "Kernel low-level debugging on DaVinci DA8XX using UART1"
108 depends on ARCH_DAVINCI_DA8XX 119 depends on ARCH_DAVINCI_DA8XX
@@ -298,6 +309,13 @@ choice
298 Say Y here if you want kernel low-level debugging support 309 Say Y here if you want kernel low-level debugging support
299 on MVEBU based platforms. 310 on MVEBU based platforms.
300 311
312 config DEBUG_NOMADIK_UART
313 bool "Kernel low-level debugging messages via NOMADIK UART"
314 depends on ARCH_NOMADIK
315 help
316 Say Y here if you want kernel low-level debugging support
317 on NOMADIK based platforms.
318
301 config DEBUG_OMAP2PLUS_UART 319 config DEBUG_OMAP2PLUS_UART
302 bool "Kernel low-level debugging messages via OMAP2PLUS UART" 320 bool "Kernel low-level debugging messages via OMAP2PLUS UART"
303 depends on ARCH_OMAP2PLUS 321 depends on ARCH_OMAP2PLUS
@@ -330,6 +348,7 @@ choice
330 348
331 config DEBUG_S3C_UART0 349 config DEBUG_S3C_UART0
332 depends on PLAT_SAMSUNG 350 depends on PLAT_SAMSUNG
351 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
333 bool "Use S3C UART 0 for low-level debug" 352 bool "Use S3C UART 0 for low-level debug"
334 help 353 help
335 Say Y here if you want the debug print routines to direct 354 Say Y here if you want the debug print routines to direct
@@ -341,6 +360,7 @@ choice
341 360
342 config DEBUG_S3C_UART1 361 config DEBUG_S3C_UART1
343 depends on PLAT_SAMSUNG 362 depends on PLAT_SAMSUNG
363 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
344 bool "Use S3C UART 1 for low-level debug" 364 bool "Use S3C UART 1 for low-level debug"
345 help 365 help
346 Say Y here if you want the debug print routines to direct 366 Say Y here if you want the debug print routines to direct
@@ -352,6 +372,7 @@ choice
352 372
353 config DEBUG_S3C_UART2 373 config DEBUG_S3C_UART2
354 depends on PLAT_SAMSUNG 374 depends on PLAT_SAMSUNG
375 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
355 bool "Use S3C UART 2 for low-level debug" 376 bool "Use S3C UART 2 for low-level debug"
356 help 377 help
357 Say Y here if you want the debug print routines to direct 378 Say Y here if you want the debug print routines to direct
@@ -363,6 +384,7 @@ choice
363 384
364 config DEBUG_S3C_UART3 385 config DEBUG_S3C_UART3
365 depends on PLAT_SAMSUNG && ARCH_EXYNOS 386 depends on PLAT_SAMSUNG && ARCH_EXYNOS
387 select DEBUG_EXYNOS_UART
366 bool "Use S3C UART 3 for low-level debug" 388 bool "Use S3C UART 3 for low-level debug"
367 help 389 help
368 Say Y here if you want the debug print routines to direct 390 Say Y here if you want the debug print routines to direct
@@ -414,6 +436,13 @@ choice
414 Say Y here if you want the debug print routines to direct 436 Say Y here if you want the debug print routines to direct
415 their output to the uart1 port on SiRFmarco devices. 437 their output to the uart1 port on SiRFmarco devices.
416 438
439 config DEBUG_UX500_UART
440 depends on ARCH_U8500
441 bool "Use Ux500 UART for low-level debug"
442 help
443 Say Y here if you want kernel low-level debugging support
444 on Ux500 based platforms.
445
417 config DEBUG_VEXPRESS_UART0_DETECT 446 config DEBUG_VEXPRESS_UART0_DETECT
418 bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" 447 bool "Autodetect UART0 on Versatile Express Cortex-A core tiles"
419 depends on ARCH_VEXPRESS && CPU_CP15_MMU 448 depends on ARCH_VEXPRESS && CPU_CP15_MMU
@@ -485,6 +514,9 @@ choice
485 514
486endchoice 515endchoice
487 516
517config DEBUG_EXYNOS_UART
518 bool
519
488config DEBUG_IMX_UART_PORT 520config DEBUG_IMX_UART_PORT
489 int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \ 521 int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \
490 DEBUG_IMX25_UART || \ 522 DEBUG_IMX25_UART || \
@@ -580,6 +612,9 @@ endchoice
580 612
581config DEBUG_LL_INCLUDE 613config DEBUG_LL_INCLUDE
582 string 614 string
615 default "debug/bcm2835.S" if DEBUG_BCM2835
616 default "debug/cns3xxx.S" if DEBUG_CNS3XXX
617 default "debug/exynos.S" if DEBUG_EXYNOS_UART
583 default "debug/icedcc.S" if DEBUG_ICEDCC 618 default "debug/icedcc.S" if DEBUG_ICEDCC
584 default "debug/imx.S" if DEBUG_IMX1_UART || \ 619 default "debug/imx.S" if DEBUG_IMX1_UART || \
585 DEBUG_IMX25_UART || \ 620 DEBUG_IMX25_UART || \
@@ -591,14 +626,18 @@ config DEBUG_LL_INCLUDE
591 DEBUG_IMX6Q_UART 626 DEBUG_IMX6Q_UART
592 default "debug/highbank.S" if DEBUG_HIGHBANK_UART 627 default "debug/highbank.S" if DEBUG_HIGHBANK_UART
593 default "debug/mvebu.S" if DEBUG_MVEBU_UART 628 default "debug/mvebu.S" if DEBUG_MVEBU_UART
629 default "debug/mxs.S" if DEBUG_IMX23_UART || DEBUG_IMX28_UART
630 default "debug/nomadik.S" if DEBUG_NOMADIK_UART
594 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART 631 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
595 default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART 632 default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART
633 default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1
596 default "debug/socfpga.S" if DEBUG_SOCFPGA_UART 634 default "debug/socfpga.S" if DEBUG_SOCFPGA_UART
597 default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1 635 default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1
598 default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ 636 default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \
599 DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 637 DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1
600 default "debug/vt8500.S" if DEBUG_VT8500_UART0 638 default "debug/vt8500.S" if DEBUG_VT8500_UART0
601 default "debug/tegra.S" if DEBUG_TEGRA_UART 639 default "debug/tegra.S" if DEBUG_TEGRA_UART
640 default "debug/ux500.S" if DEBUG_UX500_UART
602 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 641 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1
603 default "mach/debug-macro.S" 642 default "mach/debug-macro.S"
604 643
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index e4d1d23916b0..47374085befd 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -190,9 +190,7 @@ machine-$(CONFIG_ARCH_VT8500) += vt8500
190machine-$(CONFIG_ARCH_W90X900) += w90x900 190machine-$(CONFIG_ARCH_W90X900) += w90x900
191machine-$(CONFIG_FOOTBRIDGE) += footbridge 191machine-$(CONFIG_FOOTBRIDGE) += footbridge
192machine-$(CONFIG_ARCH_SOCFPGA) += socfpga 192machine-$(CONFIG_ARCH_SOCFPGA) += socfpga
193machine-$(CONFIG_ARCH_SPEAR13XX) += spear13xx 193machine-$(CONFIG_PLAT_SPEAR) += spear
194machine-$(CONFIG_ARCH_SPEAR3XX) += spear3xx
195machine-$(CONFIG_MACH_SPEAR600) += spear6xx
196machine-$(CONFIG_ARCH_VIRT) += virt 194machine-$(CONFIG_ARCH_VIRT) += virt
197machine-$(CONFIG_ARCH_ZYNQ) += zynq 195machine-$(CONFIG_ARCH_ZYNQ) += zynq
198machine-$(CONFIG_ARCH_SUNXI) += sunxi 196machine-$(CONFIG_ARCH_SUNXI) += sunxi
@@ -206,7 +204,6 @@ plat-$(CONFIG_PLAT_ORION) += orion
206plat-$(CONFIG_PLAT_PXA) += pxa 204plat-$(CONFIG_PLAT_PXA) += pxa
207plat-$(CONFIG_PLAT_S3C24XX) += samsung 205plat-$(CONFIG_PLAT_S3C24XX) += samsung
208plat-$(CONFIG_PLAT_S5P) += samsung 206plat-$(CONFIG_PLAT_S5P) += samsung
209plat-$(CONFIG_PLAT_SPEAR) += spear
210plat-$(CONFIG_PLAT_VERSATILE) += versatile 207plat-$(CONFIG_PLAT_VERSATILE) += versatile
211 208
212ifeq ($(CONFIG_ARCH_EBSA110),y) 209ifeq ($(CONFIG_ARCH_EBSA110),y)
diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig
index abc7c8d4631b..ce987211a609 100644
--- a/arch/arm/configs/bcm2835_defconfig
+++ b/arch/arm/configs/bcm2835_defconfig
@@ -29,6 +29,8 @@ CONFIG_EMBEDDED=y
29CONFIG_PROFILING=y 29CONFIG_PROFILING=y
30CONFIG_OPROFILE=y 30CONFIG_OPROFILE=y
31CONFIG_JUMP_LABEL=y 31CONFIG_JUMP_LABEL=y
32CONFIG_ARCH_MULTI_V6=y
33# CONFIG_ARCH_MULTI_V7 is not set
32CONFIG_ARCH_BCM2835=y 34CONFIG_ARCH_BCM2835=y
33CONFIG_PREEMPT_VOLUNTARY=y 35CONFIG_PREEMPT_VOLUNTARY=y
34CONFIG_AEABI=y 36CONFIG_AEABI=y
diff --git a/arch/arm/configs/cns3420vb_defconfig b/arch/arm/configs/cns3420vb_defconfig
index 313627adf46c..b1ff5cdba9a1 100644
--- a/arch/arm/configs/cns3420vb_defconfig
+++ b/arch/arm/configs/cns3420vb_defconfig
@@ -19,8 +19,11 @@ CONFIG_MODULE_FORCE_UNLOAD=y
19CONFIG_MODVERSIONS=y 19CONFIG_MODVERSIONS=y
20# CONFIG_BLK_DEV_BSG is not set 20# CONFIG_BLK_DEV_BSG is not set
21CONFIG_IOSCHED_CFQ=m 21CONFIG_IOSCHED_CFQ=m
22CONFIG_ARCH_MULTI_V6=y
23#CONFIG_ARCH_MULTI_V7 is not set
22CONFIG_ARCH_CNS3XXX=y 24CONFIG_ARCH_CNS3XXX=y
23CONFIG_MACH_CNS3420VB=y 25CONFIG_MACH_CNS3420VB=y
26CONFIG_DEBUG_CNS3XXX=y
24CONFIG_AEABI=y 27CONFIG_AEABI=y
25CONFIG_ZBOOT_ROM_TEXT=0x0 28CONFIG_ZBOOT_ROM_TEXT=0x0
26CONFIG_ZBOOT_ROM_BSS=0x0 29CONFIG_ZBOOT_ROM_BSS=0x0
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index e31d442343c8..2e67a272df70 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -3,13 +3,19 @@ CONFIG_NO_HZ=y
3CONFIG_HIGH_RES_TIMERS=y 3CONFIG_HIGH_RES_TIMERS=y
4CONFIG_ARCH_MVEBU=y 4CONFIG_ARCH_MVEBU=y
5CONFIG_MACH_ARMADA_370=y 5CONFIG_MACH_ARMADA_370=y
6CONFIG_ARCH_SIRF=y
6CONFIG_MACH_ARMADA_XP=y 7CONFIG_MACH_ARMADA_XP=y
7CONFIG_ARCH_HIGHBANK=y 8CONFIG_ARCH_HIGHBANK=y
8CONFIG_ARCH_SOCFPGA=y 9CONFIG_ARCH_SOCFPGA=y
9CONFIG_ARCH_SUNXI=y 10CONFIG_ARCH_SUNXI=y
11CONFIG_ARCH_WM8850=y
10# CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set 12# CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set
11CONFIG_ARCH_ZYNQ=y 13CONFIG_ARCH_ZYNQ=y
12CONFIG_ARM_ERRATA_754322=y 14CONFIG_ARM_ERRATA_754322=y
15CONFIG_PLAT_SPEAR=y
16CONFIG_ARCH_SPEAR13XX=y
17CONFIG_MACH_SPEAR1310=y
18CONFIG_MACH_SPEAR1340=y
13CONFIG_SMP=y 19CONFIG_SMP=y
14CONFIG_ARM_ARCH_TIMER=y 20CONFIG_ARM_ARCH_TIMER=y
15CONFIG_AEABI=y 21CONFIG_AEABI=y
@@ -23,6 +29,7 @@ CONFIG_BLK_DEV_SD=y
23CONFIG_ATA=y 29CONFIG_ATA=y
24CONFIG_SATA_HIGHBANK=y 30CONFIG_SATA_HIGHBANK=y
25CONFIG_SATA_MV=y 31CONFIG_SATA_MV=y
32CONFIG_SATA_AHCI_PLATFORM=y
26CONFIG_NETDEVICES=y 33CONFIG_NETDEVICES=y
27CONFIG_NET_CALXEDA_XGMAC=y 34CONFIG_NET_CALXEDA_XGMAC=y
28CONFIG_SMSC911X=y 35CONFIG_SMSC911X=y
@@ -31,17 +38,26 @@ CONFIG_SERIO_AMBAKMI=y
31CONFIG_SERIAL_8250=y 38CONFIG_SERIAL_8250=y
32CONFIG_SERIAL_8250_CONSOLE=y 39CONFIG_SERIAL_8250_CONSOLE=y
33CONFIG_SERIAL_8250_DW=y 40CONFIG_SERIAL_8250_DW=y
41CONFIG_KEYBOARD_SPEAR=y
34CONFIG_SERIAL_AMBA_PL011=y 42CONFIG_SERIAL_AMBA_PL011=y
35CONFIG_SERIAL_AMBA_PL011_CONSOLE=y 43CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
36CONFIG_SERIAL_OF_PLATFORM=y 44CONFIG_SERIAL_OF_PLATFORM=y
45CONFIG_SERIAL_SIRFSOC=y
46CONFIG_SERIAL_SIRFSOC_CONSOLE=y
47CONFIG_SERIAL_VT8500=y
48CONFIG_SERIAL_VT8500_CONSOLE=y
37CONFIG_IPMI_HANDLER=y 49CONFIG_IPMI_HANDLER=y
38CONFIG_IPMI_SI=y 50CONFIG_IPMI_SI=y
39CONFIG_I2C=y 51CONFIG_I2C=y
40CONFIG_I2C_DESIGNWARE_PLATFORM=y 52CONFIG_I2C_DESIGNWARE_PLATFORM=y
53CONFIG_I2C_SIRF=y
41CONFIG_SPI=y 54CONFIG_SPI=y
42CONFIG_SPI_PL022=y 55CONFIG_SPI_PL022=y
56CONFIG_SPI_SIRF=y
57CONFIG_GPIO_PL061=y
43CONFIG_FB=y 58CONFIG_FB=y
44CONFIG_FB_ARMCLCD=y 59CONFIG_FB_ARMCLCD=y
60CONFIG_FB_WM8505=y
45CONFIG_FRAMEBUFFER_CONSOLE=y 61CONFIG_FRAMEBUFFER_CONSOLE=y
46CONFIG_USB=y 62CONFIG_USB=y
47CONFIG_USB_ISP1760_HCD=y 63CONFIG_USB_ISP1760_HCD=y
@@ -50,11 +66,18 @@ CONFIG_MMC=y
50CONFIG_MMC_ARMMMCI=y 66CONFIG_MMC_ARMMMCI=y
51CONFIG_MMC_SDHCI=y 67CONFIG_MMC_SDHCI=y
52CONFIG_MMC_SDHCI_PLTFM=y 68CONFIG_MMC_SDHCI_PLTFM=y
69CONFIG_MMC_SDHCI_SPEAR=y
70CONFIG_MMC_WMT=y
53CONFIG_EDAC=y 71CONFIG_EDAC=y
54CONFIG_EDAC_MM_EDAC=y 72CONFIG_EDAC_MM_EDAC=y
55CONFIG_EDAC_HIGHBANK_MC=y 73CONFIG_EDAC_HIGHBANK_MC=y
56CONFIG_EDAC_HIGHBANK_L2=y 74CONFIG_EDAC_HIGHBANK_L2=y
57CONFIG_RTC_CLASS=y 75CONFIG_RTC_CLASS=y
58CONFIG_RTC_DRV_PL031=y 76CONFIG_RTC_DRV_PL031=y
77CONFIG_RTC_DRV_VT8500=y
78CONFIG_PWM=y
79CONFIG_PWM_VT8500=y
59CONFIG_DMADEVICES=y 80CONFIG_DMADEVICES=y
60CONFIG_PL330_DMA=y 81CONFIG_PL330_DMA=y
82CONFIG_SIRF_DMA=y
83CONFIG_DW_DMAC=y
diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig
index 7ba48d22bcd9..1d6d8fb7f4a1 100644
--- a/arch/arm/configs/mxs_defconfig
+++ b/arch/arm/configs/mxs_defconfig
@@ -22,8 +22,8 @@ CONFIG_MODVERSIONS=y
22CONFIG_BLK_DEV_INTEGRITY=y 22CONFIG_BLK_DEV_INTEGRITY=y
23# CONFIG_IOSCHED_DEADLINE is not set 23# CONFIG_IOSCHED_DEADLINE is not set
24# CONFIG_IOSCHED_CFQ is not set 24# CONFIG_IOSCHED_CFQ is not set
25# CONFIG_ARCH_MULTI_V7 is not set
25CONFIG_ARCH_MXS=y 26CONFIG_ARCH_MXS=y
26CONFIG_MACH_MXS_DT=y
27# CONFIG_ARM_THUMB is not set 27# CONFIG_ARM_THUMB is not set
28CONFIG_PREEMPT_VOLUNTARY=y 28CONFIG_PREEMPT_VOLUNTARY=y
29CONFIG_AEABI=y 29CONFIG_AEABI=y
diff --git a/arch/arm/configs/nhk8815_defconfig b/arch/arm/configs/nhk8815_defconfig
index 86cfd2959c47..b01e7632ed2e 100644
--- a/arch/arm/configs/nhk8815_defconfig
+++ b/arch/arm/configs/nhk8815_defconfig
@@ -1,11 +1,9 @@
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_IKCONFIG=y 4CONFIG_IKCONFIG=y
6CONFIG_IKCONFIG_PROC=y 5CONFIG_IKCONFIG_PROC=y
7CONFIG_LOG_BUF_SHIFT=14 6CONFIG_LOG_BUF_SHIFT=14
8CONFIG_SYSFS_DEPRECATED_V2=y
9CONFIG_BLK_DEV_INITRD=y 7CONFIG_BLK_DEV_INITRD=y
10CONFIG_EXPERT=y 8CONFIG_EXPERT=y
11CONFIG_KALLSYMS_ALL=y 9CONFIG_KALLSYMS_ALL=y
@@ -13,6 +11,7 @@ CONFIG_SLAB=y
13CONFIG_MODULES=y 11CONFIG_MODULES=y
14CONFIG_MODULE_UNLOAD=y 12CONFIG_MODULE_UNLOAD=y
15# CONFIG_BLK_DEV_BSG is not set 13# CONFIG_BLK_DEV_BSG is not set
14# CONFIG_ARCH_MULTI_V7 is not set
16CONFIG_ARCH_NOMADIK=y 15CONFIG_ARCH_NOMADIK=y
17CONFIG_MACH_NOMADIK_8815NHK=y 16CONFIG_MACH_NOMADIK_8815NHK=y
18CONFIG_PREEMPT=y 17CONFIG_PREEMPT=y
@@ -20,7 +19,6 @@ CONFIG_AEABI=y
20CONFIG_ZBOOT_ROM_TEXT=0x0 19CONFIG_ZBOOT_ROM_TEXT=0x0
21CONFIG_ZBOOT_ROM_BSS=0x0 20CONFIG_ZBOOT_ROM_BSS=0x0
22CONFIG_FPE_NWFPE=y 21CONFIG_FPE_NWFPE=y
23CONFIG_PM=y
24CONFIG_NET=y 22CONFIG_NET=y
25CONFIG_PACKET=y 23CONFIG_PACKET=y
26CONFIG_UNIX=y 24CONFIG_UNIX=y
@@ -32,14 +30,10 @@ CONFIG_IP_PNP=y
32CONFIG_IP_PNP_DHCP=y 30CONFIG_IP_PNP_DHCP=y
33CONFIG_IP_PNP_BOOTP=y 31CONFIG_IP_PNP_BOOTP=y
34CONFIG_NET_IPIP=y 32CONFIG_NET_IPIP=y
35CONFIG_NET_IPGRE=y
36CONFIG_NET_IPGRE_BROADCAST=y
37CONFIG_IP_MROUTE=y 33CONFIG_IP_MROUTE=y
38# CONFIG_INET_LRO is not set 34# CONFIG_INET_LRO is not set
39# CONFIG_IPV6 is not set 35# CONFIG_IPV6 is not set
40CONFIG_BT=m 36CONFIG_BT=m
41CONFIG_BT_L2CAP=m
42CONFIG_BT_SCO=m
43CONFIG_BT_RFCOMM=m 37CONFIG_BT_RFCOMM=m
44CONFIG_BT_RFCOMM_TTY=y 38CONFIG_BT_RFCOMM_TTY=y
45CONFIG_BT_BNEP=m 39CONFIG_BT_BNEP=m
@@ -53,14 +47,16 @@ CONFIG_BT_HCIVHCI=m
53CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 47CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
54CONFIG_MTD=y 48CONFIG_MTD=y
55CONFIG_MTD_TESTS=m 49CONFIG_MTD_TESTS=m
50CONFIG_MTD_CMDLINE_PARTS=y
56CONFIG_MTD_CHAR=y 51CONFIG_MTD_CHAR=y
57CONFIG_MTD_BLOCK=y 52CONFIG_MTD_BLOCK=y
58CONFIG_MTD_NAND=y
59CONFIG_MTD_NAND_ECC_SMC=y 53CONFIG_MTD_NAND_ECC_SMC=y
54CONFIG_MTD_NAND=y
60CONFIG_MTD_NAND_FSMC=y 55CONFIG_MTD_NAND_FSMC=y
61CONFIG_MTD_ONENAND=y 56CONFIG_MTD_ONENAND=y
62CONFIG_MTD_ONENAND_VERIFY_WRITE=y 57CONFIG_MTD_ONENAND_VERIFY_WRITE=y
63CONFIG_MTD_ONENAND_GENERIC=y 58CONFIG_MTD_ONENAND_GENERIC=y
59CONFIG_PROC_DEVICETREE=y
64CONFIG_BLK_DEV_LOOP=y 60CONFIG_BLK_DEV_LOOP=y
65CONFIG_BLK_DEV_CRYPTOLOOP=y 61CONFIG_BLK_DEV_CRYPTOLOOP=y
66CONFIG_BLK_DEV_RAM=y 62CONFIG_BLK_DEV_RAM=y
@@ -72,47 +68,48 @@ CONFIG_SCSI_CONSTANTS=y
72CONFIG_SCSI_LOGGING=y 68CONFIG_SCSI_LOGGING=y
73CONFIG_SCSI_SCAN_ASYNC=y 69CONFIG_SCSI_SCAN_ASYNC=y
74CONFIG_NETDEVICES=y 70CONFIG_NETDEVICES=y
71CONFIG_NETCONSOLE=m
75CONFIG_TUN=y 72CONFIG_TUN=y
76CONFIG_NET_ETHERNET=y
77CONFIG_SMC91X=y 73CONFIG_SMC91X=y
78CONFIG_PPP=m 74CONFIG_PPP=m
79CONFIG_PPP_ASYNC=m
80CONFIG_PPP_SYNC_TTY=m
81CONFIG_PPP_DEFLATE=m
82CONFIG_PPP_BSDCOMP=m 75CONFIG_PPP_BSDCOMP=m
76CONFIG_PPP_DEFLATE=m
83CONFIG_PPP_MPPE=m 77CONFIG_PPP_MPPE=m
84CONFIG_PPPOE=m 78CONFIG_PPPOE=m
85CONFIG_NETCONSOLE=m 79CONFIG_PPP_ASYNC=m
80CONFIG_PPP_SYNC_TTY=m
86# CONFIG_INPUT_MOUSEDEV is not set 81# CONFIG_INPUT_MOUSEDEV is not set
87CONFIG_INPUT_EVDEV=y 82CONFIG_INPUT_EVDEV=y
88# CONFIG_KEYBOARD_ATKBD is not set 83# CONFIG_KEYBOARD_ATKBD is not set
89# CONFIG_MOUSE_PS2 is not set 84# CONFIG_MOUSE_PS2 is not set
90# CONFIG_SERIO is not set 85# CONFIG_SERIO is not set
86# CONFIG_LEGACY_PTYS is not set
91CONFIG_SERIAL_AMBA_PL011=y 87CONFIG_SERIAL_AMBA_PL011=y
92CONFIG_SERIAL_AMBA_PL011_CONSOLE=y 88CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
93# CONFIG_LEGACY_PTYS is not set 89CONFIG_HW_RANDOM=y
94# CONFIG_HW_RANDOM is not set 90CONFIG_HW_RANDOM_NOMADIK=y
95CONFIG_I2C=y
96CONFIG_I2C_CHARDEV=y 91CONFIG_I2C_CHARDEV=y
97CONFIG_I2C_GPIO=y 92CONFIG_I2C_GPIO=y
93CONFIG_I2C_NOMADIK=y
98CONFIG_DEBUG_GPIO=y 94CONFIG_DEBUG_GPIO=y
99CONFIG_PINCTRL_NOMADIK=y
100# CONFIG_HWMON is not set 95# CONFIG_HWMON is not set
101# CONFIG_VGA_CONSOLE is not set 96CONFIG_MMC=y
97CONFIG_MMC_CLKGATE=y
98CONFIG_MMC_ARMMMCI=y
102CONFIG_RTC_CLASS=y 99CONFIG_RTC_CLASS=y
100CONFIG_RTC_DRV_PL031=y
101CONFIG_DMADEVICES=y
102CONFIG_AMBA_PL08X=y
103CONFIG_EXT2_FS=y 103CONFIG_EXT2_FS=y
104CONFIG_EXT3_FS=y 104CONFIG_EXT3_FS=y
105CONFIG_INOTIFY=y
106CONFIG_FUSE_FS=y 105CONFIG_FUSE_FS=y
107CONFIG_MSDOS_FS=y 106CONFIG_MSDOS_FS=y
108CONFIG_VFAT_FS=y 107CONFIG_VFAT_FS=y
109CONFIG_TMPFS=y 108CONFIG_TMPFS=y
110CONFIG_JFFS2_FS=y 109CONFIG_JFFS2_FS=y
111CONFIG_NFS_FS=y 110CONFIG_NFS_FS=y
112CONFIG_NFS_V3=y
113CONFIG_NFS_V3_ACL=y 111CONFIG_NFS_V3_ACL=y
114CONFIG_ROOT_NFS=y 112CONFIG_ROOT_NFS=y
115CONFIG_SMB_FS=m
116CONFIG_CIFS=m 113CONFIG_CIFS=m
117CONFIG_CIFS_WEAK_PW_HASH=y 114CONFIG_CIFS_WEAK_PW_HASH=y
118CONFIG_NLS_CODEPAGE_437=y 115CONFIG_NLS_CODEPAGE_437=y
@@ -120,12 +117,11 @@ CONFIG_NLS_ASCII=y
120CONFIG_NLS_ISO8859_1=y 117CONFIG_NLS_ISO8859_1=y
121CONFIG_NLS_ISO8859_15=y 118CONFIG_NLS_ISO8859_15=y
122# CONFIG_ENABLE_MUST_CHECK is not set 119# CONFIG_ENABLE_MUST_CHECK is not set
123CONFIG_DEBUG_KERNEL=y 120CONFIG_DEBUG_FS=y
124# CONFIG_SCHED_DEBUG is not set 121# CONFIG_SCHED_DEBUG is not set
125# CONFIG_DEBUG_PREEMPT is not set 122# CONFIG_DEBUG_PREEMPT is not set
126# CONFIG_DEBUG_BUGVERBOSE is not set 123# CONFIG_DEBUG_BUGVERBOSE is not set
127CONFIG_DEBUG_INFO=y 124CONFIG_DEBUG_INFO=y
128# CONFIG_RCU_CPU_STALL_DETECTOR is not set
129CONFIG_CRYPTO_MD5=y 125CONFIG_CRYPTO_MD5=y
130CONFIG_CRYPTO_SHA1=y 126CONFIG_CRYPTO_SHA1=y
131CONFIG_CRYPTO_DES=y 127CONFIG_CRYPTO_DES=y
diff --git a/arch/arm/configs/spear3xx_defconfig b/arch/arm/configs/spear3xx_defconfig
index 865980c5f212..7ff23a077f5d 100644
--- a/arch/arm/configs/spear3xx_defconfig
+++ b/arch/arm/configs/spear3xx_defconfig
@@ -6,7 +6,9 @@ CONFIG_MODULES=y
6CONFIG_MODULE_UNLOAD=y 6CONFIG_MODULE_UNLOAD=y
7CONFIG_MODVERSIONS=y 7CONFIG_MODVERSIONS=y
8CONFIG_PARTITION_ADVANCED=y 8CONFIG_PARTITION_ADVANCED=y
9# CONFIG_ARCH_MULTI_V7 is not set
9CONFIG_PLAT_SPEAR=y 10CONFIG_PLAT_SPEAR=y
11CONFIG_ARCH_SPEAR3XX=y
10CONFIG_MACH_SPEAR300=y 12CONFIG_MACH_SPEAR300=y
11CONFIG_MACH_SPEAR310=y 13CONFIG_MACH_SPEAR310=y
12CONFIG_MACH_SPEAR320=y 14CONFIG_MACH_SPEAR320=y
diff --git a/arch/arm/configs/spear6xx_defconfig b/arch/arm/configs/spear6xx_defconfig
index a2a1265f86b6..7822980d7d55 100644
--- a/arch/arm/configs/spear6xx_defconfig
+++ b/arch/arm/configs/spear6xx_defconfig
@@ -6,6 +6,7 @@ CONFIG_MODULES=y
6CONFIG_MODULE_UNLOAD=y 6CONFIG_MODULE_UNLOAD=y
7CONFIG_MODVERSIONS=y 7CONFIG_MODVERSIONS=y
8CONFIG_PARTITION_ADVANCED=y 8CONFIG_PARTITION_ADVANCED=y
9# CONFIG_ARCH_MULTI_V7 is not set
9CONFIG_PLAT_SPEAR=y 10CONFIG_PLAT_SPEAR=y
10CONFIG_ARCH_SPEAR6XX=y 11CONFIG_ARCH_SPEAR6XX=y
11CONFIG_BINFMT_MISC=y 12CONFIG_BINFMT_MISC=y
diff --git a/arch/arm/mach-bcm2835/include/mach/debug-macro.S b/arch/arm/include/debug/bcm2835.S
index 8a161e44ae28..aed9199bd847 100644
--- a/arch/arm/mach-bcm2835/include/mach/debug-macro.S
+++ b/arch/arm/include/debug/bcm2835.S
@@ -11,7 +11,8 @@
11 * 11 *
12 */ 12 */
13 13
14#include <mach/bcm2835_soc.h> 14#define BCM2835_DEBUG_PHYS 0x20201000
15#define BCM2835_DEBUG_VIRT 0xf0201000
15 16
16 .macro addruart, rp, rv, tmp 17 .macro addruart, rp, rv, tmp
17 ldr \rp, =BCM2835_DEBUG_PHYS 18 ldr \rp, =BCM2835_DEBUG_PHYS
diff --git a/arch/arm/mach-cns3xxx/include/mach/debug-macro.S b/arch/arm/include/debug/cns3xxx.S
index d04c150baa1c..d04c150baa1c 100644
--- a/arch/arm/mach-cns3xxx/include/mach/debug-macro.S
+++ b/arch/arm/include/debug/cns3xxx.S
diff --git a/arch/arm/mach-exynos/include/mach/debug-macro.S b/arch/arm/include/debug/exynos.S
index e0c86ea475e7..b17fdb7fbd34 100644
--- a/arch/arm/mach-exynos/include/mach/debug-macro.S
+++ b/arch/arm/include/debug/exynos.S
@@ -1,10 +1,7 @@
1/* linux/arch/arm/mach-exynos4/include/mach/debug-macro.S 1/*
2 *
3 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. 2 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com 3 * http://www.samsung.com
5 * 4 *
6 * Based on arch/arm/mach-s3c6400/include/mach/debug-macro.S
7 *
8 * This program is free software; you can redistribute it and/or modify 5 * 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 6 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
@@ -12,7 +9,10 @@
12 9
13/* pull in the relevant register and map files. */ 10/* pull in the relevant register and map files. */
14 11
15#include <mach/map.h> 12#define S3C_ADDR_BASE 0xF6000000
13#define S3C_VA_UART S3C_ADDR_BASE + 0x01000000
14#define EXYNOS4_PA_UART 0x13800000
15#define EXYNOS5_PA_UART 0x12C00000
16 16
17 /* note, for the boot process to work we have to keep the UART 17 /* note, for the boot process to work we have to keep the UART
18 * virtual address aligned to an 1MiB boundary for the L1 18 * virtual address aligned to an 1MiB boundary for the L1
@@ -36,4 +36,4 @@
36#define fifo_full fifo_full_s5pv210 36#define fifo_full fifo_full_s5pv210
37#define fifo_level fifo_level_s5pv210 37#define fifo_level fifo_level_s5pv210
38 38
39#include <plat/debug-macro.S> 39#include <debug/samsung.S>
diff --git a/arch/arm/mach-mxs/include/mach/debug-macro.S b/arch/arm/include/debug/mxs.S
index d86951551ca1..d86951551ca1 100644
--- a/arch/arm/mach-mxs/include/mach/debug-macro.S
+++ b/arch/arm/include/debug/mxs.S
diff --git a/arch/arm/mach-nomadik/include/mach/debug-macro.S b/arch/arm/include/debug/nomadik.S
index 735417922ce2..735417922ce2 100644
--- a/arch/arm/mach-nomadik/include/mach/debug-macro.S
+++ b/arch/arm/include/debug/nomadik.S
diff --git a/arch/arm/plat-samsung/include/plat/debug-macro.S b/arch/arm/include/debug/samsung.S
index f3a9cff6d5d4..f3a9cff6d5d4 100644
--- a/arch/arm/plat-samsung/include/plat/debug-macro.S
+++ b/arch/arm/include/debug/samsung.S
diff --git a/arch/arm/mach-prima2/include/mach/uart.h b/arch/arm/include/debug/sirf.S
index c10510d01a44..dbf250cf18e6 100644
--- a/arch/arm/mach-prima2/include/mach/uart.h
+++ b/arch/arm/include/debug/sirf.S
@@ -1,15 +1,11 @@
1/* 1/*
2 * arch/arm/mach-prima2/include/mach/uart.h 2 * arch/arm/mach-prima2/include/mach/debug-macro.S
3 * 3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. 4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 * 5 *
6 * Licensed under GPLv2 or later. 6 * Licensed under GPLv2 or later.
7 */ 7 */
8 8
9#ifndef __MACH_PRIMA2_SIRFSOC_UART_H
10#define __MACH_PRIMA2_SIRFSOC_UART_H
11
12/* UART-1: used as serial debug port */
13#if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1) 9#if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1)
14#define SIRFSOC_UART1_PA_BASE 0xb0060000 10#define SIRFSOC_UART1_PA_BASE 0xb0060000
15#elif defined(CONFIG_DEBUG_SIRFMARCO_UART1) 11#elif defined(CONFIG_DEBUG_SIRFMARCO_UART1)
@@ -17,8 +13,8 @@
17#else 13#else
18#define SIRFSOC_UART1_PA_BASE 0 14#define SIRFSOC_UART1_PA_BASE 0
19#endif 15#endif
20#define SIRFSOC_UART1_VA_BASE SIRFSOC_VA(0x060000) 16
21#define SIRFSOC_UART1_SIZE SZ_4K 17#define SIRFSOC_UART1_VA_BASE 0xFEC60000
22 18
23#define SIRFSOC_UART_TXFIFO_STATUS 0x0114 19#define SIRFSOC_UART_TXFIFO_STATUS 0x0114
24#define SIRFSOC_UART_TXFIFO_DATA 0x0118 20#define SIRFSOC_UART_TXFIFO_DATA 0x0118
@@ -26,4 +22,21 @@
26#define SIRFSOC_UART1_TXFIFO_FULL (1 << 5) 22#define SIRFSOC_UART1_TXFIFO_FULL (1 << 5)
27#define SIRFSOC_UART1_TXFIFO_EMPTY (1 << 6) 23#define SIRFSOC_UART1_TXFIFO_EMPTY (1 << 6)
28 24
29#endif 25 .macro addruart, rp, rv, tmp
26 ldr \rp, =SIRFSOC_UART1_PA_BASE @ physical
27 ldr \rv, =SIRFSOC_UART1_VA_BASE @ virtual
28 .endm
29
30 .macro senduart,rd,rx
31 str \rd, [\rx, #SIRFSOC_UART_TXFIFO_DATA]
32 .endm
33
34 .macro busyuart,rd,rx
35 .endm
36
37 .macro waituart,rd,rx
381001: ldr \rd, [\rx, #SIRFSOC_UART_TXFIFO_STATUS]
39 tst \rd, #SIRFSOC_UART1_TXFIFO_EMPTY
40 beq 1001b
41 .endm
42
diff --git a/arch/arm/include/debug/ux500.S b/arch/arm/include/debug/ux500.S
new file mode 100644
index 000000000000..2848857f5b62
--- /dev/null
+++ b/arch/arm/include/debug/ux500.S
@@ -0,0 +1,48 @@
1/*
2 * Debugging macro include header
3 *
4 * Copyright (C) 2009 ST-Ericsson
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 */
11
12
13#if CONFIG_UX500_DEBUG_UART > 2
14#error Invalid Ux500 debug UART
15#endif
16
17/*
18 * DEBUG_LL only works if only one SOC is built in. We don't use #else below
19 * in order to get "__UX500_UART redefined" warnings if more than one SOC is
20 * built, so that there's some hint during the build that something is wrong.
21 */
22
23#ifdef CONFIG_UX500_SOC_DB8500
24#define U8500_UART0_PHYS_BASE (0x80120000)
25#define U8500_UART1_PHYS_BASE (0x80121000)
26#define U8500_UART2_PHYS_BASE (0x80007000)
27#define U8500_UART0_VIRT_BASE (0xa8120000)
28#define U8500_UART1_VIRT_BASE (0xa8121000)
29#define U8500_UART2_VIRT_BASE (0xa8007000)
30#define __UX500_PHYS_UART(n) U8500_UART##n##_PHYS_BASE
31#define __UX500_VIRT_UART(n) U8500_UART##n##_VIRT_BASE
32#endif
33
34#if !defined(__UX500_PHYS_UART) || !defined(__UX500_VIRT_UART)
35#error Unknown SOC
36#endif
37
38#define UX500_PHYS_UART(n) __UX500_PHYS_UART(n)
39#define UX500_VIRT_UART(n) __UX500_VIRT_UART(n)
40#define UART_PHYS_BASE UX500_PHYS_UART(CONFIG_UX500_DEBUG_UART)
41#define UART_VIRT_BASE UX500_VIRT_UART(CONFIG_UX500_DEBUG_UART)
42
43 .macro addruart, rp, rv, tmp
44 ldr \rp, =UART_PHYS_BASE @ no, physical address
45 ldr \rv, =UART_VIRT_BASE @ yes, virtual address
46 .endm
47
48#include <asm/hardware/debug-pl01x.S>
diff --git a/arch/arm/mach-bcm2835/Kconfig b/arch/arm/mach-bcm2835/Kconfig
new file mode 100644
index 000000000000..560045cafc34
--- /dev/null
+++ b/arch/arm/mach-bcm2835/Kconfig
@@ -0,0 +1,15 @@
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 use in the Raspberry Pi, and Roku 2 devices.
diff --git a/arch/arm/mach-bcm2835/Makefile.boot b/arch/arm/mach-bcm2835/Makefile.boot
deleted file mode 100644
index b3271754e9fd..000000000000
--- a/arch/arm/mach-bcm2835/Makefile.boot
+++ /dev/null
@@ -1 +0,0 @@
1zreladdr-y := 0x00008000
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c
index 6f5785985dd1..740fa9ebe249 100644
--- a/arch/arm/mach-bcm2835/bcm2835.c
+++ b/arch/arm/mach-bcm2835/bcm2835.c
@@ -23,8 +23,6 @@
23#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
24#include <asm/mach/map.h> 24#include <asm/mach/map.h>
25 25
26#include <mach/bcm2835_soc.h>
27
28#define PM_RSTC 0x1c 26#define PM_RSTC 0x1c
29#define PM_RSTS 0x20 27#define PM_RSTS 0x20
30#define PM_WDOG 0x24 28#define PM_WDOG 0x24
@@ -34,6 +32,10 @@
34#define PM_RSTC_WRCFG_FULL_RESET 0x00000020 32#define PM_RSTC_WRCFG_FULL_RESET 0x00000020
35#define PM_RSTS_HADWRH_SET 0x00000040 33#define PM_RSTS_HADWRH_SET 0x00000040
36 34
35#define BCM2835_PERIPH_PHYS 0x20000000
36#define BCM2835_PERIPH_VIRT 0xf0000000
37#define BCM2835_PERIPH_SIZE SZ_16M
38
37static void __iomem *wdt_regs; 39static void __iomem *wdt_regs;
38 40
39/* 41/*
diff --git a/arch/arm/mach-bcm2835/include/mach/bcm2835_soc.h b/arch/arm/mach-bcm2835/include/mach/bcm2835_soc.h
deleted file mode 100644
index d4dfcf7a9cda..000000000000
--- a/arch/arm/mach-bcm2835/include/mach/bcm2835_soc.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * Copyright (C) 2012 Stephen Warren
3 *
4 * Derived from code:
5 * Copyright (C) 2010 Broadcom
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 as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
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
18#ifndef __MACH_BCM2835_BCM2835_SOC_H__
19#define __MACH_BCM2835_BCM2835_SOC_H__
20
21#include <asm/sizes.h>
22
23#define BCM2835_PERIPH_PHYS 0x20000000
24#define BCM2835_PERIPH_VIRT 0xf0000000
25#define BCM2835_PERIPH_SIZE SZ_16M
26#define BCM2835_DEBUG_PHYS 0x20201000
27#define BCM2835_DEBUG_VIRT 0xf0201000
28
29#endif
diff --git a/arch/arm/mach-bcm2835/include/mach/gpio.h b/arch/arm/mach-bcm2835/include/mach/gpio.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-bcm2835/include/mach/gpio.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-bcm2835/include/mach/timex.h b/arch/arm/mach-bcm2835/include/mach/timex.h
deleted file mode 100644
index 6d021e136ae3..000000000000
--- a/arch/arm/mach-bcm2835/include/mach/timex.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * BCM2835 system clock frequency
3 *
4 * Copyright (C) 2010 Broadcom
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#define CLOCK_TICK_RATE (1000000)
25
26#endif
diff --git a/arch/arm/mach-bcm2835/include/mach/uncompress.h b/arch/arm/mach-bcm2835/include/mach/uncompress.h
deleted file mode 100644
index bf86dca3bf71..000000000000
--- a/arch/arm/mach-bcm2835/include/mach/uncompress.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * Copyright (C) 2010 Broadcom
3 * Copyright (C) 2003 ARM Limited
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 as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
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
16#include <linux/io.h>
17#include <linux/amba/serial.h>
18#include <mach/bcm2835_soc.h>
19
20#define UART0_BASE BCM2835_DEBUG_PHYS
21
22#define BCM2835_UART_DR IOMEM(UART0_BASE + UART01x_DR)
23#define BCM2835_UART_FR IOMEM(UART0_BASE + UART01x_FR)
24#define BCM2835_UART_CR IOMEM(UART0_BASE + UART011_CR)
25
26static inline void putc(int c)
27{
28 while (__raw_readl(BCM2835_UART_FR) & UART01x_FR_TXFF)
29 barrier();
30
31 __raw_writel(c, BCM2835_UART_DR);
32}
33
34static inline void flush(void)
35{
36 int fr;
37
38 do {
39 fr = __raw_readl(BCM2835_UART_FR);
40 barrier();
41 } while ((fr & (UART011_FR_TXFE | UART01x_FR_BUSY)) != UART011_FR_TXFE);
42}
43
44#define arch_decomp_setup()
diff --git a/arch/arm/mach-cns3xxx/Kconfig b/arch/arm/mach-cns3xxx/Kconfig
index 9ebfcc46feb1..dbf0df8bb0ac 100644
--- a/arch/arm/mach-cns3xxx/Kconfig
+++ b/arch/arm/mach-cns3xxx/Kconfig
@@ -1,8 +1,20 @@
1config ARCH_CNS3XXX
2 bool "Cavium Networks CNS3XXX family" if ARCH_MULTI_V6
3 select ARM_GIC
4 select CPU_V6K
5 select GENERIC_CLOCKEVENTS
6 select MIGHT_HAVE_CACHE_L2X0
7 select MIGHT_HAVE_PCI
8 select PCI_DOMAINS if PCI
9 help
10 Support for Cavium Networks CNS3XXX platform.
11
1menu "CNS3XXX platform type" 12menu "CNS3XXX platform type"
2 depends on ARCH_CNS3XXX 13 depends on ARCH_CNS3XXX
3 14
4config MACH_CNS3420VB 15config MACH_CNS3420VB
5 bool "Support for CNS3420 Validation Board" 16 bool "Support for CNS3420 Validation Board"
17 depends on ATAGS
6 help 18 help
7 Include support for the Cavium Networks CNS3420 MPCore Platform 19 Include support for the Cavium Networks CNS3420 MPCore Platform
8 Baseboard. 20 Baseboard.
diff --git a/arch/arm/mach-cns3xxx/Makefile b/arch/arm/mach-cns3xxx/Makefile
index 11033f1c2e23..a1ff10848698 100644
--- a/arch/arm/mach-cns3xxx/Makefile
+++ b/arch/arm/mach-cns3xxx/Makefile
@@ -1,3 +1,5 @@
1obj-$(CONFIG_ARCH_CNS3XXX) += core.o pm.o devices.o 1obj-$(CONFIG_ARCH_CNS3XXX) += cns3xxx.o
2obj-$(CONFIG_PCI) += pcie.o 2cns3xxx-y += core.o pm.o
3obj-$(CONFIG_MACH_CNS3420VB) += cns3420vb.o 3cns3xxx-$(CONFIG_ATAGS) += devices.o
4cns3xxx-$(CONFIG_PCI) += pcie.o
5cns3xxx-$(CONFIG_MACH_CNS3420VB) += cns3420vb.o
diff --git a/arch/arm/mach-cns3xxx/cns3420vb.c b/arch/arm/mach-cns3xxx/cns3420vb.c
index a71867e1d8d6..ce096d678aa4 100644
--- a/arch/arm/mach-cns3xxx/cns3420vb.c
+++ b/arch/arm/mach-cns3xxx/cns3420vb.c
@@ -31,9 +31,8 @@
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32#include <asm/mach/map.h> 32#include <asm/mach/map.h>
33#include <asm/mach/time.h> 33#include <asm/mach/time.h>
34#include <mach/cns3xxx.h> 34#include "cns3xxx.h"
35#include <mach/irqs.h> 35#include "pm.h"
36#include <mach/pm.h>
37#include "core.h" 36#include "core.h"
38#include "devices.h" 37#include "devices.h"
39 38
@@ -247,6 +246,7 @@ static void __init cns3420_map_io(void)
247 246
248MACHINE_START(CNS3420VB, "Cavium Networks CNS3420 Validation Board") 247MACHINE_START(CNS3420VB, "Cavium Networks CNS3420 Validation Board")
249 .atag_offset = 0x100, 248 .atag_offset = 0x100,
249 .nr_irqs = NR_IRQS_CNS3XXX,
250 .map_io = cns3420_map_io, 250 .map_io = cns3420_map_io,
251 .init_irq = cns3xxx_init_irq, 251 .init_irq = cns3xxx_init_irq,
252 .init_time = cns3xxx_timer_init, 252 .init_time = cns3xxx_timer_init,
diff --git a/arch/arm/mach-cns3xxx/include/mach/cns3xxx.h b/arch/arm/mach-cns3xxx/cns3xxx.h
index 9b145b1e48ea..a0f5b60662ae 100644
--- a/arch/arm/mach-cns3xxx/include/mach/cns3xxx.h
+++ b/arch/arm/mach-cns3xxx/cns3xxx.h
@@ -526,6 +526,8 @@ int cns3xxx_cpu_clock(void);
526/* 526/*
527 * ARM11 MPCore interrupt sources (primary GIC) 527 * ARM11 MPCore interrupt sources (primary GIC)
528 */ 528 */
529#define IRQ_TC11MP_GIC_START 32
530
529#define IRQ_CNS3XXX_PMU (IRQ_TC11MP_GIC_START + 0) 531#define IRQ_CNS3XXX_PMU (IRQ_TC11MP_GIC_START + 0)
530#define IRQ_CNS3XXX_SDIO (IRQ_TC11MP_GIC_START + 1) 532#define IRQ_CNS3XXX_SDIO (IRQ_TC11MP_GIC_START + 1)
531#define IRQ_CNS3XXX_L2CC (IRQ_TC11MP_GIC_START + 2) 533#define IRQ_CNS3XXX_L2CC (IRQ_TC11MP_GIC_START + 2)
@@ -597,9 +599,4 @@ int cns3xxx_cpu_clock(void);
597 599
598#define NR_IRQS_CNS3XXX (IRQ_TC11MP_GIC_START + 64) 600#define NR_IRQS_CNS3XXX (IRQ_TC11MP_GIC_START + 64)
599 601
600#if !defined(NR_IRQS) || (NR_IRQS < NR_IRQS_CNS3XXX)
601#undef NR_IRQS
602#define NR_IRQS NR_IRQS_CNS3XXX
603#endif
604
605#endif /* __MACH_BOARD_CNS3XXX_H */ 602#endif /* __MACH_BOARD_CNS3XXX_H */
diff --git a/arch/arm/mach-cns3xxx/core.c b/arch/arm/mach-cns3xxx/core.c
index 126f74f6087c..e38b279f402c 100644
--- a/arch/arm/mach-cns3xxx/core.c
+++ b/arch/arm/mach-cns3xxx/core.c
@@ -13,12 +13,18 @@
13#include <linux/clockchips.h> 13#include <linux/clockchips.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <linux/irqchip/arm-gic.h> 15#include <linux/irqchip/arm-gic.h>
16#include <linux/of_platform.h>
17#include <linux/platform_device.h>
18#include <linux/usb/ehci_pdriver.h>
19#include <linux/usb/ohci_pdriver.h>
20#include <asm/mach/arch.h>
16#include <asm/mach/map.h> 21#include <asm/mach/map.h>
17#include <asm/mach/time.h> 22#include <asm/mach/time.h>
18#include <asm/mach/irq.h> 23#include <asm/mach/irq.h>
19#include <asm/hardware/cache-l2x0.h> 24#include <asm/hardware/cache-l2x0.h>
20#include <mach/cns3xxx.h> 25#include "cns3xxx.h"
21#include "core.h" 26#include "core.h"
27#include "pm.h"
22 28
23static struct map_desc cns3xxx_io_desc[] __initdata = { 29static struct map_desc cns3xxx_io_desc[] __initdata = {
24 { 30 {
@@ -256,3 +262,116 @@ void __init cns3xxx_l2x0_init(void)
256} 262}
257 263
258#endif /* CONFIG_CACHE_L2X0 */ 264#endif /* CONFIG_CACHE_L2X0 */
265
266static int csn3xxx_usb_power_on(struct platform_device *pdev)
267{
268 /*
269 * EHCI and OHCI share the same clock and power,
270 * resetting twice would cause the 1st controller been reset.
271 * Therefore only do power up at the first up device, and
272 * power down at the last down device.
273 *
274 * Set USB AHB INCR length to 16
275 */
276 if (atomic_inc_return(&usb_pwr_ref) == 1) {
277 cns3xxx_pwr_power_up(1 << PM_PLL_HM_PD_CTRL_REG_OFFSET_PLL_USB);
278 cns3xxx_pwr_clk_en(1 << PM_CLK_GATE_REG_OFFSET_USB_HOST);
279 cns3xxx_pwr_soft_rst(1 << PM_SOFT_RST_REG_OFFST_USB_HOST);
280 __raw_writel((__raw_readl(MISC_CHIP_CONFIG_REG) | (0X2 << 24)),
281 MISC_CHIP_CONFIG_REG);
282 }
283
284 return 0;
285}
286
287static void csn3xxx_usb_power_off(struct platform_device *pdev)
288{
289 /*
290 * EHCI and OHCI share the same clock and power,
291 * resetting twice would cause the 1st controller been reset.
292 * Therefore only do power up at the first up device, and
293 * power down at the last down device.
294 */
295 if (atomic_dec_return(&usb_pwr_ref) == 0)
296 cns3xxx_pwr_clk_dis(1 << PM_CLK_GATE_REG_OFFSET_USB_HOST);
297}
298
299static struct usb_ehci_pdata cns3xxx_usb_ehci_pdata = {
300 .power_on = csn3xxx_usb_power_on,
301 .power_off = csn3xxx_usb_power_off,
302};
303
304static struct usb_ohci_pdata cns3xxx_usb_ohci_pdata = {
305 .num_ports = 1,
306 .power_on = csn3xxx_usb_power_on,
307 .power_off = csn3xxx_usb_power_off,
308};
309
310static struct of_dev_auxdata cns3xxx_auxdata[] __initconst = {
311 { "intel,usb-ehci", CNS3XXX_USB_BASE, "ehci-platform", &cns3xxx_usb_ehci_pdata },
312 { "intel,usb-ohci", CNS3XXX_USB_OHCI_BASE, "ohci-platform", &cns3xxx_usb_ohci_pdata },
313 { "cavium,cns3420-ahci", CNS3XXX_SATA2_BASE, "ahci", NULL },
314 { "cavium,cns3420-sdhci", CNS3XXX_SDIO_BASE, "ahci", NULL },
315 {},
316};
317
318static void __init cns3xxx_init(void)
319{
320 struct device_node *dn;
321
322 cns3xxx_l2x0_init();
323
324 dn = of_find_compatible_node(NULL, NULL, "cavium,cns3420-ahci");
325 if (of_device_is_available(dn)) {
326 u32 tmp;
327
328 tmp = __raw_readl(MISC_SATA_POWER_MODE);
329 tmp |= 0x1 << 16; /* Disable SATA PHY 0 from SLUMBER Mode */
330 tmp |= 0x1 << 17; /* Disable SATA PHY 1 from SLUMBER Mode */
331 __raw_writel(tmp, MISC_SATA_POWER_MODE);
332
333 /* Enable SATA PHY */
334 cns3xxx_pwr_power_up(0x1 << PM_PLL_HM_PD_CTRL_REG_OFFSET_SATA_PHY0);
335 cns3xxx_pwr_power_up(0x1 << PM_PLL_HM_PD_CTRL_REG_OFFSET_SATA_PHY1);
336
337 /* Enable SATA Clock */
338 cns3xxx_pwr_clk_en(0x1 << PM_CLK_GATE_REG_OFFSET_SATA);
339
340 /* De-Asscer SATA Reset */
341 cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(SATA));
342 }
343
344 dn = of_find_compatible_node(NULL, NULL, "cavium,cns3420-sdhci");
345 if (of_device_is_available(dn)) {
346 u32 __iomem *gpioa = IOMEM(CNS3XXX_MISC_BASE_VIRT + 0x0014);
347 u32 gpioa_pins = __raw_readl(gpioa);
348
349 /* MMC/SD pins share with GPIOA */
350 gpioa_pins |= 0x1fff0004;
351 __raw_writel(gpioa_pins, gpioa);
352
353 cns3xxx_pwr_clk_en(CNS3XXX_PWR_CLK_EN(SDIO));
354 cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(SDIO));
355 }
356
357 pm_power_off = cns3xxx_power_off;
358
359 of_platform_populate(NULL, of_default_bus_match_table,
360 cns3xxx_auxdata, NULL);
361}
362
363static const char *cns3xxx_dt_compat[] __initdata = {
364 "cavium,cns3410",
365 "cavium,cns3420",
366 NULL,
367};
368
369DT_MACHINE_START(CNS3XXX_DT, "Cavium Networks CNS3xxx")
370 .dt_compat = cns3xxx_dt_compat,
371 .nr_irqs = NR_IRQS_CNS3XXX,
372 .map_io = cns3xxx_map_io,
373 .init_irq = cns3xxx_init_irq,
374 .init_time = cns3xxx_timer_init,
375 .init_machine = cns3xxx_init,
376 .restart = cns3xxx_restart,
377MACHINE_END
diff --git a/arch/arm/mach-cns3xxx/devices.c b/arch/arm/mach-cns3xxx/devices.c
index 1e40c99b015f..7da78a2451f1 100644
--- a/arch/arm/mach-cns3xxx/devices.c
+++ b/arch/arm/mach-cns3xxx/devices.c
@@ -16,9 +16,8 @@
16#include <linux/compiler.h> 16#include <linux/compiler.h>
17#include <linux/dma-mapping.h> 17#include <linux/dma-mapping.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <mach/cns3xxx.h> 19#include "cns3xxx.h"
20#include <mach/irqs.h> 20#include "pm.h"
21#include <mach/pm.h>
22#include "core.h" 21#include "core.h"
23#include "devices.h" 22#include "devices.h"
24 23
diff --git a/arch/arm/mach-cns3xxx/include/mach/irqs.h b/arch/arm/mach-cns3xxx/include/mach/irqs.h
deleted file mode 100644
index 2ab96f8085c8..000000000000
--- a/arch/arm/mach-cns3xxx/include/mach/irqs.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * Copyright 2000 Deep Blue Solutions Ltd.
3 * Copyright 2003 ARM Limited
4 * Copyright 2008 Cavium Networks
5 *
6 * This file 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
11#ifndef __MACH_IRQS_H
12#define __MACH_IRQS_H
13
14#define IRQ_LOCALTIMER 29
15#define IRQ_LOCALWDOG 30
16#define IRQ_TC11MP_GIC_START 32
17
18#include <mach/cns3xxx.h>
19
20#ifndef NR_IRQS
21#error "NR_IRQS not defined by the board-specific files"
22#endif
23
24#endif
diff --git a/arch/arm/mach-cns3xxx/include/mach/timex.h b/arch/arm/mach-cns3xxx/include/mach/timex.h
deleted file mode 100644
index 1fd04217cacb..000000000000
--- a/arch/arm/mach-cns3xxx/include/mach/timex.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/*
2 * Cavium Networks architecture timex specifications
3 *
4 * Copyright 2003 ARM Limited
5 * Copyright 2008 Cavium Networks
6 *
7 * This file 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#define CLOCK_TICK_RATE (50000000 / 16)
diff --git a/arch/arm/mach-cns3xxx/include/mach/uncompress.h b/arch/arm/mach-cns3xxx/include/mach/uncompress.h
deleted file mode 100644
index 7a030b99df84..000000000000
--- a/arch/arm/mach-cns3xxx/include/mach/uncompress.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * Copyright 2003 ARM Limited
3 * Copyright 2008 Cavium Networks
4 *
5 * This file 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
10#include <asm/mach-types.h>
11#include <mach/cns3xxx.h>
12
13#define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00))
14#define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c))
15#define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30))
16#define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18))
17
18/*
19 * Return the UART base address
20 */
21static inline unsigned long get_uart_base(void)
22{
23 if (machine_is_cns3420vb())
24 return CNS3XXX_UART0_BASE;
25 else
26 return 0;
27}
28
29/*
30 * This does not append a newline
31 */
32static inline void putc(int c)
33{
34 unsigned long base = get_uart_base();
35
36 while (AMBA_UART_FR(base) & (1 << 5))
37 barrier();
38
39 AMBA_UART_DR(base) = c;
40}
41
42static inline void flush(void)
43{
44 unsigned long base = get_uart_base();
45
46 while (AMBA_UART_FR(base) & (1 << 3))
47 barrier();
48}
49
50/*
51 * nothing to do
52 */
53#define arch_decomp_setup()
diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c
index 311328314163..c7b204bff386 100644
--- a/arch/arm/mach-cns3xxx/pcie.c
+++ b/arch/arm/mach-cns3xxx/pcie.c
@@ -20,7 +20,7 @@
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21#include <linux/ptrace.h> 21#include <linux/ptrace.h>
22#include <asm/mach/map.h> 22#include <asm/mach/map.h>
23#include <mach/cns3xxx.h> 23#include "cns3xxx.h"
24#include "core.h" 24#include "core.h"
25 25
26enum cns3xxx_access_type { 26enum cns3xxx_access_type {
diff --git a/arch/arm/mach-cns3xxx/pm.c b/arch/arm/mach-cns3xxx/pm.c
index 36458080332a..79e3d47aad65 100644
--- a/arch/arm/mach-cns3xxx/pm.c
+++ b/arch/arm/mach-cns3xxx/pm.c
@@ -11,8 +11,8 @@
11#include <linux/io.h> 11#include <linux/io.h>
12#include <linux/delay.h> 12#include <linux/delay.h>
13#include <linux/atomic.h> 13#include <linux/atomic.h>
14#include <mach/cns3xxx.h> 14#include "cns3xxx.h"
15#include <mach/pm.h> 15#include "pm.h"
16#include "core.h" 16#include "core.h"
17 17
18void cns3xxx_pwr_clk_en(unsigned int block) 18void cns3xxx_pwr_clk_en(unsigned int block)
diff --git a/arch/arm/mach-cns3xxx/include/mach/pm.h b/arch/arm/mach-cns3xxx/pm.h
index c2588cc991d1..c2588cc991d1 100644
--- a/arch/arm/mach-cns3xxx/include/mach/pm.h
+++ b/arch/arm/mach-cns3xxx/pm.h
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 42378fb90167..f22f69e2d081 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -14,6 +14,7 @@ menu "SAMSUNG EXYNOS SoCs Support"
14config ARCH_EXYNOS4 14config ARCH_EXYNOS4
15 bool "SAMSUNG EXYNOS4" 15 bool "SAMSUNG EXYNOS4"
16 default y 16 default y
17 select HAVE_ARM_SCU if SMP
17 select HAVE_SMP 18 select HAVE_SMP
18 select MIGHT_HAVE_CACHE_L2X0 19 select MIGHT_HAVE_CACHE_L2X0
19 help 20 help
@@ -21,6 +22,7 @@ config ARCH_EXYNOS4
21 22
22config ARCH_EXYNOS5 23config ARCH_EXYNOS5
23 bool "SAMSUNG EXYNOS5" 24 bool "SAMSUNG EXYNOS5"
25 select HAVE_ARM_SCU if SMP
24 select HAVE_SMP 26 select HAVE_SMP
25 help 27 help
26 Samsung EXYNOS5 (Cortex-A15) SoC based systems 28 Samsung EXYNOS5 (Cortex-A15) SoC based systems
@@ -87,6 +89,19 @@ config EXYNOS4_MCT
87 help 89 help
88 Use MCT (Multi Core Timer) as kernel timers 90 Use MCT (Multi Core Timer) as kernel timers
89 91
92config EXYNOS_ATAGS
93 bool "ATAGS based boot for EXYNOS (deprecated)"
94 depends on !ARCH_MULTIPLATFORM
95 depends on ATAGS
96 default y
97 help
98 The EXYNOS platform is moving towards being completely probed
99 through device tree. This enables support for board files using
100 the traditional ATAGS boot format.
101 Note that this option is not available for multiplatform builds.
102
103if EXYNOS_ATAGS
104
90config EXYNOS_DEV_DMA 105config EXYNOS_DEV_DMA
91 bool 106 bool
92 help 107 help
@@ -391,6 +406,8 @@ config MACH_SMDK4412
391 Machine support for Samsung SMDK4412 406 Machine support for Samsung SMDK4412
392endif 407endif
393 408
409endif
410
394comment "Flattened Device Tree based board for EXYNOS SoCs" 411comment "Flattened Device Tree based board for EXYNOS SoCs"
395 412
396config MACH_EXYNOS4_DT 413config MACH_EXYNOS4_DT
diff --git a/arch/arm/mach-exynos/dev-uart.c b/arch/arm/mach-exynos/dev-uart.c
index 7c42f4b7c8be..c48aff02c786 100644
--- a/arch/arm/mach-exynos/dev-uart.c
+++ b/arch/arm/mach-exynos/dev-uart.c
@@ -20,6 +20,7 @@
20#include <asm/mach/irq.h> 20#include <asm/mach/irq.h>
21#include <mach/hardware.h> 21#include <mach/hardware.h>
22#include <mach/map.h> 22#include <mach/map.h>
23#include <mach/irqs.h>
23 24
24#include <plat/devs.h> 25#include <plat/devs.h>
25 26
diff --git a/arch/arm/mach-exynos/include/mach/irqs.h b/arch/arm/mach-exynos/include/mach/irqs.h
index 1f4dc35cd4b9..8bd5dde5fc78 100644
--- a/arch/arm/mach-exynos/include/mach/irqs.h
+++ b/arch/arm/mach-exynos/include/mach/irqs.h
@@ -466,7 +466,10 @@
466#define IRQ_TIMER_BASE (IRQ_GPIO_END + 64) 466#define IRQ_TIMER_BASE (IRQ_GPIO_END + 64)
467 467
468/* Set the default NR_IRQS */ 468/* Set the default NR_IRQS */
469#define EXYNOS_NR_IRQS (IRQ_TIMER_BASE + IRQ_TIMER_COUNT)
469 470
470#define NR_IRQS (IRQ_TIMER_BASE + IRQ_TIMER_COUNT) 471#ifndef CONFIG_SPARSE_IRQ
472#define NR_IRQS EXYNOS_NR_IRQS
473#endif
471 474
472#endif /* __ASM_ARCH_IRQS_H */ 475#endif /* __ASM_ARCH_IRQS_H */
diff --git a/arch/arm/mach-exynos/mach-armlex4210.c b/arch/arm/mach-exynos/mach-armlex4210.c
index 685f29173afa..2126f3503a3f 100644
--- a/arch/arm/mach-exynos/mach-armlex4210.c
+++ b/arch/arm/mach-exynos/mach-armlex4210.c
@@ -25,6 +25,7 @@
25#include <plat/regs-srom.h> 25#include <plat/regs-srom.h>
26#include <plat/sdhci.h> 26#include <plat/sdhci.h>
27 27
28#include <mach/irqs.h>
28#include <mach/map.h> 29#include <mach/map.h>
29 30
30#include "common.h" 31#include "common.h"
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index 1ea79730187f..ab920e34bd0a 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -53,6 +53,7 @@
53#include <plat/fimc-core.h> 53#include <plat/fimc-core.h>
54#include <plat/camport.h> 54#include <plat/camport.h>
55 55
56#include <mach/irqs.h>
56#include <mach/map.h> 57#include <mach/map.h>
57 58
58#include "common.h" 59#include "common.h"
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index bf946931ab32..ec42024dd13f 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -46,6 +46,7 @@
46#include <plat/hdmi.h> 46#include <plat/hdmi.h>
47 47
48#include <mach/map.h> 48#include <mach/map.h>
49#include <mach/irqs.h>
49 50
50#include <drm/exynos_drm.h> 51#include <drm/exynos_drm.h>
51#include "common.h" 52#include "common.h"
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c
index fe6149624b84..5df91236dbb4 100644
--- a/arch/arm/mach-exynos/mach-smdk4x12.c
+++ b/arch/arm/mach-exynos/mach-smdk4x12.c
@@ -39,6 +39,7 @@
39#include <plat/regs-serial.h> 39#include <plat/regs-serial.h>
40#include <plat/sdhci.h> 40#include <plat/sdhci.h>
41 41
42#include <mach/irqs.h>
42#include <mach/map.h> 43#include <mach/map.h>
43 44
44#include <drm/exynos_drm.h> 45#include <drm/exynos_drm.h>
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
index 8270929d7b44..9680e1291065 100644
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ b/arch/arm/mach-exynos/mach-smdkv310.c
@@ -43,6 +43,7 @@
43#include <plat/clock.h> 43#include <plat/clock.h>
44#include <plat/hdmi.h> 44#include <plat/hdmi.h>
45 45
46#include <mach/irqs.h>
46#include <mach/map.h> 47#include <mach/map.h>
47 48
48#include <drm/exynos_drm.h> 49#include <drm/exynos_drm.h>
diff --git a/arch/arm/mach-exynos/setup-sdhci-gpio.c b/arch/arm/mach-exynos/setup-sdhci-gpio.c
index e8d08bf8965a..d5b98c866738 100644
--- a/arch/arm/mach-exynos/setup-sdhci-gpio.c
+++ b/arch/arm/mach-exynos/setup-sdhci-gpio.c
@@ -19,8 +19,8 @@
19#include <linux/mmc/host.h> 19#include <linux/mmc/host.h>
20#include <linux/mmc/card.h> 20#include <linux/mmc/card.h>
21 21
22#include <mach/gpio.h>
22#include <plat/gpio-cfg.h> 23#include <plat/gpio-cfg.h>
23#include <plat/regs-sdhci.h>
24#include <plat/sdhci.h> 24#include <plat/sdhci.h>
25 25
26void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) 26void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
index 44b12f9c1584..cd9fcb1cd7ab 100644
--- a/arch/arm/mach-highbank/Kconfig
+++ b/arch/arm/mach-highbank/Kconfig
@@ -12,6 +12,7 @@ config ARCH_HIGHBANK
12 select CPU_V7 12 select CPU_V7
13 select GENERIC_CLOCKEVENTS 13 select GENERIC_CLOCKEVENTS
14 select HAVE_ARM_SCU 14 select HAVE_ARM_SCU
15 select HAVE_ARM_TWD if LOCAL_TIMERS
15 select HAVE_SMP 16 select HAVE_SMP
16 select MAILBOX 17 select MAILBOX
17 select PL320_MBOX 18 select PL320_MBOX
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 91571a16f986..d58ad4ff8d34 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -795,7 +795,8 @@ config SOC_IMX6Q
795 select ARM_GIC 795 select ARM_GIC
796 select COMMON_CLK 796 select COMMON_CLK
797 select CPU_V7 797 select CPU_V7
798 select HAVE_ARM_SCU 798 select HAVE_ARM_SCU if SMP
799 select HAVE_ARM_TWD if LOCAL_TIMERS
799 select HAVE_CAN_FLEXCAN if CAN 800 select HAVE_CAN_FLEXCAN if CAN
800 select HAVE_IMX_GPC 801 select HAVE_IMX_GPC
801 select HAVE_IMX_MMDC 802 select HAVE_IMX_MMDC
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index b61908594b47..fceb093b9494 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -44,10 +44,10 @@ endchoice
44 44
45config ARCH_MSM8X60 45config ARCH_MSM8X60
46 bool "MSM8X60" 46 bool "MSM8X60"
47 select ARCH_MSM_SCORPIONMP
48 select ARM_GIC 47 select ARM_GIC
49 select CPU_V7 48 select CPU_V7
50 select GPIO_MSM_V2 49 select GPIO_MSM_V2
50 select HAVE_SMP
51 select MSM_GPIOMUX 51 select MSM_GPIOMUX
52 select MSM_SCM if SMP 52 select MSM_SCM if SMP
53 select MSM_V2_TLMM 53 select MSM_V2_TLMM
@@ -55,9 +55,9 @@ config ARCH_MSM8X60
55 55
56config ARCH_MSM8960 56config ARCH_MSM8960
57 bool "MSM8960" 57 bool "MSM8960"
58 select ARCH_MSM_SCORPIONMP
59 select ARM_GIC 58 select ARM_GIC
60 select CPU_V7 59 select CPU_V7
60 select HAVE_SMP
61 select MSM_GPIOMUX 61 select MSM_GPIOMUX
62 select MSM_SCM if SMP 62 select MSM_SCM if SMP
63 select MSM_V2_TLMM 63 select MSM_V2_TLMM
@@ -68,9 +68,6 @@ config MSM_HAS_DEBUG_UART_HS
68 68
69config MSM_SOC_REV_A 69config MSM_SOC_REV_A
70 bool 70 bool
71config ARCH_MSM_SCORPIONMP
72 bool
73 select HAVE_SMP
74 71
75config ARCH_MSM_ARM11 72config ARCH_MSM_ARM11
76 bool 73 bool
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index c4495a13751a..4dc2fbba0ecd 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -1,5 +1,3 @@
1if ARCH_MXS
2
3config SOC_IMX23 1config SOC_IMX23
4 bool 2 bool
5 select ARM_AMBA 3 select ARM_AMBA
@@ -17,14 +15,18 @@ config SOC_IMX28
17 select HAVE_PWM 15 select HAVE_PWM
18 select PINCTRL_IMX28 16 select PINCTRL_IMX28
19 17
20comment "MXS platforms:" 18config ARCH_MXS
21 19 bool "Freescale MXS (i.MX23, i.MX28) support"
22config MACH_MXS_DT 20 depends on ARCH_MULTI_V5
23 bool "Support MXS platforms from device tree" 21 select ARCH_REQUIRE_GPIOLIB
22 select CLKDEV_LOOKUP
23 select CLKSRC_MMIO
24 select CLKSRC_OF
25 select GENERIC_CLOCKEVENTS
26 select HAVE_CLK_PREPARE
27 select PINCTRL
24 select SOC_IMX23 28 select SOC_IMX23
25 select SOC_IMX28 29 select SOC_IMX28
30 select STMP_DEVICE
26 help 31 help
27 Include support for Freescale MXS platforms(i.MX23 and i.MX28) 32 Support for Freescale MXS-based family of processors
28 using the device tree for discovery
29
30endif
diff --git a/arch/arm/mach-mxs/Makefile b/arch/arm/mach-mxs/Makefile
index 80db7269760e..cc2bf6748ade 100644
--- a/arch/arm/mach-mxs/Makefile
+++ b/arch/arm/mach-mxs/Makefile
@@ -1,2 +1,2 @@
1obj-$(CONFIG_PM) += pm.o 1obj-$(CONFIG_PM) += pm.o
2obj-$(CONFIG_MACH_MXS_DT) += mach-mxs.o 2obj-$(CONFIG_ARCH_MXS) += mach-mxs.o
diff --git a/arch/arm/mach-mxs/Makefile.boot b/arch/arm/mach-mxs/Makefile.boot
deleted file mode 100644
index 07b11fe6453f..000000000000
--- a/arch/arm/mach-mxs/Makefile.boot
+++ /dev/null
@@ -1 +0,0 @@
1zreladdr-y += 0x40008000
diff --git a/arch/arm/mach-mxs/include/mach/timex.h b/arch/arm/mach-mxs/include/mach/timex.h
deleted file mode 100644
index 734ce8984a64..000000000000
--- a/arch/arm/mach-mxs/include/mach/timex.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * Copyright (C) 1999 ARM Limited
3 * Copyright 2004-2007 Freescale Semiconductor, Inc. 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 as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
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
16#ifndef __MACH_MXS_TIMEX_H__
17#define __MACH_MXS_TIMEX_H__
18
19#define CLOCK_TICK_RATE 32000 /* 32K */
20
21#endif /* __MACH_MXS_TIMEX_H__ */
diff --git a/arch/arm/mach-mxs/include/mach/uncompress.h b/arch/arm/mach-mxs/include/mach/uncompress.h
deleted file mode 100644
index 533f5186e200..000000000000
--- a/arch/arm/mach-mxs/include/mach/uncompress.h
+++ /dev/null
@@ -1,76 +0,0 @@
1/*
2 * arch/arm/mach-mxs/include/mach/uncompress.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) Shane Nay (shane@minirl.com)
6 * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
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#ifndef __MACH_MXS_UNCOMPRESS_H__
19#define __MACH_MXS_UNCOMPRESS_H__
20
21unsigned long mxs_duart_base;
22
23#define MXS_DUART(x) (*(volatile unsigned long *)(mxs_duart_base + (x)))
24
25#define MXS_DUART_DR 0x00
26#define MXS_DUART_FR 0x18
27#define MXS_DUART_FR_TXFE (1 << 7)
28#define MXS_DUART_CR 0x30
29#define MXS_DUART_CR_UARTEN (1 << 0)
30
31/*
32 * The following code assumes the serial port has already been
33 * initialized by the bootloader. If it's not, the output is
34 * simply discarded.
35 */
36
37static void putc(int ch)
38{
39 if (!mxs_duart_base)
40 return;
41 if (!(MXS_DUART(MXS_DUART_CR) & MXS_DUART_CR_UARTEN))
42 return;
43
44 while (!(MXS_DUART(MXS_DUART_FR) & MXS_DUART_FR_TXFE))
45 barrier();
46
47 MXS_DUART(MXS_DUART_DR) = ch;
48}
49
50static inline void flush(void)
51{
52}
53
54#define MX23_DUART_BASE_ADDR 0x80070000
55#define MX28_DUART_BASE_ADDR 0x80074000
56#define MXS_DIGCTL_CHIPID 0x8001c310
57
58static inline void __arch_decomp_setup(unsigned long arch_id)
59{
60 u16 chipid = (*(volatile unsigned long *) MXS_DIGCTL_CHIPID) >> 16;
61
62 switch (chipid) {
63 case 0x3780:
64 mxs_duart_base = MX23_DUART_BASE_ADDR;
65 break;
66 case 0x2800:
67 mxs_duart_base = MX28_DUART_BASE_ADDR;
68 break;
69 default:
70 break;
71 }
72}
73
74#define arch_decomp_setup() __arch_decomp_setup(arch_id)
75
76#endif /* __MACH_MXS_UNCOMPRESS_H__ */
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index 16870bf853b8..b5c1bdd3dcdf 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -32,6 +32,8 @@
32#include <asm/mach/time.h> 32#include <asm/mach/time.h>
33#include <asm/system_misc.h> 33#include <asm/system_misc.h>
34 34
35#include "pm.h"
36
35/* MXS DIGCTL SAIF CLKMUX */ 37/* MXS DIGCTL SAIF CLKMUX */
36#define MXS_DIGCTL_SAIF_CLKMUX_DIRECT 0x0 38#define MXS_DIGCTL_SAIF_CLKMUX_DIRECT 0x0
37#define MXS_DIGCTL_SAIF_CLKMUX_CROSSINPUT 0x1 39#define MXS_DIGCTL_SAIF_CLKMUX_CROSSINPUT 0x1
@@ -607,6 +609,7 @@ DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)")
607 .handle_irq = icoll_handle_irq, 609 .handle_irq = icoll_handle_irq,
608 .init_time = mxs_timer_init, 610 .init_time = mxs_timer_init,
609 .init_machine = mxs_machine_init, 611 .init_machine = mxs_machine_init,
612 .init_late = mxs_pm_init,
610 .dt_compat = mxs_dt_compat, 613 .dt_compat = mxs_dt_compat,
611 .restart = mxs_restart, 614 .restart = mxs_restart,
612MACHINE_END 615MACHINE_END
diff --git a/arch/arm/mach-mxs/pm.c b/arch/arm/mach-mxs/pm.c
index a9b4bbcdafb4..b2494d2db2c4 100644
--- a/arch/arm/mach-mxs/pm.c
+++ b/arch/arm/mach-mxs/pm.c
@@ -34,9 +34,7 @@ static struct platform_suspend_ops mxs_suspend_ops = {
34 .valid = suspend_valid_only_mem, 34 .valid = suspend_valid_only_mem,
35}; 35};
36 36
37static int __init mxs_pm_init(void) 37void __init mxs_pm_init(void)
38{ 38{
39 suspend_set_ops(&mxs_suspend_ops); 39 suspend_set_ops(&mxs_suspend_ops);
40 return 0;
41} 40}
42device_initcall(mxs_pm_init);
diff --git a/arch/arm/mach-mxs/pm.h b/arch/arm/mach-mxs/pm.h
new file mode 100644
index 000000000000..f57e7cdece2e
--- /dev/null
+++ b/arch/arm/mach-mxs/pm.h
@@ -0,0 +1,14 @@
1/*
2 * Copyright (C) 2013 Freescale Semiconductor, Inc.
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#ifndef __ARCH_MXS_PM_H
10#define __ARCH_MXS_PM_H
11
12void mxs_pm_init(void);
13
14#endif
diff --git a/arch/arm/mach-nomadik/Kconfig b/arch/arm/mach-nomadik/Kconfig
index 82226a5d60ef..9b9d105f194c 100644
--- a/arch/arm/mach-nomadik/Kconfig
+++ b/arch/arm/mach-nomadik/Kconfig
@@ -1,5 +1,24 @@
1if ARCH_NOMADIK 1config ARCH_NOMADIK
2 bool "ST-Ericsson Nomadik"
3 depends on ARCH_MULTI_V5
4 select ARCH_REQUIRE_GPIOLIB
5 select ARM_AMBA
6 select ARM_VIC
7 select CLKSRC_NOMADIK_MTU
8 select CLKSRC_NOMADIK_MTU_SCHED_CLOCK
9 select COMMON_CLK
10 select CPU_ARM926T
11 select GENERIC_CLOCKEVENTS
12 select MIGHT_HAVE_CACHE_L2X0
13 select PINCTRL
14 select PINCTRL_NOMADIK
15 select PINCTRL_STN8815
16 select SPARSE_IRQ
17 select USE_OF
18 help
19 Support for the Nomadik platform by ST-Ericsson
2 20
21if ARCH_NOMADIK
3menu "Nomadik boards" 22menu "Nomadik boards"
4 23
5config MACH_NOMADIK_8815NHK 24config MACH_NOMADIK_8815NHK
@@ -9,8 +28,8 @@ config MACH_NOMADIK_8815NHK
9 select I2C_ALGOBIT 28 select I2C_ALGOBIT
10 29
11endmenu 30endmenu
31endif
12 32
13config NOMADIK_8815 33config NOMADIK_8815
34 depends on ARCH_NOMADIK
14 bool 35 bool
15
16endif
diff --git a/arch/arm/mach-nomadik/Makefile.boot b/arch/arm/mach-nomadik/Makefile.boot
deleted file mode 100644
index ff0a4b5b0a82..000000000000
--- a/arch/arm/mach-nomadik/Makefile.boot
+++ /dev/null
@@ -1,4 +0,0 @@
1 zreladdr-y += 0x00008000
2params_phys-y := 0x00000100
3initrd_phys-y := 0x00800000
4
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index 21c1aa512640..59f6ff5c9bae 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -38,7 +38,6 @@
38#include <linux/gpio.h> 38#include <linux/gpio.h>
39#include <linux/amba/mmci.h> 39#include <linux/amba/mmci.h>
40 40
41#include <mach/irqs.h>
42#include <asm/mach/arch.h> 41#include <asm/mach/arch.h>
43#include <asm/mach/map.h> 42#include <asm/mach/map.h>
44#include <asm/mach/time.h> 43#include <asm/mach/time.h>
diff --git a/arch/arm/mach-nomadik/include/mach/irqs.h b/arch/arm/mach-nomadik/include/mach/irqs.h
deleted file mode 100644
index 90ac965a92fe..000000000000
--- a/arch/arm/mach-nomadik/include/mach/irqs.h
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * mach-nomadik/include/mach/irqs.h
3 *
4 * Copyright (C) ST Microelectronics
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#ifndef __ASM_ARCH_IRQS_H
21#define __ASM_ARCH_IRQS_H
22
23#define IRQ_VIC_START 32 /* first VIC interrupt is 1 */
24
25/*
26 * Interrupt numbers generic for all Nomadik Chip cuts
27 */
28#define IRQ_WATCHDOG (IRQ_VIC_START+0)
29#define IRQ_SOFTINT (IRQ_VIC_START+1)
30#define IRQ_CRYPTO (IRQ_VIC_START+2)
31#define IRQ_OWM (IRQ_VIC_START+3)
32#define IRQ_MTU0 (IRQ_VIC_START+4)
33#define IRQ_MTU1 (IRQ_VIC_START+5)
34#define IRQ_GPIO0 (IRQ_VIC_START+6)
35#define IRQ_GPIO1 (IRQ_VIC_START+7)
36#define IRQ_GPIO2 (IRQ_VIC_START+8)
37#define IRQ_GPIO3 (IRQ_VIC_START+9)
38#define IRQ_RTC_RTT (IRQ_VIC_START+10)
39#define IRQ_SSP (IRQ_VIC_START+11)
40#define IRQ_UART0 (IRQ_VIC_START+12)
41#define IRQ_DMA1 (IRQ_VIC_START+13)
42#define IRQ_CLCD_MDIF (IRQ_VIC_START+14)
43#define IRQ_DMA0 (IRQ_VIC_START+15)
44#define IRQ_PWRFAIL (IRQ_VIC_START+16)
45#define IRQ_UART1 (IRQ_VIC_START+17)
46#define IRQ_FIRDA (IRQ_VIC_START+18)
47#define IRQ_MSP0 (IRQ_VIC_START+19)
48#define IRQ_I2C0 (IRQ_VIC_START+20)
49#define IRQ_I2C1 (IRQ_VIC_START+21)
50#define IRQ_SDMMC (IRQ_VIC_START+22)
51#define IRQ_USBOTG (IRQ_VIC_START+23)
52#define IRQ_SVA_IT0 (IRQ_VIC_START+24)
53#define IRQ_SVA_IT1 (IRQ_VIC_START+25)
54#define IRQ_SAA_IT0 (IRQ_VIC_START+26)
55#define IRQ_SAA_IT1 (IRQ_VIC_START+27)
56#define IRQ_UART2 (IRQ_VIC_START+28)
57#define IRQ_MSP2 (IRQ_VIC_START+29)
58#define IRQ_L2CC (IRQ_VIC_START+30)
59#define IRQ_HPI (IRQ_VIC_START+31)
60#define IRQ_SKE (IRQ_VIC_START+32)
61#define IRQ_KP (IRQ_VIC_START+33)
62#define IRQ_MEMST (IRQ_VIC_START+34)
63#define IRQ_SGA_IT (IRQ_VIC_START+35)
64#define IRQ_USBM (IRQ_VIC_START+36)
65#define IRQ_MSP1 (IRQ_VIC_START+37)
66
67#define NOMADIK_GPIO_OFFSET (IRQ_VIC_START+64)
68
69/* After chip-specific IRQ numbers we have the GPIO ones */
70#define NOMADIK_NR_GPIO 128 /* last 4 not wired to pins */
71#define NOMADIK_GPIO_TO_IRQ(gpio) ((gpio) + NOMADIK_GPIO_OFFSET)
72#define NOMADIK_IRQ_TO_GPIO(irq) ((irq) - NOMADIK_GPIO_OFFSET)
73#define NOMADIK_NR_IRQS NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO)
74
75/* Following two are used by entry_macro.S, to access our dual-vic */
76#define VIC_REG_IRQSR0 0
77#define VIC_REG_IRQSR1 0x20
78
79#endif /* __ASM_ARCH_IRQS_H */
diff --git a/arch/arm/mach-nomadik/include/mach/timex.h b/arch/arm/mach-nomadik/include/mach/timex.h
deleted file mode 100644
index 318b8896ce96..000000000000
--- a/arch/arm/mach-nomadik/include/mach/timex.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_ARCH_TIMEX_H
2#define __ASM_ARCH_TIMEX_H
3
4#define CLOCK_TICK_RATE 2400000
5
6#endif
diff --git a/arch/arm/mach-nomadik/include/mach/uncompress.h b/arch/arm/mach-nomadik/include/mach/uncompress.h
deleted file mode 100644
index 106fccca2021..000000000000
--- a/arch/arm/mach-nomadik/include/mach/uncompress.h
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2 * Copyright (C) 2008 STMicroelectronics
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 as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
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 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19#ifndef __ASM_ARCH_UNCOMPRESS_H
20#define __ASM_ARCH_UNCOMPRESS_H
21
22#include <asm/setup.h>
23#include <asm/io.h>
24
25/* we need the constants in amba/serial.h, but it refers to amba_device */
26struct amba_device;
27#include <linux/amba/serial.h>
28
29#define NOMADIK_UART_DR (void __iomem *)0x101FB000
30#define NOMADIK_UART_LCRH (void __iomem *)0x101FB02c
31#define NOMADIK_UART_CR (void __iomem *)0x101FB030
32#define NOMADIK_UART_FR (void __iomem *)0x101FB018
33
34static void putc(const char c)
35{
36 /* Do nothing if the UART is not enabled. */
37 if (!(readb(NOMADIK_UART_CR) & UART01x_CR_UARTEN))
38 return;
39
40 if (c == '\n')
41 putc('\r');
42
43 while (readb(NOMADIK_UART_FR) & UART01x_FR_TXFF)
44 barrier();
45 writeb(c, NOMADIK_UART_DR);
46}
47
48static void flush(void)
49{
50 if (!(readb(NOMADIK_UART_CR) & UART01x_CR_UARTEN))
51 return;
52 while (readb(NOMADIK_UART_FR) & UART01x_FR_BUSY)
53 barrier();
54}
55
56static inline void arch_decomp_setup(void)
57{
58}
59
60#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 5c27c4747469..857b1f097fd8 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -91,6 +91,8 @@ config ARCH_OMAP4
91 select ARM_GIC 91 select ARM_GIC
92 select CACHE_L2X0 92 select CACHE_L2X0
93 select CPU_V7 93 select CPU_V7
94 select HAVE_ARM_SCU if SMP
95 select HAVE_ARM_TWD if LOCAL_TIMERS
94 select HAVE_SMP 96 select HAVE_SMP
95 select LOCAL_TIMERS if SMP 97 select LOCAL_TIMERS if SMP
96 select OMAP_INTERCONNECT 98 select OMAP_INTERCONNECT
diff --git a/arch/arm/mach-prima2/Kconfig b/arch/arm/mach-prima2/Kconfig
index b3be7994a2b1..80ca974b2f82 100644
--- a/arch/arm/mach-prima2/Kconfig
+++ b/arch/arm/mach-prima2/Kconfig
@@ -1,3 +1,15 @@
1config ARCH_SIRF
2 bool "CSR SiRF" if ARCH_MULTI_V7
3 select ARCH_REQUIRE_GPIOLIB
4 select GENERIC_CLOCKEVENTS
5 select GENERIC_IRQ_CHIP
6 select MIGHT_HAVE_CACHE_L2X0
7 select NO_IOPORT
8 select PINCTRL
9 select PINCTRL_SIRF
10 help
11 Support for CSR SiRFprimaII/Marco/Polo platforms
12
1if ARCH_SIRF 13if ARCH_SIRF
2 14
3menu "CSR SiRF atlas6/primaII/Marco/Polo Specific Features" 15menu "CSR SiRF atlas6/primaII/Marco/Polo Specific Features"
@@ -24,6 +36,7 @@ config ARCH_MARCO
24 default y 36 default y
25 select ARM_GIC 37 select ARM_GIC
26 select CPU_V7 38 select CPU_V7
39 select HAVE_ARM_SCU if SMP
27 select HAVE_SMP 40 select HAVE_SMP
28 select SMP_ON_UP 41 select SMP_ON_UP
29 help 42 help
diff --git a/arch/arm/mach-prima2/Makefile b/arch/arm/mach-prima2/Makefile
index bfe360cbd177..7a6b4a323125 100644
--- a/arch/arm/mach-prima2/Makefile
+++ b/arch/arm/mach-prima2/Makefile
@@ -4,8 +4,7 @@ obj-y += rtciobrg.o
4obj-$(CONFIG_DEBUG_LL) += lluart.o 4obj-$(CONFIG_DEBUG_LL) += lluart.o
5obj-$(CONFIG_CACHE_L2X0) += l2x0.o 5obj-$(CONFIG_CACHE_L2X0) += l2x0.o
6obj-$(CONFIG_SUSPEND) += pm.o sleep.o 6obj-$(CONFIG_SUSPEND) += pm.o sleep.o
7obj-$(CONFIG_SIRF_IRQ) += irq.o
8obj-$(CONFIG_SMP) += platsmp.o headsmp.o 7obj-$(CONFIG_SMP) += platsmp.o headsmp.o
9obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 8obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
10obj-$(CONFIG_ARCH_PRIMA2) += timer-prima2.o 9
11obj-$(CONFIG_ARCH_MARCO) += timer-marco.o 10CFLAGS_hotplug.o += -march=armv7-a
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c
index 72efb4ff2803..4f94cd87972a 100644
--- a/arch/arm/mach-prima2/common.c
+++ b/arch/arm/mach-prima2/common.c
@@ -6,6 +6,7 @@
6 * Licensed under GPLv2 or later. 6 * Licensed under GPLv2 or later.
7 */ 7 */
8 8
9#include <linux/clocksource.h>
9#include <linux/init.h> 10#include <linux/init.h>
10#include <linux/kernel.h> 11#include <linux/kernel.h>
11#include <linux/irqchip.h> 12#include <linux/irqchip.h>
@@ -31,6 +32,13 @@ void __init sirfsoc_init_late(void)
31 sirfsoc_pm_init(); 32 sirfsoc_pm_init();
32} 33}
33 34
35static __init void sirfsoc_init_time(void)
36{
37 /* initialize clocking early, we want to set the OS timer */
38 sirfsoc_of_clk_init();
39 clocksource_of_init();
40}
41
34static __init void sirfsoc_map_io(void) 42static __init void sirfsoc_map_io(void)
35{ 43{
36 sirfsoc_map_lluart(); 44 sirfsoc_map_lluart();
@@ -45,12 +53,10 @@ static const char *atlas6_dt_match[] __initdata = {
45 53
46DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)") 54DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)")
47 /* Maintainer: Barry Song <baohua.song@csr.com> */ 55 /* Maintainer: Barry Song <baohua.song@csr.com> */
56 .nr_irqs = 128,
48 .map_io = sirfsoc_map_io, 57 .map_io = sirfsoc_map_io,
49 .init_irq = sirfsoc_of_irq_init, 58 .init_irq = irqchip_init,
50 .init_time = sirfsoc_prima2_timer_init, 59 .init_time = sirfsoc_init_time,
51#ifdef CONFIG_MULTI_IRQ_HANDLER
52 .handle_irq = sirfsoc_handle_irq,
53#endif
54 .init_machine = sirfsoc_mach_init, 60 .init_machine = sirfsoc_mach_init,
55 .init_late = sirfsoc_init_late, 61 .init_late = sirfsoc_init_late,
56 .dt_compat = atlas6_dt_match, 62 .dt_compat = atlas6_dt_match,
@@ -66,12 +72,10 @@ static const char *prima2_dt_match[] __initdata = {
66 72
67DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") 73DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
68 /* Maintainer: Barry Song <baohua.song@csr.com> */ 74 /* Maintainer: Barry Song <baohua.song@csr.com> */
75 .nr_irqs = 128,
69 .map_io = sirfsoc_map_io, 76 .map_io = sirfsoc_map_io,
70 .init_irq = sirfsoc_of_irq_init, 77 .init_irq = irqchip_init,
71 .init_time = sirfsoc_prima2_timer_init, 78 .init_time = sirfsoc_init_time,
72#ifdef CONFIG_MULTI_IRQ_HANDLER
73 .handle_irq = sirfsoc_handle_irq,
74#endif
75 .dma_zone_size = SZ_256M, 79 .dma_zone_size = SZ_256M,
76 .init_machine = sirfsoc_mach_init, 80 .init_machine = sirfsoc_mach_init,
77 .init_late = sirfsoc_init_late, 81 .init_late = sirfsoc_init_late,
@@ -91,7 +95,7 @@ DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)")
91 .smp = smp_ops(sirfsoc_smp_ops), 95 .smp = smp_ops(sirfsoc_smp_ops),
92 .map_io = sirfsoc_map_io, 96 .map_io = sirfsoc_map_io,
93 .init_irq = irqchip_init, 97 .init_irq = irqchip_init,
94 .init_time = sirfsoc_marco_timer_init, 98 .init_time = sirfsoc_init_time,
95 .init_machine = sirfsoc_mach_init, 99 .init_machine = sirfsoc_mach_init,
96 .init_late = sirfsoc_init_late, 100 .init_late = sirfsoc_init_late,
97 .dt_compat = marco_dt_match, 101 .dt_compat = marco_dt_match,
diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h
index b7c26b62e4a7..81135cd88e54 100644
--- a/arch/arm/mach-prima2/common.h
+++ b/arch/arm/mach-prima2/common.h
@@ -13,8 +13,8 @@
13#include <asm/mach/time.h> 13#include <asm/mach/time.h>
14#include <asm/exception.h> 14#include <asm/exception.h>
15 15
16extern void sirfsoc_prima2_timer_init(void); 16#define SIRFSOC_VA_BASE _AC(0xFEC00000, UL)
17extern void sirfsoc_marco_timer_init(void); 17#define SIRFSOC_VA(x) (SIRFSOC_VA_BASE + ((x) & 0x00FFF000))
18 18
19extern struct smp_operations sirfsoc_smp_ops; 19extern struct smp_operations sirfsoc_smp_ops;
20extern void sirfsoc_secondary_startup(void); 20extern void sirfsoc_secondary_startup(void);
diff --git a/arch/arm/mach-prima2/include/mach/clkdev.h b/arch/arm/mach-prima2/include/mach/clkdev.h
deleted file mode 100644
index 66932518b1b7..000000000000
--- a/arch/arm/mach-prima2/include/mach/clkdev.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/*
2 * arch/arm/mach-prima2/include/mach/clkdev.h
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#ifndef __MACH_CLKDEV_H
10#define __MACH_CLKDEV_H
11
12#define __clk_get(clk) ({ 1; })
13#define __clk_put(clk) do { } while (0)
14
15#endif
diff --git a/arch/arm/mach-prima2/include/mach/debug-macro.S b/arch/arm/mach-prima2/include/mach/debug-macro.S
deleted file mode 100644
index cd97492bb075..000000000000
--- a/arch/arm/mach-prima2/include/mach/debug-macro.S
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * arch/arm/mach-prima2/include/mach/debug-macro.S
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#include <mach/hardware.h>
10#include <mach/uart.h>
11
12 .macro addruart, rp, rv, tmp
13 ldr \rp, =SIRFSOC_UART1_PA_BASE @ physical
14 ldr \rv, =SIRFSOC_UART1_VA_BASE @ virtual
15 .endm
16
17 .macro senduart,rd,rx
18 str \rd, [\rx, #SIRFSOC_UART_TXFIFO_DATA]
19 .endm
20
21 .macro busyuart,rd,rx
22 .endm
23
24 .macro waituart,rd,rx
251001: ldr \rd, [\rx, #SIRFSOC_UART_TXFIFO_STATUS]
26 tst \rd, #SIRFSOC_UART1_TXFIFO_EMPTY
27 beq 1001b
28 .endm
29
diff --git a/arch/arm/mach-prima2/include/mach/entry-macro.S b/arch/arm/mach-prima2/include/mach/entry-macro.S
deleted file mode 100644
index 86434e7a5be9..000000000000
--- a/arch/arm/mach-prima2/include/mach/entry-macro.S
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * arch/arm/mach-prima2/include/mach/entry-macro.S
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#include <mach/hardware.h>
10
11#define SIRFSOC_INT_ID 0x38
12
13 .macro get_irqnr_preamble, base, tmp
14 ldr \base, =sirfsoc_intc_base
15 ldr \base, [\base]
16 .endm
17
18 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
19 ldr \irqnr, [\base, #SIRFSOC_INT_ID] @ Get the highest priority irq
20 cmp \irqnr, #0x40 @ the irq num can't be larger than 0x3f
21 movges \irqnr, #0
22 .endm
diff --git a/arch/arm/mach-prima2/include/mach/hardware.h b/arch/arm/mach-prima2/include/mach/hardware.h
deleted file mode 100644
index 105b96964f25..000000000000
--- a/arch/arm/mach-prima2/include/mach/hardware.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/*
2 * arch/arm/mach-prima2/include/mach/hardware.h
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#ifndef __MACH_HARDWARE_H__
10#define __MACH_HARDWARE_H__
11
12#include <asm/sizes.h>
13#include <mach/map.h>
14
15#endif
diff --git a/arch/arm/mach-prima2/include/mach/irqs.h b/arch/arm/mach-prima2/include/mach/irqs.h
deleted file mode 100644
index b778a0f248ed..000000000000
--- a/arch/arm/mach-prima2/include/mach/irqs.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * arch/arm/mach-prima2/include/mach/irqs.h
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#ifndef __ASM_ARCH_IRQS_H
10#define __ASM_ARCH_IRQS_H
11
12#define SIRFSOC_INTENAL_IRQ_START 0
13#define SIRFSOC_INTENAL_IRQ_END 127
14#define SIRFSOC_GPIO_IRQ_START (SIRFSOC_INTENAL_IRQ_END + 1)
15#define NR_IRQS 288
16
17#endif
diff --git a/arch/arm/mach-prima2/include/mach/map.h b/arch/arm/mach-prima2/include/mach/map.h
deleted file mode 100644
index 6f243532570c..000000000000
--- a/arch/arm/mach-prima2/include/mach/map.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * memory & I/O static mapping definitions for CSR SiRFprimaII
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#ifndef __MACH_PRIMA2_MAP_H__
10#define __MACH_PRIMA2_MAP_H__
11
12#include <linux/const.h>
13
14#define SIRFSOC_VA_BASE _AC(0xFEC00000, UL)
15
16#define SIRFSOC_VA(x) (SIRFSOC_VA_BASE + ((x) & 0x00FFF000))
17
18#endif
diff --git a/arch/arm/mach-prima2/include/mach/timex.h b/arch/arm/mach-prima2/include/mach/timex.h
deleted file mode 100644
index d6f98a75e562..000000000000
--- a/arch/arm/mach-prima2/include/mach/timex.h
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * arch/arm/mach-prima2/include/mach/timex.h
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#ifndef __MACH_TIMEX_H__
10#define __MACH_TIMEX_H__
11
12#define CLOCK_TICK_RATE 1000000
13
14#endif
diff --git a/arch/arm/mach-prima2/include/mach/uncompress.h b/arch/arm/mach-prima2/include/mach/uncompress.h
deleted file mode 100644
index d1513a33709a..000000000000
--- a/arch/arm/mach-prima2/include/mach/uncompress.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * arch/arm/mach-prima2/include/mach/uncompress.h
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#ifndef __ASM_ARCH_UNCOMPRESS_H
10#define __ASM_ARCH_UNCOMPRESS_H
11
12#include <linux/io.h>
13#include <mach/hardware.h>
14#include <mach/uart.h>
15
16void arch_decomp_setup(void)
17{
18}
19
20static __inline__ void putc(char c)
21{
22 /*
23 * during kernel decompression, all mappings are flat:
24 * virt_addr == phys_addr
25 */
26 if (!SIRFSOC_UART1_PA_BASE)
27 return;
28
29 while (__raw_readl((void __iomem *)SIRFSOC_UART1_PA_BASE + SIRFSOC_UART_TXFIFO_STATUS)
30 & SIRFSOC_UART1_TXFIFO_FULL)
31 barrier();
32
33 __raw_writel(c, (void __iomem *)SIRFSOC_UART1_PA_BASE + SIRFSOC_UART_TXFIFO_DATA);
34}
35
36static inline void flush(void)
37{
38}
39
40#endif
41
diff --git a/arch/arm/mach-prima2/irq.c b/arch/arm/mach-prima2/irq.c
deleted file mode 100644
index 6c0f3e9c43fb..000000000000
--- a/arch/arm/mach-prima2/irq.c
+++ /dev/null
@@ -1,129 +0,0 @@
1/*
2 * interrupt controller support for CSR SiRFprimaII
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#include <linux/init.h>
10#include <linux/io.h>
11#include <linux/irq.h>
12#include <linux/of.h>
13#include <linux/of_address.h>
14#include <linux/irqdomain.h>
15#include <linux/syscore_ops.h>
16#include <asm/mach/irq.h>
17#include <asm/exception.h>
18#include <mach/hardware.h>
19
20#define SIRFSOC_INT_RISC_MASK0 0x0018
21#define SIRFSOC_INT_RISC_MASK1 0x001C
22#define SIRFSOC_INT_RISC_LEVEL0 0x0020
23#define SIRFSOC_INT_RISC_LEVEL1 0x0024
24#define SIRFSOC_INIT_IRQ_ID 0x0038
25
26void __iomem *sirfsoc_intc_base;
27
28static __init void
29sirfsoc_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
30{
31 struct irq_chip_generic *gc;
32 struct irq_chip_type *ct;
33
34 gc = irq_alloc_generic_chip("SIRFINTC", 1, irq_start, base, handle_level_irq);
35 ct = gc->chip_types;
36
37 ct->chip.irq_mask = irq_gc_mask_clr_bit;
38 ct->chip.irq_unmask = irq_gc_mask_set_bit;
39 ct->regs.mask = SIRFSOC_INT_RISC_MASK0;
40
41 irq_setup_generic_chip(gc, IRQ_MSK(num), IRQ_GC_INIT_MASK_CACHE, IRQ_NOREQUEST, 0);
42}
43
44static __init void sirfsoc_irq_init(void)
45{
46 sirfsoc_alloc_gc(sirfsoc_intc_base, 0, 32);
47 sirfsoc_alloc_gc(sirfsoc_intc_base + 4, 32,
48 SIRFSOC_INTENAL_IRQ_END + 1 - 32);
49
50 writel_relaxed(0, sirfsoc_intc_base + SIRFSOC_INT_RISC_LEVEL0);
51 writel_relaxed(0, sirfsoc_intc_base + SIRFSOC_INT_RISC_LEVEL1);
52
53 writel_relaxed(0, sirfsoc_intc_base + SIRFSOC_INT_RISC_MASK0);
54 writel_relaxed(0, sirfsoc_intc_base + SIRFSOC_INT_RISC_MASK1);
55}
56
57asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs)
58{
59 u32 irqstat, irqnr;
60
61 irqstat = readl_relaxed(sirfsoc_intc_base + SIRFSOC_INIT_IRQ_ID);
62 irqnr = irqstat & 0xff;
63
64 handle_IRQ(irqnr, regs);
65}
66
67static struct of_device_id intc_ids[] = {
68 { .compatible = "sirf,prima2-intc" },
69 {},
70};
71
72void __init sirfsoc_of_irq_init(void)
73{
74 struct device_node *np;
75
76 np = of_find_matching_node(NULL, intc_ids);
77 if (!np)
78 return;
79
80 sirfsoc_intc_base = of_iomap(np, 0);
81 if (!sirfsoc_intc_base)
82 panic("unable to map intc cpu registers\n");
83
84 irq_domain_add_legacy(np, SIRFSOC_INTENAL_IRQ_END + 1, 0, 0,
85 &irq_domain_simple_ops, NULL);
86
87 of_node_put(np);
88
89 sirfsoc_irq_init();
90}
91
92struct sirfsoc_irq_status {
93 u32 mask0;
94 u32 mask1;
95 u32 level0;
96 u32 level1;
97};
98
99static struct sirfsoc_irq_status sirfsoc_irq_st;
100
101static int sirfsoc_irq_suspend(void)
102{
103 sirfsoc_irq_st.mask0 = readl_relaxed(sirfsoc_intc_base + SIRFSOC_INT_RISC_MASK0);
104 sirfsoc_irq_st.mask1 = readl_relaxed(sirfsoc_intc_base + SIRFSOC_INT_RISC_MASK1);
105 sirfsoc_irq_st.level0 = readl_relaxed(sirfsoc_intc_base + SIRFSOC_INT_RISC_LEVEL0);
106 sirfsoc_irq_st.level1 = readl_relaxed(sirfsoc_intc_base + SIRFSOC_INT_RISC_LEVEL1);
107
108 return 0;
109}
110
111static void sirfsoc_irq_resume(void)
112{
113 writel_relaxed(sirfsoc_irq_st.mask0, sirfsoc_intc_base + SIRFSOC_INT_RISC_MASK0);
114 writel_relaxed(sirfsoc_irq_st.mask1, sirfsoc_intc_base + SIRFSOC_INT_RISC_MASK1);
115 writel_relaxed(sirfsoc_irq_st.level0, sirfsoc_intc_base + SIRFSOC_INT_RISC_LEVEL0);
116 writel_relaxed(sirfsoc_irq_st.level1, sirfsoc_intc_base + SIRFSOC_INT_RISC_LEVEL1);
117}
118
119static struct syscore_ops sirfsoc_irq_syscore_ops = {
120 .suspend = sirfsoc_irq_suspend,
121 .resume = sirfsoc_irq_resume,
122};
123
124static int __init sirfsoc_irq_pm_init(void)
125{
126 register_syscore_ops(&sirfsoc_irq_syscore_ops);
127 return 0;
128}
129device_initcall(sirfsoc_irq_pm_init);
diff --git a/arch/arm/mach-prima2/lluart.c b/arch/arm/mach-prima2/lluart.c
index a89f9b3c8cc5..99c0c927ca4a 100644
--- a/arch/arm/mach-prima2/lluart.c
+++ b/arch/arm/mach-prima2/lluart.c
@@ -9,8 +9,18 @@
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <asm/page.h> 10#include <asm/page.h>
11#include <asm/mach/map.h> 11#include <asm/mach/map.h>
12#include <mach/map.h> 12#include "common.h"
13#include <mach/uart.h> 13
14#if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1)
15#define SIRFSOC_UART1_PA_BASE 0xb0060000
16#elif defined(CONFIG_DEBUG_SIRFMARCO_UART1)
17#define SIRFSOC_UART1_PA_BASE 0xcc060000
18#else
19#define SIRFSOC_UART1_PA_BASE 0
20#endif
21
22#define SIRFSOC_UART1_VA_BASE SIRFSOC_VA(0x060000)
23#define SIRFSOC_UART1_SIZE SZ_4K
14 24
15void __init sirfsoc_map_lluart(void) 25void __init sirfsoc_map_lluart(void)
16{ 26{
diff --git a/arch/arm/mach-prima2/platsmp.c b/arch/arm/mach-prima2/platsmp.c
index c7c92e78f0cf..1c3de7bed841 100644
--- a/arch/arm/mach-prima2/platsmp.c
+++ b/arch/arm/mach-prima2/platsmp.c
@@ -17,7 +17,6 @@
17#include <asm/smp_scu.h> 17#include <asm/smp_scu.h>
18#include <asm/cacheflush.h> 18#include <asm/cacheflush.h>
19#include <asm/cputype.h> 19#include <asm/cputype.h>
20#include <mach/map.h>
21 20
22#include "common.h" 21#include "common.h"
23 22
diff --git a/arch/arm/mach-prima2/timer-marco.c b/arch/arm/mach-prima2/timer-marco.c
deleted file mode 100644
index f4eea2e97eb0..000000000000
--- a/arch/arm/mach-prima2/timer-marco.c
+++ /dev/null
@@ -1,316 +0,0 @@
1/*
2 * System timer for CSR SiRFprimaII
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#include <linux/kernel.h>
10#include <linux/interrupt.h>
11#include <linux/clockchips.h>
12#include <linux/clocksource.h>
13#include <linux/bitops.h>
14#include <linux/irq.h>
15#include <linux/clk.h>
16#include <linux/slab.h>
17#include <linux/of.h>
18#include <linux/of_irq.h>
19#include <linux/of_address.h>
20#include <asm/sched_clock.h>
21#include <asm/localtimer.h>
22#include <asm/mach/time.h>
23
24#include "common.h"
25
26#define SIRFSOC_TIMER_32COUNTER_0_CTRL 0x0000
27#define SIRFSOC_TIMER_32COUNTER_1_CTRL 0x0004
28#define SIRFSOC_TIMER_MATCH_0 0x0018
29#define SIRFSOC_TIMER_MATCH_1 0x001c
30#define SIRFSOC_TIMER_COUNTER_0 0x0048
31#define SIRFSOC_TIMER_COUNTER_1 0x004c
32#define SIRFSOC_TIMER_INTR_STATUS 0x0060
33#define SIRFSOC_TIMER_WATCHDOG_EN 0x0064
34#define SIRFSOC_TIMER_64COUNTER_CTRL 0x0068
35#define SIRFSOC_TIMER_64COUNTER_LO 0x006c
36#define SIRFSOC_TIMER_64COUNTER_HI 0x0070
37#define SIRFSOC_TIMER_64COUNTER_LOAD_LO 0x0074
38#define SIRFSOC_TIMER_64COUNTER_LOAD_HI 0x0078
39#define SIRFSOC_TIMER_64COUNTER_RLATCHED_LO 0x007c
40#define SIRFSOC_TIMER_64COUNTER_RLATCHED_HI 0x0080
41
42#define SIRFSOC_TIMER_REG_CNT 6
43
44static const u32 sirfsoc_timer_reg_list[SIRFSOC_TIMER_REG_CNT] = {
45 SIRFSOC_TIMER_WATCHDOG_EN,
46 SIRFSOC_TIMER_32COUNTER_0_CTRL,
47 SIRFSOC_TIMER_32COUNTER_1_CTRL,
48 SIRFSOC_TIMER_64COUNTER_CTRL,
49 SIRFSOC_TIMER_64COUNTER_RLATCHED_LO,
50 SIRFSOC_TIMER_64COUNTER_RLATCHED_HI,
51};
52
53static u32 sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT];
54
55static void __iomem *sirfsoc_timer_base;
56static void __init sirfsoc_of_timer_map(void);
57
58/* disable count and interrupt */
59static inline void sirfsoc_timer_count_disable(int idx)
60{
61 writel_relaxed(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL + 4 * idx) & ~0x7,
62 sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL + 4 * idx);
63}
64
65/* enable count and interrupt */
66static inline void sirfsoc_timer_count_enable(int idx)
67{
68 writel_relaxed(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL + 4 * idx) | 0x7,
69 sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL + 4 * idx);
70}
71
72/* timer interrupt handler */
73static irqreturn_t sirfsoc_timer_interrupt(int irq, void *dev_id)
74{
75 struct clock_event_device *ce = dev_id;
76 int cpu = smp_processor_id();
77
78 /* clear timer interrupt */
79 writel_relaxed(BIT(cpu), sirfsoc_timer_base + SIRFSOC_TIMER_INTR_STATUS);
80
81 if (ce->mode == CLOCK_EVT_MODE_ONESHOT)
82 sirfsoc_timer_count_disable(cpu);
83
84 ce->event_handler(ce);
85
86 return IRQ_HANDLED;
87}
88
89/* read 64-bit timer counter */
90static cycle_t sirfsoc_timer_read(struct clocksource *cs)
91{
92 u64 cycles;
93
94 writel_relaxed((readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL) |
95 BIT(0)) & ~BIT(1), sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
96
97 cycles = readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_RLATCHED_HI);
98 cycles = (cycles << 32) | readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_RLATCHED_LO);
99
100 return cycles;
101}
102
103static int sirfsoc_timer_set_next_event(unsigned long delta,
104 struct clock_event_device *ce)
105{
106 int cpu = smp_processor_id();
107
108 writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_0 +
109 4 * cpu);
110 writel_relaxed(delta, sirfsoc_timer_base + SIRFSOC_TIMER_MATCH_0 +
111 4 * cpu);
112
113 /* enable the tick */
114 sirfsoc_timer_count_enable(cpu);
115
116 return 0;
117}
118
119static void sirfsoc_timer_set_mode(enum clock_event_mode mode,
120 struct clock_event_device *ce)
121{
122 switch (mode) {
123 case CLOCK_EVT_MODE_ONESHOT:
124 /* enable in set_next_event */
125 break;
126 default:
127 break;
128 }
129
130 sirfsoc_timer_count_disable(smp_processor_id());
131}
132
133static void sirfsoc_clocksource_suspend(struct clocksource *cs)
134{
135 int i;
136
137 for (i = 0; i < SIRFSOC_TIMER_REG_CNT; i++)
138 sirfsoc_timer_reg_val[i] = readl_relaxed(sirfsoc_timer_base + sirfsoc_timer_reg_list[i]);
139}
140
141static void sirfsoc_clocksource_resume(struct clocksource *cs)
142{
143 int i;
144
145 for (i = 0; i < SIRFSOC_TIMER_REG_CNT - 2; i++)
146 writel_relaxed(sirfsoc_timer_reg_val[i], sirfsoc_timer_base + sirfsoc_timer_reg_list[i]);
147
148 writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 2],
149 sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_LOAD_LO);
150 writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 1],
151 sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_LOAD_HI);
152
153 writel_relaxed(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL) |
154 BIT(1) | BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
155}
156
157static struct clock_event_device sirfsoc_clockevent = {
158 .name = "sirfsoc_clockevent",
159 .rating = 200,
160 .features = CLOCK_EVT_FEAT_ONESHOT,
161 .set_mode = sirfsoc_timer_set_mode,
162 .set_next_event = sirfsoc_timer_set_next_event,
163};
164
165static struct clocksource sirfsoc_clocksource = {
166 .name = "sirfsoc_clocksource",
167 .rating = 200,
168 .mask = CLOCKSOURCE_MASK(64),
169 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
170 .read = sirfsoc_timer_read,
171 .suspend = sirfsoc_clocksource_suspend,
172 .resume = sirfsoc_clocksource_resume,
173};
174
175static struct irqaction sirfsoc_timer_irq = {
176 .name = "sirfsoc_timer0",
177 .flags = IRQF_TIMER | IRQF_NOBALANCING,
178 .handler = sirfsoc_timer_interrupt,
179 .dev_id = &sirfsoc_clockevent,
180};
181
182#ifdef CONFIG_LOCAL_TIMERS
183
184static struct irqaction sirfsoc_timer1_irq = {
185 .name = "sirfsoc_timer1",
186 .flags = IRQF_TIMER | IRQF_NOBALANCING,
187 .handler = sirfsoc_timer_interrupt,
188};
189
190static int __cpuinit sirfsoc_local_timer_setup(struct clock_event_device *ce)
191{
192 /* Use existing clock_event for cpu 0 */
193 if (!smp_processor_id())
194 return 0;
195
196 ce->irq = sirfsoc_timer1_irq.irq;
197 ce->name = "local_timer";
198 ce->features = sirfsoc_clockevent.features;
199 ce->rating = sirfsoc_clockevent.rating;
200 ce->set_mode = sirfsoc_timer_set_mode;
201 ce->set_next_event = sirfsoc_timer_set_next_event;
202 ce->shift = sirfsoc_clockevent.shift;
203 ce->mult = sirfsoc_clockevent.mult;
204 ce->max_delta_ns = sirfsoc_clockevent.max_delta_ns;
205 ce->min_delta_ns = sirfsoc_clockevent.min_delta_ns;
206
207 sirfsoc_timer1_irq.dev_id = ce;
208 BUG_ON(setup_irq(ce->irq, &sirfsoc_timer1_irq));
209 irq_set_affinity(sirfsoc_timer1_irq.irq, cpumask_of(1));
210
211 clockevents_register_device(ce);
212 return 0;
213}
214
215static void sirfsoc_local_timer_stop(struct clock_event_device *ce)
216{
217 sirfsoc_timer_count_disable(1);
218
219 remove_irq(sirfsoc_timer1_irq.irq, &sirfsoc_timer1_irq);
220}
221
222static struct local_timer_ops sirfsoc_local_timer_ops __cpuinitdata = {
223 .setup = sirfsoc_local_timer_setup,
224 .stop = sirfsoc_local_timer_stop,
225};
226#endif /* CONFIG_LOCAL_TIMERS */
227
228static void __init sirfsoc_clockevent_init(void)
229{
230 clockevents_calc_mult_shift(&sirfsoc_clockevent, CLOCK_TICK_RATE, 60);
231
232 sirfsoc_clockevent.max_delta_ns =
233 clockevent_delta2ns(-2, &sirfsoc_clockevent);
234 sirfsoc_clockevent.min_delta_ns =
235 clockevent_delta2ns(2, &sirfsoc_clockevent);
236
237 sirfsoc_clockevent.cpumask = cpumask_of(0);
238 clockevents_register_device(&sirfsoc_clockevent);
239#ifdef CONFIG_LOCAL_TIMERS
240 local_timer_register(&sirfsoc_local_timer_ops);
241#endif
242}
243
244/* initialize the kernel jiffy timer source */
245void __init sirfsoc_marco_timer_init(void)
246{
247 unsigned long rate;
248 u32 timer_div;
249 struct clk *clk;
250
251 /* initialize clocking early, we want to set the OS timer */
252 sirfsoc_of_clk_init();
253
254 /* timer's input clock is io clock */
255 clk = clk_get_sys("io", NULL);
256
257 BUG_ON(IS_ERR(clk));
258 rate = clk_get_rate(clk);
259
260 BUG_ON(rate < CLOCK_TICK_RATE);
261 BUG_ON(rate % CLOCK_TICK_RATE);
262
263 sirfsoc_of_timer_map();
264
265 /* Initialize the timer dividers */
266 timer_div = rate / CLOCK_TICK_RATE - 1;
267 writel_relaxed(timer_div << 16, sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
268 writel_relaxed(timer_div << 16, sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL);
269 writel_relaxed(timer_div << 16, sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_1_CTRL);
270
271 /* Initialize timer counters to 0 */
272 writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_LOAD_LO);
273 writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_LOAD_HI);
274 writel_relaxed(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL) |
275 BIT(1) | BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
276 writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_0);
277 writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_1);
278
279 /* Clear all interrupts */
280 writel_relaxed(0xFFFF, sirfsoc_timer_base + SIRFSOC_TIMER_INTR_STATUS);
281
282 BUG_ON(clocksource_register_hz(&sirfsoc_clocksource, CLOCK_TICK_RATE));
283
284 BUG_ON(setup_irq(sirfsoc_timer_irq.irq, &sirfsoc_timer_irq));
285
286 sirfsoc_clockevent_init();
287}
288
289static struct of_device_id timer_ids[] = {
290 { .compatible = "sirf,marco-tick" },
291 {},
292};
293
294static void __init sirfsoc_of_timer_map(void)
295{
296 struct device_node *np;
297
298 np = of_find_matching_node(NULL, timer_ids);
299 if (!np)
300 return;
301 sirfsoc_timer_base = of_iomap(np, 0);
302 if (!sirfsoc_timer_base)
303 panic("unable to map timer cpu registers\n");
304
305 sirfsoc_timer_irq.irq = irq_of_parse_and_map(np, 0);
306 if (!sirfsoc_timer_irq.irq)
307 panic("No irq passed for timer0 via DT\n");
308
309#ifdef CONFIG_LOCAL_TIMERS
310 sirfsoc_timer1_irq.irq = irq_of_parse_and_map(np, 1);
311 if (!sirfsoc_timer1_irq.irq)
312 panic("No irq passed for timer1 via DT\n");
313#endif
314
315 of_node_put(np);
316}
diff --git a/arch/arm/mach-prima2/timer-prima2.c b/arch/arm/mach-prima2/timer-prima2.c
deleted file mode 100644
index 6da584f8a949..000000000000
--- a/arch/arm/mach-prima2/timer-prima2.c
+++ /dev/null
@@ -1,241 +0,0 @@
1/*
2 * System timer for CSR SiRFprimaII
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#include <linux/kernel.h>
10#include <linux/interrupt.h>
11#include <linux/clockchips.h>
12#include <linux/clocksource.h>
13#include <linux/bitops.h>
14#include <linux/irq.h>
15#include <linux/clk.h>
16#include <linux/err.h>
17#include <linux/slab.h>
18#include <linux/of.h>
19#include <linux/of_address.h>
20#include <mach/map.h>
21#include <asm/sched_clock.h>
22#include <asm/mach/time.h>
23
24#include "common.h"
25
26#define SIRFSOC_TIMER_COUNTER_LO 0x0000
27#define SIRFSOC_TIMER_COUNTER_HI 0x0004
28#define SIRFSOC_TIMER_MATCH_0 0x0008
29#define SIRFSOC_TIMER_MATCH_1 0x000C
30#define SIRFSOC_TIMER_MATCH_2 0x0010
31#define SIRFSOC_TIMER_MATCH_3 0x0014
32#define SIRFSOC_TIMER_MATCH_4 0x0018
33#define SIRFSOC_TIMER_MATCH_5 0x001C
34#define SIRFSOC_TIMER_STATUS 0x0020
35#define SIRFSOC_TIMER_INT_EN 0x0024
36#define SIRFSOC_TIMER_WATCHDOG_EN 0x0028
37#define SIRFSOC_TIMER_DIV 0x002C
38#define SIRFSOC_TIMER_LATCH 0x0030
39#define SIRFSOC_TIMER_LATCHED_LO 0x0034
40#define SIRFSOC_TIMER_LATCHED_HI 0x0038
41
42#define SIRFSOC_TIMER_WDT_INDEX 5
43
44#define SIRFSOC_TIMER_LATCH_BIT BIT(0)
45
46#define SIRFSOC_TIMER_REG_CNT 11
47
48static const u32 sirfsoc_timer_reg_list[SIRFSOC_TIMER_REG_CNT] = {
49 SIRFSOC_TIMER_MATCH_0, SIRFSOC_TIMER_MATCH_1, SIRFSOC_TIMER_MATCH_2,
50 SIRFSOC_TIMER_MATCH_3, SIRFSOC_TIMER_MATCH_4, SIRFSOC_TIMER_MATCH_5,
51 SIRFSOC_TIMER_INT_EN, SIRFSOC_TIMER_WATCHDOG_EN, SIRFSOC_TIMER_DIV,
52 SIRFSOC_TIMER_LATCHED_LO, SIRFSOC_TIMER_LATCHED_HI,
53};
54
55static u32 sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT];
56
57static void __iomem *sirfsoc_timer_base;
58static void __init sirfsoc_of_timer_map(void);
59
60/* timer0 interrupt handler */
61static irqreturn_t sirfsoc_timer_interrupt(int irq, void *dev_id)
62{
63 struct clock_event_device *ce = dev_id;
64
65 WARN_ON(!(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_STATUS) & BIT(0)));
66
67 /* clear timer0 interrupt */
68 writel_relaxed(BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_STATUS);
69
70 ce->event_handler(ce);
71
72 return IRQ_HANDLED;
73}
74
75/* read 64-bit timer counter */
76static cycle_t sirfsoc_timer_read(struct clocksource *cs)
77{
78 u64 cycles;
79
80 /* latch the 64-bit timer counter */
81 writel_relaxed(SIRFSOC_TIMER_LATCH_BIT, sirfsoc_timer_base + SIRFSOC_TIMER_LATCH);
82 cycles = readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_LATCHED_HI);
83 cycles = (cycles << 32) | readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_LATCHED_LO);
84
85 return cycles;
86}
87
88static int sirfsoc_timer_set_next_event(unsigned long delta,
89 struct clock_event_device *ce)
90{
91 unsigned long now, next;
92
93 writel_relaxed(SIRFSOC_TIMER_LATCH_BIT, sirfsoc_timer_base + SIRFSOC_TIMER_LATCH);
94 now = readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_LATCHED_LO);
95 next = now + delta;
96 writel_relaxed(next, sirfsoc_timer_base + SIRFSOC_TIMER_MATCH_0);
97 writel_relaxed(SIRFSOC_TIMER_LATCH_BIT, sirfsoc_timer_base + SIRFSOC_TIMER_LATCH);
98 now = readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_LATCHED_LO);
99
100 return next - now > delta ? -ETIME : 0;
101}
102
103static void sirfsoc_timer_set_mode(enum clock_event_mode mode,
104 struct clock_event_device *ce)
105{
106 u32 val = readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_INT_EN);
107 switch (mode) {
108 case CLOCK_EVT_MODE_PERIODIC:
109 WARN_ON(1);
110 break;
111 case CLOCK_EVT_MODE_ONESHOT:
112 writel_relaxed(val | BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_INT_EN);
113 break;
114 case CLOCK_EVT_MODE_SHUTDOWN:
115 writel_relaxed(val & ~BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_INT_EN);
116 break;
117 case CLOCK_EVT_MODE_UNUSED:
118 case CLOCK_EVT_MODE_RESUME:
119 break;
120 }
121}
122
123static void sirfsoc_clocksource_suspend(struct clocksource *cs)
124{
125 int i;
126
127 writel_relaxed(SIRFSOC_TIMER_LATCH_BIT, sirfsoc_timer_base + SIRFSOC_TIMER_LATCH);
128
129 for (i = 0; i < SIRFSOC_TIMER_REG_CNT; i++)
130 sirfsoc_timer_reg_val[i] = readl_relaxed(sirfsoc_timer_base + sirfsoc_timer_reg_list[i]);
131}
132
133static void sirfsoc_clocksource_resume(struct clocksource *cs)
134{
135 int i;
136
137 for (i = 0; i < SIRFSOC_TIMER_REG_CNT - 2; i++)
138 writel_relaxed(sirfsoc_timer_reg_val[i], sirfsoc_timer_base + sirfsoc_timer_reg_list[i]);
139
140 writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 2], sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_LO);
141 writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 1], sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_HI);
142}
143
144static struct clock_event_device sirfsoc_clockevent = {
145 .name = "sirfsoc_clockevent",
146 .rating = 200,
147 .features = CLOCK_EVT_FEAT_ONESHOT,
148 .set_mode = sirfsoc_timer_set_mode,
149 .set_next_event = sirfsoc_timer_set_next_event,
150};
151
152static struct clocksource sirfsoc_clocksource = {
153 .name = "sirfsoc_clocksource",
154 .rating = 200,
155 .mask = CLOCKSOURCE_MASK(64),
156 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
157 .read = sirfsoc_timer_read,
158 .suspend = sirfsoc_clocksource_suspend,
159 .resume = sirfsoc_clocksource_resume,
160};
161
162static struct irqaction sirfsoc_timer_irq = {
163 .name = "sirfsoc_timer0",
164 .flags = IRQF_TIMER,
165 .irq = 0,
166 .handler = sirfsoc_timer_interrupt,
167 .dev_id = &sirfsoc_clockevent,
168};
169
170/* Overwrite weak default sched_clock with more precise one */
171static u32 notrace sirfsoc_read_sched_clock(void)
172{
173 return (u32)(sirfsoc_timer_read(NULL) & 0xffffffff);
174}
175
176static void __init sirfsoc_clockevent_init(void)
177{
178 sirfsoc_clockevent.cpumask = cpumask_of(0);
179 clockevents_config_and_register(&sirfsoc_clockevent, CLOCK_TICK_RATE,
180 2, -2);
181}
182
183/* initialize the kernel jiffy timer source */
184void __init sirfsoc_prima2_timer_init(void)
185{
186 unsigned long rate;
187 struct clk *clk;
188
189 /* initialize clocking early, we want to set the OS timer */
190 sirfsoc_of_clk_init();
191
192 /* timer's input clock is io clock */
193 clk = clk_get_sys("io", NULL);
194
195 BUG_ON(IS_ERR(clk));
196
197 rate = clk_get_rate(clk);
198
199 BUG_ON(rate < CLOCK_TICK_RATE);
200 BUG_ON(rate % CLOCK_TICK_RATE);
201
202 sirfsoc_of_timer_map();
203
204 writel_relaxed(rate / CLOCK_TICK_RATE / 2 - 1, sirfsoc_timer_base + SIRFSOC_TIMER_DIV);
205 writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_LO);
206 writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_HI);
207 writel_relaxed(BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_STATUS);
208
209 BUG_ON(clocksource_register_hz(&sirfsoc_clocksource, CLOCK_TICK_RATE));
210
211 setup_sched_clock(sirfsoc_read_sched_clock, 32, CLOCK_TICK_RATE);
212
213 BUG_ON(setup_irq(sirfsoc_timer_irq.irq, &sirfsoc_timer_irq));
214
215 sirfsoc_clockevent_init();
216}
217
218static struct of_device_id timer_ids[] = {
219 { .compatible = "sirf,prima2-tick" },
220 {},
221};
222
223static void __init sirfsoc_of_timer_map(void)
224{
225 struct device_node *np;
226 const unsigned int *intspec;
227
228 np = of_find_matching_node(NULL, timer_ids);
229 if (!np)
230 return;
231 sirfsoc_timer_base = of_iomap(np, 0);
232 if (!sirfsoc_timer_base)
233 panic("unable to map timer cpu registers\n");
234
235 /* Get the interrupts property */
236 intspec = of_get_property(np, "interrupts", NULL);
237 BUG_ON(!intspec);
238 sirfsoc_timer_irq.irq = be32_to_cpup(intspec);
239
240 of_node_put(np);
241}
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig
index 14c1d47e1abf..d210c0f9c2c4 100644
--- a/arch/arm/mach-realview/Kconfig
+++ b/arch/arm/mach-realview/Kconfig
@@ -12,6 +12,8 @@ config REALVIEW_EB_A9MP
12 bool "Support Multicore Cortex-A9 Tile" 12 bool "Support Multicore Cortex-A9 Tile"
13 depends on MACH_REALVIEW_EB 13 depends on MACH_REALVIEW_EB
14 select CPU_V7 14 select CPU_V7
15 select HAVE_ARM_SCU if SMP
16 select HAVE_ARM_TWD if LOCAL_TIMERS
15 select HAVE_SMP 17 select HAVE_SMP
16 select MIGHT_HAVE_CACHE_L2X0 18 select MIGHT_HAVE_CACHE_L2X0
17 help 19 help
@@ -23,6 +25,8 @@ config REALVIEW_EB_ARM11MP
23 depends on MACH_REALVIEW_EB 25 depends on MACH_REALVIEW_EB
24 select ARCH_HAS_BARRIERS if SMP 26 select ARCH_HAS_BARRIERS if SMP
25 select CPU_V6K 27 select CPU_V6K
28 select HAVE_ARM_SCU if SMP
29 select HAVE_ARM_TWD if LOCAL_TIMERS
26 select HAVE_SMP 30 select HAVE_SMP
27 select MIGHT_HAVE_CACHE_L2X0 31 select MIGHT_HAVE_CACHE_L2X0
28 help 32 help
@@ -43,6 +47,8 @@ config MACH_REALVIEW_PB11MP
43 select ARCH_HAS_BARRIERS if SMP 47 select ARCH_HAS_BARRIERS if SMP
44 select ARM_GIC 48 select ARM_GIC
45 select CPU_V6K 49 select CPU_V6K
50 select HAVE_ARM_SCU if SMP
51 select HAVE_ARM_TWD if LOCAL_TIMERS
46 select HAVE_PATA_PLATFORM 52 select HAVE_PATA_PLATFORM
47 select HAVE_SMP 53 select HAVE_SMP
48 select MIGHT_HAVE_CACHE_L2X0 54 select MIGHT_HAVE_CACHE_L2X0
@@ -85,6 +91,8 @@ config MACH_REALVIEW_PBX
85 bool "Support RealView(R) Platform Baseboard Explore" 91 bool "Support RealView(R) Platform Baseboard Explore"
86 select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET 92 select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET
87 select ARM_GIC 93 select ARM_GIC
94 select HAVE_ARM_SCU if SMP
95 select HAVE_ARM_TWD if LOCAL_TIMERS
88 select HAVE_PATA_PLATFORM 96 select HAVE_PATA_PLATFORM
89 select HAVE_SMP 97 select HAVE_SMP
90 select MIGHT_HAVE_CACHE_L2X0 98 select MIGHT_HAVE_CACHE_L2X0
diff --git a/arch/arm/mach-s3c24xx/include/mach/debug-macro.S b/arch/arm/mach-s3c24xx/include/mach/debug-macro.S
index 13ed33c69113..2558952e3147 100644
--- a/arch/arm/mach-s3c24xx/include/mach/debug-macro.S
+++ b/arch/arm/mach-s3c24xx/include/mach/debug-macro.S
@@ -98,4 +98,4 @@
98 98
99/* include the reset of the code which will do the work */ 99/* include the reset of the code which will do the work */
100 100
101#include <plat/debug-macro.S> 101#include <debug/samsung.S>
diff --git a/arch/arm/mach-s3c64xx/include/mach/debug-macro.S b/arch/arm/mach-s3c64xx/include/mach/debug-macro.S
index c0c076a90f27..dd9ccca5de1f 100644
--- a/arch/arm/mach-s3c64xx/include/mach/debug-macro.S
+++ b/arch/arm/mach-s3c64xx/include/mach/debug-macro.S
@@ -35,4 +35,4 @@
35 * will be fine with us. 35 * will be fine with us.
36 */ 36 */
37 37
38#include <plat/debug-macro.S> 38#include <debug/samsung.S>
diff --git a/arch/arm/mach-s5p64x0/include/mach/debug-macro.S b/arch/arm/mach-s5p64x0/include/mach/debug-macro.S
index e80ba3c69814..5e2916fb19a9 100644
--- a/arch/arm/mach-s5p64x0/include/mach/debug-macro.S
+++ b/arch/arm/mach-s5p64x0/include/mach/debug-macro.S
@@ -30,4 +30,4 @@
30#endif 30#endif
31 .endm 31 .endm
32 32
33#include <plat/debug-macro.S> 33#include <debug/samsung.S>
diff --git a/arch/arm/mach-s5pc100/include/mach/debug-macro.S b/arch/arm/mach-s5pc100/include/mach/debug-macro.S
index 694f75937000..66cb7f16bf2a 100644
--- a/arch/arm/mach-s5pc100/include/mach/debug-macro.S
+++ b/arch/arm/mach-s5pc100/include/mach/debug-macro.S
@@ -36,4 +36,4 @@
36 * will be fine with us. 36 * will be fine with us.
37 */ 37 */
38 38
39#include <plat/debug-macro.S> 39#include <debug/samsung.S>
diff --git a/arch/arm/mach-s5pc100/setup-sdhci-gpio.c b/arch/arm/mach-s5pc100/setup-sdhci-gpio.c
index 03c02d04c68c..6010c0310cb5 100644
--- a/arch/arm/mach-s5pc100/setup-sdhci-gpio.c
+++ b/arch/arm/mach-s5pc100/setup-sdhci-gpio.c
@@ -19,7 +19,6 @@
19#include <linux/mmc/card.h> 19#include <linux/mmc/card.h>
20 20
21#include <plat/gpio-cfg.h> 21#include <plat/gpio-cfg.h>
22#include <plat/regs-sdhci.h>
23#include <plat/sdhci.h> 22#include <plat/sdhci.h>
24 23
25void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) 24void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
diff --git a/arch/arm/mach-s5pv210/include/mach/debug-macro.S b/arch/arm/mach-s5pv210/include/mach/debug-macro.S
index 79e55597ab63..80c21996c943 100644
--- a/arch/arm/mach-s5pv210/include/mach/debug-macro.S
+++ b/arch/arm/mach-s5pv210/include/mach/debug-macro.S
@@ -38,4 +38,4 @@
38 * will be fine with us. 38 * will be fine with us.
39 */ 39 */
40 40
41#include <plat/debug-macro.S> 41#include <debug/samsung.S>
diff --git a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c
index 3e3ac05bb7b1..0512ada00522 100644
--- a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c
+++ b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c
@@ -20,7 +20,6 @@
20#include <linux/mmc/card.h> 20#include <linux/mmc/card.h>
21 21
22#include <plat/gpio-cfg.h> 22#include <plat/gpio-cfg.h>
23#include <plat/regs-sdhci.h>
24#include <plat/sdhci.h> 23#include <plat/sdhci.h>
25 24
26void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) 25void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
diff --git a/arch/arm/mach-spear/Kconfig b/arch/arm/mach-spear/Kconfig
new file mode 100644
index 000000000000..442917eedff3
--- /dev/null
+++ b/arch/arm/mach-spear/Kconfig
@@ -0,0 +1,105 @@
1#
2# SPEAr Platform configuration file
3#
4
5menuconfig PLAT_SPEAR
6 bool "ST SPEAr Family" if ARCH_MULTI_V7 || ARCH_MULTI_V5
7 default PLAT_SPEAR_SINGLE
8 select ARCH_REQUIRE_GPIOLIB
9 select ARM_AMBA
10 select CLKDEV_LOOKUP
11 select CLKSRC_MMIO
12 select COMMON_CLK
13 select GENERIC_CLOCKEVENTS
14 select HAVE_CLK
15
16if PLAT_SPEAR
17
18config ARCH_SPEAR13XX
19 bool "ST SPEAr13xx"
20 depends on ARCH_MULTI_V7 || PLAT_SPEAR_SINGLE
21 select ARCH_HAS_CPUFREQ
22 select ARM_GIC
23 select CPU_V7
24 select GPIO_SPEAR_SPICS
25 select HAVE_ARM_SCU if SMP
26 select HAVE_ARM_TWD if LOCAL_TIMERS
27 select HAVE_SMP
28 select MIGHT_HAVE_CACHE_L2X0
29 select PINCTRL
30 select USE_OF
31 help
32 Supports for ARM's SPEAR13XX family
33
34if ARCH_SPEAR13XX
35
36config MACH_SPEAR1310
37 bool "SPEAr1310 Machine support with Device Tree"
38 select PINCTRL_SPEAR1310
39 help
40 Supports ST SPEAr1310 machine configured via the device-tree
41
42config MACH_SPEAR1340
43 bool "SPEAr1340 Machine support with Device Tree"
44 select PINCTRL_SPEAR1340
45 help
46 Supports ST SPEAr1340 machine configured via the device-tree
47
48endif #ARCH_SPEAR13XX
49
50config ARCH_SPEAR3XX
51 bool "ST SPEAr3xx"
52 depends on ARCH_MULTI_V5 || PLAT_SPEAR_SINGLE
53 depends on !ARCH_SPEAR13XX
54 select ARM_VIC
55 select CPU_ARM926T
56 select PINCTRL
57 select USE_OF
58 help
59 Supports for ARM's SPEAR3XX family
60
61if ARCH_SPEAR3XX
62
63config MACH_SPEAR300
64 bool "SPEAr300 Machine support with Device Tree"
65 select PINCTRL_SPEAR300
66 help
67 Supports ST SPEAr300 machine configured via the device-tree
68
69config MACH_SPEAR310
70 bool "SPEAr310 Machine support with Device Tree"
71 select PINCTRL_SPEAR310
72 help
73 Supports ST SPEAr310 machine configured via the device-tree
74
75config MACH_SPEAR320
76 bool "SPEAr320 Machine support with Device Tree"
77 select PINCTRL_SPEAR320
78 help
79 Supports ST SPEAr320 machine configured via the device-tree
80
81endif
82
83config ARCH_SPEAR6XX
84 bool "ST SPEAr6XX"
85 depends on ARCH_MULTI_V5 || PLAT_SPEAR_SINGLE
86 depends on !ARCH_SPEAR13XX
87 select ARM_VIC
88 select CPU_ARM926T
89 help
90 Supports for ARM's SPEAR6XX family
91
92config MACH_SPEAR600
93 def_bool y
94 depends on ARCH_SPEAR6XX
95 select USE_OF
96 help
97 Supports ST SPEAr600 boards configured via the device-treesource "arch/arm/mach-spear6xx/Kconfig"
98
99config ARCH_SPEAR_AUTO
100 def_bool PLAT_SPEAR_SINGLE
101 depends on !ARCH_SPEAR13XX && !ARCH_SPEAR6XX
102 select ARCH_SPEAR3XX
103
104endif
105
diff --git a/arch/arm/mach-spear/Makefile b/arch/arm/mach-spear/Makefile
new file mode 100644
index 000000000000..af9bffb94f1c
--- /dev/null
+++ b/arch/arm/mach-spear/Makefile
@@ -0,0 +1,26 @@
1#
2# SPEAr Platform specific Makefile
3#
4
5ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
6
7# Common support
8obj-y := restart.o time.o
9
10obj-$(CONFIG_SMP) += headsmp.o platsmp.o
11obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
12
13obj-$(CONFIG_ARCH_SPEAR13XX) += spear13xx.o
14obj-$(CONFIG_MACH_SPEAR1310) += spear1310.o
15obj-$(CONFIG_MACH_SPEAR1340) += spear1340.o
16
17obj-$(CONFIG_ARCH_SPEAR3XX) += spear3xx.o
18obj-$(CONFIG_ARCH_SPEAR3XX) += pl080.o
19obj-$(CONFIG_MACH_SPEAR300) += spear300.o
20obj-$(CONFIG_MACH_SPEAR310) += spear310.o
21obj-$(CONFIG_MACH_SPEAR320) += spear320.o
22
23obj-$(CONFIG_ARCH_SPEAR6XX) += spear6xx.o
24obj-$(CONFIG_ARCH_SPEAR6XX) += pl080.o
25
26CFLAGS_hotplug.o += -march=armv7-a
diff --git a/arch/arm/mach-spear13xx/Makefile.boot b/arch/arm/mach-spear/Makefile.boot
index 4674a4c221db..4674a4c221db 100644
--- a/arch/arm/mach-spear13xx/Makefile.boot
+++ b/arch/arm/mach-spear/Makefile.boot
diff --git a/arch/arm/mach-spear13xx/include/mach/generic.h b/arch/arm/mach-spear/generic.h
index 633e678e01a3..8ba7e75b648d 100644
--- a/arch/arm/mach-spear13xx/include/mach/generic.h
+++ b/arch/arm/mach-spear/generic.h
@@ -1,9 +1,8 @@
1/* 1/*
2 * arch/arm/mach-spear13xx/include/mach/generic.h 2 * spear machine family generic header file
3 * 3 *
4 * spear13xx machine family generic header file 4 * Copyright (C) 2009-2012 ST Microelectronics
5 * 5 * Rajeev Kumar <rajeev-dlh.kumar@st.com>
6 * Copyright (C) 2012 ST Microelectronics
7 * Viresh Kumar <viresh.linux@gmail.com> 6 * Viresh Kumar <viresh.linux@gmail.com>
8 * 7 *
9 * This file is licensed under the terms of the GNU General Public 8 * This file is licensed under the terms of the GNU General Public
@@ -15,37 +14,46 @@
15#define __MACH_GENERIC_H 14#define __MACH_GENERIC_H
16 15
17#include <linux/dmaengine.h> 16#include <linux/dmaengine.h>
17#include <linux/amba/pl08x.h>
18#include <linux/init.h>
18#include <asm/mach/time.h> 19#include <asm/mach/time.h>
19 20
20/* Add spear13xx structure declarations here */
21extern void spear13xx_timer_init(void); 21extern void spear13xx_timer_init(void);
22extern void spear3xx_timer_init(void);
22extern struct pl022_ssp_controller pl022_plat_data; 23extern struct pl022_ssp_controller pl022_plat_data;
24extern struct pl08x_platform_data pl080_plat_data;
23extern struct dw_dma_platform_data dmac_plat_data; 25extern struct dw_dma_platform_data dmac_plat_data;
24extern struct dw_dma_slave cf_dma_priv; 26extern struct dw_dma_slave cf_dma_priv;
25extern struct dw_dma_slave nand_read_dma_priv; 27extern struct dw_dma_slave nand_read_dma_priv;
26extern struct dw_dma_slave nand_write_dma_priv; 28extern struct dw_dma_slave nand_write_dma_priv;
29bool dw_dma_filter(struct dma_chan *chan, void *slave);
27 30
28/* Add spear13xx family function declarations here */
29void __init spear_setup_of_timer(void); 31void __init spear_setup_of_timer(void);
32void __init spear3xx_clk_init(void __iomem *misc_base,
33 void __iomem *soc_config_base);
34void __init spear3xx_map_io(void);
35void __init spear3xx_dt_init_irq(void);
36void __init spear6xx_clk_init(void __iomem *misc_base);
30void __init spear13xx_map_io(void); 37void __init spear13xx_map_io(void);
31void __init spear13xx_l2x0_init(void); 38void __init spear13xx_l2x0_init(void);
32bool dw_dma_filter(struct dma_chan *chan, void *slave); 39
33void spear_restart(char, const char *); 40void spear_restart(char, const char *);
41
34void spear13xx_secondary_startup(void); 42void spear13xx_secondary_startup(void);
35void __cpuinit spear13xx_cpu_die(unsigned int cpu); 43void __cpuinit spear13xx_cpu_die(unsigned int cpu);
36 44
37extern struct smp_operations spear13xx_smp_ops; 45extern struct smp_operations spear13xx_smp_ops;
38 46
39#ifdef CONFIG_MACH_SPEAR1310 47#ifdef CONFIG_MACH_SPEAR1310
40void __init spear1310_clk_init(void); 48void __init spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base);
41#else 49#else
42static inline void spear1310_clk_init(void) {} 50static inline void spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base) {}
43#endif 51#endif
44 52
45#ifdef CONFIG_MACH_SPEAR1340 53#ifdef CONFIG_MACH_SPEAR1340
46void __init spear1340_clk_init(void); 54void __init spear1340_clk_init(void __iomem *misc_base);
47#else 55#else
48static inline void spear1340_clk_init(void) {} 56static inline void spear1340_clk_init(void __iomem *misc_base) {}
49#endif 57#endif
50 58
51#endif /* __MACH_GENERIC_H */ 59#endif /* __MACH_GENERIC_H */
diff --git a/arch/arm/mach-spear13xx/headsmp.S b/arch/arm/mach-spear/headsmp.S
index ed85473a047f..ed85473a047f 100644
--- a/arch/arm/mach-spear13xx/headsmp.S
+++ b/arch/arm/mach-spear/headsmp.S
diff --git a/arch/arm/mach-spear13xx/hotplug.c b/arch/arm/mach-spear/hotplug.c
index a7d2dd11a4f2..a7d2dd11a4f2 100644
--- a/arch/arm/mach-spear13xx/hotplug.c
+++ b/arch/arm/mach-spear/hotplug.c
diff --git a/arch/arm/plat-spear/include/plat/debug-macro.S b/arch/arm/mach-spear/include/mach/debug-macro.S
index 75b05ad0fbad..75b05ad0fbad 100644
--- a/arch/arm/plat-spear/include/plat/debug-macro.S
+++ b/arch/arm/mach-spear/include/mach/debug-macro.S
diff --git a/arch/arm/mach-spear6xx/include/mach/irqs.h b/arch/arm/mach-spear/include/mach/irqs.h
index 37a5c411a866..92da0a8c6bce 100644
--- a/arch/arm/mach-spear6xx/include/mach/irqs.h
+++ b/arch/arm/mach-spear/include/mach/irqs.h
@@ -1,10 +1,9 @@
1/* 1/*
2 * arch/arm/mach-spear6xx/include/mach/irqs.h 2 * IRQ helper macros for spear machine family
3 * 3 *
4 * IRQ helper macros for SPEAr6xx machine family 4 * Copyright (C) 2009-2012 ST Microelectronics
5 * 5 * Rajeev Kumar <rajeev-dlh.kumar@st.com>
6 * Copyright (C) 2009 ST Microelectronics 6 * Viresh Kumar <viresh.linux@gmail.com>
7 * Rajeev Kumar<rajeev-dlh.kumar@st.com>
8 * 7 *
9 * This file is licensed under the terms of the GNU General Public 8 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any 9 * License version 2. This program is licensed "as is" without any
@@ -14,6 +13,11 @@
14#ifndef __MACH_IRQS_H 13#ifndef __MACH_IRQS_H
15#define __MACH_IRQS_H 14#define __MACH_IRQS_H
16 15
16#ifdef CONFIG_ARCH_SPEAR3XX
17#define NR_IRQS 256
18#endif
19
20#ifdef CONFIG_ARCH_SPEAR6XX
17/* IRQ definitions */ 21/* IRQ definitions */
18/* VIC 1 */ 22/* VIC 1 */
19#define IRQ_VIC_END 64 23#define IRQ_VIC_END 64
@@ -21,5 +25,11 @@
21/* GPIO pins virtual irqs */ 25/* GPIO pins virtual irqs */
22#define VIRTUAL_IRQS 24 26#define VIRTUAL_IRQS 24
23#define NR_IRQS (IRQ_VIC_END + VIRTUAL_IRQS) 27#define NR_IRQS (IRQ_VIC_END + VIRTUAL_IRQS)
28#endif
29
30#ifdef CONFIG_ARCH_SPEAR13XX
31#define IRQ_GIC_END 160
32#define NR_IRQS IRQ_GIC_END
33#endif
24 34
25#endif /* __MACH_IRQS_H */ 35#endif /* __MACH_IRQS_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/misc_regs.h b/arch/arm/mach-spear/include/mach/misc_regs.h
index 6309bf68d6f8..935639ce59ba 100644
--- a/arch/arm/mach-spear3xx/include/mach/misc_regs.h
+++ b/arch/arm/mach-spear/include/mach/misc_regs.h
@@ -16,7 +16,7 @@
16 16
17#include <mach/spear.h> 17#include <mach/spear.h>
18 18
19#define MISC_BASE IOMEM(VA_SPEAR3XX_ICM3_MISC_REG_BASE) 19#define MISC_BASE (VA_SPEAR_ICM3_MISC_REG_BASE)
20#define DMA_CHN_CFG (MISC_BASE + 0x0A0) 20#define DMA_CHN_CFG (MISC_BASE + 0x0A0)
21 21
22#endif /* __MACH_MISC_REGS_H */ 22#endif /* __MACH_MISC_REGS_H */
diff --git a/arch/arm/mach-spear/include/mach/spear.h b/arch/arm/mach-spear/include/mach/spear.h
new file mode 100644
index 000000000000..374ddc393df1
--- /dev/null
+++ b/arch/arm/mach-spear/include/mach/spear.h
@@ -0,0 +1,95 @@
1/*
2 * SPEAr3xx/6xx Machine family specific definition
3 *
4 * Copyright (C) 2009,2012 ST Microelectronics
5 * Rajeev Kumar<rajeev-dlh.kumar@st.com>
6 * Viresh Kumar <viresh.linux@gmail.com>
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef __MACH_SPEAR_H
14#define __MACH_SPEAR_H
15
16#include <asm/memory.h>
17
18#if defined(CONFIG_ARCH_SPEAR3XX) || defined (CONFIG_ARCH_SPEAR6XX)
19
20/* ICM1 - Low speed connection */
21#define SPEAR_ICM1_2_BASE UL(0xD0000000)
22#define VA_SPEAR_ICM1_2_BASE IOMEM(0xFD000000)
23#define SPEAR_ICM1_UART_BASE UL(0xD0000000)
24#define VA_SPEAR_ICM1_UART_BASE (VA_SPEAR_ICM1_2_BASE - SPEAR_ICM1_2_BASE + SPEAR_ICM1_UART_BASE)
25#define SPEAR3XX_ICM1_SSP_BASE UL(0xD0100000)
26
27/* ML-1, 2 - Multi Layer CPU Subsystem */
28#define SPEAR_ICM3_ML1_2_BASE UL(0xF0000000)
29#define VA_SPEAR6XX_ML_CPU_BASE IOMEM(0xF0000000)
30
31/* ICM3 - Basic Subsystem */
32#define SPEAR_ICM3_SMI_CTRL_BASE UL(0xFC000000)
33#define VA_SPEAR_ICM3_SMI_CTRL_BASE IOMEM(0xFC000000)
34#define SPEAR_ICM3_DMA_BASE UL(0xFC400000)
35#define SPEAR_ICM3_SYS_CTRL_BASE UL(0xFCA00000)
36#define VA_SPEAR_ICM3_SYS_CTRL_BASE (VA_SPEAR_ICM3_SMI_CTRL_BASE - SPEAR_ICM3_SMI_CTRL_BASE + SPEAR_ICM3_SYS_CTRL_BASE)
37#define SPEAR_ICM3_MISC_REG_BASE UL(0xFCA80000)
38#define VA_SPEAR_ICM3_MISC_REG_BASE (VA_SPEAR_ICM3_SMI_CTRL_BASE - SPEAR_ICM3_SMI_CTRL_BASE + SPEAR_ICM3_MISC_REG_BASE)
39
40/* Debug uart for linux, will be used for debug and uncompress messages */
41#define SPEAR_DBG_UART_BASE SPEAR_ICM1_UART_BASE
42#define VA_SPEAR_DBG_UART_BASE VA_SPEAR_ICM1_UART_BASE
43
44/* Sysctl base for spear platform */
45#define SPEAR_SYS_CTRL_BASE SPEAR_ICM3_SYS_CTRL_BASE
46#define VA_SPEAR_SYS_CTRL_BASE VA_SPEAR_ICM3_SYS_CTRL_BASE
47#endif /* SPEAR3xx || SPEAR6XX */
48
49/* SPEAr320 Macros */
50#define SPEAR320_SOC_CONFIG_BASE UL(0xB3000000)
51#define VA_SPEAR320_SOC_CONFIG_BASE IOMEM(0xFE000000)
52
53#ifdef CONFIG_ARCH_SPEAR13XX
54
55#define PERIP_GRP2_BASE UL(0xB3000000)
56#define VA_PERIP_GRP2_BASE IOMEM(0xFE000000)
57#define MCIF_SDHCI_BASE UL(0xB3000000)
58#define SYSRAM0_BASE UL(0xB3800000)
59#define VA_SYSRAM0_BASE IOMEM(0xFE800000)
60#define SYS_LOCATION (VA_SYSRAM0_BASE + 0x600)
61
62#define PERIP_GRP1_BASE UL(0xE0000000)
63#define VA_PERIP_GRP1_BASE IOMEM(0xFD000000)
64#define UART_BASE UL(0xE0000000)
65#define VA_UART_BASE IOMEM(0xFD000000)
66#define SSP_BASE UL(0xE0100000)
67#define MISC_BASE UL(0xE0700000)
68#define VA_MISC_BASE IOMEM(0xFD700000)
69
70#define A9SM_AND_MPMC_BASE UL(0xEC000000)
71#define VA_A9SM_AND_MPMC_BASE IOMEM(0xFC000000)
72
73#define SPEAR1310_RAS_BASE UL(0xD8400000)
74#define VA_SPEAR1310_RAS_BASE IOMEM(UL(0xFA400000))
75
76/* A9SM peripheral offsets */
77#define A9SM_PERIP_BASE UL(0xEC800000)
78#define VA_A9SM_PERIP_BASE IOMEM(0xFC800000)
79#define VA_SCU_BASE (VA_A9SM_PERIP_BASE + 0x00)
80
81#define L2CC_BASE UL(0xED000000)
82#define VA_L2CC_BASE IOMEM(UL(0xFB000000))
83
84/* others */
85#define DMAC0_BASE UL(0xEA800000)
86#define DMAC1_BASE UL(0xEB000000)
87#define MCIF_CF_BASE UL(0xB2800000)
88
89/* Debug uart for linux, will be used for debug and uncompress messages */
90#define SPEAR_DBG_UART_BASE UART_BASE
91#define VA_SPEAR_DBG_UART_BASE VA_UART_BASE
92
93#endif /* SPEAR13XX */
94
95#endif /* __MACH_SPEAR_H */
diff --git a/arch/arm/plat-spear/include/plat/timex.h b/arch/arm/mach-spear/include/mach/timex.h
index ef95e5b780bd..ef95e5b780bd 100644
--- a/arch/arm/plat-spear/include/plat/timex.h
+++ b/arch/arm/mach-spear/include/mach/timex.h
diff --git a/arch/arm/plat-spear/include/plat/uncompress.h b/arch/arm/mach-spear/include/mach/uncompress.h
index 51b2dc93e4da..51b2dc93e4da 100644
--- a/arch/arm/plat-spear/include/plat/uncompress.h
+++ b/arch/arm/mach-spear/include/mach/uncompress.h
diff --git a/arch/arm/plat-spear/pl080.c b/arch/arm/mach-spear/pl080.c
index cfa1199d0f4a..cfa1199d0f4a 100644
--- a/arch/arm/plat-spear/pl080.c
+++ b/arch/arm/mach-spear/pl080.c
diff --git a/arch/arm/plat-spear/include/plat/pl080.h b/arch/arm/mach-spear/pl080.h
index eb6590ded40d..eb6590ded40d 100644
--- a/arch/arm/plat-spear/include/plat/pl080.h
+++ b/arch/arm/mach-spear/pl080.h
diff --git a/arch/arm/mach-spear13xx/platsmp.c b/arch/arm/mach-spear/platsmp.c
index 551c69c9a228..9c4c722c954e 100644
--- a/arch/arm/mach-spear13xx/platsmp.c
+++ b/arch/arm/mach-spear/platsmp.c
@@ -18,7 +18,7 @@
18#include <asm/cacheflush.h> 18#include <asm/cacheflush.h>
19#include <asm/smp_scu.h> 19#include <asm/smp_scu.h>
20#include <mach/spear.h> 20#include <mach/spear.h>
21#include <mach/generic.h> 21#include "generic.h"
22 22
23static DEFINE_SPINLOCK(boot_lock); 23static DEFINE_SPINLOCK(boot_lock);
24 24
diff --git a/arch/arm/plat-spear/restart.c b/arch/arm/mach-spear/restart.c
index 7d4616d5df11..2b44500bb718 100644
--- a/arch/arm/plat-spear/restart.c
+++ b/arch/arm/mach-spear/restart.c
@@ -14,7 +14,7 @@
14#include <linux/amba/sp810.h> 14#include <linux/amba/sp810.h>
15#include <asm/system_misc.h> 15#include <asm/system_misc.h>
16#include <mach/spear.h> 16#include <mach/spear.h>
17#include <mach/generic.h> 17#include "generic.h"
18 18
19#define SPEAR13XX_SYS_SW_RES (VA_MISC_BASE + 0x204) 19#define SPEAR13XX_SYS_SW_RES (VA_MISC_BASE + 0x204)
20void spear_restart(char mode, const char *cmd) 20void spear_restart(char mode, const char *cmd)
@@ -26,7 +26,8 @@ void spear_restart(char mode, const char *cmd)
26 /* hardware reset, Use on-chip reset capability */ 26 /* hardware reset, Use on-chip reset capability */
27#ifdef CONFIG_ARCH_SPEAR13XX 27#ifdef CONFIG_ARCH_SPEAR13XX
28 writel_relaxed(0x01, SPEAR13XX_SYS_SW_RES); 28 writel_relaxed(0x01, SPEAR13XX_SYS_SW_RES);
29#else 29#endif
30#if defined(CONFIG_ARCH_SPEAR3XX) || defined(CONFIG_ARCH_SPEAR6XX)
30 sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE); 31 sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
31#endif 32#endif
32 } 33 }
diff --git a/arch/arm/mach-spear13xx/spear1310.c b/arch/arm/mach-spear/spear1310.c
index 56214d1076ef..ed3b5c287a7b 100644
--- a/arch/arm/mach-spear13xx/spear1310.c
+++ b/arch/arm/mach-spear/spear1310.c
@@ -19,7 +19,7 @@
19#include <linux/pata_arasan_cf_data.h> 19#include <linux/pata_arasan_cf_data.h>
20#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
21#include <asm/mach/map.h> 21#include <asm/mach/map.h>
22#include <mach/generic.h> 22#include "generic.h"
23#include <mach/spear.h> 23#include <mach/spear.h>
24 24
25/* Base addresses */ 25/* Base addresses */
@@ -30,8 +30,6 @@
30 30
31#define SPEAR1310_RAS_GRP1_BASE UL(0xD8000000) 31#define SPEAR1310_RAS_GRP1_BASE UL(0xD8000000)
32#define VA_SPEAR1310_RAS_GRP1_BASE UL(0xFA000000) 32#define VA_SPEAR1310_RAS_GRP1_BASE UL(0xFA000000)
33#define SPEAR1310_RAS_BASE UL(0xD8400000)
34#define VA_SPEAR1310_RAS_BASE IOMEM(UL(0xFA400000))
35 33
36static struct arasan_cf_pdata cf_pdata = { 34static struct arasan_cf_pdata cf_pdata = {
37 .cf_if_clk = CF_IF_CLK_166M, 35 .cf_if_clk = CF_IF_CLK_166M,
diff --git a/arch/arm/mach-spear13xx/spear1340.c b/arch/arm/mach-spear/spear1340.c
index 9a28beb2a113..75e38644bbfb 100644
--- a/arch/arm/mach-spear13xx/spear1340.c
+++ b/arch/arm/mach-spear/spear1340.c
@@ -20,10 +20,11 @@
20#include <linux/of_platform.h> 20#include <linux/of_platform.h>
21#include <linux/irqchip.h> 21#include <linux/irqchip.h>
22#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
23#include <mach/dma.h> 23#include "generic.h"
24#include <mach/generic.h>
25#include <mach/spear.h> 24#include <mach/spear.h>
26 25
26#include "spear13xx-dma.h"
27
27/* Base addresses */ 28/* Base addresses */
28#define SPEAR1340_SATA_BASE UL(0xB1000000) 29#define SPEAR1340_SATA_BASE UL(0xB1000000)
29#define SPEAR1340_UART1_BASE UL(0xB4100000) 30#define SPEAR1340_UART1_BASE UL(0xB4100000)
diff --git a/arch/arm/mach-spear13xx/include/mach/dma.h b/arch/arm/mach-spear/spear13xx-dma.h
index d50bdb605925..d50bdb605925 100644
--- a/arch/arm/mach-spear13xx/include/mach/dma.h
+++ b/arch/arm/mach-spear/spear13xx-dma.h
diff --git a/arch/arm/mach-spear13xx/spear13xx.c b/arch/arm/mach-spear/spear13xx.c
index 25a10191b021..6dd208997176 100644
--- a/arch/arm/mach-spear13xx/spear13xx.c
+++ b/arch/arm/mach-spear/spear13xx.c
@@ -21,10 +21,11 @@
21#include <linux/of.h> 21#include <linux/of.h>
22#include <asm/hardware/cache-l2x0.h> 22#include <asm/hardware/cache-l2x0.h>
23#include <asm/mach/map.h> 23#include <asm/mach/map.h>
24#include <mach/dma.h> 24#include "generic.h"
25#include <mach/generic.h>
26#include <mach/spear.h> 25#include <mach/spear.h>
27 26
27#include "spear13xx-dma.h"
28
28/* common dw_dma filter routine to be used by peripherals */ 29/* common dw_dma filter routine to be used by peripherals */
29bool dw_dma_filter(struct dma_chan *chan, void *slave) 30bool dw_dma_filter(struct dma_chan *chan, void *slave)
30{ 31{
@@ -145,9 +146,9 @@ void __init spear13xx_map_io(void)
145static void __init spear13xx_clk_init(void) 146static void __init spear13xx_clk_init(void)
146{ 147{
147 if (of_machine_is_compatible("st,spear1310")) 148 if (of_machine_is_compatible("st,spear1310"))
148 spear1310_clk_init(); 149 spear1310_clk_init(VA_MISC_BASE, VA_SPEAR1310_RAS_BASE);
149 else if (of_machine_is_compatible("st,spear1340")) 150 else if (of_machine_is_compatible("st,spear1340"))
150 spear1340_clk_init(); 151 spear1340_clk_init(VA_MISC_BASE);
151 else 152 else
152 pr_err("%s: Unknown machine\n", __func__); 153 pr_err("%s: Unknown machine\n", __func__);
153} 154}
diff --git a/arch/arm/mach-spear3xx/spear300.c b/arch/arm/mach-spear/spear300.c
index bbc9b7e9c62c..bac56e845f7a 100644
--- a/arch/arm/mach-spear3xx/spear300.c
+++ b/arch/arm/mach-spear/spear300.c
@@ -17,7 +17,7 @@
17#include <linux/irqchip.h> 17#include <linux/irqchip.h>
18#include <linux/of_platform.h> 18#include <linux/of_platform.h>
19#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
20#include <mach/generic.h> 20#include "generic.h"
21#include <mach/spear.h> 21#include <mach/spear.h>
22 22
23/* DMAC platform data's slave info */ 23/* DMAC platform data's slave info */
@@ -185,7 +185,7 @@ struct pl08x_channel_data spear300_dma_info[] = {
185static struct of_dev_auxdata spear300_auxdata_lookup[] __initdata = { 185static struct of_dev_auxdata spear300_auxdata_lookup[] __initdata = {
186 OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE, NULL, 186 OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE, NULL,
187 &pl022_plat_data), 187 &pl022_plat_data),
188 OF_DEV_AUXDATA("arm,pl080", SPEAR3XX_ICM3_DMA_BASE, NULL, 188 OF_DEV_AUXDATA("arm,pl080", SPEAR_ICM3_DMA_BASE, NULL,
189 &pl080_plat_data), 189 &pl080_plat_data),
190 {} 190 {}
191}; 191};
diff --git a/arch/arm/mach-spear3xx/spear310.c b/arch/arm/mach-spear/spear310.c
index c13a434a8195..6ffbc63d516d 100644
--- a/arch/arm/mach-spear3xx/spear310.c
+++ b/arch/arm/mach-spear/spear310.c
@@ -18,7 +18,7 @@
18#include <linux/irqchip.h> 18#include <linux/irqchip.h>
19#include <linux/of_platform.h> 19#include <linux/of_platform.h>
20#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
21#include <mach/generic.h> 21#include "generic.h"
22#include <mach/spear.h> 22#include <mach/spear.h>
23 23
24#define SPEAR310_UART1_BASE UL(0xB2000000) 24#define SPEAR310_UART1_BASE UL(0xB2000000)
@@ -217,7 +217,7 @@ static struct amba_pl011_data spear310_uart_data[] = {
217static struct of_dev_auxdata spear310_auxdata_lookup[] __initdata = { 217static struct of_dev_auxdata spear310_auxdata_lookup[] __initdata = {
218 OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE, NULL, 218 OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE, NULL,
219 &pl022_plat_data), 219 &pl022_plat_data),
220 OF_DEV_AUXDATA("arm,pl080", SPEAR3XX_ICM3_DMA_BASE, NULL, 220 OF_DEV_AUXDATA("arm,pl080", SPEAR_ICM3_DMA_BASE, NULL,
221 &pl080_plat_data), 221 &pl080_plat_data),
222 OF_DEV_AUXDATA("arm,pl011", SPEAR310_UART1_BASE, NULL, 222 OF_DEV_AUXDATA("arm,pl011", SPEAR310_UART1_BASE, NULL,
223 &spear310_uart_data[0]), 223 &spear310_uart_data[0]),
diff --git a/arch/arm/mach-spear3xx/spear320.c b/arch/arm/mach-spear/spear320.c
index e1c77079a3e5..6eb3eec65f96 100644
--- a/arch/arm/mach-spear3xx/spear320.c
+++ b/arch/arm/mach-spear/spear320.c
@@ -19,7 +19,8 @@
19#include <linux/irqchip.h> 19#include <linux/irqchip.h>
20#include <linux/of_platform.h> 20#include <linux/of_platform.h>
21#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
22#include <mach/generic.h> 22#include <asm/mach/map.h>
23#include "generic.h"
23#include <mach/spear.h> 24#include <mach/spear.h>
24 25
25#define SPEAR320_UART1_BASE UL(0xA3000000) 26#define SPEAR320_UART1_BASE UL(0xA3000000)
@@ -222,7 +223,7 @@ static struct amba_pl011_data spear320_uart_data[] = {
222static struct of_dev_auxdata spear320_auxdata_lookup[] __initdata = { 223static struct of_dev_auxdata spear320_auxdata_lookup[] __initdata = {
223 OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE, NULL, 224 OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE, NULL,
224 &pl022_plat_data), 225 &pl022_plat_data),
225 OF_DEV_AUXDATA("arm,pl080", SPEAR3XX_ICM3_DMA_BASE, NULL, 226 OF_DEV_AUXDATA("arm,pl080", SPEAR_ICM3_DMA_BASE, NULL,
226 &pl080_plat_data), 227 &pl080_plat_data),
227 OF_DEV_AUXDATA("arm,pl022", SPEAR320_SSP0_BASE, NULL, 228 OF_DEV_AUXDATA("arm,pl022", SPEAR320_SSP0_BASE, NULL,
228 &spear320_ssp_data[0]), 229 &spear320_ssp_data[0]),
@@ -253,7 +254,7 @@ static const char * const spear320_dt_board_compat[] = {
253 254
254struct map_desc spear320_io_desc[] __initdata = { 255struct map_desc spear320_io_desc[] __initdata = {
255 { 256 {
256 .virtual = VA_SPEAR320_SOC_CONFIG_BASE, 257 .virtual = (unsigned long)VA_SPEAR320_SOC_CONFIG_BASE,
257 .pfn = __phys_to_pfn(SPEAR320_SOC_CONFIG_BASE), 258 .pfn = __phys_to_pfn(SPEAR320_SOC_CONFIG_BASE),
258 .length = SZ_16M, 259 .length = SZ_16M,
259 .type = MT_DEVICE 260 .type = MT_DEVICE
diff --git a/arch/arm/mach-spear3xx/spear3xx.c b/arch/arm/mach-spear/spear3xx.c
index d2b3937c4014..0227c97797cd 100644
--- a/arch/arm/mach-spear3xx/spear3xx.c
+++ b/arch/arm/mach-spear/spear3xx.c
@@ -15,10 +15,13 @@
15 15
16#include <linux/amba/pl022.h> 16#include <linux/amba/pl022.h>
17#include <linux/amba/pl080.h> 17#include <linux/amba/pl080.h>
18#include <linux/clk.h>
18#include <linux/io.h> 19#include <linux/io.h>
19#include <plat/pl080.h> 20#include <asm/mach/map.h>
20#include <mach/generic.h> 21#include "pl080.h"
22#include "generic.h"
21#include <mach/spear.h> 23#include <mach/spear.h>
24#include <mach/misc_regs.h>
22 25
23/* ssp device registration */ 26/* ssp device registration */
24struct pl022_ssp_controller pl022_plat_data = { 27struct pl022_ssp_controller pl022_plat_data = {
@@ -65,13 +68,13 @@ struct pl08x_platform_data pl080_plat_data = {
65 */ 68 */
66struct map_desc spear3xx_io_desc[] __initdata = { 69struct map_desc spear3xx_io_desc[] __initdata = {
67 { 70 {
68 .virtual = VA_SPEAR3XX_ICM1_2_BASE, 71 .virtual = (unsigned long)VA_SPEAR_ICM1_2_BASE,
69 .pfn = __phys_to_pfn(SPEAR3XX_ICM1_2_BASE), 72 .pfn = __phys_to_pfn(SPEAR_ICM1_2_BASE),
70 .length = SZ_16M, 73 .length = SZ_16M,
71 .type = MT_DEVICE 74 .type = MT_DEVICE
72 }, { 75 }, {
73 .virtual = VA_SPEAR3XX_ICM3_SMI_CTRL_BASE, 76 .virtual = (unsigned long)VA_SPEAR_ICM3_SMI_CTRL_BASE,
74 .pfn = __phys_to_pfn(SPEAR3XX_ICM3_SMI_CTRL_BASE), 77 .pfn = __phys_to_pfn(SPEAR_ICM3_SMI_CTRL_BASE),
75 .length = SZ_16M, 78 .length = SZ_16M,
76 .type = MT_DEVICE 79 .type = MT_DEVICE
77 }, 80 },
@@ -88,7 +91,7 @@ void __init spear3xx_timer_init(void)
88 char pclk_name[] = "pll3_clk"; 91 char pclk_name[] = "pll3_clk";
89 struct clk *gpt_clk, *pclk; 92 struct clk *gpt_clk, *pclk;
90 93
91 spear3xx_clk_init(); 94 spear3xx_clk_init(MISC_BASE, VA_SPEAR320_SOC_CONFIG_BASE);
92 95
93 /* get the system timer clock */ 96 /* get the system timer clock */
94 gpt_clk = clk_get_sys("gpt0", NULL); 97 gpt_clk = clk_get_sys("gpt0", NULL);
diff --git a/arch/arm/mach-spear6xx/spear6xx.c b/arch/arm/mach-spear/spear6xx.c
index 8904d8a52d84..ec8eefbbdfad 100644
--- a/arch/arm/mach-spear6xx/spear6xx.c
+++ b/arch/arm/mach-spear/spear6xx.c
@@ -24,9 +24,10 @@
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25#include <asm/mach/time.h> 25#include <asm/mach/time.h>
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27#include <plat/pl080.h> 27#include "pl080.h"
28#include <mach/generic.h> 28#include "generic.h"
29#include <mach/spear.h> 29#include <mach/spear.h>
30#include <mach/misc_regs.h>
30 31
31/* dmac device registration */ 32/* dmac device registration */
32static struct pl08x_channel_data spear600_dma_info[] = { 33static struct pl08x_channel_data spear600_dma_info[] = {
@@ -321,7 +322,7 @@ static struct pl08x_channel_data spear600_dma_info[] = {
321 }, 322 },
322}; 323};
323 324
324struct pl08x_platform_data pl080_plat_data = { 325static struct pl08x_platform_data spear6xx_pl080_plat_data = {
325 .memcpy_channel = { 326 .memcpy_channel = {
326 .bus_id = "memcpy", 327 .bus_id = "memcpy",
327 .cctl_memcpy = 328 .cctl_memcpy =
@@ -350,18 +351,18 @@ struct pl08x_platform_data pl080_plat_data = {
350 */ 351 */
351struct map_desc spear6xx_io_desc[] __initdata = { 352struct map_desc spear6xx_io_desc[] __initdata = {
352 { 353 {
353 .virtual = VA_SPEAR6XX_ML_CPU_BASE, 354 .virtual = (unsigned long)VA_SPEAR6XX_ML_CPU_BASE,
354 .pfn = __phys_to_pfn(SPEAR6XX_ML_CPU_BASE), 355 .pfn = __phys_to_pfn(SPEAR_ICM3_ML1_2_BASE),
355 .length = 2 * SZ_16M, 356 .length = 2 * SZ_16M,
356 .type = MT_DEVICE 357 .type = MT_DEVICE
357 }, { 358 }, {
358 .virtual = VA_SPEAR6XX_ICM1_BASE, 359 .virtual = (unsigned long)VA_SPEAR_ICM1_2_BASE,
359 .pfn = __phys_to_pfn(SPEAR6XX_ICM1_BASE), 360 .pfn = __phys_to_pfn(SPEAR_ICM1_2_BASE),
360 .length = SZ_16M, 361 .length = SZ_16M,
361 .type = MT_DEVICE 362 .type = MT_DEVICE
362 }, { 363 }, {
363 .virtual = VA_SPEAR6XX_ICM3_SMI_CTRL_BASE, 364 .virtual = (unsigned long)VA_SPEAR_ICM3_SMI_CTRL_BASE,
364 .pfn = __phys_to_pfn(SPEAR6XX_ICM3_SMI_CTRL_BASE), 365 .pfn = __phys_to_pfn(SPEAR_ICM3_SMI_CTRL_BASE),
365 .length = SZ_16M, 366 .length = SZ_16M,
366 .type = MT_DEVICE 367 .type = MT_DEVICE
367 }, 368 },
@@ -378,7 +379,7 @@ void __init spear6xx_timer_init(void)
378 char pclk_name[] = "pll3_clk"; 379 char pclk_name[] = "pll3_clk";
379 struct clk *gpt_clk, *pclk; 380 struct clk *gpt_clk, *pclk;
380 381
381 spear6xx_clk_init(); 382 spear6xx_clk_init(MISC_BASE);
382 383
383 /* get the system timer clock */ 384 /* get the system timer clock */
384 gpt_clk = clk_get_sys("gpt0", NULL); 385 gpt_clk = clk_get_sys("gpt0", NULL);
@@ -404,8 +405,8 @@ void __init spear6xx_timer_init(void)
404 405
405/* Add auxdata to pass platform data */ 406/* Add auxdata to pass platform data */
406struct of_dev_auxdata spear6xx_auxdata_lookup[] __initdata = { 407struct of_dev_auxdata spear6xx_auxdata_lookup[] __initdata = {
407 OF_DEV_AUXDATA("arm,pl080", SPEAR6XX_ICM3_DMA_BASE, NULL, 408 OF_DEV_AUXDATA("arm,pl080", SPEAR_ICM3_DMA_BASE, NULL,
408 &pl080_plat_data), 409 &spear6xx_pl080_plat_data),
409 {} 410 {}
410}; 411};
411 412
diff --git a/arch/arm/plat-spear/time.c b/arch/arm/mach-spear/time.c
index bd5c53cd6962..d449673e40f7 100644
--- a/arch/arm/plat-spear/time.c
+++ b/arch/arm/mach-spear/time.c
@@ -23,7 +23,7 @@
23#include <linux/time.h> 23#include <linux/time.h>
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <asm/mach/time.h> 25#include <asm/mach/time.h>
26#include <mach/generic.h> 26#include "generic.h"
27 27
28/* 28/*
29 * We would use TIMER0 and TIMER1 as clockevent and clocksource. 29 * We would use TIMER0 and TIMER1 as clockevent and clocksource.
diff --git a/arch/arm/mach-spear13xx/Kconfig b/arch/arm/mach-spear13xx/Kconfig
deleted file mode 100644
index eaadc66d96b3..000000000000
--- a/arch/arm/mach-spear13xx/Kconfig
+++ /dev/null
@@ -1,20 +0,0 @@
1#
2# SPEAr13XX Machine configuration file
3#
4
5if ARCH_SPEAR13XX
6
7menu "SPEAr13xx Implementations"
8config MACH_SPEAR1310
9 bool "SPEAr1310 Machine support with Device Tree"
10 select PINCTRL_SPEAR1310
11 help
12 Supports ST SPEAr1310 machine configured via the device-tree
13
14config MACH_SPEAR1340
15 bool "SPEAr1340 Machine support with Device Tree"
16 select PINCTRL_SPEAR1340
17 help
18 Supports ST SPEAr1340 machine configured via the device-tree
19endmenu
20endif #ARCH_SPEAR13XX
diff --git a/arch/arm/mach-spear13xx/Makefile b/arch/arm/mach-spear13xx/Makefile
deleted file mode 100644
index 3435ea78c15d..000000000000
--- a/arch/arm/mach-spear13xx/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
1#
2# Makefile for SPEAr13XX machine series
3#
4
5obj-$(CONFIG_SMP) += headsmp.o platsmp.o
6obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
7
8obj-$(CONFIG_ARCH_SPEAR13XX) += spear13xx.o
9obj-$(CONFIG_MACH_SPEAR1310) += spear1310.o
10obj-$(CONFIG_MACH_SPEAR1340) += spear1340.o
diff --git a/arch/arm/mach-spear13xx/include/mach/debug-macro.S b/arch/arm/mach-spear13xx/include/mach/debug-macro.S
deleted file mode 100644
index 9e3ae6bfe50d..000000000000
--- a/arch/arm/mach-spear13xx/include/mach/debug-macro.S
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * arch/arm/mach-spear13xx/include/mach/debug-macro.S
3 *
4 * Debugging macro include header spear13xx machine family
5 *
6 * Copyright (C) 2012 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#include <plat/debug-macro.S>
diff --git a/arch/arm/mach-spear13xx/include/mach/hardware.h b/arch/arm/mach-spear13xx/include/mach/hardware.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-spear13xx/include/mach/hardware.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-spear13xx/include/mach/irqs.h b/arch/arm/mach-spear13xx/include/mach/irqs.h
deleted file mode 100644
index 271a62b4cd31..000000000000
--- a/arch/arm/mach-spear13xx/include/mach/irqs.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * arch/arm/mach-spear13xx/include/mach/irqs.h
3 *
4 * IRQ helper macros for spear13xx machine family
5 *
6 * Copyright (C) 2012 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 __MACH_IRQS_H
15#define __MACH_IRQS_H
16
17#define IRQ_GIC_END 160
18#define NR_IRQS IRQ_GIC_END
19
20#endif /* __MACH_IRQS_H */
diff --git a/arch/arm/mach-spear13xx/include/mach/spear.h b/arch/arm/mach-spear13xx/include/mach/spear.h
deleted file mode 100644
index 7cfa6818865a..000000000000
--- a/arch/arm/mach-spear13xx/include/mach/spear.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * arch/arm/mach-spear13xx/include/mach/spear.h
3 *
4 * spear13xx Machine family specific definition
5 *
6 * Copyright (C) 2012 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 __MACH_SPEAR13XX_H
15#define __MACH_SPEAR13XX_H
16
17#include <asm/memory.h>
18
19#define PERIP_GRP2_BASE UL(0xB3000000)
20#define VA_PERIP_GRP2_BASE IOMEM(0xFE000000)
21#define MCIF_SDHCI_BASE UL(0xB3000000)
22#define SYSRAM0_BASE UL(0xB3800000)
23#define VA_SYSRAM0_BASE IOMEM(0xFE800000)
24#define SYS_LOCATION (VA_SYSRAM0_BASE + 0x600)
25
26#define PERIP_GRP1_BASE UL(0xE0000000)
27#define VA_PERIP_GRP1_BASE IOMEM(0xFD000000)
28#define UART_BASE UL(0xE0000000)
29#define VA_UART_BASE IOMEM(0xFD000000)
30#define SSP_BASE UL(0xE0100000)
31#define MISC_BASE UL(0xE0700000)
32#define VA_MISC_BASE IOMEM(0xFD700000)
33
34#define A9SM_AND_MPMC_BASE UL(0xEC000000)
35#define VA_A9SM_AND_MPMC_BASE IOMEM(0xFC000000)
36
37/* A9SM peripheral offsets */
38#define A9SM_PERIP_BASE UL(0xEC800000)
39#define VA_A9SM_PERIP_BASE IOMEM(0xFC800000)
40#define VA_SCU_BASE (VA_A9SM_PERIP_BASE + 0x00)
41
42#define L2CC_BASE UL(0xED000000)
43#define VA_L2CC_BASE IOMEM(UL(0xFB000000))
44
45/* others */
46#define DMAC0_BASE UL(0xEA800000)
47#define DMAC1_BASE UL(0xEB000000)
48#define MCIF_CF_BASE UL(0xB2800000)
49
50/* Debug uart for linux, will be used for debug and uncompress messages */
51#define SPEAR_DBG_UART_BASE UART_BASE
52#define VA_SPEAR_DBG_UART_BASE VA_UART_BASE
53
54#endif /* __MACH_SPEAR13XX_H */
diff --git a/arch/arm/mach-spear13xx/include/mach/timex.h b/arch/arm/mach-spear13xx/include/mach/timex.h
deleted file mode 100644
index 3a58b8284a6a..000000000000
--- a/arch/arm/mach-spear13xx/include/mach/timex.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/mach-spear3xx/include/mach/timex.h
3 *
4 * SPEAr3XX machine family specific timex definitions
5 *
6 * Copyright (C) 2012 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 __MACH_TIMEX_H
15#define __MACH_TIMEX_H
16
17#include <plat/timex.h>
18
19#endif /* __MACH_TIMEX_H */
diff --git a/arch/arm/mach-spear13xx/include/mach/uncompress.h b/arch/arm/mach-spear13xx/include/mach/uncompress.h
deleted file mode 100644
index 70fe72f05dea..000000000000
--- a/arch/arm/mach-spear13xx/include/mach/uncompress.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/mach-spear13xx/include/mach/uncompress.h
3 *
4 * Serial port stubs for kernel decompress status messages
5 *
6 * Copyright (C) 2012 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 __MACH_UNCOMPRESS_H
15#define __MACH_UNCOMPRESS_H
16
17#include <plat/uncompress.h>
18
19#endif /* __MACH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-spear3xx/Kconfig b/arch/arm/mach-spear3xx/Kconfig
deleted file mode 100644
index 8bd37291fa4f..000000000000
--- a/arch/arm/mach-spear3xx/Kconfig
+++ /dev/null
@@ -1,26 +0,0 @@
1#
2# SPEAr3XX Machine configuration file
3#
4
5if ARCH_SPEAR3XX
6
7menu "SPEAr3xx Implementations"
8config MACH_SPEAR300
9 bool "SPEAr300 Machine support with Device Tree"
10 select PINCTRL_SPEAR300
11 help
12 Supports ST SPEAr300 machine configured via the device-tree
13
14config MACH_SPEAR310
15 bool "SPEAr310 Machine support with Device Tree"
16 select PINCTRL_SPEAR310
17 help
18 Supports ST SPEAr310 machine configured via the device-tree
19
20config MACH_SPEAR320
21 bool "SPEAr320 Machine support with Device Tree"
22 select PINCTRL_SPEAR320
23 help
24 Supports ST SPEAr320 machine configured via the device-tree
25endmenu
26endif #ARCH_SPEAR3XX
diff --git a/arch/arm/mach-spear3xx/Makefile b/arch/arm/mach-spear3xx/Makefile
deleted file mode 100644
index 8d12faa178fd..000000000000
--- a/arch/arm/mach-spear3xx/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
1#
2# Makefile for SPEAr3XX machine series
3#
4
5# common files
6obj-$(CONFIG_ARCH_SPEAR3XX) += spear3xx.o
7
8# spear300 specific files
9obj-$(CONFIG_MACH_SPEAR300) += spear300.o
10
11# spear310 specific files
12obj-$(CONFIG_MACH_SPEAR310) += spear310.o
13
14# spear320 specific files
15obj-$(CONFIG_MACH_SPEAR320) += spear320.o
diff --git a/arch/arm/mach-spear3xx/Makefile.boot b/arch/arm/mach-spear3xx/Makefile.boot
deleted file mode 100644
index 4674a4c221db..000000000000
--- a/arch/arm/mach-spear3xx/Makefile.boot
+++ /dev/null
@@ -1,3 +0,0 @@
1zreladdr-y += 0x00008000
2params_phys-y := 0x00000100
3initrd_phys-y := 0x00800000
diff --git a/arch/arm/mach-spear3xx/include/mach/debug-macro.S b/arch/arm/mach-spear3xx/include/mach/debug-macro.S
deleted file mode 100644
index 0a6381fad5d9..000000000000
--- a/arch/arm/mach-spear3xx/include/mach/debug-macro.S
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * arch/arm/mach-spear3xx/include/mach/debug-macro.S
3 *
4 * Debugging macro include header spear3xx machine family
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#include <plat/debug-macro.S>
diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h
deleted file mode 100644
index df310799e416..000000000000
--- a/arch/arm/mach-spear3xx/include/mach/generic.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * arch/arm/mach-spear3xx/generic.h
3 *
4 * SPEAr3XX machine family generic header file
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 __MACH_GENERIC_H
15#define __MACH_GENERIC_H
16
17#include <linux/amba/pl08x.h>
18#include <linux/init.h>
19#include <linux/platform_device.h>
20#include <linux/amba/bus.h>
21#include <asm/mach/time.h>
22#include <asm/mach/map.h>
23
24/* Add spear3xx family device structure declarations here */
25extern void spear3xx_timer_init(void);
26extern struct pl022_ssp_controller pl022_plat_data;
27extern struct pl08x_platform_data pl080_plat_data;
28
29/* Add spear3xx family function declarations here */
30void __init spear_setup_of_timer(void);
31void __init spear3xx_clk_init(void);
32void __init spear3xx_map_io(void);
33
34void spear_restart(char, const char *);
35
36#endif /* __MACH_GENERIC_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/hardware.h b/arch/arm/mach-spear3xx/include/mach/hardware.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-spear3xx/include/mach/hardware.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-spear3xx/include/mach/irqs.h b/arch/arm/mach-spear3xx/include/mach/irqs.h
deleted file mode 100644
index f95e5b2b6686..000000000000
--- a/arch/arm/mach-spear3xx/include/mach/irqs.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/mach-spear3xx/include/mach/irqs.h
3 *
4 * IRQ helper macros for SPEAr3xx machine family
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 __MACH_IRQS_H
15#define __MACH_IRQS_H
16
17#define NR_IRQS 256
18
19#endif /* __MACH_IRQS_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/spear.h b/arch/arm/mach-spear3xx/include/mach/spear.h
deleted file mode 100644
index 8cca95193d4d..000000000000
--- a/arch/arm/mach-spear3xx/include/mach/spear.h
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2 * arch/arm/mach-spear3xx/include/mach/spear.h
3 *
4 * SPEAr3xx Machine family specific definition
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 __MACH_SPEAR3XX_H
15#define __MACH_SPEAR3XX_H
16
17#include <asm/memory.h>
18
19/* ICM1 - Low speed connection */
20#define SPEAR3XX_ICM1_2_BASE UL(0xD0000000)
21#define VA_SPEAR3XX_ICM1_2_BASE UL(0xFD000000)
22#define SPEAR3XX_ICM1_UART_BASE UL(0xD0000000)
23#define VA_SPEAR3XX_ICM1_UART_BASE (VA_SPEAR3XX_ICM1_2_BASE | SPEAR3XX_ICM1_UART_BASE)
24#define SPEAR3XX_ICM1_SSP_BASE UL(0xD0100000)
25
26/* ML1 - Multi Layer CPU Subsystem */
27#define SPEAR3XX_ICM3_ML1_2_BASE UL(0xF0000000)
28#define VA_SPEAR6XX_ML_CPU_BASE UL(0xF0000000)
29
30/* ICM3 - Basic Subsystem */
31#define SPEAR3XX_ICM3_SMI_CTRL_BASE UL(0xFC000000)
32#define VA_SPEAR3XX_ICM3_SMI_CTRL_BASE UL(0xFC000000)
33#define SPEAR3XX_ICM3_DMA_BASE UL(0xFC400000)
34#define SPEAR3XX_ICM3_SYS_CTRL_BASE UL(0xFCA00000)
35#define VA_SPEAR3XX_ICM3_SYS_CTRL_BASE (VA_SPEAR3XX_ICM3_SMI_CTRL_BASE | SPEAR3XX_ICM3_SYS_CTRL_BASE)
36#define SPEAR3XX_ICM3_MISC_REG_BASE UL(0xFCA80000)
37#define VA_SPEAR3XX_ICM3_MISC_REG_BASE (VA_SPEAR3XX_ICM3_SMI_CTRL_BASE | SPEAR3XX_ICM3_MISC_REG_BASE)
38
39/* Debug uart for linux, will be used for debug and uncompress messages */
40#define SPEAR_DBG_UART_BASE SPEAR3XX_ICM1_UART_BASE
41#define VA_SPEAR_DBG_UART_BASE VA_SPEAR3XX_ICM1_UART_BASE
42
43/* Sysctl base for spear platform */
44#define SPEAR_SYS_CTRL_BASE SPEAR3XX_ICM3_SYS_CTRL_BASE
45#define VA_SPEAR_SYS_CTRL_BASE VA_SPEAR3XX_ICM3_SYS_CTRL_BASE
46
47/* SPEAr320 Macros */
48#define SPEAR320_SOC_CONFIG_BASE UL(0xB3000000)
49#define VA_SPEAR320_SOC_CONFIG_BASE UL(0xFE000000)
50#define SPEAR320_CONTROL_REG IOMEM(VA_SPEAR320_SOC_CONFIG_BASE)
51#define SPEAR320_EXT_CTRL_REG IOMEM(VA_SPEAR320_SOC_CONFIG_BASE + 0x0018)
52 #define SPEAR320_UARTX_PCLK_MASK 0x1
53 #define SPEAR320_UART2_PCLK_SHIFT 8
54 #define SPEAR320_UART3_PCLK_SHIFT 9
55 #define SPEAR320_UART4_PCLK_SHIFT 10
56 #define SPEAR320_UART5_PCLK_SHIFT 11
57 #define SPEAR320_UART6_PCLK_SHIFT 12
58 #define SPEAR320_RS485_PCLK_SHIFT 13
59
60#endif /* __MACH_SPEAR3XX_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/timex.h b/arch/arm/mach-spear3xx/include/mach/timex.h
deleted file mode 100644
index 9f5d08bd0c44..000000000000
--- a/arch/arm/mach-spear3xx/include/mach/timex.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/mach-spear3xx/include/mach/timex.h
3 *
4 * SPEAr3XX machine family 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 __MACH_TIMEX_H
15#define __MACH_TIMEX_H
16
17#include <plat/timex.h>
18
19#endif /* __MACH_TIMEX_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/uncompress.h b/arch/arm/mach-spear3xx/include/mach/uncompress.h
deleted file mode 100644
index b909b011f7c8..000000000000
--- a/arch/arm/mach-spear3xx/include/mach/uncompress.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/mach-spear3xx/include/mach/uncompress.h
3 *
4 * Serial port stubs for kernel decompress status messages
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 __MACH_UNCOMPRESS_H
15#define __MACH_UNCOMPRESS_H
16
17#include <plat/uncompress.h>
18
19#endif /* __MACH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-spear6xx/Kconfig b/arch/arm/mach-spear6xx/Kconfig
deleted file mode 100644
index 339f397dea70..000000000000
--- a/arch/arm/mach-spear6xx/Kconfig
+++ /dev/null
@@ -1,10 +0,0 @@
1#
2# SPEAr6XX Machine configuration file
3#
4
5config MACH_SPEAR600
6 def_bool y
7 depends on ARCH_SPEAR6XX
8 select USE_OF
9 help
10 Supports ST SPEAr600 boards configured via the device-tree
diff --git a/arch/arm/mach-spear6xx/Makefile b/arch/arm/mach-spear6xx/Makefile
deleted file mode 100644
index 898831d93f37..000000000000
--- a/arch/arm/mach-spear6xx/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
1#
2# Makefile for SPEAr6XX machine series
3#
4
5# common files
6obj-y += spear6xx.o
diff --git a/arch/arm/mach-spear6xx/Makefile.boot b/arch/arm/mach-spear6xx/Makefile.boot
deleted file mode 100644
index 4674a4c221db..000000000000
--- a/arch/arm/mach-spear6xx/Makefile.boot
+++ /dev/null
@@ -1,3 +0,0 @@
1zreladdr-y += 0x00008000
2params_phys-y := 0x00000100
3initrd_phys-y := 0x00800000
diff --git a/arch/arm/mach-spear6xx/include/mach/debug-macro.S b/arch/arm/mach-spear6xx/include/mach/debug-macro.S
deleted file mode 100644
index 0f3ea39edd96..000000000000
--- a/arch/arm/mach-spear6xx/include/mach/debug-macro.S
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * arch/arm/mach-spear6xx/include/mach/debug-macro.S
3 *
4 * Debugging macro include header for SPEAr6xx machine family
5 *
6 * Copyright (C) 2009 ST Microelectronics
7 * Rajeev Kumar<rajeev-dlh.kumar@st.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#include <plat/debug-macro.S>
diff --git a/arch/arm/mach-spear6xx/include/mach/generic.h b/arch/arm/mach-spear6xx/include/mach/generic.h
deleted file mode 100644
index 65514b159370..000000000000
--- a/arch/arm/mach-spear6xx/include/mach/generic.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * arch/arm/mach-spear6xx/include/mach/generic.h
3 *
4 * SPEAr6XX machine family specific generic header file
5 *
6 * Copyright (C) 2009 ST Microelectronics
7 * Rajeev Kumar<rajeev-dlh.kumar@st.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 __MACH_GENERIC_H
15#define __MACH_GENERIC_H
16
17#include <linux/init.h>
18
19void __init spear_setup_of_timer(void);
20void spear_restart(char, const char *);
21void __init spear6xx_clk_init(void);
22
23#endif /* __MACH_GENERIC_H */
diff --git a/arch/arm/mach-spear6xx/include/mach/hardware.h b/arch/arm/mach-spear6xx/include/mach/hardware.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-spear6xx/include/mach/hardware.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-spear6xx/include/mach/misc_regs.h b/arch/arm/mach-spear6xx/include/mach/misc_regs.h
deleted file mode 100644
index c34acc201d34..000000000000
--- a/arch/arm/mach-spear6xx/include/mach/misc_regs.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * arch/arm/mach-spear6xx/include/mach/misc_regs.h
3 *
4 * Miscellaneous registers definitions for SPEAr6xx machine family
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 __MACH_MISC_REGS_H
15#define __MACH_MISC_REGS_H
16
17#include <mach/spear.h>
18
19#define MISC_BASE IOMEM(VA_SPEAR6XX_ICM3_MISC_REG_BASE)
20#define DMA_CHN_CFG (MISC_BASE + 0x0A0)
21
22#endif /* __MACH_MISC_REGS_H */
diff --git a/arch/arm/mach-spear6xx/include/mach/spear.h b/arch/arm/mach-spear6xx/include/mach/spear.h
deleted file mode 100644
index cb8ed2f4dc85..000000000000
--- a/arch/arm/mach-spear6xx/include/mach/spear.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * arch/arm/mach-spear6xx/include/mach/spear.h
3 *
4 * SPEAr6xx Machine family specific definition
5 *
6 * Copyright (C) 2009 ST Microelectronics
7 * Rajeev Kumar<rajeev-dlh.kumar@st.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 __MACH_SPEAR6XX_H
15#define __MACH_SPEAR6XX_H
16
17#include <asm/memory.h>
18
19/* ICM1 - Low speed connection */
20#define SPEAR6XX_ICM1_BASE UL(0xD0000000)
21#define VA_SPEAR6XX_ICM1_BASE UL(0xFD000000)
22#define SPEAR6XX_ICM1_UART0_BASE UL(0xD0000000)
23#define VA_SPEAR6XX_ICM1_UART0_BASE (VA_SPEAR6XX_ICM1_2_BASE | SPEAR6XX_ICM1_UART0_BASE)
24
25/* ML-1, 2 - Multi Layer CPU Subsystem */
26#define SPEAR6XX_ML_CPU_BASE UL(0xF0000000)
27#define VA_SPEAR6XX_ML_CPU_BASE UL(0xF0000000)
28
29/* ICM3 - Basic Subsystem */
30#define SPEAR6XX_ICM3_SMI_CTRL_BASE UL(0xFC000000)
31#define VA_SPEAR6XX_ICM3_SMI_CTRL_BASE UL(0xFC000000)
32#define SPEAR6XX_ICM3_DMA_BASE UL(0xFC400000)
33#define SPEAR6XX_ICM3_SYS_CTRL_BASE UL(0xFCA00000)
34#define VA_SPEAR6XX_ICM3_SYS_CTRL_BASE (VA_SPEAR6XX_ICM3_SMI_CTRL_BASE | SPEAR6XX_ICM3_SYS_CTRL_BASE)
35#define SPEAR6XX_ICM3_MISC_REG_BASE UL(0xFCA80000)
36#define VA_SPEAR6XX_ICM3_MISC_REG_BASE (VA_SPEAR6XX_ICM3_SMI_CTRL_BASE | SPEAR6XX_ICM3_MISC_REG_BASE)
37
38/* Debug uart for linux, will be used for debug and uncompress messages */
39#define SPEAR_DBG_UART_BASE SPEAR6XX_ICM1_UART0_BASE
40#define VA_SPEAR_DBG_UART_BASE VA_SPEAR6XX_ICM1_UART0_BASE
41
42/* Sysctl base for spear platform */
43#define SPEAR_SYS_CTRL_BASE SPEAR6XX_ICM3_SYS_CTRL_BASE
44#define VA_SPEAR_SYS_CTRL_BASE VA_SPEAR6XX_ICM3_SYS_CTRL_BASE
45
46#endif /* __MACH_SPEAR6XX_H */
diff --git a/arch/arm/mach-spear6xx/include/mach/timex.h b/arch/arm/mach-spear6xx/include/mach/timex.h
deleted file mode 100644
index ac1c5b005695..000000000000
--- a/arch/arm/mach-spear6xx/include/mach/timex.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/mach-spear6xx/include/mach/timex.h
3 *
4 * SPEAr6XX machine family specific timex definitions
5 *
6 * Copyright (C) 2009 ST Microelectronics
7 * Rajeev Kumar<rajeev-dlh.kumar@st.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 __MACH_TIMEX_H
15#define __MACH_TIMEX_H
16
17#include <plat/timex.h>
18
19#endif /* __MACH_TIMEX_H */
diff --git a/arch/arm/mach-spear6xx/include/mach/uncompress.h b/arch/arm/mach-spear6xx/include/mach/uncompress.h
deleted file mode 100644
index 77f0765e21e1..000000000000
--- a/arch/arm/mach-spear6xx/include/mach/uncompress.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/mach-spear6xx/include/mach/uncompress.h
3 *
4 * Serial port stubs for kernel decompress status messages
5 *
6 * Copyright (C) 2009 ST Microelectronics
7 * Rajeev Kumar<rajeev-dlh.kumar@st.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 __MACH_UNCOMPRESS_H
15#define __MACH_UNCOMPRESS_H
16
17#include <plat/uncompress.h>
18
19#endif /* __MACH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index dbc653ea851c..20c3b372cdf5 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -1,13 +1,30 @@
1if ARCH_TEGRA 1config ARCH_TEGRA
2 bool "NVIDIA Tegra" if ARCH_MULTI_V7
3 select ARCH_HAS_CPUFREQ
4 select ARCH_REQUIRE_GPIOLIB
5 select CLKDEV_LOOKUP
6 select CLKSRC_MMIO
7 select CLKSRC_OF
8 select COMMON_CLK
9 select GENERIC_CLOCKEVENTS
10 select HAVE_ARM_SCU if SMP
11 select HAVE_ARM_TWD if LOCAL_TIMERS
12 select HAVE_CLK
13 select HAVE_SMP
14 select MIGHT_HAVE_CACHE_L2X0
15 select SOC_BUS
16 select SPARSE_IRQ
17 select USE_OF
18 help
19 This enables support for NVIDIA Tegra based systems.
2 20
3comment "NVIDIA Tegra options" 21menu "NVIDIA Tegra options"
22 depends on ARCH_TEGRA
4 23
5config ARCH_TEGRA_2x_SOC 24config ARCH_TEGRA_2x_SOC
6 bool "Enable support for Tegra20 family" 25 bool "Enable support for Tegra20 family"
7 select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP 26 select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
8 select ARM_ERRATA_720789 27 select ARM_ERRATA_720789
9 select ARM_ERRATA_742230 if SMP
10 select ARM_ERRATA_751472
11 select ARM_ERRATA_754327 if SMP 28 select ARM_ERRATA_754327 if SMP
12 select ARM_ERRATA_764369 if SMP 29 select ARM_ERRATA_764369 if SMP
13 select ARM_GIC 30 select ARM_GIC
@@ -26,8 +43,6 @@ config ARCH_TEGRA_2x_SOC
26 43
27config ARCH_TEGRA_3x_SOC 44config ARCH_TEGRA_3x_SOC
28 bool "Enable support for Tegra30 family" 45 bool "Enable support for Tegra30 family"
29 select ARM_ERRATA_743622
30 select ARM_ERRATA_751472
31 select ARM_ERRATA_754322 46 select ARM_ERRATA_754322
32 select ARM_ERRATA_764369 if SMP 47 select ARM_ERRATA_764369 if SMP
33 select ARM_GIC 48 select ARM_GIC
@@ -71,4 +86,4 @@ config TEGRA_AHB
71config TEGRA_EMC_SCALING_ENABLE 86config TEGRA_EMC_SCALING_ENABLE
72 bool "Enable scaling the memory frequency" 87 bool "Enable scaling the memory frequency"
73 88
74endif 89endmenu
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile
index b78f0d71b328..d011f0ad49c4 100644
--- a/arch/arm/mach-tegra/Makefile
+++ b/arch/arm/mach-tegra/Makefile
@@ -1,3 +1,5 @@
1asflags-y += -march=armv7-a
2
1obj-y += common.o 3obj-y += common.o
2obj-y += io.o 4obj-y += io.o
3obj-y += irq.o 5obj-y += irq.o
diff --git a/arch/arm/mach-tegra/Makefile.boot b/arch/arm/mach-tegra/Makefile.boot
deleted file mode 100644
index 29433816233c..000000000000
--- a/arch/arm/mach-tegra/Makefile.boot
+++ /dev/null
@@ -1,3 +0,0 @@
1zreladdr-$(CONFIG_ARCH_TEGRA_2x_SOC) += 0x00008000
2params_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00000100
3initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h
index 60431de585ca..1787327fae3a 100644
--- a/arch/arm/mach-tegra/board.h
+++ b/arch/arm/mach-tegra/board.h
@@ -40,6 +40,7 @@ int tegra_clk_debugfs_init(void);
40static inline int tegra_clk_debugfs_init(void) { return 0; } 40static inline int tegra_clk_debugfs_init(void) { return 0; }
41#endif 41#endif
42 42
43int __init tegra_powergate_init(void);
43#if defined(CONFIG_ARCH_TEGRA_2x_SOC) && defined(CONFIG_DEBUG_FS) 44#if defined(CONFIG_ARCH_TEGRA_2x_SOC) && defined(CONFIG_DEBUG_FS)
44int __init tegra_powergate_debugfs_init(void); 45int __init tegra_powergate_debugfs_init(void);
45#else 46#else
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index eb1f3c8c74cc..9f852c6fe5b9 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -27,8 +27,6 @@
27 27
28#include <asm/hardware/cache-l2x0.h> 28#include <asm/hardware/cache-l2x0.h>
29 29
30#include <mach/powergate.h>
31
32#include "board.h" 30#include "board.h"
33#include "common.h" 31#include "common.h"
34#include "fuse.h" 32#include "fuse.h"
diff --git a/arch/arm/mach-tegra/include/mach/powergate.h b/arch/arm/mach-tegra/include/mach/powergate.h
deleted file mode 100644
index 06763fe7529d..000000000000
--- a/arch/arm/mach-tegra/include/mach/powergate.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * drivers/regulator/tegra-regulator.c
3 *
4 * Copyright (c) 2010 Google, Inc
5 *
6 * Author:
7 * Colin Cross <ccross@google.com>
8 *
9 * This software is licensed under the terms of the GNU General Public
10 * License version 2, as published by the Free Software Foundation, and
11 * may be copied, distributed, and modified under those terms.
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
20#ifndef _MACH_TEGRA_POWERGATE_H_
21#define _MACH_TEGRA_POWERGATE_H_
22
23struct clk;
24
25#define TEGRA_POWERGATE_CPU 0
26#define TEGRA_POWERGATE_3D 1
27#define TEGRA_POWERGATE_VENC 2
28#define TEGRA_POWERGATE_PCIE 3
29#define TEGRA_POWERGATE_VDEC 4
30#define TEGRA_POWERGATE_L2 5
31#define TEGRA_POWERGATE_MPE 6
32#define TEGRA_POWERGATE_HEG 7
33#define TEGRA_POWERGATE_SATA 8
34#define TEGRA_POWERGATE_CPU1 9
35#define TEGRA_POWERGATE_CPU2 10
36#define TEGRA_POWERGATE_CPU3 11
37#define TEGRA_POWERGATE_CELP 12
38#define TEGRA_POWERGATE_3D1 13
39
40#define TEGRA_POWERGATE_CPU0 TEGRA_POWERGATE_CPU
41#define TEGRA_POWERGATE_3D0 TEGRA_POWERGATE_3D
42
43int __init tegra_powergate_init(void);
44
45int tegra_cpu_powergate_id(int cpuid);
46int tegra_powergate_is_powered(int id);
47int tegra_powergate_power_on(int id);
48int tegra_powergate_power_off(int id);
49int tegra_powergate_remove_clamping(int id);
50
51/* Must be called with clk disabled, and returns with clk enabled */
52int tegra_powergate_sequence_power_up(int id, struct clk *clk);
53
54#endif /* _MACH_TEGRA_POWERGATE_H_ */
diff --git a/arch/arm/mach-tegra/include/mach/timex.h b/arch/arm/mach-tegra/include/mach/timex.h
deleted file mode 100644
index a44ccbdb7dbf..000000000000
--- a/arch/arm/mach-tegra/include/mach/timex.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * arch/arm/mach-tegra/include/mach/timex.h
3 *
4 * Copyright (C) 2010 Google, Inc.
5 *
6 * Author:
7 * Colin Cross <ccross@google.com>
8 * Erik Gilling <konkers@google.com>
9 *
10 * This software is licensed under the terms of the GNU General Public
11 * License version 2, as published by the Free Software Foundation, and
12 * may be copied, distributed, and modified under those terms.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 */
20
21#ifndef __MACH_TEGRA_TIMEX_H
22#define __MACH_TEGRA_TIMEX_H
23
24#define CLOCK_TICK_RATE 1000000
25
26#endif
diff --git a/arch/arm/mach-tegra/include/mach/uncompress.h b/arch/arm/mach-tegra/include/mach/uncompress.h
deleted file mode 100644
index 08386418196f..000000000000
--- a/arch/arm/mach-tegra/include/mach/uncompress.h
+++ /dev/null
@@ -1,175 +0,0 @@
1/*
2 * arch/arm/mach-tegra/include/mach/uncompress.h
3 *
4 * Copyright (C) 2010 Google, Inc.
5 * Copyright (C) 2011 Google, Inc.
6 * Copyright (C) 2011-2012 NVIDIA CORPORATION. All Rights Reserved.
7 *
8 * Author:
9 * Colin Cross <ccross@google.com>
10 * Erik Gilling <konkers@google.com>
11 * Doug Anderson <dianders@chromium.org>
12 * Stephen Warren <swarren@nvidia.com>
13 *
14 * This software is licensed under the terms of the GNU General Public
15 * License version 2, as published by the Free Software Foundation, and
16 * may be copied, distributed, and modified under those terms.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 */
24
25#ifndef __MACH_TEGRA_UNCOMPRESS_H
26#define __MACH_TEGRA_UNCOMPRESS_H
27
28#include <linux/types.h>
29#include <linux/serial_reg.h>
30
31#include "../../iomap.h"
32
33#define BIT(x) (1 << (x))
34#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
35
36#define DEBUG_UART_SHIFT 2
37
38volatile u8 *uart;
39
40static void putc(int c)
41{
42 if (uart == NULL)
43 return;
44
45 while (!(uart[UART_LSR << DEBUG_UART_SHIFT] & UART_LSR_THRE))
46 barrier();
47 uart[UART_TX << DEBUG_UART_SHIFT] = c;
48}
49
50static inline void flush(void)
51{
52}
53
54static const struct {
55 u32 base;
56 u32 reset_reg;
57 u32 clock_reg;
58 u32 bit;
59} uarts[] = {
60 {
61 TEGRA_UARTA_BASE,
62 TEGRA_CLK_RESET_BASE + 0x04,
63 TEGRA_CLK_RESET_BASE + 0x10,
64 6,
65 },
66 {
67 TEGRA_UARTB_BASE,
68 TEGRA_CLK_RESET_BASE + 0x04,
69 TEGRA_CLK_RESET_BASE + 0x10,
70 7,
71 },
72 {
73 TEGRA_UARTC_BASE,
74 TEGRA_CLK_RESET_BASE + 0x08,
75 TEGRA_CLK_RESET_BASE + 0x14,
76 23,
77 },
78 {
79 TEGRA_UARTD_BASE,
80 TEGRA_CLK_RESET_BASE + 0x0c,
81 TEGRA_CLK_RESET_BASE + 0x18,
82 1,
83 },
84 {
85 TEGRA_UARTE_BASE,
86 TEGRA_CLK_RESET_BASE + 0x0c,
87 TEGRA_CLK_RESET_BASE + 0x18,
88 2,
89 },
90};
91
92static inline bool uart_clocked(int i)
93{
94 if (*(u8 *)uarts[i].reset_reg & BIT(uarts[i].bit))
95 return false;
96
97 if (!(*(u8 *)uarts[i].clock_reg & BIT(uarts[i].bit)))
98 return false;
99
100 return true;
101}
102
103#ifdef CONFIG_TEGRA_DEBUG_UART_AUTO_ODMDATA
104int auto_odmdata(void)
105{
106 volatile u32 *pmc = (volatile u32 *)TEGRA_PMC_BASE;
107 u32 odmdata = pmc[0xa0 / 4];
108
109 /*
110 * Bits 19:18 are the console type: 0=default, 1=none, 2==DCC, 3==UART
111 * Some boards apparently swap the last two values, but we don't have
112 * any way of catering for that here, so we just accept either. If this
113 * doesn't make sense for your board, just don't enable this feature.
114 *
115 * Bits 17:15 indicate the UART to use, 0/1/2/3/4 are UART A/B/C/D/E.
116 */
117
118 switch ((odmdata >> 18) & 3) {
119 case 2:
120 case 3:
121 break;
122 default:
123 return -1;
124 }
125
126 return (odmdata >> 15) & 7;
127}
128#endif
129
130/*
131 * Setup before decompression. This is where we do UART selection for
132 * earlyprintk and init the uart_base register.
133 */
134static inline void arch_decomp_setup(void)
135{
136 int uart_id;
137 volatile u32 *apb_misc = (volatile u32 *)TEGRA_APB_MISC_BASE;
138 u32 chip, div;
139
140#if defined(CONFIG_TEGRA_DEBUG_UART_AUTO_ODMDATA)
141 uart_id = auto_odmdata();
142#elif defined(CONFIG_TEGRA_DEBUG_UARTA)
143 uart_id = 0;
144#elif defined(CONFIG_TEGRA_DEBUG_UARTB)
145 uart_id = 1;
146#elif defined(CONFIG_TEGRA_DEBUG_UARTC)
147 uart_id = 2;
148#elif defined(CONFIG_TEGRA_DEBUG_UARTD)
149 uart_id = 3;
150#elif defined(CONFIG_TEGRA_DEBUG_UARTE)
151 uart_id = 4;
152#endif
153
154 if (uart_id < 0 || uart_id >= ARRAY_SIZE(uarts) ||
155 !uart_clocked(uart_id))
156 uart = NULL;
157 else
158 uart = (volatile u8 *)uarts[uart_id].base;
159
160 if (uart == NULL)
161 return;
162
163 chip = (apb_misc[0x804 / 4] >> 8) & 0xff;
164 if (chip == 0x20)
165 div = 0x0075;
166 else
167 div = 0x00dd;
168
169 uart[UART_LCR << DEBUG_UART_SHIFT] |= UART_LCR_DLAB;
170 uart[UART_DLL << DEBUG_UART_SHIFT] = div & 0xff;
171 uart[UART_DLM << DEBUG_UART_SHIFT] = div >> 8;
172 uart[UART_LCR << DEBUG_UART_SHIFT] = 3;
173}
174
175#endif
diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c
index b60165f1ca02..46144a19a7e7 100644
--- a/arch/arm/mach-tegra/pcie.c
+++ b/arch/arm/mach-tegra/pcie.c
@@ -34,12 +34,11 @@
34#include <linux/delay.h> 34#include <linux/delay.h>
35#include <linux/export.h> 35#include <linux/export.h>
36#include <linux/clk/tegra.h> 36#include <linux/clk/tegra.h>
37#include <linux/tegra-powergate.h>
37 38
38#include <asm/sizes.h> 39#include <asm/sizes.h>
39#include <asm/mach/pci.h> 40#include <asm/mach/pci.h>
40 41
41#include <mach/powergate.h>
42
43#include "board.h" 42#include "board.h"
44#include "iomap.h" 43#include "iomap.h"
45 44
diff --git a/arch/arm/mach-tegra/powergate.c b/arch/arm/mach-tegra/powergate.c
index af9067e2867c..f076f0f80fcd 100644
--- a/arch/arm/mach-tegra/powergate.c
+++ b/arch/arm/mach-tegra/powergate.c
@@ -28,8 +28,7 @@
28#include <linux/seq_file.h> 28#include <linux/seq_file.h>
29#include <linux/spinlock.h> 29#include <linux/spinlock.h>
30#include <linux/clk/tegra.h> 30#include <linux/clk/tegra.h>
31 31#include <linux/tegra-powergate.h>
32#include <mach/powergate.h>
33 32
34#include "fuse.h" 33#include "fuse.h"
35#include "iomap.h" 34#include "iomap.h"
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
index 3e5bbd0e5b23..f66d7deae46d 100644
--- a/arch/arm/mach-ux500/Kconfig
+++ b/arch/arm/mach-ux500/Kconfig
@@ -1,3 +1,19 @@
1config ARCH_U8500
2 bool "ST-Ericsson U8500 Series" if ARCH_MULTI_V7
3 depends on MMU
4 select ARCH_HAS_CPUFREQ
5 select ARCH_REQUIRE_GPIOLIB
6 select ARM_AMBA
7 select CLKDEV_LOOKUP
8 select CPU_V7
9 select GENERIC_CLOCKEVENTS
10 select HAVE_ARM_SCU if SMP
11 select HAVE_ARM_TWD if LOCAL_TIMERS
12 select HAVE_SMP
13 select MIGHT_HAVE_CACHE_L2X0
14 help
15 Support for ST-Ericsson's Ux500 architecture
16
1if ARCH_U8500 17if ARCH_U8500
2 18
3config UX500_SOC_COMMON 19config UX500_SOC_COMMON
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index f24710dfc395..bf9b6be5b180 100644
--- a/arch/arm/mach-ux500/Makefile
+++ b/arch/arm/mach-ux500/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5obj-y := cpu.o devices.o devices-common.o \ 5obj-y := cpu.o devices.o devices-common.o \
6 id.o usb.o timer.o 6 id.o usb.o timer.o pm.o
7obj-$(CONFIG_CPU_IDLE) += cpuidle.o 7obj-$(CONFIG_CPU_IDLE) += cpuidle.o
8obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o 8obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
9obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o 9obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o
@@ -15,3 +15,5 @@ obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \
15 board-mop500-audio.o 15 board-mop500-audio.o
16obj-$(CONFIG_SMP) += platsmp.o headsmp.o 16obj-$(CONFIG_SMP) += platsmp.o headsmp.o
17obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 17obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
18
19CFLAGS_hotplug.o += -march=armv7-a
diff --git a/arch/arm/mach-ux500/board-mop500-audio.c b/arch/arm/mach-ux500/board-mop500-audio.c
index 7209db7cdc72..aba9e5692958 100644
--- a/arch/arm/mach-ux500/board-mop500-audio.c
+++ b/arch/arm/mach-ux500/board-mop500-audio.c
@@ -10,10 +10,9 @@
10#include <linux/platform_data/pinctrl-nomadik.h> 10#include <linux/platform_data/pinctrl-nomadik.h>
11#include <linux/platform_data/dma-ste-dma40.h> 11#include <linux/platform_data/dma-ste-dma40.h>
12 12
13#include <mach/devices.h> 13#include "devices.h"
14#include <mach/hardware.h> 14#include "irqs.h"
15#include <mach/irqs.h> 15#include <linux/platform_data/asoc-ux500-msp.h>
16#include <mach/msp.h>
17 16
18#include "ste-dma40-db8500.h" 17#include "ste-dma40-db8500.h"
19#include "board-mop500.h" 18#include "board-mop500.h"
diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c
index 0a3f30df1eb8..f3976f9c404a 100644
--- a/arch/arm/mach-ux500/board-mop500-pins.c
+++ b/arch/arm/mach-ux500/board-mop500-pins.c
@@ -13,8 +13,6 @@
13 13
14#include <asm/mach-types.h> 14#include <asm/mach-types.h>
15 15
16#include <mach/hardware.h>
17
18#include "pins-db8500.h" 16#include "pins-db8500.h"
19#include "board-mop500.h" 17#include "board-mop500.h"
20 18
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c
index 6db0740128de..0ef38775a0c1 100644
--- a/arch/arm/mach-ux500/board-mop500-sdi.c
+++ b/arch/arm/mach-ux500/board-mop500-sdi.c
@@ -14,9 +14,9 @@
14#include <linux/platform_data/dma-ste-dma40.h> 14#include <linux/platform_data/dma-ste-dma40.h>
15 15
16#include <asm/mach-types.h> 16#include <asm/mach-types.h>
17#include <mach/devices.h> 17#include "devices.h"
18#include <mach/hardware.h>
19 18
19#include "db8500-regs.h"
20#include "devices-db8500.h" 20#include "devices-db8500.h"
21#include "board-mop500.h" 21#include "board-mop500.h"
22#include "ste-dma40-db8500.h" 22#include "ste-dma40-db8500.h"
diff --git a/arch/arm/mach-ux500/board-mop500-u8500uib.c b/arch/arm/mach-ux500/board-mop500-u8500uib.c
index ead91c968ff4..d397c19570af 100644
--- a/arch/arm/mach-ux500/board-mop500-u8500uib.c
+++ b/arch/arm/mach-ux500/board-mop500-u8500uib.c
@@ -12,12 +12,15 @@
12#include <linux/mfd/tc3589x.h> 12#include <linux/mfd/tc3589x.h>
13#include <linux/input/matrix_keypad.h> 13#include <linux/input/matrix_keypad.h>
14 14
15#include <mach/irqs.h> 15#include "irqs.h"
16 16
17#include "board-mop500.h" 17#include "board-mop500.h"
18 18
19/* Dummy data that can be overridden by staging driver */ 19static struct i2c_board_info __initdata mop500_i2c3_devices_u8500[] = {
20struct i2c_board_info __initdata __weak mop500_i2c3_devices_u8500[] = { 20 {
21 I2C_BOARD_INFO("synaptics_rmi4_i2c", 0x4B),
22 .irq = NOMADIK_GPIO_TO_IRQ(84),
23 },
21}; 24};
22 25
23/* 26/*
diff --git a/arch/arm/mach-ux500/board-mop500-uib.c b/arch/arm/mach-ux500/board-mop500-uib.c
index 7037d3687e9f..bdaa422da028 100644
--- a/arch/arm/mach-ux500/board-mop500-uib.c
+++ b/arch/arm/mach-ux500/board-mop500-uib.c
@@ -11,7 +11,6 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/i2c.h> 12#include <linux/i2c.h>
13 13
14#include <mach/hardware.h>
15#include "board-mop500.h" 14#include "board-mop500.h"
16#include "id.h" 15#include "id.h"
17 16
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 574916b70b2e..a15dd6b63a8f 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -44,13 +44,13 @@
44#include <asm/mach-types.h> 44#include <asm/mach-types.h>
45#include <asm/mach/arch.h> 45#include <asm/mach/arch.h>
46 46
47#include <mach/hardware.h> 47#include "setup.h"
48#include <mach/setup.h> 48#include "devices.h"
49#include <mach/devices.h> 49#include "irqs.h"
50#include <mach/irqs.h>
51#include <linux/platform_data/crypto-ux500.h> 50#include <linux/platform_data/crypto-ux500.h>
52 51
53#include "ste-dma40-db8500.h" 52#include "ste-dma40-db8500.h"
53#include "db8500-regs.h"
54#include "devices-db8500.h" 54#include "devices-db8500.h"
55#include "board-mop500.h" 55#include "board-mop500.h"
56#include "board-mop500-regulators.h" 56#include "board-mop500-regulators.h"
@@ -237,63 +237,6 @@ struct ab8500_platform_data ab8500_platdata = {
237 .codec = &ab8500_codec_pdata, 237 .codec = &ab8500_codec_pdata,
238}; 238};
239 239
240/*
241 * Thermal Sensor
242 */
243
244static struct resource db8500_thsens_resources[] = {
245 {
246 .name = "IRQ_HOTMON_LOW",
247 .start = IRQ_PRCMU_HOTMON_LOW,
248 .end = IRQ_PRCMU_HOTMON_LOW,
249 .flags = IORESOURCE_IRQ,
250 },
251 {
252 .name = "IRQ_HOTMON_HIGH",
253 .start = IRQ_PRCMU_HOTMON_HIGH,
254 .end = IRQ_PRCMU_HOTMON_HIGH,
255 .flags = IORESOURCE_IRQ,
256 },
257};
258
259static struct db8500_thsens_platform_data db8500_thsens_data = {
260 .trip_points[0] = {
261 .temp = 70000,
262 .type = THERMAL_TRIP_ACTIVE,
263 .cdev_name = {
264 [0] = "thermal-cpufreq-0",
265 },
266 },
267 .trip_points[1] = {
268 .temp = 75000,
269 .type = THERMAL_TRIP_ACTIVE,
270 .cdev_name = {
271 [0] = "thermal-cpufreq-0",
272 },
273 },
274 .trip_points[2] = {
275 .temp = 80000,
276 .type = THERMAL_TRIP_ACTIVE,
277 .cdev_name = {
278 [0] = "thermal-cpufreq-0",
279 },
280 },
281 .trip_points[3] = {
282 .temp = 85000,
283 .type = THERMAL_TRIP_CRITICAL,
284 },
285 .num_trips = 4,
286};
287
288static struct platform_device u8500_thsens_device = {
289 .name = "db8500-thermal",
290 .resource = db8500_thsens_resources,
291 .num_resources = ARRAY_SIZE(db8500_thsens_resources),
292 .dev = {
293 .platform_data = &db8500_thsens_data,
294 },
295};
296
297static struct platform_device u8500_cpufreq_cooling_device = { 240static struct platform_device u8500_cpufreq_cooling_device = {
298 .name = "db8500-cpufreq-cooling", 241 .name = "db8500-cpufreq-cooling",
299}; 242};
@@ -663,7 +606,6 @@ static struct platform_device *snowball_platform_devs[] __initdata = {
663 &snowball_key_dev, 606 &snowball_key_dev,
664 &snowball_sbnet_dev, 607 &snowball_sbnet_dev,
665 &snowball_gpio_en_3v3_regulator_dev, 608 &snowball_gpio_en_3v3_regulator_dev,
666 &u8500_thsens_device,
667 &u8500_cpufreq_cooling_device, 609 &u8500_cpufreq_cooling_device,
668 &sdi0_regulator, 610 &sdi0_regulator,
669}; 611};
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h
index d38951be70df..49514b825034 100644
--- a/arch/arm/mach-ux500/board-mop500.h
+++ b/arch/arm/mach-ux500/board-mop500.h
@@ -8,8 +8,8 @@
8#define __BOARD_MOP500_H 8#define __BOARD_MOP500_H
9 9
10/* For NOMADIK_NR_GPIO */ 10/* For NOMADIK_NR_GPIO */
11#include <mach/irqs.h> 11#include "irqs.h"
12#include <mach/msp.h> 12#include <linux/platform_data/asoc-ux500-msp.h>
13#include <linux/amba/mmci.h> 13#include <linux/amba/mmci.h>
14 14
15/* Snowball specific GPIO assignments, this board has no GPIO expander */ 15/* Snowball specific GPIO assignments, this board has no GPIO expander */
diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c
index f815efe54c73..f58615b5c601 100644
--- a/arch/arm/mach-ux500/cache-l2x0.c
+++ b/arch/arm/mach-ux500/cache-l2x0.c
@@ -9,8 +9,8 @@
9 9
10#include <asm/cacheflush.h> 10#include <asm/cacheflush.h>
11#include <asm/hardware/cache-l2x0.h> 11#include <asm/hardware/cache-l2x0.h>
12#include <mach/hardware.h>
13 12
13#include "db8500-regs.h"
14#include "id.h" 14#include "id.h"
15 15
16static void __iomem *l2x0_base; 16static void __iomem *l2x0_base;
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index 5c6c2e633868..995928ba22fd 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -28,15 +28,13 @@
28#include <asm/mach/map.h> 28#include <asm/mach/map.h>
29#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
30 30
31#include <mach/hardware.h> 31#include "setup.h"
32#include <mach/setup.h> 32#include "devices.h"
33#include <mach/devices.h> 33#include "irqs.h"
34#include <mach/db8500-regs.h>
35#include <mach/irqs.h>
36 34
37#include "devices-db8500.h" 35#include "devices-db8500.h"
38#include "ste-dma40-db8500.h" 36#include "ste-dma40-db8500.h"
39 37#include "db8500-regs.h"
40#include "board-mop500.h" 38#include "board-mop500.h"
41#include "id.h" 39#include "id.h"
42 40
@@ -94,8 +92,6 @@ void __init u8500_map_io(void)
94 iotable_init(u9540_io_desc, ARRAY_SIZE(u9540_io_desc)); 92 iotable_init(u9540_io_desc, ARRAY_SIZE(u9540_io_desc));
95 else 93 else
96 iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc)); 94 iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc));
97
98 _PRCMU_BASE = __io_address(U8500_PRCMU_BASE);
99} 95}
100 96
101static struct resource db8500_pmu_resources[] = { 97static struct resource db8500_pmu_resources[] = {
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c
index 537870d3fea8..915e2636cbaa 100644
--- a/arch/arm/mach-ux500/cpu.c
+++ b/arch/arm/mach-ux500/cpu.c
@@ -8,7 +8,7 @@
8 8
9#include <linux/platform_device.h> 9#include <linux/platform_device.h>
10#include <linux/io.h> 10#include <linux/io.h>
11#include <linux/mfd/db8500-prcmu.h> 11#include <linux/mfd/dbx500-prcmu.h>
12#include <linux/clksrc-dbx500-prcmu.h> 12#include <linux/clksrc-dbx500-prcmu.h>
13#include <linux/sys_soc.h> 13#include <linux/sys_soc.h>
14#include <linux/err.h> 14#include <linux/err.h>
@@ -20,18 +20,17 @@
20#include <linux/irqchip.h> 20#include <linux/irqchip.h>
21#include <linux/irqchip/arm-gic.h> 21#include <linux/irqchip/arm-gic.h>
22#include <linux/platform_data/clk-ux500.h> 22#include <linux/platform_data/clk-ux500.h>
23#include <linux/platform_data/arm-ux500-pm.h>
23 24
24#include <asm/mach/map.h> 25#include <asm/mach/map.h>
25 26
26#include <mach/hardware.h> 27#include "setup.h"
27#include <mach/setup.h> 28#include "devices.h"
28#include <mach/devices.h>
29 29
30#include "board-mop500.h" 30#include "board-mop500.h"
31#include "db8500-regs.h"
31#include "id.h" 32#include "id.h"
32 33
33void __iomem *_PRCMU_BASE;
34
35/* 34/*
36 * FIXME: Should we set up the GPIO domain here? 35 * FIXME: Should we set up the GPIO domain here?
37 * 36 *
@@ -68,13 +67,23 @@ void __init ux500_init_irq(void)
68 * Init clocks here so that they are available for system timer 67 * Init clocks here so that they are available for system timer
69 * initialization. 68 * initialization.
70 */ 69 */
71 if (cpu_is_u8500_family() || cpu_is_u9540()) 70 if (cpu_is_u8500_family()) {
72 db8500_prcmu_early_init(); 71 prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1);
73 72 ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1);
74 if (cpu_is_u8500_family() || cpu_is_u9540()) 73 u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE,
75 u8500_clk_init(); 74 U8500_CLKRST3_BASE, U8500_CLKRST5_BASE,
76 else if (cpu_is_u8540()) 75 U8500_CLKRST6_BASE);
76 } else if (cpu_is_u9540()) {
77 prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1);
78 ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1);
79 u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE,
80 U8500_CLKRST3_BASE, U8500_CLKRST5_BASE,
81 U8500_CLKRST6_BASE);
82 } else if (cpu_is_u8540()) {
83 prcmu_early_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1);
84 ux500_pm_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1);
77 u8540_clk_init(); 85 u8540_clk_init();
86 }
78} 87}
79 88
80void __init ux500_init_late(void) 89void __init ux500_init_late(void)
diff --git a/arch/arm/mach-ux500/cpuidle.c b/arch/arm/mach-ux500/cpuidle.c
index 488e07472d98..317a2be129fb 100644
--- a/arch/arm/mach-ux500/cpuidle.c
+++ b/arch/arm/mach-ux500/cpuidle.c
@@ -15,10 +15,13 @@
15#include <linux/atomic.h> 15#include <linux/atomic.h>
16#include <linux/smp.h> 16#include <linux/smp.h>
17#include <linux/mfd/dbx500-prcmu.h> 17#include <linux/mfd/dbx500-prcmu.h>
18#include <linux/platform_data/arm-ux500-pm.h>
18 19
19#include <asm/cpuidle.h> 20#include <asm/cpuidle.h>
20#include <asm/proc-fns.h> 21#include <asm/proc-fns.h>
21 22
23#include "db8500-regs.h"
24
22static atomic_t master = ATOMIC_INIT(0); 25static atomic_t master = ATOMIC_INIT(0);
23static DEFINE_SPINLOCK(master_lock); 26static DEFINE_SPINLOCK(master_lock);
24 27
@@ -111,7 +114,7 @@ static struct cpuidle_driver ux500_idle_driver = {
111 114
112int __init ux500_idle_init(void) 115int __init ux500_idle_init(void)
113{ 116{
114 /* Configure wake up reasons */ 117 /* Configure wake up reasons */
115 prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) | 118 prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) |
116 PRCMU_WAKEUP(ABB)); 119 PRCMU_WAKEUP(ABB));
117 120
diff --git a/arch/arm/mach-ux500/include/mach/db8500-regs.h b/arch/arm/mach-ux500/db8500-regs.h
index 1530d493879d..b2d7a0b98629 100644
--- a/arch/arm/mach-ux500/include/mach/db8500-regs.h
+++ b/arch/arm/mach-ux500/db8500-regs.h
@@ -170,4 +170,32 @@
170/* SoC identification number information */ 170/* SoC identification number information */
171#define U8500_BB_UID_BASE (U8500_BACKUPRAM1_BASE + 0xFC0) 171#define U8500_BB_UID_BASE (U8500_BACKUPRAM1_BASE + 0xFC0)
172 172
173/* Offsets to specific addresses in some IP blocks for DMA */
174#define MSP_TX_RX_REG_OFFSET 0
175#define CRYP1_RX_REG_OFFSET 0x10
176#define CRYP1_TX_REG_OFFSET 0x8
177#define HASH1_TX_REG_OFFSET 0x4
178
179/*
180 * Macros to get at IO space when running virtually
181 * We dont map all the peripherals, let ioremap do
182 * this for us. We map only very basic peripherals here.
183 */
184#define U8500_IO_VIRTUAL 0xf0000000
185#define U8500_IO_PHYSICAL 0xa0000000
186/* This is where we map in the ROM to check ASIC IDs */
187#define UX500_VIRT_ROM 0xf0000000
188
189/* This macro is used in assembly, so no cast */
190#define IO_ADDRESS(x) \
191 (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL)
192
193/* typesafe io address */
194#define __io_address(n) IOMEM(IO_ADDRESS(n))
195
196/* Used by some plat-nomadik code */
197#define io_p2v(n) __io_address(n)
198
199#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
200
173#endif 201#endif
diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c
index 16b5f71e6974..f71b3d7bd4fb 100644
--- a/arch/arm/mach-ux500/devices-common.c
+++ b/arch/arm/mach-ux500/devices-common.c
@@ -13,8 +13,7 @@
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14#include <linux/platform_data/pinctrl-nomadik.h> 14#include <linux/platform_data/pinctrl-nomadik.h>
15 15
16#include <mach/hardware.h> 16#include "irqs.h"
17#include <mach/irqs.h>
18 17
19#include "devices-common.h" 18#include "devices-common.h"
20 19
diff --git a/arch/arm/mach-ux500/devices-db8500.c b/arch/arm/mach-ux500/devices-db8500.c
index f3d9419f75d3..1cf94ce0feec 100644
--- a/arch/arm/mach-ux500/devices-db8500.c
+++ b/arch/arm/mach-ux500/devices-db8500.c
@@ -15,10 +15,10 @@
15#include <linux/platform_data/dma-ste-dma40.h> 15#include <linux/platform_data/dma-ste-dma40.h>
16#include <linux/mfd/dbx500-prcmu.h> 16#include <linux/mfd/dbx500-prcmu.h>
17 17
18#include <mach/hardware.h> 18#include "setup.h"
19#include <mach/setup.h> 19#include "irqs.h"
20#include <mach/irqs.h>
21 20
21#include "db8500-regs.h"
22#include "devices-db8500.h" 22#include "devices-db8500.h"
23#include "ste-dma40-db8500.h" 23#include "ste-dma40-db8500.h"
24 24
@@ -199,6 +199,8 @@ struct platform_device u8500_ske_keypad_device = {
199 199
200struct prcmu_pdata db8500_prcmu_pdata = { 200struct prcmu_pdata db8500_prcmu_pdata = {
201 .ab_platdata = &ab8500_platdata, 201 .ab_platdata = &ab8500_platdata,
202 .ab_irq = IRQ_DB8500_AB8500,
203 .irq_base = IRQ_PRCMU_BASE,
202 .version_offset = DB8500_PRCMU_FW_VERSION_OFFSET, 204 .version_offset = DB8500_PRCMU_FW_VERSION_OFFSET,
203 .legacy_offset = DB8500_PRCMU_LEGACY_OFFSET, 205 .legacy_offset = DB8500_PRCMU_LEGACY_OFFSET,
204}; 206};
diff --git a/arch/arm/mach-ux500/devices-db8500.h b/arch/arm/mach-ux500/devices-db8500.h
index dbcb35c48f06..321998320f98 100644
--- a/arch/arm/mach-ux500/devices-db8500.h
+++ b/arch/arm/mach-ux500/devices-db8500.h
@@ -9,7 +9,8 @@
9#define __DEVICES_DB8500_H 9#define __DEVICES_DB8500_H
10 10
11#include <linux/platform_data/usb-musb-ux500.h> 11#include <linux/platform_data/usb-musb-ux500.h>
12#include <mach/irqs.h> 12#include "irqs.h"
13#include "db8500-regs.h"
13#include "devices-common.h" 14#include "devices-common.h"
14 15
15struct ske_keypad_platform_data; 16struct ske_keypad_platform_data;
diff --git a/arch/arm/mach-ux500/devices.c b/arch/arm/mach-ux500/devices.c
index ea0a2f92ca70..0f9e52b95935 100644
--- a/arch/arm/mach-ux500/devices.c
+++ b/arch/arm/mach-ux500/devices.c
@@ -11,8 +11,9 @@
11#include <linux/io.h> 11#include <linux/io.h>
12#include <linux/amba/bus.h> 12#include <linux/amba/bus.h>
13 13
14#include <mach/hardware.h> 14#include "setup.h"
15#include <mach/setup.h> 15
16#include "db8500-regs.h"
16 17
17void __init amba_add_devices(struct amba_device *devs[], int num) 18void __init amba_add_devices(struct amba_device *devs[], int num)
18{ 19{
diff --git a/arch/arm/mach-ux500/include/mach/devices.h b/arch/arm/mach-ux500/devices.h
index cbc6f1e4104d..cbc6f1e4104d 100644
--- a/arch/arm/mach-ux500/include/mach/devices.h
+++ b/arch/arm/mach-ux500/devices.h
diff --git a/arch/arm/mach-ux500/hotplug.c b/arch/arm/mach-ux500/hotplug.c
index 2f6af259015d..87abcf278432 100644
--- a/arch/arm/mach-ux500/hotplug.c
+++ b/arch/arm/mach-ux500/hotplug.c
@@ -15,7 +15,7 @@
15#include <asm/cacheflush.h> 15#include <asm/cacheflush.h>
16#include <asm/smp_plat.h> 16#include <asm/smp_plat.h>
17 17
18#include <mach/setup.h> 18#include "setup.h"
19 19
20/* 20/*
21 * platform-specific code to shutdown a CPU 21 * platform-specific code to shutdown a CPU
diff --git a/arch/arm/mach-ux500/id.c b/arch/arm/mach-ux500/id.c
index 9f951842e1e5..0d33d1a06955 100644
--- a/arch/arm/mach-ux500/id.c
+++ b/arch/arm/mach-ux500/id.c
@@ -14,9 +14,9 @@
14#include <asm/cacheflush.h> 14#include <asm/cacheflush.h>
15#include <asm/mach/map.h> 15#include <asm/mach/map.h>
16 16
17#include <mach/hardware.h> 17#include "setup.h"
18#include <mach/setup.h>
19 18
19#include "db8500-regs.h"
20#include "id.h" 20#include "id.h"
21 21
22struct dbx500_asic_id dbx500_id; 22struct dbx500_asic_id dbx500_id;
diff --git a/arch/arm/mach-ux500/include/mach/debug-macro.S b/arch/arm/mach-ux500/include/mach/debug-macro.S
deleted file mode 100644
index 67035223334a..000000000000
--- a/arch/arm/mach-ux500/include/mach/debug-macro.S
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * Debugging macro include header
3 *
4 * Copyright (C) 2009 ST-Ericsson
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 */
11#include <mach/hardware.h>
12
13#if CONFIG_UX500_DEBUG_UART > 2
14#error Invalid Ux500 debug UART
15#endif
16
17/*
18 * DEBUG_LL only works if only one SOC is built in. We don't use #else below
19 * in order to get "__UX500_UART redefined" warnings if more than one SOC is
20 * built, so that there's some hint during the build that something is wrong.
21 */
22
23#ifdef CONFIG_UX500_SOC_DB8500
24#define __UX500_UART(n) U8500_UART##n##_BASE
25#endif
26
27#ifndef __UX500_UART
28#error Unknown SOC
29#endif
30
31#define UX500_UART(n) __UX500_UART(n)
32#define UART_BASE UX500_UART(CONFIG_UX500_DEBUG_UART)
33
34 .macro addruart, rp, rv, tmp
35 ldr \rp, =UART_BASE @ no, physical address
36 ldr \rv, =IO_ADDRESS(UART_BASE) @ yes, virtual address
37 .endm
38
39#include <asm/hardware/debug-pl01x.S>
diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h
deleted file mode 100644
index 5201ddace503..000000000000
--- a/arch/arm/mach-ux500/include/mach/hardware.h
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * Copyright (C) 2009 ST-Ericsson.
3 *
4 * U8500 hardware definitions
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#ifndef __MACH_HARDWARE_H
11#define __MACH_HARDWARE_H
12
13/*
14 * Macros to get at IO space when running virtually
15 * We dont map all the peripherals, let ioremap do
16 * this for us. We map only very basic peripherals here.
17 */
18#define U8500_IO_VIRTUAL 0xf0000000
19#define U8500_IO_PHYSICAL 0xa0000000
20/* This is where we map in the ROM to check ASIC IDs */
21#define UX500_VIRT_ROM 0xf0000000
22
23/* This macro is used in assembly, so no cast */
24#define IO_ADDRESS(x) \
25 (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL)
26
27/* typesafe io address */
28#define __io_address(n) IOMEM(IO_ADDRESS(n))
29
30/* Used by some plat-nomadik code */
31#define io_p2v(n) __io_address(n)
32
33#include <mach/db8500-regs.h>
34
35#define MSP_TX_RX_REG_OFFSET 0
36#define CRYP1_RX_REG_OFFSET 0x10
37#define CRYP1_TX_REG_OFFSET 0x8
38#define HASH1_TX_REG_OFFSET 0x4
39
40#ifndef __ASSEMBLY__
41
42extern void __iomem *_PRCMU_BASE;
43
44#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
45
46#endif /* __ASSEMBLY__ */
47#endif /* __MACH_HARDWARE_H */
diff --git a/arch/arm/mach-ux500/include/mach/msp.h b/arch/arm/mach-ux500/include/mach/msp.h
deleted file mode 100644
index 9991aea3d577..000000000000
--- a/arch/arm/mach-ux500/include/mach/msp.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
5 * License terms: GNU General Public License (GPL), version 2.
6 */
7
8#ifndef __MSP_H
9#define __MSP_H
10
11#include <linux/platform_data/dma-ste-dma40.h>
12
13enum msp_i2s_id {
14 MSP_I2S_0 = 0,
15 MSP_I2S_1,
16 MSP_I2S_2,
17 MSP_I2S_3,
18};
19
20/* Platform data structure for a MSP I2S-device */
21struct msp_i2s_platform_data {
22 enum msp_i2s_id id;
23 struct stedma40_chan_cfg *msp_i2s_dma_rx;
24 struct stedma40_chan_cfg *msp_i2s_dma_tx;
25};
26
27#endif
diff --git a/arch/arm/mach-ux500/include/mach/timex.h b/arch/arm/mach-ux500/include/mach/timex.h
deleted file mode 100644
index d0942c174018..000000000000
--- a/arch/arm/mach-ux500/include/mach/timex.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_ARCH_TIMEX_H
2#define __ASM_ARCH_TIMEX_H
3
4#define CLOCK_TICK_RATE 110000000
5
6#endif
diff --git a/arch/arm/mach-ux500/include/mach/uncompress.h b/arch/arm/mach-ux500/include/mach/uncompress.h
deleted file mode 100644
index 36969d52e53a..000000000000
--- a/arch/arm/mach-ux500/include/mach/uncompress.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * Copyright (C) 2009 ST-Ericsson
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 as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
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 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18#ifndef __ASM_ARCH_UNCOMPRESS_H
19#define __ASM_ARCH_UNCOMPRESS_H
20
21#include <asm/setup.h>
22#include <asm/mach-types.h>
23#include <linux/io.h>
24#include <linux/amba/serial.h>
25#include <mach/hardware.h>
26
27void __iomem *ux500_uart_base;
28
29static void putc(const char c)
30{
31 /* Do nothing if the UART is not enabled. */
32 if (!(__raw_readb(ux500_uart_base + UART011_CR) & 0x1))
33 return;
34
35 if (c == '\n')
36 putc('\r');
37
38 while (__raw_readb(ux500_uart_base + UART01x_FR) & (1 << 5))
39 barrier();
40 __raw_writeb(c, ux500_uart_base + UART01x_DR);
41}
42
43static void flush(void)
44{
45 if (!(__raw_readb(ux500_uart_base + UART011_CR) & 0x1))
46 return;
47 while (__raw_readb(ux500_uart_base + UART01x_FR) & (1 << 3))
48 barrier();
49}
50
51static inline void arch_decomp_setup(void)
52{
53 /* Use machine_is_foo() macro if you need to switch base someday */
54 ux500_uart_base = (void __iomem *)U8500_UART2_BASE;
55}
56
57#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h b/arch/arm/mach-ux500/irqs-board-mop500.h
index d526dd8e87d3..d526dd8e87d3 100644
--- a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h
+++ b/arch/arm/mach-ux500/irqs-board-mop500.h
diff --git a/arch/arm/mach-ux500/include/mach/irqs-db8500.h b/arch/arm/mach-ux500/irqs-db8500.h
index 68bc14974608..f3a9d5947ef3 100644
--- a/arch/arm/mach-ux500/include/mach/irqs-db8500.h
+++ b/arch/arm/mach-ux500/irqs-db8500.h
@@ -109,31 +109,6 @@
109 109
110/* Virtual interrupts corresponding to the PRCMU wakeups. */ 110/* Virtual interrupts corresponding to the PRCMU wakeups. */
111#define IRQ_PRCMU_BASE IRQ_SOC_START 111#define IRQ_PRCMU_BASE IRQ_SOC_START
112#define NUM_PRCMU_WAKEUPS (IRQ_PRCMU_END - IRQ_PRCMU_BASE)
113
114#define IRQ_PRCMU_RTC (IRQ_PRCMU_BASE)
115#define IRQ_PRCMU_RTT0 (IRQ_PRCMU_BASE + 1)
116#define IRQ_PRCMU_RTT1 (IRQ_PRCMU_BASE + 2)
117#define IRQ_PRCMU_HSI0 (IRQ_PRCMU_BASE + 3)
118#define IRQ_PRCMU_HSI1 (IRQ_PRCMU_BASE + 4)
119#define IRQ_PRCMU_CA_WAKE (IRQ_PRCMU_BASE + 5)
120#define IRQ_PRCMU_USB (IRQ_PRCMU_BASE + 6)
121#define IRQ_PRCMU_ABB (IRQ_PRCMU_BASE + 7)
122#define IRQ_PRCMU_ABB_FIFO (IRQ_PRCMU_BASE + 8)
123#define IRQ_PRCMU_ARM (IRQ_PRCMU_BASE + 9)
124#define IRQ_PRCMU_MODEM_SW_RESET_REQ (IRQ_PRCMU_BASE + 10)
125#define IRQ_PRCMU_GPIO0 (IRQ_PRCMU_BASE + 11)
126#define IRQ_PRCMU_GPIO1 (IRQ_PRCMU_BASE + 12)
127#define IRQ_PRCMU_GPIO2 (IRQ_PRCMU_BASE + 13)
128#define IRQ_PRCMU_GPIO3 (IRQ_PRCMU_BASE + 14)
129#define IRQ_PRCMU_GPIO4 (IRQ_PRCMU_BASE + 15)
130#define IRQ_PRCMU_GPIO5 (IRQ_PRCMU_BASE + 16)
131#define IRQ_PRCMU_GPIO6 (IRQ_PRCMU_BASE + 17)
132#define IRQ_PRCMU_GPIO7 (IRQ_PRCMU_BASE + 18)
133#define IRQ_PRCMU_GPIO8 (IRQ_PRCMU_BASE + 19)
134#define IRQ_PRCMU_CA_SLEEP (IRQ_PRCMU_BASE + 20)
135#define IRQ_PRCMU_HOTMON_LOW (IRQ_PRCMU_BASE + 21)
136#define IRQ_PRCMU_HOTMON_HIGH (IRQ_PRCMU_BASE + 22)
137#define IRQ_PRCMU_END (IRQ_PRCMU_BASE + 23) 112#define IRQ_PRCMU_END (IRQ_PRCMU_BASE + 23)
138 113
139/* 114/*
diff --git a/arch/arm/mach-ux500/include/mach/irqs.h b/arch/arm/mach-ux500/irqs.h
index fc77b4274c8d..15b2af698ed7 100644
--- a/arch/arm/mach-ux500/include/mach/irqs.h
+++ b/arch/arm/mach-ux500/irqs.h
@@ -10,8 +10,6 @@
10#ifndef ASM_ARCH_IRQS_H 10#ifndef ASM_ARCH_IRQS_H
11#define ASM_ARCH_IRQS_H 11#define ASM_ARCH_IRQS_H
12 12
13#include <mach/hardware.h>
14
15#define IRQ_LOCALTIMER 29 13#define IRQ_LOCALTIMER 29
16#define IRQ_LOCALWDOG 30 14#define IRQ_LOCALWDOG 30
17 15
@@ -36,14 +34,14 @@
36/* This will be overridden by SoC-specific irq headers */ 34/* This will be overridden by SoC-specific irq headers */
37#define IRQ_SOC_END IRQ_SOC_START 35#define IRQ_SOC_END IRQ_SOC_START
38 36
39#include <mach/irqs-db8500.h> 37#include "irqs-db8500.h"
40 38
41#define IRQ_BOARD_START IRQ_SOC_END 39#define IRQ_BOARD_START IRQ_SOC_END
42/* This will be overridden by board-specific irq headers */ 40/* This will be overridden by board-specific irq headers */
43#define IRQ_BOARD_END IRQ_BOARD_START 41#define IRQ_BOARD_END IRQ_BOARD_START
44 42
45#ifdef CONFIG_MACH_MOP500 43#ifdef CONFIG_MACH_MOP500
46#include <mach/irqs-board-mop500.h> 44#include "irqs-board-mop500.h"
47#endif 45#endif
48 46
49#define UX500_NR_IRQS IRQ_BOARD_END 47#define UX500_NR_IRQS IRQ_BOARD_END
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
index 152b1309b9af..14d90469392f 100644
--- a/arch/arm/mach-ux500/platsmp.c
+++ b/arch/arm/mach-ux500/platsmp.c
@@ -21,9 +21,9 @@
21#include <asm/smp_plat.h> 21#include <asm/smp_plat.h>
22#include <asm/smp_scu.h> 22#include <asm/smp_scu.h>
23 23
24#include <mach/hardware.h> 24#include "setup.h"
25#include <mach/setup.h>
26 25
26#include "db8500-regs.h"
27#include "id.h" 27#include "id.h"
28 28
29/* This is called from headsmp.S to wakeup the secondary core */ 29/* This is called from headsmp.S to wakeup the secondary core */
diff --git a/arch/arm/mach-ux500/pm.c b/arch/arm/mach-ux500/pm.c
new file mode 100644
index 000000000000..1a468f0fd22e
--- /dev/null
+++ b/arch/arm/mach-ux500/pm.c
@@ -0,0 +1,167 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010-2013
3 * Author: Rickard Andersson <rickard.andersson@stericsson.com> for
4 * ST-Ericsson.
5 * Author: Daniel Lezcano <daniel.lezcano@linaro.org> for Linaro.
6 * License terms: GNU General Public License (GPL) version 2
7 *
8 */
9
10#include <linux/kernel.h>
11#include <linux/irqchip/arm-gic.h>
12#include <linux/delay.h>
13#include <linux/io.h>
14#include <linux/platform_data/arm-ux500-pm.h>
15
16#include "db8500-regs.h"
17
18/* ARM WFI Standby signal register */
19#define PRCM_ARM_WFI_STANDBY (prcmu_base + 0x130)
20#define PRCM_ARM_WFI_STANDBY_WFI0 0x08
21#define PRCM_ARM_WFI_STANDBY_WFI1 0x10
22#define PRCM_IOCR (prcmu_base + 0x310)
23#define PRCM_IOCR_IOFORCE 0x1
24
25/* Dual A9 core interrupt management unit registers */
26#define PRCM_A9_MASK_REQ (prcmu_base + 0x328)
27#define PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ 0x1
28
29#define PRCM_A9_MASK_ACK (prcmu_base + 0x32c)
30#define PRCM_ARMITMSK31TO0 (prcmu_base + 0x11c)
31#define PRCM_ARMITMSK63TO32 (prcmu_base + 0x120)
32#define PRCM_ARMITMSK95TO64 (prcmu_base + 0x124)
33#define PRCM_ARMITMSK127TO96 (prcmu_base + 0x128)
34#define PRCM_POWER_STATE_VAL (prcmu_base + 0x25C)
35#define PRCM_ARMITVAL31TO0 (prcmu_base + 0x260)
36#define PRCM_ARMITVAL63TO32 (prcmu_base + 0x264)
37#define PRCM_ARMITVAL95TO64 (prcmu_base + 0x268)
38#define PRCM_ARMITVAL127TO96 (prcmu_base + 0x26C)
39
40static void __iomem *prcmu_base;
41
42/* This function decouple the gic from the prcmu */
43int prcmu_gic_decouple(void)
44{
45 u32 val = readl(PRCM_A9_MASK_REQ);
46
47 /* Set bit 0 register value to 1 */
48 writel(val | PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ,
49 PRCM_A9_MASK_REQ);
50
51 /* Make sure the register is updated */
52 readl(PRCM_A9_MASK_REQ);
53
54 /* Wait a few cycles for the gic mask completion */
55 udelay(1);
56
57 return 0;
58}
59
60/* This function recouple the gic with the prcmu */
61int prcmu_gic_recouple(void)
62{
63 u32 val = readl(PRCM_A9_MASK_REQ);
64
65 /* Set bit 0 register value to 0 */
66 writel(val & ~PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ, PRCM_A9_MASK_REQ);
67
68 return 0;
69}
70
71#define PRCMU_GIC_NUMBER_REGS 5
72
73/*
74 * This function checks if there are pending irq on the gic. It only
75 * makes sense if the gic has been decoupled before with the
76 * db8500_prcmu_gic_decouple function. Disabling an interrupt only
77 * disables the forwarding of the interrupt to any CPU interface. It
78 * does not prevent the interrupt from changing state, for example
79 * becoming pending, or active and pending if it is already
80 * active. Hence, we have to check the interrupt is pending *and* is
81 * active.
82 */
83bool prcmu_gic_pending_irq(void)
84{
85 u32 pr; /* Pending register */
86 u32 er; /* Enable register */
87 void __iomem *dist_base = __io_address(U8500_GIC_DIST_BASE);
88 int i;
89
90 /* 5 registers. STI & PPI not skipped */
91 for (i = 0; i < PRCMU_GIC_NUMBER_REGS; i++) {
92
93 pr = readl_relaxed(dist_base + GIC_DIST_PENDING_SET + i * 4);
94 er = readl_relaxed(dist_base + GIC_DIST_ENABLE_SET + i * 4);
95
96 if (pr & er)
97 return true; /* There is a pending interrupt */
98 }
99
100 return false;
101}
102
103/*
104 * This function checks if there are pending interrupt on the
105 * prcmu which has been delegated to monitor the irqs with the
106 * db8500_prcmu_copy_gic_settings function.
107 */
108bool prcmu_pending_irq(void)
109{
110 u32 it, im;
111 int i;
112
113 for (i = 0; i < PRCMU_GIC_NUMBER_REGS - 1; i++) {
114 it = readl(PRCM_ARMITVAL31TO0 + i * 4);
115 im = readl(PRCM_ARMITMSK31TO0 + i * 4);
116 if (it & im)
117 return true; /* There is a pending interrupt */
118 }
119
120 return false;
121}
122
123/*
124 * This function checks if the specified cpu is in in WFI. It's usage
125 * makes sense only if the gic is decoupled with the db8500_prcmu_gic_decouple
126 * function. Of course passing smp_processor_id() to this function will
127 * always return false...
128 */
129bool prcmu_is_cpu_in_wfi(int cpu)
130{
131 return readl(PRCM_ARM_WFI_STANDBY) & cpu ? PRCM_ARM_WFI_STANDBY_WFI1 :
132 PRCM_ARM_WFI_STANDBY_WFI0;
133}
134
135/*
136 * This function copies the gic SPI settings to the prcmu in order to
137 * monitor them and abort/finish the retention/off sequence or state.
138 */
139int prcmu_copy_gic_settings(void)
140{
141 u32 er; /* Enable register */
142 void __iomem *dist_base = __io_address(U8500_GIC_DIST_BASE);
143 int i;
144
145 /* We skip the STI and PPI */
146 for (i = 0; i < PRCMU_GIC_NUMBER_REGS - 1; i++) {
147 er = readl_relaxed(dist_base +
148 GIC_DIST_ENABLE_SET + (i + 1) * 4);
149 writel(er, PRCM_ARMITMSK31TO0 + i * 4);
150 }
151
152 return 0;
153}
154
155void __init ux500_pm_init(u32 phy_base, u32 size)
156{
157 prcmu_base = ioremap(phy_base, size);
158 if (!prcmu_base) {
159 pr_err("could not remap PRCMU for PM functions\n");
160 return;
161 }
162 /*
163 * On watchdog reboot the GIC is in some cases decoupled.
164 * This will make sure that the GIC is correctly configured.
165 */
166 prcmu_gic_recouple();
167}
diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/setup.h
index bddce2b49372..bddce2b49372 100644
--- a/arch/arm/mach-ux500/include/mach/setup.h
+++ b/arch/arm/mach-ux500/setup.h
diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c
index d07bbe7f04a6..b6bd0efcbe64 100644
--- a/arch/arm/mach-ux500/timer.c
+++ b/arch/arm/mach-ux500/timer.c
@@ -14,10 +14,10 @@
14 14
15#include <asm/smp_twd.h> 15#include <asm/smp_twd.h>
16 16
17#include <mach/setup.h> 17#include "setup.h"
18#include <mach/hardware.h> 18#include "irqs.h"
19#include <mach/irqs.h>
20 19
20#include "db8500-regs.h"
21#include "id.h" 21#include "id.h"
22 22
23#ifdef CONFIG_HAVE_ARM_TWD 23#ifdef CONFIG_HAVE_ARM_TWD
diff --git a/arch/arm/mach-ux500/usb.c b/arch/arm/mach-ux500/usb.c
index 78ac65f62e87..2dfc72f7cd8a 100644
--- a/arch/arm/mach-ux500/usb.c
+++ b/arch/arm/mach-ux500/usb.c
@@ -10,7 +10,7 @@
10#include <linux/platform_data/usb-musb-ux500.h> 10#include <linux/platform_data/usb-musb-ux500.h>
11#include <linux/platform_data/dma-ste-dma40.h> 11#include <linux/platform_data/dma-ste-dma40.h>
12 12
13#include <mach/hardware.h> 13#include "db8500-regs.h"
14 14
15#define MUSB_DMA40_RX_CH { \ 15#define MUSB_DMA40_RX_CH { \
16 .mode = STEDMA40_MODE_LOGICAL, \ 16 .mode = STEDMA40_MODE_LOGICAL, \
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index 0f1c5e53fb27..5907e10c37fd 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -9,6 +9,8 @@ config ARCH_VEXPRESS
9 select COMMON_CLK_VERSATILE 9 select COMMON_CLK_VERSATILE
10 select CPU_V7 10 select CPU_V7
11 select GENERIC_CLOCKEVENTS 11 select GENERIC_CLOCKEVENTS
12 select HAVE_ARM_SCU if SMP
13 select HAVE_ARM_TWD if LOCAL_TIMERS
12 select HAVE_CLK 14 select HAVE_CLK
13 select HAVE_PATA_PLATFORM 15 select HAVE_PATA_PLATFORM
14 select HAVE_SMP 16 select HAVE_SMP
diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
index adb6c0ea0e53..138b5891f4ef 100644
--- a/arch/arm/mach-zynq/Kconfig
+++ b/arch/arm/mach-zynq/Kconfig
@@ -5,6 +5,8 @@ config ARCH_ZYNQ
5 select COMMON_CLK 5 select COMMON_CLK
6 select CPU_V7 6 select CPU_V7
7 select GENERIC_CLOCKEVENTS 7 select GENERIC_CLOCKEVENTS
8 select HAVE_ARM_SCU if SMP
9 select HAVE_ARM_TWD if LOCAL_TIMERS
8 select ICST 10 select ICST
9 select MIGHT_HAVE_CACHE_L2X0 11 select MIGHT_HAVE_CACHE_L2X0
10 select USE_OF 12 select USE_OF
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 03db14d8ace9..f55d3f9b508d 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -879,51 +879,6 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd)
879} 879}
880#endif /* CONFIG_PLAT_S3C24XX */ 880#endif /* CONFIG_PLAT_S3C24XX */
881 881
882/* MFC */
883
884#ifdef CONFIG_S5P_DEV_MFC
885static struct resource s5p_mfc_resource[] = {
886 [0] = DEFINE_RES_MEM(S5P_PA_MFC, SZ_64K),
887 [1] = DEFINE_RES_IRQ(IRQ_MFC),
888};
889
890struct platform_device s5p_device_mfc = {
891 .name = "s5p-mfc",
892 .id = -1,
893 .num_resources = ARRAY_SIZE(s5p_mfc_resource),
894 .resource = s5p_mfc_resource,
895};
896
897/*
898 * MFC hardware has 2 memory interfaces which are modelled as two separate
899 * platform devices to let dma-mapping distinguish between them.
900 *
901 * MFC parent device (s5p_device_mfc) must be registered before memory
902 * interface specific devices (s5p_device_mfc_l and s5p_device_mfc_r).
903 */
904
905struct platform_device s5p_device_mfc_l = {
906 .name = "s5p-mfc-l",
907 .id = -1,
908 .dev = {
909 .parent = &s5p_device_mfc.dev,
910 .dma_mask = &samsung_device_dma_mask,
911 .coherent_dma_mask = DMA_BIT_MASK(32),
912 },
913};
914
915struct platform_device s5p_device_mfc_r = {
916 .name = "s5p-mfc-r",
917 .id = -1,
918 .dev = {
919 .parent = &s5p_device_mfc.dev,
920 .dma_mask = &samsung_device_dma_mask,
921 .coherent_dma_mask = DMA_BIT_MASK(32),
922 },
923};
924
925#endif /* CONFIG_S5P_DEV_MFC */
926
927/* MIPI CSIS */ 882/* MIPI CSIS */
928 883
929#ifdef CONFIG_S5P_DEV_CSIS0 884#ifdef CONFIG_S5P_DEV_CSIS0
diff --git a/arch/arm/plat-samsung/include/plat/regs-onenand.h b/arch/arm/plat-samsung/include/plat/regs-onenand.h
deleted file mode 100644
index 930ea8b88ed3..000000000000
--- a/arch/arm/plat-samsung/include/plat/regs-onenand.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * linux/arch/arm/plat-s3c/include/plat/regs-onenand.h
3 *
4 * Copyright (C) 2008-2010 Samsung Electronics
5 * Kyungmin Park <kyungmin.park@samsung.com>
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#ifndef __SAMSUNG_ONENAND_H__
12#define __SAMSUNG_ONENAND_H__
13
14#include <mach/hardware.h>
15
16/*
17 * OneNAND Controller
18 */
19#define MEM_CFG_OFFSET 0x0000
20#define BURST_LEN_OFFSET 0x0010
21#define MEM_RESET_OFFSET 0x0020
22#define INT_ERR_STAT_OFFSET 0x0030
23#define INT_ERR_MASK_OFFSET 0x0040
24#define INT_ERR_ACK_OFFSET 0x0050
25#define ECC_ERR_STAT_OFFSET 0x0060
26#define MANUFACT_ID_OFFSET 0x0070
27#define DEVICE_ID_OFFSET 0x0080
28#define DATA_BUF_SIZE_OFFSET 0x0090
29#define BOOT_BUF_SIZE_OFFSET 0x00A0
30#define BUF_AMOUNT_OFFSET 0x00B0
31#define TECH_OFFSET 0x00C0
32#define FBA_WIDTH_OFFSET 0x00D0
33#define FPA_WIDTH_OFFSET 0x00E0
34#define FSA_WIDTH_OFFSET 0x00F0
35#define TRANS_SPARE_OFFSET 0x0140
36#define DBS_DFS_WIDTH_OFFSET 0x0160
37#define INT_PIN_ENABLE_OFFSET 0x01A0
38#define ACC_CLOCK_OFFSET 0x01C0
39#define FLASH_VER_ID_OFFSET 0x01F0
40#define FLASH_AUX_CNTRL_OFFSET 0x0300 /* s3c64xx only */
41
42#define ONENAND_MEM_RESET_HOT 0x3
43#define ONENAND_MEM_RESET_COLD 0x2
44#define ONENAND_MEM_RESET_WARM 0x1
45
46#define CACHE_OP_ERR (1 << 13)
47#define RST_CMP (1 << 12)
48#define RDY_ACT (1 << 11)
49#define INT_ACT (1 << 10)
50#define UNSUP_CMD (1 << 9)
51#define LOCKED_BLK (1 << 8)
52#define BLK_RW_CMP (1 << 7)
53#define ERS_CMP (1 << 6)
54#define PGM_CMP (1 << 5)
55#define LOAD_CMP (1 << 4)
56#define ERS_FAIL (1 << 3)
57#define PGM_FAIL (1 << 2)
58#define INT_TO (1 << 1)
59#define LD_FAIL_ECC_ERR (1 << 0)
60
61#define TSRF (1 << 0)
62
63#endif
diff --git a/arch/arm/plat-samsung/include/plat/regs-rtc.h b/arch/arm/plat-samsung/include/plat/regs-rtc.h
deleted file mode 100644
index 0f8263e93eea..000000000000
--- a/arch/arm/plat-samsung/include/plat/regs-rtc.h
+++ /dev/null
@@ -1,71 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-rtc.h
2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
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 * S3C2410 Internal RTC register definition
11*/
12
13#ifndef __ASM_ARCH_REGS_RTC_H
14#define __ASM_ARCH_REGS_RTC_H __FILE__
15
16#define S3C2410_RTCREG(x) (x)
17#define S3C2410_INTP S3C2410_RTCREG(0x30)
18#define S3C2410_INTP_ALM (1 << 1)
19#define S3C2410_INTP_TIC (1 << 0)
20
21#define S3C2410_RTCCON S3C2410_RTCREG(0x40)
22#define S3C2410_RTCCON_RTCEN (1 << 0)
23#define S3C2410_RTCCON_CNTSEL (1 << 2)
24#define S3C2410_RTCCON_CLKRST (1 << 3)
25#define S3C2443_RTCCON_TICSEL (1 << 4)
26#define S3C64XX_RTCCON_TICEN (1 << 8)
27
28#define S3C2410_TICNT S3C2410_RTCREG(0x44)
29#define S3C2410_TICNT_ENABLE (1 << 7)
30
31/* S3C2443: tick count is 15 bit wide
32 * TICNT[6:0] contains upper 7 bits
33 * TICNT1[7:0] contains lower 8 bits
34 */
35#define S3C2443_TICNT_PART(x) ((x & 0x7f00) >> 8)
36#define S3C2443_TICNT1 S3C2410_RTCREG(0x4C)
37#define S3C2443_TICNT1_PART(x) (x & 0xff)
38
39/* S3C2416: tick count is 32 bit wide
40 * TICNT[6:0] contains bits [14:8]
41 * TICNT1[7:0] contains lower 8 bits
42 * TICNT2[16:0] contains upper 17 bits
43 */
44#define S3C2416_TICNT2 S3C2410_RTCREG(0x48)
45#define S3C2416_TICNT2_PART(x) ((x & 0xffff8000) >> 15)
46
47#define S3C2410_RTCALM S3C2410_RTCREG(0x50)
48#define S3C2410_RTCALM_ALMEN (1 << 6)
49#define S3C2410_RTCALM_YEAREN (1 << 5)
50#define S3C2410_RTCALM_MONEN (1 << 4)
51#define S3C2410_RTCALM_DAYEN (1 << 3)
52#define S3C2410_RTCALM_HOUREN (1 << 2)
53#define S3C2410_RTCALM_MINEN (1 << 1)
54#define S3C2410_RTCALM_SECEN (1 << 0)
55
56#define S3C2410_ALMSEC S3C2410_RTCREG(0x54)
57#define S3C2410_ALMMIN S3C2410_RTCREG(0x58)
58#define S3C2410_ALMHOUR S3C2410_RTCREG(0x5c)
59
60#define S3C2410_ALMDATE S3C2410_RTCREG(0x60)
61#define S3C2410_ALMMON S3C2410_RTCREG(0x64)
62#define S3C2410_ALMYEAR S3C2410_RTCREG(0x68)
63
64#define S3C2410_RTCSEC S3C2410_RTCREG(0x70)
65#define S3C2410_RTCMIN S3C2410_RTCREG(0x74)
66#define S3C2410_RTCHOUR S3C2410_RTCREG(0x78)
67#define S3C2410_RTCDATE S3C2410_RTCREG(0x7c)
68#define S3C2410_RTCMON S3C2410_RTCREG(0x84)
69#define S3C2410_RTCYEAR S3C2410_RTCREG(0x88)
70
71#endif /* __ASM_ARCH_REGS_RTC_H */
diff --git a/arch/arm/plat-samsung/include/plat/regs-sdhci.h b/arch/arm/plat-samsung/include/plat/regs-sdhci.h
deleted file mode 100644
index e34049ad44cc..000000000000
--- a/arch/arm/plat-samsung/include/plat/regs-sdhci.h
+++ /dev/null
@@ -1,87 +0,0 @@
1/* linux/arch/arm/plat-s3c/include/plat/regs-sdhci.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 * S3C Platform - SDHCI (HSMMC) register 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 __PLAT_S3C_SDHCI_REGS_H
16#define __PLAT_S3C_SDHCI_REGS_H __FILE__
17
18#define S3C_SDHCI_CONTROL2 (0x80)
19#define S3C_SDHCI_CONTROL3 (0x84)
20#define S3C64XX_SDHCI_CONTROL4 (0x8C)
21
22#define S3C64XX_SDHCI_CTRL2_ENSTAASYNCCLR (1 << 31)
23#define S3C64XX_SDHCI_CTRL2_ENCMDCNFMSK (1 << 30)
24#define S3C_SDHCI_CTRL2_CDINVRXD3 (1 << 29)
25#define S3C_SDHCI_CTRL2_SLCARDOUT (1 << 28)
26
27#define S3C_SDHCI_CTRL2_FLTCLKSEL_MASK (0xf << 24)
28#define S3C_SDHCI_CTRL2_FLTCLKSEL_SHIFT (24)
29#define S3C_SDHCI_CTRL2_FLTCLKSEL(_x) ((_x) << 24)
30
31#define S3C_SDHCI_CTRL2_LVLDAT_MASK (0xff << 16)
32#define S3C_SDHCI_CTRL2_LVLDAT_SHIFT (16)
33#define S3C_SDHCI_CTRL2_LVLDAT(_x) ((_x) << 16)
34
35#define S3C_SDHCI_CTRL2_ENFBCLKTX (1 << 15)
36#define S3C_SDHCI_CTRL2_ENFBCLKRX (1 << 14)
37#define S3C_SDHCI_CTRL2_SDCDSEL (1 << 13)
38#define S3C_SDHCI_CTRL2_SDSIGPC (1 << 12)
39#define S3C_SDHCI_CTRL2_ENBUSYCHKTXSTART (1 << 11)
40
41#define S3C_SDHCI_CTRL2_DFCNT_MASK (0x3 << 9)
42#define S3C_SDHCI_CTRL2_DFCNT_SHIFT (9)
43#define S3C_SDHCI_CTRL2_DFCNT_NONE (0x0 << 9)
44#define S3C_SDHCI_CTRL2_DFCNT_4SDCLK (0x1 << 9)
45#define S3C_SDHCI_CTRL2_DFCNT_16SDCLK (0x2 << 9)
46#define S3C_SDHCI_CTRL2_DFCNT_64SDCLK (0x3 << 9)
47
48#define S3C_SDHCI_CTRL2_ENCLKOUTHOLD (1 << 8)
49#define S3C_SDHCI_CTRL2_RWAITMODE (1 << 7)
50#define S3C_SDHCI_CTRL2_DISBUFRD (1 << 6)
51#define S3C_SDHCI_CTRL2_SELBASECLK_MASK (0x3 << 4)
52#define S3C_SDHCI_CTRL2_SELBASECLK_SHIFT (4)
53#define S3C_SDHCI_CTRL2_PWRSYNC (1 << 3)
54#define S3C_SDHCI_CTRL2_ENCLKOUTMSKCON (1 << 1)
55#define S3C_SDHCI_CTRL2_HWINITFIN (1 << 0)
56
57#define S3C_SDHCI_CTRL3_FCSEL3 (1 << 31)
58#define S3C_SDHCI_CTRL3_FCSEL2 (1 << 23)
59#define S3C_SDHCI_CTRL3_FCSEL1 (1 << 15)
60#define S3C_SDHCI_CTRL3_FCSEL0 (1 << 7)
61
62#define S3C_SDHCI_CTRL3_FIA3_MASK (0x7f << 24)
63#define S3C_SDHCI_CTRL3_FIA3_SHIFT (24)
64#define S3C_SDHCI_CTRL3_FIA3(_x) ((_x) << 24)
65
66#define S3C_SDHCI_CTRL3_FIA2_MASK (0x7f << 16)
67#define S3C_SDHCI_CTRL3_FIA2_SHIFT (16)
68#define S3C_SDHCI_CTRL3_FIA2(_x) ((_x) << 16)
69
70#define S3C_SDHCI_CTRL3_FIA1_MASK (0x7f << 8)
71#define S3C_SDHCI_CTRL3_FIA1_SHIFT (8)
72#define S3C_SDHCI_CTRL3_FIA1(_x) ((_x) << 8)
73
74#define S3C_SDHCI_CTRL3_FIA0_MASK (0x7f << 0)
75#define S3C_SDHCI_CTRL3_FIA0_SHIFT (0)
76#define S3C_SDHCI_CTRL3_FIA0(_x) ((_x) << 0)
77
78#define S3C64XX_SDHCI_CONTROL4_DRIVE_MASK (0x3 << 16)
79#define S3C64XX_SDHCI_CONTROL4_DRIVE_SHIFT (16)
80#define S3C64XX_SDHCI_CONTROL4_DRIVE_2mA (0x0 << 16)
81#define S3C64XX_SDHCI_CONTROL4_DRIVE_4mA (0x1 << 16)
82#define S3C64XX_SDHCI_CONTROL4_DRIVE_7mA (0x2 << 16)
83#define S3C64XX_SDHCI_CONTROL4_DRIVE_9mA (0x3 << 16)
84
85#define S3C64XX_SDHCI_CONTROL4_BUSY (1)
86
87#endif /* __PLAT_S3C_SDHCI_REGS_H */
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h
index 5560586abec0..ce1d0f785efd 100644
--- a/arch/arm/plat-samsung/include/plat/sdhci.h
+++ b/arch/arm/plat-samsung/include/plat/sdhci.h
@@ -18,62 +18,9 @@
18#ifndef __PLAT_S3C_SDHCI_H 18#ifndef __PLAT_S3C_SDHCI_H
19#define __PLAT_S3C_SDHCI_H __FILE__ 19#define __PLAT_S3C_SDHCI_H __FILE__
20 20
21#include <linux/platform_data/mmc-sdhci-s3c.h>
21#include <plat/devs.h> 22#include <plat/devs.h>
22 23
23struct platform_device;
24struct mmc_host;
25struct mmc_card;
26struct mmc_ios;
27
28enum cd_types {
29 S3C_SDHCI_CD_INTERNAL, /* use mmc internal CD line */
30 S3C_SDHCI_CD_EXTERNAL, /* use external callback */
31 S3C_SDHCI_CD_GPIO, /* use external gpio pin for CD line */
32 S3C_SDHCI_CD_NONE, /* no CD line, use polling to detect card */
33 S3C_SDHCI_CD_PERMANENT, /* no CD line, card permanently wired to host */
34};
35
36/**
37 * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI
38 * @max_width: The maximum number of data bits supported.
39 * @host_caps: Standard MMC host capabilities bit field.
40 * @host_caps2: The second standard MMC host capabilities bit field.
41 * @cd_type: Type of Card Detection method (see cd_types enum above)
42 * @ext_cd_init: Initialize external card detect subsystem. Called on
43 * sdhci-s3c driver probe when cd_type == S3C_SDHCI_CD_EXTERNAL.
44 * notify_func argument is a callback to the sdhci-s3c driver
45 * that triggers the card detection event. Callback arguments:
46 * dev is pointer to platform device of the host controller,
47 * state is new state of the card (0 - removed, 1 - inserted).
48 * @ext_cd_cleanup: Cleanup external card detect subsystem. Called on
49 * sdhci-s3c driver remove when cd_type == S3C_SDHCI_CD_EXTERNAL.
50 * notify_func argument is the same callback as for ext_cd_init.
51 * @ext_cd_gpio: gpio pin used for external CD line, valid only if
52 * cd_type == S3C_SDHCI_CD_GPIO
53 * @ext_cd_gpio_invert: invert values for external CD gpio line
54 * @cfg_gpio: Configure the GPIO for a specific card bit-width
55 *
56 * Initialisation data specific to either the machine or the platform
57 * for the device driver to use or call-back when configuring gpio or
58 * card speed information.
59*/
60struct s3c_sdhci_platdata {
61 unsigned int max_width;
62 unsigned int host_caps;
63 unsigned int host_caps2;
64 unsigned int pm_caps;
65 enum cd_types cd_type;
66
67 int ext_cd_gpio;
68 bool ext_cd_gpio_invert;
69 int (*ext_cd_init)(void (*notify_func)(struct platform_device *,
70 int state));
71 int (*ext_cd_cleanup)(void (*notify_func)(struct platform_device *,
72 int state));
73
74 void (*cfg_gpio)(struct platform_device *dev, int width);
75};
76
77/* s3c_sdhci_set_platdata() - common helper for setting SDHCI platform data 24/* s3c_sdhci_set_platdata() - common helper for setting SDHCI platform data
78 * @pd: The default platform data for this device. 25 * @pd: The default platform data for this device.
79 * @set: Pointer to the platform data to fill in. 26 * @set: Pointer to the platform data to fill in.
@@ -378,5 +325,4 @@ static inline void s3c_sdhci_setname(int id, char *name)
378 break; 325 break;
379 } 326 }
380} 327}
381
382#endif /* __PLAT_S3C_SDHCI_H */ 328#endif /* __PLAT_S3C_SDHCI_H */
diff --git a/arch/arm/plat-samsung/irq-vic-timer.c b/arch/arm/plat-samsung/irq-vic-timer.c
index 5d205e74e495..0fceb4273824 100644
--- a/arch/arm/plat-samsung/irq-vic-timer.c
+++ b/arch/arm/plat-samsung/irq-vic-timer.c
@@ -20,6 +20,7 @@
20#include <linux/io.h> 20#include <linux/io.h>
21 21
22#include <mach/map.h> 22#include <mach/map.h>
23#include <mach/irqs.h>
23#include <plat/cpu.h> 24#include <plat/cpu.h>
24#include <plat/irq-vic-timer.h> 25#include <plat/irq-vic-timer.h>
25#include <plat/regs-timer.h> 26#include <plat/regs-timer.h>
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
index 002b1472293b..53210ec4e8ec 100644
--- a/arch/arm/plat-samsung/pm.c
+++ b/arch/arm/plat-samsung/pm.c
@@ -27,6 +27,7 @@
27#include <plat/regs-serial.h> 27#include <plat/regs-serial.h>
28#include <mach/regs-clock.h> 28#include <mach/regs-clock.h>
29#include <mach/regs-irq.h> 29#include <mach/regs-irq.h>
30#include <mach/irqs.h>
30#include <asm/irq.h> 31#include <asm/irq.h>
31 32
32#include <plat/pm.h> 33#include <plat/pm.h>
diff --git a/arch/arm/plat-samsung/s5p-dev-mfc.c b/arch/arm/plat-samsung/s5p-dev-mfc.c
index 5ec104b5408b..a93fb6fb6606 100644
--- a/arch/arm/plat-samsung/s5p-dev-mfc.c
+++ b/arch/arm/plat-samsung/s5p-dev-mfc.c
@@ -18,10 +18,50 @@
18#include <linux/of.h> 18#include <linux/of.h>
19 19
20#include <mach/map.h> 20#include <mach/map.h>
21#include <mach/irqs.h>
21#include <plat/devs.h> 22#include <plat/devs.h>
22#include <plat/irqs.h>
23#include <plat/mfc.h> 23#include <plat/mfc.h>
24 24
25static struct resource s5p_mfc_resource[] = {
26 [0] = DEFINE_RES_MEM(S5P_PA_MFC, SZ_64K),
27 [1] = DEFINE_RES_IRQ(IRQ_MFC),
28};
29
30struct platform_device s5p_device_mfc = {
31 .name = "s5p-mfc",
32 .id = -1,
33 .num_resources = ARRAY_SIZE(s5p_mfc_resource),
34 .resource = s5p_mfc_resource,
35};
36
37/*
38 * MFC hardware has 2 memory interfaces which are modelled as two separate
39 * platform devices to let dma-mapping distinguish between them.
40 *
41 * MFC parent device (s5p_device_mfc) must be registered before memory
42 * interface specific devices (s5p_device_mfc_l and s5p_device_mfc_r).
43 */
44
45struct platform_device s5p_device_mfc_l = {
46 .name = "s5p-mfc-l",
47 .id = -1,
48 .dev = {
49 .parent = &s5p_device_mfc.dev,
50 .dma_mask = &s5p_device_mfc_l.dev.coherent_dma_mask,
51 .coherent_dma_mask = DMA_BIT_MASK(32),
52 },
53};
54
55struct platform_device s5p_device_mfc_r = {
56 .name = "s5p-mfc-r",
57 .id = -1,
58 .dev = {
59 .parent = &s5p_device_mfc.dev,
60 .dma_mask = &s5p_device_mfc_r.dev.coherent_dma_mask,
61 .coherent_dma_mask = DMA_BIT_MASK(32),
62 },
63};
64
25struct s5p_mfc_reserved_mem { 65struct s5p_mfc_reserved_mem {
26 phys_addr_t base; 66 phys_addr_t base;
27 unsigned long size; 67 unsigned long size;
diff --git a/arch/arm/plat-samsung/s5p-irq.c b/arch/arm/plat-samsung/s5p-irq.c
index 103e371f5e35..ff1a76011b1e 100644
--- a/arch/arm/plat-samsung/s5p-irq.c
+++ b/arch/arm/plat-samsung/s5p-irq.c
@@ -15,6 +15,7 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/irqchip/arm-vic.h> 16#include <linux/irqchip/arm-vic.h>
17 17
18#include <mach/irqs.h>
18#include <mach/map.h> 19#include <mach/map.h>
19#include <plat/regs-timer.h> 20#include <plat/regs-timer.h>
20#include <plat/cpu.h> 21#include <plat/cpu.h>
diff --git a/arch/arm/plat-spear/Kconfig b/arch/arm/plat-spear/Kconfig
deleted file mode 100644
index 8a08c31b5e20..000000000000
--- a/arch/arm/plat-spear/Kconfig
+++ /dev/null
@@ -1,47 +0,0 @@
1#
2# SPEAr Platform configuration file
3#
4
5if PLAT_SPEAR
6
7choice
8 prompt "ST SPEAr Family"
9 default ARCH_SPEAR3XX
10
11config ARCH_SPEAR13XX
12 bool "ST SPEAr13xx with Device Tree"
13 select ARCH_HAS_CPUFREQ
14 select ARM_GIC
15 select CPU_V7
16 select GPIO_SPEAR_SPICS
17 select HAVE_SMP
18 select MIGHT_HAVE_CACHE_L2X0
19 select PINCTRL
20 select USE_OF
21 help
22 Supports for ARM's SPEAR13XX family
23
24config ARCH_SPEAR3XX
25 bool "ST SPEAr3xx with Device Tree"
26 select ARM_VIC
27 select CPU_ARM926T
28 select PINCTRL
29 select USE_OF
30 help
31 Supports for ARM's SPEAR3XX family
32
33config ARCH_SPEAR6XX
34 bool "SPEAr6XX"
35 select ARM_VIC
36 select CPU_ARM926T
37 help
38 Supports for ARM's SPEAR6XX family
39
40endchoice
41
42# Adding SPEAr machine specific configuration files
43source "arch/arm/mach-spear13xx/Kconfig"
44source "arch/arm/mach-spear3xx/Kconfig"
45source "arch/arm/mach-spear6xx/Kconfig"
46
47endif
diff --git a/arch/arm/plat-spear/Makefile b/arch/arm/plat-spear/Makefile
deleted file mode 100644
index 01e88532a5db..000000000000
--- a/arch/arm/plat-spear/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
1#
2# SPEAr Platform specific Makefile
3#
4
5# Common support
6obj-y := restart.o time.o
7
8obj-$(CONFIG_ARCH_SPEAR3XX) += pl080.o
9obj-$(CONFIG_ARCH_SPEAR6XX) += pl080.o