aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/microchip/lan937x_main.c
diff options
context:
space:
mode:
authorArun Ramadoss <[email protected]>2022-09-02 10:32:09 +0000
committerDavid S. Miller <[email protected]>2022-09-05 12:06:40 +0000
commitf313936261ac18a2527fc0752cf988950587d0ce (patch)
tree96caf0a24d18b8defa38a754e98ab1384523bc0c /drivers/net/dsa/microchip/lan937x_main.c
parentnet: dsa: microchip: add reference to ksz_device inside the ksz_port (diff)
downloadkernel-f313936261ac18a2527fc0752cf988950587d0ce.tar.gz
kernel-f313936261ac18a2527fc0752cf988950587d0ce.zip
net: dsa: microchip: lan937x: clear the POR_READY_INT status bit
In the lan937x_reset_switch(), it masks all the switch and port registers. In the Global_Int_status register, POR ready bit is write 1 to clear bit and all other bits are read only. So, this patch clear the por_ready_int status bit by writing 1. Signed-off-by: Arun Ramadoss <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/dsa/microchip/lan937x_main.c')
-rw-r--r--drivers/net/dsa/microchip/lan937x_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/lan937x_main.c b/drivers/net/dsa/microchip/lan937x_main.c
index 7b464f1fb5d8..0466c4d0b10c 100644
--- a/drivers/net/dsa/microchip/lan937x_main.c
+++ b/drivers/net/dsa/microchip/lan937x_main.c
@@ -225,6 +225,10 @@ int lan937x_reset_switch(struct ksz_device *dev)
if (ret < 0)
return ret;
+ ret = ksz_write32(dev, REG_SW_INT_STATUS__4, POR_READY_INT);
+ if (ret < 0)
+ return ret;
+
ret = ksz_write32(dev, REG_SW_PORT_INT_MASK__4, 0xFF);
if (ret < 0)
return ret;