ASoC: atmel_pcm: use endian agnostic IO accessors
PATCH 1/1 ASoC: atmel_pcm: use endian agnostic IO accessors
The atmel-pcm.h is using __raw_readl and __raw_writel for IO accessors which do not work if the processor is in big endian mode (the peripheral will still expect data in little endian format).
Note, I do not think this is being used in the AVR32 which would require a different fix (possible after atmel_io.h is merged).
This has not been run-tested as I do not have a board with an audio code on.
--
CC: Bo Shen <[email protected]>
CC: Liam Girdwood <[email protected]>
CC: Mark Brown <[email protected]>
CC: Jaroslav Kysela <[email protected]>
CC: Takashi Iwai <[email protected]>
CC: [email protected]
--- sound/soc/atmel/atmel-pcm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/atmel/atmel-pcm.h +2 -2
@@ -80,8 +80,8 @@ struct atmel_pcm_dma_params {/* * SSC register access (since ssc_writel() / ssc_readl() require literal name) */ -#define ssc_readx (base, reg) (__raw_readl((base) + (reg))) -#define ssc_writex (base, reg, value) __raw_writel((value), (base) + (reg)) +#define ssc_readx (base, reg) (readl_relaxed((base) + (reg))) +#define ssc_writex (base, reg, value) writel_relaxed((value), (base) + (reg))int atmel_pcm_new (struct snd_soc_pcm_runtime *rtd);void atmel_pcm_free (struct snd_pcm *pcm);
Signature · 1 line
2.1.4
Mark Brown
maintainerQuoted 3 lines · Ben Dooks
Note, I do not think this is being used in the AVR32 which would require a different fix (possible after
atmel_io.his merged).
AVR32 uses the same code - there used to be separate at91 and avr32 directories but we merged them together into a single atmel directory. I don't know how many people are *actually* using the code on AVR32 though. Is this safe for it?