[RFC PATCH] usb: gadget: dfu: Wrap fs operation in workqueue

2021-01-27 Thread Jules Maselbas
File system operation shouldn't be executed in a poller. Use a workqueue to delay filesystem operation to command context. This is an RFC, extra work must be done to properly handle error cases and dfu cleanup. Signed-off-by: Jules Maselbas --- drivers/usb/gadget/dfu.c | 321

[PATCH v2 10/12] commands: firmwareload: allow loading firmware from dt

2021-01-27 Thread Steffen Trumtrar
firmwareload can only load a bitstream into an FPGA without any knowledge of possible additional needs (e.g. FPGA bridges). These are defined in the fpga-region nodes in the devicetree. The fpga-region describes the layout of the FPGA and the bridges it needs en/disabled. Add an option to let

[PATCH v2 11/12] drivers: firmware: socfpga: remove bridges shutdown

2021-01-27 Thread Steffen Trumtrar
The bridges are now handled via the bridges driver. There is no need to hardcode the memory writes anymore. Signed-off-by: Steffen Trumtrar --- drivers/firmware/socfpga.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/firmware/socfpga.c b/drivers/firmware/socfpga.c index

[PATCH v2 06/12] firmware: socfpga: change function prefixes

2021-01-27 Thread Steffen Trumtrar
Since there is now a fpgamgr framework in barebox, the function names are misleading. Change that to be SoCFPGA specific. Signed-off-by: Steffen Trumtrar --- drivers/firmware/socfpga.c | 58 +++--- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git

[PATCH v2 01/12] ARM: mmu: inherit pte flags from pmd

2021-01-27 Thread Steffen Trumtrar
From: Sascha Hauer When creating a 2nd level page table from a section inherit the flags from the section rather than assuming the section was mapped cached previously. This fixes creating a 2nd level pagetable when the section was mapped differently than we expected. Signed-off-by: Sascha

[PATCH v2 05/12] drivers: fpga: add socfpga bridges

2021-01-27 Thread Steffen Trumtrar
Import the SoCFPGA bridges drivers from linux v4.10-rc2. Description from the original commit: e5f8efa5c8bf86c1fa698551d54db8f6aee221fd ARM: socfpga: fpga bridge driver support Supports Altera SOCFPGA bridges: * fpga2sdram * fpga2hps * hps2fpga * lwhps2fpga

[PATCH v2 03/12] reset: add of_reset_control_get to header

2021-01-27 Thread Steffen Trumtrar
Signed-off-by: Steffen Trumtrar --- drivers/reset/core.c | 2 +- include/linux/reset.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/reset/core.c b/drivers/reset/core.c index 26a54f21dff0..1c9eeaec5491 100644 --- a/drivers/reset/core.c +++ b/drivers/reset/core.c

[PATCH v2 09/12] of: of_firmware: add support for fpga bridges

2021-01-27 Thread Steffen Trumtrar
Add support for potentially defined FPGA-bridges in the overlay. While at it also add support for loading the firmware directly via a path instead of 'needing' an overlay for that. The direct loading will be done with the existent firmwareload command. Signed-off-by: Steffen Trumtrar ---

[PATCH v2 04/12] drivers: add fpga bridge framework

2021-01-27 Thread Steffen Trumtrar
Import the fpga bridge framework from linux v4.10-rc2. Description from the initial commit adding this to linux: 21aeda950c5f84a8351b862816d832120b217a9b fpga: add fpga bridge framework This framework adds API functions for enabling/ disabling FPGA bridges under kernel control.

[PATCH v2 12/12] firmware: add support for compressed images

2021-01-27 Thread Steffen Trumtrar
At least bitstreams for FPGAs can consist of a lot of zeros depending on device utilization. These bitstreams can be compressed very effectively. Let the firmware code accept these images and decompress them before handing it to the firmware-manager in question. Signed-off-by: Steffen Trumtrar

[PATCH v2 02/12] firmware: socfpga: set APPLYCFG after loading bitstream

2021-01-27 Thread Steffen Trumtrar
To make changes to the SDRAM controller effective, the APPLYCFG bit must be set after programming the bitstream to the FPGA. This has to be done without any SDRAM usage. Therefore copy the function to execute to the OCRAM and execute it from there. Signed-off-by: Steffen Trumtrar ---

[PATCH v2 07/12] firmware: import fpga-mgr.h from linux

2021-01-27 Thread Steffen Trumtrar
Instead of defining the fpga-mgr structure in the socfpga driver, import the fpga-mgr.h file from linux v4.13. Signed-off-by: Steffen Trumtrar --- drivers/firmware/socfpga.c | 9 +--- include/firmware.h | 1 + include/fpga-mgr.h | 102 + 3

[PATCH v2 08/12] of: kconfig: of_overlay uses firmwaremgr_load_file

2021-01-27 Thread Steffen Trumtrar
From: Steffen Trumtrar As of_firmware.c uses the firmwaremgr_load_file function, it depends on FIRMWARE. Signed-off-by: Steffen Trumtrar --- drivers/of/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index 23be25d85d09..e58fe50f7090 100644

[PATCH] hush: stop parsing string at its end

2021-01-27 Thread Sascha Hauer
remove_quotes_in_str() doesn't stop parsing at the string end when there's a single "'" in the string. Handling quotes and double quotes is broken in many ways in hush, so I am not exactly sure this is the right thing to do, but at least it avoids going out of the string boundaries.