summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-01-27 00:38:58 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-01-27 00:38:58 +0000
commita4e7bc383ed296b532a648a02db62a06c99c9ad8 (patch)
tree97ab9a2d4441aebeae7a76ef1c448f10883daadf /firmware/export
parent95577c7996e7a79a71a12e27433cbd5126c0ccd8 (diff)
downloadrockbox-a4e7bc383ed296b532a648a02db62a06c99c9ad8.tar.gz
rockbox-a4e7bc383ed296b532a648a02db62a06c99c9ad8.zip
Onda VX747:
* Implement lcd_flip() * Add support for multiple banks in NAND driver * Add basic I²C driver (untested) * Get audio back working * Add power driver * Other minor fixes and cleanups git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19863 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/config-ondavx747.h2
-rw-r--r--firmware/export/jz4740.h33
2 files changed, 16 insertions, 19 deletions
diff --git a/firmware/export/config-ondavx747.h b/firmware/export/config-ondavx747.h
index d4badf89cd..3646156ede 100644
--- a/firmware/export/config-ondavx747.h
+++ b/firmware/export/config-ondavx747.h
@@ -121,7 +121,7 @@
121#define BATTERY_TYPES_COUNT 1 /* only one type */ 121#define BATTERY_TYPES_COUNT 1 /* only one type */
122 122
123/* Hardware controlled charging with monitoring */ 123/* Hardware controlled charging with monitoring */
124//#define CONFIG_CHARGING CHARGING_MONITOR 124#define CONFIG_CHARGING CHARGING_MONITOR
125 125
126#ifndef SIMULATOR 126#ifndef SIMULATOR
127 127
diff --git a/firmware/export/jz4740.h b/firmware/export/jz4740.h
index 7910fbec92..f1060686f1 100644
--- a/firmware/export/jz4740.h
+++ b/firmware/export/jz4740.h
@@ -3381,13 +3381,17 @@ static __inline__ unsigned int __cpm_get_pllout(void)
3381 unsigned long m, n, no, pllout; 3381 unsigned long m, n, no, pllout;
3382 unsigned long cppcr = REG_CPM_CPPCR; 3382 unsigned long cppcr = REG_CPM_CPPCR;
3383 unsigned long od[4] = {1, 2, 2, 4}; 3383 unsigned long od[4] = {1, 2, 2, 4};
3384 if ((cppcr & CPM_CPPCR_PLLEN) && !(cppcr & CPM_CPPCR_PLLBP)) { 3384
3385 if ((cppcr & CPM_CPPCR_PLLEN) && !(cppcr & CPM_CPPCR_PLLBP))
3386 {
3385 m = __cpm_get_pllm() + 2; 3387 m = __cpm_get_pllm() + 2;
3386 n = __cpm_get_plln() + 2; 3388 n = __cpm_get_plln() + 2;
3387 no = od[__cpm_get_pllod()]; 3389 no = od[__cpm_get_pllod()];
3388 pllout = ((JZ_EXTAL) / (n * no)) * m; 3390 pllout = ((JZ_EXTAL) / (n * no)) * m;
3389 } else 3391 }
3392 else
3390 pllout = JZ_EXTAL; 3393 pllout = JZ_EXTAL;
3394
3391 return pllout; 3395 return pllout;
3392} 3396}
3393 3397
@@ -3447,23 +3451,19 @@ static __inline__ unsigned int __cpm_get_pixclk(void)
3447/* I2S clock */ 3451/* I2S clock */
3448static __inline__ unsigned int __cpm_get_i2sclk(void) 3452static __inline__ unsigned int __cpm_get_i2sclk(void)
3449{ 3453{
3450 if (REG_CPM_CPCCR & CPM_CPCCR_I2CS) { 3454 if (REG_CPM_CPCCR & CPM_CPCCR_I2CS)
3451 return __cpm_get_pllout2() / (__cpm_get_i2sdiv() + 1); 3455 return __cpm_get_pllout2() / (__cpm_get_i2sdiv() + 1);
3452 } 3456 else
3453 else {
3454 return JZ_EXTAL; 3457 return JZ_EXTAL;
3455 }
3456} 3458}
3457 3459
3458/* USB clock */ 3460/* USB clock */
3459static __inline__ unsigned int __cpm_get_usbclk(void) 3461static __inline__ unsigned int __cpm_get_usbclk(void)
3460{ 3462{
3461 if (REG_CPM_CPCCR & CPM_CPCCR_UCS) { 3463 if (REG_CPM_CPCCR & CPM_CPCCR_UCS)
3462 return __cpm_get_pllout2() / (__cpm_get_udiv() + 1); 3464 return __cpm_get_pllout2() / (__cpm_get_udiv() + 1);
3463 } 3465 else
3464 else {
3465 return JZ_EXTAL; 3466 return JZ_EXTAL;
3466 }
3467} 3467}
3468 3468
3469/* MSC clock */ 3469/* MSC clock */
@@ -3492,12 +3492,10 @@ static inline void __cpm_select_msc_clk(int sd)
3492 unsigned int pllout2 = __cpm_get_pllout2(); 3492 unsigned int pllout2 = __cpm_get_pllout2();
3493 unsigned int div = 0; 3493 unsigned int div = 0;
3494 3494
3495 if (sd) { 3495 if (sd)
3496 div = pllout2 / 24000000; 3496 div = pllout2 / 24000000;
3497 } 3497 else
3498 else {
3499 div = pllout2 / 16000000; 3498 div = pllout2 / 16000000;
3500 }
3501 3499
3502 REG_CPM_MSCCDR = div - 1; 3500 REG_CPM_MSCCDR = div - 1;
3503} 3501}
@@ -3510,12 +3508,11 @@ static inline void __cpm_select_msc_hs_clk(int sd)
3510 unsigned int pllout2 = __cpm_get_pllout2(); 3508 unsigned int pllout2 = __cpm_get_pllout2();
3511 unsigned int div = 0; 3509 unsigned int div = 0;
3512 3510
3513 if (sd) { 3511 if (sd)
3514 div = pllout2 / 48000000; 3512 div = pllout2 / 48000000;
3515 } 3513 else
3516 else {
3517 div = pllout2 / 16000000; 3514 div = pllout2 / 16000000;
3518 } 3515
3519 REG_CPM_MSCCDR = div - 1; 3516 REG_CPM_MSCCDR = div - 1;
3520} 3517}
3521 3518