On 03/02/2012 01:22, Troy Kisky wrote:
> Define CONFIG_FEC_QUIRK_ENET_MAC and add to
> board files mx6qarm2 and mx6qsabrelite.
> 
> Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com>
> Acked-by: Dirk Behme <dirk.be...@de.bosch.com>
> ---
>  drivers/net/fec_mxc.c           |   21 +++++++++++++++++++--
>  drivers/net/fec_mxc.h           |    2 ++
>  include/configs/mx6qarm2.h      |    1 +
>  include/configs/mx6qsabrelite.h |    1 +
>  4 files changed, 23 insertions(+), 2 deletions(-)
> 
> This patch series is against Stefano's u-boot-imx 
> Patches 2/3 and 5 have changes from version 3

Hi Troy,

> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
> index ed73353..7c42b87 100644
> --- a/drivers/net/fec_mxc.c
> +++ b/drivers/net/fec_mxc.c
> @@ -379,13 +379,14 @@ static int fec_set_hwaddr(struct eth_device *dev)
>  static int fec_open(struct eth_device *edev)
>  {
>       struct fec_priv *fec = (struct fec_priv *)edev->priv;
> +     int speed;
>  
>       debug("fec_open: fec_open(dev)\n");
>       /* full-duplex, heartbeat disabled */
>       writel(1 << 2, &fec->eth->x_cntrl);
>       fec->rbd_index = 0;
>  
> -#if defined(CONFIG_MX6Q)
> +#ifdef CONFIG_FEC_QUIRK_ENET_MAC
>       /* Enable ENET HW endian SWAP */
>       writel(readl(&fec->eth->ecntrl) | FEC_ECNTRL_DBSWAP,
>               &fec->eth->ecntrl);
> @@ -428,9 +429,25 @@ static int fec_open(struct eth_device *edev)
>  #endif
>  
>       miiphy_wait_aneg(edev);
> -     miiphy_speed(edev->name, fec->phy_id);
> +     speed = miiphy_speed(edev->name, fec->phy_id);
>       miiphy_duplex(edev->name, fec->phy_id);
>  
> +#ifdef CONFIG_FEC_QUIRK_ENET_MAC
> +     {

It seems to me that QUIRK_ENET_MAC depends on the SOC, and not on the
boards. All imx6 boards must set it. If this is right, what about to put
this setup (as FEC_QUIRK_ENET_MAC) inside the imx-regs.h file ? All imx6
boards will automatically use it.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: off...@denx.de
=====================================================================
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to