Re: network configuration setup - dhcp

2021-04-16 Thread Neeraj Pal
Hi, I successfully configured the networking on sandbox env. So, below are the steps for anyone in need. On host (ubuntu) - ip link show => barebox virtual ethernet device will be listed - sudo brctl addif virbr0 barebox => I already have virtual br0 "virbr0" for Qemu so I have used that to

Re: network configuration setup - dhcp

2021-04-16 Thread Neeraj Pal
Sorry missed, Network info: barebox@Sandbox:/ devinfo eth0 Parent: tap0 Parameters: ethaddr: 9e:47:e0:0b:cb:ab (type: MAC) gateway: 0.0.0.0 (type: ipv4) ipaddr: 0.0.0.0 (type: ipv4) linux.bootargs: (type: string) linux.devname: (type: string) mode: dhcp (type: enum) (values: "dhcp",

Re: network configuration setup - dhcp

2021-04-16 Thread Neeraj Pal
Hi, On Wed, Apr 14, 2021 at 12:37 AM Ahmad Fatoum wrote: > > There is more documentation besides the README. For networking see > https://barebox.org/doc/latest/user/networking.html Thank you for the documentation. I read them and configured the values but it is not working, so it may be

[PATCH v2] usb: storage: retry for up to 10s on lengthy HDD spin up

2021-04-16 Thread Ahmad Fatoum
Some USB disks take notoriously long to spin up. They are seen by a bus scan, but they report ready only after a few seconds have passed. This is not a problem if vbus is enabled early on, so devices have had a chance to spin up. If vbus is first enabled as part of the usb scan, not enough time

[PATCH 16/17] ARM: i.MX Phytec physom: convert to board driver

2021-04-16 Thread Sascha Hauer
Board driver is the new way for board specific fixups and the physom board with its many compatible strings can really take profit from it, so convert it. Signed-off-by: Sascha Hauer --- arch/arm/boards/phytec-som-imx6/board.c | 150 ++-- 1 file changed, 117 insertions(+),

[PATCH 03/17] of: platform: Keep track of populated platform devices

2021-04-16 Thread Sascha Hauer
From: Marco Felsch Linux does not allow to populate the same of device more than once. Linux uses the OF_POPULATED flag for that purpose. Align the logic with the current linux state with the exception that we are returning the already created device. This is needed for the later added

[PATCH 17/17] ARM: i.MX Phytec physom: Add deep-probe support

2021-04-16 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- arch/arm/boards/phytec-som-imx6/board.c | 21 + 1 file changed, 21 insertions(+) diff --git a/arch/arm/boards/phytec-som-imx6/board.c b/arch/arm/boards/phytec-som-imx6/board.c index 36c4d9a78b..a108726468 100644 ---

[PATCH 05/17] of: base: move clock init from of_probe() to barebox_register_of()

2021-04-16 Thread Sascha Hauer
From: Marco Felsch This is required for the new deep-probe mechanism. Barebox deep-probe calls of_probe() very late and so clock drivers using the old CLK_OF_DECLARE_DRIVER() mechanism are added very late. This would break the deep-probe approach. Move of_clk_init() and call it right before

[PATCH 02/17] of: platform: remove check of already added devices

2021-04-16 Thread Sascha Hauer
From: Marco Felsch This check is a relict of the early barebox device tree days, where devices were added by machine and/or board code too. The check ensured too not populate the same device twice. Nowadays _real_ hardware devices (devices with hardware resources) which are not auto enumerable

[PATCH 11/17] common: Explicitly probe consoles earlier with deep probe

2021-04-16 Thread Sascha Hauer
With deep probe support the device providing the console can come quite late in the probe order. Make sure it's probed at postconsole_initcall time as it used to be without deep probe support so that we get output earlier. Signed-off-by: Sascha Hauer --- drivers/of/platform.c | 17

[PATCH 15/17] ARM: boards: mx6-sabrelite: add deep-probe support

2021-04-16 Thread Sascha Hauer
From: Marco Felsch Explicit request the required gpio resources instead of relying on their existence based on the initcall level. Signed-off-by: Marco Felsch Link: https://lore.pengutronix.de/20201021115813.31645-11-m.fel...@pengutronix.de Signed-off-by: Sascha Hauer ---

[PATCH 06/17] of: Set of_chosen and of_model earlier

2021-04-16 Thread Sascha Hauer
of_chosen and of_model can be set once we have the device tree root node, no need to wait until we probe the tree. Signed-off-by: Sascha Hauer --- drivers/of/base.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index

[PATCH 09/17] common: add initial barebox deep-probe support

2021-04-16 Thread Sascha Hauer
From: Marco Felsch The barebox 'deep probe' or 'probe on demand' mechanism is the answer of unwanted -EPROBE_DEFER failures. The EPROBE_DEFER error code was introduced by commit ab3da15bc14c ("base: Introduce deferred probing") and since then it causes a few problems. The error is returned if

[PATCH 08/17] initcall: add of_populate_initcall

2021-04-16 Thread Sascha Hauer
From: Marco Felsch Add dedicated initcall for of_probe() which is required for the following device-on-demand/deep-probe mechanism. Signed-off-by: Marco Felsch Link: https://lore.pengutronix.de/20201021115813.31645-7-m.fel...@pengutronix.de Signed-off-by: Sascha Hauer ---

[PATCH 13/17] ARM: i.MX: esdctl: add deep-probe support

2021-04-16 Thread Sascha Hauer
From: Marco Felsch In case of deep-probe we have to ensure that the memory device is available after the mem_initcall(). Signed-off-by: Marco Felsch Link: https://lore.pengutronix.de/20201021115813.31645-9-m.fel...@pengutronix.de Signed-off-by: Sascha Hauer --- arch/arm/mach-imx/esdctl.c |

[PATCH 14/17] ARM: stm32mp: ddrctrl: add deep-probe support

2021-04-16 Thread Sascha Hauer
From: Marco Felsch In case of deep-probe we have to ensure that the memory device is available after the mem_initcall(). Signed-off-by: Marco Felsch Link: https://lore.pengutronix.de/20201021115813.31645-10-m.fel...@pengutronix.de Signed-off-by: Sascha Hauer ---

[PATCH 01/17] imx53: remove unused imx53_add_nand

2021-04-16 Thread Sascha Hauer
From: Marco Felsch The TX53 board was the last user of this function. This board was converted to device tree based boot by commit 971366078893 ("i.MX53/TX53: rework to dts based boot") so we can remove this legacy helper. Signed-off-by: Marco Felsch Link:

[PATCH 04/17] of: base: move memory init from DT to initcall

2021-04-16 Thread Sascha Hauer
From: Lucas Stach Instead of calling it from of_probe, convert it to a initcall at the appropriate level. This allows to move of_probe to later in the init sequence while keeping the memory init at the same place, which is important as many other drivers need the valid memory area to be set up

[PATCH v4 00/17] barebox deep probe support

2021-04-16 Thread Sascha Hauer
Hi All, This is the fourth round of patches for barebox deep-probe support. I picked up the series from Marco, it has the things fixed I mentioned during the last review and some other improvements: Changes since v3: - Add deep-probe support for pinctrl - Port over Phytec Physom to

[PATCH 07/17] of: implement of_get_stdoutpath()

2021-04-16 Thread Sascha Hauer
For deep probe support it will be useful to have a function to get the node corresponding to the stdoutpath. of_device_is_stdout_path() already has that functionality in it, so make a separate funcion from it. Signed-off-by: Sascha Hauer --- drivers/of/base.c | 15 ++- include/of.h

[PATCH 10/17] pinctrl: Find controller node first

2021-04-16 Thread Sascha Hauer
The pinctrl controller node is the first parent node that has a compatible property. Use that information to find the node without iterating up to the root node. Signed-off-by: Sascha Hauer --- drivers/pinctrl/pinctrl.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git

[PATCH 12/17] pinctrl: Add deep probe support

2021-04-16 Thread Sascha Hauer
This adds deep probe support for pinctrl. Signed-off-by: Sascha Hauer --- drivers/pinctrl/pinctrl.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl.c b/drivers/pinctrl/pinctrl.c index 84ac61f2d9..7e88391ff3 100644 ---

[PATCH] scripts/spdxcheck.py: Use Python 3

2021-04-16 Thread Antony Pavlov
Based on this linux kernel commit: > commit d0259c42abff51b586496a0594933e394efefbc5 > Author: Bert Vermeulen > Date: Thu Jan 21 09:54:12 2021 +0100 > >spdxcheck.py: Use Python 3 > >Python 2.x has been officially EOL'ed for some time, and in any case >the git module for it is hard

[PATCH 3/4] pci: add EFI PCI root bridge IO protocol driver

2021-04-16 Thread Ahmad Fatoum
UEFI specifies two protocols for abstracting both the PCI host bus controller and for PCI devices. The protocol for PCI devices provides function pointers for accessing IO Port, Memory and PCI configuration space, among others. The protocol for bus controllers provides the ability to read the root

[PATCH 2/4] PCI: support PCI BIOS preassigned buses

2021-04-16 Thread Ahmad Fatoum
When running under UEFI, barebox should no redo PCI enumeration, because the UEFI implementation will likely already have drivers that won't cope with e.g. BAR addresses changing. The user-visible effect of this is that likely the framebuffer will stop working because the UEFI driver won't be

[PATCH 4/4] watchdog: add support for Intel TCO watchdog timer

2021-04-16 Thread Ahmad Fatoum
Variants of the iTCO are integrated into many Intel southbridges. They are most often accessed via PCI. Add a driver for the variant found in the q35 QEMU machine. It should be straight forward to extend the itco_chipset_info array to support more variants in future as the need arises. To test,

[PATCH 1/4] x86: add DMA support

2021-04-16 Thread Ahmad Fatoum
Both interconnect and PCI are cache coherent on x86, so we shouldn't need any special CPU barriers for DMA. Indeed, Linux defined neither ARCH_HAS_SYNC_DMA_FOR_CPU nor ARCH_HAS_SYNC_DMA_FOR_DEVICE on x86. It thus seems that the only reordering we need to take care of is compiler-induced

[PATCH 0/4] x86: add EFI PCI host and iTCO watchdog support

2021-04-16 Thread Ahmad Fatoum
v1 is here: https://lore.barebox.org/barebox/20191204125659.22506-1-a.fat...@pengutronix.de/ Series tested with: * QEMU q35: ns16550 serial, iTCO and virtio-pci * Dell Latitude 7490: Bus enumeration works correctly v1 -> v2: - add DMA helpers, so the new virtio-pci support is usable on x86