Skip to content

Commit

Permalink
net: dsa: microchip: lan937x: clear the POR_READY_INT status bit
Browse files Browse the repository at this point in the history
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 <arun.ramadoss@microchip.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Arun Ramadoss authored and David S. Miller committed Sep 5, 2022
1 parent f3c1654 commit f313936
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/dsa/microchip/lan937x_main.c
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit f313936

Please sign in to comment.