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>
This commit is contained in:
Mattias Nilsson
2012-01-13 16:20:10 +01:00
committed by Samuel Ortiz
parent c72fe851df
commit b58d12fe6c
2 changed files with 51 additions and 18 deletions

View File

@@ -493,6 +493,18 @@ struct prcmu_auto_pm_config {
u8 sva_policy;
};
#define PRCMU_FW_PROJECT_U8500 2
#define PRCMU_FW_PROJECT_U9500 4
#define PRCMU_FW_PROJECT_U8500_C2 7
#define PRCMU_FW_PROJECT_U9500_C2 11
struct prcmu_fw_version {
u8 project;
u8 api_version;
u8 func_version;
u8 errata;
};
#ifdef CONFIG_MFD_DB8500_PRCMU
void db8500_prcmu_early_init(void);
@@ -502,6 +514,7 @@ enum ap_pwrst prcmu_get_xp70_current_state(void);
bool prcmu_has_arm_maxopp(void);
int prcmu_set_ape_opp(u8 opp);
int prcmu_get_ape_opp(void);
struct prcmu_fw_version *prcmu_get_fw_version(void);
int prcmu_request_ape_opp_100_voltage(bool enable);
int prcmu_release_usb_wakeup_state(void);
int prcmu_set_ddr_opp(u8 opp);
@@ -573,6 +586,11 @@ static inline bool prcmu_has_arm_maxopp(void)
return false;
}
static inline struct prcmu_fw_version *prcmu_get_fw_version(void)
{
return NULL;
}
static inline int prcmu_set_ape_opp(u8 opp)
{
return 0;