All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jana Rapava <fermata7@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v7 2/4] EHCI: add callback ehci_fixup
Date: Wed, 28 Sep 2011 00:21:16 +0200	[thread overview]
Message-ID: <1317162078-8041-1-git-send-email-fermata7@gmail.com> (raw)
In-Reply-To: <1317151457-15387-1-git-send-email-fermata7@gmail.com>

Add callback to ehci_fixup to prepare
for solving the problem with VBUS reset on Efika.

Signed-off-by: Jana Rapava <fermata7@gmail.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Remy Bohmer <linux@bohmer.net>
Cc: Stefano Babic <sbabic@denx.de>
---
Changes for v1:
    - split into patchset
    - add callback ehci_fixup
Changes for v2:
      - make this the second patch in series
      - add comment to alias ehci_fixup
Changes for v3:
       - make the comment a sentence
       - rebase patch on top of u-boot-imx/next
Changes for v4:
	- change the versioning of changelog
	from per patchset to per patch
	- fix the appearance of comment

 drivers/usb/host/ehci-hcd.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index bdadd46..ef0c578 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -536,6 +536,17 @@ static inline int min3(int a, int b, int c)
 	return a;
 }
 
+inline void __ehci_fixup(uint32_t *status_reg, uint32_t *reg_ref)
+{
+	wait_ms(50);
+}
+/*
+ * this function will alias to __ehci_fixup,
+ * unless function ehci_fixup is defined somewhere
+ */
+void ehci_fixup(uint32_t *status_reg, uint32_t *reg_ref)
+	 __attribute__((weak, alias("__ehci_fixup")));
+
 int
 ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer,
 		 int length, struct devrequest *req)
@@ -709,7 +720,7 @@ ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer,
 				 * usb 2.0 specification say 50 ms resets on
 				 * root
 				 */
-				wait_ms(50);
+				ehci_fixup(status_reg, &reg);
 				/* terminate the reset */
 				ehci_writel(status_reg, reg & ~EHCI_PS_PR);
 				/*
-- 
1.7.6.3

  parent reply	other threads:[~2011-09-27 22:21 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-08 21:06 [U-Boot] some USB cleanup on EfikaMX Jana Rapava
2011-09-08 22:32 ` Wolfgang Denk
2011-09-09 10:18 ` Stefano Babic
2011-09-12 17:20 ` [U-Boot] [PATCH 1/2 v2] USB cleanup for EfikaMX Jana Rapava
2011-09-12 19:25   ` Marek Vasut
2011-09-18  2:19   ` [U-Boot] [PATCH v3] Add USB support for Efika Jana Rapava
2011-09-18  2:33     ` Marek Vasut
2011-09-19  8:43     ` Stefano Babic
2011-09-19 10:30       ` Marek Vasut
2011-09-24 15:57       ` Remy Bohmer
2011-09-24 19:07         ` Fabio Estevam
2011-09-24 19:19           ` Marek Vasut
2011-09-24 21:22             ` Fabio Estevam
2011-09-22  5:18     ` Marek Vasut
2011-09-25 11:55     ` [U-Boot] [PATCH v4 1/5] EHCI: add callback ehci_fixup Jana Rapava
2011-09-25 11:55       ` [U-Boot] [PATCH v4 2/5] Add USB support for Efika Jana Rapava
2011-09-25 11:55       ` [U-Boot] [PATCH v4 3/5] /drivers/usb/host/ehci-mxc.c: naming cleanup Jana Rapava
2011-09-25 11:55       ` [U-Boot] [PATCH v4 4/5] USB: Add usb_event_poll() to get keyboards working with EHCI Jana Rapava
2011-09-25 12:02         ` Marek Vasut
2011-09-25 11:55       ` [U-Boot] [PATCH v4 5/5] USB: move ehci.h and ehci-core.h into /include/usb/ Jana Rapava
2011-09-27 10:45         ` [U-Boot] [PATCH v5 1/4] usb: Move ehci.h and ehci-core.h to include/usb directory Jana Rapava
2011-09-27 10:57           ` Fabio Estevam
2011-09-27 11:01           ` [U-Boot] [PATCH v5 2/4] EHCI: add callback ehci_fixup Jana Rapava
2011-09-27 11:01             ` [U-Boot] [PATCH v5 3/4] EHCI: adjust for mx5 Jana Rapava
2011-09-27 11:01             ` [U-Boot] [PATCH v5 4/4] Add USB support for Efika Jana Rapava
2011-09-27 11:50               ` Marek Vasut
2011-09-27 14:12                 ` Jana Rapava
2011-09-27 14:55                   ` Marek Vasut
2011-09-27 18:17                 ` Jana Rapava
2011-09-27 18:20                   ` Marek Vasut
2011-09-28 10:26                   ` Stefano Babic
2011-09-28 12:12                     ` Jana Rapava
2011-09-27 11:23             ` [U-Boot] [PATCH v5 2/4] EHCI: add callback ehci_fixup Marek Vasut
2011-09-27 11:42               ` Jana Rapava
2011-09-27 19:24                 ` [U-Boot] [PATCH v6 " Jana Rapava
2011-09-27 19:24                   ` [U-Boot] [PATCH v6 3/4] EHCI: adjust for mx5 Jana Rapava
2011-09-27 19:41                     ` Marek Vasut
2011-09-27 20:19                       ` Jana Rapava
2011-09-27 20:47                         ` Marek Vasut
2011-09-27 19:24                   ` [U-Boot] [PATCH v6 4/4] Add USB support for Efika Jana Rapava
2011-09-27 19:47                     ` Marek Vasut
2011-09-27 20:40                       ` Jana Rapava
2011-09-27 20:50                         ` Marek Vasut
2011-09-27 19:40                   ` [U-Boot] [PATCH v6 2/4] EHCI: add callback ehci_fixup Marek Vasut
2011-09-27 22:21                   ` Jana Rapava [this message]
2011-09-27 22:21                     ` [U-Boot] [PATCH v7 3/4] EHCI: adjust for mx5 Jana Rapava
2011-09-27 22:21                     ` [U-Boot] [PATCH v7 4/4] Add USB support for Efika Jana Rapava
2011-09-28  0:43                       ` Marek Vasut
2011-09-28 12:25                         ` Jana Rapava
2011-09-28 12:28                           ` Marek Vasut
2011-09-28  0:46                     ` [U-Boot] [PATCH v7 2/4] EHCI: add callback ehci_fixup Marek Vasut
2011-09-28 10:54                     ` Marek Vasut
2011-09-28 11:52                       ` Jana Rapava
2011-09-28 12:13                         ` Marek Vasut
2011-09-28 15:02                     ` [U-Boot] [PATCH v8 " Jana Rapava
2011-09-28 15:05                       ` [U-Boot] [PATCH v8 3/4] EHCI: adjust for mx5 Jana Rapava
2011-09-28 15:07                         ` [U-Boot] [PATCH v8 4/4] Add USB support for Efika Jana Rapava
2011-09-28 15:20                           ` Marek Vasut
2011-09-28 18:12                             ` Jana Rapava
2011-09-28 18:26                               ` Marek Vasut
2011-10-06 21:18                           ` Wolfgang Denk
2011-10-07 17:16                             ` Jana Rapava
2011-09-28 15:21                       ` [U-Boot] [PATCH v8 2/4] EHCI: add callback ehci_fixup Marek Vasut
2011-09-27 11:07           ` [U-Boot] [PATCH v5 1/4] usb: Move ehci.h and ehci-core.h to include/usb directory Fabio Estevam
2011-09-27 11:09             ` Fabio Estevam
2011-09-27 11:27               ` Jana Rapava
2011-09-27 18:44           ` [U-Boot] [PATCH v6 " Jana Rapava
2011-09-27 22:06             ` [U-Boot] [PATCH v7 " Jana Rapava
2011-09-28 14:59               ` [U-Boot] [PATCH v8 " Jana Rapava
2011-09-28 19:49                 ` [U-Boot] [PATCH v9 " Jana Rapava
2011-09-28 20:36                   ` Marek Vasut
2011-09-28 21:10                     ` Jana Rapava
2011-09-28 21:43                       ` Marek Vasut
2011-09-28 23:04                         ` Jana Rapava
2011-09-28 23:05                           ` Marek Vasut
2011-09-28 23:22                             ` Jana Rapava
2011-09-28 19:51                 ` [U-Boot] [PATCH v9 2/4] EHCI: add callback ehci_fixup Jana Rapava
2011-09-28 19:52                   ` [U-Boot] [PATCH v9 3/4] EHCI: adjust for mx5 Jana Rapava
2011-09-28 19:54                     ` [U-Boot] [PATCH v9 4/4] Add USB support for Efika Jana Rapava
2011-09-28 20:44                       ` Marek Vasut
2011-09-28 20:36                   ` [U-Boot] [PATCH v9 2/4] EHCI: add callback ehci_fixup Marek Vasut
2011-09-28 21:14                     ` Jana Rapava
2011-09-28 21:26                       ` Marek Vasut
2011-09-25 12:02       ` [U-Boot] [PATCH v4 1/5] " Marek Vasut
2011-09-25 17:25     ` [U-Boot] [PATCH v4 1/4] USB: move ehci.h and ehci-core.h into /include/usb/ Jana Rapava
2011-09-25 17:25       ` [U-Boot] [PATCH v4 2/4] EHCI: add callback ehci_fixup Jana Rapava
2011-09-25 17:41         ` Marek Vasut
2011-09-25 17:25       ` [U-Boot] [PATCH v4 3/4] EHCI: adjust for mx5 Jana Rapava
2011-09-25 17:38         ` Marek Vasut
2011-09-25 17:25       ` [U-Boot] [PATCH v4 4/4] Add USB support for Efika Jana Rapava
2011-09-25 17:34         ` Marek Vasut
2011-09-26 20:28           ` Jana Rapava
2011-09-26 20:42             ` Marek Vasut
2011-09-26 20:51             ` Marek Vasut
2011-09-27 11:00               ` Jana Rapava
2011-09-25 19:01       ` [U-Boot] [PATCH v4 1/4] USB: move ehci.h and ehci-core.h into /include/usb/ Fabio Estevam
2011-09-26  8:32         ` Jana Rapava
2011-10-09 18:42       ` Marek Vasut
2011-10-09 20:22         ` Jana Rapava
2011-10-14 15:49           ` Fabio Estevam
2011-10-14 16:07             ` Marek Vasut
2011-10-14 15:50           ` Marek Vasut
2011-10-06 21:33   ` [U-Boot] [PATCH 1/2 v2] USB cleanup for EfikaMX Wolfgang Denk

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=1317162078-8041-1-git-send-email-fermata7@gmail.com \
    --to=fermata7@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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 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.