Re: [PATCH 1/5] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

David Lanzendörfer
2014-02-05T13:33:56Z

[-- Attachment #1: Type: text/plain, Size: 858 bytes --]

Hi
> I'm not that fond of these "default y" patterns. It forces the driver
> down to every user of the multiplatform kernels. I'd suggest removing
> the default and adding the driver to the defconfigs we have.
Ok. Removed it.

> > +static void sunxi_mmc_init_host(struct mmc_host *mmc)
> > +{
> > [...]
> > + mci_writel(smc_host, REG_FUNS, 0xceaa0000);
> > + mci_writel(smc_host, REG_DLBA, smc_host->sg_dma);
> I suppose we have no idea what these magics are all about ? :(
That's the parameters I could extract from the Chinese code.
Without proper documentation it will always stay magic what exactly these
values are meaning.

> > +#define mci_readl(host, reg) \
> > + __raw_readl((host)->reg_base + SDXC_##reg)
> > +#define mci_writel(host, reg, value) \
> > + __raw_writel((value), (host)->reg_base + SDXC_##reg)
> No barriers ? :(
Fixed that...

cheers

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]