summaryrefslogtreecommitdiffstats
path: root/firmware/target/mips/ingenic_jz47xx/onda_vx767
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-04-05 14:36:36 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-04-05 14:36:36 +0000
commit72503b5dc1f4e64cbab1f93b69ff96b0b28ef258 (patch)
tree567c08c54a47decd1da0dee15ee318f859c7cc9c /firmware/target/mips/ingenic_jz47xx/onda_vx767
parent0af42777ee5d869886148f1a19d778fa3077564f (diff)
downloadrockbox-72503b5dc1f4e64cbab1f93b69ff96b0b28ef258.tar.gz
rockbox-72503b5dc1f4e64cbab1f93b69ff96b0b28ef258.tar.bz2
rockbox-72503b5dc1f4e64cbab1f93b69ff96b0b28ef258.zip
Fix Onda VX767 LCD clock init code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20626 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/onda_vx767')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-onda_vx767.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-onda_vx767.c b/firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-onda_vx767.c
index 7dc2bf5431..90804842c6 100644
--- a/firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-onda_vx767.c
+++ b/firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-onda_vx767.c
@@ -163,16 +163,15 @@ static void _set_lcd_bus(void)
static void _set_lcd_clock(void)
{
unsigned int val;
- int pll_div;
__cpm_stop_lcd();
- pll_div = ( REG_CPM_CPCCR & CPM_CPCCR_PCS ); /* clock source, 0:pllout/2 1: pllout */
- pll_div = pll_div ? 1 : 2 ;
- val = ( __cpm_get_pllout()/pll_div ) / 336000000;
+
+ val = __cpm_get_pllout2() / LCD_PCLK;
val--;
if ( val > 0x1ff )
val = 0x1ff; /* CPM_LPCDR is too large, set it to 0x1ff */
__cpm_set_pixdiv(val);
+
__cpm_start_lcd();
}