summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-02-05 16:31:30 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-02-06 15:35:54 +0100
commit93d4d06574ca25df0376cd2e96554d104584d88a (patch)
tree009b574ee0a40792d212c4db65d2e917ab94c42e /c
parentrtems: Revert documentation changes (diff)
downloadrtems-93d4d06574ca25df0376cd2e96554d104584d88a.tar.bz2
bsp/mpc55xx: Add mpc55xx_mmu_apply_config()
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libcpu/powerpc/mpc55xx/include/mpc55xx.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/c/src/lib/libcpu/powerpc/mpc55xx/include/mpc55xx.h b/c/src/lib/libcpu/powerpc/mpc55xx/include/mpc55xx.h
index e7bb83995a..b1b625c95b 100644
--- a/c/src/lib/libcpu/powerpc/mpc55xx/include/mpc55xx.h
+++ b/c/src/lib/libcpu/powerpc/mpc55xx/include/mpc55xx.h
@@ -42,9 +42,10 @@
#ifndef LIBCPU_POWERPC_MPC55XX_H
#define LIBCPU_POWERPC_MPC55XX_H
-#include <stddef.h>
-
#include <mpc55xx/regs.h>
+#include <mpc55xx/regs-mmu.h>
+
+#include <libcpu/powerpc-utility.h>
#ifdef __cplusplus
extern "C" {
@@ -138,6 +139,15 @@ static inline mpc55xx_wait_for_interrupt(void)
#endif
}
+static inline void mpc55xx_mmu_apply_config(const struct MMU_tag *config)
+{
+ PPC_SET_SPECIAL_PURPOSE_REGISTER(FSL_EIS_MAS0, config->MAS0.R);
+ PPC_SET_SPECIAL_PURPOSE_REGISTER(FSL_EIS_MAS1, config->MAS1.R);
+ PPC_SET_SPECIAL_PURPOSE_REGISTER(FSL_EIS_MAS2, config->MAS2.R);
+ PPC_SET_SPECIAL_PURPOSE_REGISTER(FSL_EIS_MAS3, config->MAS3.R);
+ __asm__ volatile ("tlbwe");
+}
+
#ifdef __cplusplus
}
#endif /* __cplusplus */