diff options
Diffstat (limited to 'firmware/drivers/lcd.S')
-rwxr-xr-x | firmware/drivers/lcd.S | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/firmware/drivers/lcd.S b/firmware/drivers/lcd.S index 8764d793c3..d9e7092c94 100755 --- a/firmware/drivers/lcd.S +++ b/firmware/drivers/lcd.S @@ -371,99 +371,4 @@ lcd_write_data: nop /* 1(0/0) */ bne .loop /* 2(0/0) */ rts -#elif defined(IRIVER_H300_SERIES) - .section .icode,"ax",@progbits - - .align 2 - .global lcd_write_data - .type lcd_write_data,@function - -lcd_write_data: - move.l (4,%sp),%a0 /* data pointer */ - move.l (8,%sp),%d0 /* length in words */ - add.l %d0,%d0 /* words -> bytes */ - add.l %a0,%d0 /* -> end address */ - lea.l 0xf0000002,%a1 /* LCD data port */ - - move.l %a0,%d1 - btst.l #1,%d1 /* already longword aligned? */ - beq.b .word1_end /* yes: skip initial word copy */ - - move.w (%a0)+,(%a1) /* transfer initial word */ - -.word1_end: /* now longword aligned */ - moveq.l #28,%d1 - add.l %a0,%d1 - and.l #0xFFFFFFF0,%d1 /* %d1 = first line bound + 16 */ - cmp.l %d1,%d0 /* at least one full line to send? */ - blo.b .long2_start /* no: skip to trailing longword handling */ - - lea.l (-16,%sp),%sp /* free up some registers */ - movem.l %d2-%d4/%a2,(%sp) - - subq.l #8,%d1 - subq.l #8,%d1 /* %d1 = first line bound */ - - cmp.l %a0,%d1 /* any leading longwords? */ - bls.b .long1_end /* no: skip leading long loop */ - -.long1_loop: - move.l (%a0)+,%d2 /* read longword */ - swap %d2 /* send data to LCD in correct order...*/ - move.w %d2,(%a1) - swap %d2 - move.w %d2,(%a1) - cmp.l %a0,%d1 /* run %a0 up to first line bound */ - bhi.b .long1_loop - -.long1_end: - move.l %d0,%a2 - lea.l (-14,%a2),%a2 /* %a2 = end address - 14 (one line/pass) */ - - /* burst-optimised line transfers */ -.line_loop: - movem.l (%a0),%d1-%d4 /* burst-read line */ - lea.l (16,%a0),%a0 /* increment address */ - swap %d1 /* send data to LCD in correct order... */ - move.w %d1,(%a1) - swap %d1 - move.w %d1,(%a1) - swap %d2 - move.w %d2,(%a1) - swap %d2 - move.w %d2,(%a1) - swap %d3 - move.w %d3,(%a1) - swap %d3 - move.w %d3,(%a1) - swap %d4 - move.w %d4,(%a1) - swap %d4 - move.w %d4,(%a1) - cmp.l %a0,%a2 /* run %a0 up to last line bound */ - bhi.b .line_loop - - movem.l (%sp),%d2-%d4/%a2 - lea.l (16,%sp),%sp /* restore registers */ - -.long2_start: - subq.l #2,%d0 /* account for handling 2 words per loop */ - cmp.l %a0,%d0 /* any (trailing longwords? */ - bls.b .long2_end /* no: skip trailing longword loop */ - -.long2_loop: - move.l (%a0)+,%d1 /* read longword */ - swap %d1 /* send data to LCD in correct order */ - move.w %d1,(%a1) - swap %d1 - move.w %d1,(%a1) - cmp.l %a0,%d0 /* run %a0 up to last long bound */ - bhi.b .long2_loop - -.long2_end: - blo.b .word2_end /* no final word: skip */ - move.w (%a0)+,(%a1) /* transfer final word */ - -.word2_end: - rts #endif |