diff options
author | Thom Johansen <thomj@rockbox.org> | 2005-09-07 00:24:27 +0000 |
---|---|---|
committer | Thom Johansen <thomj@rockbox.org> | 2005-09-07 00:24:27 +0000 |
commit | 735208a541df024f1cd3b9624054b6ed9724ad1e (patch) | |
tree | 01b8b91e8f473207553e2c94a5f6f00a6f60f3b4 /firmware/export/system.h | |
parent | 4cd06c41f62c217681ec91557e89dc4461bab6d3 (diff) | |
download | rockbox-735208a541df024f1cd3b9624054b6ed9724ad1e.tar.gz rockbox-735208a541df024f1cd3b9624054b6ed9724ad1e.zip |
Adapted codecs and DSP system to having MACSR saved in thread context.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7485 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/system.h')
-rw-r--r-- | firmware/export/system.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h index 895b3f7529..07b7094615 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h | |||
@@ -125,8 +125,21 @@ enum { | |||
125 | : /* %0 */ "d"(mask), \ | 125 | : /* %0 */ "d"(mask), \ |
126 | /* %1 */ "a"(address)) | 126 | /* %1 */ "a"(address)) |
127 | 127 | ||
128 | static inline void mcf5249_init_mac(void) { | 128 | #define EMAC_ROUND 0x10 |
129 | asm volatile ("move.l #0x20, %macsr;"); /* frac, truncate, no saturation */ | 129 | #define EMAC_FRACTIONAL 0x20 |
130 | #define EMAC_SATURATE 0x80 | ||
131 | |||
132 | static inline void coldfire_set_macsr(const unsigned long flags) | ||
133 | { | ||
134 | asm volatile ("move.l %0, %%macsr" : : "r" (flags)); | ||
135 | } | ||
136 | |||
137 | static inline unsigned long coldfire_get_macsr(void) | ||
138 | { | ||
139 | unsigned long m; | ||
140 | |||
141 | asm volatile ("move.l %%macsr, %0" : "=r" (m)); | ||
142 | return m; | ||
130 | } | 143 | } |
131 | 144 | ||
132 | #endif | 145 | #endif |