mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
soc: qcom: eud: Fix enable status for secure mode
Currently, the EUD driver performs the check if bootloaders have already enabled the EUD hardware by doing a logical OR of EUD_CSR_EUD_EN (non-secure) and EUD_EUD_EN2 (secure), even if the driver is configured to work in secure mode, which is incorrect. Hence, check the status of the EUD hardware by only looking at the respective register for that particular mode. Change-Id: I9f005557ddb10e304fa5da723b13c1f1108d1a6f Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
This commit is contained in:
parent
04dae11da1
commit
5702e2b044
1 changed files with 4 additions and 3 deletions
|
|
@ -107,12 +107,13 @@ static int msm_eud_hw_is_enabled(struct platform_device *pdev)
|
|||
if (ret) {
|
||||
dev_err(&pdev->dev,
|
||||
"qcom_scm_io_readl failed with rc: %d\n", ret);
|
||||
sec_eud_enabled = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return sec_eud_enabled;
|
||||
}
|
||||
|
||||
return (sec_eud_enabled & BIT(0)) ||
|
||||
(readl_relaxed(chip->eud_reg_base + EUD_REG_CSR_EUD_EN) & BIT(0));
|
||||
return readl_relaxed(chip->eud_reg_base + EUD_REG_CSR_EUD_EN) & BIT(0);
|
||||
}
|
||||
|
||||
static int check_eud_mode_mgr2(struct eud_chip *chip)
|
||||
|
|
|
|||
Loading…
Reference in a new issue