summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2005-09-07 00:24:27 +0000
committerThom Johansen <thomj@rockbox.org>2005-09-07 00:24:27 +0000
commit735208a541df024f1cd3b9624054b6ed9724ad1e (patch)
tree01b8b91e8f473207553e2c94a5f6f00a6f60f3b4 /firmware
parent4cd06c41f62c217681ec91557e89dc4461bab6d3 (diff)
downloadrockbox-735208a541df024f1cd3b9624054b6ed9724ad1e.tar.gz
rockbox-735208a541df024f1cd3b9624054b6ed9724ad1e.tar.bz2
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')
-rw-r--r--firmware/export/system.h17
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 {
: /* %0 */ "d"(mask), \
/* %1 */ "a"(address))
-static inline void mcf5249_init_mac(void) {
- asm volatile ("move.l #0x20, %macsr;"); /* frac, truncate, no saturation */
+#define EMAC_ROUND 0x10
+#define EMAC_FRACTIONAL 0x20
+#define EMAC_SATURATE 0x80
+
+static inline void coldfire_set_macsr(const unsigned long flags)
+{
+ asm volatile ("move.l %0, %%macsr" : : "r" (flags));
+}
+
+static inline unsigned long coldfire_get_macsr(void)
+{
+ unsigned long m;
+
+ asm volatile ("move.l %%macsr, %0" : "=r" (m));
+ return m;
}
#endif