public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
To: kishon <kishon-l0cyMroinI0@public.gmane.org>
Cc: balbi-l0cyMroinI0@public.gmane.org,
	Vivek Gautam
	<gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org,
	thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	av.tikhomirov-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org
Subject: Re: [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree
Date: Tue, 16 Oct 2012 13:08:38 +0300	[thread overview]
Message-ID: <20121016100838.GC17416@arwen.pp.htv.fi> (raw)
In-Reply-To: <507D31B3.40707-l0cyMroinI0@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2343 bytes --]

Hi,

On Tue, Oct 16, 2012 at 03:36:43PM +0530, kishon wrote:
> Hi,
> 
> On Tuesday 16 October 2012 03:23 PM, Felipe Balbi wrote:
> >On Tue, Oct 16, 2012 at 02:15:56PM +0530, Vivek Gautam wrote:
> >>This patch adds support to parse probe data for
> >>dwc3-exynos driver using device tree.
> >>
> >>Signed-off-by: Vivek Gautam <gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> >>---
> >>  drivers/usb/dwc3/dwc3-exynos.c |   20 ++++++++++++++++++++
> >>  1 files changed, 20 insertions(+), 0 deletions(-)
> >>
> >>diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
> >>index ca65978..d11ef49 100644
> >>--- a/drivers/usb/dwc3/dwc3-exynos.c
> >>+++ b/drivers/usb/dwc3/dwc3-exynos.c
> >>@@ -21,6 +21,7 @@
> >>  #include <linux/clk.h>
> >>  #include <linux/usb/otg.h>
> >>  #include <linux/usb/nop-usb-xceiv.h>
> >>+#include <linux/of.h>
> >>
> >>  #include "core.h"
> >>
> >>@@ -87,6 +88,8 @@ err1:
> >>  	return ret;
> >>  }
> >>
> >>+static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32);
> >>+
> >>  static int __devinit dwc3_exynos_probe(struct platform_device *pdev)
> >>  {
> >>  	struct dwc3_exynos_data	*pdata = pdev->dev.platform_data;
> >>@@ -103,6 +106,14 @@ static int __devinit dwc3_exynos_probe(struct platform_device *pdev)
> >>  		goto err0;
> >>  	}
> >>
> >>+	/*
> >>+	 * Right now device-tree probed devices don't get dma_mask set.
> >>+	 * Since shared usb code relies on it, set it here for now.
> >>+	 * Once we move to full device tree support this will vanish off.
> >>+	 */
> >>+	if (!pdev->dev.dma_mask)
> >>+		pdev->dev.dma_mask = &dwc3_exynos_dma_mask;
> >
> >says who ?
> >
> >$ git grep -e dma_mask drivers/of/
> >drivers/of/platform.c:  dev->dev.dma_mask = &dev->archdata.dma_mask;
> >drivers/of/platform.c:  dev->archdata.dma_mask = 0xffffffffUL;
> >drivers/of/platform.c:  dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
> >drivers/of/platform.c:  dev->dev.coherent_dma_mask = ~0;
> >drivers/of/platform.c:  dev->dma_mask = ~0;
> >
> >-ECONFUSED
> 
> dma_mask is set under some ifdef except for "dev->dma_mask = ~0;".
> However I agree with you for coherent_dma_mask case.

indeed. Should we try to patch that instead ?

Rob, should we set dma_mask at the driver or do you have a nicer way to
handle it ??

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2012-10-16 10:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-16  8:45 [PATCH v2 0/2] USB: dwc3-exynos: Adding device tree support Vivek Gautam
     [not found] ` <1350377157-28465-1-git-send-email-gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-10-16  8:45   ` [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree Vivek Gautam
2012-10-16  9:53     ` Felipe Balbi
2012-10-16 10:06       ` kishon
     [not found]         ` <507D31B3.40707-l0cyMroinI0@public.gmane.org>
2012-10-16 10:08           ` Felipe Balbi [this message]
2012-10-25  6:07             ` Vivek Gautam
2012-10-26  8:13               ` Felipe Balbi
2012-10-26 11:44                 ` Benoit Cousson
2012-10-26 12:01                   ` Felipe Balbi
2012-10-31 13:38     ` Felipe Balbi
     [not found]       ` <20121031133823.GW10998-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-10-31 14:29         ` Vivek Gautam
2012-10-16  8:45 ` [PATCH v2 2/2] USB: DWC3: EXYNOS: Remove platform data for dwc3-exynos Vivek Gautam
     [not found]   ` <1350377157-28465-3-git-send-email-gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-10-31 12:06     ` Vivek Gautam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121016100838.GC17416@arwen.pp.htv.fi \
    --to=balbi-l0cymroini0@public.gmane.org \
    --cc=av.tikhomirov-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=kishon-l0cyMroinI0@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    --cc=thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox