[U-Boot] [PATCH 02/14] powerpc/fman: add PHY support for dTSEC

Timur Tabi timur at freescale.com
Thu Jan 27 17:10:48 CET 2011


Mingkai Hu wrote:
> +	u16 phy_reg;
> +	u32 phy_ID;
> +	int i;
> +	struct phy_info *theInfo = NULL;
> +
> +	/* Grab the bits from PHYIR1, and put them in the upper half */
> +	phy_reg = tsec_phy_read(mii_info, 0, MII_PHYSID1);
> +	phy_ID = (phy_reg & 0xffff) << 16;
> +
> +	/* Grab the bits from PHYIR2, and put them in the lower half */
> +	phy_reg = tsec_phy_read(mii_info, 0, MII_PHYSID2);
> +	phy_ID |= (phy_reg & 0xffff);

The "& 0xffff" is unnecessary since phy_reg is a u16, so it can never be larger
than 0xffff.

> +			theInfo = phy_info[i];

CamelCase variables?

> + * Copyright 2009-2010 Freescale Semiconductor, Inc.

Should any of these be 2011?

-- 
Timur Tabi
Linux kernel developer at Freescale



More information about the U-Boot mailing list