public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 2/4] usb: ehci: rework to take advantage of new lowlevel interface
Date: Mon, 17 Sep 2012 22:31:56 +0200	[thread overview]
Message-ID: <201209172231.56482.marex@denx.de> (raw)
In-Reply-To: <1346886773-5693-3-git-send-email-dev@lynxeye.de>

Dear Lucas Stach,

[...]

> diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c
> index 6e21669..a74c1c2 100644
> --- a/drivers/usb/host/ehci-mxs.c
> +++ b/drivers/usb/host/ehci-mxs.c
> @@ -27,7 +27,6 @@
>  #include <asm/arch/regs-usb.h>
>  #include <asm/arch/regs-usbphy.h>
> 
> -#include "ehci-core.h"
>  #include "ehci.h"
> 
>  #if	(CONFIG_EHCI_MXS_PORT != 0) && (CONFIG_EHCI_MXS_PORT != 1)
> @@ -70,7 +69,7 @@ int mxs_ehci_get_port(struct ehci_mxs *mxs_usb, int port)
>  #define	HW_DIGCTL_CTRL_USB0_CLKGATE	(1 << 2)
>  #define	HW_DIGCTL_CTRL_USB1_CLKGATE	(1 << 16)
> 
> -int ehci_hcd_init(void)
> +int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor
> **hcor) {
> 
>  	int ret;
> @@ -107,28 +106,35 @@ int ehci_hcd_init(void)
>  		&ehci_mxs.phy_regs->hw_usbphy_ctrl_set);
> 
>  	usb_base = ((uint32_t)ehci_mxs.usb_regs) + 0x100;
> -	hccr = (struct ehci_hccr *)usb_base;
> +	*hccr = (struct ehci_hccr *)usb_base;
> 
> -	cap_base = ehci_readl(&hccr->cr_capbase);
> -	hcor = (struct ehci_hcor *)(usb_base + HC_LENGTH(cap_base));
> +	cap_base = ehci_readl(&(*hccr)->cr_capbase);
> +	*hcor = (struct ehci_hcor *)(usb_base + HC_LENGTH(cap_base));
> 
>  	return 0;
>  }
> 
> -int ehci_hcd_stop(void)
> +int ehci_hcd_stop(int index)
>  {
>  	int ret;
> -	uint32_t tmp;
> -	struct mxs_register_32 *digctl_ctrl =
> -		(struct mxs_register_32 *)HW_DIGCTL_CTRL;
> -	struct mxs_clkctrl_regs *clkctrl_regs =
> -		(struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
> +	uint32_t usb_base, cap_base, tmp;
> +	struct mx28_register_32 *digctl_ctrl =
> +		(struct mx28_register_32 *)HW_DIGCTL_CTRL;
> +	struct mx28_clkctrl_regs *clkctrl_regs =
> +		(struct mx28_clkctrl_regs *)MXS_CLKCTRL_BASE;

What is this crap in here ?! It broke build. Did you even bother to compile-test 
the series?

Discarding the whole patchset, please resubmit something that's not broken.

> +	struct ehci_hccr *hccr;
> +	struct ehci_hcor *hcor;
> 
>  	ret = mxs_ehci_get_port(&ehci_mxs, CONFIG_EHCI_MXS_PORT);
>  	if (ret)
>  		return ret;
> 
>  	/* Stop the USB port */
> +	usb_base = ((uint32_t)ehci_mxs.usb_regs) + 0x100;
> +	hccr = (struct ehci_hccr *)usb_base;
> +	cap_base = ehci_readl(&hccr->cr_capbase);
> +	hcor = (struct ehci_hcor *)(usb_base + HC_LENGTH(cap_base));
> +
>  	tmp = ehci_readl(&hcor->or_usbcmd);
>  	tmp &= ~CMD_RUN;
>  	ehci_writel(tmp, &hcor->or_usbcmd);

[...]

  reply	other threads:[~2012-09-17 20:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-05 23:12 [U-Boot] [PATCH v3 0/4] USB multi controller Lucas Stach
2012-09-05 23:12 ` [U-Boot] [PATCH v3 1/4] usb: lowlevel interface change to support multiple controllers Lucas Stach
2012-09-06  2:23   ` Marek Vasut
2012-09-05 23:12 ` [U-Boot] [PATCH v3 2/4] usb: ehci: rework to take advantage of new lowlevel interface Lucas Stach
2012-09-17 20:31   ` Marek Vasut [this message]
2012-09-05 23:12 ` [U-Boot] [PATCH v3 3/4] usb: add support for multiple usb controllers Lucas Stach
2012-09-05 23:12 ` [U-Boot] [PATCH v3 4/4] tegra20: port to new ehci interface Lucas Stach
2012-09-05 23:48 ` [U-Boot] [PATCH v3 0/4] USB multi controller Stephen Warren
2012-09-06  2:23   ` 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=201209172231.56482.marex@denx.de \
    --to=marex@denx.de \
    --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