aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-23 19:31:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-23 19:31:31 -0400
commitf01b9b73f57f4f92d39bba0d9aa4a38f318212df (patch)
treeb815a4477af34f7f6c61dff0c04db6cb975cdd55
parentfde75430278130505cac21997cd9f90b7bb2670a (diff)
parent66314223aa5e862c9d1d068cb7186b4fd58ebeaa (diff)
Merge tag 'newsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull support for three new arm SoC types from Arnd Bergmann: - The mvebu platform includes Marvell's Armada XP and Armada 370 chips, made by the mvebu business unit inside of Marvell. Since the same group also made the older but similar platforms we call "orion5x", "kirkwood", "mv78xx0" and "dove", we plan to move all of them into the mach-mvebu directory in the future. - socfpga is Altera's platform based on Cortex-A9 cores and a lot of FPGA space. This is similar to the Xilinx zynq platform we already support. The code is particularly clean, which is helped by the fact that the hardware doesn't do much besides the parts that are expected to get added in the FPGA. - The OMAP subarchitecture gains support for the latest generation, the OMAP5 based on the new Cortex-A15 core. Support is rather rudimentary for now, but will be extended in the future. * tag 'newsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (25 commits) ARM: socfpga: initial support for Altera's SOCFPGA platform arm: mvebu: generate DTBs for supported SoCs ARM: mvebu: MPIC: read number of interrupts from control register arm: mach-mvebu: add entry to MAINTAINERS arm: mach-mvebu: add compilation/configuration change arm: mach-mvebu: add defconfig arm: mach-mvebu: add documentation for new device tree bindings arm: mach-mvebu: add support for Armada 370 and Armada XP with DT arm: mach-mvebu: add source files arm: mach-mvebu: add header clocksource: time-armada-370-xp: Marvell Armada 370/XP SoC timer driver ARM: Kconfig update to support additional GPIOs in OMAP5 ARM: OMAP5: Add the build support arm/dts: OMAP5: Add omap5 dts files ARM: OMAP5: board-generic: Add device tree support ARM: omap2+: board-generic: clean up the irq data from board file ARM: OMAP5: Add SMP support ARM: OMAP5: Add the WakeupGen IP updates ARM: OMAP5: l3: Add l3 error handler support for omap5 ARM: OMAP5: gpmc: Update gpmc_init() ... Conflicts: Documentation/devicetree/bindings/arm/omap/omap.txt arch/arm/mach-omap2/Makefile drivers/clocksource/Kconfig drivers/clocksource/Makefile
-rw-r--r--Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt23
-rw-r--r--Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt11
-rw-r--r--Documentation/devicetree/bindings/arm/armada-370-xp.txt24
-rw-r--r--Documentation/devicetree/bindings/arm/mvebu-system-controller.txt17
-rw-r--r--Documentation/devicetree/bindings/arm/omap/omap.txt3
-rw-r--r--MAINTAINERS18
-rw-r--r--arch/arm/Kconfig34
-rw-r--r--arch/arm/Makefile2
-rw-r--r--arch/arm/boot/dts/armada-370-db.dts42
-rw-r--r--arch/arm/boot/dts/armada-370-xp.dtsi68
-rw-r--r--arch/arm/boot/dts/armada-370.dtsi35
-rw-r--r--arch/arm/boot/dts/armada-xp-db.dts50
-rw-r--r--arch/arm/boot/dts/armada-xp.dtsi55
-rw-r--r--arch/arm/boot/dts/omap5-evm.dts20
-rw-r--r--arch/arm/boot/dts/omap5.dtsi184
-rw-r--r--arch/arm/boot/dts/socfpga.dtsi147
-rw-r--r--arch/arm/boot/dts/socfpga_cyclone5.dts34
-rw-r--r--arch/arm/configs/mvebu_defconfig46
-rw-r--r--arch/arm/configs/omap2plus_defconfig1
-rw-r--r--arch/arm/configs/socfpga_defconfig83
-rw-r--r--arch/arm/mach-mvebu/Kconfig16
-rw-r--r--arch/arm/mach-mvebu/Makefile2
-rw-r--r--arch/arm/mach-mvebu/Makefile.boot3
-rw-r--r--arch/arm/mach-mvebu/armada-370-xp.c63
-rw-r--r--arch/arm/mach-mvebu/common.h23
-rw-r--r--arch/arm/mach-mvebu/include/mach/armada-370-xp.h22
-rw-r--r--arch/arm/mach-mvebu/include/mach/debug-macro.S24
-rw-r--r--arch/arm/mach-mvebu/include/mach/timex.h13
-rw-r--r--arch/arm/mach-mvebu/include/mach/uncompress.h43
-rw-r--r--arch/arm/mach-mvebu/irq-armada-370-xp.c133
-rw-r--r--arch/arm/mach-mvebu/system-controller.c105
-rw-r--r--arch/arm/mach-omap2/Kconfig8
-rw-r--r--arch/arm/mach-omap2/Makefile24
-rw-r--r--arch/arm/mach-omap2/board-generic.c42
-rw-r--r--arch/arm/mach-omap2/common.c24
-rw-r--r--arch/arm/mach-omap2/common.h19
-rw-r--r--arch/arm/mach-omap2/control.h4
-rw-r--r--arch/arm/mach-omap2/devices.c2
-rw-r--r--arch/arm/mach-omap2/gpmc.c3
-rw-r--r--arch/arm/mach-omap2/id.c42
-rw-r--r--arch/arm/mach-omap2/include/mach/debug-macro.S8
-rw-r--r--arch/arm/mach-omap2/include/mach/omap-wakeupgen.h7
-rw-r--r--arch/arm/mach-omap2/io.c44
-rw-r--r--arch/arm/mach-omap2/iomap.h27
-rw-r--r--arch/arm/mach-omap2/irq.c13
-rw-r--r--arch/arm/mach-omap2/omap-headsmp.S21
-rw-r--r--arch/arm/mach-omap2/omap-hotplug.c24
-rw-r--r--arch/arm/mach-omap2/omap-smp.c52
-rw-r--r--arch/arm/mach-omap2/omap-wakeupgen.c114
-rw-r--r--arch/arm/mach-omap2/omap4-common.c14
-rw-r--r--arch/arm/mach-omap2/omap4-sar-layout.h12
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c2
-rw-r--r--arch/arm/mach-omap2/omap_l3_noc.h22
-rw-r--r--arch/arm/mach-omap2/prcm-common.h2
-rw-r--r--arch/arm/mach-omap2/prcm.c2
-rw-r--r--arch/arm/mach-omap2/timer.c5
-rw-r--r--arch/arm/mach-socfpga/Makefile5
-rw-r--r--arch/arm/mach-socfpga/Makefile.boot1
-rw-r--r--arch/arm/mach-socfpga/include/mach/debug-macro.S16
-rw-r--r--arch/arm/mach-socfpga/include/mach/timex.h19
-rw-r--r--arch/arm/mach-socfpga/include/mach/uncompress.h9
-rw-r--r--arch/arm/mach-socfpga/socfpga.c62
-rw-r--r--arch/arm/plat-omap/Kconfig4
-rw-r--r--arch/arm/plat-omap/common.c9
-rw-r--r--arch/arm/plat-omap/counter_32k.c16
-rw-r--r--arch/arm/plat-omap/include/plat/cpu.h22
-rw-r--r--arch/arm/plat-omap/include/plat/hardware.h1
-rw-r--r--arch/arm/plat-omap/include/plat/multi.h9
-rw-r--r--arch/arm/plat-omap/include/plat/omap-secure.h5
-rw-r--r--arch/arm/plat-omap/include/plat/omap54xx.h32
-rw-r--r--arch/arm/plat-omap/include/plat/serial.h10
-rw-r--r--arch/arm/plat-omap/include/plat/uncompress.h6
-rw-r--r--arch/arm/plat-omap/sram.c11
-rw-r--r--drivers/clk/Makefile1
-rw-r--r--drivers/clk/socfpga/Makefile1
-rw-r--r--drivers/clk/socfpga/clk.c51
-rw-r--r--drivers/clocksource/Kconfig3
-rw-r--r--drivers/clocksource/Makefile3
-rw-r--r--drivers/clocksource/time-armada-370-xp.c226
-rw-r--r--include/linux/dw_apb_timer.h1
-rw-r--r--include/linux/time-armada-370-xp.h18
81 files changed, 2323 insertions, 99 deletions
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt
new file mode 100644
index 000000000000..70c0dc5f00ed
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt
@@ -0,0 +1,23 @@
1Marvell Armada 370 and Armada XP Interrupt Controller
2-----------------------------------------------------
3
4Required properties:
5- compatible: Should be "marvell,mpic"
6- interrupt-controller: Identifies the node as an interrupt controller.
7- #interrupt-cells: The number of cells to define the interrupts. Should be 1.
8 The cell is the IRQ number
9- reg: Should contain PMIC registers location and length. First pair
10 for the main interrupt registers, second pair for the per-CPU
11 interrupt registers
12
13Example:
14
15 mpic: interrupt-controller@d0020000 {
16 compatible = "marvell,mpic";
17 #interrupt-cells = <1>;
18 #address-cells = <1>;
19 #size-cells = <1>;
20 interrupt-controller;
21 reg = <0xd0020000 0x1000>,
22 <0xd0021000 0x1000>;
23 };
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt
new file mode 100644
index 000000000000..8b6ea2267c94
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt
@@ -0,0 +1,11 @@
1Marvell Armada 370 and Armada XP Global Timers
2----------------------------------------------
3
4Required properties:
5- compatible: Should be "marvell,armada-370-xp-timer"
6- interrupts: Should contain the list of Global Timer interrupts
7- reg: Should contain the base address of the Global Timer registers
8
9Optional properties:
10- marvell,timer-25Mhz: Tells whether the Global timer supports the 25
11 Mhz fixed mode (available on Armada XP and not on Armada 370)
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp.txt b/Documentation/devicetree/bindings/arm/armada-370-xp.txt
new file mode 100644
index 000000000000..c6ed90ea6e17
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/armada-370-xp.txt
@@ -0,0 +1,24 @@
1Marvell Armada 370 and Armada XP Platforms Device Tree Bindings
2---------------------------------------------------------------
3
4Boards with a SoC of the Marvell Armada 370 and Armada XP families
5shall have the following property:
6
7Required root node property:
8
9compatible: must contain "marvell,armada-370-xp"
10
11In addition, boards using the Marvell Armada 370 SoC shall have the
12following property:
13
14Required root node property:
15
16compatible: must contain "marvell,armada370"
17
18In addition, boards using the Marvell Armada XP SoC shall have the
19following property:
20
21Required root node property:
22
23compatible: must contain "marvell,armadaxp"
24
diff --git a/Documentation/devicetree/bindings/arm/mvebu-system-controller.txt b/Documentation/devicetree/bindings/arm/mvebu-system-controller.txt
new file mode 100644
index 000000000000..081c6a786c8a
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mvebu-system-controller.txt
@@ -0,0 +1,17 @@
1MVEBU System Controller
2-----------------------
3MVEBU (Marvell SOCs: Armada 370/XP, Dove, mv78xx0, Kirkwood, Orion5x)
4
5Required properties:
6
7- compatible: one of:
8 - "marvell,orion-system-controller"
9 - "marvell,armada-370-xp-system-controller"
10- reg: Should contain system controller registers location and length.
11
12Example:
13
14 system-controller@d0018200 {
15 compatible = "marvell,armada-370-xp-system-controller";
16 reg = <0xd0018200 0x500>;
17 };
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
index f186167dba9e..ccdd0e53451f 100644
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -50,3 +50,6 @@ Boards:
50 50
51- AM335X Bone : Low cost community board 51- AM335X Bone : Low cost community board
52 compatible = "ti,am335x-bone", "ti,am33xx", "ti,omap3" 52 compatible = "ti,am335x-bone", "ti,am33xx", "ti,omap3"
53
54- OMAP5 EVM : Evaluation Module
55 compatible = "ti,omap5-evm", "ti,omap5"
diff --git a/MAINTAINERS b/MAINTAINERS
index fe643e7b9df6..fe2fa33e2831 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -894,6 +894,14 @@ ARM/MAGICIAN MACHINE SUPPORT
894M: Philipp Zabel <philipp.zabel@gmail.com> 894M: Philipp Zabel <philipp.zabel@gmail.com>
895S: Maintained 895S: Maintained
896 896
897ARM/Marvell Armada 370 and Armada XP SOC support
898M: Jason Cooper <jason@lakedaemon.net>
899M: Andrew Lunn <andrew@lunn.ch>
900M: Gregory Clement <gregory.clement@free-electrons.com>
901L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
902S: Maintained
903F: arch/arm/mach-mvebu/
904
897ARM/Marvell Dove/Kirkwood/MV78xx0/Orion SOC support 905ARM/Marvell Dove/Kirkwood/MV78xx0/Orion SOC support
898M: Jason Cooper <jason@lakedaemon.net> 906M: Jason Cooper <jason@lakedaemon.net>
899M: Andrew Lunn <andrew@lunn.ch> 907M: Andrew Lunn <andrew@lunn.ch>
@@ -1103,6 +1111,16 @@ S: Supported
1103F: arch/arm/mach-shmobile/ 1111F: arch/arm/mach-shmobile/
1104F: drivers/sh/ 1112F: drivers/sh/
1105 1113
1114ARM/SOCFPGA ARCHITECTURE
1115M: Dinh Nguyen <dinguyen@altera.com>
1116S: Maintained
1117F: arch/arm/mach-socfpga/
1118
1119ARM/SOCFPGA CLOCK FRAMEWORK SUPPORT
1120M: Dinh Nguyen <dinguyen@altera.com>
1121S: Maintained
1122F: drivers/clk/socfpga/
1123
1106ARM/TECHNOLOGIC SYSTEMS TS7250 MACHINE SUPPORT 1124ARM/TECHNOLOGIC SYSTEMS TS7250 MACHINE SUPPORT
1107M: Lennert Buytenhek <kernel@wantstofly.org> 1125M: Lennert Buytenhek <kernel@wantstofly.org>
1108L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 1126L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5dbb9562742c..b16396216896 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -250,6 +250,25 @@ choice
250 prompt "ARM system type" 250 prompt "ARM system type"
251 default ARCH_VERSATILE 251 default ARCH_VERSATILE
252 252
253config ARCH_SOCFPGA
254 bool "Altera SOCFPGA family"
255 select ARCH_WANT_OPTIONAL_GPIOLIB
256 select ARM_AMBA
257 select ARM_GIC
258 select CACHE_L2X0
259 select CLKDEV_LOOKUP
260 select COMMON_CLK
261 select CPU_V7
262 select DW_APB_TIMER
263 select DW_APB_TIMER_OF
264 select GENERIC_CLOCKEVENTS
265 select GPIO_PL061 if GPIOLIB
266 select HAVE_ARM_SCU
267 select SPARSE_IRQ
268 select USE_OF
269 help
270 This enables support for Altera SOCFPGA Cyclone V platform
271
253config ARCH_INTEGRATOR 272config ARCH_INTEGRATOR
254 bool "ARM Ltd. Integrator family" 273 bool "ARM Ltd. Integrator family"
255 select ARM_AMBA 274 select ARM_AMBA
@@ -537,6 +556,18 @@ config ARCH_IXP4XX
537 help 556 help
538 Support for Intel's IXP4XX (XScale) family of processors. 557 Support for Intel's IXP4XX (XScale) family of processors.
539 558
559config ARCH_MVEBU
560 bool "Marvell SOCs with Device Tree support"
561 select GENERIC_CLOCKEVENTS
562 select MULTI_IRQ_HANDLER
563 select SPARSE_IRQ
564 select CLKSRC_MMIO
565 select GENERIC_IRQ_CHIP
566 select IRQ_DOMAIN
567 select COMMON_CLK
568 help
569 Support for the Marvell SoC Family with device tree support
570
540config ARCH_DOVE 571config ARCH_DOVE
541 bool "Marvell Dove" 572 bool "Marvell Dove"
542 select CPU_V7 573 select CPU_V7
@@ -994,6 +1025,8 @@ endchoice
994# Kconfigs may be included either alphabetically (according to the 1025# Kconfigs may be included either alphabetically (according to the
995# plat- suffix) or along side the corresponding mach-* source. 1026# plat- suffix) or along side the corresponding mach-* source.
996# 1027#
1028source "arch/arm/mach-mvebu/Kconfig"
1029
997source "arch/arm/mach-at91/Kconfig" 1030source "arch/arm/mach-at91/Kconfig"
998 1031
999source "arch/arm/mach-bcmring/Kconfig" 1032source "arch/arm/mach-bcmring/Kconfig"
@@ -1586,6 +1619,7 @@ config ARCH_NR_GPIO
1586 default 1024 if ARCH_SHMOBILE || ARCH_TEGRA 1619 default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
1587 default 355 if ARCH_U8500 1620 default 355 if ARCH_U8500
1588 default 264 if MACH_H4700 1621 default 264 if MACH_H4700
1622 default 512 if SOC_OMAP5
1589 default 0 1623 default 0
1590 help 1624 help
1591 Maximum number of GPIOs in the system. 1625 Maximum number of GPIOs in the system.
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 0298b00fe241..4d6d31115cf2 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -157,6 +157,7 @@ machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0
157machine-$(CONFIG_ARCH_IMX_V4_V5) := imx 157machine-$(CONFIG_ARCH_IMX_V4_V5) := imx
158machine-$(CONFIG_ARCH_IMX_V6_V7) := imx 158machine-$(CONFIG_ARCH_IMX_V6_V7) := imx
159machine-$(CONFIG_ARCH_MXS) := mxs 159machine-$(CONFIG_ARCH_MXS) := mxs
160machine-$(CONFIG_ARCH_MVEBU) := mvebu
160machine-$(CONFIG_ARCH_NETX) := netx 161machine-$(CONFIG_ARCH_NETX) := netx
161machine-$(CONFIG_ARCH_NOMADIK) := nomadik 162machine-$(CONFIG_ARCH_NOMADIK) := nomadik
162machine-$(CONFIG_ARCH_OMAP1) := omap1 163machine-$(CONFIG_ARCH_OMAP1) := omap1
@@ -186,6 +187,7 @@ machine-$(CONFIG_ARCH_VEXPRESS) := vexpress
186machine-$(CONFIG_ARCH_VT8500) := vt8500 187machine-$(CONFIG_ARCH_VT8500) := vt8500
187machine-$(CONFIG_ARCH_W90X900) := w90x900 188machine-$(CONFIG_ARCH_W90X900) := w90x900
188machine-$(CONFIG_FOOTBRIDGE) := footbridge 189machine-$(CONFIG_FOOTBRIDGE) := footbridge
190machine-$(CONFIG_ARCH_SOCFPGA) := socfpga
189machine-$(CONFIG_MACH_SPEAR1310) := spear13xx 191machine-$(CONFIG_MACH_SPEAR1310) := spear13xx
190machine-$(CONFIG_MACH_SPEAR1340) := spear13xx 192machine-$(CONFIG_MACH_SPEAR1340) := spear13xx
191machine-$(CONFIG_MACH_SPEAR300) := spear3xx 193machine-$(CONFIG_MACH_SPEAR300) := spear3xx
diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts
new file mode 100644
index 000000000000..fffd5c2a3041
--- /dev/null
+++ b/arch/arm/boot/dts/armada-370-db.dts
@@ -0,0 +1,42 @@
1/*
2 * Device Tree file for Marvell Armada 370 evaluation board
3 * (DB-88F6710-BP-DDR3)
4 *
5 * Copyright (C) 2012 Marvell
6 *
7 * Lior Amsalem <alior@marvell.com>
8 * Gregory CLEMENT <gregory.clement@free-electrons.com>
9 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10 *
11 * This file is licensed under the terms of the GNU General Public
12 * License version 2. This program is licensed "as is" without any
13 * warranty of any kind, whether express or implied.
14 */
15
16/dts-v1/;
17/include/ "armada-370.dtsi"
18
19/ {
20 model = "Marvell Armada 370 Evaluation Board";
21 compatible = "marvell,a370-db", "marvell,armada370", "marvell,armada-370-xp";
22
23 chosen {
24 bootargs = "console=ttyS0,115200 earlyprintk";
25 };
26
27 memory {
28 device_type = "memory";
29 reg = <0x00000000 0x20000000>; /* 512 MB */
30 };
31
32 soc {
33 serial@d0012000 {
34 clock-frequency = <200000000>;
35 status = "okay";
36 };
37 timer@d0020300 {
38 clock-frequency = <600000000>;
39 status = "okay";
40 };
41 };
42};
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
new file mode 100644
index 000000000000..6b6b932a5a7d
--- /dev/null
+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
@@ -0,0 +1,68 @@
1/*
2 * Device Tree Include file for Marvell Armada 370 and Armada XP SoC
3 *
4 * Copyright (C) 2012 Marvell
5 *
6 * Lior Amsalem <alior@marvell.com>
7 * Gregory CLEMENT <gregory.clement@free-electrons.com>
8 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 * Ben Dooks <ben.dooks@codethink.co.uk>
10 *
11 * This file is licensed under the terms of the GNU General Public
12 * License version 2. This program is licensed "as is" without any
13 * warranty of any kind, whether express or implied.
14 *
15 * This file contains the definitions that are common to the Armada
16 * 370 and Armada XP SoC.
17 */
18
19/include/ "skeleton.dtsi"
20
21/ {
22 model = "Marvell Armada 370 and XP SoC";
23 compatible = "marvell,armada_370_xp";
24
25 cpus {
26 cpu@0 {
27 compatible = "marvell,sheeva-v7";
28 };
29 };
30
31 mpic: interrupt-controller@d0020000 {
32 compatible = "marvell,mpic";
33 #interrupt-cells = <1>;
34 #address-cells = <1>;
35 #size-cells = <1>;
36 interrupt-controller;
37 };
38
39 soc {
40 #address-cells = <1>;
41 #size-cells = <1>;
42 compatible = "simple-bus";
43 interrupt-parent = <&mpic>;
44 ranges;
45
46 serial@d0012000 {
47 compatible = "ns16550";
48 reg = <0xd0012000 0x100>;
49 reg-shift = <2>;
50 interrupts = <41>;
51 status = "disabled";
52 };
53 serial@d0012100 {
54 compatible = "ns16550";
55 reg = <0xd0012100 0x100>;
56 reg-shift = <2>;
57 interrupts = <42>;
58 status = "disabled";
59 };
60
61 timer@d0020300 {
62 compatible = "marvell,armada-370-xp-timer";
63 reg = <0xd0020300 0x30>;
64 interrupts = <37>, <38>, <39>, <40>;
65 };
66 };
67};
68
diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi
new file mode 100644
index 000000000000..3228ccc83332
--- /dev/null
+++ b/arch/arm/boot/dts/armada-370.dtsi
@@ -0,0 +1,35 @@
1/*
2 * Device Tree Include file for Marvell Armada 370 family SoC
3 *
4 * Copyright (C) 2012 Marvell
5 *
6 * Lior Amsalem <alior@marvell.com>
7 * Gregory CLEMENT <gregory.clement@free-electrons.com>
8 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 *
14 * Contains definitions specific to the Armada 370 SoC that are not
15 * common to all Armada SoCs.
16 */
17
18/include/ "armada-370-xp.dtsi"
19
20/ {
21 model = "Marvell Armada 370 family SoC";
22 compatible = "marvell,armada370", "marvell,armada-370-xp";
23
24 mpic: interrupt-controller@d0020000 {
25 reg = <0xd0020a00 0x1d0>,
26 <0xd0021870 0x58>;
27 };
28
29 soc {
30 system-controller@d0018200 {
31 compatible = "marvell,armada-370-xp-system-controller";
32 reg = <0xd0018200 0x100>;
33 };
34 };
35};
diff --git a/arch/arm/boot/dts/armada-xp-db.dts b/arch/arm/boot/dts/armada-xp-db.dts
new file mode 100644
index 000000000000..f97040d4258d
--- /dev/null
+++ b/arch/arm/boot/dts/armada-xp-db.dts
@@ -0,0 +1,50 @@
1/*
2 * Device Tree file for Marvell Armada XP evaluation board
3 * (DB-78460-BP)
4 *
5 * Copyright (C) 2012 Marvell
6 *
7 * Lior Amsalem <alior@marvell.com>
8 * Gregory CLEMENT <gregory.clement@free-electrons.com>
9 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10 *
11 * This file is licensed under the terms of the GNU General Public
12 * License version 2. This program is licensed "as is" without any
13 * warranty of any kind, whether express or implied.
14 */
15
16/dts-v1/;
17/include/ "armada-xp.dtsi"
18
19/ {
20 model = "Marvell Armada XP Evaluation Board";
21 compatible = "marvell,axp-db", "marvell,armadaxp", "marvell,armada-370-xp";
22
23 chosen {
24 bootargs = "console=ttyS0,115200 earlyprintk";
25 };
26
27 memory {
28 device_type = "memory";
29 reg = <0x00000000 0x80000000>; /* 2 GB */
30 };
31
32 soc {
33 serial@d0012000 {
34 clock-frequency = <250000000>;
35 status = "okay";
36 };
37 serial@d0012100 {
38 clock-frequency = <250000000>;
39 status = "okay";
40 };
41 serial@d0012200 {
42 clock-frequency = <250000000>;
43 status = "okay";
44 };
45 serial@d0012300 {
46 clock-frequency = <250000000>;
47 status = "okay";
48 };
49 };
50};
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi
new file mode 100644
index 000000000000..e1fa7e6edfe8
--- /dev/null
+++ b/arch/arm/boot/dts/armada-xp.dtsi
@@ -0,0 +1,55 @@
1/*
2 * Device Tree Include file for Marvell Armada XP family SoC
3 *
4 * Copyright (C) 2012 Marvell
5 *
6 * Lior Amsalem <alior@marvell.com>
7 * Gregory CLEMENT <gregory.clement@free-electrons.com>
8 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 * Ben Dooks <ben.dooks@codethink.co.uk>
10 *
11 * This file is licensed under the terms of the GNU General Public
12 * License version 2. This program is licensed "as is" without any
13 * warranty of any kind, whether express or implied.
14 *
15 * Contains definitions specific to the Armada 370 SoC that are not
16 * common to all Armada SoCs.
17 */
18
19/include/ "armada-370-xp.dtsi"
20
21/ {
22 model = "Marvell Armada XP family SoC";
23 compatible = "marvell,armadaxp", "marvell,armada-370-xp";
24
25 mpic: interrupt-controller@d0020000 {
26 reg = <0xd0020a00 0x1d0>,
27 <0xd0021870 0x58>;
28 };
29
30 soc {
31 serial@d0012200 {
32 compatible = "ns16550";
33 reg = <0xd0012200 0x100>;
34 reg-shift = <2>;
35 interrupts = <43>;
36 status = "disabled";
37 };
38 serial@d0012300 {
39 compatible = "ns16550";
40 reg = <0xd0012300 0x100>;
41 reg-shift = <2>;
42 interrupts = <44>;
43 status = "disabled";
44 };
45
46 timer@d0020300 {
47 marvell,timer-25Mhz;
48 };
49
50 system-controller@d0018200 {
51 compatible = "marvell,armada-370-xp-system-controller";
52 reg = <0xd0018200 0x500>;
53 };
54 };
55};
diff --git a/arch/arm/boot/dts/omap5-evm.dts b/arch/arm/boot/dts/omap5-evm.dts
new file mode 100644
index 000000000000..200c39ad1c82
--- /dev/null
+++ b/arch/arm/boot/dts/omap5-evm.dts
@@ -0,0 +1,20 @@
1/*
2 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
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/dts-v1/;
9
10/include/ "omap5.dtsi"
11
12/ {
13 model = "TI OMAP5 EVM board";
14 compatible = "ti,omap5-evm", "ti,omap5";
15
16 memory {
17 device_type = "memory";
18 reg = <0x80000000 0x40000000>; /* 1 GB */
19 };
20};
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
new file mode 100644
index 000000000000..57e527083746
--- /dev/null
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -0,0 +1,184 @@
1/*
2 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
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 * Based on "omap4.dtsi"
8 */
9
10/*
11 * Carveout for multimedia usecases
12 * It should be the last 48MB of the first 512MB memory part
13 * In theory, it should not even exist. That zone should be reserved
14 * dynamically during the .reserve callback.
15 */
16/memreserve/ 0x9d000000 0x03000000;
17
18/include/ "skeleton.dtsi"
19
20/ {
21 compatible = "ti,omap5";
22 interrupt-parent = <&gic>;
23
24 aliases {
25 serial0 = &uart1;
26 serial1 = &uart2;
27 serial2 = &uart3;
28 serial3 = &uart4;
29 serial4 = &uart5;
30 serial5 = &uart6;
31 };
32
33 cpus {
34 cpu@0 {
35 compatible = "arm,cortex-a15";
36 };
37 cpu@1 {
38 compatible = "arm,cortex-a15";
39 };
40 };
41
42 /*
43 * The soc node represents the soc top level view. It is uses for IPs
44 * that are not memory mapped in the MPU view or for the MPU itself.
45 */
46 soc {
47 compatible = "ti,omap-infra";
48 mpu {
49 compatible = "ti,omap5-mpu";
50 ti,hwmods = "mpu";
51 };
52 };
53
54 /*
55 * XXX: Use a flat representation of the OMAP3 interconnect.
56 * The real OMAP interconnect network is quite complex.
57 * Since that will not bring real advantage to represent that in DT for
58 * the moment, just use a fake OCP bus entry to represent the whole bus
59 * hierarchy.
60 */
61 ocp {
62 compatible = "ti,omap4-l3-noc", "simple-bus";
63 #address-cells = <1>;
64 #size-cells = <1>;
65 ranges;
66 ti,hwmods = "l3_main_1", "l3_main_2", "l3_main_3";
67
68 gic: interrupt-controller@48211000 {
69 compatible = "arm,cortex-a15-gic";
70 interrupt-controller;
71 #interrupt-cells = <3>;
72 reg = <0x48211000 0x1000>,
73 <0x48212000 0x1000>;
74 };
75
76 gpio1: gpio@4ae10000 {
77 compatible = "ti,omap4-gpio";
78 ti,hwmods = "gpio1";
79 gpio-controller;
80 #gpio-cells = <2>;
81 interrupt-controller;
82 #interrupt-cells = <1>;
83 };
84
85 gpio2: gpio@48055000 {
86 compatible = "ti,omap4-gpio";
87 ti,hwmods = "gpio2";
88 gpio-controller;
89 #gpio-cells = <2>;
90 interrupt-controller;
91 #interrupt-cells = <1>;
92 };
93
94 gpio3: gpio@48057000 {
95 compatible = "ti,omap4-gpio";
96 ti,hwmods = "gpio3";
97 gpio-controller;
98 #gpio-cells = <2>;
99 interrupt-controller;
100 #interrupt-cells = <1>;
101 };
102
103 gpio4: gpio@48059000 {
104 compatible = "ti,omap4-gpio";
105 ti,hwmods = "gpio4";
106 gpio-controller;
107 #gpio-cells = <2>;
108 interrupt-controller;
109 #interrupt-cells = <1>;
110 };
111
112 gpio5: gpio@4805b000 {
113 compatible = "ti,omap4-gpio";
114 ti,hwmods = "gpio5";
115 gpio-controller;
116 #gpio-cells = <2>;
117 interrupt-controller;
118 #interrupt-cells = <1>;
119 };
120
121 gpio6: gpio@4805d000 {
122 compatible = "ti,omap4-gpio";
123 ti,hwmods = "gpio6";
124 gpio-controller;
125 #gpio-cells = <2>;
126 interrupt-controller;
127 #interrupt-cells = <1>;
128 };
129
130 gpio7: gpio@48051000 {
131 compatible = "ti,omap4-gpio";
132 ti,hwmods = "gpio7";
133 gpio-controller;
134 #gpio-cells = <2>;
135 interrupt-controller;
136 #interrupt-cells = <1>;
137 };
138
139 gpio8: gpio@48053000 {
140 compatible = "ti,omap4-gpio";
141 ti,hwmods = "gpio8";
142 gpio-controller;
143 #gpio-cells = <2>;
144 interrupt-controller;
145 #interrupt-cells = <1>;
146 };
147
148 uart1: serial@4806a000 {
149 compatible = "ti,omap4-uart";
150 ti,hwmods = "uart1";
151 clock-frequency = <48000000>;
152 };
153
154 uart2: serial@4806c000 {
155 compatible = "ti,omap4-uart";
156 ti,hwmods = "uart2";
157 clock-frequency = <48000000>;
158 };
159
160 uart3: serial@48020000 {
161 compatible = "ti,omap4-uart";
162 ti,hwmods = "uart3";
163 clock-frequency = <48000000>;
164 };
165
166 uart4: serial@4806e000 {
167 compatible = "ti,omap4-uart";
168 ti,hwmods = "uart4";
169 clock-frequency = <48000000>;
170 };
171
172 uart5: serial@48066000 {
173 compatible = "ti,omap5-uart";
174 ti,hwmods = "uart5";
175 clock-frequency = <48000000>;
176 };
177
178 uart6: serial@48068000 {
179 compatible = "ti,omap6-uart";
180 ti,hwmods = "uart6";
181 clock-frequency = <48000000>;
182 };
183 };
184};
diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi
new file mode 100644
index 000000000000..0772f5739f59
--- /dev/null
+++ b/arch/arm/boot/dts/socfpga.dtsi
@@ -0,0 +1,147 @@
1/*
2 * Copyright (C) 2012 Altera <www.altera.com>
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, see <http://www.gnu.org/licenses/>.
16 */
17
18/include/ "skeleton.dtsi"
19
20/ {
21 #address-cells = <1>;
22 #size-cells = <1>;
23
24 aliases {
25 ethernet0 = &gmac0;
26 serial0 = &uart0;
27 serial1 = &uart1;
28 };
29
30 cpus {
31 #address-cells = <1>;
32 #size-cells = <0>;
33
34 cpu@0 {
35 compatible = "arm,cortex-a9";
36 device_type = "cpu";
37 reg = <0>;
38 next-level-cache = <&L2>;
39 };
40 cpu@1 {
41 compatible = "arm,cortex-a9";
42 device_type = "cpu";
43 reg = <1>;
44 next-level-cache = <&L2>;
45 };
46 };
47
48 intc: intc@fffed000 {
49 compatible = "arm,cortex-a9-gic";
50 #interrupt-cells = <3>;
51 interrupt-controller;
52 reg = <0xfffed000 0x1000>,
53 <0xfffec100 0x100>;
54 };
55
56 soc {
57 #address-cells = <1>;
58 #size-cells = <1>;
59 compatible = "simple-bus";
60 device_type = "soc";
61 interrupt-parent = <&intc>;
62 ranges;
63
64 amba {
65 compatible = "arm,amba-bus";
66 #address-cells = <1>;
67 #size-cells = <1>;
68 ranges;
69
70 pdma: pdma@ffe01000 {
71 compatible = "arm,pl330", "arm,primecell";
72 reg = <0xffe01000 0x1000>;
73 interrupts = <0 180 4>;
74 };
75 };
76
77 gmac0: stmmac@ff700000 {
78 compatible = "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,dwmac";
79 reg = <0xff700000 0x2000>;
80 interrupts = <0 115 4>;
81 interrupt-names = "macirq";
82 mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */
83 phy-mode = "gmii";
84 };
85
86 L2: l2-cache@fffef000 {
87 compatible = "arm,pl310-cache";
88 reg = <0xfffef000 0x1000>;
89 interrupts = <0 38 0x04>;
90 cache-unified;
91 cache-level = <2>;
92 };
93
94 /* Local timer */
95 timer@fffec600 {
96 compatible = "arm,cortex-a9-twd-timer";
97 reg = <0xfffec600 0x100>;
98 interrupts = <1 13 0xf04>;
99 };
100
101 timer0: timer@ffc08000 {
102 compatible = "snps,dw-apb-timer-sp";
103 interrupts = <0 167 4>;
104 clock-frequency = <200000000>;
105 reg = <0xffc08000 0x1000>;
106 };
107
108 timer1: timer@ffc09000 {
109 compatible = "snps,dw-apb-timer-sp";
110 interrupts = <0 168 4>;
111 clock-frequency = <200000000>;
112 reg = <0xffc09000 0x1000>;
113 };
114
115 timer2: timer@ffd00000 {
116 compatible = "snps,dw-apb-timer-osc";
117 interrupts = <0 169 4>;
118 clock-frequency = <200000000>;
119 reg = <0xffd00000 0x1000>;
120 };
121
122 timer3: timer@ffd01000 {
123 compatible = "snps,dw-apb-timer-osc";
124 interrupts = <0 170 4>;
125 clock-frequency = <200000000>;
126 reg = <0xffd01000 0x1000>;
127 };
128
129 uart0: uart@ffc02000 {
130 compatible = "snps,dw-apb-uart";
131 reg = <0xffc02000 0x1000>;
132 clock-frequency = <7372800>;
133 interrupts = <0 162 4>;
134 reg-shift = <2>;
135 reg-io-width = <4>;
136 };
137
138 uart1: uart@ffc03000 {
139 compatible = "snps,dw-apb-uart";
140 reg = <0xffc03000 0x1000>;
141 clock-frequency = <7372800>;
142 interrupts = <0 163 4>;
143 reg-shift = <2>;
144 reg-io-width = <4>;
145 };
146 };
147};
diff --git a/arch/arm/boot/dts/socfpga_cyclone5.dts b/arch/arm/boot/dts/socfpga_cyclone5.dts
new file mode 100644
index 000000000000..ab7e4a94299f
--- /dev/null
+++ b/arch/arm/boot/dts/socfpga_cyclone5.dts
@@ -0,0 +1,34 @@
1/*
2 * Copyright (C) 2012 Altera Corporation <www.altera.com>
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, see <http://www.gnu.org/licenses/>.
16 */
17
18/dts-v1/;
19/include/ "socfpga.dtsi"
20
21/ {
22 model = "Altera SOCFPGA Cyclone V";
23 compatible = "altr,socfpga-cyclone5";
24
25 chosen {
26 bootargs = "console=ttyS0,57600";
27 };
28
29 memory {
30 name = "memory";
31 device_type = "memory";
32 reg = <0x0 0x10000000>; /* 256MB */
33 };
34};
diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig
new file mode 100644
index 000000000000..2e86b31c33cf
--- /dev/null
+++ b/arch/arm/configs/mvebu_defconfig
@@ -0,0 +1,46 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y
3CONFIG_NO_HZ=y
4CONFIG_HIGH_RES_TIMERS=y
5CONFIG_LOG_BUF_SHIFT=14
6CONFIG_BLK_DEV_INITRD=y
7CONFIG_EXPERT=y
8CONFIG_SLAB=y
9CONFIG_MODULES=y
10CONFIG_MODULE_UNLOAD=y
11CONFIG_ARCH_MVEBU=y
12CONFIG_MACH_ARMADA_370_XP=y
13CONFIG_AEABI=y
14CONFIG_HIGHMEM=y
15CONFIG_USE_OF=y
16CONFIG_ZBOOT_ROM_TEXT=0x0
17CONFIG_ZBOOT_ROM_BSS=0x0
18CONFIG_ARM_APPENDED_DTB=y
19CONFIG_VFP=y
20CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
21CONFIG_SERIAL_8250=y
22CONFIG_SERIAL_8250_CONSOLE=y
23CONFIG_SERIAL_OF_PLATFORM=y
24CONFIG_EXT2_FS=y
25CONFIG_EXT3_FS=y
26# CONFIG_EXT3_FS_XATTR is not set
27CONFIG_ISO9660_FS=y
28CONFIG_JOLIET=y
29CONFIG_UDF_FS=m
30CONFIG_MSDOS_FS=y
31CONFIG_VFAT_FS=y
32CONFIG_TMPFS=y
33CONFIG_NLS_CODEPAGE_437=y
34CONFIG_NLS_CODEPAGE_850=y
35CONFIG_NLS_ISO8859_1=y
36CONFIG_NLS_ISO8859_2=y
37CONFIG_NLS_UTF8=y
38CONFIG_MAGIC_SYSRQ=y
39CONFIG_DEBUG_FS=y
40# CONFIG_SCHED_DEBUG is not set
41CONFIG_TIMER_STATS=y
42# CONFIG_DEBUG_BUGVERBOSE is not set
43CONFIG_DEBUG_INFO=y
44CONFIG_DEBUG_USER=y
45CONFIG_DEBUG_LL=y
46CONFIG_EARLY_PRINTK=y
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index d3c29b377af9..b152de79fd95 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -236,3 +236,4 @@ CONFIG_CRC_T10DIF=y
236CONFIG_CRC_ITU_T=y 236CONFIG_CRC_ITU_T=y
237CONFIG_CRC7=y 237CONFIG_CRC7=y
238CONFIG_LIBCRC32C=y 238CONFIG_LIBCRC32C=y
239CONFIG_SOC_OMAP5=y
diff --git a/arch/arm/configs/socfpga_defconfig b/arch/arm/configs/socfpga_defconfig
new file mode 100644
index 000000000000..0ac1293dba10
--- /dev/null
+++ b/arch/arm/configs/socfpga_defconfig
@@ -0,0 +1,83 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y
3CONFIG_IKCONFIG=y
4CONFIG_IKCONFIG_PROC=y
5CONFIG_LOG_BUF_SHIFT=14
6CONFIG_CGROUPS=y
7CONFIG_CPUSETS=y
8CONFIG_NAMESPACES=y
9CONFIG_EMBEDDED=y
10CONFIG_PROFILING=y
11CONFIG_OPROFILE=y
12CONFIG_MODULES=y
13CONFIG_MODULE_UNLOAD=y
14# CONFIG_LBDAF is not set
15# CONFIG_BLK_DEV_BSG is not set
16# CONFIG_IOSCHED_DEADLINE is not set
17# CONFIG_IOSCHED_CFQ is not set
18CONFIG_ARCH_SOCFPGA=y
19CONFIG_MACH_SOCFPGA_CYCLONE5=y
20CONFIG_ARM_THUMBEE=y
21# CONFIG_CACHE_L2X0 is not set
22CONFIG_HIGH_RES_TIMERS=y
23CONFIG_VMSPLIT_2G=y
24CONFIG_NR_CPUS=2
25CONFIG_AEABI=y
26CONFIG_ZBOOT_ROM_TEXT=0x0
27CONFIG_ZBOOT_ROM_BSS=0x0
28CONFIG_CMDLINE=""
29CONFIG_VFP=y
30CONFIG_NEON=y
31CONFIG_NET=y
32CONFIG_PACKET=y
33CONFIG_UNIX=y
34CONFIG_NET_KEY=y
35CONFIG_NET_KEY_MIGRATE=y
36CONFIG_INET=y
37CONFIG_IP_MULTICAST=y
38CONFIG_IP_PNP=y
39CONFIG_IP_PNP_DHCP=y
40CONFIG_IP_PNP_BOOTP=y
41CONFIG_IP_PNP_RARP=y
42CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
43CONFIG_DEVTMPFS=y
44CONFIG_PROC_DEVICETREE=y
45CONFIG_BLK_DEV_RAM=y
46CONFIG_BLK_DEV_RAM_COUNT=2
47CONFIG_BLK_DEV_RAM_SIZE=8192
48CONFIG_SCSI=y
49# CONFIG_SCSI_PROC_FS is not set
50CONFIG_BLK_DEV_SD=y
51# CONFIG_SCSI_LOWLEVEL is not set
52CONFIG_NETDEVICES=y
53CONFIG_STMMAC_ETH=y
54# CONFIG_STMMAC_PHY_ID_ZERO_WORKAROUND is not set
55CONFIG_INPUT_EVDEV=y
56# CONFIG_SERIO_SERPORT is not set
57CONFIG_SERIO_AMBAKMI=y
58CONFIG_LEGACY_PTY_COUNT=16
59CONFIG_SERIAL_8250=y
60CONFIG_SERIAL_8250_CONSOLE=y
61CONFIG_SERIAL_8250_NR_UARTS=2
62CONFIG_SERIAL_8250_RUNTIME_UARTS=2
63CONFIG_SERIAL_8250_DW=y
64# CONFIG_RTC_HCTOSYS is not set
65CONFIG_EXT2_FS=y
66CONFIG_EXT2_FS_XATTR=y
67CONFIG_EXT2_FS_POSIX_ACL=y
68# CONFIG_DNOTIFY is not set
69# CONFIG_INOTIFY_USER is not set
70CONFIG_VFAT_FS=y
71CONFIG_NTFS_FS=y
72CONFIG_NTFS_RW=y
73CONFIG_TMPFS=y
74CONFIG_JFFS2_FS=y
75CONFIG_NLS_CODEPAGE_437=y
76CONFIG_NLS_ISO8859_1=y
77CONFIG_MAGIC_SYSRQ=y
78CONFIG_DETECT_HUNG_TASK=y
79# CONFIG_SCHED_DEBUG is not set
80CONFIG_DEBUG_INFO=y
81CONFIG_ENABLE_DEFAULT_TRACERS=y
82CONFIG_DEBUG_USER=y
83CONFIG_XZ_DEC=y
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
new file mode 100644
index 000000000000..caa2c5e734fe
--- /dev/null
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -0,0 +1,16 @@
1if ARCH_MVEBU
2
3menu "Marvell SOC with device tree"
4
5config MACH_ARMADA_370_XP
6 bool "Marvell Armada 370 and Aramada XP boards"
7 select ARMADA_370_XP_TIMER
8 select CPU_V7
9 help
10
11 Say 'Y' here if you want your kernel to support boards based on
12 Marvell Armada 370 or Armada XP with device tree.
13
14endmenu
15
16endif
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
new file mode 100644
index 000000000000..e61d2b8fdf50
--- /dev/null
+++ b/arch/arm/mach-mvebu/Makefile
@@ -0,0 +1,2 @@
1obj-y += system-controller.o
2obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o irq-armada-370-xp.o
diff --git a/arch/arm/mach-mvebu/Makefile.boot b/arch/arm/mach-mvebu/Makefile.boot
new file mode 100644
index 000000000000..2579a2fc2334
--- /dev/null
+++ b/arch/arm/mach-mvebu/Makefile.boot
@@ -0,0 +1,3 @@
1zreladdr-y := 0x00008000
2dtb-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-db.dtb
3dtb-$(CONFIG_MACH_ARMADA_370_XP) += armada-xp-db.dtb
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c
new file mode 100644
index 000000000000..4ef923b032ec
--- /dev/null
+++ b/arch/arm/mach-mvebu/armada-370-xp.c
@@ -0,0 +1,63 @@
1/*
2 * Device Tree support for Armada 370 and XP platforms.
3 *
4 * Copyright (C) 2012 Marvell
5 *
6 * Lior Amsalem <alior@marvell.com>
7 * Gregory CLEMENT <gregory.clement@free-electrons.com>
8 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/of_platform.h>
18#include <linux/io.h>
19#include <linux/time-armada-370-xp.h>
20#include <asm/mach/arch.h>
21#include <asm/mach/map.h>
22#include <asm/mach/time.h>
23#include <mach/armada-370-xp.h>
24#include "common.h"
25
26static struct map_desc armada_370_xp_io_desc[] __initdata = {
27 {
28 .virtual = ARMADA_370_XP_REGS_VIRT_BASE,
29 .pfn = __phys_to_pfn(ARMADA_370_XP_REGS_PHYS_BASE),
30 .length = ARMADA_370_XP_REGS_SIZE,
31 .type = MT_DEVICE,
32 },
33};
34
35void __init armada_370_xp_map_io(void)
36{
37 iotable_init(armada_370_xp_io_desc, ARRAY_SIZE(armada_370_xp_io_desc));
38}
39
40struct sys_timer armada_370_xp_timer = {
41 .init = armada_370_xp_timer_init,
42};
43
44static void __init armada_370_xp_dt_init(void)
45{
46 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
47}
48
49static const char * const armada_370_xp_dt_board_dt_compat[] = {
50 "marvell,a370-db",
51 "marvell,axp-db",
52 NULL,
53};
54
55DT_MACHINE_START(ARMADA_XP_DT, "Marvell Aramada 370/XP (Device Tree)")
56 .init_machine = armada_370_xp_dt_init,
57 .map_io = armada_370_xp_map_io,
58 .init_irq = armada_370_xp_init_irq,
59 .handle_irq = armada_370_xp_handle_irq,
60 .timer = &armada_370_xp_timer,
61 .restart = mvebu_restart,
62 .dt_compat = armada_370_xp_dt_board_dt_compat,
63MACHINE_END
diff --git a/arch/arm/mach-mvebu/common.h b/arch/arm/mach-mvebu/common.h
new file mode 100644
index 000000000000..02f89eaa25fe
--- /dev/null
+++ b/arch/arm/mach-mvebu/common.h
@@ -0,0 +1,23 @@
1/*
2 * Core functions for Marvell System On Chip
3 *
4 * Copyright (C) 2012 Marvell
5 *
6 * Lior Amsalem <alior@marvell.com>
7 * Gregory CLEMENT <gregory.clement@free-electrons.com>
8 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#ifndef __ARCH_MVEBU_COMMON_H
16#define __ARCH_MVEBU_COMMON_H
17
18void mvebu_restart(char mode, const char *cmd);
19
20void armada_370_xp_init_irq(void);
21void armada_370_xp_handle_irq(struct pt_regs *regs);
22
23#endif
diff --git a/arch/arm/mach-mvebu/include/mach/armada-370-xp.h b/arch/arm/mach-mvebu/include/mach/armada-370-xp.h
new file mode 100644
index 000000000000..25f0ca8d7820
--- /dev/null
+++ b/arch/arm/mach-mvebu/include/mach/armada-370-xp.h
@@ -0,0 +1,22 @@
1/*
2 * Generic definitions for Marvell Armada_370_XP SoCs
3 *
4 * Copyright (C) 2012 Marvell
5 *
6 * Lior Amsalem <alior@marvell.com>
7 * Gregory CLEMENT <gregory.clement@free-electrons.com>
8 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#ifndef __MACH_ARMADA_370_XP_H
16#define __MACH_ARMADA_370_XP_H
17
18#define ARMADA_370_XP_REGS_PHYS_BASE 0xd0000000
19#define ARMADA_370_XP_REGS_VIRT_BASE 0xfeb00000
20#define ARMADA_370_XP_REGS_SIZE SZ_1M
21
22#endif /* __MACH_ARMADA_370_XP_H */
diff --git a/arch/arm/mach-mvebu/include/mach/debug-macro.S b/arch/arm/mach-mvebu/include/mach/debug-macro.S
new file mode 100644
index 000000000000..22825760c7e1
--- /dev/null
+++ b/arch/arm/mach-mvebu/include/mach/debug-macro.S
@@ -0,0 +1,24 @@
1/*
2 * Early serial output macro for Marvell SoC
3 *
4 * Copyright (C) 2012 Marvell
5 *
6 * Lior Amsalem <alior@marvell.com>
7 * Gregory Clement <gregory.clement@free-electrons.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#include <mach/armada-370-xp.h>
15
16 .macro addruart, rp, rv, tmp
17 ldr \rp, =ARMADA_370_XP_REGS_PHYS_BASE
18 ldr \rv, =ARMADA_370_XP_REGS_VIRT_BASE
19 orr \rp, \rp, #0x00012000
20 orr \rv, \rv, #0x00012000
21 .endm
22
23#define UART_SHIFT 2
24#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-mvebu/include/mach/timex.h b/arch/arm/mach-mvebu/include/mach/timex.h
new file mode 100644
index 000000000000..ab324a3748f2
--- /dev/null
+++ b/arch/arm/mach-mvebu/include/mach/timex.h
@@ -0,0 +1,13 @@
1/*
2 * Marvell Armada SoC time definitions
3 *
4 * Copyright (C) 2012 Marvell
5 *
6 * Lior Amsalem <alior@marvell.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#define CLOCK_TICK_RATE (100 * HZ)
diff --git a/arch/arm/mach-mvebu/include/mach/uncompress.h b/arch/arm/mach-mvebu/include/mach/uncompress.h
new file mode 100644
index 000000000000..d6a100ccf302
--- /dev/null
+++ b/arch/arm/mach-mvebu/include/mach/uncompress.h
@@ -0,0 +1,43 @@
1/*
2 * Marvell Armada SoC kernel uncompression UART routines
3 *
4 * Copyright (C) 2012 Marvell
5 *
6 * Lior Amsalem <alior@marvell.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#include <mach/armada-370-xp.h>
14
15#define UART_THR ((volatile unsigned char *)(ARMADA_370_XP_REGS_PHYS_BASE\
16 + 0x12000))
17#define UART_LSR ((volatile unsigned char *)(ARMADA_370_XP_REGS_PHYS_BASE\
18 + 0x12014))
19
20#define LSR_THRE 0x20
21
22static void putc(const char c)
23{
24 int i;
25
26 for (i = 0; i < 0x1000; i++) {
27 /* Transmit fifo not full? */
28 if (*UART_LSR & LSR_THRE)
29 break;
30 }
31
32 *UART_THR = c;
33}
34
35static void flush(void)
36{
37}
38
39/*
40 * nothing to do
41 */
42#define arch_decomp_setup()
43#define arch_decomp_wdog()
diff --git a/arch/arm/mach-mvebu/irq-armada-370-xp.c b/arch/arm/mach-mvebu/irq-armada-370-xp.c
new file mode 100644
index 000000000000..5f5f9394b6b2
--- /dev/null
+++ b/arch/arm/mach-mvebu/irq-armada-370-xp.c
@@ -0,0 +1,133 @@
1/*
2 * Marvell Armada 370 and Armada XP SoC IRQ handling
3 *
4 * Copyright (C) 2012 Marvell
5 *
6 * Lior Amsalem <alior@marvell.com>
7 * Gregory CLEMENT <gregory.clement@free-electrons.com>
8 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 * Ben Dooks <ben.dooks@codethink.co.uk>
10 *
11 * This file is licensed under the terms of the GNU General Public
12 * License version 2. This program is licensed "as is" without any
13 * warranty of any kind, whether express or implied.
14 */
15
16#include <linux/kernel.h>
17#include <linux/module.h>
18#include <linux/init.h>
19#include <linux/irq.h>
20#include <linux/interrupt.h>
21#include <linux/io.h>
22#include <linux/of_address.h>
23#include <linux/of_irq.h>
24#include <linux/irqdomain.h>
25#include <asm/mach/arch.h>
26#include <asm/exception.h>
27
28/* Interrupt Controller Registers Map */
29#define ARMADA_370_XP_INT_SET_MASK_OFFS (0x48)
30#define ARMADA_370_XP_INT_CLEAR_MASK_OFFS (0x4C)
31
32#define ARMADA_370_XP_INT_CONTROL (0x00)
33#define ARMADA_370_XP_INT_SET_ENABLE_OFFS (0x30)
34#define ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS (0x34)
35
36#define ARMADA_370_XP_CPU_INTACK_OFFS (0x44)
37
38static void __iomem *per_cpu_int_base;
39static void __iomem *main_int_base;
40static struct irq_domain *armada_370_xp_mpic_domain;
41
42static void armada_370_xp_irq_mask(struct irq_data *d)
43{
44 writel(irqd_to_hwirq(d),
45 per_cpu_int_base + ARMADA_370_XP_INT_SET_MASK_OFFS);
46}
47
48static void armada_370_xp_irq_unmask(struct irq_data *d)
49{
50 writel(irqd_to_hwirq(d),
51 per_cpu_int_base + ARMADA_370_XP_INT_CLEAR_MASK_OFFS);
52}
53
54static struct irq_chip armada_370_xp_irq_chip = {
55 .name = "armada_370_xp_irq",
56 .irq_mask = armada_370_xp_irq_mask,
57 .irq_mask_ack = armada_370_xp_irq_mask,
58 .irq_unmask = armada_370_xp_irq_unmask,
59};
60
61static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
62 unsigned int virq, irq_hw_number_t hw)
63{
64 armada_370_xp_irq_mask(irq_get_irq_data(virq));
65 writel(hw, main_int_base + ARMADA_370_XP_INT_SET_ENABLE_OFFS);
66
67 irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip,
68 handle_level_irq);
69 irq_set_status_flags(virq, IRQ_LEVEL);
70 set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
71
72 return 0;
73}
74
75static struct irq_domain_ops armada_370_xp_mpic_irq_ops = {
76 .map = armada_370_xp_mpic_irq_map,
77 .xlate = irq_domain_xlate_onecell,
78};
79
80static int __init armada_370_xp_mpic_of_init(struct device_node *node,
81 struct device_node *parent)
82{
83 u32 control;
84
85 main_int_base = of_iomap(node, 0);
86 per_cpu_int_base = of_iomap(node, 1);
87
88 BUG_ON(!main_int_base);
89 BUG_ON(!per_cpu_int_base);
90
91 control = readl(main_int_base + ARMADA_370_XP_INT_CONTROL);
92
93 armada_370_xp_mpic_domain =
94 irq_domain_add_linear(node, (control >> 2) & 0x3ff,
95 &armada_370_xp_mpic_irq_ops, NULL);
96
97 if (!armada_370_xp_mpic_domain)
98 panic("Unable to add Armada_370_Xp MPIC irq domain (DT)\n");
99
100 irq_set_default_host(armada_370_xp_mpic_domain);
101 return 0;
102}
103
104asmlinkage void __exception_irq_entry armada_370_xp_handle_irq(struct pt_regs
105 *regs)
106{
107 u32 irqstat, irqnr;
108
109 do {
110 irqstat = readl_relaxed(per_cpu_int_base +
111 ARMADA_370_XP_CPU_INTACK_OFFS);
112 irqnr = irqstat & 0x3FF;
113
114 if (irqnr < 1023) {
115 irqnr =
116 irq_find_mapping(armada_370_xp_mpic_domain, irqnr);
117 handle_IRQ(irqnr, regs);
118 continue;
119 }
120
121 break;
122 } while (1);
123}
124
125static const struct of_device_id mpic_of_match[] __initconst = {
126 {.compatible = "marvell,mpic", .data = armada_370_xp_mpic_of_init},
127 {},
128};
129
130void __init armada_370_xp_init_irq(void)
131{
132 of_irq_init(mpic_of_match);
133}
diff --git a/arch/arm/mach-mvebu/system-controller.c b/arch/arm/mach-mvebu/system-controller.c
new file mode 100644
index 000000000000..b8079df8c986
--- /dev/null
+++ b/arch/arm/mach-mvebu/system-controller.c
@@ -0,0 +1,105 @@
1/*
2 * System controller support for Armada 370 and XP platforms.
3 *
4 * Copyright (C) 2012 Marvell
5 *
6 * Lior Amsalem <alior@marvell.com>
7 * Gregory CLEMENT <gregory.clement@free-electrons.com>
8 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 *
14 * The Armada 370 and Armada XP SoCs both have a range of
15 * miscellaneous registers, that do not belong to a particular device,
16 * but rather provide system-level features. This basic
17 * system-controller driver provides a device tree binding for those
18 * registers, and implements utility functions offering various
19 * features related to those registers.
20 *
21 * For now, the feature set is limited to restarting the platform by a
22 * soft-reset, but it might be extended in the future.
23 */
24
25#include <linux/kernel.h>
26#include <linux/init.h>
27#include <linux/of_address.h>
28#include <linux/io.h>
29
30static void __iomem *system_controller_base;
31
32struct mvebu_system_controller {
33 u32 rstoutn_mask_offset;
34 u32 system_soft_reset_offset;
35
36 u32 rstoutn_mask_reset_out_en;
37 u32 system_soft_reset;
38};
39static struct mvebu_system_controller *mvebu_sc;
40
41const struct mvebu_system_controller armada_370_xp_system_controller = {
42 .rstoutn_mask_offset = 0x60,
43 .system_soft_reset_offset = 0x64,
44 .rstoutn_mask_reset_out_en = 0x1,
45 .system_soft_reset = 0x1,
46};
47
48const struct mvebu_system_controller orion_system_controller = {
49 .rstoutn_mask_offset = 0x108,
50 .system_soft_reset_offset = 0x10c,
51 .rstoutn_mask_reset_out_en = 0x4,
52 .system_soft_reset = 0x1,
53};
54
55static struct of_device_id of_system_controller_table[] = {
56 {
57 .compatible = "marvell,orion-system-controller",
58 .data = (void *) &orion_system_controller,
59 }, {
60 .compatible = "marvell,armada-370-xp-system-controller",
61 .data = (void *) &armada_370_xp_system_controller,
62 },
63 { /* end of list */ },
64};
65
66void mvebu_restart(char mode, const char *cmd)
67{
68 if (!system_controller_base) {
69 pr_err("Cannot restart, system-controller not available: check the device tree\n");
70 } else {
71 /*
72 * Enable soft reset to assert RSTOUTn.
73 */
74 writel(mvebu_sc->rstoutn_mask_reset_out_en,
75 system_controller_base +
76 mvebu_sc->rstoutn_mask_offset);
77 /*
78 * Assert soft reset.
79 */
80 writel(mvebu_sc->system_soft_reset,
81 system_controller_base +
82 mvebu_sc->system_soft_reset_offset);
83 }
84
85 while (1)
86 ;
87}
88
89static int __init mvebu_system_controller_init(void)
90{
91 struct device_node *np;
92
93 np = of_find_matching_node(NULL, of_system_controller_table);
94 if (np) {
95 const struct of_device_id *match =
96 of_match_node(of_system_controller_table, np);
97 BUG_ON(!match);
98 system_controller_base = of_iomap(np, 0);
99 mvebu_sc = (struct mvebu_system_controller *)match->data;
100 }
101
102 return 0;
103}
104
105arch_initcall(mvebu_system_controller_init);
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 2776eaacac5e..dd0fbf76ac79 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -9,7 +9,7 @@ config ARCH_OMAP2PLUS_TYPICAL
9 select REGULATOR 9 select REGULATOR
10 select PM_RUNTIME 10 select PM_RUNTIME
11 select VFP 11 select VFP
12 select NEON if ARCH_OMAP3 || ARCH_OMAP4 12 select NEON if ARCH_OMAP3 || ARCH_OMAP4 || SOC_OMAP5
13 select SERIAL_OMAP 13 select SERIAL_OMAP
14 select SERIAL_OMAP_CONSOLE 14 select SERIAL_OMAP_CONSOLE
15 select I2C 15 select I2C
@@ -63,6 +63,12 @@ config ARCH_OMAP4
63 select USB_ARCH_HAS_EHCI if USB_SUPPORT 63 select USB_ARCH_HAS_EHCI if USB_SUPPORT
64 select ARM_CPU_SUSPEND if PM 64 select ARM_CPU_SUSPEND if PM
65 65
66config SOC_OMAP5
67 bool "TI OMAP5"
68 select CPU_V7
69 select ARM_GIC
70 select HAVE_SMP
71
66comment "OMAP Core Type" 72comment "OMAP Core Type"
67 depends on ARCH_OMAP2 73 depends on ARCH_OMAP2
68 74
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index bdfd400b4996..b779ddd86faf 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -17,6 +17,7 @@ obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common)
17obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common) 17obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common)
18obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common) 18obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common)
19obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common) 19obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common)
20obj-$(CONFIG_SOC_OMAP5) += prm44xx.o $(hwmod-common) $(secure-common)
20 21
21ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) 22ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),)
22obj-y += mcbsp.o 23obj-y += mcbsp.o
@@ -29,8 +30,10 @@ obj-$(CONFIG_SOC_HAS_OMAP2_SDRC) += sdrc.o
29 30
30obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o 31obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o
31obj-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o 32obj-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o
32obj-$(CONFIG_ARCH_OMAP4) += omap4-common.o omap-wakeupgen.o 33omap-4-5-common = omap4-common.o omap-wakeupgen.o \
33obj-$(CONFIG_ARCH_OMAP4) += sleep44xx.o 34 sleep44xx.o
35obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-common)
36obj-$(CONFIG_SOC_OMAP5) += $(omap-4-5-common)
34 37
35plus_sec := $(call as-instr,.arch_extension sec,+sec) 38plus_sec := $(call as-instr,.arch_extension sec,+sec)
36AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec) 39AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec)
@@ -69,6 +72,7 @@ obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o
69obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o 72obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o
70obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o 73obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o
71obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o 74obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o
75obj-$(CONFIG_SOC_OMAP5) += omap-mpuss-lowpower.o
72obj-$(CONFIG_PM_DEBUG) += pm-debug.o 76obj-$(CONFIG_PM_DEBUG) += pm-debug.o
73obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o 77obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o
74obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o 78obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o
@@ -88,14 +92,16 @@ obj-$(CONFIG_ARCH_OMAP4) += cpuidle44xx.o
88endif 92endif
89 93
90# PRCM 94# PRCM
95omap-prcm-4-5-common = prcm.o cminst44xx.o cm44xx.o \
96 prcm_mpu44xx.o prminst44xx.o \
97 vc44xx_data.o vp44xx_data.o
91obj-y += prm_common.o 98obj-y += prm_common.o
92obj-$(CONFIG_ARCH_OMAP2) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o 99obj-$(CONFIG_ARCH_OMAP2) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o
93obj-$(CONFIG_ARCH_OMAP3) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o 100obj-$(CONFIG_ARCH_OMAP3) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o
94obj-$(CONFIG_ARCH_OMAP3) += vc3xxx_data.o vp3xxx_data.o 101obj-$(CONFIG_ARCH_OMAP3) += vc3xxx_data.o vp3xxx_data.o
95obj-$(CONFIG_ARCH_OMAP4) += prcm.o cminst44xx.o cm44xx.o
96obj-$(CONFIG_ARCH_OMAP4) += prcm_mpu44xx.o prminst44xx.o
97obj-$(CONFIG_ARCH_OMAP4) += vc44xx_data.o vp44xx_data.o prm44xx.o
98obj-$(CONFIG_SOC_AM33XX) += prcm.o prm33xx.o cm33xx.o 102obj-$(CONFIG_SOC_AM33XX) += prcm.o prm33xx.o cm33xx.o
103obj-$(CONFIG_ARCH_OMAP4) += $(omap-prcm-4-5-common) prm44xx.o
104obj-$(CONFIG_SOC_OMAP5) += $(omap-prcm-4-5-common)
99 105
100# OMAP voltage domains 106# OMAP voltage domains
101voltagedomain-common := voltage.o vc.o vp.o 107voltagedomain-common := voltage.o vc.o vp.o
@@ -107,6 +113,7 @@ obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common)
107obj-$(CONFIG_ARCH_OMAP4) += voltagedomains44xx_data.o 113obj-$(CONFIG_ARCH_OMAP4) += voltagedomains44xx_data.o
108obj-$(CONFIG_SOC_AM33XX) += $(voltagedomain-common) 114obj-$(CONFIG_SOC_AM33XX) += $(voltagedomain-common)
109obj-$(CONFIG_SOC_AM33XX) += voltagedomains33xx_data.o 115obj-$(CONFIG_SOC_AM33XX) += voltagedomains33xx_data.o
116obj-$(CONFIG_SOC_OMAP5) += $(voltagedomain-common)
110 117
111# OMAP powerdomain framework 118# OMAP powerdomain framework
112powerdomain-common += powerdomain.o powerdomain-common.o 119powerdomain-common += powerdomain.o powerdomain-common.o
@@ -124,6 +131,8 @@ obj-$(CONFIG_ARCH_OMAP4) += powerdomains44xx_data.o
124obj-$(CONFIG_SOC_AM33XX) += $(powerdomain-common) 131obj-$(CONFIG_SOC_AM33XX) += $(powerdomain-common)
125obj-$(CONFIG_SOC_AM33XX) += powerdomain33xx.o 132obj-$(CONFIG_SOC_AM33XX) += powerdomain33xx.o
126obj-$(CONFIG_SOC_AM33XX) += powerdomains33xx_data.o 133obj-$(CONFIG_SOC_AM33XX) += powerdomains33xx_data.o
134obj-$(CONFIG_SOC_OMAP5) += $(powerdomain-common)
135obj-$(CONFIG_SOC_OMAP5) += powerdomain44xx.o
127 136
128# PRCM clockdomain control 137# PRCM clockdomain control
129clockdomain-common += clockdomain.o 138clockdomain-common += clockdomain.o
@@ -142,6 +151,8 @@ obj-$(CONFIG_ARCH_OMAP4) += clockdomains44xx_data.o
142obj-$(CONFIG_SOC_AM33XX) += $(clockdomain-common) 151obj-$(CONFIG_SOC_AM33XX) += $(clockdomain-common)
143obj-$(CONFIG_SOC_AM33XX) += clockdomain33xx.o 152obj-$(CONFIG_SOC_AM33XX) += clockdomain33xx.o
144obj-$(CONFIG_SOC_AM33XX) += clockdomains33xx_data.o 153obj-$(CONFIG_SOC_AM33XX) += clockdomains33xx_data.o
154obj-$(CONFIG_SOC_OMAP5) += $(clockdomain-common)
155obj-$(CONFIG_SOC_OMAP5) += clockdomain44xx.o
145 156
146# Clock framework 157# Clock framework
147obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o 158obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o
@@ -160,6 +171,8 @@ obj-$(CONFIG_ARCH_OMAP3) += clkt_iclk.o
160obj-$(CONFIG_ARCH_OMAP4) += $(clock-common) clock44xx_data.o 171obj-$(CONFIG_ARCH_OMAP4) += $(clock-common) clock44xx_data.o
161obj-$(CONFIG_ARCH_OMAP4) += dpll3xxx.o dpll44xx.o 172obj-$(CONFIG_ARCH_OMAP4) += dpll3xxx.o dpll44xx.o
162obj-$(CONFIG_SOC_AM33XX) += $(clock-common) dpll3xxx.o 173obj-$(CONFIG_SOC_AM33XX) += $(clock-common) dpll3xxx.o
174obj-$(CONFIG_SOC_OMAP5) += $(clock-common)
175obj-$(CONFIG_SOC_OMAP5) += dpll3xxx.o dpll44xx.o
163 176
164# OMAP2 clock rate set data (old "OPP" data) 177# OMAP2 clock rate set data (old "OPP" data)
165obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o 178obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o
@@ -187,6 +200,7 @@ obj-$(CONFIG_OMAP3_EMU) += emu.o
187# L3 interconnect 200# L3 interconnect
188obj-$(CONFIG_ARCH_OMAP3) += omap_l3_smx.o 201obj-$(CONFIG_ARCH_OMAP3) += omap_l3_smx.o
189obj-$(CONFIG_ARCH_OMAP4) += omap_l3_noc.o 202obj-$(CONFIG_ARCH_OMAP4) += omap_l3_noc.o
203obj-$(CONFIG_SOC_OMAP5) += omap_l3_noc.o
190 204
191obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o 205obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o
192mailbox_mach-objs := mailbox.o 206mailbox_mach-objs := mailbox.o
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 2f2abfb82d84..6f93a20536ea 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -25,23 +25,12 @@
25#include "common-board-devices.h" 25#include "common-board-devices.h"
26 26
27#if !(defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)) 27#if !(defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3))
28#define omap_intc_of_init NULL 28#define intc_of_init NULL
29#endif 29#endif
30#ifndef CONFIG_ARCH_OMAP4 30#ifndef CONFIG_ARCH_OMAP4
31#define gic_of_init NULL 31#define gic_of_init NULL
32#endif 32#endif
33 33
34static struct of_device_id irq_match[] __initdata = {
35 { .compatible = "ti,omap2-intc", .data = omap_intc_of_init, },
36 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
37 { }
38};
39
40static void __init omap_init_irq(void)
41{
42 of_irq_init(irq_match);
43}
44
45static struct of_device_id omap_dt_match_table[] __initdata = { 34static struct of_device_id omap_dt_match_table[] __initdata = {
46 { .compatible = "simple-bus", }, 35 { .compatible = "simple-bus", },
47 { .compatible = "ti,omap-infra", }, 36 { .compatible = "ti,omap-infra", },
@@ -65,7 +54,7 @@ DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)")
65 .reserve = omap_reserve, 54 .reserve = omap_reserve,
66 .map_io = omap242x_map_io, 55 .map_io = omap242x_map_io,
67 .init_early = omap2420_init_early, 56 .init_early = omap2420_init_early,
68 .init_irq = omap_init_irq, 57 .init_irq = omap_intc_of_init,
69 .handle_irq = omap2_intc_handle_irq, 58 .handle_irq = omap2_intc_handle_irq,
70 .init_machine = omap_generic_init, 59 .init_machine = omap_generic_init,
71 .timer = &omap2_timer, 60 .timer = &omap2_timer,
@@ -84,7 +73,7 @@ DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)")
84 .reserve = omap_reserve, 73 .reserve = omap_reserve,
85 .map_io = omap243x_map_io, 74 .map_io = omap243x_map_io,
86 .init_early = omap2430_init_early, 75 .init_early = omap2430_init_early,
87 .init_irq = omap_init_irq, 76 .init_irq = omap_intc_of_init,
88 .handle_irq = omap2_intc_handle_irq, 77 .handle_irq = omap2_intc_handle_irq,
89 .init_machine = omap_generic_init, 78 .init_machine = omap_generic_init,
90 .timer = &omap2_timer, 79 .timer = &omap2_timer,
@@ -103,7 +92,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
103 .reserve = omap_reserve, 92 .reserve = omap_reserve,
104 .map_io = omap3_map_io, 93 .map_io = omap3_map_io,
105 .init_early = omap3430_init_early, 94 .init_early = omap3430_init_early,
106 .init_irq = omap_init_irq, 95 .init_irq = omap_intc_of_init,
107 .handle_irq = omap3_intc_handle_irq, 96 .handle_irq = omap3_intc_handle_irq,
108 .init_machine = omap_generic_init, 97 .init_machine = omap_generic_init,
109 .timer = &omap3_timer, 98 .timer = &omap3_timer,
@@ -122,7 +111,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)")
122 .reserve = omap_reserve, 111 .reserve = omap_reserve,
123 .map_io = am33xx_map_io, 112 .map_io = am33xx_map_io,
124 .init_early = am33xx_init_early, 113 .init_early = am33xx_init_early,
125 .init_irq = omap_init_irq, 114 .init_irq = omap_intc_of_init,
126 .handle_irq = omap3_intc_handle_irq, 115 .handle_irq = omap3_intc_handle_irq,
127 .init_machine = omap_generic_init, 116 .init_machine = omap_generic_init,
128 .timer = &omap3_am33xx_timer, 117 .timer = &omap3_am33xx_timer,
@@ -140,7 +129,7 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
140 .reserve = omap_reserve, 129 .reserve = omap_reserve,
141 .map_io = omap4_map_io, 130 .map_io = omap4_map_io,
142 .init_early = omap4430_init_early, 131 .init_early = omap4430_init_early,
143 .init_irq = omap_init_irq, 132 .init_irq = omap_gic_of_init,
144 .handle_irq = gic_handle_irq, 133 .handle_irq = gic_handle_irq,
145 .init_machine = omap_generic_init, 134 .init_machine = omap_generic_init,
146 .init_late = omap4430_init_late, 135 .init_late = omap4430_init_late,
@@ -149,3 +138,22 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
149 .restart = omap_prcm_restart, 138 .restart = omap_prcm_restart,
150MACHINE_END 139MACHINE_END
151#endif 140#endif
141
142#ifdef CONFIG_SOC_OMAP5
143static const char *omap5_boards_compat[] __initdata = {
144 "ti,omap5",
145 NULL,
146};
147
148DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)")
149 .reserve = omap_reserve,
150 .map_io = omap5_map_io,
151 .init_early = omap5_init_early,
152 .init_irq = omap_gic_of_init,
153 .handle_irq = gic_handle_irq,
154 .init_machine = omap_generic_init,
155 .timer = &omap5_timer,
156 .dt_compat = omap5_boards_compat,
157 .restart = omap_prcm_restart,
158MACHINE_END
159#endif
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index 73d2a0b9ca04..069f9725b1c3 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -178,3 +178,27 @@ void __init omap4_map_io(void)
178} 178}
179#endif 179#endif
180 180
181#if defined(CONFIG_SOC_OMAP5)
182static struct omap_globals omap5_globals = {
183 .class = OMAP54XX_CLASS,
184 .tap = OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE),
185 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE),
186 .ctrl_pad = OMAP2_L4_IO_ADDRESS(OMAP54XX_CTRL_BASE),
187 .prm = OMAP2_L4_IO_ADDRESS(OMAP54XX_PRM_BASE),
188 .cm = OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_AON_BASE),
189 .cm2 = OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_BASE),
190 .prcm_mpu = OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE),
191};
192
193void __init omap2_set_globals_5xxx(void)
194{
195 omap2_set_globals_tap(&omap5_globals);
196 omap2_set_globals_control(&omap5_globals);
197 omap2_set_globals_prcm(&omap5_globals);
198}
199
200void __init omap5_map_io(void)
201{
202 omap5_map_common_io();
203}
204#endif
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 404f172d95a8..1f65b1871c23 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -115,6 +115,14 @@ static inline int omap_mux_late_init(void)
115} 115}
116#endif 116#endif
117 117
118#ifdef CONFIG_SOC_OMAP5
119extern void omap5_map_common_io(void);
120#else
121static inline void omap5_map_common_io(void)
122{
123}
124#endif
125
118extern void omap2_init_common_infrastructure(void); 126extern void omap2_init_common_infrastructure(void);
119 127
120extern struct sys_timer omap2_timer; 128extern struct sys_timer omap2_timer;
@@ -122,6 +130,7 @@ extern struct sys_timer omap3_timer;
122extern struct sys_timer omap3_secure_timer; 130extern struct sys_timer omap3_secure_timer;
123extern struct sys_timer omap3_am33xx_timer; 131extern struct sys_timer omap3_am33xx_timer;
124extern struct sys_timer omap4_timer; 132extern struct sys_timer omap4_timer;
133extern struct sys_timer omap5_timer;
125 134
126void omap2420_init_early(void); 135void omap2420_init_early(void);
127void omap2430_init_early(void); 136void omap2430_init_early(void);
@@ -134,6 +143,7 @@ void am35xx_init_early(void);
134void ti81xx_init_early(void); 143void ti81xx_init_early(void);
135void am33xx_init_early(void); 144void am33xx_init_early(void);
136void omap4430_init_early(void); 145void omap4430_init_early(void);
146void omap5_init_early(void);
137void omap3_init_late(void); /* Do not use this one */ 147void omap3_init_late(void); /* Do not use this one */
138void omap4430_init_late(void); 148void omap4430_init_late(void);
139void omap2420_init_late(void); 149void omap2420_init_late(void);
@@ -169,6 +179,7 @@ void omap2_set_globals_242x(void);
169void omap2_set_globals_243x(void); 179void omap2_set_globals_243x(void);
170void omap2_set_globals_3xxx(void); 180void omap2_set_globals_3xxx(void);
171void omap2_set_globals_443x(void); 181void omap2_set_globals_443x(void);
182void omap2_set_globals_5xxx(void);
172void omap2_set_globals_ti81xx(void); 183void omap2_set_globals_ti81xx(void);
173void omap2_set_globals_am33xx(void); 184void omap2_set_globals_am33xx(void);
174 185
@@ -188,6 +199,7 @@ void omap243x_map_io(void);
188void omap3_map_io(void); 199void omap3_map_io(void);
189void am33xx_map_io(void); 200void am33xx_map_io(void);
190void omap4_map_io(void); 201void omap4_map_io(void);
202void omap5_map_io(void);
191void ti81xx_map_io(void); 203void ti81xx_map_io(void);
192void omap_barriers_init(void); 204void omap_barriers_init(void);
193 205
@@ -227,6 +239,8 @@ void omap3_intc_prepare_idle(void);
227void omap3_intc_resume_idle(void); 239void omap3_intc_resume_idle(void);
228void omap2_intc_handle_irq(struct pt_regs *regs); 240void omap2_intc_handle_irq(struct pt_regs *regs);
229void omap3_intc_handle_irq(struct pt_regs *regs); 241void omap3_intc_handle_irq(struct pt_regs *regs);
242void omap_intc_of_init(void);
243void omap_gic_of_init(void);
230 244
231#ifdef CONFIG_CACHE_L2X0 245#ifdef CONFIG_CACHE_L2X0
232extern void __iomem *omap4_get_l2cache_base(void); 246extern void __iomem *omap4_get_l2cache_base(void);
@@ -234,10 +248,10 @@ extern void __iomem *omap4_get_l2cache_base(void);
234 248
235struct device_node; 249struct device_node;
236#ifdef CONFIG_OF 250#ifdef CONFIG_OF
237int __init omap_intc_of_init(struct device_node *node, 251int __init intc_of_init(struct device_node *node,
238 struct device_node *parent); 252 struct device_node *parent);
239#else 253#else
240int __init omap_intc_of_init(struct device_node *node, 254int __init intc_of_init(struct device_node *node,
241 struct device_node *parent) 255 struct device_node *parent)
242{ 256{
243 return 0; 257 return 0;
@@ -264,6 +278,7 @@ extern void omap_secondary_startup(void);
264extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask); 278extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask);
265extern void omap_auxcoreboot_addr(u32 cpu_addr); 279extern void omap_auxcoreboot_addr(u32 cpu_addr);
266extern u32 omap_read_auxcoreboot0(void); 280extern u32 omap_read_auxcoreboot0(void);
281extern void omap5_secondary_startup(void);
267#endif 282#endif
268 283
269#if defined(CONFIG_SMP) && defined(CONFIG_PM) 284#if defined(CONFIG_SMP) && defined(CONFIG_PM)
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
index 295b39047a71..b8cdc8531b60 100644
--- a/arch/arm/mach-omap2/control.h
+++ b/arch/arm/mach-omap2/control.h
@@ -253,6 +253,10 @@
253/* TI81XX CONTROL_DEVCONF register offsets */ 253/* TI81XX CONTROL_DEVCONF register offsets */
254#define TI81XX_CONTROL_DEVICE_ID (TI81XX_CONTROL_DEVCONF + 0x000) 254#define TI81XX_CONTROL_DEVICE_ID (TI81XX_CONTROL_DEVCONF + 0x000)
255 255
256/* OMAP54XX CONTROL STATUS register */
257#define OMAP5XXX_CONTROL_STATUS 0x134
258#define OMAP5_DEVICETYPE_MASK (0x7 << 6)
259
256/* 260/*
257 * REVISIT: This list of registers is not comprehensive - there are more 261 * REVISIT: This list of registers is not comprehensive - there are more
258 * that should be added. 262 * that should be added.
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 527c0046064d..71651e20a43e 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -84,7 +84,7 @@ static int __init omap4_l3_init(void)
84 * To avoid code running on other OMAPs in 84 * To avoid code running on other OMAPs in
85 * multi-omap builds 85 * multi-omap builds
86 */ 86 */
87 if (!(cpu_is_omap44xx())) 87 if (!cpu_is_omap44xx() && !soc_is_omap54xx())
88 return -ENODEV; 88 return -ENODEV;
89 89
90 for (i = 0; i < L3_MODULES; i++) { 90 for (i = 0; i < L3_MODULES; i++) {
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 2286410671e7..b2b5759ab0fe 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -727,7 +727,8 @@ static int __init gpmc_init(void)
727 ck = "gpmc_fck"; 727 ck = "gpmc_fck";
728 l = OMAP34XX_GPMC_BASE; 728 l = OMAP34XX_GPMC_BASE;
729 gpmc_irq = INT_34XX_GPMC_IRQ; 729 gpmc_irq = INT_34XX_GPMC_IRQ;
730 } else if (cpu_is_omap44xx()) { 730 } else if (cpu_is_omap44xx() || soc_is_omap54xx()) {
731 /* Base address and irq number are same for OMAP4/5 */
731 ck = "gpmc_ck"; 732 ck = "gpmc_ck";
732 l = OMAP44XX_GPMC_BASE; 733 l = OMAP44XX_GPMC_BASE;
733 gpmc_irq = OMAP44XX_IRQ_GPMC; 734 gpmc_irq = OMAP44XX_IRQ_GPMC;
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 37eb95aaf2f6..40373db649aa 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -50,6 +50,11 @@ int omap_type(void)
50 val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS); 50 val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
51 } else if (cpu_is_omap44xx()) { 51 } else if (cpu_is_omap44xx()) {
52 val = omap_ctrl_readl(OMAP4_CTRL_MODULE_CORE_STATUS); 52 val = omap_ctrl_readl(OMAP4_CTRL_MODULE_CORE_STATUS);
53 } else if (soc_is_omap54xx()) {
54 val = omap_ctrl_readl(OMAP5XXX_CONTROL_STATUS);
55 val &= OMAP5_DEVICETYPE_MASK;
56 val >>= 6;
57 goto out;
53 } else { 58 } else {
54 pr_err("Cannot detect omap type!\n"); 59 pr_err("Cannot detect omap type!\n");
55 goto out; 60 goto out;
@@ -100,7 +105,7 @@ static u16 tap_prod_id;
100 105
101void omap_get_die_id(struct omap_die_id *odi) 106void omap_get_die_id(struct omap_die_id *odi)
102{ 107{
103 if (cpu_is_omap44xx()) { 108 if (cpu_is_omap44xx() || soc_is_omap54xx()) {
104 odi->id_0 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_0); 109 odi->id_0 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_0);
105 odi->id_1 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_1); 110 odi->id_1 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_1);
106 odi->id_2 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_2); 111 odi->id_2 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_2);
@@ -513,6 +518,41 @@ void __init omap4xxx_check_revision(void)
513 ((omap_rev() >> 12) & 0xf), ((omap_rev() >> 8) & 0xf)); 518 ((omap_rev() >> 12) & 0xf), ((omap_rev() >> 8) & 0xf));
514} 519}
515 520
521void __init omap5xxx_check_revision(void)
522{
523 u32 idcode;
524 u16 hawkeye;
525 u8 rev;
526
527 idcode = read_tap_reg(OMAP_TAP_IDCODE);
528 hawkeye = (idcode >> 12) & 0xffff;
529 rev = (idcode >> 28) & 0xff;
530 switch (hawkeye) {
531 case 0xb942:
532 switch (rev) {
533 case 0:
534 default:
535 omap_revision = OMAP5430_REV_ES1_0;
536 }
537 break;
538
539 case 0xb998:
540 switch (rev) {
541 case 0:
542 default:
543 omap_revision = OMAP5432_REV_ES1_0;
544 }
545 break;
546
547 default:
548 /* Unknown default to latest silicon rev as default*/
549 omap_revision = OMAP5430_REV_ES1_0;
550 }
551
552 pr_info("OMAP%04x ES%d.0\n",
553 omap_rev() >> 16, ((omap_rev() >> 12) & 0xf));
554}
555
516/* 556/*
517 * Set up things for map_io and processor detection later on. Gets called 557 * Set up things for map_io and processor detection later on. Gets called
518 * pretty much first thing from board init. For multi-omap, this gets 558 * pretty much first thing from board init. For multi-omap, this gets
diff --git a/arch/arm/mach-omap2/include/mach/debug-macro.S b/arch/arm/mach-omap2/include/mach/debug-macro.S
index d7f844a99a7b..93d10de7129f 100644
--- a/arch/arm/mach-omap2/include/mach/debug-macro.S
+++ b/arch/arm/mach-omap2/include/mach/debug-macro.S
@@ -60,12 +60,12 @@ omap_uart_lsr: .word 0
60 beq 23f @ configure OMAP2UART3 60 beq 23f @ configure OMAP2UART3
61 cmp \rp, #OMAP3UART3 @ only on 34xx 61 cmp \rp, #OMAP3UART3 @ only on 34xx
62 beq 33f @ configure OMAP3UART3 62 beq 33f @ configure OMAP3UART3
63 cmp \rp, #OMAP4UART3 @ only on 44xx 63 cmp \rp, #OMAP4UART3 @ only on 44xx/54xx
64 beq 43f @ configure OMAP4UART3 64 beq 43f @ configure OMAP4/5UART3
65 cmp \rp, #OMAP3UART4 @ only on 36xx 65 cmp \rp, #OMAP3UART4 @ only on 36xx
66 beq 34f @ configure OMAP3UART4 66 beq 34f @ configure OMAP3UART4
67 cmp \rp, #OMAP4UART4 @ only on 44xx 67 cmp \rp, #OMAP4UART4 @ only on 44xx/54xx
68 beq 44f @ configure OMAP4UART4 68 beq 44f @ configure OMAP4/5UART4
69 cmp \rp, #TI81XXUART1 @ ti81Xx UART offsets different 69 cmp \rp, #TI81XXUART1 @ ti81Xx UART offsets different
70 beq 81f @ configure UART1 70 beq 81f @ configure UART1
71 cmp \rp, #TI81XXUART2 @ ti81Xx UART offsets different 71 cmp \rp, #TI81XXUART2 @ ti81Xx UART offsets different
diff --git a/arch/arm/mach-omap2/include/mach/omap-wakeupgen.h b/arch/arm/mach-omap2/include/mach/omap-wakeupgen.h
index 548de90b58c2..b0fd16f5c391 100644
--- a/arch/arm/mach-omap2/include/mach/omap-wakeupgen.h
+++ b/arch/arm/mach-omap2/include/mach/omap-wakeupgen.h
@@ -11,15 +11,20 @@
11#ifndef OMAP_ARCH_WAKEUPGEN_H 11#ifndef OMAP_ARCH_WAKEUPGEN_H
12#define OMAP_ARCH_WAKEUPGEN_H 12#define OMAP_ARCH_WAKEUPGEN_H
13 13
14/* OMAP4 and OMAP5 has same base address */
15#define OMAP_WKUPGEN_BASE 0x48281000
16
14#define OMAP_WKG_CONTROL_0 0x00 17#define OMAP_WKG_CONTROL_0 0x00
15#define OMAP_WKG_ENB_A_0 0x10 18#define OMAP_WKG_ENB_A_0 0x10
16#define OMAP_WKG_ENB_B_0 0x14 19#define OMAP_WKG_ENB_B_0 0x14
17#define OMAP_WKG_ENB_C_0 0x18 20#define OMAP_WKG_ENB_C_0 0x18
18#define OMAP_WKG_ENB_D_0 0x1c 21#define OMAP_WKG_ENB_D_0 0x1c
22#define OMAP_WKG_ENB_E_0 0x20
19#define OMAP_WKG_ENB_A_1 0x410 23#define OMAP_WKG_ENB_A_1 0x410
20#define OMAP_WKG_ENB_B_1 0x414 24#define OMAP_WKG_ENB_B_1 0x414
21#define OMAP_WKG_ENB_C_1 0x418 25#define OMAP_WKG_ENB_C_1 0x418
22#define OMAP_WKG_ENB_D_1 0x41c 26#define OMAP_WKG_ENB_D_1 0x41c
27#define OMAP_WKG_ENB_E_1 0x420
23#define OMAP_AUX_CORE_BOOT_0 0x800 28#define OMAP_AUX_CORE_BOOT_0 0x800
24#define OMAP_AUX_CORE_BOOT_1 0x804 29#define OMAP_AUX_CORE_BOOT_1 0x804
25#define OMAP_PTMSYNCREQ_MASK 0xc00 30#define OMAP_PTMSYNCREQ_MASK 0xc00
@@ -28,4 +33,6 @@
28#define OMAP_TIMESTAMPCYCLEHI 0xc0c 33#define OMAP_TIMESTAMPCYCLEHI 0xc0c
29 34
30extern int __init omap_wakeupgen_init(void); 35extern int __init omap_wakeupgen_init(void);
36extern void __iomem *omap_get_wakeupgen_base(void);
37extern int omap_secure_apis_support(void);
31#endif 38#endif
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index cb6c11cd8df9..8976be90c8e8 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -233,6 +233,35 @@ static struct map_desc omap44xx_io_desc[] __initdata = {
233}; 233};
234#endif 234#endif
235 235
236#ifdef CONFIG_SOC_OMAP5
237static struct map_desc omap54xx_io_desc[] __initdata = {
238 {
239 .virtual = L3_54XX_VIRT,
240 .pfn = __phys_to_pfn(L3_54XX_PHYS),
241 .length = L3_54XX_SIZE,
242 .type = MT_DEVICE,
243 },
244 {
245 .virtual = L4_54XX_VIRT,
246 .pfn = __phys_to_pfn(L4_54XX_PHYS),
247 .length = L4_54XX_SIZE,
248 .type = MT_DEVICE,
249 },
250 {
251 .virtual = L4_WK_54XX_VIRT,
252 .pfn = __phys_to_pfn(L4_WK_54XX_PHYS),
253 .length = L4_WK_54XX_SIZE,
254 .type = MT_DEVICE,
255 },
256 {
257 .virtual = L4_PER_54XX_VIRT,
258 .pfn = __phys_to_pfn(L4_PER_54XX_PHYS),
259 .length = L4_PER_54XX_SIZE,
260 .type = MT_DEVICE,
261 },
262};
263#endif
264
236#ifdef CONFIG_SOC_OMAP2420 265#ifdef CONFIG_SOC_OMAP2420
237void __init omap242x_map_common_io(void) 266void __init omap242x_map_common_io(void)
238{ 267{
@@ -278,6 +307,12 @@ void __init omap44xx_map_common_io(void)
278} 307}
279#endif 308#endif
280 309
310#ifdef CONFIG_SOC_OMAP5
311void __init omap5_map_common_io(void)
312{
313 iotable_init(omap54xx_io_desc, ARRAY_SIZE(omap54xx_io_desc));
314}
315#endif
281/* 316/*
282 * omap2_init_reprogram_sdrc - reprogram SDRC timing parameters 317 * omap2_init_reprogram_sdrc - reprogram SDRC timing parameters
283 * 318 *
@@ -513,6 +548,15 @@ void __init omap4430_init_late(void)
513} 548}
514#endif 549#endif
515 550
551#ifdef CONFIG_SOC_OMAP5
552void __init omap5_init_early(void)
553{
554 omap2_set_globals_5xxx();
555 omap5xxx_check_revision();
556 omap_common_init_early();
557}
558#endif
559
516void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, 560void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
517 struct omap_sdrc_params *sdrc_cs1) 561 struct omap_sdrc_params *sdrc_cs1)
518{ 562{
diff --git a/arch/arm/mach-omap2/iomap.h b/arch/arm/mach-omap2/iomap.h
index 80b88921faba..cce2b65039f1 100644
--- a/arch/arm/mach-omap2/iomap.h
+++ b/arch/arm/mach-omap2/iomap.h
@@ -1,6 +1,14 @@
1/* 1/*
2 * IO mappings for OMAP2+ 2 * IO mappings for OMAP2+
3 * 3 *
4 * IO definitions for TI OMAP processors and boards
5 *
6 * Copied from arch/arm/mach-sa1100/include/mach/io.h
7 * Copyright (C) 1997-1999 Russell King
8 *
9 * Copyright (C) 2009-2012 Texas Instruments
10 * Added OMAP4/5 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
11 *
4 * This program is free software; you can redistribute it and/or modify it 12 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the 13 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your 14 * Free Software Foundation; either version 2 of the License, or (at your
@@ -166,4 +174,23 @@
166 /* 0x49000000 --> 0xfb000000 */ 174 /* 0x49000000 --> 0xfb000000 */
167#define L4_ABE_44XX_VIRT (L4_ABE_44XX_PHYS + OMAP2_L4_IO_OFFSET) 175#define L4_ABE_44XX_VIRT (L4_ABE_44XX_PHYS + OMAP2_L4_IO_OFFSET)
168#define L4_ABE_44XX_SIZE SZ_1M 176#define L4_ABE_44XX_SIZE SZ_1M
177/*
178 * ----------------------------------------------------------------------------
179 * Omap5 specific IO mapping
180 * ----------------------------------------------------------------------------
181 */
182#define L3_54XX_PHYS L3_54XX_BASE /* 0x44000000 --> 0xf8000000 */
183#define L3_54XX_VIRT (L3_54XX_PHYS + OMAP4_L3_IO_OFFSET)
184#define L3_54XX_SIZE SZ_1M
185
186#define L4_54XX_PHYS L4_54XX_BASE /* 0x4a000000 --> 0xfc000000 */
187#define L4_54XX_VIRT (L4_54XX_PHYS + OMAP2_L4_IO_OFFSET)
188#define L4_54XX_SIZE SZ_4M
189
190#define L4_WK_54XX_PHYS L4_WK_54XX_BASE /* 0x4ae00000 --> 0xfce00000 */
191#define L4_WK_54XX_VIRT (L4_WK_54XX_PHYS + OMAP2_L4_IO_OFFSET)
192#define L4_WK_54XX_SIZE SZ_2M
169 193
194#define L4_PER_54XX_PHYS L4_PER_54XX_BASE /* 0x48000000 --> 0xfa000000 */
195#define L4_PER_54XX_VIRT (L4_PER_54XX_PHYS + OMAP2_L4_IO_OFFSET)
196#define L4_PER_54XX_SIZE SZ_4M
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index a9c26b12cad2..bcd83db41bbc 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -21,6 +21,7 @@
21#include <linux/irqdomain.h> 21#include <linux/irqdomain.h>
22#include <linux/of.h> 22#include <linux/of.h>
23#include <linux/of_address.h> 23#include <linux/of_address.h>
24#include <linux/of_irq.h>
24 25
25#include <mach/hardware.h> 26#include <mach/hardware.h>
26 27
@@ -258,7 +259,7 @@ asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs
258 omap_intc_handle_irq(base_addr, regs); 259 omap_intc_handle_irq(base_addr, regs);
259} 260}
260 261
261int __init omap_intc_of_init(struct device_node *node, 262int __init intc_of_init(struct device_node *node,
262 struct device_node *parent) 263 struct device_node *parent)
263{ 264{
264 struct resource res; 265 struct resource res;
@@ -280,6 +281,16 @@ int __init omap_intc_of_init(struct device_node *node,
280 return 0; 281 return 0;
281} 282}
282 283
284static struct of_device_id irq_match[] __initdata = {
285 { .compatible = "ti,omap2-intc", .data = intc_of_init, },
286 { }
287};
288
289void __init omap_intc_of_init(void)
290{
291 of_irq_init(irq_match);
292}
293
283#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX) 294#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
284static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)]; 295static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)];
285 296
diff --git a/arch/arm/mach-omap2/omap-headsmp.S b/arch/arm/mach-omap2/omap-headsmp.S
index 503ac777a2ba..502e3135aad3 100644
--- a/arch/arm/mach-omap2/omap-headsmp.S
+++ b/arch/arm/mach-omap2/omap-headsmp.S
@@ -19,6 +19,27 @@
19#include <linux/init.h> 19#include <linux/init.h>
20 20
21 __CPUINIT 21 __CPUINIT
22
23/* Physical address needed since MMU not enabled yet on secondary core */
24#define AUX_CORE_BOOT0_PA 0x48281800
25
26/*
27 * OMAP5 specific entry point for secondary CPU to jump from ROM
28 * code. This routine also provides a holding flag into which
29 * secondary core is held until we're ready for it to initialise.
30 * The primary core will update this flag using a hardware
31+ * register AuxCoreBoot0.
32 */
33ENTRY(omap5_secondary_startup)
34wait: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0
35 ldr r0, [r2]
36 mov r0, r0, lsr #5
37 mrc p15, 0, r4, c0, c0, 5
38 and r4, r4, #0x0f
39 cmp r0, r4
40 bne wait
41 b secondary_startup
42END(omap5_secondary_startup)
22/* 43/*
23 * OMAP4 specific entry point for secondary CPU to jump from ROM 44 * OMAP4 specific entry point for secondary CPU to jump from ROM
24 * code. This routine also provides a holding flag into which 45 * code. This routine also provides a holding flag into which
diff --git a/arch/arm/mach-omap2/omap-hotplug.c b/arch/arm/mach-omap2/omap-hotplug.c
index 56c345b8b931..414083b427df 100644
--- a/arch/arm/mach-omap2/omap-hotplug.c
+++ b/arch/arm/mach-omap2/omap-hotplug.c
@@ -17,8 +17,10 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/smp.h> 19#include <linux/smp.h>
20#include <linux/io.h>
20 21
21#include <asm/cacheflush.h> 22#include <asm/cacheflush.h>
23#include <mach/omap-wakeupgen.h>
22 24
23#include "common.h" 25#include "common.h"
24 26
@@ -35,7 +37,8 @@ int platform_cpu_kill(unsigned int cpu)
35 */ 37 */
36void __ref platform_cpu_die(unsigned int cpu) 38void __ref platform_cpu_die(unsigned int cpu)
37{ 39{
38 unsigned int this_cpu; 40 unsigned int boot_cpu = 0;
41 void __iomem *base = omap_get_wakeupgen_base();
39 42
40 flush_cache_all(); 43 flush_cache_all();
41 dsb(); 44 dsb();
@@ -43,16 +46,27 @@ void __ref platform_cpu_die(unsigned int cpu)
43 /* 46 /*
44 * we're ready for shutdown now, so do it 47 * we're ready for shutdown now, so do it
45 */ 48 */
46 if (omap_modify_auxcoreboot0(0x0, 0x200) != 0x0) 49 if (omap_secure_apis_support()) {
47 pr_err("Secure clear status failed\n"); 50 if (omap_modify_auxcoreboot0(0x0, 0x200) != 0x0)
51 pr_err("Secure clear status failed\n");
52 } else {
53 __raw_writel(0, base + OMAP_AUX_CORE_BOOT_0);
54 }
55
48 56
49 for (;;) { 57 for (;;) {
50 /* 58 /*
51 * Enter into low power state 59 * Enter into low power state
52 */ 60 */
53 omap4_hotplug_cpu(cpu, PWRDM_POWER_OFF); 61 omap4_hotplug_cpu(cpu, PWRDM_POWER_OFF);
54 this_cpu = smp_processor_id(); 62
55 if (omap_read_auxcoreboot0() == this_cpu) { 63 if (omap_secure_apis_support())
64 boot_cpu = omap_read_auxcoreboot0();
65 else
66 boot_cpu =
67 __raw_readl(base + OMAP_AUX_CORE_BOOT_0) >> 5;
68
69 if (boot_cpu == smp_processor_id()) {
56 /* 70 /*
57 * OK, proper wakeup, we're done 71 * OK, proper wakeup, we're done
58 */ 72 */
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index deffbf1c9627..7d118b9bdd5f 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -26,11 +26,19 @@
26 26
27#include <mach/hardware.h> 27#include <mach/hardware.h>
28#include <mach/omap-secure.h> 28#include <mach/omap-secure.h>
29#include <mach/omap-wakeupgen.h>
30#include <asm/cputype.h>
29 31
30#include "iomap.h" 32#include "iomap.h"
31#include "common.h" 33#include "common.h"
32#include "clockdomain.h" 34#include "clockdomain.h"
33 35
36#define CPU_MASK 0xff0ffff0
37#define CPU_CORTEX_A9 0x410FC090
38#define CPU_CORTEX_A15 0x410FC0F0
39
40#define OMAP5_CORE_COUNT 0x2
41
34/* SCU base address */ 42/* SCU base address */
35static void __iomem *scu_base; 43static void __iomem *scu_base;
36 44
@@ -73,6 +81,8 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
73{ 81{
74 static struct clockdomain *cpu1_clkdm; 82 static struct clockdomain *cpu1_clkdm;
75 static bool booted; 83 static bool booted;
84 void __iomem *base = omap_get_wakeupgen_base();
85
76 /* 86 /*
77 * Set synchronisation state between this boot processor 87 * Set synchronisation state between this boot processor
78 * and the secondary one 88 * and the secondary one
@@ -85,7 +95,11 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
85 * the AuxCoreBoot1 register is updated with cpu state 95 * the AuxCoreBoot1 register is updated with cpu state
86 * A barrier is added to ensure that write buffer is drained 96 * A barrier is added to ensure that write buffer is drained
87 */ 97 */
88 omap_modify_auxcoreboot0(0x200, 0xfffffdff); 98 if (omap_secure_apis_support())
99 omap_modify_auxcoreboot0(0x200, 0xfffffdff);
100 else
101 __raw_writel(0x20, base + OMAP_AUX_CORE_BOOT_0);
102
89 flush_cache_all(); 103 flush_cache_all();
90 smp_wmb(); 104 smp_wmb();
91 105
@@ -124,13 +138,19 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
124 138
125static void __init wakeup_secondary(void) 139static void __init wakeup_secondary(void)
126{ 140{
141 void __iomem *base = omap_get_wakeupgen_base();
127 /* 142 /*
128 * Write the address of secondary startup routine into the 143 * Write the address of secondary startup routine into the
129 * AuxCoreBoot1 where ROM code will jump and start executing 144 * AuxCoreBoot1 where ROM code will jump and start executing
130 * on secondary core once out of WFE 145 * on secondary core once out of WFE
131 * A barrier is added to ensure that write buffer is drained 146 * A barrier is added to ensure that write buffer is drained
132 */ 147 */
133 omap_auxcoreboot_addr(virt_to_phys(omap_secondary_startup)); 148 if (omap_secure_apis_support())
149 omap_auxcoreboot_addr(virt_to_phys(omap_secondary_startup));
150 else
151 __raw_writel(virt_to_phys(omap5_secondary_startup),
152 base + OMAP_AUX_CORE_BOOT_1);
153
134 smp_wmb(); 154 smp_wmb();
135 155
136 /* 156 /*
@@ -147,16 +167,21 @@ static void __init wakeup_secondary(void)
147 */ 167 */
148void __init smp_init_cpus(void) 168void __init smp_init_cpus(void)
149{ 169{
150 unsigned int i, ncores; 170 unsigned int i = 0, ncores = 1, cpu_id;
151 171
152 /* 172 /* Use ARM cpuid check here, as SoC detection will not work so early */
153 * Currently we can't call ioremap here because 173 cpu_id = read_cpuid(CPUID_ID) & CPU_MASK;
154 * SoC detection won't work until after init_early. 174 if (cpu_id == CPU_CORTEX_A9) {
155 */ 175 /*
156 scu_base = OMAP2_L4_IO_ADDRESS(OMAP44XX_SCU_BASE); 176 * Currently we can't call ioremap here because
157 BUG_ON(!scu_base); 177 * SoC detection won't work until after init_early.
158 178 */
159 ncores = scu_get_core_count(scu_base); 179 scu_base = OMAP2_L4_IO_ADDRESS(OMAP44XX_SCU_BASE);
180 BUG_ON(!scu_base);
181 ncores = scu_get_core_count(scu_base);
182 } else if (cpu_id == CPU_CORTEX_A15) {
183 ncores = OMAP5_CORE_COUNT;
184 }
160 185
161 /* sanity check */ 186 /* sanity check */
162 if (ncores > nr_cpu_ids) { 187 if (ncores > nr_cpu_ids) {
@@ -178,6 +203,7 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)
178 * Initialise the SCU and wake up the secondary core using 203 * Initialise the SCU and wake up the secondary core using
179 * wakeup_secondary(). 204 * wakeup_secondary().
180 */ 205 */
181 scu_enable(scu_base); 206 if (scu_base)
207 scu_enable(scu_base);
182 wakeup_secondary(); 208 wakeup_secondary();
183} 209}
diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c
index d811c7790350..05fdebfaa195 100644
--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -33,18 +33,23 @@
33#include "omap4-sar-layout.h" 33#include "omap4-sar-layout.h"
34#include "common.h" 34#include "common.h"
35 35
36#define NR_REG_BANKS 4 36#define MAX_NR_REG_BANKS 5
37#define MAX_IRQS 128 37#define MAX_IRQS 160
38#define WKG_MASK_ALL 0x00000000 38#define WKG_MASK_ALL 0x00000000
39#define WKG_UNMASK_ALL 0xffffffff 39#define WKG_UNMASK_ALL 0xffffffff
40#define CPU_ENA_OFFSET 0x400 40#define CPU_ENA_OFFSET 0x400
41#define CPU0_ID 0x0 41#define CPU0_ID 0x0
42#define CPU1_ID 0x1 42#define CPU1_ID 0x1
43#define OMAP4_NR_BANKS 4
44#define OMAP4_NR_IRQS 128
43 45
44static void __iomem *wakeupgen_base; 46static void __iomem *wakeupgen_base;
45static void __iomem *sar_base; 47static void __iomem *sar_base;
46static DEFINE_SPINLOCK(wakeupgen_lock); 48static DEFINE_SPINLOCK(wakeupgen_lock);
47static unsigned int irq_target_cpu[NR_IRQS]; 49static unsigned int irq_target_cpu[NR_IRQS];
50static unsigned int irq_banks = MAX_NR_REG_BANKS;
51static unsigned int max_irqs = MAX_IRQS;
52static unsigned int omap_secure_apis;
48 53
49/* 54/*
50 * Static helper functions. 55 * Static helper functions.
@@ -146,13 +151,13 @@ static void wakeupgen_unmask(struct irq_data *d)
146} 151}
147 152
148#ifdef CONFIG_HOTPLUG_CPU 153#ifdef CONFIG_HOTPLUG_CPU
149static DEFINE_PER_CPU(u32 [NR_REG_BANKS], irqmasks); 154static DEFINE_PER_CPU(u32 [MAX_NR_REG_BANKS], irqmasks);
150 155
151static void _wakeupgen_save_masks(unsigned int cpu) 156static void _wakeupgen_save_masks(unsigned int cpu)
152{ 157{
153 u8 i; 158 u8 i;
154 159
155 for (i = 0; i < NR_REG_BANKS; i++) 160 for (i = 0; i < irq_banks; i++)
156 per_cpu(irqmasks, cpu)[i] = wakeupgen_readl(i, cpu); 161 per_cpu(irqmasks, cpu)[i] = wakeupgen_readl(i, cpu);
157} 162}
158 163
@@ -160,7 +165,7 @@ static void _wakeupgen_restore_masks(unsigned int cpu)
160{ 165{
161 u8 i; 166 u8 i;
162 167
163 for (i = 0; i < NR_REG_BANKS; i++) 168 for (i = 0; i < irq_banks; i++)
164 wakeupgen_writel(per_cpu(irqmasks, cpu)[i], i, cpu); 169 wakeupgen_writel(per_cpu(irqmasks, cpu)[i], i, cpu);
165} 170}
166 171
@@ -168,7 +173,7 @@ static void _wakeupgen_set_all(unsigned int cpu, unsigned int reg)
168{ 173{
169 u8 i; 174 u8 i;
170 175
171 for (i = 0; i < NR_REG_BANKS; i++) 176 for (i = 0; i < irq_banks; i++)
172 wakeupgen_writel(reg, i, cpu); 177 wakeupgen_writel(reg, i, cpu);
173} 178}
174 179
@@ -196,25 +201,14 @@ static void wakeupgen_irqmask_all(unsigned int cpu, unsigned int set)
196#endif 201#endif
197 202
198#ifdef CONFIG_CPU_PM 203#ifdef CONFIG_CPU_PM
199/* 204static inline void omap4_irq_save_context(void)
200 * Save WakeupGen interrupt context in SAR BANK3. Restore is done by
201 * ROM code. WakeupGen IP is integrated along with GIC to manage the
202 * interrupt wakeups from CPU low power states. It manages
203 * masking/unmasking of Shared peripheral interrupts(SPI). So the
204 * interrupt enable/disable control should be in sync and consistent
205 * at WakeupGen and GIC so that interrupts are not lost.
206 */
207static void irq_save_context(void)
208{ 205{
209 u32 i, val; 206 u32 i, val;
210 207
211 if (omap_rev() == OMAP4430_REV_ES1_0) 208 if (omap_rev() == OMAP4430_REV_ES1_0)
212 return; 209 return;
213 210
214 if (!sar_base) 211 for (i = 0; i < irq_banks; i++) {
215 sar_base = omap4_get_sar_ram_base();
216
217 for (i = 0; i < NR_REG_BANKS; i++) {
218 /* Save the CPUx interrupt mask for IRQ 0 to 127 */ 212 /* Save the CPUx interrupt mask for IRQ 0 to 127 */
219 val = wakeupgen_readl(i, 0); 213 val = wakeupgen_readl(i, 0);
220 sar_writel(val, WAKEUPGENENB_OFFSET_CPU0, i); 214 sar_writel(val, WAKEUPGENENB_OFFSET_CPU0, i);
@@ -254,6 +248,53 @@ static void irq_save_context(void)
254 val = __raw_readl(sar_base + SAR_BACKUP_STATUS_OFFSET); 248 val = __raw_readl(sar_base + SAR_BACKUP_STATUS_OFFSET);
255 val |= SAR_BACKUP_STATUS_WAKEUPGEN; 249 val |= SAR_BACKUP_STATUS_WAKEUPGEN;
256 __raw_writel(val, sar_base + SAR_BACKUP_STATUS_OFFSET); 250 __raw_writel(val, sar_base + SAR_BACKUP_STATUS_OFFSET);
251
252}
253
254static inline void omap5_irq_save_context(void)
255{
256 u32 i, val;
257
258 for (i = 0; i < irq_banks; i++) {
259 /* Save the CPUx interrupt mask for IRQ 0 to 159 */
260 val = wakeupgen_readl(i, 0);
261 sar_writel(val, OMAP5_WAKEUPGENENB_OFFSET_CPU0, i);
262 val = wakeupgen_readl(i, 1);
263 sar_writel(val, OMAP5_WAKEUPGENENB_OFFSET_CPU1, i);
264 sar_writel(0x0, OMAP5_WAKEUPGENENB_SECURE_OFFSET_CPU0, i);
265 sar_writel(0x0, OMAP5_WAKEUPGENENB_SECURE_OFFSET_CPU1, i);
266 }
267
268 /* Save AuxBoot* registers */
269 val = __raw_readl(wakeupgen_base + OMAP_AUX_CORE_BOOT_0);
270 __raw_writel(val, sar_base + OMAP5_AUXCOREBOOT0_OFFSET);
271 val = __raw_readl(wakeupgen_base + OMAP_AUX_CORE_BOOT_0);
272 __raw_writel(val, sar_base + OMAP5_AUXCOREBOOT1_OFFSET);
273
274 /* Set the Backup Bit Mask status */
275 val = __raw_readl(sar_base + OMAP5_SAR_BACKUP_STATUS_OFFSET);
276 val |= SAR_BACKUP_STATUS_WAKEUPGEN;
277 __raw_writel(val, sar_base + OMAP5_SAR_BACKUP_STATUS_OFFSET);
278
279}
280
281/*
282 * Save WakeupGen interrupt context in SAR BANK3. Restore is done by
283 * ROM code. WakeupGen IP is integrated along with GIC to manage the
284 * interrupt wakeups from CPU low power states. It manages
285 * masking/unmasking of Shared peripheral interrupts(SPI). So the
286 * interrupt enable/disable control should be in sync and consistent
287 * at WakeupGen and GIC so that interrupts are not lost.
288 */
289static void irq_save_context(void)
290{
291 if (!sar_base)
292 sar_base = omap4_get_sar_ram_base();
293
294 if (soc_is_omap54xx())
295 omap5_irq_save_context();
296 else
297 omap4_irq_save_context();
257} 298}
258 299
259/* 300/*
@@ -262,9 +303,14 @@ static void irq_save_context(void)
262static void irq_sar_clear(void) 303static void irq_sar_clear(void)
263{ 304{
264 u32 val; 305 u32 val;
265 val = __raw_readl(sar_base + SAR_BACKUP_STATUS_OFFSET); 306 u32 offset = SAR_BACKUP_STATUS_OFFSET;
307
308 if (soc_is_omap54xx())
309 offset = OMAP5_SAR_BACKUP_STATUS_OFFSET;
310
311 val = __raw_readl(sar_base + offset);
266 val &= ~SAR_BACKUP_STATUS_WAKEUPGEN; 312 val &= ~SAR_BACKUP_STATUS_WAKEUPGEN;
267 __raw_writel(val, sar_base + SAR_BACKUP_STATUS_OFFSET); 313 __raw_writel(val, sar_base + offset);
268} 314}
269 315
270/* 316/*
@@ -336,13 +382,25 @@ static struct notifier_block irq_notifier_block = {
336 382
337static void __init irq_pm_init(void) 383static void __init irq_pm_init(void)
338{ 384{
339 cpu_pm_register_notifier(&irq_notifier_block); 385 /* FIXME: Remove this when MPU OSWR support is added */
386 if (!soc_is_omap54xx())
387 cpu_pm_register_notifier(&irq_notifier_block);
340} 388}
341#else 389#else
342static void __init irq_pm_init(void) 390static void __init irq_pm_init(void)
343{} 391{}
344#endif 392#endif
345 393
394void __iomem *omap_get_wakeupgen_base(void)
395{
396 return wakeupgen_base;
397}
398
399int omap_secure_apis_support(void)
400{
401 return omap_secure_apis;
402}
403
346/* 404/*
347 * Initialise the wakeupgen module. 405 * Initialise the wakeupgen module.
348 */ 406 */
@@ -358,12 +416,18 @@ int __init omap_wakeupgen_init(void)
358 } 416 }
359 417
360 /* Static mapping, never released */ 418 /* Static mapping, never released */
361 wakeupgen_base = ioremap(OMAP44XX_WKUPGEN_BASE, SZ_4K); 419 wakeupgen_base = ioremap(OMAP_WKUPGEN_BASE, SZ_4K);
362 if (WARN_ON(!wakeupgen_base)) 420 if (WARN_ON(!wakeupgen_base))
363 return -ENOMEM; 421 return -ENOMEM;
364 422
423 if (cpu_is_omap44xx()) {
424 irq_banks = OMAP4_NR_BANKS;
425 max_irqs = OMAP4_NR_IRQS;
426 omap_secure_apis = 1;
427 }
428
365 /* Clear all IRQ bitmasks at wakeupGen level */ 429 /* Clear all IRQ bitmasks at wakeupGen level */
366 for (i = 0; i < NR_REG_BANKS; i++) { 430 for (i = 0; i < irq_banks; i++) {
367 wakeupgen_writel(0, i, CPU0_ID); 431 wakeupgen_writel(0, i, CPU0_ID);
368 wakeupgen_writel(0, i, CPU1_ID); 432 wakeupgen_writel(0, i, CPU1_ID);
369 } 433 }
@@ -382,7 +446,7 @@ int __init omap_wakeupgen_init(void)
382 */ 446 */
383 447
384 /* Associate all the IRQs to boot CPU like GIC init does. */ 448 /* Associate all the IRQs to boot CPU like GIC init does. */
385 for (i = 0; i < NR_IRQS; i++) 449 for (i = 0; i < max_irqs; i++)
386 irq_target_cpu[i] = boot_cpu; 450 irq_target_cpu[i] = boot_cpu;
387 451
388 irq_hotplug_init(); 452 irq_hotplug_init();
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index a8161e5f3204..c29dee998a79 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -21,6 +21,8 @@
21#include <asm/hardware/cache-l2x0.h> 21#include <asm/hardware/cache-l2x0.h>
22#include <asm/mach/map.h> 22#include <asm/mach/map.h>
23#include <asm/memblock.h> 23#include <asm/memblock.h>
24#include <linux/of_irq.h>
25#include <linux/of_platform.h>
24 26
25#include <plat/irqs.h> 27#include <plat/irqs.h>
26#include <plat/sram.h> 28#include <plat/sram.h>
@@ -210,6 +212,18 @@ static int __init omap4_sar_ram_init(void)
210} 212}
211early_initcall(omap4_sar_ram_init); 213early_initcall(omap4_sar_ram_init);
212 214
215static struct of_device_id irq_match[] __initdata = {
216 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
217 { .compatible = "arm,cortex-a15-gic", .data = gic_of_init, },
218 { }
219};
220
221void __init omap_gic_of_init(void)
222{
223 omap_wakeupgen_init();
224 of_irq_init(irq_match);
225}
226
213#if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) 227#if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
214static int omap4_twl6030_hsmmc_late_init(struct device *dev) 228static int omap4_twl6030_hsmmc_late_init(struct device *dev)
215{ 229{
diff --git a/arch/arm/mach-omap2/omap4-sar-layout.h b/arch/arm/mach-omap2/omap4-sar-layout.h
index fe5b545ad443..e170fe803b04 100644
--- a/arch/arm/mach-omap2/omap4-sar-layout.h
+++ b/arch/arm/mach-omap2/omap4-sar-layout.h
@@ -12,7 +12,7 @@
12#define OMAP_ARCH_OMAP4_SAR_LAYOUT_H 12#define OMAP_ARCH_OMAP4_SAR_LAYOUT_H
13 13
14/* 14/*
15 * SAR BANK offsets from base address OMAP44XX_SAR_RAM_BASE 15 * SAR BANK offsets from base address OMAP44XX/54XX_SAR_RAM_BASE
16 */ 16 */
17#define SAR_BANK1_OFFSET 0x0000 17#define SAR_BANK1_OFFSET 0x0000
18#define SAR_BANK2_OFFSET 0x1000 18#define SAR_BANK2_OFFSET 0x1000
@@ -47,4 +47,14 @@
47#define PTMSYNCREQ_EN_OFFSET (SAR_BANK3_OFFSET + 0x6d0) 47#define PTMSYNCREQ_EN_OFFSET (SAR_BANK3_OFFSET + 0x6d0)
48#define SAR_BACKUP_STATUS_WAKEUPGEN 0x10 48#define SAR_BACKUP_STATUS_WAKEUPGEN 0x10
49 49
50/* WakeUpGen save restore offset from OMAP54XX_SAR_RAM_BASE */
51#define OMAP5_WAKEUPGENENB_OFFSET_CPU0 (SAR_BANK3_OFFSET + 0x8d4)
52#define OMAP5_WAKEUPGENENB_SECURE_OFFSET_CPU0 (SAR_BANK3_OFFSET + 0x8e8)
53#define OMAP5_WAKEUPGENENB_OFFSET_CPU1 (SAR_BANK3_OFFSET + 0x8fc)
54#define OMAP5_WAKEUPGENENB_SECURE_OFFSET_CPU1 (SAR_BANK3_OFFSET + 0x910)
55#define OMAP5_AUXCOREBOOT0_OFFSET (SAR_BANK3_OFFSET + 0x924)
56#define OMAP5_AUXCOREBOOT1_OFFSET (SAR_BANK3_OFFSET + 0x928)
57#define OMAP5_AMBA_IF_MODE_OFFSET (SAR_BANK3_OFFSET + 0x92c)
58#define OMAP5_SAR_BACKUP_STATUS_OFFSET (SAR_BANK3_OFFSET + 0x800)
59
50#endif 60#endif
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 5d82bfca38c3..3f21568f1753 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3635,7 +3635,7 @@ void __init omap_hwmod_init(void)
3635 soc_ops.assert_hardreset = _omap2_assert_hardreset; 3635 soc_ops.assert_hardreset = _omap2_assert_hardreset;
3636 soc_ops.deassert_hardreset = _omap2_deassert_hardreset; 3636 soc_ops.deassert_hardreset = _omap2_deassert_hardreset;
3637 soc_ops.is_hardreset_asserted = _omap2_is_hardreset_asserted; 3637 soc_ops.is_hardreset_asserted = _omap2_is_hardreset_asserted;
3638 } else if (cpu_is_omap44xx()) { 3638 } else if (cpu_is_omap44xx() || soc_is_omap54xx()) {
3639 soc_ops.enable_module = _omap4_enable_module; 3639 soc_ops.enable_module = _omap4_enable_module;
3640 soc_ops.disable_module = _omap4_disable_module; 3640 soc_ops.disable_module = _omap4_disable_module;
3641 soc_ops.wait_target_ready = _omap4_wait_target_ready; 3641 soc_ops.wait_target_ready = _omap4_wait_target_ready;
diff --git a/arch/arm/mach-omap2/omap_l3_noc.h b/arch/arm/mach-omap2/omap_l3_noc.h
index 90b50984cd2e..a6ce34dc4814 100644
--- a/arch/arm/mach-omap2/omap_l3_noc.h
+++ b/arch/arm/mach-omap2/omap_l3_noc.h
@@ -51,7 +51,9 @@ static u32 l3_targ_inst_clk1[] = {
51 0x200, /* DMM2 */ 51 0x200, /* DMM2 */
52 0x300, /* ABE */ 52 0x300, /* ABE */
53 0x400, /* L4CFG */ 53 0x400, /* L4CFG */
54 0x600 /* CLK2 PWR DISC */ 54 0x600, /* CLK2 PWR DISC */
55 0x0, /* Host CLK1 */
56 0x900 /* L4 Wakeup */
55}; 57};
56 58
57static u32 l3_targ_inst_clk2[] = { 59static u32 l3_targ_inst_clk2[] = {
@@ -72,11 +74,16 @@ static u32 l3_targ_inst_clk2[] = {
72 0xE00, /* missing in TRM corresponds to AES2*/ 74 0xE00, /* missing in TRM corresponds to AES2*/
73 0xC00, /* L4 PER3 */ 75 0xC00, /* L4 PER3 */
74 0xA00, /* L4 PER1*/ 76 0xA00, /* L4 PER1*/
75 0xB00 /* L4 PER2*/ 77 0xB00, /* L4 PER2*/
78 0x0, /* HOST CLK2 */
79 0x1800, /* CAL */
80 0x1700 /* LLI */
76}; 81};
77 82
78static u32 l3_targ_inst_clk3[] = { 83static u32 l3_targ_inst_clk3[] = {
79 0x0100 /* EMUSS */ 84 0x0100 /* EMUSS */,
85 0x0300, /* DEBUGSS_CT_TBR */
86 0x0 /* HOST CLK3 */
80}; 87};
81 88
82static struct l3_masters_data { 89static struct l3_masters_data {
@@ -110,13 +117,15 @@ static struct l3_masters_data {
110 { 0xC8, "USBHOSTFS"} 117 { 0xC8, "USBHOSTFS"}
111}; 118};
112 119
113static char *l3_targ_inst_name[L3_MODULES][18] = { 120static char *l3_targ_inst_name[L3_MODULES][21] = {
114 { 121 {
115 "DMM1", 122 "DMM1",
116 "DMM2", 123 "DMM2",
117 "ABE", 124 "ABE",
118 "L4CFG", 125 "L4CFG",
119 "CLK2 PWR DISC", 126 "CLK2 PWR DISC",
127 "HOST CLK1",
128 "L4 WAKEUP"
120 }, 129 },
121 { 130 {
122 "CORTEX M3" , 131 "CORTEX M3" ,
@@ -137,9 +146,14 @@ static char *l3_targ_inst_name[L3_MODULES][18] = {
137 "L4 PER3", 146 "L4 PER3",
138 "L4 PER1", 147 "L4 PER1",
139 "L4 PER2", 148 "L4 PER2",
149 "HOST CLK2",
150 "CAL",
151 "LLI"
140 }, 152 },
141 { 153 {
142 "EMUSS", 154 "EMUSS",
155 "DEBUG SOURCE",
156 "HOST CLK3"
143 }, 157 },
144}; 158};
145 159
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h
index cc1398e8b469..d5ae4e234bbc 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -416,7 +416,7 @@ extern void __iomem *cm_base;
416extern void __iomem *cm2_base; 416extern void __iomem *cm2_base;
417extern void __iomem *prcm_mpu_base; 417extern void __iomem *prcm_mpu_base;
418 418
419#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_ARCH_OMAP5) 419#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
420extern void omap_prm_base_init(void); 420extern void omap_prm_base_init(void);
421extern void omap_cm_base_init(void); 421extern void omap_cm_base_init(void);
422#else 422#else
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 28cbfb2b5733..053e24ed3c48 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -160,7 +160,7 @@ void __init omap2_set_globals_prcm(struct omap_globals *omap2_globals)
160 if (omap2_globals->prcm_mpu) 160 if (omap2_globals->prcm_mpu)
161 prcm_mpu_base = omap2_globals->prcm_mpu; 161 prcm_mpu_base = omap2_globals->prcm_mpu;
162 162
163 if (cpu_is_omap44xx()) { 163 if (cpu_is_omap44xx() || soc_is_omap54xx()) {
164 omap_prm_base_init(); 164 omap_prm_base_init();
165 omap_cm_base_init(); 165 omap_cm_base_init();
166 } 166 }
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 2b318ec92d39..13d20c8a283d 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -393,6 +393,11 @@ static void __init omap4_timer_init(void)
393OMAP_SYS_TIMER(4) 393OMAP_SYS_TIMER(4)
394#endif 394#endif
395 395
396#ifdef CONFIG_SOC_OMAP5
397OMAP_SYS_TIMER_INIT(5, 1, OMAP4_CLKEV_SOURCE, 2, OMAP4_MPU_SOURCE)
398OMAP_SYS_TIMER(5)
399#endif
400
396/** 401/**
397 * omap_timer_init - build and register timer device with an 402 * omap_timer_init - build and register timer device with an
398 * associated timer hwmod 403 * associated timer hwmod
diff --git a/arch/arm/mach-socfpga/Makefile b/arch/arm/mach-socfpga/Makefile
new file mode 100644
index 000000000000..4fb93240971d
--- /dev/null
+++ b/arch/arm/mach-socfpga/Makefile
@@ -0,0 +1,5 @@
1#
2# Makefile for the linux kernel.
3#
4
5obj-y := socfpga.o
diff --git a/arch/arm/mach-socfpga/Makefile.boot b/arch/arm/mach-socfpga/Makefile.boot
new file mode 100644
index 000000000000..dae9661a7689
--- /dev/null
+++ b/arch/arm/mach-socfpga/Makefile.boot
@@ -0,0 +1 @@
zreladdr-y := 0x00008000
diff --git a/arch/arm/mach-socfpga/include/mach/debug-macro.S b/arch/arm/mach-socfpga/include/mach/debug-macro.S
new file mode 100644
index 000000000000..d6f26d23374f
--- /dev/null
+++ b/arch/arm/mach-socfpga/include/mach/debug-macro.S
@@ -0,0 +1,16 @@
1/*
2 * Copyright (C) 1994-1999 Russell King
3 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10 .macro addruart, rp, rv, tmp
11 mov \rp, #DEBUG_LL_UART_OFFSET
12 orr \rp, \rp, #0x00c00000
13 orr \rv, \rp, #0xfe000000 @ virtual base
14 orr \rp, \rp, #0xff000000 @ physical base
15 .endm
16
diff --git a/arch/arm/mach-socfpga/include/mach/timex.h b/arch/arm/mach-socfpga/include/mach/timex.h
new file mode 100644
index 000000000000..43df4354e461
--- /dev/null
+++ b/arch/arm/mach-socfpga/include/mach/timex.h
@@ -0,0 +1,19 @@
1/*
2 * Copyright (C) 2003 ARM Limited
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#define CLOCK_TICK_RATE (50000000 / 16)
diff --git a/arch/arm/mach-socfpga/include/mach/uncompress.h b/arch/arm/mach-socfpga/include/mach/uncompress.h
new file mode 100644
index 000000000000..bbe20e696325
--- /dev/null
+++ b/arch/arm/mach-socfpga/include/mach/uncompress.h
@@ -0,0 +1,9 @@
1#ifndef __MACH_UNCOMPRESS_H
2#define __MACH_UNCOMPRESS_H
3
4#define putc(c)
5#define flush()
6#define arch_decomp_setup()
7#define arch_decomp_wdog()
8
9#endif
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c
new file mode 100644
index 000000000000..f01e1ebf5396
--- /dev/null
+++ b/arch/arm/mach-socfpga/socfpga.c
@@ -0,0 +1,62 @@
1/*
2 * Copyright (C) 2012 Altera Corporation
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, see <http://www.gnu.org/licenses/>.
16 */
17#include <linux/dw_apb_timer.h>
18#include <linux/of_irq.h>
19#include <linux/of_platform.h>
20
21#include <asm/hardware/cache-l2x0.h>
22#include <asm/hardware/gic.h>
23#include <asm/mach/arch.h>
24
25extern void socfpga_init_clocks(void);
26
27const static struct of_device_id irq_match[] = {
28 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
29 {}
30};
31
32static void __init gic_init_irq(void)
33{
34 of_irq_init(irq_match);
35}
36
37static void socfpga_cyclone5_restart(char mode, const char *cmd)
38{
39 /* TODO: */
40}
41
42static void __init socfpga_cyclone5_init(void)
43{
44 l2x0_of_init(0, ~0UL);
45 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
46 socfpga_init_clocks();
47}
48
49static const char *altera_dt_match[] = {
50 "altr,socfpga",
51 "altr,socfpga-cyclone5",
52 NULL
53};
54
55DT_MACHINE_START(SOCFPGA, "Altera SOCFPGA")
56 .init_irq = gic_init_irq,
57 .handle_irq = gic_handle_irq,
58 .timer = &dw_apb_timer,
59 .init_machine = socfpga_cyclone5_init,
60 .restart = socfpga_cyclone5_restart,
61 .dt_compat = altera_dt_match,
62MACHINE_END
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index ad95c7a5d009..dcfb506a592e 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -29,7 +29,7 @@ config ARCH_OMAP2PLUS
29 select USE_OF 29 select USE_OF
30 select PROC_DEVICETREE if PROC_FS 30 select PROC_DEVICETREE if PROC_FS
31 help 31 help
32 "Systems based on OMAP2, OMAP3 or OMAP4" 32 "Systems based on OMAP2, OMAP3, OMAP4 or OMAP5"
33 33
34endchoice 34endchoice
35 35
@@ -150,7 +150,7 @@ config OMAP_32K_TIMER
150 This timer saves power compared to the OMAP_MPU_TIMER, and has 150 This timer saves power compared to the OMAP_MPU_TIMER, and has
151 support for no tick during idle. The 32KHz timer provides less 151 support for no tick during idle. The 32KHz timer provides less
152 intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is 152 intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is
153 currently only available for OMAP16XX, 24XX, 34XX and OMAP4. 153 currently only available for OMAP16XX, 24XX, 34XX and OMAP4/5.
154 154
155config OMAP3_L2_AUX_SECURE_SAVE_RESTORE 155config OMAP3_L2_AUX_SECURE_SAVE_RESTORE
156 bool "OMAP3 HS/EMU save and restore for L2 AUX control register" 156 bool "OMAP3 HS/EMU save and restore for L2 AUX control register"
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index 0a9b9a970113..89a3723b3538 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -77,3 +77,12 @@ void __init omap_init_consistent_dma_size(void)
77 init_consistent_dma_size(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE << 20); 77 init_consistent_dma_size(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE << 20);
78#endif 78#endif
79} 79}
80
81/*
82 * Stub function for OMAP2 so that common files
83 * continue to build when custom builds are used
84 */
85int __weak omap_secure_ram_reserve_memblock(void)
86{
87 return 0;
88}
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c
index 2132c4f389e1..dbf1e03029a5 100644
--- a/arch/arm/plat-omap/counter_32k.c
+++ b/arch/arm/plat-omap/counter_32k.c
@@ -29,7 +29,10 @@
29#include <plat/clock.h> 29#include <plat/clock.h>
30 30
31/* OMAP2_32KSYNCNT_CR_OFF: offset of 32ksync counter register */ 31/* OMAP2_32KSYNCNT_CR_OFF: offset of 32ksync counter register */
32#define OMAP2_32KSYNCNT_CR_OFF 0x10 32#define OMAP2_32KSYNCNT_REV_OFF 0x0
33#define OMAP2_32KSYNCNT_REV_SCHEME (0x3 << 30)
34#define OMAP2_32KSYNCNT_CR_OFF_LOW 0x10
35#define OMAP2_32KSYNCNT_CR_OFF_HIGH 0x30
33 36
34/* 37/*
35 * 32KHz clocksource ... always available, on pretty most chips except 38 * 32KHz clocksource ... always available, on pretty most chips except
@@ -84,9 +87,16 @@ int __init omap_init_clocksource_32k(void __iomem *vbase)
84 int ret; 87 int ret;
85 88
86 /* 89 /*
87 * 32k sync Counter register offset is at 0x10 90 * 32k sync Counter IP register offsets vary between the
91 * highlander version and the legacy ones.
92 * The 'SCHEME' bits(30-31) of the revision register is used
93 * to identify the version.
88 */ 94 */
89 sync32k_cnt_reg = vbase + OMAP2_32KSYNCNT_CR_OFF; 95 if (__raw_readl(vbase + OMAP2_32KSYNCNT_REV_OFF) &
96 OMAP2_32KSYNCNT_REV_SCHEME)
97 sync32k_cnt_reg = vbase + OMAP2_32KSYNCNT_CR_OFF_HIGH;
98 else
99 sync32k_cnt_reg = vbase + OMAP2_32KSYNCNT_CR_OFF_LOW;
90 100
91 /* 101 /*
92 * 120000 rough estimate from the calculations in 102 * 120000 rough estimate from the calculations in
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index f91e0b99b30c..68b180edcfff 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -9,7 +9,7 @@
9 * 9 *
10 * Written by Tony Lindgren <tony.lindgren@nokia.com> 10 * Written by Tony Lindgren <tony.lindgren@nokia.com>
11 * 11 *
12 * Added OMAP4 specific defines - Santosh Shilimkar<santosh.shilimkar@ti.com> 12 * Added OMAP4/5 specific defines - Santosh Shilimkar<santosh.shilimkar@ti.com>
13 * 13 *
14 * This program is free software; you can redistribute it and/or modify 14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by 15 * it under the terms of the GNU General Public License as published by
@@ -70,6 +70,7 @@ unsigned int omap_rev(void);
70 * cpu_is_omap443x(): True for OMAP4430 70 * cpu_is_omap443x(): True for OMAP4430
71 * cpu_is_omap446x(): True for OMAP4460 71 * cpu_is_omap446x(): True for OMAP4460
72 * cpu_is_omap447x(): True for OMAP4470 72 * cpu_is_omap447x(): True for OMAP4470
73 * soc_is_omap543x(): True for OMAP5430, OMAP5432
73 */ 74 */
74#define GET_OMAP_CLASS (omap_rev() & 0xff) 75#define GET_OMAP_CLASS (omap_rev() & 0xff)
75 76
@@ -122,6 +123,7 @@ IS_OMAP_CLASS(24xx, 0x24)
122IS_OMAP_CLASS(34xx, 0x34) 123IS_OMAP_CLASS(34xx, 0x34)
123IS_OMAP_CLASS(44xx, 0x44) 124IS_OMAP_CLASS(44xx, 0x44)
124IS_AM_CLASS(35xx, 0x35) 125IS_AM_CLASS(35xx, 0x35)
126IS_OMAP_CLASS(54xx, 0x54)
125IS_AM_CLASS(33xx, 0x33) 127IS_AM_CLASS(33xx, 0x33)
126 128
127IS_TI_CLASS(81xx, 0x81) 129IS_TI_CLASS(81xx, 0x81)
@@ -133,6 +135,7 @@ IS_OMAP_SUBCLASS(363x, 0x363)
133IS_OMAP_SUBCLASS(443x, 0x443) 135IS_OMAP_SUBCLASS(443x, 0x443)
134IS_OMAP_SUBCLASS(446x, 0x446) 136IS_OMAP_SUBCLASS(446x, 0x446)
135IS_OMAP_SUBCLASS(447x, 0x447) 137IS_OMAP_SUBCLASS(447x, 0x447)
138IS_OMAP_SUBCLASS(543x, 0x543)
136 139
137IS_TI_SUBCLASS(816x, 0x816) 140IS_TI_SUBCLASS(816x, 0x816)
138IS_TI_SUBCLASS(814x, 0x814) 141IS_TI_SUBCLASS(814x, 0x814)
@@ -156,6 +159,8 @@ IS_AM_SUBCLASS(335x, 0x335)
156#define cpu_is_omap443x() 0 159#define cpu_is_omap443x() 0
157#define cpu_is_omap446x() 0 160#define cpu_is_omap446x() 0
158#define cpu_is_omap447x() 0 161#define cpu_is_omap447x() 0
162#define soc_is_omap54xx() 0
163#define soc_is_omap543x() 0
159 164
160#if defined(MULTI_OMAP1) 165#if defined(MULTI_OMAP1)
161# if defined(CONFIG_ARCH_OMAP730) 166# if defined(CONFIG_ARCH_OMAP730)
@@ -285,6 +290,7 @@ IS_OMAP_TYPE(3430, 0x3430)
285#define cpu_is_omap2430() 0 290#define cpu_is_omap2430() 0
286#define cpu_is_omap3430() 0 291#define cpu_is_omap3430() 0
287#define cpu_is_omap3630() 0 292#define cpu_is_omap3630() 0
293#define soc_is_omap5430() 0
288 294
289/* 295/*
290 * Whether we have MULTI_OMAP1 or not, we still need to distinguish 296 * Whether we have MULTI_OMAP1 or not, we still need to distinguish
@@ -355,11 +361,18 @@ IS_OMAP_TYPE(3430, 0x3430)
355# define cpu_is_omap447x() is_omap447x() 361# define cpu_is_omap447x() is_omap447x()
356# endif 362# endif
357 363
364# if defined(CONFIG_SOC_OMAP5)
365# undef soc_is_omap54xx
366# undef soc_is_omap543x
367# define soc_is_omap54xx() is_omap54xx()
368# define soc_is_omap543x() is_omap543x()
369#endif
370
358/* Macros to detect if we have OMAP1 or OMAP2 */ 371/* Macros to detect if we have OMAP1 or OMAP2 */
359#define cpu_class_is_omap1() (cpu_is_omap7xx() || cpu_is_omap15xx() || \ 372#define cpu_class_is_omap1() (cpu_is_omap7xx() || cpu_is_omap15xx() || \
360 cpu_is_omap16xx()) 373 cpu_is_omap16xx())
361#define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx() || \ 374#define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx() || \
362 cpu_is_omap44xx()) 375 cpu_is_omap44xx() || soc_is_omap54xx())
363 376
364/* Various silicon revisions for omap2 */ 377/* Various silicon revisions for omap2 */
365#define OMAP242X_CLASS 0x24200024 378#define OMAP242X_CLASS 0x24200024
@@ -412,9 +425,14 @@ IS_OMAP_TYPE(3430, 0x3430)
412#define OMAP447X_CLASS 0x44700044 425#define OMAP447X_CLASS 0x44700044
413#define OMAP4470_REV_ES1_0 (OMAP447X_CLASS | (0x10 << 8)) 426#define OMAP4470_REV_ES1_0 (OMAP447X_CLASS | (0x10 << 8))
414 427
428#define OMAP54XX_CLASS 0x54000054
429#define OMAP5430_REV_ES1_0 (OMAP54XX_CLASS | (0x30 << 16) | (0x10 << 8))
430#define OMAP5432_REV_ES1_0 (OMAP54XX_CLASS | (0x32 << 16) | (0x10 << 8))
431
415void omap2xxx_check_revision(void); 432void omap2xxx_check_revision(void);
416void omap3xxx_check_revision(void); 433void omap3xxx_check_revision(void);
417void omap4xxx_check_revision(void); 434void omap4xxx_check_revision(void);
435void omap5xxx_check_revision(void);
418void omap3xxx_check_features(void); 436void omap3xxx_check_features(void);
419void ti81xx_check_features(void); 437void ti81xx_check_features(void);
420void omap4xxx_check_features(void); 438void omap4xxx_check_features(void);
diff --git a/arch/arm/plat-omap/include/plat/hardware.h b/arch/arm/plat-omap/include/plat/hardware.h
index e897978371c2..ddbde38e1e33 100644
--- a/arch/arm/plat-omap/include/plat/hardware.h
+++ b/arch/arm/plat-omap/include/plat/hardware.h
@@ -288,5 +288,6 @@
288#include <plat/omap44xx.h> 288#include <plat/omap44xx.h>
289#include <plat/ti81xx.h> 289#include <plat/ti81xx.h>
290#include <plat/am33xx.h> 290#include <plat/am33xx.h>
291#include <plat/omap54xx.h>
291 292
292#endif /* __ASM_ARCH_OMAP_HARDWARE_H */ 293#endif /* __ASM_ARCH_OMAP_HARDWARE_H */
diff --git a/arch/arm/plat-omap/include/plat/multi.h b/arch/arm/plat-omap/include/plat/multi.h
index 999ffba2690c..045e320f1067 100644
--- a/arch/arm/plat-omap/include/plat/multi.h
+++ b/arch/arm/plat-omap/include/plat/multi.h
@@ -99,4 +99,13 @@
99# endif 99# endif
100#endif 100#endif
101 101
102#ifdef CONFIG_SOC_OMAP5
103# ifdef OMAP_NAME
104# undef MULTI_OMAP2
105# define MULTI_OMAP2
106# else
107# define OMAP_NAME omap5
108# endif
109#endif
110
102#endif /* __PLAT_OMAP_MULTI_H */ 111#endif /* __PLAT_OMAP_MULTI_H */
diff --git a/arch/arm/plat-omap/include/plat/omap-secure.h b/arch/arm/plat-omap/include/plat/omap-secure.h
index 8c7994ce9869..0e4acd2d2deb 100644
--- a/arch/arm/plat-omap/include/plat/omap-secure.h
+++ b/arch/arm/plat-omap/include/plat/omap-secure.h
@@ -3,12 +3,7 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5 5
6#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
7extern int omap_secure_ram_reserve_memblock(void); 6extern int omap_secure_ram_reserve_memblock(void);
8#else
9static inline void omap_secure_ram_reserve_memblock(void)
10{ }
11#endif
12 7
13#ifdef CONFIG_OMAP4_ERRATA_I688 8#ifdef CONFIG_OMAP4_ERRATA_I688
14extern int omap_barrier_reserve_memblock(void); 9extern int omap_barrier_reserve_memblock(void);
diff --git a/arch/arm/plat-omap/include/plat/omap54xx.h b/arch/arm/plat-omap/include/plat/omap54xx.h
new file mode 100644
index 000000000000..a2582bb3cab3
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/omap54xx.h
@@ -0,0 +1,32 @@
1/*:
2 * Address mappings and base address for OMAP5 interconnects
3 * and peripherals.
4 *
5 * Copyright (C) 2012 Texas Instruments
6 * Santosh Shilimkar <santosh.shilimkar@ti.com>
7 * Sricharan <r.sricharan@ti.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13#ifndef __ASM_SOC_OMAP54XX_H
14#define __ASM_SOC_OMAP54XX_H
15
16/*
17 * Please place only base defines here and put the rest in device
18 * specific headers.
19 */
20#define L4_54XX_BASE 0x4a000000
21#define L4_WK_54XX_BASE 0x4ae00000
22#define L4_PER_54XX_BASE 0x48000000
23#define L3_54XX_BASE 0x44000000
24#define OMAP54XX_32KSYNCT_BASE 0x4ae04000
25#define OMAP54XX_CM_CORE_AON_BASE 0x4a004000
26#define OMAP54XX_CM_CORE_BASE 0x4a008000
27#define OMAP54XX_PRM_BASE 0x4ae06000
28#define OMAP54XX_PRCM_MPU_BASE 0x48243000
29#define OMAP54XX_SCM_BASE 0x4a002000
30#define OMAP54XX_CTRL_BASE 0x4a002800
31
32#endif /* __ASM_SOC_OMAP555554XX_H */
diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h
index 28e2d250c2fd..65fce44dce34 100644
--- a/arch/arm/plat-omap/include/plat/serial.h
+++ b/arch/arm/plat-omap/include/plat/serial.h
@@ -63,6 +63,14 @@
63/* AM33XX serial port */ 63/* AM33XX serial port */
64#define AM33XX_UART1_BASE 0x44E09000 64#define AM33XX_UART1_BASE 0x44E09000
65 65
66/* OMAP5 serial ports */
67#define OMAP5_UART1_BASE OMAP2_UART1_BASE
68#define OMAP5_UART2_BASE OMAP2_UART2_BASE
69#define OMAP5_UART3_BASE OMAP4_UART3_BASE
70#define OMAP5_UART4_BASE OMAP4_UART4_BASE
71#define OMAP5_UART5_BASE 0x48066000
72#define OMAP5_UART6_BASE 0x48068000
73
66/* External port on Zoom2/3 */ 74/* External port on Zoom2/3 */
67#define ZOOM_UART_BASE 0x10000000 75#define ZOOM_UART_BASE 0x10000000
68#define ZOOM_UART_VIRT 0xfa400000 76#define ZOOM_UART_VIRT 0xfa400000
@@ -97,6 +105,8 @@
97#define TI81XXUART2 82 105#define TI81XXUART2 82
98#define TI81XXUART3 83 106#define TI81XXUART3 83
99#define AM33XXUART1 84 107#define AM33XXUART1 84
108#define OMAP5UART3 OMAP4UART3
109#define OMAP5UART4 OMAP4UART4
100#define ZOOM_UART 95 /* Only on zoom2/3 */ 110#define ZOOM_UART 95 /* Only on zoom2/3 */
101 111
102/* This is only used by 8250.c for omap1510 */ 112/* This is only used by 8250.c for omap1510 */
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
index ac4323390213..b8d19a136781 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -95,6 +95,9 @@ static inline void flush(void)
95 _DEBUG_LL_ENTRY(mach, OMAP4_UART##p##_BASE, OMAP_PORT_SHIFT, \ 95 _DEBUG_LL_ENTRY(mach, OMAP4_UART##p##_BASE, OMAP_PORT_SHIFT, \
96 OMAP4UART##p) 96 OMAP4UART##p)
97 97
98#define DEBUG_LL_OMAP5(p, mach) \
99 _DEBUG_LL_ENTRY(mach, OMAP5_UART##p##_BASE, OMAP_PORT_SHIFT, \
100 OMAP5UART##p)
98/* Zoom2/3 shift is different for UART1 and external port */ 101/* Zoom2/3 shift is different for UART1 and external port */
99#define DEBUG_LL_ZOOM(mach) \ 102#define DEBUG_LL_ZOOM(mach) \
100 _DEBUG_LL_ENTRY(mach, ZOOM_UART_BASE, ZOOM_PORT_SHIFT, ZOOM_UART) 103 _DEBUG_LL_ENTRY(mach, ZOOM_UART_BASE, ZOOM_PORT_SHIFT, ZOOM_UART)
@@ -177,6 +180,9 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
177 DEBUG_LL_OMAP4(3, omap_4430sdp); 180 DEBUG_LL_OMAP4(3, omap_4430sdp);
178 DEBUG_LL_OMAP4(3, omap4_panda); 181 DEBUG_LL_OMAP4(3, omap4_panda);
179 182
183 /* omap5 based boards using UART3 */
184 DEBUG_LL_OMAP5(3, omap5_sevm);
185
180 /* zoom2/3 external uart */ 186 /* zoom2/3 external uart */
181 DEBUG_LL_ZOOM(omap_zoom2); 187 DEBUG_LL_ZOOM(omap_zoom2);
182 DEBUG_LL_ZOOM(omap_zoom3); 188 DEBUG_LL_ZOOM(omap_zoom3);
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 70cf825bdd87..766181cb5c95 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -6,8 +6,8 @@
6 * Copyright (C) 2005 Nokia Corporation 6 * Copyright (C) 2005 Nokia Corporation
7 * Written by Tony Lindgren <tony@atomide.com> 7 * Written by Tony Lindgren <tony@atomide.com>
8 * 8 *
9 * Copyright (C) 2009 Texas Instruments 9 * Copyright (C) 2009-2012 Texas Instruments
10 * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> 10 * Added OMAP4/5 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
11 * 11 *
12 * This program is free software; you can redistribute it and/or modify 12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as 13 * it under the terms of the GNU General Public License version 2 as
@@ -44,6 +44,7 @@
44#else 44#else
45#define OMAP4_SRAM_PUB_PA (OMAP4_SRAM_PA + 0x4000) 45#define OMAP4_SRAM_PUB_PA (OMAP4_SRAM_PA + 0x4000)
46#endif 46#endif
47#define OMAP5_SRAM_PA 0x40300000
47 48
48#if defined(CONFIG_ARCH_OMAP2PLUS) 49#if defined(CONFIG_ARCH_OMAP2PLUS)
49#define SRAM_BOOTLOADER_SZ 0x00 50#define SRAM_BOOTLOADER_SZ 0x00
@@ -118,6 +119,9 @@ static void __init omap_detect_sram(void)
118 } else if (cpu_is_omap44xx()) { 119 } else if (cpu_is_omap44xx()) {
119 omap_sram_start = OMAP4_SRAM_PUB_PA; 120 omap_sram_start = OMAP4_SRAM_PUB_PA;
120 omap_sram_size = 0xa000; /* 40K */ 121 omap_sram_size = 0xa000; /* 40K */
122 } else if (soc_is_omap54xx()) {
123 omap_sram_start = OMAP5_SRAM_PA;
124 omap_sram_size = SZ_128K; /* 128KB */
121 } else { 125 } else {
122 omap_sram_start = OMAP2_SRAM_PUB_PA; 126 omap_sram_start = OMAP2_SRAM_PUB_PA;
123 omap_sram_size = 0x800; /* 2K */ 127 omap_sram_size = 0x800; /* 2K */
@@ -132,6 +136,9 @@ static void __init omap_detect_sram(void)
132 } else if (cpu_is_omap44xx()) { 136 } else if (cpu_is_omap44xx()) {
133 omap_sram_start = OMAP4_SRAM_PA; 137 omap_sram_start = OMAP4_SRAM_PA;
134 omap_sram_size = 0xe000; /* 56K */ 138 omap_sram_size = 0xe000; /* 56K */
139 } else if (soc_is_omap54xx()) {
140 omap_sram_start = OMAP5_SRAM_PA;
141 omap_sram_size = SZ_128K; /* 128KB */
135 } else { 142 } else {
136 omap_sram_start = OMAP2_SRAM_PA; 143 omap_sram_start = OMAP2_SRAM_PA;
137 if (cpu_is_omap242x()) 144 if (cpu_is_omap242x())
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index 26b6b92942e1..3669761d1bac 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -5,4 +5,5 @@ obj-$(CONFIG_COMMON_CLK) += clk.o clk-fixed-rate.o clk-gate.o \
5# SoCs specific 5# SoCs specific
6obj-$(CONFIG_ARCH_NOMADIK) += clk-nomadik.o 6obj-$(CONFIG_ARCH_NOMADIK) += clk-nomadik.o
7obj-$(CONFIG_ARCH_MXS) += mxs/ 7obj-$(CONFIG_ARCH_MXS) += mxs/
8obj-$(CONFIG_ARCH_SOCFPGA) += socfpga/
8obj-$(CONFIG_PLAT_SPEAR) += spear/ 9obj-$(CONFIG_PLAT_SPEAR) += spear/
diff --git a/drivers/clk/socfpga/Makefile b/drivers/clk/socfpga/Makefile
new file mode 100644
index 000000000000..0303c0b99cd0
--- /dev/null
+++ b/drivers/clk/socfpga/Makefile
@@ -0,0 +1 @@
obj-y += clk.o
diff --git a/drivers/clk/socfpga/clk.c b/drivers/clk/socfpga/clk.c
new file mode 100644
index 000000000000..2c855a6394ff
--- /dev/null
+++ b/drivers/clk/socfpga/clk.c
@@ -0,0 +1,51 @@
1/*
2 * Copyright (C) 2012 Altera Corporation <www.altera.com>
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, see <http://www.gnu.org/licenses/>.
16 */
17#include <linux/clk.h>
18#include <linux/clkdev.h>
19#include <linux/clk-provider.h>
20
21#define SOCFPGA_OSC1_CLK 10000000
22#define SOCFPGA_MPU_CLK 800000000
23#define SOCFPGA_MAIN_QSPI_CLK 432000000
24#define SOCFPGA_MAIN_NAND_SDMMC_CLK 250000000
25#define SOCFPGA_S2F_USR_CLK 125000000
26
27void __init socfpga_init_clocks(void)
28{
29 struct clk *clk;
30
31 clk = clk_register_fixed_rate(NULL, "osc1_clk", NULL, CLK_IS_ROOT, SOCFPGA_OSC1_CLK);
32 clk_register_clkdev(clk, "osc1_clk", NULL);
33
34 clk = clk_register_fixed_rate(NULL, "mpu_clk", NULL, CLK_IS_ROOT, SOCFPGA_MPU_CLK);
35 clk_register_clkdev(clk, "mpu_clk", NULL);
36
37 clk = clk_register_fixed_rate(NULL, "main_clk", NULL, CLK_IS_ROOT, SOCFPGA_MPU_CLK/2);
38 clk_register_clkdev(clk, "main_clk", NULL);
39
40 clk = clk_register_fixed_rate(NULL, "dbg_base_clk", NULL, CLK_IS_ROOT, SOCFPGA_MPU_CLK/2);
41 clk_register_clkdev(clk, "dbg_base_clk", NULL);
42
43 clk = clk_register_fixed_rate(NULL, "main_qspi_clk", NULL, CLK_IS_ROOT, SOCFPGA_MAIN_QSPI_CLK);
44 clk_register_clkdev(clk, "main_qspi_clk", NULL);
45
46 clk = clk_register_fixed_rate(NULL, "main_nand_sdmmc_clk", NULL, CLK_IS_ROOT, SOCFPGA_MAIN_NAND_SDMMC_CLK);
47 clk_register_clkdev(clk, "main_nand_sdmmc_clk", NULL);
48
49 clk = clk_register_fixed_rate(NULL, "s2f_usr_clk", NULL, CLK_IS_ROOT, SOCFPGA_S2F_USR_CLK);
50 clk_register_clkdev(clk, "s2f_usr_clk", NULL);
51}
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index e62bc7e9d49b..d53cd0afc200 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -19,6 +19,9 @@ config DW_APB_TIMER
19config DW_APB_TIMER_OF 19config DW_APB_TIMER_OF
20 bool 20 bool
21 21
22config ARMADA_370_XP_TIMER
23 bool
24
22config CLKSRC_DBX500_PRCMU 25config CLKSRC_DBX500_PRCMU
23 bool "Clocksource PRCMU Timer" 26 bool "Clocksource PRCMU Timer"
24 depends on UX500_SOC_DB8500 27 depends on UX500_SOC_DB8500
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
index 2cdaf7d1019f..b65d0c56ab35 100644
--- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile
@@ -11,4 +11,5 @@ obj-$(CONFIG_CLKBLD_I8253) += i8253.o
11obj-$(CONFIG_CLKSRC_MMIO) += mmio.o 11obj-$(CONFIG_CLKSRC_MMIO) += mmio.o
12obj-$(CONFIG_DW_APB_TIMER) += dw_apb_timer.o 12obj-$(CONFIG_DW_APB_TIMER) += dw_apb_timer.o
13obj-$(CONFIG_DW_APB_TIMER_OF) += dw_apb_timer_of.o 13obj-$(CONFIG_DW_APB_TIMER_OF) += dw_apb_timer_of.o
14obj-$(CONFIG_CLKSRC_DBX500_PRCMU) += clksrc-dbx500-prcmu.o \ No newline at end of file 14obj-$(CONFIG_CLKSRC_DBX500_PRCMU) += clksrc-dbx500-prcmu.o
15obj-$(CONFIG_ARMADA_370_XP_TIMER) += time-armada-370-xp.o
diff --git a/drivers/clocksource/time-armada-370-xp.c b/drivers/clocksource/time-armada-370-xp.c
new file mode 100644
index 000000000000..4674f94957cd
--- /dev/null
+++ b/drivers/clocksource/time-armada-370-xp.c
@@ -0,0 +1,226 @@
1/*
2 * Marvell Armada 370/XP SoC timer handling.
3 *
4 * Copyright (C) 2012 Marvell
5 *
6 * Lior Amsalem <alior@marvell.com>
7 * Gregory CLEMENT <gregory.clement@free-electrons.com>
8 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 *
14 * Timer 0 is used as free-running clocksource, while timer 1 is
15 * used as clock_event_device.
16 */
17
18#include <linux/init.h>
19#include <linux/platform_device.h>
20#include <linux/kernel.h>
21#include <linux/timer.h>
22#include <linux/clockchips.h>
23#include <linux/interrupt.h>
24#include <linux/of.h>
25#include <linux/of_irq.h>
26#include <linux/of_address.h>
27#include <linux/irq.h>
28#include <linux/module.h>
29#include <asm/sched_clock.h>
30
31/*
32 * Timer block registers.
33 */
34#define TIMER_CTRL_OFF 0x0000
35#define TIMER0_EN 0x0001
36#define TIMER0_RELOAD_EN 0x0002
37#define TIMER0_25MHZ 0x0800
38#define TIMER0_DIV(div) ((div) << 19)
39#define TIMER1_EN 0x0004
40#define TIMER1_RELOAD_EN 0x0008
41#define TIMER1_25MHZ 0x1000
42#define TIMER1_DIV(div) ((div) << 22)
43#define TIMER_EVENTS_STATUS 0x0004
44#define TIMER0_CLR_MASK (~0x1)
45#define TIMER1_CLR_MASK (~0x100)
46#define TIMER0_RELOAD_OFF 0x0010
47#define TIMER0_VAL_OFF 0x0014
48#define TIMER1_RELOAD_OFF 0x0018
49#define TIMER1_VAL_OFF 0x001c
50
51/* Global timers are connected to the coherency fabric clock, and the
52 below divider reduces their incrementing frequency. */
53#define TIMER_DIVIDER_SHIFT 5
54#define TIMER_DIVIDER (1 << TIMER_DIVIDER_SHIFT)
55
56/*
57 * SoC-specific data.
58 */
59static void __iomem *timer_base;
60static int timer_irq;
61
62/*
63 * Number of timer ticks per jiffy.
64 */
65static u32 ticks_per_jiffy;
66
67static u32 notrace armada_370_xp_read_sched_clock(void)
68{
69 return ~readl(timer_base + TIMER0_VAL_OFF);
70}
71
72/*
73 * Clockevent handling.
74 */
75static int
76armada_370_xp_clkevt_next_event(unsigned long delta,
77 struct clock_event_device *dev)
78{
79 u32 u;
80
81 /*
82 * Clear clockevent timer interrupt.
83 */
84 writel(TIMER1_CLR_MASK, timer_base + TIMER_EVENTS_STATUS);
85
86 /*
87 * Setup new clockevent timer value.
88 */
89 writel(delta, timer_base + TIMER1_VAL_OFF);
90
91 /*
92 * Enable the timer.
93 */
94 u = readl(timer_base + TIMER_CTRL_OFF);
95 u = ((u & ~TIMER1_RELOAD_EN) | TIMER1_EN |
96 TIMER1_DIV(TIMER_DIVIDER_SHIFT));
97 writel(u, timer_base + TIMER_CTRL_OFF);
98
99 return 0;
100}
101
102static void
103armada_370_xp_clkevt_mode(enum clock_event_mode mode,
104 struct clock_event_device *dev)
105{
106 u32 u;
107
108 if (mode == CLOCK_EVT_MODE_PERIODIC) {
109 /*
110 * Setup timer to fire at 1/HZ intervals.
111 */
112 writel(ticks_per_jiffy - 1, timer_base + TIMER1_RELOAD_OFF);
113 writel(ticks_per_jiffy - 1, timer_base + TIMER1_VAL_OFF);
114
115 /*
116 * Enable timer.
117 */
118 u = readl(timer_base + TIMER_CTRL_OFF);
119
120 writel((u | TIMER1_EN | TIMER1_RELOAD_EN |
121 TIMER1_DIV(TIMER_DIVIDER_SHIFT)),
122 timer_base + TIMER_CTRL_OFF);
123 } else {
124 /*
125 * Disable timer.
126 */
127 u = readl(timer_base + TIMER_CTRL_OFF);
128 writel(u & ~TIMER1_EN, timer_base + TIMER_CTRL_OFF);
129
130 /*
131 * ACK pending timer interrupt.
132 */
133 writel(TIMER1_CLR_MASK, timer_base + TIMER_EVENTS_STATUS);
134
135 }
136}
137
138static struct clock_event_device armada_370_xp_clkevt = {
139 .name = "armada_370_xp_tick",
140 .features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_PERIODIC,
141 .shift = 32,
142 .rating = 300,
143 .set_next_event = armada_370_xp_clkevt_next_event,
144 .set_mode = armada_370_xp_clkevt_mode,
145};
146
147static irqreturn_t armada_370_xp_timer_interrupt(int irq, void *dev_id)
148{
149 /*
150 * ACK timer interrupt and call event handler.
151 */
152
153 writel(TIMER1_CLR_MASK, timer_base + TIMER_EVENTS_STATUS);
154 armada_370_xp_clkevt.event_handler(&armada_370_xp_clkevt);
155
156 return IRQ_HANDLED;
157}
158
159static struct irqaction armada_370_xp_timer_irq = {
160 .name = "armada_370_xp_tick",
161 .flags = IRQF_DISABLED | IRQF_TIMER,
162 .handler = armada_370_xp_timer_interrupt
163};
164
165void __init armada_370_xp_timer_init(void)
166{
167 u32 u;
168 struct device_node *np;
169 unsigned int timer_clk;
170 int ret;
171 np = of_find_compatible_node(NULL, NULL, "marvell,armada-370-xp-timer");
172 timer_base = of_iomap(np, 0);
173 WARN_ON(!timer_base);
174
175 if (of_find_property(np, "marvell,timer-25Mhz", NULL)) {
176 /* The fixed 25MHz timer is available so let's use it */
177 u = readl(timer_base + TIMER_CTRL_OFF);
178 writel(u | TIMER0_25MHZ | TIMER1_25MHZ,
179 timer_base + TIMER_CTRL_OFF);
180 timer_clk = 25000000;
181 } else {
182 u32 clk = 0;
183 ret = of_property_read_u32(np, "clock-frequency", &clk);
184 WARN_ON(!clk || ret < 0);
185 u = readl(timer_base + TIMER_CTRL_OFF);
186 writel(u & ~(TIMER0_25MHZ | TIMER1_25MHZ),
187 timer_base + TIMER_CTRL_OFF);
188 timer_clk = clk / TIMER_DIVIDER;
189 }
190
191 /* We use timer 0 as clocksource, and timer 1 for
192 clockevents */
193 timer_irq = irq_of_parse_and_map(np, 1);
194
195 ticks_per_jiffy = (timer_clk + HZ / 2) / HZ;
196
197 /*
198 * Set scale and timer for sched_clock.
199 */
200 setup_sched_clock(armada_370_xp_read_sched_clock, 32, timer_clk);
201
202 /*
203 * Setup free-running clocksource timer (interrupts
204 * disabled).
205 */
206 writel(0xffffffff, timer_base + TIMER0_VAL_OFF);
207 writel(0xffffffff, timer_base + TIMER0_RELOAD_OFF);
208
209 u = readl(timer_base + TIMER_CTRL_OFF);
210
211 writel((u | TIMER0_EN | TIMER0_RELOAD_EN |
212 TIMER0_DIV(TIMER_DIVIDER_SHIFT)), timer_base + TIMER_CTRL_OFF);
213
214 clocksource_mmio_init(timer_base + TIMER0_VAL_OFF,
215 "armada_370_xp_clocksource",
216 timer_clk, 300, 32, clocksource_mmio_readl_down);
217
218 /*
219 * Setup clockevent timer (interrupt-driven).
220 */
221 setup_irq(timer_irq, &armada_370_xp_timer_irq);
222 armada_370_xp_clkevt.cpumask = cpumask_of(0);
223 clockevents_config_and_register(&armada_370_xp_clkevt,
224 timer_clk, 1, 0xfffffffe);
225}
226
diff --git a/include/linux/dw_apb_timer.h b/include/linux/dw_apb_timer.h
index 07261d52a6df..1148575fd134 100644
--- a/include/linux/dw_apb_timer.h
+++ b/include/linux/dw_apb_timer.h
@@ -53,4 +53,5 @@ void dw_apb_clocksource_start(struct dw_apb_clocksource *dw_cs);
53cycle_t dw_apb_clocksource_read(struct dw_apb_clocksource *dw_cs); 53cycle_t dw_apb_clocksource_read(struct dw_apb_clocksource *dw_cs);
54void dw_apb_clocksource_unregister(struct dw_apb_clocksource *dw_cs); 54void dw_apb_clocksource_unregister(struct dw_apb_clocksource *dw_cs);
55 55
56extern struct sys_timer dw_apb_timer;
56#endif /* __DW_APB_TIMER_H__ */ 57#endif /* __DW_APB_TIMER_H__ */
diff --git a/include/linux/time-armada-370-xp.h b/include/linux/time-armada-370-xp.h
new file mode 100644
index 000000000000..dfdfdc03115b
--- /dev/null
+++ b/include/linux/time-armada-370-xp.h
@@ -0,0 +1,18 @@
1/*
2 * Marvell Armada 370/XP SoC timer handling.
3 *
4 * Copyright (C) 2012 Marvell
5 *
6 * Lior Amsalem <alior@marvell.com>
7 * Gregory CLEMENT <gregory.clement@free-electrons.com>
8 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 *
10 */
11#ifndef __TIME_ARMADA_370_XPPRCMU_H
12#define __TIME_ARMADA_370_XPPRCMU_H
13
14#include <linux/init.h>
15
16void __init armada_370_xp_timer_init(void);
17
18#endif