Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Marco Braga <marco.braga@gmail.com>,
	Domen Puncer <domen.puncer@telargo.com>,
	linux-mips@linux-mips.org
Subject: Re: Trouble with sound/mips/au1x00.c AC97 driver
Date: Tue, 13 Mar 2007 00:43:15 +0000	[thread overview]
Message-ID: <20070313004315.GA26119@linux-mips.org> (raw)
In-Reply-To: <45F57328.8000606@ru.mvista.com>

On Mon, Mar 12, 2007 at 06:35:04PM +0300, Sergei Shtylyov wrote:

> >>It might be ignorance on my part, but aren't au_sync()'s needed here?
> 
> >My ignorance too.. What's au_sync()? Something to writeback/invalidate the
> >cache?
> 
>    It's "memory barrier" (SYNC instruction).

For the general MIPS case (Alchemy may provide guarantees I don't know of)
a SYNC instruction is not sufficient to ensure that a write has actually
been reached by the device.  It may just like on PCI take a read from the
same device again:

   au1000->ac97_ioport->config = AC97C_SG | AC97C_SYNC;
   au1000->ac97_ioport->config;
   udelay(100);
   au1000->ac97_ioport->config = 0x0;

to ensure that all preceding write have actually made it.  That also means
that any use of the SYNC instruction may well be just an attempt to paper
over a bug.

  Ralf

  reply	other threads:[~2007-03-13  0:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-07 10:49 Trouble with sound/mips/au1x00.c AC97 driver Freddy Spierenburg
2007-03-09  7:22 ` Marco Braga
2007-03-09 10:33   ` Freddy Spierenburg
2007-03-10 13:20     ` Marco Braga
     [not found]   ` <45F350E9.3020208@cooper-street.com>
     [not found]     ` <d459bb380703120157wb3dde00p4c232e300e82fd3d@mail.gmail.com>
2007-03-12  9:59       ` Marco Braga
2007-03-12 10:39         ` Domen Puncer
2007-03-12 13:09           ` Marco Braga
2007-03-12 15:35             ` Sergei Shtylyov
2007-03-13  0:43               ` Ralf Baechle [this message]
2007-03-13  1:00                 ` Andrew Dyer
2007-03-13  1:09                   ` Ralf Baechle
2007-03-13  8:44                     ` Marco Braga
     [not found]         ` <45F5DC73.9060004@cooper-street.com>
     [not found]           ` <d459bb380703130143w7c98e1cchdbdae6cb9a7ac7ce@mail.gmail.com>
     [not found]             ` <45F71FFD.202@cooper-street.com>
2007-03-13 23:12               ` Marco Braga
2007-03-15  8:04                 ` Marco Braga
2007-04-16 14:47           ` Freddy Spierenburg

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=20070313004315.GA26119@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=domen.puncer@telargo.com \
    --cc=linux-mips@linux-mips.org \
    --cc=marco.braga@gmail.com \
    --cc=sshtylyov@ru.mvista.com \
    /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