[PATCH] [v3] PPC 4xx: Enable XMON on PPC 4xx boards

Josh Boyer jdub at us.ibm.com
Fri Sep 8 04:08:45 EST 2006


On Thu, 2006-09-07 at 10:19 -0700, Eugene Surovegin wrote:
> On Thu, Sep 07, 2006 at 09:35:20AM -0500, Josh Boyer wrote:
> 
> [snip]
> 
> > --- linux-2.6.orig/arch/ppc/xmon/start.c
> > +++ linux-2.6/arch/ppc/xmon/start.c
> > @@ -73,6 +73,27 @@ xmon_map_scc(void)
> >  	TXRDY = 0x20;
> >  	RXRDY = 1;
> >  	DLAB = 0x80;
> > +#elif defined(CONFIG_440EP)
> > +	sccd = (volatile unsigned char *) ioremap(0xef600300, 8);
> > +	sccc = sccd + 5;
> > +	TXRDY = 0x20;
> > +	RXRDY = 1;
> > +	DLAB = 0x80;
> > +#elif defined(CONFIG_440SP)
> > +	sccd = (volatile unsigned char *) ioremap64(0x00000001f0000200ULL, 8);
> > +	sccc = sccd + 5;
> > +	TXRDY = 0x20;
> > +	RXRDY = 1;
> > +	DLAB = 0x80;
> > +#elif defined(CONFIG_44x)
> > +	/* This is the default for 44x platforms.  Any boards that have a
> > +	   different UART address need to be put in cases before this or the
> > +	   port will be mapped incorrectly */
> > +	sccd = (volatile unsigned char *) ioremap64(0x0000000140000200ULL, 8);
> > +	sccc = sccd + 5;
> > +	TXRDY = 0x20;
> > +	RXRDY = 1;
> > +	DLAB = 0x80;
> 
> There is only one line which is different, why did you put all other 
> under #ifdef?
> 
> Also, all these hardcoded addresses are already available as defines, 
> why just not use them?

Blindly following the existing convention.  I agree it's ugly.  I'll fix
it up shortly and send out another patch.  It'll also fix 440SPE, which
also has a different UART address.

josh




More information about the Linuxppc-dev mailing list