[PATCH] [v3] PPC 4xx: Enable XMON on PPC 4xx boards
    Eugene Surovegin 
    ebs at ebshome.net
       
    Fri Sep  8 03:19:16 EST 2006
    
    
  
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?
-- 
Eugene
    
    
More information about the Linuxppc-dev
mailing list