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.zip rockbox-3674af64417b911ce69539abeb6b99e3875b1a90.tar.gz rockbox-3674af64417b911ce69539abeb6b99e3875b1a90.tar.bz2 rockbox-3674af64417b911ce69539abeb6b99e3875b1a90.tar.xz | |
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 1393bc8..cb9846a 100644 --- a/firmware/target/coldfire/crt0.S +++ b/firmware/target/coldfire/crt0.S @@ -218,14 +218,15 @@ start: move.l #0x01000000,%d0 movec.l %d0,%cacr - /* Enable cache, default=non-cacheable, buffered writes */ - move.l #0x80000100,%d0 + /* Enable cache, default=non-cacheable, no buffered writes */ + move.l #0x80000000,%d0 movec.l %d0,%cacr /* Cache enabled in SDRAM only, buffered writes enabled */ move.l #0x3103c020,%d0 movec.l %d0,%acr0 - moveq.l #0,%d0 + /* Buffered writes enabled for the LCD */ + move.l #0xf000c060,%d0 movec.l %d0,%acr1 #ifndef BOOTLOADER diff --git a/firmware/target/coldfire/iriver/h100/adc-h100.c b/firmware/target/coldfire/iriver/h100/adc-h100.c index 0c14d7b..40fcc89 100644 --- a/firmware/target/coldfire/iriver/h100/adc-h100.c +++ b/firmware/target/coldfire/iriver/h100/adc-h100.c @@ -37,7 +37,7 @@ ({ \ int _x_; \ asm volatile ( \ - "move.l #13, %[_x_] \r\n" \ + "move.l #11, %[_x_] \r\n" \ "1: \r\n" \ "subq.l #1, %[_x_] \r\n" \ "bhi.b 1b \r\n" \ diff --git a/firmware/target/coldfire/pcf50606-coldfire.c b/firmware/target/coldfire/pcf50606-coldfire.c index 3c1f402..d57b249 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; void pcf50606_i2c_recalc_delay(int cpu_clock) { - i2c_delay = MAX(cpu_clock / (400000*2*3) - 5, 1); + i2c_delay = MAX(cpu_clock / (400000*2*3) - 7, 1); } inline void pcf50606_i2c_start(void) diff --git a/firmware/target/coldfire/system-target.h b/firmware/target/coldfire/system-target.h index 706ecf6..8e3a2a3 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) { asm volatile ("move.l #0x01000000,%d0\n" "movec.l %d0,%cacr\n" - "move.l #0x80000100,%d0\n" + "move.l #0x80000000,%d0\n" "movec.l %d0,%cacr"); } |