On Sat, Nov 14, 2009 at 07:24:55PM -0800, Cory Maccarrone wrote:
> The omap850 and omap730 use 16-bit registers instead of 32-bit, requiring
> a modification of the register addresses in the mmc-omap driver.  To
> make this as portable as possible, I made the following changes:

Hmm, I would not trade portability anyone currently needs for complexity...

> * Moved register address offsets from drivers/mmc/host/omap.c to
>   drivers/mmc/host/omap.h
> * Implemented a lookup table for 16-bit and 32-bit register offsets
> * Added a reg_size field in the mmc_omap_host structure
> * Added code in mmc_omap_probe() to populate the reg_size
>   field based on processor in use
> * Added inline function to return the register offset based on
>   the register size and register name
> * Modified mmc-omap driver to use the new inline function to call out
>   register names

All this could be probably done by making register definition an index and
shifting it left by one or two depending on CPU. No lookup table needed.

> This change should allow the omap7xx-series of processors to correctly
> utilize the MMC driver.

Did you test it? It does not work on 5910, see here:
http://thread.gmane.org/gmane.linux.kernel.mmc/649

Best regards,
        ladis
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to