Skip to contentSkip to conversation

phy: fixes for v4.1-rc

GIT PULL New Kishon Vijay Abraham I 2 participants 9 messages May 12, 2015 – May 27, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Greg,

Please find the pull request for 4.1 -rc cycle.

This includes a couple of fixes in Kconfig, one to fix randconfig error and the other to fix dependency in QCOM PHY. A fix in rcan gen2 PHY to fix the bit location.

Let me know if I have to change something.

Cheers
Kishon

The following changes since commit 2decb2682f80759f631c8332f9a2a34a02150a03:

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2015-04-27 14:05:19 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/for-4.1-rc

for you to fetch changes up to a3ac3d4a296ac88578c3a982d044e53284d85344:

phy: phy-rcar-gen2: Fix USBHS_UGSTS_LOCK value (2015-05-12 20:57:19 +0530)

----------------------------------------------------------------
phy: fixes for v4.1-rc

includes a fix in phy core w.r.t error checking, couple of fixes in kconfig one which fixes randconfig error and the other to fix dependency in QCOM PHY, driver fix in omap-usb2 in the error path and a driver fix in rcar-gen2 to fix bit location.

----------------------------------------------------------------
Axel Lin (1):
phy: core: Fix error checking in (devm_)phy_optional_get

Felipe Balbi (1):
phy: fix Kconfig dependencies

Kishon Vijay Abraham I (1):
phy: omap-usb2: invoke pm_runtime_disable on error path
Stephen Boyd (1):
phy: qcom-ufs: Switch dependency to ARCH_QCOM

Yoshihiro Shimoda (1):
phy: phy-rcar-gen2: Fix USBHS_UGSTS_LOCK value

 drivers/phy/Kconfig         |   10 +++++++---
 drivers/phy/phy-core.c      |    4 ++--
 drivers/phy/phy-omap-usb2.c |    1 +
 drivers/phy/phy-rcar-gen2.c |    4 ++--
 4 files changed, 12 insertions(+), 7 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/5 phy: core: Fix error checking in (devm_)phy_optional_get

From: Axel Lin <[email protected]>

Don't pass valid pointer to PTR_ERR, use PTR_ERR(phy) only when IS_ERR(phy) is true.

---
 drivers/phy/phy-core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/phy-core.c +2 -2
index 3791838..63bc12d 100644
@@ -530,7 +530,7 @@ struct phy *phy_optional_get(struct device *dev, const char *string)
 {
 	struct phy *phy = phy_get(dev, string);
 
-	if (PTR_ERR(phy) == -ENODEV)
+	if (IS_ERR(phy) && (PTR_ERR(phy) == -ENODEV))
 		phy = NULL;
 
 	return phy;
@@ -584,7 +584,7 @@ struct phy *devm_phy_optional_get(struct device *dev, const char *string)
 {
 	struct phy *phy = devm_phy_get(dev, string);
 
-	if (PTR_ERR(phy) == -ENODEV)
+	if (IS_ERR(phy) && (PTR_ERR(phy) == -ENODEV))
 		phy = NULL;
 
 	return phy;
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/5 phy: qcom-ufs: Switch dependency to ARCH_QCOM

In reply to Kishon Vijay Abraham I

From: Stephen Boyd <[email protected]>

This phy only exists on platforms under ARCH_QCOM, not ARCH_MSM.

Cc Yaniv Gardi <[email protected]>
Cc Dov Levenglick <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc David Brown <[email protected]>
Cc Bryan Huntsman <[email protected]>
Cc Daniel Walker <[email protected]>
---
 drivers/phy/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/Kconfig +1 -1
index a53bd5b..33e703e 100644
@@ -304,7 +304,7 @@ config PHY_STIH41X_USB
 
 config PHY_QCOM_UFS
 	tristate "Qualcomm UFS PHY driver"
-	depends on OF && ARCH_MSM
+	depends on OF && ARCH_QCOM
 	select GENERIC_PHY
 	help
 	  Support for UFS PHY on QCOM chipsets.
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 3/5 phy: fix Kconfig dependencies

In reply to Kishon Vijay Abraham I

From: Felipe Balbi <[email protected]>

DM816x PHY uses usb_phy_* methods and because of that, it must select USB_PHY, however, because the drivers in question (DM816x, TWL4030 and OMAP_USB2) sit outside of drivers/usb/ directory, meaning they can be built even if USB_SUPPORT=n.

This patches fixes the dependencies by adding USB_SUPPORT as a dependency and making all drivers select USB_PHY (which cannot be selected through menuconfig).

Note that this fixes some linking breakages when building with randconfig.

---
 drivers/phy/Kconfig |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/phy/Kconfig +6 -2
index 33e703e..fc9b9f0 100644
@@ -38,7 +38,9 @@ config ARMADA375_USBCLUSTER_PHY
 config PHY_DM816X_USB
 	tristate "TI dm816x USB PHY driver"
 	depends on ARCH_OMAP2PLUS
+	depends on USB_SUPPORT
 	select GENERIC_PHY
+	select USB_PHY
 	help
 	  Enable this for dm816x USB to work.
 
@@ -97,8 +99,9 @@ config OMAP_CONTROL_PHY
 config OMAP_USB2
 	tristate "OMAP USB2 PHY Driver"
 	depends on ARCH_OMAP2PLUS
-	depends on USB_PHY
+	depends on USB_SUPPORT
 	select GENERIC_PHY
+	select USB_PHY
 	select OMAP_CONTROL_PHY
 	depends on OMAP_OCP2SCP
 	help
@@ -122,8 +125,9 @@ config TI_PIPE3
 config TWL4030_USB
 	tristate "TWL4030 USB Transceiver Driver"
 	depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS
-	depends on USB_PHY
+	depends on USB_SUPPORT
 	select GENERIC_PHY
+	select USB_PHY
 	help
 	  Enable this to support the USB OTG transceiver on TWL4030
 	  family chips (including the TWL5030 and TPS659x0 devices).
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH 4/5 phy: omap-usb2: invoke pm_runtime_disable on error path

In reply to Kishon Vijay Abraham I

if devm_clk_get for wkupclk fails, there will be an unbalanced pm_runtime_enable. Fix it here.

---
 drivers/phy/phy-omap-usb2.c |    1 +
 1 file changed, 1 insertion(+)
drivers/phy/phy-omap-usb2.c +1 -0
index 183ef43..c1a4686 100644
@@ -275,6 +275,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
 		phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
 		if (IS_ERR(phy->wkupclk)) {
 			dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n");
+			pm_runtime_disable(phy->dev);
 			return PTR_ERR(phy->wkupclk);
 		} else {
 			dev_warn(&pdev->dev,
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH 5/5 phy: phy-rcar-gen2: Fix USBHS_UGSTS_LOCK value

In reply to Kishon Vijay Abraham I

From: Yoshihiro Shimoda <[email protected]>

According to the technical update (No. TN-RCS-B011A/E), the UGSTS LOCK bit location is bit 8, not bits 1 and 0. It also says that the register address offset of UGSTS is 0x88, not 0x90.
So, this patch fixes the USBHS_UGSTS_LOCK value and some comments.

---
 drivers/phy/phy-rcar-gen2.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/phy-rcar-gen2.c +2 -2
index 778276a..97d45f4 100644
@@ -23,7 +23,7 @@
 #define USBHS_LPSTS			0x02
 #define USBHS_UGCTRL			0x80
 #define USBHS_UGCTRL2			0x84
-#define USBHS_UGSTS			0x88	/* The manuals have 0x90 */
+#define USBHS_UGSTS			0x88	/* From technical update */
 
 /* Low Power Status register (LPSTS) */
 #define USBHS_LPSTS_SUSPM		0x4000
@@ -41,7 +41,7 @@
 #define USBHS_UGCTRL2_USB0SEL_HS_USB	0x00000030
 
 /* USB General status register (UGSTS) */
-#define USBHS_UGSTS_LOCK		0x00000300 /* The manuals have 0x3 */
+#define USBHS_UGSTS_LOCK		0x00000100 /* From technical update */
 
 #define PHYS_PER_CHANNEL	2
 
Signature · 1 line
1.7.9.5
#6 lore raw
In reply to Kishon Vijay Abraham I

Hi Greg,

Quoted 13 lines · Kishon Vijay Abraham I

Hi Greg,

Please find the pull request for 4.1 -rc cycle.

This includes a couple of fixes in Kconfig, one to fix randconfig error and the other to fix dependency in QCOM PHY. A fix in rcan gen2 PHY to fix the bit location.

Let me know if I have to change something.

Cheers
Kishon

Quoted 8 lines

The following changes since commit 2decb2682f80759f631c8332f9a2a34a02150a03:

   Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2015-04-27 14:05:19 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/for-4.1-rc

can you pick this one?

Thanks
Kishon

Quoted 34 lines

for you to fetch changes up to a3ac3d4a296ac88578c3a982d044e53284d85344:

   phy: phy-rcar-gen2: Fix USBHS_UGSTS_LOCK value (2015-05-12 20:57:19 +0530)

----------------------------------------------------------------
phy: fixes for v4.1-rc

includes a fix in phy core w.r.t error checking, couple of fixes in kconfig one which fixes randconfig error and the other to fix dependency in QCOM PHY, driver fix in omap-usb2 in the error path and a driver fix in rcar-gen2 to fix bit location.

----------------------------------------------------------------
Axel Lin (1):
phy: core: Fix error checking in (devm_)phy_optional_get

Felipe Balbi (1):
phy: fix Kconfig dependencies

Kishon Vijay Abraham I (1):
phy: omap-usb2: invoke pm_runtime_disable on error path
Stephen Boyd (1):
phy: qcom-ufs: Switch dependency to ARCH_QCOM

Yoshihiro Shimoda (1):
phy: phy-rcar-gen2: Fix USBHS_UGSTS_LOCK value

  drivers/phy/Kconfig         |   10 +++++++---
  drivers/phy/phy-core.c      |    4 ++--
  drivers/phy/phy-omap-usb2.c |    1 +
  drivers/phy/phy-rcar-gen2.c |    4 ++--
  4 files changed, 12 insertions(+), 7 deletions(-)
#7 lore raw
Quoted 18 lines · Kishon Vijay Abraham I

Hi Greg,

Quoted 15 lines · Kishon Vijay Abraham I

Hi Greg,

Please find the pull request for 4.1 -rc cycle.

This includes a couple of fixes in Kconfig, one to fix randconfig error and the other to fix dependency in QCOM PHY. A fix in rcan gen2 PHY to fix the bit location.

Let me know if I have to change something.

Cheers
Kishon

The following changes since commit 2decb2682f80759f631c8332f9a2a34a02150a03:

Quoted 8 lines
Quoted 6 lines

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2015-04-27 14:05:19 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/for-4.1-rc

can you pick this one?

Sorry for the delay, now pulled and pushed out.

greg k-h

#8 lore raw
Quoted 21 lines · Greg KH
Quoted 20 lines · Kishon Vijay Abraham I

Hi Greg,

Quoted 17 lines · Kishon Vijay Abraham I

Hi Greg,

Please find the pull request for 4.1 -rc cycle.

This includes a couple of fixes in Kconfig, one to fix randconfig error and the other to fix dependency in QCOM PHY. A fix in rcan gen2 PHY to fix the bit location.

Let me know if I have to change something.

Cheers
Kishon

The following changes since commit 2decb2682f80759f631c8332f9a2a34a02150a03:

   Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2015-04-27 14:05:19 -0700)
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/for-4.1-rc

can you pick this one?

Sorry for the delay, now pulled and pushed out.

Thanks!

-Kishon