Re: [PATCH 00/13] nvmem: misc enhancements

2021-06-21 Thread Sascha Hauer
On Sat, Jun 19, 2021 at 05:45:03AM +0200, Ahmad Fatoum wrote: > Series implements some of the new NVMEM bindings: > > - New providers: > - nvmem-cells (for MTD partitions) > - nvmem-rmem (memory regions passed by previous boot stages) > > - New consumers: > - Network devices: Unlike Linux,

Re: [PATCH] net/eth: read default mac-address default from dts

2021-06-21 Thread Ahmad Fatoum
Hi, On 15.06.21 22:32, Trent Piepho wrote: > Once upon a time, it was common for kernel dts files to be booted with > u-boot to include an all zero mac address property, since u-boot could > not unpack/pack the fdt. It could only find an existing property and > change bytes already present, thus

[PATCH master] Documentation: devel: porting: update after clk_hw sync

2021-06-21 Thread Ahmad Fatoum
Clock code sync with Linux got way more straight forward, now that barebox knows about struct clk_hw. Remove the suggestion to replace clk_hw with clk when porting. Signed-off-by: Ahmad Fatoum --- Documentation/devel/porting.rst | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH master] watchdog: dw_wdt: fix resource reservation error check

2021-06-21 Thread Ahmad Fatoum
dev_request_mem_resource returns a possible error pointer. If it succeeds mem->start will always be valid. Rectify the confusion. Signed-off-by: Ahmad Fatoum --- drivers/watchdog/dw_wdt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/watchdog/dw_wdt.c

Re: Compiled in boot environment and dtbo files

2021-06-21 Thread Konstantin Kletschke
Dear community, dear Sascha, an accident happened on my side. I totally overlooked that after my initial mail with the initial quoted error message the message changed. Probably either the change of compiling the dtb file (make dtbs DTC_FLAGS=-@) got me a __symbols__ node or another thing was

[PATCH] image-sparse: remove unused define

2021-06-21 Thread Rouven Czerwinski
CONFIG_FASTBOOT_FLASH_FILLBUF_SIZE is present since the very first addition of sparse image support. However its not used anywhere in the code, so remove it. Fixes: 13f649a4f960 ("Add support for fastboot sparse images") Signed-off-by: Rouven Czerwinski --- lib/image-sparse.c | 4 1 file

Re: [PATCH] aiodev: add driver for Rockchip SARADC

2021-06-21 Thread Michael Riesch
Hello Sascha, thanks for the review, I'll prepare a v2. On 6/21/21 6:30 AM, Sascha Hauer wrote: > Hi Michael, > > On Thu, Jun 17, 2021 at 04:36:54PM +0200, Michael Riesch wrote: >> +static int rockchip_saradc_read(struct aiochannel *chan, int *val) >> +{ >> +struct rockchip_saradc_data

Re: [PATCH v2 00/29] RISC-V: add BeagleV Beta board support

2021-06-21 Thread Sascha Hauer
On Sat, Jun 19, 2021 at 06:50:26AM +0200, Ahmad Fatoum wrote: > The changes allow barebox to run second stage (after ddrinit and second > boot) on the BeagleV beta board. It does everything necessary to support > Ethernet, MMC, GPIO, pinmux, pinconf, clock, reset, watchdog, HWRNG and > DMA between

[PATCH 02/12] clk: rockchip rk3568: Initialize clocks

2021-06-21 Thread Sascha Hauer
This initializes the rk3568 clocks in the way U-Boot initializes them as well. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210615141641.31577-3-s.ha...@pengutronix.de Signed-off-by: Sascha Hauer --- drivers/clk/rockchip/clk-rk3568.c | 28 1 file

[PATCH v2 00/12] Rockchip RK3568 support

2021-06-21 Thread Sascha Hauer
Again the RK3568 support with some updates Changes since v1: - move clk_name_* prototypes to correct location - register softrst handlers - rk3568 EVB: Fix 2nd stage booting, need to relocate to current addr then - Make OP-TEE firmware optional Sascha Hauer (12): clk: Add clk_name_*

[PATCH 10/12] ARM: Rockchip: Add rk3568 evb board support

2021-06-21 Thread Sascha Hauer
This adds support for the rk3568 evb board. Tested features so far are: - 1st stage booting - Network - SD card - eMMC The dts files are based on the ones posted on the mailing lists, they should be rebased on the upstream files once they show up in barebox. Signed-off-by: Sascha Hauer Link:

[PATCH 03/12] filetype: Add Rockchip boot image type

2021-06-21 Thread Sascha Hauer
Newer Rockchip SoCs boot images starting with the magic "RKNS". There are older image formats currently not supported, this one is at least supported on the RK3568. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210615141641.31577-4-s.ha...@pengutronix.de Signed-off-by: Sascha

[PATCH 08/12] ARM: Add atf common support

2021-06-21 Thread Sascha Hauer
ARM trusted firmware has some common data structures passed to bl31. This patch imports the code supporting this taken from U-Boot. The defines and data structures are taken directly from U-Boot, the support code is heavily modified for the sake of readability. Signed-off-by: Sascha Hauer Link:

[PATCH 12/12] fixup! clk: Rockchip: Add rk3568 clk support

2021-06-21 Thread Sascha Hauer
--- drivers/clk/rockchip/clk-rk3568.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/clk/rockchip/clk-rk3568.c b/drivers/clk/rockchip/clk-rk3568.c index 620d932a09..40ab7ee3d7 100644 --- a/drivers/clk/rockchip/clk-rk3568.c +++ b/drivers/clk/rockchip/clk-rk3568.c @@ -1619,6

[PATCH 04/12] ARM: Rockchip: Add rkimage tool

2021-06-21 Thread Sascha Hauer
This adds a tool for generating "RKNS" type booting image for newer Rockchip SoCs. This image format is supported starting at least with RK3568. Older image types are not (yet) supported. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210615141641.31577-5-s.ha...@pengutronix.de

[PATCH 06/12] ARM: Rockchip: Add rk3568 dtsi files

2021-06-21 Thread Sascha Hauer
This adds the rk3568 dtsi files, taken from the mailing list. They should hit upstream soon and can be removed then. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210615141641.31577-7-s.ha...@pengutronix.de Signed-off-by: Sascha Hauer --- arch/arm/dts/rk3568-pinctrl.dtsi |

[PATCH 07/12] ARM: Rockchip: Add rk3568 support

2021-06-21 Thread Sascha Hauer
This adds basic support for the Rockchip rk3568 SoC. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210615141641.31577-8-s.ha...@pengutronix.de Signed-off-by: Sascha Hauer --- arch/arm/Kconfig | 3 - arch/arm/mach-rockchip/Kconfig|

[PATCH 09/12] ARM: rockchip: Add bootm handler for RKNS images

2021-06-21 Thread Sascha Hauer
The rk3568 utilizes boot images starting with the magic 'RKNS'. Add a bootm handler for these to allow them to be chainloaded. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210615141641.31577-10-s.ha...@pengutronix.de Signed-off-by: Sascha Hauer ---

[PATCH 01/12] clk: Add clk_name_* functions

2021-06-21 Thread Sascha Hauer
At some places a clk name may be known without having a struct clk * directly. Add some convenience functions to handle this situation and use them in the clk commands. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210615141641.31577-2-s.ha...@pengutronix.de Signed-off-by: Sascha

[PATCH 11/12] Add rockchip_v8_defconfig

2021-06-21 Thread Sascha Hauer
Add a defconfig for the arm64 based Rockchip SoCs, currently only RK3568 Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210615141641.31577-12-s.ha...@pengutronix.de Signed-off-by: Sascha Hauer --- arch/arm/configs/rockchip_v8_defconfig | 120 + 1 file

[PATCH 05/12] ARM: Add relocate_to_adr_full()

2021-06-21 Thread Sascha Hauer
relocate_to_adr() currently relocates the PBL code to another address, but doesn't move the piggy data (compressed barebox image). This patch adds relocate_to_adr_full() which moves the full image including the piggy data. This is needed for upcoming Rockchip RK3568 support. Here we are started at

Re: [PATCH v2 15/29] net: designware: fix non-1:1 mapped 64-bit systems

2021-06-21 Thread Sascha Hauer
On Sat, Jun 19, 2021 at 06:50:41AM +0200, Ahmad Fatoum wrote: > drivers/net/designware.c handles the older Designware < 4.x MAC IPs, > which do not support DMA beyond 32-bit. They are still being integrated > into SoCs with 64-bit CPUs like the StarFive JH7100, which additionally > needs a non 1:1

Re: [PATCH v2 15/29] net: designware: fix non-1:1 mapped 64-bit systems

2021-06-21 Thread Ahmad Fatoum
Hi, On 21.06.21 09:25, Sascha Hauer wrote: > On Sat, Jun 19, 2021 at 06:50:41AM +0200, Ahmad Fatoum wrote: >> drivers/net/designware.c handles the older Designware < 4.x MAC IPs, >> which do not support DMA beyond 32-bit. They are still being integrated >> into SoCs with 64-bit CPUs like the

Re: [PATCH master] Documentation: devel: porting: update after clk_hw sync

2021-06-21 Thread Sascha Hauer
On Mon, Jun 21, 2021 at 08:46:46AM +0200, Ahmad Fatoum wrote: > Clock code sync with Linux got way more straight forward, now that > barebox knows about struct clk_hw. Remove the suggestion to replace > clk_hw with clk when porting. > > Signed-off-by: Ahmad Fatoum > --- >

Re: [PATCH] commands: md: don't leak heap memory with unaligned accesses

2021-06-21 Thread Sascha Hauer
On Sat, Jun 19, 2021 at 07:42:17AM +0200, Ahmad Fatoum wrote: > Doing unaligned near file end returns bogus results: > > barebox@Sandbox:/ md -s /dev/stickypage 4095 > 0fff: 959ff8ff . > > That 0x959ff8 is heap memory next to the buffer

Re: [PATCH v1 1/2] add device state flags and add error state

2021-06-21 Thread Bartosz Bilas
Hello, On 21.06.2021 10:07, Ahmad Fatoum wrote: On 06.06.21 14:23, Oleksij Rempel wrote: Add state flags for each registered device and set error state on each dev_err print. This states can be used by users to identify erroneous device. I thought this over a bit. We have dev_err calls when:

Re: [PATCH master] watchdog: dw_wdt: fix resource reservation error check

2021-06-21 Thread Sascha Hauer
On Mon, Jun 21, 2021 at 08:47:19AM +0200, Ahmad Fatoum wrote: > dev_request_mem_resource returns a possible error pointer. If it > succeeds mem->start will always be valid. Rectify the confusion. > > Signed-off-by: Ahmad Fatoum > --- > drivers/watchdog/dw_wdt.c | 5 +++-- > 1 file changed, 3

Re: [PATCH v4 07/10] of: of_firmware: add support for fpga bridges

2021-06-21 Thread Sascha Hauer
On Fri, Jun 18, 2021 at 10:32:58AM +0200, Steffen Trumtrar wrote: > > Steffen Trumtrar writes: > > diff --git a/include/of.h b/include/of.h > > index 645f429bdeed..3c922bdb1414 100644 > > --- a/include/of.h > > +++ b/include/of.h > > +int of_firmware_load_overlay(struct device_node *overlay,

Re: [PATCH v1 1/2] add device state flags and add error state

2021-06-21 Thread Ahmad Fatoum
On 06.06.21 14:23, Oleksij Rempel wrote: > Add state flags for each registered device and set error state on each > dev_err print. > This states can be used by users to identify erroneous device. I thought this over a bit. We have dev_err calls when: - probes are permanently deferred - have