From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752995AbcIBKoY (ORCPT ); Fri, 2 Sep 2016 06:44:24 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:52861 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752272AbcIBKoV (ORCPT ); Fri, 2 Sep 2016 06:44:21 -0400 From: Arnd Bergmann To: Leo Li Cc: Felipe Balbi , Russell King - ARM Linux , Grygorii Strashko , Catalin Marinas , Yoshihiro Shimoda , "linux-usb@vger.kernel.org" , Sekhar Nori , lkml , David Fisher , "Thang Q. Nguyen" , Alan Stern , Greg Kroah-Hartman , "linux-arm-kernel@lists.infradead.org" , Stuart Yoder , Scott Wood Subject: Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Date: Fri, 02 Sep 2016 12:43:39 +0200 Message-ID: <6414695.LEIYfGPUEg@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <87vb31kdvh.fsf@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:dtODEjviqPZmnGR15omuuw9OQfKWcAw8lGIZ1X74JvILhHrhdb6 sxFyPC3EnWvDeMgiNjNbAA10hQM+wCCBI788jDxltjslNfxYmLKRwfWfiUQiaTsy38QoUxT 16S8V6Bfcf7lXT+ZuITWAKkApqTMLNl7QePvzaMa5ZLKqQaFq3o74pA7HfspeKUbtfp7ckF Xx9XhB6Pkfjb45dBbUoJg== X-UI-Out-Filterresults: notjunk:1;V01:K0:MlifHnaDhRk=:dXRNybvMBgeK7S/RULMPvg Tg13jdkMowaPF6n95CcKYMqH5uxoaQ0tbTVzCiPxdoy314y2hkK/o4gG7UelExeGfrBGoimZ0 gmfrm9SbAJ6vJVfqI59Y1nixCh/r2bigzhS9RitPBavXvhhF3Y+kKfweh5pr92nqPFtmhncAH Jv9uwW/onYrlNJB7IMtY7KuMv04HxH853hx6TMcbu8oKzq9FRtvIowdW7jGc2Dk/pCU2xhvui Y0sHJsWFgVBIXQp0nC6Ph/8DaV0S8poxsFoWr1bcFZVLoQBRRspl/36vLpYua1gb86RYbduwC ljSzKks97u5DTWrA8GJAraMbK/6ZsHIjbEEyC6KVZ/yHaoE0xrxocTqOTxtlMsQTjbIPmj+vq R8MZYkUeIDr1WXtFSa8sSAFD7mwwrnHhJ07jbyNtVpMFpwv2zBD0Epa/wRgB4YsVFK93H7xMX hILvTzlWujE1KltbO6Njg8e9CaW/mtD9w2+lAeGT6KJSlRD2kSZwbRx+DW9mfYlly9u6RhO0I KDy8WxlogDapeAbwkPouJ6Ofegz/cvB2UtiONKdFjDbyykQ9l1RQXWO0ugw4S41k+90WWxEap 2D8UxT+YLYWBeC66XtaGxl5I/iiitMoD7EbzI3R9GH7pyKRunCY6HN39aISvLfqpAcVnAUUgB ApthI/1L6rn3313llMresKx7Qr4WjnzHPYq5eYX6SCst9fwmXPhSXpOLRodJVH6hFEp8XQTdU ohZr4eyIpcoyM8MO Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, September 1, 2016 5:14:28 PM CEST Leo Li wrote: > > Hi Felipe and Arnd, > > It has been a while since the last response to this discussion, but we > haven't reached an agreement yet! Can we get to a conclusion on if it > is valid to create child platform device for abstraction purpose? If > yes, can this child device do DMA by itself? I'd say it's no problem for a driver to create child devices in order to represent different aspects of a device, but you should not rely on those devices working when used with the dma-mapping interfaces. This used to be simpler back when we could configure the kernel for only one SoC platform at a time, and the platforms could provide their own overrides for the dma-mapping interfaces. These days, we rely on firmware or bootloader to describe various aspects of how DMA is done, so you can't assume that passing a device without an of_node pointer or ACPI data into those functions will do the right thing. Arnd