linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods
@ 2011-09-09 14:52 Keshava Munegowda
  2011-09-09 14:52 ` [PATCH 1/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap4 Keshava Munegowda
  2011-09-22 23:38 ` [PATCH 0/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods Paul Walmsley
  0 siblings, 2 replies; 6+ messages in thread
From: Keshava Munegowda @ 2011-09-09 14:52 UTC (permalink / raw)
  To: linux-usb, linux-omap, linux-kernel
  Cc: Keshava Munegowda, balbi, gadiyar, sameo, parthab, tony, khilman,
	b-cousson, paul, johnstul, vishwanath.bs, Keshava Munegowda

From: Keshava Munegowda <Keshava_mgowda@ti.com>

For ehci and ohci hwmods,
the omap3 and omap4 I/O wakeup capablity is enabled.
In case of system global suspend, The ehci/ohci device 
connection/disconnection and remote wakeup wakesup the system.

This patch series is based on
1. 	I/O pads initialization to ehci and ohci hwmod
2.      Runtime PM support of usbhs of omap3 and omap4
       These patches are avilable at branch kmg-usbhs-pm
       code repository : git://gitorious.org/~kmg/mirrors/kmg-usbhs-pm.git
3.      Kevin's pm branch



Keshava Munegowda (1):
  arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap3

Kishon Vijay Abraham (1):
  arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap4

 arch/arm/mach-omap2/usb-host.c |  172 +++++++++++++++++++++++++++++++++-------
 1 files changed, 144 insertions(+), 28 deletions(-)


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

* [PATCH 1/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap4
  2011-09-09 14:52 [PATCH 0/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods Keshava Munegowda
@ 2011-09-09 14:52 ` Keshava Munegowda
  2011-09-09 14:52   ` [PATCH 2/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap3 Keshava Munegowda
  2011-09-09 18:27   ` [PATCH 1/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap4 Kevin Hilman
  2011-09-22 23:38 ` [PATCH 0/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods Paul Walmsley
  1 sibling, 2 replies; 6+ messages in thread
From: Keshava Munegowda @ 2011-09-09 14:52 UTC (permalink / raw)
  To: linux-usb, linux-omap, linux-kernel
  Cc: Keshava Munegowda, balbi, gadiyar, sameo, parthab, tony, khilman,
	b-cousson, paul, johnstul, vishwanath.bs, Kishon Vijay Abraham

From: Kishon Vijay Abraham <kishon@ti.com>

For ehci and ohci hwmods, the omap4 I/O wakeup capablity is enabled.
for ehci in phy mode,
	- the DAT0 and DIR I/O pad is set as wakeup capable
for ohci in serial mode
	- usbb*_mm_rxdp is set as I/O wakeup for 6 pin serial mode
	- usbb*_mm_rxrcv is set as I/O wakeup for 4 pin serial mode
	- usbb*_mm_txen is set as I/O wakeup for 3 pin serial mode
	- usbb*_mm_txdat is set as I/O wakeup for 2 pin serial mode

Signed-off-by: Kishon Vijay Abraham <kishon@ti.com>
Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
---
 arch/arm/mach-omap2/usb-host.c |   76 +++++++++++++++++++++++++++++++++------
 1 files changed, 64 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index 485341f..cf2e726 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -64,7 +64,12 @@ static struct omap_device_pad port1_phy_pads[] __initdata = {
 	},
 	{
 		.name = "usbb1_ulpitll_dir.usbb1_ulpiphy_dir",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4 |
+						OMAP_WAKEUP_EN,
+
 	},
 	{
 		.name = "usbb1_ulpitll_nxt.usbb1_ulpiphy_nxt",
@@ -72,7 +77,12 @@ static struct omap_device_pad port1_phy_pads[] __initdata = {
 	},
 	{
 		.name = "usbb1_ulpitll_dat0.usbb1_ulpiphy_dat0",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4 |
+						OMAP_WAKEUP_EN,
+
 	},
 	{
 		.name = "usbb1_ulpitll_dat1.usbb1_ulpiphy_dat1",
@@ -166,7 +176,11 @@ static struct omap_device_pad port2_phy_pads[] __initdata = {
 	},
 	{
 		.name = "usbb2_ulpitll_dir.usbb2_ulpiphy_dir",
-		.enable	= OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "usbb2_ulpitll_nxt.usbb2_ulpiphy_nxt",
@@ -174,7 +188,12 @@ static struct omap_device_pad port2_phy_pads[] __initdata = {
 	},
 	{
 		.name = "usbb2_ulpitll_dat0.usbb2_ulpiphy_dat0",
-		.enable	= OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4 |
+						OMAP_WAKEUP_EN,
+
 	},
 	{
 		.name = "usbb2_ulpitll_dat1.usbb2_ulpiphy_dat1",
@@ -260,7 +279,11 @@ static struct omap_device_pad port2_tll_pads[] __initdata = {
 static struct omap_device_pad port1_6pin_pads[] __initdata = {
 	{
 		.name = "usbb1_ulpitll_stp.usbb1_mm_rxdp",
-		.enable	= OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle	= OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "usbb1_ulpitll_nxt.usbb1_mm_rxdm",
@@ -287,7 +310,11 @@ static struct omap_device_pad port1_6pin_pads[] __initdata = {
 static struct omap_device_pad port1_4pin_pads[] __initdata = {
 	{
 		.name = "usbb1_ulpitll_dat0.usbb1_mm_rxrcv",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle	= OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "usbb1_ulpitll_dat3.usbb1_mm_txen",
@@ -306,7 +333,12 @@ static struct omap_device_pad port1_4pin_pads[] __initdata = {
 static struct omap_device_pad port1_3pin_pads[] __initdata = {
 	{
 		.name = "usbb1_ulpitll_dat3.usbb1_mm_txen",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle	= OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5 |
+						OMAP_WAKEUP_EN,
+
 	},
 	{
 		.name = "usbb1_ulpitll_dat1.usbb1_mm_txdat",
@@ -321,7 +353,11 @@ static struct omap_device_pad port1_3pin_pads[] __initdata = {
 static struct omap_device_pad port1_2pin_pads[] __initdata = {
 	{
 		.name = "usbb1_ulpitll_dat1.usbb1_mm_txdat",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle	= OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "usbb1_ulpitll_dat2.usbb1_mm_txse0",
@@ -332,7 +368,11 @@ static struct omap_device_pad port1_2pin_pads[] __initdata = {
 static struct omap_device_pad port2_6pin_pads[] __initdata = {
 	{
 		.name = "abe_mcbsp2_dr.usbb2_mm_rxdp",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle	= OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "abe_mcbsp2_clkx.usbb2_mm_rxdm",
@@ -359,7 +399,11 @@ static struct omap_device_pad port2_6pin_pads[] __initdata = {
 static struct omap_device_pad port2_4pin_pads[] __initdata = {
 	{
 		.name = "abe_mcbsp2_dx.usbb2_mm_rxrcv",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle	= OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "abe_mcbsp2_fsx.usbb2_mm_txen",
@@ -378,7 +422,11 @@ static struct omap_device_pad port2_4pin_pads[] __initdata = {
 static struct omap_device_pad port2_3pin_pads[] __initdata = {
 	{
 		.name = "abe_mcbsp2_fsx.usbb2_mm_txen",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle	= OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "abe_dmic_din1.usbb2_mm_txdat",
@@ -393,7 +441,11 @@ static struct omap_device_pad port2_3pin_pads[] __initdata = {
 static struct omap_device_pad port2_2pin_pads[] __initdata = {
 	{
 		.name = "abe_dmic_din1.usbb2_mm_txdat",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle	= OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "abe_dmic_clk1.usbb2_mm_txse0",
-- 
1.6.0.4


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

* [PATCH 2/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap3
  2011-09-09 14:52 ` [PATCH 1/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap4 Keshava Munegowda
@ 2011-09-09 14:52   ` Keshava Munegowda
  2011-09-09 18:27   ` [PATCH 1/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap4 Kevin Hilman
  1 sibling, 0 replies; 6+ messages in thread
From: Keshava Munegowda @ 2011-09-09 14:52 UTC (permalink / raw)
  To: linux-usb, linux-omap, linux-kernel
  Cc: Keshava Munegowda, balbi, gadiyar, sameo, parthab, tony, khilman,
	b-cousson, paul, johnstul, vishwanath.bs, Keshava Munegowda

From: Keshava Munegowda <Keshava_mgowda@ti.com>

For ehci and ohci hwmods, the omap3 I/O wakeup capablity is enabled.
for ehci in phy mode,
	- the DAT0 and DIR I/O pad is set as wakeup capable
for ohci in serial mode
	- usbb*_mm_rxdp is set as I/O wakeup for 6 pin serial mode
	- usbb*_mm_rxrcv is set as I/O wakeup for 4 pin serial mode
	- usbb*_mm_txen is set as I/O wakeup for 3 pin serial mode
	- usbb*_mm_txdat is set as I/O wakeup for 2 pin serial mode

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
---
 arch/arm/mach-omap2/usb-host.c |   96 +++++++++++++++++++++++++++++++++-------
 1 files changed, 80 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index cf2e726..d3cb100 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -467,7 +467,11 @@ static struct omap_device_pad omap3_port1_phy_pads[] __initdata = {
 	},
 	{
 		.name = "etk_d8.hsusb1_dir",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE3,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE3) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE3 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "etk_d9.hsusb1_nxt",
@@ -475,7 +479,11 @@ static struct omap_device_pad omap3_port1_phy_pads[] __initdata = {
 	},
 	{
 		.name = "etk_d0.hsusb1_data0",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE3,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE3) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE3 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "etk_d1.hsusb1_data1",
@@ -569,7 +577,11 @@ static struct omap_device_pad omap3_port2_phy_pads[] __initdata = {
 	},
 	{
 		.name = "etk_d12.hsusb2_dir",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE3,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE3) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE3 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "etk_d13.hsusb2_nxt",
@@ -577,7 +589,11 @@ static struct omap_device_pad omap3_port2_phy_pads[] __initdata = {
 	},
 	{
 		.name = "etk_d14.hsusb2_data0",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE3,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE3) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE3 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "etk_d15.hsusb2_data1",
@@ -714,7 +730,11 @@ static struct omap_device_pad omap3_port3_tll_pads[] __initdata = {
 static struct omap_device_pad omap3_port1_6pin_pads[] __initdata = {
 	{
 		.name = "etk_clk.mm1_rxdp",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "etk_d9.mm1_rxdm",
@@ -741,7 +761,11 @@ static struct omap_device_pad omap3_port1_6pin_pads[] __initdata = {
 static struct omap_device_pad omap3_port1_4pin_pads[] __initdata = {
 	{
 		.name = "etk_d0.mm1_rxrcv",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "etk_d7.mm1_txen_n",
@@ -760,7 +784,11 @@ static struct omap_device_pad omap3_port1_4pin_pads[] __initdata = {
 static struct omap_device_pad omap3_port1_3pin_pads[] __initdata = {
 	{
 		.name = "etk_d7.mm1_txen_n",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "etk_d2.mm1_txdat",
@@ -775,7 +803,11 @@ static struct omap_device_pad omap3_port1_3pin_pads[] __initdata = {
 static struct omap_device_pad omap3_port1_2pin_pads[] __initdata = {
 	{
 		.name = "etk_d2.mm1_txdat",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "etk_d1.mm1_txse0",
@@ -786,7 +818,11 @@ static struct omap_device_pad omap3_port1_2pin_pads[] __initdata = {
 static struct omap_device_pad omap3_port2_6pin_pads[] __initdata = {
 	{
 		.name = "etk_d11.mm2_rxdp",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "etk_d13.mm2_rxdm",
@@ -813,7 +849,11 @@ static struct omap_device_pad omap3_port2_6pin_pads[] __initdata = {
 static struct omap_device_pad omap3_port2_4pin_pads[] __initdata = {
 	{
 		.name = "etk_d14.mm2_rxrcv",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "mcspi2_cs1.mm2_txen_n",
@@ -832,7 +872,11 @@ static struct omap_device_pad omap3_port2_4pin_pads[] __initdata = {
 static struct omap_device_pad omap3_port2_3pin_pads[] __initdata = {
 	{
 		.name = "mcspi2_cs1.mm2_txen_n",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "etk_d15.mm2_txse0",
@@ -847,7 +891,11 @@ static struct omap_device_pad omap3_port2_3pin_pads[] __initdata = {
 static struct omap_device_pad omap3_port2_2pin_pads[] __initdata = {
 	{
 		.name = "etk_d15.mm2_txse0",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE5 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "mcspi1_cs3.mm2_txdat",
@@ -858,7 +906,11 @@ static struct omap_device_pad omap3_port2_2pin_pads[] __initdata = {
 static struct omap_device_pad omap3_port3_6pin_pads[] __initdata = {
 	{
 		.name = "sdmmc2_dat5.mm3_rxdp",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE6,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE6) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE6 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "sdmmc2_dat7.mm3_rxdm",
@@ -885,7 +937,11 @@ static struct omap_device_pad omap3_port3_6pin_pads[] __initdata = {
 static struct omap_device_pad omap3_port3_4pin_pads[] __initdata = {
 	{
 		.name = "mcbsp4_dr.mm3_rxrcv",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE6,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE6) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE6 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "mcbsp4_fsx.mm3_txen_n",
@@ -904,7 +960,11 @@ static struct omap_device_pad omap3_port3_4pin_pads[] __initdata = {
 static struct omap_device_pad omap3_port3_3pin_pads[] __initdata = {
 	{
 		.name = "mcbsp4_fsx.mm3_txen_n",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE6,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE6) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE6 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "mcbsp4_clkx.mm3_txse0",
@@ -919,7 +979,11 @@ static struct omap_device_pad omap3_port3_3pin_pads[] __initdata = {
 static struct omap_device_pad omap3_port3_2pin_pads[] __initdata = {
 	{
 		.name = "mcbsp4_clkx.mm3_txse0",
-		.enable = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE6,
+		.enable = (OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE6) &
+						~OMAP_WAKEUP_EN,
+		.flags  = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.idle = OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE6 |
+						OMAP_WAKEUP_EN,
 	},
 	{
 		.name = "mcbsp4_dx.mm3_txdat",
-- 
1.6.0.4


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

* Re: [PATCH 1/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap4
  2011-09-09 14:52 ` [PATCH 1/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap4 Keshava Munegowda
  2011-09-09 14:52   ` [PATCH 2/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap3 Keshava Munegowda
@ 2011-09-09 18:27   ` Kevin Hilman
  2011-09-12  6:36     ` Munegowda, Keshava
  1 sibling, 1 reply; 6+ messages in thread
From: Kevin Hilman @ 2011-09-09 18:27 UTC (permalink / raw)
  To: Keshava Munegowda
  Cc: linux-usb, linux-omap, linux-kernel, balbi, gadiyar, sameo,
	parthab, tony, b-cousson, paul, johnstul, vishwanath.bs,
	Kishon Vijay Abraham

Keshava Munegowda <keshava_mgowda@ti.com> writes:

> From: Kishon Vijay Abraham <kishon@ti.com>
>
> For ehci and ohci hwmods, the omap4 I/O wakeup capablity is enabled.
> for ehci in phy mode,
> 	- the DAT0 and DIR I/O pad is set as wakeup capable
> for ohci in serial mode
> 	- usbb*_mm_rxdp is set as I/O wakeup for 6 pin serial mode
> 	- usbb*_mm_rxrcv is set as I/O wakeup for 4 pin serial mode
> 	- usbb*_mm_txen is set as I/O wakeup for 3 pin serial mode
> 	- usbb*_mm_txdat is set as I/O wakeup for 2 pin serial mode
>
> Signed-off-by: Kishon Vijay Abraham <kishon@ti.com>
> Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>

What if the end user doesn't want this device to be a wakeup source?

Currently, the IO pad wakeup for these pins is enabled unconditionally.
While having it enabled as a wakeup source by default is fine, it should
not generate wakeups if the user has disable them by doing:

    $ echo disabled > /sys/devices/.../power/wakeup

IOW, whether wakeups are enabled or not should depend on the driver
checking device_may_wakeup()

Kevin

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

* Re: [PATCH 1/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap4
  2011-09-09 18:27   ` [PATCH 1/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap4 Kevin Hilman
@ 2011-09-12  6:36     ` Munegowda, Keshava
  0 siblings, 0 replies; 6+ messages in thread
From: Munegowda, Keshava @ 2011-09-12  6:36 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: linux-usb, linux-omap, linux-kernel, balbi, gadiyar, sameo,
	parthab, tony, b-cousson, paul, johnstul, vishwanath.bs,
	Kishon Vijay Abraham

On Fri, Sep 9, 2011 at 11:57 PM, Kevin Hilman <khilman@ti.com> wrote:
> Keshava Munegowda <keshava_mgowda@ti.com> writes:
>
>> From: Kishon Vijay Abraham <kishon@ti.com>
>>
>> For ehci and ohci hwmods, the omap4 I/O wakeup capablity is enabled.
>> for ehci in phy mode,
>>       - the DAT0 and DIR I/O pad is set as wakeup capable
>> for ohci in serial mode
>>       - usbb*_mm_rxdp is set as I/O wakeup for 6 pin serial mode
>>       - usbb*_mm_rxrcv is set as I/O wakeup for 4 pin serial mode
>>       - usbb*_mm_txen is set as I/O wakeup for 3 pin serial mode
>>       - usbb*_mm_txdat is set as I/O wakeup for 2 pin serial mode
>>
>> Signed-off-by: Kishon Vijay Abraham <kishon@ti.com>
>> Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
>
> What if the end user doesn't want this device to be a wakeup source?
>
> Currently, the IO pad wakeup for these pins is enabled unconditionally.
> While having it enabled as a wakeup source by default is fine, it should
> not generate wakeups if the user has disable them by doing:
>
>    $ echo disabled > /sys/devices/.../power/wakeup

OK, I will do this.

keshava

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

* Re: [PATCH 0/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods
  2011-09-09 14:52 [PATCH 0/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods Keshava Munegowda
  2011-09-09 14:52 ` [PATCH 1/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap4 Keshava Munegowda
@ 2011-09-22 23:38 ` Paul Walmsley
  1 sibling, 0 replies; 6+ messages in thread
From: Paul Walmsley @ 2011-09-22 23:38 UTC (permalink / raw)
  To: Keshava Munegowda
  Cc: linux-usb, linux-omap, linux-kernel, balbi, gadiyar, sameo,
	parthab, tony, khilman, b-cousson, johnstul, vishwanath.bs

Hi

so as 

   http://marc.info/?l=linux-omap&m=131673433121673&w=2

mentions, these should either be associated with the UHH IP block, or 
handled by code in arch/arm/mach-omap2/usb-host.c, since the EHCI and OHCI 
IP blocks are created by the OMAP USB host MFD driver.


- Paul

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

end of thread, other threads:[~2011-09-22 23:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-09 14:52 [PATCH 0/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods Keshava Munegowda
2011-09-09 14:52 ` [PATCH 1/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap4 Keshava Munegowda
2011-09-09 14:52   ` [PATCH 2/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap3 Keshava Munegowda
2011-09-09 18:27   ` [PATCH 1/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods of omap4 Kevin Hilman
2011-09-12  6:36     ` Munegowda, Keshava
2011-09-22 23:38 ` [PATCH 0/2] arm: omap: usb: enable I/O wakeups of ehci and ohci hwmods Paul Walmsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).