lkml.org 
[lkml]   [2012]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] iommu/tegra: smmu: Add device tree support for SMMU
On 04/23/2012 05:58 AM, Hiroshi DOYU wrote:
> Add device tree support for Tegra30 IOMMU(SMMU).

> diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c

> + err = of_parse_dma_window(dev->of_node, "dma-window", 0, NULL,
> + &base, &size);

This patch also depends on "dt: Add general DMA window parser" that you
sent earlier.

> + asids = be32_to_cpup(of_get_property(dev->of_node, "asids", NULL));
> + if (!asids)
> + return -ENODEV;

What if of_get_property() fails?

BTW, does the # ASIDs vary? I wonder if it's worth representing it in
the device tree or not. If this driver has a chance of working
unmodified on some future chip just by updating this DT property without
any code changes, then it seems reasonable to have it in DT.


\
 
 \ /
  Last update: 2012-04-23 20:29    [W:0.053 / U:0.696 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site