[U-Boot-Users] [PATCH 2/2] 8xx: Update of support on 8xx

Wolfgang Denk wd at denx.de
Sun Mar 16 01:44:07 CET 2008


In message <20080217225747.5736d067 at neuromancer.mindspace> you wrote:
> Resubmit- previous patch mangled by milter @ 80 characters.
> 
> This patch does some shifting around of OF support on 8xx.

What problem is this supposed to fix?

> index 11b0893..070babc 100644
> --- a/cpu/mpc8xx/speed.c
> +++ b/cpu/mpc8xx/speed.c
> @@ -174,6 +174,27 @@ unsigned long measure_gclk(void)
>  
>  #endif
>  
> +void get_brgclk(uint sccr)
> +{
> +	uint divider = 0;
> +
> +	switch((sccr&SCCR_DFBRG11)>>11){
> +		case 0:
> +			divider = 1;
> +			break;
> +		case 1:
> +			divider = 4;
> +			break;
> +		case 2:
> +			divider = 16;
> +			break;
> +		case 3:
> +			divider = 64;
> +			break;
> +	}
> +	gd->brg_clk = gd->cpu_clk/divider;
> +}
> +

What is this needed for?

> index f9a3d92..789e116 100644
> --- a/include/asm-ppc/global_data.h
> +++ b/include/asm-ppc/global_data.h
> @@ -40,8 +40,11 @@ typedef	struct	global_data {
>  	bd_t		*bd;
>  	unsigned long	flags;
>  	unsigned long	baudrate;
> -	unsigned long	cpu_clk;	/* CPU clock in Hz!		*/
> +	unsigned long	cpu_clk;	/* CPU clock in Hz! */
>  	unsigned long	bus_clk;
> +#if defined(CONFIG_8xx)
> +	unsigned long	brg_clk;
> +#endif

ditto ?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"I think they're going to take all this money that we  spend  now  on
war and death --"                   "And make them spend it on life."
	-- Edith Keeler and Kirk, "The City on the Edge of Forever",
	   stardate unknown.




More information about the U-Boot mailing list