diff options
-rw-r--r-- | arch/arm/mach-ux500/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-ux500/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-ux500/cpu.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ux500/cpufreq.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/prcmu-defs.h | 30 | ||||
-rw-r--r-- | drivers/mfd/Kconfig | 12 | ||||
-rw-r--r-- | drivers/mfd/Makefile | 4 | ||||
-rw-r--r-- | drivers/mfd/ab8500-i2c.c | 3 | ||||
-rw-r--r-- | drivers/mfd/db8500-prcmu-regs.h (renamed from arch/arm/mach-ux500/include/mach/prcmu-regs.h) | 0 | ||||
-rw-r--r-- | drivers/mfd/db8500-prcmu.c (renamed from arch/arm/mach-ux500/prcmu-db8500.c) | 5 | ||||
-rw-r--r-- | include/linux/mfd/db8500-prcmu.h (renamed from arch/arm/mach-ux500/include/mach/prcmu.h) | 34 |
11 files changed, 54 insertions, 42 deletions
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index 58626013aa32..8071d2746f70 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig | |||
@@ -15,6 +15,7 @@ config UX500_SOC_DB5500 | |||
15 | 15 | ||
16 | config UX500_SOC_DB8500 | 16 | config UX500_SOC_DB8500 |
17 | bool "DB8500" | 17 | bool "DB8500" |
18 | select MFD_DB8500_PRCMU | ||
18 | 19 | ||
19 | endmenu | 20 | endmenu |
20 | 21 | ||
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile index 2a08a10e09da..7a1d43e04f97 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-db8500.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 \ |
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 0190e0e68b4d..11360f734cec 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
@@ -8,6 +8,7 @@ | |||
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> | ||
11 | 12 | ||
12 | #include <asm/cacheflush.h> | 13 | #include <asm/cacheflush.h> |
13 | #include <asm/hardware/cache-l2x0.h> | 14 | #include <asm/hardware/cache-l2x0.h> |
@@ -19,7 +20,6 @@ | |||
19 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
20 | #include <mach/setup.h> | 21 | #include <mach/setup.h> |
21 | #include <mach/devices.h> | 22 | #include <mach/devices.h> |
22 | #include <mach/prcmu.h> | ||
23 | 23 | ||
24 | #include "clock.h" | 24 | #include "clock.h" |
25 | 25 | ||
diff --git a/arch/arm/mach-ux500/cpufreq.c b/arch/arm/mach-ux500/cpufreq.c index 5c5b747f134d..d196939fcdb9 100644 --- a/arch/arm/mach-ux500/cpufreq.c +++ b/arch/arm/mach-ux500/cpufreq.c | |||
@@ -17,10 +17,9 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/cpufreq.h> | 18 | #include <linux/cpufreq.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/mfd/db8500-prcmu.h> | ||
20 | 21 | ||
21 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
22 | #include <mach/prcmu.h> | ||
23 | #include <mach/prcmu-defs.h> | ||
24 | 23 | ||
25 | #define DRIVER_NAME "cpufreq-u8500" | 24 | #define DRIVER_NAME "cpufreq-u8500" |
26 | #define CPUFREQ_NAME "u8500" | 25 | #define CPUFREQ_NAME "u8500" |
diff --git a/arch/arm/mach-ux500/include/mach/prcmu-defs.h b/arch/arm/mach-ux500/include/mach/prcmu-defs.h deleted file mode 100644 index 848ba64b561f..000000000000 --- a/arch/arm/mach-ux500/include/mach/prcmu-defs.h +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) STMicroelectronics 2009 | ||
3 | * Copyright (C) ST-Ericsson SA 2010 | ||
4 | * | ||
5 | * Author: Sundar Iyer <sundar.iyer@stericsson.com> | ||
6 | * Author: Martin Persson <martin.persson@stericsson.com> | ||
7 | * | ||
8 | * License Terms: GNU General Public License v2 | ||
9 | * | ||
10 | * PRCM Unit definitions | ||
11 | */ | ||
12 | |||
13 | #ifndef __MACH_PRCMU_DEFS_H | ||
14 | #define __MACH_PRCMU_DEFS_H | ||
15 | |||
16 | enum prcmu_cpu_opp { | ||
17 | CPU_OPP_INIT = 0x00, | ||
18 | CPU_OPP_NO_CHANGE = 0x01, | ||
19 | CPU_OPP_100 = 0x02, | ||
20 | CPU_OPP_50 = 0x03, | ||
21 | CPU_OPP_MAX = 0x04, | ||
22 | CPU_OPP_EXT_CLK = 0x07 | ||
23 | }; | ||
24 | enum prcmu_ape_opp { | ||
25 | APE_OPP_NO_CHANGE = 0x00, | ||
26 | APE_OPP_100 = 0x02, | ||
27 | APE_OPP_50 = 0x03, | ||
28 | }; | ||
29 | |||
30 | #endif /* __MACH_PRCMU_DEFS_H */ | ||
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 3ed3ff06be5d..7eaeb9750793 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig | |||
@@ -538,7 +538,7 @@ config AB8500_CORE | |||
538 | 538 | ||
539 | config AB8500_I2C_CORE | 539 | config AB8500_I2C_CORE |
540 | bool "AB8500 register access via PRCMU I2C" | 540 | bool "AB8500 register access via PRCMU I2C" |
541 | depends on AB8500_CORE && UX500_SOC_DB8500 | 541 | depends on AB8500_CORE && MFD_DB8500_PRCMU |
542 | default y | 542 | default y |
543 | help | 543 | help |
544 | This enables register access to the AB8500 chip via PRCMU I2C. | 544 | This enables register access to the AB8500 chip via PRCMU I2C. |
@@ -575,6 +575,16 @@ config AB3550_CORE | |||
575 | LEDs, vibrator, system power and temperature, power management | 575 | LEDs, vibrator, system power and temperature, power management |
576 | and ALSA sound. | 576 | and ALSA sound. |
577 | 577 | ||
578 | config MFD_DB8500_PRCMU | ||
579 | bool "ST-Ericsson DB8500 Power Reset Control Management Unit" | ||
580 | depends on UX500_SOC_DB8500 | ||
581 | select MFD_CORE | ||
582 | help | ||
583 | Select this option to enable support for the DB8500 Power Reset | ||
584 | and Control Management Unit. This is basically an autonomous | ||
585 | system controller running an XP70 microprocessor, which is accessed | ||
586 | through a register map. | ||
587 | |||
578 | config MFD_CS5535 | 588 | config MFD_CS5535 |
579 | tristate "Support for CS5535 and CS5536 southbridge core functions" | 589 | tristate "Support for CS5535 and CS5536 southbridge core functions" |
580 | select MFD_CORE | 590 | select MFD_CORE |
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index 419caa9d7dcf..814c57a692a9 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile | |||
@@ -74,9 +74,11 @@ obj-$(CONFIG_AB3100_CORE) += ab3100-core.o | |||
74 | obj-$(CONFIG_AB3100_OTP) += ab3100-otp.o | 74 | obj-$(CONFIG_AB3100_OTP) += ab3100-otp.o |
75 | obj-$(CONFIG_AB3550_CORE) += ab3550-core.o | 75 | obj-$(CONFIG_AB3550_CORE) += ab3550-core.o |
76 | obj-$(CONFIG_AB8500_CORE) += ab8500-core.o ab8500-sysctrl.o | 76 | obj-$(CONFIG_AB8500_CORE) += ab8500-core.o ab8500-sysctrl.o |
77 | obj-$(CONFIG_AB8500_I2C_CORE) += ab8500-i2c.o | ||
78 | obj-$(CONFIG_AB8500_DEBUG) += ab8500-debugfs.o | 77 | obj-$(CONFIG_AB8500_DEBUG) += ab8500-debugfs.o |
79 | obj-$(CONFIG_AB8500_GPADC) += ab8500-gpadc.o | 78 | obj-$(CONFIG_AB8500_GPADC) += ab8500-gpadc.o |
79 | obj-$(CONFIG_MFD_DB8500_PRCMU) += db8500-prcmu.o | ||
80 | # ab8500-i2c need to come after db8500-prcmu (which provides the channel) | ||
81 | obj-$(CONFIG_AB8500_I2C_CORE) += ab8500-i2c.o | ||
80 | obj-$(CONFIG_MFD_TIMBERDALE) += timberdale.o | 82 | obj-$(CONFIG_MFD_TIMBERDALE) += timberdale.o |
81 | obj-$(CONFIG_PMIC_ADP5520) += adp5520.o | 83 | obj-$(CONFIG_PMIC_ADP5520) += adp5520.o |
82 | obj-$(CONFIG_LPC_SCH) += lpc_sch.o | 84 | obj-$(CONFIG_LPC_SCH) += lpc_sch.o |
diff --git a/drivers/mfd/ab8500-i2c.c b/drivers/mfd/ab8500-i2c.c index 821e6b86afd2..9be541c6b004 100644 --- a/drivers/mfd/ab8500-i2c.c +++ b/drivers/mfd/ab8500-i2c.c | |||
@@ -11,8 +11,7 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/mfd/ab8500.h> | 13 | #include <linux/mfd/ab8500.h> |
14 | 14 | #include <linux/mfd/db8500-prcmu.h> | |
15 | #include <mach/prcmu.h> | ||
16 | 15 | ||
17 | static int ab8500_i2c_write(struct ab8500 *ab8500, u16 addr, u8 data) | 16 | static int ab8500_i2c_write(struct ab8500 *ab8500, u16 addr, u8 data) |
18 | { | 17 | { |
diff --git a/arch/arm/mach-ux500/include/mach/prcmu-regs.h b/drivers/mfd/db8500-prcmu-regs.h index c1226da19bfb..c1226da19bfb 100644 --- a/arch/arm/mach-ux500/include/mach/prcmu-regs.h +++ b/drivers/mfd/db8500-prcmu-regs.h | |||
diff --git a/arch/arm/mach-ux500/prcmu-db8500.c b/drivers/mfd/db8500-prcmu.c index c522d26ef348..31f18c8c6bf8 100644 --- a/arch/arm/mach-ux500/prcmu-db8500.c +++ b/drivers/mfd/db8500-prcmu.c | |||
@@ -20,10 +20,11 @@ | |||
20 | #include <linux/jiffies.h> | 20 | #include <linux/jiffies.h> |
21 | #include <linux/bitops.h> | 21 | #include <linux/bitops.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/mfd/db8500-prcmu.h> | ||
23 | 24 | ||
24 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
25 | #include <mach/prcmu-regs.h> | 26 | |
26 | #include <mach/prcmu-defs.h> | 27 | #include "db8500-prcmu-regs.h" |
27 | 28 | ||
28 | /* Global var to runtime determine TCDM base for v2 or v1 */ | 29 | /* Global var to runtime determine TCDM base for v2 or v1 */ |
29 | static __iomem void *tcdm_base; | 30 | static __iomem void *tcdm_base; |
diff --git a/arch/arm/mach-ux500/include/mach/prcmu.h b/include/linux/mfd/db8500-prcmu.h index c49e456162ef..d591d79aa6f0 100644 --- a/arch/arm/mach-ux500/include/mach/prcmu.h +++ b/include/linux/mfd/db8500-prcmu.h | |||
@@ -2,6 +2,37 @@ | |||
2 | * Copyright (C) STMicroelectronics 2009 | 2 | * Copyright (C) STMicroelectronics 2009 |
3 | * Copyright (C) ST-Ericsson SA 2010 | 3 | * Copyright (C) ST-Ericsson SA 2010 |
4 | * | 4 | * |
5 | * Author: Sundar Iyer <sundar.iyer@stericsson.com> | ||
6 | * Author: Martin Persson <martin.persson@stericsson.com> | ||
7 | * | ||
8 | * License Terms: GNU General Public License v2 | ||
9 | * | ||
10 | * PRCM Unit definitions | ||
11 | */ | ||
12 | |||
13 | #ifndef __MACH_PRCMU_DEFS_H | ||
14 | #define __MACH_PRCMU_DEFS_H | ||
15 | |||
16 | enum prcmu_cpu_opp { | ||
17 | CPU_OPP_INIT = 0x00, | ||
18 | CPU_OPP_NO_CHANGE = 0x01, | ||
19 | CPU_OPP_100 = 0x02, | ||
20 | CPU_OPP_50 = 0x03, | ||
21 | CPU_OPP_MAX = 0x04, | ||
22 | CPU_OPP_EXT_CLK = 0x07 | ||
23 | }; | ||
24 | enum prcmu_ape_opp { | ||
25 | APE_OPP_NO_CHANGE = 0x00, | ||
26 | APE_OPP_100 = 0x02, | ||
27 | APE_OPP_50 = 0x03, | ||
28 | }; | ||
29 | |||
30 | #endif /* __MACH_PRCMU_DEFS_H */ | ||
31 | |||
32 | /* | ||
33 | * Copyright (C) STMicroelectronics 2009 | ||
34 | * Copyright (C) ST-Ericsson SA 2010 | ||
35 | * | ||
5 | * Author: Kumar Sanghvi <kumar.sanghvi@stericsson.com> | 36 | * Author: Kumar Sanghvi <kumar.sanghvi@stericsson.com> |
6 | * Author: Sundar Iyer <sundar.iyer@stericsson.com> | 37 | * Author: Sundar Iyer <sundar.iyer@stericsson.com> |
7 | * Author: Mattias Nilsson <mattias.i.nilsson@stericsson.com> | 38 | * Author: Mattias Nilsson <mattias.i.nilsson@stericsson.com> |
@@ -12,7 +43,6 @@ | |||
12 | */ | 43 | */ |
13 | #ifndef __MACH_PRCMU_H | 44 | #ifndef __MACH_PRCMU_H |
14 | #define __MACH_PRCMU_H | 45 | #define __MACH_PRCMU_H |
15 | #include <mach/prcmu-defs.h> | ||
16 | 46 | ||
17 | void __init prcmu_early_init(void); | 47 | void __init prcmu_early_init(void); |
18 | int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size); | 48 | int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size); |
@@ -21,7 +51,7 @@ int prcmu_set_ape_opp(enum prcmu_ape_opp opp); | |||
21 | int prcmu_set_cpu_opp(enum prcmu_cpu_opp opp); | 51 | int prcmu_set_cpu_opp(enum prcmu_cpu_opp opp); |
22 | int prcmu_set_ape_cpu_opps(enum prcmu_ape_opp ape_opp, | 52 | int prcmu_set_ape_cpu_opps(enum prcmu_ape_opp ape_opp, |
23 | enum prcmu_cpu_opp cpu_opp); | 53 | enum prcmu_cpu_opp cpu_opp); |
24 | int prcmu_get_ape_opp(void); | 54 | enum prcmu_ape_opp prcmu_get_ape_opp(void); |
25 | int prcmu_get_cpu_opp(void); | 55 | int prcmu_get_cpu_opp(void); |
26 | bool prcmu_has_arm_maxopp(void); | 56 | bool prcmu_has_arm_maxopp(void); |
27 | 57 | ||