[PATCH 2/4] ARM: nxp-imx8mq-evk: switch the PBL memcpy parameters to common variables

2019-12-19 Thread Lucas Stach
Use the variables defined in sections.h, instead of hand rolling the same computation. Signed-off-by: Lucas Stach --- arch/arm/boards/nxp-imx8mq-evk/lowlevel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c b/arch/arm/boards/nxp-i

[PATCH 1/4] ARM: nxp-imx8mq-evk: switch to SPDX license header

2019-12-19 Thread Lucas Stach
Signed-off-by: Lucas Stach --- arch/arm/boards/nxp-imx8mq-evk/lowlevel.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c index 9d060fb5890b..d2042bffcacc 100644 --- a/arch/arm/bo

[PATCH 4/4] ARM: nxp-imx8mq-evk: fix bootflow comment

2019-12-19 Thread Lucas Stach
The comment above nxp_imx8mq_evk_start is no longer accurate, as there is no trampoline in DRAM anymore. Change the comment to reflect the current boot flow. Signed-off-by: Lucas Stach --- arch/arm/boards/nxp-imx8mq-evk/lowlevel.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-)

[PATCH 3/4] ARM: nxp-imx8mq-evk: clean up nxp_imx8mq_evk_start

2019-12-19 Thread Lucas Stach
Mostly cosmetic changes: - reduce scope of local variabes - wrap comment to fir 80 char limit - check return value from imx8_esdhc_load_piggy - drop intermediate function that only wraps a single other function Signed-off-by: Lucas Stach --- arch/arm/boards/nxp-imx8mq-evk/lowlevel.c | 24 +++

[PATCH] fixup! ARM: zii-imx8mq-dev: add DT fixups

2019-12-19 Thread Lucas Stach
--- arch/arm/boards/zii-imx8mq-dev/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boards/zii-imx8mq-dev/board.c b/arch/arm/boards/zii-imx8mq-dev/board.c index 76d499a37094..ac455990b0dc 100644 --- a/arch/arm/boards/zii-imx8mq-dev/board.c +++ b/arch/arm/boards

Re: [PATCH] driver: add function to look up device by DT node

2019-12-19 Thread Lucas Stach
On Do, 2019-12-19 at 13:52 +0300, Peter Mamonov wrote: > Hi, Lucas, > > On Thu, Dec 19, 2019 at 11:10:11AM +0100, Lucas Stach wrote: > > Useful if we need to remove a deivce from the Barebox internal DT. > > > > Signed-off-by: Lucas Stach > > --- > > This is a prerequisite for "ARM: zii-imx8mq-d

Re: [PATCH] driver: add function to look up device by DT node

2019-12-19 Thread Peter Mamonov
Hi, Lucas, On Thu, Dec 19, 2019 at 11:10:11AM +0100, Lucas Stach wrote: > Useful if we need to remove a deivce from the Barebox internal DT. > > Signed-off-by: Lucas Stach > --- > This is a prerequisite for "ARM: zii-imx8mq-dev: add DT fixups", which > I missed to send out in the series. > --- >

[PATCH] driver: add function to look up device by DT node

2019-12-19 Thread Lucas Stach
Useful if we need to remove a deivce from the Barebox internal DT. Signed-off-by: Lucas Stach --- This is a prerequisite for "ARM: zii-imx8mq-dev: add DT fixups", which I missed to send out in the series. --- drivers/base/driver.c | 12 include/driver.h | 1 + 2 files changed,

[PATCH 3/3] ARM: cache_64: invalidate icache in arm_early_mmu_cache_flush

2019-12-19 Thread Lucas Stach
From: Ahmad Fatoum So far arm_early_mmu_cache_flush has only been used in preparation for executing newly-written code. For this reason, on ARMv7 and below, it had always invalidate the icache after the dcache flush. We don't do this on ARM64, but sync_caches_for_execution depends on this, which

[PATCH 1/3] ARM64: entry: save/restore potentially clobbered registers

2019-12-19 Thread Lucas Stach
While the comment is correct that currently arm_early_mmu_cache_invalidate() is only a call to to v8_invalidate_icache_all() , which doesn't clobber x0-x2, this starts to fall apart as soon as we do something more in this function. Make sure to properly save/restore the parameters passed to the en

[PATCH 0/3] ARM64 early cache fixes

2019-12-19 Thread Lucas Stach
This is a resend of the 2 ARM64 early cache fixes by Ahmad. They were not applied at the time, as there was a report of them breaking Barebox on i.MX8M. I finally had time to look into that, the first patch by me cleans the stage, so the cache fixes no longer break anything. At least the icache in

[PATCH 2/3] ARM: cache_64: invalidate dcache in arm_early_mmu_cache_invalidate

2019-12-19 Thread Lucas Stach
From: Ahmad Fatoum On some ARM cores, cache contents are indeterminate after a Power-On Reset. Turning on the MMU on such cores risks interpreting random cache lines as valid, causing hard-to-debug errors. For this reason, we always invalidate the dcache on <= ARMv7. Let's do likewise for ARM64.

[PATCH v2] lds: align RO_DATA_SECTION members

2019-12-19 Thread Lucas Stach
From: Lucas Stach When using the RO_DATA_SECTION macro, all the individual components are put into the rodata section. As they now end up in the same section there is no alignment enforced between them anymore. This leads to unaligned start pointers when any of the components have a unaligned siz