[PATCH 7/7] OF: set dma_mask for ARM

Grant Likely grant.likely at secretlab.ca
Wed Nov 17 16:24:48 EST 2010


On Tue, Nov 16, 2010 at 02:33:55PM -0600, Rob Herring wrote:
> From: Rob Herring <rob.herring at calxeda.com>
> 
> Various drivers require dma_mask to be valid, so it needs to be setup
> when doing OF probing on ARM.
> 
> Signed-off-by: Rob Herring <rob.herring at calxeda.com>

I'll let patches 6 & 7 lay fallow for the moment.  I'm not hugely fond
of the powerpc approach (which microblaze copies), but I haven't had a
chance to look for a better solution.

g.

> ---
>  drivers/of/platform.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index 5b4a07f..fe2669a 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -614,7 +614,7 @@ struct platform_device *of_device_alloc(struct device_node *np,
>  	}
>  
>  	dev->dev.of_node = of_node_get(np);
> -#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE)
> +#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_ARM)
>  	dev->dev.dma_mask = &dev->archdata.dma_mask;
>  #endif
>  	dev->dev.parent = parent;
> @@ -644,7 +644,7 @@ struct platform_device *of_platform_device_create(struct device_node *np,
>  	if (!dev)
>  		return NULL;
>  
> -#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE)
> +#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_ARM)
>  	dev->archdata.dma_mask = 0xffffffffUL;
>  #endif
>  	dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
> -- 
> 1.7.1
> 
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss


More information about the devicetree-discuss mailing list