summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-04-12 23:55:30 +0000
committerJens Arnold <amiconn@rockbox.org>2008-04-12 23:55:30 +0000
commitd055ffe715458267c4f5fdfc43807268a9da68d8 (patch)
treec738bfb85bd39e18f9a05b695c65048de5b09ab5 /firmware
parent9a946f602234b3ede29c88d67344852a68c0647f (diff)
downloadrockbox-d055ffe715458267c4f5fdfc43807268a9da68d8.tar.gz
rockbox-d055ffe715458267c4f5fdfc43807268a9da68d8.tar.bz2
rockbox-d055ffe715458267c4f5fdfc43807268a9da68d8.zip
Refine information and macros for clock skipping. Not functional changes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17091 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/pp5020.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/firmware/export/pp5020.h b/firmware/export/pp5020.h
index bda466527c..163511928d 100644
--- a/firmware/export/pp5020.h
+++ b/firmware/export/pp5020.h
@@ -162,23 +162,21 @@
#define COP_CTL (*(volatile unsigned long *)(0x60007004))
#define PROC_CTL(core) ((&CPU_CTL)[core])
-#define PROC_SLEEP 0x80000000
-#define PROC_WAIT 0x40000000
-#define PROC_WAIT_CLR 0x20000000
-#define PROC_CNT_START 0x08000000
+/* Control flags, can be ORed together */
+#define PROC_SLEEP 0x80000000 /* Sleep until an interrupt occurs */
+#define PROC_WAIT_CNT 0x40000000 /* Sleep until end of countdown */
+#define PROC_WAKE_INT 0x20000000 /* Fire interrupt on wake-up. Auto-clears. */
+
+/* Counter source, select one */
+#define PROC_CNT_CLKS 0x08000000 /* Clock cycles */
+#define PROC_CNT_USEC 0x02000000 /* Microseconds */
+#define PROC_CNT_MSEC 0x01000000 /* Milliseconds */
+#define PROC_CNT_SEC 0x00800000 /* Seconds. Works on PP5022+ only! */
+
#define PROC_WAKE 0x00000000
+
/**
- * This is based on some quick but sound experiments on PP5022C.
- * CPU/COP_CTL bitmap:
- * [31] - sleep until an interrupt occurs
- * [30] - wait for cycle countdown to 0
- * [29] - wait for cycle countdown to 0
- * behaves identically to bit 30 unless bit 30 is set as well
- * in which case this bit is cleared at the end of the count
- * [28] - unknown - no execution effect observed yet
- * [27] - begin cycle countdown
- * [26:8] - semaphore flags for core communication ?
- * no execution effect observed yet
+ * [22:8] - Semaphore flags for core communication? No execution effect observed
* [11:8] seem to often be set to the core's own ID
* nybble when sleeping - 0x5 or 0xa.
* [7:0] - W: number of cycles to skip on next instruction
@@ -190,6 +188,7 @@
* Reading CPU_CTL after the nop will return 0x48000000
*/
+
/* Cache Control */
#define CACHE_PRIORITY (*(volatile unsigned long *)(0x60006044))
#define CACHE_CTL (*(volatile unsigned long *)(0x6000c000))