Skip to content

Commit ece28ec

Browse files
Villemoeskuba-moo
authored andcommitted
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: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Simon Horman <simon.horman@corigine.com> Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com> Link: https://lore.kernel.org/r/20230620113855.733526-3-linux@rasmusvillemoes.dk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 3b42fbd commit ece28ec

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/net/dsa/microchip/ksz_common.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,13 @@ static inline int ksz_prmw8(struct ksz_device *dev, int port, int offset,
582582
mask, val);
583583
}
584584

585+
static inline int ksz_prmw32(struct ksz_device *dev, int port, int offset,
586+
u32 mask, u32 val)
587+
{
588+
return ksz_rmw32(dev, dev->dev_ops->get_port_addr(port, offset),
589+
mask, val);
590+
}
591+
585592
static inline void ksz_regmap_lock(void *__mtx)
586593
{
587594
struct mutex *mtx = __mtx;

0 commit comments

Comments
 (0)