summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2006-11-08 16:22:30 +0000
committerMichael Sevakis <jethead71@rockbox.org>2006-11-08 16:22:30 +0000
commita32b33bf83b70979d131933ed1bed1b4efeb74ec (patch)
tree530b0d60d09bd1ceb625babe684ea9ed9d1b31da
parente89a3940f9f8c6c6c437354ed49070649976f10e (diff)
downloadrockbox-a32b33bf83b70979d131933ed1bed1b4efeb74ec.zip
rockbox-a32b33bf83b70979d131933ed1bed1b4efeb74ec.tar.gz
rockbox-a32b33bf83b70979d131933ed1bed1b4efeb74ec.tar.bz2
rockbox-a32b33bf83b70979d131933ed1bed1b4efeb74ec.tar.xz
Forgot to cvs add lcd-as-h100.S.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11469 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/coldfire/iriver/h100/lcd-as-h100.S96
1 files changed, 96 insertions, 0 deletions
diff --git a/firmware/target/coldfire/iriver/h100/lcd-as-h100.S b/firmware/target/coldfire/iriver/h100/lcd-as-h100.S
new file mode 100644
index 0000000..1605b21
--- /dev/null
+++ b/firmware/target/coldfire/iriver/h100/lcd-as-h100.S
@@ -0,0 +1,96 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2004 by Jens Arnold
+ * Based on the work of Alan Korr and Jörg Hohensohn
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#include "config.h"
+#include "cpu.h"
+
+ .section .icode,"ax",@progbits
+
+ .align 2
+ .global lcd_write_command
+ .type lcd_write_command,@function
+
+lcd_write_command:
+ move.l (4,%sp),%d0
+ lea MBAR2,%a1
+ move.l #~8,%d1
+ and.l %d1,(0xb4,%a1)
+ move.w %d0,0xf0000000
+ rts
+.wc_end:
+ .size lcd_write_command,.wc_end-lcd_write_command
+
+
+ .align 2
+ .global lcd_write_command_ex
+ .type lcd_write_command_ex,@function
+
+lcd_write_command_ex:
+ lea MBAR2,%a1
+
+ move.l (4,%sp),%d0 /* Command */
+
+ move.l #~8,%d1 /* Set A0 = 0 */
+ and.l %d1,(0xb4,%a1)
+ move.w %d0,0xf0000000 /* Write to LCD */
+
+ not.l %d1 /* Set A0 = 1 */
+ or.l %d1,(0xb4,%a1)
+
+ move.l (8,%sp),%d0 /* Data */
+ cmp.l #0xffffffff,%d0 /* -1? */
+ beq.b .last
+ move.w %d0,0xf0000000 /* Write to LCD */
+
+ move.l (12,%sp),%d0 /* Data */
+ cmp.l #0xffffffff,%d0 /* -1? */
+ beq.b .last
+ move.w %d0,0xf0000000 /* Write to LCD */
+
+.last:
+ rts
+.wcex_end:
+ .size lcd_write_command_ex,.wcex_end-lcd_write_command_ex
+
+
+ .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 */
+ lea MBAR2,%a1
+ moveq #8,%d1
+ or.l %d1,(0xb4,%a1)
+
+ lea 0xf0000000,%a1
+.loop:
+ /* When running in IRAM, this loop takes 7 cycles plus the LCD write.
+ The 7 cycles are necessary to follow the LCD timing specs
+ at 140MHz */
+ move.b (%a0)+,%d1 /* 3(1/0) */
+ move.w %d1,(%a1) /* 1(0/1) */
+ subq.l #1,%d0 /* 1(0/0) */
+ nop /* 1(0/0) */
+ bne .loop /* 2(0/0) */
+ rts
+.wd_end:
+ .size lcd_write_data,.wd_end-lcd_write_data