mimxrt1050: check if D-cache is enabled before enabling it.

An issue has been confirmed in CMSIS core header file in
SCB_EnableDCache when stack is in cacheable memory.

Issue report: https://github.com/ARM-software/CMSIS_5/issues/331

To workaround this issue by checking if Dcache's been enabled before
trying to enable it.

Signed-off-by: Ryan QIAN <jianghao.qian@nxp.com>
This commit is contained in:
Ryan QIAN 2018-05-14 07:54:53 +08:00 committed by Maureen Helm
commit 5c6a3991b5

View file

@ -131,7 +131,9 @@ static int imxrt_init(struct device *arg)
}
SCB_EnableICache();
if (!(SCB->CCR & SCB_CCR_DC_Msk)) {
SCB_EnableDCache();
}
_ClearFaults();