diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-03-14 11:47:48 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-03-14 11:47:48 +0000 |
commit | 26928f601f2072788e2a3340c25b2845e783b7f3 (patch) | |
tree | 2eba82fec74ea716f02685f2e5723bdeed52586b /os/ports | |
parent | 608c48ed3268bd93b5279f0c945ce127c90e8f95 (diff) | |
download | ChibiOS-26928f601f2072788e2a3340c25b2845e783b7f3.tar.gz ChibiOS-26928f601f2072788e2a3340c25b2845e783b7f3.tar.bz2 ChibiOS-26928f601f2072788e2a3340c25b2845e783b7f3.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5427 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ports')
-rw-r--r-- | os/ports/GCC/PPC/SPC564Axx/core.s | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/os/ports/GCC/PPC/SPC564Axx/core.s b/os/ports/GCC/PPC/SPC564Axx/core.s index 36b5575d6..92232a9fa 100644 --- a/os/ports/GCC/PPC/SPC564Axx/core.s +++ b/os/ports/GCC/PPC/SPC564Axx/core.s @@ -35,6 +35,15 @@ /** @} */
/**
+ * @name LICSR1 registers definitions
+ * @{
+ */
+#define LICSR1_ICE 0x00000001
+#define LICSR1_ICINV 0x00000002
+#define LICSR1_ICORG 0x00000010
+/** @} */
+
+/**
* @name BUCSR default settings
* @{
*/
@@ -42,6 +51,13 @@ /** @} */
/**
+ * @name LICSR1 default settings
+ * @{
+ */
+#define LICSR1_DEFAULT (LICSR1_ICE | LICSR1_ICORG)
+/** @} */
+
+/**
* @name MSR register definitions
* @{
*/
@@ -132,6 +148,18 @@ _coreinit: li %r3, BUCSR_DEFAULT
mtspr 1013, %r3 /* BUCSR */
+ /*
+ * Cache invalidated and then enabled.
+ */
+ li %r3, LICSR1_ICINV
+ mtspr 1011, %r3 /* LICSR1 */
+.inv: mfspr %r3, 1011 /* LICSR1 */
+ andi. %r3, %r3, LICSR1_ICINV
+ bne .inv
+ lis %r3, LICSR1_DEFAULT@h
+ ori %r3, %r3, LICSR1_DEFAULT@l
+ mtspr 1011, %r3 /* LICSR1 */
+
blr
/*
|