Commit ece28ecb authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Jakub Kicinski
Browse files

net: dsa: microchip: add ksz_prmw32() helper



This will be used in a subsequent patch fixing an errata for writes to
certain PHY registers.

Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Acked-by: default avatarArun Ramadoss <arun.ramadoss@microchip.com>
Link: https://lore.kernel.org/r/20230620113855.733526-3-linux@rasmusvillemoes.dk


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 3b42fbd5
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -582,6 +582,13 @@ static inline int ksz_prmw8(struct ksz_device *dev, int port, int offset,
			mask, val);
}

static inline int ksz_prmw32(struct ksz_device *dev, int port, int offset,
			     u32 mask, u32 val)
{
	return ksz_rmw32(dev, dev->dev_ops->get_port_addr(port, offset),
			 mask, val);
}

static inline void ksz_regmap_lock(void *__mtx)
{
	struct mutex *mtx = __mtx;