[U-Boot] [PATCH] fix always succesful memory test

2016-01-07 Thread Rasmus Villemoes
Since 51209b1f42cb ("Use common mtest iteration counting"), do_mem_mtest has always reported 0 errors and hence returned 0, even if errors were detected. Fix the helpers mem_test_alt() and mem_test_quick() to return the number of errors found. Signed-off-by: Rasmus Villemoes <

Re: [U-Boot] [RFC PATCH] Allow providing default environment from file

2018-01-25 Thread Rasmus Villemoes
On 2018-01-25 10:30, Lukasz Majewski wrote: > Hi Rasmus, > >> It is sometimes useful to be able to define the entire default >> environment in an external file. > > There is already available script for extracting the environment. > > Please look into: > ./scripts/get_default_envs.sh > > Maybe

Re: [U-Boot] [RFC PATCH] Allow providing default environment from file

2018-02-02 Thread Rasmus Villemoes
On 2018-01-24 10:55, Rasmus Villemoes wrote: > It is sometimes useful to be able to define the entire default > environment in an external file. This implements a Kconfig option for > allowing that. ping ___ U-Boot mailing list U-Boot@list

[U-Boot] [PATCH] fw_setenv: avoid writing environment when nothing has changed

2018-09-05 Thread Rasmus Villemoes
In the case where one deletes an already-non-existing variable, or sets a variable to the value it already has, there is no point in writing the environment back, thus reducing wear on the underlying storage device. Signed-off-by: Rasmus Villemoes --- tools/env/fw_env.c | 10 +- 1 file

[U-Boot] [RFC PATCH] Allow providing default environment from file

2018-01-24 Thread Rasmus Villemoes
the mkenvimage tool accepts. I have no idea how portable the sed script implementing the "allow embedded newlines in values" is. Nor do I know if one can expect xxd to be available. Signed-off-by: Rasmus Villemoes <rasmus.villem...@prevas.dk> --- Makefile | 16 +

Re: [U-Boot] [PATCH v2] Allow providing default environment from file

2018-04-04 Thread Rasmus Villemoes
On 2018-03-20 15:47, Rasmus Villemoes wrote: > On 2018-03-20 15:20, Lukasz Majewski wrote: >> Hi Rasmus, >> >>> Modifying the default environment via CONFIG_EXTRA_ENV_SETTINGS is >>> somewhat inflexible, partly because the cpp language does not allow &

[U-Boot] [PATCH v2] Allow providing default environment from file

2018-03-20 Thread Rasmus Villemoes
repository. Tested-by: Sean Nyekjaer <sean.nyekj...@prevas.dk> Signed-off-by: Rasmus Villemoes <rasmus.villem...@prevas.dk> --- v2: * rename CONFIG_DEFAULT_ENV_FROM_FILE -> CONFIG_USE_DEFAULT_ENV_FILE * add Tested-by * provide a little more rationale (example use case instead of ju

Re: [U-Boot] [PATCH v2] Allow providing default environment from file

2018-03-20 Thread Rasmus Villemoes
On 2018-03-20 15:20, Lukasz Majewski wrote: > Hi Rasmus, > >> Modifying the default environment via CONFIG_EXTRA_ENV_SETTINGS is >> somewhat inflexible, partly because the cpp language does not allow >> appending to an existing macro. This prevents reuse of "environment >> fragments" for

[U-Boot] [PATCH 1/2] Makefile: always preserve output for images that can contain HAB Blocks

2018-03-23 Thread Rasmus Villemoes
stdout, whatever that might be. Signed-off-by: Rasmus Villemoes <rasmus.villem...@prevas.dk> --- Makefile | 4 ++-- scripts/Makefile.lib | 2 +- scripts/Makefile.spl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 5fa14789d9..a63d

[U-Boot] [PATCH 2/2] tools/imximage: use 0x prefix in HAB Blocks line

2018-03-23 Thread Rasmus Villemoes
The u-boot-ivt.img.log file contains 0x prefixes in the HAB Blocks line, while the SPL.log does not. For consistency, and to make it easier to extract and put into a .csf file for use with NXP's code signing tool, add 0x prefixes here. Signed-off-by: Rasmus Villemoes <rasmus.villem...@prevas

[U-Boot] [PATCH] Makefile: always preserve output for images that can contain HAB Blocks

2018-03-02 Thread Rasmus Villemoes
_additionally_ write the information to make's stdout, whatever that might be. Signed-off-by: Rasmus Villemoes <rasmus.villem...@prevas.dk> --- My first attempt did $(if $(KBUILD_VERBOSE:0=), | tee , >) $(MKIMAGEOUTPUT) but we can't use a pipeline, since tee is always succesf

Re: [U-Boot] [PATCH v2] fw_setenv: avoid writing environment when nothing has changed

2018-10-30 Thread Rasmus Villemoes
On 2018-09-27 22:45, Rasmus Villemoes wrote: > In the case where one deletes an already-non-existing variable, or sets > a variable to the value it already has, there is no point in writing the > environment back, thus reducing wear on the underlying storage > device. > > In the

Re: [U-Boot] [PATCH] fw_setenv: avoid writing environment when nothing has changed

2018-09-24 Thread Rasmus Villemoes
On 2018-09-05 21:22, Rasmus Villemoes wrote: > In the case where one deletes an already-non-existing variable, or sets > a variable to the value it already has, there is no point in writing the > environment back, thus reducing wear on the underlying storage > d

Re: [U-Boot] [PATCH] fw_setenv: avoid writing environment when nothing has changed

2018-09-25 Thread Rasmus Villemoes
On 2018-09-24 09:42, Alex Kiernan wrote: > On Wed, Sep 5, 2018 at 8:23 PM Rasmus Villemoes > wrote: >> >> In the case where one deletes an already-non-existing variable, or sets >> a variable to the value it already has, there is no point in writing the >> enviro

[U-Boot] [PATCH v2] fw_setenv: avoid writing environment when nothing has changed

2018-09-27 Thread Rasmus Villemoes
. because one is corrupt), make sure that any call of fw_setenv causes the two to become synchronized, even if the fw_setenv call does not change anything in the good copy. Signed-off-by: Rasmus Villemoes --- Add logic to ensure a corrupt copy gets replaced, even if fw_setenv wouldn't change anything

Re: [U-Boot] Default environment file

2019-06-12 Thread Rasmus Villemoes
On 12/06/2019 10.43, Stefano Babic wrote: > Hi Pascal, > > On 12/06/19 10:20, Linder Pascal wrote: >> Hi everyone, >> >> >> I am currently moving the configurations of the KM boards from header files >> to Kconfig. But for the customly defined environment variables I did not >> found a decent

[U-Boot] booting multi-image with several embedded dtbs

2019-08-28 Thread Rasmus Villemoes
Hi, I have a (legacy) multi-image uImage with several embedded dtbs, but no initrd. I.e. one created by something like "mkimage -T multi -d zImage:dtb1:dtb2:dtb3". I thought I could boot that using the bootm command like this bootm $loadaddr:0 - $loadaddr:3 # choose dtb3 but that fails with

[U-Boot] [PATCH] Makefile: fix newline escaping for CONFIG_DEFAULT_ENV_FILE

2019-08-28 Thread Rasmus Villemoes
I wanted this to be compatible with mkenvimage, including the ability to embed newlines in variables by escaping them. But I failed to check that it works more than once. Fixes: f3d8f7dd73a (Allow providing default environment from file) Signed-off-by: Rasmus Villemoes --- Makefile | 2 +- 1

[U-Boot] [PATCH 2/4] arm: mxs: fix comments in arch_cpu_init to match the code

2019-09-12 Thread Rasmus Villemoes
The comment says to clear the bypass bit, but in fact it sets it, thus selecting ref_xtal. And the next line of code does not set the divider to 12, but to (the reset value of) 1. Signed-off-by: Rasmus Villemoes --- arch/arm/cpu/arm926ejs/mxs/mxs.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[U-Boot] [PATCH 3/4] arm: mxs: be more careful when enabling gpmi_clk

2019-09-12 Thread Rasmus Villemoes
The data sheet says that the DIV field cannot change while the CLKGATE bit is set or modified. So do it a little more carefully, by first clearing the bit, waiting for that to appear, then setting the DIV field. Signed-off-by: Rasmus Villemoes --- arch/arm/cpu/arm926ejs/mxs/mxs.c | 5 - 1

[U-Boot] [PATCH 0/4] arm: mxs: mxs_set_gpmiclk

2019-09-12 Thread Rasmus Villemoes
While trying to implement an mxs_set_gpmiclk() I stumbled on a few minor things. Rasmus Villemoes (4): arm: mxs: fix register definitions for clkctrl_gpmi and clkctrl_sspX arm: mxs: fix comments in arch_cpu_init to match the code arm: mxs: be more careful when enabling gpmi_clk arm: mxs

[U-Boot] [PATCH 4/4] arm: mxs: implement mxs_set_gpmiclk

2019-09-12 Thread Rasmus Villemoes
maximum frequency. Signed-off-by: Rasmus Villemoes --- arch/arm/cpu/arm926ejs/mxs/clock.c| 41 +++ arch/arm/include/asm/arch-mxs/clock.h | 1 + 2 files changed, 42 insertions(+) diff --git a/arch/arm/cpu/arm926ejs/mxs/clock.c b/arch/arm/cpu/arm926ejs/mxs/clock.c index

[U-Boot] [PATCH 1/4] arm: mxs: fix register definitions for clkctrl_gpmi and clkctrl_sspX

2019-09-12 Thread Rasmus Villemoes
registers. Signed-off-by: Rasmus Villemoes --- arch/arm/include/asm/arch-mxs/regs-clkctrl-mx23.h | 6 -- arch/arm/include/asm/arch-mxs/regs-clkctrl-mx28.h | 15 ++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/arch/arm/include/asm/arch-mxs/regs-clkctrl-mx23.h b

[U-Boot] [PATCH 2/2] ARM: asm/io.h: remove redundant #if !defined(readb) block

2019-09-10 Thread Rasmus Villemoes
readb is unconditionally defined earlier in io.h, so there's no point checking whether it's undefined. Signed-off-by: Rasmus Villemoes --- arch/arm/include/asm/io.h | 15 --- 1 file changed, 15 deletions(-) diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index

[U-Boot] [PATCH 1/2] ARM: asm/io.h: kill off confusing #ifdef __mem_pci block

2019-09-10 Thread Rasmus Villemoes
the first definitions have. So I'm guessing this is practically dead code. Signed-off-by: Rasmus Villemoes --- arch/arm/include/asm/io.h | 41 --- 1 file changed, 41 deletions(-) diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index e6d27b69f9..

[U-Boot] [PATCH] ARM: mxs: spl_boot.c: make early_delay more robust

2019-09-10 Thread Rasmus Villemoes
twice shy. Signed-off-by: Rasmus Villemoes --- arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c index cb361ac65c..336266fe82 100644 --- a/arch/arm/cpu/arm

[U-Boot] [RFC PATCH 0/3] collect entropy, populate /chosen/rng-seed

2019-09-19 Thread Rasmus Villemoes
t flip randomly between boots - so mixing in a MB or two seems that it should provide plenty of real entropy. Rasmus Villemoes (3): u-boot/sha256.h: add SHA256_INIT macro u-boot/sha256.h: include linux/types.h add infrastructure for collecting entropy common/fdt_support.c| 12 inclu

[U-Boot] [RFC PATCH 2/3] u-boot/sha256.h: include linux/types.h

2019-09-19 Thread Rasmus Villemoes
One cannot use sha256.h by itself - the includer must already have made sure that uint32_t and friends are defined; i.e., having included linux/types.h either directly or indirectly. That's a little annoying, so just make the header self-contained. Signed-off-by: Rasmus Villemoes --- include/u

[U-Boot] [RFC PATCH 1/3] u-boot/sha256.h: add SHA256_INIT macro

2019-09-19 Thread Rasmus Villemoes
To be used for statically initializing a sha256 context. Signed-off-by: Rasmus Villemoes --- include/u-boot/sha256.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/u-boot/sha256.h b/include/u-boot/sha256.h index 9aa1251789..10f42091ee 100644 --- a/include/u-boot/sha256

[U-Boot] [RFC PATCH 3/3] add infrastructure for collecting entropy

2019-09-19 Thread Rasmus Villemoes
a9100 00026040 2046e400..(4...`@`F So some bits are always the same, but there's quite a few that flip randomly between boots - so mixing in a MB or two seems that it should provide plenty of real entropy. Signed-off-by: Rasmus Villemoes --- common/fdt_support.c | 12 +

Re: [U-Boot] [PATCH 0/4] arm: mxs: mxs_set_gpmiclk

2019-09-27 Thread Rasmus Villemoes
On 12/09/2019 11.17, Rasmus Villemoes wrote: > While trying to implement an mxs_set_gpmiclk() I stumbled on a few minor > things. > > Rasmus Villemoes (4): > arm: mxs: fix register definitions for clkctrl_gpmi and clkctrl_sspX > arm: mxs: fix comments in arch_cpu_init

[PATCH] mpc83xx: make ARCH_MPC8309 select SYS_FSL_ERRATUM_ESDHC111

2019-12-11 Thread Rasmus Villemoes
The mpc8309 is also affected by the "Manual Asynchronous CMD12 abort operation causes protocol violations" erratum, though it is enumerated as eSDHC16 in the errata sheet for mpc8309. Signed-off-by: Rasmus Villemoes --- arch/powerpc/cpu/mpc83xx/Kconfig | 1 + 1 file changed, 1

[PATCH] sysreset_mpc83xx: fix mcp83xx -> mpc83xx typo

2019-12-13 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- configs/gazerbeam_defconfig | 2 +- drivers/sysreset/Kconfig| 2 +- drivers/sysreset/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/gazerbeam_defconfig b/configs/gazerbeam_defconfig index 3a29bb1277..2d690245f1

commit "dm: spi: Avoid setting the speed with every transfer"

2019-12-14 Thread Rasmus Villemoes
Hi I'm wondering how commit 60e2809a84 (dm: spi: Avoid setting the speed with every transfer) works. AFAIU, the currently selected speed is a property of the SPI master, so suppose we have two slaves, A which has max_hz = 10MHz and B which has max_hz = 20MHz. Now suppose we do transfers to A,

[PATCH] env: another attempt at fixing SPL build failures

2019-12-15 Thread Rasmus Villemoes
nditionals such as #if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(ENV_SUPPORT) found in drivers/reset/reset-socfpga.c to just CONFIG_IS_ENABLED(ENV_SUPPORT). Signed-off-by: Rasmus Villemoes --- env/Kconfig | 3 +++ env/Makefile | 13 + 2 files changed, 8 insertions(+), 8 deletions(-) diff -

[PATCH] spl_fit.c: enable loading compressed u-boot from fit image

2019-12-11 Thread Rasmus Villemoes
he content is uncompressed. Signed-off-by: Klaus H. Sorensen Signed-off-by: Rasmus Villemoes --- common/spl/spl_fit.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index b3e3ccd5a2..98271eb878 100644 --- a/common/spl/spl_f

[PATCH] cmd/eeprom.c: prepend 0x to hex numbers in output message format

2019-12-11 Thread Rasmus Villemoes
From: "Klaus H. Sorensen" If the numbers do not happen to contain any digits from [a-f], it's not clear that they are base 16. Signed-off-by: Klaus H. Sorensen Signed-off-by: Rasmus Villemoes --- cmd/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/

[PATCH] mpc83xx: set MPC83XX_GPIO_CTRLRS to 2 for MPC8309

2019-12-12 Thread Rasmus Villemoes
The MPC8309 has two gpio controllers (which is already correctly reflected in its struct immap definition). Signed-off-by: Rasmus Villemoes --- arch/powerpc/include/asm/arch-mpc83xx/gpio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/arch

[PATCH] mpc83xx: immap_83xx: add spi8xxx_t in immap for mpc8309

2019-12-12 Thread Rasmus Villemoes
Allow drivers/spi/mpc8xxx_spi.c to be built for an mpc8309 target. Signed-off-by: Rasmus Villemoes --- arch/powerpc/include/asm/immap_83xx.h | 3 +-- arch/powerpc/include/asm/mpc8xxx_spi.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm

[PATCH] powerpc: mpc83xx: convert CONFIG_FSL_ELBC to Kconfig

2019-12-12 Thread Rasmus Villemoes
This complements commit 068789773d0 which did the conversion for mpc85xx. Signed-off-by: Rasmus Villemoes --- arch/powerpc/cpu/mpc83xx/Kconfig | 7 +++ include/configs/MPC8313ERDB_NAND.h | 1 - include/configs/MPC8313ERDB_NOR.h | 1 - include/configs/MPC8315ERDB.h | 2 -- include

[PATCH] doc: really get rid of Documentation/ directory

2019-12-12 Thread Rasmus Villemoes
-rc1. So replace the latter by the former, and making Documentation/ finally empty. Signed-off-by: Rasmus Villemoes --- Documentation/.gitignore | 1 - .../devicetree/bindings/net/ethernet.txt | 66 --- doc/device-tree-bindings/net/ethernet.txt | 55

[PATCH] mpc83xx_clk: always treat MPC83XX_CLK_PCI as invalid

2019-12-19 Thread Rasmus Villemoes
on the CFG_CLKIN_DIV configuration input, but that can't be read from software, so to properly fill out ->speed[MPC83XX_CLK_PCI] I think one would need guidance from Kconfig or dtb. Partially fixes: 07d538d281 clk: Add MPC83xx clock driver Signed-off-by: Rasmus Villemoes --- drivers/clk/mpc83xx_clk.c

Re: [PATCH] RFC: nvedit: support doing one (extra) expansion of the value in "env set"

2020-02-13 Thread Rasmus Villemoes
On 12/02/2020 12.38, Wolfgang Denk wrote: > Dear Rasmus, > > In message you wrote: >> >>> HUSH does not support arrays anyway... >> >> Of course not, but they can be emulated by having variables foo0, foo1, >> foo2 and programmatically accessing the variable foo$index, if only >> there's a way

caching BLOBLISTT_SPL_HANDOFF (was Re: [PATCH] common/board_f.c: use #ifdefs a little more consistently)

2020-02-28 Thread Rasmus Villemoes
On 28/02/2020 18.35, Tom Rini wrote: > On Fri, Feb 28, 2020 at 05:24:58PM +0000, Rasmus Villemoes wrote: >> eliminated, and there's not an #ifdef in sight. > > That sounds pretty nice actually. If you're so inclined I'd like to see > it. > So I started looking at that,

[PATCH] common/board_f.c: use #ifdefs a little more consistently

2020-02-27 Thread Rasmus Villemoes
a mandatory "return 0", conditionally compiled. For the simple cases, switch to the former model, making it a bit more consistent. This also makes the U-Boot image very slightly smaller and avoids a few useless calls to no-op functions during board_init_f. Signed-off-by: Rasmus Villemoes -

Re: [PATCH] env: introduce CONFIG_ENV_DOTVARS_TEMPORARY

2020-01-20 Thread Rasmus Villemoes
On 20/01/2020 17.44, Wolfgang Denk wrote: > Dear Rasmus Villemoes, > > In message <20200108134247.31443-1-rasmus.villem...@prevas.dk> you wrote: >> The printenv command already by default hides variables beginning with >> a dot. It can be useful to take t

Re: [PATCH resend 0/2] gpio: mpc8xxx: honour shadow register when writing gpdat

2020-03-03 Thread Rasmus Villemoes
On 28/01/2020 13.04, Rasmus Villemoes wrote: > [resending with Mario's correct address, sorry for the double post] > > The driver correctly uses the shadow register when asked for the > current value of an output gpio. Unfortunately, it does RMW on the > gpdat register both when

[PATCH 4/4] make env_entry::callback conditional on !CONFIG_SPL_BUILD

2020-02-27 Thread Rasmus Villemoes
ing on an unused or deleted entry having NULL in ->callback. Signed-off-by: Rasmus Villemoes --- env/callback.c | 2 ++ env/flags.c | 1 - include/search.h | 2 ++ lib/hashtable.c | 1 - 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/env/callback.c b/env/callback.c

[PATCH 3/4] lib/hashtable.c: don't test ->callback in SPL

2020-02-27 Thread Rasmus Villemoes
In SPL, environment callbacks are not supported, so e->callback is always NULL. Removing this makes the SPL a little smaller (about 400 bytes in my ppc build) with no functional change. Signed-off-by: Rasmus Villemoes --- lib/hashtable.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/

[PATCH 2/4] lib/hashtable.c: create helper for calling env_entry::callback

2020-02-27 Thread Rasmus Villemoes
This is preparation for compiling out the "call the callback" code and associated error handling for SPL, where ->callback is always NULL. Signed-off-by: Rasmus Villemoes --- lib/hashtable.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) dif

[PATCH 0/4] remove (more) env callback code for SPL

2020-02-27 Thread Rasmus Villemoes
with value, then do a hwalk_r(_htab, env_callback_init) - no need for either set_callback or clear_callback. Rasmus Villemoes (4): env: remove callback.o for an SPL build lib/hashtable.c: create helper for calling env_entry::callback lib/hashtable.c: don't test ->callback in SPL

[PATCH 1/4] env: remove callback.o for an SPL build

2020-02-27 Thread Rasmus Villemoes
. Drop callback.o entirely from the link and stub out the only public function defined in callback.o. This cuts about 600 bytes from the SPL on my ppc build. Signed-off-by: Rasmus Villemoes --- env/Makefile | 2 +- include/env_callback.h | 6 ++ 2 files changed, 7 insertions(+), 1

Re: [PATCH] common/board_f.c: use #ifdefs a little more consistently

2020-02-28 Thread Rasmus Villemoes
On 28/02/2020 00.40, Simon Glass wrote: > Hi Rasmus, > > On Thu, 27 Feb 2020 at 00:18, Rasmus Villemoes > wrote: >> >> Some init functions, e.g. print_resetinfo(), are conditionally defined >> depending on some config options, and are correspondi

Re: [PATCH] common/board_f.c: use #ifdefs a little more consistently

2020-02-28 Thread Rasmus Villemoes
On 28/02/2020 16.46, Tom Rini wrote: > On Fri, Feb 28, 2020 at 08:42:21AM +0000, Rasmus Villemoes wrote: >> On 28/02/2020 00.40, Simon Glass wrote: >>> Using if() is preferable to #if if there is no cost. >> >> Completely agree, and I also prefer to have the linker

Re: [PATCH 3/5] env/fat.c: remove private CMD_SAVEENV logic

2020-02-24 Thread Rasmus Villemoes
On 21/02/2020 17.19, Tom Rini wrote: > On Fri, Feb 21, 2020 at 05:14:14PM +0100, Wolfgang Denk wrote: >> Dear Rasmus, >> >> In message <5265fdd5-3992-4e5f-3235-5586b3b77...@prevas.dk> you wrote: >>> >>> So without the fat.c patch, CONFIG_SPL_SAVEENV is effectively ignored. >> >> OK, but what about

Re: caching BLOBLISTT_SPL_HANDOFF

2020-03-02 Thread Rasmus Villemoes
On 02/03/2020 20.47, Simon Glass wrote: > Hi Rasmus, > > On Fri, 28 Feb 2020 at 16:09, Rasmus Villemoes > wrote: >> >> Now that particular one seems a bit fishy: Why is it ok to cache the >> location of the BLOBLISTT_SPL_HANDOFF blob in gd->spl_handoff? Late

[PATCH] mmc: fsl_esdhc: actually enable cache snooping on mpc830x

2020-01-30 Thread Rasmus Villemoes
, one also finds that the fields are bit-reversed, so the bit to set is 0x0200 rather than 0x0040 - this is also what board_mmc_init() uses in the two gdsys/mpc8308/ boards. Signed-off-by: Rasmus Villemoes --- drivers/mmc/fsl_esdhc.c | 15 +-- 1 file changed, 13 insertions(+), 2

Re: [U-Boot] [PATCH] fit: Do not automatically decompress ramdisk images

2020-02-03 Thread Rasmus Villemoes
On 08/08/2019 05.16, Tom Rini wrote: > On Fri, Aug 02, 2019 at 03:52:28PM -0700, Julius Werner wrote: > >> The Linux ramdisk should always be decompressed by the kernel itself, >> not by U-Boot. Therefore, the 'compression' node in the FIT image should >> always be set to "none" for ramdisk

enabling CONFIG_FIT_SIGNATURE breaks U-Boot

2020-02-07 Thread Rasmus Villemoes
I'm trying to enable verified boot on an mpc8309, but the first step of simply enabling CONFIG_FIT_SIGNATURE causes this: [2020-02-07 17:23:34.342] U-Boot 2020.01-00037-g6e82ca3d2e (Feb 07 2020 - 17:23:16 +0100) [2020-02-07 17:23:34.379] [2020-02-07 17:23:34.379] Error binding driver

[PATCH] net: convert NET_MAXDEFRAG to Kconfig

2020-02-07 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- net/Kconfig | 10 ++ net/net.c| 3 --- scripts/config_whitelist.txt | 1 - 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/net/Kconfig b/net/Kconfig index a07f6746c5..96bbce1778 100644 --- a/net

Re: enabling CONFIG_FIT_SIGNATURE breaks U-Boot

2020-02-07 Thread Rasmus Villemoes
On 07/02/2020 17.30, Rasmus Villemoes wrote: > I'm trying to enable verified boot on an mpc8309, but the first step of > simply enabling CONFIG_FIT_SIGNATURE causes this: Well, more precisely, CONFIG_RSA causes that - I tried disabling CONFIG_FIT_SIGNATURE but kept CONFIG_RSA, and the same

Re: enabling CONFIG_FIT_SIGNATURE breaks U-Boot

2020-02-07 Thread Rasmus Villemoes
On 07/02/2020 17.50, Rasmus Villemoes wrote: > On 07/02/2020 17.30, Rasmus Villemoes wrote: >> I'm trying to enable verified boot on an mpc8309, but the first step of >> simply enabling CONFIG_FIT_SIGNATURE causes this: > > Well, more precisely, CONFIG_RSA causes tha

[PATCH resend 1/2] gpio: mpc8xxx: don't modify gpdat when setting gpio as input

2020-01-28 Thread Rasmus Villemoes
. The extra indirection through mpc8xxx_gpio_set_in() does not help readability, so just fold the gpdir update into mpc8xxx_gpio_direction_input(). Signed-off-by: Rasmus Villemoes --- drivers/gpio/mpc8xxx_gpio.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers

[PATCH resend 0/2] gpio: mpc8xxx: honour shadow register when writing gpdat

2020-01-28 Thread Rasmus Villemoes
why turning one LED on would turn off another. Rasmus Villemoes (2): gpio: mpc8xxx: don't modify gpdat when setting gpio as input gpio: mpc8xxx: don't do RMW on gpdat register when setting value drivers/gpio/mpc8xxx_gpio.c | 41 ++--- 1 file changed, 15

[PATCH 2/2] gpio: mpc8xxx: don't do RMW on gpdat register when setting value

2020-01-28 Thread Rasmus Villemoes
- write the bitwise and of the shadow and new gpdir register to gpdat - write the new gpdir register Signed-off-by: Rasmus Villemoes --- drivers/gpio/mpc8xxx_gpio.c | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/drivers/gpio/mpc8xxx_gpio.c b

[PATCH 0/2] gpio: mpc8xxx: honour shadow register when writing gpdat

2020-01-28 Thread Rasmus Villemoes
preventing outputs from being read back - the bits corresponding to gpios 0-7 are always read as 0, while at least the value of gpio10 is correctly reflected when reading gpdat. Which is how I noticed these bugs - I couldn't understand why turning one LED on would turn off another. Rasmus Villemoes (2

[PATCH 1/2] gpio: mpc8xxx: don't modify gpdat when setting gpio as input

2020-01-28 Thread Rasmus Villemoes
. The extra indirection through mpc8xxx_gpio_set_in() does not help readability, so just fold the gpdir update into mpc8xxx_gpio_direction_input(). Signed-off-by: Rasmus Villemoes --- drivers/gpio/mpc8xxx_gpio.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers

[PATCH resend 2/2] gpio: mpc8xxx: don't do RMW on gpdat register when setting value

2020-01-28 Thread Rasmus Villemoes
- write the bitwise and of the shadow and new gpdir register to gpdat - write the new gpdir register Signed-off-by: Rasmus Villemoes --- drivers/gpio/mpc8xxx_gpio.c | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/drivers/gpio/mpc8xxx_gpio.c b

[PATCH] RFC: nvedit: support doing one (extra) expansion of the value in "env set"

2020-02-04 Thread Rasmus Villemoes
ink cli_simple.o could be unconditionally built and then link-time GC should get rid of the excess functions). This has been lightly tested in the sandbox. I'll add some proper unit tests, update the help texts and try to handle the Kconfig issue if this is something that might be accepted. Signed-off-by:

Re: [PATCH] RFC: nvedit: support doing one (extra) expansion of the value in "env set"

2020-02-14 Thread Rasmus Villemoes
On 13/02/2020 16.55, Wolfgang Denk wrote: > Dear Rasmus, > > In message you wrote: >> >> I'm sorry, I see I mistyped in my example above, it should have been >> >> if test $slot = "A" ; setenv result $BOOT_A_LEFT ... >> >> as should hopefully be clear from the original post and the eval >>

[PATCH] env: make file-scope env_ptr variables static

2020-02-18 Thread Rasmus Villemoes
it's nice to be able to enable most ENV_IS_IN_* at the same time, and since these env_ptr are not declared anywhere, they really have no reason to have external linkage. nand.c and flash.c similarly already define file-scope static env_ptr variables. Signed-off-by: Rasmus Villemoes --- env

[PATCH] include/eeprom.h: fix build errors

2020-02-18 Thread Rasmus Villemoes
/eeprom.c:37:8: error: void value not ignored as it ought to be rcode = eeprom_read(dev_addr, offset, buffer, cnt); Signed-off-by: Rasmus Villemoes --- include/eeprom.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/eeprom.h b/include/eeprom.h index 79118eb83d

Re: [PATCH] RFC: nvedit: support doing one (extra) expansion of the value in "env set"

2020-02-18 Thread Rasmus Villemoes
On 16/02/2020 18.25, Wolfgang Denk wrote: > Dear Rasmus, > > In message <20200216152427.e80c7240...@gemini.denx.de> I wrote: >> >> So lets change my little script to add setting "left": >> >> slot=none >> for i in $BOOT_ORDER ; do >> setenv tmp_cmd 'setexpr tmp_val sub '^' ""

Re: [PATCH 0/5] CMD_SAVEENV ifdef cleanup

2020-02-19 Thread Rasmus Villemoes
On 19/02/2020 14.25, Wolfgang Denk wrote: > Dear Rasmus, > > In message <20200219094726.26798-1-rasmus.villem...@prevas.dk> you wrote: >> >> [1] Here's the current conditions for which these three drivers >> provide .save: >> >> SPL U-Boot >> ext4.c

Re: [PATCH 3/5] env/fat.c: remove private CMD_SAVEENV logic

2020-02-20 Thread Rasmus Villemoes
On 19/02/2020 14.27, Wolfgang Denk wrote: > Dear Rasmus, > > In message <20200219094726.26798-4-rasmus.villem...@prevas.dk> you wrote: >> Always compile the env_fat_save() function, and let >> CONFIG_IS_ENABLED(SAVEENV) (via the ENV_SAVE_PTR macro) decide whether >> it actually ends up being

Re: [PATCH 2/3] tools: add fdt_add_pubkey

2020-02-11 Thread Rasmus Villemoes
On 11/02/2020 10.54, Alex Kiernan wrote: > On Tue, Feb 11, 2020 at 9:49 AM Rasmus Villemoes > wrote: >> >> Having to use the -K option to mkimage to populate U-Boot's .dtb with the >> public key while signing the kernel FIT image is often a little >> awkward. In

[PATCH 2/3] tools: add fdt_add_pubkey

2020-02-11 Thread Rasmus Villemoes
to be supplied on the command line. Signed-off-by: Rasmus Villemoes --- tools/.gitignore | 1 + tools/Makefile | 3 ++ tools/fdt_add_pubkey.c | 96 ++ 3 files changed, 100 insertions(+) create mode 100644 tools/fdt_add_pubkey.c diff --git a/tools

[PATCH 0/3] RFC: add fdt_add_pubkey tool

2020-02-11 Thread Rasmus Villemoes
key useful as is), but I thought I might as well send it out for early comments. Rasmus Villemoes (3): test_vboot.py: remove extraneous -k option to fit_check_sign tools: add fdt_add_pubkey test_vboot.py: include test of fdt_add_pubkey tool test/py/tests/test_vboot.py | 11 - tools/

[PATCH 1/3] test_vboot.py: remove extraneous -k option to fit_check_sign

2020-02-11 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- test/py/tests/test_vboot.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/py/tests/test_vboot.py b/test/py/tests/test_vboot.py index 9c41ee56b1..3dd8e3cb66 100644 --- a/test/py/tests/test_vboot.py +++ b/test/py/tests/test_vboot.py

[PATCH 3/3] test_vboot.py: include test of fdt_add_pubkey tool

2020-02-11 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- test/py/tests/test_vboot.py | 8 1 file changed, 8 insertions(+) diff --git a/test/py/tests/test_vboot.py b/test/py/tests/test_vboot.py index 3dd8e3cb66..799c28cc2c 100644 --- a/test/py/tests/test_vboot.py +++ b/test/py/tests/test_vboot.py @@ -182,6

Re: [PATCH resend 0/2] gpio: mpc8xxx: honour shadow register when writing gpdat

2020-02-11 Thread Rasmus Villemoes
On 28/01/2020 13.04, Rasmus Villemoes wrote: > Rasmus Villemoes (2): > gpio: mpc8xxx: don't modify gpdat when setting gpio as input > gpio: mpc8xxx: don't do RMW on gpdat register when setting value > > drivers/gpio/mpc8xxx_gpio.c | 41 ++--- &g

Re: [PATCH] mmc: fsl_esdhc: actually enable cache snooping on mpc830x

2020-02-11 Thread Rasmus Villemoes
On 06/02/2020 05.14, Y.b. Lu wrote: >> -Original Message- >> From: Peng Fan >> Sent: Wednesday, February 5, 2020 3:08 PM >> To: Rasmus Villemoes ; u-boot@lists.denx.de; >> Y.b. Lu >> Cc: Mario Six >> Subject: RE: [PATCH] mmc: fsl_esdhc: ac

[PATCH resend 1/5] gpio/mpc83xx_spisel_boot.c: gpio driver for SPISEL_BOOT signal

2020-02-11 Thread Rasmus Villemoes
convenient to present it to the spi driver that way. The alternative it to teach mpc8xxx_spi to handle the SPISEL_BOOT signal itself (that is how it's done in the linux kernel, see commit 69b921acae8a) Signed-off-by: Klaus H. Sorensen Signed-off-by: Rasmus Villemoes --- .../gpio/fsl,mpc83xx-spise

[PATCH resend 5/5] mpc8xxx_spi: implement real ->set_speed

2020-02-11 Thread Rasmus Villemoes
off-by: Rasmus Villemoes --- drivers/spi/mpc8xxx_spi.c | 64 --- 1 file changed, 53 insertions(+), 11 deletions(-) diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c index 8ef2451411..1bde31ad34 100644 --- a/drivers/spi/mpc8xxx_spi.c +++ b/drivers/

[PATCH resend 2/5] gazerbeam: add clocks property to SPI node

2020-02-11 Thread Rasmus Villemoes
Prepare for supporting setting different speeds in mpc8xxx_spi.c. Signed-off-by: Rasmus Villemoes --- arch/powerpc/dts/gdsys/mpc8308.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/dts/gdsys/mpc8308.dtsi b/arch/powerpc/dts/gdsys/mpc8308.dtsi index 23e7403d91

[PATCH resend 3/5] mpc8xxx_spi: put max_cs to use

2020-02-11 Thread Rasmus Villemoes
ice tree used "cs-gpios" rather than "gpios", so gpio_request_list_by_name() had returned 0. That would have been a lot easier to figure out if the chip select index was sanity checked, so rename max_cs to cs_count, and reject a xfer with a too large cs index. Signed-off-by: R

[PATCH resend 4/5] mpc8xxx_spi: always use 8-bit characters, don't read or write garbage

2020-02-11 Thread Rasmus Villemoes
ends being more work for the CPU, we're mostly bounded by the speed of the SPI bus, and we avoid writing to the mode register in every loop. Based on work by Klaus H. Sørensen. Cc: Klaus H. Sorensen Signed-off-by: Rasmus Villemoes --- drivers/spi/mpc8xxx_spi.c | 80 +-

[PATCH resend 0/5] spi: mpc8xxx_spi: bug fixes, real ->set_speed and a pseudo-gpio driver

2020-02-11 Thread Rasmus Villemoes
[2] https://patchwork.ozlabs.org/cover/1218170/ Klaus H. Sorensen (1): gpio/mpc83xx_spisel_boot.c: gpio driver for SPISEL_BOOT signal Rasmus Villemoes (4): gazerbeam: add clocks property to SPI node mpc8xxx_spi: put max_cs to use mpc8xxx_spi: always use 8-bit characters, don't read or write garbage m

Re: [PATCH] RFC: nvedit: support doing one (extra) expansion of the value in "env set"

2020-02-11 Thread Rasmus Villemoes
On 05/02/2020 18.59, Simon Glass wrote: > Hi Rasmus, > >> This has been lightly tested in the sandbox. I'll add some proper unit >> tests, update the help texts and try to handle the Kconfig issue if >> this is something that might be accepted. >> >

Re: [PATCH] RFC: nvedit: support doing one (extra) expansion of the value in "env set"

2020-02-11 Thread Rasmus Villemoes
On 11/02/2020 17.30, Wolfgang Denk wrote: > Dear Rasmus Villemoes, > > In message <20200205010812.20373-1-rasmus.villem...@prevas.dk> you wrote: >> Currently, there's no way to fetch the value of an environment >> variable whose name is stored in some other

Re: [PATCH] RFC: nvedit: support doing one (extra) expansion of the value in "env set"

2020-02-21 Thread Rasmus Villemoes
On 18/02/2020 09.11, Rasmus Villemoes wrote: > Thanks, Wolfgang. Consider both "env set -E" and the alternative "env > get" withdrawn. So, if I wanted to change the status of such a patch in patchwork, what would be the appropriate status? There's no &quo

Re: [PATCH] RFC: nvedit: support doing one (extra) expansion of the value in "env set"

2020-02-14 Thread Rasmus Villemoes
On 14/02/2020 12.54, Rasmus Villemoes wrote: > Now we can work around the lack of break in the busybox shell by writing ^ > But we still can't translate this to busybox shell, because t

[PATCH] sandbox: also restore terminal settings when killed by SIGINT

2020-02-14 Thread Rasmus Villemoes
./u-boot # hit Ctrl-C $ grep flags /proc/$$/fdinfo/1 flags: 0106002 After: $ grep flags /proc/$$/fdinfo/1 flags: 0102002 $ ./u-boot # hit Ctrl-C $ grep flags /proc/$$/fdinfo/1 flags: 0102002 Signed-off-by: Rasmus Villemoes --- arch/sandbox/cpu/os.c | 9 + 1 file changed, 9 insertions(

Re: [PATCH 1/4 v5] watchdog: Implement generic watchdog_reset() version

2020-02-19 Thread Rasmus Villemoes
On 20/02/2020 07.43, Stefan Roese wrote: > On 20.02.20 07:38, Christophe Leroy wrote: > > > > +void watchdog_reset(void) > +{ > +    static ulong next_reset; > +    ulong now; > + > +    /* Exit if GD is not ready or watchdog is not initialized yet */ > +    if (!gd

[PATCH 5/5] env/sf.c: drop private CMD_SAVEENV logic

2020-02-19 Thread Rasmus Villemoes
CONFIG_SPL_SAVEENV, one obviously expects to actually be able to save the environment. Signed-off-by: Rasmus Villemoes --- env/sf.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/env/sf.c b/env/sf.c index 5ef4055219..22b70ad319 100644 --- a/env/sf.c +++ b/env/sf.c

[PATCH 3/5] env/fat.c: remove private CMD_SAVEENV logic

2020-02-19 Thread Rasmus Villemoes
Always compile the env_fat_save() function, and let CONFIG_IS_ENABLED(SAVEENV) (via the ENV_SAVE_PTR macro) decide whether it actually ends up being compiled in. Signed-off-by: Rasmus Villemoes --- env/fat.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/env/fat.c b

[PATCH 1/5] env: add SAVEENV as an alias of the CMD_SAVEENV symbol

2020-02-19 Thread Rasmus Villemoes
, introduce SAVEENV as an alias for the CMD_SAVEENV symbol. Then one can simply use CONFIG_IS_ENABLED(SAVEENV) Signed-off-by: Rasmus Villemoes --- env/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/env/Kconfig b/env/Kconfig index 0d6f559b39..969308fe6c 100644 --- a/env/Kconfig +++ b

[PATCH 4/5] env/ext4.c: remove CONFIG_CMD_SAVEENV ifdef

2020-02-19 Thread Rasmus Villemoes
_SAVEENV=y SPL_ENV_IS_IN_EXT4=y in which case env_ext4_save would erroneously not be compiled in. Signed-off-by: Rasmus Villemoes --- env/ext4.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/env/ext4.c b/env/ext4.c index 1f6b1b5bd8..911e19c6d3 100644 --- a/env/ext4.c +++ b/env/ext4.

[PATCH 2/5] env_internal.h: add alternative ENV_SAVE_PTR macro

2020-02-19 Thread Rasmus Villemoes
hich for lack of a better name is simply uppercased, allowing one to update storage drivers piecemeal to both reduce their ifdeffery and honour CONFIG_SPL_SAVEENV. Signed-off-by: Rasmus Villemoes --- include/env_internal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/env_internal.h

[PATCH 0/5] CMD_SAVEENV ifdef cleanup

2020-02-19 Thread Rasmus Villemoes
oot proper, but then the use of env_save_ptr() ends up with a build warning in case CONFIG_CMD_SAVEENV=n - fat.c doesn't have that proplem. Rasmus Villemoes (5): env: add SAVEENV as an alias of the CMD_SAVEENV symbol env_internal.h: add alternative ENV_SAVE_PTR macro env/fat.c: remove private C

  1   2   3   4   5   6   7   8   9   >