mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
soc: qcom: Add support to enable eud if enabled in xbl
If eud driver is enabled in xbl, there was a explicit need to enable eud from hlos side also. This change enables eud if eud_mode_manager2 register is set. Change-Id: I72a8560a7fd8dfa4eaed7895bb423a867ab90e91 Signed-off-by: Komal Bajaj <kbajaj@codeaurora.org>
This commit is contained in:
parent
e21e07439d
commit
b16a703556
1 changed files with 12 additions and 1 deletions
|
|
@ -90,6 +90,14 @@ static int enable;
|
|||
static bool eud_ready;
|
||||
static struct platform_device *eud_private;
|
||||
|
||||
static int check_eud_mode_mgr2(struct eud_chip *chip)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
qcom_scm_io_readl(chip->eud_mode_mgr2_phys_base, &val);
|
||||
return val & BIT(0);
|
||||
}
|
||||
|
||||
static void enable_eud(struct platform_device *pdev)
|
||||
{
|
||||
struct eud_chip *priv = platform_get_drvdata(pdev);
|
||||
|
|
@ -103,7 +111,7 @@ static void enable_eud(struct platform_device *pdev)
|
|||
priv->eud_reg_base + EUD_REG_INT1_EN_MASK);
|
||||
|
||||
/* Enable secure eud if supported */
|
||||
if (priv->secure_eud_en) {
|
||||
if (priv->secure_eud_en && !check_eud_mode_mgr2(priv)) {
|
||||
ret = qcom_scm_io_writel(priv->eud_mode_mgr2_phys_base +
|
||||
EUD_REG_EUD_EN2, EUD_ENABLE_CMD);
|
||||
if (ret)
|
||||
|
|
@ -601,6 +609,9 @@ static int msm_eud_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
chip->eud_mode_mgr2_phys_base = res->start;
|
||||
|
||||
if (check_eud_mode_mgr2(chip))
|
||||
enable = 1;
|
||||
}
|
||||
|
||||
chip->need_phy_clk_vote = of_property_read_bool(pdev->dev.of_node,
|
||||
|
|
|
|||
Loading…
Reference in a new issue