Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1661641 > unrolled thread
| Started by | Rafał Miłecki <zajec5@gmail.com> |
|---|---|
| First post | 2017-06-08 22:10 +0200 |
| Last post | 2017-06-16 10:00 +0200 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH V2 0/5] phy: bcm-ns-usb3: add MDIO driver Rafał Miłecki <zajec5@gmail.com> - 2017-06-08 22:10 +0200
[PATCH V2 3/5] phy: bcm-ns-usb3: enable MDIO in the platform specific code Rafał Miłecki <zajec5@gmail.com> - 2017-06-08 22:10 +0200
Re: [PATCH V2 0/5] phy: bcm-ns-usb3: add MDIO driver Kishon Vijay Abraham I <kishon@ti.com> - 2017-06-16 08:40 +0200
Re: [PATCH V2 0/5] phy: bcm-ns-usb3: add MDIO driver Rafał Miłecki <rafal@milecki.pl> - 2017-06-16 09:30 +0200
Re: [PATCH V2 0/5] phy: bcm-ns-usb3: add MDIO driver Kishon Vijay Abraham I <kishon@ti.com> - 2017-06-16 10:00 +0200
Re: [PATCH V2 0/5] phy: bcm-ns-usb3: add MDIO driver Kishon Vijay Abraham I <kishon@ti.com> - 2017-06-16 10:00 +0200
| From | Rafał Miłecki <zajec5@gmail.com> |
|---|---|
| Date | 2017-06-08 22:10 +0200 |
| Subject | [PATCH V2 0/5] phy: bcm-ns-usb3: add MDIO driver |
| Message-ID | <tQbUK-nj-11@gated-at.bofh.it> |
From: Rafał Miłecki <rafal@milecki.pl>
As explained in the commit 9200c6f177638 ("Revert "phy: Add USB3 PHY support
for Broadcom NSP SoC"") this module should be modified to use MDIO bus as
this is how PHY is really attached.
This should allow reusing this driver on NSP and any other platform with
MDIO bus and this particular PHY.
V2: Rebase and update 4/5 and 5/5.
Rafał Miłecki (5):
phy: bcm-ns-usb3: always wait for idle after writing to the PHY reg
phy: bcm-ns-usb3: use pointer for PHY writing function
phy: bcm-ns-usb3: enable MDIO in the platform specific code
dt-bindings: phy: Modify Broadcom NS USB 3.0 PHY binding to use MDIO
phy: bcm-ns-usb3: add MDIO driver using proper bus layer
.../devicetree/bindings/phy/bcm-ns-usb3-phy.txt | 27 ++-
drivers/phy/broadcom/Kconfig | 1 +
drivers/phy/broadcom/phy-bcm-ns-usb3.c | 230 +++++++++++++++------
3 files changed, 186 insertions(+), 72 deletions(-)
--
2.11.0
[toc] | [next] | [standalone]
| From | Rafał Miłecki <zajec5@gmail.com> |
|---|---|
| Date | 2017-06-08 22:10 +0200 |
| Subject | [PATCH V2 3/5] phy: bcm-ns-usb3: enable MDIO in the platform specific code |
| Message-ID | <tQbUK-nj-25@gated-at.bofh.it> |
| In reply to | #1661641 |
From: Rafał Miłecki <rafal@milecki.pl>
When we finally start using MDIO layer then bus initialization will be
handled in a separated driver. It means our code handling this has to be
used for the platform driver only.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
drivers/phy/broadcom/phy-bcm-ns-usb3.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/phy/broadcom/phy-bcm-ns-usb3.c b/drivers/phy/broadcom/phy-bcm-ns-usb3.c
index 3d0fe5728029..2c9a0d5f43d8 100644
--- a/drivers/phy/broadcom/phy-bcm-ns-usb3.c
+++ b/drivers/phy/broadcom/phy-bcm-ns-usb3.c
@@ -80,12 +80,6 @@ static int bcm_ns_usb3_phy_init_ns_bx(struct bcm_ns_usb3 *usb3)
{
int err;
- /* Enable MDIO. Setting MDCDIV as 26 */
- writel(0x0000009a, usb3->ccb_mii + BCMA_CCB_MII_MNG_CTL);
-
- /* Wait for MDIO? */
- udelay(2);
-
/* USB3 PLL Block */
err = bcm_ns_usb3_mdio_phy_write(usb3, BCM_NS_USB3_PHY_BASE_ADDR_REG,
BCM_NS_USB3_PHY_PLL30_BLOCK);
@@ -134,12 +128,6 @@ static int bcm_ns_usb3_phy_init_ns_ax(struct bcm_ns_usb3 *usb3)
{
int err;
- /* Enable MDIO. Setting MDCDIV as 26 */
- writel(0x0000009a, usb3->ccb_mii + BCMA_CCB_MII_MNG_CTL);
-
- /* Wait for MDIO? */
- udelay(2);
-
/* PLL30 block */
err = bcm_ns_usb3_mdio_phy_write(usb3, BCM_NS_USB3_PHY_BASE_ADDR_REG,
BCM_NS_USB3_PHY_PLL30_BLOCK);
@@ -278,6 +266,12 @@ static int bcm_ns_usb3_probe(struct platform_device *pdev)
return PTR_ERR(usb3->ccb_mii);
}
+ /* Enable MDIO. Setting MDCDIV as 26 */
+ writel(0x0000009a, usb3->ccb_mii + BCMA_CCB_MII_MNG_CTL);
+
+ /* Wait for MDIO? */
+ udelay(2);
+
usb3->phy_write = bcm_ns_usb3_platform_phy_write;
usb3->phy = devm_phy_create(dev, NULL, &ops);
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Kishon Vijay Abraham I <kishon@ti.com> |
|---|---|
| Date | 2017-06-16 08:40 +0200 |
| Message-ID | <tST5f-4Rd-7@gated-at.bofh.it> |
| In reply to | #1661641 |
On Friday 09 June 2017 01:34 AM, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> As explained in the commit 9200c6f177638 ("Revert "phy: Add USB3 PHY support
> for Broadcom NSP SoC"") this module should be modified to use MDIO bus as
> this is how PHY is really attached.
>
> This should allow reusing this driver on NSP and any other platform with
> MDIO bus and this particular PHY.
can you run checkpatch and fix all warnings in this series?
Thanks
Kishon
>
> V2: Rebase and update 4/5 and 5/5.
>
> Rafał Miłecki (5):
> phy: bcm-ns-usb3: always wait for idle after writing to the PHY reg
> phy: bcm-ns-usb3: use pointer for PHY writing function
> phy: bcm-ns-usb3: enable MDIO in the platform specific code
> dt-bindings: phy: Modify Broadcom NS USB 3.0 PHY binding to use MDIO
> phy: bcm-ns-usb3: add MDIO driver using proper bus layer
>
> .../devicetree/bindings/phy/bcm-ns-usb3-phy.txt | 27 ++-
> drivers/phy/broadcom/Kconfig | 1 +
> drivers/phy/broadcom/phy-bcm-ns-usb3.c | 230 +++++++++++++++------
> 3 files changed, 186 insertions(+), 72 deletions(-)
>
[toc] | [prev] | [next] | [standalone]
| From | Rafał Miłecki <rafal@milecki.pl> |
|---|---|
| Date | 2017-06-16 09:30 +0200 |
| Message-ID | <tSTRE-5pn-5@gated-at.bofh.it> |
| In reply to | #1667447 |
On 06/16/2017 08:36 AM, Kishon Vijay Abraham I wrote:
> On Friday 09 June 2017 01:34 AM, Rafał Miłecki wrote:
>> From: Rafał Miłecki <rafal@milecki.pl>
>>
>> As explained in the commit 9200c6f177638 ("Revert "phy: Add USB3 PHY support
>> for Broadcom NSP SoC"") this module should be modified to use MDIO bus as
>> this is how PHY is really attached.
>>
>> This should allow reusing this driver on NSP and any other platform with
>> MDIO bus and this particular PHY.
>
> can you run checkpatch and fix all warnings in this series?
I always check my patches before sending. For this set the only warning I
get is:
WARNING: line over 80 characters
#117: FILE: drivers/phy/broadcom/phy-bcm-ns-usb3.c:224:
+ usecs_to_jiffies(BCM_NS_USB3_MII_MNG_TIMEOUT_US));
I've problem finding a nice way of fixing this.
1) I can't break the line between arguments as there is only 1 argument
2) I shouldn't use small indention as it would misalign this line
3) Using tmp var for BCM_NS_USB3_MII_MNG_TIMEOUT_US sounds a bit pointless
According to the coding-style.rst having 80+ chars lines is acceptable if it
"significantly increases readability and does not hide information". Maybe
we can just live with this single line like that? Isn't this a bit bike
shedding in this case?
[toc] | [prev] | [next] | [standalone]
| From | Kishon Vijay Abraham I <kishon@ti.com> |
|---|---|
| Date | 2017-06-16 10:00 +0200 |
| Message-ID | <tSUkG-5AJ-19@gated-at.bofh.it> |
| In reply to | #1667486 |
Hi,
On Friday 16 June 2017 12:44 PM, Rafał Miłecki wrote:
> On 06/16/2017 08:36 AM, Kishon Vijay Abraham I wrote:
>> On Friday 09 June 2017 01:34 AM, Rafał Miłecki wrote:
>>> From: Rafał Miłecki <rafal@milecki.pl>
>>>
>>> As explained in the commit 9200c6f177638 ("Revert "phy: Add USB3 PHY support
>>> for Broadcom NSP SoC"") this module should be modified to use MDIO bus as
>>> this is how PHY is really attached.
>>>
>>> This should allow reusing this driver on NSP and any other platform with
>>> MDIO bus and this particular PHY.
>>
>> can you run checkpatch and fix all warnings in this series?
>
> I always check my patches before sending. For this set the only warning I
> get is:
>
> WARNING: line over 80 characters
> #117: FILE: drivers/phy/broadcom/phy-bcm-ns-usb3.c:224:
> +
> usecs_to_jiffies(BCM_NS_USB3_MII_MNG_TIMEOUT_US));
>
> I've problem finding a nice way of fixing this.
> 1) I can't break the line between arguments as there is only 1 argument
> 2) I shouldn't use small indention as it would misalign this line
> 3) Using tmp var for BCM_NS_USB3_MII_MNG_TIMEOUT_US sounds a bit pointless
>
> According to the coding-style.rst having 80+ chars lines is acceptable if it
> "significantly increases readability and does not hide information". Maybe
> we can just live with this single line like that? Isn't this a bit bike
> shedding in this case?
Sure, just wanted to make sure we didn't overlook checkpatch warnings.
Thanks
Kishon
[toc] | [prev] | [next] | [standalone]
| From | Kishon Vijay Abraham I <kishon@ti.com> |
|---|---|
| Date | 2017-06-16 10:00 +0200 |
| Message-ID | <tSUkG-5AJ-23@gated-at.bofh.it> |
| In reply to | #1661641 |
On Friday 09 June 2017 01:34 AM, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> As explained in the commit 9200c6f177638 ("Revert "phy: Add USB3 PHY support
> for Broadcom NSP SoC"") this module should be modified to use MDIO bus as
> this is how PHY is really attached.
>
> This should allow reusing this driver on NSP and any other platform with
> MDIO bus and this particular PHY.
>
> V2: Rebase and update 4/5 and 5/5.
merged, thanks!
-Kishon
>
> Rafał Miłecki (5):
> phy: bcm-ns-usb3: always wait for idle after writing to the PHY reg
> phy: bcm-ns-usb3: use pointer for PHY writing function
> phy: bcm-ns-usb3: enable MDIO in the platform specific code
> dt-bindings: phy: Modify Broadcom NS USB 3.0 PHY binding to use MDIO
> phy: bcm-ns-usb3: add MDIO driver using proper bus layer
>
> .../devicetree/bindings/phy/bcm-ns-usb3-phy.txt | 27 ++-
> drivers/phy/broadcom/Kconfig | 1 +
> drivers/phy/broadcom/phy-bcm-ns-usb3.c | 230 +++++++++++++++------
> 3 files changed, 186 insertions(+), 72 deletions(-)
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web