From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [PATCH] USB: set device dma_mask without reference to global data Date: Wed, 08 May 2013 16:42:04 -0600 Message-ID: <518AD4BC.6090009@wwwdotorg.org> References: <1367967232-10128-1-git-send-email-swarren@wwwdotorg.org> <5189B7BF.8070607@wwwdotorg.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Peter Chen Cc: Greg Kroah-Hartman , Stephen Warren , Arnd Bergmann , Alexander Shishkin , "linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Felipe Balbi , Alan Stern , linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: linux-tegra@vger.kernel.org On 05/07/2013 08:54 PM, Peter Chen wrote: >> >> This probably could be initialized from some DT property. However, >> there's no such property defined right now, and considering that DT is >> supposed to be an ABI, we'd always need the code in this patch as a >> fallback for DTs that were created before any such property was defined. >> >> Equally, since the data is SoC-specific rather than board-specific, and >> is even fairly unlikely to vary between SoC versions since these values >> are all 0xffffffff anyway, I don't really see much point in putting it >> into DT, rather than just putting the static data into the driver. > > I mean there is already dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); > at function of_platform_device_create, why can't add > dev->dev.dma_mask = &dev->dev.coherent_dma_mask after that? > > If DT core can do above things, can we delete dma_mask assignment > at every driver? Perhaps. However, such a change has a much larger potential for regressions. I would suggest going with the current patch for 3.10 and any later backports in order to reduce risk. We can revisit better cleanup for later kernels.