From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hiroshi Doyu Subject: Re: [PATCHv3 10/19] iommu/tegra: smmu: Get "nvidia,swgroups" from DT Date: Fri, 1 Nov 2013 08:27:54 +0100 Message-ID: <20131101.092754.1629953119317466726.hdoyu@nvidia.com> References: <1382092020-13170-11-git-send-email-hdoyu@nvidia.com><5271893C.6000507@wwwdotorg.org><20131031173132.GD3037@kartoffel> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20131031173132.GD3037@kartoffel> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "mark.rutland-5wv7dgnIgG8@public.gmane.org" Cc: "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Stephen Warren , "swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org" , "will.deacon-5wv7dgnIgG8@public.gmane.org" , "rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org" , "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , "grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org" List-Id: devicetree@vger.kernel.org Mark Rutland wrote @ Thu, 31 Oct 2013 18:31:33 +0100: > > Assuming "swgroup" is "memory client ID", why can't the driver just > > create a list/... of known swgroups at runtime, based on the swgroup > > values that each device uses, which would presumably be either > > hard-coded in the client device's driver, or represented in the DT smmu > > property's "iommu specifier" value. > > Assuming that the swgroup values of IP block instances are static, that sounds > like the ARM SMMU binding approach. Are the IDs static, or can they be assigned > at runtime? It's static. But swgroup ID isn't documented in TRM. ID is basically calculated from register offset. = (MC_SMMU__ASID_0 - MC_SMMU__ASID_0) / 4 Or MC_SMMU__ASID_0 = 4 * + MC_SMMU__ASID_0)