From: Stephen Warren <swarren@wwwdotorg.org>
To: "ABRAHAM, KISHON VIJAY" <kishon@ti.com>
Cc: Venu Byravarasu <vbyravarasu@nvidia.com>,
balbi@ti.com, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH v3] USB: PHY: Re-organize Tegra USB PHY driver
Date: Fri, 21 Sep 2012 10:14:58 -0600 [thread overview]
Message-ID: <505C9282.3050001@wwwdotorg.org> (raw)
In-Reply-To: <CAAe_U6K2hANpRqzyoiiP2mR97=M2Mb35+FVor11DaaZi7W9Pnw@mail.gmail.com>
On 09/21/2012 07:09 AM, ABRAHAM, KISHON VIJAY wrote:
> Hi,
>
> On Fri, Sep 21, 2012 at 5:50 PM, Venu Byravarasu <vbyravarasu@nvidia.com> wrote:
>> NVIDIA produces several Tegra SoCs viz Tegra20, Tegra30 etc.
>> In order to support USB PHY drivers on these SoCs, existing
>> PHY driver is split into SoC agnostic common USB PHY driver
>> and Tegra20-specific USB phy driver. This will facilitate
>> easy addition and deletion of phy drivers for Tegra SoCs.
>> @@ -618,6 +618,9 @@ static int tegra_ehci_probe(struct platform_device *pdev)
...
>> pdata = pdev->dev.platform_data;
>> if (!pdata) {
Some missing lines of context are:
dev_err(&pdev->dev, "Platform data missing\n");
return -EINVAL;
}
...
>> + params.mode = TEGRA_USB_PHY_MODE_HOST;
>> + params.config = pdata->phy_config;
>
> I fail to understand how pdata is not NULL in dt boot. I know i've
> already given this comment and you replied that you dint see any
> crash. But I'd like to know where and how pdata gets populated.
In practice, the platform uses AUXDATA to provide platform data to the
driver even when it's instantiated using device tree; see
arch/arm/mach-tegra/board-dt-tegra20.c variables tegra_ehci*_pdata and
tegra20_auxdata_lookup[].
In the slightly (very very slightly, hopefully) longer term, I would
like to completely remove the AUXDATA setup from board-dt-tegra20.c;
tegra_ehci_probe() should do something like:
pdata = pdev->dev.platform_data
if (!pdata)
pdata = parse_pdata_from_dt();
/* user didn't specify any in DT either */
if (!pdata)
pdata = default_pdata_for_port();
... where perhaps the use of defaults could be folded into
parse_pdata_from_dt().
next prev parent reply other threads:[~2012-09-21 16:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-21 12:20 [PATCH v3] USB: PHY: Re-organize Tegra USB PHY driver Venu Byravarasu
2012-09-21 13:09 ` ABRAHAM, KISHON VIJAY
2012-09-21 16:14 ` Stephen Warren [this message]
2012-09-22 8:38 ` Venu Byravarasu
2012-09-24 6:18 ` ABRAHAM, KISHON VIJAY
2012-09-24 6:20 ` Venu Byravarasu
2012-09-25 11:14 ` Venu Byravarasu
2012-09-21 17:46 ` Stephen Warren
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=505C9282.3050001@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=vbyravarasu@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