aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/Kconfig16
-rw-r--r--arch/arm/Kconfig.debug8
-rw-r--r--arch/arm/include/debug/ux500.S48
-rw-r--r--arch/arm/mach-ux500/Kconfig14
-rw-r--r--arch/arm/mach-ux500/Makefile4
-rw-r--r--arch/arm/mach-ux500/board-mop500-audio.c7
-rw-r--r--arch/arm/mach-ux500/board-mop500-pins.c2
-rw-r--r--arch/arm/mach-ux500/board-mop500-sdi.c4
-rw-r--r--arch/arm/mach-ux500/board-mop500-u8500uib.c9
-rw-r--r--arch/arm/mach-ux500/board-mop500-uib.c1
-rw-r--r--arch/arm/mach-ux500/board-mop500.c66
-rw-r--r--arch/arm/mach-ux500/board-mop500.h4
-rw-r--r--arch/arm/mach-ux500/cache-l2x0.c2
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c12
-rw-r--r--arch/arm/mach-ux500/cpu.c33
-rw-r--r--arch/arm/mach-ux500/cpuidle.c5
-rw-r--r--arch/arm/mach-ux500/db8500-regs.h (renamed from arch/arm/mach-ux500/include/mach/db8500-regs.h)28
-rw-r--r--arch/arm/mach-ux500/devices-common.c3
-rw-r--r--arch/arm/mach-ux500/devices-db8500.c8
-rw-r--r--arch/arm/mach-ux500/devices-db8500.h3
-rw-r--r--arch/arm/mach-ux500/devices.c5
-rw-r--r--arch/arm/mach-ux500/devices.h (renamed from arch/arm/mach-ux500/include/mach/devices.h)0
-rw-r--r--arch/arm/mach-ux500/hotplug.c2
-rw-r--r--arch/arm/mach-ux500/id.c4
-rw-r--r--arch/arm/mach-ux500/include/mach/debug-macro.S39
-rw-r--r--arch/arm/mach-ux500/include/mach/hardware.h47
-rw-r--r--arch/arm/mach-ux500/include/mach/timex.h6
-rw-r--r--arch/arm/mach-ux500/include/mach/uncompress.h57
-rw-r--r--arch/arm/mach-ux500/irqs-board-mop500.h (renamed from arch/arm/mach-ux500/include/mach/irqs-board-mop500.h)0
-rw-r--r--arch/arm/mach-ux500/irqs-db8500.h (renamed from arch/arm/mach-ux500/include/mach/irqs-db8500.h)25
-rw-r--r--arch/arm/mach-ux500/irqs.h (renamed from arch/arm/mach-ux500/include/mach/irqs.h)6
-rw-r--r--arch/arm/mach-ux500/platsmp.c4
-rw-r--r--arch/arm/mach-ux500/pm.c167
-rw-r--r--arch/arm/mach-ux500/setup.h (renamed from arch/arm/mach-ux500/include/mach/setup.h)0
-rw-r--r--arch/arm/mach-ux500/timer.c6
-rw-r--r--arch/arm/mach-ux500/usb.c2
-rw-r--r--drivers/clk/ux500/clk-prcc.c1
-rw-r--r--drivers/clk/ux500/u8500_clk.c142
-rw-r--r--drivers/clocksource/clksrc-dbx500-prcmu.c3
-rw-r--r--drivers/crypto/ux500/cryp/cryp.c2
-rw-r--r--drivers/crypto/ux500/cryp/cryp_core.c1
-rw-r--r--drivers/crypto/ux500/hash/hash_core.c1
-rw-r--r--drivers/mfd/db8500-prcmu.c316
-rw-r--r--drivers/mfd/dbx500-prcmu-regs.h204
-rw-r--r--drivers/staging/ste_rmi4/Makefile1
-rw-r--r--drivers/staging/ste_rmi4/board-mop500-u8500uib-rmi4.c31
-rw-r--r--drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c31
-rw-r--r--drivers/staging/ste_rmi4/synaptics_i2c_rmi4.h1
-rw-r--r--include/linux/mfd/db8500-prcmu.h10
-rw-r--r--include/linux/mfd/dbx500-prcmu.h38
-rw-r--r--include/linux/platform_data/arm-ux500-pm.h21
-rw-r--r--include/linux/platform_data/asoc-ux500-msp.h (renamed from arch/arm/mach-ux500/include/mach/msp.h)0
-rw-r--r--include/linux/platform_data/clk-ux500.h3
-rw-r--r--sound/soc/ux500/mop500_ab8500.c2
-rw-r--r--sound/soc/ux500/ux500_msp_dai.c4
-rw-r--r--sound/soc/ux500/ux500_msp_i2s.c4
-rw-r--r--sound/soc/ux500/ux500_msp_i2s.h2
57 files changed, 699 insertions, 766 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
856config 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
872config ARCH_DAVINCI 856config 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 @@
1config ARCH_U8500
2 bool "ST-Ericsson U8500 Series" if ARCH_MULTI_V7
3 depends on MMU
4 select ARCH_HAS_CPUFREQ
5 select ARCH_REQUIRE_GPIOLIB
6 select ARM_AMBA
7 select CLKDEV_LOOKUP
8 select CPU_V7
9 select GENERIC_CLOCKEVENTS
10 select HAVE_SMP
11 select MIGHT_HAVE_CACHE_L2X0
12 help
13 Support for ST-Ericsson's Ux500 architecture
14
1if ARCH_U8500 15if ARCH_U8500
2 16
3config UX500_SOC_COMMON 17config UX500_SOC_COMMON
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index f24710dfc395..bf9b6be5b180 100644
--- a/arch/arm/mach-ux500/Makefile
+++ b/arch/arm/mach-ux500/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5obj-y := cpu.o devices.o devices-common.o \ 5obj-y := cpu.o devices.o devices-common.o \
6 id.o usb.o timer.o 6 id.o usb.o timer.o pm.o
7obj-$(CONFIG_CPU_IDLE) += cpuidle.o 7obj-$(CONFIG_CPU_IDLE) += cpuidle.o
8obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o 8obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
9obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o 9obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o
@@ -15,3 +15,5 @@ obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \
15 board-mop500-audio.o 15 board-mop500-audio.o
16obj-$(CONFIG_SMP) += platsmp.o headsmp.o 16obj-$(CONFIG_SMP) += platsmp.o headsmp.o
17obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 17obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
18
19CFLAGS_hotplug.o += -march=armv7-a
diff --git a/arch/arm/mach-ux500/board-mop500-audio.c b/arch/arm/mach-ux500/board-mop500-audio.c
index 7209db7cdc72..aba9e5692958 100644
--- a/arch/arm/mach-ux500/board-mop500-audio.c
+++ b/arch/arm/mach-ux500/board-mop500-audio.c
@@ -10,10 +10,9 @@
10#include <linux/platform_data/pinctrl-nomadik.h> 10#include <linux/platform_data/pinctrl-nomadik.h>
11#include <linux/platform_data/dma-ste-dma40.h> 11#include <linux/platform_data/dma-ste-dma40.h>
12 12
13#include <mach/devices.h> 13#include "devices.h"
14#include <mach/hardware.h> 14#include "irqs.h"
15#include <mach/irqs.h> 15#include <linux/platform_data/asoc-ux500-msp.h>
16#include <mach/msp.h>
17 16
18#include "ste-dma40-db8500.h" 17#include "ste-dma40-db8500.h"
19#include "board-mop500.h" 18#include "board-mop500.h"
diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c
index 0a3f30df1eb8..f3976f9c404a 100644
--- a/arch/arm/mach-ux500/board-mop500-pins.c
+++ b/arch/arm/mach-ux500/board-mop500-pins.c
@@ -13,8 +13,6 @@
13 13
14#include <asm/mach-types.h> 14#include <asm/mach-types.h>
15 15
16#include <mach/hardware.h>
17
18#include "pins-db8500.h" 16#include "pins-db8500.h"
19#include "board-mop500.h" 17#include "board-mop500.h"
20 18
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c
index 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 */ 19static struct i2c_board_info __initdata mop500_i2c3_devices_u8500[] = {
20struct i2c_board_info __initdata __weak mop500_i2c3_devices_u8500[] = { 20 {
21 I2C_BOARD_INFO("synaptics_rmi4_i2c", 0x4B),
22 .irq = NOMADIK_GPIO_TO_IRQ(84),
23 },
21}; 24};
22 25
23/* 26/*
diff --git a/arch/arm/mach-ux500/board-mop500-uib.c b/arch/arm/mach-ux500/board-mop500-uib.c
index 7037d3687e9f..bdaa422da028 100644
--- a/arch/arm/mach-ux500/board-mop500-uib.c
+++ b/arch/arm/mach-ux500/board-mop500-uib.c
@@ -11,7 +11,6 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/i2c.h> 12#include <linux/i2c.h>
13 13
14#include <mach/hardware.h>
15#include "board-mop500.h" 14#include "board-mop500.h"
16#include "id.h" 15#include "id.h"
17 16
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 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
213static 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
228static 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
257static 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
266static struct platform_device u8500_cpufreq_cooling_device = { 209static 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
16static void __iomem *l2x0_base; 16static void __iomem *l2x0_base;
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index 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
101static struct resource db8500_pmu_resources[] = { 97static struct resource db8500_pmu_resources[] = {
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c
index 537870d3fea8..915e2636cbaa 100644
--- a/arch/arm/mach-ux500/cpu.c
+++ b/arch/arm/mach-ux500/cpu.c
@@ -8,7 +8,7 @@
8 8
9#include <linux/platform_device.h> 9#include <linux/platform_device.h>
10#include <linux/io.h> 10#include <linux/io.h>
11#include <linux/mfd/db8500-prcmu.h> 11#include <linux/mfd/dbx500-prcmu.h>
12#include <linux/clksrc-dbx500-prcmu.h> 12#include <linux/clksrc-dbx500-prcmu.h>
13#include <linux/sys_soc.h> 13#include <linux/sys_soc.h>
14#include <linux/err.h> 14#include <linux/err.h>
@@ -20,18 +20,17 @@
20#include <linux/irqchip.h> 20#include <linux/irqchip.h>
21#include <linux/irqchip/arm-gic.h> 21#include <linux/irqchip/arm-gic.h>
22#include <linux/platform_data/clk-ux500.h> 22#include <linux/platform_data/clk-ux500.h>
23#include <linux/platform_data/arm-ux500-pm.h>
23 24
24#include <asm/mach/map.h> 25#include <asm/mach/map.h>
25 26
26#include <mach/hardware.h> 27#include "setup.h"
27#include <mach/setup.h> 28#include "devices.h"
28#include <mach/devices.h>
29 29
30#include "board-mop500.h" 30#include "board-mop500.h"
31#include "db8500-regs.h"
31#include "id.h" 32#include "id.h"
32 33
33void __iomem *_PRCMU_BASE;
34
35/* 34/*
36 * FIXME: Should we set up the GPIO domain here? 35 * FIXME: Should we set up the GPIO domain here?
37 * 36 *
@@ -68,13 +67,23 @@ void __init ux500_init_irq(void)
68 * Init clocks here so that they are available for system timer 67 * Init clocks here so that they are available for system timer
69 * initialization. 68 * initialization.
70 */ 69 */
71 if (cpu_is_u8500_family() || cpu_is_u9540()) 70 if (cpu_is_u8500_family()) {
72 db8500_prcmu_early_init(); 71 prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1);
73 72 ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1);
74 if (cpu_is_u8500_family() || cpu_is_u9540()) 73 u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE,
75 u8500_clk_init(); 74 U8500_CLKRST3_BASE, U8500_CLKRST5_BASE,
76 else if (cpu_is_u8540()) 75 U8500_CLKRST6_BASE);
76 } else if (cpu_is_u9540()) {
77 prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1);
78 ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1);
79 u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE,
80 U8500_CLKRST3_BASE, U8500_CLKRST5_BASE,
81 U8500_CLKRST6_BASE);
82 } else if (cpu_is_u8540()) {
83 prcmu_early_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1);
84 ux500_pm_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1);
77 u8540_clk_init(); 85 u8540_clk_init();
86 }
78} 87}
79 88
80void __init ux500_init_late(void) 89void __init ux500_init_late(void)
diff --git a/arch/arm/mach-ux500/cpuidle.c b/arch/arm/mach-ux500/cpuidle.c
index 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
23static atomic_t master = ATOMIC_INIT(0); 26static atomic_t master = ATOMIC_INIT(0);
24static DEFINE_SPINLOCK(master_lock); 27static DEFINE_SPINLOCK(master_lock);
25static DEFINE_PER_CPU(struct cpuidle_device, ux500_cpuidle_device); 28static 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
200struct prcmu_pdata db8500_prcmu_pdata = { 200struct prcmu_pdata db8500_prcmu_pdata = {
201 .ab_platdata = &ab8500_platdata, 201 .ab_platdata = &ab8500_platdata,
202 .ab_irq = IRQ_DB8500_AB8500,
203 .irq_base = IRQ_PRCMU_BASE,
202 .version_offset = DB8500_PRCMU_FW_VERSION_OFFSET, 204 .version_offset = DB8500_PRCMU_FW_VERSION_OFFSET,
203 .legacy_offset = DB8500_PRCMU_LEGACY_OFFSET, 205 .legacy_offset = DB8500_PRCMU_LEGACY_OFFSET,
204}; 206};
diff --git a/arch/arm/mach-ux500/devices-db8500.h b/arch/arm/mach-ux500/devices-db8500.h
index dbcb35c48f06..321998320f98 100644
--- a/arch/arm/mach-ux500/devices-db8500.h
+++ b/arch/arm/mach-ux500/devices-db8500.h
@@ -9,7 +9,8 @@
9#define __DEVICES_DB8500_H 9#define __DEVICES_DB8500_H
10 10
11#include <linux/platform_data/usb-musb-ux500.h> 11#include <linux/platform_data/usb-musb-ux500.h>
12#include <mach/irqs.h> 12#include "irqs.h"
13#include "db8500-regs.h"
13#include "devices-common.h" 14#include "devices-common.h"
14 15
15struct ske_keypad_platform_data; 16struct ske_keypad_platform_data;
diff --git a/arch/arm/mach-ux500/devices.c b/arch/arm/mach-ux500/devices.c
index ea0a2f92ca70..0f9e52b95935 100644
--- a/arch/arm/mach-ux500/devices.c
+++ b/arch/arm/mach-ux500/devices.c
@@ -11,8 +11,9 @@
11#include <linux/io.h> 11#include <linux/io.h>
12#include <linux/amba/bus.h> 12#include <linux/amba/bus.h>
13 13
14#include <mach/hardware.h> 14#include "setup.h"
15#include <mach/setup.h> 15
16#include "db8500-regs.h"
16 17
17void __init amba_add_devices(struct amba_device *devs[], int num) 18void __init amba_add_devices(struct amba_device *devs[], int num)
18{ 19{
diff --git a/arch/arm/mach-ux500/include/mach/devices.h b/arch/arm/mach-ux500/devices.h
index cbc6f1e4104d..cbc6f1e4104d 100644
--- a/arch/arm/mach-ux500/include/mach/devices.h
+++ b/arch/arm/mach-ux500/devices.h
diff --git a/arch/arm/mach-ux500/hotplug.c b/arch/arm/mach-ux500/hotplug.c
index 2f6af259015d..87abcf278432 100644
--- a/arch/arm/mach-ux500/hotplug.c
+++ b/arch/arm/mach-ux500/hotplug.c
@@ -15,7 +15,7 @@
15#include <asm/cacheflush.h> 15#include <asm/cacheflush.h>
16#include <asm/smp_plat.h> 16#include <asm/smp_plat.h>
17 17
18#include <mach/setup.h> 18#include "setup.h"
19 19
20/* 20/*
21 * platform-specific code to shutdown a CPU 21 * platform-specific code to shutdown a CPU
diff --git a/arch/arm/mach-ux500/id.c b/arch/arm/mach-ux500/id.c
index 9f951842e1e5..0d33d1a06955 100644
--- a/arch/arm/mach-ux500/id.c
+++ b/arch/arm/mach-ux500/id.c
@@ -14,9 +14,9 @@
14#include <asm/cacheflush.h> 14#include <asm/cacheflush.h>
15#include <asm/mach/map.h> 15#include <asm/mach/map.h>
16 16
17#include <mach/hardware.h> 17#include "setup.h"
18#include <mach/setup.h>
19 18
19#include "db8500-regs.h"
20#include "id.h" 20#include "id.h"
21 21
22struct dbx500_asic_id dbx500_id; 22struct dbx500_asic_id dbx500_id;
diff --git a/arch/arm/mach-ux500/include/mach/debug-macro.S b/arch/arm/mach-ux500/include/mach/debug-macro.S
deleted file mode 100644
index 67035223334a..000000000000
--- a/arch/arm/mach-ux500/include/mach/debug-macro.S
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * Debugging macro include header
3 *
4 * Copyright (C) 2009 ST-Ericsson
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11#include <mach/hardware.h>
12
13#if CONFIG_UX500_DEBUG_UART > 2
14#error Invalid Ux500 debug UART
15#endif
16
17/*
18 * DEBUG_LL only works if only one SOC is built in. We don't use #else below
19 * in order to get "__UX500_UART redefined" warnings if more than one SOC is
20 * built, so that there's some hint during the build that something is wrong.
21 */
22
23#ifdef CONFIG_UX500_SOC_DB8500
24#define __UX500_UART(n) U8500_UART##n##_BASE
25#endif
26
27#ifndef __UX500_UART
28#error Unknown SOC
29#endif
30
31#define UX500_UART(n) __UX500_UART(n)
32#define UART_BASE UX500_UART(CONFIG_UX500_DEBUG_UART)
33
34 .macro addruart, rp, rv, tmp
35 ldr \rp, =UART_BASE @ no, physical address
36 ldr \rv, =IO_ADDRESS(UART_BASE) @ yes, virtual address
37 .endm
38
39#include <asm/hardware/debug-pl01x.S>
diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h
deleted file mode 100644
index 5201ddace503..000000000000
--- a/arch/arm/mach-ux500/include/mach/hardware.h
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * Copyright (C) 2009 ST-Ericsson.
3 *
4 * U8500 hardware definitions
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#ifndef __MACH_HARDWARE_H
11#define __MACH_HARDWARE_H
12
13/*
14 * Macros to get at IO space when running virtually
15 * We dont map all the peripherals, let ioremap do
16 * this for us. We map only very basic peripherals here.
17 */
18#define U8500_IO_VIRTUAL 0xf0000000
19#define U8500_IO_PHYSICAL 0xa0000000
20/* This is where we map in the ROM to check ASIC IDs */
21#define UX500_VIRT_ROM 0xf0000000
22
23/* This macro is used in assembly, so no cast */
24#define IO_ADDRESS(x) \
25 (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL)
26
27/* typesafe io address */
28#define __io_address(n) IOMEM(IO_ADDRESS(n))
29
30/* Used by some plat-nomadik code */
31#define io_p2v(n) __io_address(n)
32
33#include <mach/db8500-regs.h>
34
35#define MSP_TX_RX_REG_OFFSET 0
36#define CRYP1_RX_REG_OFFSET 0x10
37#define CRYP1_TX_REG_OFFSET 0x8
38#define HASH1_TX_REG_OFFSET 0x4
39
40#ifndef __ASSEMBLY__
41
42extern void __iomem *_PRCMU_BASE;
43
44#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
45
46#endif /* __ASSEMBLY__ */
47#endif /* __MACH_HARDWARE_H */
diff --git a/arch/arm/mach-ux500/include/mach/timex.h b/arch/arm/mach-ux500/include/mach/timex.h
deleted file mode 100644
index d0942c174018..000000000000
--- a/arch/arm/mach-ux500/include/mach/timex.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_ARCH_TIMEX_H
2#define __ASM_ARCH_TIMEX_H
3
4#define CLOCK_TICK_RATE 110000000
5
6#endif
diff --git a/arch/arm/mach-ux500/include/mach/uncompress.h b/arch/arm/mach-ux500/include/mach/uncompress.h
deleted file mode 100644
index 36969d52e53a..000000000000
--- a/arch/arm/mach-ux500/include/mach/uncompress.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * Copyright (C) 2009 ST-Ericsson
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18#ifndef __ASM_ARCH_UNCOMPRESS_H
19#define __ASM_ARCH_UNCOMPRESS_H
20
21#include <asm/setup.h>
22#include <asm/mach-types.h>
23#include <linux/io.h>
24#include <linux/amba/serial.h>
25#include <mach/hardware.h>
26
27void __iomem *ux500_uart_base;
28
29static void putc(const char c)
30{
31 /* Do nothing if the UART is not enabled. */
32 if (!(__raw_readb(ux500_uart_base + UART011_CR) & 0x1))
33 return;
34
35 if (c == '\n')
36 putc('\r');
37
38 while (__raw_readb(ux500_uart_base + UART01x_FR) & (1 << 5))
39 barrier();
40 __raw_writeb(c, ux500_uart_base + UART01x_DR);
41}
42
43static void flush(void)
44{
45 if (!(__raw_readb(ux500_uart_base + UART011_CR) & 0x1))
46 return;
47 while (__raw_readb(ux500_uart_base + UART01x_FR) & (1 << 3))
48 barrier();
49}
50
51static inline void arch_decomp_setup(void)
52{
53 /* Use machine_is_foo() macro if you need to switch base someday */
54 ux500_uart_base = (void __iomem *)U8500_UART2_BASE;
55}
56
57#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h b/arch/arm/mach-ux500/irqs-board-mop500.h
index d526dd8e87d3..d526dd8e87d3 100644
--- a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h
+++ b/arch/arm/mach-ux500/irqs-board-mop500.h
diff --git a/arch/arm/mach-ux500/include/mach/irqs-db8500.h b/arch/arm/mach-ux500/irqs-db8500.h
index 68bc14974608..f3a9d5947ef3 100644
--- a/arch/arm/mach-ux500/include/mach/irqs-db8500.h
+++ b/arch/arm/mach-ux500/irqs-db8500.h
@@ -109,31 +109,6 @@
109 109
110/* Virtual interrupts corresponding to the PRCMU wakeups. */ 110/* Virtual interrupts corresponding to the PRCMU wakeups. */
111#define IRQ_PRCMU_BASE IRQ_SOC_START 111#define IRQ_PRCMU_BASE IRQ_SOC_START
112#define NUM_PRCMU_WAKEUPS (IRQ_PRCMU_END - IRQ_PRCMU_BASE)
113
114#define IRQ_PRCMU_RTC (IRQ_PRCMU_BASE)
115#define IRQ_PRCMU_RTT0 (IRQ_PRCMU_BASE + 1)
116#define IRQ_PRCMU_RTT1 (IRQ_PRCMU_BASE + 2)
117#define IRQ_PRCMU_HSI0 (IRQ_PRCMU_BASE + 3)
118#define IRQ_PRCMU_HSI1 (IRQ_PRCMU_BASE + 4)
119#define IRQ_PRCMU_CA_WAKE (IRQ_PRCMU_BASE + 5)
120#define IRQ_PRCMU_USB (IRQ_PRCMU_BASE + 6)
121#define IRQ_PRCMU_ABB (IRQ_PRCMU_BASE + 7)
122#define IRQ_PRCMU_ABB_FIFO (IRQ_PRCMU_BASE + 8)
123#define IRQ_PRCMU_ARM (IRQ_PRCMU_BASE + 9)
124#define IRQ_PRCMU_MODEM_SW_RESET_REQ (IRQ_PRCMU_BASE + 10)
125#define IRQ_PRCMU_GPIO0 (IRQ_PRCMU_BASE + 11)
126#define IRQ_PRCMU_GPIO1 (IRQ_PRCMU_BASE + 12)
127#define IRQ_PRCMU_GPIO2 (IRQ_PRCMU_BASE + 13)
128#define IRQ_PRCMU_GPIO3 (IRQ_PRCMU_BASE + 14)
129#define IRQ_PRCMU_GPIO4 (IRQ_PRCMU_BASE + 15)
130#define IRQ_PRCMU_GPIO5 (IRQ_PRCMU_BASE + 16)
131#define IRQ_PRCMU_GPIO6 (IRQ_PRCMU_BASE + 17)
132#define IRQ_PRCMU_GPIO7 (IRQ_PRCMU_BASE + 18)
133#define IRQ_PRCMU_GPIO8 (IRQ_PRCMU_BASE + 19)
134#define IRQ_PRCMU_CA_SLEEP (IRQ_PRCMU_BASE + 20)
135#define IRQ_PRCMU_HOTMON_LOW (IRQ_PRCMU_BASE + 21)
136#define IRQ_PRCMU_HOTMON_HIGH (IRQ_PRCMU_BASE + 22)
137#define IRQ_PRCMU_END (IRQ_PRCMU_BASE + 23) 112#define IRQ_PRCMU_END (IRQ_PRCMU_BASE + 23)
138 113
139/* 114/*
diff --git a/arch/arm/mach-ux500/include/mach/irqs.h b/arch/arm/mach-ux500/irqs.h
index fc77b4274c8d..15b2af698ed7 100644
--- a/arch/arm/mach-ux500/include/mach/irqs.h
+++ b/arch/arm/mach-ux500/irqs.h
@@ -10,8 +10,6 @@
10#ifndef ASM_ARCH_IRQS_H 10#ifndef ASM_ARCH_IRQS_H
11#define ASM_ARCH_IRQS_H 11#define ASM_ARCH_IRQS_H
12 12
13#include <mach/hardware.h>
14
15#define IRQ_LOCALTIMER 29 13#define IRQ_LOCALTIMER 29
16#define IRQ_LOCALWDOG 30 14#define IRQ_LOCALWDOG 30
17 15
@@ -36,14 +34,14 @@
36/* This will be overridden by SoC-specific irq headers */ 34/* This will be overridden by SoC-specific irq headers */
37#define IRQ_SOC_END IRQ_SOC_START 35#define IRQ_SOC_END IRQ_SOC_START
38 36
39#include <mach/irqs-db8500.h> 37#include "irqs-db8500.h"
40 38
41#define IRQ_BOARD_START IRQ_SOC_END 39#define IRQ_BOARD_START IRQ_SOC_END
42/* This will be overridden by board-specific irq headers */ 40/* This will be overridden by board-specific irq headers */
43#define IRQ_BOARD_END IRQ_BOARD_START 41#define IRQ_BOARD_END IRQ_BOARD_START
44 42
45#ifdef CONFIG_MACH_MOP500 43#ifdef CONFIG_MACH_MOP500
46#include <mach/irqs-board-mop500.h> 44#include "irqs-board-mop500.h"
47#endif 45#endif
48 46
49#define UX500_NR_IRQS IRQ_BOARD_END 47#define UX500_NR_IRQS IRQ_BOARD_END
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
index 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
40static void __iomem *prcmu_base;
41
42/* This function decouple the gic from the prcmu */
43int prcmu_gic_decouple(void)
44{
45 u32 val = readl(PRCM_A9_MASK_REQ);
46
47 /* Set bit 0 register value to 1 */
48 writel(val | PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ,
49 PRCM_A9_MASK_REQ);
50
51 /* Make sure the register is updated */
52 readl(PRCM_A9_MASK_REQ);
53
54 /* Wait a few cycles for the gic mask completion */
55 udelay(1);
56
57 return 0;
58}
59
60/* This function recouple the gic with the prcmu */
61int prcmu_gic_recouple(void)
62{
63 u32 val = readl(PRCM_A9_MASK_REQ);
64
65 /* Set bit 0 register value to 0 */
66 writel(val & ~PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ, PRCM_A9_MASK_REQ);
67
68 return 0;
69}
70
71#define PRCMU_GIC_NUMBER_REGS 5
72
73/*
74 * This function checks if there are pending irq on the gic. It only
75 * makes sense if the gic has been decoupled before with the
76 * db8500_prcmu_gic_decouple function. Disabling an interrupt only
77 * disables the forwarding of the interrupt to any CPU interface. It
78 * does not prevent the interrupt from changing state, for example
79 * becoming pending, or active and pending if it is already
80 * active. Hence, we have to check the interrupt is pending *and* is
81 * active.
82 */
83bool prcmu_gic_pending_irq(void)
84{
85 u32 pr; /* Pending register */
86 u32 er; /* Enable register */
87 void __iomem *dist_base = __io_address(U8500_GIC_DIST_BASE);
88 int i;
89
90 /* 5 registers. STI & PPI not skipped */
91 for (i = 0; i < PRCMU_GIC_NUMBER_REGS; i++) {
92
93 pr = readl_relaxed(dist_base + GIC_DIST_PENDING_SET + i * 4);
94 er = readl_relaxed(dist_base + GIC_DIST_ENABLE_SET + i * 4);
95
96 if (pr & er)
97 return true; /* There is a pending interrupt */
98 }
99
100 return false;
101}
102
103/*
104 * This function checks if there are pending interrupt on the
105 * prcmu which has been delegated to monitor the irqs with the
106 * db8500_prcmu_copy_gic_settings function.
107 */
108bool prcmu_pending_irq(void)
109{
110 u32 it, im;
111 int i;
112
113 for (i = 0; i < PRCMU_GIC_NUMBER_REGS - 1; i++) {
114 it = readl(PRCM_ARMITVAL31TO0 + i * 4);
115 im = readl(PRCM_ARMITMSK31TO0 + i * 4);
116 if (it & im)
117 return true; /* There is a pending interrupt */
118 }
119
120 return false;
121}
122
123/*
124 * This function checks if the specified cpu is in in WFI. It's usage
125 * makes sense only if the gic is decoupled with the db8500_prcmu_gic_decouple
126 * function. Of course passing smp_processor_id() to this function will
127 * always return false...
128 */
129bool prcmu_is_cpu_in_wfi(int cpu)
130{
131 return readl(PRCM_ARM_WFI_STANDBY) & cpu ? PRCM_ARM_WFI_STANDBY_WFI1 :
132 PRCM_ARM_WFI_STANDBY_WFI0;
133}
134
135/*
136 * This function copies the gic SPI settings to the prcmu in order to
137 * monitor them and abort/finish the retention/off sequence or state.
138 */
139int prcmu_copy_gic_settings(void)
140{
141 u32 er; /* Enable register */
142 void __iomem *dist_base = __io_address(U8500_GIC_DIST_BASE);
143 int i;
144
145 /* We skip the STI and PPI */
146 for (i = 0; i < PRCMU_GIC_NUMBER_REGS - 1; i++) {
147 er = readl_relaxed(dist_base +
148 GIC_DIST_ENABLE_SET + (i + 1) * 4);
149 writel(er, PRCM_ARMITMSK31TO0 + i * 4);
150 }
151
152 return 0;
153}
154
155void __init ux500_pm_init(u32 phy_base, u32 size)
156{
157 prcmu_base = ioremap(phy_base, size);
158 if (!prcmu_base) {
159 pr_err("could not remap PRCMU for PM functions\n");
160 return;
161 }
162 /*
163 * On watchdog reboot the GIC is in some cases decoupled.
164 * This will make sure that the GIC is correctly configured.
165 */
166 prcmu_gic_recouple();
167}
diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/setup.h
index bddce2b49372..bddce2b49372 100644
--- a/arch/arm/mach-ux500/include/mach/setup.h
+++ b/arch/arm/mach-ux500/setup.h
diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c
index d07bbe7f04a6..b6bd0efcbe64 100644
--- a/arch/arm/mach-ux500/timer.c
+++ b/arch/arm/mach-ux500/timer.c
@@ -14,10 +14,10 @@
14 14
15#include <asm/smp_twd.h> 15#include <asm/smp_twd.h>
16 16
17#include <mach/setup.h> 17#include "setup.h"
18#include <mach/hardware.h> 18#include "irqs.h"
19#include <mach/irqs.h>
20 19
20#include "db8500-regs.h"
21#include "id.h" 21#include "id.h"
22 22
23#ifdef CONFIG_HAVE_ARM_TWD 23#ifdef CONFIG_HAVE_ARM_TWD
diff --git a/arch/arm/mach-ux500/usb.c b/arch/arm/mach-ux500/usb.c
index 78ac65f62e87..2dfc72f7cd8a 100644
--- a/arch/arm/mach-ux500/usb.c
+++ b/arch/arm/mach-ux500/usb.c
@@ -10,7 +10,7 @@
10#include <linux/platform_data/usb-musb-ux500.h> 10#include <linux/platform_data/usb-musb-ux500.h>
11#include <linux/platform_data/dma-ste-dma40.h> 11#include <linux/platform_data/dma-ste-dma40.h>
12 12
13#include <mach/hardware.h> 13#include "db8500-regs.h"
14 14
15#define MUSB_DMA40_RX_CH { \ 15#define MUSB_DMA40_RX_CH { \
16 .mode = STEDMA40_MODE_LOGICAL, \ 16 .mode = STEDMA40_MODE_LOGICAL, \
diff --git a/drivers/clk/ux500/clk-prcc.c b/drivers/clk/ux500/clk-prcc.c
index 7eee7f768355..bd4769a84485 100644
--- a/drivers/clk/ux500/clk-prcc.c
+++ b/drivers/clk/ux500/clk-prcc.c
@@ -13,7 +13,6 @@
13#include <linux/io.h> 13#include <linux/io.h>
14#include <linux/err.h> 14#include <linux/err.h>
15#include <linux/types.h> 15#include <linux/types.h>
16#include <mach/hardware.h>
17 16
18#include "clk.h" 17#include "clk.h"
19 18
diff --git a/drivers/clk/ux500/u8500_clk.c b/drivers/clk/ux500/u8500_clk.c
index 6b889a0e90b3..0c9b83d98f11 100644
--- a/drivers/clk/ux500/u8500_clk.c
+++ b/drivers/clk/ux500/u8500_clk.c
@@ -12,10 +12,10 @@
12#include <linux/clk-provider.h> 12#include <linux/clk-provider.h>
13#include <linux/mfd/dbx500-prcmu.h> 13#include <linux/mfd/dbx500-prcmu.h>
14#include <linux/platform_data/clk-ux500.h> 14#include <linux/platform_data/clk-ux500.h>
15#include <mach/db8500-regs.h>
16#include "clk.h" 15#include "clk.h"
17 16
18void u8500_clk_init(void) 17void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
18 u32 clkrst5_base, u32 clkrst6_base)
19{ 19{
20 struct prcmu_fw_version *fw_version; 20 struct prcmu_fw_version *fw_version;
21 const char *sgaclk_parent = NULL; 21 const char *sgaclk_parent = NULL;
@@ -215,147 +215,147 @@ void u8500_clk_init(void)
215 */ 215 */
216 216
217 /* PRCC P-clocks */ 217 /* PRCC P-clocks */
218 clk = clk_reg_prcc_pclk("p1_pclk0", "per1clk", U8500_CLKRST1_BASE, 218 clk = clk_reg_prcc_pclk("p1_pclk0", "per1clk", clkrst1_base,
219 BIT(0), 0); 219 BIT(0), 0);
220 clk_register_clkdev(clk, "apb_pclk", "uart0"); 220 clk_register_clkdev(clk, "apb_pclk", "uart0");
221 221
222 clk = clk_reg_prcc_pclk("p1_pclk1", "per1clk", U8500_CLKRST1_BASE, 222 clk = clk_reg_prcc_pclk("p1_pclk1", "per1clk", clkrst1_base,
223 BIT(1), 0); 223 BIT(1), 0);
224 clk_register_clkdev(clk, "apb_pclk", "uart1"); 224 clk_register_clkdev(clk, "apb_pclk", "uart1");
225 225
226 clk = clk_reg_prcc_pclk("p1_pclk2", "per1clk", U8500_CLKRST1_BASE, 226 clk = clk_reg_prcc_pclk("p1_pclk2", "per1clk", clkrst1_base,
227 BIT(2), 0); 227 BIT(2), 0);
228 clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.1"); 228 clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.1");
229 229
230 clk = clk_reg_prcc_pclk("p1_pclk3", "per1clk", U8500_CLKRST1_BASE, 230 clk = clk_reg_prcc_pclk("p1_pclk3", "per1clk", clkrst1_base,
231 BIT(3), 0); 231 BIT(3), 0);
232 clk_register_clkdev(clk, "apb_pclk", "msp0"); 232 clk_register_clkdev(clk, "apb_pclk", "msp0");
233 clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.0"); 233 clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.0");
234 234
235 clk = clk_reg_prcc_pclk("p1_pclk4", "per1clk", U8500_CLKRST1_BASE, 235 clk = clk_reg_prcc_pclk("p1_pclk4", "per1clk", clkrst1_base,
236 BIT(4), 0); 236 BIT(4), 0);
237 clk_register_clkdev(clk, "apb_pclk", "msp1"); 237 clk_register_clkdev(clk, "apb_pclk", "msp1");
238 clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.1"); 238 clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.1");
239 239
240 clk = clk_reg_prcc_pclk("p1_pclk5", "per1clk", U8500_CLKRST1_BASE, 240 clk = clk_reg_prcc_pclk("p1_pclk5", "per1clk", clkrst1_base,
241 BIT(5), 0); 241 BIT(5), 0);
242 clk_register_clkdev(clk, "apb_pclk", "sdi0"); 242 clk_register_clkdev(clk, "apb_pclk", "sdi0");
243 243
244 clk = clk_reg_prcc_pclk("p1_pclk6", "per1clk", U8500_CLKRST1_BASE, 244 clk = clk_reg_prcc_pclk("p1_pclk6", "per1clk", clkrst1_base,
245 BIT(6), 0); 245 BIT(6), 0);
246 clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.2"); 246 clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.2");
247 247
248 clk = clk_reg_prcc_pclk("p1_pclk7", "per1clk", U8500_CLKRST1_BASE, 248 clk = clk_reg_prcc_pclk("p1_pclk7", "per1clk", clkrst1_base,
249 BIT(7), 0); 249 BIT(7), 0);
250 clk_register_clkdev(clk, NULL, "spi3"); 250 clk_register_clkdev(clk, NULL, "spi3");
251 251
252 clk = clk_reg_prcc_pclk("p1_pclk8", "per1clk", U8500_CLKRST1_BASE, 252 clk = clk_reg_prcc_pclk("p1_pclk8", "per1clk", clkrst1_base,
253 BIT(8), 0); 253 BIT(8), 0);
254 clk_register_clkdev(clk, "apb_pclk", "slimbus0"); 254 clk_register_clkdev(clk, "apb_pclk", "slimbus0");
255 255
256 clk = clk_reg_prcc_pclk("p1_pclk9", "per1clk", U8500_CLKRST1_BASE, 256 clk = clk_reg_prcc_pclk("p1_pclk9", "per1clk", clkrst1_base,
257 BIT(9), 0); 257 BIT(9), 0);
258 clk_register_clkdev(clk, NULL, "gpio.0"); 258 clk_register_clkdev(clk, NULL, "gpio.0");
259 clk_register_clkdev(clk, NULL, "gpio.1"); 259 clk_register_clkdev(clk, NULL, "gpio.1");
260 clk_register_clkdev(clk, NULL, "gpioblock0"); 260 clk_register_clkdev(clk, NULL, "gpioblock0");
261 261
262 clk = clk_reg_prcc_pclk("p1_pclk10", "per1clk", U8500_CLKRST1_BASE, 262 clk = clk_reg_prcc_pclk("p1_pclk10", "per1clk", clkrst1_base,
263 BIT(10), 0); 263 BIT(10), 0);
264 clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.4"); 264 clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.4");
265 265
266 clk = clk_reg_prcc_pclk("p1_pclk11", "per1clk", U8500_CLKRST1_BASE, 266 clk = clk_reg_prcc_pclk("p1_pclk11", "per1clk", clkrst1_base,
267 BIT(11), 0); 267 BIT(11), 0);
268 clk_register_clkdev(clk, "apb_pclk", "msp3"); 268 clk_register_clkdev(clk, "apb_pclk", "msp3");
269 clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.3"); 269 clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.3");
270 270
271 clk = clk_reg_prcc_pclk("p2_pclk0", "per2clk", U8500_CLKRST2_BASE, 271 clk = clk_reg_prcc_pclk("p2_pclk0", "per2clk", clkrst2_base,
272 BIT(0), 0); 272 BIT(0), 0);
273 clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.3"); 273 clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.3");
274 274
275 clk = clk_reg_prcc_pclk("p2_pclk1", "per2clk", U8500_CLKRST2_BASE, 275 clk = clk_reg_prcc_pclk("p2_pclk1", "per2clk", clkrst2_base,
276 BIT(1), 0); 276 BIT(1), 0);
277 clk_register_clkdev(clk, NULL, "spi2"); 277 clk_register_clkdev(clk, NULL, "spi2");
278 278
279 clk = clk_reg_prcc_pclk("p2_pclk2", "per2clk", U8500_CLKRST2_BASE, 279 clk = clk_reg_prcc_pclk("p2_pclk2", "per2clk", clkrst2_base,
280 BIT(2), 0); 280 BIT(2), 0);
281 clk_register_clkdev(clk, NULL, "spi1"); 281 clk_register_clkdev(clk, NULL, "spi1");
282 282
283 clk = clk_reg_prcc_pclk("p2_pclk3", "per2clk", U8500_CLKRST2_BASE, 283 clk = clk_reg_prcc_pclk("p2_pclk3", "per2clk", clkrst2_base,
284 BIT(3), 0); 284 BIT(3), 0);
285 clk_register_clkdev(clk, NULL, "pwl"); 285 clk_register_clkdev(clk, NULL, "pwl");
286 286
287 clk = clk_reg_prcc_pclk("p2_pclk4", "per2clk", U8500_CLKRST2_BASE, 287 clk = clk_reg_prcc_pclk("p2_pclk4", "per2clk", clkrst2_base,
288 BIT(4), 0); 288 BIT(4), 0);
289 clk_register_clkdev(clk, "apb_pclk", "sdi4"); 289 clk_register_clkdev(clk, "apb_pclk", "sdi4");
290 290
291 clk = clk_reg_prcc_pclk("p2_pclk5", "per2clk", U8500_CLKRST2_BASE, 291 clk = clk_reg_prcc_pclk("p2_pclk5", "per2clk", clkrst2_base,
292 BIT(5), 0); 292 BIT(5), 0);
293 clk_register_clkdev(clk, "apb_pclk", "msp2"); 293 clk_register_clkdev(clk, "apb_pclk", "msp2");
294 clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.2"); 294 clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.2");
295 295
296 clk = clk_reg_prcc_pclk("p2_pclk6", "per2clk", U8500_CLKRST2_BASE, 296 clk = clk_reg_prcc_pclk("p2_pclk6", "per2clk", clkrst2_base,
297 BIT(6), 0); 297 BIT(6), 0);
298 clk_register_clkdev(clk, "apb_pclk", "sdi1"); 298 clk_register_clkdev(clk, "apb_pclk", "sdi1");
299 299
300 clk = clk_reg_prcc_pclk("p2_pclk7", "per2clk", U8500_CLKRST2_BASE, 300 clk = clk_reg_prcc_pclk("p2_pclk7", "per2clk", clkrst2_base,
301 BIT(7), 0); 301 BIT(7), 0);
302 clk_register_clkdev(clk, "apb_pclk", "sdi3"); 302 clk_register_clkdev(clk, "apb_pclk", "sdi3");
303 303
304 clk = clk_reg_prcc_pclk("p2_pclk8", "per2clk", U8500_CLKRST2_BASE, 304 clk = clk_reg_prcc_pclk("p2_pclk8", "per2clk", clkrst2_base,
305 BIT(8), 0); 305 BIT(8), 0);
306 clk_register_clkdev(clk, NULL, "spi0"); 306 clk_register_clkdev(clk, NULL, "spi0");
307 307
308 clk = clk_reg_prcc_pclk("p2_pclk9", "per2clk", U8500_CLKRST2_BASE, 308 clk = clk_reg_prcc_pclk("p2_pclk9", "per2clk", clkrst2_base,
309 BIT(9), 0); 309 BIT(9), 0);
310 clk_register_clkdev(clk, "hsir_hclk", "ste_hsi.0"); 310 clk_register_clkdev(clk, "hsir_hclk", "ste_hsi.0");
311 311
312 clk = clk_reg_prcc_pclk("p2_pclk10", "per2clk", U8500_CLKRST2_BASE, 312 clk = clk_reg_prcc_pclk("p2_pclk10", "per2clk", clkrst2_base,
313 BIT(10), 0); 313 BIT(10), 0);
314 clk_register_clkdev(clk, "hsit_hclk", "ste_hsi.0"); 314 clk_register_clkdev(clk, "hsit_hclk", "ste_hsi.0");
315 315
316 clk = clk_reg_prcc_pclk("p2_pclk11", "per2clk", U8500_CLKRST2_BASE, 316 clk = clk_reg_prcc_pclk("p2_pclk11", "per2clk", clkrst2_base,
317 BIT(11), 0); 317 BIT(11), 0);
318 clk_register_clkdev(clk, NULL, "gpio.6"); 318 clk_register_clkdev(clk, NULL, "gpio.6");
319 clk_register_clkdev(clk, NULL, "gpio.7"); 319 clk_register_clkdev(clk, NULL, "gpio.7");
320 clk_register_clkdev(clk, NULL, "gpioblock1"); 320 clk_register_clkdev(clk, NULL, "gpioblock1");
321 321
322 clk = clk_reg_prcc_pclk("p2_pclk12", "per2clk", U8500_CLKRST2_BASE, 322 clk = clk_reg_prcc_pclk("p2_pclk12", "per2clk", clkrst2_base,
323 BIT(12), 0); 323 BIT(12), 0);
324 324
325 clk = clk_reg_prcc_pclk("p3_pclk0", "per3clk", U8500_CLKRST3_BASE, 325 clk = clk_reg_prcc_pclk("p3_pclk0", "per3clk", clkrst3_base,
326 BIT(0), 0); 326 BIT(0), 0);
327 clk_register_clkdev(clk, NULL, "fsmc"); 327 clk_register_clkdev(clk, NULL, "fsmc");
328 328
329 clk = clk_reg_prcc_pclk("p3_pclk1", "per3clk", U8500_CLKRST3_BASE, 329 clk = clk_reg_prcc_pclk("p3_pclk1", "per3clk", clkrst3_base,
330 BIT(1), 0); 330 BIT(1), 0);
331 clk_register_clkdev(clk, "apb_pclk", "ssp0"); 331 clk_register_clkdev(clk, "apb_pclk", "ssp0");
332 332
333 clk = clk_reg_prcc_pclk("p3_pclk2", "per3clk", U8500_CLKRST3_BASE, 333 clk = clk_reg_prcc_pclk("p3_pclk2", "per3clk", clkrst3_base,
334 BIT(2), 0); 334 BIT(2), 0);
335 clk_register_clkdev(clk, "apb_pclk", "ssp1"); 335 clk_register_clkdev(clk, "apb_pclk", "ssp1");
336 336
337 clk = clk_reg_prcc_pclk("p3_pclk3", "per3clk", U8500_CLKRST3_BASE, 337 clk = clk_reg_prcc_pclk("p3_pclk3", "per3clk", clkrst3_base,
338 BIT(3), 0); 338 BIT(3), 0);
339 clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.0"); 339 clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.0");
340 340
341 clk = clk_reg_prcc_pclk("p3_pclk4", "per3clk", U8500_CLKRST3_BASE, 341 clk = clk_reg_prcc_pclk("p3_pclk4", "per3clk", clkrst3_base,
342 BIT(4), 0); 342 BIT(4), 0);
343 clk_register_clkdev(clk, "apb_pclk", "sdi2"); 343 clk_register_clkdev(clk, "apb_pclk", "sdi2");
344 344
345 clk = clk_reg_prcc_pclk("p3_pclk5", "per3clk", U8500_CLKRST3_BASE, 345 clk = clk_reg_prcc_pclk("p3_pclk5", "per3clk", clkrst3_base,
346 BIT(5), 0); 346 BIT(5), 0);
347 clk_register_clkdev(clk, "apb_pclk", "ske"); 347 clk_register_clkdev(clk, "apb_pclk", "ske");
348 clk_register_clkdev(clk, "apb_pclk", "nmk-ske-keypad"); 348 clk_register_clkdev(clk, "apb_pclk", "nmk-ske-keypad");
349 349
350 clk = clk_reg_prcc_pclk("p3_pclk6", "per3clk", U8500_CLKRST3_BASE, 350 clk = clk_reg_prcc_pclk("p3_pclk6", "per3clk", clkrst3_base,
351 BIT(6), 0); 351 BIT(6), 0);
352 clk_register_clkdev(clk, "apb_pclk", "uart2"); 352 clk_register_clkdev(clk, "apb_pclk", "uart2");
353 353
354 clk = clk_reg_prcc_pclk("p3_pclk7", "per3clk", U8500_CLKRST3_BASE, 354 clk = clk_reg_prcc_pclk("p3_pclk7", "per3clk", clkrst3_base,
355 BIT(7), 0); 355 BIT(7), 0);
356 clk_register_clkdev(clk, "apb_pclk", "sdi5"); 356 clk_register_clkdev(clk, "apb_pclk", "sdi5");
357 357
358 clk = clk_reg_prcc_pclk("p3_pclk8", "per3clk", U8500_CLKRST3_BASE, 358 clk = clk_reg_prcc_pclk("p3_pclk8", "per3clk", clkrst3_base,
359 BIT(8), 0); 359 BIT(8), 0);
360 clk_register_clkdev(clk, NULL, "gpio.2"); 360 clk_register_clkdev(clk, NULL, "gpio.2");
361 clk_register_clkdev(clk, NULL, "gpio.3"); 361 clk_register_clkdev(clk, NULL, "gpio.3");
@@ -363,45 +363,45 @@ void u8500_clk_init(void)
363 clk_register_clkdev(clk, NULL, "gpio.5"); 363 clk_register_clkdev(clk, NULL, "gpio.5");
364 clk_register_clkdev(clk, NULL, "gpioblock2"); 364 clk_register_clkdev(clk, NULL, "gpioblock2");
365 365
366 clk = clk_reg_prcc_pclk("p5_pclk0", "per5clk", U8500_CLKRST5_BASE, 366 clk = clk_reg_prcc_pclk("p5_pclk0", "per5clk", clkrst5_base,
367 BIT(0), 0); 367 BIT(0), 0);
368 clk_register_clkdev(clk, "usb", "musb-ux500.0"); 368 clk_register_clkdev(clk, "usb", "musb-ux500.0");
369 369
370 clk = clk_reg_prcc_pclk("p5_pclk1", "per5clk", U8500_CLKRST5_BASE, 370 clk = clk_reg_prcc_pclk("p5_pclk1", "per5clk", clkrst5_base,
371 BIT(1), 0); 371 BIT(1), 0);
372 clk_register_clkdev(clk, NULL, "gpio.8"); 372 clk_register_clkdev(clk, NULL, "gpio.8");
373 clk_register_clkdev(clk, NULL, "gpioblock3"); 373 clk_register_clkdev(clk, NULL, "gpioblock3");
374 374
375 clk = clk_reg_prcc_pclk("p6_pclk0", "per6clk", U8500_CLKRST6_BASE, 375 clk = clk_reg_prcc_pclk("p6_pclk0", "per6clk", clkrst6_base,
376 BIT(0), 0); 376 BIT(0), 0);
377 clk_register_clkdev(clk, "apb_pclk", "rng"); 377 clk_register_clkdev(clk, "apb_pclk", "rng");
378 378
379 clk = clk_reg_prcc_pclk("p6_pclk1", "per6clk", U8500_CLKRST6_BASE, 379 clk = clk_reg_prcc_pclk("p6_pclk1", "per6clk", clkrst6_base,
380 BIT(1), 0); 380 BIT(1), 0);
381 clk_register_clkdev(clk, NULL, "cryp0"); 381 clk_register_clkdev(clk, NULL, "cryp0");
382 clk_register_clkdev(clk, NULL, "cryp1"); 382 clk_register_clkdev(clk, NULL, "cryp1");
383 383
384 clk = clk_reg_prcc_pclk("p6_pclk2", "per6clk", U8500_CLKRST6_BASE, 384 clk = clk_reg_prcc_pclk("p6_pclk2", "per6clk", clkrst6_base,
385 BIT(2), 0); 385 BIT(2), 0);
386 clk_register_clkdev(clk, NULL, "hash0"); 386 clk_register_clkdev(clk, NULL, "hash0");
387 387
388 clk = clk_reg_prcc_pclk("p6_pclk3", "per6clk", U8500_CLKRST6_BASE, 388 clk = clk_reg_prcc_pclk("p6_pclk3", "per6clk", clkrst6_base,
389 BIT(3), 0); 389 BIT(3), 0);
390 clk_register_clkdev(clk, NULL, "pka"); 390 clk_register_clkdev(clk, NULL, "pka");
391 391
392 clk = clk_reg_prcc_pclk("p6_pclk4", "per6clk", U8500_CLKRST6_BASE, 392 clk = clk_reg_prcc_pclk("p6_pclk4", "per6clk", clkrst6_base,
393 BIT(4), 0); 393 BIT(4), 0);
394 clk_register_clkdev(clk, NULL, "hash1"); 394 clk_register_clkdev(clk, NULL, "hash1");
395 395
396 clk = clk_reg_prcc_pclk("p6_pclk5", "per6clk", U8500_CLKRST6_BASE, 396 clk = clk_reg_prcc_pclk("p6_pclk5", "per6clk", clkrst6_base,
397 BIT(5), 0); 397 BIT(5), 0);
398 clk_register_clkdev(clk, NULL, "cfgreg"); 398 clk_register_clkdev(clk, NULL, "cfgreg");
399 399
400 clk = clk_reg_prcc_pclk("p6_pclk6", "per6clk", U8500_CLKRST6_BASE, 400 clk = clk_reg_prcc_pclk("p6_pclk6", "per6clk", clkrst6_base,
401 BIT(6), 0); 401 BIT(6), 0);
402 clk_register_clkdev(clk, "apb_pclk", "mtu0"); 402 clk_register_clkdev(clk, "apb_pclk", "mtu0");
403 403
404 clk = clk_reg_prcc_pclk("p6_pclk7", "per6clk", U8500_CLKRST6_BASE, 404 clk = clk_reg_prcc_pclk("p6_pclk7", "per6clk", clkrst6_base,
405 BIT(7), 0); 405 BIT(7), 0);
406 clk_register_clkdev(clk, "apb_pclk", "mtu1"); 406 clk_register_clkdev(clk, "apb_pclk", "mtu1");
407 407
@@ -415,110 +415,110 @@ void u8500_clk_init(void)
415 415
416 /* Periph1 */ 416 /* Periph1 */
417 clk = clk_reg_prcc_kclk("p1_uart0_kclk", "uartclk", 417 clk = clk_reg_prcc_kclk("p1_uart0_kclk", "uartclk",
418 U8500_CLKRST1_BASE, BIT(0), CLK_SET_RATE_GATE); 418 clkrst1_base, BIT(0), CLK_SET_RATE_GATE);
419 clk_register_clkdev(clk, NULL, "uart0"); 419 clk_register_clkdev(clk, NULL, "uart0");
420 420
421 clk = clk_reg_prcc_kclk("p1_uart1_kclk", "uartclk", 421 clk = clk_reg_prcc_kclk("p1_uart1_kclk", "uartclk",
422 U8500_CLKRST1_BASE, BIT(1), CLK_SET_RATE_GATE); 422 clkrst1_base, BIT(1), CLK_SET_RATE_GATE);
423 clk_register_clkdev(clk, NULL, "uart1"); 423 clk_register_clkdev(clk, NULL, "uart1");
424 424
425 clk = clk_reg_prcc_kclk("p1_i2c1_kclk", "i2cclk", 425 clk = clk_reg_prcc_kclk("p1_i2c1_kclk", "i2cclk",
426 U8500_CLKRST1_BASE, BIT(2), CLK_SET_RATE_GATE); 426 clkrst1_base, BIT(2), CLK_SET_RATE_GATE);
427 clk_register_clkdev(clk, NULL, "nmk-i2c.1"); 427 clk_register_clkdev(clk, NULL, "nmk-i2c.1");
428 428
429 clk = clk_reg_prcc_kclk("p1_msp0_kclk", "msp02clk", 429 clk = clk_reg_prcc_kclk("p1_msp0_kclk", "msp02clk",
430 U8500_CLKRST1_BASE, BIT(3), CLK_SET_RATE_GATE); 430 clkrst1_base, BIT(3), CLK_SET_RATE_GATE);
431 clk_register_clkdev(clk, NULL, "msp0"); 431 clk_register_clkdev(clk, NULL, "msp0");
432 clk_register_clkdev(clk, NULL, "ux500-msp-i2s.0"); 432 clk_register_clkdev(clk, NULL, "ux500-msp-i2s.0");
433 433
434 clk = clk_reg_prcc_kclk("p1_msp1_kclk", "msp1clk", 434 clk = clk_reg_prcc_kclk("p1_msp1_kclk", "msp1clk",
435 U8500_CLKRST1_BASE, BIT(4), CLK_SET_RATE_GATE); 435 clkrst1_base, BIT(4), CLK_SET_RATE_GATE);
436 clk_register_clkdev(clk, NULL, "msp1"); 436 clk_register_clkdev(clk, NULL, "msp1");
437 clk_register_clkdev(clk, NULL, "ux500-msp-i2s.1"); 437 clk_register_clkdev(clk, NULL, "ux500-msp-i2s.1");
438 438
439 clk = clk_reg_prcc_kclk("p1_sdi0_kclk", "sdmmcclk", 439 clk = clk_reg_prcc_kclk("p1_sdi0_kclk", "sdmmcclk",
440 U8500_CLKRST1_BASE, BIT(5), CLK_SET_RATE_GATE); 440 clkrst1_base, BIT(5), CLK_SET_RATE_GATE);
441 clk_register_clkdev(clk, NULL, "sdi0"); 441 clk_register_clkdev(clk, NULL, "sdi0");
442 442
443 clk = clk_reg_prcc_kclk("p1_i2c2_kclk", "i2cclk", 443 clk = clk_reg_prcc_kclk("p1_i2c2_kclk", "i2cclk",
444 U8500_CLKRST1_BASE, BIT(6), CLK_SET_RATE_GATE); 444 clkrst1_base, BIT(6), CLK_SET_RATE_GATE);
445 clk_register_clkdev(clk, NULL, "nmk-i2c.2"); 445 clk_register_clkdev(clk, NULL, "nmk-i2c.2");
446 446
447 clk = clk_reg_prcc_kclk("p1_slimbus0_kclk", "slimclk", 447 clk = clk_reg_prcc_kclk("p1_slimbus0_kclk", "slimclk",
448 U8500_CLKRST1_BASE, BIT(8), CLK_SET_RATE_GATE); 448 clkrst1_base, BIT(8), CLK_SET_RATE_GATE);
449 clk_register_clkdev(clk, NULL, "slimbus0"); 449 clk_register_clkdev(clk, NULL, "slimbus0");
450 450
451 clk = clk_reg_prcc_kclk("p1_i2c4_kclk", "i2cclk", 451 clk = clk_reg_prcc_kclk("p1_i2c4_kclk", "i2cclk",
452 U8500_CLKRST1_BASE, BIT(9), CLK_SET_RATE_GATE); 452 clkrst1_base, BIT(9), CLK_SET_RATE_GATE);
453 clk_register_clkdev(clk, NULL, "nmk-i2c.4"); 453 clk_register_clkdev(clk, NULL, "nmk-i2c.4");
454 454
455 clk = clk_reg_prcc_kclk("p1_msp3_kclk", "msp1clk", 455 clk = clk_reg_prcc_kclk("p1_msp3_kclk", "msp1clk",
456 U8500_CLKRST1_BASE, BIT(10), CLK_SET_RATE_GATE); 456 clkrst1_base, BIT(10), CLK_SET_RATE_GATE);
457 clk_register_clkdev(clk, NULL, "msp3"); 457 clk_register_clkdev(clk, NULL, "msp3");
458 clk_register_clkdev(clk, NULL, "ux500-msp-i2s.3"); 458 clk_register_clkdev(clk, NULL, "ux500-msp-i2s.3");
459 459
460 /* Periph2 */ 460 /* Periph2 */
461 clk = clk_reg_prcc_kclk("p2_i2c3_kclk", "i2cclk", 461 clk = clk_reg_prcc_kclk("p2_i2c3_kclk", "i2cclk",
462 U8500_CLKRST2_BASE, BIT(0), CLK_SET_RATE_GATE); 462 clkrst2_base, BIT(0), CLK_SET_RATE_GATE);
463 clk_register_clkdev(clk, NULL, "nmk-i2c.3"); 463 clk_register_clkdev(clk, NULL, "nmk-i2c.3");
464 464
465 clk = clk_reg_prcc_kclk("p2_sdi4_kclk", "sdmmcclk", 465 clk = clk_reg_prcc_kclk("p2_sdi4_kclk", "sdmmcclk",
466 U8500_CLKRST2_BASE, BIT(2), CLK_SET_RATE_GATE); 466 clkrst2_base, BIT(2), CLK_SET_RATE_GATE);
467 clk_register_clkdev(clk, NULL, "sdi4"); 467 clk_register_clkdev(clk, NULL, "sdi4");
468 468
469 clk = clk_reg_prcc_kclk("p2_msp2_kclk", "msp02clk", 469 clk = clk_reg_prcc_kclk("p2_msp2_kclk", "msp02clk",
470 U8500_CLKRST2_BASE, BIT(3), CLK_SET_RATE_GATE); 470 clkrst2_base, BIT(3), CLK_SET_RATE_GATE);
471 clk_register_clkdev(clk, NULL, "msp2"); 471 clk_register_clkdev(clk, NULL, "msp2");
472 clk_register_clkdev(clk, NULL, "ux500-msp-i2s.2"); 472 clk_register_clkdev(clk, NULL, "ux500-msp-i2s.2");
473 473
474 clk = clk_reg_prcc_kclk("p2_sdi1_kclk", "sdmmcclk", 474 clk = clk_reg_prcc_kclk("p2_sdi1_kclk", "sdmmcclk",
475 U8500_CLKRST2_BASE, BIT(4), CLK_SET_RATE_GATE); 475 clkrst2_base, BIT(4), CLK_SET_RATE_GATE);
476 clk_register_clkdev(clk, NULL, "sdi1"); 476 clk_register_clkdev(clk, NULL, "sdi1");
477 477
478 clk = clk_reg_prcc_kclk("p2_sdi3_kclk", "sdmmcclk", 478 clk = clk_reg_prcc_kclk("p2_sdi3_kclk", "sdmmcclk",
479 U8500_CLKRST2_BASE, BIT(5), CLK_SET_RATE_GATE); 479 clkrst2_base, BIT(5), CLK_SET_RATE_GATE);
480 clk_register_clkdev(clk, NULL, "sdi3"); 480 clk_register_clkdev(clk, NULL, "sdi3");
481 481
482 /* Note that rate is received from parent. */ 482 /* Note that rate is received from parent. */
483 clk = clk_reg_prcc_kclk("p2_ssirx_kclk", "hsirxclk", 483 clk = clk_reg_prcc_kclk("p2_ssirx_kclk", "hsirxclk",
484 U8500_CLKRST2_BASE, BIT(6), 484 clkrst2_base, BIT(6),
485 CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT); 485 CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT);
486 clk = clk_reg_prcc_kclk("p2_ssitx_kclk", "hsitxclk", 486 clk = clk_reg_prcc_kclk("p2_ssitx_kclk", "hsitxclk",
487 U8500_CLKRST2_BASE, BIT(7), 487 clkrst2_base, BIT(7),
488 CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT); 488 CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT);
489 489
490 /* Periph3 */ 490 /* Periph3 */
491 clk = clk_reg_prcc_kclk("p3_ssp0_kclk", "sspclk", 491 clk = clk_reg_prcc_kclk("p3_ssp0_kclk", "sspclk",
492 U8500_CLKRST3_BASE, BIT(1), CLK_SET_RATE_GATE); 492 clkrst3_base, BIT(1), CLK_SET_RATE_GATE);
493 clk_register_clkdev(clk, NULL, "ssp0"); 493 clk_register_clkdev(clk, NULL, "ssp0");
494 494
495 clk = clk_reg_prcc_kclk("p3_ssp1_kclk", "sspclk", 495 clk = clk_reg_prcc_kclk("p3_ssp1_kclk", "sspclk",
496 U8500_CLKRST3_BASE, BIT(2), CLK_SET_RATE_GATE); 496 clkrst3_base, BIT(2), CLK_SET_RATE_GATE);
497 clk_register_clkdev(clk, NULL, "ssp1"); 497 clk_register_clkdev(clk, NULL, "ssp1");
498 498
499 clk = clk_reg_prcc_kclk("p3_i2c0_kclk", "i2cclk", 499 clk = clk_reg_prcc_kclk("p3_i2c0_kclk", "i2cclk",
500 U8500_CLKRST3_BASE, BIT(3), CLK_SET_RATE_GATE); 500 clkrst3_base, BIT(3), CLK_SET_RATE_GATE);
501 clk_register_clkdev(clk, NULL, "nmk-i2c.0"); 501 clk_register_clkdev(clk, NULL, "nmk-i2c.0");
502 502
503 clk = clk_reg_prcc_kclk("p3_sdi2_kclk", "sdmmcclk", 503 clk = clk_reg_prcc_kclk("p3_sdi2_kclk", "sdmmcclk",
504 U8500_CLKRST3_BASE, BIT(4), CLK_SET_RATE_GATE); 504 clkrst3_base, BIT(4), CLK_SET_RATE_GATE);
505 clk_register_clkdev(clk, NULL, "sdi2"); 505 clk_register_clkdev(clk, NULL, "sdi2");
506 506
507 clk = clk_reg_prcc_kclk("p3_ske_kclk", "rtc32k", 507 clk = clk_reg_prcc_kclk("p3_ske_kclk", "rtc32k",
508 U8500_CLKRST3_BASE, BIT(5), CLK_SET_RATE_GATE); 508 clkrst3_base, BIT(5), CLK_SET_RATE_GATE);
509 clk_register_clkdev(clk, NULL, "ske"); 509 clk_register_clkdev(clk, NULL, "ske");
510 clk_register_clkdev(clk, NULL, "nmk-ske-keypad"); 510 clk_register_clkdev(clk, NULL, "nmk-ske-keypad");
511 511
512 clk = clk_reg_prcc_kclk("p3_uart2_kclk", "uartclk", 512 clk = clk_reg_prcc_kclk("p3_uart2_kclk", "uartclk",
513 U8500_CLKRST3_BASE, BIT(6), CLK_SET_RATE_GATE); 513 clkrst3_base, BIT(6), CLK_SET_RATE_GATE);
514 clk_register_clkdev(clk, NULL, "uart2"); 514 clk_register_clkdev(clk, NULL, "uart2");
515 515
516 clk = clk_reg_prcc_kclk("p3_sdi5_kclk", "sdmmcclk", 516 clk = clk_reg_prcc_kclk("p3_sdi5_kclk", "sdmmcclk",
517 U8500_CLKRST3_BASE, BIT(7), CLK_SET_RATE_GATE); 517 clkrst3_base, BIT(7), CLK_SET_RATE_GATE);
518 clk_register_clkdev(clk, NULL, "sdi5"); 518 clk_register_clkdev(clk, NULL, "sdi5");
519 519
520 /* Periph6 */ 520 /* Periph6 */
521 clk = clk_reg_prcc_kclk("p3_rng_kclk", "rngclk", 521 clk = clk_reg_prcc_kclk("p3_rng_kclk", "rngclk",
522 U8500_CLKRST6_BASE, BIT(0), CLK_SET_RATE_GATE); 522 clkrst6_base, BIT(0), CLK_SET_RATE_GATE);
523 clk_register_clkdev(clk, NULL, "rng"); 523 clk_register_clkdev(clk, NULL, "rng");
524} 524}
diff --git a/drivers/clocksource/clksrc-dbx500-prcmu.c b/drivers/clocksource/clksrc-dbx500-prcmu.c
index c26c369eb9e6..54f3d119d99c 100644
--- a/drivers/clocksource/clksrc-dbx500-prcmu.c
+++ b/drivers/clocksource/clksrc-dbx500-prcmu.c
@@ -17,9 +17,6 @@
17 17
18#include <asm/sched_clock.h> 18#include <asm/sched_clock.h>
19 19
20#include <mach/setup.h>
21#include <mach/hardware.h>
22
23#define RATE_32K 32768 20#define RATE_32K 32768
24 21
25#define TIMER_MODE_CONTINOUS 0x1 22#define TIMER_MODE_CONTINOUS 0x1
diff --git a/drivers/crypto/ux500/cryp/cryp.c b/drivers/crypto/ux500/cryp/cryp.c
index e208ceaf81c9..3eafa903ebcd 100644
--- a/drivers/crypto/ux500/cryp/cryp.c
+++ b/drivers/crypto/ux500/cryp/cryp.c
@@ -12,8 +12,6 @@
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/types.h> 13#include <linux/types.h>
14 14
15#include <mach/hardware.h>
16
17#include "cryp_p.h" 15#include "cryp_p.h"
18#include "cryp.h" 16#include "cryp.h"
19 17
diff --git a/drivers/crypto/ux500/cryp/cryp_core.c b/drivers/crypto/ux500/cryp/cryp_core.c
index 8bc5fef07e7a..2809b19e3add 100644
--- a/drivers/crypto/ux500/cryp/cryp_core.c
+++ b/drivers/crypto/ux500/cryp/cryp_core.c
@@ -32,7 +32,6 @@
32#include <crypto/scatterwalk.h> 32#include <crypto/scatterwalk.h>
33 33
34#include <linux/platform_data/crypto-ux500.h> 34#include <linux/platform_data/crypto-ux500.h>
35#include <mach/hardware.h>
36 35
37#include "cryp_p.h" 36#include "cryp_p.h"
38#include "cryp.h" 37#include "cryp.h"
diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c
index 632c3339895f..1827e9f1f873 100644
--- a/drivers/crypto/ux500/hash/hash_core.c
+++ b/drivers/crypto/ux500/hash/hash_core.c
@@ -32,7 +32,6 @@
32#include <crypto/algapi.h> 32#include <crypto/algapi.h>
33 33
34#include <linux/platform_data/crypto-ux500.h> 34#include <linux/platform_data/crypto-ux500.h>
35#include <mach/hardware.h>
36 35
37#include "hash_alg.h" 36#include "hash_alg.h"
38 37
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 21f261bf9e95..21434beb420a 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -26,7 +26,6 @@
26#include <linux/fs.h> 26#include <linux/fs.h>
27#include <linux/platform_device.h> 27#include <linux/platform_device.h>
28#include <linux/uaccess.h> 28#include <linux/uaccess.h>
29#include <linux/irqchip/arm-gic.h>
30#include <linux/mfd/core.h> 29#include <linux/mfd/core.h>
31#include <linux/mfd/dbx500-prcmu.h> 30#include <linux/mfd/dbx500-prcmu.h>
32#include <linux/mfd/abx500/ab8500.h> 31#include <linux/mfd/abx500/ab8500.h>
@@ -34,9 +33,7 @@
34#include <linux/regulator/machine.h> 33#include <linux/regulator/machine.h>
35#include <linux/cpufreq.h> 34#include <linux/cpufreq.h>
36#include <linux/platform_data/ux500_wdt.h> 35#include <linux/platform_data/ux500_wdt.h>
37#include <mach/hardware.h> 36#include <linux/platform_data/db8500_thermal.h>
38#include <mach/irqs.h>
39#include <mach/db8500-regs.h>
40#include "dbx500-prcmu-regs.h" 37#include "dbx500-prcmu-regs.h"
41 38
42/* Index of different voltages to be used when accessing AVSData */ 39/* Index of different voltages to be used when accessing AVSData */
@@ -276,8 +273,34 @@ static struct irq_domain *db8500_irq_domain;
276 * the bits in the bit field are not. (The bits also have a tendency to move 273 * the bits in the bit field are not. (The bits also have a tendency to move
277 * around, to further complicate matters.) 274 * around, to further complicate matters.)
278 */ 275 */
279#define IRQ_INDEX(_name) ((IRQ_PRCMU_##_name) - IRQ_PRCMU_BASE) 276#define IRQ_INDEX(_name) ((IRQ_PRCMU_##_name))
280#define IRQ_ENTRY(_name)[IRQ_INDEX(_name)] = (WAKEUP_BIT_##_name) 277#define IRQ_ENTRY(_name)[IRQ_INDEX(_name)] = (WAKEUP_BIT_##_name)
278
279#define IRQ_PRCMU_RTC 0
280#define IRQ_PRCMU_RTT0 1
281#define IRQ_PRCMU_RTT1 2
282#define IRQ_PRCMU_HSI0 3
283#define IRQ_PRCMU_HSI1 4
284#define IRQ_PRCMU_CA_WAKE 5
285#define IRQ_PRCMU_USB 6
286#define IRQ_PRCMU_ABB 7
287#define IRQ_PRCMU_ABB_FIFO 8
288#define IRQ_PRCMU_ARM 9
289#define IRQ_PRCMU_MODEM_SW_RESET_REQ 10
290#define IRQ_PRCMU_GPIO0 11
291#define IRQ_PRCMU_GPIO1 12
292#define IRQ_PRCMU_GPIO2 13
293#define IRQ_PRCMU_GPIO3 14
294#define IRQ_PRCMU_GPIO4 15
295#define IRQ_PRCMU_GPIO5 16
296#define IRQ_PRCMU_GPIO6 17
297#define IRQ_PRCMU_GPIO7 18
298#define IRQ_PRCMU_GPIO8 19
299#define IRQ_PRCMU_CA_SLEEP 20
300#define IRQ_PRCMU_HOTMON_LOW 21
301#define IRQ_PRCMU_HOTMON_HIGH 22
302#define NUM_PRCMU_WAKEUPS 23
303
281static u32 prcmu_irq_bit[NUM_PRCMU_WAKEUPS] = { 304static u32 prcmu_irq_bit[NUM_PRCMU_WAKEUPS] = {
282 IRQ_ENTRY(RTC), 305 IRQ_ENTRY(RTC),
283 IRQ_ENTRY(RTT0), 306 IRQ_ENTRY(RTT0),
@@ -422,9 +445,10 @@ static DEFINE_SPINLOCK(clkout_lock);
422 445
423/* Global var to runtime determine TCDM base for v2 or v1 */ 446/* Global var to runtime determine TCDM base for v2 or v1 */
424static __iomem void *tcdm_base; 447static __iomem void *tcdm_base;
448static __iomem void *prcmu_base;
425 449
426struct clk_mgt { 450struct clk_mgt {
427 void __iomem *reg; 451 u32 offset;
428 u32 pllsw; 452 u32 pllsw;
429 int branch; 453 int branch;
430 bool clk38div; 454 bool clk38div;
@@ -599,9 +623,9 @@ int db8500_prcmu_set_display_clocks(void)
599 while ((readl(PRCM_SEM) & PRCM_SEM_PRCM_SEM) != 0) 623 while ((readl(PRCM_SEM) & PRCM_SEM_PRCM_SEM) != 0)
600 cpu_relax(); 624 cpu_relax();
601 625
602 writel(PRCMU_DSI_CLOCK_SETTING, PRCM_HDMICLK_MGT); 626 writel(PRCMU_DSI_CLOCK_SETTING, prcmu_base + PRCM_HDMICLK_MGT);
603 writel(PRCMU_DSI_LP_CLOCK_SETTING, PRCM_TVCLK_MGT); 627 writel(PRCMU_DSI_LP_CLOCK_SETTING, prcmu_base + PRCM_TVCLK_MGT);
604 writel(PRCMU_DPI_CLOCK_SETTING, PRCM_LCDCLK_MGT); 628 writel(PRCMU_DPI_CLOCK_SETTING, prcmu_base + PRCM_LCDCLK_MGT);
605 629
606 /* Release the HW semaphore. */ 630 /* Release the HW semaphore. */
607 writel(0, PRCM_SEM); 631 writel(0, PRCM_SEM);
@@ -613,7 +637,7 @@ int db8500_prcmu_set_display_clocks(void)
613 637
614u32 db8500_prcmu_read(unsigned int reg) 638u32 db8500_prcmu_read(unsigned int reg)
615{ 639{
616 return readl(_PRCMU_BASE + reg); 640 return readl(prcmu_base + reg);
617} 641}
618 642
619void db8500_prcmu_write(unsigned int reg, u32 value) 643void db8500_prcmu_write(unsigned int reg, u32 value)
@@ -621,7 +645,7 @@ void db8500_prcmu_write(unsigned int reg, u32 value)
621 unsigned long flags; 645 unsigned long flags;
622 646
623 spin_lock_irqsave(&prcmu_lock, flags); 647 spin_lock_irqsave(&prcmu_lock, flags);
624 writel(value, (_PRCMU_BASE + reg)); 648 writel(value, (prcmu_base + reg));
625 spin_unlock_irqrestore(&prcmu_lock, flags); 649 spin_unlock_irqrestore(&prcmu_lock, flags);
626} 650}
627 651
@@ -631,9 +655,9 @@ void db8500_prcmu_write_masked(unsigned int reg, u32 mask, u32 value)
631 unsigned long flags; 655 unsigned long flags;
632 656
633 spin_lock_irqsave(&prcmu_lock, flags); 657 spin_lock_irqsave(&prcmu_lock, flags);
634 val = readl(_PRCMU_BASE + reg); 658 val = readl(prcmu_base + reg);
635 val = ((val & ~mask) | (value & mask)); 659 val = ((val & ~mask) | (value & mask));
636 writel(val, (_PRCMU_BASE + reg)); 660 writel(val, (prcmu_base + reg));
637 spin_unlock_irqrestore(&prcmu_lock, flags); 661 spin_unlock_irqrestore(&prcmu_lock, flags);
638} 662}
639 663
@@ -793,119 +817,6 @@ u8 db8500_prcmu_get_power_state_result(void)
793 return readb(tcdm_base + PRCM_ACK_MB0_AP_PWRSTTR_STATUS); 817 return readb(tcdm_base + PRCM_ACK_MB0_AP_PWRSTTR_STATUS);
794} 818}
795 819
796/* This function decouple the gic from the prcmu */
797int db8500_prcmu_gic_decouple(void)
798{
799 u32 val = readl(PRCM_A9_MASK_REQ);
800
801 /* Set bit 0 register value to 1 */
802 writel(val | PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ,
803 PRCM_A9_MASK_REQ);
804
805 /* Make sure the register is updated */
806 readl(PRCM_A9_MASK_REQ);
807
808 /* Wait a few cycles for the gic mask completion */
809 udelay(1);
810
811 return 0;
812}
813
814/* This function recouple the gic with the prcmu */
815int db8500_prcmu_gic_recouple(void)
816{
817 u32 val = readl(PRCM_A9_MASK_REQ);
818
819 /* Set bit 0 register value to 0 */
820 writel(val & ~PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ, PRCM_A9_MASK_REQ);
821
822 return 0;
823}
824
825#define PRCMU_GIC_NUMBER_REGS 5
826
827/*
828 * This function checks if there are pending irq on the gic. It only
829 * makes sense if the gic has been decoupled before with the
830 * db8500_prcmu_gic_decouple function. Disabling an interrupt only
831 * disables the forwarding of the interrupt to any CPU interface. It
832 * does not prevent the interrupt from changing state, for example
833 * becoming pending, or active and pending if it is already
834 * active. Hence, we have to check the interrupt is pending *and* is
835 * active.
836 */
837bool db8500_prcmu_gic_pending_irq(void)
838{
839 u32 pr; /* Pending register */
840 u32 er; /* Enable register */
841 void __iomem *dist_base = __io_address(U8500_GIC_DIST_BASE);
842 int i;
843
844 /* 5 registers. STI & PPI not skipped */
845 for (i = 0; i < PRCMU_GIC_NUMBER_REGS; i++) {
846
847 pr = readl_relaxed(dist_base + GIC_DIST_PENDING_SET + i * 4);
848 er = readl_relaxed(dist_base + GIC_DIST_ENABLE_SET + i * 4);
849
850 if (pr & er)
851 return true; /* There is a pending interrupt */
852 }
853
854 return false;
855}
856
857/*
858 * This function checks if there are pending interrupt on the
859 * prcmu which has been delegated to monitor the irqs with the
860 * db8500_prcmu_copy_gic_settings function.
861 */
862bool db8500_prcmu_pending_irq(void)
863{
864 u32 it, im;
865 int i;
866
867 for (i = 0; i < PRCMU_GIC_NUMBER_REGS - 1; i++) {
868 it = readl(PRCM_ARMITVAL31TO0 + i * 4);
869 im = readl(PRCM_ARMITMSK31TO0 + i * 4);
870 if (it & im)
871 return true; /* There is a pending interrupt */
872 }
873
874 return false;
875}
876
877/*
878 * This function checks if the specified cpu is in in WFI. It's usage
879 * makes sense only if the gic is decoupled with the db8500_prcmu_gic_decouple
880 * function. Of course passing smp_processor_id() to this function will
881 * always return false...
882 */
883bool db8500_prcmu_is_cpu_in_wfi(int cpu)
884{
885 return readl(PRCM_ARM_WFI_STANDBY) & cpu ? PRCM_ARM_WFI_STANDBY_WFI1 :
886 PRCM_ARM_WFI_STANDBY_WFI0;
887}
888
889/*
890 * This function copies the gic SPI settings to the prcmu in order to
891 * monitor them and abort/finish the retention/off sequence or state.
892 */
893int db8500_prcmu_copy_gic_settings(void)
894{
895 u32 er; /* Enable register */
896 void __iomem *dist_base = __io_address(U8500_GIC_DIST_BASE);
897 int i;
898
899 /* We skip the STI and PPI */
900 for (i = 0; i < PRCMU_GIC_NUMBER_REGS - 1; i++) {
901 er = readl_relaxed(dist_base +
902 GIC_DIST_ENABLE_SET + (i + 1) * 4);
903 writel(er, PRCM_ARMITMSK31TO0 + i * 4);
904 }
905
906 return 0;
907}
908
909/* This function should only be called while mb0_transfer.lock is held. */ 820/* This function should only be called while mb0_transfer.lock is held. */
910static void config_wakeups(void) 821static void config_wakeups(void)
911{ 822{
@@ -1059,7 +970,7 @@ int db8500_prcmu_set_ddr_opp(u8 opp)
1059/* Divide the frequency of certain clocks by 2 for APE_50_PARTLY_25_OPP. */ 970/* Divide the frequency of certain clocks by 2 for APE_50_PARTLY_25_OPP. */
1060static void request_even_slower_clocks(bool enable) 971static void request_even_slower_clocks(bool enable)
1061{ 972{
1062 void __iomem *clock_reg[] = { 973 u32 clock_reg[] = {
1063 PRCM_ACLK_MGT, 974 PRCM_ACLK_MGT,
1064 PRCM_DMACLK_MGT 975 PRCM_DMACLK_MGT
1065 }; 976 };
@@ -1076,7 +987,7 @@ static void request_even_slower_clocks(bool enable)
1076 u32 val; 987 u32 val;
1077 u32 div; 988 u32 div;
1078 989
1079 val = readl(clock_reg[i]); 990 val = readl(prcmu_base + clock_reg[i]);
1080 div = (val & PRCM_CLK_MGT_CLKPLLDIV_MASK); 991 div = (val & PRCM_CLK_MGT_CLKPLLDIV_MASK);
1081 if (enable) { 992 if (enable) {
1082 if ((div <= 1) || (div > 15)) { 993 if ((div <= 1) || (div > 15)) {
@@ -1092,7 +1003,7 @@ static void request_even_slower_clocks(bool enable)
1092 } 1003 }
1093 val = ((val & ~PRCM_CLK_MGT_CLKPLLDIV_MASK) | 1004 val = ((val & ~PRCM_CLK_MGT_CLKPLLDIV_MASK) |
1094 (div & PRCM_CLK_MGT_CLKPLLDIV_MASK)); 1005 (div & PRCM_CLK_MGT_CLKPLLDIV_MASK));
1095 writel(val, clock_reg[i]); 1006 writel(val, prcmu_base + clock_reg[i]);
1096 } 1007 }
1097 1008
1098unlock_and_return: 1009unlock_and_return:
@@ -1446,14 +1357,14 @@ static int request_clock(u8 clock, bool enable)
1446 while ((readl(PRCM_SEM) & PRCM_SEM_PRCM_SEM) != 0) 1357 while ((readl(PRCM_SEM) & PRCM_SEM_PRCM_SEM) != 0)
1447 cpu_relax(); 1358 cpu_relax();
1448 1359
1449 val = readl(clk_mgt[clock].reg); 1360 val = readl(prcmu_base + clk_mgt[clock].offset);
1450 if (enable) { 1361 if (enable) {
1451 val |= (PRCM_CLK_MGT_CLKEN | clk_mgt[clock].pllsw); 1362 val |= (PRCM_CLK_MGT_CLKEN | clk_mgt[clock].pllsw);
1452 } else { 1363 } else {
1453 clk_mgt[clock].pllsw = (val & PRCM_CLK_MGT_CLKPLLSW_MASK); 1364 clk_mgt[clock].pllsw = (val & PRCM_CLK_MGT_CLKPLLSW_MASK);
1454 val &= ~(PRCM_CLK_MGT_CLKEN | PRCM_CLK_MGT_CLKPLLSW_MASK); 1365 val &= ~(PRCM_CLK_MGT_CLKEN | PRCM_CLK_MGT_CLKPLLSW_MASK);
1455 } 1366 }
1456 writel(val, clk_mgt[clock].reg); 1367 writel(val, prcmu_base + clk_mgt[clock].offset);
1457 1368
1458 /* Release the HW semaphore. */ 1369 /* Release the HW semaphore. */
1459 writel(0, PRCM_SEM); 1370 writel(0, PRCM_SEM);
@@ -1629,7 +1540,7 @@ static unsigned long clock_rate(u8 clock)
1629 u32 pllsw; 1540 u32 pllsw;
1630 unsigned long rate = ROOT_CLOCK_RATE; 1541 unsigned long rate = ROOT_CLOCK_RATE;
1631 1542
1632 val = readl(clk_mgt[clock].reg); 1543 val = readl(prcmu_base + clk_mgt[clock].offset);
1633 1544
1634 if (val & PRCM_CLK_MGT_CLK38) { 1545 if (val & PRCM_CLK_MGT_CLK38) {
1635 if (clk_mgt[clock].clk38div && (val & PRCM_CLK_MGT_CLK38DIV)) 1546 if (clk_mgt[clock].clk38div && (val & PRCM_CLK_MGT_CLK38DIV))
@@ -1785,7 +1696,7 @@ static long round_clock_rate(u8 clock, unsigned long rate)
1785 unsigned long src_rate; 1696 unsigned long src_rate;
1786 long rounded_rate; 1697 long rounded_rate;
1787 1698
1788 val = readl(clk_mgt[clock].reg); 1699 val = readl(prcmu_base + clk_mgt[clock].offset);
1789 src_rate = clock_source_rate((val | clk_mgt[clock].pllsw), 1700 src_rate = clock_source_rate((val | clk_mgt[clock].pllsw),
1790 clk_mgt[clock].branch); 1701 clk_mgt[clock].branch);
1791 div = clock_divider(src_rate, rate); 1702 div = clock_divider(src_rate, rate);
@@ -1933,7 +1844,7 @@ static void set_clock_rate(u8 clock, unsigned long rate)
1933 while ((readl(PRCM_SEM) & PRCM_SEM_PRCM_SEM) != 0) 1844 while ((readl(PRCM_SEM) & PRCM_SEM_PRCM_SEM) != 0)
1934 cpu_relax(); 1845 cpu_relax();
1935 1846
1936 val = readl(clk_mgt[clock].reg); 1847 val = readl(prcmu_base + clk_mgt[clock].offset);
1937 src_rate = clock_source_rate((val | clk_mgt[clock].pllsw), 1848 src_rate = clock_source_rate((val | clk_mgt[clock].pllsw),
1938 clk_mgt[clock].branch); 1849 clk_mgt[clock].branch);
1939 div = clock_divider(src_rate, rate); 1850 div = clock_divider(src_rate, rate);
@@ -1961,7 +1872,7 @@ static void set_clock_rate(u8 clock, unsigned long rate)
1961 val &= ~PRCM_CLK_MGT_CLKPLLDIV_MASK; 1872 val &= ~PRCM_CLK_MGT_CLKPLLDIV_MASK;
1962 val |= min(div, (u32)31); 1873 val |= min(div, (u32)31);
1963 } 1874 }
1964 writel(val, clk_mgt[clock].reg); 1875 writel(val, prcmu_base + clk_mgt[clock].offset);
1965 1876
1966 /* Release the HW semaphore. */ 1877 /* Release the HW semaphore. */
1967 writel(0, PRCM_SEM); 1878 writel(0, PRCM_SEM);
@@ -2764,14 +2675,13 @@ static struct irq_domain_ops db8500_irq_ops = {
2764 .xlate = irq_domain_xlate_twocell, 2675 .xlate = irq_domain_xlate_twocell,
2765}; 2676};
2766 2677
2767static int db8500_irq_init(struct device_node *np) 2678static int db8500_irq_init(struct device_node *np, int irq_base)
2768{ 2679{
2769 int irq_base = 0;
2770 int i; 2680 int i;
2771 2681
2772 /* In the device tree case, just take some IRQs */ 2682 /* In the device tree case, just take some IRQs */
2773 if (!np) 2683 if (np)
2774 irq_base = IRQ_PRCMU_BASE; 2684 irq_base = 0;
2775 2685
2776 db8500_irq_domain = irq_domain_add_simple( 2686 db8500_irq_domain = irq_domain_add_simple(
2777 np, NUM_PRCMU_WAKEUPS, irq_base, 2687 np, NUM_PRCMU_WAKEUPS, irq_base,
@@ -2825,8 +2735,19 @@ static void dbx500_fw_version_init(struct platform_device *pdev,
2825 } 2735 }
2826} 2736}
2827 2737
2828void __init db8500_prcmu_early_init(void) 2738void __init db8500_prcmu_early_init(u32 phy_base, u32 size)
2829{ 2739{
2740 /*
2741 * This is a temporary remap to bring up the clocks. It is
2742 * subsequently replaces with a real remap. After the merge of
2743 * the mailbox subsystem all of this early code goes away, and the
2744 * clock driver can probe independently. An early initcall will
2745 * still be needed, but it can be diverted into drivers/clk/ux500.
2746 */
2747 prcmu_base = ioremap(phy_base, size);
2748 if (!prcmu_base)
2749 pr_err("%s: ioremap() of prcmu registers failed!\n", __func__);
2750
2830 spin_lock_init(&mb0_transfer.lock); 2751 spin_lock_init(&mb0_transfer.lock);
2831 spin_lock_init(&mb0_transfer.dbb_irqs_lock); 2752 spin_lock_init(&mb0_transfer.dbb_irqs_lock);
2832 mutex_init(&mb0_transfer.ac_wake_lock); 2753 mutex_init(&mb0_transfer.ac_wake_lock);
@@ -3092,18 +3013,57 @@ static struct regulator_init_data db8500_regulators[DB8500_NUM_REGULATORS] = {
3092 }, 3013 },
3093}; 3014};
3094 3015
3095static struct resource ab8500_resources[] = {
3096 [0] = {
3097 .start = IRQ_DB8500_AB8500,
3098 .end = IRQ_DB8500_AB8500,
3099 .flags = IORESOURCE_IRQ
3100 }
3101};
3102
3103static struct ux500_wdt_data db8500_wdt_pdata = { 3016static struct ux500_wdt_data db8500_wdt_pdata = {
3104 .timeout = 600, /* 10 minutes */ 3017 .timeout = 600, /* 10 minutes */
3105 .has_28_bits_resolution = true, 3018 .has_28_bits_resolution = true,
3106}; 3019};
3020/*
3021 * Thermal Sensor
3022 */
3023
3024static struct resource db8500_thsens_resources[] = {
3025 {
3026 .name = "IRQ_HOTMON_LOW",
3027 .start = IRQ_PRCMU_HOTMON_LOW,
3028 .end = IRQ_PRCMU_HOTMON_LOW,
3029 .flags = IORESOURCE_IRQ,
3030 },
3031 {
3032 .name = "IRQ_HOTMON_HIGH",
3033 .start = IRQ_PRCMU_HOTMON_HIGH,
3034 .end = IRQ_PRCMU_HOTMON_HIGH,
3035 .flags = IORESOURCE_IRQ,
3036 },
3037};
3038
3039static struct db8500_thsens_platform_data db8500_thsens_data = {
3040 .trip_points[0] = {
3041 .temp = 70000,
3042 .type = THERMAL_TRIP_ACTIVE,
3043 .cdev_name = {
3044 [0] = "thermal-cpufreq-0",
3045 },
3046 },
3047 .trip_points[1] = {
3048 .temp = 75000,
3049 .type = THERMAL_TRIP_ACTIVE,
3050 .cdev_name = {
3051 [0] = "thermal-cpufreq-0",
3052 },
3053 },
3054 .trip_points[2] = {
3055 .temp = 80000,
3056 .type = THERMAL_TRIP_ACTIVE,
3057 .cdev_name = {
3058 [0] = "thermal-cpufreq-0",
3059 },
3060 },
3061 .trip_points[3] = {
3062 .temp = 85000,
3063 .type = THERMAL_TRIP_CRITICAL,
3064 },
3065 .num_trips = 4,
3066};
3107 3067
3108static struct mfd_cell db8500_prcmu_devs[] = { 3068static struct mfd_cell db8500_prcmu_devs[] = {
3109 { 3069 {
@@ -3125,11 +3085,10 @@ static struct mfd_cell db8500_prcmu_devs[] = {
3125 .id = -1, 3085 .id = -1,
3126 }, 3086 },
3127 { 3087 {
3128 .name = "ab8500-core", 3088 .name = "db8500-thermal",
3129 .of_compatible = "stericsson,ab8500", 3089 .num_resources = ARRAY_SIZE(db8500_thsens_resources),
3130 .num_resources = ARRAY_SIZE(ab8500_resources), 3090 .resources = db8500_thsens_resources,
3131 .resources = ab8500_resources, 3091 .platform_data = &db8500_thsens_data,
3132 .id = AB8500_VERSION_AB8500,
3133 }, 3092 },
3134}; 3093};
3135 3094
@@ -3141,6 +3100,24 @@ static void db8500_prcmu_update_cpufreq(void)
3141 } 3100 }
3142} 3101}
3143 3102
3103static int db8500_prcmu_register_ab8500(struct device *parent,
3104 struct ab8500_platform_data *pdata,
3105 int irq)
3106{
3107 struct resource ab8500_resource = DEFINE_RES_IRQ(irq);
3108 struct mfd_cell ab8500_cell = {
3109 .name = "ab8500-core",
3110 .of_compatible = "stericsson,ab8500",
3111 .id = AB8500_VERSION_AB8500,
3112 .platform_data = pdata,
3113 .pdata_size = sizeof(struct ab8500_platform_data),
3114 .resources = &ab8500_resource,
3115 .num_resources = 1,
3116 };
3117
3118 return mfd_add_devices(parent, 0, &ab8500_cell, 1, NULL, 0, NULL);
3119}
3120
3144/** 3121/**
3145 * prcmu_fw_init - arch init call for the Linux PRCMU fw init logic 3122 * prcmu_fw_init - arch init call for the Linux PRCMU fw init logic
3146 * 3123 *
@@ -3149,11 +3126,21 @@ static int db8500_prcmu_probe(struct platform_device *pdev)
3149{ 3126{
3150 struct device_node *np = pdev->dev.of_node; 3127 struct device_node *np = pdev->dev.of_node;
3151 struct prcmu_pdata *pdata = dev_get_platdata(&pdev->dev); 3128 struct prcmu_pdata *pdata = dev_get_platdata(&pdev->dev);
3152 int irq = 0, err = 0, i; 3129 int irq = 0, err = 0;
3153 struct resource *res; 3130 struct resource *res;
3154 3131
3132 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "prcmu");
3133 if (!res) {
3134 dev_err(&pdev->dev, "no prcmu memory region provided\n");
3135 return -ENOENT;
3136 }
3137 prcmu_base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
3138 if (!prcmu_base) {
3139 dev_err(&pdev->dev,
3140 "failed to ioremap prcmu register memory\n");
3141 return -ENOENT;
3142 }
3155 init_prcm_registers(); 3143 init_prcm_registers();
3156
3157 dbx500_fw_version_init(pdev, pdata->version_offset); 3144 dbx500_fw_version_init(pdev, pdata->version_offset);
3158 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "prcmu-tcdm"); 3145 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "prcmu-tcdm");
3159 if (!res) { 3146 if (!res) {
@@ -3180,26 +3167,27 @@ static int db8500_prcmu_probe(struct platform_device *pdev)
3180 goto no_irq_return; 3167 goto no_irq_return;
3181 } 3168 }
3182 3169
3183 db8500_irq_init(np); 3170 db8500_irq_init(np, pdata->irq_base);
3184
3185 for (i = 0; i < ARRAY_SIZE(db8500_prcmu_devs); i++) {
3186 if (!strcmp(db8500_prcmu_devs[i].name, "ab8500-core")) {
3187 db8500_prcmu_devs[i].platform_data = pdata->ab_platdata;
3188 db8500_prcmu_devs[i].pdata_size = sizeof(struct ab8500_platform_data);
3189 }
3190 }
3191 3171
3192 prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET); 3172 prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET);
3193 3173
3194 db8500_prcmu_update_cpufreq(); 3174 db8500_prcmu_update_cpufreq();
3195 3175
3196 err = mfd_add_devices(&pdev->dev, 0, db8500_prcmu_devs, 3176 err = mfd_add_devices(&pdev->dev, 0, db8500_prcmu_devs,
3197 ARRAY_SIZE(db8500_prcmu_devs), NULL, 0, NULL); 3177 ARRAY_SIZE(db8500_prcmu_devs), NULL, 0, db8500_irq_domain);
3198 if (err) { 3178 if (err) {
3199 pr_err("prcmu: Failed to add subdevices\n"); 3179 pr_err("prcmu: Failed to add subdevices\n");
3200 return err; 3180 return err;
3201 } 3181 }
3202 3182
3183 err = db8500_prcmu_register_ab8500(&pdev->dev, pdata->ab_platdata,
3184 pdata->ab_irq);
3185 if (err) {
3186 mfd_remove_devices(&pdev->dev);
3187 pr_err("prcmu: Failed to add ab8500 subdevice\n");
3188 goto no_irq_return;
3189 }
3190
3203 pr_info("DB8500 PRCMU initialized\n"); 3191 pr_info("DB8500 PRCMU initialized\n");
3204 3192
3205no_irq_return: 3193no_irq_return:
diff --git a/drivers/mfd/dbx500-prcmu-regs.h b/drivers/mfd/dbx500-prcmu-regs.h
index 79c76ebdba52..d14836ed2114 100644
--- a/drivers/mfd/dbx500-prcmu-regs.h
+++ b/drivers/mfd/dbx500-prcmu-regs.h
@@ -13,136 +13,110 @@
13#ifndef __DB8500_PRCMU_REGS_H 13#ifndef __DB8500_PRCMU_REGS_H
14#define __DB8500_PRCMU_REGS_H 14#define __DB8500_PRCMU_REGS_H
15 15
16#include <mach/hardware.h>
17
18#define BITS(_start, _end) ((BIT(_end) - BIT(_start)) + BIT(_end)) 16#define BITS(_start, _end) ((BIT(_end) - BIT(_start)) + BIT(_end))
19 17
20#define PRCM_CLK_MGT(_offset) (void __iomem *)(IO_ADDRESS(U8500_PRCMU_BASE) \ 18#define PRCM_ACLK_MGT (0x004)
21 + _offset) 19#define PRCM_SVACLK_MGT (0x008)
22#define PRCM_ACLK_MGT PRCM_CLK_MGT(0x004) 20#define PRCM_SIACLK_MGT (0x00C)
23#define PRCM_SVACLK_MGT PRCM_CLK_MGT(0x008) 21#define PRCM_SGACLK_MGT (0x014)
24#define PRCM_SIACLK_MGT PRCM_CLK_MGT(0x00C) 22#define PRCM_UARTCLK_MGT (0x018)
25#define PRCM_SGACLK_MGT PRCM_CLK_MGT(0x014) 23#define PRCM_MSP02CLK_MGT (0x01C)
26#define PRCM_UARTCLK_MGT PRCM_CLK_MGT(0x018) 24#define PRCM_I2CCLK_MGT (0x020)
27#define PRCM_MSP02CLK_MGT PRCM_CLK_MGT(0x01C) 25#define PRCM_SDMMCCLK_MGT (0x024)
28#define PRCM_I2CCLK_MGT PRCM_CLK_MGT(0x020) 26#define PRCM_SLIMCLK_MGT (0x028)
29#define PRCM_SDMMCCLK_MGT PRCM_CLK_MGT(0x024) 27#define PRCM_PER1CLK_MGT (0x02C)
30#define PRCM_SLIMCLK_MGT PRCM_CLK_MGT(0x028) 28#define PRCM_PER2CLK_MGT (0x030)
31#define PRCM_PER1CLK_MGT PRCM_CLK_MGT(0x02C) 29#define PRCM_PER3CLK_MGT (0x034)
32#define PRCM_PER2CLK_MGT PRCM_CLK_MGT(0x030) 30#define PRCM_PER5CLK_MGT (0x038)
33#define PRCM_PER3CLK_MGT PRCM_CLK_MGT(0x034) 31#define PRCM_PER6CLK_MGT (0x03C)
34#define PRCM_PER5CLK_MGT PRCM_CLK_MGT(0x038) 32#define PRCM_PER7CLK_MGT (0x040)
35#define PRCM_PER6CLK_MGT PRCM_CLK_MGT(0x03C) 33#define PRCM_LCDCLK_MGT (0x044)
36#define PRCM_PER7CLK_MGT PRCM_CLK_MGT(0x040) 34#define PRCM_BMLCLK_MGT (0x04C)
37#define PRCM_LCDCLK_MGT PRCM_CLK_MGT(0x044) 35#define PRCM_HSITXCLK_MGT (0x050)
38#define PRCM_BMLCLK_MGT PRCM_CLK_MGT(0x04C) 36#define PRCM_HSIRXCLK_MGT (0x054)
39#define PRCM_HSITXCLK_MGT PRCM_CLK_MGT(0x050) 37#define PRCM_HDMICLK_MGT (0x058)
40#define PRCM_HSIRXCLK_MGT PRCM_CLK_MGT(0x054) 38#define PRCM_APEATCLK_MGT (0x05C)
41#define PRCM_HDMICLK_MGT PRCM_CLK_MGT(0x058) 39#define PRCM_APETRACECLK_MGT (0x060)
42#define PRCM_APEATCLK_MGT PRCM_CLK_MGT(0x05C) 40#define PRCM_MCDECLK_MGT (0x064)
43#define PRCM_APETRACECLK_MGT PRCM_CLK_MGT(0x060) 41#define PRCM_IPI2CCLK_MGT (0x068)
44#define PRCM_MCDECLK_MGT PRCM_CLK_MGT(0x064) 42#define PRCM_DSIALTCLK_MGT (0x06C)
45#define PRCM_IPI2CCLK_MGT PRCM_CLK_MGT(0x068) 43#define PRCM_DMACLK_MGT (0x074)
46#define PRCM_DSIALTCLK_MGT PRCM_CLK_MGT(0x06C) 44#define PRCM_B2R2CLK_MGT (0x078)
47#define PRCM_DMACLK_MGT PRCM_CLK_MGT(0x074) 45#define PRCM_TVCLK_MGT (0x07C)
48#define PRCM_B2R2CLK_MGT PRCM_CLK_MGT(0x078) 46#define PRCM_UNIPROCLK_MGT (0x278)
49#define PRCM_TVCLK_MGT PRCM_CLK_MGT(0x07C) 47#define PRCM_SSPCLK_MGT (0x280)
50#define PRCM_UNIPROCLK_MGT PRCM_CLK_MGT(0x278) 48#define PRCM_RNGCLK_MGT (0x284)
51#define PRCM_SSPCLK_MGT PRCM_CLK_MGT(0x280) 49#define PRCM_UICCCLK_MGT (0x27C)
52#define PRCM_RNGCLK_MGT PRCM_CLK_MGT(0x284) 50#define PRCM_MSP1CLK_MGT (0x288)
53#define PRCM_UICCCLK_MGT PRCM_CLK_MGT(0x27C) 51
54#define PRCM_MSP1CLK_MGT PRCM_CLK_MGT(0x288) 52#define PRCM_ARM_PLLDIVPS (prcmu_base + 0x118)
55
56#define PRCM_ARM_PLLDIVPS (_PRCMU_BASE + 0x118)
57#define PRCM_ARM_PLLDIVPS_ARM_BRM_RATE 0x3f 53#define PRCM_ARM_PLLDIVPS_ARM_BRM_RATE 0x3f
58#define PRCM_ARM_PLLDIVPS_MAX_MASK 0xf 54#define PRCM_ARM_PLLDIVPS_MAX_MASK 0xf
59 55
60#define PRCM_PLLARM_LOCKP (_PRCMU_BASE + 0x0a8) 56#define PRCM_PLLARM_LOCKP (prcmu_base + 0x0a8)
61#define PRCM_PLLARM_LOCKP_PRCM_PLLARM_LOCKP3 0x2 57#define PRCM_PLLARM_LOCKP_PRCM_PLLARM_LOCKP3 0x2
62 58
63#define PRCM_ARM_CHGCLKREQ (_PRCMU_BASE + 0x114) 59#define PRCM_ARM_CHGCLKREQ (prcmu_base + 0x114)
64#define PRCM_ARM_CHGCLKREQ_PRCM_ARM_CHGCLKREQ BIT(0) 60#define PRCM_ARM_CHGCLKREQ_PRCM_ARM_CHGCLKREQ BIT(0)
65#define PRCM_ARM_CHGCLKREQ_PRCM_ARM_DIVSEL BIT(16) 61#define PRCM_ARM_CHGCLKREQ_PRCM_ARM_DIVSEL BIT(16)
66 62
67#define PRCM_PLLARM_ENABLE (_PRCMU_BASE + 0x98) 63#define PRCM_PLLARM_ENABLE (prcmu_base + 0x98)
68#define PRCM_PLLARM_ENABLE_PRCM_PLLARM_ENABLE 0x1 64#define PRCM_PLLARM_ENABLE_PRCM_PLLARM_ENABLE 0x1
69#define PRCM_PLLARM_ENABLE_PRCM_PLLARM_COUNTON 0x100 65#define PRCM_PLLARM_ENABLE_PRCM_PLLARM_COUNTON 0x100
70 66
71#define PRCM_ARMCLKFIX_MGT (_PRCMU_BASE + 0x0) 67#define PRCM_ARMCLKFIX_MGT (prcmu_base + 0x0)
72#define PRCM_A9PL_FORCE_CLKEN (_PRCMU_BASE + 0x19C) 68#define PRCM_A9PL_FORCE_CLKEN (prcmu_base + 0x19C)
73#define PRCM_A9_RESETN_CLR (_PRCMU_BASE + 0x1f4) 69#define PRCM_A9_RESETN_CLR (prcmu_base + 0x1f4)
74#define PRCM_A9_RESETN_SET (_PRCMU_BASE + 0x1f0) 70#define PRCM_A9_RESETN_SET (prcmu_base + 0x1f0)
75#define PRCM_ARM_LS_CLAMP (_PRCMU_BASE + 0x30c) 71#define PRCM_ARM_LS_CLAMP (prcmu_base + 0x30c)
76#define PRCM_SRAM_A9 (_PRCMU_BASE + 0x308) 72#define PRCM_SRAM_A9 (prcmu_base + 0x308)
77 73
78#define PRCM_A9PL_FORCE_CLKEN_PRCM_A9PL_FORCE_CLKEN BIT(0) 74#define PRCM_A9PL_FORCE_CLKEN_PRCM_A9PL_FORCE_CLKEN BIT(0)
79#define PRCM_A9PL_FORCE_CLKEN_PRCM_A9AXI_FORCE_CLKEN BIT(1) 75#define PRCM_A9PL_FORCE_CLKEN_PRCM_A9AXI_FORCE_CLKEN BIT(1)
80 76
81/* ARM WFI Standby signal register */
82#define PRCM_ARM_WFI_STANDBY (_PRCMU_BASE + 0x130)
83#define PRCM_ARM_WFI_STANDBY_WFI0 0x08
84#define PRCM_ARM_WFI_STANDBY_WFI1 0x10
85#define PRCM_IOCR (_PRCMU_BASE + 0x310)
86#define PRCM_IOCR_IOFORCE 0x1
87
88/* CPU mailbox registers */ 77/* CPU mailbox registers */
89#define PRCM_MBOX_CPU_VAL (_PRCMU_BASE + 0x0fc) 78#define PRCM_MBOX_CPU_VAL (prcmu_base + 0x0fc)
90#define PRCM_MBOX_CPU_SET (_PRCMU_BASE + 0x100) 79#define PRCM_MBOX_CPU_SET (prcmu_base + 0x100)
91#define PRCM_MBOX_CPU_CLR (_PRCMU_BASE + 0x104) 80#define PRCM_MBOX_CPU_CLR (prcmu_base + 0x104)
92 81
93/* Dual A9 core interrupt management unit registers */ 82#define PRCM_HOSTACCESS_REQ (prcmu_base + 0x334)
94#define PRCM_A9_MASK_REQ (_PRCMU_BASE + 0x328)
95#define PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ 0x1
96
97#define PRCM_A9_MASK_ACK (_PRCMU_BASE + 0x32c)
98#define PRCM_ARMITMSK31TO0 (_PRCMU_BASE + 0x11c)
99#define PRCM_ARMITMSK63TO32 (_PRCMU_BASE + 0x120)
100#define PRCM_ARMITMSK95TO64 (_PRCMU_BASE + 0x124)
101#define PRCM_ARMITMSK127TO96 (_PRCMU_BASE + 0x128)
102#define PRCM_POWER_STATE_VAL (_PRCMU_BASE + 0x25C)
103#define PRCM_ARMITVAL31TO0 (_PRCMU_BASE + 0x260)
104#define PRCM_ARMITVAL63TO32 (_PRCMU_BASE + 0x264)
105#define PRCM_ARMITVAL95TO64 (_PRCMU_BASE + 0x268)
106#define PRCM_ARMITVAL127TO96 (_PRCMU_BASE + 0x26C)
107
108#define PRCM_HOSTACCESS_REQ (_PRCMU_BASE + 0x334)
109#define PRCM_HOSTACCESS_REQ_HOSTACCESS_REQ 0x1 83#define PRCM_HOSTACCESS_REQ_HOSTACCESS_REQ 0x1
110#define PRCM_HOSTACCESS_REQ_WAKE_REQ BIT(16) 84#define PRCM_HOSTACCESS_REQ_WAKE_REQ BIT(16)
111#define ARM_WAKEUP_MODEM 0x1 85#define ARM_WAKEUP_MODEM 0x1
112 86
113#define PRCM_ARM_IT1_CLR (_PRCMU_BASE + 0x48C) 87#define PRCM_ARM_IT1_CLR (prcmu_base + 0x48C)
114#define PRCM_ARM_IT1_VAL (_PRCMU_BASE + 0x494) 88#define PRCM_ARM_IT1_VAL (prcmu_base + 0x494)
115#define PRCM_HOLD_EVT (_PRCMU_BASE + 0x174) 89#define PRCM_HOLD_EVT (prcmu_base + 0x174)
116 90
117#define PRCM_MOD_AWAKE_STATUS (_PRCMU_BASE + 0x4A0) 91#define PRCM_MOD_AWAKE_STATUS (prcmu_base + 0x4A0)
118#define PRCM_MOD_AWAKE_STATUS_PRCM_MOD_COREPD_AWAKE BIT(0) 92#define PRCM_MOD_AWAKE_STATUS_PRCM_MOD_COREPD_AWAKE BIT(0)
119#define PRCM_MOD_AWAKE_STATUS_PRCM_MOD_AAPD_AWAKE BIT(1) 93#define PRCM_MOD_AWAKE_STATUS_PRCM_MOD_AAPD_AWAKE BIT(1)
120#define PRCM_MOD_AWAKE_STATUS_PRCM_MOD_VMODEM_OFF_ISO BIT(2) 94#define PRCM_MOD_AWAKE_STATUS_PRCM_MOD_VMODEM_OFF_ISO BIT(2)
121 95
122#define PRCM_ITSTATUS0 (_PRCMU_BASE + 0x148) 96#define PRCM_ITSTATUS0 (prcmu_base + 0x148)
123#define PRCM_ITSTATUS1 (_PRCMU_BASE + 0x150) 97#define PRCM_ITSTATUS1 (prcmu_base + 0x150)
124#define PRCM_ITSTATUS2 (_PRCMU_BASE + 0x158) 98#define PRCM_ITSTATUS2 (prcmu_base + 0x158)
125#define PRCM_ITSTATUS3 (_PRCMU_BASE + 0x160) 99#define PRCM_ITSTATUS3 (prcmu_base + 0x160)
126#define PRCM_ITSTATUS4 (_PRCMU_BASE + 0x168) 100#define PRCM_ITSTATUS4 (prcmu_base + 0x168)
127#define PRCM_ITSTATUS5 (_PRCMU_BASE + 0x484) 101#define PRCM_ITSTATUS5 (prcmu_base + 0x484)
128#define PRCM_ITCLEAR5 (_PRCMU_BASE + 0x488) 102#define PRCM_ITCLEAR5 (prcmu_base + 0x488)
129#define PRCM_ARMIT_MASKXP70_IT (_PRCMU_BASE + 0x1018) 103#define PRCM_ARMIT_MASKXP70_IT (prcmu_base + 0x1018)
130 104
131/* System reset register */ 105/* System reset register */
132#define PRCM_APE_SOFTRST (_PRCMU_BASE + 0x228) 106#define PRCM_APE_SOFTRST (prcmu_base + 0x228)
133 107
134/* Level shifter and clamp control registers */ 108/* Level shifter and clamp control registers */
135#define PRCM_MMIP_LS_CLAMP_SET (_PRCMU_BASE + 0x420) 109#define PRCM_MMIP_LS_CLAMP_SET (prcmu_base + 0x420)
136#define PRCM_MMIP_LS_CLAMP_CLR (_PRCMU_BASE + 0x424) 110#define PRCM_MMIP_LS_CLAMP_CLR (prcmu_base + 0x424)
137 111
138#define PRCM_MMIP_LS_CLAMP_DSIPLL_CLAMP BIT(11) 112#define PRCM_MMIP_LS_CLAMP_DSIPLL_CLAMP BIT(11)
139#define PRCM_MMIP_LS_CLAMP_DSIPLL_CLAMPI BIT(22) 113#define PRCM_MMIP_LS_CLAMP_DSIPLL_CLAMPI BIT(22)
140 114
141/* PRCMU clock/PLL/reset registers */ 115/* PRCMU clock/PLL/reset registers */
142#define PRCM_PLLSOC0_FREQ (_PRCMU_BASE + 0x080) 116#define PRCM_PLLSOC0_FREQ (prcmu_base + 0x080)
143#define PRCM_PLLSOC1_FREQ (_PRCMU_BASE + 0x084) 117#define PRCM_PLLSOC1_FREQ (prcmu_base + 0x084)
144#define PRCM_PLLARM_FREQ (_PRCMU_BASE + 0x088) 118#define PRCM_PLLARM_FREQ (prcmu_base + 0x088)
145#define PRCM_PLLDDR_FREQ (_PRCMU_BASE + 0x08C) 119#define PRCM_PLLDDR_FREQ (prcmu_base + 0x08C)
146#define PRCM_PLL_FREQ_D_SHIFT 0 120#define PRCM_PLL_FREQ_D_SHIFT 0
147#define PRCM_PLL_FREQ_D_MASK BITS(0, 7) 121#define PRCM_PLL_FREQ_D_MASK BITS(0, 7)
148#define PRCM_PLL_FREQ_N_SHIFT 8 122#define PRCM_PLL_FREQ_N_SHIFT 8
@@ -152,14 +126,14 @@
152#define PRCM_PLL_FREQ_SELDIV2 BIT(24) 126#define PRCM_PLL_FREQ_SELDIV2 BIT(24)
153#define PRCM_PLL_FREQ_DIV2EN BIT(25) 127#define PRCM_PLL_FREQ_DIV2EN BIT(25)
154 128
155#define PRCM_PLLDSI_FREQ (_PRCMU_BASE + 0x500) 129#define PRCM_PLLDSI_FREQ (prcmu_base + 0x500)
156#define PRCM_PLLDSI_ENABLE (_PRCMU_BASE + 0x504) 130#define PRCM_PLLDSI_ENABLE (prcmu_base + 0x504)
157#define PRCM_PLLDSI_LOCKP (_PRCMU_BASE + 0x508) 131#define PRCM_PLLDSI_LOCKP (prcmu_base + 0x508)
158#define PRCM_DSI_PLLOUT_SEL (_PRCMU_BASE + 0x530) 132#define PRCM_DSI_PLLOUT_SEL (prcmu_base + 0x530)
159#define PRCM_DSITVCLK_DIV (_PRCMU_BASE + 0x52C) 133#define PRCM_DSITVCLK_DIV (prcmu_base + 0x52C)
160#define PRCM_PLLDSI_LOCKP (_PRCMU_BASE + 0x508) 134#define PRCM_PLLDSI_LOCKP (prcmu_base + 0x508)
161#define PRCM_APE_RESETN_SET (_PRCMU_BASE + 0x1E4) 135#define PRCM_APE_RESETN_SET (prcmu_base + 0x1E4)
162#define PRCM_APE_RESETN_CLR (_PRCMU_BASE + 0x1E8) 136#define PRCM_APE_RESETN_CLR (prcmu_base + 0x1E8)
163 137
164#define PRCM_PLLDSI_ENABLE_PRCM_PLLDSI_ENABLE BIT(0) 138#define PRCM_PLLDSI_ENABLE_PRCM_PLLDSI_ENABLE BIT(0)
165 139
@@ -188,30 +162,30 @@
188 162
189#define PRCM_APE_RESETN_DSIPLL_RESETN BIT(14) 163#define PRCM_APE_RESETN_DSIPLL_RESETN BIT(14)
190 164
191#define PRCM_CLKOCR (_PRCMU_BASE + 0x1CC) 165#define PRCM_CLKOCR (prcmu_base + 0x1CC)
192#define PRCM_CLKOCR_CLKOUT0_REF_CLK (1 << 0) 166#define PRCM_CLKOCR_CLKOUT0_REF_CLK (1 << 0)
193#define PRCM_CLKOCR_CLKOUT0_MASK BITS(0, 13) 167#define PRCM_CLKOCR_CLKOUT0_MASK BITS(0, 13)
194#define PRCM_CLKOCR_CLKOUT1_REF_CLK (1 << 16) 168#define PRCM_CLKOCR_CLKOUT1_REF_CLK (1 << 16)
195#define PRCM_CLKOCR_CLKOUT1_MASK BITS(16, 29) 169#define PRCM_CLKOCR_CLKOUT1_MASK BITS(16, 29)
196 170
197/* ePOD and memory power signal control registers */ 171/* ePOD and memory power signal control registers */
198#define PRCM_EPOD_C_SET (_PRCMU_BASE + 0x410) 172#define PRCM_EPOD_C_SET (prcmu_base + 0x410)
199#define PRCM_SRAM_LS_SLEEP (_PRCMU_BASE + 0x304) 173#define PRCM_SRAM_LS_SLEEP (prcmu_base + 0x304)
200 174
201/* Debug power control unit registers */ 175/* Debug power control unit registers */
202#define PRCM_POWER_STATE_SET (_PRCMU_BASE + 0x254) 176#define PRCM_POWER_STATE_SET (prcmu_base + 0x254)
203 177
204/* Miscellaneous unit registers */ 178/* Miscellaneous unit registers */
205#define PRCM_DSI_SW_RESET (_PRCMU_BASE + 0x324) 179#define PRCM_DSI_SW_RESET (prcmu_base + 0x324)
206#define PRCM_GPIOCR (_PRCMU_BASE + 0x138) 180#define PRCM_GPIOCR (prcmu_base + 0x138)
207#define PRCM_GPIOCR_DBG_STM_MOD_CMD1 0x800 181#define PRCM_GPIOCR_DBG_STM_MOD_CMD1 0x800
208#define PRCM_GPIOCR_DBG_UARTMOD_CMD0 0x1 182#define PRCM_GPIOCR_DBG_UARTMOD_CMD0 0x1
209 183
210/* PRCMU HW semaphore */ 184/* PRCMU HW semaphore */
211#define PRCM_SEM (_PRCMU_BASE + 0x400) 185#define PRCM_SEM (prcmu_base + 0x400)
212#define PRCM_SEM_PRCM_SEM BIT(0) 186#define PRCM_SEM_PRCM_SEM BIT(0)
213 187
214#define PRCM_TCR (_PRCMU_BASE + 0x1C8) 188#define PRCM_TCR (prcmu_base + 0x1C8)
215#define PRCM_TCR_TENSEL_MASK BITS(0, 7) 189#define PRCM_TCR_TENSEL_MASK BITS(0, 7)
216#define PRCM_TCR_STOP_TIMERS BIT(16) 190#define PRCM_TCR_STOP_TIMERS BIT(16)
217#define PRCM_TCR_DOZE_MODE BIT(17) 191#define PRCM_TCR_DOZE_MODE BIT(17)
@@ -239,15 +213,15 @@
239/* GPIOCR register */ 213/* GPIOCR register */
240#define PRCM_GPIOCR_SPI2_SELECT BIT(23) 214#define PRCM_GPIOCR_SPI2_SELECT BIT(23)
241 215
242#define PRCM_DDR_SUBSYS_APE_MINBW (_PRCMU_BASE + 0x438) 216#define PRCM_DDR_SUBSYS_APE_MINBW (prcmu_base + 0x438)
243#define PRCM_CGATING_BYPASS (_PRCMU_BASE + 0x134) 217#define PRCM_CGATING_BYPASS (prcmu_base + 0x134)
244#define PRCM_CGATING_BYPASS_ICN2 BIT(6) 218#define PRCM_CGATING_BYPASS_ICN2 BIT(6)
245 219
246/* Miscellaneous unit registers */ 220/* Miscellaneous unit registers */
247#define PRCM_RESOUTN_SET (_PRCMU_BASE + 0x214) 221#define PRCM_RESOUTN_SET (prcmu_base + 0x214)
248#define PRCM_RESOUTN_CLR (_PRCMU_BASE + 0x218) 222#define PRCM_RESOUTN_CLR (prcmu_base + 0x218)
249 223
250/* System reset register */ 224/* System reset register */
251#define PRCM_APE_SOFTRST (_PRCMU_BASE + 0x228) 225#define PRCM_APE_SOFTRST (prcmu_base + 0x228)
252 226
253#endif /* __DB8500_PRCMU_REGS_H */ 227#endif /* __DB8500_PRCMU_REGS_H */
diff --git a/drivers/staging/ste_rmi4/Makefile b/drivers/staging/ste_rmi4/Makefile
index e4c03351420f..6cce2ed187ef 100644
--- a/drivers/staging/ste_rmi4/Makefile
+++ b/drivers/staging/ste_rmi4/Makefile
@@ -2,4 +2,3 @@
2# Makefile for the RMI4 touchscreen driver. 2# Makefile for the RMI4 touchscreen driver.
3# 3#
4obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4) += synaptics_i2c_rmi4.o 4obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4) += synaptics_i2c_rmi4.o
5obj-$(CONFIG_MACH_MOP500) += board-mop500-u8500uib-rmi4.o
diff --git a/drivers/staging/ste_rmi4/board-mop500-u8500uib-rmi4.c b/drivers/staging/ste_rmi4/board-mop500-u8500uib-rmi4.c
deleted file mode 100644
index 47439c3f7258..000000000000
--- a/drivers/staging/ste_rmi4/board-mop500-u8500uib-rmi4.c
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * Some platform data for the RMI4 touchscreen that will override the __weak
3 * platform data in the Ux500 machine if this driver is activated.
4 */
5#include <linux/i2c.h>
6#include <linux/gpio.h>
7#include <linux/interrupt.h>
8#include <mach/irqs.h>
9#include "synaptics_i2c_rmi4.h"
10
11/*
12 * Synaptics RMI4 touchscreen interface on the U8500 UIB
13 */
14
15/*
16 * Descriptor structure.
17 * Describes the number of i2c devices on the bus that speak RMI.
18 */
19static struct synaptics_rmi4_platform_data rmi4_i2c_dev_platformdata = {
20 .irq_number = NOMADIK_GPIO_TO_IRQ(84),
21 .irq_type = (IRQF_TRIGGER_FALLING | IRQF_SHARED),
22 .x_flip = false,
23 .y_flip = true,
24};
25
26struct i2c_board_info __initdata mop500_i2c3_devices_u8500[] = {
27 {
28 I2C_BOARD_INFO("synaptics_rmi4_i2c", 0x4B),
29 .platform_data = &rmi4_i2c_dev_platformdata,
30 },
31};
diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
index 6a21f67af086..2e3530736bc0 100644
--- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
+++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
@@ -864,6 +864,16 @@ static int synaptics_rmi4_i2c_query_device(struct synaptics_rmi4_data *pdata)
864 return 0; 864 return 0;
865} 865}
866 866
867/*
868 * Descriptor structure.
869 * Describes the number of i2c devices on the bus that speak RMI.
870 */
871static struct synaptics_rmi4_platform_data synaptics_rmi4_platformdata = {
872 .irq_type = (IRQF_TRIGGER_FALLING | IRQF_SHARED),
873 .x_flip = false,
874 .y_flip = true,
875};
876
867/** 877/**
868 * synaptics_rmi4_probe() - Initialze the i2c-client touchscreen driver 878 * synaptics_rmi4_probe() - Initialze the i2c-client touchscreen driver
869 * @i2c: i2c client structure pointer 879 * @i2c: i2c client structure pointer
@@ -890,10 +900,8 @@ static int synaptics_rmi4_probe
890 return -EIO; 900 return -EIO;
891 } 901 }
892 902
893 if (!platformdata) { 903 if (!platformdata)
894 dev_err(&client->dev, "%s: no platform data\n", __func__); 904 platformdata = &synaptics_rmi4_platformdata;
895 return -EINVAL;
896 }
897 905
898 /* Allocate and initialize the instance data for this client */ 906 /* Allocate and initialize the instance data for this client */
899 rmi4_data = kcalloc(2, sizeof(struct synaptics_rmi4_data), 907 rmi4_data = kcalloc(2, sizeof(struct synaptics_rmi4_data),
@@ -977,13 +985,13 @@ static int synaptics_rmi4_probe
977 synaptics_rmi4_i2c_block_read(rmi4_data, 985 synaptics_rmi4_i2c_block_read(rmi4_data,
978 rmi4_data->fn01_data_base_addr + 1, intr_status, 986 rmi4_data->fn01_data_base_addr + 1, intr_status,
979 rmi4_data->number_of_interrupt_register); 987 rmi4_data->number_of_interrupt_register);
980 retval = request_threaded_irq(platformdata->irq_number, NULL, 988 retval = request_threaded_irq(client->irq, NULL,
981 synaptics_rmi4_irq, 989 synaptics_rmi4_irq,
982 platformdata->irq_type, 990 platformdata->irq_type,
983 DRIVER_NAME, rmi4_data); 991 DRIVER_NAME, rmi4_data);
984 if (retval) { 992 if (retval) {
985 dev_err(&client->dev, "%s:Unable to get attn irq %d\n", 993 dev_err(&client->dev, "%s:Unable to get attn irq %d\n",
986 __func__, platformdata->irq_number); 994 __func__, client->irq);
987 goto err_query_dev; 995 goto err_query_dev;
988 } 996 }
989 997
@@ -996,7 +1004,7 @@ static int synaptics_rmi4_probe
996 return retval; 1004 return retval;
997 1005
998err_free_irq: 1006err_free_irq:
999 free_irq(platformdata->irq_number, rmi4_data); 1007 free_irq(client->irq, rmi4_data);
1000err_query_dev: 1008err_query_dev:
1001 regulator_disable(rmi4_data->regulator); 1009 regulator_disable(rmi4_data->regulator);
1002err_regulator_enable: 1010err_regulator_enable:
@@ -1019,11 +1027,10 @@ err_input:
1019static int synaptics_rmi4_remove(struct i2c_client *client) 1027static int synaptics_rmi4_remove(struct i2c_client *client)
1020{ 1028{
1021 struct synaptics_rmi4_data *rmi4_data = i2c_get_clientdata(client); 1029 struct synaptics_rmi4_data *rmi4_data = i2c_get_clientdata(client);
1022 const struct synaptics_rmi4_platform_data *pdata = rmi4_data->board;
1023 1030
1024 rmi4_data->touch_stopped = true; 1031 rmi4_data->touch_stopped = true;
1025 wake_up(&rmi4_data->wait); 1032 wake_up(&rmi4_data->wait);
1026 free_irq(pdata->irq_number, rmi4_data); 1033 free_irq(client->irq, rmi4_data);
1027 input_unregister_device(rmi4_data->input_dev); 1034 input_unregister_device(rmi4_data->input_dev);
1028 regulator_disable(rmi4_data->regulator); 1035 regulator_disable(rmi4_data->regulator);
1029 regulator_put(rmi4_data->regulator); 1036 regulator_put(rmi4_data->regulator);
@@ -1046,10 +1053,9 @@ static int synaptics_rmi4_suspend(struct device *dev)
1046 int retval; 1053 int retval;
1047 unsigned char intr_status; 1054 unsigned char intr_status;
1048 struct synaptics_rmi4_data *rmi4_data = dev_get_drvdata(dev); 1055 struct synaptics_rmi4_data *rmi4_data = dev_get_drvdata(dev);
1049 const struct synaptics_rmi4_platform_data *pdata = rmi4_data->board;
1050 1056
1051 rmi4_data->touch_stopped = true; 1057 rmi4_data->touch_stopped = true;
1052 disable_irq(pdata->irq_number); 1058 disable_irq(rmi4_data->i2c_client->irq);
1053 1059
1054 retval = synaptics_rmi4_i2c_block_read(rmi4_data, 1060 retval = synaptics_rmi4_i2c_block_read(rmi4_data,
1055 rmi4_data->fn01_data_base_addr + 1, 1061 rmi4_data->fn01_data_base_addr + 1,
@@ -1080,11 +1086,10 @@ static int synaptics_rmi4_resume(struct device *dev)
1080 int retval; 1086 int retval;
1081 unsigned char intr_status; 1087 unsigned char intr_status;
1082 struct synaptics_rmi4_data *rmi4_data = dev_get_drvdata(dev); 1088 struct synaptics_rmi4_data *rmi4_data = dev_get_drvdata(dev);
1083 const struct synaptics_rmi4_platform_data *pdata = rmi4_data->board;
1084 1089
1085 regulator_enable(rmi4_data->regulator); 1090 regulator_enable(rmi4_data->regulator);
1086 1091
1087 enable_irq(pdata->irq_number); 1092 enable_irq(rmi4_data->i2c_client->irq);
1088 rmi4_data->touch_stopped = false; 1093 rmi4_data->touch_stopped = false;
1089 1094
1090 retval = synaptics_rmi4_i2c_block_read(rmi4_data, 1095 retval = synaptics_rmi4_i2c_block_read(rmi4_data,
diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.h b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.h
index 384436ef8068..8c9166ba71c7 100644
--- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.h
+++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.h
@@ -38,7 +38,6 @@
38 * This structure gives platform data for rmi4. 38 * This structure gives platform data for rmi4.
39 */ 39 */
40struct synaptics_rmi4_platform_data { 40struct synaptics_rmi4_platform_data {
41 int irq_number;
42 int irq_type; 41 int irq_type;
43 bool x_flip; 42 bool x_flip;
44 bool y_flip; 43 bool y_flip;
diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
index 77a46ae2fc17..0bd69446bb05 100644
--- a/include/linux/mfd/db8500-prcmu.h
+++ b/include/linux/mfd/db8500-prcmu.h
@@ -489,7 +489,7 @@ struct prcmu_auto_pm_config {
489 489
490#ifdef CONFIG_MFD_DB8500_PRCMU 490#ifdef CONFIG_MFD_DB8500_PRCMU
491 491
492void db8500_prcmu_early_init(void); 492void db8500_prcmu_early_init(u32 phy_base, u32 size);
493int prcmu_set_rc_a2p(enum romcode_write); 493int prcmu_set_rc_a2p(enum romcode_write);
494enum romcode_read prcmu_get_rc_p2a(void); 494enum romcode_read prcmu_get_rc_p2a(void);
495enum ap_pwrst prcmu_get_xp70_current_state(void); 495enum ap_pwrst prcmu_get_xp70_current_state(void);
@@ -522,12 +522,6 @@ int db8500_prcmu_load_a9wdog(u8 id, u32 val);
522void db8500_prcmu_system_reset(u16 reset_code); 522void db8500_prcmu_system_reset(u16 reset_code);
523int db8500_prcmu_set_power_state(u8 state, bool keep_ulp_clk, bool keep_ap_pll); 523int db8500_prcmu_set_power_state(u8 state, bool keep_ulp_clk, bool keep_ap_pll);
524u8 db8500_prcmu_get_power_state_result(void); 524u8 db8500_prcmu_get_power_state_result(void);
525int db8500_prcmu_gic_decouple(void);
526int db8500_prcmu_gic_recouple(void);
527int db8500_prcmu_copy_gic_settings(void);
528bool db8500_prcmu_gic_pending_irq(void);
529bool db8500_prcmu_pending_irq(void);
530bool db8500_prcmu_is_cpu_in_wfi(int cpu);
531void db8500_prcmu_enable_wakeups(u32 wakeups); 525void db8500_prcmu_enable_wakeups(u32 wakeups);
532int db8500_prcmu_set_epod(u16 epod_id, u8 epod_state); 526int db8500_prcmu_set_epod(u16 epod_id, u8 epod_state);
533int db8500_prcmu_request_clock(u8 clock, bool enable); 527int db8500_prcmu_request_clock(u8 clock, bool enable);
@@ -553,7 +547,7 @@ void db8500_prcmu_write_masked(unsigned int reg, u32 mask, u32 value);
553 547
554#else /* !CONFIG_MFD_DB8500_PRCMU */ 548#else /* !CONFIG_MFD_DB8500_PRCMU */
555 549
556static inline void db8500_prcmu_early_init(void) {} 550static inline void db8500_prcmu_early_init(u32 phy_base, u32 size) {}
557 551
558static inline int prcmu_set_rc_a2p(enum romcode_write code) 552static inline int prcmu_set_rc_a2p(enum romcode_write code)
559{ 553{
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h
index 3abcca91eecd..689e6a0d9c99 100644
--- a/include/linux/mfd/dbx500-prcmu.h
+++ b/include/linux/mfd/dbx500-prcmu.h
@@ -237,6 +237,8 @@ struct prcmu_pdata
237 bool enable_set_ddr_opp; 237 bool enable_set_ddr_opp;
238 bool enable_ape_opp_100_voltage; 238 bool enable_ape_opp_100_voltage;
239 struct ab8500_platform_data *ab_platdata; 239 struct ab8500_platform_data *ab_platdata;
240 int ab_irq;
241 int irq_base;
240 u32 version_offset; 242 u32 version_offset;
241 u32 legacy_offset; 243 u32 legacy_offset;
242 u32 adt_offset; 244 u32 adt_offset;
@@ -276,9 +278,9 @@ struct prcmu_fw_version {
276 278
277#if defined(CONFIG_UX500_SOC_DB8500) 279#if defined(CONFIG_UX500_SOC_DB8500)
278 280
279static inline void __init prcmu_early_init(void) 281static inline void prcmu_early_init(u32 phy_base, u32 size)
280{ 282{
281 return db8500_prcmu_early_init(); 283 return db8500_prcmu_early_init(phy_base, size);
282} 284}
283 285
284static inline int prcmu_set_power_state(u8 state, bool keep_ulp_clk, 286static inline int prcmu_set_power_state(u8 state, bool keep_ulp_clk,
@@ -293,36 +295,6 @@ static inline u8 prcmu_get_power_state_result(void)
293 return db8500_prcmu_get_power_state_result(); 295 return db8500_prcmu_get_power_state_result();
294} 296}
295 297
296static inline int prcmu_gic_decouple(void)
297{
298 return db8500_prcmu_gic_decouple();
299}
300
301static inline int prcmu_gic_recouple(void)
302{
303 return db8500_prcmu_gic_recouple();
304}
305
306static inline bool prcmu_gic_pending_irq(void)
307{
308 return db8500_prcmu_gic_pending_irq();
309}
310
311static inline bool prcmu_is_cpu_in_wfi(int cpu)
312{
313 return db8500_prcmu_is_cpu_in_wfi(cpu);
314}
315
316static inline int prcmu_copy_gic_settings(void)
317{
318 return db8500_prcmu_copy_gic_settings();
319}
320
321static inline bool prcmu_pending_irq(void)
322{
323 return db8500_prcmu_pending_irq();
324}
325
326static inline int prcmu_set_epod(u16 epod_id, u8 epod_state) 298static inline int prcmu_set_epod(u16 epod_id, u8 epod_state)
327{ 299{
328 return db8500_prcmu_set_epod(epod_id, epod_state); 300 return db8500_prcmu_set_epod(epod_id, epod_state);
@@ -500,7 +472,7 @@ static inline int prcmu_config_a9wdog(u8 num, bool sleep_auto_off)
500} 472}
501#else 473#else
502 474
503static inline void __init prcmu_early_init(void) {} 475static inline void prcmu_early_init(u32 phy_base, u32 size) {}
504 476
505static inline int prcmu_set_power_state(u8 state, bool keep_ulp_clk, 477static inline int prcmu_set_power_state(u8 state, bool keep_ulp_clk,
506 bool keep_ap_pll) 478 bool keep_ap_pll)
diff --git a/include/linux/platform_data/arm-ux500-pm.h b/include/linux/platform_data/arm-ux500-pm.h
new file mode 100644
index 000000000000..8dff64b29ec0
--- /dev/null
+++ b/include/linux/platform_data/arm-ux500-pm.h
@@ -0,0 +1,21 @@
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#ifndef ARM_UX500_PM_H
11#define ARM_UX500_PM_H
12
13int prcmu_gic_decouple(void);
14int prcmu_gic_recouple(void);
15bool prcmu_gic_pending_irq(void);
16bool prcmu_pending_irq(void);
17bool prcmu_is_cpu_in_wfi(int cpu);
18int prcmu_copy_gic_settings(void);
19void ux500_pm_init(u32 phy_base, u32 size);
20
21#endif /* ARM_UX500_PM_H */
diff --git a/arch/arm/mach-ux500/include/mach/msp.h b/include/linux/platform_data/asoc-ux500-msp.h
index 9991aea3d577..9991aea3d577 100644
--- a/arch/arm/mach-ux500/include/mach/msp.h
+++ b/include/linux/platform_data/asoc-ux500-msp.h
diff --git a/include/linux/platform_data/clk-ux500.h b/include/linux/platform_data/clk-ux500.h
index 3af0da1f3be5..320d9c39ea0a 100644
--- a/include/linux/platform_data/clk-ux500.h
+++ b/include/linux/platform_data/clk-ux500.h
@@ -10,7 +10,8 @@
10#ifndef __CLK_UX500_H 10#ifndef __CLK_UX500_H
11#define __CLK_UX500_H 11#define __CLK_UX500_H
12 12
13void u8500_clk_init(void); 13void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
14 u32 clkrst5_base, u32 clkrst6_base);
14void u9540_clk_init(void); 15void u9540_clk_init(void);
15void u8540_clk_init(void); 16void u8540_clk_init(void);
16 17
diff --git a/sound/soc/ux500/mop500_ab8500.c b/sound/soc/ux500/mop500_ab8500.c
index 78cce236693e..892ad9a05c9f 100644
--- a/sound/soc/ux500/mop500_ab8500.c
+++ b/sound/soc/ux500/mop500_ab8500.c
@@ -17,8 +17,6 @@
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/clk.h> 18#include <linux/clk.h>
19 19
20#include <mach/hardware.h>
21
22#include <sound/soc.h> 20#include <sound/soc.h>
23#include <sound/soc-dapm.h> 21#include <sound/soc-dapm.h>
24#include <sound/pcm.h> 22#include <sound/pcm.h>
diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c
index 94a3e5705aaa..54028cf76511 100644
--- a/sound/soc/ux500/ux500_msp_dai.c
+++ b/sound/soc/ux500/ux500_msp_dai.c
@@ -19,9 +19,7 @@
19#include <linux/clk.h> 19#include <linux/clk.h>
20#include <linux/regulator/consumer.h> 20#include <linux/regulator/consumer.h>
21#include <linux/mfd/dbx500-prcmu.h> 21#include <linux/mfd/dbx500-prcmu.h>
22 22#include <linux/platform_data/asoc-ux500-msp.h>
23#include <mach/hardware.h>
24#include <mach/msp.h>
25 23
26#include <sound/soc.h> 24#include <sound/soc.h>
27#include <sound/soc-dai.h> 25#include <sound/soc-dai.h>
diff --git a/sound/soc/ux500/ux500_msp_i2s.c b/sound/soc/ux500/ux500_msp_i2s.c
index a26c6bf0a29b..f2db6c90a9e2 100644
--- a/sound/soc/ux500/ux500_msp_i2s.c
+++ b/sound/soc/ux500/ux500_msp_i2s.c
@@ -20,9 +20,7 @@
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/of.h> 22#include <linux/of.h>
23 23#include <linux/platform_data/asoc-ux500-msp.h>
24#include <mach/hardware.h>
25#include <mach/msp.h>
26 24
27#include <sound/soc.h> 25#include <sound/soc.h>
28 26
diff --git a/sound/soc/ux500/ux500_msp_i2s.h b/sound/soc/ux500/ux500_msp_i2s.h
index 1311c0df7628..437f0c032c58 100644
--- a/sound/soc/ux500/ux500_msp_i2s.h
+++ b/sound/soc/ux500/ux500_msp_i2s.h
@@ -17,8 +17,6 @@
17 17
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19 19
20#include <mach/msp.h>
21
22#define MSP_INPUT_FREQ_APB 48000000 20#define MSP_INPUT_FREQ_APB 48000000
23 21
24/*** Stereo mode. Used for APB data accesses as 16 bits accesses (mono), 22/*** Stereo mode. Used for APB data accesses as 16 bits accesses (mono),