summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/qca/qca8k.h
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2022-07-27 13:35:13 +0200
committerJakub Kicinski <kuba@kernel.org>2022-07-29 07:24:38 +0200
commitd5f901eab2e9dfed1095995dfc98f231f4fd2971 (patch)
treec5cc033a1ac9eab1128b4268df7552159bb76b93 /drivers/net/dsa/qca/qca8k.h
parentnet: dsa: qca8k: move mib struct to common code (diff)
downloadlinux-d5f901eab2e9dfed1095995dfc98f231f4fd2971.tar.xz
linux-d5f901eab2e9dfed1095995dfc98f231f4fd2971.zip
net: dsa: qca8k: move qca8k read/write/rmw and reg table to common code
The same reg table and read/write/rmw function are used by drivers based on qca8k family switch. Move them to common code to make it accessible also by other drivers. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r--drivers/net/dsa/qca/qca8k.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/dsa/qca/qca8k.h b/drivers/net/dsa/qca/qca8k.h
index 0f274bb350f8..c9b753743dfd 100644
--- a/drivers/net/dsa/qca/qca8k.h
+++ b/drivers/net/dsa/qca/qca8k.h
@@ -424,5 +424,11 @@ struct qca8k_fdb {
/* Common setup function */
extern const struct qca8k_mib_desc ar8327_mib[];
+extern const struct regmap_access_table qca8k_readable_table;
+
+/* Common read/write/rmw function */
+int qca8k_read(struct qca8k_priv *priv, u32 reg, u32 *val);
+int qca8k_write(struct qca8k_priv *priv, u32 reg, u32 val);
+int qca8k_rmw(struct qca8k_priv *priv, u32 reg, u32 mask, u32 write_val);
#endif /* __QCA8K_H */