From mboxrd@z Thu Jan 1 00:00:00 1970 From: antoine.tenart@free-electrons.com (Antoine Tenart) Date: Tue, 23 Sep 2014 15:36:45 +0200 Subject: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx In-Reply-To: <2909480.SL9c0XWUbW@wuerfel> References: <1411468088-5702-1-git-send-email-antoine.tenart@free-electrons.com> <1411468088-5702-8-git-send-email-antoine.tenart@free-electrons.com> <2909480.SL9c0XWUbW@wuerfel> Message-ID: <20140923133645.GA18924@kwain> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Arnd, On Tue, Sep 23, 2014 at 12:39:04PM +0200, Arnd Bergmann wrote: > On Tuesday 23 September 2014 12:28:03 Antoine Tenart wrote: > > + if (dev->of_node) { > > + ret = ci_hdrc_usb2_dt_probe(dev, ci_pdata); > > + if (ret) > > + goto clk_err; > > + } else { > > + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); > > + if (ret) > > + goto clk_err; > > + } > > > > Why do you care about the non-DT case here? I think it would be nicer to > open-code the ci_hdrc_usb2_dt_probe() function in here and remove > the dma_set_mask_and_coherent(), which should not even be necessary for > the case where you have a hardwired platform device. > I thought we agreed to call dma_set_mask_and_coherent(): http://lists.infradead.org/pipermail/linux-arm-kernel/2014-July/273335.html I do not have a strong opinion on this as I only use the dt case for my usage. Antoine -- Antoine T?nart, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Antoine Tenart Subject: Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx Date: Tue, 23 Sep 2014 15:36:45 +0200 Message-ID: <20140923133645.GA18924@kwain> References: <1411468088-5702-1-git-send-email-antoine.tenart@free-electrons.com> <1411468088-5702-8-git-send-email-antoine.tenart@free-electrons.com> <2909480.SL9c0XWUbW@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <2909480.SL9c0XWUbW@wuerfel> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Arnd Bergmann Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Antoine Tenart , sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, Peter.Chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org, balbi-l0cyMroinI0@public.gmane.org, p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org, zmxu-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org, jszhang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org List-Id: devicetree@vger.kernel.org Arnd, On Tue, Sep 23, 2014 at 12:39:04PM +0200, Arnd Bergmann wrote: > On Tuesday 23 September 2014 12:28:03 Antoine Tenart wrote: > > + if (dev->of_node) { > > + ret =3D ci_hdrc_usb2_dt_probe(dev, ci_pdata); > > + if (ret) > > + goto clk_err; > > + } else { > > + ret =3D dma_set_mask_and_coherent(&pdev->dev, DMA_B= IT_MASK(32)); > > + if (ret) > > + goto clk_err; > > + } > >=20 >=20 > Why do you care about the non-DT case here? I think it would be nicer= to > open-code the ci_hdrc_usb2_dt_probe() function in here and remove > the dma_set_mask_and_coherent(), which should not even be necessary f= or > the case where you have a hardwired platform device. >=20 I thought we agreed to call dma_set_mask_and_coherent(): http://lists.infradead.org/pipermail/linux-arm-kernel/2014-July/273335.= html I do not have a strong opinion on this as I only use the dt case for my usage. Antoine --=20 Antoine T=E9nart, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756020AbaIWNgw (ORCPT ); Tue, 23 Sep 2014 09:36:52 -0400 Received: from top.free-electrons.com ([176.31.233.9]:57725 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751742AbaIWNgu (ORCPT ); Tue, 23 Sep 2014 09:36:50 -0400 Date: Tue, 23 Sep 2014 15:36:45 +0200 From: Antoine Tenart To: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org, Antoine Tenart , sebastian.hesselbarth@gmail.com, Peter.Chen@freescale.com, balbi@ti.com, p.zabel@pengutronix.de, thomas.petazzoni@free-electrons.com, zmxu@marvell.com, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, alexandre.belloni@free-electrons.com, jszhang@marvell.com Subject: Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx Message-ID: <20140923133645.GA18924@kwain> References: <1411468088-5702-1-git-send-email-antoine.tenart@free-electrons.com> <1411468088-5702-8-git-send-email-antoine.tenart@free-electrons.com> <2909480.SL9c0XWUbW@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2909480.SL9c0XWUbW@wuerfel> 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 Arnd, On Tue, Sep 23, 2014 at 12:39:04PM +0200, Arnd Bergmann wrote: > On Tuesday 23 September 2014 12:28:03 Antoine Tenart wrote: > > + if (dev->of_node) { > > + ret = ci_hdrc_usb2_dt_probe(dev, ci_pdata); > > + if (ret) > > + goto clk_err; > > + } else { > > + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); > > + if (ret) > > + goto clk_err; > > + } > > > > Why do you care about the non-DT case here? I think it would be nicer to > open-code the ci_hdrc_usb2_dt_probe() function in here and remove > the dma_set_mask_and_coherent(), which should not even be necessary for > the case where you have a hardwired platform device. > I thought we agreed to call dma_set_mask_and_coherent(): http://lists.infradead.org/pipermail/linux-arm-kernel/2014-July/273335.html I do not have a strong opinion on this as I only use the dt case for my usage. Antoine -- Antoine Ténart, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com