[U-Boot-Users] MPC8280 bus_clk

Rune Torgersen runet at innovsys.com
Tue Mar 23 17:27:36 CET 2004


This is the code I use:

#ifdef PCI_AGENT // FIXME, do automatic checking of PCI agent mode
	gd->cpm_clk = gd->vco_out / 2;
	gd->bus_clk = gd->vco_out / (busdf + 1);
	gd->scc_clk = gd->vco_out / 4;
	gd->brg_clk = gd->vco_out / (1 << (2 * (dfbrg + 1)));

	if (cp->b2c_mult > 0) {
		gd->cpu_clk = (gd->bus_clk * cp->b2c_mult) / 2;
	} else {
		gd->cpu_clk = clkin;
	}
#else
	gd->cpm_clk = gd->vco_out / 2;
	gd->bus_clk = clkin;
	gd->scc_clk = gd->vco_out / 4;
	gd->brg_clk = gd->vco_out / (1 << (2 * (dfbrg + 1)));

	if (cp->b2c_mult > 0) {
		gd->cpu_clk = (clkin * cp->b2c_mult) / 2;
	} else {
		gd->cpu_clk = clkin;
	}
#endif    

The two lines that are different are:
gd->bus_clk = gd->vco_out / (busdf + 1);

gd->cpu_clk = (gd->bus_clk * cp->b2c_mult) / 2;


> -----Original Message-----
> From: HU Chunlin [mailto:hucl606 at hotmail.com] 
> Sent: Monday, March 22, 2004 20:00
> To: Rune Torgersen
> Cc: u-boot-users at lists.sourceforge.net
> Subject: RE: [U-Boot-Users] MPC8280 bus_clk
> 
> 
> Thank you for the quick reply.
> 
> So for at least 8266 CPU running PCI agent mode, the 
> CONFIG_8260_CLKIN definition must be set to 2 x PCI_CLK, and 
> the bus_clk must be calculated as
>   gd->bus_clk = gd->vco_out / (busdf + 1)?
> 
> If so, I think there must be a patch for it.
> 
> Regards,
> HU Chunlin
> 
> >From: "Rune Torgersen" <runet at innovsys.com>
> >To: "HU Chunlin" <hucl606 at hotmail.com>
> >Subject: RE: [U-Boot-Users] MPC8280 bus_clk
> >Date: Mon, 22 Mar 2004 10:40:31 -0600
> >
> >That is a problem for at least eht 8266 CPU when set in PCI 
> agent mode, 
> >because the clockiin is then 2x the PCI clock, and is not 
> the bus clock 
> >(which is multiplied up from that)
> >
> > > I got some information from the Technical Support 
> Engineering Team 
> > > of Motorola that the statement BUS_CLK == CLKIN applies 
> to local bus 
> > > mode only.
> 
> _________________________________________________________________
> 与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  
> 
> 




More information about the U-Boot mailing list