public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] usb: host: Move CONFIG_USB_MAX_CONTROLLER_COUNT to non-dm
@ 2016-10-15 13:02 Jagan Teki
  2016-10-15 14:05 ` Tom Rini
  0 siblings, 1 reply; 5+ messages in thread
From: Jagan Teki @ 2016-10-15 13:02 UTC (permalink / raw)
  To: u-boot

CONFIG_USB_MAX_CONTROLLER_COUNT not used in DM_USB, hence moved
to non-dm from global area.

Cc: Simon Glass <sjg@chromium.org>
Cc: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
---
 drivers/usb/host/ehci-hcd.c | 8 ++++----
 drivers/usb/host/xhci.c     | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 13aa70d..d8dc827 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -21,10 +21,6 @@
 
 #include "ehci.h"
 
-#ifndef CONFIG_USB_MAX_CONTROLLER_COUNT
-#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
-#endif
-
 /*
  * EHCI spec page 20 says that the HC may take up to 16 uFrames (= 4ms) to halt.
  * Let's time out after 8 to have a little safety margin on top of that.
@@ -32,6 +28,10 @@
 #define HCHALT_TIMEOUT (8 * 1000)
 
 #ifndef CONFIG_DM_USB
+# ifndef CONFIG_USB_MAX_CONTROLLER_COUNT
+#  define CONFIG_USB_MAX_CONTROLLER_COUNT 1
+# endif
+
 static struct ehci_ctrl ehcic[CONFIG_USB_MAX_CONTROLLER_COUNT];
 #endif
 
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 3201177..bb276da 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -31,10 +31,6 @@
 #include <linux/errno.h>
 #include "xhci.h"
 
-#ifndef CONFIG_USB_MAX_CONTROLLER_COUNT
-#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
-#endif
-
 static struct descriptor {
 	struct usb_hub_descriptor hub;
 	struct usb_device_descriptor device;
@@ -110,6 +106,10 @@ static struct descriptor {
 };
 
 #ifndef CONFIG_DM_USB
+# ifndef CONFIG_USB_MAX_CONTROLLER_COUNT
+#  define CONFIG_USB_MAX_CONTROLLER_COUNT 1
+# endif
+
 static struct xhci_ctrl xhcic[CONFIG_USB_MAX_CONTROLLER_COUNT];
 #endif
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] usb: host: Move CONFIG_USB_MAX_CONTROLLER_COUNT to non-dm
  2016-10-15 13:02 [U-Boot] [PATCH] usb: host: Move CONFIG_USB_MAX_CONTROLLER_COUNT to non-dm Jagan Teki
@ 2016-10-15 14:05 ` Tom Rini
  2016-10-15 16:39   ` Marek Vasut
  2016-10-15 17:02   ` Masahiro Yamada
  0 siblings, 2 replies; 5+ messages in thread
From: Tom Rini @ 2016-10-15 14:05 UTC (permalink / raw)
  To: u-boot

On Sat, Oct 15, 2016 at 06:32:46PM +0530, Jagan Teki wrote:

> CONFIG_USB_MAX_CONTROLLER_COUNT not used in DM_USB, hence moved
> to non-dm from global area.
> 
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Signed-off-by: Jagan Teki <jteki@openedev.com>
> ---
>  drivers/usb/host/ehci-hcd.c | 8 ++++----
>  drivers/usb/host/xhci.c     | 8 ++++----
>  2 files changed, 8 insertions(+), 8 deletions(-)

It would be better to just move this to Kconfig, thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161015/c0e96a0b/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] usb: host: Move CONFIG_USB_MAX_CONTROLLER_COUNT to non-dm
  2016-10-15 14:05 ` Tom Rini
@ 2016-10-15 16:39   ` Marek Vasut
  2016-10-15 17:02   ` Masahiro Yamada
  1 sibling, 0 replies; 5+ messages in thread
From: Marek Vasut @ 2016-10-15 16:39 UTC (permalink / raw)
  To: u-boot

On 10/15/2016 04:05 PM, Tom Rini wrote:
> On Sat, Oct 15, 2016 at 06:32:46PM +0530, Jagan Teki wrote:
> 
>> CONFIG_USB_MAX_CONTROLLER_COUNT not used in DM_USB, hence moved
>> to non-dm from global area.
>>
>> Cc: Simon Glass <sjg@chromium.org>
>> Cc: Marek Vasut <marex@denx.de>
>> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
>> Signed-off-by: Jagan Teki <jteki@openedev.com>
>> ---
>>  drivers/usb/host/ehci-hcd.c | 8 ++++----
>>  drivers/usb/host/xhci.c     | 8 ++++----
>>  2 files changed, 8 insertions(+), 8 deletions(-)
> 
> It would be better to just move this to Kconfig, thanks.
> 
Yes, agreed.

-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] usb: host: Move CONFIG_USB_MAX_CONTROLLER_COUNT to non-dm
  2016-10-15 14:05 ` Tom Rini
  2016-10-15 16:39   ` Marek Vasut
@ 2016-10-15 17:02   ` Masahiro Yamada
  2016-10-15 17:03     ` Tom Rini
  1 sibling, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2016-10-15 17:02 UTC (permalink / raw)
  To: u-boot

2016-10-15 23:05 GMT+09:00 Tom Rini <trini@konsulko.com>:
> On Sat, Oct 15, 2016 at 06:32:46PM +0530, Jagan Teki wrote:
>
>> CONFIG_USB_MAX_CONTROLLER_COUNT not used in DM_USB, hence moved
>> to non-dm from global area.
>>
>> Cc: Simon Glass <sjg@chromium.org>
>> Cc: Marek Vasut <marex@denx.de>
>> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
>> Signed-off-by: Jagan Teki <jteki@openedev.com>
>> ---
>>  drivers/usb/host/ehci-hcd.c | 8 ++++----
>>  drivers/usb/host/xhci.c     | 8 ++++----
>>  2 files changed, 8 insertions(+), 8 deletions(-)
>
> It would be better to just move this to Kconfig, thanks.
>


This option will be removed sooner or later.

Do we need to move deprecated options to Kconfig?





-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] usb: host: Move CONFIG_USB_MAX_CONTROLLER_COUNT to non-dm
  2016-10-15 17:02   ` Masahiro Yamada
@ 2016-10-15 17:03     ` Tom Rini
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2016-10-15 17:03 UTC (permalink / raw)
  To: u-boot

On Sun, Oct 16, 2016 at 02:02:13AM +0900, Masahiro Yamada wrote:
> 2016-10-15 23:05 GMT+09:00 Tom Rini <trini@konsulko.com>:
> > On Sat, Oct 15, 2016 at 06:32:46PM +0530, Jagan Teki wrote:
> >
> >> CONFIG_USB_MAX_CONTROLLER_COUNT not used in DM_USB, hence moved
> >> to non-dm from global area.
> >>
> >> Cc: Simon Glass <sjg@chromium.org>
> >> Cc: Marek Vasut <marex@denx.de>
> >> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> >> Signed-off-by: Jagan Teki <jteki@openedev.com>
> >> ---
> >>  drivers/usb/host/ehci-hcd.c | 8 ++++----
> >>  drivers/usb/host/xhci.c     | 8 ++++----
> >>  2 files changed, 8 insertions(+), 8 deletions(-)
> >
> > It would be better to just move this to Kconfig, thanks.
> 
> This option will be removed sooner or later.
> 
> Do we need to move deprecated options to Kconfig?

If someone is touching it I'd rather see it moved.  So we could just
drop this patch.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161015/aae309e0/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-15 17:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-15 13:02 [U-Boot] [PATCH] usb: host: Move CONFIG_USB_MAX_CONTROLLER_COUNT to non-dm Jagan Teki
2016-10-15 14:05 ` Tom Rini
2016-10-15 16:39   ` Marek Vasut
2016-10-15 17:02   ` Masahiro Yamada
2016-10-15 17:03     ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox