From: <far...@us...> - 2006-10-23 15:52:35
|
Revision: 642 http://svn.sourceforge.net/hackndev/?rev=642&view=rev Author: farcaller Date: 2006-10-23 08:52:20 -0700 (Mon, 23 Oct 2006) Log Message: ----------- palmt3: cpu-freq fixed Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/cpu-pxa.c linux4palm/linux/trunk/drivers/video/pxafb.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/cpu-pxa.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/cpu-pxa.c 2006-10-21 21:45:59 UTC (rev 641) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/cpu-pxa.c 2006-10-23 15:52:20 UTC (rev 642) @@ -120,6 +120,14 @@ { /* CPU MEMBUS CCCR DIV2*/ #if defined(CONFIG_PXA25x) +#if defined(CONFIG_MACH_T3XSCALE) + {133000, 99500, 0x123, 1, PXA25x_CCLKCFG}, // 133 * 1 * 1 + {199000, 99500, 0x1a3, 0, PXA25x_CCLKCFG}, // 133 * 1 * 1.5 + {266000, 99500, 0x143, 0, PXA25x_CCLKCFG}, // 133 * 2 * 1 + {399000, 99500, 0x1c3, 0, PXA25x_CCLKCFG}, // 133 * 2 * 1.5 + //{441000, 99500, 0x1c4, 0, PXA25x_CCLKCFG}, // 147 * 2 * 1.5 FIXME: doesn't work? + //{472000, 99500, 0x242, 0, PXA25x_CCLKCFG}, // 118 * 2 * 2 FIXME: is that stabe enough? +#else #if defined(CONFIG_PXA25x_ALTERNATE_FREQS) { 99500, 99500, 0x121, 1, PXA25x_CCLKCFG}, /* run=99, turbo= 99, PXbus=50, SDRAM=50 */ {199100, 99500, 0x221, 0, PXA25x_CCLKCFG}, /* run=99, turbo=199, PXbus=50, SDRAM=99 */ @@ -134,6 +142,7 @@ {331800, 165900, 0x145, 1, PXA25x_CCLKCFG}, /* run=331, turbo=331, PXbus=166, SDRAM=83 */ {398100, 99500, 0x161, 0, PXA25x_CCLKCFG} /* run=398, turbo=398, PXbus=196, SDRAM=99 */ #endif +#endif #elif defined(CONFIG_PXA27x) {104000, 104000, PXA27x_CCCR(1, 8, 2), 0, PXA27x_CCLKCFG(1, 0, 1)}, {156000, 104000, PXA27x_CCCR(1, 8, 6), 0, PXA27x_CCLKCFG(1, 1, 1)}, @@ -221,6 +230,7 @@ * we need to preset the smaller DRI before the change. If we're speeding * up we need to set the larger DRI value after the change. */ +#ifndef CONFIG_MACH_T3XSCALE preset_mdrefr = postset_mdrefr = MDREFR; if((MDREFR & MDREFR_DRI_MASK) > MDREFR_DRI(pxa2xx_freqs[idx].membus)) { preset_mdrefr = (preset_mdrefr & ~MDREFR_DRI_MASK) | @@ -252,7 +262,7 @@ postset_mdrefr &= ~MDREFR_K0DB4; postset_mdrefr |= MDREFR_K0DB2; } - +#endif cclkcfg = pxa2xx_freqs[idx].cclkcfg; if (freq_debug) { @@ -281,8 +291,26 @@ * The current values in the pxa2xx_freqs table don't do this, so the code * is unimplemented. */ - +#ifdef CONFIG_MACH_T3XSCALE __asm__ __volatile__(" \ + /*ldr r4, [%1] ;*/ /* load MDREFR */ \ + b 2f ; \ + .align 5 ; \ +1: \ + /*str %3, [%1] ;*/ /* preset the MDREFR */ \ + mcr p14, 0, %2, c6, c0, 0 ; /* set CCLKCFG[FCS] */ \ + /*str %4, [%1] ;*/ /* postset the MDREFR */ \ + \ + b 3f ; \ +2: b 1b ; \ +3: nop ; \ + " + : "=&r" (unused) + : "r" (&MDREFR), "r" (cclkcfg), + "r" (preset_mdrefr), "r" (postset_mdrefr) + : "r4", "r5"); +#else + __asm__ __volatile__(" \ ldr r4, [%1] ; /* load MDREFR */ \ b 2f ; \ .align 5 ; \ @@ -299,6 +327,7 @@ : "r" (&MDREFR), "r" (cclkcfg), \ "r" (preset_mdrefr), "r" (postset_mdrefr) : "r4", "r5"); +#endif local_irq_restore(flags); if (freq_debug) { Modified: linux4palm/linux/trunk/drivers/video/pxafb.c =================================================================== --- linux4palm/linux/trunk/drivers/video/pxafb.c 2006-10-21 21:45:59 UTC (rev 641) +++ linux4palm/linux/trunk/drivers/video/pxafb.c 2006-10-23 15:52:20 UTC (rev 642) @@ -1362,11 +1362,13 @@ #endif #ifdef CONFIG_CPU_FREQ +#ifndef CONFIG_MACH_T3XSCALE fbi->freq_transition.notifier_call = pxafb_freq_transition; fbi->freq_policy.notifier_call = pxafb_freq_policy; cpufreq_register_notifier(&fbi->freq_transition, CPUFREQ_TRANSITION_NOTIFIER); cpufreq_register_notifier(&fbi->freq_policy, CPUFREQ_POLICY_NOTIFIER); #endif +#endif /* * Ok, now enable the LCD controller This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |