[PATCH] clk: imx: vf610: correct __iomem 'qualifier' placement

2019-05-23 Thread Ahmad Fatoum
__iomem applies to the IOMEM() pointee, not to the auto pointer that points at it. Move the annotation to correct this. Signed-off-by: Ahmad Fatoum --- drivers/clk/imx/clk-vf610.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-vf610.c

Re: [PATCH v3 0/9] ARM: at91: misc fixes and cleanup

2019-05-23 Thread Sam Ravnborg
Hi Ahmad. On Thu, May 23, 2019 at 05:39:34PM +0200, Ahmad Fatoum wrote: > The fixes are the same as in v2. The cleanup was made cleaner > a bit. > > Changes since v2: > - Collected Sam's Tested-by and Reviewed-by > - Reinstated *_get_ddram_size helpers, but without #ifdefs, > as

Re: [PATCH v2 1/2] clk: at91: fix compilation errors in sama5d2.c

2019-05-23 Thread Sam Ravnborg
Hi Ahmad. On Thu, May 23, 2019 at 04:29:32PM +0200, Ahmad Fatoum wrote: > sama5d2.c was added alongside the update to the remaining clk drivers > to support the new upstream device tree bindings, but wasn't wired in > anywhere. > > To prepare for usage in future sama5d2 support, fix compilation

Re: [PATCH v2 2/2] clk: at91: delete dead i2s/audio code

2019-05-23 Thread Sam Ravnborg
Hi again. On Thu, May 23, 2019 at 04:29:33PM +0200, Ahmad Fatoum wrote: > They aren't used anywhere, thus drop them. Thanks again. > > Suggested-by: Sam Ravnborg > Signed-off-by: Ahmad Fatoum Reviewed-by: Sam Ravnborg ___ barebox mailing list

Re: [PATCH 4/4] of: partition: add no-fixup device tree property

2019-05-23 Thread Ahmad Fatoum
Hello Sascha, On 14/12/18 16:31, Ahmad Fatoum wrote: > You can still merge the first two patches in this patchset however, they > are applicable regardless. I think the first two patches slipped through the cracks. Should I resend the series without 3/4 and 4/4? Cheers > > > Cheers > Ahmad

[PATCH v3 0/9] ARM: at91: misc fixes and cleanup

2019-05-23 Thread Ahmad Fatoum
The fixes are the same as in v2. The cleanup was made cleaner a bit. Changes since v2: - Collected Sam's Tested-by and Reviewed-by - Reinstated *_get_ddram_size helpers, but without #ifdefs, as suggested by Sascha - While doing that, some more unnecessary #ifdef usage unraveled, so

[PATCH v3 1/9] ARM: at91: replace __raw_{readl, writel} of peripherals with readl, writel

2019-05-23 Thread Ahmad Fatoum
Use the potentially endianness-changing readl, writel and siblings directly. They looks prettier and are the correct thing to do, as even if the CPU is in big-endian mode, the peripherals are little-endian. Unlike Linux, barebox readl,writel are the same Linux' {readl,writel}_relaxed (they don't

[PATCH v3 7/9] ARM: at91: fix at91sama5_get_ddram_size for sama5d4

2019-05-23 Thread Ahmad Fatoum
at91sama5_get_ddram_size() is despite the name specific to the sama5d3 which it was added alongside of. sama5d4 board code continues to use it, but accessing SAMA5D3_BASE_MPDDRC (0xea00) on a sama5d4 should result in a Data Abort (Datasheet Figure 5-1).. Fix this by giving

[PATCH v3 3/9] ARM: at91: remove references to non-existing CONFIG_ARCH_AT91*

2019-05-23 Thread Ahmad Fatoum
These symbols aren't set anywhere in barebox and in some cases they guard non-existing headers. Remove them. Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at91/include/mach/at91_dbgu.h | 2 -- arch/arm/mach-at91/include/mach/hardware.h | 6 -- 2 files changed, 8 deletions(-) diff --git

[PATCH v3 6/9] arm: sama5d4: fix stack setup

2019-05-23 Thread Ahmad Fatoum
From: Sam Ravnborg The code that configure the stack uses sama5d3 constants. Fix this to use the proper sama5d4 constants. Boot tested on sama5d4_xplained. Signed-off-by: Sam Ravnborg --- arch/arm/boards/sama5d4_xplained/lowlevel.c | 2 +- arch/arm/boards/sama5d4ek/lowlevel.c| 2 +-

[PATCH v3 5/9] ARM: at91: remove #ifdefery around *_get_ddram_size helpers

2019-05-23 Thread Ahmad Fatoum
c16bcbc644 ("ARM: at91: remove unused defines") removed the conflicting defintions from these headers, so it's ok to include them at the same time now. Do this and remove the noise. Suggested-by: Sascha Hauer Signed-off-by: Ahmad Fatoum --- .../mach-at91/include/mach/at91sam9_ddrsdr.h | 33

[PATCH v3 4/9] ARM: at91: remove no-longer needed subarch #ifdefery

2019-05-23 Thread Ahmad Fatoum
c16bcbc644 ("ARM: at91: remove unused defines") removed conflicting definitions from the headers, so they can now be included all at the same time. Do this. Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at91/include/mach/hardware.h | 12 1 file changed, 12 deletions(-) diff --git

[PATCH v3 2/9] ARM: at91: debug_ll: make UART base address configurable

2019-05-23 Thread Ahmad Fatoum
This is in line with other platforms such as i.MX, which allow specifying a debug port. As we can't use port indices because the UARTs aren't mapped consecutively, allow specifying a hex base at configuration time. A side effect of this patch is that sama5d4's HAVE_AT91_DBGU2 is now honored as

[PATCH v3 8/9] ARM: at91: remove duplicate get_ddram_size code

2019-05-23 Thread Ahmad Fatoum
Both at91_get_ddram_size and at91sama5_get_ddram_size are the same if is_sdram == false and is_nb == true. is_sdram is always false, because according to the sama5d{2,3,4} datasheets, the lowest possible value for AT91_DDRSDRC_MD is 3 (i.e. none of them supports SDR SDRAM). Therefore replace

[PATCH v3 9/9] clk: at91: fix warning about missing const-safety

2019-05-23 Thread Ahmad Fatoum
compiling clk-main.c and clk-generated.c results in: warning: passing argument 1 of 'memcpy' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] memcpy(clkmain->clk.parent_names, parent_names, parents_array_size); ^ Avoid this by

[PATCH v2 2/2] clk: at91: delete dead i2s/audio code

2019-05-23 Thread Ahmad Fatoum
They aren't used anywhere, thus drop them. Suggested-by: Sam Ravnborg Signed-off-by: Ahmad Fatoum --- drivers/clk/at91/dt-compat.c | 110 --- drivers/clk/at91/pmc.c | 2 - 2 files changed, 112 deletions(-) diff --git a/drivers/clk/at91/dt-compat.c

[PATCH v2 1/2] clk: at91: fix compilation errors in sama5d2.c

2019-05-23 Thread Ahmad Fatoum
sama5d2.c was added alongside the update to the remaining clk drivers to support the new upstream device tree bindings, but wasn't wired in anywhere. To prepare for usage in future sama5d2 support, fix compilation errors related to absence of locks and unavailability of audio/i2s clock/pll

Re: [PATCH] clk: at91: fix compilation errors in sama5d2.c

2019-05-23 Thread Ahmad Fatoum
Hello Sam, On 2/4/19 19:10, Sam Ravnborg wrote: > Hi Ahmad. > > Thanks for looking into this. > > On Mon, Apr 01, 2019 at 12:32:57PM +0200, Ahmad Fatoum wrote: >> sama5d2 was added along with the update to the upstream >> device tree bindings, but wasn't wired in anywhere. >> >> To prepare for

[PATCH] commands: mw: Use kstrto*() instead of simple_strtoul()

2019-05-23 Thread Sascha Hauer
Now that we have the kstrto*() functions we can use them to detect various errors in passing numbers on the command line. Start with the 'mw' command and make it more robust against illegal numbers. Signed-off-by: Sascha Hauer --- commands/mw.c | 24 1 file changed, 20

Re: [PATCH v2 5/5] clk: imx6: define an enum for ldb mux inputs

2019-05-23 Thread Ahmad Fatoum
On 23/5/19 12:03, Philipp Zabel wrote: > On Tue, 2019-05-21 at 17:56 +0200, Ahmad Fatoum wrote: >> For better readability should this code be reviewed >> in future, replace the hardcoded input numbers >> with an enum. >> >> This is just a cosmetic change and was verified >> to not affect

Re: [PATCH v2 1/5] clk: imx6: remove quirky clk_set_parent(LDB_diN_sel, pll5_video_div)

2019-05-23 Thread Ahmad Fatoum
On 23/5/19 12:01, Philipp Zabel wrote: > On Tue, 2019-05-21 at 17:56 +0200, Ahmad Fatoum wrote: >> barebox has inherited the clk_set_parent(ldb_diN_sel, pll5_video_div) >> from upstream kernel commit 32f3b8da22 ("ARM i.MX6q: set the LDB serial >> clock parent to the video PLL"), where it was

[PATCH] lib: select BASE64 if BLOBGEN is selected

2019-05-23 Thread Rouven Czerwinski
Blobgen requires the BASE64 libraries, select them to provide them if BLOBGEN is selected. Signed-off-by: Rouven Czerwinski --- lib/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Kconfig b/lib/Kconfig index 7cf6975bcc..af178217f8 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@

Re: [PATCH v2 5/5] clk: imx6: define an enum for ldb mux inputs

2019-05-23 Thread Philipp Zabel
On Tue, 2019-05-21 at 17:56 +0200, Ahmad Fatoum wrote: > For better readability should this code be reviewed > in future, replace the hardcoded input numbers > with an enum. > > This is just a cosmetic change and was verified > to not affect clk-imx6.o. > > Signed-off-by: Ahmad Fatoum Is this

Re: [PATCH v2 4/5] clk: imx6: Fix procedure to switch the parent of LDB_DI_CLK

2019-05-23 Thread Philipp Zabel
On Tue, 2019-05-21 at 17:56 +0200, Ahmad Fatoum wrote: > From: Fabio Estevam > > Due to incorrect placement of the clock gate cell in the ldb_di[x]_clk > tree, the glitchy parent mux of ldb_di[x]_clk can cause a glitch to > enter the ldb_di_ipu_div divider. If the divider gets locked up, no >

Re: [PATCH v2 2/5] clk: imx6: Make the LDB_DI0 and LDB_DI1 clocks read-only

2019-05-23 Thread Philipp Zabel
On Tue, 2019-05-21 at 17:56 +0200, Ahmad Fatoum wrote: > From: Philipp Zabel > > Due to incorrect placement of the clock gate cell in the ldb_di[x]_clk > tree, the glitchy parent mux of ldb_di[x]_clk can cause a glitch to > enter the ldb_di_ipu_div divider. If the divider gets locked up, no >

Re: [PATCH v2 3/5] clk: imx6: Mask mmdc_ch1 handshake for periph2_sel and mmdc_ch1_axi_podf

2019-05-23 Thread Philipp Zabel
On Tue, 2019-05-21 at 17:56 +0200, Ahmad Fatoum wrote: > From: Philipp Zabel > > MMDC CH1 is not used on i.MX6Q, so the handshake needed to change the > parent of periph2_sel or the divider of mmdc_ch1_axi_podf will never > succeed. > Disable the handshake mechanism to allow changing the

Re: [PATCH v2 1/5] clk: imx6: remove quirky clk_set_parent(LDB_diN_sel, pll5_video_div)

2019-05-23 Thread Philipp Zabel
On Tue, 2019-05-21 at 17:56 +0200, Ahmad Fatoum wrote: > barebox has inherited the clk_set_parent(ldb_diN_sel, pll5_video_div) > from upstream kernel commit 32f3b8da22 ("ARM i.MX6q: set the LDB serial > clock parent to the video PLL"), where it was enabled for all i.MX6Q > revisions after 1.0. It

Re: [PATCH v3] ARM: Initial OP-TEE support

2019-05-23 Thread Sascha Hauer
On Wed, May 22, 2019 at 10:05:17AM +0200, Rouven Czerwinski wrote: > From: Sascha Hauer > > This adds initial support for OP-TEE, see https://www.op-tee.org/ > > barebox starts in secure mode as usual. When booting a kernel > the bootm code also loads the optee_os binary. Instead of jumping >

Re: [PATCH v2] common: state: check length

2019-05-23 Thread Sascha Hauer
On Thu, May 23, 2019 at 09:49:00AM +0200, Jan Remmet wrote: > if written_length is read from a partial written bucket it may be to > big and xmalloc will panic barebox. > > Check if the value is sane. Make read_len unsigned to avoid negative > values. > > Signed-off-by: Jan Remmet > --- > v2:

Re: [PATCH] images: remove forgotten occurences of *.imx-sram-img

2019-05-23 Thread Sascha Hauer
On Wed, May 22, 2019 at 07:17:28PM +0200, Ulrich Ölmann wrote: > Starting with commit 5a1a5ed2537d ("ARM: images: use piggydata") this file > type > is not known anymore, so clean up. > > Signed-off-by: Ulrich Ölmann > --- > images/.gitignore | 1 - > images/Makefile | 2 +- > 2 files

Re: [PATCH] Documentation: imx8mq-evk: collapse BMOD switch superposition

2019-05-23 Thread Sascha Hauer
On Wed, May 22, 2019 at 03:58:16PM +0200, Ahmad Fatoum wrote: > Table 3. Boot mode setting in the user's guide[1] lists > 0010 as 'Boot from EMMC'. Adjust diagram accordingly. > > [1]: https://www.mouser.com/ds/2/302/IMX8MDQLQEVKHUG-1280333.pdf > > Signed-off-by: Ahmad Fatoum > --- >

Re: [PATCH 00/18] EHCI improvements

2019-05-23 Thread Sascha Hauer
On Wed, May 22, 2019 at 12:33:56AM -0700, Andrey Smirnov wrote: > Everyone: > > This series is a number of improvements (or so I though) I made while > woring with USB on i.MX6. All of the patches are optional, so if some > of the changes don't seem like an improvmement they can be dropped. > >

[PATCH v2] common: state: check length

2019-05-23 Thread Jan Remmet
if written_length is read from a partial written bucket it may be to big and xmalloc will panic barebox. Check if the value is sane. Make read_len unsigned to avoid negative values. Signed-off-by: Jan Remmet --- v2: replace compare < 0 by making read_len unsigned

Re: [PATCH 1/3] usb: storage: Zero CDB out before sending it

2019-05-23 Thread Sascha Hauer
On Wed, May 22, 2019 at 12:33:47AM -0700, Andrey Smirnov wrote: > Since cbw.Length can be less that sizeof(cbw.CDB), add code to zero > the whole struct out to avoid sending random stack data as a part of > payload. There's no known case where this causes a problem, but it's a > reasonable thing

Re: [PATCH] ARM: zii-vf610-dev: disable eth1

2019-05-23 Thread Sascha Hauer
On Mon, May 20, 2019 at 08:43:45PM -0400, Vivien Didelot wrote: > The current support for the ZII Dev Boards time out on eth1 when > booting from net, which takes a while: > > Booting entry 'net' > eth0: 100Mbps full duplex link detected > T T T eth0: DHCP client bound to address

Re: [PATCH] common: state: check length

2019-05-23 Thread Sascha Hauer
On Tue, May 21, 2019 at 04:44:13PM +0200, Jan Remmet wrote: > if written_length is read from a partial written bucket it may be to > big and xmalloc will panic barebox. > > Check if the value is sane. > > Signed-off-by: Jan Remmet > --- > common/state/backend_bucket_direct.c | 4 > 1 file