diff options
author | Vitja Makarov <vitja.makarov@gmail.com> | 2009-09-18 05:48:37 +0000 |
---|---|---|
committer | Vitja Makarov <vitja.makarov@gmail.com> | 2009-09-18 05:48:37 +0000 |
commit | 36e8fc08726fcf40071aad48f20df004d9c499ef (patch) | |
tree | da5b5cb31dbbbdadf0534ec4b2b046cea17d2aaf /firmware/target/arm/tcc77x/system-target.h | |
parent | 05fd9ee182a6a9147bd2fe285ee91307e6620c96 (diff) | |
download | rockbox-36e8fc08726fcf40071aad48f20df004d9c499ef.tar.gz rockbox-36e8fc08726fcf40071aad48f20df004d9c499ef.zip |
tcc77x: add tcc77x_cscfg_bw() helper for external memory bus width setup
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22729 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tcc77x/system-target.h')
-rw-r--r-- | firmware/target/arm/tcc77x/system-target.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/firmware/target/arm/tcc77x/system-target.h b/firmware/target/arm/tcc77x/system-target.h index 55dd52ef47..beeeac05c6 100644 --- a/firmware/target/arm/tcc77x/system-target.h +++ b/firmware/target/arm/tcc77x/system-target.h | |||
@@ -43,4 +43,17 @@ static inline void udelay(unsigned usecs) | |||
43 | while (TIME_BEFORE(USEC_TIMER, stop)); | 43 | while (TIME_BEFORE(USEC_TIMER, stop)); |
44 | } | 44 | } |
45 | 45 | ||
46 | |||
47 | #define TCC77X_CSCFG_BW8 0 | ||
48 | #define TCC77X_CSCFG_BW16 1 | ||
49 | |||
50 | /* Due to hardware bug or "feature" this hack is needed to set bus width bits */ | ||
51 | static inline | ||
52 | unsigned long tcc77x_cscfg_bw(int bw) { | ||
53 | if (bw == TCC77X_CSCFG_BW8) | ||
54 | return (((MCFG >> 11) & 3) ^ 3) << 28; | ||
55 | else | ||
56 | return (((MCFG >> 11) & 3) ^ 2) << 28; | ||
57 | } | ||
58 | |||
46 | #endif /* SYSTEM_TARGET_H */ | 59 | #endif /* SYSTEM_TARGET_H */ |