All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 00/10] phy: omap-usb: Support multiple instances and new types
@ 2013-09-18 12:48 ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:48 UTC (permalink / raw)
  To: balbi, bcousson
  Cc: devicetree, george.cherian, sergei.shtylyov, tony, bigeasy,
	linux-usb, kishon, thomas.langer, linux-omap, linux-arm-kernel,
	Roger Quadros

Hi,

This patchset does the following:

* Get rid of omap_control_usb platform data as we support DT only.

* Restructure and add support for new PHY types. We now support the follwing
four types

 TYPE_OTGHS - if it has otghs_control mailbox register (e.g. on OMAP4)
 TYPE_USB2 - if it has Power down bit in control_dev_conf register. e.g. USB2 PHY
 TYPE_PIPE3 - if it has DPLL and individual Rx & Tx power control. e.g. USB3 PHY or SATA PHY
 TYPE_DRA7USB2 - if it has both power down and power aux registers. e.g. USB2 PHY on DRA7

* Get rid of "ti,type" DT property and introduce compatible strings for each type.

* Have only one power control API "omap_control_usb_phy_power()" instead of a
different one for each PHY type.

* Get rid of omap_get_control_dev() so that we can support multiple instances
of the control device. We take advantage of the fact that omap control USB device
is only present on OMAP4 onwards and hence only supports DT boot. The users
of control USB device can get a reference to it from the device node's phandle.

Patches are based on v3.12-rc1.

Smoke tested on OMAP4 panda with MUSB in gadget mode (g_zero).

You can find the patches in branch
 usb-control-module
in git tree
 git://github.com/rogerq/linux.git

v7:
- Rebased on v3.12-rc1
- Updated DT compatibility ID for better readability
- Renamed TYPE_OMAP4 to TYPE_OTGHS, TYPE_USB3 to TYPE_PIPE3 and TYPE_DRA7 to
  TYPE_DRA7USB2

v6:
- addressed review comment about usage of control_usb before allocation.

v5:
- fixed whitespace alignment issues.

v4:
- removed "ti,has-mailbox" from omap-usb binding document example.

v3:
- return -EINVAL instead of -ENODEV on probe failure.
- pass device type data through of_device_id table.
- get rid of "ti,mailbox" property and "has_mailbox" from musb platform data.

v2:
- get rid of "ti,type" property and introduce compatible strings for each device type.

cheers,
-roger

---
Roger Quadros (10):
  usb: phy: omap-control: Get rid of platform data
  usb: phy: omap: Add new device types and remove
    omap_control_usb3_phy_power()
  usb: phy: omap-usb2: Don't use omap_get_control_dev()
  usb: phy: omap-usb3: Don't use omap_get_control_dev()
  usb: musb: omap2430: Don't use omap_get_control_dev()
  ARM: dts: omap4: update omap-control-usb nodes
  usb: phy: omap: get rid of omap_get_control_dev()
  ARM: dts: omap5: update omap-control-usb node
  usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
  usb: phy: omap-usb2: Manage phy clock and not otg controller clock

 Documentation/devicetree/bindings/usb/omap-usb.txt |   38 ++--
 arch/arm/boot/dts/omap4.dtsi                       |   20 ++-
 arch/arm/boot/dts/omap5.dtsi                       |   20 ++-
 drivers/usb/dwc3/dwc3-omap.c                       |   13 ++
 drivers/usb/musb/omap2430.c                        |   25 ++-
 drivers/usb/phy/phy-omap-control.c                 |  208 ++++++++++---------
 drivers/usb/phy/phy-omap-usb2.c                    |   30 ++-
 drivers/usb/phy/phy-omap-usb3.c                    |   32 +++-
 include/linux/usb/musb.h                           |    2 -
 include/linux/usb/omap_control_usb.h               |   33 ++--
 10 files changed, 236 insertions(+), 185 deletions(-)

-- 
1.7.4.1

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH v7 00/10] phy: omap-usb: Support multiple instances and new types
@ 2013-09-18 12:48 ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

This patchset does the following:

* Get rid of omap_control_usb platform data as we support DT only.

* Restructure and add support for new PHY types. We now support the follwing
four types

 TYPE_OTGHS - if it has otghs_control mailbox register (e.g. on OMAP4)
 TYPE_USB2 - if it has Power down bit in control_dev_conf register. e.g. USB2 PHY
 TYPE_PIPE3 - if it has DPLL and individual Rx & Tx power control. e.g. USB3 PHY or SATA PHY
 TYPE_DRA7USB2 - if it has both power down and power aux registers. e.g. USB2 PHY on DRA7

* Get rid of "ti,type" DT property and introduce compatible strings for each type.

* Have only one power control API "omap_control_usb_phy_power()" instead of a
different one for each PHY type.

* Get rid of omap_get_control_dev() so that we can support multiple instances
of the control device. We take advantage of the fact that omap control USB device
is only present on OMAP4 onwards and hence only supports DT boot. The users
of control USB device can get a reference to it from the device node's phandle.

Patches are based on v3.12-rc1.

Smoke tested on OMAP4 panda with MUSB in gadget mode (g_zero).

You can find the patches in branch
 usb-control-module
in git tree
 git://github.com/rogerq/linux.git

v7:
- Rebased on v3.12-rc1
- Updated DT compatibility ID for better readability
- Renamed TYPE_OMAP4 to TYPE_OTGHS, TYPE_USB3 to TYPE_PIPE3 and TYPE_DRA7 to
  TYPE_DRA7USB2

v6:
- addressed review comment about usage of control_usb before allocation.

v5:
- fixed whitespace alignment issues.

v4:
- removed "ti,has-mailbox" from omap-usb binding document example.

v3:
- return -EINVAL instead of -ENODEV on probe failure.
- pass device type data through of_device_id table.
- get rid of "ti,mailbox" property and "has_mailbox" from musb platform data.

v2:
- get rid of "ti,type" property and introduce compatible strings for each device type.

cheers,
-roger

---
Roger Quadros (10):
  usb: phy: omap-control: Get rid of platform data
  usb: phy: omap: Add new device types and remove
    omap_control_usb3_phy_power()
  usb: phy: omap-usb2: Don't use omap_get_control_dev()
  usb: phy: omap-usb3: Don't use omap_get_control_dev()
  usb: musb: omap2430: Don't use omap_get_control_dev()
  ARM: dts: omap4: update omap-control-usb nodes
  usb: phy: omap: get rid of omap_get_control_dev()
  ARM: dts: omap5: update omap-control-usb node
  usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
  usb: phy: omap-usb2: Manage phy clock and not otg controller clock

 Documentation/devicetree/bindings/usb/omap-usb.txt |   38 ++--
 arch/arm/boot/dts/omap4.dtsi                       |   20 ++-
 arch/arm/boot/dts/omap5.dtsi                       |   20 ++-
 drivers/usb/dwc3/dwc3-omap.c                       |   13 ++
 drivers/usb/musb/omap2430.c                        |   25 ++-
 drivers/usb/phy/phy-omap-control.c                 |  208 ++++++++++---------
 drivers/usb/phy/phy-omap-usb2.c                    |   30 ++-
 drivers/usb/phy/phy-omap-usb3.c                    |   32 +++-
 include/linux/usb/musb.h                           |    2 -
 include/linux/usb/omap_control_usb.h               |   33 ++--
 10 files changed, 236 insertions(+), 185 deletions(-)

-- 
1.7.4.1

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH v7 01/10] usb: phy: omap-control: Get rid of platform data
  2013-09-18 12:48 ` Roger Quadros
@ 2013-09-18 12:48     ` Roger Quadros
  -1 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:48 UTC (permalink / raw)
  To: balbi-l0cyMroinI0, bcousson-rdvid1DuHRBWk0Htik3J/w
  Cc: tony-4v6yS6AI5VpBDgjK7y7TUQ, george.cherian-l0cyMroinI0,
	kishon-l0cyMroinI0, bigeasy-hfZtesqFncYOwBW4kG4KsQ,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	thomas.langer-th3ZBGNqt+7QT0dZR+AlfA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Roger Quadros

omap-control device is present from OMAP4 onwards which
support device tree boots only. So get rid of platform data.

Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
 drivers/usb/phy/phy-omap-control.c   |   12 +++---------
 include/linux/usb/omap_control_usb.h |    4 ----
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/drivers/usb/phy/phy-omap-control.c b/drivers/usb/phy/phy-omap-control.c
index a4dda8e..9772592 100644
--- a/drivers/usb/phy/phy-omap-control.c
+++ b/drivers/usb/phy/phy-omap-control.c
@@ -197,8 +197,6 @@ static int omap_control_usb_probe(struct platform_device *pdev)
 {
 	struct resource	*res;
 	struct device_node *np = pdev->dev.of_node;
-	struct omap_control_usb_platform_data *pdata =
-			dev_get_platdata(&pdev->dev);
 
 	control_usb = devm_kzalloc(&pdev->dev, sizeof(*control_usb),
 		GFP_KERNEL);
@@ -207,14 +205,10 @@ static int omap_control_usb_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	}
 
-	if (np) {
+	if (np)
 		of_property_read_u32(np, "ti,type", &control_usb->type);
-	} else if (pdata) {
-		control_usb->type = pdata->type;
-	} else {
-		dev_err(&pdev->dev, "no pdata present\n");
-		return -EINVAL;
-	}
+	else
+		return -EINVAL;	/* We only support DT boot */
 
 	control_usb->dev	= &pdev->dev;
 
diff --git a/include/linux/usb/omap_control_usb.h b/include/linux/usb/omap_control_usb.h
index 27b5b8c..e2416b4 100644
--- a/include/linux/usb/omap_control_usb.h
+++ b/include/linux/usb/omap_control_usb.h
@@ -31,10 +31,6 @@ struct omap_control_usb {
 	u32 type;
 };
 
-struct omap_control_usb_platform_data {
-	u8 type;
-};
-
 enum omap_control_usb_mode {
 	USB_MODE_UNDEFINED = 0,
 	USB_MODE_HOST,
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 01/10] usb: phy: omap-control: Get rid of platform data
@ 2013-09-18 12:48     ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:48 UTC (permalink / raw)
  To: linux-arm-kernel

omap-control device is present from OMAP4 onwards which
support device tree boots only. So get rid of platform data.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/usb/phy/phy-omap-control.c   |   12 +++---------
 include/linux/usb/omap_control_usb.h |    4 ----
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/drivers/usb/phy/phy-omap-control.c b/drivers/usb/phy/phy-omap-control.c
index a4dda8e..9772592 100644
--- a/drivers/usb/phy/phy-omap-control.c
+++ b/drivers/usb/phy/phy-omap-control.c
@@ -197,8 +197,6 @@ static int omap_control_usb_probe(struct platform_device *pdev)
 {
 	struct resource	*res;
 	struct device_node *np = pdev->dev.of_node;
-	struct omap_control_usb_platform_data *pdata =
-			dev_get_platdata(&pdev->dev);
 
 	control_usb = devm_kzalloc(&pdev->dev, sizeof(*control_usb),
 		GFP_KERNEL);
@@ -207,14 +205,10 @@ static int omap_control_usb_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	}
 
-	if (np) {
+	if (np)
 		of_property_read_u32(np, "ti,type", &control_usb->type);
-	} else if (pdata) {
-		control_usb->type = pdata->type;
-	} else {
-		dev_err(&pdev->dev, "no pdata present\n");
-		return -EINVAL;
-	}
+	else
+		return -EINVAL;	/* We only support DT boot */
 
 	control_usb->dev	= &pdev->dev;
 
diff --git a/include/linux/usb/omap_control_usb.h b/include/linux/usb/omap_control_usb.h
index 27b5b8c..e2416b4 100644
--- a/include/linux/usb/omap_control_usb.h
+++ b/include/linux/usb/omap_control_usb.h
@@ -31,10 +31,6 @@ struct omap_control_usb {
 	u32 type;
 };
 
-struct omap_control_usb_platform_data {
-	u8 type;
-};
-
 enum omap_control_usb_mode {
 	USB_MODE_UNDEFINED = 0,
 	USB_MODE_HOST,
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 02/10] usb: phy: omap: Add new device types and remove omap_control_usb3_phy_power()
  2013-09-18 12:48 ` Roger Quadros
@ 2013-09-18 12:48   ` Roger Quadros
  -1 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:48 UTC (permalink / raw)
  To: balbi, bcousson
  Cc: tony, george.cherian, kishon, bigeasy, sergei.shtylyov,
	thomas.langer, linux-usb, linux-omap, linux-arm-kernel,
	devicetree, Roger Quadros

Add support for new device types and in the process rid of "ti,type"
device tree property. The correct type of device will be determined
from the compatible string instead.

Introduce a compatible string for each device type. At the moment
we support 4 types OTGHS, USB2, PIPE3 (e.g. USB3) and DRA7USB2.

Update DT binding information to reflect these changes.

Also get rid of omap_control_usb3_phy_power(). Just one function
i.e. omap_control_usb_phy_power() will now take care of all PHY types.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 Documentation/devicetree/bindings/usb/omap-usb.txt |   30 ++--
 drivers/usb/phy/phy-omap-control.c                 |  173 +++++++++++--------
 drivers/usb/phy/phy-omap-usb3.c                    |    6 +-
 include/linux/usb/omap_control_usb.h               |   24 ++--
 4 files changed, 130 insertions(+), 103 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt
index 9088ab0..6d8ab9c 100644
--- a/Documentation/devicetree/bindings/usb/omap-usb.txt
+++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
@@ -78,22 +78,22 @@ omap_dwc3 {
 OMAP CONTROL USB
 
 Required properties:
- - compatible: Should be "ti,omap-control-usb"
+ - compatible: Should be one of
+ "ti,control-phy-otghs" - if it has otghs_control mailbox register as on OMAP4.
+ "ti,control-phy-usb2" - if it has Power down bit in control_dev_conf register
+			e.g. USB2_PHY on OMAP5.
+ "ti,control-phy-pipe3" - if it has DPLL and individual Rx & Tx power control
+			e.g. USB3 PHY and SATA PHY on OMAP5.
+ "ti,control-phy-dra7usb2" - if it has power down register like USB2 PHY on
+			DRA7 platform.
  - reg : Address and length of the register set for the device. It contains
-   the address of "control_dev_conf" and "otghs_control" or "phy_power_usb"
-   depending upon omap4 or omap5.
- - reg-names: The names of the register addresses corresponding to the registers
-   filled in "reg".
- - ti,type: This is used to differentiate whether the control module has
-   usb mailbox or usb3 phy power. omap4 has usb mailbox in control module to
-   notify events to the musb core and omap5 has usb3 phy power register to
-   power on usb3 phy. Should be "1" if it has mailbox and "2" if it has usb3
-   phy power.
+   the address of "otghs_control" for control-phy-otghs or "power" register
+   for other types.
+ - reg-names: should be "otghs_control" control-phy-otghs and "power" for
+   other types.
 
 omap_control_usb: omap-control-usb@4a002300 {
-	compatible = "ti,omap-control-usb";
-	reg = <0x4a002300 0x4>,
-	      <0x4a00233c 0x4>;
-	reg-names = "control_dev_conf", "otghs_control";
-	ti,type = <1>;
+	compatible = "ti,control-phy-otghs";
+	reg = <0x4a00233c 0x4>;
+	reg-names = "otghs_control";
 };
diff --git a/drivers/usb/phy/phy-omap-control.c b/drivers/usb/phy/phy-omap-control.c
index 9772592..1c8a7c5 100644
--- a/drivers/usb/phy/phy-omap-control.c
+++ b/drivers/usb/phy/phy-omap-control.c
@@ -20,6 +20,7 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/of.h>
+#include <linux/of_device.h>
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/clk.h>
@@ -46,61 +47,70 @@ struct device *omap_get_control_dev(void)
 EXPORT_SYMBOL_GPL(omap_get_control_dev);
 
 /**
- * omap_control_usb3_phy_power - power on/off the serializer using control
- *	module
+ * omap_control_usb_phy_power - power on/off the phy using control module reg
  * @dev: the control module device
- * @on: 0 to off and 1 to on based on powering on or off the PHY
- *
- * usb3 PHY driver should call this API to power on or off the PHY.
+ * @on: 0 or 1, based on powering on or off the PHY
  */
-void omap_control_usb3_phy_power(struct device *dev, bool on)
+void omap_control_usb_phy_power(struct device *dev, int on)
 {
 	u32 val;
 	unsigned long rate;
-	struct omap_control_usb	*control_usb = dev_get_drvdata(dev);
+	struct omap_control_usb	*control_usb;
 
-	if (control_usb->type != OMAP_CTRL_DEV_TYPE2)
+	if (IS_ERR(dev) || !dev) {
+		pr_err("%s: invalid device\n", __func__);
 		return;
+	}
 
-	rate = clk_get_rate(control_usb->sys_clk);
-	rate = rate/1000000;
-
-	val = readl(control_usb->phy_power);
-
-	if (on) {
-		val &= ~(OMAP_CTRL_USB_PWRCTL_CLK_CMD_MASK |
-			OMAP_CTRL_USB_PWRCTL_CLK_FREQ_MASK);
-		val |= OMAP_CTRL_USB3_PHY_TX_RX_POWERON <<
-			OMAP_CTRL_USB_PWRCTL_CLK_CMD_SHIFT;
-		val |= rate << OMAP_CTRL_USB_PWRCTL_CLK_FREQ_SHIFT;
-	} else {
-		val &= ~OMAP_CTRL_USB_PWRCTL_CLK_CMD_MASK;
-		val |= OMAP_CTRL_USB3_PHY_TX_RX_POWEROFF <<
-			OMAP_CTRL_USB_PWRCTL_CLK_CMD_SHIFT;
+	control_usb = dev_get_drvdata(dev);
+	if (!control_usb) {
+		dev_err(dev, "%s: invalid control usb device\n", __func__);
+		return;
 	}
 
-	writel(val, control_usb->phy_power);
-}
-EXPORT_SYMBOL_GPL(omap_control_usb3_phy_power);
+	if (control_usb->type == OMAP_CTRL_TYPE_OTGHS)
+		return;
 
-/**
- * omap_control_usb_phy_power - power on/off the phy using control module reg
- * @dev: the control module device
- * @on: 0 or 1, based on powering on or off the PHY
- */
-void omap_control_usb_phy_power(struct device *dev, int on)
-{
-	u32 val;
-	struct omap_control_usb	*control_usb = dev_get_drvdata(dev);
+	val = readl(control_usb->power);
+
+	switch (control_usb->type) {
+	case OMAP_CTRL_TYPE_USB2:
+		if (on)
+			val &= ~OMAP_CTRL_DEV_PHY_PD;
+		else
+			val |= OMAP_CTRL_DEV_PHY_PD;
+		break;
 
-	val = readl(control_usb->dev_conf);
+	case OMAP_CTRL_TYPE_PIPE3:
+		rate = clk_get_rate(control_usb->sys_clk);
+		rate = rate/1000000;
+
+		if (on) {
+			val &= ~(OMAP_CTRL_USB_PWRCTL_CLK_CMD_MASK |
+					OMAP_CTRL_USB_PWRCTL_CLK_FREQ_MASK);
+			val |= OMAP_CTRL_USB3_PHY_TX_RX_POWERON <<
+				OMAP_CTRL_USB_PWRCTL_CLK_CMD_SHIFT;
+			val |= rate << OMAP_CTRL_USB_PWRCTL_CLK_FREQ_SHIFT;
+		} else {
+			val &= ~OMAP_CTRL_USB_PWRCTL_CLK_CMD_MASK;
+			val |= OMAP_CTRL_USB3_PHY_TX_RX_POWEROFF <<
+				OMAP_CTRL_USB_PWRCTL_CLK_CMD_SHIFT;
+		}
+		break;
 
-	if (on)
-		val &= ~OMAP_CTRL_DEV_PHY_PD;
-	else
-		val |= OMAP_CTRL_DEV_PHY_PD;
+	case OMAP_CTRL_TYPE_DRA7USB2:
+		if (on)
+			val &= ~OMAP_CTRL_USB2_PHY_PD;
+		else
+			val |= OMAP_CTRL_USB2_PHY_PD;
+		break;
+	default:
+		dev_err(dev, "%s: type %d not recognized\n",
+					__func__, control_usb->type);
+		break;
+	}
 
-	writel(val, control_usb->dev_conf);
+	writel(val, control_usb->power);
 }
 EXPORT_SYMBOL_GPL(omap_control_usb_phy_power);
 
@@ -172,7 +182,7 @@ void omap_control_usb_set_mode(struct device *dev,
 {
 	struct omap_control_usb	*ctrl_usb;
 
-	if (IS_ERR(dev) || control_usb->type != OMAP_CTRL_DEV_TYPE1)
+	if (IS_ERR(dev) || control_usb->type != OMAP_CTRL_TYPE_OTGHS)
 		return;
 
 	ctrl_usb = dev_get_drvdata(dev);
@@ -193,10 +203,45 @@ void omap_control_usb_set_mode(struct device *dev,
 }
 EXPORT_SYMBOL_GPL(omap_control_usb_set_mode);
 
+#ifdef CONFIG_OF
+
+static const enum omap_control_usb_type otghs_data = OMAP_CTRL_TYPE_OTGHS;
+static const enum omap_control_usb_type usb2_data = OMAP_CTRL_TYPE_USB2;
+static const enum omap_control_usb_type pipe3_data = OMAP_CTRL_TYPE_PIPE3;
+static const enum omap_control_usb_type dra7usb2_data = OMAP_CTRL_TYPE_DRA7USB2;
+
+static const struct of_device_id omap_control_usb_id_table[] = {
+	{
+		.compatible = "ti,control-phy-otghs",
+		.data = &otghs_data,
+	},
+	{
+		.compatible = "ti,control-phy-usb2",
+		.data = &usb2_data,
+	},
+	{
+		.compatible = "ti,control-phy-pipe3",
+		.data = &pipe3_data,
+	},
+	{
+		.compatible = "ti,control-phy-dra7usb2",
+		.data = &dra7usb2_data,
+	},
+	{},
+};
+MODULE_DEVICE_TABLE(of, omap_control_usb_id_table);
+#endif
+
+
 static int omap_control_usb_probe(struct platform_device *pdev)
 {
 	struct resource	*res;
-	struct device_node *np = pdev->dev.of_node;
+	const struct of_device_id *of_id;
+
+	of_id = of_match_device(of_match_ptr(omap_control_usb_id_table),
+								&pdev->dev);
+	if (!of_id)
+		return -EINVAL;
 
 	control_usb = devm_kzalloc(&pdev->dev, sizeof(*control_usb),
 		GFP_KERNEL);
@@ -205,36 +250,27 @@ static int omap_control_usb_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	}
 
-	if (np)
-		of_property_read_u32(np, "ti,type", &control_usb->type);
-	else
-		return -EINVAL;	/* We only support DT boot */
-
-	control_usb->dev	= &pdev->dev;
+	control_usb->dev = &pdev->dev;
+	control_usb->type = *(enum omap_control_usb_type *)of_id->data;
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-		"control_dev_conf");
-	control_usb->dev_conf = devm_ioremap_resource(&pdev->dev, res);
-	if (IS_ERR(control_usb->dev_conf))
-		return PTR_ERR(control_usb->dev_conf);
-
-	if (control_usb->type == OMAP_CTRL_DEV_TYPE1) {
+	if (control_usb->type == OMAP_CTRL_TYPE_OTGHS) {
 		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
 			"otghs_control");
 		control_usb->otghs_control = devm_ioremap_resource(
 			&pdev->dev, res);
 		if (IS_ERR(control_usb->otghs_control))
 			return PTR_ERR(control_usb->otghs_control);
-	}
-
-	if (control_usb->type == OMAP_CTRL_DEV_TYPE2) {
+	} else {
 		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-			"phy_power_usb");
-		control_usb->phy_power = devm_ioremap_resource(
-			&pdev->dev, res);
-		if (IS_ERR(control_usb->phy_power))
-			return PTR_ERR(control_usb->phy_power);
+				"power");
+		control_usb->power = devm_ioremap_resource(&pdev->dev, res);
+		if (IS_ERR(control_usb->power)) {
+			dev_err(&pdev->dev, "Couldn't get power register\n");
+			return PTR_ERR(control_usb->power);
+		}
+	}
 
+	if (control_usb->type == OMAP_CTRL_TYPE_PIPE3) {
 		control_usb->sys_clk = devm_clk_get(control_usb->dev,
 			"sys_clkin");
 		if (IS_ERR(control_usb->sys_clk)) {
@@ -243,20 +279,11 @@ static int omap_control_usb_probe(struct platform_device *pdev)
 		}
 	}
 
-
 	dev_set_drvdata(control_usb->dev, control_usb);
 
 	return 0;
 }
 
-#ifdef CONFIG_OF
-static const struct of_device_id omap_control_usb_id_table[] = {
-	{ .compatible = "ti,omap-control-usb" },
-	{}
-};
-MODULE_DEVICE_TABLE(of, omap_control_usb_id_table);
-#endif
-
 static struct platform_driver omap_control_usb_driver = {
 	.probe		= omap_control_usb_probe,
 	.driver		= {
diff --git a/drivers/usb/phy/phy-omap-usb3.c b/drivers/usb/phy/phy-omap-usb3.c
index fc15694..4a7f27c 100644
--- a/drivers/usb/phy/phy-omap-usb3.c
+++ b/drivers/usb/phy/phy-omap-usb3.c
@@ -100,7 +100,7 @@ static int omap_usb3_suspend(struct usb_phy *x, int suspend)
 			udelay(1);
 		} while (--timeout);
 
-		omap_control_usb3_phy_power(phy->control_dev, 0);
+		omap_control_usb_phy_power(phy->control_dev, 0);
 
 		phy->is_suspended	= 1;
 	} else if (!suspend && phy->is_suspended) {
@@ -189,7 +189,7 @@ static int omap_usb3_init(struct usb_phy *x)
 	if (ret)
 		return ret;
 
-	omap_control_usb3_phy_power(phy->control_dev, 1);
+	omap_control_usb_phy_power(phy->control_dev, 1);
 
 	return 0;
 }
@@ -245,7 +245,7 @@ static int omap_usb3_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
-	omap_control_usb3_phy_power(phy->control_dev, 0);
+	omap_control_usb_phy_power(phy->control_dev, 0);
 	usb_add_phy_dev(&phy->phy);
 
 	platform_set_drvdata(pdev, phy);
diff --git a/include/linux/usb/omap_control_usb.h b/include/linux/usb/omap_control_usb.h
index e2416b4..61b889a 100644
--- a/include/linux/usb/omap_control_usb.h
+++ b/include/linux/usb/omap_control_usb.h
@@ -19,16 +19,23 @@
 #ifndef __OMAP_CONTROL_USB_H__
 #define __OMAP_CONTROL_USB_H__
 
+enum omap_control_usb_type {
+	OMAP_CTRL_TYPE_OTGHS = 1,	/* Mailbox OTGHS_CONTROL */
+	OMAP_CTRL_TYPE_USB2,	/* USB2_PHY, power down in CONTROL_DEV_CONF */
+	OMAP_CTRL_TYPE_PIPE3,	/* PIPE3 PHY, DPLL & seperate Rx/Tx power */
+	OMAP_CTRL_TYPE_DRA7USB2, /* USB2 PHY, power and power_aux e.g. DRA7 */
+};
+
 struct omap_control_usb {
 	struct device *dev;
 
-	u32 __iomem *dev_conf;
 	u32 __iomem *otghs_control;
-	u32 __iomem *phy_power;
+	u32 __iomem *power;
+	u32 __iomem *power_aux;
 
 	struct clk *sys_clk;
 
-	u32 type;
+	enum omap_control_usb_type type;
 };
 
 enum omap_control_usb_mode {
@@ -38,10 +45,6 @@ enum omap_control_usb_mode {
 	USB_MODE_DISCONNECT,
 };
 
-/* To differentiate ctrl module IP having either mailbox or USB3 PHY power */
-#define	OMAP_CTRL_DEV_TYPE1		0x1
-#define	OMAP_CTRL_DEV_TYPE2		0x2
-
 #define	OMAP_CTRL_DEV_PHY_PD		BIT(0)
 
 #define	OMAP_CTRL_DEV_AVALID		BIT(0)
@@ -59,10 +62,11 @@ enum omap_control_usb_mode {
 #define	OMAP_CTRL_USB3_PHY_TX_RX_POWERON	0x3
 #define	OMAP_CTRL_USB3_PHY_TX_RX_POWEROFF	0x0
 
+#define OMAP_CTRL_USB2_PHY_PD		BIT(28)
+
 #if IS_ENABLED(CONFIG_OMAP_CONTROL_USB)
 extern struct device *omap_get_control_dev(void);
 extern void omap_control_usb_phy_power(struct device *dev, int on);
-extern void omap_control_usb3_phy_power(struct device *dev, bool on);
 extern void omap_control_usb_set_mode(struct device *dev,
 	enum omap_control_usb_mode mode);
 #else
@@ -75,10 +79,6 @@ static inline void omap_control_usb_phy_power(struct device *dev, int on)
 {
 }
 
-static inline void omap_control_usb3_phy_power(struct device *dev, int on)
-{
-}
-
 static inline void omap_control_usb_set_mode(struct device *dev,
 	enum omap_control_usb_mode mode)
 {
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 02/10] usb: phy: omap: Add new device types and remove omap_control_usb3_phy_power()
@ 2013-09-18 12:48   ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:48 UTC (permalink / raw)
  To: linux-arm-kernel

Add support for new device types and in the process rid of "ti,type"
device tree property. The correct type of device will be determined
from the compatible string instead.

Introduce a compatible string for each device type. At the moment
we support 4 types OTGHS, USB2, PIPE3 (e.g. USB3) and DRA7USB2.

Update DT binding information to reflect these changes.

Also get rid of omap_control_usb3_phy_power(). Just one function
i.e. omap_control_usb_phy_power() will now take care of all PHY types.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 Documentation/devicetree/bindings/usb/omap-usb.txt |   30 ++--
 drivers/usb/phy/phy-omap-control.c                 |  173 +++++++++++--------
 drivers/usb/phy/phy-omap-usb3.c                    |    6 +-
 include/linux/usb/omap_control_usb.h               |   24 ++--
 4 files changed, 130 insertions(+), 103 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt
index 9088ab0..6d8ab9c 100644
--- a/Documentation/devicetree/bindings/usb/omap-usb.txt
+++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
@@ -78,22 +78,22 @@ omap_dwc3 {
 OMAP CONTROL USB
 
 Required properties:
- - compatible: Should be "ti,omap-control-usb"
+ - compatible: Should be one of
+ "ti,control-phy-otghs" - if it has otghs_control mailbox register as on OMAP4.
+ "ti,control-phy-usb2" - if it has Power down bit in control_dev_conf register
+			e.g. USB2_PHY on OMAP5.
+ "ti,control-phy-pipe3" - if it has DPLL and individual Rx & Tx power control
+			e.g. USB3 PHY and SATA PHY on OMAP5.
+ "ti,control-phy-dra7usb2" - if it has power down register like USB2 PHY on
+			DRA7 platform.
  - reg : Address and length of the register set for the device. It contains
-   the address of "control_dev_conf" and "otghs_control" or "phy_power_usb"
-   depending upon omap4 or omap5.
- - reg-names: The names of the register addresses corresponding to the registers
-   filled in "reg".
- - ti,type: This is used to differentiate whether the control module has
-   usb mailbox or usb3 phy power. omap4 has usb mailbox in control module to
-   notify events to the musb core and omap5 has usb3 phy power register to
-   power on usb3 phy. Should be "1" if it has mailbox and "2" if it has usb3
-   phy power.
+   the address of "otghs_control" for control-phy-otghs or "power" register
+   for other types.
+ - reg-names: should be "otghs_control" control-phy-otghs and "power" for
+   other types.
 
 omap_control_usb: omap-control-usb at 4a002300 {
-	compatible = "ti,omap-control-usb";
-	reg = <0x4a002300 0x4>,
-	      <0x4a00233c 0x4>;
-	reg-names = "control_dev_conf", "otghs_control";
-	ti,type = <1>;
+	compatible = "ti,control-phy-otghs";
+	reg = <0x4a00233c 0x4>;
+	reg-names = "otghs_control";
 };
diff --git a/drivers/usb/phy/phy-omap-control.c b/drivers/usb/phy/phy-omap-control.c
index 9772592..1c8a7c5 100644
--- a/drivers/usb/phy/phy-omap-control.c
+++ b/drivers/usb/phy/phy-omap-control.c
@@ -20,6 +20,7 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/of.h>
+#include <linux/of_device.h>
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/clk.h>
@@ -46,61 +47,70 @@ struct device *omap_get_control_dev(void)
 EXPORT_SYMBOL_GPL(omap_get_control_dev);
 
 /**
- * omap_control_usb3_phy_power - power on/off the serializer using control
- *	module
+ * omap_control_usb_phy_power - power on/off the phy using control module reg
  * @dev: the control module device
- * @on: 0 to off and 1 to on based on powering on or off the PHY
- *
- * usb3 PHY driver should call this API to power on or off the PHY.
+ * @on: 0 or 1, based on powering on or off the PHY
  */
-void omap_control_usb3_phy_power(struct device *dev, bool on)
+void omap_control_usb_phy_power(struct device *dev, int on)
 {
 	u32 val;
 	unsigned long rate;
-	struct omap_control_usb	*control_usb = dev_get_drvdata(dev);
+	struct omap_control_usb	*control_usb;
 
-	if (control_usb->type != OMAP_CTRL_DEV_TYPE2)
+	if (IS_ERR(dev) || !dev) {
+		pr_err("%s: invalid device\n", __func__);
 		return;
+	}
 
-	rate = clk_get_rate(control_usb->sys_clk);
-	rate = rate/1000000;
-
-	val = readl(control_usb->phy_power);
-
-	if (on) {
-		val &= ~(OMAP_CTRL_USB_PWRCTL_CLK_CMD_MASK |
-			OMAP_CTRL_USB_PWRCTL_CLK_FREQ_MASK);
-		val |= OMAP_CTRL_USB3_PHY_TX_RX_POWERON <<
-			OMAP_CTRL_USB_PWRCTL_CLK_CMD_SHIFT;
-		val |= rate << OMAP_CTRL_USB_PWRCTL_CLK_FREQ_SHIFT;
-	} else {
-		val &= ~OMAP_CTRL_USB_PWRCTL_CLK_CMD_MASK;
-		val |= OMAP_CTRL_USB3_PHY_TX_RX_POWEROFF <<
-			OMAP_CTRL_USB_PWRCTL_CLK_CMD_SHIFT;
+	control_usb = dev_get_drvdata(dev);
+	if (!control_usb) {
+		dev_err(dev, "%s: invalid control usb device\n", __func__);
+		return;
 	}
 
-	writel(val, control_usb->phy_power);
-}
-EXPORT_SYMBOL_GPL(omap_control_usb3_phy_power);
+	if (control_usb->type == OMAP_CTRL_TYPE_OTGHS)
+		return;
 
-/**
- * omap_control_usb_phy_power - power on/off the phy using control module reg
- * @dev: the control module device
- * @on: 0 or 1, based on powering on or off the PHY
- */
-void omap_control_usb_phy_power(struct device *dev, int on)
-{
-	u32 val;
-	struct omap_control_usb	*control_usb = dev_get_drvdata(dev);
+	val = readl(control_usb->power);
+
+	switch (control_usb->type) {
+	case OMAP_CTRL_TYPE_USB2:
+		if (on)
+			val &= ~OMAP_CTRL_DEV_PHY_PD;
+		else
+			val |= OMAP_CTRL_DEV_PHY_PD;
+		break;
 
-	val = readl(control_usb->dev_conf);
+	case OMAP_CTRL_TYPE_PIPE3:
+		rate = clk_get_rate(control_usb->sys_clk);
+		rate = rate/1000000;
+
+		if (on) {
+			val &= ~(OMAP_CTRL_USB_PWRCTL_CLK_CMD_MASK |
+					OMAP_CTRL_USB_PWRCTL_CLK_FREQ_MASK);
+			val |= OMAP_CTRL_USB3_PHY_TX_RX_POWERON <<
+				OMAP_CTRL_USB_PWRCTL_CLK_CMD_SHIFT;
+			val |= rate << OMAP_CTRL_USB_PWRCTL_CLK_FREQ_SHIFT;
+		} else {
+			val &= ~OMAP_CTRL_USB_PWRCTL_CLK_CMD_MASK;
+			val |= OMAP_CTRL_USB3_PHY_TX_RX_POWEROFF <<
+				OMAP_CTRL_USB_PWRCTL_CLK_CMD_SHIFT;
+		}
+		break;
 
-	if (on)
-		val &= ~OMAP_CTRL_DEV_PHY_PD;
-	else
-		val |= OMAP_CTRL_DEV_PHY_PD;
+	case OMAP_CTRL_TYPE_DRA7USB2:
+		if (on)
+			val &= ~OMAP_CTRL_USB2_PHY_PD;
+		else
+			val |= OMAP_CTRL_USB2_PHY_PD;
+		break;
+	default:
+		dev_err(dev, "%s: type %d not recognized\n",
+					__func__, control_usb->type);
+		break;
+	}
 
-	writel(val, control_usb->dev_conf);
+	writel(val, control_usb->power);
 }
 EXPORT_SYMBOL_GPL(omap_control_usb_phy_power);
 
@@ -172,7 +182,7 @@ void omap_control_usb_set_mode(struct device *dev,
 {
 	struct omap_control_usb	*ctrl_usb;
 
-	if (IS_ERR(dev) || control_usb->type != OMAP_CTRL_DEV_TYPE1)
+	if (IS_ERR(dev) || control_usb->type != OMAP_CTRL_TYPE_OTGHS)
 		return;
 
 	ctrl_usb = dev_get_drvdata(dev);
@@ -193,10 +203,45 @@ void omap_control_usb_set_mode(struct device *dev,
 }
 EXPORT_SYMBOL_GPL(omap_control_usb_set_mode);
 
+#ifdef CONFIG_OF
+
+static const enum omap_control_usb_type otghs_data = OMAP_CTRL_TYPE_OTGHS;
+static const enum omap_control_usb_type usb2_data = OMAP_CTRL_TYPE_USB2;
+static const enum omap_control_usb_type pipe3_data = OMAP_CTRL_TYPE_PIPE3;
+static const enum omap_control_usb_type dra7usb2_data = OMAP_CTRL_TYPE_DRA7USB2;
+
+static const struct of_device_id omap_control_usb_id_table[] = {
+	{
+		.compatible = "ti,control-phy-otghs",
+		.data = &otghs_data,
+	},
+	{
+		.compatible = "ti,control-phy-usb2",
+		.data = &usb2_data,
+	},
+	{
+		.compatible = "ti,control-phy-pipe3",
+		.data = &pipe3_data,
+	},
+	{
+		.compatible = "ti,control-phy-dra7usb2",
+		.data = &dra7usb2_data,
+	},
+	{},
+};
+MODULE_DEVICE_TABLE(of, omap_control_usb_id_table);
+#endif
+
+
 static int omap_control_usb_probe(struct platform_device *pdev)
 {
 	struct resource	*res;
-	struct device_node *np = pdev->dev.of_node;
+	const struct of_device_id *of_id;
+
+	of_id = of_match_device(of_match_ptr(omap_control_usb_id_table),
+								&pdev->dev);
+	if (!of_id)
+		return -EINVAL;
 
 	control_usb = devm_kzalloc(&pdev->dev, sizeof(*control_usb),
 		GFP_KERNEL);
@@ -205,36 +250,27 @@ static int omap_control_usb_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	}
 
-	if (np)
-		of_property_read_u32(np, "ti,type", &control_usb->type);
-	else
-		return -EINVAL;	/* We only support DT boot */
-
-	control_usb->dev	= &pdev->dev;
+	control_usb->dev = &pdev->dev;
+	control_usb->type = *(enum omap_control_usb_type *)of_id->data;
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-		"control_dev_conf");
-	control_usb->dev_conf = devm_ioremap_resource(&pdev->dev, res);
-	if (IS_ERR(control_usb->dev_conf))
-		return PTR_ERR(control_usb->dev_conf);
-
-	if (control_usb->type == OMAP_CTRL_DEV_TYPE1) {
+	if (control_usb->type == OMAP_CTRL_TYPE_OTGHS) {
 		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
 			"otghs_control");
 		control_usb->otghs_control = devm_ioremap_resource(
 			&pdev->dev, res);
 		if (IS_ERR(control_usb->otghs_control))
 			return PTR_ERR(control_usb->otghs_control);
-	}
-
-	if (control_usb->type == OMAP_CTRL_DEV_TYPE2) {
+	} else {
 		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-			"phy_power_usb");
-		control_usb->phy_power = devm_ioremap_resource(
-			&pdev->dev, res);
-		if (IS_ERR(control_usb->phy_power))
-			return PTR_ERR(control_usb->phy_power);
+				"power");
+		control_usb->power = devm_ioremap_resource(&pdev->dev, res);
+		if (IS_ERR(control_usb->power)) {
+			dev_err(&pdev->dev, "Couldn't get power register\n");
+			return PTR_ERR(control_usb->power);
+		}
+	}
 
+	if (control_usb->type == OMAP_CTRL_TYPE_PIPE3) {
 		control_usb->sys_clk = devm_clk_get(control_usb->dev,
 			"sys_clkin");
 		if (IS_ERR(control_usb->sys_clk)) {
@@ -243,20 +279,11 @@ static int omap_control_usb_probe(struct platform_device *pdev)
 		}
 	}
 
-
 	dev_set_drvdata(control_usb->dev, control_usb);
 
 	return 0;
 }
 
-#ifdef CONFIG_OF
-static const struct of_device_id omap_control_usb_id_table[] = {
-	{ .compatible = "ti,omap-control-usb" },
-	{}
-};
-MODULE_DEVICE_TABLE(of, omap_control_usb_id_table);
-#endif
-
 static struct platform_driver omap_control_usb_driver = {
 	.probe		= omap_control_usb_probe,
 	.driver		= {
diff --git a/drivers/usb/phy/phy-omap-usb3.c b/drivers/usb/phy/phy-omap-usb3.c
index fc15694..4a7f27c 100644
--- a/drivers/usb/phy/phy-omap-usb3.c
+++ b/drivers/usb/phy/phy-omap-usb3.c
@@ -100,7 +100,7 @@ static int omap_usb3_suspend(struct usb_phy *x, int suspend)
 			udelay(1);
 		} while (--timeout);
 
-		omap_control_usb3_phy_power(phy->control_dev, 0);
+		omap_control_usb_phy_power(phy->control_dev, 0);
 
 		phy->is_suspended	= 1;
 	} else if (!suspend && phy->is_suspended) {
@@ -189,7 +189,7 @@ static int omap_usb3_init(struct usb_phy *x)
 	if (ret)
 		return ret;
 
-	omap_control_usb3_phy_power(phy->control_dev, 1);
+	omap_control_usb_phy_power(phy->control_dev, 1);
 
 	return 0;
 }
@@ -245,7 +245,7 @@ static int omap_usb3_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
-	omap_control_usb3_phy_power(phy->control_dev, 0);
+	omap_control_usb_phy_power(phy->control_dev, 0);
 	usb_add_phy_dev(&phy->phy);
 
 	platform_set_drvdata(pdev, phy);
diff --git a/include/linux/usb/omap_control_usb.h b/include/linux/usb/omap_control_usb.h
index e2416b4..61b889a 100644
--- a/include/linux/usb/omap_control_usb.h
+++ b/include/linux/usb/omap_control_usb.h
@@ -19,16 +19,23 @@
 #ifndef __OMAP_CONTROL_USB_H__
 #define __OMAP_CONTROL_USB_H__
 
+enum omap_control_usb_type {
+	OMAP_CTRL_TYPE_OTGHS = 1,	/* Mailbox OTGHS_CONTROL */
+	OMAP_CTRL_TYPE_USB2,	/* USB2_PHY, power down in CONTROL_DEV_CONF */
+	OMAP_CTRL_TYPE_PIPE3,	/* PIPE3 PHY, DPLL & seperate Rx/Tx power */
+	OMAP_CTRL_TYPE_DRA7USB2, /* USB2 PHY, power and power_aux e.g. DRA7 */
+};
+
 struct omap_control_usb {
 	struct device *dev;
 
-	u32 __iomem *dev_conf;
 	u32 __iomem *otghs_control;
-	u32 __iomem *phy_power;
+	u32 __iomem *power;
+	u32 __iomem *power_aux;
 
 	struct clk *sys_clk;
 
-	u32 type;
+	enum omap_control_usb_type type;
 };
 
 enum omap_control_usb_mode {
@@ -38,10 +45,6 @@ enum omap_control_usb_mode {
 	USB_MODE_DISCONNECT,
 };
 
-/* To differentiate ctrl module IP having either mailbox or USB3 PHY power */
-#define	OMAP_CTRL_DEV_TYPE1		0x1
-#define	OMAP_CTRL_DEV_TYPE2		0x2
-
 #define	OMAP_CTRL_DEV_PHY_PD		BIT(0)
 
 #define	OMAP_CTRL_DEV_AVALID		BIT(0)
@@ -59,10 +62,11 @@ enum omap_control_usb_mode {
 #define	OMAP_CTRL_USB3_PHY_TX_RX_POWERON	0x3
 #define	OMAP_CTRL_USB3_PHY_TX_RX_POWEROFF	0x0
 
+#define OMAP_CTRL_USB2_PHY_PD		BIT(28)
+
 #if IS_ENABLED(CONFIG_OMAP_CONTROL_USB)
 extern struct device *omap_get_control_dev(void);
 extern void omap_control_usb_phy_power(struct device *dev, int on);
-extern void omap_control_usb3_phy_power(struct device *dev, bool on);
 extern void omap_control_usb_set_mode(struct device *dev,
 	enum omap_control_usb_mode mode);
 #else
@@ -75,10 +79,6 @@ static inline void omap_control_usb_phy_power(struct device *dev, int on)
 {
 }
 
-static inline void omap_control_usb3_phy_power(struct device *dev, int on)
-{
-}
-
 static inline void omap_control_usb_set_mode(struct device *dev,
 	enum omap_control_usb_mode mode)
 {
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 03/10] usb: phy: omap-usb2: Don't use omap_get_control_dev()
  2013-09-18 12:48 ` Roger Quadros
@ 2013-09-18 12:48   ` Roger Quadros
  -1 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:48 UTC (permalink / raw)
  To: balbi, bcousson
  Cc: tony, george.cherian, kishon, bigeasy, sergei.shtylyov,
	thomas.langer, linux-usb, linux-omap, linux-arm-kernel,
	devicetree, Roger Quadros

omap_get_control_dev() is being deprecated as it doesn't support
multiple instances. As control device is present only from OMAP4
onwards which supports DT only, we use phandles to get the
reference to the control device.

As we don't support non-DT boot, we just bail out on probe
if device node is not present.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/usb/phy/phy-omap-usb2.c |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/phy/phy-omap-usb2.c b/drivers/usb/phy/phy-omap-usb2.c
index d266861..e7d4790 100644
--- a/drivers/usb/phy/phy-omap-usb2.c
+++ b/drivers/usb/phy/phy-omap-usb2.c
@@ -28,6 +28,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/delay.h>
 #include <linux/usb/omap_control_usb.h>
+#include <linux/of_platform.h>
 
 /**
  * omap_usb2_set_comparator - links the comparator present in the sytem with
@@ -120,8 +121,14 @@ static int omap_usb2_suspend(struct usb_phy *x, int suspend)
 
 static int omap_usb2_probe(struct platform_device *pdev)
 {
-	struct omap_usb			*phy;
-	struct usb_otg			*otg;
+	struct omap_usb	*phy;
+	struct usb_otg *otg;
+	struct device_node *node = pdev->dev.of_node;
+	struct device_node *control_node;
+	struct platform_device *control_pdev;
+
+	if (!node)
+		return -EINVAL;
 
 	phy = devm_kzalloc(&pdev->dev, sizeof(*phy), GFP_KERNEL);
 	if (!phy) {
@@ -143,11 +150,18 @@ static int omap_usb2_probe(struct platform_device *pdev)
 	phy->phy.otg		= otg;
 	phy->phy.type		= USB_PHY_TYPE_USB2;
 
-	phy->control_dev = omap_get_control_dev();
-	if (IS_ERR(phy->control_dev)) {
-		dev_dbg(&pdev->dev, "Failed to get control device\n");
-		return -ENODEV;
+	control_node = of_parse_phandle(node, "ctrl-module", 0);
+	if (!control_node) {
+		dev_err(&pdev->dev, "Failed to get control device phandle\n");
+		return -EINVAL;
 	}
+	control_pdev = of_find_device_by_node(control_node);
+	if (!control_pdev) {
+		dev_err(&pdev->dev, "Failed to get control device\n");
+		return -EINVAL;
+	}
+
+	phy->control_dev = &control_pdev->dev;
 
 	phy->is_suspended	= 1;
 	omap_control_usb_phy_power(phy->control_dev, 0);
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 03/10] usb: phy: omap-usb2: Don't use omap_get_control_dev()
@ 2013-09-18 12:48   ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:48 UTC (permalink / raw)
  To: linux-arm-kernel

omap_get_control_dev() is being deprecated as it doesn't support
multiple instances. As control device is present only from OMAP4
onwards which supports DT only, we use phandles to get the
reference to the control device.

As we don't support non-DT boot, we just bail out on probe
if device node is not present.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/usb/phy/phy-omap-usb2.c |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/phy/phy-omap-usb2.c b/drivers/usb/phy/phy-omap-usb2.c
index d266861..e7d4790 100644
--- a/drivers/usb/phy/phy-omap-usb2.c
+++ b/drivers/usb/phy/phy-omap-usb2.c
@@ -28,6 +28,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/delay.h>
 #include <linux/usb/omap_control_usb.h>
+#include <linux/of_platform.h>
 
 /**
  * omap_usb2_set_comparator - links the comparator present in the sytem with
@@ -120,8 +121,14 @@ static int omap_usb2_suspend(struct usb_phy *x, int suspend)
 
 static int omap_usb2_probe(struct platform_device *pdev)
 {
-	struct omap_usb			*phy;
-	struct usb_otg			*otg;
+	struct omap_usb	*phy;
+	struct usb_otg *otg;
+	struct device_node *node = pdev->dev.of_node;
+	struct device_node *control_node;
+	struct platform_device *control_pdev;
+
+	if (!node)
+		return -EINVAL;
 
 	phy = devm_kzalloc(&pdev->dev, sizeof(*phy), GFP_KERNEL);
 	if (!phy) {
@@ -143,11 +150,18 @@ static int omap_usb2_probe(struct platform_device *pdev)
 	phy->phy.otg		= otg;
 	phy->phy.type		= USB_PHY_TYPE_USB2;
 
-	phy->control_dev = omap_get_control_dev();
-	if (IS_ERR(phy->control_dev)) {
-		dev_dbg(&pdev->dev, "Failed to get control device\n");
-		return -ENODEV;
+	control_node = of_parse_phandle(node, "ctrl-module", 0);
+	if (!control_node) {
+		dev_err(&pdev->dev, "Failed to get control device phandle\n");
+		return -EINVAL;
 	}
+	control_pdev = of_find_device_by_node(control_node);
+	if (!control_pdev) {
+		dev_err(&pdev->dev, "Failed to get control device\n");
+		return -EINVAL;
+	}
+
+	phy->control_dev = &control_pdev->dev;
 
 	phy->is_suspended	= 1;
 	omap_control_usb_phy_power(phy->control_dev, 0);
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 04/10] usb: phy: omap-usb3: Don't use omap_get_control_dev()
  2013-09-18 12:48 ` Roger Quadros
@ 2013-09-18 12:48   ` Roger Quadros
  -1 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:48 UTC (permalink / raw)
  To: balbi, bcousson
  Cc: tony, george.cherian, kishon, bigeasy, sergei.shtylyov,
	thomas.langer, linux-usb, linux-omap, linux-arm-kernel,
	devicetree, Roger Quadros

omap_get_control_dev() is being deprecated as it doesn't support
multiple instances. As control device is present only from OMAP4
onwards which supports DT only, we use phandles to get the
reference to the control device.

As we don't support non-DT boot, we just bail out on probe
if device node is not present.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/usb/phy/phy-omap-usb3.c |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/phy/phy-omap-usb3.c b/drivers/usb/phy/phy-omap-usb3.c
index 4a7f27c..4004f82 100644
--- a/drivers/usb/phy/phy-omap-usb3.c
+++ b/drivers/usb/phy/phy-omap-usb3.c
@@ -26,6 +26,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/delay.h>
 #include <linux/usb/omap_control_usb.h>
+#include <linux/of_platform.h>
 
 #define	PLL_STATUS		0x00000004
 #define	PLL_GO			0x00000008
@@ -196,8 +197,14 @@ static int omap_usb3_init(struct usb_phy *x)
 
 static int omap_usb3_probe(struct platform_device *pdev)
 {
-	struct omap_usb			*phy;
-	struct resource			*res;
+	struct omap_usb *phy;
+	struct resource *res;
+	struct device_node *node = pdev->dev.of_node;
+	struct device_node *control_node;
+	struct platform_device *control_pdev;
+
+	if (!node)
+		return -EINVAL;
 
 	phy = devm_kzalloc(&pdev->dev, sizeof(*phy), GFP_KERNEL);
 	if (!phy) {
@@ -239,11 +246,18 @@ static int omap_usb3_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	phy->control_dev = omap_get_control_dev();
-	if (IS_ERR(phy->control_dev)) {
-		dev_dbg(&pdev->dev, "Failed to get control device\n");
-		return -ENODEV;
+	control_node = of_parse_phandle(node, "ctrl-module", 0);
+	if (!control_node) {
+		dev_err(&pdev->dev, "Failed to get control device phandle\n");
+		return -EINVAL;
 	}
+	control_pdev = of_find_device_by_node(control_node);
+	if (!control_pdev) {
+		dev_err(&pdev->dev, "Failed to get control device\n");
+		return -EINVAL;
+	}
+
+	phy->control_dev = &control_pdev->dev;
 
 	omap_control_usb_phy_power(phy->control_dev, 0);
 	usb_add_phy_dev(&phy->phy);
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 04/10] usb: phy: omap-usb3: Don't use omap_get_control_dev()
@ 2013-09-18 12:48   ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:48 UTC (permalink / raw)
  To: linux-arm-kernel

omap_get_control_dev() is being deprecated as it doesn't support
multiple instances. As control device is present only from OMAP4
onwards which supports DT only, we use phandles to get the
reference to the control device.

As we don't support non-DT boot, we just bail out on probe
if device node is not present.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/usb/phy/phy-omap-usb3.c |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/phy/phy-omap-usb3.c b/drivers/usb/phy/phy-omap-usb3.c
index 4a7f27c..4004f82 100644
--- a/drivers/usb/phy/phy-omap-usb3.c
+++ b/drivers/usb/phy/phy-omap-usb3.c
@@ -26,6 +26,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/delay.h>
 #include <linux/usb/omap_control_usb.h>
+#include <linux/of_platform.h>
 
 #define	PLL_STATUS		0x00000004
 #define	PLL_GO			0x00000008
@@ -196,8 +197,14 @@ static int omap_usb3_init(struct usb_phy *x)
 
 static int omap_usb3_probe(struct platform_device *pdev)
 {
-	struct omap_usb			*phy;
-	struct resource			*res;
+	struct omap_usb *phy;
+	struct resource *res;
+	struct device_node *node = pdev->dev.of_node;
+	struct device_node *control_node;
+	struct platform_device *control_pdev;
+
+	if (!node)
+		return -EINVAL;
 
 	phy = devm_kzalloc(&pdev->dev, sizeof(*phy), GFP_KERNEL);
 	if (!phy) {
@@ -239,11 +246,18 @@ static int omap_usb3_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	phy->control_dev = omap_get_control_dev();
-	if (IS_ERR(phy->control_dev)) {
-		dev_dbg(&pdev->dev, "Failed to get control device\n");
-		return -ENODEV;
+	control_node = of_parse_phandle(node, "ctrl-module", 0);
+	if (!control_node) {
+		dev_err(&pdev->dev, "Failed to get control device phandle\n");
+		return -EINVAL;
 	}
+	control_pdev = of_find_device_by_node(control_node);
+	if (!control_pdev) {
+		dev_err(&pdev->dev, "Failed to get control device\n");
+		return -EINVAL;
+	}
+
+	phy->control_dev = &control_pdev->dev;
 
 	omap_control_usb_phy_power(phy->control_dev, 0);
 	usb_add_phy_dev(&phy->phy);
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 05/10] usb: musb: omap2430: Don't use omap_get_control_dev()
  2013-09-18 12:48 ` Roger Quadros
@ 2013-09-18 12:48   ` Roger Quadros
  -1 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:48 UTC (permalink / raw)
  To: balbi, bcousson
  Cc: tony, george.cherian, kishon, bigeasy, sergei.shtylyov,
	thomas.langer, linux-usb, linux-omap, linux-arm-kernel,
	devicetree, Roger Quadros

omap_get_control_dev() is being deprecated as it doesn't support
multiple instances. As control device is present only from OMAP4
onwards which supports DT only, we use phandles to get the
reference to the control device.

Also get rid of "ti,has-mailbox" property as it is redundant and
we can determine that from whether "ctrl-module" property is present
or not. Get rid of has_mailbox from musb_hdrc_platform_data as well.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 Documentation/devicetree/bindings/usb/omap-usb.txt |    4 ---
 drivers/usb/musb/omap2430.c                        |   25 +++++++++++--------
 include/linux/usb/musb.h                           |    2 -
 3 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt
index 6d8ab9c..f67573c 100644
--- a/Documentation/devicetree/bindings/usb/omap-usb.txt
+++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
@@ -3,9 +3,6 @@ OMAP GLUE AND OTHER OMAP SPECIFIC COMPONENTS
 OMAP MUSB GLUE
  - compatible : Should be "ti,omap4-musb" or "ti,omap3-musb"
  - ti,hwmods : must be "usb_otg_hs"
- - ti,has-mailbox : to specify that omap uses an external mailbox
-   (in control module) to communicate with the musb core during device connect
-   and disconnect.
  - multipoint : Should be "1" indicating the musb controller supports
    multipoint. This is a MUSB configuration-specific setting.
  - num-eps : Specifies the number of endpoints. This is also a
@@ -28,7 +25,6 @@ SOC specific device node entry
 usb_otg_hs: usb_otg_hs@4a0ab000 {
 	compatible = "ti,omap4-musb";
 	ti,hwmods = "usb_otg_hs";
-	ti,has-mailbox;
 	multipoint = <1>;
 	num-eps = <16>;
 	ram-bits = <12>;
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 59d2245..4512a05 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -38,6 +38,7 @@
 #include <linux/delay.h>
 #include <linux/usb/musb-omap.h>
 #include <linux/usb/omap_control_usb.h>
+#include <linux/of_platform.h>
 
 #include "musb_core.h"
 #include "omap2430.h"
@@ -509,8 +510,12 @@ static int omap2430_probe(struct platform_device *pdev)
 	glue->dev			= &pdev->dev;
 	glue->musb			= musb;
 	glue->status			= OMAP_MUSB_UNKNOWN;
+	glue->control_otghs = ERR_PTR(-ENODEV);
 
 	if (np) {
+		struct device_node *control_node;
+		struct platform_device *control_pdev;
+
 		pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
 		if (!pdata) {
 			dev_err(&pdev->dev,
@@ -539,22 +544,20 @@ static int omap2430_probe(struct platform_device *pdev)
 		of_property_read_u32(np, "ram-bits", (u32 *)&config->ram_bits);
 		of_property_read_u32(np, "power", (u32 *)&pdata->power);
 		config->multipoint = of_property_read_bool(np, "multipoint");
-		pdata->has_mailbox = of_property_read_bool(np,
-		    "ti,has-mailbox");
 
 		pdata->board_data	= data;
 		pdata->config		= config;
-	}
 
-	if (pdata->has_mailbox) {
-		glue->control_otghs = omap_get_control_dev();
-		if (IS_ERR(glue->control_otghs)) {
-			dev_vdbg(&pdev->dev, "Failed to get control device\n");
-			ret = PTR_ERR(glue->control_otghs);
-			goto err2;
+		control_node = of_parse_phandle(np, "ctrl-module", 0);
+		if (control_node) {
+			control_pdev = of_find_device_by_node(control_node);
+			if (!control_pdev) {
+				dev_err(&pdev->dev, "Failed to get control device\n");
+				ret = -EINVAL;
+				goto err2;
+			}
+			glue->control_otghs = &control_pdev->dev;
 		}
-	} else {
-		glue->control_otghs = ERR_PTR(-ENODEV);
 	}
 	pdata->platform_ops		= &omap2430_ops;
 
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
index 053c268..eb50525 100644
--- a/include/linux/usb/musb.h
+++ b/include/linux/usb/musb.h
@@ -99,8 +99,6 @@ struct musb_hdrc_platform_data {
 	/* MUSB_HOST, MUSB_PERIPHERAL, or MUSB_OTG */
 	u8		mode;
 
-	u8		has_mailbox:1;
-
 	/* for clk_get() */
 	const char	*clock;
 
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 05/10] usb: musb: omap2430: Don't use omap_get_control_dev()
@ 2013-09-18 12:48   ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:48 UTC (permalink / raw)
  To: linux-arm-kernel

omap_get_control_dev() is being deprecated as it doesn't support
multiple instances. As control device is present only from OMAP4
onwards which supports DT only, we use phandles to get the
reference to the control device.

Also get rid of "ti,has-mailbox" property as it is redundant and
we can determine that from whether "ctrl-module" property is present
or not. Get rid of has_mailbox from musb_hdrc_platform_data as well.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 Documentation/devicetree/bindings/usb/omap-usb.txt |    4 ---
 drivers/usb/musb/omap2430.c                        |   25 +++++++++++--------
 include/linux/usb/musb.h                           |    2 -
 3 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt
index 6d8ab9c..f67573c 100644
--- a/Documentation/devicetree/bindings/usb/omap-usb.txt
+++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
@@ -3,9 +3,6 @@ OMAP GLUE AND OTHER OMAP SPECIFIC COMPONENTS
 OMAP MUSB GLUE
  - compatible : Should be "ti,omap4-musb" or "ti,omap3-musb"
  - ti,hwmods : must be "usb_otg_hs"
- - ti,has-mailbox : to specify that omap uses an external mailbox
-   (in control module) to communicate with the musb core during device connect
-   and disconnect.
  - multipoint : Should be "1" indicating the musb controller supports
    multipoint. This is a MUSB configuration-specific setting.
  - num-eps : Specifies the number of endpoints. This is also a
@@ -28,7 +25,6 @@ SOC specific device node entry
 usb_otg_hs: usb_otg_hs at 4a0ab000 {
 	compatible = "ti,omap4-musb";
 	ti,hwmods = "usb_otg_hs";
-	ti,has-mailbox;
 	multipoint = <1>;
 	num-eps = <16>;
 	ram-bits = <12>;
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 59d2245..4512a05 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -38,6 +38,7 @@
 #include <linux/delay.h>
 #include <linux/usb/musb-omap.h>
 #include <linux/usb/omap_control_usb.h>
+#include <linux/of_platform.h>
 
 #include "musb_core.h"
 #include "omap2430.h"
@@ -509,8 +510,12 @@ static int omap2430_probe(struct platform_device *pdev)
 	glue->dev			= &pdev->dev;
 	glue->musb			= musb;
 	glue->status			= OMAP_MUSB_UNKNOWN;
+	glue->control_otghs = ERR_PTR(-ENODEV);
 
 	if (np) {
+		struct device_node *control_node;
+		struct platform_device *control_pdev;
+
 		pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
 		if (!pdata) {
 			dev_err(&pdev->dev,
@@ -539,22 +544,20 @@ static int omap2430_probe(struct platform_device *pdev)
 		of_property_read_u32(np, "ram-bits", (u32 *)&config->ram_bits);
 		of_property_read_u32(np, "power", (u32 *)&pdata->power);
 		config->multipoint = of_property_read_bool(np, "multipoint");
-		pdata->has_mailbox = of_property_read_bool(np,
-		    "ti,has-mailbox");
 
 		pdata->board_data	= data;
 		pdata->config		= config;
-	}
 
-	if (pdata->has_mailbox) {
-		glue->control_otghs = omap_get_control_dev();
-		if (IS_ERR(glue->control_otghs)) {
-			dev_vdbg(&pdev->dev, "Failed to get control device\n");
-			ret = PTR_ERR(glue->control_otghs);
-			goto err2;
+		control_node = of_parse_phandle(np, "ctrl-module", 0);
+		if (control_node) {
+			control_pdev = of_find_device_by_node(control_node);
+			if (!control_pdev) {
+				dev_err(&pdev->dev, "Failed to get control device\n");
+				ret = -EINVAL;
+				goto err2;
+			}
+			glue->control_otghs = &control_pdev->dev;
 		}
-	} else {
-		glue->control_otghs = ERR_PTR(-ENODEV);
 	}
 	pdata->platform_ops		= &omap2430_ops;
 
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
index 053c268..eb50525 100644
--- a/include/linux/usb/musb.h
+++ b/include/linux/usb/musb.h
@@ -99,8 +99,6 @@ struct musb_hdrc_platform_data {
 	/* MUSB_HOST, MUSB_PERIPHERAL, or MUSB_OTG */
 	u8		mode;
 
-	u8		has_mailbox:1;
-
 	/* for clk_get() */
 	const char	*clock;
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 06/10] ARM: dts: omap4: update omap-control-usb nodes
  2013-09-18 12:48 ` Roger Quadros
@ 2013-09-18 12:48     ` Roger Quadros
  -1 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:48 UTC (permalink / raw)
  To: balbi-l0cyMroinI0, bcousson-rdvid1DuHRBWk0Htik3J/w
  Cc: tony-4v6yS6AI5VpBDgjK7y7TUQ, george.cherian-l0cyMroinI0,
	kishon-l0cyMroinI0, bigeasy-hfZtesqFncYOwBW4kG4KsQ,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	thomas.langer-th3ZBGNqt+7QT0dZR+AlfA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Roger Quadros

Split otghs_ctrl and USB2 PHY power-down into separate
omap-control-usb nodes. Get rid of "ti,type" property.

Also get rid of "ti,has-mailbox" property from usb_otg_hs
node and provide the ctrl-module phandle.

CC: Benoit Cousson <bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
 arch/arm/boot/dts/omap4.dtsi |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 22d9f2b..ca6400d 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -519,7 +519,7 @@
 			usb2_phy: usb2phy@4a0ad080 {
 				compatible = "ti,omap-usb2";
 				reg = <0x4a0ad080 0x58>;
-				ctrl-module = <&omap_control_usb>;
+				ctrl-module = <&omap_control_usb2phy>;
 			};
 		};
 
@@ -643,12 +643,16 @@
 			};
 		};
 
-		omap_control_usb: omap-control-usb@4a002300 {
-			compatible = "ti,omap-control-usb";
-			reg = <0x4a002300 0x4>,
-			      <0x4a00233c 0x4>;
-			reg-names = "control_dev_conf", "otghs_control";
-			ti,type = <1>;
+		omap_control_usb2phy: control-phy@4a002300 {
+			compatible = "ti,control-phy-usb2";
+			reg = <0x4a002300 0x4>;
+			reg-names = "power";
+		};
+
+		omap_control_usbotg: control-phy@4a00233c {
+			compatible = "ti,control-phy-otghs";
+			reg = <0x4a00233c 0x4>;
+			reg-names = "otghs_control";
 		};
 
 		usb_otg_hs: usb_otg_hs@4a0ab000 {
@@ -661,7 +665,7 @@
 			multipoint = <1>;
 			num-eps = <16>;
 			ram-bits = <12>;
-			ti,has-mailbox;
+			ctrl-module = <&omap_control_usbotg>;
 		};
 	};
 };
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 06/10] ARM: dts: omap4: update omap-control-usb nodes
@ 2013-09-18 12:48     ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:48 UTC (permalink / raw)
  To: linux-arm-kernel

Split otghs_ctrl and USB2 PHY power-down into separate
omap-control-usb nodes. Get rid of "ti,type" property.

Also get rid of "ti,has-mailbox" property from usb_otg_hs
node and provide the ctrl-module phandle.

CC: Benoit Cousson <bcousson@baylibre.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 arch/arm/boot/dts/omap4.dtsi |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 22d9f2b..ca6400d 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -519,7 +519,7 @@
 			usb2_phy: usb2phy at 4a0ad080 {
 				compatible = "ti,omap-usb2";
 				reg = <0x4a0ad080 0x58>;
-				ctrl-module = <&omap_control_usb>;
+				ctrl-module = <&omap_control_usb2phy>;
 			};
 		};
 
@@ -643,12 +643,16 @@
 			};
 		};
 
-		omap_control_usb: omap-control-usb at 4a002300 {
-			compatible = "ti,omap-control-usb";
-			reg = <0x4a002300 0x4>,
-			      <0x4a00233c 0x4>;
-			reg-names = "control_dev_conf", "otghs_control";
-			ti,type = <1>;
+		omap_control_usb2phy: control-phy at 4a002300 {
+			compatible = "ti,control-phy-usb2";
+			reg = <0x4a002300 0x4>;
+			reg-names = "power";
+		};
+
+		omap_control_usbotg: control-phy at 4a00233c {
+			compatible = "ti,control-phy-otghs";
+			reg = <0x4a00233c 0x4>;
+			reg-names = "otghs_control";
 		};
 
 		usb_otg_hs: usb_otg_hs at 4a0ab000 {
@@ -661,7 +665,7 @@
 			multipoint = <1>;
 			num-eps = <16>;
 			ram-bits = <12>;
-			ti,has-mailbox;
+			ctrl-module = <&omap_control_usbotg>;
 		};
 	};
 };
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 07/10] usb: phy: omap: get rid of omap_get_control_dev()
  2013-09-18 12:48 ` Roger Quadros
@ 2013-09-18 12:48   ` Roger Quadros
  -1 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:48 UTC (permalink / raw)
  To: balbi, bcousson
  Cc: devicetree, george.cherian, sergei.shtylyov, tony, bigeasy,
	linux-usb, kishon, thomas.langer, linux-omap, linux-arm-kernel,
	Roger Quadros

This function was preventing us from supporting multiple
instances. Get rid of it. Since we support DT boots only,
users can get the control device phandle from the DT node.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/usb/phy/phy-omap-control.c   |   31 ++++++++++---------------------
 include/linux/usb/omap_control_usb.h |    5 -----
 2 files changed, 10 insertions(+), 26 deletions(-)

diff --git a/drivers/usb/phy/phy-omap-control.c b/drivers/usb/phy/phy-omap-control.c
index 1c8a7c5..09c5ace 100644
--- a/drivers/usb/phy/phy-omap-control.c
+++ b/drivers/usb/phy/phy-omap-control.c
@@ -26,26 +26,6 @@
 #include <linux/clk.h>
 #include <linux/usb/omap_control_usb.h>
 
-static struct omap_control_usb *control_usb;
-
-/**
- * omap_get_control_dev - returns the device pointer for this control device
- *
- * This API should be called to get the device pointer for this control
- * module device. This device pointer should be used for called other
- * exported API's in this driver.
- *
- * To be used by PHY driver and glue driver.
- */
-struct device *omap_get_control_dev(void)
-{
-	if (!control_usb)
-		return ERR_PTR(-ENODEV);
-
-	return control_usb->dev;
-}
-EXPORT_SYMBOL_GPL(omap_get_control_dev);
-
 /**
  * omap_control_usb_phy_power - power on/off the phy using control module reg
  * @dev: the control module device
@@ -182,11 +162,19 @@ void omap_control_usb_set_mode(struct device *dev,
 {
 	struct omap_control_usb	*ctrl_usb;
 
-	if (IS_ERR(dev) || control_usb->type != OMAP_CTRL_TYPE_OTGHS)
+	if (IS_ERR(dev) || !dev)
 		return;
 
 	ctrl_usb = dev_get_drvdata(dev);
 
+	if (!ctrl_usb) {
+		dev_err(dev, "Invalid control usb device\n");
+		return;
+	}
+
+	if (ctrl_usb->type != OMAP_CTRL_TYPE_OTGHS)
+		return;
+
 	switch (mode) {
 	case USB_MODE_HOST:
 		omap_control_usb_host_mode(ctrl_usb);
@@ -237,6 +225,7 @@ static int omap_control_usb_probe(struct platform_device *pdev)
 {
 	struct resource	*res;
 	const struct of_device_id *of_id;
+	struct omap_control_usb *control_usb;
 
 	of_id = of_match_device(of_match_ptr(omap_control_usb_id_table),
 								&pdev->dev);
diff --git a/include/linux/usb/omap_control_usb.h b/include/linux/usb/omap_control_usb.h
index 61b889a..596b019 100644
--- a/include/linux/usb/omap_control_usb.h
+++ b/include/linux/usb/omap_control_usb.h
@@ -65,15 +65,10 @@ enum omap_control_usb_mode {
 #define OMAP_CTRL_USB2_PHY_PD		BIT(28)
 
 #if IS_ENABLED(CONFIG_OMAP_CONTROL_USB)
-extern struct device *omap_get_control_dev(void);
 extern void omap_control_usb_phy_power(struct device *dev, int on);
 extern void omap_control_usb_set_mode(struct device *dev,
 	enum omap_control_usb_mode mode);
 #else
-static inline struct device *omap_get_control_dev(void)
-{
-	return ERR_PTR(-ENODEV);
-}
 
 static inline void omap_control_usb_phy_power(struct device *dev, int on)
 {
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 07/10] usb: phy: omap: get rid of omap_get_control_dev()
@ 2013-09-18 12:48   ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:48 UTC (permalink / raw)
  To: linux-arm-kernel

This function was preventing us from supporting multiple
instances. Get rid of it. Since we support DT boots only,
users can get the control device phandle from the DT node.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/usb/phy/phy-omap-control.c   |   31 ++++++++++---------------------
 include/linux/usb/omap_control_usb.h |    5 -----
 2 files changed, 10 insertions(+), 26 deletions(-)

diff --git a/drivers/usb/phy/phy-omap-control.c b/drivers/usb/phy/phy-omap-control.c
index 1c8a7c5..09c5ace 100644
--- a/drivers/usb/phy/phy-omap-control.c
+++ b/drivers/usb/phy/phy-omap-control.c
@@ -26,26 +26,6 @@
 #include <linux/clk.h>
 #include <linux/usb/omap_control_usb.h>
 
-static struct omap_control_usb *control_usb;
-
-/**
- * omap_get_control_dev - returns the device pointer for this control device
- *
- * This API should be called to get the device pointer for this control
- * module device. This device pointer should be used for called other
- * exported API's in this driver.
- *
- * To be used by PHY driver and glue driver.
- */
-struct device *omap_get_control_dev(void)
-{
-	if (!control_usb)
-		return ERR_PTR(-ENODEV);
-
-	return control_usb->dev;
-}
-EXPORT_SYMBOL_GPL(omap_get_control_dev);
-
 /**
  * omap_control_usb_phy_power - power on/off the phy using control module reg
  * @dev: the control module device
@@ -182,11 +162,19 @@ void omap_control_usb_set_mode(struct device *dev,
 {
 	struct omap_control_usb	*ctrl_usb;
 
-	if (IS_ERR(dev) || control_usb->type != OMAP_CTRL_TYPE_OTGHS)
+	if (IS_ERR(dev) || !dev)
 		return;
 
 	ctrl_usb = dev_get_drvdata(dev);
 
+	if (!ctrl_usb) {
+		dev_err(dev, "Invalid control usb device\n");
+		return;
+	}
+
+	if (ctrl_usb->type != OMAP_CTRL_TYPE_OTGHS)
+		return;
+
 	switch (mode) {
 	case USB_MODE_HOST:
 		omap_control_usb_host_mode(ctrl_usb);
@@ -237,6 +225,7 @@ static int omap_control_usb_probe(struct platform_device *pdev)
 {
 	struct resource	*res;
 	const struct of_device_id *of_id;
+	struct omap_control_usb *control_usb;
 
 	of_id = of_match_device(of_match_ptr(omap_control_usb_id_table),
 								&pdev->dev);
diff --git a/include/linux/usb/omap_control_usb.h b/include/linux/usb/omap_control_usb.h
index 61b889a..596b019 100644
--- a/include/linux/usb/omap_control_usb.h
+++ b/include/linux/usb/omap_control_usb.h
@@ -65,15 +65,10 @@ enum omap_control_usb_mode {
 #define OMAP_CTRL_USB2_PHY_PD		BIT(28)
 
 #if IS_ENABLED(CONFIG_OMAP_CONTROL_USB)
-extern struct device *omap_get_control_dev(void);
 extern void omap_control_usb_phy_power(struct device *dev, int on);
 extern void omap_control_usb_set_mode(struct device *dev,
 	enum omap_control_usb_mode mode);
 #else
-static inline struct device *omap_get_control_dev(void)
-{
-	return ERR_PTR(-ENODEV);
-}
 
 static inline void omap_control_usb_phy_power(struct device *dev, int on)
 {
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 08/10] ARM: dts: omap5: update omap-control-usb node
  2013-09-18 12:48 ` Roger Quadros
@ 2013-09-18 12:49     ` Roger Quadros
  -1 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:49 UTC (permalink / raw)
  To: balbi-l0cyMroinI0, bcousson-rdvid1DuHRBWk0Htik3J/w
  Cc: tony-4v6yS6AI5VpBDgjK7y7TUQ, george.cherian-l0cyMroinI0,
	kishon-l0cyMroinI0, bigeasy-hfZtesqFncYOwBW4kG4KsQ,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	thomas.langer-th3ZBGNqt+7QT0dZR+AlfA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Roger Quadros

Split USB2 PHY and USB3 PHY into separate omap-control-usb
nodes. Get rid of "ti,type" property.

CC: Benoit Cousson <bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
 arch/arm/boot/dts/omap5.dtsi |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 07be2cd..e69cc57 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -626,12 +626,16 @@
 			hw-caps-temp-alert;
 		};
 
-		omap_control_usb: omap-control-usb@4a002300 {
-			compatible = "ti,omap-control-usb";
-			reg = <0x4a002300 0x4>,
-			      <0x4a002370 0x4>;
-			reg-names = "control_dev_conf", "phy_power_usb";
-			ti,type = <2>;
+		omap_control_usb2phy: control-phy@4a002300 {
+			compatible = "ti,control-phy-usb2";
+			reg = <0x4a002300 0x4>;
+			reg-names = "power";
+		};
+
+		omap_control_usb3phy: control-phy@4a002370 {
+			compatible = "ti,control-phy-pipe3";
+			reg = <0x4a002370 0x4>;
+			reg-names = "power";
 		};
 
 		omap_dwc3@4a020000 {
@@ -661,7 +665,7 @@
 			usb2_phy: usb2phy@4a084000 {
 				compatible = "ti,omap-usb2";
 				reg = <0x4a084000 0x7c>;
-				ctrl-module = <&omap_control_usb>;
+				ctrl-module = <&omap_control_usb2phy>;
 			};
 
 			usb3_phy: usb3phy@4a084400 {
@@ -670,7 +674,7 @@
 				      <0x4a084800 0x64>,
 				      <0x4a084c00 0x40>;
 				reg-names = "phy_rx", "phy_tx", "pll_ctrl";
-				ctrl-module = <&omap_control_usb>;
+				ctrl-module = <&omap_control_usb3phy>;
 			};
 		};
 
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 08/10] ARM: dts: omap5: update omap-control-usb node
@ 2013-09-18 12:49     ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:49 UTC (permalink / raw)
  To: linux-arm-kernel

Split USB2 PHY and USB3 PHY into separate omap-control-usb
nodes. Get rid of "ti,type" property.

CC: Benoit Cousson <bcousson@baylibre.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 arch/arm/boot/dts/omap5.dtsi |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 07be2cd..e69cc57 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -626,12 +626,16 @@
 			hw-caps-temp-alert;
 		};
 
-		omap_control_usb: omap-control-usb at 4a002300 {
-			compatible = "ti,omap-control-usb";
-			reg = <0x4a002300 0x4>,
-			      <0x4a002370 0x4>;
-			reg-names = "control_dev_conf", "phy_power_usb";
-			ti,type = <2>;
+		omap_control_usb2phy: control-phy at 4a002300 {
+			compatible = "ti,control-phy-usb2";
+			reg = <0x4a002300 0x4>;
+			reg-names = "power";
+		};
+
+		omap_control_usb3phy: control-phy at 4a002370 {
+			compatible = "ti,control-phy-pipe3";
+			reg = <0x4a002370 0x4>;
+			reg-names = "power";
 		};
 
 		omap_dwc3 at 4a020000 {
@@ -661,7 +665,7 @@
 			usb2_phy: usb2phy at 4a084000 {
 				compatible = "ti,omap-usb2";
 				reg = <0x4a084000 0x7c>;
-				ctrl-module = <&omap_control_usb>;
+				ctrl-module = <&omap_control_usb2phy>;
 			};
 
 			usb3_phy: usb3phy at 4a084400 {
@@ -670,7 +674,7 @@
 				      <0x4a084800 0x64>,
 				      <0x4a084c00 0x40>;
 				reg-names = "phy_rx", "phy_tx", "pll_ctrl";
-				ctrl-module = <&omap_control_usb>;
+				ctrl-module = <&omap_control_usb3phy>;
 			};
 		};
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
  2013-09-18 12:48 ` Roger Quadros
@ 2013-09-18 12:49     ` Roger Quadros
  -1 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:49 UTC (permalink / raw)
  To: balbi-l0cyMroinI0, bcousson-rdvid1DuHRBWk0Htik3J/w
  Cc: tony-4v6yS6AI5VpBDgjK7y7TUQ, george.cherian-l0cyMroinI0,
	kishon-l0cyMroinI0, bigeasy-hfZtesqFncYOwBW4kG4KsQ,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	thomas.langer-th3ZBGNqt+7QT0dZR+AlfA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Roger Quadros

"usb_otg_ss_refclk960m" is an optional functional clock to the
UBS_OTG_SS module. So manage it in the driver.

Also update device tree binding information.

Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
 Documentation/devicetree/bindings/usb/omap-usb.txt |    4 ++++
 drivers/usb/dwc3/dwc3-omap.c                       |   13 +++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt
index f67573c..47c8530 100644
--- a/Documentation/devicetree/bindings/usb/omap-usb.txt
+++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
@@ -47,6 +47,8 @@ OMAP DWC3 GLUE
  - #address-cells, #size-cells : Must be present if the device has sub-nodes
  - utmi-mode : controls the source of UTMI/PIPE status for VBUS and OTG ID.
    It should be set to "1" for HW mode and "2" for SW mode.
+ - clock : should refer to the clock node that provides 960MHz functional clock.
+ - clock-names : should be "usb_otg_ss_refclk960m"
  - ranges: the child address space are mapped 1:1 onto the parent address space
 
 Optional Properties:
@@ -68,6 +70,8 @@ omap_dwc3 {
 	#address-cells = <1>;
 	#size-cells = <1>;
 	utmi-mode = <2>;
+	clocks = <&usb_otg_ss1_refclk960m>;
+	clock-names = "usb_otg_ss_refclk960m";
 	ranges;
 };
 
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index 7f7ea62..c33b26c 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -32,6 +32,7 @@
 #include <linux/extcon.h>
 #include <linux/extcon/of_extcon.h>
 #include <linux/regulator/consumer.h>
+#include <linux/clk.h>
 
 #include <linux/usb/otg.h>
 
@@ -119,6 +120,8 @@
 #define USBOTGSS_UTMI_OTG_STATUS_SESSVALID	(1 << 2)
 #define USBOTGSS_UTMI_OTG_STATUS_VBUSVALID	(1 << 1)
 
+#define USBOTGSS_REFCLK "usb_otg_ss_refclk960m"
+
 struct dwc3_omap {
 	/* device lock */
 	spinlock_t		lock;
@@ -144,6 +147,7 @@ struct dwc3_omap {
 	struct notifier_block	id_nb;
 
 	struct regulator	*vbus_reg;
+	struct clk		*refclk;
 };
 
 enum omap_dwc3_vbus_id_status {
@@ -449,6 +453,12 @@ static int dwc3_omap_probe(struct platform_device *pdev)
 		}
 	}
 
+	omap->refclk = devm_clk_get(dev, USBOTGSS_REFCLK);
+	if (IS_ERR(omap->refclk)) {
+		dev_err(dev, "couldn't get %s\n", USBOTGSS_REFCLK);
+		return PTR_ERR(omap->refclk);
+	}
+
 	spin_lock_init(&omap->lock);
 
 	omap->dev	= dev;
@@ -464,6 +474,8 @@ static int dwc3_omap_probe(struct platform_device *pdev)
 		goto err0;
 	}
 
+	clk_prepare_enable(omap->refclk);
+
 	reg = dwc3_omap_readl(omap->base, USBOTGSS_REVISION);
 	omap->revision = reg;
 	x_major = USBOTGSS_REVISION_XMAJOR(reg);
@@ -593,6 +605,7 @@ static int dwc3_omap_remove(struct platform_device *pdev)
 		extcon_unregister_interest(&omap->extcon_id_dev);
 	dwc3_omap_disable_irqs(omap);
 	pm_runtime_put_sync(&pdev->dev);
+	clk_disable_unprepare(omap->refclk);
 	pm_runtime_disable(&pdev->dev);
 	device_for_each_child(&pdev->dev, NULL, dwc3_omap_remove_core);
 
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
@ 2013-09-18 12:49     ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:49 UTC (permalink / raw)
  To: linux-arm-kernel

"usb_otg_ss_refclk960m" is an optional functional clock to the
UBS_OTG_SS module. So manage it in the driver.

Also update device tree binding information.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 Documentation/devicetree/bindings/usb/omap-usb.txt |    4 ++++
 drivers/usb/dwc3/dwc3-omap.c                       |   13 +++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt
index f67573c..47c8530 100644
--- a/Documentation/devicetree/bindings/usb/omap-usb.txt
+++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
@@ -47,6 +47,8 @@ OMAP DWC3 GLUE
  - #address-cells, #size-cells : Must be present if the device has sub-nodes
  - utmi-mode : controls the source of UTMI/PIPE status for VBUS and OTG ID.
    It should be set to "1" for HW mode and "2" for SW mode.
+ - clock : should refer to the clock node that provides 960MHz functional clock.
+ - clock-names : should be "usb_otg_ss_refclk960m"
  - ranges: the child address space are mapped 1:1 onto the parent address space
 
 Optional Properties:
@@ -68,6 +70,8 @@ omap_dwc3 {
 	#address-cells = <1>;
 	#size-cells = <1>;
 	utmi-mode = <2>;
+	clocks = <&usb_otg_ss1_refclk960m>;
+	clock-names = "usb_otg_ss_refclk960m";
 	ranges;
 };
 
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index 7f7ea62..c33b26c 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -32,6 +32,7 @@
 #include <linux/extcon.h>
 #include <linux/extcon/of_extcon.h>
 #include <linux/regulator/consumer.h>
+#include <linux/clk.h>
 
 #include <linux/usb/otg.h>
 
@@ -119,6 +120,8 @@
 #define USBOTGSS_UTMI_OTG_STATUS_SESSVALID	(1 << 2)
 #define USBOTGSS_UTMI_OTG_STATUS_VBUSVALID	(1 << 1)
 
+#define USBOTGSS_REFCLK "usb_otg_ss_refclk960m"
+
 struct dwc3_omap {
 	/* device lock */
 	spinlock_t		lock;
@@ -144,6 +147,7 @@ struct dwc3_omap {
 	struct notifier_block	id_nb;
 
 	struct regulator	*vbus_reg;
+	struct clk		*refclk;
 };
 
 enum omap_dwc3_vbus_id_status {
@@ -449,6 +453,12 @@ static int dwc3_omap_probe(struct platform_device *pdev)
 		}
 	}
 
+	omap->refclk = devm_clk_get(dev, USBOTGSS_REFCLK);
+	if (IS_ERR(omap->refclk)) {
+		dev_err(dev, "couldn't get %s\n", USBOTGSS_REFCLK);
+		return PTR_ERR(omap->refclk);
+	}
+
 	spin_lock_init(&omap->lock);
 
 	omap->dev	= dev;
@@ -464,6 +474,8 @@ static int dwc3_omap_probe(struct platform_device *pdev)
 		goto err0;
 	}
 
+	clk_prepare_enable(omap->refclk);
+
 	reg = dwc3_omap_readl(omap->base, USBOTGSS_REVISION);
 	omap->revision = reg;
 	x_major = USBOTGSS_REVISION_XMAJOR(reg);
@@ -593,6 +605,7 @@ static int dwc3_omap_remove(struct platform_device *pdev)
 		extcon_unregister_interest(&omap->extcon_id_dev);
 	dwc3_omap_disable_irqs(omap);
 	pm_runtime_put_sync(&pdev->dev);
+	clk_disable_unprepare(omap->refclk);
 	pm_runtime_disable(&pdev->dev);
 	device_for_each_child(&pdev->dev, NULL, dwc3_omap_remove_core);
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 10/10] usb: phy: omap-usb2: Manage phy clock and not otg controller clock
  2013-09-18 12:48 ` Roger Quadros
@ 2013-09-18 12:49     ` Roger Quadros
  -1 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:49 UTC (permalink / raw)
  To: balbi-l0cyMroinI0, bcousson-rdvid1DuHRBWk0Htik3J/w
  Cc: tony-4v6yS6AI5VpBDgjK7y7TUQ, george.cherian-l0cyMroinI0,
	kishon-l0cyMroinI0, bigeasy-hfZtesqFncYOwBW4kG4KsQ,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	thomas.langer-th3ZBGNqt+7QT0dZR+AlfA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Roger Quadros

The OTG_SS controller driver manages the OTG_SS clock. The phy driver
needs to manage the PHY's functional clock. So correct the clock name.

Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
 drivers/usb/phy/phy-omap-usb2.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/phy/phy-omap-usb2.c b/drivers/usb/phy/phy-omap-usb2.c
index e7d4790..0fab250 100644
--- a/drivers/usb/phy/phy-omap-usb2.c
+++ b/drivers/usb/phy/phy-omap-usb2.c
@@ -179,9 +179,9 @@ static int omap_usb2_probe(struct platform_device *pdev)
 	}
 	clk_prepare(phy->wkupclk);
 
-	phy->optclk = devm_clk_get(phy->dev, "usb_otg_ss_refclk960m");
+	phy->optclk = devm_clk_get(phy->dev, "usb_phy_refclk960m");
 	if (IS_ERR(phy->optclk))
-		dev_vdbg(&pdev->dev, "unable to get refclk960m\n");
+		dev_dbg(&pdev->dev, "unable to get refclk960m\n");
 	else
 		clk_prepare(phy->optclk);
 
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v7 10/10] usb: phy: omap-usb2: Manage phy clock and not otg controller clock
@ 2013-09-18 12:49     ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-18 12:49 UTC (permalink / raw)
  To: linux-arm-kernel

The OTG_SS controller driver manages the OTG_SS clock. The phy driver
needs to manage the PHY's functional clock. So correct the clock name.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/usb/phy/phy-omap-usb2.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/phy/phy-omap-usb2.c b/drivers/usb/phy/phy-omap-usb2.c
index e7d4790..0fab250 100644
--- a/drivers/usb/phy/phy-omap-usb2.c
+++ b/drivers/usb/phy/phy-omap-usb2.c
@@ -179,9 +179,9 @@ static int omap_usb2_probe(struct platform_device *pdev)
 	}
 	clk_prepare(phy->wkupclk);
 
-	phy->optclk = devm_clk_get(phy->dev, "usb_otg_ss_refclk960m");
+	phy->optclk = devm_clk_get(phy->dev, "usb_phy_refclk960m");
 	if (IS_ERR(phy->optclk))
-		dev_vdbg(&pdev->dev, "unable to get refclk960m\n");
+		dev_dbg(&pdev->dev, "unable to get refclk960m\n");
 	else
 		clk_prepare(phy->optclk);
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 40+ messages in thread

* Re: [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
  2013-09-18 12:49     ` Roger Quadros
@ 2013-09-23 13:11         ` Roger Quadros
  -1 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-23 13:11 UTC (permalink / raw)
  To: balbi-l0cyMroinI0
  Cc: Roger Quadros, bcousson-rdvid1DuHRBWk0Htik3J/w,
	tony-4v6yS6AI5VpBDgjK7y7TUQ, george.cherian-l0cyMroinI0,
	kishon-l0cyMroinI0, bigeasy-hfZtesqFncYOwBW4kG4KsQ,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	thomas.langer-th3ZBGNqt+7QT0dZR+AlfA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi Felipe,

On 09/18/2013 03:49 PM, Roger Quadros wrote:
> "usb_otg_ss_refclk960m" is an optional functional clock to the
> UBS_OTG_SS module. So manage it in the driver.
> 

Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
PHY and not USB_OTG_SS module. The name is misleading.

So please ignore patch 9 and 10.

cheers,
-roger


> Also update device tree binding information.
> 
> Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
> ---
>  Documentation/devicetree/bindings/usb/omap-usb.txt |    4 ++++
>  drivers/usb/dwc3/dwc3-omap.c                       |   13 +++++++++++++
>  2 files changed, 17 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt
> index f67573c..47c8530 100644
> --- a/Documentation/devicetree/bindings/usb/omap-usb.txt
> +++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
> @@ -47,6 +47,8 @@ OMAP DWC3 GLUE
>   - #address-cells, #size-cells : Must be present if the device has sub-nodes
>   - utmi-mode : controls the source of UTMI/PIPE status for VBUS and OTG ID.
>     It should be set to "1" for HW mode and "2" for SW mode.
> + - clock : should refer to the clock node that provides 960MHz functional clock.
> + - clock-names : should be "usb_otg_ss_refclk960m"
>   - ranges: the child address space are mapped 1:1 onto the parent address space
>  
>  Optional Properties:
> @@ -68,6 +70,8 @@ omap_dwc3 {
>  	#address-cells = <1>;
>  	#size-cells = <1>;
>  	utmi-mode = <2>;
> +	clocks = <&usb_otg_ss1_refclk960m>;
> +	clock-names = "usb_otg_ss_refclk960m";
>  	ranges;
>  };
>  
> diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
> index 7f7ea62..c33b26c 100644
> --- a/drivers/usb/dwc3/dwc3-omap.c
> +++ b/drivers/usb/dwc3/dwc3-omap.c
> @@ -32,6 +32,7 @@
>  #include <linux/extcon.h>
>  #include <linux/extcon/of_extcon.h>
>  #include <linux/regulator/consumer.h>
> +#include <linux/clk.h>
>  
>  #include <linux/usb/otg.h>
>  
> @@ -119,6 +120,8 @@
>  #define USBOTGSS_UTMI_OTG_STATUS_SESSVALID	(1 << 2)
>  #define USBOTGSS_UTMI_OTG_STATUS_VBUSVALID	(1 << 1)
>  
> +#define USBOTGSS_REFCLK "usb_otg_ss_refclk960m"
> +
>  struct dwc3_omap {
>  	/* device lock */
>  	spinlock_t		lock;
> @@ -144,6 +147,7 @@ struct dwc3_omap {
>  	struct notifier_block	id_nb;
>  
>  	struct regulator	*vbus_reg;
> +	struct clk		*refclk;
>  };
>  
>  enum omap_dwc3_vbus_id_status {
> @@ -449,6 +453,12 @@ static int dwc3_omap_probe(struct platform_device *pdev)
>  		}
>  	}
>  
> +	omap->refclk = devm_clk_get(dev, USBOTGSS_REFCLK);
> +	if (IS_ERR(omap->refclk)) {
> +		dev_err(dev, "couldn't get %s\n", USBOTGSS_REFCLK);
> +		return PTR_ERR(omap->refclk);
> +	}
> +
>  	spin_lock_init(&omap->lock);
>  
>  	omap->dev	= dev;
> @@ -464,6 +474,8 @@ static int dwc3_omap_probe(struct platform_device *pdev)
>  		goto err0;
>  	}
>  
> +	clk_prepare_enable(omap->refclk);
> +
>  	reg = dwc3_omap_readl(omap->base, USBOTGSS_REVISION);
>  	omap->revision = reg;
>  	x_major = USBOTGSS_REVISION_XMAJOR(reg);
> @@ -593,6 +605,7 @@ static int dwc3_omap_remove(struct platform_device *pdev)
>  		extcon_unregister_interest(&omap->extcon_id_dev);
>  	dwc3_omap_disable_irqs(omap);
>  	pm_runtime_put_sync(&pdev->dev);
> +	clk_disable_unprepare(omap->refclk);
>  	pm_runtime_disable(&pdev->dev);
>  	device_for_each_child(&pdev->dev, NULL, dwc3_omap_remove_core);
>  
> 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
@ 2013-09-23 13:11         ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-09-23 13:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Felipe,

On 09/18/2013 03:49 PM, Roger Quadros wrote:
> "usb_otg_ss_refclk960m" is an optional functional clock to the
> UBS_OTG_SS module. So manage it in the driver.
> 

Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
PHY and not USB_OTG_SS module. The name is misleading.

So please ignore patch 9 and 10.

cheers,
-roger


> Also update device tree binding information.
> 
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> ---
>  Documentation/devicetree/bindings/usb/omap-usb.txt |    4 ++++
>  drivers/usb/dwc3/dwc3-omap.c                       |   13 +++++++++++++
>  2 files changed, 17 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt
> index f67573c..47c8530 100644
> --- a/Documentation/devicetree/bindings/usb/omap-usb.txt
> +++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
> @@ -47,6 +47,8 @@ OMAP DWC3 GLUE
>   - #address-cells, #size-cells : Must be present if the device has sub-nodes
>   - utmi-mode : controls the source of UTMI/PIPE status for VBUS and OTG ID.
>     It should be set to "1" for HW mode and "2" for SW mode.
> + - clock : should refer to the clock node that provides 960MHz functional clock.
> + - clock-names : should be "usb_otg_ss_refclk960m"
>   - ranges: the child address space are mapped 1:1 onto the parent address space
>  
>  Optional Properties:
> @@ -68,6 +70,8 @@ omap_dwc3 {
>  	#address-cells = <1>;
>  	#size-cells = <1>;
>  	utmi-mode = <2>;
> +	clocks = <&usb_otg_ss1_refclk960m>;
> +	clock-names = "usb_otg_ss_refclk960m";
>  	ranges;
>  };
>  
> diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
> index 7f7ea62..c33b26c 100644
> --- a/drivers/usb/dwc3/dwc3-omap.c
> +++ b/drivers/usb/dwc3/dwc3-omap.c
> @@ -32,6 +32,7 @@
>  #include <linux/extcon.h>
>  #include <linux/extcon/of_extcon.h>
>  #include <linux/regulator/consumer.h>
> +#include <linux/clk.h>
>  
>  #include <linux/usb/otg.h>
>  
> @@ -119,6 +120,8 @@
>  #define USBOTGSS_UTMI_OTG_STATUS_SESSVALID	(1 << 2)
>  #define USBOTGSS_UTMI_OTG_STATUS_VBUSVALID	(1 << 1)
>  
> +#define USBOTGSS_REFCLK "usb_otg_ss_refclk960m"
> +
>  struct dwc3_omap {
>  	/* device lock */
>  	spinlock_t		lock;
> @@ -144,6 +147,7 @@ struct dwc3_omap {
>  	struct notifier_block	id_nb;
>  
>  	struct regulator	*vbus_reg;
> +	struct clk		*refclk;
>  };
>  
>  enum omap_dwc3_vbus_id_status {
> @@ -449,6 +453,12 @@ static int dwc3_omap_probe(struct platform_device *pdev)
>  		}
>  	}
>  
> +	omap->refclk = devm_clk_get(dev, USBOTGSS_REFCLK);
> +	if (IS_ERR(omap->refclk)) {
> +		dev_err(dev, "couldn't get %s\n", USBOTGSS_REFCLK);
> +		return PTR_ERR(omap->refclk);
> +	}
> +
>  	spin_lock_init(&omap->lock);
>  
>  	omap->dev	= dev;
> @@ -464,6 +474,8 @@ static int dwc3_omap_probe(struct platform_device *pdev)
>  		goto err0;
>  	}
>  
> +	clk_prepare_enable(omap->refclk);
> +
>  	reg = dwc3_omap_readl(omap->base, USBOTGSS_REVISION);
>  	omap->revision = reg;
>  	x_major = USBOTGSS_REVISION_XMAJOR(reg);
> @@ -593,6 +605,7 @@ static int dwc3_omap_remove(struct platform_device *pdev)
>  		extcon_unregister_interest(&omap->extcon_id_dev);
>  	dwc3_omap_disable_irqs(omap);
>  	pm_runtime_put_sync(&pdev->dev);
> +	clk_disable_unprepare(omap->refclk);
>  	pm_runtime_disable(&pdev->dev);
>  	device_for_each_child(&pdev->dev, NULL, dwc3_omap_remove_core);
>  
> 

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
  2013-09-23 13:11         ` Roger Quadros
@ 2013-10-02 13:11             ` Felipe Balbi
  -1 siblings, 0 replies; 40+ messages in thread
From: Felipe Balbi @ 2013-10-02 13:11 UTC (permalink / raw)
  To: Roger Quadros
  Cc: balbi-l0cyMroinI0, bcousson-rdvid1DuHRBWk0Htik3J/w,
	tony-4v6yS6AI5VpBDgjK7y7TUQ, george.cherian-l0cyMroinI0,
	kishon-l0cyMroinI0, bigeasy-hfZtesqFncYOwBW4kG4KsQ,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	thomas.langer-th3ZBGNqt+7QT0dZR+AlfA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 495 bytes --]

On Mon, Sep 23, 2013 at 04:11:30PM +0300, Roger Quadros wrote:
> Hi Felipe,
> 
> On 09/18/2013 03:49 PM, Roger Quadros wrote:
> > "usb_otg_ss_refclk960m" is an optional functional clock to the
> > UBS_OTG_SS module. So manage it in the driver.
> > 
> 
> Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
> PHY and not USB_OTG_SS module. The name is misleading.
> 
> So please ignore patch 9 and 10.

ignored. All others are fine, right ?

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
@ 2013-10-02 13:11             ` Felipe Balbi
  0 siblings, 0 replies; 40+ messages in thread
From: Felipe Balbi @ 2013-10-02 13:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Sep 23, 2013 at 04:11:30PM +0300, Roger Quadros wrote:
> Hi Felipe,
> 
> On 09/18/2013 03:49 PM, Roger Quadros wrote:
> > "usb_otg_ss_refclk960m" is an optional functional clock to the
> > UBS_OTG_SS module. So manage it in the driver.
> > 
> 
> Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
> PHY and not USB_OTG_SS module. The name is misleading.
> 
> So please ignore patch 9 and 10.

ignored. All others are fine, right ?

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131002/531ab78c/attachment.sig>

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
  2013-10-02 13:11             ` Felipe Balbi
@ 2013-10-02 13:41               ` Roger Quadros
  -1 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-10-02 13:41 UTC (permalink / raw)
  To: balbi-l0cyMroinI0
  Cc: bcousson-rdvid1DuHRBWk0Htik3J/w, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	george.cherian-l0cyMroinI0, kishon-l0cyMroinI0,
	bigeasy-hfZtesqFncYOwBW4kG4KsQ,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	thomas.langer-th3ZBGNqt+7QT0dZR+AlfA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On 10/02/2013 04:11 PM, Felipe Balbi wrote:
> On Mon, Sep 23, 2013 at 04:11:30PM +0300, Roger Quadros wrote:
>> Hi Felipe,
>>
>> On 09/18/2013 03:49 PM, Roger Quadros wrote:
>>> "usb_otg_ss_refclk960m" is an optional functional clock to the
>>> UBS_OTG_SS module. So manage it in the driver.
>>>
>>
>> Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
>> PHY and not USB_OTG_SS module. The name is misleading.
>>
>> So please ignore patch 9 and 10.
> 
> ignored. All others are fine, right ?
> 
Yes. But I might have to rebase this on top of Phy framework stuff.

cheers,
-roger
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
@ 2013-10-02 13:41               ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-10-02 13:41 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/02/2013 04:11 PM, Felipe Balbi wrote:
> On Mon, Sep 23, 2013 at 04:11:30PM +0300, Roger Quadros wrote:
>> Hi Felipe,
>>
>> On 09/18/2013 03:49 PM, Roger Quadros wrote:
>>> "usb_otg_ss_refclk960m" is an optional functional clock to the
>>> UBS_OTG_SS module. So manage it in the driver.
>>>
>>
>> Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
>> PHY and not USB_OTG_SS module. The name is misleading.
>>
>> So please ignore patch 9 and 10.
> 
> ignored. All others are fine, right ?
> 
Yes. But I might have to rebase this on top of Phy framework stuff.

cheers,
-roger

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
  2013-10-02 13:41               ` Roger Quadros
@ 2013-10-03 12:29                 ` Felipe Balbi
  -1 siblings, 0 replies; 40+ messages in thread
From: Felipe Balbi @ 2013-10-03 12:29 UTC (permalink / raw)
  To: Roger Quadros
  Cc: balbi, bcousson, tony, george.cherian, kishon, bigeasy,
	sergei.shtylyov, thomas.langer, linux-usb, linux-omap,
	linux-arm-kernel, devicetree

[-- Attachment #1: Type: text/plain, Size: 890 bytes --]

Hi,

On Wed, Oct 02, 2013 at 04:41:53PM +0300, Roger Quadros wrote:
> On 10/02/2013 04:11 PM, Felipe Balbi wrote:
> > On Mon, Sep 23, 2013 at 04:11:30PM +0300, Roger Quadros wrote:
> >> Hi Felipe,
> >>
> >> On 09/18/2013 03:49 PM, Roger Quadros wrote:
> >>> "usb_otg_ss_refclk960m" is an optional functional clock to the
> >>> UBS_OTG_SS module. So manage it in the driver.
> >>>
> >>
> >> Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
> >> PHY and not USB_OTG_SS module. The name is misleading.
> >>
> >> So please ignore patch 9 and 10.
> > 
> > ignored. All others are fine, right ?
> > 
> Yes. But I might have to rebase this on top of Phy framework stuff.

alright, Greg already took the PHY framework, so maybe we need to just
give him my Acked-by and he takes the patches directly as I don't have
PYH framework.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
@ 2013-10-03 12:29                 ` Felipe Balbi
  0 siblings, 0 replies; 40+ messages in thread
From: Felipe Balbi @ 2013-10-03 12:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Wed, Oct 02, 2013 at 04:41:53PM +0300, Roger Quadros wrote:
> On 10/02/2013 04:11 PM, Felipe Balbi wrote:
> > On Mon, Sep 23, 2013 at 04:11:30PM +0300, Roger Quadros wrote:
> >> Hi Felipe,
> >>
> >> On 09/18/2013 03:49 PM, Roger Quadros wrote:
> >>> "usb_otg_ss_refclk960m" is an optional functional clock to the
> >>> UBS_OTG_SS module. So manage it in the driver.
> >>>
> >>
> >> Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
> >> PHY and not USB_OTG_SS module. The name is misleading.
> >>
> >> So please ignore patch 9 and 10.
> > 
> > ignored. All others are fine, right ?
> > 
> Yes. But I might have to rebase this on top of Phy framework stuff.

alright, Greg already took the PHY framework, so maybe we need to just
give him my Acked-by and he takes the patches directly as I don't have
PYH framework.

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131003/987ac52c/attachment.sig>

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
  2013-10-03 12:29                 ` Felipe Balbi
@ 2013-10-03 14:54                   ` Roger Quadros
  -1 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-10-03 14:54 UTC (permalink / raw)
  To: balbi-l0cyMroinI0
  Cc: bcousson-rdvid1DuHRBWk0Htik3J/w, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	george.cherian-l0cyMroinI0, kishon-l0cyMroinI0,
	bigeasy-hfZtesqFncYOwBW4kG4KsQ,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	thomas.langer-th3ZBGNqt+7QT0dZR+AlfA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Greg KH

On 10/03/2013 03:29 PM, Felipe Balbi wrote:
> Hi,
> 
> On Wed, Oct 02, 2013 at 04:41:53PM +0300, Roger Quadros wrote:
>> On 10/02/2013 04:11 PM, Felipe Balbi wrote:
>>> On Mon, Sep 23, 2013 at 04:11:30PM +0300, Roger Quadros wrote:
>>>> Hi Felipe,
>>>>
>>>> On 09/18/2013 03:49 PM, Roger Quadros wrote:
>>>>> "usb_otg_ss_refclk960m" is an optional functional clock to the
>>>>> UBS_OTG_SS module. So manage it in the driver.
>>>>>
>>>>
>>>> Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
>>>> PHY and not USB_OTG_SS module. The name is misleading.
>>>>
>>>> So please ignore patch 9 and 10.
>>>
>>> ignored. All others are fine, right ?
>>>
>> Yes. But I might have to rebase this on top of Phy framework stuff.
> 
> alright, Greg already took the PHY framework, so maybe we need to just
> give him my Acked-by and he takes the patches directly as I don't have
> PYH framework.
> 
OK. I'll resend this series to Greg in a while.

cheers,
-roger
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
@ 2013-10-03 14:54                   ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-10-03 14:54 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/03/2013 03:29 PM, Felipe Balbi wrote:
> Hi,
> 
> On Wed, Oct 02, 2013 at 04:41:53PM +0300, Roger Quadros wrote:
>> On 10/02/2013 04:11 PM, Felipe Balbi wrote:
>>> On Mon, Sep 23, 2013 at 04:11:30PM +0300, Roger Quadros wrote:
>>>> Hi Felipe,
>>>>
>>>> On 09/18/2013 03:49 PM, Roger Quadros wrote:
>>>>> "usb_otg_ss_refclk960m" is an optional functional clock to the
>>>>> UBS_OTG_SS module. So manage it in the driver.
>>>>>
>>>>
>>>> Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
>>>> PHY and not USB_OTG_SS module. The name is misleading.
>>>>
>>>> So please ignore patch 9 and 10.
>>>
>>> ignored. All others are fine, right ?
>>>
>> Yes. But I might have to rebase this on top of Phy framework stuff.
> 
> alright, Greg already took the PHY framework, so maybe we need to just
> give him my Acked-by and he takes the patches directly as I don't have
> PYH framework.
> 
OK. I'll resend this series to Greg in a while.

cheers,
-roger

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
  2013-10-03 14:54                   ` Roger Quadros
@ 2013-10-03 15:41                       ` Greg KH
  -1 siblings, 0 replies; 40+ messages in thread
From: Greg KH @ 2013-10-03 15:41 UTC (permalink / raw)
  To: Roger Quadros
  Cc: balbi-l0cyMroinI0, bcousson-rdvid1DuHRBWk0Htik3J/w,
	tony-4v6yS6AI5VpBDgjK7y7TUQ, george.cherian-l0cyMroinI0,
	kishon-l0cyMroinI0, bigeasy-hfZtesqFncYOwBW4kG4KsQ,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	thomas.langer-th3ZBGNqt+7QT0dZR+AlfA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Thu, Oct 03, 2013 at 05:54:14PM +0300, Roger Quadros wrote:
> On 10/03/2013 03:29 PM, Felipe Balbi wrote:
> > Hi,
> > 
> > On Wed, Oct 02, 2013 at 04:41:53PM +0300, Roger Quadros wrote:
> >> On 10/02/2013 04:11 PM, Felipe Balbi wrote:
> >>> On Mon, Sep 23, 2013 at 04:11:30PM +0300, Roger Quadros wrote:
> >>>> Hi Felipe,
> >>>>
> >>>> On 09/18/2013 03:49 PM, Roger Quadros wrote:
> >>>>> "usb_otg_ss_refclk960m" is an optional functional clock to the
> >>>>> UBS_OTG_SS module. So manage it in the driver.
> >>>>>
> >>>>
> >>>> Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
> >>>> PHY and not USB_OTG_SS module. The name is misleading.
> >>>>
> >>>> So please ignore patch 9 and 10.
> >>>
> >>> ignored. All others are fine, right ?
> >>>
> >> Yes. But I might have to rebase this on top of Phy framework stuff.
> > 
> > alright, Greg already took the PHY framework, so maybe we need to just
> > give him my Acked-by and he takes the patches directly as I don't have
> > PYH framework.
> > 
> OK. I'll resend this series to Greg in a while.

It looks like you did, but forgot Felipe's ack :(
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
@ 2013-10-03 15:41                       ` Greg KH
  0 siblings, 0 replies; 40+ messages in thread
From: Greg KH @ 2013-10-03 15:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Oct 03, 2013 at 05:54:14PM +0300, Roger Quadros wrote:
> On 10/03/2013 03:29 PM, Felipe Balbi wrote:
> > Hi,
> > 
> > On Wed, Oct 02, 2013 at 04:41:53PM +0300, Roger Quadros wrote:
> >> On 10/02/2013 04:11 PM, Felipe Balbi wrote:
> >>> On Mon, Sep 23, 2013 at 04:11:30PM +0300, Roger Quadros wrote:
> >>>> Hi Felipe,
> >>>>
> >>>> On 09/18/2013 03:49 PM, Roger Quadros wrote:
> >>>>> "usb_otg_ss_refclk960m" is an optional functional clock to the
> >>>>> UBS_OTG_SS module. So manage it in the driver.
> >>>>>
> >>>>
> >>>> Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
> >>>> PHY and not USB_OTG_SS module. The name is misleading.
> >>>>
> >>>> So please ignore patch 9 and 10.
> >>>
> >>> ignored. All others are fine, right ?
> >>>
> >> Yes. But I might have to rebase this on top of Phy framework stuff.
> > 
> > alright, Greg already took the PHY framework, so maybe we need to just
> > give him my Acked-by and he takes the patches directly as I don't have
> > PYH framework.
> > 
> OK. I'll resend this series to Greg in a while.

It looks like you did, but forgot Felipe's ack :(

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
  2013-10-03 15:41                       ` Greg KH
@ 2013-10-04 10:46                           ` Roger Quadros
  -1 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-10-04 10:46 UTC (permalink / raw)
  To: Greg KH
  Cc: balbi-l0cyMroinI0, bcousson-rdvid1DuHRBWk0Htik3J/w,
	tony-4v6yS6AI5VpBDgjK7y7TUQ, george.cherian-l0cyMroinI0,
	kishon-l0cyMroinI0, bigeasy-hfZtesqFncYOwBW4kG4KsQ,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	thomas.langer-th3ZBGNqt+7QT0dZR+AlfA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Greg,

On 10/03/2013 06:41 PM, Greg KH wrote:
> On Thu, Oct 03, 2013 at 05:54:14PM +0300, Roger Quadros wrote:
>> On 10/03/2013 03:29 PM, Felipe Balbi wrote:
>>> Hi,
>>>
>>> On Wed, Oct 02, 2013 at 04:41:53PM +0300, Roger Quadros wrote:
>>>> On 10/02/2013 04:11 PM, Felipe Balbi wrote:
>>>>> On Mon, Sep 23, 2013 at 04:11:30PM +0300, Roger Quadros wrote:
>>>>>> Hi Felipe,
>>>>>>
>>>>>> On 09/18/2013 03:49 PM, Roger Quadros wrote:
>>>>>>> "usb_otg_ss_refclk960m" is an optional functional clock to the
>>>>>>> UBS_OTG_SS module. So manage it in the driver.
>>>>>>>
>>>>>>
>>>>>> Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
>>>>>> PHY and not USB_OTG_SS module. The name is misleading.
>>>>>>
>>>>>> So please ignore patch 9 and 10.
>>>>>
>>>>> ignored. All others are fine, right ?
>>>>>
>>>> Yes. But I might have to rebase this on top of Phy framework stuff.
>>>
>>> alright, Greg already took the PHY framework, so maybe we need to just
>>> give him my Acked-by and he takes the patches directly as I don't have
>>> PYH framework.
>>>
>> OK. I'll resend this series to Greg in a while.
> 
> It looks like you did, but forgot Felipe's ack :(
> 
I was under the impression that Felipe will explicitly give his Ack there.
Should I resend with his Acked-bys?

cheers,
-roger
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
@ 2013-10-04 10:46                           ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-10-04 10:46 UTC (permalink / raw)
  To: linux-arm-kernel

Greg,

On 10/03/2013 06:41 PM, Greg KH wrote:
> On Thu, Oct 03, 2013 at 05:54:14PM +0300, Roger Quadros wrote:
>> On 10/03/2013 03:29 PM, Felipe Balbi wrote:
>>> Hi,
>>>
>>> On Wed, Oct 02, 2013 at 04:41:53PM +0300, Roger Quadros wrote:
>>>> On 10/02/2013 04:11 PM, Felipe Balbi wrote:
>>>>> On Mon, Sep 23, 2013 at 04:11:30PM +0300, Roger Quadros wrote:
>>>>>> Hi Felipe,
>>>>>>
>>>>>> On 09/18/2013 03:49 PM, Roger Quadros wrote:
>>>>>>> "usb_otg_ss_refclk960m" is an optional functional clock to the
>>>>>>> UBS_OTG_SS module. So manage it in the driver.
>>>>>>>
>>>>>>
>>>>>> Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
>>>>>> PHY and not USB_OTG_SS module. The name is misleading.
>>>>>>
>>>>>> So please ignore patch 9 and 10.
>>>>>
>>>>> ignored. All others are fine, right ?
>>>>>
>>>> Yes. But I might have to rebase this on top of Phy framework stuff.
>>>
>>> alright, Greg already took the PHY framework, so maybe we need to just
>>> give him my Acked-by and he takes the patches directly as I don't have
>>> PYH framework.
>>>
>> OK. I'll resend this series to Greg in a while.
> 
> It looks like you did, but forgot Felipe's ack :(
> 
I was under the impression that Felipe will explicitly give his Ack there.
Should I resend with his Acked-bys?

cheers,
-roger

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
  2013-10-04 10:46                           ` Roger Quadros
@ 2013-10-04 13:23                               ` Greg KH
  -1 siblings, 0 replies; 40+ messages in thread
From: Greg KH @ 2013-10-04 13:23 UTC (permalink / raw)
  To: Roger Quadros
  Cc: balbi-l0cyMroinI0, bcousson-rdvid1DuHRBWk0Htik3J/w,
	tony-4v6yS6AI5VpBDgjK7y7TUQ, george.cherian-l0cyMroinI0,
	kishon-l0cyMroinI0, bigeasy-hfZtesqFncYOwBW4kG4KsQ,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	thomas.langer-th3ZBGNqt+7QT0dZR+AlfA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Fri, Oct 04, 2013 at 01:46:08PM +0300, Roger Quadros wrote:
> Greg,
> 
> On 10/03/2013 06:41 PM, Greg KH wrote:
> > On Thu, Oct 03, 2013 at 05:54:14PM +0300, Roger Quadros wrote:
> >> On 10/03/2013 03:29 PM, Felipe Balbi wrote:
> >>> Hi,
> >>>
> >>> On Wed, Oct 02, 2013 at 04:41:53PM +0300, Roger Quadros wrote:
> >>>> On 10/02/2013 04:11 PM, Felipe Balbi wrote:
> >>>>> On Mon, Sep 23, 2013 at 04:11:30PM +0300, Roger Quadros wrote:
> >>>>>> Hi Felipe,
> >>>>>>
> >>>>>> On 09/18/2013 03:49 PM, Roger Quadros wrote:
> >>>>>>> "usb_otg_ss_refclk960m" is an optional functional clock to the
> >>>>>>> UBS_OTG_SS module. So manage it in the driver.
> >>>>>>>
> >>>>>>
> >>>>>> Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
> >>>>>> PHY and not USB_OTG_SS module. The name is misleading.
> >>>>>>
> >>>>>> So please ignore patch 9 and 10.
> >>>>>
> >>>>> ignored. All others are fine, right ?
> >>>>>
> >>>> Yes. But I might have to rebase this on top of Phy framework stuff.
> >>>
> >>> alright, Greg already took the PHY framework, so maybe we need to just
> >>> give him my Acked-by and he takes the patches directly as I don't have
> >>> PYH framework.
> >>>
> >> OK. I'll resend this series to Greg in a while.
> > 
> > It looks like you did, but forgot Felipe's ack :(
> > 
> I was under the impression that Felipe will explicitly give his Ack there.
> Should I resend with his Acked-bys?

No need, I took the patches yesterday, you should have seen the
automated emails, right?

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
@ 2013-10-04 13:23                               ` Greg KH
  0 siblings, 0 replies; 40+ messages in thread
From: Greg KH @ 2013-10-04 13:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Oct 04, 2013 at 01:46:08PM +0300, Roger Quadros wrote:
> Greg,
> 
> On 10/03/2013 06:41 PM, Greg KH wrote:
> > On Thu, Oct 03, 2013 at 05:54:14PM +0300, Roger Quadros wrote:
> >> On 10/03/2013 03:29 PM, Felipe Balbi wrote:
> >>> Hi,
> >>>
> >>> On Wed, Oct 02, 2013 at 04:41:53PM +0300, Roger Quadros wrote:
> >>>> On 10/02/2013 04:11 PM, Felipe Balbi wrote:
> >>>>> On Mon, Sep 23, 2013 at 04:11:30PM +0300, Roger Quadros wrote:
> >>>>>> Hi Felipe,
> >>>>>>
> >>>>>> On 09/18/2013 03:49 PM, Roger Quadros wrote:
> >>>>>>> "usb_otg_ss_refclk960m" is an optional functional clock to the
> >>>>>>> UBS_OTG_SS module. So manage it in the driver.
> >>>>>>>
> >>>>>>
> >>>>>> Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
> >>>>>> PHY and not USB_OTG_SS module. The name is misleading.
> >>>>>>
> >>>>>> So please ignore patch 9 and 10.
> >>>>>
> >>>>> ignored. All others are fine, right ?
> >>>>>
> >>>> Yes. But I might have to rebase this on top of Phy framework stuff.
> >>>
> >>> alright, Greg already took the PHY framework, so maybe we need to just
> >>> give him my Acked-by and he takes the patches directly as I don't have
> >>> PYH framework.
> >>>
> >> OK. I'll resend this series to Greg in a while.
> > 
> > It looks like you did, but forgot Felipe's ack :(
> > 
> I was under the impression that Felipe will explicitly give his Ack there.
> Should I resend with his Acked-bys?

No need, I took the patches yesterday, you should have seen the
automated emails, right?

greg k-h

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
  2013-10-04 13:23                               ` Greg KH
@ 2013-10-07  8:19                                 ` Roger Quadros
  -1 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-10-07  8:19 UTC (permalink / raw)
  To: Greg KH
  Cc: balbi, bcousson, tony, george.cherian, kishon, bigeasy,
	sergei.shtylyov, thomas.langer, linux-usb, linux-omap,
	linux-arm-kernel, devicetree

On 10/04/2013 04:23 PM, Greg KH wrote:
> On Fri, Oct 04, 2013 at 01:46:08PM +0300, Roger Quadros wrote:
>> Greg,
>>
>> On 10/03/2013 06:41 PM, Greg KH wrote:
>>> On Thu, Oct 03, 2013 at 05:54:14PM +0300, Roger Quadros wrote:
>>>> On 10/03/2013 03:29 PM, Felipe Balbi wrote:
>>>>> Hi,
>>>>>
>>>>> On Wed, Oct 02, 2013 at 04:41:53PM +0300, Roger Quadros wrote:
>>>>>> On 10/02/2013 04:11 PM, Felipe Balbi wrote:
>>>>>>> On Mon, Sep 23, 2013 at 04:11:30PM +0300, Roger Quadros wrote:
>>>>>>>> Hi Felipe,
>>>>>>>>
>>>>>>>> On 09/18/2013 03:49 PM, Roger Quadros wrote:
>>>>>>>>> "usb_otg_ss_refclk960m" is an optional functional clock to the
>>>>>>>>> UBS_OTG_SS module. So manage it in the driver.
>>>>>>>>>
>>>>>>>>
>>>>>>>> Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
>>>>>>>> PHY and not USB_OTG_SS module. The name is misleading.
>>>>>>>>
>>>>>>>> So please ignore patch 9 and 10.
>>>>>>>
>>>>>>> ignored. All others are fine, right ?
>>>>>>>
>>>>>> Yes. But I might have to rebase this on top of Phy framework stuff.
>>>>>
>>>>> alright, Greg already took the PHY framework, so maybe we need to just
>>>>> give him my Acked-by and he takes the patches directly as I don't have
>>>>> PYH framework.
>>>>>
>>>> OK. I'll resend this series to Greg in a while.
>>>
>>> It looks like you did, but forgot Felipe's ack :(
>>>
>> I was under the impression that Felipe will explicitly give his Ack there.
>> Should I resend with his Acked-bys?
> 
> No need, I took the patches yesterday, you should have seen the
> automated emails, right?
> 
Thanks. Yes, I got the automated e-mails.

cheers,
-roger

^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock
@ 2013-10-07  8:19                                 ` Roger Quadros
  0 siblings, 0 replies; 40+ messages in thread
From: Roger Quadros @ 2013-10-07  8:19 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/04/2013 04:23 PM, Greg KH wrote:
> On Fri, Oct 04, 2013 at 01:46:08PM +0300, Roger Quadros wrote:
>> Greg,
>>
>> On 10/03/2013 06:41 PM, Greg KH wrote:
>>> On Thu, Oct 03, 2013 at 05:54:14PM +0300, Roger Quadros wrote:
>>>> On 10/03/2013 03:29 PM, Felipe Balbi wrote:
>>>>> Hi,
>>>>>
>>>>> On Wed, Oct 02, 2013 at 04:41:53PM +0300, Roger Quadros wrote:
>>>>>> On 10/02/2013 04:11 PM, Felipe Balbi wrote:
>>>>>>> On Mon, Sep 23, 2013 at 04:11:30PM +0300, Roger Quadros wrote:
>>>>>>>> Hi Felipe,
>>>>>>>>
>>>>>>>> On 09/18/2013 03:49 PM, Roger Quadros wrote:
>>>>>>>>> "usb_otg_ss_refclk960m" is an optional functional clock to the
>>>>>>>>> UBS_OTG_SS module. So manage it in the driver.
>>>>>>>>>
>>>>>>>>
>>>>>>>> Just realized that "usb_otg_ss_refclk960m" is in fact functional clock to the 
>>>>>>>> PHY and not USB_OTG_SS module. The name is misleading.
>>>>>>>>
>>>>>>>> So please ignore patch 9 and 10.
>>>>>>>
>>>>>>> ignored. All others are fine, right ?
>>>>>>>
>>>>>> Yes. But I might have to rebase this on top of Phy framework stuff.
>>>>>
>>>>> alright, Greg already took the PHY framework, so maybe we need to just
>>>>> give him my Acked-by and he takes the patches directly as I don't have
>>>>> PYH framework.
>>>>>
>>>> OK. I'll resend this series to Greg in a while.
>>>
>>> It looks like you did, but forgot Felipe's ack :(
>>>
>> I was under the impression that Felipe will explicitly give his Ack there.
>> Should I resend with his Acked-bys?
> 
> No need, I took the patches yesterday, you should have seen the
> automated emails, right?
> 
Thanks. Yes, I got the automated e-mails.

cheers,
-roger

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2013-10-07  8:19 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-18 12:48 [PATCH v7 00/10] phy: omap-usb: Support multiple instances and new types Roger Quadros
2013-09-18 12:48 ` Roger Quadros
2013-09-18 12:48 ` [PATCH v7 02/10] usb: phy: omap: Add new device types and remove omap_control_usb3_phy_power() Roger Quadros
2013-09-18 12:48   ` Roger Quadros
2013-09-18 12:48 ` [PATCH v7 03/10] usb: phy: omap-usb2: Don't use omap_get_control_dev() Roger Quadros
2013-09-18 12:48   ` Roger Quadros
2013-09-18 12:48 ` [PATCH v7 04/10] usb: phy: omap-usb3: " Roger Quadros
2013-09-18 12:48   ` Roger Quadros
2013-09-18 12:48 ` [PATCH v7 05/10] usb: musb: omap2430: " Roger Quadros
2013-09-18 12:48   ` Roger Quadros
     [not found] ` <1379508542-22389-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2013-09-18 12:48   ` [PATCH v7 01/10] usb: phy: omap-control: Get rid of platform data Roger Quadros
2013-09-18 12:48     ` Roger Quadros
2013-09-18 12:48   ` [PATCH v7 06/10] ARM: dts: omap4: update omap-control-usb nodes Roger Quadros
2013-09-18 12:48     ` Roger Quadros
2013-09-18 12:49   ` [PATCH v7 08/10] ARM: dts: omap5: update omap-control-usb node Roger Quadros
2013-09-18 12:49     ` Roger Quadros
2013-09-18 12:49   ` [PATCH v7 09/10] usb: dwc3: omap: manage "usb_otg_ss_refclk960m" clock Roger Quadros
2013-09-18 12:49     ` Roger Quadros
     [not found]     ` <1379508542-22389-10-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2013-09-23 13:11       ` Roger Quadros
2013-09-23 13:11         ` Roger Quadros
     [not found]         ` <52403E02.4070208-l0cyMroinI0@public.gmane.org>
2013-10-02 13:11           ` Felipe Balbi
2013-10-02 13:11             ` Felipe Balbi
2013-10-02 13:41             ` Roger Quadros
2013-10-02 13:41               ` Roger Quadros
2013-10-03 12:29               ` Felipe Balbi
2013-10-03 12:29                 ` Felipe Balbi
2013-10-03 14:54                 ` Roger Quadros
2013-10-03 14:54                   ` Roger Quadros
     [not found]                   ` <524D8516.8000107-l0cyMroinI0@public.gmane.org>
2013-10-03 15:41                     ` Greg KH
2013-10-03 15:41                       ` Greg KH
     [not found]                       ` <20131003154144.GA18189-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2013-10-04 10:46                         ` Roger Quadros
2013-10-04 10:46                           ` Roger Quadros
     [not found]                           ` <524E9C70.8050303-l0cyMroinI0@public.gmane.org>
2013-10-04 13:23                             ` Greg KH
2013-10-04 13:23                               ` Greg KH
2013-10-07  8:19                               ` Roger Quadros
2013-10-07  8:19                                 ` Roger Quadros
2013-09-18 12:49   ` [PATCH v7 10/10] usb: phy: omap-usb2: Manage phy clock and not otg controller clock Roger Quadros
2013-09-18 12:49     ` Roger Quadros
2013-09-18 12:48 ` [PATCH v7 07/10] usb: phy: omap: get rid of omap_get_control_dev() Roger Quadros
2013-09-18 12:48   ` Roger Quadros

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.