From: Thierry Reding <thierry.reding@gmail.com>
To: Andrew Bresticker <abrestic@chromium.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Russell King <linux@arm.linux.org.uk>,
Jassi Brar <jassisinghbrar@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mathias Nyman <mathias.nyman@intel.com>,
Grant Likely <grant.likely@linaro.org>,
Alan Stern <stern@rowland.harvard.edu>,
Arnd Bergmann <arnd@arndb.de>,
Kishon Vijay Abraham I <kishon@ti.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
linux-usb@vger.kernel.org
Subject: Re: [PATCH RESEND V4 4/9] pinctrl: tegra-xusb: Add USB PHY support
Date: Fri, 31 Oct 2014 12:22:00 +0100 [thread overview]
Message-ID: <20141031112158.GC10778@ulmo.nvidia.com> (raw)
In-Reply-To: <CAL1qeaEgyROk2dHbAOCUBJwCFegXH3_Yhr3reWdOrUXHvJ2cdg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2240 bytes --]
On Thu, Oct 30, 2014 at 10:10:06AM -0700, Andrew Bresticker wrote:
> On Thu, Oct 30, 2014 at 6:45 AM, Thierry Reding
> <thierry.reding@gmail.com> wrote:
> > On Wed, Oct 29, 2014 at 12:43:36PM -0700, Andrew Bresticker wrote:
> >> >> diff --git a/drivers/pinctrl/pinctrl-tegra-xusb.c b/drivers/pinctrl/pinctrl-tegra-xusb.c
[...]
> >> >> diff --git a/include/soc/tegra/xusb.h b/include/soc/tegra/xusb.h
> >> >> index cfe211d..149434f 100644
> >> >> --- a/include/soc/tegra/xusb.h
> >> >> +++ b/include/soc/tegra/xusb.h
> >> >> @@ -10,6 +10,13 @@
> >> >> #ifndef __SOC_TEGRA_XUSB_H__
> >> >> #define __SOC_TEGRA_XUSB_H__
> >> >>
> >> >> +#define TEGRA_XUSB_USB3_PHYS 2
> >> >> +#define TEGRA_XUSB_UTMI_PHYS 3
> >> >> +#define TEGRA_XUSB_HSIC_PHYS 2
> >> >> +#define TEGRA_XUSB_NUM_USB_PHYS (TEGRA_XUSB_USB3_PHYS + TEGRA_XUSB_UTMI_PHYS + \
> >> >> + TEGRA_XUSB_HSIC_PHYS)
> >> >> +#define TEGRA_XUSB_NUM_PHYS (TEGRA_XUSB_NUM_USB_PHYS + 2) /* + SATA & PCIe */
> >> >
> >> > These are really XUSB pad controller specific defines, why does anyone
> >> > else need to know this?
> >>
> >> They're not pad controller specific. They're also used in the xHCI host driver.
> >
> > I keep thinking that there should be a way around this. Of course if
> > both the XHCI and mailbox drivers were merged, then there'd be no need
> > to expose this publicly at all.
>
> I'm not sure what you mean. They're SoC-specific constants that need
> to be shared amongst multiple drivers. It would make sense to place
> them in a shared header, does it not?
The problem with this is that if those numbers ever change on a future
generation of Tegra then we're going to have to suffix them in some way
to support more than one generation. And the code to handle that is
going to be ugly because we'd need to differentiate on the compatible
string to match which suffixed version to use.
So I'd rather see this parameterized some way. Of course that's a lot
more difficult to do because these things are shared across XHCI and pad
controller drivers.
That said, I think it'd be fine to merge this as-is for now and rewrite
this in a better way if it ever becomes a problem.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-10-31 11:22 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 22:27 [PATCH RESEND V4 0/9] Tegra xHCI support Andrew Bresticker
2014-10-28 22:27 ` [PATCH RESEND V4 2/9] mailbox: Add NVIDIA Tegra XUSB mailbox driver Andrew Bresticker
[not found] ` <1414535277-15645-3-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-10-29 11:34 ` Thierry Reding
[not found] ` <20141029113415.GD28356-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2014-10-29 18:02 ` Andrew Bresticker
2014-10-30 13:22 ` Thierry Reding
2014-10-30 16:57 ` Andrew Bresticker
2014-10-28 22:27 ` [PATCH RESEND V4 5/9] of: Add NVIDIA Tegra xHCI controller binding Andrew Bresticker
[not found] ` <1414535277-15645-6-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-10-29 9:43 ` Thierry Reding
2014-10-29 16:37 ` Andrew Bresticker
2014-10-30 13:55 ` Thierry Reding
[not found] ` <20141030135500.GC19802-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2014-10-30 17:19 ` Andrew Bresticker
[not found] ` <CAL1qeaG701hKtcUL5a67b=X38hbcYunUOUBziZMpxemvhhAayA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-30 17:24 ` Thierry Reding
2014-10-30 17:26 ` Andrew Bresticker
[not found] ` <CAL1qeaEbRkOQApyjkpwxBd3mGkQ3JuXNiar1MbBd844NWe5h9g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-31 11:32 ` Thierry Reding
2014-10-31 16:41 ` Andrew Bresticker
[not found] ` <CAL1qeaFcyoSUbVdgUdWZ6RtRiuj0X1H-ohXCsckwF8=VPw8jRA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-04 20:44 ` Andrew Bresticker
2014-10-29 9:58 ` Thierry Reding
2014-10-28 22:27 ` [PATCH RESEND V4 6/9] usb: xhci: Add NVIDIA Tegra xHCI host-controller driver Andrew Bresticker
[not found] ` <1414535277-15645-7-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-10-29 10:49 ` Thierry Reding
2014-10-28 22:27 ` [PATCH RESEND V4 7/9] ARM: tegra: Add Tegra124 XUSB mailbox and xHCI controller Andrew Bresticker
[not found] ` <1414535277-15645-1-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-10-28 22:27 ` [PATCH RESEND V4 1/9] of: Add NVIDIA Tegra XUSB mailbox binding Andrew Bresticker
2014-10-28 22:27 ` [PATCH RESEND V4 3/9] of: Update Tegra XUSB pad controller binding for USB Andrew Bresticker
2014-10-31 9:44 ` Linus Walleij
2014-10-31 16:42 ` Andrew Bresticker
2014-10-28 22:27 ` [PATCH RESEND V4 4/9] pinctrl: tegra-xusb: Add USB PHY support Andrew Bresticker
[not found] ` <1414535277-15645-5-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-10-29 12:27 ` Thierry Reding
2014-10-29 19:43 ` Andrew Bresticker
2014-10-30 13:45 ` Thierry Reding
[not found] ` <20141030134517.GB19802-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2014-10-30 17:10 ` Andrew Bresticker
2014-10-31 11:22 ` Thierry Reding [this message]
2014-10-28 22:27 ` [PATCH RESEND V4 8/9] ARM: tegra: jetson-tk1: Add xHCI support Andrew Bresticker
2014-10-29 5:52 ` [PATCH RESEND V4 0/9] Tegra " Alexandre Courbot
2014-10-28 22:27 ` [PATCH RESEND V4 9/9] ARM: tegra: venice2: Add " Andrew Bresticker
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=20141031112158.GC10778@ulmo.nvidia.com \
--to=thierry.reding@gmail.com \
--cc=abrestic@chromium.org \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jassisinghbrar@gmail.com \
--cc=kishon@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mathias.nyman@intel.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=swarren@wwwdotorg.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;
as well as URLs for NNTP newsgroup(s).