[PATCH v2] of_firmware: fix lookup of fpga manager

2023-08-09 Thread Michael Tretter
, which is the root node of np, and look for the manager with that name. firmwaremgr_find_by_node already uses the name for the lookup. Signed-off-by: Michael Tretter --- Changelog: v1 -> v2: - Use of_parse_phandle_from instead of open coding the phandle lookup --- drivers/of/of_firmware.c

Re: [PATCH] of_firmware: fix lookup of fpga manager

2023-08-07 Thread Michael Tretter
On Wed, 26 Jul 2023 14:15:58 +0200, Sascha Hauer wrote: > On Tue, Jul 11, 2023 at 12:19:07PM +0200, Michael Tretter wrote: > > The of_parse_phandle() looks for the phandle in the root device tree, > > but as np is resolved for the target device tree, the phandle refers to > &

Re: [PATCH] common: bootm: support locating kernel in FIT image in zero page

2023-07-21 Thread Michael Tretter
ero page handling afterwards, because kernel is > booted after paging is disabled. > > Cc: Michael Tretter > Reported-by: Steffen Trumtrar > Signed-off-by: Ahmad Fatoum Reviewed-by: Michael Tretter > --- > common/bootm.c | 3 ++- > 1 file changed, 2 insertions(+), 1

[PATCH] of_firmware: fix lookup of fpga manager

2023-07-11 Thread Michael Tretter
and look for the manager with that name. firmwaremgr_find_by_node already uses the name for the lookup. Signed-off-by: Michael Tretter --- drivers/of/of_firmware.c | 30 -- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/drivers/of/of_firmware.c b

Re: [PATCH] firmware: zynqmp: fix loading for PMU FWv1.1

2023-06-23 Thread Michael Tretter
ed depending on PMUFW and its configuration), we won't break anything > when we just set the flag to zero as the PMUFW v1.1 expects it. > > TLDR: set fpga_load flags to zero to fix firmwareloading with newer > PMUFW versions. > > Signed-off-by: Steffen Trumtrar Reviewed-by: Michael

Re: [PATCH 1/2] of: overlay: improve error handling in of_overlay_apply_tree

2022-09-21 Thread Michael Tretter
On Wed, 21 Sep 2022 08:55:12 +0200, Michael Riesch wrote: > On 9/5/22 12:07, Michael Riesch wrote: > > Propagate any error from of_overlay_apply_symbols and let the user > > know if the provided overlay is not applicable. > > > > Signed-off-by: Michael Riesch > > --- > > drivers/of/overlay.c |

Re: [PATCH] firmware: zynqmp-fpga: do not load PL with ONLY_BIN flag unless necessary

2022-05-02 Thread Michael Tretter
+ body_length; > > status = mgr->eemi_ops->fpga_load((u64)addr, buf_size, flags); > -- > 2.25.1 > > > ___ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/

[PATCH] serial: cadence: add ZynqMP compatibles

2022-02-02 Thread Michael Tretter
RX byte status register which is only used with interrupts. Add the "xlnx,zynqmp-uart" and the "cdns,uart-r1p12" compatibles to the driver. Signed-off-by: Michael Tretter --- drivers/serial/serial_cadence.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH] firmware: zynqmp-fpga: fix use of uninitialized addr

2022-02-02 Thread Michael Tretter
by address, as the pointer to the bitstream size was set using the uninitialized DMA address. Fix it by determining the argument that is passed to the firmware after the bitstream has been mapped and always write the size of the bitstream at the end of the passed buffer. Signed-off-by: Michael Tretter --

[PATCH v2 4/8] video: ssd1307fb: pass par instead of i2c client to write

2021-12-23 Thread Michael Tretter
By pushing the dependency to i2c down into the write function, the remaining driver is less dependent on i2c. This allows to delay the decision to use i2c until the actual bus write. Signed-off-by: Michael Tretter --- Changelog: v2: none --- drivers/video/ssd1307fb.c | 69

[PATCH v2 2/8] spi: add to_spi_device helper

2021-12-23 Thread Michael Tretter
Port the helper to get the spi_device from the device_d from Linux. This macro makes SPI device drivers look a bit nicer. Signed-off-by: Michael Tretter --- Changelog: v2: - new patch --- include/spi/spi.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/spi/spi.h b/include

[PATCH v2 1/8] spi: stub device_spi_driver if SPI is disabled

2021-12-23 Thread Michael Tretter
This allows drivers that support multiple buses to keep the code for registering their SPI variant even if SPI is disabled. Signed-off-by: Michael Tretter --- Changelog: v2: - new patch --- include/spi/spi.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/spi/spi.h b/include

[PATCH v2 8/8] video: ssd1307fb: add spi support

2021-12-23 Thread Michael Tretter
. Signed-off-by: Michael Tretter --- Changelog: v2: - use new to_spi_device helper - move warning about undocumented compatible into driver - remove use of config macros in driver if possible --- drivers/video/Kconfig | 2 +- drivers/video/ssd1307fb.c | 62

[PATCH v2 5/8] video: ssd1307fb: don't use i2c client for logging

2021-12-23 Thread Michael Tretter
We can use the device directly and don't have to use the device that is attached to the I2C client. This reduces the dependency on i2c. Signed-off-by: Michael Tretter --- Changelog: v2: none --- drivers/video/ssd1307fb.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions

[PATCH v2 7/8] video: ssd1307fb: use function pointer for write

2021-12-23 Thread Michael Tretter
is not appropriate. Signed-off-by: Michael Tretter --- Changelog: v2: none --- drivers/video/ssd1307fb.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/video/ssd1307fb.c b/drivers/video/ssd1307fb.c index 1538a1b640a3..d0df073b8ef2 100644

[PATCH v2 3/8] i2c: stub device_i2c_driver if I2C is disabled

2021-12-23 Thread Michael Tretter
This allows drivers that support multiple buses to keep the code for registering their I2C variant even if I2C is disabled. Signed-off-by: Michael Tretter --- Changelog: v2: - new patch --- include/i2c/i2c.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/i2c/i2c.h b/include

[PATCH v2 6/8] video: ssd1307fb: move i2c setup to single place

2021-12-23 Thread Michael Tretter
By having the entire i2c dependent initialzation in a single place, it is easier to make it optional later. Signed-off-by: Michael Tretter --- Changelog: v2: none --- drivers/video/ssd1307fb.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/video/ssd1307fb.c

[PATCH v2 0/8] video: ssd1307fb: Add SPI support

2021-12-23 Thread Michael Tretter
support and makes I2C optional. Michael --- Changelog: v2: - add new Patches 1-3 for the SPI and I2C frameworks - use new SPI and I2C helpers to get rid of use of config macros - move warning about undocumented compatible into driver Michael Tretter (8): spi: stub device_spi_driver if SPI

Re: [PATCH 5/5] video: ssd1307fb: add spi support

2021-12-17 Thread Michael Tretter
On Fri, 17 Dec 2021 20:00:16 +0100, Ahmad Fatoum wrote: > On 17.12.21 19:23, Michael Tretter wrote: > > The Solomon display drivers also support SPI in addition to the I2C. > > Add SPI support to the driver that already supports I2C by implementing > > the bus w

[PATCH 1/5] video: ssd1307fb: pass par instead of i2c client to write

2021-12-17 Thread Michael Tretter
By pushing the dependency to i2c down into the write function, the remaining driver is less dependent on i2c. This allows to delay the decision to use i2c until the actual bus write. Signed-off-by: Michael Tretter --- drivers/video/ssd1307fb.c | 69 --- 1

[PATCH 0/5] video: ssd1307fb: Add SPI support

2021-12-17 Thread Michael Tretter
. Patch 5 actually adds the SPI support and makes I2C optional. Michael Michael Tretter (5): video: ssd1307fb: pass par instead of i2c client to write video: ssd1307fb: don't use i2c client for logging video: ssd1307fb: move i2c setup to single place video: ssd1307fb: use function pointer

[PATCH 5/5] video: ssd1307fb: add spi support

2021-12-17 Thread Michael Tretter
. WARNING: The device tree bindings for the ssd1306 with SPI are not documented! Signed-off-by: Michael Tretter --- drivers/video/Kconfig | 2 +- drivers/video/ssd1307fb.c | 72 +++ 2 files changed, 67 insertions(+), 7 deletions(-) diff --git a/drivers/video

[PATCH 4/5] video: ssd1307fb: use function pointer for write

2021-12-17 Thread Michael Tretter
is not appropriate. Signed-off-by: Michael Tretter --- drivers/video/ssd1307fb.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/video/ssd1307fb.c b/drivers/video/ssd1307fb.c index 1538a1b640a3..d0df073b8ef2 100644 --- a/drivers/video/ssd1307fb.c

[PATCH 2/5] video: ssd1307fb: don't use i2c client for logging

2021-12-17 Thread Michael Tretter
We can use the device directly and don't have to use the device that is attached to the I2C client. This reduces the dependency on i2c. Signed-off-by: Michael Tretter --- drivers/video/ssd1307fb.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers

[PATCH 3/5] video: ssd1307fb: move i2c setup to single place

2021-12-17 Thread Michael Tretter
By having the entire i2c dependent initialzation in a single place, it is easier to make it optional later. Signed-off-by: Michael Tretter --- drivers/video/ssd1307fb.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/video/ssd1307fb.c b/drivers/video

Re: [PATCH 3/3] arm: zynqmp: add boot source support

2021-09-10 Thread Michael Tretter
On Fri, 10 Sep 2021 15:43:23 +0200, Michael Riesch wrote: > The ZynqMP reports the mode pins sampled at POR via the register > ZYNQMP_CRL_APB_BOOT_MODE_USER. This commit adds a function that reads > the register and populates the boot source. > > Signed-off-by: Michael Riesch > --- >

Re: [PATCH 3/3] firmware: zynqmp-fpga: do not use DMA coherent memory for bitstream

2021-08-19 Thread Michael Tretter
On Wed, 18 Aug 2021 15:47:02 +0200, Lucas Stach wrote: > Am Mittwoch, dem 18.08.2021 um 15:35 +0200 schrieb Michael Tretter: > > Trying to do unaligned access of coherent memory on AArch64 will lead to > > an abort. This can happen when the FPGA loader copies the bitstream to &g

[PATCH v2 2/3] firmware: zynqmp-fpga: avoid additional buffer for size argument

2021-08-19 Thread Michael Tretter
-off-by: Michael Tretter --- drivers/firmware/zynqmp-fpga.c | 37 +++--- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/drivers/firmware/zynqmp-fpga.c b/drivers/firmware/zynqmp-fpga.c index 736d1950fa5e..667910479aa7 100644 --- a/drivers/firmware/zynqmp

[PATCH v2 3/3] firmware: zynqmp-fpga: do not use DMA coherent memory for bitstream

2021-08-19 Thread Michael Tretter
-by: Michael Tretter --- Changelog: v2: - drop dma_sync_single_for_device and use dma_map_single to flush - fix missing free of DMA memory in case of mapping error - use size_of(buf_size) to clarify extra space in buffer --- drivers/firmware/zynqmp-fpga.c | 23 +++ 1 file changed

[PATCH v2 0/3] firmware: zynqmp-fpga: fix fpga loading with optimized string functions

2021-08-19 Thread Michael Tretter
. v2 drops the explicit dma_sync_single_for_device and instead uses dma_map_single to flush the temporary buffer. I also fixed the error handling in case the mapping fails and made the size of the extra space at the end of the temporary buffer more explicit. Michael Changelog: Michael Tretter (3

[PATCH v2 1/3] firmware: zynqmp-fpga: initialize flags at function start

2021-08-19 Thread Michael Tretter
The ZYNQMP_FPGA_BIT_ONLY_BIN flag is always set when programming the FPGA. Simplify the code by initializing the flags with ZYNQMP_FPGA_BIT_ONLY_BIN already set. Signed-off-by: Michael Tretter --- drivers/firmware/zynqmp-fpga.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff

[PATCH 3/3] firmware: zynqmp-fpga: do not use DMA coherent memory for bitstream

2021-08-18 Thread Michael Tretter
-by: Michael Tretter --- drivers/firmware/zynqmp-fpga.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/firmware/zynqmp-fpga.c b/drivers/firmware/zynqmp-fpga.c index 667910479aa7..0a0e7e880849 100644 --- a/drivers/firmware/zynqmp-fpga.c +++ b/drivers

[PATCH 2/3] firmware: zynqmp-fpga: avoid additional buffer for size argument

2021-08-18 Thread Michael Tretter
-off-by: Michael Tretter --- drivers/firmware/zynqmp-fpga.c | 37 +++--- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/drivers/firmware/zynqmp-fpga.c b/drivers/firmware/zynqmp-fpga.c index 736d1950fa5e..667910479aa7 100644 --- a/drivers/firmware/zynqmp

[PATCH 1/3] firmware: zynqmp-fpga: initialize flags at function start

2021-08-18 Thread Michael Tretter
The ZYNQMP_FPGA_BIT_ONLY_BIN flag is always set when programming the FPGA. Simplify the code by initializing the flags with ZYNQMP_FPGA_BIT_ONLY_BIN already set. Signed-off-by: Michael Tretter --- drivers/firmware/zynqmp-fpga.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff

[PATCH 0/3] firmware: zynqmp-fpga: fix fpga loading with optimized string functions

2021-08-18 Thread Michael Tretter
. Michael Tretter (3): firmware: zynqmp-fpga: initialize flags at function start firmware: zynqmp-fpga: avoid additional buffer for size argument firmware: zynqmp-fpga: do not use DMA coherent memory for bitstream drivers/firmware/zynqmp-fpga.c | 54 -- 1 file

[PATCH] ARM: zynqmp: use std_file_update as update handler

2021-08-18 Thread Michael Tretter
boards. Suggested-by: Ahmad Fatoum Signed-off-by: Michael Tretter --- arch/arm/mach-zynqmp/zynqmp-bbu.c | 40 +++ 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/arch/arm/mach-zynqmp/zynqmp-bbu.c b/arch/arm/mach-zynqmp/zynqmp-bbu.c index d1197c01dc41

Re: [PATCH 4/7] ARM: zynqmp: add update handler

2021-06-25 Thread Michael Tretter
On Thu, 24 Jun 2021 15:34:33 +0200, Ahmad Fatoum wrote: > On 24.06.21 15:24, Michael Tretter wrote: > > On Thu, 24 Jun 2021 12:52:58 +0200, Ahmad Fatoum wrote: > >> On 24.06.21 12:23, Michael Tretter wrote: > >>> The ZynqMP boots from an SDHCI device by reading a boot

[PATCH v2 7/7] Documentation: zynqmp: add some documentation

2021-06-24 Thread Michael Tretter
Add at least some information how Barebox can be used on the ZynqMP and what is required to create a bootable image. Signed-off-by: Michael Tretter --- Changelog: v2: none --- Documentation/boards/zynqmp.rst | 40 + 1 file changed, 40 insertions(+) create mode

[PATCH v2 1/7] ARM: zynqmp: set reset source

2021-06-24 Thread Michael Tretter
The reset reason is available in the APB register set on the ZynqMP. Read the reset reason and set the reset source accordingly. There might be multiple bits set in the APB register. Use the MSB for determining the actual reset source. Signed-off-by: Michael Tretter --- Changelog: v2: - Use

[PATCH v2 5/7] ARM: zynqmp: zcu104: register update handler

2021-06-24 Thread Michael Tretter
As the zcu104 stores the environment in the same partition as the barebox image, the partition is already mounted in ENV_MNT_DIR ("/boot"). Therefore, the update handler has to use the already existing mount point for the update. Signed-off-by: Michael Tretter --- Changelog: v2: none

[PATCH v2 6/7] ARM: zynqmp: defconfig: enable more features

2021-06-24 Thread Michael Tretter
Enable network, file system, and PSCI support in the defconfig to get a Barebox with a useful feature set when building the ZynqMP defconfig. Signed-off-by: Michael Tretter --- Changelog: v2: none --- arch/arm/configs/zynqmp_defconfig | 23 +++ 1 file changed, 23 insertions

[PATCH v2 0/7] ZynqMP: Cleanup and extend board support

2021-06-24 Thread Michael Tretter
on debugger reset - Remove unused zynqmp.h Michael Tretter (7): ARM: zynqmp: set reset source clk: zynqmp: do not enable already enabled clocks dts: zcu104: add Barebox environment ARM: zynqmp: add update handler ARM: zynqmp: zcu104: register update handler ARM: zynqmp: defconfig: enable

[PATCH v2 4/7] ARM: zynqmp: add update handler

2021-06-24 Thread Michael Tretter
The ZynqMP boots from an SDHCI device by reading a boot.bin file from the FAT16/32 partition, which is the first partition in the MBR. The update handler copies a boot.bin image to this partition, which might be board specific. Signed-off-by: Michael Tretter --- Changelog: v2: none --- arch

[PATCH v2 2/7] clk: zynqmp: do not enable already enabled clocks

2021-06-24 Thread Michael Tretter
for the clock enable request. Assume that clocks that are already enabled don't need to be enable by Barebox to avoid the permission denied errors. Signed-off-by: Michael Tretter --- Changelog: v2: none --- drivers/clk/zynqmp/clk-gate-zynqmp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH v2 3/7] dts: zcu104: add Barebox environment

2021-06-24 Thread Michael Tretter
Use the same partition on the SD-card that is used by the ROM loader to find the BOOT.BIN (which contains the FSBL and Barebox) to store the Barebox environment. Signed-off-by: Michael Tretter --- Changelog: v2: none --- arch/arm/dts/zynqmp-zcu104-revA.dts | 10 ++ 1 file changed, 10

Re: [PATCH 4/7] ARM: zynqmp: add update handler

2021-06-24 Thread Michael Tretter
On Thu, 24 Jun 2021 12:52:58 +0200, Ahmad Fatoum wrote: > On 24.06.21 12:23, Michael Tretter wrote: > > The ZynqMP boots from an SDHCI device by reading a boot.bin file from > > the FAT16/32 partition, which is the first partition in the MBR. > > > > The update hand

Re: [PATCH 1/7] ARM: zynqmp: set reset source

2021-06-24 Thread Michael Tretter
On Thu, 24 Jun 2021 12:48:44 +0200, Ahmad Fatoum wrote: > On 24.06.21 12:23, Michael Tretter wrote: > > The reset reason is available in the APB register set on the ZynqMP. > > Read the reset reason and set the reset source accordingly. > > > > There might be multiple b

[PATCH 6/7] ARM: zynqmp: defconfig: enable more features

2021-06-24 Thread Michael Tretter
Enable network, file system, and PSCI support in the defconfig to get a Barebox with a useful feature set when building the ZynqMP defconfig. Signed-off-by: Michael Tretter --- arch/arm/configs/zynqmp_defconfig | 23 +++ 1 file changed, 23 insertions(+) diff --git a/arch

[PATCH 7/7] Documentation: zynqmp: add some documentation

2021-06-24 Thread Michael Tretter
Add at least some information how Barebox can be used on the ZynqMP and what is required to create a bootable image. Signed-off-by: Michael Tretter --- Documentation/boards/zynqmp.rst | 40 + 1 file changed, 40 insertions(+) create mode 100644 Documentation

[PATCH 2/7] clk: zynqmp: do not enable already enabled clocks

2021-06-24 Thread Michael Tretter
for the clock enable request. Assume that clocks that are already enabled don't need to be enable by Barebox to avoid the permission denied errors. Signed-off-by: Michael Tretter --- drivers/clk/zynqmp/clk-gate-zynqmp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/zynqmp/clk-gate

[PATCH 0/7] ZynqMP: Cleanup and extend board support

2021-06-24 Thread Michael Tretter
that you would probably want by default on a ZynqMP board. I also added some introductory information how to build and use Barebox on the ZynqMP. Michael Michael Tretter (7): ARM: zynqmp: set reset source clk: zynqmp: do not enable already enabled clocks dts: zcu104: add Barebox environment

[PATCH 4/7] ARM: zynqmp: add update handler

2021-06-24 Thread Michael Tretter
The ZynqMP boots from an SDHCI device by reading a boot.bin file from the FAT16/32 partition, which is the first partition in the MBR. The update handler copies a boot.bin image to this partition, which might be board specific. Signed-off-by: Michael Tretter --- arch/arm/mach-zynqmp/Makefile

[PATCH 5/7] ARM: zynqmp: zcu104: register update handler

2021-06-24 Thread Michael Tretter
As the zcu104 stores the environment in the same partition as the barebox image, the partition is already mounted in ENV_MNT_DIR ("/boot"). Therefore, the update handler has to use the already existing mount point for the update. Signed-off-by: Michael Tretter --- arch/arm/boards/xil

[PATCH 1/7] ARM: zynqmp: set reset source

2021-06-24 Thread Michael Tretter
The reset reason is available in the APB register set on the ZynqMP. Read the reset reason and set the reset source accordingly. There might be multiple bits set in the APB register. Use the MSB for determining the actual reset source. Signed-off-by: Michael Tretter --- arch/arm/mach-zynqmp

[PATCH 3/7] dts: zcu104: add Barebox environment

2021-06-24 Thread Michael Tretter
Use the same partition on the SD-card that is used by the ROM loader to find the BOOT.BIN (which contains the FSBL and Barebox) to store the Barebox environment. Signed-off-by: Michael Tretter --- arch/arm/dts/zynqmp-zcu104-revA.dts | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH 2/5] mci: arasan: fix most checkpatch warnings

2021-06-16 Thread Michael Tretter
consider worth it. Signed-off-by: Michael Tretter --- drivers/mci/arasan-sdhci.c | 46 ++ 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/drivers/mci/arasan-sdhci.c b/drivers/mci/arasan-sdhci.c index 04fce62bf46d..7306dac70b69 100644 --- a/drivers/mci

[PATCH 0/5] Cleanup and fix arasan-sdhci

2021-06-16 Thread Michael Tretter
Hi, These are a few misc patches for the arasan sd controller. Nothing particular stands out and each patch is useful on its own. I put them into a single series, because all of them affect the arasan driver. Michael Michael Tretter (5): mci: mci-core: respect disable-wp property mci

[PATCH 5/5] ARM: zynqmp: defconfig: enable MCI_ARASAN

2021-06-16 Thread Michael Tretter
The ZynqMP has an arasan SD controller. Enable it in the respective defconfig. Signed-off-by: Michael Tretter --- arch/arm/configs/zynqmp_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/zynqmp_defconfig b/arch/arm/configs/zynqmp_defconfig index 762103c54105

[PATCH 3/5] mci: arasan: remove duplicate stop clock

2021-06-16 Thread Michael Tretter
The clock is already stopped in sdhci_set_clock(). Stopping the clock in the arasan driver is not necessary. Signed-off-by: Michael Tretter --- drivers/mci/arasan-sdhci.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/mci/arasan-sdhci.c b/drivers/mci/arasan-sdhci.c index

[PATCH 1/5] mci: mci-core: respect disable-wp property

2021-06-16 Thread Michael Tretter
Systems without write-protect pin should ignore the write protect logic and assume that an SD card is always read-write. This is expressed by the disable-wp dt property. Respect the disable-wp property and don't call the write protection check in these cases. Signed-off-by: Michael Tretter

[PATCH 4/5] mci: arasan: wait for XFER_COMPLETE for busy response

2021-06-16 Thread Michael Tretter
that CMD6 expects an R1b response and that the host has to wait until the busy signal is de-asserted. This is signaled via the SDHCI_INT_XFER_COMPLETE interrupt. Wait for the XFER_COMPLETE interrupt after sending a command that expects an R1b response. Signed-off-by: Michael Tretter --- drivers

[PATCH 1/2] mci: arasan: wait for data available only on read

2021-05-19 Thread Michael Tretter
Only READ data transfers actually send a data available interrupt. Therefore, check if the transfer is a read and wait for the data only in this case. Signed-off-by: Michael Tretter --- Hi Michael, On Tue, 18 May 2021 08:09:47 +, Michael Graichen wrote: > > This looks familiar.

[PATCH 2/2] mci: arasan: configure data transfer only if we actually have data

2021-05-19 Thread Michael Tretter
If we don't have any data to transfer, we must not set the block size and block count. If data is NULL, accessing data to get the block size and block count is a NULL pointer dereference. Signed-off-by: Michael Tretter --- drivers/mci/arasan-sdhci.c | 10 ++ 1 file changed, 6

Re: [PATCH 1/1] Zynq: add support to chainload another barebox

2021-05-17 Thread Michael Tretter
On Wed, 05 May 2021 09:40:29 +, Michael Graichen wrote: [...] > I'm currently booting from SDcard and i have not realised any problems with > the FAT support so far. But with the arasan-sdhci driver when writing, see > my patch below which fixes it for me but I haven't dived into the drivers >

Re: [PATCH 1/1] added support for zynq7000-fpga-manager

2021-04-08 Thread Michael Tretter
Hi Michael, On Tue, 30 Mar 2021 12:05:31 +, Michael Graichen wrote: > > I think, it would be fine to use only "zynq" instead of zynqmp for the > > firmware loader/fpga manager. (I didn't compare the Zynq7000 and ZynqMP low > > level interfaces for programming the FPGA, yet, but I guess that

Re: [PATCH 1/1] added support for zynq7000-fpga-manager

2021-03-25 Thread Michael Tretter
On Thu, 25 Mar 2021 07:53:33 +, Michael Graichen wrote: > i have reworked the ZynqMP FPGA manager to program the FPGA within the > Zynq7000. Great, thanks. > > Michael Tretter, would you be so kind an test this on your ZynqMP board? > Since I have no access to a ZynqMP c

[PATCH] net: macb: add tx clock rate for 10 MBit link

2021-03-19 Thread Michael Tretter
If the phy reports a 10 MBit link, which can happen during link negotiation, the macb prints a warning, because it does not know the clock rate for the TX clock. Implement setting the TX clock rate for 10 MBit to avoid the warnings. Signed-off-by: Michael Tretter --- drivers/net/macb.c | 3

[PATCH 6/7] net: phy: dp83867: read status from PHY status register PHYSTS

2021-03-19 Thread Michael Tretter
are gigabit-capable, but the connection supports only 100 MBit, for example because of a 100 MBit PoE injector that connects only 2 of the 4 twisted pairs. Signed-off-by: Thomas Haemmerle Signed-off-by: Michael Tretter --- drivers/net/phy/dp83867.c | 36 1 file

[PATCH 7/7] net: phy: dp83867: enable link downshift by default

2021-03-19 Thread Michael Tretter
From: Thomas Haemmerle Linux enables link downshift by default. Use the same bit definitions as Linux and enable downshift in Barebox, as well. Signed-off-by: Thomas Haemmerle Signed-off-by: Michael Tretter --- drivers/net/phy/dp83867.c | 16 ++-- 1 file changed, 10 insertions

[PATCH 5/7] net: phy: dp83867: remove explicit setting of cfg2

2021-03-19 Thread Michael Tretter
From: Thomas Haemmerle Setting cfg2 is superfluous, because it just sets the default value. Remove it. Signed-off-by: Thomas Haemmerle Signed-off-by: Michael Tretter --- drivers/net/phy/dp83867.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/net/phy

[PATCH 3/7] net: phy: dp83867: remove useless call to genphy_config_aneg

2021-03-19 Thread Michael Tretter
genphy_config_aneg will be called by the generic code anyway. No need to call it from the driver. As at it, do not explicitly set the config_aneg and read_status pointers, because they will be automatically set anyway. Remove the "hello world" message by the driver, too. Signed-off-b

[PATCH 1/7] net: phy: dp83867: convert driver to spdx

2021-03-19 Thread Michael Tretter
Signed-off-by: Michael Tretter --- drivers/net/phy/dp83867.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index 8131e8c9d6c6..153b60def320 100644 --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c

[PATCH 4/7] net: phy: dp83867: simplify dp83867_config_init

2021-03-19 Thread Michael Tretter
From: Thomas Haemmerle Reorder the code in dp83867_config_init to remove duplicated check of the phy interface. Signed-off-by: Thomas Haemmerle Signed-off-by: Michael Tretter --- drivers/net/phy/dp83867.c | 49 ++- 1 file changed, 23 insertions(+), 26

[PATCH 2/7] net: phy: dp83867: fix checkpatch checks and warnings

2021-03-19 Thread Michael Tretter
Mostly indentation changes to make checkpatch happy and make the code a bit easier to the eyes. Signed-off-by: Michael Tretter --- drivers/net/phy/dp83867.c | 75 +++ 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/drivers/net/phy/dp83867.c b

[PATCH 0/7] net: phy: dp83867: cleanup and link downshift support

2021-03-19 Thread Michael Tretter
from the dp83867-specific register to take the possible downshift into account when reporting the link speed. Furthermore, the series contains a handful of cleanup patches. Michael Michael Tretter (3): net: phy: dp83867: convert driver to spdx net: phy: dp83867: fix checkpatch checks

[PATCH] dts: zcu104: remove unnecessary ZynqMP clock dtsi

2021-03-18 Thread Michael Tretter
from the board device tree. The files are already correctly included by the imported board device trees (dts/src/arm64/xilinx/zynqmp-zcu104-revA.dts). Signed-off-by: Michael Tretter --- arch/arm/dts/zynqmp-clk.dtsi| 155 arch/arm/dts/zynqmp-zcu104-revA.dts

Re: Barebox OF-Overlay Handling

2021-01-13 Thread Michael Tretter
On Wed, 13 Jan 2021 15:07:48 +0100, Rouven Czerwinski wrote: > On Wed, 2021-01-13 at 12:07 +0100, Marco Felsch wrote: > > Hi there, > > > > I have the following problem. My customer is using overlays for > > external devices like: display, camera, etc. The current overlay support > > is awesome

[PATCH] overlay: return error if target for firmware is missing

2020-12-18 Thread Michael Tretter
target is fatal or if the overlay can be applied anyway. Fix load_firmware to fail if a overlay references a firmware and the target is NULL. Also, rephrase and clarify the comment that documents this behavior. Reported-by: Matthias Fend Signed-off-by: Michael Tretter --- drivers

[PATCH v3 2/2] uimage: disable zero page when loading to SDRAM at address 0x0

2020-10-21 Thread Michael Tretter
no offset is the default for arm64. Therefore, copying the image to 0x0 of the SDRAM is necessary. Disable the zero page trap for copying an image to address 0x0. Signed-off-by: Michael Tretter --- v3: - none v2: - switch to zero_page_memcpy helper function - read file to temporary buffer before copyi

[PATCH v3 1/2] ARM: mmu64: allow to disable null pointer trap on zero page

2020-10-21 Thread Michael Tretter
and does not use memcpy. Signed-off-by: Michael Tretter --- v3: - rename functions to zero_page_access and zero_page_faulting v2: - add a helper function for copying to or from the zero page I am not a fan of having an architecture-specific memcpy for the zero page, because there are other cases

[PATCH v2 2/2] uimage: disable zero page when loading to SDRAM at address 0x0

2020-10-15 Thread Michael Tretter
no offset is the default for arm64. Therefore, copying the image to 0x0 of the SDRAM is necessary. Disable the zero page trap for copying an image to address 0x0. Signed-off-by: Michael Tretter --- v2: - switch to zero_page_memcpy helper function - read file to temporary buffer before copying

[PATCH v2 1/2] ARM: mmu64: allow to disable null pointer trap on zero page

2020-10-15 Thread Michael Tretter
and does not use memcpy. Signed-off-by: Michael Tretter --- v2: - add a helper function for copying to or from the zero page I am not a fan of having an architecture-specific memcpy for the zero page, because there are other cases that need disabling of the zero page, e.g. memtest. Therefore, I

Re: [PATCH 3/3] net: macb: fix compiler warning for 64 bit systems

2020-10-15 Thread Michael Tretter
On Thu, 15 Oct 2020 15:29:01 +0200, Ahmad Fatoum wrote: > On 10/15/20 3:20 PM, Michael Tretter wrote: > > On arm64 the compiler prints the following warning, when the macb driver > > is enabled: > > > > warning: cast from pointer to integer of different size >

[PATCH 2/3] net: macb: adjust clk_tx rate for link speed changes

2020-10-15 Thread Michael Tretter
-off-by: Michael Tretter --- drivers/net/macb.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 09b58ffd017f..fa530cfe8e4c 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -258,9 +258,38 @@ static int

[PATCH 3/3] net: macb: fix compiler warning for 64 bit systems

2020-10-15 Thread Michael Tretter
my TX queues") Signed-off-by: Michael Tretter --- drivers/net/macb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/macb.c b/drivers/net/macb.c index fa530cfe8e4c..188dbf2d8c15 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -365,7 +365,7 @@

[PATCH 1/3] net: macb: reduce DEBUG output to make it more useful

2020-10-15 Thread Michael Tretter
-by: Michael Tretter --- drivers/net/macb.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/net/macb.c b/drivers/net/macb.c index e3e039f67988..09b58ffd017f 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -144,8 +144,6 @@ static void reclaim_rx_buffers(struct

Re: [PATCH 1/2] ARM: mmu64: allow to disable null pointer trap on zero page

2020-10-15 Thread Michael Tretter
On Thu, 15 Oct 2020 10:14:41 +0200, Ahmad Fatoum wrote: > On 10/15/20 9:33 AM, Michael Tretter wrote: > > On Wed, 14 Oct 2020 18:29:47 +0200, Ahmad Fatoum wrote: > >> On 10/14/20 5:08 PM, Michael Tretter wrote: > >>> Barebox uses the zero page to trap NULL

Re: [PATCH 2/2] uimage: disable zero page when loading to SDRAM at address 0x0

2020-10-15 Thread Michael Tretter
On Wed, 14 Oct 2020 18:33:25 +0200, Ahmad Fatoum wrote: > On 10/14/20 5:08 PM, Michael Tretter wrote: > > If the SDRAM is mapped to address 0x0 and an image should be loaded to > > to the SDRAM without offset, Barebox would normally trap the access as a > > null pointer. &g

[PATCH 2/2] uimage: disable zero page when loading to SDRAM at address 0x0

2020-10-14 Thread Michael Tretter
no offset is the default for arm64. Therefore, copying the image to 0x0 of the SDRAM is necessary. Disable the zero page trap for copying an image to address 0x0. Signed-off-by: Michael Tretter --- common/uimage.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --gi

[PATCH 1/2] ARM: mmu64: allow to disable null pointer trap on zero page

2020-10-14 Thread Michael Tretter
. Therefore, add a function to disable the traps if accessing the zero page is necessary and to re-enable the traps after the access is done. Signed-off-by: Michael Tretter --- arch/arm/cpu/Kconfig | 1 + arch/arm/cpu/mmu_64.c | 13 - include/zero_page.h | 40

Re: [PATCH v2 7/7] added-zynq-fpga-manager

2020-04-15 Thread Michael Tretter
Hi Michael, On Tue, Apr 14, 2020 at 09:23:53PM +0200, Michael Graichen wrote: > Am 14.04.20 um 12:53 schrieb Michael Tretter: > > On Thu, Apr 09, 2020 at 02:44:00PM +, Michael Graichen wrote: > > > This adds support to programm the PL part of the Zynq SoC, > > >

Re: [PATCH v2 7/7] added-zynq-fpga-manager

2020-04-14 Thread Michael Tretter
Hi Michael, On Thu, Apr 09, 2020 at 02:44:00PM +, Michael Graichen wrote: > This adds support to programm the PL part of the Zynq SoC, > but only the non-secure way and no partial reconfiguration. It adds the > 'zynq_fpga_manager' so we can use > > firmwareload -l > firmwareload -t

Re: [PATCH 07/21] of: port Linux of_get_compatible_child helper

2020-04-14 Thread Michael Tretter
Hello Ahmad, On Tue, Apr 14, 2020 at 09:29:36AM +0200, Ahmad Fatoum wrote: > Hello Sascha, > > On 4/14/20 8:46 AM, Sascha Hauer wrote: > > for_each_child_of_node() goes down to list_for_each_entry(). On an empty > > list child will point to the list head after leaving the loop. Return > > child

[PATCH] mci: arasan: fix missing select on sdhci-helpers

2020-04-14 Thread Michael Tretter
The arasan driver uses the sdhci-helpers as well, but does not select the sdhci-helpers. Add the missing select to fix the compilation of the arasan driver. Signed-off-by: Michael Tretter --- drivers/mci/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mci/Kconfig b/drivers

[PATCH] of: use of_get_child_by_name() to find child node

2020-04-14 Thread Michael Tretter
function to find the child node with the name, which does the right thing and returns NULL if the node is not found. Reported-by: Ahmad Fatoum Signed-off-by: Michael Tretter --- drivers/of/resolver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/of/resolver.c b

[PATCH 0/2] Documentation: blspec: update documentation

2020-03-06 Thread Michael Tretter
Hello, These are two minor patches to update the documentation of blspec-entries. The first patch updates the link to the specification and the second patch removed the documentation of the devicetree-overlay key, which is now part of the official spec. Michael Michael Tretter (2

[PATCH 1/2] Documentation: blspec: update link to Boot Loader Specification

2020-03-06 Thread Michael Tretter
There is a big warning on the linked page that the page is obsolete and a link to the current version of the Boot Loader Specification. The Barebox documentation shall directly link to the current version of the specification. Signed-off-by: Michael Tretter --- Documentation/user/booting

[PATCH 2/2] Documentation: blspec: drop documentation of devicetree-overlay

2020-03-06 Thread Michael Tretter
The devicetree-overlay key is part of the official Boot Loader Specification. There is no need to document it in Barebox, again. Signed-off-by: Michael Tretter --- Documentation/user/booting-linux.rst | 4 1 file changed, 4 deletions(-) diff --git a/Documentation/user/booting-linux.rst b

[PATCH v2] firmware: zynqmp-fpga: drop example bin format header

2019-12-10 Thread Michael Tretter
in the header validation. The != operator has a higher precedence than ?: and this check should have had parenthesis around the ?: expression: bin_header[i] != (byte_order == XILINX_BYTE_ORDER_BIT) ? bin_format[i] : __swab32(bin_format[i]) Signed-off-by: Michael Tretter

[PATCH] firmware: zynmp-fpga: drop example bin format header

2019-12-09 Thread Michael Tretter
in the header validation. The != operator has a higher precedence than ?: and this check should have had parenthesis around the ?: expression: bin_header[i] != (byte_order == XILINX_BYTE_ORDER_BIT) ? bin_format[i] : __swab32(bin_format[i]) Signed-off-by: Michael Tretter

  1   2   >