mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <florian@openwrt.org>
To: stern@rowland.harvard.edu
Cc: linux-usb@vger.kernel.org, Florian Fainelli <florian@openwrt.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 06/24 v2] USB: EHCI: add no_io_watchdog platform_data parameter to ehci-platform
Date: Thu,  4 Oct 2012 17:17:34 +0200	[thread overview]
Message-ID: <1349363872-27004-7-git-send-email-florian@openwrt.org> (raw)
In-Reply-To: <1349363872-27004-1-git-send-email-florian@openwrt.org>

Enhance the ehci-platform driver to also accept no_io_watchdog as a platform
data parameter. When no_io_watchdog is set to 1, the ehci controller will set
ehci->need_io_watchdog to 0. Since most EHCI controllers do need the I/O
watchdog to be on, only let those which need it to turn the watchdog off.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
Changes since v1:
- reworked patch to introduce "no_io_watchdog" instead of "need_io_watchdog"
- reworded commit message accordingly

 drivers/usb/host/ehci-platform.c |    2 ++
 include/linux/usb/ehci_pdriver.h |    3 +++
 2 files changed, 5 insertions(+)

diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index 764e010..83b486e 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -32,6 +32,8 @@ static int ehci_platform_reset(struct usb_hcd *hcd)
 	ehci->has_synopsys_hc_bug = pdata->has_synopsys_hc_bug;
 	ehci->big_endian_desc = pdata->big_endian_desc;
 	ehci->big_endian_mmio = pdata->big_endian_mmio;
+	if (pdata->no_io_watchdog)
+		ehci->need_io_watchdog = 0;
 
 	ehci->caps = hcd->regs + pdata->caps_offset;
 	retval = ehci_setup(hcd);
diff --git a/include/linux/usb/ehci_pdriver.h b/include/linux/usb/ehci_pdriver.h
index c9d09f8..67ac74b 100644
--- a/include/linux/usb/ehci_pdriver.h
+++ b/include/linux/usb/ehci_pdriver.h
@@ -29,6 +29,8 @@
  *			initialization.
  * @port_power_off:	set to 1 if the controller needs to be powered down
  *			after initialization.
+ * @no_io_watchdog:	set to 1 if the controller does not need the I/O
+ *			watchdog to run.
  *
  * These are general configuration options for the EHCI controller. All of
  * these options are activating more or less workarounds for some hardware.
@@ -41,6 +43,7 @@ struct usb_ehci_pdata {
 	unsigned	big_endian_mmio:1;
 	unsigned	port_power_on:1;
 	unsigned	port_power_off:1;
+	unsigned	no_io_watchdog:1;
 
 	/* Turn on all power and clocks */
 	int (*power_on)(struct platform_device *pdev);
-- 
1.7.9.5


  parent reply	other threads:[~2012-10-04 15:25 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1349363872-27004-1-git-send-email-florian@openwrt.org>
2012-10-04 15:17 ` [PATCH 01/24 v2] USB: EHCI: remove IXP4xx EHCI driver Florian Fainelli
2012-10-04 15:17 ` [PATCH 02/24 v2] MIPS: Loongson 1B: use ehci-platform instead of ehci-ls1x Florian Fainelli
2012-10-04 15:17 ` [PATCH 03/24 v2] USB: EHCI: remove Loongson 1B EHCI driver Florian Fainelli
2012-10-04 15:17 ` [PATCH 04/24 v2] MIPS: Netlogic: use ehci-platform driver Florian Fainelli
2012-10-04 15:17 ` [PATCH 05/24 v2] USB: EHCI: remove Netlogic XLS EHCI driver Florian Fainelli
2012-10-04 15:17 ` Florian Fainelli [this message]
2012-10-04 18:58   ` [PATCH 06/24 v2] USB: EHCI: add no_io_watchdog platform_data parameter to ehci-platform Alan Stern
2012-10-04 15:17 ` [PATCH 07/24 v2] MIPS: Alchemy: use the ehci platform driver Florian Fainelli
2012-10-04 15:17 ` [PATCH 08/24 v2] USB: EHCI: remove Alchemy EHCI driver Florian Fainelli
2012-10-04 15:17 ` [PATCH 09/24 v2] ARM: cns3xxx: use ehci platform driver Florian Fainelli
2012-10-04 15:17 ` [PATCH 10/24 v2] USB: EHCI: remove CNS3xxx EHCI " Florian Fainelli
2012-10-04 15:17 ` [PATCH 11/24 v2] USB: ohci: allow platform driver to specify the number of ports Florian Fainelli
2012-10-04 15:17 ` [PATCH 12/24] USB: ohci: move ohci_pci_{suspend,resume} to ohci-hcd.c Florian Fainelli
2012-10-04 19:07   ` Alan Stern
2012-10-04 15:17 ` [PATCH 13/24] USB: ohci: remove check for RH already suspended in ohci_suspend Florian Fainelli
2012-10-04 15:17 ` [PATCH 14/24] USB: ohci: merge ohci_finish_controller_resume with ohci_resume Florian Fainelli
2012-10-05  1:38   ` Jingoo Han
2012-10-05  7:42   ` Nicolas Ferre
2012-10-04 15:17 ` [PATCH 15/24 v2] MIPS: PNX8550: use OHCI platform driver Florian Fainelli
2012-10-04 15:17 ` [PATCH 16/24 v2] USB: OHCI: remove PNX8550 OHCI driver Florian Fainelli
2012-10-04 15:17 ` [PATCH 17/24 v2] ARM: cns3xxx: use OHCI platform driver Florian Fainelli
2012-10-04 19:19   ` Alan Stern
2012-10-04 15:17 ` [PATCH 18/24 v2] USB: OHCI: remove CNS3xxx " Florian Fainelli
2012-10-04 15:17 ` [PATCH 19/24 v2] MIPS: Netlogic: convert to use " Florian Fainelli
2012-10-04 15:17 ` [PATCH 20/24 v2] USB: OHCI: remove Netlogic XLS " Florian Fainelli
2012-10-04 15:17 ` [PATCH 21/24 v2] sh: convert boards to use the " Florian Fainelli
2012-10-04 15:17 ` [PATCH 22/24 v2] USB: OHCI: remove OHCI SH " Florian Fainelli
2012-10-04 15:17 ` [PATCH 23/24 v2] MIPS: Alchemy: use the OHCI " Florian Fainelli
2012-10-04 15:17 ` [PATCH 24/24 v2] USB: OHCI: remove Alchemy " Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1349363872-27004-7-git-send-email-florian@openwrt.org \
    --to=florian@openwrt.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®