Re: [PATCH 0/2] scripts/dtc: Update to upstream version v1.4.7

2019-02-19 Thread Sascha Hauer
On Tue, Feb 19, 2019 at 12:36:58PM +0100, Ahmad Fatoum wrote: > To play around with the new /omit-if-no-ref/ feature, I've enabled > update-dtc-source.sh for barebox and used it to update dtc to v1.4.7. > > The second patch also reinstates the dtc-lexer.l and dtc-parser.y > files which were

Re: [PATCH 2/4] ARM: at91: debug_ll: make UART base address configurable

2019-02-19 Thread Sascha Hauer
On Tue, Feb 19, 2019 at 10:10:02PM +0100, Ahmad Fatoum wrote: > Hello Sam, > > On 19/2/19 21:42, Sam Ravnborg wrote: > > Hi Ahmad. > > > > On Tue, Feb 19, 2019 at 01:06:10PM +0100, Ahmad Fatoum wrote: > >> This is in line with other platforms such as i.MX, which allow > >> specifying a debug

Re: [PATCH v2 2/2] scripts/checkpatch.pl: rebase on top of upstream v5.0-rc6

2019-02-19 Thread Sascha Hauer
On Wed, Feb 20, 2019 at 10:14:12AM +0300, Antony Pavlov wrote: > On Tue, 19 Feb 2019 15:16:47 +0100 > Ahmad Fatoum wrote: > > > This brings many upstream goodies, among them checking for > > SPDX-License-Identifier entries for newly added source files. > > > > For future reference, following

[PATCH 21/25] clk: Import a subset of clk_bulk API from Linux

2019-02-19 Thread Andrey Smirnov
Import a subset of clk_bulk API from Linux to support porting kernel code that uses it. Signed-off-by: Andrey Smirnov --- drivers/clk/Makefile | 3 +- drivers/clk/clk-bulk.c | 102 + include/linux/clk.h| 98 +++

[PATCH 23/25] lib: Port basic Linux kernel NLS functions

2019-02-19 Thread Andrey Smirnov
Port basic Linux kernel NLS functions: utf8_to_utf32() and utf8s_to_utf16s() in order to support porting kernel code that uses them. Signed-off-by: Andrey Smirnov --- include/linux/nls.h | 40 ++ lib/Kconfig | 3 + lib/Makefile| 1 + lib/nls_base.c | 131

[PATCH 22/25] usb: Import DWC3 USB controller driver from Linux

2019-02-19 Thread Andrey Smirnov
Import DWC3 USB controller driver from Linux. This is a bare minimum port of the code needed to support USB host functionality on i.MX8MQ. No other use-case is explicitly supported. Signed-off-by: Andrey Smirnov --- drivers/usb/Kconfig |2 + drivers/usb/Makefile |1 +

[PATCH 25/25] usb: usb251xb: add usb data lane port swap feature

2019-02-19 Thread Andrey Smirnov
Port of Linux patch https://patchwork.kernel.org/patch/10766235/ The HW can swap the USB differential-pair (D+/D-) for each port separately. So the USB signals can be re-aligned with a misplaced USB connector on the PCB. Signed-off-by: Marco Felsch Reviewed-by: Richard Leitner

[PATCH 18/25] phy: Port i.MX8MQ USB PHY driver from Linux

2019-02-19 Thread Andrey Smirnov
Port i.MX8MQ USB PHY driver from Linux. Signed-off-by: Andrey Smirnov --- drivers/phy/Kconfig| 2 + drivers/phy/Makefile | 1 + drivers/phy/freescale/Kconfig | 4 + drivers/phy/freescale/Makefile | 1 +

[PATCH 24/25] usb: Port Microchip USB251x USB hub driver from Linux

2019-02-19 Thread Andrey Smirnov
Port Microchip USB251x USB hub driver from Linux. Needed by ZII's i.MX8MQ boards. Signed-off-by: Andrey Smirnov --- drivers/usb/Kconfig | 2 + drivers/usb/Makefile| 1 + drivers/usb/misc/Kconfig| 14 + drivers/usb/misc/Makefile | 6 + drivers/usb/misc/usb251xb.c |

[PATCH 20/25] include/usb: Import USB_SPEED_SUPER_PLUS from Linux

2019-02-19 Thread Andrey Smirnov
Import USB_SPEED_SUPER_PLUS constant from Linux to support porting kernel code that uses it. Signed-off-by: Andrey Smirnov --- include/usb/ch9.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/usb/ch9.h b/include/usb/ch9.h index b44d41e85..89d83e0d0 100644 --- a/include/usb/ch9.h

[PATCH 17/25] phy: core: Assume EPROBE_DEFER in of_phy_provider_lookup()

2019-02-19 Thread Andrey Smirnov
In order to support PHY driver probe deferral change the code to assume EPROBE_DEFER instead of ENODEV when requested PHY is missing from phy_provider_list. Signed-off-by: Andrey Smirnov --- drivers/phy/phy-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 19/25] clk: Drop separate definitions of clk_put()

2019-02-19 Thread Andrey Smirnov
Regardless of the value of CONFIG_HAVE_CLK, clk_put() implementation is always a no-op. Move the definition to linux/clk.h and drop the rest of the code implementing it. Signed-off-by: Andrey Smirnov --- drivers/clk/clkdev.c | 5 - include/linux/clk.h | 21 - 2 files

[PATCH 16/25] usb: xhci-hcd: Make use of lo_hi_readq/writeq()

2019-02-19 Thread Andrey Smirnov
Make use of lo_hi_readq/writeq() to implement xhci_read/write_64() helpers, same as it is done in the Linux kernel. Signed-off-by: Andrey Smirnov --- drivers/usb/host/xhci.h | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/usb/host/xhci.h

[PATCH 11/25] usb: xhci-hcd: Simplify TRB initialization code

2019-02-19 Thread Andrey Smirnov
Current TRB initialization code in xHCI driver is: a) Somewhat inconsistent in endianness correctness: LE is insured in some places whereas in some places it isn't b) Somewhat inconsistent in how DMA buffer address is being written: some places utilize xhci_write_64,

[PATCH 00/25] i.MX8MQ USB support

2019-02-19 Thread Andrey Smirnov
Everyone: This series contains changes I made while working on adding USB support for ZII i.MX8MQ boards. There are several distinct parts in this series: 1. xHCI fixes, features and improvements 2. PHY driver deferral support 3. i.MX8MQ USB PHY driver 4. DWC3 USB support and related patches

[PATCH 04/25] usb: xhci-hcd: Make sure to initialize xhci->rings_list

2019-02-19 Thread Andrey Smirnov
Make sure to initialize xhci->rings_list, otherwise any use of the driver will result in a crash. Signed-off-by: Andrey Smirnov --- drivers/usb/host/xhci-hcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c index

[PATCH 14/25] usb: xhci-hcd: Initialize TRT flag for xHCI >= 1.0

2019-02-19 Thread Andrey Smirnov
Initialize TRT flag for xHCI >= 1.0, not just == 1.0. This is what Linux xHCI driver does. Signed-off-by: Andrey Smirnov --- drivers/usb/host/xhci-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c index

[PATCH 12/25] usb: xhci-hcd: Drop 'dma' field from struct xhci_hcd

2019-02-19 Thread Andrey Smirnov
Drop 'dma' field from struct xhci_hcd since it is not really used anywhere. Signed-off-by: Andrey Smirnov --- drivers/usb/host/xhci-hcd.c | 2 +- drivers/usb/host/xhci.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci-hcd.c

[PATCH 15/25] usb: xhci-hcd: Simplify route string building loop

2019-02-19 Thread Andrey Smirnov
Simplify route string building loop by avoiding checking top_dev->parent->descriptor->bDeviceClass twice. Signed-off-by: Andrey Smirnov --- drivers/usb/host/xhci-hcd.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-hcd.c

[PATCH 10/25] usb: xhci-hcd: Convert xhci_submit_control() to use dma_map_single()

2019-02-19 Thread Andrey Smirnov
Convert xhci_submit_control() to use dma_(un)map_single(). These functions both allow us to handle potential physical/virtual address differences as well as allowing to drop a number of typecasts. Signed-off-by: Andrey Smirnov --- drivers/usb/host/xhci-hcd.c | 17 ++--- 1 file

[PATCH 08/25] usb: xhci-hcd: Always wait for "Response Data" completion

2019-02-19 Thread Andrey Smirnov
Xhci_submit_control() submits TRB_DATA with TRB_IOC flag regardless of the vlaue of req->requesttype, so we shouldn't gate waiting for the event that will result from it with "req->requesttype & USB_DIR_IN". Failing to do this will result in unstable USB performance and will eventually cause the

[PATCH 13/25] usb: xhci-hcd: Check usb_pipein(pipe) only once in xhci_submit_normal()

2019-02-19 Thread Andrey Smirnov
Simplfy xhci_submit_normal()'s logic a bit by using helper variables and making sure that usb_pipein(pipe) is only called once. Signed-off-by: Andrey Smirnov --- drivers/usb/host/xhci-hcd.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git

[PATCH 07/25] usb: xhci-hcd: Don't try to DMA sync if buffer is NULL

2019-02-19 Thread Andrey Smirnov
Driver's .submit_control() callback can and will be called with buffer set to NULL (and length set to 0), so we need to make sure that we don't try to DMA sync the buffer in that case. Add appropriate gurads to make sure that doesn't happen. Signed-off-by: Andrey Smirnov ---

[PATCH 06/25] usb: xhci-hcd: Add support for 64-byte context size

2019-02-19 Thread Andrey Smirnov
xHCI spec allows for various context to be either 32 or 64 bytes in size, so we can't rely on struct definitions to correctly reflect data layout. Port varios context accessors from Linux kernel and convert the rest of the code to use them in order to be able to support both context sizes.

[PATCH 05/25] usb: xhci-hcd: Drop pointless bitwise or

2019-02-19 Thread Andrey Smirnov
On_hs_hub is a boolean, not a bitfiled, so usage of bitwise or is unnecessary. Replace it with a regular assignement operator. Signed-off-by: Andrey Smirnov --- drivers/usb/host/xhci-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-hcd.c

[PATCH 09/25] usb: xhci-hcd: Convert xhci_submit_normal() to use dma_map_single()

2019-02-19 Thread Andrey Smirnov
Convert xhci_submit_normal() to use dma_(un)map_single(). These functions both allow us to handle potential physical/virtual address differences as well as allowing to drop a number of typecasts. Signed-off-by: Andrey Smirnov --- drivers/usb/host/xhci-hcd.c | 17 ++--- 1 file

[PATCH 03/25] usb: xhci-hcd: Cast ~XHCI_IRQS to u32

2019-02-19 Thread Andrey Smirnov
Cast ~XHCI_IRQS to u32 to avoid getting a warning on 64-bit builds. Signed-off-by: Andrey Smirnov --- drivers/usb/host/xhci-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c index 7106a5637..a01f9fe38 100644 ---

[PATCH 01/25] usb: xhci-hcd: Tabify the file

2019-02-19 Thread Andrey Smirnov
Replace occasional all-whiltespace indentation with tabs for consistency. Signed-off-by: Andrey Smirnov --- drivers/usb/host/xhci-hcd.c | 136 ++-- 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/drivers/usb/host/xhci-hcd.c

[PATCH 02/25] usb: xhci-hcd: Do not zero out DMA coherent memory

2019-02-19 Thread Andrey Smirnov
Memory returned by dma_alloc_coherent() should already be zeroed out, so there's no need to do this explicitly. Signed-off-by: Andrey Smirnov --- drivers/usb/host/xhci-hcd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c index

Re: [PATCH v2 2/2] scripts/checkpatch.pl: rebase on top of upstream v5.0-rc6

2019-02-19 Thread Antony Pavlov
On Tue, 19 Feb 2019 15:16:47 +0100 Ahmad Fatoum wrote: > This brings many upstream goodies, among them checking for > SPDX-License-Identifier entries for newly added source files. > > For future reference, following barebox changes were applied > on top of the version copied from upstream: > >

Re: [PATCH 2/4] ARM: at91: debug_ll: make UART base address configurable

2019-02-19 Thread Sam Ravnborg
Hi Ahmad. > I think it should remain build-time configurable, to account for cases > such as when the designated debug port isn't usable for whatever reason > (e.g. its exposed via a USB-to-UART bridge and you want to use a proper > UART, because you hate that the disconnection on power cycle..).

Re: [PATCH 2/4] ARM: at91: debug_ll: make UART base address configurable

2019-02-19 Thread Ahmad Fatoum
Hello, On 19/2/19 22:10, Ahmad Fatoum wrote: > Hello Sam, > > On 19/2/19 21:42, Sam Ravnborg wrote: >> Hi Ahmad. >> >> On Tue, Feb 19, 2019 at 01:06:10PM +0100, Ahmad Fatoum wrote: >>> This is in line with other platforms such as i.MX, which allow >>> specifying a debug port. As we can't use

Re: [PATCH 2/4] ARM: at91: debug_ll: make UART base address configurable

2019-02-19 Thread Ahmad Fatoum
Hello Sam, On 19/2/19 21:42, Sam Ravnborg wrote: > Hi Ahmad. > > On Tue, Feb 19, 2019 at 01:06:10PM +0100, Ahmad Fatoum wrote: >> 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

Re: [PATCH 2/4] ARM: at91: debug_ll: make UART base address configurable

2019-02-19 Thread Sam Ravnborg
Hi Ahmad. On Tue, Feb 19, 2019 at 01:06:10PM +0100, Ahmad Fatoum wrote: > 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. >

[PATCH v2 13/16] ARM: dts: microchip-ksz9477-evb: add dummy first stage device tree

2019-02-19 Thread Ahmad Fatoum
The existing device tree is too big for the 64K byte constrained first stage. Because of the size limitation it might be better to only use the device tree for the second stage. This increases user-friendliness by leaving space for PBL_CONSOLE. For now provide a slightly smaller smaller

[PATCH v2 15/16] ARM: at91: microchip-ksz9477: provide board code fallback

2019-02-19 Thread Ahmad Fatoum
The newly added device tree based first stage fails to load the second stage from MMC, which might be in relation to a preceding atmel_mci "command/data timeout" message. Due to this and because it's not clear yet how viable it's to use the device tree for the size-constrained first stage anyway,

[PATCH v2 08/16] ARM: at91: import low level DDRAMC initialization code from at91bootstrap

2019-02-19 Thread Ahmad Fatoum
This commit imports DDRAMC initialization routines for use in PBL from https://github.com/linux4sam/at91bootstrap/blob/v3.8.12/driver/ddramc.c Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at91/Makefile | 1 + arch/arm/mach-at91/ddramc.c | 518 +++

[PATCH v2 16/16] doc: microchip-ksz9477-evb: add documentation

2019-02-19 Thread Ahmad Fatoum
Signed-off-by: Ahmad Fatoum --- .../boards/at91/microchip-ksz9477-evb.rst | 38 ++- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/Documentation/boards/at91/microchip-ksz9477-evb.rst b/Documentation/boards/at91/microchip-ksz9477-evb.rst index

[PATCH v2 14/16] ARM: at91: microchip-ksz9477-evb: implement first stage

2019-02-19 Thread Ahmad Fatoum
This imports the low level init code from at91bootstrap https://github.com/linux4sam/at91bootstrap/blob/v3.8.12/board/sama5d3_xplained/sama5d3_xplained.c Signed-off-by: Ahmad Fatoum --- .../boards/microchip-ksz9477-evb/lowlevel.c | 194 +- arch/arm/mach-at91/Kconfig

[PATCH v2 02/16] ARM: at91: import at91bootstrap's at91_ddrsdrc.h

2019-02-19 Thread Ahmad Fatoum
Instead of adding missing definitions to the existing at91sam9_ddrsdr.h and adapting the incoming DDRAM initialization code from at91bootstrap, just replace the lightly used existing header with this one. For easier comprehension, the replacement is done in three steps: Here the header is

[PATCH v2 12/16] ARM: at91: microchip-ksz9477-evb: use compressed DTB

2019-02-19 Thread Ahmad Fatoum
This saves about 25K, which could be useful to fit the incoming first stage board support into the SRAM's 64K. Signed-off-by: Ahmad Fatoum --- arch/arm/boards/microchip-ksz9477-evb/lowlevel.c | 4 ++-- arch/arm/mach-at91/Kconfig | 1 + 2 files changed, 3 insertions(+), 2

[PATCH v2 04/16] ARM: at91: replace at91sam9_ddrsdr.h with at91bootstrap's at91_ddrsdrc.h

2019-02-19 Thread Ahmad Fatoum
Instead of adding missing definitions to the existing at91sam9_ddrsdr.h and adapting the incoming DDRAM initialization code from at91bootstrap, just replace the lightly used existing header with this one. For easier comprehension, the replacement is done in three steps: This last step copies the

[PATCH v2 05/16] ARM: at91: watchdog: implement at91_wdt_disable

2019-02-19 Thread Ahmad Fatoum
Low level init code might want to disable the watchdog in PBL. Provide a helper to do so. Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at91/include/mach/at91_wdt.h | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/mach-at91/include/mach/at91_wdt.h

[PATCH v2 11/16] ARM: at91: sama5: specify 0x10000 as first stage max size

2019-02-19 Thread Ahmad Fatoum
The ROM code on the sama5d{2,3,4} imposes a 64K limit on the bootloader binary it loads to SRAM. Declare this in the mach-at91/Kconfig, so it will always be checked against. Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at91/Kconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH v2 06/16] ARM: at91: import lowlevel clock initialization from at91bootstrap

2019-02-19 Thread Ahmad Fatoum
For use by future at91 first stage bootloaders, this commit imports https://github.com/linux4sam/at91bootstrap/blob/v3.8.12/driver/pmc.c Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at91/Makefile | 1 + .../include/mach/at91_lowlevel_clock.h| 43 +

[PATCH v2 01/16] LICENSES: add BSD-1-Clause license

2019-02-19 Thread Ahmad Fatoum
Incoming sama5d3 bootstrap code has been ported from the at91bootstrap project and is licensed under a 1-clause BSD license. To remove boilerplate legal text there, place the license at a fixed location and only note SPDX-License-Identifier and Copyright in the source files. Signed-off-by: Ahmad

[PATCH v2 03/16] ARM: at91: migrate at91sam9_ddrsdr.h to use at91bootstrap's at91_ddrsdrc.h

2019-02-19 Thread Ahmad Fatoum
Instead of adding missing definitions to the existing at91sam9_ddrsdr.h and adapting the incoming DDRAM initialization code from at91bootstrap, just replace the lightly used existing header with this one. For easier comprehension, the replacement is done in three steps: Here the existing

[PATCH v2 10/16] images: at91: differentiate between first and second stage images

2019-02-19 Thread Ahmad Fatoum
Incoming microchip-ksz9477-evb first stage will add one more entry point for the first stage. As there is a little reason to use the same piggy data for both images (BOOT.BIN, the first stage, is limited to 64K), have CONFIG_AT91_LOAD_BAREBOX_SRAM decide which stage should be built.

[PATCH v2 09/16] ARM: at91: import lowlevel dbgu UART init code from at91bootstrap

2019-02-19 Thread Ahmad Fatoum
From: Ahmad Fatoum For use in PBL, import dbgu init code from: https://github.com/linux4sam/at91bootstrap/blob/v3.8.12/driver/at91_usart.c Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at91/include/mach/at91_dbgu.h | 57 - 1 file changed, 56 insertions(+), 1 deletion(-)

[PATCH v2 00/16] ARM: at91: microchip-kz9477-evb: support first stage boot

2019-02-19 Thread Ahmad Fatoum
v1 is at <20190116174559.17416-1-a.fat...@pengutronix.de>. I tried to strip down barebox, so the first stage can be device tree based as well. It boots up to trying to load the first stage from MMC, where it fails. As it's very annoying to debug when only having few bytes to spare, I am not sure

[PATCH v2 07/16] ARM: at91: import early_udelay from at91bootstrap

2019-02-19 Thread Ahmad Fatoum
For use by the incoming at91bootstrap DDRAMC initialization code, this commit provides an early_udelay function usable in PBL imported from https://github.com/linux4sam/at91bootstrap/blob/v3.8.12/driver/at91_pit.c Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at91/Makefile |

[PATCH] fixup! scripts/checkpatch.pl: rebase on top of upstream v5.0-rc6

2019-02-19 Thread Ahmad Fatoum
Import const_structs.checkpatch from Linux v5.0-rc6. Leaving the file empty leads to false positives. If false positives pop up with the Linux list, they could be adjusted. The fixed-up commit message needs to be adjusted as well: - - const_structs.checkpatch: added as empty file for now + -

Re: [PATCH] LICENSES: adopt Linux-like LICENSES directory structure

2019-02-19 Thread Ahmad Fatoum
Hello Sam On 18/2/19 13:12, Sam Ravnborg wrote: > > While on the LICENSE topic. > Could you update checkpatch to recognize SPDX entries too? > I've included a patch with an updated checkpatch.pl in the v2 I just sent out. Cheers Ahmad > > Sam > -- Pengutronix e.K.

[PATCH v2 1/2] LICENSES: adopt Linux-like LICENSES directory structure

2019-02-19 Thread Ahmad Fatoum
At the moment grep -r --exclude-dir=.git 'SPDX-License-Identifier:' | \ grep -v 'GPL-2.0' shows me 39 non-dually-licensed source code files (SoCFPGA) that have a BSD-3-Clause license _identifier_. There seems to be no barebox BSD-3-Clause license _text_ however, which runs afoul of the

[PATCH v2 0/2] LICENSES: adopt Linux-like LICENSES directory structure

2019-02-19 Thread Ahmad Fatoum
Changes since v1: - fixed grep pipeline in commit message - removed u-boot jumptable exception as suggested by Sascha - added follow-up commit with updated checkpatch.pl as suggested by Sam - added empty exceptions/ and other/ directories Ahmad Fatoum (2): LICENSES: adopt Linux-like LICENSES

Re: [PATCH v1 1/4] MIPS: relocation: pass ram size to pbl_main_entry

2019-02-19 Thread Oleksij Rempel
On 19.02.19 13:45, Antony Pavlov wrote: On Tue, 19 Feb 2019 09:34:43 +0100 Oleksij Rempel wrote: Hi Antony, your attention will be needed here.. Hi Oleksij! Sorry but this week I'm on vacation. Could you please push this patchseries to github? done:

[PATCH v3] ARM: dts: imx6*phytec*: switch to new partitioning scheme

2019-02-19 Thread Uwe Kleine-König
Both Linux and barebox support this new scheme and it's the actually the recommended one. Signed-off-by: Uwe Kleine-König --- Hello, On Tue, Feb 19, 2019 at 11:54:07AM +0100, Stefan Riedmüller wrote: > On 19.02.19 11:28, Uwe Kleine-König wrote: > > Both Linux and barebox support this new scheme

Re: [PATCH v1 1/4] MIPS: relocation: pass ram size to pbl_main_entry

2019-02-19 Thread Antony Pavlov
On Tue, 19 Feb 2019 09:34:43 +0100 Oleksij Rempel wrote: > Hi Antony, > > your attention will be needed here.. Hi Oleksij! Sorry but this week I'm on vacation. Could you please push this patchseries to github? -- Best regards,   Antony Pavlov > > On 18.02.19 08:51, Oleksij Rempel wrote:

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

2019-02-19 Thread Ahmad Fatoum
On 19/2/19 13:10, Ahmad Fatoum wrote: > 5a1a5ed253 ("ARM: images: use piggydata") Should've added a Fixes: 5a1a5ed253 ("ARM: images: use piggydata") as well. -- Pengutronix e.K. | | Industrial Linux Solutions |

[PATCH 2/2] images: allow overriding BAREBOX_MAX_IMAGE_SIZE from arch Kconfig

2019-02-19 Thread Ahmad Fatoum
The size restriction imposed by the ROM code of the target SoC is the upper limit on how big a barebox binary should get. Thus allow the architecture Kconfig to define an optional (possibly subarch-specific ARCH_BAREBOX_MAX_IMAGE_SIZE), as a ceiling for the resulting barebox binary size. As we

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

2019-02-19 Thread Ahmad Fatoum
For platforms such as the at91, the boot ROM imposes an upper limit on barebox file size. Prior to 5a1a5ed253 ("ARM: images: use piggydata"), BAREBOX_MAX_PBLX_SIZE seems to have been the way to go for limiting the size of the final barebox binary when using the PBL. With pblx removed, this

[PATCH 4/4] ARM: at91: remove duplicate get_ddram_size code

2019-02-19 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 have

[PATCH 3/4] ARM: at91: fix at91sama5_get_ddram_size for sama5d4

2019-02-19 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 0/4] ARM: at91: misc fixes and cleanup

2019-02-19 Thread Ahmad Fatoum
Hello, I noticed these issues while preparing v2 of the sama5d3 first stage patch set. As they are applicable on their own, I am sending them out as a separate patch set. They apply on top of Sam's "at91: Support PMC clock bindings" v3, but I guess, they should apply on top of v4 as well.

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

2019-02-19 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 2/4] ARM: at91: debug_ll: make UART base address configurable

2019-02-19 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 1/2] scripts/dtc: fix update-dtc-source.sh for barebox use

2019-02-19 Thread Ahmad Fatoum
Unlike Linux: - barebox' scripts/gen-dtb-s has a dependency on fdget, thus change the script to copy fdget.c as part of the update. - has the libfdt source files in the same directory as the rest - we don't have/need Makefile.libfdt Adjust the update-dtc-source.sh script to account for this, so

[PATCH 0/2] scripts/dtc: Update to upstream version v1.4.7

2019-02-19 Thread Ahmad Fatoum
To play around with the new /omit-if-no-ref/ feature, I've enabled update-dtc-source.sh for barebox and used it to update dtc to v1.4.7. The second patch also reinstates the dtc-lexer.l and dtc-parser.y files which were erroneously deleted in 273dbe5f87 ("kbuild: generate lexer and parser during

Re: [PATCH] fixup! clk: at91: update to PMC bindings

2019-02-19 Thread Ahmad Fatoum
On 19/2/19 11:04, Sam Ravnborg wrote: > Hi Ahmad. > > On Tue, Feb 19, 2019 at 08:52:39AM +0100, Ahmad Fatoum wrote: >> As the sama5d3 based microchip-ksz9477-evb board still uses the old >> bindings, the dt-compat.c code is ported as well. This can be removed >> when all in-kernel at91 boards

Re: [PATCH v2] ARM: dts: imx6*phytec*: switch to new partitioning scheme

2019-02-19 Thread Stefan Riedmüller
Hi Uwe, On 19.02.19 11:28, Uwe Kleine-König wrote: Both Linux and barebox support this new scheme and it's the actually the recommended one. Signed-off-by: Uwe Kleine-König --- On Tue, Feb 19, 2019 at 11:08:56AM +0100, Stefan Riedmüller wrote: thanks for the patch. In

Re: [PATCH v2 0/9] at91: Support PMC clock bindings

2019-02-19 Thread Sascha Hauer
On Tue, Feb 19, 2019 at 11:01:53AM +0100, Sam Ravnborg wrote: > On Tue, Feb 19, 2019 at 10:05:31AM +0100, Sascha Hauer wrote: > > On Mon, Feb 18, 2019 at 08:59:06PM +0100, Sam Ravnborg wrote: > > > Hi Sascha > > > > > > > > Applied, thanks. Since AT91 is broken currently I applied it to master. >

[PATCH v2] ARM: dts: imx6*phytec*: switch to new partitioning scheme

2019-02-19 Thread Uwe Kleine-König
Both Linux and barebox support this new scheme and it's the actually the recommended one. Signed-off-by: Uwe Kleine-König --- On Tue, Feb 19, 2019 at 11:08:56AM +0100, Stefan Riedmüller wrote: > thanks for the patch. > > In arch/arm/dts/imx6qdl-phytec-pfla02.dtsi and >

Re: [PATCH] ARM: dts: imx6*phytec*: switch to new partitioning scheme

2019-02-19 Thread Stefan Riedmüller
Hi Uwe, thanks for the patch. In arch/arm/dts/imx6qdl-phytec-pfla02.dtsi and arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi are additional gpmi partitions. Did you leave them out for a reason. I think they can be matched to the new scheme too. Stefan On 18.02.19 22:08, Uwe Kleine-König

Re: [PATCH v2 0/9] at91: Support PMC clock bindings

2019-02-19 Thread Ladislav Michl
On Tue, Feb 19, 2019 at 10:05:31AM +0100, Sascha Hauer wrote: > On Mon, Feb 18, 2019 at 08:59:06PM +0100, Sam Ravnborg wrote: > > Hi Sascha > > > > > > Applied, thanks. Since AT91 is broken currently I applied it to master. > > > > I did not see it in master yet so I sent a full v3 with build

Re: [PATCH] fixup! clk: at91: update to PMC bindings

2019-02-19 Thread Sam Ravnborg
Hi Ahmad. On Tue, Feb 19, 2019 at 08:52:39AM +0100, Ahmad Fatoum wrote: > As the sama5d3 based microchip-ksz9477-evb board still uses the old > bindings, the dt-compat.c code is ported as well. This can be removed > when all in-kernel at91 boards have been ported to the new bindings. Thanks. I

Re: [PATCH v2 0/9] at91: Support PMC clock bindings

2019-02-19 Thread Sam Ravnborg
On Tue, Feb 19, 2019 at 10:05:31AM +0100, Sascha Hauer wrote: > On Mon, Feb 18, 2019 at 08:59:06PM +0100, Sam Ravnborg wrote: > > Hi Sascha > > > > > > Applied, thanks. Since AT91 is broken currently I applied it to master. > > > > I did not see it in master yet so I sent a full v3 with build

Re: [PATCH v2 0/8] Fixing MMC access on Raspberry Pi CM3

2019-02-19 Thread Sascha Hauer
On Mon, Feb 18, 2019 at 12:32:12PM +0100, Tomaz Solc wrote: > Changes from the first patch series: > > - Base Compute Module 3 device tree off upstream device tree for CM3 + IO3 >dev board, instead of R. Pi 3B. > - Keep Makefile.bcm283x without a newline at the end of file. > - Make mci

Re: [PATCH v2 0/9] at91: Support PMC clock bindings

2019-02-19 Thread Sascha Hauer
On Mon, Feb 18, 2019 at 08:59:06PM +0100, Sam Ravnborg wrote: > Hi Sascha > > > > Applied, thanks. Since AT91 is broken currently I applied it to master. > > I did not see it in master yet so I sent a full v3 with build fixes > and Tested-by: annotations. > > It this is too late for master I

Re: [PATCH] firmware-zynqmp: port from linux

2019-02-19 Thread Sascha Hauer
On Thu, Feb 14, 2019 at 02:35:00PM +, Thomas Hämmerle wrote: > Hi Sascha, > > On 12.02.19 09:31, Sascha Hauer wrote: > > Hi Thomas, > > > > On Mon, Feb 11, 2019 at 02:10:40PM +, Thomas Hämmerle wrote: > >> From: Thomas Haemmerle > >> > >> Port Xilinx Zynq MPSoC Firmware layer driver

Re: [PATCH v1 1/4] MIPS: relocation: pass ram size to pbl_main_entry

2019-02-19 Thread Oleksij Rempel
Hi Antony, your attention will be needed here.. On 18.02.19 08:51, Oleksij Rempel wrote: From: Oleksij Rempel To make barebox dynamically relocatable it should know the RAM size to be able to calculate proper new location. Signed-off-by: Oleksij Rempel ---

[PATCH] regmap: Implement syscon_regmap_lookup_by_compatible()

2019-02-19 Thread Ahmad Fatoum
Implement syscon_regmap_lookup_by_compatible() to simplify porting kernel code. Signed-off-by: Ahmad Fatoum --- Forgot to send this one first. Should be applied prior to the fixed up commit. drivers/mfd/syscon.c | 14 ++ include/mfd/syscon.h | 5 + 2 files changed, 19