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: [email protected]
irc://irc.freenode.net/bd2
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html