linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Peter Chen <hzpeterchen@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Stephen Warren <swarren@nvidia.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	Felipe Balbi <balbi@ti.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] USB: set device dma_mask without reference to global data
Date: Tue, 07 May 2013 20:26:07 -0600	[thread overview]
Message-ID: <5189B7BF.8070607@wwwdotorg.org> (raw)
In-Reply-To: <CAL411-qVnm0_wwdAiAp9eq_hYkXzFSmRMLAmknpSAG7Jb3bM9A@mail.gmail.com>

On 05/07/2013 07:13 PM, Peter Chen wrote:
> On Wed, May 8, 2013 at 6:53 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> From: Stephen Warren <swarren@nvidia.com>
>>
>> Many USB host drivers contain code such as:
>>
>> if (!pdev->dev.dma_mask)
>>         pdev->dev.dma_mask = &tegra_ehci_dma_mask;
>>
>> ... where tegra_ehci_dma_mask is a global. I suspect this code originated
>> in commit 4a53f4e "USB: ehci-tegra: add probing through device tree" and
>> was simply copied everywhere else.
> 
> One question: why device tree can't do this when create device?

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.

  reply	other threads:[~2013-05-08  2:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07 22:53 [PATCH] USB: set device dma_mask without reference to global data Stephen Warren
2013-05-08  1:13 ` Peter Chen
2013-05-08  2:26   ` Stephen Warren [this message]
2013-05-08  2:54     ` Peter Chen
     [not found]       ` <CAL411-pY_i19otiE2pLux6eR_OFHhfhK=+6BF=H6wABDsGCP6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-05-08  7:11         ` Matthijs Kooijman
     [not found]           ` <20130508071137.GM25742-tJobPqrNDpleFRaWBN1JIYg6o0x57dKM8/qWW+O4k6E@public.gmane.org>
2013-05-08  7:28             ` Matthijs Kooijman
2013-05-08 13:50             ` Rob Herring
     [not found]               ` <518A582C.8070600-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-05-08 14:07                 ` Arnd Bergmann
2013-05-08  7:24         ` Arnd Bergmann
     [not found]           ` <201305080924.44622.arnd-r2nGTMty4D4@public.gmane.org>
2013-05-09 21:39             ` Russell King - ARM Linux
2013-05-08 22:42         ` Stephen Warren
2013-05-09 21:36         ` Russell King - ARM Linux
     [not found] ` <1367967232-10128-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-07 23:04   ` Greg Kroah-Hartman
     [not found]     ` <20130507230445.GC9105-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2013-05-07 23:42       ` Arnd Bergmann
     [not found]         ` <201305080142.12025.arnd-r2nGTMty4D4@public.gmane.org>
2013-05-08 14:14           ` Alan Stern
     [not found]             ` <Pine.LNX.4.44L0.1305081011480.1450-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2013-05-08 15:10               ` Arnd Bergmann
2013-05-09 21:33           ` Russell King - ARM Linux
2013-05-08  5:11   ` Tony Prisk

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=5189B7BF.8070607@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hzpeterchen@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=swarren@nvidia.com \
    /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;
as well as URLs for NNTP newsgroup(s).