[PATCH v2 4/8] reset: imx8mp-audiomix: Add prefix for internal macro

Daniel Baluta
2025-02-19T19:21:35Z

This adds IMX8MP_AUDIOMIX_ prefix to internal macros in order to show
that specific macros are related to audiomix.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
---
drivers/reset/reset-imx8mp-audiomix.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/reset/reset-imx8mp-audiomix.c b/drivers/reset/reset-imx8mp-audiomix.c
index 6e3f3069f727..1fe21980a66c 100644
--- a/drivers/reset/reset-imx8mp-audiomix.c
+++ b/drivers/reset/reset-imx8mp-audiomix.c
@@ -11,8 +11,8 @@
#include <linux/of_address.h>
#include <linux/reset-controller.h>

-#define EARC 0x200
-#define EARC_RESET_MASK 0x3
+#define IMX8MP_AUDIOMIX_EARC_OFFSET 0x200
+#define IMX8MP_AUDIOMIX_EARC_RESET_MASK 0x3

struct imx8mp_audiomix_reset {
struct reset_controller_dev rcdev;
@@ -35,8 +35,8 @@ static int imx8mp_audiomix_reset_assert(struct reset_controller_dev *rcdev,

mask = BIT(id);
spin_lock_irqsave(&priv->lock, flags);
- reg = readl(reg_addr + EARC);
- writel(reg & ~mask, reg_addr + EARC);
+ reg = readl(reg_addr + IMX8MP_AUDIOMIX_EARC_OFFSET);
+ writel(reg & ~mask, reg_addr + IMX8MP_AUDIOMIX_EARC_OFFSET);
spin_unlock_irqrestore(&priv->lock, flags);

return 0;
@@ -52,8 +52,8 @@ static int imx8mp_audiomix_reset_deassert(struct reset_controller_dev *rcdev,

mask = BIT(id);
spin_lock_irqsave(&priv->lock, flags);
- reg = readl(reg_addr + EARC);
- writel(reg | mask, reg_addr + EARC);
+ reg = readl(reg_addr + IMX8MP_AUDIOMIX_EARC_OFFSET);
+ writel(reg | mask, reg_addr + IMX8MP_AUDIOMIX_EARC_OFFSET);
spin_unlock_irqrestore(&priv->lock, flags);

return 0;
@@ -78,7 +78,7 @@ static int imx8mp_audiomix_reset_probe(struct auxiliary_device *adev,
spin_lock_init(&priv->lock);

priv->rcdev.owner = THIS_MODULE;
- priv->rcdev.nr_resets = fls(EARC_RESET_MASK);
+ priv->rcdev.nr_resets = fls(IMX8MP_AUDIOMIX_EARC_RESET_MASK);
priv->rcdev.ops = &imx8mp_audiomix_reset_ops;
priv->rcdev.of_node = dev->parent->of_node;
priv->rcdev.dev = dev;
--
2.25.1