Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions drivers/net/rswitch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,7 @@ static int rswitch_probe(struct udevice *dev)
static int rswitch_remove(struct udevice *dev)
{
struct rswitch_priv *priv = dev_get_priv(dev);
int ret;

if (!priv->parallel_mode) {
clk_disable(&priv->rsw_clk);
Expand All @@ -1308,6 +1309,11 @@ static int rswitch_remove(struct udevice *dev)
mdio_unregister(priv->etha.bus);
}

/* Turn off GWCA to make sure that there will be no new packets */
ret = rswitch_gwca_change_mode(priv, GWMC_OPC_DISABLE);
if (ret)
pr_err("Failed to disable GWCA: %d\n", ret);

unmap_physmem(priv->addr, MAP_NOCACHE);
unmap_physmem(priv->etha.serdes_addr, MAP_NOCACHE);

Expand Down