diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-04-09 09:54:16 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-04-09 10:01:52 -0400 |
commit | 9bc128e16bb82c046d6972171de572affc5c4cbf (patch) | |
tree | 7c6dbe7f69771e9563d39f3be8a4854bed30d861 /arch/arm | |
parent | 835f9c38bbb4498c3d43b7466964bdadbb1fd244 (diff) | |
parent | f6f1bdac9d3006e246e82672322dcd7e7e0863fd (diff) |
Merge tag 'ux500-multiplatform-asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/multiplatform
From Linus Walleij <linus.walleij@linaro.org>:
Ux500 multiplatform support. This tag builds upon the MFD-specific base
tag "ux500-multiplatform-mfd". This removes all <mach/*> dependencies
and makes the ux500 fully multi-platform.
* tag 'ux500-multiplatform-asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
ARM: ux500: build hotplug.o for ARMv7-a
ARM: ux500: move to multiplatform
ARM: ux500: make remaining headers local
ARM: ux500: make irqs.h local to platform
ARM: ux500: get rid of <mach/[hardware|db8500-regs].h>
staging: ste_rmi4: kill platform_data hack
ARM: ux500: move mach/msp.h to <linux/platform_data/*>
clk: ux500: pass clock base adresses in init call
ARM: ux500: make debug macro stand-alone
ARM: ux500: move debugmacro to debug includes
ARM: ux500: split out prcmu initialization
mfd: db8500-prcmu: drop unused includes
ARM: ux500: move PM-related PRCMU functions to machine
mfd: db8500-prcmu: get base address from resource
mfd: prcmu: pass a base and size with the early initcall
Conflicts:
arch/arm/Kconfig
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm')
37 files changed, 337 insertions, 337 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 0036238d4b7a..8bca2f382e06 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -853,22 +853,6 @@ config ARCH_U300 | |||
853 | help | 853 | help |
854 | Support for ST-Ericsson U300 series mobile platforms. | 854 | Support for ST-Ericsson U300 series mobile platforms. |
855 | 855 | ||
856 | config ARCH_U8500 | ||
857 | bool "ST-Ericsson U8500 Series" | ||
858 | depends on MMU | ||
859 | select ARCH_HAS_CPUFREQ | ||
860 | select ARCH_REQUIRE_GPIOLIB | ||
861 | select ARM_AMBA | ||
862 | select CLKDEV_LOOKUP | ||
863 | select CPU_V7 | ||
864 | select GENERIC_CLOCKEVENTS | ||
865 | select HAVE_SMP | ||
866 | select MIGHT_HAVE_CACHE_L2X0 | ||
867 | select SPARSE_IRQ | ||
868 | help | ||
869 | Support for ST-Ericsson's Ux500 architecture | ||
870 | |||
871 | |||
872 | config ARCH_DAVINCI | 856 | config ARCH_DAVINCI |
873 | bool "TI DaVinci" | 857 | bool "TI DaVinci" |
874 | select ARCH_HAS_HOLES_MEMORYMODEL | 858 | select ARCH_HAS_HOLES_MEMORYMODEL |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 5310ce2bc92a..719ef2855b8e 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -432,6 +432,13 @@ choice | |||
432 | Say Y here if you want the debug print routines to direct | 432 | Say Y here if you want the debug print routines to direct |
433 | their output to the uart1 port on SiRFmarco devices. | 433 | their output to the uart1 port on SiRFmarco devices. |
434 | 434 | ||
435 | config DEBUG_UX500_UART | ||
436 | depends on ARCH_U8500 | ||
437 | bool "Use Ux500 UART for low-level debug" | ||
438 | help | ||
439 | Say Y here if you want kernel low-level debugging support | ||
440 | on Ux500 based platforms. | ||
441 | |||
435 | config DEBUG_VEXPRESS_UART0_DETECT | 442 | config DEBUG_VEXPRESS_UART0_DETECT |
436 | bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" | 443 | bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" |
437 | depends on ARCH_VEXPRESS && CPU_CP15_MMU | 444 | depends on ARCH_VEXPRESS && CPU_CP15_MMU |
@@ -620,6 +627,7 @@ config DEBUG_LL_INCLUDE | |||
620 | DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 | 627 | DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 |
621 | default "debug/vt8500.S" if DEBUG_VT8500_UART0 | 628 | default "debug/vt8500.S" if DEBUG_VT8500_UART0 |
622 | default "debug/tegra.S" if DEBUG_TEGRA_UART | 629 | default "debug/tegra.S" if DEBUG_TEGRA_UART |
630 | default "debug/ux500.S" if DEBUG_UX500_UART | ||
623 | default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 | 631 | default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 |
624 | default "mach/debug-macro.S" | 632 | default "mach/debug-macro.S" |
625 | 633 | ||
diff --git a/arch/arm/include/debug/ux500.S b/arch/arm/include/debug/ux500.S new file mode 100644 index 000000000000..2848857f5b62 --- /dev/null +++ b/arch/arm/include/debug/ux500.S | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * Debugging macro include header | ||
3 | * | ||
4 | * Copyright (C) 2009 ST-Ericsson | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | |||
13 | #if CONFIG_UX500_DEBUG_UART > 2 | ||
14 | #error Invalid Ux500 debug UART | ||
15 | #endif | ||
16 | |||
17 | /* | ||
18 | * DEBUG_LL only works if only one SOC is built in. We don't use #else below | ||
19 | * in order to get "__UX500_UART redefined" warnings if more than one SOC is | ||
20 | * built, so that there's some hint during the build that something is wrong. | ||
21 | */ | ||
22 | |||
23 | #ifdef CONFIG_UX500_SOC_DB8500 | ||
24 | #define U8500_UART0_PHYS_BASE (0x80120000) | ||
25 | #define U8500_UART1_PHYS_BASE (0x80121000) | ||
26 | #define U8500_UART2_PHYS_BASE (0x80007000) | ||
27 | #define U8500_UART0_VIRT_BASE (0xa8120000) | ||
28 | #define U8500_UART1_VIRT_BASE (0xa8121000) | ||
29 | #define U8500_UART2_VIRT_BASE (0xa8007000) | ||
30 | #define __UX500_PHYS_UART(n) U8500_UART##n##_PHYS_BASE | ||
31 | #define __UX500_VIRT_UART(n) U8500_UART##n##_VIRT_BASE | ||
32 | #endif | ||
33 | |||
34 | #if !defined(__UX500_PHYS_UART) || !defined(__UX500_VIRT_UART) | ||
35 | #error Unknown SOC | ||
36 | #endif | ||
37 | |||
38 | #define UX500_PHYS_UART(n) __UX500_PHYS_UART(n) | ||
39 | #define UX500_VIRT_UART(n) __UX500_VIRT_UART(n) | ||
40 | #define UART_PHYS_BASE UX500_PHYS_UART(CONFIG_UX500_DEBUG_UART) | ||
41 | #define UART_VIRT_BASE UX500_VIRT_UART(CONFIG_UX500_DEBUG_UART) | ||
42 | |||
43 | .macro addruart, rp, rv, tmp | ||
44 | ldr \rp, =UART_PHYS_BASE @ no, physical address | ||
45 | ldr \rv, =UART_VIRT_BASE @ yes, virtual address | ||
46 | .endm | ||
47 | |||
48 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index 3e5bbd0e5b23..eeea3bf4dffb 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig | |||
@@ -1,3 +1,17 @@ | |||
1 | config ARCH_U8500 | ||
2 | bool "ST-Ericsson U8500 Series" if ARCH_MULTI_V7 | ||
3 | depends on MMU | ||
4 | select ARCH_HAS_CPUFREQ | ||
5 | select ARCH_REQUIRE_GPIOLIB | ||
6 | select ARM_AMBA | ||
7 | select CLKDEV_LOOKUP | ||
8 | select CPU_V7 | ||
9 | select GENERIC_CLOCKEVENTS | ||
10 | select HAVE_SMP | ||
11 | select MIGHT_HAVE_CACHE_L2X0 | ||
12 | help | ||
13 | Support for ST-Ericsson's Ux500 architecture | ||
14 | |||
1 | if ARCH_U8500 | 15 | if ARCH_U8500 |
2 | 16 | ||
3 | config UX500_SOC_COMMON | 17 | config UX500_SOC_COMMON |
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile index f24710dfc395..bf9b6be5b180 100644 --- a/arch/arm/mach-ux500/Makefile +++ b/arch/arm/mach-ux500/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := cpu.o devices.o devices-common.o \ | 5 | obj-y := cpu.o devices.o devices-common.o \ |
6 | id.o usb.o timer.o | 6 | id.o usb.o timer.o pm.o |
7 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | 7 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o |
8 | obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o | 8 | obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o |
9 | obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o | 9 | obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o |
@@ -15,3 +15,5 @@ obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \ | |||
15 | board-mop500-audio.o | 15 | board-mop500-audio.o |
16 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o | 16 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o |
17 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 17 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
18 | |||
19 | CFLAGS_hotplug.o += -march=armv7-a | ||
diff --git a/arch/arm/mach-ux500/board-mop500-audio.c b/arch/arm/mach-ux500/board-mop500-audio.c index 7209db7cdc72..aba9e5692958 100644 --- a/arch/arm/mach-ux500/board-mop500-audio.c +++ b/arch/arm/mach-ux500/board-mop500-audio.c | |||
@@ -10,10 +10,9 @@ | |||
10 | #include <linux/platform_data/pinctrl-nomadik.h> | 10 | #include <linux/platform_data/pinctrl-nomadik.h> |
11 | #include <linux/platform_data/dma-ste-dma40.h> | 11 | #include <linux/platform_data/dma-ste-dma40.h> |
12 | 12 | ||
13 | #include <mach/devices.h> | 13 | #include "devices.h" |
14 | #include <mach/hardware.h> | 14 | #include "irqs.h" |
15 | #include <mach/irqs.h> | 15 | #include <linux/platform_data/asoc-ux500-msp.h> |
16 | #include <mach/msp.h> | ||
17 | 16 | ||
18 | #include "ste-dma40-db8500.h" | 17 | #include "ste-dma40-db8500.h" |
19 | #include "board-mop500.h" | 18 | #include "board-mop500.h" |
diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c index 0a3f30df1eb8..f3976f9c404a 100644 --- a/arch/arm/mach-ux500/board-mop500-pins.c +++ b/arch/arm/mach-ux500/board-mop500-pins.c | |||
@@ -13,8 +13,6 @@ | |||
13 | 13 | ||
14 | #include <asm/mach-types.h> | 14 | #include <asm/mach-types.h> |
15 | 15 | ||
16 | #include <mach/hardware.h> | ||
17 | |||
18 | #include "pins-db8500.h" | 16 | #include "pins-db8500.h" |
19 | #include "board-mop500.h" | 17 | #include "board-mop500.h" |
20 | 18 | ||
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index 051b62c27102..f76be4ade7c2 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c | |||
@@ -14,9 +14,9 @@ | |||
14 | #include <linux/platform_data/dma-ste-dma40.h> | 14 | #include <linux/platform_data/dma-ste-dma40.h> |
15 | 15 | ||
16 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
17 | #include <mach/devices.h> | 17 | #include "devices.h" |
18 | #include <mach/hardware.h> | ||
19 | 18 | ||
19 | #include "db8500-regs.h" | ||
20 | #include "devices-db8500.h" | 20 | #include "devices-db8500.h" |
21 | #include "board-mop500.h" | 21 | #include "board-mop500.h" |
22 | #include "ste-dma40-db8500.h" | 22 | #include "ste-dma40-db8500.h" |
diff --git a/arch/arm/mach-ux500/board-mop500-u8500uib.c b/arch/arm/mach-ux500/board-mop500-u8500uib.c index ead91c968ff4..d397c19570af 100644 --- a/arch/arm/mach-ux500/board-mop500-u8500uib.c +++ b/arch/arm/mach-ux500/board-mop500-u8500uib.c | |||
@@ -12,12 +12,15 @@ | |||
12 | #include <linux/mfd/tc3589x.h> | 12 | #include <linux/mfd/tc3589x.h> |
13 | #include <linux/input/matrix_keypad.h> | 13 | #include <linux/input/matrix_keypad.h> |
14 | 14 | ||
15 | #include <mach/irqs.h> | 15 | #include "irqs.h" |
16 | 16 | ||
17 | #include "board-mop500.h" | 17 | #include "board-mop500.h" |
18 | 18 | ||
19 | /* Dummy data that can be overridden by staging driver */ | 19 | static struct i2c_board_info __initdata mop500_i2c3_devices_u8500[] = { |
20 | struct i2c_board_info __initdata __weak mop500_i2c3_devices_u8500[] = { | 20 | { |
21 | I2C_BOARD_INFO("synaptics_rmi4_i2c", 0x4B), | ||
22 | .irq = NOMADIK_GPIO_TO_IRQ(84), | ||
23 | }, | ||
21 | }; | 24 | }; |
22 | 25 | ||
23 | /* | 26 | /* |
diff --git a/arch/arm/mach-ux500/board-mop500-uib.c b/arch/arm/mach-ux500/board-mop500-uib.c index 7037d3687e9f..bdaa422da028 100644 --- a/arch/arm/mach-ux500/board-mop500-uib.c +++ b/arch/arm/mach-ux500/board-mop500-uib.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/i2c.h> | 12 | #include <linux/i2c.h> |
13 | 13 | ||
14 | #include <mach/hardware.h> | ||
15 | #include "board-mop500.h" | 14 | #include "board-mop500.h" |
16 | #include "id.h" | 15 | #include "id.h" |
17 | 16 | ||
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index b03457881c4b..0d59e1ad810f 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -41,13 +41,13 @@ | |||
41 | #include <asm/mach-types.h> | 41 | #include <asm/mach-types.h> |
42 | #include <asm/mach/arch.h> | 42 | #include <asm/mach/arch.h> |
43 | 43 | ||
44 | #include <mach/hardware.h> | 44 | #include "setup.h" |
45 | #include <mach/setup.h> | 45 | #include "devices.h" |
46 | #include <mach/devices.h> | 46 | #include "irqs.h" |
47 | #include <mach/irqs.h> | ||
48 | #include <linux/platform_data/crypto-ux500.h> | 47 | #include <linux/platform_data/crypto-ux500.h> |
49 | 48 | ||
50 | #include "ste-dma40-db8500.h" | 49 | #include "ste-dma40-db8500.h" |
50 | #include "db8500-regs.h" | ||
51 | #include "devices-db8500.h" | 51 | #include "devices-db8500.h" |
52 | #include "board-mop500.h" | 52 | #include "board-mop500.h" |
53 | #include "board-mop500-regulators.h" | 53 | #include "board-mop500-regulators.h" |
@@ -206,63 +206,6 @@ struct ab8500_platform_data ab8500_platdata = { | |||
206 | .codec = &ab8500_codec_pdata, | 206 | .codec = &ab8500_codec_pdata, |
207 | }; | 207 | }; |
208 | 208 | ||
209 | /* | ||
210 | * Thermal Sensor | ||
211 | */ | ||
212 | |||
213 | static struct resource db8500_thsens_resources[] = { | ||
214 | { | ||
215 | .name = "IRQ_HOTMON_LOW", | ||
216 | .start = IRQ_PRCMU_HOTMON_LOW, | ||
217 | .end = IRQ_PRCMU_HOTMON_LOW, | ||
218 | .flags = IORESOURCE_IRQ, | ||
219 | }, | ||
220 | { | ||
221 | .name = "IRQ_HOTMON_HIGH", | ||
222 | .start = IRQ_PRCMU_HOTMON_HIGH, | ||
223 | .end = IRQ_PRCMU_HOTMON_HIGH, | ||
224 | .flags = IORESOURCE_IRQ, | ||
225 | }, | ||
226 | }; | ||
227 | |||
228 | static struct db8500_thsens_platform_data db8500_thsens_data = { | ||
229 | .trip_points[0] = { | ||
230 | .temp = 70000, | ||
231 | .type = THERMAL_TRIP_ACTIVE, | ||
232 | .cdev_name = { | ||
233 | [0] = "thermal-cpufreq-0", | ||
234 | }, | ||
235 | }, | ||
236 | .trip_points[1] = { | ||
237 | .temp = 75000, | ||
238 | .type = THERMAL_TRIP_ACTIVE, | ||
239 | .cdev_name = { | ||
240 | [0] = "thermal-cpufreq-0", | ||
241 | }, | ||
242 | }, | ||
243 | .trip_points[2] = { | ||
244 | .temp = 80000, | ||
245 | .type = THERMAL_TRIP_ACTIVE, | ||
246 | .cdev_name = { | ||
247 | [0] = "thermal-cpufreq-0", | ||
248 | }, | ||
249 | }, | ||
250 | .trip_points[3] = { | ||
251 | .temp = 85000, | ||
252 | .type = THERMAL_TRIP_CRITICAL, | ||
253 | }, | ||
254 | .num_trips = 4, | ||
255 | }; | ||
256 | |||
257 | static struct platform_device u8500_thsens_device = { | ||
258 | .name = "db8500-thermal", | ||
259 | .resource = db8500_thsens_resources, | ||
260 | .num_resources = ARRAY_SIZE(db8500_thsens_resources), | ||
261 | .dev = { | ||
262 | .platform_data = &db8500_thsens_data, | ||
263 | }, | ||
264 | }; | ||
265 | |||
266 | static struct platform_device u8500_cpufreq_cooling_device = { | 209 | static struct platform_device u8500_cpufreq_cooling_device = { |
267 | .name = "db8500-cpufreq-cooling", | 210 | .name = "db8500-cpufreq-cooling", |
268 | }; | 211 | }; |
@@ -622,7 +565,6 @@ static struct platform_device *snowball_platform_devs[] __initdata = { | |||
622 | &snowball_key_dev, | 565 | &snowball_key_dev, |
623 | &snowball_sbnet_dev, | 566 | &snowball_sbnet_dev, |
624 | &snowball_gpio_en_3v3_regulator_dev, | 567 | &snowball_gpio_en_3v3_regulator_dev, |
625 | &u8500_thsens_device, | ||
626 | &u8500_cpufreq_cooling_device, | 568 | &u8500_cpufreq_cooling_device, |
627 | }; | 569 | }; |
628 | 570 | ||
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h index eaa605f5d90d..16bf1ac020a8 100644 --- a/arch/arm/mach-ux500/board-mop500.h +++ b/arch/arm/mach-ux500/board-mop500.h | |||
@@ -8,8 +8,8 @@ | |||
8 | #define __BOARD_MOP500_H | 8 | #define __BOARD_MOP500_H |
9 | 9 | ||
10 | /* For NOMADIK_NR_GPIO */ | 10 | /* For NOMADIK_NR_GPIO */ |
11 | #include <mach/irqs.h> | 11 | #include "irqs.h" |
12 | #include <mach/msp.h> | 12 | #include <linux/platform_data/asoc-ux500-msp.h> |
13 | #include <linux/amba/mmci.h> | 13 | #include <linux/amba/mmci.h> |
14 | 14 | ||
15 | /* Snowball specific GPIO assignments, this board has no GPIO expander */ | 15 | /* Snowball specific GPIO assignments, this board has no GPIO expander */ |
diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c index 1c1609da76ce..e12cc92dfca5 100644 --- a/arch/arm/mach-ux500/cache-l2x0.c +++ b/arch/arm/mach-ux500/cache-l2x0.c | |||
@@ -9,8 +9,8 @@ | |||
9 | 9 | ||
10 | #include <asm/cacheflush.h> | 10 | #include <asm/cacheflush.h> |
11 | #include <asm/hardware/cache-l2x0.h> | 11 | #include <asm/hardware/cache-l2x0.h> |
12 | #include <mach/hardware.h> | ||
13 | 12 | ||
13 | #include "db8500-regs.h" | ||
14 | #include "id.h" | 14 | #include "id.h" |
15 | 15 | ||
16 | static void __iomem *l2x0_base; | 16 | static void __iomem *l2x0_base; |
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 19235cf7bbe3..7a66a810274a 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -28,15 +28,13 @@ | |||
28 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
29 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
30 | 30 | ||
31 | #include <mach/hardware.h> | 31 | #include "setup.h" |
32 | #include <mach/setup.h> | 32 | #include "devices.h" |
33 | #include <mach/devices.h> | 33 | #include "irqs.h" |
34 | #include <mach/db8500-regs.h> | ||
35 | #include <mach/irqs.h> | ||
36 | 34 | ||
37 | #include "devices-db8500.h" | 35 | #include "devices-db8500.h" |
38 | #include "ste-dma40-db8500.h" | 36 | #include "ste-dma40-db8500.h" |
39 | 37 | #include "db8500-regs.h" | |
40 | #include "board-mop500.h" | 38 | #include "board-mop500.h" |
41 | #include "id.h" | 39 | #include "id.h" |
42 | 40 | ||
@@ -94,8 +92,6 @@ void __init u8500_map_io(void) | |||
94 | iotable_init(u9540_io_desc, ARRAY_SIZE(u9540_io_desc)); | 92 | iotable_init(u9540_io_desc, ARRAY_SIZE(u9540_io_desc)); |
95 | else | 93 | else |
96 | iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc)); | 94 | iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc)); |
97 | |||
98 | _PRCMU_BASE = __io_address(U8500_PRCMU_BASE); | ||
99 | } | 95 | } |
100 | 96 | ||
101 | static struct resource db8500_pmu_resources[] = { | 97 | static struct resource db8500_pmu_resources[] = { |
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 537870d3fea8..915e2636cbaa 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/platform_device.h> | 9 | #include <linux/platform_device.h> |
10 | #include <linux/io.h> | 10 | #include <linux/io.h> |
11 | #include <linux/mfd/db8500-prcmu.h> | 11 | #include <linux/mfd/dbx500-prcmu.h> |
12 | #include <linux/clksrc-dbx500-prcmu.h> | 12 | #include <linux/clksrc-dbx500-prcmu.h> |
13 | #include <linux/sys_soc.h> | 13 | #include <linux/sys_soc.h> |
14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
@@ -20,18 +20,17 @@ | |||
20 | #include <linux/irqchip.h> | 20 | #include <linux/irqchip.h> |
21 | #include <linux/irqchip/arm-gic.h> | 21 | #include <linux/irqchip/arm-gic.h> |
22 | #include <linux/platform_data/clk-ux500.h> | 22 | #include <linux/platform_data/clk-ux500.h> |
23 | #include <linux/platform_data/arm-ux500-pm.h> | ||
23 | 24 | ||
24 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
25 | 26 | ||
26 | #include <mach/hardware.h> | 27 | #include "setup.h" |
27 | #include <mach/setup.h> | 28 | #include "devices.h" |
28 | #include <mach/devices.h> | ||
29 | 29 | ||
30 | #include "board-mop500.h" | 30 | #include "board-mop500.h" |
31 | #include "db8500-regs.h" | ||
31 | #include "id.h" | 32 | #include "id.h" |
32 | 33 | ||
33 | void __iomem *_PRCMU_BASE; | ||
34 | |||
35 | /* | 34 | /* |
36 | * FIXME: Should we set up the GPIO domain here? | 35 | * FIXME: Should we set up the GPIO domain here? |
37 | * | 36 | * |
@@ -68,13 +67,23 @@ void __init ux500_init_irq(void) | |||
68 | * Init clocks here so that they are available for system timer | 67 | * Init clocks here so that they are available for system timer |
69 | * initialization. | 68 | * initialization. |
70 | */ | 69 | */ |
71 | if (cpu_is_u8500_family() || cpu_is_u9540()) | 70 | if (cpu_is_u8500_family()) { |
72 | db8500_prcmu_early_init(); | 71 | prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1); |
73 | 72 | ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1); | |
74 | if (cpu_is_u8500_family() || cpu_is_u9540()) | 73 | u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE, |
75 | u8500_clk_init(); | 74 | U8500_CLKRST3_BASE, U8500_CLKRST5_BASE, |
76 | else if (cpu_is_u8540()) | 75 | U8500_CLKRST6_BASE); |
76 | } else if (cpu_is_u9540()) { | ||
77 | prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1); | ||
78 | ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1); | ||
79 | u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE, | ||
80 | U8500_CLKRST3_BASE, U8500_CLKRST5_BASE, | ||
81 | U8500_CLKRST6_BASE); | ||
82 | } else if (cpu_is_u8540()) { | ||
83 | prcmu_early_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1); | ||
84 | ux500_pm_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1); | ||
77 | u8540_clk_init(); | 85 | u8540_clk_init(); |
86 | } | ||
78 | } | 87 | } |
79 | 88 | ||
80 | void __init ux500_init_late(void) | 89 | void __init ux500_init_late(void) |
diff --git a/arch/arm/mach-ux500/cpuidle.c b/arch/arm/mach-ux500/cpuidle.c index ce9149302cc3..654115afb367 100644 --- a/arch/arm/mach-ux500/cpuidle.c +++ b/arch/arm/mach-ux500/cpuidle.c | |||
@@ -16,10 +16,13 @@ | |||
16 | #include <linux/atomic.h> | 16 | #include <linux/atomic.h> |
17 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
18 | #include <linux/mfd/dbx500-prcmu.h> | 18 | #include <linux/mfd/dbx500-prcmu.h> |
19 | #include <linux/platform_data/arm-ux500-pm.h> | ||
19 | 20 | ||
20 | #include <asm/cpuidle.h> | 21 | #include <asm/cpuidle.h> |
21 | #include <asm/proc-fns.h> | 22 | #include <asm/proc-fns.h> |
22 | 23 | ||
24 | #include "db8500-regs.h" | ||
25 | |||
23 | static atomic_t master = ATOMIC_INIT(0); | 26 | static atomic_t master = ATOMIC_INIT(0); |
24 | static DEFINE_SPINLOCK(master_lock); | 27 | static DEFINE_SPINLOCK(master_lock); |
25 | static DEFINE_PER_CPU(struct cpuidle_device, ux500_cpuidle_device); | 28 | static DEFINE_PER_CPU(struct cpuidle_device, ux500_cpuidle_device); |
@@ -130,7 +133,7 @@ int __init ux500_idle_init(void) | |||
130 | int ret, cpu; | 133 | int ret, cpu; |
131 | struct cpuidle_device *device; | 134 | struct cpuidle_device *device; |
132 | 135 | ||
133 | /* Configure wake up reasons */ | 136 | /* Configure wake up reasons */ |
134 | prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) | | 137 | prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) | |
135 | PRCMU_WAKEUP(ABB)); | 138 | PRCMU_WAKEUP(ABB)); |
136 | 139 | ||
diff --git a/arch/arm/mach-ux500/include/mach/db8500-regs.h b/arch/arm/mach-ux500/db8500-regs.h index 1530d493879d..b2d7a0b98629 100644 --- a/arch/arm/mach-ux500/include/mach/db8500-regs.h +++ b/arch/arm/mach-ux500/db8500-regs.h | |||
@@ -170,4 +170,32 @@ | |||
170 | /* SoC identification number information */ | 170 | /* SoC identification number information */ |
171 | #define U8500_BB_UID_BASE (U8500_BACKUPRAM1_BASE + 0xFC0) | 171 | #define U8500_BB_UID_BASE (U8500_BACKUPRAM1_BASE + 0xFC0) |
172 | 172 | ||
173 | /* Offsets to specific addresses in some IP blocks for DMA */ | ||
174 | #define MSP_TX_RX_REG_OFFSET 0 | ||
175 | #define CRYP1_RX_REG_OFFSET 0x10 | ||
176 | #define CRYP1_TX_REG_OFFSET 0x8 | ||
177 | #define HASH1_TX_REG_OFFSET 0x4 | ||
178 | |||
179 | /* | ||
180 | * Macros to get at IO space when running virtually | ||
181 | * We dont map all the peripherals, let ioremap do | ||
182 | * this for us. We map only very basic peripherals here. | ||
183 | */ | ||
184 | #define U8500_IO_VIRTUAL 0xf0000000 | ||
185 | #define U8500_IO_PHYSICAL 0xa0000000 | ||
186 | /* This is where we map in the ROM to check ASIC IDs */ | ||
187 | #define UX500_VIRT_ROM 0xf0000000 | ||
188 | |||
189 | /* This macro is used in assembly, so no cast */ | ||
190 | #define IO_ADDRESS(x) \ | ||
191 | (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL) | ||
192 | |||
193 | /* typesafe io address */ | ||
194 | #define __io_address(n) IOMEM(IO_ADDRESS(n)) | ||
195 | |||
196 | /* Used by some plat-nomadik code */ | ||
197 | #define io_p2v(n) __io_address(n) | ||
198 | |||
199 | #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) | ||
200 | |||
173 | #endif | 201 | #endif |
diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c index 16b5f71e6974..f71b3d7bd4fb 100644 --- a/arch/arm/mach-ux500/devices-common.c +++ b/arch/arm/mach-ux500/devices-common.c | |||
@@ -13,8 +13,7 @@ | |||
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/platform_data/pinctrl-nomadik.h> | 14 | #include <linux/platform_data/pinctrl-nomadik.h> |
15 | 15 | ||
16 | #include <mach/hardware.h> | 16 | #include "irqs.h" |
17 | #include <mach/irqs.h> | ||
18 | 17 | ||
19 | #include "devices-common.h" | 18 | #include "devices-common.h" |
20 | 19 | ||
diff --git a/arch/arm/mach-ux500/devices-db8500.c b/arch/arm/mach-ux500/devices-db8500.c index f3d9419f75d3..1cf94ce0feec 100644 --- a/arch/arm/mach-ux500/devices-db8500.c +++ b/arch/arm/mach-ux500/devices-db8500.c | |||
@@ -15,10 +15,10 @@ | |||
15 | #include <linux/platform_data/dma-ste-dma40.h> | 15 | #include <linux/platform_data/dma-ste-dma40.h> |
16 | #include <linux/mfd/dbx500-prcmu.h> | 16 | #include <linux/mfd/dbx500-prcmu.h> |
17 | 17 | ||
18 | #include <mach/hardware.h> | 18 | #include "setup.h" |
19 | #include <mach/setup.h> | 19 | #include "irqs.h" |
20 | #include <mach/irqs.h> | ||
21 | 20 | ||
21 | #include "db8500-regs.h" | ||
22 | #include "devices-db8500.h" | 22 | #include "devices-db8500.h" |
23 | #include "ste-dma40-db8500.h" | 23 | #include "ste-dma40-db8500.h" |
24 | 24 | ||
@@ -199,6 +199,8 @@ struct platform_device u8500_ske_keypad_device = { | |||
199 | 199 | ||
200 | struct prcmu_pdata db8500_prcmu_pdata = { | 200 | struct prcmu_pdata db8500_prcmu_pdata = { |
201 | .ab_platdata = &ab8500_platdata, | 201 | .ab_platdata = &ab8500_platdata, |
202 | .ab_irq = IRQ_DB8500_AB8500, | ||
203 | .irq_base = IRQ_PRCMU_BASE, | ||
202 | .version_offset = DB8500_PRCMU_FW_VERSION_OFFSET, | 204 | .version_offset = DB8500_PRCMU_FW_VERSION_OFFSET, |
203 | .legacy_offset = DB8500_PRCMU_LEGACY_OFFSET, | 205 | .legacy_offset = DB8500_PRCMU_LEGACY_OFFSET, |
204 | }; | 206 | }; |
diff --git a/arch/arm/mach-ux500/devices-db8500.h b/arch/arm/mach-ux500/devices-db8500.h index dbcb35c48f06..321998320f98 100644 --- a/arch/arm/mach-ux500/devices-db8500.h +++ b/arch/arm/mach-ux500/devices-db8500.h | |||
@@ -9,7 +9,8 @@ | |||
9 | #define __DEVICES_DB8500_H | 9 | #define __DEVICES_DB8500_H |
10 | 10 | ||
11 | #include <linux/platform_data/usb-musb-ux500.h> | 11 | #include <linux/platform_data/usb-musb-ux500.h> |
12 | #include <mach/irqs.h> | 12 | #include "irqs.h" |
13 | #include "db8500-regs.h" | ||
13 | #include "devices-common.h" | 14 | #include "devices-common.h" |
14 | 15 | ||
15 | struct ske_keypad_platform_data; | 16 | struct ske_keypad_platform_data; |
diff --git a/arch/arm/mach-ux500/devices.c b/arch/arm/mach-ux500/devices.c index ea0a2f92ca70..0f9e52b95935 100644 --- a/arch/arm/mach-ux500/devices.c +++ b/arch/arm/mach-ux500/devices.c | |||
@@ -11,8 +11,9 @@ | |||
11 | #include <linux/io.h> | 11 | #include <linux/io.h> |
12 | #include <linux/amba/bus.h> | 12 | #include <linux/amba/bus.h> |
13 | 13 | ||
14 | #include <mach/hardware.h> | 14 | #include "setup.h" |
15 | #include <mach/setup.h> | 15 | |
16 | #include "db8500-regs.h" | ||
16 | 17 | ||
17 | void __init amba_add_devices(struct amba_device *devs[], int num) | 18 | void __init amba_add_devices(struct amba_device *devs[], int num) |
18 | { | 19 | { |
diff --git a/arch/arm/mach-ux500/include/mach/devices.h b/arch/arm/mach-ux500/devices.h index cbc6f1e4104d..cbc6f1e4104d 100644 --- a/arch/arm/mach-ux500/include/mach/devices.h +++ b/arch/arm/mach-ux500/devices.h | |||
diff --git a/arch/arm/mach-ux500/hotplug.c b/arch/arm/mach-ux500/hotplug.c index 2f6af259015d..87abcf278432 100644 --- a/arch/arm/mach-ux500/hotplug.c +++ b/arch/arm/mach-ux500/hotplug.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
16 | #include <asm/smp_plat.h> | 16 | #include <asm/smp_plat.h> |
17 | 17 | ||
18 | #include <mach/setup.h> | 18 | #include "setup.h" |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * platform-specific code to shutdown a CPU | 21 | * platform-specific code to shutdown a CPU |
diff --git a/arch/arm/mach-ux500/id.c b/arch/arm/mach-ux500/id.c index 9f951842e1e5..0d33d1a06955 100644 --- a/arch/arm/mach-ux500/id.c +++ b/arch/arm/mach-ux500/id.c | |||
@@ -14,9 +14,9 @@ | |||
14 | #include <asm/cacheflush.h> | 14 | #include <asm/cacheflush.h> |
15 | #include <asm/mach/map.h> | 15 | #include <asm/mach/map.h> |
16 | 16 | ||
17 | #include <mach/hardware.h> | 17 | #include "setup.h" |
18 | #include <mach/setup.h> | ||
19 | 18 | ||
19 | #include "db8500-regs.h" | ||
20 | #include "id.h" | 20 | #include "id.h" |
21 | 21 | ||
22 | struct dbx500_asic_id dbx500_id; | 22 | struct dbx500_asic_id dbx500_id; |
diff --git a/arch/arm/mach-ux500/include/mach/debug-macro.S b/arch/arm/mach-ux500/include/mach/debug-macro.S deleted file mode 100644 index 67035223334a..000000000000 --- a/arch/arm/mach-ux500/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * Debugging macro include header | ||
3 | * | ||
4 | * Copyright (C) 2009 ST-Ericsson | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | #include <mach/hardware.h> | ||
12 | |||
13 | #if CONFIG_UX500_DEBUG_UART > 2 | ||
14 | #error Invalid Ux500 debug UART | ||
15 | #endif | ||
16 | |||
17 | /* | ||
18 | * DEBUG_LL only works if only one SOC is built in. We don't use #else below | ||
19 | * in order to get "__UX500_UART redefined" warnings if more than one SOC is | ||
20 | * built, so that there's some hint during the build that something is wrong. | ||
21 | */ | ||
22 | |||
23 | #ifdef CONFIG_UX500_SOC_DB8500 | ||
24 | #define __UX500_UART(n) U8500_UART##n##_BASE | ||
25 | #endif | ||
26 | |||
27 | #ifndef __UX500_UART | ||
28 | #error Unknown SOC | ||
29 | #endif | ||
30 | |||
31 | #define UX500_UART(n) __UX500_UART(n) | ||
32 | #define UART_BASE UX500_UART(CONFIG_UX500_DEBUG_UART) | ||
33 | |||
34 | .macro addruart, rp, rv, tmp | ||
35 | ldr \rp, =UART_BASE @ no, physical address | ||
36 | ldr \rv, =IO_ADDRESS(UART_BASE) @ yes, virtual address | ||
37 | .endm | ||
38 | |||
39 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h deleted file mode 100644 index 5201ddace503..000000000000 --- a/arch/arm/mach-ux500/include/mach/hardware.h +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 ST-Ericsson. | ||
3 | * | ||
4 | * U8500 hardware definitions | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | #ifndef __MACH_HARDWARE_H | ||
11 | #define __MACH_HARDWARE_H | ||
12 | |||
13 | /* | ||
14 | * Macros to get at IO space when running virtually | ||
15 | * We dont map all the peripherals, let ioremap do | ||
16 | * this for us. We map only very basic peripherals here. | ||
17 | */ | ||
18 | #define U8500_IO_VIRTUAL 0xf0000000 | ||
19 | #define U8500_IO_PHYSICAL 0xa0000000 | ||
20 | /* This is where we map in the ROM to check ASIC IDs */ | ||
21 | #define UX500_VIRT_ROM 0xf0000000 | ||
22 | |||
23 | /* This macro is used in assembly, so no cast */ | ||
24 | #define IO_ADDRESS(x) \ | ||
25 | (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL) | ||
26 | |||
27 | /* typesafe io address */ | ||
28 | #define __io_address(n) IOMEM(IO_ADDRESS(n)) | ||
29 | |||
30 | /* Used by some plat-nomadik code */ | ||
31 | #define io_p2v(n) __io_address(n) | ||
32 | |||
33 | #include <mach/db8500-regs.h> | ||
34 | |||
35 | #define MSP_TX_RX_REG_OFFSET 0 | ||
36 | #define CRYP1_RX_REG_OFFSET 0x10 | ||
37 | #define CRYP1_TX_REG_OFFSET 0x8 | ||
38 | #define HASH1_TX_REG_OFFSET 0x4 | ||
39 | |||
40 | #ifndef __ASSEMBLY__ | ||
41 | |||
42 | extern void __iomem *_PRCMU_BASE; | ||
43 | |||
44 | #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) | ||
45 | |||
46 | #endif /* __ASSEMBLY__ */ | ||
47 | #endif /* __MACH_HARDWARE_H */ | ||
diff --git a/arch/arm/mach-ux500/include/mach/msp.h b/arch/arm/mach-ux500/include/mach/msp.h deleted file mode 100644 index 9991aea3d577..000000000000 --- a/arch/arm/mach-ux500/include/mach/msp.h +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | ||
5 | * License terms: GNU General Public License (GPL), version 2. | ||
6 | */ | ||
7 | |||
8 | #ifndef __MSP_H | ||
9 | #define __MSP_H | ||
10 | |||
11 | #include <linux/platform_data/dma-ste-dma40.h> | ||
12 | |||
13 | enum msp_i2s_id { | ||
14 | MSP_I2S_0 = 0, | ||
15 | MSP_I2S_1, | ||
16 | MSP_I2S_2, | ||
17 | MSP_I2S_3, | ||
18 | }; | ||
19 | |||
20 | /* Platform data structure for a MSP I2S-device */ | ||
21 | struct msp_i2s_platform_data { | ||
22 | enum msp_i2s_id id; | ||
23 | struct stedma40_chan_cfg *msp_i2s_dma_rx; | ||
24 | struct stedma40_chan_cfg *msp_i2s_dma_tx; | ||
25 | }; | ||
26 | |||
27 | #endif | ||
diff --git a/arch/arm/mach-ux500/include/mach/timex.h b/arch/arm/mach-ux500/include/mach/timex.h deleted file mode 100644 index d0942c174018..000000000000 --- a/arch/arm/mach-ux500/include/mach/timex.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_ARCH_TIMEX_H | ||
2 | #define __ASM_ARCH_TIMEX_H | ||
3 | |||
4 | #define CLOCK_TICK_RATE 110000000 | ||
5 | |||
6 | #endif | ||
diff --git a/arch/arm/mach-ux500/include/mach/uncompress.h b/arch/arm/mach-ux500/include/mach/uncompress.h deleted file mode 100644 index 36969d52e53a..000000000000 --- a/arch/arm/mach-ux500/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 ST-Ericsson | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | #ifndef __ASM_ARCH_UNCOMPRESS_H | ||
19 | #define __ASM_ARCH_UNCOMPRESS_H | ||
20 | |||
21 | #include <asm/setup.h> | ||
22 | #include <asm/mach-types.h> | ||
23 | #include <linux/io.h> | ||
24 | #include <linux/amba/serial.h> | ||
25 | #include <mach/hardware.h> | ||
26 | |||
27 | void __iomem *ux500_uart_base; | ||
28 | |||
29 | static void putc(const char c) | ||
30 | { | ||
31 | /* Do nothing if the UART is not enabled. */ | ||
32 | if (!(__raw_readb(ux500_uart_base + UART011_CR) & 0x1)) | ||
33 | return; | ||
34 | |||
35 | if (c == '\n') | ||
36 | putc('\r'); | ||
37 | |||
38 | while (__raw_readb(ux500_uart_base + UART01x_FR) & (1 << 5)) | ||
39 | barrier(); | ||
40 | __raw_writeb(c, ux500_uart_base + UART01x_DR); | ||
41 | } | ||
42 | |||
43 | static void flush(void) | ||
44 | { | ||
45 | if (!(__raw_readb(ux500_uart_base + UART011_CR) & 0x1)) | ||
46 | return; | ||
47 | while (__raw_readb(ux500_uart_base + UART01x_FR) & (1 << 3)) | ||
48 | barrier(); | ||
49 | } | ||
50 | |||
51 | static inline void arch_decomp_setup(void) | ||
52 | { | ||
53 | /* Use machine_is_foo() macro if you need to switch base someday */ | ||
54 | ux500_uart_base = (void __iomem *)U8500_UART2_BASE; | ||
55 | } | ||
56 | |||
57 | #endif /* __ASM_ARCH_UNCOMPRESS_H */ | ||
diff --git a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h b/arch/arm/mach-ux500/irqs-board-mop500.h index d526dd8e87d3..d526dd8e87d3 100644 --- a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h +++ b/arch/arm/mach-ux500/irqs-board-mop500.h | |||
diff --git a/arch/arm/mach-ux500/include/mach/irqs-db8500.h b/arch/arm/mach-ux500/irqs-db8500.h index 68bc14974608..f3a9d5947ef3 100644 --- a/arch/arm/mach-ux500/include/mach/irqs-db8500.h +++ b/arch/arm/mach-ux500/irqs-db8500.h | |||
@@ -109,31 +109,6 @@ | |||
109 | 109 | ||
110 | /* Virtual interrupts corresponding to the PRCMU wakeups. */ | 110 | /* Virtual interrupts corresponding to the PRCMU wakeups. */ |
111 | #define IRQ_PRCMU_BASE IRQ_SOC_START | 111 | #define IRQ_PRCMU_BASE IRQ_SOC_START |
112 | #define NUM_PRCMU_WAKEUPS (IRQ_PRCMU_END - IRQ_PRCMU_BASE) | ||
113 | |||
114 | #define IRQ_PRCMU_RTC (IRQ_PRCMU_BASE) | ||
115 | #define IRQ_PRCMU_RTT0 (IRQ_PRCMU_BASE + 1) | ||
116 | #define IRQ_PRCMU_RTT1 (IRQ_PRCMU_BASE + 2) | ||
117 | #define IRQ_PRCMU_HSI0 (IRQ_PRCMU_BASE + 3) | ||
118 | #define IRQ_PRCMU_HSI1 (IRQ_PRCMU_BASE + 4) | ||
119 | #define IRQ_PRCMU_CA_WAKE (IRQ_PRCMU_BASE + 5) | ||
120 | #define IRQ_PRCMU_USB (IRQ_PRCMU_BASE + 6) | ||
121 | #define IRQ_PRCMU_ABB (IRQ_PRCMU_BASE + 7) | ||
122 | #define IRQ_PRCMU_ABB_FIFO (IRQ_PRCMU_BASE + 8) | ||
123 | #define IRQ_PRCMU_ARM (IRQ_PRCMU_BASE + 9) | ||
124 | #define IRQ_PRCMU_MODEM_SW_RESET_REQ (IRQ_PRCMU_BASE + 10) | ||
125 | #define IRQ_PRCMU_GPIO0 (IRQ_PRCMU_BASE + 11) | ||
126 | #define IRQ_PRCMU_GPIO1 (IRQ_PRCMU_BASE + 12) | ||
127 | #define IRQ_PRCMU_GPIO2 (IRQ_PRCMU_BASE + 13) | ||
128 | #define IRQ_PRCMU_GPIO3 (IRQ_PRCMU_BASE + 14) | ||
129 | #define IRQ_PRCMU_GPIO4 (IRQ_PRCMU_BASE + 15) | ||
130 | #define IRQ_PRCMU_GPIO5 (IRQ_PRCMU_BASE + 16) | ||
131 | #define IRQ_PRCMU_GPIO6 (IRQ_PRCMU_BASE + 17) | ||
132 | #define IRQ_PRCMU_GPIO7 (IRQ_PRCMU_BASE + 18) | ||
133 | #define IRQ_PRCMU_GPIO8 (IRQ_PRCMU_BASE + 19) | ||
134 | #define IRQ_PRCMU_CA_SLEEP (IRQ_PRCMU_BASE + 20) | ||
135 | #define IRQ_PRCMU_HOTMON_LOW (IRQ_PRCMU_BASE + 21) | ||
136 | #define IRQ_PRCMU_HOTMON_HIGH (IRQ_PRCMU_BASE + 22) | ||
137 | #define IRQ_PRCMU_END (IRQ_PRCMU_BASE + 23) | 112 | #define IRQ_PRCMU_END (IRQ_PRCMU_BASE + 23) |
138 | 113 | ||
139 | /* | 114 | /* |
diff --git a/arch/arm/mach-ux500/include/mach/irqs.h b/arch/arm/mach-ux500/irqs.h index fc77b4274c8d..15b2af698ed7 100644 --- a/arch/arm/mach-ux500/include/mach/irqs.h +++ b/arch/arm/mach-ux500/irqs.h | |||
@@ -10,8 +10,6 @@ | |||
10 | #ifndef ASM_ARCH_IRQS_H | 10 | #ifndef ASM_ARCH_IRQS_H |
11 | #define ASM_ARCH_IRQS_H | 11 | #define ASM_ARCH_IRQS_H |
12 | 12 | ||
13 | #include <mach/hardware.h> | ||
14 | |||
15 | #define IRQ_LOCALTIMER 29 | 13 | #define IRQ_LOCALTIMER 29 |
16 | #define IRQ_LOCALWDOG 30 | 14 | #define IRQ_LOCALWDOG 30 |
17 | 15 | ||
@@ -36,14 +34,14 @@ | |||
36 | /* This will be overridden by SoC-specific irq headers */ | 34 | /* This will be overridden by SoC-specific irq headers */ |
37 | #define IRQ_SOC_END IRQ_SOC_START | 35 | #define IRQ_SOC_END IRQ_SOC_START |
38 | 36 | ||
39 | #include <mach/irqs-db8500.h> | 37 | #include "irqs-db8500.h" |
40 | 38 | ||
41 | #define IRQ_BOARD_START IRQ_SOC_END | 39 | #define IRQ_BOARD_START IRQ_SOC_END |
42 | /* This will be overridden by board-specific irq headers */ | 40 | /* This will be overridden by board-specific irq headers */ |
43 | #define IRQ_BOARD_END IRQ_BOARD_START | 41 | #define IRQ_BOARD_END IRQ_BOARD_START |
44 | 42 | ||
45 | #ifdef CONFIG_MACH_MOP500 | 43 | #ifdef CONFIG_MACH_MOP500 |
46 | #include <mach/irqs-board-mop500.h> | 44 | #include "irqs-board-mop500.h" |
47 | #endif | 45 | #endif |
48 | 46 | ||
49 | #define UX500_NR_IRQS IRQ_BOARD_END | 47 | #define UX500_NR_IRQS IRQ_BOARD_END |
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index 18f7af339dc9..12ad8ad850aa 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c | |||
@@ -22,9 +22,9 @@ | |||
22 | #include <asm/smp_plat.h> | 22 | #include <asm/smp_plat.h> |
23 | #include <asm/smp_scu.h> | 23 | #include <asm/smp_scu.h> |
24 | 24 | ||
25 | #include <mach/hardware.h> | 25 | #include "setup.h" |
26 | #include <mach/setup.h> | ||
27 | 26 | ||
27 | #include "db8500-regs.h" | ||
28 | #include "id.h" | 28 | #include "id.h" |
29 | 29 | ||
30 | /* This is called from headsmp.S to wakeup the secondary core */ | 30 | /* This is called from headsmp.S to wakeup the secondary core */ |
diff --git a/arch/arm/mach-ux500/pm.c b/arch/arm/mach-ux500/pm.c new file mode 100644 index 000000000000..1a468f0fd22e --- /dev/null +++ b/arch/arm/mach-ux500/pm.c | |||
@@ -0,0 +1,167 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010-2013 | ||
3 | * Author: Rickard Andersson <rickard.andersson@stericsson.com> for | ||
4 | * ST-Ericsson. | ||
5 | * Author: Daniel Lezcano <daniel.lezcano@linaro.org> for Linaro. | ||
6 | * License terms: GNU General Public License (GPL) version 2 | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/irqchip/arm-gic.h> | ||
12 | #include <linux/delay.h> | ||
13 | #include <linux/io.h> | ||
14 | #include <linux/platform_data/arm-ux500-pm.h> | ||
15 | |||
16 | #include "db8500-regs.h" | ||
17 | |||
18 | /* ARM WFI Standby signal register */ | ||
19 | #define PRCM_ARM_WFI_STANDBY (prcmu_base + 0x130) | ||
20 | #define PRCM_ARM_WFI_STANDBY_WFI0 0x08 | ||
21 | #define PRCM_ARM_WFI_STANDBY_WFI1 0x10 | ||
22 | #define PRCM_IOCR (prcmu_base + 0x310) | ||
23 | #define PRCM_IOCR_IOFORCE 0x1 | ||
24 | |||
25 | /* Dual A9 core interrupt management unit registers */ | ||
26 | #define PRCM_A9_MASK_REQ (prcmu_base + 0x328) | ||
27 | #define PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ 0x1 | ||
28 | |||
29 | #define PRCM_A9_MASK_ACK (prcmu_base + 0x32c) | ||
30 | #define PRCM_ARMITMSK31TO0 (prcmu_base + 0x11c) | ||
31 | #define PRCM_ARMITMSK63TO32 (prcmu_base + 0x120) | ||
32 | #define PRCM_ARMITMSK95TO64 (prcmu_base + 0x124) | ||
33 | #define PRCM_ARMITMSK127TO96 (prcmu_base + 0x128) | ||
34 | #define PRCM_POWER_STATE_VAL (prcmu_base + 0x25C) | ||
35 | #define PRCM_ARMITVAL31TO0 (prcmu_base + 0x260) | ||
36 | #define PRCM_ARMITVAL63TO32 (prcmu_base + 0x264) | ||
37 | #define PRCM_ARMITVAL95TO64 (prcmu_base + 0x268) | ||
38 | #define PRCM_ARMITVAL127TO96 (prcmu_base + 0x26C) | ||
39 | |||
40 | static void __iomem *prcmu_base; | ||
41 | |||
42 | /* This function decouple the gic from the prcmu */ | ||
43 | int prcmu_gic_decouple(void) | ||
44 | { | ||
45 | u32 val = readl(PRCM_A9_MASK_REQ); | ||
46 | |||
47 | /* Set bit 0 register value to 1 */ | ||
48 | writel(val | PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ, | ||
49 | PRCM_A9_MASK_REQ); | ||
50 | |||
51 | /* Make sure the register is updated */ | ||
52 | readl(PRCM_A9_MASK_REQ); | ||
53 | |||
54 | /* Wait a few cycles for the gic mask completion */ | ||
55 | udelay(1); | ||
56 | |||
57 | return 0; | ||
58 | } | ||
59 | |||
60 | /* This function recouple the gic with the prcmu */ | ||
61 | int prcmu_gic_recouple(void) | ||
62 | { | ||
63 | u32 val = readl(PRCM_A9_MASK_REQ); | ||
64 | |||
65 | /* Set bit 0 register value to 0 */ | ||
66 | writel(val & ~PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ, PRCM_A9_MASK_REQ); | ||
67 | |||
68 | return 0; | ||
69 | } | ||
70 | |||
71 | #define PRCMU_GIC_NUMBER_REGS 5 | ||
72 | |||
73 | /* | ||
74 | * This function checks if there are pending irq on the gic. It only | ||
75 | * makes sense if the gic has been decoupled before with the | ||
76 | * db8500_prcmu_gic_decouple function. Disabling an interrupt only | ||
77 | * disables the forwarding of the interrupt to any CPU interface. It | ||
78 | * does not prevent the interrupt from changing state, for example | ||
79 | * becoming pending, or active and pending if it is already | ||
80 | * active. Hence, we have to check the interrupt is pending *and* is | ||
81 | * active. | ||
82 | */ | ||
83 | bool prcmu_gic_pending_irq(void) | ||
84 | { | ||
85 | u32 pr; /* Pending register */ | ||
86 | u32 er; /* Enable register */ | ||
87 | void __iomem *dist_base = __io_address(U8500_GIC_DIST_BASE); | ||
88 | int i; | ||
89 | |||
90 | /* 5 registers. STI & PPI not skipped */ | ||
91 | for (i = 0; i < PRCMU_GIC_NUMBER_REGS; i++) { | ||
92 | |||
93 | pr = readl_relaxed(dist_base + GIC_DIST_PENDING_SET + i * 4); | ||
94 | er = readl_relaxed(dist_base + GIC_DIST_ENABLE_SET + i * 4); | ||
95 | |||
96 | if (pr & er) | ||
97 | return true; /* There is a pending interrupt */ | ||
98 | } | ||
99 | |||
100 | return false; | ||
101 | } | ||
102 | |||
103 | /* | ||
104 | * This function checks if there are pending interrupt on the | ||
105 | * prcmu which has been delegated to monitor the irqs with the | ||
106 | * db8500_prcmu_copy_gic_settings function. | ||
107 | */ | ||
108 | bool prcmu_pending_irq(void) | ||
109 | { | ||
110 | u32 it, im; | ||
111 | int i; | ||
112 | |||
113 | for (i = 0; i < PRCMU_GIC_NUMBER_REGS - 1; i++) { | ||
114 | it = readl(PRCM_ARMITVAL31TO0 + i * 4); | ||
115 | im = readl(PRCM_ARMITMSK31TO0 + i * 4); | ||
116 | if (it & im) | ||
117 | return true; /* There is a pending interrupt */ | ||
118 | } | ||
119 | |||
120 | return false; | ||
121 | } | ||
122 | |||
123 | /* | ||
124 | * This function checks if the specified cpu is in in WFI. It's usage | ||
125 | * makes sense only if the gic is decoupled with the db8500_prcmu_gic_decouple | ||
126 | * function. Of course passing smp_processor_id() to this function will | ||
127 | * always return false... | ||
128 | */ | ||
129 | bool prcmu_is_cpu_in_wfi(int cpu) | ||
130 | { | ||
131 | return readl(PRCM_ARM_WFI_STANDBY) & cpu ? PRCM_ARM_WFI_STANDBY_WFI1 : | ||
132 | PRCM_ARM_WFI_STANDBY_WFI0; | ||
133 | } | ||
134 | |||
135 | /* | ||
136 | * This function copies the gic SPI settings to the prcmu in order to | ||
137 | * monitor them and abort/finish the retention/off sequence or state. | ||
138 | */ | ||
139 | int prcmu_copy_gic_settings(void) | ||
140 | { | ||
141 | u32 er; /* Enable register */ | ||
142 | void __iomem *dist_base = __io_address(U8500_GIC_DIST_BASE); | ||
143 | int i; | ||
144 | |||
145 | /* We skip the STI and PPI */ | ||
146 | for (i = 0; i < PRCMU_GIC_NUMBER_REGS - 1; i++) { | ||
147 | er = readl_relaxed(dist_base + | ||
148 | GIC_DIST_ENABLE_SET + (i + 1) * 4); | ||
149 | writel(er, PRCM_ARMITMSK31TO0 + i * 4); | ||
150 | } | ||
151 | |||
152 | return 0; | ||
153 | } | ||
154 | |||
155 | void __init ux500_pm_init(u32 phy_base, u32 size) | ||
156 | { | ||
157 | prcmu_base = ioremap(phy_base, size); | ||
158 | if (!prcmu_base) { | ||
159 | pr_err("could not remap PRCMU for PM functions\n"); | ||
160 | return; | ||
161 | } | ||
162 | /* | ||
163 | * On watchdog reboot the GIC is in some cases decoupled. | ||
164 | * This will make sure that the GIC is correctly configured. | ||
165 | */ | ||
166 | prcmu_gic_recouple(); | ||
167 | } | ||
diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/setup.h index bddce2b49372..bddce2b49372 100644 --- a/arch/arm/mach-ux500/include/mach/setup.h +++ b/arch/arm/mach-ux500/setup.h | |||
diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c index d07bbe7f04a6..b6bd0efcbe64 100644 --- a/arch/arm/mach-ux500/timer.c +++ b/arch/arm/mach-ux500/timer.c | |||
@@ -14,10 +14,10 @@ | |||
14 | 14 | ||
15 | #include <asm/smp_twd.h> | 15 | #include <asm/smp_twd.h> |
16 | 16 | ||
17 | #include <mach/setup.h> | 17 | #include "setup.h" |
18 | #include <mach/hardware.h> | 18 | #include "irqs.h" |
19 | #include <mach/irqs.h> | ||
20 | 19 | ||
20 | #include "db8500-regs.h" | ||
21 | #include "id.h" | 21 | #include "id.h" |
22 | 22 | ||
23 | #ifdef CONFIG_HAVE_ARM_TWD | 23 | #ifdef CONFIG_HAVE_ARM_TWD |
diff --git a/arch/arm/mach-ux500/usb.c b/arch/arm/mach-ux500/usb.c index 78ac65f62e87..2dfc72f7cd8a 100644 --- a/arch/arm/mach-ux500/usb.c +++ b/arch/arm/mach-ux500/usb.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/platform_data/usb-musb-ux500.h> | 10 | #include <linux/platform_data/usb-musb-ux500.h> |
11 | #include <linux/platform_data/dma-ste-dma40.h> | 11 | #include <linux/platform_data/dma-ste-dma40.h> |
12 | 12 | ||
13 | #include <mach/hardware.h> | 13 | #include "db8500-regs.h" |
14 | 14 | ||
15 | #define MUSB_DMA40_RX_CH { \ | 15 | #define MUSB_DMA40_RX_CH { \ |
16 | .mode = STEDMA40_MODE_LOGICAL, \ | 16 | .mode = STEDMA40_MODE_LOGICAL, \ |