[HELP] Kernel + initrd in FIT

2019-03-07 Thread Seraphim Dolbilov
Hello, I'm interested in way Barebox passes initrd to kernel if both are taken from FIT. What shall I do, if I want my kernel and initrd to be compressed in a single FIT image? What kernel boot params and config options should be set then? --  Yours sincerely, Seraphim Dolbilov

Re: [PATCH 5/5] ARM: rpi: Add mini UART debug_ll support

2019-03-07 Thread Sascha Hauer
On Thu, Mar 07, 2019 at 10:52:33AM +0100, Tomaž Šolc wrote: > Hi > > On 6. 03. 19 10:42, Sascha Hauer wrote: > > diff --git a/common/Kconfig b/common/Kconfig > > index 563cf15fb1..0c6acfcddb 100644 > > --- a/common/Kconfig > > +++ b/common/Kconfig > > @@ -1173,6 +1173,12 @@ config DEBUG_RPI2_UART

Re: [PATCH 1/2] images: pbl: verify CONFIG_BAREBOX_MAX_IMAGE_SIZE is not exceeded

2019-03-07 Thread Ahmad Fatoum
On 3/7/19 8:32 AM, Sascha Hauer wrote: > On Mon, Mar 04, 2019 at 03:16:51PM +0100, Ahmad Fatoum wrote: >> Hello, >> >> On 19/2/19 13:10, Ahmad Fatoum wrote: >>> For platforms such as the at91, the boot ROM imposes an upper limit >>> on barebox file size. Prior to 5a1a5ed253 ("ARM: images: use

Re: [PATCH 0/5] ARM: rpi: refactor debug_ll

2019-03-07 Thread Tomaž Šolc
Hi I tried this series on R.Pi 3B (make rpi_defconfig + DEBUG_RPI3_MINI_UART) and Compute Module 3 (make rpi_defconfig + DEBUG_RPI2_UART) and after the two small fixes I mention in my other replies they both work as expected. Thanks! Best regards Tomaž On 6. 03. 19 10:42, Sascha Hauer

Re: [PATCH 4/5] ARM: rpi: move debug UART Kconfig settings

2019-03-07 Thread Tomaž Šolc
Hi On 6. 03. 19 10:42, Sascha Hauer wrote: In contrast to other architectures, R.Pi debug UART config was placed under the "System Type" menu, not under the "Debugging -> low-level debugging port". This made this setting easy to miss when enabling low level debug mesages. While at it use the

Re: [PATCH 5/5] ARM: rpi: Add mini UART debug_ll support

2019-03-07 Thread Tomaž Šolc
Hi On 6. 03. 19 10:42, Sascha Hauer wrote: diff --git a/common/Kconfig b/common/Kconfig index 563cf15fb1..0c6acfcddb 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -1173,6 +1173,12 @@ config DEBUG_RPI2_UART Say Y here if you want low-level debugging support on

[PATCH 21/26] usb: storage: Drop unnecessary check in usb_stor_blk_io()

2019-03-07 Thread Andrey Smirnov
Checking that sector_count is zero, shouldn't be necessary since block layer won't call this function if there's no data to be read. Drop it. Checking that blockbits is eqal to SECTOR_SHIFT isn't necessary, since that field is filled by the driver and is not changed outsied of it. We know it is

[PATCH 10/26] usb: storage: Share code for READ(10) and WRITE(10)

2019-03-07 Thread Andrey Smirnov
Both usb_stor_read_10() and usb_stor_write_10() do almost exactly the same thing, so merge them into a signle routine and adjust all of the users accordingly. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 60 ++- 1 file changed, 9

[PATCH 26/26] usb: storage: Inline usb_limit_blk_cnt()

2019-03-07 Thread Andrey Smirnov
Usb_limit_blk_cnt() has only one user so we may as well inline it. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 335f8033b..fda24d616

[PATCH 19/26] usb: storage: Use put_unaligned_be* helpers

2019-03-07 Thread Andrey Smirnov
Replace explicit endianness casts with put_unaligned_be* helpers. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 5a5d075ec..06ec1eb4e

[PATCH 24/26] usb: storage: Simplify I/O loop in usb_stor_blk_io()

2019-03-07 Thread Andrey Smirnov
Simplify I/O loop a bit, by re-arranging things and dropping "sectors_done", "result" and "data" local variables. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/usb/storage/usb.c

[PATCH 22/26] usb: storage: Drop needless macro

2019-03-07 Thread Andrey Smirnov
There's only user of the to_usb_mass_storage() so we may as well inline it. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 29e3792aa..0ab20f1ac

[PATCH 12/26] usb: storage: Remove unused variables

2019-03-07 Thread Andrey Smirnov
Drop a number of variables no longer used in the code. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 64142048c..69de9ebf3 100644 --- a/drivers/usb/storage/usb.c

[PATCH 25/26] usb: storage: Drop unnecessary assignment

2019-03-07 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 7df8a52b6..335f8033b 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c @@ -285,9

[PATCH 15/26] ata: ahci: Do not include

2019-03-07 Thread Andrey Smirnov
No symbols found in are used in this file. Drop it. Signed-off-by: Andrey Smirnov --- drivers/ata/ahci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 3f0bbb075..7dc09d00c 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -27,7 +27,6

[PATCH 08/26] usb: storage: Make usb_stor_write_10() a standalone function

2019-03-07 Thread Andrey Smirnov
Move special preparation steps done before the call to usb_stor_write_10() inside the function itself for clarity and to allow futher code improvements. No functional change intended. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 43 +++ 1

[PATCH 20/26] usb: Drop usb_disable_asynch()

2019-03-07 Thread Andrey Smirnov
There are no users of usb_control_msg() in the codebase that pass timeout of 0, so it doesn't look like usb_disable_asynch() has any effect on USB operation. Drop that function and remove all of its uses to simplify things. Signed-off-by: Andrey Smirnov --- drivers/usb/core/usb.c| 24

[PATCH 23/26] usb: storage: Use simple boolean to speficy read vs. write operation

2019-03-07 Thread Andrey Smirnov
Use simple boolean to speficy read vs. write operation usb_stor_blk_io() instead of having a custom anonymous enum. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/usb/storage/usb.c

[PATCH 13/26] usb: storage: Drop struct SCSI_cmd_block

2019-03-07 Thread Andrey Smirnov
All the info we need to pass to transport function can be captured in a struct us_blk_dev and two byte arrays, so having a dedicated struct with many unused fields doesn't really buy us anything. Drop the struct and convert the rest of the code to pass needed data explicitly. Signed-off-by:

[PATCH 17/26] usb: storage: Drop unused us_blkdev_list

2019-03-07 Thread Andrey Smirnov
There are no users of us_blkdev_list in the file. Drop it. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index c04a202bb..faf9ec2b4 100644 --- a/drivers/usb/storage/usb.c

[PATCH 18/26] usb: storage: Introduce usb_stor_transport()

2019-03-07 Thread Andrey Smirnov
Move retry logic found in all of the low-level usb_stor_* functions into a standalone subroutine and convert the rest of the code to use it. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 213 +- 1 file changed, 117 insertions(+), 96

[PATCH 16/26] usb: storage: Drop unused fields in struct us_data

2019-03-07 Thread Andrey Smirnov
Only bulk-only transport is supported by the currennt codebase, so ep_bInterval and recv_intr_ep are not really used. Remove them and all related code. While at it remove flags and subclass as well since they are not really used anywhere in the codebase. Signed-off-by: Andrey Smirnov ---

[PATCH 14/26] usb: hub: Do not include

2019-03-07 Thread Andrey Smirnov
No symbols found in are used in this file. Drop it. Signed-off-by: Andrey Smirnov --- drivers/usb/core/hub.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 39e5fe67d..d01a01607 100644 --- a/drivers/usb/core/hub.c +++

[PATCH 11/26] usb: storage: Make usb_stor_request_sense() a standalone function

2019-03-07 Thread Andrey Smirnov
Don't try to re-use caller's "ccb" and instead convert usb_stor_request_sense() to use its own for clarity and to allow futher code improvements. No functional change intended. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 33 ++--- 1 file changed, 18

[PATCH 05/26] usb: storage: Make usb_stor_inquiry() a standalone function

2019-03-07 Thread Andrey Smirnov
Move special preparation steps done before and after call to usb_stor_inquiry() inside the function itself for clarity and to allow futher code improvements. No functional change intended. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 52 ++-

[PATCH 06/26] usb: storage: Make usb_stor_test_unit_ready() a standalone function

2019-03-07 Thread Andrey Smirnov
Move special preparation steps done before the call to usb_stor_test_unit_ready() inside the function itself for clarity and to allow futher code improvements. No functional change intended. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 28 1 file

[PATCH 07/26] usb: storage: Make usb_stor_read_10() a standalone function

2019-03-07 Thread Andrey Smirnov
Move special preparation steps done before the call to usb_stor_read_10() inside the function itself for clarity and to allow futher code improvements. No functional change intended. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 41 --- 1 file

[PATCH 09/26] usb: storage: Drop extra call to transport in usb_stor_write_10()

2019-03-07 Thread Andrey Smirnov
There doesn't seem to be a particularly good reason to call ->trasport() one last time after 2 failures. Drop the call so allow sharing this code with usb_stor_read_10() in the following commit. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 04/26] usb: storage: Make usb_stor_read_capacity() a standalone function

2019-03-07 Thread Andrey Smirnov
Move special preparation steps done before and after call to usb_stor_read_capacity() inside the function itself for clarity and to allow futher code improvements. No functional change intended. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 53

[PATCH 03/26] usb: storage: Don't use "unsigned long" for 32-bit values

2019-03-07 Thread Andrey Smirnov
Unsignled long will expand to 64-bit unsigned integer on 64-bit CPUs. This will break current code using it to read out two 32-bit values returned by READ_CAPACITY. Fix the proble by using "u32" explicitly. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 6 +++--- 1 file changed,

[PATCH 00/26] USB storage improvements

2019-03-07 Thread Andrey Smirnov
Everyone: While creating fix found in "usb: storage: Don't use "unsigned long" for 32-bit values" I spent some time reading code of our USB storage implementation. The other 25 patches is the result of that effort and my attempt to improve/simplify that codebase. Hopefuly each patch is

[PATCH 02/26] usb: storage: Replace custom debug tracing with dev_dbg

2019-03-07 Thread Andrey Smirnov
Replace custom debug tracing macros with a call to dev_dbg to simplify code and add device info into degug output. Signed-off-by: Andrey Smirnov --- drivers/usb/storage/transport.c | 59 drivers/usb/storage/usb.c | 118 +---

[PATCH 01/26] usb: storage: Simplify memory allocation in usb_stor_probe()

2019-03-07 Thread Andrey Smirnov
Replace explicit malloc() + OOM check and memset() with a single call to xzalloc(). Signed-off-by: Andrey Smirnov --- drivers/usb/storage/usb.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index