From mboxrd@z Thu Jan 1 00:00:00 1970 From: Troy Kisky Date: Mon, 06 Feb 2012 18:29:17 -0700 Subject: [U-Boot] [PATCH v4 1/5] net: fec_mxc: add 1000 Mbps selection In-Reply-To: <4F2FAFC6.3040101@denx.de> References: <1328228569-5794-1-git-send-email-troy.kisky@boundarydevices.com> <4F2FAFC6.3040101@denx.de> Message-ID: <4F307E6D.2020705@boundarydevices.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 2/6/2012 3:47 AM, Stefano Babic wrote: > 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 >> Acked-by: Dirk Behme >> --- >> 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 > Sounds right to me. Thanks Troy