2020-05-20 |
fastboot: split generic code from USB gadget
...
The fastboot specification describes other protocols beyond USB. Allow
these to reuse the generic parts of the existing fastboot code when they
are implemented.
Most of the changes in common/fastboot.c are due to the renaming of struct
f_fastboot *f_fb to struct fastboot *fb.
Signed-off-by: Edmund Henniges <eh@emlix.com>
Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Edmund Henniges
authored
on 14 May 2020
Sascha Hauer
committed
on 20 May 2020
|
2018-02-09 |
usb: gadget: fastboot: Add external command execution support
...
Custom projects may need vendor specific expansions to the fastboot
command execution. Allow these to be implemented without messing in
the fastboot code directly.
We have a hook for all commands and also one for the "flash" command.
Each hook can decide if the generic command parser is executed
afterwards (return value FASTBOOT_CMD_FALLTHROUGH) or if the generic
parser shall be skipped (return value 0 or negative error code).
This allows board code to implement vendor specific "oem" commands
or to handle the downloaded image in a special way (i.e. do signature
checks on them)
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 9 Feb 2018
|
2017-09-27 |
usbgadget: fastboot: Allow to automatically export the bbu handlers
...
We have a list of registered handlers which take a barebox update. Do
the next step and allow to automatically export them via fastboot so
that barebox can be updated via fastboot without manually exporting
the partition. Since this may not be desirable in all cases this
behaviour is configurable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 27 Sep 2017
|
usbgadget: unregister when usb_composite_probe() fails
...
When usb_multi_register() returns an error it can't be called again
as we do not unregister the driver properly. Fix this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 27 Sep 2017
|
2017-03-09 |
usb: gadget: properly release f_multi_opts
...
The usbgadget commands uses statically allocated f_multi_opts and passes
this to usb_multi_register(). These f_multi_opts are of course no
longer valid when we leave the usbgadget command. Luckily we do not use
the data after we left the usbgadget command, so this never has been a
problem. However, f_multi_opts has some allocated members which we can
not free anymore on gadget unregistration because we no longer have the
pointer to them.
Fix this by adding a release function to struct f_multi_opts. This way
we can allocate all memory dynamically and properly free it when not
used anymore.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 9 Mar 2017
|
usb: gadget: print a meaningful error message
...
We can only register one USB multi gadget, so check for it being
already registered and print a meaningful error message if it is.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 9 Mar 2017
|
2014-07-24 |
USB: gadget: Add a multi function gadget
...
Similar to the Kernel multi function this gadget driver is used
for creating a USB device with multiple functions. This is
created and removed with the newly created 'usbgadget' command.
Based on the options it creates combinations of DFU, fastboot
and serial USB functions.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 24 Jul 2014
|