summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c')
-rw-r--r--c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c
index 32061a9545..4f2f616184 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c
@@ -135,13 +135,19 @@ void bsp_start(void)
/*
* Enable instruction and data caches. Do not force writethrough mode.
*/
- #ifdef INSTRUCTION_CACHE_ENABLE
- rtems_cache_enable_instruction();
- #endif
-
- #ifdef DATA_CACHE_ENABLE
- rtems_cache_enable_data();
- #endif
+#if NVRAM_CONFIGURE == 1
+ if ( nvram->cache_mode & 0x02 )
+ rtems_cache_enable_instruction();
+ if ( nvram->cache_mode & 0x01 )
+ rtems_cache_enable_data();
+#else
+#ifdef INSTRUCTION_CACHE_ENABLE
+ rtems_cache_enable_instruction();
+#endif
+#ifdef DATA_CACHE_ENABLE
+ rtems_cache_enable_data();
+#endif
+#endif
/*
* Allocate the memory for the RTEMS Work Space. This can come from