[PATCH 8/8] ARM: omap_hsmmc: remove platform data dma_mask and initialization

From
Tony Lindgren <tony@atomide.com>
Date
2012-04-18 19:55:17
Also in
linux-mmc, linux-omap
Reply to
Russell King - ARM Linux, 2012-04-18
* Russell King - ARM Linux [off-list ref] [120418 12:14]:
On Wed, Apr 18, 2012 at 11:19:18AM -0700, Tony Lindgren wrote:
quoted
* T Krishnamoorthy, Balaji [off-list ref] [120418 08:39]:
quoted
On Wed, Apr 18, 2012 at 8:59 PM, Russell King - ARM Linux
[off-list ref] wrote:
quoted
On Wed, Apr 18, 2012 at 08:53:32PM +0530, T Krishnamoorthy, Balaji wrote:
quoted
Hi,

drivers/mmc/host/omap.c is also using dma_mask should that also be removed
Does this driver make use of this platform data?

If so, it needs converting to DMA engine _before_ this patch (which is
one reason why its a good idea to do these changes as separate patches...
as I've done.) ?It means stuff like this can be slotted in as necessary
in the patch order.
Can't we can just do this in drivers/mmc/host/omap.c:

- host->dev->dma_mask = &pdata->dma_mask;
+ host->dev->dma_mask = 0xffffffff;

And that way drop it from the platform data. Looks like some omap1
omap_mmc_platform_data don't have it set though, but we do have host->use_dma = 1
set anyways in drivers/mmc/host/omap.c.
No.  dma_mask is a pointer to u64.  You need it stored in some variable.
Oops yeah.
 
But, really, we shouldn't be initializing dma masks in drivers at all.
That's supposed to come from the point where devices are created - and
in the case of DMA engine stuff, its not the peripheral device structures
which are doing DMA (they're DMA-incapable) - they rely on the services
of a separate IP to perform DMA on their behalf.
OK

Tony
Thread (56 messages) 56 messages, 9 authors, last reply 2012-04-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help