[PATCH 8/21] [POWERPC] EP405 boards support for arch/powerpc

Stephen Rothwell sfr at canb.auug.org.au
Sat Dec 22 10:24:24 EST 2007


Hi Ben,

Just a couple of trivial things.

On Fri, 21 Dec 2007 15:39:26 +1100 Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote:
>
> +++ linux-merge/arch/powerpc/boot/4xx.c	2007-12-21 14:19:46.000000000 +1100
> @@ -179,13 +179,16 @@ void ibm40x_dbcr_reset(void)
>  #define EMAC_RESET 0x20000000
>  void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1)
>  {
> -	/* Quiesce the MAL and EMAC(s) since PIBS/OpenBIOS don't do this for us */
> +	/* Quiesce the MAL and EMAC(s) since PIBS/OpenBIOS don't
> +	 * do this for us
> +	 */
>  	if (emac0)
>  		*emac0 = EMAC_RESET;
>  	if (emac1)
>  		*emac1 = EMAC_RESET;
>  
>  	mtdcr(DCRN_MAL0_CFG, MAL_RESET);
> +	while (mfdcr(DCRN_MAL0_CFG) & MAL_RESET) {};

You need the {} or the ; but not both and please put them indented on the
next line so that it is very clear that this is an empty loop.

> +	if (cpc0_cr0 & 0x80) {
> +		/* uart0 uses the external clock */
> +		uart0 = ser_clk;
> +	} else {
> +		uart0 = cpu / udiv;
> +	}

The braces aren't really needed. (Yes, I noticed that you just moved the
code here)

> +	if (cpc0_cr0 & 0x40) {
> +		/* uart1 uses the external clock */
> +		uart1 = ser_clk;
> +	} else {
> +		uart1 = cpu / udiv;
> +	}

And again.

> +++ linux-merge/arch/powerpc/platforms/40x/ep405.c	2007-12-21 14:19:46.000000000 +1100
> +
> +static struct of_device_id ep405_of_bus[] = {

__initdata (preferably) or const

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20071222/517d863c/attachment.pgp>


More information about the Linuxppc-dev mailing list