summaryrefslogtreecommitdiff
path: root/firmware/export/pp5020.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-07-31 06:07:59 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-07-31 06:07:59 +0000
commit47bc31a174fff4981814186dd6dde3f729ae2d06 (patch)
tree66cd799eadee046e5777c56d53daea43c83faec4 /firmware/export/pp5020.h
parentdf4f56b2b0a5343fb40cc749b24897f239c76be7 (diff)
downloadrockbox-47bc31a174fff4981814186dd6dde3f729ae2d06.tar.gz
rockbox-47bc31a174fff4981814186dd6dde3f729ae2d06.zip
PP502x: Add some important information about CPU/COP_CTL register to the header gleaned from a PP5022C. Maybe it's all wrong. :P
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14088 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/pp5020.h')
-rw-r--r--firmware/export/pp5020.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/firmware/export/pp5020.h b/firmware/export/pp5020.h
index 108b776523..873d5c849e 100644
--- a/firmware/export/pp5020.h
+++ b/firmware/export/pp5020.h
@@ -141,8 +141,33 @@
141#define CPU_CTL (*(volatile unsigned long *)(0x60007000)) 141#define CPU_CTL (*(volatile unsigned long *)(0x60007000))
142#define COP_CTL (*(volatile unsigned long *)(0x60007004)) 142#define COP_CTL (*(volatile unsigned long *)(0x60007004))
143 143
144#define PROC_SLEEP 0x80000000 144#define PROC_SLEEP 0x80000000
145#define PROC_WAKE 0x0 145#define PROC_WAIT 0x40000000
146#define PROC_WAIT_CLR 0x20000000
147#define PROC_CNT_START 0x08000000
148#define PROC_WAKE 0x00000000
149/**
150 * This is based on some quick but sound experiments on PP5022C.
151 * CPU/COP_CTL bitmap:
152 * [31] - sleep until an interrupt occurs
153 * [30] - wait for cycle countdown to 0
154 * [29] - wait for cycle countdown to 0
155 * behaves identically to bit 30 unless bit 30 is set as well
156 * in which case this bit is cleared at the end of the count
157 * [28] - unknown - no execution effect observed yet
158 * [27] - begin cycle countdown
159 * [26:8] - semaphore flags for core communication ?
160 * no execution effect observed yet
161 * [11:8] seem to often be set to the core's own ID
162 * nybble when sleeping - 0x5 or 0xa.
163 * [7:0] - W: number of cycles to skip on next instruction
164 * R: cycles remaining
165 * Executing on CPU
166 * CPU_CTL = 0x68000080
167 * nop
168 * stalls the nop for 128 cycles
169 * Reading CPU_CTL after the nop will return 0x48000000
170 */
146 171
147/* Cache Control */ 172/* Cache Control */
148#define CACHE_CTL (*(volatile unsigned long *)(0x6000c000)) 173#define CACHE_CTL (*(volatile unsigned long *)(0x6000c000))