ad56e4b6 | 01-Oct-2017 |
Bin Meng <bmeng.cn@gmail.com> |
dm: usb: emul: Drop usb_emul_reset()
With the root hub unbinding in usb_stop(), there is no need to do a Sandbox-specific reset operation. usb_emul_reset() is no longer used anywhere, drop it.
Sign
dm: usb: emul: Drop usb_emul_reset()
With the root hub unbinding in usb_stop(), there is no need to do a Sandbox-specific reset operation. usb_emul_reset() is no longer used anywhere, drop it.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
d7771f0c | 01-Oct-2017 |
Bin Meng <bmeng.cn@gmail.com> |
usb: emul: hub: Report the actual device speed of the emulation device
At present the usb hub emulator always reports its downstream port speed as full speed. Actually it is high speed for sandbox-f
usb: emul: hub: Report the actual device speed of the emulation device
At present the usb hub emulator always reports its downstream port speed as full speed. Actually it is high speed for sandbox-flash, and low speed for sandbox-keyb. We can determine the device speed by checking its device descriptor bcdUSB field, and do the proper hub port status report based on that.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
848436a4 | 01-Oct-2017 |
Bin Meng <bmeng.cn@gmail.com> |
usb: emul: Expose find_descriptor() as a public API
This can be useful outside of the sandbox usb emulation uclass driver. Expose it as a public API with a proper prefix (usb_emul_).
Signed-off-by:
usb: emul: Expose find_descriptor() as a public API
This can be useful outside of the sandbox usb emulation uclass driver. Expose it as a public API with a proper prefix (usb_emul_).
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
84aa8536 | 01-Oct-2017 |
Bin Meng <bmeng.cn@gmail.com> |
usb: sandbox: Fix emulator device select logic in usb_emul_find_devnum()
Current emulator select logic in usb_emul_find_devnum() is to test the USB address. The USB address of the device being enume
usb: sandbox: Fix emulator device select logic in usb_emul_find_devnum()
Current emulator select logic in usb_emul_find_devnum() is to test the USB address. The USB address of the device being enumerated is initialized to zero at the beginning of the enumeration process in usb_setup_device(). At this point, the saved USB address in the platform data has not been assigned to any valid USB address either. This means: the logic will select an emulator device according to its sequence of declaring order in the device tree. Take test.dts for example, flash-stick@0 will be selected before flash-stick@1. But unfortunately such logic is wrong.
In fact USB devices show up in a random order during the enumeration which means usb_emul_find_devnum() may be called on port 3 for keyb@3 before on port 0 for flash-stick@0.
To fix this, we introduce a new emulator uclass specific platdata to store the USB device's port number on its parent hub, and update the logic to test the port number instead.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
d8a26f03 | 09-Nov-2015 |
Simon Glass <sjg@chromium.org> |
usb: sandbox: Add a USB emulation driver
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 inp
usb: sandbox: Add a USB emulation driver
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 <sjg@chromium.org>
show more ...
|
af9c7c11 | 09-Nov-2015 |
Simon Glass <sjg@chromium.org> |
sandbox: usb: Allow finding a USB emulator for a device
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 t
sandbox: usb: Allow finding a USB emulator for a device
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 <sjg@chromium.org>
show more ...
|
5db43992 | 25-Mar-2015 |
Simon Glass <sjg@chromium.org> |
dm: usb: sandbox: Add an emulator for USB hub emulation
All USB controllers need a root hub. Add a sandbox emulation for this so that we can add USB devices to sandbox.
Signed-off-by: Simon Glass <
dm: usb: sandbox: Add an emulator for USB hub emulation
All USB controllers need a root hub. Add a sandbox emulation for this so that we can add USB devices to sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
show more ...
|
f4f71536 | 25-Mar-2015 |
Simon Glass <sjg@chromium.org> |
dm: usb: sandbox: Add an emulator for USB flash devices
This emulator supports USB enumeration and allows a local file to be provided as the contents of the emulated flash stick. U-Boot can then use
dm: usb: sandbox: Add an emulator for USB flash devices
This emulator supports USB enumeration and allows a local file to be provided as the contents of the emulated flash stick. U-Boot can then use the file as it would a normal device, with all access passing through the usb_stor layer and the USB stack.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
show more ...
|