mimxrt1050: check if D-cache is enabled before enabling it.
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 <2b595118af81fbe952891b31ac232d6141ed7b0b@nxp.com>

zephyriot/zephyr,punitvara/zephyr,Vudentz/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,mbolivar/zephyr,kraj/zephyr,ldts/zephyr,ldts/zephyr,GiulianoFranchetto/zephyr,nashif/zephyr,GiulianoFranchetto/zephyr,finikorg/zephyr,mbolivar/zephyr,galak/zephyr,punitvara/zephyr,punitvara/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,mbolivar/zephyr,mbolivar/zephyr,punitvara/zephyr,zephyriot/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,mbolivar/zephyr,nashif/zephyr,zephyriot/zephyr,GiulianoFranchetto/zephyr,Vudentz/zephyr,explora26/zephyr,Vudentz/zephyr,GiulianoFranchetto/zephyr,ldts/zephyr,kraj/zephyr,explora26/zephyr,kraj/zephyr,finikorg/zephyr,ldts/zephyr,punitvara/zephyr,explora26/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,Vudentz/zephyr,kraj/zephyr,finikorg/zephyr,galak/zephyr,GiulianoFranchetto/zephyr,zephyriot/zephyr,galak/zephyr,galak/zephyr,ldts/zephyr,nashif/zephyr,kraj/zephyr,explora26/zephyr,galak/zephyr,zephyriot/zephyr,finikorg/zephyr,explora26/zephyr