From: Jeroen Hofstee <jeroen@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/3] usb:ehci-mx6 add board_ehci_usb_mode function
Date: Tue, 04 Nov 2014 12:40:36 +0100 [thread overview]
Message-ID: <5458BB34.3020406@myspectrum.nl> (raw)
In-Reply-To: <1415087402-26007-2-git-send-email-Peng.Fan@freescale.com>
Hello Peng,
On 04-11-14 08:50, Peng Fan wrote:
> Include a weak function board_ehci_usb_mode to gives board code
> a choice. If the board want the otg port work in host mode but not
> device mode, this should be handled.
>
> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
> Signed-off-by: Ye Li <B37916@freescale.com>
> ---
>
> Changes v2:
> Introduce a new weak function to let board have a choice to decide which mode
> to work at.
>
> drivers/usb/host/ehci-mx6.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
> index 9ec5a0a..3662a80 100644
> --- a/drivers/usb/host/ehci-mx6.c
> +++ b/drivers/usb/host/ehci-mx6.c
> @@ -193,6 +193,11 @@ static void usb_oc_config(int index)
> __raw_writel(val, ctrl);
> }
>
> +int __weak board_ehci_usb_mode(int index, enum usb_init_type *type)
> +{
> + return 0;
> +}
> +
> int __weak board_ehci_hcd_init(int port)
> {
> return 0;
> @@ -223,6 +228,8 @@ int ehci_hcd_init(int index, enum usb_init_type init,
> usb_internal_phy_clock_gate(index, 1);
> type = usb_phy_enable(index, ehci) ? USB_INIT_DEVICE : USB_INIT_HOST;
>
> + board_ehci_usb_mode(index, &type);
> +
> *hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength);
> *hcor = (struct ehci_hcor *)((uint32_t)*hccr +
> HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
Can you add a prototype type as well and make sure it is included?
Thanks,
Jeroen
next prev parent reply other threads:[~2014-11-04 11:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-04 7:49 [U-Boot] [PATCH v2 0/3] imx:mx6 add usb support Peng Fan
2014-11-04 7:50 ` [U-Boot] [PATCH v2 1/3] usb:ehci-mx6 add board_ehci_usb_mode function Peng Fan
2014-11-04 10:33 ` Marek Vasut
2014-11-04 10:50 ` Peng Fan
2014-11-04 11:01 ` Marek Vasut
2014-11-04 13:29 ` Peng Fan
2014-11-04 17:33 ` Marek Vasut
2014-11-05 6:00 ` Peng Fan
2014-11-05 9:03 ` Marek Vasut
2014-11-05 9:18 ` Peng Fan
2014-11-06 20:20 ` Marek Vasut
2014-11-07 1:10 ` Peng Fan
2014-11-07 8:26 ` Marek Vasut
2014-11-04 11:40 ` Jeroen Hofstee [this message]
2014-11-04 13:36 ` Peng Fan
2014-11-04 19:39 ` Jeroen Hofstee
2014-11-04 7:50 ` [U-Boot] [PATCH v2 2/3] imx:mx6sxsabresd add usb support Peng Fan
2014-11-04 7:50 ` [U-Boot] [PATCH v2 3/3] imx:mx6slevk " Peng Fan
2014-11-04 10:31 ` [U-Boot] [PATCH v2 0/3] imx:mx6 " Marek Vasut
2014-11-04 12:05 ` Peng Fan
2014-11-04 12:08 ` Marek Vasut
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=5458BB34.3020406@myspectrum.nl \
--to=jeroen@myspectrum.nl \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox