summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2010-06-14 23:01:30 +0000
committerAmaury Pouly <pamaury@rockbox.org>2010-06-14 23:01:30 +0000
commit1d4dc9b3b0f094a70463395138fc920e5107eabc (patch)
tree680bc8497ed969b2a04c943a3abcadb5e9909842 /firmware/target
parent7ee0983a876d9dde65b207e1d45d1e8bd9ac54c8 (diff)
downloadrockbox-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
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/i2c-telechips.c4
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 @@
28static inline void delay_loop(void) 28static 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
35static struct mutex i2c_mtx; 37static struct mutex i2c_mtx;