[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170726104410.GI15833@8bytes.org>
Date: Wed, 26 Jul 2017 12:44:11 +0200
From: Joerg Roedel <joro@...tes.org>
To: Magnus Damm <magnus.damm@...il.com>
Cc: laurent.pinchart+renesas@...asonboard.com, geert+renesas@...der.be,
robin.murphy@....com, will.deacon@....com,
linux-kernel@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
iommu@...ts.linux-foundation.org, horms+renesas@...ge.net.au,
sricharan@...eaurora.org, m.szyprowski@...sung.com
Subject: Re: [PATCH v2 01/05] iommu/ipmmu-vmsa: Use
iommu_device_register()/unregister()
On Mon, Jul 17, 2017 at 10:05:10PM +0900, Magnus Damm wrote:
> --- 0001/drivers/iommu/ipmmu-vmsa.c
> +++ work/drivers/iommu/ipmmu-vmsa.c 2017-07-17 21:01:47.140607110 +0900
> @@ -35,6 +35,7 @@
> struct ipmmu_vmsa_device {
> struct device *dev;
> void __iomem *base;
> + struct iommu_device iommu;
> struct list_head list;
>
> unsigned int num_utlbs;
> @@ -1054,6 +1055,13 @@ static int ipmmu_probe(struct platform_d
>
> ipmmu_device_reset(mmu);
>
> + iommu_device_set_ops(&mmu->iommu, &ipmmu_ops);
> + iommu_device_set_fwnode(&mmu->iommu, &pdev->dev.of_node->fwnode);
> +
> + ret = iommu_device_register(&mmu->iommu);
> + if (ret)
> + return ret;
> +
Looks good so far, why don't you also add the iommu to sysfs with
iommu_device_sysfs_add()?
Joerg
Powered by blists - more mailing lists