Re: [U-Boot] Many questions about U-Boot's Driver Model

2014-09-20 Thread Masahiro YAMADA
Hi Simon, 2014-09-20 7:25 GMT+09:00 Simon Glass s...@chromium.org: - the bind/unbind allows you to have devices which are known to the system, but not yet probed. This is important in a boot loader (e.g. we don't want to probe devices until they are actually needed, and some will never be

Re: [U-Boot] [PATCH] usb: f_mass_storage: set removable flag in do_inquiry based on LUN

2014-09-20 Thread Marek Vasut
On Saturday, September 20, 2014 at 02:06:46 AM, Eric Nelson wrote: Without this flag, tools like Alex Page's USB Image Tool won't see drives exposed over USB Gadget as removable, and won't allow access to them. http://www.alexpage.de/usb-image-tool/ The code was pulled from the

Re: [U-Boot] [PATCH v4 2/6] serial: add UniPhier serial driver

2014-09-20 Thread Masahiro YAMADA
Hi Simon, 2014-09-20 1:30 GMT+09:00 Simon Glass s...@chromium.org: It looks like CONFIG_DM_SERIAL depends on CONFIG_OF_CONTROL. UniPhier SoCs do not support device tree control. Is the driver model serial still available? What will happen if gd-fdt_blob is not set? Please this patch.

Re: [U-Boot] [U-Boot, 2/3] image: move all function comments to header file

2014-09-20 Thread Albert ARIBAUD
Hi Masahiro, On Sat, 20 Sep 2014 14:34:29 +0900, Masahiro YAMADA yamad...@jp.panasonic.com wrote: Hi. I vote for comments near the implementation. I have been digging into the driver model code recently, but I have to admit it is unreadable because most of comments are placed in its

Re: [U-Boot] [PATCH 1/7] spl: pbl: Add new SPL image for pblimage tool

2014-09-20 Thread Albert ARIBAUD
Hi Huan, On Fri, 19 Sep 2014 05:07:05 +, Huan Wang alison.w...@freescale.com wrote: Hi, Albert, On Thu, 18 Sep 2014 13:47:13 +0800, Alison Wang b18...@freescale.com wrote: For the pblimage tool, the SPL image is splitted into 64 byte chunks, and PBL needs a command for each

[U-Boot] [PATCH fix for v2014.10 1/5] usb: ehci: Properly set hub devnum and portnr with usb-1 hubs in the chain

2014-09-20 Thread Hans de Goede
For full / low speed devices we need to get the devnum and portnr of the tt, so of the first upstream usb-2 hub, not of the parent device (which may be a usb-1 hub). Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 36 1 file

[U-Boot] [PATCH fix for v2014.10 2/5] usb: ehci: Add missing cache flush to destroy_int_queue

2014-09-20 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 41af302..1a0ddc3 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@

[U-Boot] [PATCH fix for v2014.10 5/5] usb: kbd: Fix unaligned buffer usage in usb_kbd_setled()

2014-09-20 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- common/usb_kbd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/usb_kbd.c b/common/usb_kbd.c index c34fd5c..87f4125 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -170,11 +170,12 @@ static void

[U-Boot] [PATCH fix for v2014.10 4/5] usb: ehci: Make periodic_schedules a per controller variable

2014-09-20 Thread Hans de Goede
Periodic schedules tracks how many int_queue-s are active, and decides whether or not to en/disable the periodic schedule based on this. This is clearly a per controller thing. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 9 - drivers/usb/host/ehci.h

[U-Boot] [PATCH fix for v2014.10 3/5] usb: ehci: poll_int_queue check real qtd, not the overlay

2014-09-20 Thread Hans de Goede
When we first start an int queue, the qh's overlay area is all zeros. This gets filled by the hc with the actual qtd values as soon as it advances the queue, but we may call poll_int_queue before then, in which case we would think the transfer has completed as the hc has not yet copied the

[U-Boot] [PATCH fix for v2014.10 0/5] USB bug-fixes for v2014.10

2014-09-20 Thread Hans de Goede
Hi Marek, Here I thought I good get away from always spending my time working on USB by hobbying a bit with ARM devices, only to end up doing USB work :) I'm happy to report though that I've gotten USB keyboards to work reliable with u-boot on Allwinner/sunxi devices. This is a first set of

[U-Boot] [PATCH fix for v2014.10 1/5] usb: kbd: Do not treat -ENODEV as an error for usb_kbd_deregister

2014-09-20 Thread Hans de Goede
ENODEV menas no usb keyboard was registered, threat this as a successful usb_kbd_deregister. Signed-off-by: Hans de Goede hdego...@redhat.com --- common/usb_kbd.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/usb_kbd.c b/common/usb_kbd.c index 87f4125..4c17b0d

[U-Boot] [PATCH fix for v2014.10 0/5] USB keyboard: don't crash on usb reset

2014-09-20 Thread Hans de Goede
Hi Marek, Here is the second set of USB patches / fixes I've been working on, currently u-boot does really bad things (tm) when doing usb reset while using an usb keyboard. This set fixes this. Given that these fix really bad things (tm) I not only believe that these are suitable to go into

[U-Boot] [PATCH fix for v2014.10 2/5] usb: kbd: On a usb reset call usb_kbd_deregister() before calling usb_stop()

2014-09-20 Thread Hans de Goede
We need to call usb_kbd_deregister() before calling usb_stop(). usbkbd's stdio_dev-priv points to the usb_device, and usb_kbd_testc dereferences usb_device-privptr. usb_stop zeros usb_device, leaving usb_device-privptr NULL, causing bad things (tm) to happen once control returns to the main loop

[U-Boot] [PATCH fix for v2014.10 3/5] usb: kbd: Remove check for already being registered

2014-09-20 Thread Hans de Goede
We now always properly deregister the keyboard before calling drv_usb_kbd_init(), so we can drop the check for already being registered. Signed-off-by: Hans de Goede hdego...@redhat.com --- common/usb_kbd.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git

[U-Boot] [PATCH fix for v2014.10 5/5] usb: kbd: Allow usb reset to continue when an usb kbd is used

2014-09-20 Thread Hans de Goede
Use the new force parameter to make the stdio_deregister succeed, replacing stdin with a nulldev, and assume that the usb keyboard will come back after the reset. Signed-off-by: Hans de Goede hdego...@redhat.com --- common/cmd_usb.c | 8 common/usb_kbd.c | 4 ++-- include/usb.h| 2

[U-Boot] [PATCH fix for v2014.10 4/5] stdio: Add force parameter to stdio_deregister

2014-09-20 Thread Hans de Goede
In some cases we really want to move forward with a deregister, add a force parameter to allow this, and replace the dev with a nulldev in this case. Signed-off-by: Hans de Goede hdego...@redhat.com --- common/stdio.c | 13 ++--- common/usb_kbd.c | 2 +-

[U-Boot] [PATCH 0/7] Add a better USB keyboard polling method

2014-09-20 Thread Hans de Goede
Hi Marek, This time a patch-set for next :) Currently one can choose between 2 poll methods for usb keyboards, both of which are suboptimal. One option is to use control messages to get reports, which some devices (e.g. my kvm) do not like. The other option is to use interrupt urbs, but

[U-Boot] [PATCH 3/7] usb: ehci: Move cache invalidation to poll_int_queue

2014-09-20 Thread Hans de Goede
Preperation patch to use poll_int_queue outside of ehci-hcd.c . Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index

[U-Boot] [PATCH 2/7] usb: ehci: Move interrupt packet length check to create_int_queue

2014-09-20 Thread Hans de Goede
Preperation patch to use create_int_queue outside of ehci-hcd.c . Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c

[U-Boot] [PATCH 4/7] usb: Make pollable int support available outside of ehci-hcd.c

2014-09-20 Thread Hans de Goede
Signed-off-by: Hans de Goede hdego...@redhat.com --- include/usb.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/usb.h b/include/usb.h index c355fbe..6b29aed 100644 --- a/include/usb.h +++ b/include/usb.h @@ -129,6 +129,8 @@ struct usb_device { unsigned int slot_id;

[U-Boot] [PATCH 6/7] usb: kbd: Cache pipe, interval and packetsize

2014-09-20 Thread Hans de Goede
Instead of looking them up every time we need them. Signed-off-by: Hans de Goede hdego...@redhat.com --- common/usb_kbd.c | 34 +- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/common/usb_kbd.c b/common/usb_kbd.c index cb869ac..85ee1c8 100644 ---

[U-Boot] [PATCH 1/7] usb: ehci: Do not disable an already disabled periodic schedule

2014-09-20 Thread Hans de Goede
When periodic_schedules == 0, the schedule is disabled and there is no reason to disable it again. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c

[U-Boot] [PATCH 7/7] usb: kbd: Add (optional) support for using an interrupt queue for polling

2014-09-20 Thread Hans de Goede
Waiting an interrupt packet to complete in usb_kbd_poll_for_event, causes a 40 ms latency for each call to usb_kbd_testc, which is undesirable. Using control messages leads to lower (but still not 0) latency, but some devices do not work well with control messages (e.g. my kvm behaves funny with

[U-Boot] [PATCH 5/7] usb: kbd: Remove unused usb_kbd_generic_poll function

2014-09-20 Thread Hans de Goede
This is not used anywhere, so lets remove it. Signed-off-by: Hans de Goede hdego...@redhat.com --- common/usb_kbd.c | 26 -- 1 file changed, 26 deletions(-) diff --git a/common/usb_kbd.c b/common/usb_kbd.c index fdc083c..cb869ac 100644 --- a/common/usb_kbd.c +++

[U-Boot] [PATCH 0/2] Misc. USB fixes

2014-09-20 Thread Hans de Goede
Hi Marek, And last 2 misc. fixes for USB for next. The first patch is self explanatory, the second patch is a result of me looking into why u-boot's usb scanning is so slww, not that it really helps there, but it is a tiny start. I've several other ideas how to speed things up, but those

[U-Boot] [PATCH 2/2] usb: Do not power-cycle usb devices on init

2014-09-20 Thread Hans de Goede
Do as the Linux kernel does and power on any ports which are not yet one, this is enough. Signed-off-by: Hans de Goede hdego...@redhat.com --- common/usb_hub.c | 39 --- 1 file changed, 39 deletions(-) diff --git a/common/usb_hub.c b/common/usb_hub.c index

[U-Boot] [PATCH 1/2] usb: Remove unnecessary portnr lookup from usb_new_device

2014-09-20 Thread Hans de Goede
If the device has a parent, it is instantiated from usb_hub_port_connect_change and the portnr is right there in dev-portnr, so there is no need for this whole dance to look it up. Signed-off-by: Hans de Goede hdego...@redhat.com --- common/usb.c | 19 ++- 1 file changed, 2

Re: [U-Boot] [PATCH 7/7] usb: kbd: Add (optional) support for using an interrupt queue for polling

2014-09-20 Thread Hans de Goede
Hi, On 09/20/2014 05:01 PM, Hans de Goede wrote: Waiting an interrupt packet to complete in usb_kbd_poll_for_event, causes a 40 ms latency for each call to usb_kbd_testc, which is undesirable. Using control messages leads to lower (but still not 0) latency, but some devices do not work well

Re: [U-Boot] [PATCH 2/7] usb: ehci: Move interrupt packet length check to create_int_queue

2014-09-20 Thread Michael Trimarchi
Hi On Sat, Sep 20, 2014 at 5:01 PM, Hans de Goede hdego...@redhat.com wrote: Preperation patch to use create_int_queue outside of ehci-hcd.c . Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 36 +++- 1 file changed, 19

Re: [U-Boot] [PATCH 6/7] usb: kbd: Cache pipe, interval and packetsize

2014-09-20 Thread Michael Trimarchi
Hi On Sat, Sep 20, 2014 at 5:01 PM, Hans de Goede hdego...@redhat.com wrote: Instead of looking them up every time we need them. split subject and patch description Signed-off-by: Hans de Goede hdego...@redhat.com --- common/usb_kbd.c | 34 +- 1 file

Re: [U-Boot] [PATCH fix for v2014.10 2/5] usb: ehci: Add missing cache flush to destroy_int_queue

2014-09-20 Thread Michael Trimarchi
Hi On Sat, Sep 20, 2014 at 4:51 PM, Hans de Goede hdego...@redhat.com wrote: Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index

Re: [U-Boot] [PATCH 2/2] config_distro_defaults.h: add CONFIG_API

2014-09-20 Thread Jeroen Hofstee
Hello Tom, On 23-08-14 19:47, Tom Rini wrote: On Sun, Aug 10, 2014 at 12:30:56AM +0200, Jeroen Hofstee wrote: Grub, FreeBSD ubldr, vxworks etc depend on the API Signed-off-by: Jeroen Hofstee jer...@myspectrum.nl ok, lets start with I hope what I hope config_distro_defaults is. At the

[U-Boot] [PATCH] cm_fx6: Remove CONFIG_NETMASK

2014-09-20 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com We should not hardcode CONFIG_NETMASK in the config file. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- include/configs/cm_fx6.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h