From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vinod Koul Subject: Re: [PATCH 3/9] ACPI: add struct acpi_amba_quirk for AMD pl330 specific device config Date: Fri, 11 Dec 2015 15:01:49 +0530 Message-ID: <20151211093148.GX1854@localhost> References: <1449199466-6081-1-git-send-email-annie.wang@amd.com> <1449199466-6081-4-git-send-email-annie.wang@amd.com> <20151204131619.GC11655@xora-haswell.xora.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: 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: "Wang, Annie" Cc: "Li, Tony" , "Wan, Vincent" , Greg Kroah-Hartman , "Rafael J. Wysocki" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , "Huang, Ray" , Borislav Petkov , Graeme Gregory , "linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Mika Westerberg , "Xue, Ken" List-Id: linux-acpi@vger.kernel.org On Fri, Dec 11, 2015 at 06:57:51AM +0000, Wang, Annie wrote: > >> + /* > >> + * If the ACPI device already has a node attached. It must be > >> + * renamed. > >> + */ > >> + if (quirk->quirk & MULTI_ATTACHED_QUIRK) > >> + sprintf(amba_devname, "%s%s", dev_name(&adev->dev), > >"DMA"); > >> + else > >> + memcpy(amba_devname, dev_name(&adev->dev), > >> + strlen(dev_name(&adev->dev))); > >> + > >> + amba_dev = amba_device_alloc(amba_devname, > >> resource->start, > >> resource_size(resource)); > >> > > > >Isn't this basially an MFD in a rather odd fashion? MFD yes, odd perhaps made out here! > > > >I would have though having a device which just splits the resources then creates 2 > >children would be a whole lot simpler? > > Yup! > > It seems more complex, if I trans an ACPI device to pdev, then attach 2 platform child nodes, > and create an amba device refer to one of the childs. Too many trans. Sorry but I dont think that is right assumption, it will simper and PM would become easy -- ~Vinod From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754632AbbLKJ2q (ORCPT ); Fri, 11 Dec 2015 04:28:46 -0500 Received: from mga09.intel.com ([134.134.136.24]:45613 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753802AbbLKJ2m (ORCPT ); Fri, 11 Dec 2015 04:28:42 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,412,1444719600"; d="scan'208";a="11443619" Date: Fri, 11 Dec 2015 15:01:49 +0530 From: Vinod Koul To: "Wang, Annie" Cc: Graeme Gregory , Mika Westerberg , Joerg Roedel , Greg Kroah-Hartman , "Rafael J. Wysocki" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-serial@vger.kernel.org" , "dmaengine@vger.kernel.org" , "iommu@lists.linux-foundation.org" , Borislav Petkov , "Huang, Ray" , "Wan, Vincent" , "Xue, Ken" , "Li, Tony" Subject: Re: [PATCH 3/9] ACPI: add struct acpi_amba_quirk for AMD pl330 specific device config Message-ID: <20151211093148.GX1854@localhost> References: <1449199466-6081-1-git-send-email-annie.wang@amd.com> <1449199466-6081-4-git-send-email-annie.wang@amd.com> <20151204131619.GC11655@xora-haswell.xora.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 11, 2015 at 06:57:51AM +0000, Wang, Annie wrote: > >> + /* > >> + * If the ACPI device already has a node attached. It must be > >> + * renamed. > >> + */ > >> + if (quirk->quirk & MULTI_ATTACHED_QUIRK) > >> + sprintf(amba_devname, "%s%s", dev_name(&adev->dev), > >"DMA"); > >> + else > >> + memcpy(amba_devname, dev_name(&adev->dev), > >> + strlen(dev_name(&adev->dev))); > >> + > >> + amba_dev = amba_device_alloc(amba_devname, > >> resource->start, > >> resource_size(resource)); > >> > > > >Isn't this basially an MFD in a rather odd fashion? MFD yes, odd perhaps made out here! > > > >I would have though having a device which just splits the resources then creates 2 > >children would be a whole lot simpler? > > Yup! > > It seems more complex, if I trans an ACPI device to pdev, then attach 2 platform child nodes, > and create an amba device refer to one of the childs. Too many trans. Sorry but I dont think that is right assumption, it will simper and PM would become easy -- ~Vinod