diff mbox series

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

Message ID 20230620113855.733526-3-linux@rasmusvillemoes.dk (mailing list archive)
State Accepted
Commit ece28ecbec9f63e3f722d7c9a99fb965cbeafc1b
Delegated to: Netdev Maintainers
Headers show
Series net: dsa: microchip: fix writes to phy registers >= 0x10 | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/cc_maintainers success CCed 10 of 10 maintainers
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 13 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Rasmus Villemoes June 20, 2023, 11:38 a.m. UTC
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(+)

Comments

Simon Horman June 20, 2023, 4:14 p.m. UTC | #1
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>
Arun Ramadoss June 22, 2023, 3:49 a.m. UTC | #2
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>
diff mbox series

Patch

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;