From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: AACI broken with commit 29a4f2d3
Date: Thu, 25 Mar 2010 11:30:19 +0000 [thread overview]
Message-ID: <20100325113019.GA6590@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <s5h39zou023.wl%tiwai@suse.de>
On Thu, Mar 25, 2010 at 12:12:52PM +0100, Takashi Iwai wrote:
> At Wed, 24 Mar 2010 15:18:06 -0000,
> Will Deacon wrote:
> >
> > Hi Catalin,
> >
> > > aaci: Use writew() to the AC97_POWERDOWN 16-bit register
> > >
> > > From: Catalin Marinas <catalin.marinas@arm.com>
> > >
> > > The writel() introduced by commit 29a4f2d3 generates an alignment fault
> > > on ARM.
> > >
> > > Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> > > Cc: Philby John <pjohn@in.mvista.com>
> > > Cc: Takashi Iwai <tiwai@suse.de>
> > > ---
> > > 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 <will.deacon@arm.com>
>
> Looking back at the original patch again, I wonder now whether using
> AC97_* for the register offset here is really correct. Usually AC97
> registers are accessed indirectly.
>
> Is it just same 0x26, or is this intentional?
The original patch is total crap.
1. You can't access AC97 registers via writel.
2. If the offset is 0x26 (AACI_CSCH2 + AACI_IE + 2), this is writing to
reserved bits in channel 2's interrupt enable register which has
nothing to do with the slot 1/2 transmit registers.
The patch could never have been tested in the first place.
next prev parent reply other threads:[~2010-03-25 11:30 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-24 13:51 AACI broken with commit 29a4f2d3 Catalin Marinas
2010-03-24 15:10 ` Catalin Marinas
2010-03-24 15:18 ` Will Deacon
2010-03-25 11:12 ` Takashi Iwai
2010-03-25 11:30 ` Russell King - ARM Linux [this message]
2010-03-25 11:36 ` Takashi Iwai
2010-03-25 11:50 ` Philby John
2010-03-25 12:02 ` Catalin Marinas
2010-03-25 12:16 ` Russell King - ARM Linux
2010-03-26 11:28 ` Philby John
2010-03-26 13:00 ` Catalin Marinas
2010-03-26 13:10 ` Philby John
2010-03-26 13:24 ` Mark Brown
2010-03-26 13:54 ` Catalin Marinas
2010-03-26 14:00 ` Philby John
2010-03-26 14:05 ` Catalin Marinas
2010-03-26 14:08 ` Mark Brown
2010-03-26 14:12 ` Catalin Marinas
2010-03-26 14:15 ` Mark Brown
2010-03-26 16:07 ` Philby John
2010-03-26 21:11 ` Takashi Iwai
2010-03-29 7:45 ` Philby John
2010-03-29 7:57 ` Takashi Iwai
2010-04-06 8:12 ` Takashi Iwai
2010-04-06 17:41 ` Russell King - ARM Linux
2010-04-06 18:07 ` Takashi Iwai
2010-04-12 18:31 ` Russell King - ARM Linux
2010-04-13 7:48 ` Takashi Iwai
2010-03-26 22:56 ` Russell King - ARM Linux
2010-03-26 18:15 ` Russell King - ARM Linux
2010-03-25 12:06 ` Russell King - ARM Linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100325113019.GA6590@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).