diff options
author | Valentin Longchamp <valentin.longchamp@keymile.com> | 2013-10-18 09:47:21 (GMT) |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2013-10-24 16:35:59 (GMT) |
commit | f51d3b71d4d3eacfbbc6e2cf3fa197774df5f638 (patch) | |
tree | 7fba1071d269735aab40c8dcab7027f2811b09af /drivers/net/fm/init.c | |
parent | 7e157b0ade85282a76db27cbf0ab8a2370d4d7b6 (diff) | |
download | u-boot-f51d3b71d4d3eacfbbc6e2cf3fa197774df5f638.tar.xz |
net/fman: add a fm_enable_port function
This can be useful if one wants to disable an interface in u-boot
because u-boot should not manage it but then later reenable it for FDT
fixing or if the kernel uses this interface.
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
[York Sun: fix conflict in fm_eth.h]
Acked-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'drivers/net/fm/init.c')
-rw-r--r-- | drivers/net/fm/init.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c index 2d13145..35edd7a 100644 --- a/drivers/net/fm/init.c +++ b/drivers/net/fm/init.c @@ -145,6 +145,14 @@ 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; + fman_enable_port(port); +} + void fm_info_set_mdio(enum fm_port port, struct mii_dev *bus) { int i = fm_port_to_index(port); |