Re[2]: [PATCH] PCM038: Added config option for PCM970 development board

Alexander Shiyan shc_work at mail.ru
Thu Apr 26 03:22:59 EDT 2012


Thu, 26 Apr 2012 09:11:40 +0200 от Sascha Hauer <s.hauer at pengutronix.de>:

...
> > -/**
> > - * If the PLL settings are in place switch the CPU core frequency to the max. value
> > - */
> > -static int pcm038_power_init(void)
> > -{
> > -	uint32_t spctl0;
> > -
> > -	spctl0 = get_pll_spctl10();
> > -
> > -	/* PLL registers already set to their final values? */
> > -	if (spctl0 == SPCTL0_VAL && MPCTL0 == MPCTL0_VAL) {
> > -		console_flush();
> > -		if (!pmic_power()) {
> > -			/* wait for required power level to run the CPU at 400 MHz */
> > -			udelay(100000);
> > -			CSCR = CSCR_VAL_FINAL;
> > -			PCDR0 = 0x130410c3;
> > -			PCDR1 = 0x09030911;
> > -			/* Clocks have changed. Notify clients */
> > -			clock_notifier_call_chain();
> > -		} else {
> > -			printf("Failed to initialize PMIC. Will continue with low CPU speed\n");
> > -		}
> > -	}
> > -
> > -	/* clock gating enable */
> > -	GPCR = 0x00050f08;
> > -
> > -	return 0;
> > -}
> > -
> > -late_initcall(pcm038_power_init);
> 
> You move pcm038_power_init from a late_initcall to a direct call
> somewhere else. There might be reasons to do this, but such a change
> should not be hidden in a big patch which according to the commit log
> factors out baseboard code. Also I don't see why the function moves
> to another place in this patch.

I make pcm970_init in late_initcall, so we must sure that power & frequency
already initialized before.
OK, I will try to do second version of this patch later.


More information about the barebox mailing list