All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4] usb: add support for multiple usb controllers
Date: Thu, 30 Aug 2012 23:12:57 +0200	[thread overview]
Message-ID: <201208302312.57171.marex@denx.de> (raw)
In-Reply-To: <1346342604-13355-5-git-send-email-dev@lynxeye.de>

Dear Lucas Stach,

> Allows to initialize more than one USB controller at once.
> 
> Signed-off-by: Lucas Stach <dev@lynxeye.de>
[...]

>  int usb_stop(void)
>  {
> -	int res = 0;
> +	int i;
> 
>  	if (usb_started) {
>  		asynch_allowed = 1;
>  		usb_started = 0;
>  		usb_hub_reset();
> -		res = usb_lowlevel_stop(0);
> +
> +		for (i = 0; i < CONFIG_USB_MAX_CONTROLLER_COUNT; i++)
> +			usb_lowlevel_stop(i);

You might want to track if any failed and return it or emit warning.

Otherwise:

Reviewed-by: Marek Vasut <marex@denx.de>

>  	}
> -	return res;
> +
> +	return 0;
>  }
> 
>  /*
> @@ -751,7 +781,6 @@ struct usb_device *usb_get_dev_index(int index)
>  		return &usb_dev[index];
>  }
> 
> -
>  /* returns a pointer of a new device structure or NULL, if
>   * no device struct is available
>   */
> @@ -947,29 +976,4 @@ int usb_new_device(struct usb_device *dev)
>  	return 0;
>  }
> 
> -/* build device Tree  */
> -static void usb_scan_devices(void)
> -{
> -	int i;
> -	struct usb_device *dev;
> -
> -	/* first make all devices unknown */
> -	for (i = 0; i < USB_MAX_DEVICE; i++) {
> -		memset(&usb_dev[i], 0, sizeof(struct usb_device));
> -		usb_dev[i].devnum = -1;
> -	}
> -	dev_index = 0;
> -	/* device 0 is always present (root hub, so let it analyze) */
> -	dev = usb_alloc_new_device(ctrl);
> -	if (usb_new_device(dev))
> -		printf("No USB Device found\n");
> -	else
> -		printf("%d USB Device(s) found\n", dev_index);
> -	/* insert "driver" if possible */
> -#ifdef CONFIG_USB_KEYBOARD
> -	drv_usb_kbd_init();
> -#endif
> -	USB_PRINTF("scan end\n");
> -}
> -
>  /* EOF */
> diff --git a/common/usb_storage.c b/common/usb_storage.c
> index 4aeed82..950451e 100644
> --- a/common/usb_storage.c
> +++ b/common/usb_storage.c
> @@ -244,7 +244,7 @@ int usb_stor_scan(int mode)
>  	struct usb_device *dev;
> 
>  	if (mode == 1)
> -		printf("       scanning bus for storage devices... ");
> +		printf("       scanning usb for storage devices... ");
> 
>  	usb_disable_asynch(1); /* asynch transfer not allowed */
> 
> diff --git a/drivers/usb/eth/usb_ether.c b/drivers/usb/eth/usb_ether.c
> index 6cad6c8..f361e8b 100644
> --- a/drivers/usb/eth/usb_ether.c
> +++ b/drivers/usb/eth/usb_ether.c
> @@ -123,7 +123,7 @@ int usb_host_eth_scan(int mode)
> 
> 
>  	if (mode == 1)
> -		printf("       scanning bus for ethernet devices... ");
> +		printf("       scanning usb for ethernet devices... ");
> 
>  	old_async = usb_disable_asynch(1); /* asynch transfer not allowed */

  reply	other threads:[~2012-08-30 21:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-30 16:03 [U-Boot] [PATCH 0/4] USB multi controller Lucas Stach
2012-08-30 16:03 ` [U-Boot] [PATCH 1/4] usb: lowlevel interface change to support multiple controllers Lucas Stach
2012-08-30 21:03   ` Marek Vasut
2012-08-30 16:03 ` [U-Boot] [PATCH 2/4] usb: ehci: rework to take advantage of new lowlevel interface Lucas Stach
2012-08-30 21:09   ` Marek Vasut
2012-08-30 21:51     ` Lucas Stach
2012-08-30 21:55       ` Marek Vasut
2012-08-30 16:03 ` [U-Boot] [PATCH 3/4] tegra20: port to new ehci interface Lucas Stach
2012-08-30 16:03 ` [U-Boot] [PATCH 4/4] usb: add support for multiple usb controllers Lucas Stach
2012-08-30 21:12   ` Marek Vasut [this message]
2012-09-04 23:05 ` [U-Boot] [PATCH 0/4] USB multi controller Stephen Warren
2012-09-05  0:30   ` Marek Vasut
2012-09-05  6:21   ` Lucas Stach
2012-09-05  6:30     ` Marek Vasut
2012-09-05 19:11       ` Stephen Warren
2012-09-05 19:27         ` Marek Vasut
2012-09-05 22:13           ` Lucas Stach

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=201208302312.57171.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 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.