* [PATCH 0/2] phy: ti: gmii-sel: two fixes @ 2020-02-14 19:07 Grygorii Strashko 2020-02-14 19:08 ` [PATCH 1/2] phy: ti: gmii-sel: fix set of copy-paste errors Grygorii Strashko ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: Grygorii Strashko @ 2020-02-14 19:07 UTC (permalink / raw) To: Kishon Vijay Abraham I, linux-kernel; +Cc: Sekhar Nori, Grygorii Strashko Hi Kishon, Here the two minor fixes for TI phy-gmii-sel PHY. - Patch 1: few minor copy-paste errors. - Patch 2: enables back gmii mode (not used now, so no issues reported til now) Grygorii Strashko (2): phy: ti: gmii-sel: fix set of copy-paste errors phy: ti: gmii-sel: do not fail in case of gmii drivers/phy/ti/phy-gmii-sel.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.17.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] phy: ti: gmii-sel: fix set of copy-paste errors 2020-02-14 19:07 [PATCH 0/2] phy: ti: gmii-sel: two fixes Grygorii Strashko @ 2020-02-14 19:08 ` Grygorii Strashko 2020-02-14 19:08 ` [PATCH 2/2] phy: ti: gmii-sel: do not fail in case of gmii Grygorii Strashko 2020-02-20 12:36 ` [PATCH 0/2] phy: ti: gmii-sel: two fixes Kishon Vijay Abraham I 2 siblings, 0 replies; 4+ messages in thread From: Grygorii Strashko @ 2020-02-14 19:08 UTC (permalink / raw) To: Kishon Vijay Abraham I, linux-kernel; +Cc: Sekhar Nori, Grygorii Strashko - under PHY_INTERFACE_MODE_MII the 'mode' func parameter is assigned instead of 'gmii_sel_mode' and it's working only because the default value 'gmii_sel_mode' is set to 0. - console outputs use 'rgmii_id' and 'mode' values to print PHY mode instead of using 'submode' value which is representing PHY interface mode now. This patch fixes above two cases. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> --- drivers/phy/ti/phy-gmii-sel.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/phy/ti/phy-gmii-sel.c b/drivers/phy/ti/phy-gmii-sel.c index a28bd15297f5..e998e9cd8d1f 100644 --- a/drivers/phy/ti/phy-gmii-sel.c +++ b/drivers/phy/ti/phy-gmii-sel.c @@ -80,20 +80,19 @@ static int phy_gmii_sel_mode(struct phy *phy, enum phy_mode mode, int submode) break; case PHY_INTERFACE_MODE_MII: - mode = AM33XX_GMII_SEL_MODE_MII; + gmii_sel_mode = AM33XX_GMII_SEL_MODE_MII; break; default: - dev_warn(dev, - "port%u: unsupported mode: \"%s\". Defaulting to MII.\n", - if_phy->id, phy_modes(rgmii_id)); + dev_warn(dev, "port%u: unsupported mode: \"%s\"\n", + if_phy->id, phy_modes(submode)); return -EINVAL; } if_phy->phy_if_mode = submode; dev_dbg(dev, "%s id:%u mode:%u rgmii_id:%d rmii_clk_ext:%d\n", - __func__, if_phy->id, mode, rgmii_id, + __func__, if_phy->id, submode, rgmii_id, if_phy->rmii_clock_external); regfield = if_phy->fields[PHY_GMII_SEL_PORT_MODE]; -- 2.17.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] phy: ti: gmii-sel: do not fail in case of gmii 2020-02-14 19:07 [PATCH 0/2] phy: ti: gmii-sel: two fixes Grygorii Strashko 2020-02-14 19:08 ` [PATCH 1/2] phy: ti: gmii-sel: fix set of copy-paste errors Grygorii Strashko @ 2020-02-14 19:08 ` Grygorii Strashko 2020-02-20 12:36 ` [PATCH 0/2] phy: ti: gmii-sel: two fixes Kishon Vijay Abraham I 2 siblings, 0 replies; 4+ messages in thread From: Grygorii Strashko @ 2020-02-14 19:08 UTC (permalink / raw) To: Kishon Vijay Abraham I, linux-kernel; +Cc: Sekhar Nori, Grygorii Strashko The "gmii" PHY interface mode is supported on TI AM335x/437x/5xx SoCs, so don't fail if it's selected. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> --- drivers/phy/ti/phy-gmii-sel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/phy/ti/phy-gmii-sel.c b/drivers/phy/ti/phy-gmii-sel.c index e998e9cd8d1f..1c536fc03c83 100644 --- a/drivers/phy/ti/phy-gmii-sel.c +++ b/drivers/phy/ti/phy-gmii-sel.c @@ -80,6 +80,7 @@ static int phy_gmii_sel_mode(struct phy *phy, enum phy_mode mode, int submode) break; case PHY_INTERFACE_MODE_MII: + case PHY_INTERFACE_MODE_GMII: gmii_sel_mode = AM33XX_GMII_SEL_MODE_MII; break; -- 2.17.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] phy: ti: gmii-sel: two fixes 2020-02-14 19:07 [PATCH 0/2] phy: ti: gmii-sel: two fixes Grygorii Strashko 2020-02-14 19:08 ` [PATCH 1/2] phy: ti: gmii-sel: fix set of copy-paste errors Grygorii Strashko 2020-02-14 19:08 ` [PATCH 2/2] phy: ti: gmii-sel: do not fail in case of gmii Grygorii Strashko @ 2020-02-20 12:36 ` Kishon Vijay Abraham I 2 siblings, 0 replies; 4+ messages in thread From: Kishon Vijay Abraham I @ 2020-02-20 12:36 UTC (permalink / raw) To: Grygorii Strashko, linux-kernel; +Cc: Sekhar Nori On 15/02/20 12:37 am, Grygorii Strashko wrote: > Hi Kishon, > > Here the two minor fixes for TI phy-gmii-sel PHY. > - Patch 1: few minor copy-paste errors. > - Patch 2: enables back gmii mode (not used now, so no issues reported til now) > > Grygorii Strashko (2): > phy: ti: gmii-sel: fix set of copy-paste errors > phy: ti: gmii-sel: do not fail in case of gmii merged, thanks! -Kishon > > drivers/phy/ti/phy-gmii-sel.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-02-20 12:33 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-02-14 19:07 [PATCH 0/2] phy: ti: gmii-sel: two fixes Grygorii Strashko 2020-02-14 19:08 ` [PATCH 1/2] phy: ti: gmii-sel: fix set of copy-paste errors Grygorii Strashko 2020-02-14 19:08 ` [PATCH 2/2] phy: ti: gmii-sel: do not fail in case of gmii Grygorii Strashko 2020-02-20 12:36 ` [PATCH 0/2] phy: ti: gmii-sel: two fixes Kishon Vijay Abraham I
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).