When booting images that have HDMI firmware embedded we need to skip
the first v2 header we encounter and get all of the necessary data
from the next one. Add code implementing that.
Signed-off-by: Andrey Smirnov
---
arch/arm/mach-imx/xload-esdhc.c | 43 +
1 file
Boot header on i.MX8MQ SoC allows embedding signed HDMI firmware
images that are used by mask ROM code during the very early stages of
boot. Since providing that firmware appear to be necessary to enable
SoC's HDMI/DP functionality extend imx-image tool to support this
feature. To do that add code
Current code for dma_sync_single_for_device(), when called with dir
set to DMA_FROM_DEVICE, will first invalidate given region of memory
as a first step and then clean+invalidate it as a second. While the
second step should be harmless it seems to be an unnecessary no-op
that could probably be avoi
Some 64-bit SoC have IP cores whose DMA capability is limited to
32-bits only. To handles such cases introduced DMA_32_BIT_ONLY as well
as add the code to make sure that malloc pool (which will be used for
DMA buffers) is accessible using 32-bit address.
Signed-off-by: Andrey Smirnov
---
arch/ar
On 64-bit SoCs it becomes possible to end up with a DMA buffer
allocated in the region of memory inaccessible to ESDHC
controller. Change the code to bail out if that happens to avoid
silent failures.
Signed-off-by: Andrey Smirnov
---
drivers/mci/imx-esdhc.c | 3 +++
1 file changed, 3 insertions
Everyone:
This series is a result of debugging FEC and uSDHC failures on
i.MX8MQ. Patches 1 and 2 are pretty straightforward and shouldn't be
controversial. Patch 3, OTOH, may or may not be a good way to solve
this problem, but it's a good way to start a discussion on the subject
which is my main
On 64-bit SoCs it becomes possible to end up with a DMA buffer
allocated in the region of memory inaccessible to FEC
controller. Change the code to bail out if that happens to avoid
silent failures that'd result otherwise.
Signed-off-by: Andrey Smirnov
---
drivers/net/fec_imx.c | 10 +-
From: Martin Wilck
Sparse emits errors about ilog2() in array indices because of the use of
__ilog2_32() and __ilog2_64(), rightly so
(https://www.spinics.net/lists/linux-sparse/msg03471.html).
Create a const_ilog2() variant that works with sparse for this scenario.
(Note: checkpatch.pl complai
From: Linus Torvalds
gcc-7 has an "optimization" pass that completely screws up, and
generates the code expansion for the (impossible) case of calling
ilog2() with a zero constant, even when the code gcc compiles does not
actually have a zero constant.
And we try to generate a compile-time error
Everyone:
This series is result of fixing compiler warnings similar to the one
below:
In file included from drivers/clk/clk-divider.c:22:
include/linux/log2.h:22:1: warning: ignoring attribute ‘noreturn’ because it
conflicts with attribute ‘const’ [-Wattributes]
int ilog2_NaN(void);
that I
From: Randy Dunlap
Fix kernel-doc:
- Add kernel-doc notation to some functions.
- Fix kernel-doc notation in function parameters.
Signed-off-by: Randy Dunlap
Signed-off-by: Jonathan Corbet
[andrew.smir...@gmail.com: Applied kernel patch to Barebox as-is]
Signed-off-by: Andrey Smirnov
---
in
From: Ard Biesheuvel
The function order_base_2() is defined (according to the comment block)
as returning zero on input zero, but subsequently passes the input into
roundup_pow_of_two(), which is explicitly undefined for input zero.
This has gone unnoticed until now, but optimization passes in G
Convert __roundup_pow_of_two() to use fls_long() instead of fls() so
the code would be identical to that found in Linux. This fix also
allowed next patch(taken from Linux kernel verbatim) to apply cleanly.
Signed-off-by: Andrey Smirnov
---
include/linux/log2.h | 2 +-
1 file changed, 1 insertion
Detect which platforms need header v2 based on current CPU type and
replace all of the code explicitly specifying that.
Signed-off-by: Andrey Smirnov
---
arch/arm/mach-imx/imx-bbu-internal.c | 32 +---
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/arch/a
Alias imx5*_bbu_internal_mmc_register_handler() to
imx_bbu_internal_mmc_register_handler()
Signed-off-by: Andrey Smirnov
---
arch/arm/mach-imx/imx-bbu-internal.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-imx/imx-bbu-internal.c
b/arch/arm/mach-imx/
Add code to verify that update handler specified with either -t or of
-d exists before commencing the update procedure.
Signed-off-by: Andrey Smirnov
---
commands/barebox-update.c | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/commands/barebox-update.c b/com
Use pwrite_full() instead of pwrite() to make sure that all of the
data was written to target device. While at it adjust return value of
imx_bbu_write_device() to be zero in case of success.
Signed-off-by: Andrey Smirnov
---
arch/arm/mach-imx/imx-bbu-internal.c | 10 +++---
1 file changed, 7
Getting a error from blk->ops->write() is not a very unlikely
event (happens quite often during new board bringup), so we need to
catch and propagate them to upper layers so they can be at least
reported properly. Change the code of all of the callers to bail out
as soon as blk->ops->write() fails.
Add BBU configuration to allow programming Barebox to eMMC. Normally
factory U-Boot is shipped in mmc0.boot0, so us using user partition
for Barebox should allow those two to coexist.
Signed-off-by: Andrey Smirnov
---
arch/arm/boards/nxp-imx8mq-evk/board.c | 3 +++
1 file changed, 3 insertions(+
Signed-off-by: Andrey Smirnov
---
arch/arm/boards/zii-vf610-dev/board.c | 19 +++
arch/arm/dts/vf610-zii-dev-rev-b.dts | 11 +++
2 files changed, 30 insertions(+)
diff --git a/arch/arm/boards/zii-vf610-dev/board.c
b/arch/arm/boards/zii-vf610-dev/board.c
index d88b26164.
Analogous to what we have with write()/write_full(), introduce a
lightweight wrapper around pwrite() that guarantees the either all
data is going to be written or a negative error code would be
returned.
Signed-off-by: Andrey Smirnov
---
include/libfile.h | 1 +
lib/libfile.c | 24 +
Returning !bbu_find_handler() from barebox_update_handler_exists()
would return the opposite result from what the name of that funciton
implies. Drop the "!" to make it behave as expected.
Signed-off-by: Andrey Smirnov
---
common/bbu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
Constify all 'devicefile' arguments since they are treated as so by
all of the users in BBU code.
Signed-off-by: Andrey Smirnov
---
arch/arm/mach-imx/imx-bbu-internal.c | 40 +---
arch/arm/mach-imx/include/mach/bbu.h | 40 ++--
2 files changed, 44
Signed-off-by: Andrey Smirnov
---
arch/arm/mach-imx/imx-bbu-internal.c | 10 ++
arch/arm/mach-imx/include/mach/bbu.h | 11 +++
2 files changed, 21 insertions(+)
diff --git a/arch/arm/mach-imx/imx-bbu-internal.c
b/arch/arm/mach-imx/imx-bbu-internal.c
index c1b3d9ce8..ecc885d29 10
Since imx_bbu_check_prereq() already uses file_detect_type() and we've
extended it to understand i.MX boot image file type, we can simplify a
bunch of repetitive code as follows:
1. Convert all checks from IVT_BARKER to filetype_imx_image_v2
check
2. Move all of the checking to be
Signed-off-by: Andrey Smirnov
---
arch/arm/mach-imx/imx-bbu-internal.c | 8
arch/arm/mach-imx/include/mach/bbu.h | 9 +
2 files changed, 17 insertions(+)
diff --git a/arch/arm/mach-imx/imx-bbu-internal.c
b/arch/arm/mach-imx/imx-bbu-internal.c
index ecc885d29..59fe6218e 100644
-
Flash header is located at 33KiB mark on i.MX8MQ, so we need to take
that into account when initializing imx_handler->flash_header_offset.
Convert FLASH_HEADER_OFFSET_MMC into a function call that will check
if Barebox is running on i.MX8MQ CPU and adjust the offset
accordingly.
Signed-off-by: An
Alias imx5*_bbu_internal_spi_i2c_register_handler() to a common function.
Signed-off-by: Andrey Smirnov
---
arch/arm/mach-imx/imx-bbu-internal.c | 21 ++---
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/arch/arm/mach-imx/imx-bbu-internal.c
b/arch/arm/mach-imx/i
Both code sections responsible for enabling/disabling underlying
device write protection are almost identical to each other. To avoid
code duplication move them into a separate routine and adjust the rest
of the code accordignly.
Signed-off-by: Andrey Smirnov
---
arch/arm/mach-imx/imx-bbu-intern
Change the code of barebox_update() to explicitly log that update
failed instead of failing silently (unless update was interrupted) and
relying on user checking the return code.
Signed-off-by: Andrey Smirnov
---
common/bbu.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
di
Modify file_detect_type() and add code needed to be able to detect
i.MX boot images with v2 header.
Signed-off-by: Andrey Smirnov
---
common/filetype.c | 4
include/filetype.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/common/filetype.c b/common/filetype.c
index 8f2be2773..f8b6b
All three, imx_bbu_internal_v1_update(), imx_bbu_external_update() and
imx_bbu_internal_v2_update() are doing exactly the same thing. Instead
of having three almost identical functions, convert
imx_bbu_internal_v2_update() (the most versatile of the three) to be a
generic function and use it everyw
Replace IMX_INTERNAL_FLAG_NAND with a function pointer that can be
customized by individual registration functions. The change by iteself
doesn't have that much value, however it makes the simplification in
the commit that follows more straightforward.
Signed-off-by: Andrey Smirnov
---
arch/arm/
Signed-off-by: Andrey Smirnov
---
arch/arm/mach-imx/imx-bbu-internal.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm/mach-imx/imx-bbu-internal.c
b/arch/arm/mach-imx/imx-bbu-internal.c
index 55e344cff..67ae2961c 100644
--- a/arch/arm/mach-imx/imx-bbu-internal.c
+++ b/arch/arm/mach
Everyone:
This series is the result simplification, bugfixing and adding
features to some of the code in BBU subsytem:
- Patches 1 - 13 are a number of code simplifications intended to
minimize amount of duplicated code as well as generic improvements
(IMHO)
- Patches 14 - 18 are i.M
Second parameter of __init_handler() will initialize
handler.devicefile for us, so there's no need to to it explicitly
after.
Signed-off-by: Andrey Smirnov
---
arch/arm/mach-imx/imx-bbu-internal.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/mach-imx/imx-bbu-int
Add arch/ to include path for filetype.o so that it would be possible
to pull in various machine specific constants in.
Signed-off-by: Andrey Smirnov
---
common/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/Makefile b/common/Makefile
index b6284c255..13920cc5a 100644
--- a/
Modify file_detect_type() and add code needed to be able to detect
i.MX boot images with v1 header.
Signed-off-by: Andrey Smirnov
---
common/filetype.c | 7 +++
include/filetype.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/common/filetype.c b/common/filetype.c
index c5f2384a6..8f
On Thu, Aug 23, 2018 at 2:59 AM Florian Bäuerle
wrote:
>
> Signed-off-by: Florian Bäuerle
> ---
> arch/arm/boards/phytec-phycard-imx27/lowlevel.c | 15 +++
> arch/arm/mach-imx/include/mach/debug_ll.h | 13 +
> include/serial/imx-uart.h | 5 +++
On Thu, Aug 23, 2018 at 2:33 AM Roland Hieber wrote:
>
> On Tue, Aug 21, 2018 at 01:23:28PM -0700, Andrey Smirnov wrote:
> > On Tue, Aug 21, 2018 at 3:07 AM Roland Hieber
> > wrote:
> > >
> > > Hello Andrey,
> > >
> > > On Mon, Aug 20, 2018 at 11:25:43PM -0700, Andrey Smirnov wrote:
> > > > Modi
>> +struct ratp_bb_i2c_read_request {
>> + struct ratp_bb header;
>> + uint16_t buffer_offset;
>> + uint8_t bus;
>> + uint8_t addr;
>
> I wonder how we see the RATP support. If it's for adhoc debugging then
> bus/addr is fine. The caller should have no expectations that the bus
>
Some background on that patch:
I've tried to get barebox master compiled with OSELAS 2018 running on a
phycard-imx27. I had a few problems with that:
It turned out, that I can boot the resulting image as a seconds stage (from an
older version of barebox), after commenting out pca100_usb_init(). I
Signed-off-by: Florian Bäuerle
---
arch/arm/boards/phytec-phycard-imx27/lowlevel.c | 15 +++
arch/arm/mach-imx/include/mach/debug_ll.h | 13 +
include/serial/imx-uart.h | 5 +
3 files changed, 33 insertions(+)
diff --git a/arch/arm/boards/
On Tue, Aug 21, 2018 at 01:23:28PM -0700, Andrey Smirnov wrote:
> On Tue, Aug 21, 2018 at 3:07 AM Roland Hieber wrote:
> >
> > Hello Andrey,
> >
> > On Mon, Aug 20, 2018 at 11:25:43PM -0700, Andrey Smirnov wrote:
> > > Modify file_detect_type() and add code needed to be able to detect
> > > i.MX b
44 matches
Mail list logo