All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Zang Roy-R61911 <r61911@freescale.com>
Cc: linuxppc-dev@ozlabs.org, linux-mmc@vger.kernel.org
Subject: Re: [PATCH 3/3] mmc: Add ESDHC weird register workaround
Date: Fri, 30 Jul 2010 11:37:31 +0400	[thread overview]
Message-ID: <20100730073731.GA26137@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <83024545B35D6445A690EFD603E7869A0512E0@zch01exm23.fsl.freescale.net>

On Wed, Jul 28, 2010 at 05:43:00PM +0800, Zang Roy-R61911 wrote:
[...]
> > > +	/* The default value of DMAS bits of Protocol Control 
> > Register is not
> > > +	 * correct. clear these two bits to use simple DMA */
> > > +#define  ESDHCI_CTRL_DMAS_MASK		0xFFFFFCFF
> > > +	if (host->quirks & SDHCI_QUIRK_QORIQ_REG_WEIRD) {
> > > +		ctrl = sdhci_readl(host, SDHCI_HOST_CONTROL);
> > > +		ctrl = ctrl & ESDHCI_CTRL_DMAS_MASK;
> > > +		sdhci_writel(host, ctrl, SDHCI_HOST_CONTROL);
> > > +	}
> > 
> > You should implement register quirks via SDHCI IO accessors.
> What does you mean "SDHCI IO accessors?

See drivers/mmc/host/sdhci-of-esdhc.c

struct sdhci_of_data sdhci_esdhc = {
...
        .ops = {
...
                .write_l = sdhci_be32bs_writel,
...
        },
};

You can implement your own write_l and put the quirk in
there, as we do for esdhc_readw, esdhc_writew, etc.

OTOH, as you say it has wrong default value, not behaviour,
so I think you can just initialize the HOST_CONTROL register
just once somewhere in sdhci-of-esdhc, e.g. ->enable_dma
callback?

> It makes more sense to define something like:
> SDHCI_QUIRK_QORIQ_PROCTL_WEIRD.

I don't think so.

Thanks,

-- 
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2

  reply	other threads:[~2010-07-30  7:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-28  5:54 [PATCH 3/3] mmc: Add ESDHC weird register workaround Roy Zang
2010-07-28  8:03 ` Anton Vorontsov
2010-07-28  9:43   ` Zang Roy-R61911
2010-07-28  9:43     ` Zang Roy-R61911
2010-07-30  7:37     ` Anton Vorontsov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-07-28  6:04 Roy Zang

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=20100730073731.GA26137@oksana.dev.rtsoft.ru \
    --to=cbouatmailru@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=r61911@freescale.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.