summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-08-25 17:24:49 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-08-25 17:24:49 +0000
commit00ff4cd6ac02a24f2c18d12a283edfc2144ef8a4 (patch)
tree8a38d4346d94d491f13d4bed8012f1fe2f3fea24 /c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c
parent2000-08-11 Charles-Antoine Gauthier <charles.gauthier@nrc.ca> (diff)
downloadrtems-00ff4cd6ac02a24f2c18d12a283edfc2144ef8a4.tar.bz2
2000-08-11 Charles-Antoine Gauthier <charles.gauthier@nrc.ca>
* README: * console/console.c: * include/bsp.h: * network/network.c: * startup/bspstart.c: Add support for configuration parameters in NVRAM
Diffstat (limited to '')
-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