Subject: AACI broken with commit 29a4f2d3

From: [email-masked] (Will Deacon)
Date: Wed, 24 Mar 2010 15:18:06 -0000

Hi Catalin,

> aaci: Use writew() to the AC97_POWERDOWN 16-bit register
> 
> From: Catalin Marinas <[email-masked]>
> 
> The writel() introduced by commit 29a4f2d3 generates an alignment fault
> on ARM.
> 
> Signed-off-by: Catalin Marinas <[email-masked]>
> Cc: Philby John <[email-masked]>
> Cc: Takashi Iwai <[email-masked]>
> ---
>  sound/arm/aaci.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
> index 656e474..d66d4ff 100644
> --- a/sound/arm/aaci.c
> +++ b/sound/arm/aaci.c
> @@ -863,7 +863,7 @@ static int __devinit aaci_probe_ac97(struct aaci *aaci)
>  	struct snd_ac97 *ac97;
>  	int ret;
> 
> -	writel(0, aaci->base + AC97_POWERDOWN);
> +	writew(0, aaci->base + AC97_POWERDOWN);
>  	/*
>  	 * Assert AACIRESET for 2us
>  	 */

A writel() looks wrong anyway because even if it could succeed, it would
send half of its write to AC97_EXTENDED_ID, which sounds suspiciously read-only
to me.

Tested-by: Will Deacon <[email-masked]>

Will