aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorMattias Nilsson <mattias.i.nilsson@stericsson.com>2012-01-13 10:20:10 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2012-03-06 12:46:31 -0500
commitb58d12fe6ccd16030e1a69b5c443075f7bed0f6d (patch)
tree13d9d0047374df218c92ed9f6080c20f1410f321 /include/linux/mfd
parentc72fe851df21603cd149320df49064eb2f903707 (diff)
mfd: Function for obtaining the db8500 prcmu firmware version
This patch exports a function that can be used to tell which version of the DB8500 PRCMU firmware is available, and revamps the firmware detection code a bit. Reviewed-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com> Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/db8500-prcmu.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
index 0dc9017272bc..18959171f446 100644
--- a/include/linux/mfd/db8500-prcmu.h
+++ b/include/linux/mfd/db8500-prcmu.h
@@ -493,6 +493,18 @@ struct prcmu_auto_pm_config {
493 u8 sva_policy; 493 u8 sva_policy;
494}; 494};
495 495
496#define PRCMU_FW_PROJECT_U8500 2
497#define PRCMU_FW_PROJECT_U9500 4
498#define PRCMU_FW_PROJECT_U8500_C2 7
499#define PRCMU_FW_PROJECT_U9500_C2 11
500
501struct prcmu_fw_version {
502 u8 project;
503 u8 api_version;
504 u8 func_version;
505 u8 errata;
506};
507
496#ifdef CONFIG_MFD_DB8500_PRCMU 508#ifdef CONFIG_MFD_DB8500_PRCMU
497 509
498void db8500_prcmu_early_init(void); 510void db8500_prcmu_early_init(void);
@@ -502,6 +514,7 @@ enum ap_pwrst prcmu_get_xp70_current_state(void);
502bool prcmu_has_arm_maxopp(void); 514bool prcmu_has_arm_maxopp(void);
503int prcmu_set_ape_opp(u8 opp); 515int prcmu_set_ape_opp(u8 opp);
504int prcmu_get_ape_opp(void); 516int prcmu_get_ape_opp(void);
517struct prcmu_fw_version *prcmu_get_fw_version(void);
505int prcmu_request_ape_opp_100_voltage(bool enable); 518int prcmu_request_ape_opp_100_voltage(bool enable);
506int prcmu_release_usb_wakeup_state(void); 519int prcmu_release_usb_wakeup_state(void);
507int prcmu_set_ddr_opp(u8 opp); 520int prcmu_set_ddr_opp(u8 opp);
@@ -573,6 +586,11 @@ static inline bool prcmu_has_arm_maxopp(void)
573 return false; 586 return false;
574} 587}
575 588
589static inline struct prcmu_fw_version *prcmu_get_fw_version(void)
590{
591 return NULL;
592}
593
576static inline int prcmu_set_ape_opp(u8 opp) 594static inline int prcmu_set_ape_opp(u8 opp)
577{ 595{
578 return 0; 596 return 0;