[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150306122549.314c6439@bbrezillon>
Date: Fri, 6 Mar 2015 12:25:49 +0100
From: Boris Brezillon <boris.brezillon@...e-electrons.com>
To: Alexandre Belloni <alexandre.belloni@...e-electrons.com>
Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Nicolas Ferre <nicolas.ferre@...el.com>,
Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 3/3] net: macb: remove #if defined(CONFIG_ARCH_AT91)
sections
On Thu, 5 Mar 2015 20:44:18 +0100
Alexandre Belloni <alexandre.belloni@...e-electrons.com> wrote:
> On 05/03/2015 at 17:27:22 +0100, Boris Brezillon wrote :
> > @@ -2388,21 +2392,20 @@ static int macb_probe(struct platform_device *pdev)
> > bp->phy_interface = err;
> > }
> >
> > + config = 0;
> > if (bp->phy_interface == PHY_INTERFACE_MODE_RGMII)
> > - macb_or_gem_writel(bp, USRIO, GEM_BIT(RGMII));
> > - else if (bp->phy_interface == PHY_INTERFACE_MODE_RMII)
> > -#if defined(CONFIG_ARCH_AT91)
> > - macb_or_gem_writel(bp, USRIO, (MACB_BIT(RMII) |
> > - MACB_BIT(CLKEN)));
> > -#else
> > - macb_or_gem_writel(bp, USRIO, 0);
> > -#endif
> > - else
> > -#if defined(CONFIG_ARCH_AT91)
> > - macb_or_gem_writel(bp, USRIO, MACB_BIT(CLKEN));
> > -#else
> > - macb_or_gem_writel(bp, USRIO, MACB_BIT(MII));
> > -#endif
> > + config = GEM_BIT(RGMII);
> > + else if (bp->phy_interface == PHY_INTERFACE_MODE_RMII &&
> > + (bp->caps & MACB_CAPS_USRIO_DEFAULT_IS_MII))
> > + config = MACB_BIT(RMII);
> > + else if (bp->phy_interface == PHY_INTERFACE_MODE_MII &&
>
> I'm not sure you should check for PHY_INTERFACE_MODE_MII here as this
> may change the previous behaviour.
Absolutely (I fixed it in v2).
Thanks,
Boris
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists