[PATCH net-next 2/3] net: dsa: microchip: add ksz_prmw32() helper

Rasmus Villemoes posted 3 patches 2 years, 7 months ago
[PATCH net-next 2/3] net: dsa: microchip: add ksz_prmw32() helper
Posted by Rasmus Villemoes 2 years, 7 months ago
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>
---
 drivers/net/dsa/microchip/ksz_common.h | 7 +++++++
 1 file changed, 7 insertions(+)

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;
-- 
2.37.2
Re: [PATCH net-next 2/3] net: dsa: microchip: add ksz_prmw32() helper
Posted by Arun.Ramadoss@microchip.com 2 years, 7 months ago
On Tue, 2023-06-20 at 13:38 +0200, Rasmus Villemoes wrote:
> [Some people who received this message don't often get email from
> linux@rasmusvillemoes.dk. Learn why this is important at 
> https://aka.ms/LearnAboutSenderIdentification ]
> 
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> 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>

Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com>


Re: [PATCH net-next 2/3] net: dsa: microchip: add ksz_prmw32() helper
Posted by Simon Horman 2 years, 7 months ago
On Tue, Jun 20, 2023 at 01:38:53PM +0200, Rasmus Villemoes wrote:
> 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>