[rtems commit] bsp/mpc55xx: Add BSP_DATA_CACHE_USE_WRITE_THROUGH
Sebastian Huber
sebh at rtems.org
Mon Jan 28 15:43:03 UTC 2013
Module: rtems
Branch: master
Commit: c934a10dba246ef00390dbe64b75a966344dcf6b
Changeset: http://git.rtems.org/rtems/commit/?id=c934a10dba246ef00390dbe64b75a966344dcf6b
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Jan 11 14:41:53 2013 +0100
bsp/mpc55xx: Add BSP_DATA_CACHE_USE_WRITE_THROUGH
---
c/src/lib/libbsp/powerpc/mpc55xxevb/configure.ac | 5 +++++
.../powerpc/mpc55xxevb/startup/start-config-mmu.c | 6 +++++-
c/src/lib/libbsp/powerpc/shared/src/memcpy.c | 4 +++-
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/configure.ac b/c/src/lib/libbsp/powerpc/mpc55xxevb/configure.ac
index e691b36..63f6a91 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/configure.ac
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/configure.ac
@@ -32,6 +32,11 @@ RTEMS_BSPOPTS_SET_INSTRUCTION_CACHE_ENABLED([gwlcfm],[])
RTEMS_BSPOPTS_SET_INSTRUCTION_CACHE_ENABLED([*],[1])
RTEMS_BSPOPTS_HELP_INSTRUCTION_CACHE_ENABLED
+RTEMS_BSPOPTS_SET([BSP_DATA_CACHE_USE_WRITE_THROUGH],[mpc5674f_ecu508*],[1])
+RTEMS_BSPOPTS_SET([BSP_DATA_CACHE_USE_WRITE_THROUGH],[*],[])
+RTEMS_BSPOPTS_HELP([BSP_DATA_CACHE_USE_WRITE_THROUGH],
+[use write-through for data cache])
+
RTEMS_BSPOPTS_SET([PPC_EXC_CONFIG_USE_FIXED_HANDLER],[*],[1])
RTEMS_BSPOPTS_HELP([PPC_EXC_CONFIG_USE_FIXED_HANDLER],
[use fixed high-level exception handler])
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start-config-mmu.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start-config-mmu.c
index 787a85a..6289530 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start-config-mmu.c
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start-config-mmu.c
@@ -85,7 +85,11 @@ const struct MMU_tag mpc55xx_start_config_mmu [] = {
MPC55XX_MMU_TAG_INITIALIZER(9, 0x00100000, MPC55XX_MMU_1M, 1, 0, 1, 0),
MPC55XX_MMU_TAG_INITIALIZER(10, 0x00200000, MPC55XX_MMU_2M, 1, 0, 1, 0),
/* External SRAM 2M */
- MPC55XX_MMU_TAG_INITIALIZER(2, 0x20000000, MPC55XX_MMU_2M, 0, 1, 1, 0),
+ #ifndef BSP_DATA_CACHE_USE_WRITE_THROUGH
+ MPC55XX_MMU_TAG_INITIALIZER(2, 0x20000000, MPC55XX_MMU_2M, 0, 1, 1, 0),
+ #else
+ MPC55XX_MMU_TAG_INITIALIZER(2, 0x20000000, MPC55XX_MMU_2M, 0, 1, 1, 2),
+ #endif
/* Internal SRAM 256k */
MPC55XX_MMU_TAG_INITIALIZER(3, 0x40000000, MPC55XX_MMU_256K, 0, 1, 1, 0),
MPC55XX_MMU_TAG_INITIALIZER(11, 0x40020000, MPC55XX_MMU_64K, 0, 1, 1, 0),
diff --git a/c/src/lib/libbsp/powerpc/shared/src/memcpy.c b/c/src/lib/libbsp/powerpc/shared/src/memcpy.c
index e4ac292..9df0ffe 100644
--- a/c/src/lib/libbsp/powerpc/shared/src/memcpy.c
+++ b/c/src/lib/libbsp/powerpc/shared/src/memcpy.c
@@ -15,7 +15,9 @@
#include <bspopts.h>
#include <rtems/powerpc/powerpc.h>
-#if BSP_DATA_CACHE_ENABLED && PPC_CACHE_ALIGNMENT == 32
+#if BSP_DATA_CACHE_ENABLED \
+ && PPC_CACHE_ALIGNMENT == 32 \
+ && !defined(BSP_DATA_CACHE_USE_WRITE_THROUGH)
#include <string.h>
#include <stdint.h>
More information about the vc
mailing list