[PATCH v2 0/2] Allow parsing more than one memory node

2020-03-25 Thread Clement Leger
Currently, barebox can only parse one memory node. This means that all other memory nodes (with device_type == "memory") will be ignored while parsing memory. This patchset add a function of_probe_memory which will call of_add_memory for each found memory node. Additionally, of_add_memory has been

[PATCH v2 1/2] of: base: allow of_add_memory to be called multiple times

2020-03-25 Thread Clement Leger
Currently, of_add_memory can't be called multiple times because it will always create memory banks by restarting at value 0. This means that, when adding a second memory bank by calling again of_add_memory, it will be named ram0 and overwrite the previous one. Fix that by using a static variable

[PATCH v2 2/2] of: base: parse all available memory nodes

2020-03-25 Thread Clement Leger
Currently, barebox only parse one memory node which is either the "/memory" node or the first node with device_type == "memory". However, the use of multiple memory nodes with device_type = "memory" property is allowed by the device tree specification and already correctly parsed by Linux kernel.

Cross-compiling target tools

2020-03-25 Thread Yegor Yefremov
How should one compile the target tools like bareboxenv-target etc. I get the following error: ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -C debian/build make: Entering directory '/home/user/MyProjects/oss/bootloaders/barebox-upstream/debian/build' make[3]: 'include/generated/mach-types.h'

[PATCH 18/24] usb: net: Add support for the Asix AX88179

2020-03-25 Thread Sascha Hauer
This adds support for the Asix AX88179 USB3.0 ethernet converter chip. The driver is based on the kernel driver with influence from the U-Boot driver. Signed-off-by: Sascha Hauer --- drivers/net/usb/Kconfig| 11 + drivers/net/usb/Makefile | 1 + drivers/net/usb/ax88179_178a.c |

[PATCH 17/24] net: usb: add hook for link changes

2020-03-25 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- drivers/net/usb/usbnet.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 83e2c7a9e2..9ddbc50c0a 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@

[PATCH 20/24] usb: hub: Translate USB 3.0 hub port status into old version

2020-03-25 Thread Sascha Hauer
Adoption of U-Boot commit: | 1commit 74ffc7cbb1d2d1f218b1bd67d1bd3cc1cba8aa79 | Author: Bin Meng | Date: Wed Jul 19 21:51:12 2017 +0800 | | usb: hub: Translate USB 3.0 hub port status into old version | | USB 3.0 hub port status field has different bit positions from 2.0 | hubs.

[PATCH 01/24] usb: hub: Make debugging output more consistent

2020-03-25 Thread Sascha Hauer
Some of the messages print the port they belong to, others don't. Print the port consistently in all debugging messages. Also remove some stray '\' in the messages. Signed-off-by: Sascha Hauer --- drivers/usb/core/hub.c | 59 ++ 1 file changed, 31

[PATCH 05/24] usb: Pass portstatus/portchange to usb_hub_port_connect_change()

2020-03-25 Thread Sascha Hauer
portstatus/portchange have just been read in usb_scan_port(), there shouldn't be any need to read them again in usb_hub_port_connect_change(). Signed-off-by: Sascha Hauer --- drivers/usb/core/hub.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git

[PATCH 06/24] usb: hub: Do not power-cycle usb devices on init

2020-03-25 Thread Sascha Hauer
This is an adoption of U-Boot commit 0834bb2fb0 ("usb: Do not power-cycle usb devices on init") Signed-off-by: Sascha Hauer --- drivers/usb/core/hub.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 59354895df..6d664e80bb

[PATCH 07/24] usb: Make driver_info const

2020-03-25 Thread Sascha Hauer
driver_info shouldn't be changed, make it const. Signed-off-by: Sascha Hauer --- include/usb/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/usb/usb.h b/include/usb/usb.h index 95dedfd5b7..a9c34cdde4 100644 --- a/include/usb/usb.h +++ b/include/usb/usb.h @@

[PATCH 24/24] usb: Add U-Boot xhci driver

2020-03-25 Thread Sascha Hauer
This adds the xhci driver from U-Boot-2020.04-rc2. The usual things like adjusting to the barebox driver model and using dev_* instead of printf/puts/debug messages are made. The previously existing PCI support is not present in this driver currently. XHCI PCI support was not enabled in any

[PATCH 08/24] usb: Set new USB device name earlier

2020-03-25 Thread Sascha Hauer
in usb_new_device() set the device name as early as possible to let dev_* functions print a meaningful name. Signed-off-by: Sascha Hauer --- drivers/usb/core/usb.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/usb/core/usb.c

[PATCH 16/24] usb: net: Allocate tx buffer dynamically

2020-03-25 Thread Sascha Hauer
It's cleaner to have a tx buffer per device and not one for all. Signed-off-by: Sascha Hauer --- drivers/net/usb/usbnet.c | 20 +--- include/usb/usbnet.h | 1 + 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/net/usb/usbnet.c

[PATCH 03/24] usb: hub: let usb_scan_port() return void

2020-03-25 Thread Sascha Hauer
usb_scan_port() never returns anything else but 0, so let it return void. Signed-off-by: Sascha Hauer --- drivers/usb/core/hub.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index

[PATCH 21/24] usb: Add super speed support

2020-03-25 Thread Sascha Hauer
This adds the missing bits and pieces to add super speed support to the USB stack. It is based on the corresponding U-Boot code. Signed-off-by: Sascha Hauer --- drivers/usb/core/hub.c | 50 -- drivers/usb/core/usb.c | 25 -

[PATCH 11/24] usb: host: make init hook optional

2020-03-25 Thread Sascha Hauer
For controllers which do everything relevant during probe time make the init hook optional. Signed-off-by: Sascha Hauer --- drivers/usb/core/usb.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index

[PATCH 12/24] usb: support set hub depth request for USB 3.0 hubs

2020-03-25 Thread Sascha Hauer
This is an adoption of U-Boot commit bbc6f06c0031249bf1983b875e54cb7549bafe60: | commit bbc6f06c0031249bf1983b875e54cb7549bafe60 | Author: Bin Meng | Date: Wed Jul 19 21:51:13 2017 +0800 | | usb: hub: Support 'set hub depth' request for USB 3.0 hubs | | USB 3.0 hub uses a hub depth

[PATCH 04/24] usb: Remove hack from the early days

2020-03-25 Thread Sascha Hauer
The weird hack about "bad shielded USB devices" goes back to the initial U-Boot git commmit. Let's be bold and remove it 18 years later. Signed-off-by: Sascha Hauer --- drivers/usb/core/hub.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/usb/core/hub.c

[PATCH 19/24] usb: factor out a usb_setup_descriptor() function

2020-03-25 Thread Sascha Hauer
This factors out a usb_setup_descriptor() function with the goal to make the code better comparable to the corresponding U-Boot code. This also incorporates this U-Boot commit: | commit 2b338ef41127351089254b748de5cefd95c3e800 | Author: Hans de Goede | Date: Tue May 5 23:56:04 2015 +0200 | |

Re: am335x: load a kernel with integrated initramfs

2020-03-25 Thread Yegor Yefremov
On Wed, Mar 25, 2020 at 4:35 PM Yegor Yefremov wrote: > > On Wed, Mar 25, 2020 at 10:58 AM Sascha Hauer wrote: > > > > On Tue, Mar 24, 2020 at 05:21:16PM +0100, Yegor Yefremov wrote: > > > On Tue, Mar 24, 2020 at 8:35 AM Sascha Hauer > > > wrote: > > > > > > > > On Mon, Mar 23, 2020 at

Re: am335x: load a kernel with integrated initramfs

2020-03-25 Thread Yegor Yefremov
On Wed, Mar 25, 2020 at 10:58 AM Sascha Hauer wrote: > > On Tue, Mar 24, 2020 at 05:21:16PM +0100, Yegor Yefremov wrote: > > On Tue, Mar 24, 2020 at 8:35 AM Sascha Hauer wrote: > > > > > > On Mon, Mar 23, 2020 at 01:22:33PM +0100, Yegor Yefremov wrote: > > > > Hi Sascha, > > > > > > > > On Mon,

Re: [PATCH 15/24] usb: net: Allocate rx buffer dynamically

2020-03-25 Thread Jules Maselbas
Hi Sascha, > + undev->rx_buf = dma_alloc(undev->rx_urb_size); Looks like this buffer is never free, same for tx_buf. Best regards, Jules ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox

[PATCH 10/24] usb: hub: Parse and save TT details from device descriptor

2020-03-25 Thread Sascha Hauer
Adoption of U-Boot commit 5624dfd5aa91c244519ec60b40b4a42b4d9a43ca: | commit 5624dfd5aa91c244519ec60b40b4a42b4d9a43ca | Author: Bin Meng | Date: Wed Jul 19 21:51:16 2017 +0800 | | usb: hub: Parse and save TT details from device descriptor | | A high speed hub has a special

[PATCH 09/24] usb: Use dev_*

2020-03-25 Thread Sascha Hauer
Give the USB messages some context by using dev_* functions rather than printf()/debug(). Signed-off-by: Sascha Hauer --- drivers/usb/core/usb.c | 50 +- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/usb/core/usb.c

[PATCH 02/24] usb: hub: do not reset devices twice

2020-03-25 Thread Sascha Hauer
U-Boot has this since 3ed9eb93c2 ("usb: Don't reset the USB hub a 2nd time"), so do the same for barebox. Signed-off-by: Sascha Hauer --- drivers/usb/core/hub.c | 4 ++-- drivers/usb/core/hub.h | 7 --- drivers/usb/core/usb.c | 11 --- 3 files changed, 2 insertions(+), 20

[PATCH 14/24] usb: remove unnecessary variable

2020-03-25 Thread Sascha Hauer
"tmp" is only used to store the size of the descriptor. The name is not very meaningful and "tmp" is not even used everywhere it could be used. Just replace by using sizeof() directly where needed. Signed-off-by: Sascha Hauer --- drivers/usb/core/usb.c | 8 +++- 1 file changed, 3

[PATCH 00/24] USB3 support

2020-03-25 Thread Sascha Hauer
This series adds support for USB3 devices. The XHCI driver we currently have in barebox only supports USB2 devices or USB3 devices behind a USB2 cable or hub. We replace the XHCI driver with the one from U-Boot, this series contains the missing pieces to the USB layer to make that work. Also

[PATCH 13/24] usb: Assign dev_index once

2020-03-25 Thread Sascha Hauer
dev->devnum is set once in usb_alloc_new_device(), set to 0 again later in usb_new_device() and then set back to the original value. This seems unnecessary, just set devnum once right before calling usb_set_address() on the device. Signed-off-by: Sascha Hauer --- drivers/usb/core/usb.c | 14

[PATCH 15/24] usb: net: Allocate rx buffer dynamically

2020-03-25 Thread Sascha Hauer
Allocate an individual rx buffer per device in the size we need it instead of using one global buffer for all devices. Signed-off-by: Sascha Hauer --- drivers/net/usb/usbnet.c | 15 ++- include/usb/usbnet.h | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) diff --git

[PATCH 22/24] usb: hub: When no connection came up remove from scanning list

2020-03-25 Thread Sascha Hauer
When after a timeout no connection came up then we have not only bail out, but also remove the device from the scanning list. Otherwise it can happen that the list never becomes empty and we probe forever. Signed-off-by: Sascha Hauer --- drivers/usb/core/hub.c | 9 +++-- 1 file changed, 3

Re: [PATCH 1/2] of: base: parse all available memory nodes

2020-03-25 Thread Sascha Hauer
On Mon, Mar 23, 2020 at 11:31:26AM +0100, Ahmad Fatoum wrote: > Hi, > > On 3/23/20 11:21 AM, Clément Leger wrote: > >> AFAIK the device_type = "memory" property was mandatory in the early > >> days as well, there shouldn't be any /memory nodes without this > >> property. Given that, is the

[PATCH 1/3] kbuild: remove clean-dirs syntax

2020-03-25 Thread Masahiro Yamada
[ Linux comit 1634f2bfdb846ed0a8b73131a9dff7c420fb3fe1 ] The only the difference between clean-files and clean-dirs is the -r option passed to the 'rm' command. You can always pass -r, and then remove the clean-dirs syntax. Signed-off-by: Masahiro Yamada --- scripts/Makefile.clean | 15

[PATCH 2/5] regmap-mmio: Add big endian support

2020-03-25 Thread Sascha Hauer
Add support for parsing the big-endian device tree property. Signed-off-by: Sascha Hauer --- drivers/base/regmap/internal.h| 4 ++ drivers/base/regmap/regmap-mmio.c | 98 +-- drivers/base/regmap/regmap.c | 44 ++ include/regmap.h

[PATCH 1/5] regmap-mmio: Add missing pieces for 64bit support

2020-03-25 Thread Sascha Hauer
The 64bit accessor functions are present, but unused. Hook them up when needed. Signed-off-by: Sascha Hauer --- drivers/base/regmap/regmap-mmio.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/base/regmap/regmap-mmio.c b/drivers/base/regmap/regmap-mmio.c index

[PATCH 4/5] spi: Add fsl-dspi driver

2020-03-25 Thread Sascha Hauer
The fsl-dspi is found on Freescale Vybrid, Coldfire and Layerscape SoCs. This adds the driver based on the Linux driver as of v5.5. Coldfire support has been dropped as it's rather obsolete. Vybrid support has been dropped because it needs the DMA engine support we do not have in barebox. What's

[PATCH 3/5] spi: validate spi messages

2020-03-25 Thread Sascha Hauer
This adds __spi_validate() to validate spi messages. This function is a stripped down version from the Kernel. The motivation for adding this was to fill in xfer->bits_per_word from spi->bits_per_word so that a spi bus driver can use the former. Signed-off-by: Sascha Hauer --- drivers/spi/spi.c

[PATCH 5/5] mtd: spi-nor: Add support for cy15x104q

2020-03-25 Thread Sascha Hauer
The Cypress cy15b104q and cy15v104q are 4Mbit serial SPI F-RAM devices. Add support for them to the spi-nor driver. Signed-off-by: Sascha Hauer --- drivers/mtd/spi-nor/spi-nor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c

[PATCH 2/3] kbuild: change *FLAGS_.o to take the path relative to $(obj)

2020-03-25 Thread Masahiro Yamada
[ Linux commit 54b8ae66ae1a3454a7645d159a482c31cd89ab33 ] Kbuild provides per-file compiler flag addition/removal: CFLAGS_.o CFLAGS_REMOVE_.o AFLAGS_.o AFLAGS_REMOVE_.o CPPFLAGS_.lds HOSTCFLAGS_.o HOSTCXXFLAGS_.o The is the filename of the target with its directory and suffix

[PATCH 3/3] kconfig: update to Linux 5.5

2020-03-25 Thread Masahiro Yamada
The previous sync was Linux 5.3-rc3. This updates Kconfig to Linux 5.5. Signed-off-by: Masahiro Yamada --- scripts/kconfig/Makefile| 10 +++--- scripts/kconfig/conf.c | 13 - scripts/kconfig/expr.c | 7 +++ scripts/kconfig/mconf-cfg.sh| 3 +++

[PATCH 0/5] Add fsl-dspi driver support

2020-03-25 Thread Sascha Hauer
The fsl-dspi is a SPI core that is found on Freescale Layerscape SoCs. This series adds support for it. It uses regmap to access registers and it's connected in big-endian, so we need some regmap patches to support such maps. Sascha Hauer (5): regmap-mmio: Add missing pieces for 64bit support

Re: am335x: load a kernel with integrated initramfs

2020-03-25 Thread Sascha Hauer
On Tue, Mar 24, 2020 at 05:21:16PM +0100, Yegor Yefremov wrote: > On Tue, Mar 24, 2020 at 8:35 AM Sascha Hauer wrote: > > > > On Mon, Mar 23, 2020 at 01:22:33PM +0100, Yegor Yefremov wrote: > > > Hi Sascha, > > > > > > On Mon, Mar 23, 2020 at 9:30 AM Sascha Hauer > > > wrote: > > > > > > > > Hi