summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-05-29 21:41:47 +0000
committerJens Arnold <amiconn@rockbox.org>2008-05-29 21:41:47 +0000
commitd52bea8a90a4888efae8a8716d0025d3f4238733 (patch)
tree9068db38feca238abc038e8e39126cda0135f2ad
parentc541e046325f97307f34b2e51ca7994126dd1969 (diff)
downloadrockbox-d52bea8a90a4888efae8a8716d0025d3f4238733.tar.gz
rockbox-d52bea8a90a4888efae8a8716d0025d3f4238733.zip
Fix FS #8840 for irivers by slowing down the driver some more. Signal quality is obviously varying a lot among the iriver remotes. Speed is now around halfway between pre-r16832 and r17006 when boosted.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17657 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/coldfire/iriver/lcd-remote-as-iriver.S28
-rw-r--r--firmware/target/coldfire/iriver/lcd-remote-iriver.c4
2 files changed, 24 insertions, 8 deletions
diff --git a/firmware/target/coldfire/iriver/lcd-remote-as-iriver.S b/firmware/target/coldfire/iriver/lcd-remote-as-iriver.S
index 0325e5176c..df7447a03a 100644
--- a/firmware/target/coldfire/iriver/lcd-remote-as-iriver.S
+++ b/firmware/target/coldfire/iriver/lcd-remote-as-iriver.S
@@ -81,31 +81,47 @@
81 eor.l %d6, %d0 /* invert data bit */ 81 eor.l %d6, %d0 /* invert data bit */
82 move.l %d0, (%a1) /* output data bit7 */ 82 move.l %d0, (%a1) /* output data bit7 */
83 nop 83 nop
84 nop
841: 851:
85 86
86.macro bit_out 87.macro bit_out
88 move.l %d2, (%a0) /* Bit7: set CLK = 1 */
89 nop
87 lsl.l #1, %d4 /* Invert data line for bit6 ? */ 90 lsl.l #1, %d4 /* Invert data line for bit6 ? */
88 bcc.s 1f /* no: skip */ 91 bcc.s 1f /* no: skip */
89 eor.l %d6, %d0 /* Invert data bit */ 92 eor.l %d6, %d0 /* Invert data bit */
90 move.l %d2, (%a0) /* Bit7: set CLK = 1 */
91 move.l %d1, (%a0) /* set CLK = 0 */ 93 move.l %d1, (%a0) /* set CLK = 0 */
92 move.l %d0, (%a1) /* Output data bit6 */ 94 move.l %d0, (%a1) /* Output data bit6 */
93 bra.s 2f /* slower than trapf.l - required here */ 95 .word 0x51fa /* trapf.w - shadow next insn */
941: /* else */ 961:
95 move.l %d2, (%a0) /* Bit7: set CLK = 1 */
96 move.l %d1, (%a0) /* set CLK = 0 */ 97 move.l %d1, (%a0) /* set CLK = 0 */
972:
98.endm 98.endm
99
99 bit_out 100 bit_out
101 nop
102 nop
100 bit_out 103 bit_out
104 nop
105 nop
101 bit_out 106 bit_out
107 nop
108 nop
102 bit_out 109 bit_out
110 nop
111 nop
103 bit_out 112 bit_out
113 nop
114 nop
104 bit_out 115 bit_out
116 nop
117 nop
105 bit_out 118 bit_out
119 nop
120 nop
106 121
107 nop /* Let data line settle */
108 move.l %d2, (%a0) /* Bit0: Set CLK = 1 */ 122 move.l %d2, (%a0) /* Bit0: Set CLK = 1 */
123 nop
124 nop
109 move.l %d1, (%a0) /* Set CLK = 0 */ 125 move.l %d1, (%a0) /* Set CLK = 0 */
110 126
111 move.w %d3, %sr /* Restore interrupt level */ 127 move.w %d3, %sr /* Restore interrupt level */
diff --git a/firmware/target/coldfire/iriver/lcd-remote-iriver.c b/firmware/target/coldfire/iriver/lcd-remote-iriver.c
index 83b7a022e5..e291771e90 100644
--- a/firmware/target/coldfire/iriver/lcd-remote-iriver.c
+++ b/firmware/target/coldfire/iriver/lcd-remote-iriver.c
@@ -299,7 +299,7 @@ void lcd_remote_update(void)
299 299
300#ifdef HAVE_REMOTE_LCD_TICKING 300#ifdef HAVE_REMOTE_LCD_TICKING
301 /* Adjust byte delay for emi reduction. */ 301 /* Adjust byte delay for emi reduction. */
302 remote_byte_delay = emireduce ? cpu_frequency / 192800 - 100: 0; 302 remote_byte_delay = emireduce ? cpu_frequency / 206200 - 85: 0;
303#endif 303#endif
304 304
305 /* Copy display bitmap to hardware */ 305 /* Copy display bitmap to hardware */
@@ -333,7 +333,7 @@ void lcd_remote_update_rect(int x, int y, int width, int height)
333 333
334#ifdef HAVE_REMOTE_LCD_TICKING 334#ifdef HAVE_REMOTE_LCD_TICKING
335 /* Adjust byte delay for emi reduction */ 335 /* Adjust byte delay for emi reduction */
336 remote_byte_delay = emireduce ? cpu_frequency / 192800 - 100: 0; 336 remote_byte_delay = emireduce ? cpu_frequency / 206200 - 85: 0;
337#endif 337#endif
338 338
339 /* Copy specified rectange bitmap to hardware */ 339 /* Copy specified rectange bitmap to hardware */