22 Nov, 2015
6 commits
-
These files are based on the current latest upstream kernel work. The
bus_gates bindings may still change, but for u-boot that does not matter
as we do not (yet) use any clock info from devicetree for sunxi u-boot.Signed-off-by: Hans de Goede
-
The 3.4 kernel from the Allwinner SDK is clocking AHB1 at 200MHz
on Allwinner H3 and using PLL6 as the clock source (PLL6/3).
This can be verified by reading the value of the AHB1_APB1_CFG_REG
register via /dev/mem. It always reads as 0x3180 regardless of
the current cpufreq operating point. So this configuration should
be safe for use in U-Boot too.PLL6 also needs to be configured before it is used as the clock
source, according to the "CCU / Programming Guidelines" section
of the Allwinner manual.The current low AHB1 clock speed is limiting the USB transfer
speed when booting via FEL. This patch can increase the FEL USB
transfer speed from ~510 KB/s to ~950 KB/s.Signed-off-by: Siarhei Siamashka
Reviewed-by: Hans de Goede
Signed-off-by: Hans de Goede -
Based on existing A23/A33 code and the original H3 boot0.
Signed-off-by: Jens Kuske
Reviewed-by: Hans de Goede
Signed-off-by: Hans de Goede -
Add initial sun8i H3 support, only uart + mmc are supported for now.
Signed-off-by: Jens Kuske
Reviewed-by: Hans de Goede
Signed-off-by: Hans de Goede -
This is necessary to distinguish between the "dfu-util --detach" and
the "dfu-util --reset" requests.The default weak implementation of dfu_usb_get_reset() unconditionally
reboots the device, but we want to be able to continue the boot.scr
execution after writing the kernel, fdt and ramdisk to RAM via DFU.Signed-off-by: Siarhei Siamashka
Reviewed-by: Hans de Goede
Signed-off-by: Hans de Goede -
The DFU protocol implementation in U-Boot is much faster than the
FEL protocol implementation in the boot ROM on Allwinner devices.
Using DFU instead of FEL improves the USB transfer speed from
500-900 KB/s to 3.2-3.7 MB/s. This is particularly useful for
reducing the time needed for booting systems with large initrd
images.FEL is still useful for loading the U-Boot bootloader and a boot
script, which may then activate DFU in the following way:setenv dfu_alt_info ${dfu_alt_info_ram}
dfu 0 ram 0
bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}The rest of the files can be transferred to the device using the
"dfu-util" tool.Signed-off-by: Siarhei Siamashka
Reviewed-by: Hans de Goede
Signed-off-by: Hans de Goede
21 Nov, 2015
1 commit
-
Add a README with a brief guide to porting serial drivers over to use
driver model.Add a timeline also. All serial drivers should be converted by the end
of January 2016.Signed-off-by: Simon Glass
20 Nov, 2015
33 commits
-
Add a test that verifies that USB keyboards work correctly on sandbox.
This verifies some additional parts of the USB stack.Signed-off-by: Simon Glass
-
Enable the USB keyboard on sandbox, now that we have a suitable emulation
driver.Signed-off-by: Simon Glass
-
Add a simple USB keyboard driver for sandbox. It provides a function to
'load' it with input data, which it will then stream through to the normal
U-Boot input subsystem. When the input data is exhausted, the keyboard stops
providing data.Signed-off-by: Simon Glass
-
Allow USB device emulation to support interrupt URBs so that we can use USB
keyboards with sandbox.Signed-off-by: Simon Glass
-
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
-
Add tests that 'usb tree' produces the right output when a device changes
order on the bus.Signed-off-by: Simon Glass
-
Add tests that this command produces the right output, even when a rescan
results in a device disappearing from the bus.Signed-off-by: Simon Glass
-
Each scan of the USB bus may return different results. Existing driver-model
devices are reused when found, but if a device no longer exists it will stay
around, de-activated, but bound.Detect these devices and remove them after the scan completes.
Signed-off-by: Simon Glass
-
This function should not be used with driver model. While there are users
of USB Ethernet that use driver model for USB but not Ethernet, we have
to keep it around. Add a comment to that effect.Signed-off-by: Simon Glass
-
This reverts commit bb52b367f6ca4a3a918e77737f4ff6a1089912d9.
Signed-off-by: Simon Glass
-
This reverts commit 6cda369509e0d3fa5f9e33c9d71589c4523799fa.
We want to avoid having the USB stack rely on unbind.
Signed-off-by: Simon Glass
-
This reverts commit 9b510df703d282effba4f56ac567aa8011d56e6b.
We want to avoid having the USB stack rely on unbind.
Signed-off-by: Simon Glass
-
Each USB device has an emulator. Currently this can only be found by
supplying the 'pipe' value, which contains the device number. Add a way
to find it directly from the emulated device.Signed-off-by: Simon Glass
-
To support more advanced testing, support 4 devices instead of 2.
Signed-off-by: Simon Glass
-
We would like the serial number to come from the device tree node name of
the emulated device. This avoids them all having the same name. Adjust the
code to support this.Signed-off-by: Simon Glass
-
Add iteration macros which support unbinding a device within the loop.
Signed-off-by: Simon Glass
-
Allow the 'usb tree' command to be used from test code, so that we can
verify that it works correctly.Signed-off-by: Simon Glass
-
When running sandbox tests, silence the console to avoid unwanted output.
Also, record the console in case tests want to check it.The -v option can be used to enable stdout during tests.
Signed-off-by: Simon Glass
-
Allow console recording so that tests can use it. Also allow the console
output to be suppressed, to reduce test output 'noise'.Signed-off-by: Simon Glass
-
It is useful to be able to record console output and provide console input
via a buffer. This provides sandbox with the ability to run a command and
check its output. If the console is set to silent then no visible output
is generated.This also provides a means to fix the problem where tests produce unwanted
output, such as errors or warnings. This can be confusing. We can instead
set the console to silent and record this output. It can be checked later
in the test if required.It is possible that this may prove useful for non-test situations. For
example the console output may be suppressed for normal operations, but
recorded and stored for access by the OS. That feature is not implemented
at present.Signed-off-by: Simon Glass
-
This will be used to support console recording. It provides for a circular
buffer which can be written at the head and read from the tail. It supports
avoiding data copying by providing raw access to the data.Signed-off-by: Simon Glass
-
Since common.h will always include this automatically, it is not needed.
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
-
Currently the USB tests take around two seconds to run. Remove these
unnecessary time delays so that the tests run quickly.Signed-off-by: Simon Glass
-
Some tests are slow due to delays which are unnecessary on sandbox. The
worst offender is USB where we lose two seconds. Add a way to disable time
delays.Signed-off-by: Simon Glass
-
Building with gcc-5.2 raises this warning:
drivers/misc/cros_ec_sandbox.c: In function cros_ec_sandbox_packet:
drivers/misc/cros_ec_sandbox.c:483:5: warning: len may be used uninitialized in this function [-Wmaybe-uninitialized]
if (len < 0)
^If the function process_cmd() is called with
req_hdr->command == EC_CMD_ENTERING_MODE, the value of len will be
returned uninitialized.Signed-off-by: Daniel Schwierzeck
Acked-by: Simon Glass -
Convert to use driver model keyboard on QEMU.
Signed-off-by: Bin Meng
Acked-by: Simon Glass -
Convert to use driver model keyboard on Intel Crown Bay.
Signed-off-by: Bin Meng
Acked-by: Simon Glass -
When 'Num Lock' is not on, we should not send these digit numbers
(0-9 and dot) to the output buffer.Signed-off-by: Bin Meng
Acked-by: Simon Glass -
When sending LED update command to an i8042 compatible keyboard,
bit1 is 'Num Lock' and bit2 is 'Caps Lock' in the data byte. But
input library defines bit1 as 'Caps Lock' and bit2 as 'Num Lock'.
This causes a wrong LED to be set on an i8042 compatible keyboard.
Change the LED state bits to be i8042 compatible, and change the
keyboard flags as well.Signed-off-by: Bin Meng
Acked-by: Simon Glass -
We should request keyboard to turn on/off its LED when detecting
any changes on the LEDs.Signed-off-by: Bin Meng
Acked-by: Simon Glass
Minor changes to allow this to build without CONFIG_DM_KEYBOARD:
Signed-off-by: Simon Glass -
Currently keyboard's LED state is wrongly saved to config->leds in
process_modifier(). It should really be config->flags.Signed-off-by: Bin Meng
Acked-by: Simon Glass