Re: [PATCH] [mmc-omap] Add support for 16-bit and 32-bit registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 18, 2009 at 10:41 AM, Ladislav Michl
<Ladislav.Michl@xxxxxxxxx> wrote:
> 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...

Agreed, this solution is more complicated than it probably needs to be.

>
>> * 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.

Ah, good point, I hadn't considered that.  I'll rework my
implementation to do that and resubmit.

>
>> 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

Not sure why it wouldn't work on the 5910.  I tested it on my device,
and it works properly for me, but then I don't have an omap-based
device that uses 32-bit register definitions.  I'm confused at the
post you have above though...Is that with my patch, or is that with
something else?  It seems to reference the status of current git,
which I don't think this patch shouldn't be in.

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

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux