[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1D1v=LXrW=-t-fRJjbo_C6OpSuoqiGuZPOaBzQYCT-kA@mail.gmail.com>
Date: Tue, 14 Feb 2017 12:44:26 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Roger Quadros <rogerq@...com>
Cc: Peter Chen <peter.chen@....com>,
gregkh <gregkh@...uxfoundation.org>, stern@...land.harvard.edu,
Ulf Hansson <ulf.hansson@...aro.org>,
Mark Brown <broonie@...nel.org>, sre@...nel.org,
Rob Herring <robh+dt@...nel.org>,
Shawn Guo <shawnguo@...nel.org>, rjw@...ysocki.net,
dbaryshkov@...il.com, Mark Rutland <mark.rutland@....com>,
Heiko Stuebner <heiko@...ech.de>, stephen.boyd@...aro.org,
frank.li@....com, gary.bisson@...ndarydevices.com,
Vivek Gautam <vivek.gautam@...eaurora.org>,
Sriram Dash <sriram.dash@....com>, festevam@...il.com,
stillcompiling@...il.com, vaibhav.hiremath@...aro.org,
Krzysztof Kozlowski <krzk@...nel.org>, mka@...omium.org,
devicetree@...r.kernel.org, mail@...iej.szmigiero.name,
pawel.moll@....com, linux-pm@...r.kernel.org,
s.hauer@...gutronix.de, troy.kisky@...ndarydevices.com,
Alexander Sverdlin <alexander.sverdlin@...ia.com>,
Mathias Nyman <mathias.nyman@...ux.intel.com>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
hverkuil@...all.nl, oscar@...andei.net,
Baolin Wang <baolin.wang@...aro.org>,
linux-usb@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
p.zabel@...gutronix.de, jun.li@....com
Subject: Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration
On Tue, Feb 14, 2017 at 11:36 AM, Roger Quadros <rogerq@...com> wrote:
> On 11/02/17 03:27, Peter Chen wrote:
>> From: Arnd Bergmann <arnd@...db.de>
>>
>> For xhci-hcd platform device, all the DMA parameters are not
>> configured properly, notably dma ops for dwc3 devices. So, set
>> the dma for xhci from sysdev. sysdev is pointing to device that
>> is known to the system firmware or hardware.
>>
>> Cc: Baolin Wang <baolin.wang@...aro.org>
>> Cc: Vivek Gautam <vivek.gautam@...eaurora.org>
>> Cc: Alexander Sverdlin <alexander.sverdlin@...ia.com>
>> Cc: Mathias Nyman <mathias.nyman@...ux.intel.com>
>>
>> Signed-off-by: Arnd Bergmann <arnd@...db.de>
>> Signed-off-by: Sriram Dash <sriram.dash@....com>
>> ---
>> Hi, Baolin, Vivek and Alexander,
>> I removed your tested-by tag due to add one change that adding sysdev
>> for shared hcd too, if your test shows this change works for you or
>> has no effect for you, please consider adding tested-by tag again,
>> thanks.
>> @@ -222,20 +241,20 @@ static int xhci_plat_probe(struct platform_device *pdev)
>>
>> xhci->clk = clk;
>> xhci->main_hcd = hcd;
>> - xhci->shared_hcd = usb_create_shared_hcd(driver, &pdev->dev,
>> + xhci->shared_hcd = __usb_create_hcd(driver, sysdev, &pdev->dev,
>> dev_name(&pdev->dev), hcd);
>> if (!xhci->shared_hcd) {
>> ret = -ENOMEM;
>> goto disable_clk;
>> }
>>
>> - if (device_property_read_bool(&pdev->dev, "usb3-lpm-capable"))
>> + if (device_property_read_bool(sysdev, "usb3-lpm-capable"))
>
> Why are we using sysdev to read DT property? We should be using the
> XHCI device (&pdev->dev) here, no?
If I remember correctly, this is one of the cases where pdev does not
have a device node attached to it because it was created by the driver
of the parent device on the fly in case of dwc3. When you have a pure xhci
device in DT, the two pointers are the same.
Arnd
Powered by blists - more mailing lists