summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-10-12 16:55:57 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-10-12 16:55:57 +0000
commit2cc85bc346ba224253a9a1be2d9605dbc79940d9 (patch)
tree5fb8eab97e9990ceb8491b9b3ff8f1386f34c234
parent2ca30a0c745f0b50fe969fe0763816497289fa3e (diff)
downloadrockbox-2cc85bc346ba224253a9a1be2d9605dbc79940d9.tar.gz
rockbox-2cc85bc346ba224253a9a1be2d9605dbc79940d9.tar.bz2
rockbox-2cc85bc346ba224253a9a1be2d9605dbc79940d9.zip
Fix LCD timings on the older meizu M3 variant, so it works with a fast clock.
(FS#9484, by Denes Balatoni) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18784 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--bootloader/meizu_m3.c10
-rw-r--r--firmware/target/arm/s5l8700/meizu-m3/lcd-m3.c14
2 files changed, 12 insertions, 12 deletions
diff --git a/bootloader/meizu_m3.c b/bootloader/meizu_m3.c
index c88494448c..8e3a7f64c8 100644
--- a/bootloader/meizu_m3.c
+++ b/bootloader/meizu_m3.c
@@ -106,15 +106,15 @@ void main(void)
char mystring[64];
int tmpval;
- /* set clock to 200 MHz */
- #if 0
+ /* set fclk = 200MHz, hclk = 100MHz, pclk = 50MHz, others off */
CLKCON = 0x00800080;
- CLKCON2= 0x00;
+ PLLCON = 0;
PLL0PMS = 0x1ad200;
+ PLL0LCNT = 8100;
PLLCON = 1;
while (!(PLLLOCK & 1)) ;
- CLKCON = 0x20802080;
- #endif
+ CLKCON2= 0x80;
+ CLKCON = 0x20803180;
/* mask all interrupts
this is done, because the lcd framebuffer
diff --git a/firmware/target/arm/s5l8700/meizu-m3/lcd-m3.c b/firmware/target/arm/s5l8700/meizu-m3/lcd-m3.c
index 88147e9b16..39b8f9b278 100644
--- a/firmware/target/arm/s5l8700/meizu-m3/lcd-m3.c
+++ b/firmware/target/arm/s5l8700/meizu-m3/lcd-m3.c
@@ -96,7 +96,7 @@ void lcd_on() {
lcd_sleep(70000);
lcd_writereg(0x7, 0x21);
lcd_writereg(0x12, 0x1137);
- lcd_sleep(70000);
+ lcd_sleep(700000);
lcd_writereg(0x7, 0x233);
}
}
@@ -128,9 +128,9 @@ void lcd_init_device(void)
/* detect lcd type */
LCD_WCMD = 0x1;
- lcd_sleep(16667);
+ lcd_sleep(166670);
LCD_WCMD = 0x11;
- lcd_sleep(20000);
+ lcd_sleep(2000040);
lcd_readdata();
LCD_WCMD = 0x4;
lcd_sleep(100);
@@ -165,9 +165,9 @@ void lcd_init_device(void)
LCD_WCMD = 0x0;
LCD_WCMD = 0x0;
LCD_WCMD = 0x0;
- lcd_sleep(7000);
+ lcd_sleep(700000);
lcd_writereg(0xa4, 0x1);
- lcd_sleep(11000);
+ lcd_sleep(1100000);
lcd_writereg(0x1, 0x100);
lcd_writereg(0x2, 0x300);
lcd_writereg(0x3, 0x9230);
@@ -227,7 +227,7 @@ void lcd_init_device(void)
lcd_writereg(0x9b, 0x300);
LCD_WCMD = 0x0;
LCD_WCMD = 0x22;
- lcd_sleep(7000);
+ lcd_sleep(700000);
lcd_on();
}
}
@@ -291,7 +291,7 @@ void lcd_update(void)
LCD_WDATA = RGB_UNPACK_RED(*p)<<3;
LCD_WDATA = RGB_UNPACK_GREEN(*p)<<2;
LCD_WDATA = RGB_UNPACK_BLUE(*p)<<3;
- lcd_sleep(1); /* if data is sent too fast to lcdif, machine freezes */
+ lcd_sleep(3); /* if data is sent too fast to lcdif, machine freezes */
}
}