summaryrefslogtreecommitdiffstats
path: root/firmware/target/mips/ingenic_jz47xx/onda_vx747
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2011-01-18 12:10:09 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2011-01-18 12:10:09 +0000
commit980225c3e20b3102382c910da6e1406cc8c7f1b5 (patch)
tree5beb1e6d76da64b9d1e35fae4a3aac2ddbda5782 /firmware/target/mips/ingenic_jz47xx/onda_vx747
parentccad6d0dafc207e0e3a584e26fa6155f13db9dba (diff)
downloadrockbox-980225c3e20b3102382c910da6e1406cc8c7f1b5.tar.gz
rockbox-980225c3e20b3102382c910da6e1406cc8c7f1b5.tar.bz2
rockbox-980225c3e20b3102382c910da6e1406cc8c7f1b5.zip
Fix Onda VX777 LCD not working on boot
This fixes an issue with some Onda VX777's where the LCD doesn't seem to be correctly inited by the OF SPL. Based on FS#11888 by Purling Nayuki. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29083 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/onda_vx747')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/onda_vx747/lcd-onda_vx747.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/onda_vx747/lcd-onda_vx747.c b/firmware/target/mips/ingenic_jz47xx/onda_vx747/lcd-onda_vx747.c
index 12c1f3eb09..56c8504649 100644
--- a/firmware/target/mips/ingenic_jz47xx/onda_vx747/lcd-onda_vx747.c
+++ b/firmware/target/mips/ingenic_jz47xx/onda_vx747/lcd-onda_vx747.c
@@ -38,7 +38,16 @@ do { \
#define SLEEP(x) { register int __i; for(__i=0; __i<x; __i++) asm volatile("nop\n nop\n"); }
#define DELAY SLEEP(700000);
-#ifdef USB_BOOT
+
+#if (defined(ONDA_VX777) && !defined(BOOTLOADER)) || defined(USB_BOOT)
+ /*
+ * Onda VX777 needs this in order to boot correctly, it looks like the SPL
+ * does not correctly initialize the LCD for Rockbox to switch it on.
+ */
+ #define RESET_LCD
+#endif
+
+#ifdef RESET_LCD
static void _display_pin_init(void)
{
my__gpio_as_lcd_16bit();
@@ -61,7 +70,7 @@ static void _display_pin_init(void)
#define SLCD_SEND_COMMAND(cmd,val) SLCD_SET_COMMAND(cmd); SLCD_SET_DATA(val);
static void _display_init(void)
{
-#ifdef USB_BOOT
+#ifdef RESET_LCD
SLCD_SEND_COMMAND(REG_SOFT_RESET, SOFT_RESET(1));
SLEEP(700000);
SLCD_SEND_COMMAND(REG_SOFT_RESET, SOFT_RESET(0));
@@ -78,7 +87,7 @@ static void _display_init(void)
SLCD_SEND_COMMAND(REG_ENTRY_MODE, (ENTRY_MODE_BGR | ENTRY_MODE_VID | ENTRY_MODE_AM));
#endif
-#ifdef USB_BOOT
+#ifdef RESET_LCD
SLCD_SEND_COMMAND(REG_DISP_CTRL2, 0x503);
SLCD_SEND_COMMAND(REG_DISP_CTRL3, 1);
SLCD_SEND_COMMAND(REG_LPCTRL, 0x10);
@@ -144,7 +153,7 @@ static void _display_init(void)
SLCD_SEND_COMMAND(REG_DISP_CTRL1, (DISP_CTRL1_BASEE | DISP_CTRL1_VON |
DISP_CTRL1_GON | DISP_CTRL1_DTE | DISP_CTRL1_D(3)));
SLEEP(3500000);
-#endif /* USB_BOOT */
+#endif /* RESET_LCD */
}
static void _display_on(void)
@@ -199,7 +208,7 @@ void lcd_init_controller(void)
{
lcd_clock_enable();
-#ifdef USB_BOOT
+#ifdef RESET_LCD
_display_pin_init();
#endif
_set_lcd_bus();