aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-02-07 04:17:31 -0500
committerLinus Walleij <linus.walleij@linaro.org>2013-02-12 06:44:27 -0500
commit05ec260edecaf3dc214cff49d43b1ad9b2cbb710 (patch)
tree7ce97e53a8098a9045191e302c8d9b06319133ac
parentf25610ce535304f7c2420970d1315c6c4fce157c (diff)
mfd: db8500-prcmu: update resource passing
When trying to get rid of the cross-includes of <mach/id.h> from different drivers, so we can localize ASIC/CPU detection to the mach-ux500 folder, we run into the way the PRCMU handles base addresses and firmware detection. This patch updates the firmware version detection to pass the required information as platform data instead of relying on cpu_is_* macros. Now the PRCMU base address, the secondary TCDM area, the TCPM area and the IRQ are passed as resources instead of being grabbed from <mach/*> files. Incidentally this also removes part of the reliance on <mach/irqs.h>. Further it updates the firmware version detection, since the location of the firmware ID bytes in the designated memory are is now passed from the platform data instead. There is no reason not to include the nice split-off of a struct to hold the firmware information and a separate function to populate it. The patch actually rids the need to use the external db8500_prcmu_early_init call at all, but I'm keepin back that removal as I don't want the patch to be too big. Cc: arm@kernel.org Cc: Michel Jaoen <michel.jaouen@stericsson.com> Cc: Lee Jones <lee.jones@linaro.org> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Loic Pallardy <loic.pallardy@stericsson.com> Acked-by: Fabio Baltieri <fabio.baltieri@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--arch/arm/mach-ux500/board-mop500.c5
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c7
-rw-r--r--arch/arm/mach-ux500/devices-db8500.c44
-rw-r--r--arch/arm/mach-ux500/devices-db8500.h5
-rw-r--r--drivers/mfd/db8500-prcmu.c122
-rw-r--r--include/linux/mfd/db8500-prcmu.h14
-rw-r--r--include/linux/mfd/dbx500-prcmu.h46
7 files changed, 180 insertions, 63 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index d453522edb0d..6cb1407961e0 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -215,7 +215,7 @@ static struct platform_device snowball_sbnet_dev = {
215 }, 215 },
216}; 216};
217 217
218static struct ab8500_platform_data ab8500_platdata = { 218struct ab8500_platform_data ab8500_platdata = {
219 .irq_base = MOP500_AB8500_IRQ_BASE, 219 .irq_base = MOP500_AB8500_IRQ_BASE,
220 .regulator_reg_init = ab8500_regulator_reg_init, 220 .regulator_reg_init = ab8500_regulator_reg_init,
221 .num_regulator_reg_init = ARRAY_SIZE(ab8500_regulator_reg_init), 221 .num_regulator_reg_init = ARRAY_SIZE(ab8500_regulator_reg_init),
@@ -651,6 +651,7 @@ static void __init mop500_init_machine(void)
651 int i2c0_devs; 651 int i2c0_devs;
652 int i; 652 int i;
653 653
654 platform_device_register(&db8500_prcmu_device);
654 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; 655 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
655 656
656 mop500_pinmaps_init(); 657 mop500_pinmaps_init();
@@ -685,6 +686,7 @@ static void __init snowball_init_machine(void)
685 struct device *parent = NULL; 686 struct device *parent = NULL;
686 int i; 687 int i;
687 688
689 platform_device_register(&db8500_prcmu_device);
688 snowball_pinmaps_init(); 690 snowball_pinmaps_init();
689 parent = u8500_init_devices(&ab8500_platdata); 691 parent = u8500_init_devices(&ab8500_platdata);
690 692
@@ -710,6 +712,7 @@ static void __init hrefv60_init_machine(void)
710 int i2c0_devs; 712 int i2c0_devs;
711 int i; 713 int i;
712 714
715 platform_device_register(&db8500_prcmu_device);
713 /* 716 /*
714 * The HREFv60 board removed a GPIO expander and routed 717 * The HREFv60 board removed a GPIO expander and routed
715 * all these GPIO pins to the internal GPIO controller 718 * all these GPIO pins to the internal GPIO controller
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index 09c3fee726d4..8501970641bc 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -139,14 +139,9 @@ static struct platform_device db8500_pmu_device = {
139 .dev.platform_data = &db8500_pmu_platdata, 139 .dev.platform_data = &db8500_pmu_platdata,
140}; 140};
141 141
142static struct platform_device db8500_prcmu_device = {
143 .name = "db8500-prcmu",
144};
145
146static struct platform_device *platform_devs[] __initdata = { 142static struct platform_device *platform_devs[] __initdata = {
147 &u8500_dma40_device, 143 &u8500_dma40_device,
148 &db8500_pmu_device, 144 &db8500_pmu_device,
149 &db8500_prcmu_device,
150}; 145};
151 146
152static resource_size_t __initdata db8500_gpio_base[] = { 147static resource_size_t __initdata db8500_gpio_base[] = {
@@ -286,6 +281,8 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
286 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80128000, "nmk-i2c.2", NULL), 281 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80128000, "nmk-i2c.2", NULL),
287 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL), 282 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL),
288 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL), 283 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
284 OF_DEV_AUXDATA("stericsson,db8500-prcmu", 0x80157000, "db8500-prcmu",
285 &db8500_prcmu_pdata),
289 /* Requires device name bindings. */ 286 /* Requires device name bindings. */
290 OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL), 287 OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL),
291 /* Requires clock name and DMA bindings. */ 288 /* Requires clock name and DMA bindings. */
diff --git a/arch/arm/mach-ux500/devices-db8500.c b/arch/arm/mach-ux500/devices-db8500.c
index 318d49020894..f3d9419f75d3 100644
--- a/arch/arm/mach-ux500/devices-db8500.c
+++ b/arch/arm/mach-ux500/devices-db8500.c
@@ -13,11 +13,13 @@
13#include <linux/amba/bus.h> 13#include <linux/amba/bus.h>
14#include <linux/amba/pl022.h> 14#include <linux/amba/pl022.h>
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 17
17#include <mach/hardware.h> 18#include <mach/hardware.h>
18#include <mach/setup.h> 19#include <mach/setup.h>
19#include <mach/irqs.h> 20#include <mach/irqs.h>
20 21
22#include "devices-db8500.h"
21#include "ste-dma40-db8500.h" 23#include "ste-dma40-db8500.h"
22 24
23static struct resource dma40_resources[] = { 25static struct resource dma40_resources[] = {
@@ -194,3 +196,45 @@ struct platform_device u8500_ske_keypad_device = {
194 .num_resources = ARRAY_SIZE(keypad_resources), 196 .num_resources = ARRAY_SIZE(keypad_resources),
195 .resource = keypad_resources, 197 .resource = keypad_resources,
196}; 198};
199
200struct prcmu_pdata db8500_prcmu_pdata = {
201 .ab_platdata = &ab8500_platdata,
202 .version_offset = DB8500_PRCMU_FW_VERSION_OFFSET,
203 .legacy_offset = DB8500_PRCMU_LEGACY_OFFSET,
204};
205
206static struct resource db8500_prcmu_res[] = {
207 {
208 .name = "prcmu",
209 .start = U8500_PRCMU_BASE,
210 .end = U8500_PRCMU_BASE + SZ_8K - 1,
211 .flags = IORESOURCE_MEM,
212 },
213 {
214 .name = "prcmu-tcdm",
215 .start = U8500_PRCMU_TCDM_BASE,
216 .end = U8500_PRCMU_TCDM_BASE + SZ_4K - 1,
217 .flags = IORESOURCE_MEM,
218 },
219 {
220 .name = "irq",
221 .start = IRQ_DB8500_PRCMU1,
222 .end = IRQ_DB8500_PRCMU1,
223 .flags = IORESOURCE_IRQ,
224 },
225 {
226 .name = "prcmu-tcpm",
227 .start = U8500_PRCMU_TCPM_BASE,
228 .end = U8500_PRCMU_TCPM_BASE + SZ_4K - 1,
229 .flags = IORESOURCE_MEM,
230 },
231};
232
233struct platform_device db8500_prcmu_device = {
234 .name = "db8500-prcmu",
235 .resource = db8500_prcmu_res,
236 .num_resources = ARRAY_SIZE(db8500_prcmu_res),
237 .dev = {
238 .platform_data = &db8500_prcmu_pdata,
239 },
240};
diff --git a/arch/arm/mach-ux500/devices-db8500.h b/arch/arm/mach-ux500/devices-db8500.h
index a5e05f6e256f..dbcb35c48f06 100644
--- a/arch/arm/mach-ux500/devices-db8500.h
+++ b/arch/arm/mach-ux500/devices-db8500.h
@@ -14,6 +14,11 @@
14 14
15struct ske_keypad_platform_data; 15struct ske_keypad_platform_data;
16struct pl022_ssp_controller; 16struct pl022_ssp_controller;
17struct platform_device;
18
19extern struct ab8500_platform_data ab8500_platdata;
20extern struct prcmu_pdata db8500_prcmu_pdata;
21extern struct platform_device db8500_prcmu_device;
17 22
18static inline struct platform_device * 23static inline struct platform_device *
19db8500_add_ske_keypad(struct device *parent, 24db8500_add_ske_keypad(struct device *parent,
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 67d8b25d183e..eba03d2329dd 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -38,9 +38,6 @@
38#include <mach/db8500-regs.h> 38#include <mach/db8500-regs.h>
39#include "dbx500-prcmu-regs.h" 39#include "dbx500-prcmu-regs.h"
40 40
41/* Offset for the firmware version within the TCPM */
42#define PRCMU_FW_VERSION_OFFSET 0xA4
43
44/* Index of different voltages to be used when accessing AVSData */ 41/* Index of different voltages to be used when accessing AVSData */
45#define PRCM_AVS_BASE 0x2FC 42#define PRCM_AVS_BASE 0x2FC
46#define PRCM_AVS_VBB_RET (PRCM_AVS_BASE + 0x0) 43#define PRCM_AVS_VBB_RET (PRCM_AVS_BASE + 0x0)
@@ -2704,21 +2701,43 @@ static struct irq_chip prcmu_irq_chip = {
2704 .irq_unmask = prcmu_irq_unmask, 2701 .irq_unmask = prcmu_irq_unmask,
2705}; 2702};
2706 2703
2707static char *fw_project_name(u8 project) 2704static __init char *fw_project_name(u32 project)
2708{ 2705{
2709 switch (project) { 2706 switch (project) {
2710 case PRCMU_FW_PROJECT_U8500: 2707 case PRCMU_FW_PROJECT_U8500:
2711 return "U8500"; 2708 return "U8500";
2712 case PRCMU_FW_PROJECT_U8500_C2: 2709 case PRCMU_FW_PROJECT_U8400:
2713 return "U8500 C2"; 2710 return "U8400";
2714 case PRCMU_FW_PROJECT_U9500: 2711 case PRCMU_FW_PROJECT_U9500:
2715 return "U9500"; 2712 return "U9500";
2716 case PRCMU_FW_PROJECT_U9500_C2: 2713 case PRCMU_FW_PROJECT_U8500_MBB:
2717 return "U9500 C2"; 2714 return "U8500 MBB";
2715 case PRCMU_FW_PROJECT_U8500_C1:
2716 return "U8500 C1";
2717 case PRCMU_FW_PROJECT_U8500_C2:
2718 return "U8500 C2";
2719 case PRCMU_FW_PROJECT_U8500_C3:
2720 return "U8500 C3";
2721 case PRCMU_FW_PROJECT_U8500_C4:
2722 return "U8500 C4";
2723 case PRCMU_FW_PROJECT_U9500_MBL:
2724 return "U9500 MBL";
2725 case PRCMU_FW_PROJECT_U8500_MBL:
2726 return "U8500 MBL";
2727 case PRCMU_FW_PROJECT_U8500_MBL2:
2728 return "U8500 MBL2";
2718 case PRCMU_FW_PROJECT_U8520: 2729 case PRCMU_FW_PROJECT_U8520:
2719 return "U8520"; 2730 return "U8520 MBL";
2720 case PRCMU_FW_PROJECT_U8420: 2731 case PRCMU_FW_PROJECT_U8420:
2721 return "U8420"; 2732 return "U8420";
2733 case PRCMU_FW_PROJECT_U9540:
2734 return "U9540";
2735 case PRCMU_FW_PROJECT_A9420:
2736 return "A9420";
2737 case PRCMU_FW_PROJECT_L8540:
2738 return "L8540";
2739 case PRCMU_FW_PROJECT_L8580:
2740 return "L8580";
2722 default: 2741 default:
2723 return "Unknown"; 2742 return "Unknown";
2724 } 2743 }
@@ -2759,37 +2778,44 @@ static int db8500_irq_init(struct device_node *np)
2759 return 0; 2778 return 0;
2760} 2779}
2761 2780
2762void __init db8500_prcmu_early_init(void) 2781static void dbx500_fw_version_init(struct platform_device *pdev,
2782 u32 version_offset)
2763{ 2783{
2764 if (cpu_is_u8500v2() || cpu_is_u9540()) { 2784 struct resource *res;
2765 void *tcpm_base = ioremap_nocache(U8500_PRCMU_TCPM_BASE, SZ_4K); 2785 void __iomem *tcpm_base;
2766
2767 if (tcpm_base != NULL) {
2768 u32 version;
2769 version = readl(tcpm_base + PRCMU_FW_VERSION_OFFSET);
2770 fw_info.version.project = version & 0xFF;
2771 fw_info.version.api_version = (version >> 8) & 0xFF;
2772 fw_info.version.func_version = (version >> 16) & 0xFF;
2773 fw_info.version.errata = (version >> 24) & 0xFF;
2774 fw_info.valid = true;
2775 pr_info("PRCMU firmware: %s, version %d.%d.%d\n",
2776 fw_project_name(fw_info.version.project),
2777 (version >> 8) & 0xFF, (version >> 16) & 0xFF,
2778 (version >> 24) & 0xFF);
2779 iounmap(tcpm_base);
2780 }
2781 2786
2782 if (cpu_is_u9540()) 2787 res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
2783 tcdm_base = ioremap_nocache(U8500_PRCMU_TCDM_BASE, 2788 "prcmu-tcpm");
2784 SZ_4K + SZ_8K) + SZ_8K; 2789 if (!res) {
2785 else 2790 dev_err(&pdev->dev,
2786 tcdm_base = __io_address(U8500_PRCMU_TCDM_BASE); 2791 "Error: no prcmu tcpm memory region provided\n");
2787 } else { 2792 return;
2788 pr_err("prcmu: Unsupported chip version\n"); 2793 }
2789 BUG(); 2794 tcpm_base = ioremap(res->start, resource_size(res));
2795 if (tcpm_base != NULL) {
2796 u32 version;
2797
2798 version = readl(tcpm_base + version_offset);
2799 fw_info.version.project = (version & 0xFF);
2800 fw_info.version.api_version = (version >> 8) & 0xFF;
2801 fw_info.version.func_version = (version >> 16) & 0xFF;
2802 fw_info.version.errata = (version >> 24) & 0xFF;
2803 strncpy(fw_info.version.project_name,
2804 fw_project_name(fw_info.version.project),
2805 PRCMU_FW_PROJECT_NAME_LEN);
2806 fw_info.valid = true;
2807 pr_info("PRCMU firmware: %s(%d), version %d.%d.%d\n",
2808 fw_info.version.project_name,
2809 fw_info.version.project,
2810 fw_info.version.api_version,
2811 fw_info.version.func_version,
2812 fw_info.version.errata);
2813 iounmap(tcpm_base);
2790 } 2814 }
2791 tcdm_base = __io_address(U8500_PRCMU_TCDM_BASE); 2815}
2792 2816
2817void __init db8500_prcmu_early_init(void)
2818{
2793 spin_lock_init(&mb0_transfer.lock); 2819 spin_lock_init(&mb0_transfer.lock);
2794 spin_lock_init(&mb0_transfer.dbb_irqs_lock); 2820 spin_lock_init(&mb0_transfer.dbb_irqs_lock);
2795 mutex_init(&mb0_transfer.ac_wake_lock); 2821 mutex_init(&mb0_transfer.ac_wake_lock);
@@ -3099,20 +3125,30 @@ static void db8500_prcmu_update_cpufreq(void)
3099 */ 3125 */
3100static int db8500_prcmu_probe(struct platform_device *pdev) 3126static int db8500_prcmu_probe(struct platform_device *pdev)
3101{ 3127{
3102 struct ab8500_platform_data *ab8500_platdata = pdev->dev.platform_data;
3103 struct device_node *np = pdev->dev.of_node; 3128 struct device_node *np = pdev->dev.of_node;
3129 struct prcmu_pdata *pdata = dev_get_platdata(&pdev->dev);
3104 int irq = 0, err = 0, i; 3130 int irq = 0, err = 0, i;
3131 struct resource *res;
3105 3132
3106 init_prcm_registers(); 3133 init_prcm_registers();
3107 3134
3135 dbx500_fw_version_init(pdev, pdata->version_offset);
3136 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "prcmu-tcdm");
3137 if (!res) {
3138 dev_err(&pdev->dev, "no prcmu tcdm region provided\n");
3139 return -ENOENT;
3140 }
3141 tcdm_base = devm_ioremap(&pdev->dev, res->start,
3142 resource_size(res));
3143
3108 /* Clean up the mailbox interrupts after pre-kernel code. */ 3144 /* Clean up the mailbox interrupts after pre-kernel code. */
3109 writel(ALL_MBOX_BITS, PRCM_ARM_IT1_CLR); 3145 writel(ALL_MBOX_BITS, PRCM_ARM_IT1_CLR);
3110 3146
3111 if (np) 3147 irq = platform_get_irq(pdev, 0);
3112 irq = platform_get_irq(pdev, 0); 3148 if (irq <= 0) {
3113 3149 dev_err(&pdev->dev, "no prcmu irq provided\n");
3114 if (!np || irq <= 0) 3150 return -ENOENT;
3115 irq = IRQ_DB8500_PRCMU1; 3151 }
3116 3152
3117 err = request_threaded_irq(irq, prcmu_irq_handler, 3153 err = request_threaded_irq(irq, prcmu_irq_handler,
3118 prcmu_irq_thread_fn, IRQF_NO_SUSPEND, "prcmu", NULL); 3154 prcmu_irq_thread_fn, IRQF_NO_SUSPEND, "prcmu", NULL);
@@ -3126,7 +3162,7 @@ static int db8500_prcmu_probe(struct platform_device *pdev)
3126 3162
3127 for (i = 0; i < ARRAY_SIZE(db8500_prcmu_devs); i++) { 3163 for (i = 0; i < ARRAY_SIZE(db8500_prcmu_devs); i++) {
3128 if (!strcmp(db8500_prcmu_devs[i].name, "ab8500-core")) { 3164 if (!strcmp(db8500_prcmu_devs[i].name, "ab8500-core")) {
3129 db8500_prcmu_devs[i].platform_data = ab8500_platdata; 3165 db8500_prcmu_devs[i].platform_data = pdata->ab_platdata;
3130 db8500_prcmu_devs[i].pdata_size = sizeof(struct ab8500_platform_data); 3166 db8500_prcmu_devs[i].pdata_size = sizeof(struct ab8500_platform_data);
3131 } 3167 }
3132 } 3168 }
diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
index a65deddede2f..77a46ae2fc17 100644
--- a/include/linux/mfd/db8500-prcmu.h
+++ b/include/linux/mfd/db8500-prcmu.h
@@ -487,20 +487,6 @@ struct prcmu_auto_pm_config {
487 u8 sva_policy; 487 u8 sva_policy;
488}; 488};
489 489
490#define PRCMU_FW_PROJECT_U8500 2
491#define PRCMU_FW_PROJECT_U9500 4
492#define PRCMU_FW_PROJECT_U8500_C2 7
493#define PRCMU_FW_PROJECT_U9500_C2 11
494#define PRCMU_FW_PROJECT_U8520 13
495#define PRCMU_FW_PROJECT_U8420 14
496
497struct prcmu_fw_version {
498 u8 project;
499 u8 api_version;
500 u8 func_version;
501 u8 errata;
502};
503
504#ifdef CONFIG_MFD_DB8500_PRCMU 490#ifdef CONFIG_MFD_DB8500_PRCMU
505 491
506void db8500_prcmu_early_init(void); 492void db8500_prcmu_early_init(void);
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h
index 155280642583..f8bac7cfc25f 100644
--- a/include/linux/mfd/dbx500-prcmu.h
+++ b/include/linux/mfd/dbx500-prcmu.h
@@ -12,6 +12,10 @@
12#include <linux/notifier.h> 12#include <linux/notifier.h>
13#include <linux/err.h> 13#include <linux/err.h>
14 14
15/* Offset for the firmware version within the TCPM */
16#define DB8500_PRCMU_FW_VERSION_OFFSET 0xA4
17#define DBX540_PRCMU_FW_VERSION_OFFSET 0xA8
18
15/* PRCMU Wakeup defines */ 19/* PRCMU Wakeup defines */
16enum prcmu_wakeup_index { 20enum prcmu_wakeup_index {
17 PRCMU_WAKEUP_INDEX_RTC, 21 PRCMU_WAKEUP_INDEX_RTC,
@@ -214,6 +218,48 @@ enum ddr_pwrst {
214 DDR_PWR_STATE_OFFHIGHLAT = 0x03 218 DDR_PWR_STATE_OFFHIGHLAT = 0x03
215}; 219};
216 220
221#define DB8500_PRCMU_LEGACY_OFFSET 0xDD4
222
223struct prcmu_pdata
224{
225 bool enable_set_ddr_opp;
226 bool enable_ape_opp_100_voltage;
227 struct ab8500_platform_data *ab_platdata;
228 u32 version_offset;
229 u32 legacy_offset;
230 u32 adt_offset;
231};
232
233#define PRCMU_FW_PROJECT_U8500 2
234#define PRCMU_FW_PROJECT_U8400 3
235#define PRCMU_FW_PROJECT_U9500 4 /* Customer specific */
236#define PRCMU_FW_PROJECT_U8500_MBB 5
237#define PRCMU_FW_PROJECT_U8500_C1 6
238#define PRCMU_FW_PROJECT_U8500_C2 7
239#define PRCMU_FW_PROJECT_U8500_C3 8
240#define PRCMU_FW_PROJECT_U8500_C4 9
241#define PRCMU_FW_PROJECT_U9500_MBL 10
242#define PRCMU_FW_PROJECT_U8500_MBL 11 /* Customer specific */
243#define PRCMU_FW_PROJECT_U8500_MBL2 12 /* Customer specific */
244#define PRCMU_FW_PROJECT_U8520 13
245#define PRCMU_FW_PROJECT_U8420 14
246#define PRCMU_FW_PROJECT_A9420 20
247/* [32..63] 9540 and derivatives */
248#define PRCMU_FW_PROJECT_U9540 32
249/* [64..95] 8540 and derivatives */
250#define PRCMU_FW_PROJECT_L8540 64
251/* [96..126] 8580 and derivatives */
252#define PRCMU_FW_PROJECT_L8580 96
253
254#define PRCMU_FW_PROJECT_NAME_LEN 20
255struct prcmu_fw_version {
256 u32 project; /* Notice, project shifted with 8 on ux540 */
257 u8 api_version;
258 u8 func_version;
259 u8 errata;
260 char project_name[PRCMU_FW_PROJECT_NAME_LEN];
261};
262
217#include <linux/mfd/db8500-prcmu.h> 263#include <linux/mfd/db8500-prcmu.h>
218 264
219#if defined(CONFIG_UX500_SOC_DB8500) 265#if defined(CONFIG_UX500_SOC_DB8500)