summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2010-07-16 07:24:08 +0000
committerMarcin Bukat <marcin.bukat@gmail.com>2010-07-16 07:24:08 +0000
commit5b5275a6c9bc0ad760d6ead86e8ee7f49532989a (patch)
treeb97013921f28a80419e4c5dac6b199afac14d07f
parent701dafdf30a1a01e2110a8aa3d59ee45550a9489 (diff)
downloadrockbox-5b5275a6c9bc0ad760d6ead86e8ee7f49532989a.tar.gz
rockbox-5b5275a6c9bc0ad760d6ead86e8ee7f49532989a.zip
HD200: Change move.w -> move.b in lcd-as-hd200.S when doing transfers to lcd to explicity show that lcd bus is 8bits wide.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27445 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/coldfire/mpio/hd200/lcd-as-hd200.S42
1 files changed, 21 insertions, 21 deletions
diff --git a/firmware/target/coldfire/mpio/hd200/lcd-as-hd200.S b/firmware/target/coldfire/mpio/hd200/lcd-as-hd200.S
index 29e52a0f1e..17b3dabfbe 100644
--- a/firmware/target/coldfire/mpio/hd200/lcd-as-hd200.S
+++ b/firmware/target/coldfire/mpio/hd200/lcd-as-hd200.S
@@ -34,8 +34,8 @@
34 34
35lcd_write_command: 35lcd_write_command:
36 move.l (4, %sp), %d0 36 move.l (4, %sp), %d0
37 move.w %d0, LCD_BASE_ADDRESS /* data is 1byte but CF uses word 37 move.b %d0, LCD_BASE_ADDRESS /* transfers 1 byte to LCD */
38 * transfers only */ 38
39 rts 39 rts
40.wc_end: 40.wc_end:
41 .size lcd_write_command,.wc_end-lcd_write_command 41 .size lcd_write_command,.wc_end-lcd_write_command
@@ -47,11 +47,10 @@ lcd_write_command:
47 47
48lcd_write_command_e: 48lcd_write_command_e:
49 lea.l LCD_BASE_ADDRESS, %a0 49 lea.l LCD_BASE_ADDRESS, %a0
50
51 move.l (4, %sp), %d0 /* Command */ 50 move.l (4, %sp), %d0 /* Command */
52 move.w %d0, (%a0) 51 move.b %d0, (%a0)
53 move.l (8, %sp), %d0 /* Data */ 52 move.l (8, %sp), %d0 /* Data */
54 move.w %d0, (%a0) /* Write to LCD */ 53 move.b %d0, (%a0) /* Write to LCD */
55 54
56 rts 55 rts
57.wce_end: 56.wce_end:
@@ -79,22 +78,22 @@ lcd_write_data:
79 78
80.w_write: 79.w_write:
81 move.w (%a0)+, %d1 /* load data 3 cycles*/ 80 move.w (%a0)+, %d1 /* load data 3 cycles*/
82 move.w %d1, (%a1) /* first byte 1 cycle*/ 81 move.b %d1, (%a1) /* first byte 1 cycle*/
83 lsr.l #8, %d1 /* load second byte 1 cycle*/ 82 lsr.l #8, %d1 /* load second byte 1 cycle*/
84 move.w %d1, (%a1) /* transfer 1 cycle*/ 83 move.b %d1, (%a1) /* transfer 1 cycle*/
85 subq.l #1, %d0 /* decrement counter 1 cycle*/ 84 subq.l #1, %d0 /* decrement counter 1 cycle*/
86 jeq .write_end 85 jeq .write_end
87 86
88.l_write: 87.l_write:
89 move.l (%a0)+, %d1 /* load data 2 cycles*/ 88 move.l (%a0)+, %d1 /* load data 2 cycles*/
90 swap %d1 /* 1 cycle */ 89 swap %d1 /* 1 cycle */
91 move.w %d1, (%a1) /* first byte 1 cycle*/ 90 move.b %d1, (%a1) /* first byte 1 cycle*/
92 lsr.l #8, %d1 /* 1 cycle */ 91 lsr.l #8, %d1 /* 1 cycle */
93 move.w %d1, (%a1) /* second byte 1 cycle*/ 92 move.b %d1, (%a1) /* second byte 1 cycle*/
94 lsr.l #8, %d1 /* 1 cycle */ 93 lsr.l #8, %d1 /* 1 cycle */
95 move.w %d1, (%a1) /* third byte 1 cycle*/ 94 move.b %d1, (%a1) /* third byte 1 cycle*/
96 lsr.l #8, %d1 /* 1 cycle */ 95 lsr.l #8, %d1 /* 1 cycle */
97 move.w %d1, (%a1) /* forth byte 1 cycle*/ 96 move.b %d1, (%a1) /* forth byte 1 cycle*/
98 subq.l #2, %d0 /* decrement counter 1 cycle*/ 97 subq.l #2, %d0 /* decrement counter 1 cycle*/
99 bne.s .l_write 98 bne.s .l_write
100 99
@@ -113,10 +112,11 @@ lcd_mono_data:
113 112
114.md_loop: 113.md_loop:
115 move.b (%a0)+, %d1 114 move.b (%a0)+, %d1
116 move.w %d1, (%a1) /* byte transfers actually */ 115 move.b %d1, (%a1) /* byte transfers */
117 move.w %d1, (%a1) 116 move.b %d1, (%a1)
118 subq.l #1, %d0 117 subq.l #1, %d0
119 bne.s .md_loop 118 bne.s .md_loop
119
120 rts 120 rts
121.md_end: 121.md_end:
122 .size lcd_mono_data,.md_end-lcd_mono_data 122 .size lcd_mono_data,.md_end-lcd_mono_data
@@ -163,12 +163,12 @@ lcd_grey_data:
163 not.l %d2 /* negate bits */ 163 not.l %d2 /* negate bits */
164 lsr.l %d4, %d2 /* %d2 = ........................01234567 */ 164 lsr.l %d4, %d2 /* %d2 = ........................01234567 */
165 165
166 move.w %d2, (%a3) /* transfer first LCD byte */ 166 move.b %d2, (%a3) /* transfer first LCD byte */
167 167
168 movem.l %d0-%d1, (%a1) /* store 8 new pixel phases */ 168 movem.l %d0-%d1, (%a1) /* store 8 new pixel phases */
169 addq.l #8, %a1 169 addq.l #8, %a1
170 170
171 move.w %d2, (%a3) /* transfer second LCD byte */ 171 move.b %d2, (%a3) /* transfer second LCD byte */
172 172
173.g_hend: 173.g_hend:
174 cmp.l %a1, %a2 174 cmp.l %a1, %a2
@@ -195,12 +195,12 @@ lcd_grey_data:
195 not.l %d6 /* negate bits */ 195 not.l %d6 /* negate bits */
196 lsr.l %d4, %d6 /* %d6 = ........................01234567 */ 196 lsr.l %d4, %d6 /* %d6 = ........................01234567 */
197 197
198 move.w %d6, (%a3) /* transfer first LCD byte */ 198 move.b %d6, (%a3) /* transfer first LCD byte */
199 199
200 movem.l (%a0), %d7/%a4-%a6 /* fetch 2 * 8 pixel values */ 200 movem.l (%a0), %d7/%a4-%a6 /* fetch 2 * 8 pixel values */
201 lea.l (16, %a0), %a0 201 lea.l (16, %a0), %a0
202 202
203 move.w %d6, (%a3) /* transfer second LCD byte */ 203 move.b %d6, (%a3) /* transfer second LCD byte */
204 204
205 add.l %d7, %d0 205 add.l %d7, %d0
206 add.l %a4, %d1 206 add.l %a4, %d1
@@ -222,12 +222,12 @@ lcd_grey_data:
222 add.l %a5, %d2 222 add.l %a5, %d2
223 add.l %a6, %d3 223 add.l %a6, %d3
224 224
225 move.w %d6, (%a3) /* transfer first LCD byte */ 225 move.b %d6, (%a3) /* transfer first LCD byte */
226 226
227 movem.l %d0-%d3, (%a1) /* store 2 * 8 new pixel phases */ 227 movem.l %d0-%d3, (%a1) /* store 2 * 8 new pixel phases */
228 lea.l (16, %a1), %a1 /* advance pointer */ 228 lea.l (16, %a1), %a1 /* advance pointer */
229 229
230 move.w %d6, (%a3) /* transfer second LCD byte */ 230 move.b %d6, (%a3) /* transfer second LCD byte */
231 231
232 cmp.l %a2, %a1 232 cmp.l %a2, %a1
233 bls.s .g_line_loop 233 bls.s .g_line_loop
@@ -256,12 +256,12 @@ lcd_grey_data:
256 not.l %d2 /* negate bits */ 256 not.l %d2 /* negate bits */
257 lsr.l %d4, %d2 /* %d2 = ........................01234567 */ 257 lsr.l %d4, %d2 /* %d2 = ........................01234567 */
258 258
259 move.w %d2, (%a3) /* transfer first LCD byte */ 259 move.b %d2, (%a3) /* transfer first LCD byte */
260 260
261 movem.l %d0-%d1, (%a1) /* store 8 new pixel phases */ 261 movem.l %d0-%d1, (%a1) /* store 8 new pixel phases */
262 /* addq.l #8, %a1 not needed anymore */ 262 /* addq.l #8, %a1 not needed anymore */
263 263
264 move.w %d2, (%a3) /* transfer second LCD byte */ 264 move.b %d2, (%a3) /* transfer second LCD byte */
265 265
266.g_tend: 266.g_tend:
267 movem.l (%sp), %d2-%d7/%a2-%a6 267 movem.l (%sp), %d2-%d7/%a2-%a6