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

2019-04-02 Thread Sam Ravnborg
Hi Ahmad. > >> @@ -1,4 +1,5 @@ > >> obj-y += setup.o > >> +pbl-y += at91_pmc_ll.o > > > > Will this always make my pbl image larger or do we have some linker > > magic that throws away the unused code? > > My understanding is that barebox instructs GCC to place each out-of-line > function >

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

2019-04-02 Thread Sam Ravnborg
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) > > { > > return

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

2019-04-02 Thread Sam Ravnborg
On Tue, Apr 02, 2019 at 08:39:56PM +0200, Ahmad Fatoum wrote: > 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

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 >> >> Signed-off-by: Ahmad

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 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 at91bootstrap, >> just replace the

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

2019-04-02 Thread Sam Ravnborg
Hi Ahmad. It is super that you are working on this and I hope we can have bootstrap support for more at91 variants in the near future. > This is (the hopefully final and bestest) v3 of a series that pulls in > enough of at91bootstrap to make barebox usable as first stage bootloader > for the

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

2019-04-02 Thread Sam Ravnborg
Hi Ahmad. Thanks for adding the docs. On Mon, Apr 01, 2019 at 12:18:23PM +0200, Ahmad Fatoum wrote: > Signed-off-by: Ahmad Fatoum > --- > .../boards/at91/microchip-ksz9477-evb.rst | 38 ++- > 1 file changed, 36 insertions(+), 2 deletions(-) > > diff --git

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

2019-04-02 Thread Sam Ravnborg
Hi Ahmad. On Mon, Apr 01, 2019 at 12:18:18PM +0200, Ahmad Fatoum wrote: > 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 >

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

2019-04-02 Thread Sam Ravnborg
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 > --- > arch/arm/mach-at91/include/mach/at91_wdt.h | 16 > 1 file changed, 16

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

2019-04-02 Thread Sam Ravnborg
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 usage in future sama5d2 support, fix > compilation errors

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

2019-04-02 Thread Sam Ravnborg
On Mon, Apr 01, 2019 at 11:34:27PM +0200, Ahmad Fatoum wrote: > compiling clk-generated.c results in: > > warning: passing argument 1 of 'memcpy' discards 'const' qualifier from > pointer target type [-Wdiscarded-qualifiers] > memcpy(gck->hw.parent_names, parent_names, parents_array_size); >

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

Issues with SPI on iMX7 Sabre Board

2019-04-02 Thread Kai Che
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 But there is no SPI bus when I try to communicate with: barebox@Freescale i.MX7 SabreSD Board:/ spi 0x1 spi bus 0 not found spi: No such