diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-10-17 20:45:13 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-10-17 20:45:13 +0000 |
commit | 3674af64417b911ce69539abeb6b99e3875b1a90 (patch) | |
tree | 6125777a6e6852fc4e5e7bf75fba77b1a404f060 | |
parent | 702600cbdb2a5ecf381c5e9533b302443eb45dce (diff) | |
download | rockbox-3674af64417b911ce69539abeb6b99e3875b1a90.tar.gz rockbox-3674af64417b911ce69539abeb6b99e3875b1a90.zip |
Coldfire: Partially revert buffered writes, and enable them explicitly for the LCD only. Turned out that with buffered writes enabled, reads after writes are not always serialized, which is a bad thing for I/O. Buffered writes to the LCD are safe because that's write-only. Fixes FS #7985. How come I didn't notice this earlier? :>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15173 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/coldfire/crt0.S | 7 | ||||
-rw-r--r-- | firmware/target/coldfire/iriver/h100/adc-h100.c | 2 | ||||
-rw-r--r-- | firmware/target/coldfire/pcf50606-coldfire.c | 2 | ||||
-rw-r--r-- | firmware/target/coldfire/system-target.h | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/firmware/target/coldfire/crt0.S b/firmware/target/coldfire/crt0.S index 1393bc8bbd..cb9846a63b 100644 --- a/firmware/target/coldfire/crt0.S +++ b/firmware/target/coldfire/crt0.S | |||
@@ -218,14 +218,15 @@ start: | |||
218 | move.l #0x01000000,%d0 | 218 | move.l #0x01000000,%d0 |
219 | movec.l %d0,%cacr | 219 | movec.l %d0,%cacr |
220 | 220 | ||
221 | /* Enable cache, default=non-cacheable, buffered writes */ | 221 | /* Enable cache, default=non-cacheable, no buffered writes */ |
222 | move.l #0x80000100,%d0 | 222 | move.l #0x80000000,%d0 |
223 | movec.l %d0,%cacr | 223 | movec.l %d0,%cacr |
224 | 224 | ||
225 | /* Cache enabled in SDRAM only, buffered writes enabled */ | 225 | /* Cache enabled in SDRAM only, buffered writes enabled */ |
226 | move.l #0x3103c020,%d0 | 226 | move.l #0x3103c020,%d0 |
227 | movec.l %d0,%acr0 | 227 | movec.l %d0,%acr0 |
228 | moveq.l #0,%d0 | 228 | /* Buffered writes enabled for the LCD */ |
229 | move.l #0xf000c060,%d0 | ||
229 | movec.l %d0,%acr1 | 230 | movec.l %d0,%acr1 |
230 | 231 | ||
231 | #ifndef BOOTLOADER | 232 | #ifndef BOOTLOADER |
diff --git a/firmware/target/coldfire/iriver/h100/adc-h100.c b/firmware/target/coldfire/iriver/h100/adc-h100.c index 0c14d7b338..40fcc8925d 100644 --- a/firmware/target/coldfire/iriver/h100/adc-h100.c +++ b/firmware/target/coldfire/iriver/h100/adc-h100.c | |||
@@ -37,7 +37,7 @@ | |||
37 | ({ \ | 37 | ({ \ |
38 | int _x_; \ | 38 | int _x_; \ |
39 | asm volatile ( \ | 39 | asm volatile ( \ |
40 | "move.l #13, %[_x_] \r\n" \ | 40 | "move.l #11, %[_x_] \r\n" \ |
41 | "1: \r\n" \ | 41 | "1: \r\n" \ |
42 | "subq.l #1, %[_x_] \r\n" \ | 42 | "subq.l #1, %[_x_] \r\n" \ |
43 | "bhi.b 1b \r\n" \ | 43 | "bhi.b 1b \r\n" \ |
diff --git a/firmware/target/coldfire/pcf50606-coldfire.c b/firmware/target/coldfire/pcf50606-coldfire.c index 3c1f402791..d57b249f0d 100644 --- a/firmware/target/coldfire/pcf50606-coldfire.c +++ b/firmware/target/coldfire/pcf50606-coldfire.c | |||
@@ -81,7 +81,7 @@ static int i2c_delay IDATA_ATTR = 44; | |||
81 | 81 | ||
82 | void pcf50606_i2c_recalc_delay(int cpu_clock) | 82 | void pcf50606_i2c_recalc_delay(int cpu_clock) |
83 | { | 83 | { |
84 | i2c_delay = MAX(cpu_clock / (400000*2*3) - 5, 1); | 84 | i2c_delay = MAX(cpu_clock / (400000*2*3) - 7, 1); |
85 | } | 85 | } |
86 | 86 | ||
87 | inline void pcf50606_i2c_start(void) | 87 | inline void pcf50606_i2c_start(void) |
diff --git a/firmware/target/coldfire/system-target.h b/firmware/target/coldfire/system-target.h index 706ecf6150..8e3a2a3d5a 100644 --- a/firmware/target/coldfire/system-target.h +++ b/firmware/target/coldfire/system-target.h | |||
@@ -155,7 +155,7 @@ static inline void invalidate_icache(void) | |||
155 | { | 155 | { |
156 | asm volatile ("move.l #0x01000000,%d0\n" | 156 | asm volatile ("move.l #0x01000000,%d0\n" |
157 | "movec.l %d0,%cacr\n" | 157 | "movec.l %d0,%cacr\n" |
158 | "move.l #0x80000100,%d0\n" | 158 | "move.l #0x80000000,%d0\n" |
159 | "movec.l %d0,%cacr"); | 159 | "movec.l %d0,%cacr"); |
160 | } | 160 | } |
161 | 161 | ||