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
This commit is contained in:
Frank Gevaerts 2008-10-12 16:55:57 +00:00
parent 2ca30a0c74
commit 2cc85bc346
2 changed files with 12 additions and 12 deletions

View file

@ -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

View file

@ -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 */
}
}