Re: [PATCH v3 2/3] phylib: add support for reset-gpios

2018-08-22 Thread Ahmad Fatoum
Hello Sam, On 08/21/2018 09:46 PM, Sam Ravnborg wrote: > But macb.txt or the general bindigns do not mention > a mdio child. > And the Linux macb_main.c do not support a "mdio" node either. > So my best guess is that the "mdio" support in macb was accidently > ported over from fec-imx when adding

[PATCH 08/11] ARM: at91: import lowlevel dbgu UART init code from at91bootstrap

2019-01-16 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 03/11] ARM: at91: replace at91sam9_ddrsdr.h with at91bootstrap's

2019-01-16 Thread Ahmad Fatoum
binaries. Signed-off-by: Ahmad Fatoum --- arch/arm/boards/at91sam9m10g45ek/lowlevel.c | 2 +- arch/arm/boards/at91sam9m10ihd/lowlevel.c | 2 +- arch/arm/boards/at91sam9n12ek/lowlevel.c | 2 +- arch/arm/boards/at91sam9x5ek/lowlevel.c | 2 +- arch/arm/boards/pm9g45/lowlevel.c

[PATCH 02/11] ARM: at91: sama5d3: remove never referenced empty header file

2019-01-16 Thread Ahmad Fatoum
The file was added along with the sama5d3 support, but never used, so remove it. Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at91/include/mach/sama5d3_matrix.h | 15 --- 1 file changed, 15 deletions(-) delete mode 100644 arch/arm/mach-at91/include/mach/sama5d3_matrix.h diff

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

2019-01-16 Thread Ahmad Fatoum
This patch series imports the necessary infrastructure out of the at91bootstrap project to support first stage usage on the SAMA5. This is leveraged to implement first stage boot on the SAMA5D3 based Microchip KSZ9477-EVB. Ahmad Fatoum (11): ARM: at91: clk: prune never-compiled h32mx code

[PATCH 05/11] ARM: at91: import lowlevel clock initialization from at91bootstrap

2019-01-16 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 to do the low level clock initialization. Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at91/Makefile | 1 + .../include/mach

[PATCH 10/11] ARM: at91: microchip-ksz9477-evb: import low level init from at91bootstrap

2019-01-16 Thread Ahmad Fatoum
This imports 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 | 196 +- arch/arm/mach-at91/include/mach/at91_pmc.h| 19 ++ arch/arm/mach-at91

[PATCH 07/11] ARM: at91: import low level DDRAMC initialization code from at91bootstrap

2019-01-16 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 09/11] ARM: at91: microchip-ksz9477-evb: reintroduce board code for first stage

2019-01-16 Thread Ahmad Fatoum
From: Ahmad Fatoum We are limited to 64K in the first stage, but we still need MMC and FAT support, so to make place, make the device tree support optional by providing the sama5d3's board code for NAND/MMC as an alternative. Signed-off-by: Ahmad Fatoum --- .../arm/boards/microchip-ksz9477

[PATCH 11/11] ARM: at91: microchip-ksz9477-evb: add first stage MMC defconfig

2019-01-16 Thread Ahmad Fatoum
Signed-off-by: Ahmad Fatoum --- ...chip_ksz9477_evb_first_stage_mmc_defconfig | 22 +++ 1 file changed, 22 insertions(+) create mode 100644 arch/arm/configs/microchip_ksz9477_evb_first_stage_mmc_defconfig diff --git a/arch/arm/configs

[PATCH 06/11] ARM: at91: import early_udelay from at91bootstrap

2019-01-16 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/Kconfig

[PATCH 04/11] ARM: at91: watchdog: implement at91_wdt_disable

2019-01-16 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 b/arch/arm/mach

[PATCH 01/11] ARM: at91: clk: prune never-compiled h32mx code

2019-01-16 Thread Ahmad Fatoum
This code is conditionally compiled when CONFIG_HAVE_AT91_H32MX is defined, which never happens as it neither has a prompt nor does another option select it. As no one seems to miss it till now, just remove it. Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at91/Kconfig | 3 - drivers/clk

Re: [PATCH 07/11] ARM: at91: import low level DDRAMC initialization code from at91bootstrap

2019-01-17 Thread Ahmad Fatoum
On 17/1/19 09:11, Sascha Hauer wrote: > On Wed, Jan 16, 2019 at 06:45:55PM +0100, Ahmad Fatoum wrote: >> This commit imports DDRAMC initialization routines for use in PBL from >> https://github.com/linux4sam/at91bootstrap/blob/v3.8.12/driver/ddramc.c >> >>

Re: [PATCH 03/11] ARM: at91: replace at91sam9_ddrsdr.h with at91bootstrap's

2019-01-17 Thread Ahmad Fatoum
Hello Sam, On 16/1/19 19:24, Sam Ravnborg wrote: > Hi Ahmad. > > On Wed, Jan 16, 2019 at 06:45:51PM +0100, Ahmad Fatoum wrote: >> Only at91sam9g45_reset.S and the header itself actually use >> any of the macros defined within. >> >> Instead of adding missing defi

Re: [PATCH 09/11] ARM: at91: microchip-ksz9477-evb: reintroduce board code for first stage

2019-01-17 Thread Ahmad Fatoum
Hello, On 17/1/19 09:25, Sascha Hauer wrote: > On Wed, Jan 16, 2019 at 06:45:57PM +0100, Ahmad Fatoum wrote: >> From: Ahmad Fatoum >> >> We are limited to 64K in the first stage, but we still need MMC and FAT >> support, so to make place, make the device tree suppo

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

2019-01-17 Thread Ahmad Fatoum
Hello Sam, On 16/1/19 19:47, Sam Ravnborg wrote: > Hi Ahmad. > > On Wed, Jan 16, 2019 at 06:45:48PM +0100, Ahmad Fatoum wrote: >> This patch series imports the necessary infrastructure out of the >> at91bootstrap project to support first stage usage on the SAMA5. > >

[PATCH 2/2] net: fec_imx: fix timeout off by *1000 error

2018-12-14 Thread Ahmad Fatoum
over TFTP and verifying the hash is correct. Signed-off-by: Ahmad Fatoum --- drivers/net/fec_imx.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c index d304b94c567b..642517de6e98 100644 --- a/drivers/net/fec_imx.c +++ b

[PATCH 1/2] include/linux/time.h: define USEC_PER_SEC and friends

2018-12-14 Thread Ahmad Fatoum
Linux has them in include/linux/time64.h and they are useful for making (especially microsecond) use readable such as in read*_poll_timeout. Signed-off-by: Ahmad Fatoum --- include/linux/time.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/time.h b/include/linux/time.h

Re: [PATCH 2/2] net: fec_imx: fix timeout off by *1000 error

2018-12-14 Thread Ahmad Fatoum
Hello, I didn't change read*_poll_timeout to take nanoseconds because it is copied over from Linux. On 14/12/18 16:23, Ahmad Fatoum wrote: > read*_poll_timeout's final timeout parameter is in microseconds, > but the supplied arguments in fec_imx.c were in nanoseconds, > which m

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

2018-12-14 Thread Ahmad Fatoum
Hello, On 10/12/18 09:39, Sascha Hauer wrote: > > Still why do we need a device tree property when all we have to do is to > not call of_partitions_register_fixup() for the boot partitions? I figured current users might want to keep the current behavior, but ok, I will send another patch that

Re: [PATCH] arm: common: document safe usage of arm_setup_stack

2018-12-14 Thread Ahmad Fatoum
Hello, On 4/12/18 10:15, Ahmad Fatoum wrote: > Cc: Lucas Stach > Signed-off-by: Ahmad Fatoum > --- > arch/arm/include/asm/common.h | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm/include/asm/common.h b/arch/arm/include/asm/common.h > index c3

[PATCH 2/2] mtd: spi-nor: Add support for sst25wf040b

2018-12-04 Thread Ahmad Fatoum
From: Yao Yuan Signed-off-by: Yuan Yao Signed-off-by: Brian Norris [Linux upstream commit: c887be71cc39] Signed-off-by: Ahmad Fatoum --- drivers/mtd/spi-nor/spi-nor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index

[PATCH 1/2] mtd: spi-nor: Add support for sst25wf020a

2018-12-04 Thread Ahmad Fatoum
upstream commit: a1d97ef96e38] Signed-off-by: Ahmad Fatoum --- drivers/mtd/spi-nor/spi-nor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index d15a7954136e..48d5742d5b26 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi

[PATCH] arm: common: document safe usage of arm_setup_stack

2018-12-04 Thread Ahmad Fatoum
Cc: Lucas Stach Signed-off-by: Ahmad Fatoum --- arch/arm/include/asm/common.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/include/asm/common.h b/arch/arm/include/asm/common.h index c32cdfe5ec2f..72ac988cc131 100644 --- a/arch/arm/include/asm/common.h +++ b/arch/arm

[PATCH] lib: bootstrap: fix instance of possibly mismatched pointer sizes

2018-12-04 Thread Ahmad Fatoum
len was int but is passed to read_file(..., size_t *size), Fix this. Signed-off-by: Ahmad Fatoum --- lib/bootstrap/disk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bootstrap/disk.c b/lib/bootstrap/disk.c index a55d5d77f4cf..fd016166e6e4 100644 --- a/lib/bootstrap

[PATCH] documentation: document eMMC boot{0,1}-partitions binding

2018-12-05 Thread Ahmad Fatoum
The described binding was implemented in commit 6e9a87b39 ("mci: Allow to partition eMMC boot partitions"). Signed-off-by: Ahmad Fatoum --- .../devicetree/bindings/mtd/partition.txt | 18 ++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetre

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

2018-12-06 Thread Ahmad Fatoum
Users can have reasons to inhibit barebox from fixing up partitions nodes into the kernel device tree, like if it's a boot0-partitions node, which doesn't have a kernel binding. Allow users to specify a no-fixup property to indicate so. Signed-off-by: Ahmad Fatoum --- Documentation/devicetree

[PATCH 2/4] of: partition: use NULL instead of never-read argument

2018-12-06 Thread Ahmad Fatoum
len isn't read afterward and of_get_property accepts NULL as third argument, so do it. Signed-off-by: Ahmad Fatoum --- drivers/of/partition.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/of/partition.c b/drivers/of/partition.c index aa6e601b7fe4

[PATCH 3/4] of: partitions: make macro name more generic

2018-12-06 Thread Ahmad Fatoum
DEVFS_PARTITION_FROM_TABLE's only effect at the moment is to disable device tree fixups. Rename it accordingly, so it looks less out-of-place when using it in the next commit to implement the no-fixup property. Signed-off-by: Ahmad Fatoum --- common/partitions.c| 2 +- drivers

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

2018-12-07 Thread Ahmad Fatoum
Hello Sascha, On 7/12/18 08:43, Sascha Hauer wrote: > On Fri, Dec 07, 2018 at 07:34:37AM +0100, Ahmad Fatoum wrote: >> Users can have reasons to inhibit barebox from fixing up partitions nodes >> into the kernel device tree, like if it's a boot0-partitions node, which >>

[PATCH] mci: skip of_partitions_register_fixup for boot partitions

2019-01-02 Thread Ahmad Fatoum
The bootN-partitions binding is barebox-specific, so it shouldn't be fixed up into the kernel device tree. Suggested-by: Sascha Hauer Signed-off-by: Ahmad Fatoum --- drivers/mci/mci-core.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mci/mci-core.c b

[PATCH] images: check for use of obsolete pblx-*

2019-01-14 Thread Ahmad Fatoum
ly failing with an error message whenever pblx-y or pblx- has been defined. Signed-off-by: Ahmad Fatoum --- images/Makefile | 4 1 file changed, 4 insertions(+) diff --git a/images/Makefile b/images/Makefile index c4b2a483fbd1..c3ec498865da 100644 --- a/images/Makefile +++ b/images/Makefile

Re: Issues with SPI on iMX7 Sabre Board

2019-04-02 Thread Ahmad Fatoum
Hello Kai, On 4/2/19 3:22 PM, Kai Che wrote: > Hi all, > > I'm trying to communicate with SPI in barebox on the MC iMX7 Sabre Board. > > I added the options in my barebox config: > > CONFIG_SPI=y > CONFIG_CMD_SPI=y How about CONFIG_DRIVER_SPI_IMX? > > But there is no SPI bus when I try to

Re: [PATCH v3 05/15] ARM: at91: watchdog: implement at91_wdt_disable

2019-04-02 Thread Ahmad Fatoum
Hello Sam, On 2/4/19 19:38, Sam Ravnborg wrote: > Hi Ahmad. > > On Mon, Apr 01, 2019 at 12:18:13PM +0200, Ahmad Fatoum wrote: >> Low level init code might want to disable the watchdog in PBL. >> Provide a helper to do so. >> >> Signed-off-by: Ahmad Fatoum >

Re: [PATCH v3 06/15] ARM: at91: import lowlevel clock initialization from at91bootstrap

2019-04-02 Thread Ahmad Fatoum
Hello Sam, On 2/4/19 19:42, Sam Ravnborg wrote: > Hi Ahmad. > > On Mon, Apr 01, 2019 at 12:18:14PM +0200, Ahmad Fatoum wrote: >> For use by future at91 first stage bootloaders, this commit imports >> https://github.com/linux4sam/at91bootstrap/blob/v3.8.12/driver/pmc.c >&

Re: [PATCH v3 04/15] ARM: at91: replace at91sam9_ddrsdr.h with at91bootstrap's at91_ddrsdrc.h

2019-04-02 Thread Ahmad Fatoum
Hi Sam, On 2/4/19 19:25, Sam Ravnborg wrote: > Hi Ahmad. > > On Mon, Apr 01, 2019 at 12:18:12PM +0200, Ahmad Fatoum wrote: >> Instead of adding missing definitions to the existing at91sam9_ddrsdr.h >> and adapting the incoming DDRAM initialization code from at91boots

Re: AW: Issues with SPI on iMX7 Sabre Board

2019-04-03 Thread Ahmad Fatoum
t's what I could think of. > > Maybe my Chip Select Pin is broken. > > Kind Regards, > > Kai > > > Von: barebox im Auftrag von Ahmad > Fatoum > Gesendet: Dienstag, 2. April 2019 15:47 > An: barebox@lists.infradead.org > Betreff: Re: Issues with SPI on

Re: [PATCH v2 06/10] ARM: at91: remove at91sam9g45_get_ddram_size helper

2019-04-03 Thread Ahmad Fatoum
Hello, On 3/4/19 09:18, Sascha Hauer wrote: > Indeed you can remove the #ifdefs, but wouldn't it look nicer just to I assume you mean adding a base address parameter, but have the helper sets the second argument? Ye, I can do that. -- Pengutronix e.K. |

Re: [PATCH v3 04/15] ARM: at91: replace at91sam9_ddrsdr.h with at91bootstrap's at91_ddrsdrc.h

2019-04-03 Thread Ahmad Fatoum
Hi, On 2/4/19 21:18, Sam Ravnborg wrote: > Hi Ahmad. > >>> >>> If we introduced the following small helpers we could simplify the call >>> sites >>> to just use at91_get_ddram_size(AT91SAM9G45_BASE_DDRSDRC0) and similar. >>> >>> static inline u32 at91_get_ddram_size(void __force __iomem * addr)

Re: [PATCH 0/6] clk: imx6: work around LDB hang caused by ERR009219

2019-04-03 Thread Ahmad Fatoum
On 1/4/19 22:12, Ahmad Fatoum wrote: > The erratum already has a Linux workaround. On barebox, it can currently > happen if there's an appropriate assigned-clock-parents property or the > reparenting happens (i.e. CONFIG_DRIVER_VIDEO_IMX_IPUV3 is selected on a > board with the aforem

[PATCH v2 07/10] ARM: at91: remove at91sam9n12_get_ddram_size helper

2019-04-01 Thread Ahmad Fatoum
Substitute the current #ifdefery in at91sam9_ddrsdr.h by open-coding at91sam9n12_get_ddram_size wherever it was called. Suggested-by: Sascha Hauer Signed-off-by: Ahmad Fatoum --- arch/arm/boards/at91sam9n12ek/lowlevel.c | 5 +++-- arch/arm/mach-at91/at91sam9n12_devices.c

[PATCH v2 09/10] ARM: at91: remove at91sama5_get_ddram_size helper

2019-04-01 Thread Ahmad Fatoum
Substitute the current #ifdefery in at91sam9_ddrsdr.h by open-coding at91sama5_get_ddram_size wherever it was called. Suggested-by: Sascha Hauer Signed-off-by: Ahmad Fatoum --- arch/arm/boards/sama5d3_xplained/lowlevel.c | 4 +++- arch/arm/boards/sama5d3xek/lowlevel.c | 4

[PATCH v2 06/10] ARM: at91: remove at91sam9g45_get_ddram_size helper

2019-04-01 Thread Ahmad Fatoum
Substitute the current #ifdefery in at91sam9_ddrsdr.h by open-coding at91sam9g45_get_ddram_size wherever it was called. Suggested-by: Sascha Hauer Signed-off-by: Ahmad Fatoum --- arch/arm/boards/at91sam9m10g45ek/lowlevel.c | 5 +++-- arch/arm/boards/at91sam9m10ihd/lowlevel.c | 5

[PATCH v2 08/10] ARM: at91: remove at91sam9x5_get_ddram_size helper

2019-04-01 Thread Ahmad Fatoum
Substitute the current #ifdefery in at91sam9_ddrsdr.h by open-coding at91sam9x5_get_ddram_size wherever it was called. Suggested-by: Sascha Hauer Signed-off-by: Ahmad Fatoum --- arch/arm/boards/at91sam9x5ek/lowlevel.c | 4 +++- arch/arm/mach-at91/at91sam9x5_devices.c | 2

[PATCH v2 02/10] ARM: at91: debug_ll: make UART base address configurable

2019-04-01 Thread Ahmad Fatoum
as well. Previously anything besides DBGU0 defaulted to DBGU1. Fixes: 06a0773ee31 ("ARM: at91: add sama5d4 soc support #2") Reviewed-by: Sam Ravnborg Tested-by: Sam Ravnborg [afa: moved base address defaults to common/Kconfig] Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at

[PATCH v2 05/10] ARM: at91: remove duplicate get_ddram_size code

2019-04-01 Thread Ahmad Fatoum
at91sama5_get_ddram_size call at91_get_ddram_size with is_nb == true and remove the duplicate code. Signed-off-by: Ahmad Fatoum Reviewed-by: Sam Ravnborg Tested-by: Sam Ravnborg --- .../mach-at91/include/mach/at91sam9_ddrsdr.h | 27 ++- 1 file changed, 2 insertions(+), 25 deletions

[PATCH v2 03/10] arm: sama5d4: fix stack setup

2019-04-01 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 v2 00/10] ARM: at91: misc fixes and cleanup

2019-04-01 Thread Ahmad Fatoum
as suggested by Sascha in the review of the sama5d3 first stage patchset - added patch 10 with a fix for a warning I ran into in the newly ported clock drivers Ahmad Fatoum (9): ARM: at91: replace __raw_{readl,writel} of peripherals with readl,writel ARM: at91: debug_ll: make

[PATCH v2 10/10] clk: at91: fix warning about missing const-safety

2019-04-01 Thread Ahmad Fatoum
loc+memcpy pair with xmemdup. Zero-initialization of the buffer isn't necessary, because memcpy spans the whole buffer. Signed-off-by: Ahmad Fatoum --- drivers/clk/at91/clk-main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/clk/at91/clk-main.c b/drivers/clk/at91/

[PATCH v2 04/10] ARM: at91: fix at91sama5_get_ddram_size for sama5d4

2019-04-01 Thread Ahmad Fatoum
at91sama5_get_ddram_size the mpddrc base address as argument and adjust call sites appropriately. This change was not tested on a sama5d4. Signed-off-by: Ahmad Fatoum Reviewed-by: Sam Ravnborg Tested-by: Sam Ravnborg --- arch/arm/boards/sama5d3_xplained/lowlevel.c | 2 +- arch/arm/boards/sama5d3xek

[PATCH v3 13/15] ARM: at91: microchip-ksz9477-evb: implement first stage

2019-04-01 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 | 208 +- arch/arm/mach-at91/Kconfig

[PATCH v3 10/15] images: at91: differentiate between first and second stage images

2019-04-01 Thread Ahmad Fatoum
-by: Ahmad Fatoum --- arch/arm/mach-at91/Kconfig | 2 +- images/Makefile.at91 | 12 +--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 8e1bf0629ab7..60f427d7d483 100644 --- a/arch/arm/mach-at91/Kconfig

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

2019-04-01 Thread Ahmad Fatoum
comprehension, the replacement is done in three steps: Here the existing at91sam9_ddrsdr.h has its now duplicate (in function, not name) macros removed and existing users are migrated to use the new header. Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at91/at91sam9g45_reset.S| 6 +- .../mach

[PATCH v3 15/15] doc: microchip-ksz9477-evb: add documentation

2019-04-01 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 4c4c4aecbfb3

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

2019-04-01 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 | 507

[PATCH v3 12/15] ARM: dts: microchip-ksz9477-evb: add dummy first stage device tree

2019-04-01 Thread Ahmad Fatoum
-bin.dts device tree for first stage, which can be further stripped in future commits. Signed-off-by: Ahmad Fatoum --- LICENSES/other/X11| 28 +++ arch/arm/dts/Makefile | 4 ++- .../at91-microchip-ksz9477-evb-boot-bin.dts | 13

[PATCH v3 06/15] ARM: at91: import lowlevel clock initialization from at91bootstrap

2019-04-01 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 + arch/arm/mach-at91/at91_pmc_ll.c | 184

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

2019-04-01 Thread Ahmad Fatoum
sama5d2 was added along with the update to the 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 handling. Signed-off-by: Ahmad Fatoum

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

2019-04-01 Thread Ahmad Fatoum
comprehension, the replacement is done in three steps: This last step copies the memory size querying functions from at91sam9_ddrsdr.h to at91_ddrsdrc.h, then deletes it and fixes all references. Signed-off-by: Ahmad Fatoum --- arch/arm/boards/at91sam9m10g45ek/lowlevel.c | 2 +- arch/arm/boards

[PATCH v3 07/15] ARM: at91: import early_udelay from at91bootstrap

2019-04-01 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 v3 01/15] LICENSES: add BSD-1-Clause license

2019-04-01 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 v3 14/15] ARM: at91: microchip-ksz9477: provide board code fallback

2019-04-01 Thread Ahmad Fatoum
ee support in the first stage was fixed, this commit could be reverted for full device tree goodness. The board code is a stripped down version of the sama5d3_xplained board's. Signed-off-by: Ahmad Fatoum --- .../arm/boards/microchip-ksz9477-evb/Makefile | 3 + arch/arm/boards/microchip-ksz9477-evb/boa

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

2019-04-01 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 v3 11/15] ARM: at91: microchip-ksz9477-evb: use compressed DTB

2019-04-01 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 v3 00/15] ARM: at91: microchip-kz9477-evb: support first stage boot

2019-04-01 Thread Ahmad Fatoum
tree based first stage - added documentation as suggested by Sam - changed NAND partition layout in board code as suggested by Sascha - stylistic fixes here and there Ahmad Fatoum (15): LICENSES: add BSD-1-Clause license ARM: at91: import at91bootstrap's at91_ddrsdrc.h ARM: at91:

[PATCH v3 05/15] ARM: at91: watchdog: implement at91_wdt_disable

2019-04-01 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 b/arch/arm/mach

[PATCH v3 02/15] ARM: at91: import at91bootstrap's at91_ddrsdrc.h

2019-04-01 Thread Ahmad Fatoum
comprehension, the replacement is done in three steps: Here the header is imported. Signed-off-by: Ahmad Fatoum --- .../arm/mach-at91/include/mach/at91_ddrsdrc.h | 288 ++ 1 file changed, 288 insertions(+) create mode 100644 arch/arm/mach-at91/include/mach/at91_ddrsdrc.h diff --git

Re: [PATCH v3 13/15] ARM: at91: microchip-ksz9477-evb: implement first stage

2019-04-01 Thread Ahmad Fatoum
On 4/1/19 2:37 PM, Roland Hieber wrote: > On Mon, Apr 01, 2019 at 12:18:21PM +0200, Ahmad Fatoum wrote: >> This imports the low level init code from at91bootstrap >> https://github.com/linux4sam/at91bootstrap/blob/v3.8.12/board/sama5d3_xplained/sama5d3_xplained.c >> >>

[PATCH] clk: imx6: remove quirky clk_set_parent(LDB_diN_sel, pll5_video_div)

2019-04-01 Thread Ahmad Fatoum
d from reset value: 0 This warning is safe to ignore. Cc: Andrey Smirnov Cc: Raphael Poggi Cc: Sascha Hauer Cc: Lucas Stach Cc: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Ahmad Fatoum --- drivers/clk/imx/clk-imx6.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/

[PATCH 2/6] clk: imx6: Mask mmdc_ch1 handshake for periph2_sel and mmdc_ch1_axi_podf

2019-04-01 Thread Ahmad Fatoum
for the LDB DI clock. Signed-off-by: Philipp Zabel Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo [afa: ported to barebox from Linux commit f13abeff2c] [afa: moved call site to where it would've been moved in following commit] Signed-off-by: Ahmad Fatoum --- drivers/clk/imx/clk-imx6.c | 16

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

2019-04-01 Thread Ahmad Fatoum
boot could be added to the kernel or bootloader. Signed-off-by: Philipp Zabel Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo [afa: ported from Linux kernel commit 03d576f202] [afa: added exception for i.MX6QP, see kernel commit f4a0a6c309] Signed-off-by: Ahmad Fatoum --- drivers/clk/imx

Re: [PATCH] clk: imx6: remove quirky clk_set_parent(LDB_diN_sel, pll5_video_div)

2019-04-01 Thread Ahmad Fatoum
On 1/4/19 22:15, Ahmad Fatoum wrote: Argh. This is RFC PATCH 6/6.. Missed the prefix. -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone

[PATCH 0/6] clk: imx6: work around LDB hang caused by ERR009219

2019-04-01 Thread Ahmad Fatoum
t;): http://www.nxp.com/files/32bit/doc/eng_bulletin/EB821.pdf Ahmad Fatoum (3): clk: imx6: provide helper to check if video PLL post dividers work clk: imx6: define an enum for ldb mux inputs clk: imx6: remove quirky clk_set_parent(LDB_diN_sel, pll5_video_div) Fabio Estevam (1): clk: imx6: Fix p

[PATCH 3/6] clk: imx6: Fix procedure to switch the parent of LDB_DI_CLK

2019-04-01 Thread Ahmad Fatoum
283b0838] [afa: maintained reparenting for imx6qp revision >1.0 as before] Signed-off-by: Ahmad Fatoum --- drivers/clk/imx/clk-imx6.c | 292 - 1 file changed, 284 insertions(+), 8 deletions(-) diff --git a/drivers/clk/imx/clk-imx6.c b/drivers/clk/imx/cl

[PATCH 4/6] clk: imx6: define an enum for ldb mux inputs

2019-04-01 Thread Ahmad Fatoum
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 --- drivers/clk/imx/clk-imx6.c | 41 +++--- 1

[PATCH 1/6] clk: imx6: provide helper to check if video PLL post dividers work

2019-04-01 Thread Ahmad Fatoum
)) == !((rev1.0 && (mx6q || mx6d)) || (rev1.0 && (mx6s || mx6qp || mx6dp))) == (!(rev1.0 && (mx6q || mx6d)) && !(rev1.0 && (mx6s || mx6qp || mx6dp))) == cpu_has_working_video_pll_post_div() && !(rev1.0 && (mx6s || mx6qp || mx6dp)) Signed-off-by:

[PATCH v2 11/10] clk: at91: fix warning about missing const-safety

2019-04-01 Thread Ahmad Fatoum
cpy pair with xmemdup. Zero-initialization of the buffer isn't necessary, because memcpy spans the whole buffer. Suggested-by: Sam Ravnborg Signed-off-by: Ahmad Fatoum --- drivers/clk/at91/clk-generated.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/clk/at91/

Re: [PATCH v2 10/10] clk: at91: fix warning about missing const-safety

2019-04-01 Thread Ahmad Fatoum
Hello Sam, On 1/4/19 22:48, Sam Ravnborg wrote: > Hi Ahmad. > > On Mon, Apr 01, 2019 at 11:31:06AM +0200, Ahmad Fatoum wrote: >> compiling clk-main.c results in: >> >> warning: passing argument 1 of 'memcpy' discards 'const' qualifier from >> pointer ta

Re: [PATCH v4 0/11] at91: Support PMC clock bindings

2019-02-26 Thread Ahmad Fatoum
Fix builds in various configs > - Reworked Kconfig changes > - Fix checkpatch warnings (mostly whitespace) > > v1: > - Posted to mailing list as a WIP patch > > Sam > > > Ahmad Fatoum (2): > regmap: Implement syscon_regmap_lookup_by_comp

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

2019-02-26 Thread Ahmad Fatoum
Hello Sascha, On 20/2/19 08:55, Sascha Hauer wrote: > 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, Ahm

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

2019-02-26 Thread Ahmad Fatoum
Hello Sam, On 24/2/19 13:35, Sam Ravnborg wrote: > Hi Ahmad. > > On Tue, Feb 19, 2019 at 01:06:12PM +0100, Ahmad Fatoum wrote: >> Both at91_get_ddram_size and at91sama5_get_ddram_size are the >> same if is_sdram == false and is_nb == true. >> >> is_sdram i

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

2019-02-26 Thread Ahmad Fatoum
Hello, On 22/2/19 14:33, Roland Hieber wrote: > On Tue, Feb 19, 2019 at 06:21:36PM +0100, Ahmad Fatoum wrote: >> Instead of adding missing definitions to the existing at91sam9_ddrsdr.h >> and adapting the incoming DDRAM initialization code from at91bootstrap, >> just rep

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

2019-02-26 Thread Ahmad Fatoum
On 22/2/19 14:45, Roland Hieber wrote: > Hi Ahmad, > > On Tue, Feb 19, 2019 at 06:21:48PM +0100, Ahmad Fatoum wrote: >> This imports the low level init code from at91bootstrap >> https://github.com/linux4sam/at91bootstrap/blob/v3.8.12/board/sama5d3_xplained/sama5d3_xpla

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

2019-02-26 Thread Ahmad Fatoum
Hello, On 26/2/19 10:10, Ahmad Fatoum wrote: > Thanks for the review! > Sascha, if the series is otherwise ok, could you apply Sam's patch followed > by mine as suggested? Thanks. > While talking the series over with sha, I spotted a typo in debug_ll.h. I will prepare a v2 and s

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

2019-02-26 Thread Ahmad Fatoum
Hello Antony, On 20/2/19 08:14, Antony Pavlov wrote: > On Tue, 19 Feb 2019 15:16:47 +0100 > Ahmad Fatoum wrote: > >> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl >> index 4e17347a8481..48b39fbf962a 100755 >> --- a/scripts/checkpatch.pl >

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

2019-03-04 Thread Ahmad Fatoum
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 piggydata"), > BAREBOX_MAX_PBLX_SIZE seems to have been the way to go for limiting > the siz

Re: [PATCH v3 9/9] clk: at91: update to PMC bindings

2019-02-18 Thread Ahmad Fatoum
Hello Sam, On 18/2/19 20:47, Sam Ravnborg wrote: > Based on kernel 5.0-rc6 update at91 clk support > to match the new PMC bindings. > > Manually added all changes done in the kernel from 4.9-rc3 > to 5.0-rc6. > New drivers required was added as seperate commits. > > The kernel has a dt-compat

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 >> whe

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

2019-02-18 Thread Ahmad Fatoum
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. Signed-off-by: Ahmad Fatoum --- drivers/clk/at91/Makefile| 2 +- drivers/clk/at91

[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

Re: i.MX6ul USB serial downloader and Barebox

2019-02-21 Thread Ahmad Fatoum
Hello Patrick, On 2/21/19 11:01 AM, Patrick Schneider wrote: > Hi guys, > I'm trying to find out if the following is possible: > In a production environment, there is only the USB connection present, no > console access to the device. > The USB serial downloader mode starts and I am able to

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

2019-02-19 Thread Ahmad Fatoum
at91sama5_get_ddram_size call at91_get_ddram_size with is_nb == true and remove the duplicate code. Signed-off-by: Ahmad Fatoum --- .../mach-at91/include/mach/at91sam9_ddrsdr.h | 27 ++- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/arch/arm/mach-at91/include/mach

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

2019-02-19 Thread Ahmad Fatoum
3ffa97f4 ("rename U-Boot-v2 project to barebox") Signed-off-by: Ahmad Fatoum --- COPYING | 300 +--- LICENSES/exceptions/.gitignore | 0 LICENSES/other/.gitignore | 0 LICENSES/preferred/BSD-3-Clause | 36

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

2019-02-19 Thread Ahmad Fatoum
/{+$1/; s/-\]\{\+/+}{+/;' \ -e 's/(\{\+.*?\+\})\1/__ALL_IS_WELL__/' | grep '+}{+' which filters out the common case of lines where a single __raw_{readT,writeT} had its __raw_ prefix stripped without any further changes. Signed-off-by: Ahmad Fatoum --- arch/arm/boards/at91rm9200ek

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

2019-02-19 Thread Ahmad Fatoum
as well. Previously anything besides DBGU0 defaulted to DBGU1. Fixes: 06a0773ee31 ("ARM: at91: add sama5d4 soc support #2") Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at91/Kconfig | 23 +++--- arch/arm/mach-at91/include/mach/debug_ll.h | 12 +++--

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

2019-02-19 Thread Ahmad Fatoum
at91sama5_get_ddram_size the mpddrc base address as argument and adjust call sites appropriately. This change was not tested on a sama5d4. Signed-off-by: Ahmad Fatoum --- arch/arm/boards/sama5d3_xplained/lowlevel.c | 2 +- arch/arm/boards/sama5d3xek/lowlevel.c | 2 +- arch/arm/boards

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

2019-02-19 Thread Ahmad Fatoum
v4 as well. Cheers Ahmad Ahmad Fatoum (4): ARM: at91: replace __raw_{readl,writel} of peripherals with readl,writel ARM: at91: debug_ll: make UART base address configurable ARM: at91: fix at91sama5_get_ddram_size for sama5d4 ARM: at91: remove duplicate get_ddram_size code arch/arm/boards/at

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 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

  1   2   3   4   5   6   >