[PATCH 3/3] Bamboo wrapper

Josh Boyer jwboyer at linux.vnet.ibm.com
Tue May 15 11:29:50 EST 2007


On Tue, 2007-05-15 at 11:28 +1000, David Gibson wrote:
> On Mon, May 14, 2007 at 09:59:51AM -0500, Josh Boyer wrote:
> > Add a bootwrapper for Bamboo
> 
> [snip]
> > +#define DCRN_MAL0_CFG 0x180
> > +static void ibm440ep_reset_eth(void)
> > +{
> > +	/* reset the MAL and EMACs since PIBS doesn't do this for us */
> > +	u32 *emac0 = (u32 *)0xef600e00;
> > +	u32 *emac1 = (u32 *)0xef600f00;
> > +
> > +	*emac0 = 0x20000000;
> > +	*emac1 = 0x20000000;
> > +	mtdcr(DCRN_MAL0_CFG, 0x80000000);
> > +}
> 
> Since a number of 4xx board firmware suffer from this EMAC/MAL reset
> problem it would be nice to factor this out into a common file.

Ok, I can look at doing that.  Shouldn't be difficult.

> > +static void ibm440ep_clear_uics(void)
> > +{
> > +	/* Clear the UIC registers so we don't get spurious interrupts
> > +	 * in the kernel
> > +	 */
> > +	mtdcr(DCRN_UIC0_ER, 0x0);
> > +	mtdcr(DCRN_UIC0_SR, 0xffffffff);
> > +	mtdcr(DCRN_UIC1_ER, 0x0);
> > +	mtdcr(DCRN_UIC1_SR, 0xffffffff);
> > +}
> 
> I don't think we should need this.  As you suggested I added such a
> clear to my UIC driver in the kernel proper.

Ah, true.  Leftover cruft from before that was added.  I'll remove.

josh




More information about the Linuxppc-dev mailing list