Skip to content

Commit c017662

Browse files
committed
ASoC: rockchip: i2s_tdm: add writeq for ARM
Change-Id: Ieaa6dbeeac69f65e88dc3af4217d1e7e49b585b9 Signed-off-by: Tao Huang <huangtao@rock-chips.com>
1 parent 9d7f95c commit c017662

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

sound/soc/rockchip/rockchip_i2s_tdm.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ static inline struct rk_i2s_tdm_dev *to_info(struct snd_soc_dai *dai)
116116
return snd_soc_dai_get_drvdata(dai);
117117
}
118118

119+
#if defined(CONFIG_ARM) && !defined(writeq)
120+
static inline void __raw_writeq(u64 val, volatile void __iomem *addr)
121+
{
122+
asm volatile("strd %0, %H0, [%1]" : : "r" (val), "r" (addr));
123+
}
124+
#define writeq(v,c) ({ __iowmb(); __raw_writeq((__force u64) cpu_to_le64(v), c); })
125+
#endif
126+
119127
static void rockchip_snd_xfer_reset_assert(struct rk_i2s_tdm_dev *i2s_tdm,
120128
int tx_bank, int tx_offset,
121129
int rx_bank, int rx_offset)

0 commit comments

Comments
 (0)