[PATCH V3] mmc: Enable the ADMA2 on esdhc imx driver

Anton Vorontsov cbouatmailru at gmail.com
Tue Jul 12 10:18:43 EDT 2011


On Tue, Jul 12, 2011 at 03:46:02PM +0200, Sascha Hauer wrote:
[...]
> Honestly, putting all kinds of driver logic into the register access
> functions will lead to a catastrophe sooner or later. There are too
> many quirks in it already, we should not add more of them.

There aren't many options. You may pollute generic driver with
quirks (which is not an option :-), or you can introduce more
ops for things like sdhci_send_command(), but in that case
you will duplicate the logic just to compensate minor register
differences.

In some cases, e.g. capabilities register, it seems that introducing
get_caps() op would be a logical step, but then you just move the code
under 'if (reg == SDHCI_CAPABILITIES) { ' into a dedicated function.
No big difference.

As for me, I don't see any catastrophe coming because of the register
access fixups. Quite the contrary: from the maintenance stand point,
you just need to know how the generic SDHCI works, and then you can
look into platform drivers to see their differences, which are mostly
minor.

Thanks,

-- 
Anton Vorontsov
Email: cbouatmailru at gmail.com



More information about the linux-arm-kernel mailing list