From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>,
Jules Maselbas <jmaselbas@kalray.eu>,
Markus Reichl <m.reichl@fivetechno.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH v2] usb: dwc2: Use generic PHY width in params setup
Date: Thu, 6 Jun 2019 12:13:49 +0200 [thread overview]
Message-ID: <0c370ba7-bb45-7580-1a60-021f15c1c37d@samsung.com> (raw)
In-Reply-To: <1d774b88-b176-448d-3e8b-8c1f04cb1406@synopsys.com>
Hi All,
On 2019-05-31 14:44, Minas Harutyunyan wrote:
> On 5/9/2019 1:16 PM, Jules Maselbas wrote:
>> Setting params.phy_utmi_width in dwc2_lowlevel_hw_init() is pointless
>> since
>> it's value will be overwritten by dwc2_init_params().
>>
>> This change make sure to take in account the generic PHY width
>> information
>> during paraminitialisation, done in dwc2_set_param_phy_utmi_width().
>>
>> By doing so, the phy_utmi_width params can still be overrided by
>> devicetree specific params and will also be checked against hardware
>> capabilities.
>>
>> Fixes: 707d80f0a3c5 ("usb: dwc2: gadget: Replace phyif with
>> phy_utmi_width")
>> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
>
> Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Gentle reminder, Felipe, could you take this to the fixes for v5.2?
>> ---
>> v2: Fix typo in commit message. Add Fixes and Tested-by tags.
>> ---
>> drivers/usb/dwc2/params.c | 9 +++++++++
>> drivers/usb/dwc2/platform.c | 9 ---------
>> 2 files changed, 9 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
>> index 6900eea57526..5949262ff669 100644
>> --- a/drivers/usb/dwc2/params.c
>> +++ b/drivers/usb/dwc2/params.c
>> @@ -253,6 +253,15 @@ static void dwc2_set_param_phy_utmi_width(struct
>> dwc2_hsotg *hsotg)
>> val = (hsotg->hw_params.utmi_phy_data_width ==
>> GHWCFG4_UTMI_PHY_DATA_WIDTH_8) ? 8 : 16;
>> + if (hsotg->phy) {
>> + /*
>> + * If using the generic PHY framework, check if the PHY bus
>> + * width is 8-bit and set the phyif appropriately.
>> + */
>> + if (phy_get_bus_width(hsotg->phy) == 8)
>> + val = 8;
>> + }
>> +
>> hsotg->params.phy_utmi_width = val;
>> }
>> diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
>> index d10a7f8daec3..e98d7812da2d 100644
>> --- a/drivers/usb/dwc2/platform.c
>> +++ b/drivers/usb/dwc2/platform.c
>> @@ -271,15 +271,6 @@ static int dwc2_lowlevel_hw_init(struct
>> dwc2_hsotg *hsotg)
>> hsotg->plat = dev_get_platdata(hsotg->dev);
>> - if (hsotg->phy) {
>> - /*
>> - * If using the generic PHY framework, check if the PHY bus
>> - * width is 8-bit and set the phyif appropriately.
>> - */
>> - if (phy_get_bus_width(hsotg->phy) == 8)
>> - hsotg->params.phy_utmi_width = 8;
>> - }
>> -
>> /* Clock */
>> hsotg->clk = devm_clk_get_optional(hsotg->dev, "otg");
>> if (IS_ERR(hsotg->clk)) {
>>
>
>
>
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
next prev parent reply other threads:[~2019-06-06 10:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-03 20:49 [BUG BISECT] USB on Exynos4412 fails after usb: dwc2: gadget: Replace phyif with phy_utmi_width Krzysztof Kozlowski
[not found] ` <CGME20190506130052eucas1p25afd4e15648e9efc6fd011e46081fbea@eucas1p2.samsung.com>
2019-05-06 13:00 ` [PATCH] usb: dwc2: Force 8bit UTMI width for Samsung Exynos SoCs Marek Szyprowski
2019-05-06 13:40 ` Jules Maselbas
2019-05-07 6:22 ` Minas Harutyunyan
2019-05-07 8:12 ` Markus Reichl
2019-05-07 9:17 ` Marek Szyprowski
2019-05-07 12:03 ` Marek Szyprowski
2019-05-07 12:38 ` Markus Reichl
2019-06-05 8:57 ` Krzysztof Kozlowski
2019-05-07 6:21 ` [BUG BISECT] USB on Exynos4412 fails after usb: dwc2: gadget: Replace phyif with phy_utmi_width Minas Harutyunyan
2019-05-07 6:43 ` Marek Szyprowski
2019-05-07 10:08 ` [PATCH] usb: dwc2: Use generic PHY width in params setup Jules Maselbas
2019-05-07 10:08 ` Jules Maselbas
2019-05-07 10:54 ` Marek Szyprowski
2019-05-09 9:15 ` [PATCH v2] " Jules Maselbas
2019-05-31 12:22 ` Jules Maselbas
2019-05-31 12:44 ` Minas Harutyunyan
2019-06-06 10:13 ` Marek Szyprowski [this message]
2019-06-18 7:26 ` Felipe Balbi
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=0c370ba7-bb45-7580-1a60-021f15c1c37d@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=Minas.Harutyunyan@synopsys.com \
--cc=felipe.balbi@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jmaselbas@kalray.eu \
--cc=linux-usb@vger.kernel.org \
--cc=m.reichl@fivetechno.de \
/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).