[U-Boot] [PATCH 03/10] fec_imx27: driver for FEC ethernet controller on i.MX27

Wolfgang Denk wd at denx.de
Wed May 6 23:20:44 CEST 2009


Dear Ilya,

In message <1241634633-13917-4-git-send-email-yanok at emcraft.com> you wrote:
> 
> --- /dev/null
> +++ b/drivers/net/fec_imx27.c
> +#include <asm/arch/clock.h>
> +#include <asm/arch/imx-regs.h>
> +#include <asm/io.h>
> +
> +#define CONFIG_PHY_ADDR	0

Ummm... "CONFIG_*" variables are by definition user changable, so they
get defined in board config files, but never in common C code.

[Lots of problematic code skipped as others already pointed out the
issues.]

> +int eth_init(bd_t * bd)
> +{
> +
> +	if (!once)
> +	{
> +		PRINTF("eth_init: fec_probe(bd)\n");
> +		fec_probe(bd);
> +		once = 1;
> +	}
> +	PRINTF("eth_init: fec_init(gfec.miiphy.edev, bd)\n");
> +	return fec_init(gfec.miiphy.edev, bd);
> +};

Incorrect brace style, also elsewhere.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You're dead, Jim.
	-- McCoy, "The Tholian Web", stardate unknown


More information about the U-Boot mailing list