diff options
| author | Samuel Ortiz <sameo@linux.intel.com> | 2013-04-08 10:36:52 -0400 |
|---|---|---|
| committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-04-08 10:36:52 -0400 |
| commit | 7aa3d7c8d5ca941e70183b8a7c980beff6edf534 (patch) | |
| tree | 1052bc9fce8bbbdc7fca47d814fce788f1c20440 | |
| parent | 8059c1c6be45973ea72342567a6ede5f4f0bf8e7 (diff) | |
| parent | 55b175d7e6327939df82592ef279c534da323354 (diff) | |
Merge tag 'ux500-multiplatform-mfd' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson
MFD portions of the ux500 multiplatform branch.
A second tag for the ARM SoC tree will build upon
this one. This mainly removes the header file
dependencies from the PRCMU driver in the MFD
subsystem, and moves the PM functions to the
machine.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| -rw-r--r-- | arch/arm/mach-ux500/Makefile | 2 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 58 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/cpu-db8500.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/cpu.c | 21 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/cpuidle.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/devices-db8500.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/include/mach/hardware.h | 2 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/include/mach/irqs-db8500.h | 25 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/pm.c | 167 | ||||
| -rw-r--r-- | drivers/mfd/db8500-prcmu.c | 316 | ||||
| -rw-r--r-- | drivers/mfd/dbx500-prcmu-regs.h | 204 | ||||
| -rw-r--r-- | include/linux/mfd/db8500-prcmu.h | 10 | ||||
| -rw-r--r-- | include/linux/mfd/dbx500-prcmu.h | 38 | ||||
| -rw-r--r-- | include/linux/platform_data/arm-ux500-pm.h | 21 |
14 files changed, 454 insertions, 417 deletions
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile index f24710dfc395..580a4db9e97d 100644 --- a/arch/arm/mach-ux500/Makefile +++ b/arch/arm/mach-ux500/Makefile | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | obj-y := cpu.o devices.o devices-common.o \ | 5 | obj-y := cpu.o devices.o devices-common.o \ |
| 6 | id.o usb.o timer.o | 6 | id.o usb.o timer.o pm.o |
| 7 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | 7 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o |
| 8 | obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o | 8 | obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o |
| 9 | obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o | 9 | obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index b03457881c4b..fe3d72cc341c 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
| @@ -206,63 +206,6 @@ struct ab8500_platform_data ab8500_platdata = { | |||
| 206 | .codec = &ab8500_codec_pdata, | 206 | .codec = &ab8500_codec_pdata, |
| 207 | }; | 207 | }; |
| 208 | 208 | ||
| 209 | /* | ||
| 210 | * Thermal Sensor | ||
| 211 | */ | ||
| 212 | |||
| 213 | static struct resource db8500_thsens_resources[] = { | ||
| 214 | { | ||
| 215 | .name = "IRQ_HOTMON_LOW", | ||
| 216 | .start = IRQ_PRCMU_HOTMON_LOW, | ||
| 217 | .end = IRQ_PRCMU_HOTMON_LOW, | ||
| 218 | .flags = IORESOURCE_IRQ, | ||
| 219 | }, | ||
| 220 | { | ||
| 221 | .name = "IRQ_HOTMON_HIGH", | ||
| 222 | .start = IRQ_PRCMU_HOTMON_HIGH, | ||
| 223 | .end = IRQ_PRCMU_HOTMON_HIGH, | ||
| 224 | .flags = IORESOURCE_IRQ, | ||
| 225 | }, | ||
| 226 | }; | ||
| 227 | |||
| 228 | static struct db8500_thsens_platform_data db8500_thsens_data = { | ||
| 229 | .trip_points[0] = { | ||
| 230 | .temp = 70000, | ||
| 231 | .type = THERMAL_TRIP_ACTIVE, | ||
| 232 | .cdev_name = { | ||
| 233 | [0] = "thermal-cpufreq-0", | ||
| 234 | }, | ||
| 235 | }, | ||
| 236 | .trip_points[1] = { | ||
| 237 | .temp = 75000, | ||
| 238 | .type = THERMAL_TRIP_ACTIVE, | ||
| 239 | .cdev_name = { | ||
| 240 | [0] = "thermal-cpufreq-0", | ||
| 241 | }, | ||
| 242 | }, | ||
| 243 | .trip_points[2] = { | ||
| 244 | .temp = 80000, | ||
| 245 | .type = THERMAL_TRIP_ACTIVE, | ||
| 246 | .cdev_name = { | ||
| 247 | [0] = "thermal-cpufreq-0", | ||
| 248 | }, | ||
| 249 | }, | ||
| 250 | .trip_points[3] = { | ||
| 251 | .temp = 85000, | ||
| 252 | .type = THERMAL_TRIP_CRITICAL, | ||
| 253 | }, | ||
| 254 | .num_trips = 4, | ||
| 255 | }; | ||
| 256 | |||
| 257 | static struct platform_device u8500_thsens_device = { | ||
| 258 | .name = "db8500-thermal", | ||
| 259 | .resource = db8500_thsens_resources, | ||
| 260 | .num_resources = ARRAY_SIZE(db8500_thsens_resources), | ||
| 261 | .dev = { | ||
| 262 | .platform_data = &db8500_thsens_data, | ||
| 263 | }, | ||
| 264 | }; | ||
| 265 | |||
| 266 | static struct platform_device u8500_cpufreq_cooling_device = { | 209 | static struct platform_device u8500_cpufreq_cooling_device = { |
| 267 | .name = "db8500-cpufreq-cooling", | 210 | .name = "db8500-cpufreq-cooling", |
| 268 | }; | 211 | }; |
| @@ -622,7 +565,6 @@ static struct platform_device *snowball_platform_devs[] __initdata = { | |||
| 622 | &snowball_key_dev, | 565 | &snowball_key_dev, |
| 623 | &snowball_sbnet_dev, | 566 | &snowball_sbnet_dev, |
| 624 | &snowball_gpio_en_3v3_regulator_dev, | 567 | &snowball_gpio_en_3v3_regulator_dev, |
| 625 | &u8500_thsens_device, | ||
| 626 | &u8500_cpufreq_cooling_device, | 568 | &u8500_cpufreq_cooling_device, |
| 627 | }; | 569 | }; |
| 628 | 570 | ||
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 19235cf7bbe3..8c58dffe52d5 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
| @@ -94,8 +94,6 @@ void __init u8500_map_io(void) | |||
| 94 | iotable_init(u9540_io_desc, ARRAY_SIZE(u9540_io_desc)); | 94 | iotable_init(u9540_io_desc, ARRAY_SIZE(u9540_io_desc)); |
| 95 | else | 95 | else |
| 96 | iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc)); | 96 | iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc)); |
| 97 | |||
| 98 | _PRCMU_BASE = __io_address(U8500_PRCMU_BASE); | ||
| 99 | } | 97 | } |
| 100 | 98 | ||
| 101 | static struct resource db8500_pmu_resources[] = { | 99 | static struct resource db8500_pmu_resources[] = { |
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 537870d3fea8..2c5c48baa3eb 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,6 +20,7 @@ | |||
| 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 | ||
| @@ -30,8 +31,6 @@ | |||
| 30 | #include "board-mop500.h" | 31 | #include "board-mop500.h" |
| 31 | #include "id.h" | 32 | #include "id.h" |
| 32 | 33 | ||
| 33 | void __iomem *_PRCMU_BASE; | ||
| 34 | |||
| 35 | /* | 34 | /* |
| 36 | * FIXME: Should we set up the GPIO domain here? | 35 | * FIXME: Should we set up the GPIO domain here? |
| 37 | * | 36 | * |
| @@ -68,13 +67,19 @@ 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()) | ||
| 75 | u8500_clk_init(); | 73 | u8500_clk_init(); |
| 76 | else if (cpu_is_u8540()) | 74 | } else if (cpu_is_u9540()) { |
| 75 | prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1); | ||
| 76 | ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1); | ||
| 77 | u8500_clk_init(); | ||
| 78 | } else if (cpu_is_u8540()) { | ||
| 79 | prcmu_early_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1); | ||
| 80 | ux500_pm_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1); | ||
| 77 | u8540_clk_init(); | 81 | u8540_clk_init(); |
| 82 | } | ||
| 78 | } | 83 | } |
| 79 | 84 | ||
| 80 | void __init ux500_init_late(void) | 85 | void __init ux500_init_late(void) |
diff --git a/arch/arm/mach-ux500/cpuidle.c b/arch/arm/mach-ux500/cpuidle.c index ce9149302cc3..1e5bb6640f56 100644 --- a/arch/arm/mach-ux500/cpuidle.c +++ b/arch/arm/mach-ux500/cpuidle.c | |||
| @@ -16,6 +16,7 @@ | |||
| 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> |
| @@ -130,7 +131,7 @@ int __init ux500_idle_init(void) | |||
| 130 | int ret, cpu; | 131 | int ret, cpu; |
| 131 | struct cpuidle_device *device; | 132 | struct cpuidle_device *device; |
| 132 | 133 | ||
| 133 | /* Configure wake up reasons */ | 134 | /* Configure wake up reasons */ |
| 134 | prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) | | 135 | prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) | |
