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
06 Feb, 2017
1 commit
-
CONFIG_CONSOLE_MUX and CONFIG_SYS_CONSOLE_IS_IN_ENV are not applicable
for SPL. Update the console code to use CONFIG_IS_ENABLED(), so that these
options will be inactive in SPL.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
24 Oct, 2016
1 commit
-
This converts the following to Kconfig:
CONFIG_SYS_STDIO_DEREGISTERThis option should never be enabled in SPL, so use
CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER) when checking the option.Signed-off-by: Simon Glass
[trini: Re-sync]
Signed-off-by: Tom Rini
24 Sep, 2016
1 commit
-
This makes functions much simpler.
Signed-off-by: Masahiro Yamada
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 goneSigned-off-by: 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
08 Jan, 2016
1 commit
-
At present USB keyboards are not properly removed with driver model. Add the
code to handle this.Signed-off-by: Simon Glass
Reviewed-by: Marek Vasut
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
20 Nov, 2015
5 commits
-
Replace the open-coded values with constants to make it clearer what they
mean.Signed-off-by: Simon Glass
-
This was missed in the conversion to driver model.
Signed-off-by: Simon Glass
-
The console includes a global variable and several functions that are only
used by a small subset of U-Boot files. Before adding more functions, move
the definitions into their own header file.Signed-off-by: Simon Glass
-
Add a uclass for keyboard input, mirroring the existing stdio methods.
This is enabled by a new CONFIG_DM_KEYBOARD option.Signed-off-by: Simon Glass
Reviewed-by: Marek Vasut
Reviewed-by: Bin Meng -
Switch USB keyboards over to use driver model instead of scanning with the
horrible usb_get_dev_index() function. This involves creating a new uclass
for keyboards, although so far there is no API.Signed-off-by: Simon Glass
05 Nov, 2015
1 commit
-
DEV_FLAGS_SYSTEM does not have any actual meaning, hence drop it.
Signed-off-by: Bin Meng
12 Sep, 2015
1 commit
-
Now that we have a new header file for cache-aligned allocation, we should
move the stack-based allocation macro there also.Signed-off-by: Simon Glass
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
19 Jun, 2015
1 commit
-
When we're polling and thus handling key-repeat in software, make sure
to disable idle reports, some keyboards may have these enabled by default
messing up our software keyrepeat.Signed-off-by: Hans de Goede
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
19 Apr, 2015
2 commits
-
Allow USB keyboards to work with driver model. The main difference is that
we can have multiple buses (each with its own device numbering) and each
bus must be scanned.Signed-off-by: Simon Glass
Reviewed-by: Marek Vasut -
Before adding driver model support, split out code from this over-long
function.Signed-off-by: Simon Glass
Reviewed-by: Marek Vasut
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
-
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
04 Nov, 2014
4 commits
-
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 them).This commit adds support for using the int_queue mechanism which at least
the ehci-hcd driver supports. This allows polling with 0 latency, while
using interrupt packets.Signed-off-by: Hans de Goede
-
Instead of looking them up every time we need them.
Signed-off-by: Hans de Goede
-
Free the keyboard hid-report buffer and private data on deregister.
Signed-off-by: Hans de Goede
-
This is not used anywhere, so lets remove it.
Signed-off-by: Hans de Goede
06 Oct, 2014
5 commits
-
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
-
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
-
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
-
ENODEV menas no usb keyboard was registered, threat this as a successful
usb_kbd_deregister.Signed-off-by: Hans de Goede
-
Signed-off-by: Hans de Goede
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.0Signed-off-by: Simon Glass
Acked-by: Marek Vasut
Reviewed-by: Marek Vasut -
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
30 Apr, 2014
1 commit
-
USB keyboard polling failed for some keyboards on PowerPC 5020.
This was caused by requesting only 4 bytes of data from keyboards that
produce an 8 byte HID report.Signed-off-by: Adrian Cox
Signed-off-by: Wolfgang Denk
Cc: Marek Vasut
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
-
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
24 Jul, 2013
1 commit
-
Signed-off-by: Wolfgang Denk
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini
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 -
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
06 May, 2013
1 commit
-
USB_PRINTF, USB_HUB_PRINTF, USB_STOR_PRINTF, USB_KBD_PRINTF
are nothing but conditional debug prints, depending on DEBUG.
So better remove them and use debug() simply.Signed-off-by: Vivek Gautam