mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
board: ipq5332: dload register access update
These changes access TCSR register reading via SCM, based on feature availability. Reading will happen either via scm or legacy direct read. Change-Id: Ia5eb97bce6677843ddea25ce767762e6fd831283 Signed-off-by: Hariharan K <quic_harihk@quicinc.com>
This commit is contained in:
parent
cb261702f3
commit
fdec178034
1 changed files with 26 additions and 2 deletions
|
|
@ -921,8 +921,32 @@ __weak int ipq_get_tz_version(char *version_name, int buf_size)
|
|||
|
||||
int ipq_read_tcsr_boot_misc(void)
|
||||
{
|
||||
u32 *dmagic = TCSR_BOOT_MISC_REG;
|
||||
return *dmagic;
|
||||
u32 dmagic;
|
||||
int ret;
|
||||
long feat_avail;
|
||||
|
||||
/* The TCSR dload register is protected in latest TZ.
|
||||
* Old TZ will allow direct read.
|
||||
* Use the qca_scm_is_feature_available() call to know
|
||||
* if TZ supports direct or scm read. Based on return
|
||||
* value, read the TCSR dload register appropriately.
|
||||
*/
|
||||
feat_avail = qca_scm_is_feature_available(0x6);
|
||||
if (feat_avail == 0x401000) {
|
||||
if (is_scm_armv8()) {
|
||||
ret = qca_scm_call_read(SCM_SVC_IO, SCM_IO_READ,
|
||||
TCSR_BOOT_MISC_REG, &dmagic);
|
||||
if (ret)
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
dmagic = *(TCSR_BOOT_MISC_REG);
|
||||
}
|
||||
|
||||
return dmagic;
|
||||
}
|
||||
|
||||
int apps_iscrashed_crashdump_disabled(void)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue