Skip to content

Commit

Permalink
net: dsa: microchip: add ksz_prmw32() helper
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rasmus Villemoes authored and Jakub Kicinski committed Jun 23, 2023
1 parent 3b42fbd commit ece28ec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/dsa/microchip/ksz_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ece28ec

Please sign in to comment.