summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/arc/emac.h
diff options
context:
space:
mode:
authorCaesar Wang <wxt@rock-chips.com>2016-03-14 09:01:54 +0100
committerDavid S. Miller <davem@davemloft.net>2016-03-17 00:28:01 +0100
commit1bddd96cba03da0a14b3e5144e98c9a6ff17e983 (patch)
treebdd4e8de5e6d5afc74f49ae86c404e2bd73b79e7 /drivers/net/ethernet/arc/emac.h
parentnet: arc_emac: add phy reset is optional for device tree (diff)
downloadlinux-1bddd96cba03da0a14b3e5144e98c9a6ff17e983.tar.xz
linux-1bddd96cba03da0a14b3e5144e98c9a6ff17e983.zip
net: arc_emac: support the phy reset for emac driver
This patch adds to support the emac phy reset. Different boards may require different phy reset duration. Add property phy-reset-duration for emac driver, so that the boards that need a longer reset duration can specify it in their device tree. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Caesar Wang <wxt@rock-chips.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Cc: Alexander Kochetkov <al.kochet@gmail.com> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/arc/emac.h')
-rw-r--r--drivers/net/ethernet/arc/emac.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/arc/emac.h b/drivers/net/ethernet/arc/emac.h
index dae1ac300a49..1a4040397a4b 100644
--- a/drivers/net/ethernet/arc/emac.h
+++ b/drivers/net/ethernet/arc/emac.h
@@ -102,6 +102,11 @@ struct buffer_state {
DEFINE_DMA_UNMAP_LEN(len);
};
+struct arc_emac_mdio_bus_data {
+ struct gpio_desc *reset_gpio;
+ int msec;
+};
+
/**
* struct arc_emac_priv - Storage of EMAC's private information.
* @dev: Pointer to the current device.
@@ -131,6 +136,7 @@ struct arc_emac_priv {
struct device *dev;
struct phy_device *phy_dev;
struct mii_bus *bus;
+ struct arc_emac_mdio_bus_data bus_data;
void __iomem *regs;
struct clk *clk;