diff options
author | Amaury Pouly <pamaury@rockbox.org> | 2010-06-14 23:01:30 +0000 |
---|---|---|
committer | Amaury Pouly <pamaury@rockbox.org> | 2010-06-14 23:01:30 +0000 |
commit | 1d4dc9b3b0f094a70463395138fc920e5107eabc (patch) | |
tree | 680bc8497ed969b2a04c943a3abcadb5e9909842 | |
parent | 7ee0983a876d9dde65b207e1d45d1e8bd9ac54c8 (diff) | |
download | rockbox-1d4dc9b3b0f094a70463395138fc920e5107eabc.tar.gz rockbox-1d4dc9b3b0f094a70463395138fc920e5107eabc.zip |
cowond2: make sure the i2c delay loop code is actually generated by the eabi compiler.
This fix adds one nop instruction per loop (there were 3 before) and so i2c will be slightly slower, but this hardly a problem.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26850 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/arm/i2c-telechips.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/target/arm/i2c-telechips.c b/firmware/target/arm/i2c-telechips.c index 9226617b14..35f4cd41c5 100644 --- a/firmware/target/arm/i2c-telechips.c +++ b/firmware/target/arm/i2c-telechips.c | |||
@@ -28,8 +28,10 @@ | |||
28 | static inline void delay_loop(void) | 28 | static inline void delay_loop(void) |
29 | { | 29 | { |
30 | unsigned long x; | 30 | unsigned long x; |
31 | for (x = (unsigned)(FREQ>>22); x; x--); | 31 | for (x = (unsigned)(FREQ>>22); x; x--) |
32 | asm volatile("nop"); | ||
32 | } | 33 | } |
34 | |||
33 | #define DELAY delay_loop() | 35 | #define DELAY delay_loop() |
34 | 36 | ||
35 | static struct mutex i2c_mtx; | 37 | static struct mutex i2c_mtx; |