Re: [PATCH 2/3] fastboot net: implement fastboot over UDP

2020-03-06 Thread Sascha Hauer
On Thu, Mar 05, 2020 at 09:15:57PM +0100, Daniel Glöckner wrote: > Am 03/05/20 um 08:50 schrieb Sascha Hauer: > >> + const char *fastboot_files = getenv("nv.fastboot.files"); > > > > Please don't use nv variables directly, always use the corresponding > > global variable. > > > > For

[PATCH 8/8] usbnet: Be more friendly in the receive path

2020-03-06 Thread Sascha Hauer
To recognize if we have a receive packet pending we must set up a USB bulk transfer. When there's no incoming packet we must wait until the transfer times out. We do this with every poller call which can considerably slow down the system. With this patch we do two things against this: - lower the

[PATCH 6/8] net: Call net_poll() in a poller

2020-03-06 Thread Sascha Hauer
This patch moves the ethernet receive loop into a poller. With this network protocols no longer have to call net_loop() explicitly but can do it implicitly by calling is_timeout() when waiting for packets. Having the network receive loop running in a poller has the advantage that we have it

Protect code from pollers

2020-03-06 Thread Sascha Hauer
barebox runs code in pollers. This works reasonably well when the pollers do not touch any resources that are used by code outside the pollers as well. Currently we also have fastboot running in a poller and this is where things become dangerous. This series aims to provide a way for solving

[PATCH 5/8] usbnet: Add slice

2020-03-06 Thread Sascha Hauer
Both the ethernet device and the mdio bus of a USB network controller need the USB bus. Add dependencies to it. Signed-off-by: Sascha Hauer --- drivers/net/usb/usbnet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index

[PATCH 4/8] usb: Add a slice to usb host controllers

2020-03-06 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- drivers/usb/core/usb.c | 6 ++ include/usb/usb.h | 7 +++ 2 files changed, 13 insertions(+) diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 1c3dcb79a8..da7afb5a32 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@

[PATCH 2/8] net: Add a slice to struct eth_device

2020-03-06 Thread Sascha Hauer
Add ethernet code safe for being called from a poller. Signed-off-by: Sascha Hauer --- include/net.h | 8 net/eth.c | 26 -- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/include/net.h b/include/net.h index 6912a557b5..d7a1f4aaea 100644

[PATCH 7/8] net: reply to ping requests

2020-03-06 Thread Sascha Hauer
Now that we have the network receive function running in a poller we can reasonably well answer to ping requests. Implement this feature. Signed-off-by: Sascha Hauer --- net/net.c | 46 -- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git

[PATCH 1/8] Introduce slices

2020-03-06 Thread Sascha Hauer
slices, the barebox idea of locking barebox has pollers which execute code in the background whenever one of the delay functions (udelay, mdelay, ...) or is_timeout() are called. This introduces resource problems when some device triggers a poller by calling a delay function and then the poller

Re: barebox image for an spi flash (like m25p0) on an imx7 soc

2020-03-06 Thread Giorgio Dal Molin
Hi all, I could finally put a barebox image together that's able to boot from the qspi on an imx7d soc ! It is still very much hacked up but it works. The imx7 boots in internal boot mode (BOOT_MODE=0x2) and the eFuses selecting the boot device are as follows (BOOT_CFG): imx7d: / md

Re: [PATCH 3/3] ARM: nitrogen6: remove hard coded values

2020-03-06 Thread Stefan Lengfeld
Hi Marco, my two cents: On Tue, Mar 03, 2020 at 06:46:16PM +0100, Marco Felsch wrote: > Since commit c3f5ce7308 ("net: phy: micrel: Add support for specifying pad > skew values") and commit 2720a02e8a ("net: phy: micrel: backport finding > PHY properties") the phy driver can handle this taking

[PATCH 0/2] Documentation: blspec: update documentation

2020-03-06 Thread Michael Tretter
Hello, These are two minor patches to update the documentation of blspec-entries. The first patch updates the link to the specification and the second patch removed the documentation of the devicetree-overlay key, which is now part of the official spec. Michael Michael Tretter (2):

[PATCH 1/2] Documentation: blspec: update link to Boot Loader Specification

2020-03-06 Thread Michael Tretter
There is a big warning on the linked page that the page is obsolete and a link to the current version of the Boot Loader Specification. The Barebox documentation shall directly link to the current version of the specification. Signed-off-by: Michael Tretter ---

[PATCH 2/2] Documentation: blspec: drop documentation of devicetree-overlay

2020-03-06 Thread Michael Tretter
The devicetree-overlay key is part of the official Boot Loader Specification. There is no need to document it in Barebox, again. Signed-off-by: Michael Tretter --- Documentation/user/booting-linux.rst | 4 1 file changed, 4 deletions(-) diff --git a/Documentation/user/booting-linux.rst

Re: barebox image for an spi flash (like m25p0) on an imx7 soc

2020-03-06 Thread Giorgio Dal Molin
Hi, > On March 6, 2020 at 1:59 PM Sascha Hauer wrote: > > > On Fri, Mar 06, 2020 at 11:11:16AM +0100, Giorgio Dal Molin wrote: > > Hi, > > > > I think I've found an error in the imx7 ref. manual: the table at 6.6.6.3 > > 'QuadSPI > > configuration parameters' should be placed at offset 0x00

Re: barebox image for an spi flash (like m25p0) on an imx7 soc

2020-03-06 Thread Giorgio Dal Molin
Hi Sascha, excuse my difficult to read English. Here is the requested dump: imx7d: / md -s /dev/m25p0 1k+1k 0400: 402000d1 80001000 842c.. @,... 0410: 8420 8400 ... 0420: 8000 0007

Re: barebox image for an spi flash (like m25p0) on an imx7 soc

2020-03-06 Thread Sascha Hauer
On Fri, Mar 06, 2020 at 09:41:42AM +0100, Giorgio Dal Molin wrote: > Hi all, > > I've just double checked the reg=val entries I have in my DTD for the imx7d > but could not find anything wrong with it, it is very similar to the >

Re: barebox image for an spi flash (like m25p0) on an imx7 soc

2020-03-06 Thread Sascha Hauer
On Fri, Mar 06, 2020 at 11:11:16AM +0100, Giorgio Dal Molin wrote: > Hi, > > I think I've found an error in the imx7 ref. manual: the table at 6.6.6.3 > 'QuadSPI > configuration parameters' should be placed at offset 0x00 (the very beginning > of the > spi flash) and not at offset 0x400 as it

Re: barebox image for an spi flash (like m25p0) on an imx7 soc

2020-03-06 Thread Giorgio Dal Molin
Hi, I think I've found an error in the imx7 ref. manual: the table at 6.6.6.3 'QuadSPI configuration parameters' should be placed at offset 0x00 (the very beginning of the spi flash) and not at offset 0x400 as it is written on the ref. manual !!! This means, if I look at the hex dump of the

Re: barebox image for an spi flash (like m25p0) on an imx7 soc

2020-03-06 Thread Giorgio Dal Molin
Hi all, I've just double checked the reg=val entries I have in my DTD for the imx7d but could not find anything wrong with it, it is very similar to the 'arch/arm/mach-imx/include/mach/flash-header/imx7d-ddr-sabresd.imxcfg'. What I don't understand is the absolute address of the DTD present at

[PATCH v2] of: overlay: rework error message for symbols

2020-03-06 Thread Rouven Czerwinski
Missing symbols for overlay or root tree are valid if the overlay only adds paths to the device tree. The code handles this correctly, however it still isues a WARNING for the missing symbols. Demote the warning to info and move into the of_overlay_apply_symbols() function. Signed-off-by: Rouven