Patchwork [U-Boot,02/11] usb: ehci: Add 64-bit controller support

login
register
mail settings
Submitter Simon Glass
Date Dec. 13, 2012, 1:55 a.m.
Message ID <1355363731-10103-3-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/205705/
State Superseded, archived
Delegated to: Marek Vasut
Headers show

Comments

Simon Glass - Dec. 13, 2012, 1:55 a.m.
From: Vincent Palatin <vpalatin@chromium.org>

On EHCI controller with 64-bit address space support, we must initialize
properly the high word for the PCI bus master accesses.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
---
 drivers/usb/host/ehci-hcd.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Marek Vasut - Dec. 13, 2012, 5:27 p.m.
Dear Simon Glass,

> From: Vincent Palatin <vpalatin@chromium.org>
> 
> On EHCI controller with 64-bit address space support, we must initialize
> properly the high word for the PCI bus master accesses.
> 
> Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>  drivers/usb/host/ehci-hcd.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
> index 7f98a63..20309ad 100644
> --- a/drivers/usb/host/ehci-hcd.c
> +++ b/drivers/usb/host/ehci-hcd.c
> @@ -870,6 +870,9 @@ int usb_lowlevel_init(int index, void **controller)
>  	if (ehci_hcd_init(index, &ehcic[index].hccr, &ehcic[index].hcor))
>  		return -1;
>  #endif
> +	/* Set the high address word (aka segment) for 64-bit controller */
> +	if (ehci_readl(&ehcic[index].hccr->cr_hccparams) & 1)
> +		ehci_writel(ehcic[index].hcor->or_ctrldssegment, 0);
> 
>  	qh_list = &ehcic[index].qh_list;

Applied, thanks

Best regards,
Marek Vasut

Patch

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 7f98a63..20309ad 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -870,6 +870,9 @@  int usb_lowlevel_init(int index, void **controller)
 	if (ehci_hcd_init(index, &ehcic[index].hccr, &ehcic[index].hcor))
 		return -1;
 #endif
+	/* Set the high address word (aka segment) for 64-bit controller */
+	if (ehci_readl(&ehcic[index].hccr->cr_hccparams) & 1)
+		ehci_writel(ehcic[index].hcor->or_ctrldssegment, 0);
 
 	qh_list = &ehcic[index].qh_list;