This can be useful if we want to disable an interface in u-boot and
later reenable them, so that it looks available when trying to fix the
FDT or for the kernel.

Signed-off-by: Valentin Longchamp <valentin.longch...@keymile.com>
---
 drivers/net/fm/init.c | 7 +++++++
 include/fm_eth.h      | 1 +
 2 files changed, 8 insertions(+)

diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index 5908c32..820277e 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -158,6 +158,13 @@ void fm_disable_port(enum fm_port port)
        fman_disable_port(port);
 }
 
+void fm_enable_port(enum fm_port port)
+{
+       int i = fm_port_to_index(port);
+
+       fm_info[i].enabled = 1;
+}
+
 void fm_info_set_mdio(enum fm_port port, struct mii_dev *bus)
 {
        int i = fm_port_to_index(port);
diff --git a/include/fm_eth.h b/include/fm_eth.h
index 8fcf172..b464e04 100644
--- a/include/fm_eth.h
+++ b/include/fm_eth.h
@@ -162,5 +162,6 @@ void fm_info_set_phy_address(enum fm_port port, int 
address);
 int fm_info_get_phy_address(enum fm_port port);
 void fm_info_set_mdio(enum fm_port port, struct mii_dev *bus);
 void fm_disable_port(enum fm_port port);
+void fm_enable_port(enum fm_port port);
 
 #endif
-- 
1.8.0.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to