Message ID | 1427383681-3537-1-git-send-email-ben.dooks@codethink.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Mar 26, 2015 at 03:28:01PM +0000, Ben Dooks wrote: > 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). 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?
diff --git a/sound/soc/atmel/atmel-pcm.h b/sound/soc/atmel/atmel-pcm.h index 12ae814..8f5f551 100644 --- a/sound/soc/atmel/atmel-pcm.h +++ b/sound/soc/atmel/atmel-pcm.h @@ -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);
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. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> -- CC: Bo Shen <voice.shen@atmel.com> CC: Liam Girdwood <lgirdwood@gmail.com> CC: Mark Brown <broonie@kernel.org> CC: Jaroslav Kysela <perex@perex.cz> CC: Takashi Iwai <tiwai@suse.de> CC: alsa-devel@alsa-project.org --- sound/soc/atmel/atmel-pcm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)