From: Michael Grzeschik <m.grzeschik@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 07/13] ehci: Make has_tt configurable via platform data
Date: Wed, 4 Aug 2010 11:59:11 +0200 [thread overview]
Message-ID: <1280915957-2910-8-git-send-email-m.grzeschik@pengutronix.de> (raw)
In-Reply-To: <1280915957-2910-1-git-send-email-m.grzeschik@pengutronix.de>
From: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
drivers/usb/host/ehci-hcd.c | 13 ++++++++-----
include/usb/ehci.h | 2 ++
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 8995fa3..1c266f3 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -899,22 +899,25 @@ static int ehci_probe(struct device_d *dev)
ehci = xmalloc(sizeof(struct ehci_priv));
host = &ehci->host;
- if (pdata)
+ if (pdata) {
ehci->flags = pdata->flags;
- else
+ ehci->hccr = (void *)(dev->map_base + pdata->hccr_offset);
+ ehci->hcor = (void *)(dev->map_base + pdata->hcor_offset);
+ }
+ else {
/* default to EHCI_HAS_TT to not change behaviour of boards
* with platform_data
*/
ehci->flags = EHCI_HAS_TT;
+ ehci->hccr = (void *)(dev->map_base + 0x100);
+ ehci->hcor = (void *)(dev->map_base + 0x140);
+ }
host->init = ehci_init;
host->submit_int_msg = submit_int_msg;
host->submit_control_msg = submit_control_msg;
host->submit_bulk_msg = submit_bulk_msg;
- ehci->hccr = (void *)(dev->map_base + 0x100);
- ehci->hcor = (void *)(dev->map_base + 0x140);
-
usb_register_host(host);
reg = HC_VERSION(ehci_readl(&ehci->hccr->cr_capbase));
diff --git a/include/usb/ehci.h b/include/usb/ehci.h
index 3304b60..2ec862c 100644
--- a/include/usb/ehci.h
+++ b/include/usb/ehci.h
@@ -5,6 +5,8 @@
struct ehci_platform_data {
unsigned long flags;
+ unsigned long hccr_offset;
+ unsigned long hcor_offset;
};
#endif /* __USB_EHCI_H */
--
1.7.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2010-08-04 9:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-04 9:59 [PATCH 00/13] OMAP/Beagleboard ehci support Michael Grzeschik
2010-08-04 9:59 ` [PATCH 01/13] i2c: Add missing defines for omap Michael Grzeschik
2010-08-04 9:59 ` [PATCH 02/13] arm omap: Add I2C driver Michael Grzeschik
2010-08-04 9:59 ` [PATCH 03/13] add twl4030 support Michael Grzeschik
2010-08-04 9:59 ` [PATCH 04/13] arm omap: Add gpio support Michael Grzeschik
2010-08-04 9:59 ` [PATCH 05/13] arm omap: Add cpu_is_ macros Michael Grzeschik
2010-08-04 9:59 ` [PATCH 06/13] beagle: Add missing pinmux for usb Michael Grzeschik
2010-08-04 9:59 ` Michael Grzeschik [this message]
2010-08-04 9:59 ` [PATCH 08/13] ehci: set CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS to 16 Michael Grzeschik
2010-08-04 9:59 ` [PATCH 09/13] ehci: add remove function Michael Grzeschik
2010-08-04 9:59 ` [PATCH 10/13] usb: add twl4030 phy support Michael Grzeschik
2010-08-04 9:59 ` [PATCH 11/13] ehci: add omap support Michael Grzeschik
2010-08-04 9:59 ` [PATCH 12/13] beagle: add usb support Michael Grzeschik
2010-08-17 8:40 ` [PATCH] beagle: fix usb dependencies Michael Grzeschik
2010-08-17 10:09 ` Nishanth Menon
2010-08-04 9:59 ` [PATCH 13/13] add beagle board defconfig Michael Grzeschik
2010-08-17 8:42 ` [PATCH] beagle: defconfig cleanup for v2010.08.0 Michael Grzeschik
2010-10-10 8:37 ` [PATCH 00/13] OMAP/Beagleboard ehci support Anand Gadiyar
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=1280915957-2910-8-git-send-email-m.grzeschik@pengutronix.de \
--to=m.grzeschik@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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