diff options
| author | Rasmus Villemoes <[email protected]> | 2023-06-20 11:38:53 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2023-06-23 02:48:37 +0000 |
| commit | ece28ecbec9f63e3f722d7c9a99fb965cbeafc1b (patch) | |
| tree | 44429e4378266808f410954970b286b6da86761e /drivers/net/dsa/microchip/ksz_common.h | |
| parent | net: dsa: microchip: simplify ksz_prmw8() (diff) | |
| download | kernel-ece28ecbec9f63e3f722d7c9a99fb965cbeafc1b.tar.gz kernel-ece28ecbec9f63e3f722d7c9a99fb965cbeafc1b.zip | |
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 <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Acked-by: Arun Ramadoss <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.h')
| -rw-r--r-- | drivers/net/dsa/microchip/ksz_common.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index 2453c43c48a5..28444e5924f9 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -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; |
