diff options
33 files changed, 4755 insertions, 707 deletions
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index 58626013aa32..54429d015954 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig | |||
| @@ -12,9 +12,12 @@ menu "Ux500 SoC" | |||
| 12 | 12 | ||
| 13 | config UX500_SOC_DB5500 | 13 | config UX500_SOC_DB5500 |
| 14 | bool "DB5500" | 14 | bool "DB5500" |
| 15 | select MFD_DB5500_PRCMU | ||
| 15 | 16 | ||
| 16 | config UX500_SOC_DB8500 | 17 | config UX500_SOC_DB8500 |
| 17 | bool "DB8500" | 18 | bool "DB8500" |
| 19 | select MFD_DB8500_PRCMU | ||
| 20 | select REGULATOR_DB8500_PRCMU | ||
| 18 | 21 | ||
| 19 | endmenu | 22 | endmenu |
| 20 | 23 | ||
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile index b549a8fb4231..1694916e6822 100644 --- a/arch/arm/mach-ux500/Makefile +++ b/arch/arm/mach-ux500/Makefile | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | obj-y := clock.o cpu.o devices.o devices-common.o \ | 5 | obj-y := clock.o cpu.o devices.o devices-common.o \ |
| 6 | id.o usb.o | 6 | id.o usb.o |
| 7 | obj-$(CONFIG_UX500_SOC_DB5500) += cpu-db5500.o dma-db5500.o | 7 | obj-$(CONFIG_UX500_SOC_DB5500) += cpu-db5500.o dma-db5500.o |
| 8 | obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o prcmu.o | 8 | obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o |
| 9 | obj-$(CONFIG_MACH_U8500) += board-mop500.o board-mop500-sdi.o \ | 9 | obj-$(CONFIG_MACH_U8500) += board-mop500.o board-mop500-sdi.o \ |
| 10 | board-mop500-regulators.o \ | 10 | board-mop500-regulators.o \ |
| 11 | board-mop500-uib.o board-mop500-stuib.o \ | 11 | board-mop500-uib.o board-mop500-stuib.o \ |
| @@ -17,4 +17,4 @@ obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | |||
| 17 | obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o | 17 | obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o |
| 18 | obj-$(CONFIG_U5500_MODEM_IRQ) += modem-irq-db5500.o | 18 | obj-$(CONFIG_U5500_MODEM_IRQ) += modem-irq-db5500.o |
| 19 | obj-$(CONFIG_U5500_MBOX) += mbox-db5500.o | 19 | obj-$(CONFIG_U5500_MBOX) += mbox-db5500.o |
| 20 | obj-$(CONFIG_CPU_FREQ) += cpufreq.o | 20 | |
diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c index c9dc2eff3cb2..c01bc19e3c5e 100644 --- a/arch/arm/mach-ux500/cpu-db5500.c +++ b/arch/arm/mach-ux500/cpu-db5500.c | |||
| @@ -188,6 +188,8 @@ void __init u5500_map_io(void) | |||
| 188 | ux500_map_io(); | 188 | ux500_map_io(); |
| 189 | 189 | ||
| 190 | iotable_init(u5500_io_desc, ARRAY_SIZE(u5500_io_desc)); | 190 | iotable_init(u5500_io_desc, ARRAY_SIZE(u5500_io_desc)); |
| 191 | |||
| 192 | _PRCMU_BASE = __io_address(U5500_PRCMU_BASE); | ||
| 191 | } | 193 | } |
| 192 | 194 | ||
| 193 | static int usb_db5500_rx_dma_cfg[] = { | 195 | static int usb_db5500_rx_dma_cfg[] = { |
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 516126cb357d..c3c417656bd9 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
| @@ -87,6 +87,8 @@ void __init u8500_map_io(void) | |||
| 87 | iotable_init(u8500_v1_io_desc, ARRAY_SIZE(u8500_v1_io_desc)); | 87 | iotable_init(u8500_v1_io_desc, ARRAY_SIZE(u8500_v1_io_desc)); |
| 88 | else if (cpu_is_u8500v2()) | 88 | else if (cpu_is_u8500v2()) |
| 89 | iotable_init(u8500_v2_io_desc, ARRAY_SIZE(u8500_v2_io_desc)); | 89 | iotable_init(u8500_v2_io_desc, ARRAY_SIZE(u8500_v2_io_desc)); |
| 90 | |||
| 91 | _PRCMU_BASE = __io_address(U8500_PRCMU_BASE); | ||
| 90 | } | 92 | } |
| 91 | 93 | ||
| 92 | static struct resource db8500_pmu_resources[] = { | 94 | static struct resource db8500_pmu_resources[] = { |
| @@ -129,9 +131,14 @@ static struct platform_device db8500_pmu_device = { | |||
| 129 | .dev.platform_data = &db8500_pmu_platdata, | 131 | .dev.platform_data = &db8500_pmu_platdata, |
| 130 | }; | 132 | }; |
| 131 | 133 | ||
| 134 | static struct platform_device db8500_prcmu_device = { | ||
| 135 | .name = "db8500-prcmu", | ||
| 136 | }; | ||
| 137 | |||
| 132 | static struct platform_device *platform_devs[] __initdata = { | 138 | static struct platform_device *platform_devs[] __initdata = { |
| 133 | &u8500_dma40_device, | 139 | &u8500_dma40_device, |
| 134 | &db8500_pmu_device, | 140 | &db8500_pmu_device, |
| 141 | &db8500_prcmu_device, | ||
| 135 | }; | 142 | }; |
| 136 | 143 | ||
| 137 | static resource_size_t __initdata db8500_gpio_base[] = { | 144 | static resource_size_t __initdata db8500_gpio_base[] = { |
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 5a43107c6232..1da23bb87c16 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
| @@ -8,6 +8,8 @@ | |||
| 8 | #include <linux/platform_device.h> | 8 | #include <linux/platform_device.h> |
| 9 | #include <linux/io.h> | 9 | #include <linux/io.h> |
| 10 | #include <linux/clk.h> | 10 | #include <linux/clk.h> |
| 11 | #include <linux/mfd/db8500-prcmu.h> | ||
| 12 | #include <linux/mfd/db5500-prcmu.h> | ||
| 11 | 13 | ||
| 12 | #include <asm/cacheflush.h> | 14 | #include <asm/cacheflush.h> |
| 13 | #include <asm/hardware/cache-l2x0.h> | 15 | #include <asm/hardware/cache-l2x0.h> |
| @@ -19,10 +21,11 @@ | |||
| 19 | #include <mach/hardware.h> | 21 | #include <mach/hardware.h> |
| 20 | #include <mach/setup.h> | 22 | #include <mach/setup.h> |
| 21 | #include <mach/devices.h> | 23 | #include <mach/devices.h> |
| 22 | #include <mach/prcmu.h> | ||
| 23 | 24 | ||
| 24 | #include "clock.h" | 25 | #include "clock.h" |
| 25 | 26 | ||
| 27 | void __iomem *_PRCMU_BASE; | ||
| 28 | |||
| 26 | #ifdef CONFIG_CACHE_L2X0 | 29 | #ifdef CONFIG_CACHE_L2X0 |
| 27 | static void __iomem *l2x0_base; | 30 | static void __iomem *l2x0_base; |
| 28 | #endif | 31 | #endif |
| @@ -47,6 +50,8 @@ void __init ux500_init_irq(void) | |||
| 47 | * Init clocks here so that they are available for system timer | 50 | * Init clocks here so that they are available for system timer |
| 48 | * initialization. | 51 | * initialization. |
| 49 | */ | 52 | */ |
| 53 | if (cpu_is_u5500()) | ||
| 54 | db5500_prcmu_early_init(); | ||
| 50 | if (cpu_is_u8500()) | 55 | if (cpu_is_u8500()) |
| 51 | prcmu_early_init(); | 56 | prcmu_early_init(); |
| 52 | clk_init(); | 57 | clk_init(); |
diff --git a/arch/arm/mach-ux500/cpufreq.c b/arch/arm/mach-ux500/cpufreq.c deleted file mode 100644 index 5c5b747f134d..000000000000 --- a/arch/arm/mach-ux500/cpufreq.c +++ /dev/null | |||
| @@ -1,211 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * CPU frequency scaling for u8500 | ||
| 3 | * Inspired by linux/arch/arm/mach-davinci/cpufreq.c | ||
| 4 | * | ||
| 5 | * Copyright (C) STMicroelectronics 2009 | ||
| 6 | * Copyright (C) ST-Ericsson SA 2010 | ||
| 7 | * | ||
| 8 | * License Terms: GNU General Public License v2 | ||
| 9 | * | ||
| 10 | * Author: Sundar Iyer <sundar.iyer@stericsson.com> | ||
| 11 | * Author: Martin Persson <martin.persson@stericsson.com> | ||
| 12 | * Author: Jonas Aaberg <jonas.aberg@stericsson.com> | ||
| 13 | * | ||
| 14 | */ | ||
| 15 | |||
| 16 | #include <linux/platform_device.h> | ||
| 17 | #include <linux/kernel.h> | ||
| 18 | #include <linux/cpufreq.h> | ||
| 19 | #include <linux/delay.h> | ||
| 20 | |||
| 21 | #include <mach/hardware.h> | ||
| 22 | #include <mach/prcmu.h> | ||
| 23 | #include <mach/prcmu-defs.h> | ||
| 24 | |||
| 25 | #define DRIVER_NAME "cpufreq-u8500" | ||
| 26 | #define CPUFREQ_NAME "u8500" | ||
| 27 | |||
| 28 | static struct device *dev; | ||
| 29 | |||
| 30 | static struct cpufreq_frequency_table freq_table[] = { | ||
| 31 | [0] = { | ||
| 32 | .index = 0, | ||
| 33 | .frequency = 200000, | ||
| 34 | }, | ||
