[U-Boot] [PATCH v2 1/2] net: add Calxeda xgmac driver

Mike Frysinger vapier at gentoo.org
Fri Dec 9 04:56:47 CET 2011


On Wednesday 07 December 2011 12:56:51 Rob Herring wrote:
> --- /dev/null
> +++ b/drivers/net/calxedaxgmac.c
>
> +struct xgmac_regs {
> +	u32 config;
> +	u32 framefilter;
> +	u32 resv_1[4];
> +	u32 flow_control;
> +	u32 vlantag;
> +	u32 version;
> +	u32 vlaninclude;
> +	u32 resv_2[2];
> +	u32 pacestretch;
> +	u32 vlanhash;
> +	u32 resv_3;
> +	u32 intreg;
> +	struct {
> +		u32 hi;         /* 0x40 */
> +		u32 lo;         /* 0x44 */
> +	} macaddr[16];
> +	u32 resv_4[0xd0];
> +        u32 core_opmode;	/* 0x400 */
> +	u32 resv_5[0x2bf];
> +        u32 busmode;		/* 0xf00 */
> +        u32 txpoll;
> +        u32 rxpoll;
> +        u32 rxdesclist;
> +        u32 txdesclist;
> +        u32 dma_status;
> +        u32 dma_opmode;
> +        u32 intenable;
> +	u32 resv_6[2];
> +        u32 axi_mode;		/* 0xf28 */
> +};

seems to mix tabs/spaces.  should be fixed to be tabs only.

> +static void init_rx_desc(struct calxeda_eth_dev *priv)
> +{
> ...
> +	};

delete that semicolon

> +int calxedaxgmac_initialize(u32 id, ulong base_addr)
> +{
> ...
> +	char enetvar[32];

this is unused now.  does this code compile warning-free ?

> +	dev = malloc(sizeof(*dev));
> +	if (!dev)
> +		return -ENOMEM;

return 0

> +	if (xgmac_reset(dev) < 0) {

you shouldn't be resetting in the registration function.  this belongs in your 
init func.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111208/1cf08421/attachment.pgp>


More information about the U-Boot mailing list