summaryrefslogtreecommitdiff
path: root/drivers/net/fm/init.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2011-09-14 12:01:35 -0500
committerKumar Gala <galak@kernel.crashing.org>2011-10-03 08:52:15 -0500
commit69a852425883a4abd8dc726da34e3149a08ee95d (patch)
treed919f003c01ee119e4938d67b15a3cdb9f0c407c /drivers/net/fm/init.c
parent2b3a1cdd9ed14441ae91845851aaf91adddbafc0 (diff)
downloadu-boot-imx-69a852425883a4abd8dc726da34e3149a08ee95d.zip
u-boot-imx-69a852425883a4abd8dc726da34e3149a08ee95d.tar.gz
u-boot-imx-69a852425883a4abd8dc726da34e3149a08ee95d.tar.bz2
fm-eth: Add ability for board code to disable a port
The SoC configuration may have more ports enabled than a given board actually can utilize. Add a routinue that allows the board code to disable a port that it knows isn't being used. fm_disable_port() needs to be called before cpu_eth_init(). Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'drivers/net/fm/init.c')
-rw-r--r--drivers/net/fm/init.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index 5f05ab1..512d7dd 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -123,6 +123,14 @@ void fman_enet_init(void)
return ;
}
+void fm_disable_port(enum fm_port port)
+{
+ int i = fm_port_to_index(port);
+
+ fm_info[i].enabled = 0;
+ fman_disable_port(port);
+}
+
void fm_info_set_mdio(enum fm_port port, struct mii_dev *bus)
{
int i = fm_port_to_index(port);