diff options
| author | Oleksij Rempel <[email protected]> | 2022-12-05 05:22:29 +0000 |
|---|---|---|
| committer | Paolo Abeni <[email protected]> | 2022-12-07 10:57:58 +0000 |
| commit | 6f1b986a43ce9aa67b11a7e54ac75530705d04e7 (patch) | |
| tree | b88a8d8bca83f830a6eadf44ead2654df6271379 /drivers/net/dsa/microchip/ksz_common.h | |
| parent | net: dsa: microchip: do not store max MTU for all ports (diff) | |
| download | kernel-6f1b986a43ce9aa67b11a7e54ac75530705d04e7.tar.gz kernel-6f1b986a43ce9aa67b11a7e54ac75530705d04e7.zip | |
net: dsa: microchip: add ksz_rmw8() function
Add ksz_rmw8(), it will be used in the next patch.
Signed-off-by: Oleksij Rempel <[email protected]>
Acked-by: Arun Ramadoss <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.h')
| -rw-r--r-- | drivers/net/dsa/microchip/ksz_common.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index 61228be299f9..5f404a444ce1 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -454,6 +454,11 @@ static inline int ksz_write64(struct ksz_device *dev, u32 reg, u64 value) return regmap_bulk_write(dev->regmap[2], reg, val, 2); } +static inline int ksz_rmw8(struct ksz_device *dev, int offset, u8 mask, u8 val) +{ + return regmap_update_bits(dev->regmap[0], offset, mask, val); +} + static inline int ksz_pread8(struct ksz_device *dev, int port, int offset, u8 *data) { |
