16 Aug, 2017

1 commit

  • We are now using an env_ prefix for environment functions. Rename these
    two functions for consistency. Also add function comments in common.h.

    Quite a few places use getenv() in a condition context, provoking a
    warning from checkpatch. These are fixed up in this patch also.

    Suggested-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass
     

06 Feb, 2017

1 commit


24 Oct, 2016

1 commit


24 Sep, 2016

1 commit


10 Apr, 2016

1 commit

  • The dm usb_kbd_remove function() will deregister the usb keyboard for
    us on a "usb reset" / "usb stop" so there is no need to manually call
    usb_kbd_deregister() in the dm case.

    This commit removes usb_kbd_deregister() in the dm case fixing the
    following "usb reset" errors:

    usb_kbd_remove: warning, ret=-6
    device_remove: Device 'usb_kbd' failed to remove, but children are gone

    Signed-off-by: Hans de Goede

    Hans de Goede
     

26 Jan, 2016

1 commit

  • Scan code 0x39 is CapsLock, which is not a printable character and thus
    is not covered by either usb_kbd_numkey_shifted[] or usb_kbd_numkey[].
    Fix the scan code check to avoid looking it up in either of the arrays.

    Signed-off-by: Marek Vasut

    Marek Vasut
     

08 Jan, 2016

1 commit


18 Dec, 2015

1 commit

  • When CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP is enabled, use a
    GET_REPORT control transfer to retrieve the initial state of the
    keyboard. This matches the technique used to poll the keyboard state.
    This is useful since it eliminates the remaining use of interrupt
    transfers from the USB keyboard driver, which allows it to work with
    USB HCD that don't support interrupt transfers.

    Cc: Hans de Goede
    Signed-off-by: Stephen Warren

    Stephen Warren
     

20 Nov, 2015

5 commits


05 Nov, 2015

1 commit


12 Sep, 2015

1 commit


22 Jul, 2015

1 commit

  • In Linux USB_DEVICE() is used to declare a USB device by vendor/device ID.
    We should follow the same convention in U-Boot. Rename the existing
    USB_DEVICE() macro to U_BOOT_USB_DEVICE() and bring in the USB_DEVICE()
    macro from Linux for use in U-Boot.

    Signed-off-by: Simon Glass

    Simon Glass
     

19 Jun, 2015

1 commit


29 May, 2015

1 commit

  • The usb-kbd key repeat code assumes that reports get repeated every 40 ms,
    this is never true when using CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP, and
    does not always works for CONFIG_SYS_USB_EVENT_POLL and
    CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE since not all usb keyboards honor
    the usb_set_idle() command.

    For CONFIG_SYS_USB_EVENT_POLL we must use usb_set_idle() since we do a
    blocking wait for the hid report, so if we do not tell the keyboard to send
    a hid report every 40ms even if nothing changes then we will block u-boot
    for 1s (the default u-boot usb interrupt packet timeout). Note that in this
    case on keyboards which do not support usb_set_idle() we loose and we actually
    get 1s latencies on other u-boot activities.

    For the other poll-methods this commit stops using usb_set_idle() and instead
    repeats the last received hid-report every 40 ms as long as no new hid-report
    is received. This fixes key-repeat not working at all with
    CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP and fixes it not working with
    keyboards which do not implement usb_set_idle() when using
    CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE.

    Signed-off-by: Hans de Goede

    Hans de Goede
     

19 Apr, 2015

2 commits


18 Jan, 2015

2 commits

  • When iomuxing is used we must not only deregister the device with stdio.c,
    but also remove the reference to the device in the console_devices array
    used by console-muxing. Add a call to iomux_doenv to usb_kbd_deregister to
    update console_devices, which will drop the reference.

    This fixes the console filling with "Failed to enqueue URB to controller"
    messages after a "usb stop force", or when the USB keyboard is gone after a
    "usb reset".

    Signed-off-by: Hans de Goede

    Hans de Goede
     
  • Currently create_int_queue is only implemented by the ehci code, and that
    does not honor interrupt intervals, but other drivers which might also want
    to implement create_int_queue may honor intervals, so add an interval param.

    Signed-off-by: Hans de Goede

    Hans de Goede
     

04 Nov, 2014

4 commits


06 Oct, 2014

5 commits


23 Jul, 2014

2 commits

  • At present stdio device functions do not get any clue as to which stdio
    device is being acted on. Some implementations go to great lengths to work
    around this, such as defining a whole separate set of functions for each
    possible device.

    For driver model we need to associate a stdio_dev with a device. It doesn't
    seem possible to continue with this work-around approach.

    Instead, add a stdio_dev pointer to each of the stdio member functions.

    Note: The serial drivers have the same problem, but it is not strictly
    necessary to fix that to get driver model running. Also, if we convert
    serial over to driver model the problem will go away.

    Code size increases by 244 bytes for Thumb2 and 428 for PowerPC.

    22: stdio: Pass device pointer to stdio methods
    arm: (for 2/2 boards) all +244.0 bss -4.0 text +248.0
    powerpc: (for 1/1 boards) all +428.0 text +428.0

    Signed-off-by: Simon Glass
    Acked-by: Marek Vasut
    Reviewed-by: Marek Vasut

    Simon Glass
     
  • There is no point in setting a structure's memory to NULL when it has
    already been zeroed with memset().

    Also, there is no need to create a stub function for stdio to call - if the
    function is NULL it will not be called.

    This is a clean-up, with no change in functionality.

    Signed-off-by: Simon Glass
    Acked-by: Marek Vasut

    Simon Glass
     

30 Apr, 2014

1 commit


27 Aug, 2013

2 commits

  • TFTP booting is slow when a USB keyboard is installed and
    stdin has usbkbd added.
    This fix is to change Ctrl-C polling for USB keyboard to every second
    when NET transfer is running.
    My previous patch is expected to be put into usb_kbd_testc(). But it went
    into usb_kbd_getc() after applied.
    This patch is to put change in correct place.

    Signed-off-by: Jim Lin

    Jim Lin
     
  • TFTP booting is slow when a USB keyboard is installed and
    stdin has usbkbd added.
    This fix is to change Ctrl-C polling for USB keyboard to every second
    when NET transfer is running.

    Signed-off-by: Jim Lin

    Jim Lin
     

24 Jul, 2013

1 commit


13 Jun, 2013

2 commits

  • If the USB keyboard is not answering properly the first request on its
    interrupt endpoint, just skip it and try the next one.

    This workarounds an issue with a wireless mouse dongle which presents
    itself both as a keyboard and a mouse but has a non-functional keyboard
    interface.

    Signed-off-by: Vincent Palatin
    (cherry picked from commit 012bbf0ce0301be2482857e3f03b481dd15c2340)
    Rebased to upstream/master:
    Signed-off-by: Simon Glass
    Reviewed-by: Stefan Reinauer
    Tested-by: Vincent Palatin

    Vincent Palatin
     
  • Allow to reconfigure properly the USB keyboard driver when we enumerate
    several times the USB devices and its position in the device tree has
    changes.

    Signed-off-by: Vincent Palatin
    Signed-off-by: Simon Glass
    Reviewed-by: Stefan Reinauer
    Tested-by: Vincent Palatin

    Vincent Palatin
     

06 May, 2013

1 commit