soc: same70: enable data cache on sam_e70
The Cortex-M7 CPU included in the SAM e70 SoCs has a data cache that significantly boost the performances. However the SAM GMAC Ethernet driver is using a scatter-gather technique to exchange data with the Ethernet driver. This requires the use use of a non-cached memory area. This is currently not supported on Zephyr, but support for it is being discussed in PR#11199. In the meantime, enable the data cache during the SoC initialization, unless the SAM GMAC Ethernet driver is enabled. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
b53c6c1fe3
commit
ae20f807da
1 changed files with 12 additions and 0 deletions
|
@ -229,6 +229,18 @@ static int atmel_same70_init(struct device *arg)
|
|||
|
||||
SCB_EnableICache();
|
||||
|
||||
/*
|
||||
* The Atmel SAM GMAC Ethernet driver is using a scatter-gather technique
|
||||
* to exchange data with the Ethernet driver. This requires the use use of
|
||||
* a non-cached memory area. This is currently not supported on Zephyr, so
|
||||
* do not enable the cache in that case.
|
||||
*/
|
||||
#ifndef CONFIG_ETH_SAM_GMAC
|
||||
if (!(SCB->CCR & SCB_CCR_DC_Msk)) {
|
||||
SCB_EnableDCache();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Clear all faults */
|
||||
_ClearFaults();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue