[PATCH 03/17] Ensure that the old style MDIO interface is active before registering the MDIO bus on Faraday style MACs. Without this patch the hardware may continue to expect new style commands, yielding MDIO timeouts and general lack of communication with the MII.
Andrew Jeffery
andrew at aj.id.au
Mon Sep 19 10:51:48 AEST 2016
It looks like your entire commit message went into the subject...
On Fri, 2016-09-16 at 15:35 -0500, Timothy Pearson wrote:
> Signed-off-by: Timothy Pearson <tpearson at raptorengineering.com>
> ---
> drivers/net/ethernet/faraday/ftgmac100.c | 6 ++++++
> drivers/net/ethernet/faraday/ftgmac100.h | 2 ++
> 2 files changed, 8 insertions(+)
>
> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
> index c20f767..778c625 100644
> --- a/drivers/net/ethernet/faraday/ftgmac100.c
> +++ b/drivers/net/ethernet/faraday/ftgmac100.c
> @@ -1250,6 +1250,7 @@ static int ftgmac100_setup_mdio(struct net_device *netdev)
> {
> struct ftgmac100 *priv = netdev_priv(netdev);
> struct platform_device *pdev = to_platform_device(priv->dev);
> + uint32_t revcr;
> int i, err = 0;
>
> /* initialize mdio bus */
> @@ -1257,6 +1258,11 @@ static int ftgmac100_setup_mdio(struct net_device *netdev)
> if (!priv->mii_bus)
> return -EIO;
>
> + /* This driver only supports the old MDIO interface -- enable it */
> + revcr = ioread32(priv->base + FTGMAC100_OFFSET_REVR);
> + revcr &= ~FTGMAC100_OFFSET_REVR_NEW_INTERFACE;
> + iowrite32(revcr, priv->base + FTGMAC100_OFFSET_REVR);
Did you have any thoughts on my comments from v1 for this change?
Cheers,
Andrew
> +
> priv->mii_bus->name = "ftgmac100_mdio";
> snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%d",
> pdev->name, pdev->id);
> diff --git a/drivers/net/ethernet/faraday/ftgmac100.h b/drivers/net/ethernet/faraday/ftgmac100.h
> index d07b6ea..ee5f758 100644
> --- a/drivers/net/ethernet/faraday/ftgmac100.h
> +++ b/drivers/net/ethernet/faraday/ftgmac100.h
> @@ -133,6 +133,8 @@
> #define FTGMAC100_DMAFIFOS_RXDMA_REQ (1 << 30)
> #define FTGMAC100_DMAFIFOS_TXDMA_REQ (1 << 31)
>
> +#define FTGMAC100_OFFSET_REVR_NEW_INTERFACE (1 << 31)
> +
> /*
> * Receive buffer size register
> */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20160919/12362084/attachment.sig>
More information about the openbmc
mailing list