public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI
@ 2010-09-20  1:57 Marek Vasut
  2010-09-20  1:57 ` [U-Boot] [PATCH 2/2] Config: Add "board variant" column to boards.cfg Marek Vasut
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Marek Vasut @ 2010-09-20  1:57 UTC (permalink / raw)
  To: u-boot

This fixes TIMEOUT with my Kingston 32GB USB3.0 flashdrive, which I experienced
on my PXA270 (USB 1.1) Vpac270 board.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 drivers/usb/host/ohci-hcd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 3f76c4e..d246978 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1529,7 +1529,7 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
 	if (usb_pipebulk(pipe))
 		timeout = BULK_TO;
 	else
-		timeout = 100;
+		timeout = 1000;
 
 	/* wait for it to complete */
 	for (;;) {
-- 
1.7.1

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

* [U-Boot] [PATCH 2/2] Config: Add "board variant" column to boards.cfg
  2010-09-20  1:57 [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI Marek Vasut
@ 2010-09-20  1:57 ` Marek Vasut
  2010-09-20 18:02   ` Wolfgang Denk
  2010-10-03 23:36 ` [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI Marek Vasut
  2010-10-09  7:27 ` Remy Bohmer
  2 siblings, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2010-09-20  1:57 UTC (permalink / raw)
  To: u-boot

There are some boards where it's not currently possible to detect all board
information at runtime, therefore I introduced a new column called "variant" to
boards.cfg . If this field is set, CONFIG_fieldvalue is #define-d in config.h

Also, I had to add fallback logic, because each of the board variants has a
distinct name. This led to the mkconfig #including incorrect board configuration
file (<configs/whole-board-configuration-name.h> aka. the value in column one).
I implemented a logic which checks if such file exists and if it does not, it
includes<configs/board-name.h> aka. the value in third column.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 Makefile   |   22 ----------------------
 boards.cfg |    9 +++++++--
 mkconfig   |   18 +++++++++++++++++-
 3 files changed, 24 insertions(+), 25 deletions(-)

diff --git a/Makefile b/Makefile
index 4dc68a5..1e5374e 100644
--- a/Makefile
+++ b/Makefile
@@ -2179,28 +2179,6 @@ scpu_config:	unconfig
 	fi
 	@$(MKCONFIG) -n $@ -a pdnb3 arm ixp pdnb3 prodrive
 
-polaris_config \
-trizepsiv_config	:	unconfig
-	@mkdir -p $(obj)include
-	@if [ "$(findstring polaris,$@)" ] ; then \
-		echo "#define CONFIG_POLARIS 1"	>>$(obj)include/config.h ; \
-	fi;
-	@$(MKCONFIG) -n $@ -a trizepsiv arm pxa trizepsiv
-
-vpac270_nor_256M_config \
-vpac270_nor_128M_config \
-vpac270_onenand_config	: unconfig
-	@mkdir -p $(obj)include
-	@if [ "$(findstring onenand,$@)" ] ; then \
-		echo "#define CONFIG_ONENAND_U_BOOT" \
-			>>$(obj)include/config.h ; \
-	fi;
-	@if [ "$(findstring 256M,$@)" ] ; then \
-		echo "#define CONFIG_256M_U_BOOT" \
-			>>$(obj)include/config.h ; \
-	fi;
-	@$(MKCONFIG) -n $@ -a vpac270 arm pxa vpac270
-
 #########################################################################
 ## ARM1136 Systems
 #########################################################################
diff --git a/boards.cfg b/boards.cfg
index 7ee733c..b29e884 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -17,8 +17,8 @@
 #
 #	:.,$! sort -f -k2,2 -k3,3 -k6,6 -k5,5 -k1,1
 #
-# Target	ARCH	CPU		Board name	Vendor		SoC
-###########################################################################
+# Target	ARCH	CPU		Board name	Vendor		SoC		Variant
+###############################################################################################
 
 qong		arm	arm1136		-		davedenx	mx31
 mx31ads		arm	arm1136		-		freescale	mx31
@@ -64,6 +64,11 @@ lubbock		arm	pxa
 palmld		arm	pxa
 palmtc		arm	pxa
 pleb2		arm	pxa
+polaris		arm	pxa		trizepsiv	-		-		POLARIS
+trizepsiv	arm	pxa		trizepsiv
+vpac270_nor_128M arm	pxa		vpac270
+vpac270_nor_256M arm	pxa		vpac270		-		-		256M_U_BOOT
+vpac270_onenand	arm	pxa		vpac270		-		-		ONENAND_U_BOOT
 xaeniax		arm	pxa
 xm250		arm	pxa
 zipitz2		arm	pxa
diff --git a/mkconfig b/mkconfig
index b661071..d03d70f 100755
--- a/mkconfig
+++ b/mkconfig
@@ -17,6 +17,7 @@ cpu=""
 board=""
 vendor=""
 soc=""
+variant=""
 
 if [ \( $# -eq 2 \) -a \( "$1" = "-A" \) ] ; then
 	# Automatic mode
@@ -41,7 +42,7 @@ while [ $# -gt 0 ] ; do
 done
 
 [ $# -lt 4 ] && exit 1
-[ $# -gt 6 ] && exit 1
+[ $# -gt 7 ] && exit 1
 
 CONFIG_NAME="${1%_config}"
 
@@ -56,6 +57,7 @@ else
 fi
 [ $# -gt 4 ] && [ "$5" != "-" ] && vendor="$5"
 [ $# -gt 5 ] && [ "$6" != "-" ] && soc="$6"
+[ $# -gt 6 ] && [ "$7" != "-" ] && variant="$7"
 
 if [ "${ARCH}" -a "${ARCH}" != "${arch}" ]; then
 	echo "Failed: \$ARCH=${ARCH}, should be '${arch}' for ${BOARD_NAME}" 1>&2
@@ -129,6 +131,20 @@ for i in ${TARGETS} ; do
 	echo "#define CONFIG_MK_${i} 1" >>config.h ;
 done
 
+if [ -n "${variant}" ] ; then
+	echo "#define CONFIG_${variant} 1" >>config.h ;
+fi
+
+# If there's no config file for the configuration, try config file for the
+# board instead.
+if [ ! -e configs/${CONFIG_NAME}.h ] ; then
+	if [ -e configs/${board}.h ] ; then
+		CONFIG_NAME=${board} ;
+	else
+		exit 1 ;
+	fi;
+fi
+
 cat << EOF >> config.h
 #define CONFIG_BOARDDIR board/$BOARDDIR
 #include <config_defaults.h>
-- 
1.7.1

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

* [U-Boot] [PATCH 2/2] Config: Add "board variant" column to boards.cfg
  2010-09-20  1:57 ` [U-Boot] [PATCH 2/2] Config: Add "board variant" column to boards.cfg Marek Vasut
@ 2010-09-20 18:02   ` Wolfgang Denk
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2010-09-20 18:02 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1284947846-12811-2-git-send-email-marek.vasut@gmail.com> you wrote:
> There are some boards where it's not currently possible to detect all board
> information at runtime, therefore I introduced a new column called "variant" to
> boards.cfg . If this field is set, CONFIG_fieldvalue is #define-d in config.h

Thanks for the start on this, but I would like to see a little more
genral approach here.

Passing a single option is IMO not enough. I posted a pretty complete
specification of the format I have in mind before:

http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/81138/focus=81332

Do you think you could adapt your implementation to more in line with
that?

Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
After a heated argument on some trivial matter Nancy [Astor]  .  .  .
shouted,  ``If  I were your wife I would put poison in your coffee!''
Whereupon Winston Churchill with equal heat and  sincerity  answered,
``And if I were your husband I would drink it.''

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

* [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI
  2010-09-20  1:57 [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI Marek Vasut
  2010-09-20  1:57 ` [U-Boot] [PATCH 2/2] Config: Add "board variant" column to boards.cfg Marek Vasut
@ 2010-10-03 23:36 ` Marek Vasut
  2010-10-04  4:43   ` Wolfgang Denk
  2010-10-09  7:27 ` Remy Bohmer
  2 siblings, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2010-10-03 23:36 UTC (permalink / raw)
  To: u-boot

Dne Po 20. z??? 2010 03:57:25 Marek Vasut napsal(a):
> This fixes TIMEOUT with my Kingston 32GB USB3.0 flashdrive, which I
> experienced on my PXA270 (USB 1.1) Vpac270 board.

CC Remy
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
>  drivers/usb/host/ohci-hcd.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
> index 3f76c4e..d246978 100644
> --- a/drivers/usb/host/ohci-hcd.c
> +++ b/drivers/usb/host/ohci-hcd.c
> @@ -1529,7 +1529,7 @@ int submit_common_msg(struct usb_device *dev,
> unsigned long pipe, void *buffer, if (usb_pipebulk(pipe))
>  		timeout = BULK_TO;
>  	else
> -		timeout = 100;
> +		timeout = 1000;
> 
>  	/* wait for it to complete */
>  	for (;;) {

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

* [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI
  2010-10-03 23:36 ` [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI Marek Vasut
@ 2010-10-04  4:43   ` Wolfgang Denk
  2010-10-04 14:02     ` Marek Vasut
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2010-10-04  4:43 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <201010040136.27940.marek.vasut@gmail.com> you wrote:
> Dne Po 20. z?#? 2010 03:57:25 Marek Vasut napsal(a):
> > This fixes TIMEOUT with my Kingston 32GB USB3.0 flashdrive, which I
> > experienced on my PXA270 (USB 1.1) Vpac270 board.
> 
> CC Remy

How do you expoect this to work? You did NOT add him to the Cc: list.

Also please note that "wdenk at denx.de" is a non-existing address.



Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Summit meetings tend to be like panda matings. The expectations  are
always high, and the results usually disappointing."   - Robert Orben

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

* [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI
  2010-10-04  4:43   ` Wolfgang Denk
@ 2010-10-04 14:02     ` Marek Vasut
  2010-10-04 16:42       ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2010-10-04 14:02 UTC (permalink / raw)
  To: u-boot

Dne Po 4. ??jna 2010 06:43:45 Wolfgang Denk napsal(a):
> Dear Marek Vasut,
> 
> In message <201010040136.27940.marek.vasut@gmail.com> you wrote:
> > Dne Po 20. z?#? 2010 03:57:25 Marek Vasut napsal(a):
> > > This fixes TIMEOUT with my Kingston 32GB USB3.0 flashdrive, which I
> > > experienced on my PXA270 (USB 1.1) Vpac270 board.
> > 
> > CC Remy
> 
> How do you expoect this to work? You did NOT add him to the Cc: list.
> 
> Also please note that "wdenk at denx.de" is a non-existing address.
> 
> 
> 
> Best regards,
> 
> Wolfgang Denk

I added him to CC in mail ... what else do you expect?

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

* [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI
  2010-10-04 14:02     ` Marek Vasut
@ 2010-10-04 16:42       ` Wolfgang Denk
  2010-10-05 11:48         ` Detlev Zundel
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2010-10-04 16:42 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <201010041602.04183.marek.vasut@gmail.com> you wrote:
>
> > How do you expoect this to work? You did NOT add him to the Cc: list.
...
> I added him to CC in mail ... what else do you expect?

The message I received through the list did not contain any such Cc:

| Subject: Re: [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI
| From: Marek Vasut <marek.vasut@gmail.com>
| Date: Mon, 4 Oct 2010 01:36:27 +0200
| To: u-boot at lists.denx.de
| Cc: wdenk at denx.de

But I ran into a similar issue myself today.

Dunno what happens...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Microsoft Multitasking:
                     several applications can crash at the same time.

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

* [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI
  2010-10-04 16:42       ` Wolfgang Denk
@ 2010-10-05 11:48         ` Detlev Zundel
  0 siblings, 0 replies; 9+ messages in thread
From: Detlev Zundel @ 2010-10-05 11:48 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,


[...]

> The message I received through the list did not contain any such Cc:
>
> | Subject: Re: [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI
> | From: Marek Vasut <marek.vasut@gmail.com>
> | Date: Mon, 4 Oct 2010 01:36:27 +0200
> | To: u-boot at lists.denx.de
> | Cc: wdenk at denx.de
>
> But I ran into a similar issue myself today.
>
> Dunno what happens...

Welcome to the club - been there, didn't understand it either ;)

Cheers
  Detlev

-- 
Die eine Haelfte der Welt lacht ueber die andere, und Narren sind alle.
                                    --- Baltasar Gracian
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

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

* [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI
  2010-09-20  1:57 [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI Marek Vasut
  2010-09-20  1:57 ` [U-Boot] [PATCH 2/2] Config: Add "board variant" column to boards.cfg Marek Vasut
  2010-10-03 23:36 ` [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI Marek Vasut
@ 2010-10-09  7:27 ` Remy Bohmer
  2 siblings, 0 replies; 9+ messages in thread
From: Remy Bohmer @ 2010-10-09  7:27 UTC (permalink / raw)
  To: u-boot

Hi,

2010/9/20 Marek Vasut <marek.vasut@gmail.com>:
> This fixes TIMEOUT with my Kingston 32GB USB3.0 flashdrive, which I experienced
> on my PXA270 (USB 1.1) Vpac270 board.
>
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> ?drivers/usb/host/ohci-hcd.c | ? ?2 +-
> ?1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
> index 3f76c4e..d246978 100644
> --- a/drivers/usb/host/ohci-hcd.c
> +++ b/drivers/usb/host/ohci-hcd.c
> @@ -1529,7 +1529,7 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
> ? ? ? ?if (usb_pipebulk(pipe))
> ? ? ? ? ? ? ? ?timeout = BULK_TO;
> ? ? ? ?else
> - ? ? ? ? ? ? ? timeout = 100;
> + ? ? ? ? ? ? ? timeout = 1000;
>
> ? ? ? ?/* wait for it to complete */
> ? ? ? ?for (;;) {

No problem to increase this default timeout.
So, applied to u-boot-usb.

Thanks.

Remy

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

end of thread, other threads:[~2010-10-09  7:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-20  1:57 [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI Marek Vasut
2010-09-20  1:57 ` [U-Boot] [PATCH 2/2] Config: Add "board variant" column to boards.cfg Marek Vasut
2010-09-20 18:02   ` Wolfgang Denk
2010-10-03 23:36 ` [U-Boot] [PATCH 1/2] USB: Make non-bulk delay longer in OHCI Marek Vasut
2010-10-04  4:43   ` Wolfgang Denk
2010-10-04 14:02     ` Marek Vasut
2010-10-04 16:42       ` Wolfgang Denk
2010-10-05 11:48         ` Detlev Zundel
2010-10-09  7:27 ` Remy Bohmer

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