From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 13/13] ehci-mx5/6: Make board_ehci_hcd_init() optional
Date: Tue, 13 Nov 2012 20:58:35 +0100 (CET) [thread overview]
Message-ID: <201536162.1238977.1352836715937.JavaMail.root@advansee.com> (raw)
In-Reply-To: <288431028.1238905.1352836530889.JavaMail.root@advansee.com>
A custom board_ehci_hcd_init() may be unneeded, so add a weak default
implementation doing nothing.
By the way, use simple __weak from linux/compiler.h for
board_ehci_hcd_postinit() instead of weak alias with full attribute.
Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
---
Changes for v2:
- Use simple __weak from linux/compiler.h instead of __attribute__.
- Also use __weak instead of __attribute__ for board_ehci_hcd_postinit().
- Extend to ehci-mx6.c.
Changes for v3: None.
.../drivers/usb/host/ehci-mx5.c | 8 +++++---
.../drivers/usb/host/ehci-mx6.c | 5 +++++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git u-boot-usb-76454b2.orig/drivers/usb/host/ehci-mx5.c u-boot-usb-76454b2/drivers/usb/host/ehci-mx5.c
index 7e60c3c..adbed5c 100644
--- u-boot-usb-76454b2.orig/drivers/usb/host/ehci-mx5.c
+++ u-boot-usb-76454b2/drivers/usb/host/ehci-mx5.c
@@ -290,12 +290,14 @@ int mxc_set_usbcontrol(int port, unsigned int flags)
return ret;
}
-void __board_ehci_hcd_postinit(struct usb_ehci *ehci, int port)
+int __weak board_ehci_hcd_init(int port)
{
+ return 0;
}
-void board_ehci_hcd_postinit(struct usb_ehci *ehci, int port)
- __attribute((weak, alias("__board_ehci_hcd_postinit")));
+void __weak board_ehci_hcd_postinit(struct usb_ehci *ehci, int port)
+{
+}
int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor)
{
diff --git u-boot-usb-76454b2.orig/drivers/usb/host/ehci-mx6.c u-boot-usb-76454b2/drivers/usb/host/ehci-mx6.c
index 9ce25da..1b20e41 100644
--- u-boot-usb-76454b2.orig/drivers/usb/host/ehci-mx6.c
+++ u-boot-usb-76454b2/drivers/usb/host/ehci-mx6.c
@@ -159,6 +159,11 @@ static void usbh1_oc_config(void)
__raw_writel(val, usbother_base + USB_H1_CTRL_OFFSET);
}
+int __weak board_ehci_hcd_init(int port)
+{
+ return 0;
+}
+
int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor)
{
struct usb_ehci *ehci;
prev parent reply other threads:[~2012-11-13 19:58 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-05 20:09 [U-Boot] [PATCH 01/13] mx31: Move EHCI definitions to ehci-fsl.h Benoît Thébaudeau
2012-11-05 20:10 ` [U-Boot] [PATCH 02/13] ehci-mxc: Clean up Benoît Thébaudeau
2012-11-05 20:10 ` [U-Boot] [PATCH 03/13] ehci-mx5: " Benoît Thébaudeau
2012-11-05 20:10 ` [U-Boot] [PATCH 04/13] ehci-mx5: Fix OC_DIS usage Benoît Thébaudeau
2012-11-05 20:11 ` [U-Boot] [PATCH 05/13] ehci-mx5: Fix OPM usage Benoît Thébaudeau
2012-11-05 20:11 ` [U-Boot] [PATCH 06/13] ehci-mx5: Fix *PM usage for i.MX53 Benoît Thébaudeau
2012-11-05 20:11 ` [U-Boot] [PATCH 07/13] ehci-mx5: Add missing OC_DIS " Benoît Thébaudeau
2012-11-05 20:12 ` [U-Boot] [PATCH 08/13] ehci-mxc: Make EHCI power/oc polarities configurable Benoît Thébaudeau
2012-11-05 20:12 ` [U-Boot] [PATCH 09/13] ehci-mxc: Make i.MX25 EHCI configurable Benoît Thébaudeau
2012-11-05 20:12 ` [U-Boot] [PATCH 10/13] ehci-mxc: Define host offsets Benoît Thébaudeau
2012-11-05 20:13 ` [U-Boot] [PATCH 11/13] ehci-mxc: Add support for i.MX35 Benoît Thébaudeau
2012-11-05 20:13 ` [U-Boot] [PATCH 12/13] mx35pdk: Add support for OTG Benoît Thébaudeau
2012-11-07 14:30 ` Stefano Babic
2012-11-07 16:16 ` Stefano Babic
2012-11-07 16:27 ` Benoît Thébaudeau
2012-11-07 16:33 ` Stefano Babic
2012-11-05 20:13 ` [U-Boot] [PATCH 13/13] ehci-mx5: Make board_ehci_hcd_init() optional Benoît Thébaudeau
2012-11-05 22:57 ` Marek Vasut
2012-11-05 23:34 ` Benoît Thébaudeau
2012-11-05 22:55 ` [U-Boot] [PATCH 01/13] mx31: Move EHCI definitions to ehci-fsl.h Marek Vasut
2012-11-07 16:31 ` Stefano Babic
2012-11-08 20:27 ` [U-Boot] [PATCH v2 " Benoît Thébaudeau
2012-11-08 20:28 ` [U-Boot] [PATCH v2 02/13] ehci-mxc: Clean up Benoît Thébaudeau
2012-11-08 20:28 ` [U-Boot] [PATCH v2 03/13] ehci-mx5: " Benoît Thébaudeau
2012-11-08 20:28 ` [U-Boot] [PATCH v2 04/13] ehci-mx5: Fix OC_DIS usage Benoît Thébaudeau
2012-11-08 20:29 ` [U-Boot] [PATCH v2 05/13] ehci-mx5: Fix OPM usage Benoît Thébaudeau
2012-11-08 20:29 ` [U-Boot] [PATCH v2 06/13] ehci-mx5: Fix *PM usage for i.MX53 Benoît Thébaudeau
2012-11-08 20:29 ` [U-Boot] [PATCH v2 07/13] ehci-mx5: Add missing OC_DIS " Benoît Thébaudeau
2012-11-08 20:29 ` [U-Boot] [PATCH v2 08/13] ehci-mxc: Make EHCI power/oc polarities configurable Benoît Thébaudeau
2012-11-08 20:30 ` [U-Boot] [PATCH v2 09/13] ehci-mxc: Make i.MX25 EHCI configurable Benoît Thébaudeau
2012-11-08 20:30 ` [U-Boot] [PATCH v2 10/13] ehci-mxc: Define host offsets Benoît Thébaudeau
2012-11-08 20:30 ` [U-Boot] [PATCH v2 11/13] ehci-mxc: Add support for i.MX35 Benoît Thébaudeau
2012-11-08 20:31 ` [U-Boot] [PATCH v2 12/13] mx35pdk: Add support for OTG Benoît Thébaudeau
2012-11-08 20:31 ` [U-Boot] [PATCH v2 13/13] ehci-mx5/6: Make board_ehci_hcd_init() optional Benoît Thébaudeau
2012-11-10 7:42 ` [U-Boot] [PATCH v2 01/13] mx31: Move EHCI definitions to ehci-fsl.h Stefano Babic
2012-11-10 12:37 ` Benoît Thébaudeau
2012-11-10 12:46 ` Albert ARIBAUD
2012-11-10 12:47 ` Albert ARIBAUD
2012-11-10 13:51 ` Benoît Thébaudeau
2012-11-10 16:45 ` stefano babic
2012-11-13 19:55 ` [U-Boot] [PATCH v3 " Benoît Thébaudeau
2012-11-13 19:55 ` [U-Boot] [PATCH v3 02/13] ehci-mxc: Clean up Benoît Thébaudeau
2012-11-16 8:29 ` Stefano Babic
2012-11-13 19:56 ` [U-Boot] [PATCH v3 03/13] ehci-mx5: " Benoît Thébaudeau
2012-11-13 19:56 ` [U-Boot] [PATCH v3 04/13] ehci-mx5: Fix OC_DIS usage Benoît Thébaudeau
2012-11-13 19:56 ` [U-Boot] [PATCH v3 05/13] ehci-mx5: Fix OPM usage Benoît Thébaudeau
2012-11-13 19:56 ` [U-Boot] [PATCH v3 06/13] ehci-mx5: Fix *PM usage for i.MX53 Benoît Thébaudeau
2012-11-13 19:57 ` [U-Boot] [PATCH v3 07/13] ehci-mx5: Add missing OC_DIS " Benoît Thébaudeau
2012-11-13 19:57 ` [U-Boot] [PATCH v3 08/13] ehci-mxc: Make EHCI power/oc polarities configurable Benoît Thébaudeau
2012-11-13 19:57 ` [U-Boot] [PATCH v3 09/13] ehci-mxc: Make i.MX25 EHCI configurable Benoît Thébaudeau
2012-11-13 19:57 ` [U-Boot] [PATCH v3 10/13] ehci-mxc: Define host offsets Benoît Thébaudeau
2012-11-13 19:58 ` [U-Boot] [PATCH v3 11/13] ehci-mxc: Add support for i.MX35 Benoît Thébaudeau
2012-11-13 19:58 ` [U-Boot] [PATCH v3 12/13] mx35pdk: Add support for OTG Benoît Thébaudeau
2012-11-13 19:58 ` Benoît Thébaudeau [this message]
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=201536162.1238977.1352836715937.JavaMail.root@advansee.com \
--to=benoit.thebaudeau@advansee.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.