summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire/amd_init.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/soundwire/amd_init.h')
-rw-r--r--drivers/soundwire/amd_init.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/soundwire/amd_init.h b/drivers/soundwire/amd_init.h
index 928b0c7071..5e7b43836a 100644
--- a/drivers/soundwire/amd_init.h
+++ b/drivers/soundwire/amd_init.h
@@ -10,4 +10,12 @@
int amd_sdw_manager_start(struct amd_sdw_manager *amd_manager);
+static inline void amd_updatel(void __iomem *mmio, int offset, u32 mask, u32 val)
+{
+ u32 tmp;
+
+ tmp = readl(mmio + offset);
+ tmp = (tmp & ~mask) | val;
+ writel(tmp, mmio + offset);
+}
#endif