diff options
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-uib.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-ux500/cache-l2x0.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-ux500/cpu-db8500.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ux500/cpu.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-ux500/id.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ux500/id.h (renamed from arch/arm/mach-ux500/include/mach/id.h) | 21 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/hardware.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-ux500/platsmp.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-ux500/timer.c | 2 | ||||
-rw-r--r-- | drivers/cpufreq/db8500-cpufreq.c | 3 | ||||
-rw-r--r-- | drivers/mfd/db8500-prcmu.c | 17 | ||||
-rw-r--r-- | include/linux/mfd/db8500-prcmu.h | 6 | ||||
-rw-r--r-- | include/linux/mfd/dbx500-prcmu.h | 81 |
13 files changed, 39 insertions, 104 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-uib.c b/arch/arm/mach-ux500/board-mop500-uib.c index 1f47d962e3a1..7037d3687e9f 100644 --- a/arch/arm/mach-ux500/board-mop500-uib.c +++ b/arch/arm/mach-ux500/board-mop500-uib.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
15 | #include "board-mop500.h" | 15 | #include "board-mop500.h" |
16 | #include "id.h" | ||
16 | 17 | ||
17 | enum mop500_uib { | 18 | enum mop500_uib { |
18 | STUIB, | 19 | STUIB, |
diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c index 75d5b512a3d5..1c1609da76ce 100644 --- a/arch/arm/mach-ux500/cache-l2x0.c +++ b/arch/arm/mach-ux500/cache-l2x0.c | |||
@@ -10,7 +10,8 @@ | |||
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> | 12 | #include <mach/hardware.h> |
13 | #include <mach/id.h> | 13 | |
14 | #include "id.h" | ||
14 | 15 | ||
15 | static void __iomem *l2x0_base; | 16 | static void __iomem *l2x0_base; |
16 | 17 | ||
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 218a6b1ada7e..d614d7150dcb 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -36,7 +36,9 @@ | |||
36 | 36 | ||
37 | #include "devices-db8500.h" | 37 | #include "devices-db8500.h" |
38 | #include "ste-dma40-db8500.h" | 38 | #include "ste-dma40-db8500.h" |
39 | |||
39 | #include "board-mop500.h" | 40 | #include "board-mop500.h" |
41 | #include "id.h" | ||
40 | 42 | ||
41 | /* minimum static i/o mapping required to boot U8500 platforms */ | 43 | /* minimum static i/o mapping required to boot U8500 platforms */ |
42 | static struct map_desc u8500_uart_io_desc[] __initdata = { | 44 | static struct map_desc u8500_uart_io_desc[] __initdata = { |
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 5dd90d31ffc3..506c5b2d0fad 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <mach/devices.h> | 28 | #include <mach/devices.h> |
29 | 29 | ||
30 | #include "board-mop500.h" | 30 | #include "board-mop500.h" |
31 | #include "id.h" | ||
31 | 32 | ||
32 | void __iomem *_PRCMU_BASE; | 33 | void __iomem *_PRCMU_BASE; |
33 | 34 | ||
diff --git a/arch/arm/mach-ux500/id.c b/arch/arm/mach-ux500/id.c index d1579920139f..9f951842e1e5 100644 --- a/arch/arm/mach-ux500/id.c +++ b/arch/arm/mach-ux500/id.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
18 | #include <mach/setup.h> | 18 | #include <mach/setup.h> |
19 | 19 | ||
20 | #include "id.h" | ||
21 | |||
20 | struct dbx500_asic_id dbx500_id; | 22 | struct dbx500_asic_id dbx500_id; |
21 | 23 | ||
22 | static unsigned int ux500_read_asicid(phys_addr_t addr) | 24 | static unsigned int ux500_read_asicid(phys_addr_t addr) |
diff --git a/arch/arm/mach-ux500/include/mach/id.h b/arch/arm/mach-ux500/id.h index 9c42642ab168..bcc58a8cccbc 100644 --- a/arch/arm/mach-ux500/include/mach/id.h +++ b/arch/arm/mach-ux500/id.h | |||
@@ -61,9 +61,14 @@ static inline bool __attribute_const__ cpu_is_u8540(void) | |||
61 | return dbx500_partnumber() == 0x8540; | 61 | return dbx500_partnumber() == 0x8540; |
62 | } | 62 | } |
63 | 63 | ||
64 | static inline bool __attribute_const__ cpu_is_u8580(void) | ||
65 | { | ||
66 | return dbx500_partnumber() == 0x8580; | ||
67 | } | ||
68 | |||
64 | static inline bool cpu_is_ux540_family(void) | 69 | static inline bool cpu_is_ux540_family(void) |
65 | { | 70 | { |
66 | return cpu_is_u9540() || cpu_is_u8540(); | 71 | return cpu_is_u9540() || cpu_is_u8540() || cpu_is_u8580(); |
67 | } | 72 | } |
68 | 73 | ||
69 | /* | 74 | /* |
@@ -115,6 +120,20 @@ static inline bool cpu_is_u8500v20_or_later(void) | |||
115 | return (cpu_is_u8500() && !cpu_is_u8500v10() && !cpu_is_u8500v11()); | 120 | return (cpu_is_u8500() && !cpu_is_u8500v10() && !cpu_is_u8500v11()); |
116 | } | 121 | } |
117 | 122 | ||
123 | /* | ||
124 | * 8540 revisions | ||
125 | */ | ||
126 | |||
127 | static inline bool __attribute_const__ cpu_is_u8540v10(void) | ||
128 | { | ||
129 | return cpu_is_u8540() && dbx500_revision() == 0xA0; | ||
130 | } | ||
131 | |||
132 | static inline bool __attribute_const__ cpu_is_u8580v10(void) | ||
133 | { | ||
134 | return cpu_is_u8580() && dbx500_revision() == 0xA0; | ||
135 | } | ||
136 | |||
118 | static inline bool ux500_is_svp(void) | 137 | static inline bool ux500_is_svp(void) |
119 | { | 138 | { |
120 | return false; | 139 | return false; |
diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h index 28d16e744bfd..5201ddace503 100644 --- a/arch/arm/mach-ux500/include/mach/hardware.h +++ b/arch/arm/mach-ux500/include/mach/hardware.h | |||
@@ -39,7 +39,6 @@ | |||
39 | 39 | ||
40 | #ifndef __ASSEMBLY__ | 40 | #ifndef __ASSEMBLY__ |
41 | 41 | ||
42 | #include <mach/id.h> | ||
43 | extern void __iomem *_PRCMU_BASE; | 42 | extern void __iomem *_PRCMU_BASE; |
44 | 43 | ||
45 | #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) | 44 | #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) |
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index b8adac93421f..18f7af339dc9 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c | |||
@@ -21,9 +21,12 @@ | |||
21 | #include <asm/cacheflush.h> | 21 | #include <asm/cacheflush.h> |
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 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
25 | #include <mach/setup.h> | 26 | #include <mach/setup.h> |
26 | 27 | ||
28 | #include "id.h" | ||
29 | |||
27 | /* This is called from headsmp.S to wakeup the secondary core */ | 30 | /* This is called from headsmp.S to wakeup the secondary core */ |
28 | extern void u8500_secondary_startup(void); | 31 | extern void u8500_secondary_startup(void); |
29 | 32 | ||
diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c index aa2a78acb59e..a6af0b8732ba 100644 --- a/arch/arm/mach-ux500/timer.c +++ b/arch/arm/mach-ux500/timer.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
18 | #include <mach/irqs.h> | 18 | #include <mach/irqs.h> |
19 | 19 | ||
20 | #include "id.h" | ||
21 | |||
20 | #ifdef CONFIG_HAVE_ARM_TWD | 22 | #ifdef CONFIG_HAVE_ARM_TWD |
21 | static DEFINE_TWD_LOCAL_TIMER(u8500_twd_local_timer, | 23 | static DEFINE_TWD_LOCAL_TIMER(u8500_twd_local_timer, |
22 | U8500_TWD_BASE, IRQ_LOCALTIMER); | 24 | U8500_TWD_BASE, IRQ_LOCALTIMER); |
diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c index 4f154bc0ebe4..523c9403bfce 100644 --- a/drivers/cpufreq/db8500-cpufreq.c +++ b/drivers/cpufreq/db8500-cpufreq.c | |||
@@ -167,9 +167,6 @@ static struct platform_driver db8500_cpufreq_plat_driver = { | |||
167 | 167 | ||
168 | static int __init db8500_cpufreq_register(void) | 168 | static int __init db8500_cpufreq_register(void) |
169 | { | 169 | { |
170 | if (!cpu_is_u8500_family()) | ||
171 | return -ENODEV; | ||
172 | |||
173 | pr_info("cpufreq for DB8500 started\n"); | 170 | pr_info("cpufreq for DB8500 started\n"); |
174 | return platform_driver_register(&db8500_cpufreq_plat_driver); | 171 | return platform_driver_register(&db8500_cpufreq_plat_driver); |
175 | } | 172 | } |
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index 13f4ccf2612d..d9fedd4d9194 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
37 | #include <mach/irqs.h> | 37 | #include <mach/irqs.h> |
38 | #include <mach/db8500-regs.h> | 38 | #include <mach/db8500-regs.h> |
39 | #include <mach/id.h> | ||
40 | #include "dbx500-prcmu-regs.h" | 39 | #include "dbx500-prcmu-regs.h" |
41 | 40 | ||
42 | /* Offset for the firmware version within the TCPM */ | 41 | /* Offset for the firmware version within the TCPM */ |
@@ -216,10 +215,8 @@ | |||
216 | #define PRCM_REQ_MB5_I2C_HW_BITS (PRCM_REQ_MB5 + 0x1) | 215 | #define PRCM_REQ_MB5_I2C_HW_BITS (PRCM_REQ_MB5 + 0x1) |
217 | #define PRCM_REQ_MB5_I2C_REG (PRCM_REQ_MB5 + 0x2) | 216 | #define PRCM_REQ_MB5_I2C_REG (PRCM_REQ_MB5 + 0x2) |
218 | #define PRCM_REQ_MB5_I2C_VAL (PRCM_REQ_MB5 + 0x3) | 217 | #define PRCM_REQ_MB5_I2C_VAL (PRCM_REQ_MB5 + 0x3) |
219 | #define PRCMU_I2C_WRITE(slave) \ | 218 | #define PRCMU_I2C_WRITE(slave) (((slave) << 1) | BIT(6)) |
220 | (((slave) << 1) | (cpu_is_u8500v2() ? BIT(6) : 0)) | 219 | #define PRCMU_I2C_READ(slave) (((slave) << 1) | BIT(0) | BIT(6)) |
221 | #define PRCMU_I2C_READ(slave) \ | ||
222 | (((slave) << 1) | BIT(0) | (cpu_is_u8500v2() ? BIT(6) : 0)) | ||
223 | #define PRCMU_I2C_STOP_EN BIT(3) | 220 | #define PRCMU_I2C_STOP_EN BIT(3) |
224 | 221 | ||
225 | /* Mailbox 5 ACKs */ | 222 | /* Mailbox 5 ACKs */ |
@@ -1049,12 +1046,13 @@ int db8500_prcmu_get_ddr_opp(void) | |||
1049 | * | 1046 | * |
1050 | * This function sets the operating point of the DDR. | 1047 | * This function sets the operating point of the DDR. |
1051 | */ | 1048 | */ |
1049 | static bool enable_set_ddr_opp; | ||
1052 | int db8500_prcmu_set_ddr_opp(u8 opp) | 1050 | int db8500_prcmu_set_ddr_opp(u8 opp) |
1053 | { | 1051 | { |
1054 | if (opp < DDR_100_OPP || opp > DDR_25_OPP) | 1052 | if (opp < DDR_100_OPP || opp > DDR_25_OPP) |
1055 | return -EINVAL; | 1053 | return -EINVAL; |
1056 | /* Changing the DDR OPP can hang the hardware pre-v21 */ | 1054 | /* Changing the DDR OPP can hang the hardware pre-v21 */ |
1057 | if (cpu_is_u8500v20_or_later() && !cpu_is_u8500v20()) | 1055 | if (enable_set_ddr_opp) |
1058 | writeb(opp, PRCM_DDR_SUBSYS_APE_MINBW); | 1056 | writeb(opp, PRCM_DDR_SUBSYS_APE_MINBW); |
1059 | 1057 | ||
1060 | return 0; | 1058 | return 0; |
@@ -2790,6 +2788,7 @@ void __init db8500_prcmu_early_init(void) | |||
2790 | pr_err("prcmu: Unsupported chip version\n"); | 2788 | pr_err("prcmu: Unsupported chip version\n"); |
2791 | BUG(); | 2789 | BUG(); |
2792 | } | 2790 | } |
2791 | tcdm_base = __io_address(U8500_PRCMU_TCDM_BASE); | ||
2793 | 2792 | ||
2794 | spin_lock_init(&mb0_transfer.lock); | 2793 | spin_lock_init(&mb0_transfer.lock); |
2795 | spin_lock_init(&mb0_transfer.dbb_irqs_lock); | 2794 | spin_lock_init(&mb0_transfer.dbb_irqs_lock); |
@@ -3104,9 +3103,6 @@ static int db8500_prcmu_probe(struct platform_device *pdev) | |||
3104 | struct device_node *np = pdev->dev.of_node; | 3103 | struct device_node *np = pdev->dev.of_node; |
3105 | int irq = 0, err = 0, i; | 3104 | int irq = 0, err = 0, i; |
3106 | 3105 | ||
3107 | if (ux500_is_svp()) | ||
3108 | return -ENODEV; | ||
3109 | |||
3110 | init_prcm_registers(); | 3106 | init_prcm_registers(); |
3111 | 3107 | ||
3112 | /* Clean up the mailbox interrupts after pre-kernel code. */ | 3108 | /* Clean up the mailbox interrupts after pre-kernel code. */ |
@@ -3135,8 +3131,7 @@ static int db8500_prcmu_probe(struct platform_device *pdev) | |||
3135 | } | 3131 | } |
3136 | } | 3132 | } |
3137 | 3133 | ||
3138 | if (cpu_is_u8500v20_or_later()) | 3134 | prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET); |
3139 | prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET); | ||
3140 | 3135 | ||
3141 | db8500_prcmu_update_cpufreq(); | 3136 | db8500_prcmu_update_cpufreq(); |
3142 | 3137 | ||
diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h index 6ee4247df11e..a65deddede2f 100644 --- a/include/linux/mfd/db8500-prcmu.h +++ b/include/linux/mfd/db8500-prcmu.h | |||
@@ -16,12 +16,6 @@ | |||
16 | /* | 16 | /* |
17 | * Registers | 17 | * Registers |
18 | */ | 18 | */ |
19 | #define DB8500_PRCM_GPIOCR 0x138 | ||
20 | #define DB8500_PRCM_GPIOCR_DBG_UARTMOD_CMD0 BIT(0) | ||
21 | #define DB8500_PRCM_GPIOCR_DBG_STM_APE_CMD BIT(9) | ||
22 | #define DB8500_PRCM_GPIOCR_DBG_STM_MOD_CMD1 BIT(11) | ||
23 | #define DB8500_PRCM_GPIOCR_SPI2_SELECT BIT(23) | ||
24 | |||
25 | #define DB8500_PRCM_LINE_VALUE 0x170 | 19 | #define DB8500_PRCM_LINE_VALUE 0x170 |
26 | #define DB8500_PRCM_LINE_VALUE_HSI_CAWAKE0 BIT(3) | 20 | #define DB8500_PRCM_LINE_VALUE_HSI_CAWAKE0 BIT(3) |
27 | 21 | ||
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h index c202d6c4d879..155280642583 100644 --- a/include/linux/mfd/dbx500-prcmu.h +++ b/include/linux/mfd/dbx500-prcmu.h | |||
@@ -218,8 +218,6 @@ enum ddr_pwrst { | |||
218 | 218 | ||
219 | #if defined(CONFIG_UX500_SOC_DB8500) | 219 | #if defined(CONFIG_UX500_SOC_DB8500) |
220 | 220 | ||
221 | #include <mach/id.h> | ||
222 | |||
223 | static inline void __init prcmu_early_init(void) | 221 | static inline void __init prcmu_early_init(void) |
224 | { | 222 | { |
225 | return db8500_prcmu_early_init(); | 223 | return db8500_prcmu_early_init(); |
@@ -626,85 +624,6 @@ static inline void prcmu_clear(unsigned int reg, u32 bits) | |||
626 | prcmu_write_masked(reg, bits, 0); | 624 | prcmu_write_masked(reg, bits, 0); |
627 | } | 625 | } |
628 | 626 | ||
629 | #if defined(CONFIG_UX500_SOC_DB8500) | ||
630 | |||
631 | /** | ||
632 | * prcmu_enable_spi2 - Enables pin muxing for SPI2 on OtherAlternateC1. | ||
633 | */ | ||
634 | static inline void prcmu_enable_spi2(void) | ||
635 | { | ||
636 | if (cpu_is_u8500()) | ||
637 | prcmu_set(DB8500_PRCM_GPIOCR, DB8500_PRCM_GPIOCR_SPI2_SELECT); | ||
638 | } | ||
639 | |||
640 | /** | ||
641 | * prcmu_disable_spi2 - Disables pin muxing for SPI2 on OtherAlternateC1. | ||
642 | */ | ||
643 | static inline void prcmu_disable_spi2(void) | ||
644 | { | ||
645 | if (cpu_is_u8500()) | ||
646 | prcmu_clear(DB8500_PRCM_GPIOCR, DB8500_PRCM_GPIOCR_SPI2_SELECT); | ||
647 | } | ||
648 | |||
649 | /** | ||
650 | * prcmu_enable_stm_mod_uart - Enables pin muxing for STMMOD | ||
651 | * and UARTMOD on OtherAlternateC3. | ||
652 | */ | ||
653 | static inline void prcmu_enable_stm_mod_uart(void) | ||
654 | { | ||
655 | if (cpu_is_u8500()) { | ||
656 | prcmu_set(DB8500_PRCM_GPIOCR, | ||
657 | (DB8500_PRCM_GPIOCR_DBG_STM_MOD_CMD1 | | ||
658 | DB8500_PRCM_GPIOCR_DBG_UARTMOD_CMD0)); | ||
659 | } | ||
660 | } | ||
661 | |||
662 | /** | ||
663 | * prcmu_disable_stm_mod_uart - Disables pin muxing for STMMOD | ||
664 | * and UARTMOD on OtherAlternateC3. | ||
665 | */ | ||
666 | static inline void prcmu_disable_stm_mod_uart(void) | ||
667 | { | ||
668 | if (cpu_is_u8500()) { | ||
669 | prcmu_clear(DB8500_PRCM_GPIOCR, | ||
670 | (DB8500_PRCM_GPIOCR_DBG_STM_MOD_CMD1 | | ||
671 | DB8500_PRCM_GPIOCR_DBG_UARTMOD_CMD0)); | ||
672 | } | ||
673 | } | ||
674 | |||
675 | /** | ||
676 | * prcmu_enable_stm_ape - Enables pin muxing for STM APE on OtherAlternateC1. | ||
677 | */ | ||
678 | static inline void prcmu_enable_stm_ape(void) | ||
679 | { | ||
680 | if (cpu_is_u8500()) { | ||
681 | prcmu_set(DB8500_PRCM_GPIOCR, | ||
682 | DB8500_PRCM_GPIOCR_DBG_STM_APE_CMD); | ||
683 | } | ||
684 | } | ||
685 | |||
686 | /** | ||
687 | * prcmu_disable_stm_ape - Disables pin muxing for STM APE on OtherAlternateC1. | ||
688 | */ | ||
689 | static inline void prcmu_disable_stm_ape(void) | ||
690 | { | ||
691 | if (cpu_is_u8500()) { | ||
692 | prcmu_clear(DB8500_PRCM_GPIOCR, | ||
693 | DB8500_PRCM_GPIOCR_DBG_STM_APE_CMD); | ||
694 | } | ||
695 | } | ||
696 | |||
697 | #else | ||
698 | |||
699 | static inline void prcmu_enable_spi2(void) {} | ||
700 | static inline void prcmu_disable_spi2(void) {} | ||
701 | static inline void prcmu_enable_stm_mod_uart(void) {} | ||
702 | static inline void prcmu_disable_stm_mod_uart(void) {} | ||
703 | static inline void prcmu_enable_stm_ape(void) {} | ||
704 | static inline void prcmu_disable_stm_ape(void) {} | ||
705 | |||
706 | #endif | ||
707 | |||
708 | /* PRCMU QoS APE OPP class */ | 627 | /* PRCMU QoS APE OPP class */ |
709 | #define PRCMU_QOS_APE_OPP 1 | 628 | #define PRCMU_QOS_APE_OPP 1 |
710 | #define PRCMU_QOS_DDR_OPP 2 | 629 | #define PRCMU_QOS_DDR_OPP 2 |