mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
SAMA5: More cache and mmu inline utility functions
This commit is contained in:
@@ -43,7 +43,8 @@
|
|||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "sctlr.h"
|
#include "mmu.h"
|
||||||
|
#include "cache.h"
|
||||||
#include "sam_periphclks.h"
|
#include "sam_periphclks.h"
|
||||||
#include "chip/sam_hsmc.h"
|
#include "chip/sam_hsmc.h"
|
||||||
|
|
||||||
@@ -120,11 +121,15 @@ int nor_main(int argc, char *argv)
|
|||||||
* virtual addressing.
|
* virtual addressing.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if 0 /* Causes a crash */
|
#if 0 /* Causes crashes */
|
||||||
printf("Disabling the caches and the MMU\n");
|
cp15_disable_mmu();
|
||||||
regval = cp15_rdsctlr();
|
cp15_disable_caches();
|
||||||
regval &= ~(SCTLR_M | SCTLR_C | SCTLR_I);
|
|
||||||
cp15_wrsctlr(regval);
|
/* Invalidate caches and TLBs */
|
||||||
|
|
||||||
|
cp15_invalidate_icache();
|
||||||
|
cp15_invalidate_dcache_all();
|
||||||
|
cp15_invalidate_tlbs();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SAMA5_NOR_START
|
#ifdef SAMA5_NOR_START
|
||||||
|
|||||||
Reference in New Issue
Block a user