All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH 00/11] ARM: OMAP: USB: Host: Device tree Adaptation
@ 2012-10-31 14:26 Keshava Munegowda
  2012-10-31 14:26 ` [RESEND PATCH 01/11] ARM: OMAP4: USB: Host: Add USB2 Host Device Tree Node Keshava Munegowda
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Keshava Munegowda @ 2012-10-31 14:26 UTC (permalink / raw)
  To: linux-omap, devicetree-discuss, linux-doc, linux-usb
  Cc: Keshava Munegowda, balbi, sameo, b-cousson

The USB2 Host driver of OMAP3/OMAP4 are device tree complaiant with
this patch series.
The device tree data of UHH, EHCI, OHCI and TLL are included.
The drivers are updated to extract and use the register set and
interrupt numbers delivered by these device tree structures.

Keshava Munegowda (11):
  ARM: OMAP4: USB: Host: Add USB2 Host Device Tree Node
  ARM: OMAP4: USB: Host: Panda board specific device tree node
  ARM: OMAP3: USB: Add USB2 Host Device Tree Node
  ARM: OMAP3: USB: Host: Beagle-XM board specific device tree node
  ARM: OMAP: USB: Host: usb host Device tree node Adaptation
  ARM: OMAP: USB: Host: USB TLL Device tree node Adaptation
  ARM: OMAP: USB: Host: Ehci driver uses the usbhs port data
  ARM: OMAP: USB: Change the TLL clock names
  ARM: OMAP: USB: Remove the device name for TLL channel clocks for
    OMAP3
  ARM: OMAP4: USB: Add pin mux configuration for panda board
  ARM: OMAP3: USB: Add pin mux configuration for beagle-xm board

 .../devicetree/bindings/usb/omap-usb-host.txt      |   24 +++
 .../devicetree/bindings/usb/omap-usb-tll.txt       |   21 ++
 arch/arm/boot/dts/omap3-beagle-xm.dts              |   56 +++++
 arch/arm/boot/dts/omap3.dtsi                       |   22 ++
 arch/arm/boot/dts/omap4-panda.dts                  |   51 +++++
 arch/arm/boot/dts/omap4.dtsi                       |   22 ++
 arch/arm/mach-omap2/clock3xxx_data.c               |    6 +-
 arch/arm/mach-omap2/usb-host.c                     |   68 ------
 drivers/mfd/omap-usb-host.c                        |  170 ++++++++++-----
 drivers/mfd/omap-usb-tll.c                         |  216 ++++++++++++--------
 drivers/usb/host/ehci-omap.c                       |   40 ++--
 include/linux/platform_data/usb-omap.h             |   31 ++-
 12 files changed, 485 insertions(+), 242 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/usb/omap-usb-host.txt
 create mode 100644 Documentation/devicetree/bindings/usb/omap-usb-tll.txt

-- 
1.7.9.5


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

* [RESEND PATCH 01/11] ARM: OMAP4: USB: Host: Add USB2 Host Device Tree Node
  2012-10-31 14:26 [RESEND PATCH 00/11] ARM: OMAP: USB: Host: Device tree Adaptation Keshava Munegowda
@ 2012-10-31 14:26 ` Keshava Munegowda
  2012-10-31 14:26 ` [RESEND PATCH 02/11] ARM: OMAP4: USB: Host: Panda board specific device tree node Keshava Munegowda
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Keshava Munegowda @ 2012-10-31 14:26 UTC (permalink / raw)
  To: linux-omap, devicetree-discuss, linux-doc, linux-usb
  Cc: Keshava Munegowda, balbi, sameo, b-cousson

The device tree node details of usb2 host and tll components
are included for OMAP4 SOC

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
---
 .../devicetree/bindings/usb/omap-usb-host.txt      |   24 ++++++++++++++++++++
 .../devicetree/bindings/usb/omap-usb-tll.txt       |   21 +++++++++++++++++
 arch/arm/boot/dts/omap4.dtsi                       |   22 ++++++++++++++++++
 3 files changed, 67 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/omap-usb-host.txt
 create mode 100644 Documentation/devicetree/bindings/usb/omap-usb-tll.txt

diff --git a/Documentation/devicetree/bindings/usb/omap-usb-host.txt b/Documentation/devicetree/bindings/usb/omap-usb-host.txt
new file mode 100644
index 0000000..2ea987f
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/omap-usb-host.txt
@@ -0,0 +1,24 @@
+USB HOST
+
+OMAP USB2 UHH
+
+Required properties:
+ - compatible: Should be "ti,usbhs"
+ - reg : Address set of system configuration of the usb host.Also
+has the register address of ehci and ohci IPs.
+ - interrupts :interrupts of ehci and ohci IPs.
+
+This is usually a subnode of ocp to which it is connected.
+
+usbhs: usbhs@0x4a064000 {
+	compatible = "ti,usbhs";
+	reg = <0x4a064000 0x800>, /* uhh */
+		  <0x4a064800 0x400>, /* ohci */
+		  <0x4a064c00 0x400>; /* ehci */
+	reg-names = "uhh", "ohci", "ehci";
+	interrupts = <0 76 0x4>, <0 77 0x4>;
+	interrupt-names = "ohci-irq", "ehci-irq";
+	interrupt-parent = <&gic>;
+		ti,hwmods = "usb_host_hs";
+};
+
diff --git a/Documentation/devicetree/bindings/usb/omap-usb-tll.txt b/Documentation/devicetree/bindings/usb/omap-usb-tll.txt
new file mode 100644
index 0000000..e2e49fd
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/omap-usb-tll.txt
@@ -0,0 +1,21 @@
+USB TLL
+
+OMAP USB2 TLL
+
+Required properties:
+ - compatible: Should be "ti,usbtll"
+ - reg : Address set of system configuration of the usb tll.
+ - interrupts :interrupts of usb tll.
+
+This is usually a subnode of ocp to which it is connected.
+
+usbtll: usbtll@0x4a062000 {
+	compatible = "ti,usbtll";
+	reg = <0x4a062000 0x1000>;
+	reg-names = "tll";
+	interrupts = <0 78 0x4>;
+	interrupt-names = "tll-irq";
+	interrupt-parent = <&gic>;
+	ti,hwmods = "usb_tll_hs";
+};
+
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 3883f94..fb76ba3 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -438,5 +438,27 @@
 			ranges;
 			ti,hwmods = "ocp2scp_usb_phy";
 		};
+
+		usbhs: usbhs@0x4a064000 {
+			compatible = "ti,usbhs";
+			reg = <0x4a064000 0x800>, /* uhh */
+				  <0x4a064800 0x400>, /* ohci */
+				  <0x4a064c00 0x400>; /* ehci */
+			reg-names = "uhh", "ohci", "ehci";
+			interrupts = <0 76 0x4>, <0 77 0x4>;
+			interrupt-names = "ohci-irq", "ehci-irq";
+			interrupt-parent = <&gic>;
+			ti,hwmods = "usb_host_hs";
+		};
+
+		usbtll: usbtll@0x4a062000 {
+			compatible = "ti,usbtll";
+			reg = <0x4a062000 0x1000>;
+			reg-names = "tll";
+			interrupts = <0 78 0x4>;
+			interrupt-names = "tll-irq";
+			interrupt-parent = <&gic>;
+			ti,hwmods = "usb_tll_hs";
+		};
 	};
 };
-- 
1.7.9.5


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

* [RESEND PATCH 02/11] ARM: OMAP4: USB: Host: Panda board specific device tree node
  2012-10-31 14:26 [RESEND PATCH 00/11] ARM: OMAP: USB: Host: Device tree Adaptation Keshava Munegowda
  2012-10-31 14:26 ` [RESEND PATCH 01/11] ARM: OMAP4: USB: Host: Add USB2 Host Device Tree Node Keshava Munegowda
@ 2012-10-31 14:26 ` Keshava Munegowda
       [not found] ` <1351693612-23314-1-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Keshava Munegowda @ 2012-10-31 14:26 UTC (permalink / raw)
  To: linux-omap, devicetree-discuss, linux-doc, linux-usb
  Cc: Keshava Munegowda, balbi, sameo, b-cousson

OMAP4 panda board specific device tree node is included.

In OMAP4 panda board, the port 1 is used in ULPI PHY mode.
The port 1 is connected to a on board hub with ethernet
interface.

TODO:
   The clock bindings are not yet avilable for OMAP4.
   hence , USB hub specific clocks are exported as device tree string
   paramters.
   Will be changed to use the clock bindings later

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
---
 arch/arm/boot/dts/omap4-panda.dts |   33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/arch/arm/boot/dts/omap4-panda.dts b/arch/arm/boot/dts/omap4-panda.dts
index e8f927c..dad0df6 100644
--- a/arch/arm/boot/dts/omap4-panda.dts
+++ b/arch/arm/boot/dts/omap4-panda.dts
@@ -184,3 +184,36 @@
 &dmic {
 	status = "disabled";
 };
+
+&usbhs {
+	/*
+	 * Maximum fill 3 port info.
+	 * port configured can be any one of the following values
+	 * OMAP_USBHS_PORT_MODE_UNUSED			= 0,
+	 * OMAP_EHCI_PORT_MODE_PHY				= 1,
+	 * OMAP_EHCI_PORT_MODE_TLL				= 2,
+	 * OMAP_EHCI_PORT_MODE_HSIC				= 3,
+	 * OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0	= 4,
+	 * OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM	= 5,
+	 * OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0	= 6,
+	 * OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM	= 7,
+	 * OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0	= 8,
+	 * OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM	= 9,
+	 * OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0	= 10,
+	 * OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM	= 11,
+	 * OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0	= 12,
+	 * OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM	= 13,
+	 */
+	port-0 = <1>;
+	port-1 = <0>;
+	port-2 = <0>;
+
+	/*
+	 * In some boards, the controller is always connected to hub
+	 * the pandboard always has the hub connect to port0 of usbhs controller
+	 */
+	hub-power-gpio = <&gpio1 1 0>;
+	hub-reset-gpio = <&gpio2 30 0>;  /* gpio 62 */
+	hub-clk = "auxclk3_ck";
+	hub-clkrate = <19200000>;
+};
-- 
1.7.9.5


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

* [RESEND PATCH 03/11] ARM: OMAP3: USB: Add USB2 Host Device Tree Node
       [not found] ` <1351693612-23314-1-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
@ 2012-10-31 14:26   ` Keshava Munegowda
  2012-10-31 14:26   ` [RESEND PATCH 04/11] ARM: OMAP3: USB: Host: Beagle-XM board specific device tree node Keshava Munegowda
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 16+ messages in thread
From: Keshava Munegowda @ 2012-10-31 14:26 UTC (permalink / raw)
  To: linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA
  Cc: Keshava Munegowda, balbi-l0cyMroinI0,
	sameo-VuQAYsv1563Yd54FQh9/CA, b-cousson-l0cyMroinI0

The device tree node details of usb2 host and tll components
are included for OMAP3

Signed-off-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org>
---
 arch/arm/boot/dts/omap3.dtsi |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 696e929..5c805d7 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -300,5 +300,27 @@
 			ti,buffer-size = <128>;
 			ti,hwmods = "mcbsp5";
 		};
+
+		usbhs: usbhs@0x4a064000 {
+			compatible = "ti,usbhs";
+			reg = <0x48064000 0x400>, /* uhh */
+				  <0x48064400 0x400>, /* ohci */
+				  <0x48064800 0x400>; /* ehci */
+			reg-names = "uhh", "ohci", "ehci";
+			interrupts = <76>, <77>;
+			interrupt-names = "ohci-irq", "ehci-irq";
+			interrupt-parent = <&intc>;
+			ti,hwmods = "usb_host_hs";
+		};
+
+		usbtll: usbtll@0x4a062000 {
+			compatible = "ti,usbtll";
+			reg = <0x48062000 0x1000>;
+			reg-names = "tll";
+			interrupts = <78>;
+			interrupt-names = "tll-irq";
+			interrupt-parent = <&intc>;
+			ti,hwmods = "usb_tll_hs";
+		};
 	};
 };
-- 
1.7.9.5

--
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] 16+ messages in thread

* [RESEND PATCH 04/11] ARM: OMAP3: USB: Host: Beagle-XM board specific device tree node
       [not found] ` <1351693612-23314-1-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
  2012-10-31 14:26   ` [RESEND PATCH 03/11] ARM: OMAP3: USB: Add USB2 Host Device Tree Node Keshava Munegowda
@ 2012-10-31 14:26   ` Keshava Munegowda
  2012-10-31 14:26   ` [RESEND PATCH 10/11] ARM: OMAP4: USB: Add pin mux configuration for panda board Keshava Munegowda
  2012-10-31 14:26   ` [RESEND PATCH 11/11] ARM: OMAP3: USB: Add pin mux configuration for beagle-xm board Keshava Munegowda
  3 siblings, 0 replies; 16+ messages in thread
From: Keshava Munegowda @ 2012-10-31 14:26 UTC (permalink / raw)
  To: linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA
  Cc: Keshava Munegowda, balbi-l0cyMroinI0,
	sameo-VuQAYsv1563Yd54FQh9/CA, b-cousson-l0cyMroinI0

OMAP3 Beagle-XM board specific data for usb2 host device tree node
is included.
In Beagle XM board , the port 2 of usb host is connected to a hub
with ethernet interface.

Signed-off-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org>
---
 arch/arm/boot/dts/omap3-beagle-xm.dts |   32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts
index c38cf76..b9f8667 100644
--- a/arch/arm/boot/dts/omap3-beagle-xm.dts
+++ b/arch/arm/boot/dts/omap3-beagle-xm.dts
@@ -113,3 +113,35 @@
 	 */
 	ti,pulldowns = <0x03a1c4>;
 };
+
+&usbhs {
+	/*
+	 * Maximum fill 3 port info.
+	 * port configured can be any one of the following values
+	 * OMAP_USBHS_PORT_MODE_UNUSED			= 0,
+	 * OMAP_EHCI_PORT_MODE_PHY				= 1,
+	 * OMAP_EHCI_PORT_MODE_TLL				= 2,
+	 * OMAP_EHCI_PORT_MODE_HSIC				= 3,
+	 * OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0	= 4,
+	 * OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM	= 5,
+	 * OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0	= 6,
+	 * OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM	= 7,
+	 * OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0	= 8,
+	 * OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM	= 9,
+	 * OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0	= 10,
+	 * OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM	= 11,
+	 * OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0	= 12,
+	 * OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM	= 13,
+	 */
+	port-0 = <0>;
+	port-1 = <1>;
+	port-2 = <0>;
+
+	/*
+	 * gpio resets should be given the format ( Max of 3 ports)
+	 * reset-gpio-1 = <&gpiox x x>
+	 * reset-gpio-2 = <&gpiox x x>
+	 * reset-gpio-3 = <&gpiox x x>
+	 */
+	reset-gpio-2 = <&gpio5 19 0>;   /* gpio 147 */
+};
-- 
1.7.9.5

--
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] 16+ messages in thread

* [RESEND PATCH 05/11] ARM: OMAP: USB: Host: usb host Device tree node Adaptation
  2012-10-31 14:26 [RESEND PATCH 00/11] ARM: OMAP: USB: Host: Device tree Adaptation Keshava Munegowda
                   ` (2 preceding siblings ...)
       [not found] ` <1351693612-23314-1-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
@ 2012-10-31 14:26 ` Keshava Munegowda
       [not found]   ` <1351693612-23314-6-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
  2012-10-31 14:26 ` [RESEND PATCH 06/11] ARM: OMAP: USB: Host: USB TLL " Keshava Munegowda
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Keshava Munegowda @ 2012-10-31 14:26 UTC (permalink / raw)
  To: linux-omap, devicetree-discuss, linux-doc, linux-usb
  Cc: Keshava Munegowda, balbi, sameo, b-cousson

The USB2 Host device node is extracted and used in the probe
of the driver to initialize the usb ports and controller. The
platform specific initialization is also performed.

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
---
 arch/arm/mach-omap2/usb-host.c         |    2 -
 drivers/mfd/omap-usb-host.c            |  163 +++++++++++++++++++++++---------
 include/linux/platform_data/usb-omap.h |   19 +++-
 3 files changed, 133 insertions(+), 51 deletions(-)

diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index d1dbe12..239c175 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -502,8 +502,6 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata)
 	}
 	ehci_data.phy_reset = pdata->phy_reset;
 	ohci_data.es2_compatibility = pdata->es2_compatibility;
-	usbhs_data.ehci_data = &ehci_data;
-	usbhs_data.ohci_data = &ohci_data;
 
 	if (cpu_is_omap34xx()) {
 		setup_ehci_io_mux(pdata->port_mode);
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index cebfe0a..4b3af16 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -24,7 +24,7 @@
 #include <linux/clk.h>
 #include <linux/dma-mapping.h>
 #include <linux/spinlock.h>
-#include <linux/gpio.h>
+#include <linux/of_gpio.h>
 #include <plat/cpu.h>
 #include <linux/platform_device.h>
 #include <linux/platform_data/usb-omap.h>
@@ -103,8 +103,6 @@ struct usbhs_hcd_omap {
 
 	void __iomem			*uhh_base;
 
-	struct usbhs_omap_platform_data	platdata;
-
 	u32				usbhs_rev;
 	spinlock_t			lock;
 };
@@ -186,8 +184,6 @@ static int omap_usbhs_alloc_children(struct platform_device *pdev)
 {
 	struct device				*dev = &pdev->dev;
 	struct usbhs_hcd_omap			*omap;
-	struct ehci_hcd_omap_platform_data	*ehci_data;
-	struct ohci_hcd_omap_platform_data	*ohci_data;
 	struct platform_device			*ehci;
 	struct platform_device			*ohci;
 	struct resource				*res;
@@ -195,8 +191,6 @@ static int omap_usbhs_alloc_children(struct platform_device *pdev)
 	int					ret;
 
 	omap = platform_get_drvdata(pdev);
-	ehci_data = omap->platdata.ehci_data;
-	ohci_data = omap->platdata.ohci_data;
 
 	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ehci");
 	if (!res) {
@@ -214,8 +208,8 @@ static int omap_usbhs_alloc_children(struct platform_device *pdev)
 	}
 	resources[1] = *res;
 
-	ehci = omap_usbhs_alloc_child(OMAP_EHCI_DEVICE, resources, 2, ehci_data,
-		sizeof(*ehci_data), dev);
+	ehci = omap_usbhs_alloc_child(OMAP_EHCI_DEVICE, resources, 2, NULL,
+		0, dev);
 
 	if (!ehci) {
 		dev_err(dev, "omap_usbhs_alloc_child failed\n");
@@ -239,8 +233,8 @@ static int omap_usbhs_alloc_children(struct platform_device *pdev)
 	}
 	resources[1] = *res;
 
-	ohci = omap_usbhs_alloc_child(OMAP_OHCI_DEVICE, resources, 2, ohci_data,
-		sizeof(*ohci_data), dev);
+	ohci = omap_usbhs_alloc_child(OMAP_OHCI_DEVICE, resources, 2, NULL,
+		0, dev);
 	if (!ohci) {
 		dev_err(dev, "omap_usbhs_alloc_child failed\n");
 		ret = -ENOMEM;
@@ -279,7 +273,7 @@ static bool is_ohci_port(enum usbhs_omap_port_mode pmode)
 static int usbhs_runtime_resume(struct device *dev)
 {
 	struct usbhs_hcd_omap		*omap = dev_get_drvdata(dev);
-	struct usbhs_omap_platform_data	*pdata = &omap->platdata;
+	struct usbhs_omap_platform_data	*pdata = dev->platform_data;
 	unsigned long			flags;
 
 	dev_dbg(dev, "usbhs_runtime_resume\n");
@@ -295,6 +289,7 @@ static int usbhs_runtime_resume(struct device *dev)
 	if (omap->ehci_logic_fck && !IS_ERR(omap->ehci_logic_fck))
 		clk_enable(omap->ehci_logic_fck);
 
+	clk_enable(pdata->hub_clk);
 	if (is_ehci_tll_mode(pdata->port_mode[0]))
 		clk_enable(omap->usbhost_p1_fck);
 	if (is_ehci_tll_mode(pdata->port_mode[1]))
@@ -311,7 +306,7 @@ static int usbhs_runtime_resume(struct device *dev)
 static int usbhs_runtime_suspend(struct device *dev)
 {
 	struct usbhs_hcd_omap		*omap = dev_get_drvdata(dev);
-	struct usbhs_omap_platform_data	*pdata = &omap->platdata;
+	struct usbhs_omap_platform_data	*pdata = dev->platform_data;
 	unsigned long			flags;
 
 	dev_dbg(dev, "usbhs_runtime_suspend\n");
@@ -331,6 +326,7 @@ static int usbhs_runtime_suspend(struct device *dev)
 	clk_disable(omap->utmi_p2_fck);
 	clk_disable(omap->utmi_p1_fck);
 
+	clk_disable(pdata->hub_clk);
 	if (omap->ehci_logic_fck && !IS_ERR(omap->ehci_logic_fck))
 		clk_disable(omap->ehci_logic_fck);
 
@@ -343,19 +339,29 @@ static int usbhs_runtime_suspend(struct device *dev)
 static void omap_usbhs_init(struct device *dev)
 {
 	struct usbhs_hcd_omap		*omap = dev_get_drvdata(dev);
-	struct usbhs_omap_platform_data	*pdata = &omap->platdata;
+	struct usbhs_omap_platform_data	*pdata = dev->platform_data;
 	unsigned long			flags;
 	unsigned			reg;
 
 	dev_dbg(dev, "starting TI HSUSB Controller\n");
 
-	if (pdata->ehci_data->phy_reset) {
-		if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0]))
-			gpio_request_one(pdata->ehci_data->reset_gpio_port[0],
+	if (gpio_is_valid(pdata->hub_power_gpio))
+		gpio_request_one(pdata->hub_power_gpio, GPIOF_OUT_INIT_HIGH,
+				 "Hub Power");
+	if (gpio_is_valid(pdata->hub_reset_gpio)) {
+		gpio_request_one(pdata->hub_reset_gpio, GPIOF_OUT_INIT_LOW,
+				 "Hub Reset Power");
+		udelay(5);
+		gpio_set_value_cansleep(pdata->hub_reset_gpio, 1);
+	}
+
+	if (pdata->phy_reset) {
+		if (gpio_is_valid(pdata->reset_gpio[0]))
+			gpio_request_one(pdata->reset_gpio[0],
 					 GPIOF_OUT_INIT_LOW, "USB1 PHY reset");
 
-		if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1]))
-			gpio_request_one(pdata->ehci_data->reset_gpio_port[1],
+		if (gpio_is_valid(pdata->reset_gpio[1]))
+			gpio_request_one(pdata->reset_gpio[1],
 					 GPIOF_OUT_INIT_LOW, "USB2 PHY reset");
 
 		/* Hold the PHY in RESET for enough time till DIR is high */
@@ -431,36 +437,85 @@ static void omap_usbhs_init(struct device *dev)
 	spin_unlock_irqrestore(&omap->lock, flags);
 
 	pm_runtime_put_sync(dev);
-	if (pdata->ehci_data->phy_reset) {
+	if (pdata->phy_reset) {
 		/* Hold the PHY in RESET for enough time till
 		 * PHY is settled and ready
 		 */
 		udelay(10);
 
-		if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0]))
+		if (gpio_is_valid(pdata->reset_gpio[0]))
 			gpio_set_value_cansleep
-				(pdata->ehci_data->reset_gpio_port[0], 1);
+				(pdata->reset_gpio[0], 1);
 
-		if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1]))
+		if (gpio_is_valid(pdata->reset_gpio[1]))
 			gpio_set_value_cansleep
-				(pdata->ehci_data->reset_gpio_port[1], 1);
+				(pdata->reset_gpio[1], 1);
 	}
 }
 
 static void omap_usbhs_deinit(struct device *dev)
 {
-	struct usbhs_hcd_omap		*omap = dev_get_drvdata(dev);
-	struct usbhs_omap_platform_data	*pdata = &omap->platdata;
+	struct usbhs_omap_platform_data	*pdata = dev->platform_data;
 
-	if (pdata->ehci_data->phy_reset) {
-		if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0]))
-			gpio_free(pdata->ehci_data->reset_gpio_port[0]);
+	if (pdata->phy_reset) {
+		if (gpio_is_valid(pdata->reset_gpio[0]))
+			gpio_free(pdata->reset_gpio[0]);
 
-		if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1]))
-			gpio_free(pdata->ehci_data->reset_gpio_port[1]);
+		if (gpio_is_valid(pdata->reset_gpio[1]))
+			gpio_free(pdata->reset_gpio[1]);
 	}
 }
 
+static struct usbhs_omap_platform_data *of_get_usbhs_pdata(struct device *dev)
+{
+	struct usbhs_omap_platform_data *pdata;
+	struct device_node *np = dev->of_node;
+	struct property *pp;
+	char hubclk[20];
+
+	pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
+	if (!pdata)
+		return NULL; /* out of memory */
+
+	of_property_read_u32(np, "port-0", &pdata->port_mode[0]);
+	of_property_read_u32(np, "port-1", &pdata->port_mode[1]);
+	of_property_read_u32(np, "port-2", &pdata->port_mode[2]);
+	pdata->reset_gpio[0] = of_get_named_gpio(np, "reset-gpio-1", 0);
+	pdata->reset_gpio[1] = of_get_named_gpio(np, "reset-gpio-2", 0);
+	pdata->reset_gpio[2] = of_get_named_gpio(np, "reset-gpio-3", 0);
+
+	if (gpio_is_valid(pdata->reset_gpio[0]) ||
+	    gpio_is_valid(pdata->reset_gpio[1]) ||
+	    gpio_is_valid(pdata->reset_gpio[2]))
+		pdata->phy_reset = true;
+
+	pp = of_find_property(np, "hub-clk", NULL);
+	if (pp) {
+		strncpy(hubclk, pp->value, 20);
+		pdata->hub_clk = clk_get(NULL, hubclk);
+		if (IS_ERR(pdata->hub_clk)) {
+			dev_err(dev, "hub clk failed error: %ld\n",
+				PTR_ERR(pdata->hub_clk));
+			goto err_end;
+		}
+	} else {
+		pdata->hub_clk = NULL;
+	}
+	if (pdata->hub_clk) {
+		of_property_read_u32(np, "hub-clkrate", &pdata->hub_clkrate);
+		clk_set_rate(pdata->hub_clk, pdata->hub_clkrate);
+	}
+
+	pdata->hub_power_gpio =	of_get_named_gpio(np, "hub-power-gpio", 0);
+	pdata->hub_reset_gpio =	of_get_named_gpio(np, "hub-reset-gpio", 0);
+
+	return pdata;
+
+err_end:
+	devm_kfree(dev, pdata);
+	return NULL;
+}
+
 
 /**
  * usbhs_omap_probe - initialize TI-based HCDs
@@ -470,14 +525,16 @@ static void omap_usbhs_deinit(struct device *dev)
 static int __devinit usbhs_omap_probe(struct platform_device *pdev)
 {
 	struct device			*dev =  &pdev->dev;
-	struct usbhs_omap_platform_data	*pdata = dev->platform_data;
+	struct usbhs_omap_platform_data	*pdata;
 	struct usbhs_hcd_omap		*omap;
 	struct resource			*res;
 	int				ret = 0;
 	int				i;
 
+
+	pdata = of_get_usbhs_pdata(dev);
 	if (!pdata) {
-		dev_err(dev, "Missing platform data\n");
+		dev_err(dev, "function of_get_usbhs_pdata failed\n");
 		ret = -ENOMEM;
 		goto end_probe;
 	}
@@ -486,20 +543,13 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
 	if (!omap) {
 		dev_err(dev, "Memory allocation failed\n");
 		ret = -ENOMEM;
-		goto end_probe;
+		goto err_pdata;
 	}
 
 	spin_lock_init(&omap->lock);
 
-	for (i = 0; i < OMAP3_HS_USB_PORTS; i++)
-		omap->platdata.port_mode[i] = pdata->port_mode[i];
-
-	omap->platdata.ehci_data = pdata->ehci_data;
-	omap->platdata.ohci_data = pdata->ohci_data;
-
 	pm_runtime_enable(dev);
 
-
 	for (i = 0; i < OMAP3_HS_USB_PORTS; i++)
 		if (is_ehci_phy_mode(i) || is_ehci_tll_mode(i) ||
 			is_ehci_hsic_mode(i)) {
@@ -516,7 +566,7 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
 	if (IS_ERR(omap->utmi_p1_fck)) {
 		ret = PTR_ERR(omap->utmi_p1_fck);
 		dev_err(dev, "utmi_p1_gfclk failed error:%d\n",	ret);
-		goto err_end;
+		goto err_ehci_fck;
 	}
 
 	omap->xclk60mhsp1_ck = clk_get(dev, "xclk60mhsp1_ck");
@@ -605,6 +655,7 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
 	}
 
 	platform_set_drvdata(pdev, omap);
+	dev->platform_data = pdata;
 
 	omap_usbhs_init(dev);
 	ret = omap_usbhs_alloc_children(pdev);
@@ -640,11 +691,15 @@ err_xclk60mhsp1_ck:
 err_utmi_p1_fck:
 	clk_put(omap->utmi_p1_fck);
 
-err_end:
+err_ehci_fck:
 	clk_put(omap->ehci_logic_fck);
 	pm_runtime_disable(dev);
 	kfree(omap);
 
+err_pdata:
+	clk_put(pdata->hub_clk);
+	devm_kfree(dev, pdata);
+
 end_probe:
 	return ret;
 }
@@ -657,9 +712,11 @@ end_probe:
  */
 static int __devexit usbhs_omap_remove(struct platform_device *pdev)
 {
-	struct usbhs_hcd_omap *omap = platform_get_drvdata(pdev);
+	struct device			*dev =  &pdev->dev;
+	struct usbhs_hcd_omap		*omap = platform_get_drvdata(pdev);
+	struct usbhs_omap_platform_data	*pdata = dev->platform_data;
 
-	omap_usbhs_deinit(&pdev->dev);
+	omap_usbhs_deinit(dev);
 	iounmap(omap->uhh_base);
 	clk_put(omap->init_60m_fclk);
 	clk_put(omap->usbhost_p2_fck);
@@ -669,7 +726,9 @@ static int __devexit usbhs_omap_remove(struct platform_device *pdev)
 	clk_put(omap->xclk60mhsp1_ck);
 	clk_put(omap->utmi_p1_fck);
 	clk_put(omap->ehci_logic_fck);
-	pm_runtime_disable(&pdev->dev);
+	pm_runtime_disable(dev);
+	clk_put(pdata->hub_clk);
+	devm_kfree(dev, pdata);
 	kfree(omap);
 
 	return 0;
@@ -680,11 +739,23 @@ static const struct dev_pm_ops usbhsomap_dev_pm_ops = {
 	.runtime_resume		= usbhs_runtime_resume,
 };
 
+#ifdef CONFIG_OF
+static const struct of_device_id omap_usbhs_of_match[] = {
+	{
+		.compatible = "ti,usbhs",
+	},
+	{},
+};
+MODULE_DEVICE_TABLE(of, omap_usbhs_of_match);
+
+#endif
+
 static struct platform_driver usbhs_omap_driver = {
 	.driver = {
 		.name		= (char *)usbhs_driver_name,
 		.owner		= THIS_MODULE,
 		.pm		= &usbhsomap_dev_pm_ops,
+		.of_match_table = of_match_ptr(omap_usbhs_of_match),
 	},
 	.remove		= __exit_p(usbhs_omap_remove),
 };
diff --git a/include/linux/platform_data/usb-omap.h b/include/linux/platform_data/usb-omap.h
index 8570bcf..04dcf67 100644
--- a/include/linux/platform_data/usb-omap.h
+++ b/include/linux/platform_data/usb-omap.h
@@ -55,10 +55,23 @@ struct ohci_hcd_omap_platform_data {
 };
 
 struct usbhs_omap_platform_data {
-	enum usbhs_omap_port_mode		port_mode[OMAP3_HS_USB_PORTS];
+	enum usbhs_omap_port_mode	port_mode[OMAP3_HS_USB_PORTS];
+	int				reset_gpio[OMAP3_HS_USB_PORTS];
+
+	/*
+	 * Regulators for USB PHYs.
+	 * Each PHY can have a separate regulator.
+	 */
+	struct regulator		*regulator[OMAP3_HS_USB_PORTS];
 
-	struct ehci_hcd_omap_platform_data	*ehci_data;
-	struct ohci_hcd_omap_platform_data	*ohci_data;
+	unsigned			phy_reset:1;
+
+	/* Set this to true for ES2.x silicon */
+	unsigned			es2_compatibility:1;
+	struct clk			*hub_clk;
+	int				hub_clkrate;
+	int				hub_power_gpio;
+	int				hub_reset_gpio;
 };
 
 /*-------------------------------------------------------------------------*/
-- 
1.7.9.5


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

* [RESEND PATCH 06/11] ARM: OMAP: USB: Host: USB TLL Device tree node Adaptation
  2012-10-31 14:26 [RESEND PATCH 00/11] ARM: OMAP: USB: Host: Device tree Adaptation Keshava Munegowda
                   ` (3 preceding siblings ...)
  2012-10-31 14:26 ` [RESEND PATCH 05/11] ARM: OMAP: USB: Host: usb host Device tree node Adaptation Keshava Munegowda
@ 2012-10-31 14:26 ` Keshava Munegowda
  2012-10-31 14:26 ` [RESEND PATCH 07/11] ARM: OMAP: USB: Host: Ehci driver uses the usbhs port data Keshava Munegowda
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Keshava Munegowda @ 2012-10-31 14:26 UTC (permalink / raw)
  To: linux-omap, devicetree-discuss, linux-doc, linux-usb
  Cc: Keshava Munegowda, balbi, sameo, b-cousson

The USB TLL device node is extracted and used in the probe
of the driver to initialize the driver data.
This TLL driver exports an API to usbhs driver to perform
the port configuration. The usb2 hs driver invoke the same
API in its driver probe to initialize the ports.

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
---
 drivers/mfd/omap-usb-host.c            |    7 ++
 drivers/mfd/omap-usb-tll.c             |  192 +++++++++++++++++++-------------
 include/linux/platform_data/usb-omap.h |    2 +
 3 files changed, 124 insertions(+), 77 deletions(-)

diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 4b3af16..27aa85e 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -657,6 +657,11 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, omap);
 	dev->platform_data = pdata;
 
+	if (omap_tll_init(pdata->port_mode)) {
+		dev_err(dev, "omap_tll_init failed\n");
+		goto err_tll;
+	}
+
 	omap_usbhs_init(dev);
 	ret = omap_usbhs_alloc_children(pdev);
 	if (ret) {
@@ -668,6 +673,8 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
 
 err_alloc:
 	omap_usbhs_deinit(&pdev->dev);
+
+err_tll:
 	iounmap(omap->uhh_base);
 
 err_init_60m_fclk:
diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
index 0db0dfa..f457883 100644
--- a/drivers/mfd/omap-usb-tll.c
+++ b/drivers/mfd/omap-usb-tll.c
@@ -24,6 +24,7 @@
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/io.h>
+#include <linux/of.h>
 #include <linux/err.h>
 #include <linux/pm_runtime.h>
 #include <linux/platform_data/usb-omap.h>
@@ -98,7 +99,9 @@
 struct usbtll_omap {
 	struct clk				*usbtll_p1_fck;
 	struct clk				*usbtll_p2_fck;
-	struct usbtll_omap_platform_data	platdata;
+	void __iomem				*base;
+	enum usbhs_omap_port_mode		port_mode[OMAP3_HS_USB_PORTS];
+
 	/* secure the register updates */
 	spinlock_t				lock;
 };
@@ -196,17 +199,15 @@ static unsigned ohci_omap3_fslsmode(enum usbhs_omap_port_mode mode)
 }
 
 /**
- * usbtll_omap_probe - initialize TI-based HCDs
+ * usbtll_omap_initports - initialize TI-based HCDs
  *
- * Allocates basic resources for this USB host controller.
+ * initialize the usb tll ports. Maximum 3 ports
  */
-static int __devinit usbtll_omap_probe(struct platform_device *pdev)
+
+static int usbtll_initports(struct device *dev,
+			    enum usbhs_omap_port_mode port_mode[])
 {
-	struct device				*dev =  &pdev->dev;
-	struct usbtll_omap_platform_data	*pdata = dev->platform_data;
-	void __iomem				*base;
-	struct resource				*res;
-	struct usbtll_omap			*tll;
+	struct usbtll_omap			*tll = dev_get_drvdata(dev);
 	unsigned				reg;
 	unsigned long				flags;
 	int					ret = 0;
@@ -214,53 +215,19 @@ static int __devinit usbtll_omap_probe(struct platform_device *pdev)
 
 	dev_dbg(dev, "starting TI HSUSB TLL Controller\n");
 
-	tll = kzalloc(sizeof(struct usbtll_omap), GFP_KERNEL);
 	if (!tll) {
-		dev_err(dev, "Memory allocation failed\n");
-		ret = -ENOMEM;
-		goto end;
+		dev_err(dev, "%s: missing TLL Driver data\n", __func__);
+		return -ENOMEM;
 	}
 
-	spin_lock_init(&tll->lock);
-
 	for (i = 0; i < OMAP3_HS_USB_PORTS; i++)
-		tll->platdata.port_mode[i] = pdata->port_mode[i];
+		tll->port_mode[i] = port_mode[i];
 
-	tll->usbtll_p1_fck = clk_get(dev, "usb_tll_hs_usb_ch0_clk");
-	if (IS_ERR(tll->usbtll_p1_fck)) {
-		ret = PTR_ERR(tll->usbtll_p1_fck);
-		dev_err(dev, "usbtll_p1_fck failed error:%d\n", ret);
-		goto err_tll;
-	}
-
-	tll->usbtll_p2_fck = clk_get(dev, "usb_tll_hs_usb_ch1_clk");
-	if (IS_ERR(tll->usbtll_p2_fck)) {
-		ret = PTR_ERR(tll->usbtll_p2_fck);
-		dev_err(dev, "usbtll_p2_fck failed error:%d\n", ret);
-		goto err_usbtll_p1_fck;
-	}
-
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(dev, "usb tll get resource failed\n");
-		ret = -ENODEV;
-		goto err_usbtll_p2_fck;
-	}
-
-	base = ioremap(res->start, resource_size(res));
-	if (!base) {
-		dev_err(dev, "TLL ioremap failed\n");
-		ret = -ENOMEM;
-		goto err_usbtll_p2_fck;
-	}
-
-	platform_set_drvdata(pdev, tll);
-	pm_runtime_enable(dev);
 	pm_runtime_get_sync(dev);
 
 	spin_lock_irqsave(&tll->lock, flags);
 
-	ver =  usbtll_read(base, OMAP_USBTLL_REVISION);
+	ver =  usbtll_read(tll->base, OMAP_USBTLL_REVISION);
 	switch (ver) {
 	case OMAP_USBTLL_REV1:
 	case OMAP_USBTLL_REV2:
@@ -272,34 +239,34 @@ static int __devinit usbtll_omap_probe(struct platform_device *pdev)
 	default:
 		dev_err(dev, "TLL version failed\n");
 		ret = -ENODEV;
-		goto err_ioremap;
+		goto end;
 	}
 
-	if (is_ehci_tll_mode(pdata->port_mode[0]) ||
-	    is_ehci_tll_mode(pdata->port_mode[1]) ||
-	    is_ehci_tll_mode(pdata->port_mode[2]) ||
-	    is_ohci_port(pdata->port_mode[0]) ||
-	    is_ohci_port(pdata->port_mode[1]) ||
-	    is_ohci_port(pdata->port_mode[2])) {
+	if (is_ehci_tll_mode(tll->port_mode[0]) ||
+	    is_ehci_tll_mode(tll->port_mode[1]) ||
+	    is_ehci_tll_mode(tll->port_mode[2]) ||
+	    is_ohci_port(tll->port_mode[0]) ||
+	    is_ohci_port(tll->port_mode[1]) ||
+	    is_ohci_port(tll->port_mode[2])) {
 
 		/* Program Common TLL register */
-		reg = usbtll_read(base, OMAP_TLL_SHARED_CONF);
+		reg = usbtll_read(tll->base, OMAP_TLL_SHARED_CONF);
 		reg |= (OMAP_TLL_SHARED_CONF_FCLK_IS_ON
 			| OMAP_TLL_SHARED_CONF_USB_DIVRATION);
 		reg &= ~OMAP_TLL_SHARED_CONF_USB_90D_DDR_EN;
 		reg &= ~OMAP_TLL_SHARED_CONF_USB_180D_SDR_EN;
 
-		usbtll_write(base, OMAP_TLL_SHARED_CONF, reg);
+		usbtll_write(tll->base, OMAP_TLL_SHARED_CONF, reg);
 
 		/* Enable channels now */
 		for (i = 0; i < count; i++) {
-			reg = usbtll_read(base,	OMAP_TLL_CHANNEL_CONF(i));
+			reg = usbtll_read(tll->base, OMAP_TLL_CHANNEL_CONF(i));
 
-			if (is_ohci_port(pdata->port_mode[i])) {
-				reg |= ohci_omap3_fslsmode(pdata->port_mode[i])
+			if (is_ohci_port(tll->port_mode[i])) {
+				reg |= ohci_omap3_fslsmode(tll->port_mode[i])
 				<< OMAP_TLL_CHANNEL_CONF_FSLSMODE_SHIFT;
 				reg |= OMAP_TLL_CHANNEL_CONF_CHANMODE_FSLS;
-			} else if (pdata->port_mode[i] ==
+			} else if (tll->port_mode[i] ==
 					OMAP_EHCI_PORT_MODE_TLL) {
 				/*
 				 * Disable AutoIdle, BitStuffing
@@ -312,22 +279,75 @@ static int __devinit usbtll_omap_probe(struct platform_device *pdev)
 				continue;
 			}
 			reg |= OMAP_TLL_CHANNEL_CONF_CHANEN;
-			usbtll_write(base, OMAP_TLL_CHANNEL_CONF(i), reg);
+			usbtll_write(tll->base, OMAP_TLL_CHANNEL_CONF(i), reg);
 
-			usbtll_writeb(base,
+			usbtll_writeb(tll->base,
 				      OMAP_TLL_ULPI_SCRATCH_REGISTER(i),
 				      0xbe);
 		}
 	}
 
-err_ioremap:
+end:
 	spin_unlock_irqrestore(&tll->lock, flags);
-	iounmap(base);
 	pm_runtime_put_sync(dev);
+	return ret;
+}
+
+/**
+ * usbtll_omap_probe - initialize TI-based HCDs
+ *
+ * Allocates basic resources for this USB host controller.
+ */
+static int __devinit usbtll_omap_probe(struct platform_device *pdev)
+{
+	struct device				*dev =  &pdev->dev;
+	struct resource				*res;
+	struct usbtll_omap			*tll;
+	int					ret = 0;
+
+	dev_dbg(dev, "starting TI HSUSB TLL Controller\n");
+
+	tll = kzalloc(sizeof(struct usbtll_omap), GFP_KERNEL);
+	if (!tll) {
+		dev_err(dev, "Memory allocation failed\n");
+		ret = -ENOMEM;
+		goto err_tll;
+	}
+
+	spin_lock_init(&tll->lock);
+
+	tll->usbtll_p1_fck = clk_get(dev, "usb_tll_hs_usb_ch0_clk");
+	if (IS_ERR(tll->usbtll_p1_fck)) {
+		ret = PTR_ERR(tll->usbtll_p1_fck);
+		dev_err(dev, "usbtll_p1_fck failed error:%d\n", ret);
+		goto err_tll;
+	}
+
+	tll->usbtll_p2_fck = clk_get(dev, "usb_tll_hs_usb_ch1_clk");
+	if (IS_ERR(tll->usbtll_p2_fck)) {
+		ret = PTR_ERR(tll->usbtll_p2_fck);
+		dev_err(dev, "usbtll_p2_fck failed error:%d\n", ret);
+		goto err_usbtll_p1_fck;
+	}
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (!res) {
+		dev_err(dev, "usb tll get resource failed\n");
+		ret = -ENODEV;
+		goto err_usbtll_p2_fck;
+	}
+
+	tll->base = ioremap(res->start, resource_size(res));
+	if (!tll->base) {
+		dev_err(dev, "TLL ioremap failed\n");
+		ret = -ENOMEM;
+		goto err_usbtll_p2_fck;
+	}
+
+	platform_set_drvdata(pdev, tll);
+	pm_runtime_enable(dev);
 	tll_pdev = pdev;
-	if (!ret)
-		goto end;
-	pm_runtime_disable(dev);
+	return 0;
 
 err_usbtll_p2_fck:
 	clk_put(tll->usbtll_p2_fck);
@@ -337,8 +357,6 @@ err_usbtll_p1_fck:
 
 err_tll:
 	kfree(tll);
-
-end:
 	return ret;
 }
 
@@ -362,22 +380,21 @@ static int __devexit usbtll_omap_remove(struct platform_device *pdev)
 static int usbtll_runtime_resume(struct device *dev)
 {
 	struct usbtll_omap			*tll = dev_get_drvdata(dev);
-	struct usbtll_omap_platform_data	*pdata = &tll->platdata;
 	unsigned long				flags;
 
 	dev_dbg(dev, "usbtll_runtime_resume\n");
 
-	if (!pdata) {
+	if (!tll) {
 		dev_dbg(dev, "missing platform_data\n");
 		return  -ENODEV;
 	}
 
 	spin_lock_irqsave(&tll->lock, flags);
 
-	if (is_ehci_tll_mode(pdata->port_mode[0]))
+	if (is_ehci_tll_mode(tll->port_mode[0]))
 		clk_enable(tll->usbtll_p1_fck);
 
-	if (is_ehci_tll_mode(pdata->port_mode[1]))
+	if (is_ehci_tll_mode(tll->port_mode[1]))
 		clk_enable(tll->usbtll_p2_fck);
 
 	spin_unlock_irqrestore(&tll->lock, flags);
@@ -388,22 +405,21 @@ static int usbtll_runtime_resume(struct device *dev)
 static int usbtll_runtime_suspend(struct device *dev)
 {
 	struct usbtll_omap			*tll = dev_get_drvdata(dev);
-	struct usbtll_omap_platform_data	*pdata = &tll->platdata;
 	unsigned long				flags;
 
 	dev_dbg(dev, "usbtll_runtime_suspend\n");
 
-	if (!pdata) {
+	if (!tll) {
 		dev_dbg(dev, "missing platform_data\n");
 		return  -ENODEV;
 	}
 
 	spin_lock_irqsave(&tll->lock, flags);
 
-	if (is_ehci_tll_mode(pdata->port_mode[0]))
+	if (is_ehci_tll_mode(tll->port_mode[0]))
 		clk_disable(tll->usbtll_p1_fck);
 
-	if (is_ehci_tll_mode(pdata->port_mode[1]))
+	if (is_ehci_tll_mode(tll->port_mode[1]))
 		clk_disable(tll->usbtll_p2_fck);
 
 	spin_unlock_irqrestore(&tll->lock, flags);
@@ -417,16 +433,38 @@ static const struct dev_pm_ops usbtllomap_dev_pm_ops = {
 			   NULL)
 };
 
+#ifdef CONFIG_OF
+static const struct of_device_id omap_tll_of_match[] = {
+	{
+		.compatible = "ti,usbtll",
+	},
+	{},
+};
+MODULE_DEVICE_TABLE(of, omap_tll_of_match);
+
+#endif
+
 static struct platform_driver usbtll_omap_driver = {
 	.driver = {
 		.name		= (char *)usbtll_driver_name,
 		.owner		= THIS_MODULE,
 		.pm		= &usbtllomap_dev_pm_ops,
+		.of_match_table = of_match_ptr(omap_tll_of_match),
 	},
 	.probe		= usbtll_omap_probe,
 	.remove		= __devexit_p(usbtll_omap_remove),
 };
 
+int omap_tll_init(enum usbhs_omap_port_mode port_mode[])
+{
+	if (!tll_pdev) {
+		pr_err("missing omap usbhs tll platform_data\n");
+		return  -ENODEV;
+	}
+	return usbtll_initports(&tll_pdev->dev, port_mode);
+}
+EXPORT_SYMBOL_GPL(omap_tll_init);
+
 int omap_tll_enable(void)
 {
 	if (!tll_pdev) {
diff --git a/include/linux/platform_data/usb-omap.h b/include/linux/platform_data/usb-omap.h
index 04dcf67..3ad2d8a 100644
--- a/include/linux/platform_data/usb-omap.h
+++ b/include/linux/platform_data/usb-omap.h
@@ -91,3 +91,5 @@ enum musb_interface {
 	MUSB_INTERFACE_ULPI,
 	MUSB_INTERFACE_UTMI
 };
+
+extern int omap_tll_init(enum usbhs_omap_port_mode port_mode[]);
-- 
1.7.9.5


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

* [RESEND PATCH 07/11] ARM: OMAP: USB: Host: Ehci driver uses the usbhs port data
  2012-10-31 14:26 [RESEND PATCH 00/11] ARM: OMAP: USB: Host: Device tree Adaptation Keshava Munegowda
                   ` (4 preceding siblings ...)
  2012-10-31 14:26 ` [RESEND PATCH 06/11] ARM: OMAP: USB: Host: USB TLL " Keshava Munegowda
@ 2012-10-31 14:26 ` Keshava Munegowda
  2012-10-31 14:26 ` [RESEND PATCH 08/11] ARM: OMAP: USB: Change the TLL clock names Keshava Munegowda
  2012-10-31 14:26 ` [RESEND PATCH 09/11] ARM: OMAP: USB: Remove the device name for TLL channel clocks for OMAP3 Keshava Munegowda
  7 siblings, 0 replies; 16+ messages in thread
From: Keshava Munegowda @ 2012-10-31 14:26 UTC (permalink / raw)
  To: linux-omap, devicetree-discuss, linux-doc, linux-usb
  Cc: Keshava Munegowda, balbi, sameo, b-cousson

The usbhs core driver data is used by the ehci driver, because
the ehci driver is child of usbhs core. The unused ehci, ohci
and tll specific structures are removed.
platform device creation of usbhs and tll using hwmod is
removed.

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
---
 arch/arm/mach-omap2/usb-host.c         |   66 --------------------------------
 drivers/usb/host/ehci-omap.c           |   40 ++++++++++---------
 include/linux/platform_data/usb-omap.h |   16 --------
 3 files changed, 21 insertions(+), 101 deletions(-)

diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index 239c175..75fa7ca 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -32,24 +32,6 @@
 
 #ifdef CONFIG_MFD_OMAP_USB_HOST
 
-#define OMAP_USBHS_DEVICE	"usbhs_omap"
-#define OMAP_USBTLL_DEVICE	"usbhs_tll"
-#define	USBHS_UHH_HWMODNAME	"usb_host_hs"
-#define USBHS_TLL_HWMODNAME	"usb_tll_hs"
-
-static struct usbhs_omap_platform_data		usbhs_data;
-static struct usbtll_omap_platform_data		usbtll_data;
-static struct ehci_hcd_omap_platform_data	ehci_data;
-static struct ohci_hcd_omap_platform_data	ohci_data;
-
-static struct omap_device_pm_latency omap_uhhtll_latency[] = {
-	  {
-		.deactivate_func = omap_device_idle_hwmods,
-		.activate_func	 = omap_device_enable_hwmods,
-		.flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
-	  },
-};
-
 /* MUX settings for EHCI pins */
 /*
  * setup_ehci_io_mux - initialize IO pad mux for USBHOST
@@ -487,22 +469,6 @@ void __init setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
 
 void __init usbhs_init(const struct usbhs_omap_board_data *pdata)
 {
-	struct omap_hwmod	*uhh_hwm, *tll_hwm;
-	struct platform_device	*pdev;
-	int			bus_id = -1;
-	int			i;
-
-	for (i = 0; i < OMAP3_HS_USB_PORTS; i++) {
-		usbhs_data.port_mode[i] = pdata->port_mode[i];
-		usbtll_data.port_mode[i] = pdata->port_mode[i];
-		ohci_data.port_mode[i] = pdata->port_mode[i];
-		ehci_data.port_mode[i] = pdata->port_mode[i];
-		ehci_data.reset_gpio_port[i] = pdata->reset_gpio_port[i];
-		ehci_data.regulator[i] = pdata->regulator[i];
-	}
-	ehci_data.phy_reset = pdata->phy_reset;
-	ohci_data.es2_compatibility = pdata->es2_compatibility;
-
 	if (cpu_is_omap34xx()) {
 		setup_ehci_io_mux(pdata->port_mode);
 		setup_ohci_io_mux(pdata->port_mode);
@@ -510,38 +476,6 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata)
 		setup_4430ehci_io_mux(pdata->port_mode);
 		setup_4430ohci_io_mux(pdata->port_mode);
 	}
-
-	uhh_hwm = omap_hwmod_lookup(USBHS_UHH_HWMODNAME);
-	if (!uhh_hwm) {
-		pr_err("Could not look up %s\n", USBHS_UHH_HWMODNAME);
-		return;
-	}
-
-	tll_hwm = omap_hwmod_lookup(USBHS_TLL_HWMODNAME);
-	if (!tll_hwm) {
-		pr_err("Could not look up %s\n", USBHS_TLL_HWMODNAME);
-		return;
-	}
-
-	pdev = omap_device_build(OMAP_USBTLL_DEVICE, bus_id, tll_hwm,
-				&usbtll_data, sizeof(usbtll_data),
-				omap_uhhtll_latency,
-				ARRAY_SIZE(omap_uhhtll_latency), false);
-	if (IS_ERR(pdev)) {
-		pr_err("Could not build hwmod device %s\n",
-		       USBHS_TLL_HWMODNAME);
-		return;
-	}
-
-	pdev = omap_device_build(OMAP_USBHS_DEVICE, bus_id, uhh_hwm,
-				&usbhs_data, sizeof(usbhs_data),
-				omap_uhhtll_latency,
-				ARRAY_SIZE(omap_uhhtll_latency), false);
-	if (IS_ERR(pdev)) {
-		pr_err("Could not build hwmod devices %s\n",
-		       USBHS_UHH_HWMODNAME);
-		return;
-	}
 }
 
 #else
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 0d5ac36..a4d57b4 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -107,17 +107,17 @@ static int omap_ehci_init(struct usb_hcd *hcd)
 {
 	struct ehci_hcd		*ehci = hcd_to_ehci(hcd);
 	int			rc;
-	struct ehci_hcd_omap_platform_data	*pdata;
+	struct usbhs_omap_platform_data	*pdata;
 
-	pdata = hcd->self.controller->platform_data;
+	pdata = hcd->self.controller->parent->platform_data;
 
 	/* Hold PHYs in reset while initializing EHCI controller */
 	if (pdata->phy_reset) {
-		if (gpio_is_valid(pdata->reset_gpio_port[0]))
-			gpio_set_value_cansleep(pdata->reset_gpio_port[0], 0);
+		if (gpio_is_valid(pdata->reset_gpio[0]))
+			gpio_set_value_cansleep(pdata->reset_gpio[0], 0);
 
-		if (gpio_is_valid(pdata->reset_gpio_port[1]))
-			gpio_set_value_cansleep(pdata->reset_gpio_port[1], 0);
+		if (gpio_is_valid(pdata->reset_gpio[1]))
+			gpio_set_value_cansleep(pdata->reset_gpio[1], 0);
 
 		/* Hold the PHY in RESET for enough time till DIR is high */
 		udelay(10);
@@ -140,11 +140,11 @@ static int omap_ehci_init(struct usb_hcd *hcd)
 		 */
 		udelay(10);
 
-		if (gpio_is_valid(pdata->reset_gpio_port[0]))
-			gpio_set_value_cansleep(pdata->reset_gpio_port[0], 1);
+		if (gpio_is_valid(pdata->reset_gpio[0]))
+			gpio_set_value_cansleep(pdata->reset_gpio[0], 1);
 
-		if (gpio_is_valid(pdata->reset_gpio_port[1]))
-			gpio_set_value_cansleep(pdata->reset_gpio_port[1], 1);
+		if (gpio_is_valid(pdata->reset_gpio[1]))
+			gpio_set_value_cansleep(pdata->reset_gpio[1], 1);
 	}
 
 	/* root ports should always stay powered */
@@ -154,7 +154,7 @@ static int omap_ehci_init(struct usb_hcd *hcd)
 }
 
 static void disable_put_regulator(
-		struct ehci_hcd_omap_platform_data *pdata)
+		struct usbhs_omap_platform_data *pdata)
 {
 	int i;
 
@@ -179,7 +179,7 @@ static void disable_put_regulator(
 static int ehci_hcd_omap_probe(struct platform_device *pdev)
 {
 	struct device				*dev = &pdev->dev;
-	struct ehci_hcd_omap_platform_data	*pdata = dev->platform_data;
+	struct usbhs_omap_platform_data		*pdata;
 	struct resource				*res;
 	struct usb_hcd				*hcd;
 	void __iomem				*regs;
@@ -196,6 +196,8 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
+	pdata = dev->parent->platform_data;
+
 	irq = platform_get_irq_byname(pdev, "ehci-irq");
 	if (irq < 0) {
 		dev_err(dev, "EHCI irq failed\n");
@@ -289,9 +291,9 @@ err_io:
  */
 static int ehci_hcd_omap_remove(struct platform_device *pdev)
 {
-	struct device *dev				= &pdev->dev;
-	struct usb_hcd *hcd				= dev_get_drvdata(dev);
-	struct ehci_hcd_omap_platform_data *pdata	= dev->platform_data;
+	struct device			*dev = &pdev->dev;
+	struct usb_hcd			*hcd = dev_get_drvdata(dev);
+	struct usbhs_omap_platform_data *pdata	= dev->platform_data;
 
 	usb_remove_hcd(hcd);
 	disable_put_regulator(dev->platform_data);
@@ -302,11 +304,11 @@ static int ehci_hcd_omap_remove(struct platform_device *pdev)
 	pm_runtime_disable(dev);
 
 	if (pdata->phy_reset) {
-		if (gpio_is_valid(pdata->reset_gpio_port[0]))
-			gpio_free(pdata->reset_gpio_port[0]);
+		if (gpio_is_valid(pdata->reset_gpio[0]))
+			gpio_free(pdata->reset_gpio[0]);
 
-		if (gpio_is_valid(pdata->reset_gpio_port[1]))
-			gpio_free(pdata->reset_gpio_port[1]);
+		if (gpio_is_valid(pdata->reset_gpio[1]))
+			gpio_free(pdata->reset_gpio[1]);
 	}
 	return 0;
 }
diff --git a/include/linux/platform_data/usb-omap.h b/include/linux/platform_data/usb-omap.h
index 3ad2d8a..b352bfc 100644
--- a/include/linux/platform_data/usb-omap.h
+++ b/include/linux/platform_data/usb-omap.h
@@ -38,22 +38,6 @@ enum usbhs_omap_port_mode {
 	OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM
 };
 
-struct usbtll_omap_platform_data {
-	enum usbhs_omap_port_mode		port_mode[OMAP3_HS_USB_PORTS];
-};
-
-struct ehci_hcd_omap_platform_data {
-	enum usbhs_omap_port_mode	port_mode[OMAP3_HS_USB_PORTS];
-	int				reset_gpio_port[OMAP3_HS_USB_PORTS];
-	struct regulator		*regulator[OMAP3_HS_USB_PORTS];
-	unsigned			phy_reset:1;
-};
-
-struct ohci_hcd_omap_platform_data {
-	enum usbhs_omap_port_mode	port_mode[OMAP3_HS_USB_PORTS];
-	unsigned			es2_compatibility:1;
-};
-
 struct usbhs_omap_platform_data {
 	enum usbhs_omap_port_mode	port_mode[OMAP3_HS_USB_PORTS];
 	int				reset_gpio[OMAP3_HS_USB_PORTS];
-- 
1.7.9.5


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

* [RESEND PATCH 08/11] ARM: OMAP: USB: Change the TLL clock names
  2012-10-31 14:26 [RESEND PATCH 00/11] ARM: OMAP: USB: Host: Device tree Adaptation Keshava Munegowda
                   ` (5 preceding siblings ...)
  2012-10-31 14:26 ` [RESEND PATCH 07/11] ARM: OMAP: USB: Host: Ehci driver uses the usbhs port data Keshava Munegowda
@ 2012-10-31 14:26 ` Keshava Munegowda
  2012-10-31 14:26 ` [RESEND PATCH 09/11] ARM: OMAP: USB: Remove the device name for TLL channel clocks for OMAP3 Keshava Munegowda
  7 siblings, 0 replies; 16+ messages in thread
From: Keshava Munegowda @ 2012-10-31 14:26 UTC (permalink / raw)
  To: linux-omap, devicetree-discuss, linux-doc, linux-usb
  Cc: Keshava Munegowda, balbi, sameo, b-cousson

The tll ports clock names are renamed as channel clocks.
This is change is just adhere to TRM words

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
---
 drivers/mfd/omap-usb-tll.c |   46 ++++++++++++++++++++++----------------------
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
index f457883..c882d91 100644
--- a/drivers/mfd/omap-usb-tll.c
+++ b/drivers/mfd/omap-usb-tll.c
@@ -97,8 +97,8 @@
 #define is_ehci_tll_mode(x)	(x == OMAP_EHCI_PORT_MODE_TLL)
 
 struct usbtll_omap {
-	struct clk				*usbtll_p1_fck;
-	struct clk				*usbtll_p2_fck;
+	struct clk				*usbtll_ch0_clk;
+	struct clk				*usbtll_ch1_clk;
 	void __iomem				*base;
 	enum usbhs_omap_port_mode		port_mode[OMAP3_HS_USB_PORTS];
 
@@ -316,32 +316,32 @@ static int __devinit usbtll_omap_probe(struct platform_device *pdev)
 
 	spin_lock_init(&tll->lock);
 
-	tll->usbtll_p1_fck = clk_get(dev, "usb_tll_hs_usb_ch0_clk");
-	if (IS_ERR(tll->usbtll_p1_fck)) {
-		ret = PTR_ERR(tll->usbtll_p1_fck);
-		dev_err(dev, "usbtll_p1_fck failed error:%d\n", ret);
+	tll->usbtll_ch0_clk = clk_get(dev, "usb_tll_hs_usb_ch0_clk");
+	if (IS_ERR(tll->usbtll_ch0_clk)) {
+		ret = PTR_ERR(tll->usbtll_ch0_clk);
+		dev_err(dev, "usb_tll_hs_usb_ch0_clk failed error:%d\n", ret);
 		goto err_tll;
 	}
 
-	tll->usbtll_p2_fck = clk_get(dev, "usb_tll_hs_usb_ch1_clk");
-	if (IS_ERR(tll->usbtll_p2_fck)) {
-		ret = PTR_ERR(tll->usbtll_p2_fck);
-		dev_err(dev, "usbtll_p2_fck failed error:%d\n", ret);
-		goto err_usbtll_p1_fck;
+	tll->usbtll_ch1_clk = clk_get(dev, "usb_tll_hs_usb_ch1_clk");
+	if (IS_ERR(tll->usbtll_ch1_clk)) {
+		ret = PTR_ERR(tll->usbtll_ch1_clk);
+		dev_err(dev, "usb_tll_hs_usb_ch1_clk failed error:%d\n", ret);
+		goto err_usbtll_ch0_clk;
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (!res) {
 		dev_err(dev, "usb tll get resource failed\n");
 		ret = -ENODEV;
-		goto err_usbtll_p2_fck;
+		goto err_usbtll_ch1_clk;
 	}
 
 	tll->base = ioremap(res->start, resource_size(res));
 	if (!tll->base) {
 		dev_err(dev, "TLL ioremap failed\n");
 		ret = -ENOMEM;
-		goto err_usbtll_p2_fck;
+		goto err_usbtll_ch1_clk;
 	}
 
 	platform_set_drvdata(pdev, tll);
@@ -349,11 +349,11 @@ static int __devinit usbtll_omap_probe(struct platform_device *pdev)
 	tll_pdev = pdev;
 	return 0;
 
-err_usbtll_p2_fck:
-	clk_put(tll->usbtll_p2_fck);
+err_usbtll_ch1_clk:
+	clk_put(tll->usbtll_ch0_clk);
 
-err_usbtll_p1_fck:
-	clk_put(tll->usbtll_p1_fck);
+err_usbtll_ch0_clk:
+	clk_put(tll->usbtll_ch1_clk);
 
 err_tll:
 	kfree(tll);
@@ -370,8 +370,8 @@ static int __devexit usbtll_omap_remove(struct platform_device *pdev)
 {
 	struct usbtll_omap *tll = platform_get_drvdata(pdev);
 
-	clk_put(tll->usbtll_p2_fck);
-	clk_put(tll->usbtll_p1_fck);
+	clk_put(tll->usbtll_ch1_clk);
+	clk_put(tll->usbtll_ch0_clk);
 	pm_runtime_disable(&pdev->dev);
 	kfree(tll);
 	return 0;
@@ -392,10 +392,10 @@ static int usbtll_runtime_resume(struct device *dev)
 	spin_lock_irqsave(&tll->lock, flags);
 
 	if (is_ehci_tll_mode(tll->port_mode[0]))
-		clk_enable(tll->usbtll_p1_fck);
+		clk_enable(tll->usbtll_ch0_clk);
 
 	if (is_ehci_tll_mode(tll->port_mode[1]))
-		clk_enable(tll->usbtll_p2_fck);
+		clk_enable(tll->usbtll_ch1_clk);
 
 	spin_unlock_irqrestore(&tll->lock, flags);
 
@@ -417,10 +417,10 @@ static int usbtll_runtime_suspend(struct device *dev)
 	spin_lock_irqsave(&tll->lock, flags);
 
 	if (is_ehci_tll_mode(tll->port_mode[0]))
-		clk_disable(tll->usbtll_p1_fck);
+		clk_disable(tll->usbtll_ch0_clk);
 
 	if (is_ehci_tll_mode(tll->port_mode[1]))
-		clk_disable(tll->usbtll_p2_fck);
+		clk_disable(tll->usbtll_ch1_clk);
 
 	spin_unlock_irqrestore(&tll->lock, flags);
 
-- 
1.7.9.5


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

* [RESEND PATCH 09/11] ARM: OMAP: USB: Remove the device name for TLL channel clocks for OMAP3
  2012-10-31 14:26 [RESEND PATCH 00/11] ARM: OMAP: USB: Host: Device tree Adaptation Keshava Munegowda
                   ` (6 preceding siblings ...)
  2012-10-31 14:26 ` [RESEND PATCH 08/11] ARM: OMAP: USB: Change the TLL clock names Keshava Munegowda
@ 2012-10-31 14:26 ` Keshava Munegowda
  7 siblings, 0 replies; 16+ messages in thread
From: Keshava Munegowda @ 2012-10-31 14:26 UTC (permalink / raw)
  To: linux-omap, devicetree-discuss, linux-doc, linux-usb
  Cc: Keshava Munegowda, balbi, sameo, b-cousson

Since TLL channels clocks are dummy(virtual) nodes for OMAP3.
The device names for these clocks are set to NULL.

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
---
 arch/arm/mach-omap2/clock3xxx_data.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index 6cca199..c63c818 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3404,10 +3404,8 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK(NULL,	"xclk60mhsp2_ck",	&dummy_ck,	CK_3XXX),
 	CLK(NULL,	"usb_host_hs_utmi_p1_clk",	&dummy_ck,	CK_3XXX),
 	CLK(NULL,	"usb_host_hs_utmi_p2_clk",	&dummy_ck,	CK_3XXX),
-	CLK("usbhs_omap",	"usb_tll_hs_usb_ch0_clk",	&dummy_ck,	CK_3XXX),
-	CLK("usbhs_omap",	"usb_tll_hs_usb_ch1_clk",	&dummy_ck,	CK_3XXX),
-	CLK("usbhs_tll",	"usb_tll_hs_usb_ch0_clk",	&dummy_ck,	CK_3XXX),
-	CLK("usbhs_tll",	"usb_tll_hs_usb_ch1_clk",	&dummy_ck,	CK_3XXX),
+	CLK(NULL,	"usb_tll_hs_usb_ch0_clk",	&dummy_ck,	CK_3XXX),
+	CLK(NULL,	"usb_tll_hs_usb_ch1_clk",	&dummy_ck,	CK_3XXX),
 	CLK(NULL,	"init_60m_fclk",	&dummy_ck,	CK_3XXX),
 	CLK(NULL,	"usim_fck",	&usim_fck,	CK_3430ES2PLUS | CK_36XX),
 	CLK(NULL,	"gpt1_fck",	&gpt1_fck,	CK_3XXX),
-- 
1.7.9.5


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

* [RESEND PATCH 10/11] ARM: OMAP4: USB: Add pin mux configuration for panda board
       [not found] ` <1351693612-23314-1-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
  2012-10-31 14:26   ` [RESEND PATCH 03/11] ARM: OMAP3: USB: Add USB2 Host Device Tree Node Keshava Munegowda
  2012-10-31 14:26   ` [RESEND PATCH 04/11] ARM: OMAP3: USB: Host: Beagle-XM board specific device tree node Keshava Munegowda
@ 2012-10-31 14:26   ` Keshava Munegowda
  2012-10-31 14:26   ` [RESEND PATCH 11/11] ARM: OMAP3: USB: Add pin mux configuration for beagle-xm board Keshava Munegowda
  3 siblings, 0 replies; 16+ messages in thread
From: Keshava Munegowda @ 2012-10-31 14:26 UTC (permalink / raw)
  To: linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA
  Cc: Keshava Munegowda, balbi-l0cyMroinI0,
	sameo-VuQAYsv1563Yd54FQh9/CA, b-cousson-l0cyMroinI0

The port1 of omap4 panda board is used in ULPI PHY mode.
The pin mux of usbhs (usbb1) port 1 is configured accordingly.

Signed-off-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org>
---
 arch/arm/boot/dts/omap4-panda.dts |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/omap4-panda.dts b/arch/arm/boot/dts/omap4-panda.dts
index dad0df6..ea374cf 100644
--- a/arch/arm/boot/dts/omap4-panda.dts
+++ b/arch/arm/boot/dts/omap4-panda.dts
@@ -65,6 +65,7 @@
 			&twl6040_pins
 			&mcpdm_pins
 			&mcbsp1_pins
+			&usbb1_pins   /* port 0 of omap usb host port pin mux configuration */
 	>;
 
 	twl6040_pins: pinmux_twl6040_pins {
@@ -92,6 +93,23 @@
 			0xc4 0x100	/* abe_mcbsp1_fsx.abe_mcbsp1_fsx INPUT | MODE0 */
 		>;
 	};
+
+	usbb1_pins: pinmux_usbb1_pins {
+		pinctrl-single,pins = <
+			0x82 0x10C  /* USBB1_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_clk INPUT | PULLDOWN */
+			0x84 0x4  /* USBB1_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_stp OUTPUT */
+			0x86 0x104  /* USBB1_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dir INPUT | PULLDOWN */
+			0x88 0x104  /* USBB1_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_nxt INPUT | PULLDOWN */
+			0x8a 0x104  /* USBB1_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat0 INPUT | PULLDOWN */
+			0x8c 0x104  /* USBB1_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat1 INPUT | PULLDOWN */
+			0x8e 0x104  /* USBB1_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat2 INPUT | PULLDOWN */
+			0x90 0x104  /* USBB1_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat3 INPUT | PULLDOWN */
+			0x92 0x104  /* USBB1_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat4 INPUT | PULLDOWN */
+			0x94 0x104  /* USBB1_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat5 INPUT | PULLDOWN */
+			0x96 0x104  /* USBB1_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat6 INPUT | PULLDOWN */
+			0x98 0x104  /* USBB1_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat7 INPUT | PULLDOWN */
+		>;
+	};
 };
 
 &i2c1 {
-- 
1.7.9.5

--
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] 16+ messages in thread

* [RESEND PATCH 11/11] ARM: OMAP3: USB: Add pin mux configuration for beagle-xm board
       [not found] ` <1351693612-23314-1-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
                     ` (2 preceding siblings ...)
  2012-10-31 14:26   ` [RESEND PATCH 10/11] ARM: OMAP4: USB: Add pin mux configuration for panda board Keshava Munegowda
@ 2012-10-31 14:26   ` Keshava Munegowda
  3 siblings, 0 replies; 16+ messages in thread
From: Keshava Munegowda @ 2012-10-31 14:26 UTC (permalink / raw)
  To: linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA
  Cc: Keshava Munegowda, balbi-l0cyMroinI0,
	sameo-VuQAYsv1563Yd54FQh9/CA, b-cousson-l0cyMroinI0

The port2 of omap4 panda board is used in ULPI PHY mode.
The pin mux of usbhs (usbb2) port 2 is configured accordingly.

Signed-off-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org>
---
 arch/arm/boot/dts/omap3-beagle-xm.dts |   24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts
index b9f8667..c5da799 100644
--- a/arch/arm/boot/dts/omap3-beagle-xm.dts
+++ b/arch/arm/boot/dts/omap3-beagle-xm.dts
@@ -88,6 +88,30 @@
 	};
 };
 
+&omap3_pmx_core {
+	pinctrl-names = "default";
+	pinctrl-0 = <
+			&usbb2_pins   /* port 1 of omap usb host port pin mux configuration */
+	>;
+
+	usbb2_pins: pinmux_usbb2_pins {
+		pinctrl-single,pins = <
+			0x5c0 0x3  /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_clk OUTPUT */
+			0x5c2 0x3  /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_stp OUTPUT */
+			0x5c4 0x10b  /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dir INPUT | PULLDOWN */
+			0x5c6 0x10b  /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_nxt INPUT | PULLDOWN */
+			0x5c8 0x10b  /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat0 INPUT | PULLDOWN */
+			0x5cA 0x10b  /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat1 INPUT | PULLDOWN */
+			0x1a4 0x10b  /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat2 INPUT | PULLDOWN */
+			0x1a6 0x10b  /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat3 INPUT | PULLDOWN */
+			0x1a8 0x10b  /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat4 INPUT | PULLDOWN */
+			0x1aa 0x10b  /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat5 INPUT | PULLDOWN */
+			0x1ac 0x10b  /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat6 INPUT | PULLDOWN */
+			0x1ae 0x10b  /* USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat7 INPUT | PULLDOWN */
+		>;
+	};
+};
+
 &mmc1 {
 	vmmc-supply = <&vmmc1>;
 	vmmc_aux-supply = <&vsim>;
-- 
1.7.9.5

--
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] 16+ messages in thread

* Re: [RESEND PATCH 05/11] ARM: OMAP: USB: Host: usb host Device tree node Adaptation
       [not found]   ` <1351693612-23314-6-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
@ 2012-10-31 18:29     ` Tony Lindgren
       [not found]       ` <20121031182903.GN12739-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Tony Lindgren @ 2012-10-31 18:29 UTC (permalink / raw)
  To: Keshava Munegowda
  Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, balbi-l0cyMroinI0,
	sameo-VuQAYsv1563Yd54FQh9/CA, b-cousson-l0cyMroinI0

* Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org> [121031 07:29]:
> The USB2 Host device node is extracted and used in the probe
> of the driver to initialize the usb ports and controller. The
> platform specific initialization is also performed.
> 
> Signed-off-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org>
> ---
>  arch/arm/mach-omap2/usb-host.c         |    2 -
>  drivers/mfd/omap-usb-host.c            |  163 +++++++++++++++++++++++---------
>  include/linux/platform_data/usb-omap.h |   19 +++-
>  3 files changed, 133 insertions(+), 51 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
> index d1dbe12..239c175 100644
> --- a/arch/arm/mach-omap2/usb-host.c
> +++ b/arch/arm/mach-omap2/usb-host.c
> @@ -502,8 +502,6 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata)
>  	}
>  	ehci_data.phy_reset = pdata->phy_reset;
>  	ohci_data.es2_compatibility = pdata->es2_compatibility;
> -	usbhs_data.ehci_data = &ehci_data;
> -	usbhs_data.ohci_data = &ohci_data;
>  
>  	if (cpu_is_omap34xx()) {
>  		setup_ehci_io_mux(pdata->port_mode);

Just checking.. Have you tested that these patches also
still work without device tree?

Regards,

Tony
--
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	[flat|nested] 16+ messages in thread

* RE: [RESEND PATCH 05/11] ARM: OMAP: USB: Host: usb host Device tree node Adaptation
       [not found]       ` <20121031182903.GN12739-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
@ 2012-11-01  8:19         ` Munegowda, Keshava
  2012-11-01 10:21           ` Felipe Balbi
  0 siblings, 1 reply; 16+ messages in thread
From: Munegowda, Keshava @ 2012-11-01  8:19 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Balbi, Felipe,
	sameo-VuQAYsv1563Yd54FQh9/CA, Cousson, Benoit


________________________________________
From: Tony Lindgren [tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org]
Sent: Wednesday, October 31, 2012 11:59 PM
To: Munegowda, Keshava
Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Balbi, Felipe; sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org; Cousson, Benoit
Subject: Re: [RESEND PATCH 05/11] ARM: OMAP: USB: Host: usb host Device tree node Adaptation

* Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org> [121031 07:29]:
> The USB2 Host device node is extracted and used in the probe
> of the driver to initialize the usb ports and controller. The
> platform specific initialization is also performed.
>
> Signed-off-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org>
> ---
>  arch/arm/mach-omap2/usb-host.c         |    2 -
>  drivers/mfd/omap-usb-host.c            |  163 +++++++++++++++++++++++---------
>  include/linux/platform_data/usb-omap.h |   19 +++-
>  3 files changed, 133 insertions(+), 51 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
> index d1dbe12..239c175 100644
> --- a/arch/arm/mach-omap2/usb-host.c
> +++ b/arch/arm/mach-omap2/usb-host.c
> @@ -502,8 +502,6 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata)
>       }
>       ehci_data.phy_reset = pdata->phy_reset;
>       ohci_data.es2_compatibility = pdata->es2_compatibility;
> -     usbhs_data.ehci_data = &ehci_data;
> -     usbhs_data.ohci_data = &ohci_data;
>
>       if (cpu_is_omap34xx()) {
>               setup_ehci_io_mux(pdata->port_mode);

Just checking.. Have you tested that these patches also
still work without device tree?

Regards,

Tony


No ! with out device tree enabled , these patches does not work.
do I need to make a code such way that it works with and without
device tree..?

regards
keshava

--
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	[flat|nested] 16+ messages in thread

* Re: [RESEND PATCH 05/11] ARM: OMAP: USB: Host: usb host Device tree node Adaptation
  2012-11-01  8:19         ` Munegowda, Keshava
@ 2012-11-01 10:21           ` Felipe Balbi
  2012-11-01 15:12             ` Munegowda, Keshava
  0 siblings, 1 reply; 16+ messages in thread
From: Felipe Balbi @ 2012-11-01 10:21 UTC (permalink / raw)
  To: Munegowda, Keshava
  Cc: Tony Lindgren, linux-omap, devicetree-discuss, linux-doc,
	linux-usb, Balbi, Felipe, sameo, Cousson, Benoit

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

On Thu, Nov 01, 2012 at 09:19:48AM +0100, Munegowda, Keshava wrote:
> 
> ________________________________________
> From: Tony Lindgren [tony@atomide.com]
> Sent: Wednesday, October 31, 2012 11:59 PM
> To: Munegowda, Keshava
> Cc: linux-omap@vger.kernel.org; devicetree-discuss@lists.ozlabs.org; linux-doc@vger.kernel.org; linux-usb@vger.kernel.org; Balbi, Felipe; sameo@linux.intel.com; Cousson, Benoit
> Subject: Re: [RESEND PATCH 05/11] ARM: OMAP: USB: Host: usb host Device tree node Adaptation
> 
> * Keshava Munegowda <keshava_mgowda@ti.com> [121031 07:29]:
> > The USB2 Host device node is extracted and used in the probe
> > of the driver to initialize the usb ports and controller. The
> > platform specific initialization is also performed.
> >
> > Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
> > ---
> >  arch/arm/mach-omap2/usb-host.c         |    2 -
> >  drivers/mfd/omap-usb-host.c            |  163 +++++++++++++++++++++++---------
> >  include/linux/platform_data/usb-omap.h |   19 +++-
> >  3 files changed, 133 insertions(+), 51 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
> > index d1dbe12..239c175 100644
> > --- a/arch/arm/mach-omap2/usb-host.c
> > +++ b/arch/arm/mach-omap2/usb-host.c
> > @@ -502,8 +502,6 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata)
> >       }
> >       ehci_data.phy_reset = pdata->phy_reset;
> >       ohci_data.es2_compatibility = pdata->es2_compatibility;
> > -     usbhs_data.ehci_data = &ehci_data;
> > -     usbhs_data.ohci_data = &ohci_data;
> >
> >       if (cpu_is_omap34xx()) {
> >               setup_ehci_io_mux(pdata->port_mode);
> 
> Just checking.. Have you tested that these patches also
> still work without device tree?
> 
> Regards,
> 
> Tony
> 
> 
> No ! with out device tree enabled , these patches does not work.
> do I need to make a code such way that it works with and without
> device tree..?

yes. OMAP3/4 still have lots of legacy platform_data-only board support
;-)

-- 
balbi

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

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

* RE: [RESEND PATCH 05/11] ARM: OMAP: USB: Host: usb host Device tree node Adaptation
  2012-11-01 10:21           ` Felipe Balbi
@ 2012-11-01 15:12             ` Munegowda, Keshava
  0 siblings, 0 replies; 16+ messages in thread
From: Munegowda, Keshava @ 2012-11-01 15:12 UTC (permalink / raw)
  To: Balbi, Felipe
  Cc: Tony Lindgren, linux-omap, devicetree-discuss, linux-doc,
	linux-usb, sameo, Cousson, Benoit


________________________________________
From: Balbi, Felipe
Sent: Thursday, November 01, 2012 3:51 PM
To: Munegowda, Keshava
Cc: Tony Lindgren; linux-omap@vger.kernel.org; devicetree-discuss@lists.ozlabs.org; linux-doc@vger.kernel.org; linux-usb@vger.kernel.org; Balbi, Felipe; sameo@linux.intel.com; Cousson, Benoit
Subject: Re: [RESEND PATCH 05/11] ARM: OMAP: USB: Host: usb host Device tree node Adaptation

On Thu, Nov 01, 2012 at 09:19:48AM +0100, Munegowda, Keshava wrote:
>
> ________________________________________
> From: Tony Lindgren [tony@atomide.com]
> Sent: Wednesday, October 31, 2012 11:59 PM
> To: Munegowda, Keshava
> Cc: linux-omap@vger.kernel.org; devicetree-discuss@lists.ozlabs.org; linux-doc@vger.kernel.org; linux-usb@vger.kernel.org; Balbi, Felipe; sameo@linux.intel.com; Cousson, Benoit
> Subject: Re: [RESEND PATCH 05/11] ARM: OMAP: USB: Host: usb host Device tree node Adaptation
>
> * Keshava Munegowda <keshava_mgowda@ti.com> [121031 07:29]:
> > The USB2 Host device node is extracted and used in the probe
> > of the driver to initialize the usb ports and controller. The
> > platform specific initialization is also performed.
> >
> > Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
> > ---
> >  arch/arm/mach-omap2/usb-host.c         |    2 -
> >  drivers/mfd/omap-usb-host.c            |  163 +++++++++++++++++++++++---------
> >  include/linux/platform_data/usb-omap.h |   19 +++-
> >  3 files changed, 133 insertions(+), 51 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
> > index d1dbe12..239c175 100644
> > --- a/arch/arm/mach-omap2/usb-host.c
> > +++ b/arch/arm/mach-omap2/usb-host.c
> > @@ -502,8 +502,6 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata)
> >       }
> >       ehci_data.phy_reset = pdata->phy_reset;
> >       ohci_data.es2_compatibility = pdata->es2_compatibility;
> > -     usbhs_data.ehci_data = &ehci_data;
> > -     usbhs_data.ohci_data = &ohci_data;
> >
> >       if (cpu_is_omap34xx()) {
> >               setup_ehci_io_mux(pdata->port_mode);
>
> Just checking.. Have you tested that these patches also
> still work without device tree?
>
> Regards,
>
> Tony
>
>
> No ! with out device tree enabled , these patches does not work.
> do I need to make a code such way that it works with and without
> device tree..?

yes. OMAP3/4 still have lots of legacy platform_data-only board support
;-)


Thanks Felipe.
   I will do this.

regards
keshava


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

end of thread, other threads:[~2012-11-01 15:12 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-31 14:26 [RESEND PATCH 00/11] ARM: OMAP: USB: Host: Device tree Adaptation Keshava Munegowda
2012-10-31 14:26 ` [RESEND PATCH 01/11] ARM: OMAP4: USB: Host: Add USB2 Host Device Tree Node Keshava Munegowda
2012-10-31 14:26 ` [RESEND PATCH 02/11] ARM: OMAP4: USB: Host: Panda board specific device tree node Keshava Munegowda
     [not found] ` <1351693612-23314-1-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
2012-10-31 14:26   ` [RESEND PATCH 03/11] ARM: OMAP3: USB: Add USB2 Host Device Tree Node Keshava Munegowda
2012-10-31 14:26   ` [RESEND PATCH 04/11] ARM: OMAP3: USB: Host: Beagle-XM board specific device tree node Keshava Munegowda
2012-10-31 14:26   ` [RESEND PATCH 10/11] ARM: OMAP4: USB: Add pin mux configuration for panda board Keshava Munegowda
2012-10-31 14:26   ` [RESEND PATCH 11/11] ARM: OMAP3: USB: Add pin mux configuration for beagle-xm board Keshava Munegowda
2012-10-31 14:26 ` [RESEND PATCH 05/11] ARM: OMAP: USB: Host: usb host Device tree node Adaptation Keshava Munegowda
     [not found]   ` <1351693612-23314-6-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
2012-10-31 18:29     ` Tony Lindgren
     [not found]       ` <20121031182903.GN12739-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2012-11-01  8:19         ` Munegowda, Keshava
2012-11-01 10:21           ` Felipe Balbi
2012-11-01 15:12             ` Munegowda, Keshava
2012-10-31 14:26 ` [RESEND PATCH 06/11] ARM: OMAP: USB: Host: USB TLL " Keshava Munegowda
2012-10-31 14:26 ` [RESEND PATCH 07/11] ARM: OMAP: USB: Host: Ehci driver uses the usbhs port data Keshava Munegowda
2012-10-31 14:26 ` [RESEND PATCH 08/11] ARM: OMAP: USB: Change the TLL clock names Keshava Munegowda
2012-10-31 14:26 ` [RESEND PATCH 09/11] ARM: OMAP: USB: Remove the device name for TLL channel clocks for OMAP3 Keshava Munegowda

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.