Re: [PATCH 0/3] test: Try to deal with some co-dependent tests

2021-02-07 Thread Heinrich Schuchardt
On 2/8/21 5:05 AM, Simon Glass wrote: Tests are supposed to be independent. With driver model tests, the environment is reset before each test, which ensures that. With Python tests there is no reset of the board between tests, since we want to run all the tests as quickly as possible and withou

Re: arm64: rk3399: Add support nanopi r4s

2021-02-07 Thread Chen-Yu Tsai
Hi, On Mon, Feb 8, 2021 at 9:46 AM alex tian wrote: > > From 01598339be9dbeec6ba41c470b29af1c53e29c40 Mon Sep 17 00:00:00 2001 > From: Xiaobo Tian > Date: Mon, 8 Feb 2021 09:40:03 +0800 > Subject: [PATCH] arm64: rk3399: Add support NanoPi R4s Please tag patches with versions or "resent" if no c

[PATCH] sunxi: Remove dead ifdefs in sunxi-common.h

2021-02-07 Thread Samuel Holland
As variables were moved to Kconfig, some of the surrounding ifdefs were left around, even though they were empty. Clean them up. Signed-off-by: Samuel Holland --- include/configs/sunxi-common.h | 15 --- 1 file changed, 15 deletions(-) diff --git a/include/configs/sunxi-common.h b/i

[PATCH 1/2] sunxi: binman: Respect the default FIT configuration

2021-02-07 Thread Samuel Holland
binman can fill in the default FIT configuration index as selected by the "default-dt" argument, which is set to CONFIG_DEFAULT_DEVICE_TREE. Let's respect the user's configuration by taking advantage of this feature, instead of always defaulting to the first device tree in CONFIG_OF_LIST. Signed-o

[PATCH 2/2] sunxi: binman: Do not hardcode U-Boot load address

2021-02-07 Thread Samuel Holland
The FIT description has access to the configuration variables. Use the appropriate variable instead of hardcoding the address. Signed-off-by: Samuel Holland --- arch/arm/dts/sunxi-u-boot.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arc

[PATCH 4/6] usb: xhci-pci: Move reset logic out of XHCI core

2021-02-07 Thread Samuel Holland
Resetting an XHCI controller inside xhci_register undoes any register setup performed by the platform driver. And at least on the Allwinner H6, resetting the XHCI controller also resets the PHY, which prevents the controller from working. That means the controller must be taken out of reset before

[PATCH 3/6] phy: sun50i-usb3: Add a driver for the H6 USB3 PHY

2021-02-07 Thread Samuel Holland
This driver is needed for XHCI to work on the Allwinner H6 SoC. The driver is copied from Linux v5.10. Signed-off-by: Samuel Holland --- drivers/phy/allwinner/Kconfig | 8 ++ drivers/phy/allwinner/Makefile | 1 + drivers/phy/allwinner/phy-sun50i-usb3.c | 171 ++

[PATCH 5/6] usb: xhci-dwc3: Add support for clocks/resets

2021-02-07 Thread Samuel Holland
Some platforms, like the Allwinner H6, do not have a separate glue layer around the dwc3. Instead, they rely on the clocks/resets/phys referenced from the dwc3 DT node itself. Add support for enabling the clocks/resets referenced from the dwc3 DT node. Signed-off-by: Samuel Holland --- drivers/u

[PATCH 1/6] clk: sunxi: Add a dummy clock driver for the RTC

2021-02-07 Thread Samuel Holland
The 32kHz clock ("LOSC") on sunxi SoCs is provided by the RTC. It is used, among other things, by the XHCI controller in the H6. To be able to call clk_get_bulk() on the XHCI controller, some device needs to provide all referenced clocks. Since LOSC is a fixed-rate always-on clock, implementation

[PATCH 6/6] configs: Enable USB3 on Allwinner H6 boards

2021-02-07 Thread Samuel Holland
Pine H64 and Orange Pi 3 both provide a USB3 type A port. Enable it in U-Boot. Signed-off-by: Samuel Holland --- configs/orangepi_3_defconfig | 5 + configs/pine_h64_defconfig | 5 + 2 files changed, 10 insertions(+) diff --git a/configs/orangepi_3_defconfig b/configs/orangepi_3_defco

[PATCH 0/6] Allwinner H6 USB3 support

2021-02-07 Thread Samuel Holland
This series adds clock, PHY, and XHCI driver support for the USB3 controller found in the Allwinner H6 SoC. Below is a log showing it functioning on the Orange Pi 3. Cheers, Samuel U-Boot 2021.04-rc1-00068-g6b8f4e0d060 (Jan 01 1970 - 00:00:00 +) Allwinner Technology CPU: Allwinner H6 (SUN

[PATCH 2/6] clk: sunxi: h6: Add XHCI clocks

2021-02-07 Thread Samuel Holland
The XHCI controller has its own clock and reset. Add them. Signed-off-by: Samuel Holland --- drivers/clk/sunxi/clk_h6.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clk/sunxi/clk_h6.c b/drivers/clk/sunxi/clk_h6.c index ac8656fe895..df93d96b3b0 100644 --- a/drivers/clk/sunxi/clk_

Re: [PATCH v4 8/9] fastboot: Allow u-boot-style partitions

2021-02-07 Thread Heiko Schocher
Hello Sean, Lukasz, On 07.02.21 00:49, Sean Anderson wrote: > On 2/6/21 12:37 PM, Lukasz Majewski wrote: >> Hi Sean, >> >>> On 2/5/21 9:46 AM, Lukasz Majewski wrote: >>>   > Hi Sean, >>>   > >>>   >> This adds support for partitions of the form "dev.hwpart:part" and >>>   >> "dev#partname". This a

Re: [PATCH 03/26] common: fdt_support: Support special case of PCI address in fdt_read_prop()

2021-02-07 Thread Bin Meng
Hi Simon, On Mon, Feb 8, 2021 at 12:21 PM Simon Glass wrote: > > Hi Bin, > > On Sun, 7 Feb 2021 at 08:11, Bin Meng wrote: > > > > At present fdt_read_prop() can only handle 1 or 2 cells. It is > > called by fdt_read_range() which may be used to read PCI address > > from for a PCI bus node where

Re: [PATCH 13/26] cmd: Add a command to display the address map

2021-02-07 Thread Bin Meng
Hi Simon, On Mon, Feb 8, 2021 at 12:20 PM Simon Glass wrote: > > On Sun, 7 Feb 2021 at 08:12, Bin Meng wrote: > > > > This adds a new command 'addrmap' to display the address map for > > non-identity virtual-physical memory mappings. > > > > Signed-off-by: Bin Meng > > --- > > > > cmd/Kconfig

Re: [PATCH 23/26] cmd: Fix virtio command dependency

2021-02-07 Thread Simon Glass
On Sun, 7 Feb 2021 at 08:13, Bin Meng wrote: > > The 'virtio' command calls blk_common_cmd() which is only available > when CONFIG_HAVE_BLOCK_DEVICE is on. Fix the Kconfig dependency. > > Signed-off-by: Bin Meng > --- > > cmd/Kconfig | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Simon Gl

Re: [PATCH 14/26] lib: kconfig: Mention CONFIG_ADDR_MAP limitation in the help

2021-02-07 Thread Simon Glass
On Sun, 7 Feb 2021 at 08:12, Bin Meng wrote: > > Mention that CONFIG_ADDR_MAP only works in the post-relocation phase. > > Signed-off-by: Bin Meng > --- > > lib/Kconfig | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Simon Glass

Re: [PATCH 16/26] common: Move initr_addr_map() to a bit earlier

2021-02-07 Thread Simon Glass
On Sun, 7 Feb 2021 at 08:12, Bin Meng wrote: > > At present initr_addr_map() is put at a late stage in the > init_sequence_r[] calls. This won't work because lot of > device driver initialization (e.g.: serial port) happens > before it but is lack of the address translation support. > > This moves

Re: [PATCH 03/26] common: fdt_support: Support special case of PCI address in fdt_read_prop()

2021-02-07 Thread Simon Glass
Hi Bin, On Sun, 7 Feb 2021 at 08:11, Bin Meng wrote: > > At present fdt_read_prop() can only handle 1 or 2 cells. It is > called by fdt_read_range() which may be used to read PCI address > from for a PCI bus node where the number of PCI address > cell is 3. > > This adds the special handling of

Re: [PATCH v3] video: sunxi_display: Convert to DM_VIDEO

2021-02-07 Thread Simon Glass
Hi Andre, On Sun, 7 Feb 2021 at 18:37, Andre Przywara wrote: > > On Sun, 7 Feb 2021 07:37:34 -0700 > Simon Glass wrote: > > Hi Simon, > > > On Thu, 4 Feb 2021 at 18:08, Andre Przywara wrote: > > > > > > From: Jagan Teki > > > > > > DM_VIDEO migration deadline is already expired, but around > >

Re: [PATCH 12/26] lib: addr_map: Move address_map[] type to the header file

2021-02-07 Thread Simon Glass
On Sun, 7 Feb 2021 at 08:12, Bin Meng wrote: > > At present address_map[] is static and its type is unknown to external > modules. In preparation to create a command to list its contents, this > patch moves its type definition and declaration to the header file. > > Signed-off-by: Bin Meng > ---

Re: [PATCH 17/26] ppc: qemu: Switch over to use DM serial

2021-02-07 Thread Simon Glass
On Sun, 7 Feb 2021 at 08:12, Bin Meng wrote: > > The QEMU ppce500 target integrates 2 NS16550 serial ports. Switch > over to use the DM version of the driver by: > > - drop unnecessary ad-hoc config macros > - add get_serial_clock() in the board codes > > Signed-off-by: Bin Meng > --- > > board/

Re: [PATCH 26/26] doc: Add a reST document for qemu-ppce500

2021-02-07 Thread Simon Glass
On Sun, 7 Feb 2021 at 08:13, Bin Meng wrote: > > Add a reST document to describe how to build and run U-Boot for > the QEMU ppce500 machine. > > Signed-off-by: Bin Meng > > --- > > doc/board/emulation/index.rst| 1 + > doc/board/emulation/qemu-ppce500.rst | 73 > +++

Re: [PATCH 11/26] include: Remove extern from addr_map.h

2021-02-07 Thread Simon Glass
On Sun, 7 Feb 2021 at 08:12, Bin Meng wrote: > > Remove the extern of the header because they are useless. > > Signed-off-by: Bin Meng > --- > > include/addr_map.h | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Simon Glass

Re: [PATCH 13/26] cmd: Add a command to display the address map

2021-02-07 Thread Simon Glass
On Sun, 7 Feb 2021 at 08:12, Bin Meng wrote: > > This adds a new command 'addrmap' to display the address map for > non-identity virtual-physical memory mappings. > > Signed-off-by: Bin Meng > --- > > cmd/Kconfig | 7 +++ > cmd/Makefile | 1 + > cmd/addrmap.c | 35 ++

Re: [PATCH 09/26] ppc: qemu: Enable OF_CONTROL

2021-02-07 Thread Simon Glass
On Sun, 7 Feb 2021 at 08:12, Bin Meng wrote: > > The QEMU ppce500 machine generates a device tree blob and passes > it to U-Boot during boot. Let's enable OF_CONTROL with OF_BOARD > and provide board_fdt_blob_setup() in the board codes. > > Signed-off-by: Bin Meng > --- > > board/freescale/qemu-

Re: [PATCH 10/26] ppc: qemu: Enable driver model

2021-02-07 Thread Simon Glass
On Sun, 7 Feb 2021 at 08:12, Bin Meng wrote: > > At present QEMU ppce500 target has not been migrated to driver model > yet. As a start, let's enable driver model and the 'dm' command. > > Signed-off-by: Bin Meng > --- > > configs/qemu-ppce500_defconfig | 2 ++ > 1 file changed, 2 insertions(+)

Re: [PATCH 02/26] ppc: qemu: Update MAINTAINERS for correct email address

2021-02-07 Thread Simon Glass
On Sun, 7 Feb 2021 at 08:11, Bin Meng wrote: > > Alex's previous email address is no longer reachable. > > Signed-off-by: Bin Meng > --- > > board/freescale/qemu-ppce500/MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Simon Glass

[PATCH v3 42/42] x86: apl: Use read-only SPL and new of-platdata

2021-02-07 Thread Simon Glass
With Apollo Lake, SPL is placed in read-only memory. Set this new option so that OF_PLATDATA_INST can be used. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/apollolake/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/cpu/apollolake/Kconfig b/arch/x86/c

[PATCH v3 41/42] x86: coral: Drop TPM and ACPI interrupts from TPL

2021-02-07 Thread Simon Glass
These devices are not actually built in TPL but are currently active in the TPL devicetree. For of-platdata-inst this means that we will try to generate devices for them, which fails. Update them to be active only in U-Boot proper. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch t

[PATCH v3 40/42] x86: coral: Drop ACPI properties from of-platdata

2021-02-07 Thread Simon Glass
We don't use these in TPL or SPL, so drop them. Signed-off-by: Simon Glass --- Changes in v3: - Don't drop 'ranges' since we use the full PCI driver in SPL configs/chromebook_coral_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/chromebook_coral_defconfig b/configs/chrom

[PATCH v3 38/42] x86: Support a fake PCI device with of-platdata-inst

2021-02-07 Thread Simon Glass
With TPL we don't need full PCI support and it adds to code size. Instead, a simple_bus driver is good enough to be able to read and write the PCI config and do a little basic setup. So at present there are two drivers in U-Boot called pci_x86. One is in UCLASS_PCI, used in SPL and U-Boot proper.

[PATCH v3 39/42] x86: Don't include reset driver in SPL

2021-02-07 Thread Simon Glass
We don't normally need this driver in TPL/SPL, so drop it for now. It can be enabled by individual boards if needed. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/dts/reset.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/dts/reset.dtsi b/arch/x

[PATCH v3 37/42] x86: itss: Tidy up bind() for of-platdata-inst

2021-02-07 Thread Simon Glass
With the standard of-platdata we must fix up driver_data manually. With of-platadata-inst this is not necessary, since it is added to the device by dtoc. Update the code to handle this. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/intel_common/itss.c | 5 +++-- 1 file cha

[PATCH v3 33/42] dm: doc: Add documentation for of-platdata-inst

2021-02-07 Thread Simon Glass
Add a description of the new features, along with internal technical documentation. Signed-off-by: Simon Glass --- Changes in v3: - Add documentation for of-platdata-inst doc/driver-model/of-plat.rst | 587 +++ 1 file changed, 587 insertions(+) diff --git a/doc

[PATCH v3 36/42] x86: apl: Tell of-platdata about a required header file

2021-02-07 Thread Simon Glass
This enum is needed to generate build-time devices. Tell dtoc where to find the header, to avoid compile errors in the generated code. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/apollolake/punit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/cpu/apollolak

[PATCH v3 35/42] x86: apl: Fix the header order in pmc

2021-02-07 Thread Simon Glass
The dm.h header should come first. In fact it needs to, since otherwise the driver model definitions are not available to dt-structs.h Fix this, since it causes problems with OF_PLATDATA_INST. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/apollolake/pmc.c | 2 +- 1 file ch

[PATCH v3 31/42] dm: core: Add warnings to private / platform setters

2021-02-07 Thread Simon Glass
Add a warning to each of these functions so that people do not attempt to use them outside driver model. Signed-off-by: Simon Glass --- Changes in v3: - Aew patch with warnings for private / platform setters include/dm/device-internal.h | 18 ++ include/dm/uclass-internal.h |

[PATCH v3 32/42] dm: doc: Tidy up of-platdata docs

2021-02-07 Thread Simon Glass
This doc has a few pieces that are out-of-date. Fix these. Also we have started to use 'devicetree' instead of 'device tree' or 'device-tree' since it is easier to see as a single term, so replace all ocurrences accordingly. Also move the caveats to the end, since this is a fairly solid part of U-

[PATCH v3 34/42] x86: Define a region for device priv/plat data

2021-02-07 Thread Simon Glass
Collect this together in one place, so driver model can access set it up in a new place if needed. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/u-boot-spl.lds | 8 1 file changed, 8 insertions(+) diff --git a/arch/x86/cpu/u-boot-spl.lds b/arch/x86/cpu/u-boot-spl.

[PATCH v3 30/42] dm: core: Use separate priv/plat data region

2021-02-07 Thread Simon Glass
Make use of the new priv/plat data region if enabled. This is implemented as a simple offset from the position set up by dtoc to the new position. So long as all access goes through dm_priv_to_rw() this is safe. Signed-off-by: Simon Glass --- (no changes since v1) drivers/core/device.c | 12 +

[PATCH v3 28/42] dm: core: Allow storing priv/plat data separately

2021-02-07 Thread Simon Glass
At present the device priv/data data allocated by dtoc is stored in the data section along with other variables. On some platforms it is better to allocate space for it separately, e.g. if SPL is running from read-only memory. Create a new space with the same size as that allocated by dtoc, ready

[PATCH v3 26/42] dm: core: Create a struct for device runtime info

2021-02-07 Thread Simon Glass
At present when driver model needs to change a device it simply updates the struct udevice structure. But with of-platdata-inst most of the fields are not modified at runtime. In fact, typically only the flags need to change. For systems running SPL from read-only memory it is convenient to separa

[PATCH v3 24/42] azure/gitlab: Add tests for sandbox_noinst

2021-02-07 Thread Simon Glass
Add this new board to the test plans. Travis-CI is left out, since it is being removed soon due to lack of capacity. Signed-off-by: Simon Glass --- (no changes since v1) .azure-pipelines.yml | 3 +++ .gitlab-ci.yml | 10 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff

[PATCH v3 23/42] test: Run sandbox_spl tests on sandbox_noinst

2021-02-07 Thread Simon Glass
Run the tests on this build too, to prevent regressions. Signed-off-by: Simon Glass --- (no changes since v1) test/run | 4 1 file changed, 4 insertions(+) diff --git a/test/run b/test/run index 735628e7e37..869406cd8d2 100755 --- a/test/run +++ b/test/run @@ -30,6 +30,10 @@ fi run_test

[PATCH v3 22/42] sandbox: Create a new sandbox_noinst build

2021-02-07 Thread Simon Glass
Move sandbox_spl over to use OF_PLATDATA_INST. Create a new board to test the case when this is not enabled, since we will be keeping that code around for several months and want to avoid regressions. Skip the dm_test_of_plat_dev() test since driver info is not available for OF_PLATDATA_INST. Sig

[PATCH v3 29/42] sandbox: Define a region for device priv/plat data

2021-02-07 Thread Simon Glass
Collect this together in one place, so driver model can access set it up in a new place if needed. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/cpu/u-boot-spl.lds | 8 1 file changed, 8 insertions(+) diff --git a/arch/sandbox/cpu/u-boot-spl.lds b/arch/sandbox/cpu

[PATCH v3 27/42] dm: core: Move flags to device-runtime info

2021-02-07 Thread Simon Glass
When of-platdata-inst is active, use the flags in the new udevice_rt table, dropping them from the main struct udevice. This ensures that the latter is not updated at runtime. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Leave the flags_ memeber in the same struct posit

[PATCH v3 25/42] dm: core: Add an option to support SPL in read-only memory

2021-02-07 Thread Simon Glass
Some systems (e.g. x86 APL) run SPL from read-only memory. The device instances created by dtoc are therefore not writeable. To make things work we would need to copy the devices to read/write memory. To avoid this, add an option to use a separate runtime struct for devices, just as is done for dr

[PATCH v3 21/42] Revert "sandbox: Disable I2C emulators in SPL"

2021-02-07 Thread Simon Glass
With recent changes this can be supported again. Add it back. This reverts commit d85f2c4f2970d0ec2f5f075de734afd11200d153. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/dts/sandbox.dtsi | 10 +++--- configs/sandbox_spl_defconfig | 1 + drivers/i2c/Makefile |

[PATCH v3 20/42] sandbox: i2c: Support i2c emulation with of-platdata

2021-02-07 Thread Simon Glass
At present the i2c emulators require access to the devicetree, which is not possible (by design) with of-platdata. Add a way for drivers to record the of-platdata index of their emulator, so that we can still find the emulator. This allows i2c emulation to work with of-platdata. Signed-off-by: S

[PATCH v3 19/42] sandbox_spl: Increase SPL malloc() size

2021-02-07 Thread Simon Glass
The test framework reinits driver model tests before running each test. Since malloc_simple does not support free(), this eventually runs out of memory. Fix it for now by increasing the space to 32KB. Signed-off-by: Simon Glass Reviewed-by: Heinrich Schuchardt --- (no changes since v1) confi

[PATCH v3 17/42] sandbox: i2c: Move platdata structs to header files

2021-02-07 Thread Simon Glass
At present the structs used by these drivers are declared in the C files and so are not accessible to dtoc. Move them to header files, as required. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/include/asm/i2c.h | 15 +++ arch/sandbox/include/asm/rtc.h | 24

[PATCH v3 18/42] dm: Rename device_get_by_driver_info_idx()

2021-02-07 Thread Simon Glass
This function finds a device by its driver_info index. With of-platdata-inst we do not use driver_info, but instead instantiate udevice records at build-time. However the semantics of using the function are the same in each case: the caller provides an index and gets back a device. So rename the

[PATCH v3 15/42] dm: core: Drop device_get_by_driver_info()

2021-02-07 Thread Simon Glass
This function is now only used in a test. Drop it. Also drop DM_DRVINFO_GET() which was the only purpose for having the function. Signed-off-by: Simon Glass --- Changes in v3: - Drop DM_DRVINFO_GET() also drivers/core/device.c | 15 --- include/dm/device.h | 15 --- i

[PATCH v3 16/42] dm: core: Drop uclass_find_device_by_phandle() with of-platdata

2021-02-07 Thread Simon Glass
At present this function is included in the build but with of-platdata it only services to produce a confusing link error complaining about a call to dev_read_u32_default(). Drop it so that any call to uclass_find_device_by_phandle() is flagged as an error, making it easier to see what is going on

[PATCH v3 14/42] clk: sandbox: Create a special fixed-rate driver

2021-02-07 Thread Simon Glass
Create a version of this driver for sandbox so that it can use the of-platdata struct. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/dts/sandbox.dtsi | 2 +- arch/sandbox/include/asm/clk.h | 8 drivers/clk/clk_sandbox.c | 33

[PATCH v3 13/42] clk: fixed-rate: Export driver parts for OF_PLATDATA_INST

2021-02-07 Thread Simon Glass
We need to allow SoCs to create their own drivers for this so that they can use their own of-platdata structs. To minimise code duplication, export the driver operations and the ofdata_to_plat() setup function. Signed-off-by: Simon Glass --- (no changes since v1) drivers/clk/clk_fixed_rate.c |

[PATCH v3 11/42] dm: test: Avoid destroying uclasses with of-platdata-inst

2021-02-07 Thread Simon Glass
It is not possible to destroy the uclasses when they are created at build time. Skip this step so that SPL test can complete successfully. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Update to deal with test refactoring series test/test-main.c | 30 ++

[PATCH v3 12/42] clk: sandbox: Move priv/plat data to a header file

2021-02-07 Thread Simon Glass
At present the structs used by this driver are not accessible outside it, so cannot be used with OF_PLATDATA_INST. Move them to a header file to fix this. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/include/asm/clk.h | 16 drivers/clk/clk_sandbox.c |

[PATCH v3 10/42] dm: core: Include dt-decl.h automatically

2021-02-07 Thread Simon Glass
When dt-structs.h is used, include the dt-decl.h header as well, so that these declarations are available. Signed-off-by: Simon Glass --- (no changes since v1) include/dt-structs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/dt-structs.h b/include/dt-structs.h index f0e1c9cb9

[PATCH v3 08/42] dm: core: Skip adding uclasses with OF_PLATDATA_INST

2021-02-07 Thread Simon Glass
There is no need to ever add new uclasses since these are set up at build time. Update the code to return an error if this is attempted. Signed-off-by: Simon Glass --- (no changes since v1) drivers/core/uclass.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/co

[PATCH v3 09/42] dm: Add the new dtoc-generated files to the build

2021-02-07 Thread Simon Glass
Now that dtoc generates some new C files, add these to the build so that the instantiated devices and uclasses can be used. Signed-off-by: Simon Glass --- (no changes since v1) scripts/Makefile.spl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.spl b/scr

[PATCH v3 07/42] dm: core: Set up driver model for OF_PLATDATA_INST

2021-02-07 Thread Simon Glass
With this we don't need to scan and bind drivers, not even the root device. We just need to locate the root device that was set up at build time, then set our root in global_data to point to it. Update the code to handle this case. Signed-off-by: Simon Glass --- (no changes since v1) drivers/

[PATCH v3 05/42] dm: core: Allow dropping run-time binding of devices

2021-02-07 Thread Simon Glass
With OF_PLATDATA_INST devices are bound at build time. We should not need binding of devices at runtime in most cases. However it is inflexible to absolutely prohibit it, so add an option to control this. Update the driver model core so that it does not bind devices. Update device_bind() to return

[PATCH v3 06/42] dm: core: Adjust uclass setup with of-platdata

2021-02-07 Thread Simon Glass
When OF_PLATDATA_INST is enabled we don't need to create the uclass list. Instead we just need to point to the existing list. Update the code accordingly. Signed-off-by: Simon Glass --- (no changes since v1) drivers/core/root.c | 8 ++-- include/dm/root.h | 3 +++ 2 files changed, 9 inse

[PATCH v3 04/42] dm: core: Add macros to access the new linker lists

2021-02-07 Thread Simon Glass
Add macros which work with instantiated devices and uclasses, as created at build time by dtoc. Include variants that can be used in data structures. These are mostly used by dtoc but it is worth documenting them fully for the occasional case where they might come up in user code. Signed-off-by:

[PATCH v3 03/42] linker_lists: Allow use in data structures

2021-02-07 Thread Simon Glass
At present linker lists are designed for use in code. They make use of statements within expressions ({...}), for example. It is possible to generate a reference to a linker_list entry that can be used in data structures, where such features are not permitted. It requires that the reference first

[PATCH v3 02/42] sandbox: Drop debug message in os_spl_to_uboot()

2021-02-07 Thread Simon Glass
This is not needed in normal operation. Drop it. Signed-off-by: Simon Glass Reviewed-by: Heinrich Schuchardt --- (no changes since v1) arch/sandbox/cpu/os.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c index 39db636d777..4bb4caed8f9 100644 -

[PATCH v3 01/42] dtoc: Drop use of DECL() macros

2021-02-07 Thread Simon Glass
We can use extern instead, so let's drop these macros. It adds one more thing to learn about and doesn't make the code any clearer. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to drop DECL() macros from dtoc (to squash in) tools/dtoc/dtb_platdata.py | 8 ++--- tools/dtoc/tes

[PATCH v3 00/42] dm: Implement OF_PLATDATA_INST in driver model (part E)

2021-02-07 Thread Simon Glass
This series builds on the recent dtoc implementation of build-time device instantiation. It adds the required driver model support, which is basically a few more data structures. With this, sandbox_spl and chromebook_coral both use the new feature. For coral TPL there is a 1.5KB code-size reduct

[PATCH 3/3] test: Allow tpm2 tests to run in parallel

2021-02-07 Thread Simon Glass
These tests currently run in a particular sequence, with some of them depending on the actions of earlier tests. Add a check for sandbox and reset to a known state at the start of each test, so that all tests can run in parallel. Signed-off-by: Simon Glass --- test/py/tests/test_tpm2.py | 52 +

[PATCH 2/3] test: Allow hush tests to run in parallel

2021-02-07 Thread Simon Glass
The -z tests don't really need to be part of the main set. Separate them out so we can drop the test setup/cleans functions and thus run all tests in parallel. Signed-off-by: Simon Glass --- test/py/tests/test_hush_if_test.py | 20 ++-- 1 file changed, 6 insertions(+), 14 deleti

[PATCH 1/3] test: Allow vboot tests to run in parallel

2021-02-07 Thread Simon Glass
Update the tests to use separate working directories, so we can run them in parallel. It also makes it possible to see the individual output files after the tests have completed. Signed-off-by: Simon Glass --- test/py/tests/test_vboot.py | 30 +- 1 file changed, 17 i

[PATCH 0/3] test: Try to deal with some co-dependent tests

2021-02-07 Thread Simon Glass
Tests are supposed to be independent. With driver model tests, the environment is reset before each test, which ensures that. With Python tests there is no reset of the board between tests, since we want to run all the tests as quickly as possible and without needing the external scripts running c

Re: How to have a menu in u-boot ? (newbie)

2021-02-07 Thread Sean Anderson
On 2/7/21 2:00 PM, Thomas Carrié wrote: Hello, Is there an equivalent of the Grub menu in u-boot? Context: I want to create two entries in a menu to boot either Ubuntu-Mate or CoreElec on ODROID-N2 hardware. Thank you for your help Thomas https://u-boot.readthedocs.io/en/latest/usage/bootme

Re: [PATCH 4/4] timer: imx-gpt: Add basic timer support for i.MX SoCs family

2021-02-07 Thread Sean Anderson
On 2/7/21 7:24 PM, Jesse Taube wrote: Signed-off-by: Jesse Taube Cc: Stefano Babic Cc: Giulio Benetti Cc: Jesse Taube This timer driver is using GPT Timer (General Purpose Timer) available on almost all i.MX SoCs family. Add code to enable timer. Add code get a defualt prescaler. Add define

Re: [PATCH 1/4] timer: imx-gpt: Add timer support for i.MX SoCs family

2021-02-07 Thread Sean Anderson
On 2/7/21 7:24 PM, Jesse Taube wrote: This timer driver is using GPT Timer (General Purpose Timer) available on almost all i.MX SoCs family. Signed-off-by: Giulio Benetti Cc: Stefano Babic Cc: Giulio Benetti Cc: Jesse Taube --- drivers/timer/Kconfig | 7 ++ drivers/timer/Makefil

arm64: rk3399: Add support nanopi r4s

2021-02-07 Thread alex tian
>From 01598339be9dbeec6ba41c470b29af1c53e29c40 Mon Sep 17 00:00:00 2001 From: Xiaobo Tian Date: Mon, 8 Feb 2021 09:40:03 +0800 Subject: [PATCH] arm64: rk3399: Add support NanoPi R4s NanoPi R4s is SBC base on Rockchip RK3399 hexa-core processor with dual-Core Cortex-A72 and Mali-T864 GPU with 4GiB

Re: [PATCH v3] video: sunxi_display: Convert to DM_VIDEO

2021-02-07 Thread Andre Przywara
On Sun, 7 Feb 2021 07:37:34 -0700 Simon Glass wrote: Hi Simon, > On Thu, 4 Feb 2021 at 18:08, Andre Przywara wrote: > > > > From: Jagan Teki > > > > DM_VIDEO migration deadline is already expired, but around > > 80 Allwinner boards are still using video in a legacy way. > > > > ==

How to have a menu in u-boot ? (newbie)

2021-02-07 Thread Thomas Carrié
Hello, Is there an equivalent of the Grub menu in u-boot? Context: I want to create two entries in a menu to boot either Ubuntu-Mate or CoreElec on ODROID-N2 hardware. Thank you for your help Thomas

[PATCH 4/4] timer: imx-gpt: Add basic timer support for i.MX SoCs family

2021-02-07 Thread Jesse Taube
Signed-off-by: Jesse Taube Cc: Stefano Babic Cc: Giulio Benetti Cc: Jesse Taube This timer driver is using GPT Timer (General Purpose Timer) available on almost all i.MX SoCs family. Add code to enable timer. Add code get a defualt prescaler. Add defines for register masks. --- drivers/timer

[PATCH 3/4] imxrt1050 dtsi gpt1 node

2021-02-07 Thread Jesse Taube
Signed-off-by: Jesse Taube Cc: Stefano Babic Cc: Giulio Benetti Cc: Jesse Taube --- arch/arm/dts/imxrt1050.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/dts/imxrt1050.dtsi b/arch/arm/dts/imxrt1050.dtsi index a9281001e5..47a1d24973 100644 --- a/arch/arm/dts/imxrt1050

[PATCH 0/3] timer: imx-gpt: Add timer support for i.MX SoCs family

2021-02-07 Thread Jesse Taube
Add basic driver support for the IMX General Purpose Timer (GPT) available on almost all i.MX SoCs family. Giulio Benetti (3): timer: imx-gpt: Add timer support for i.MX SoCs family dt-bindings: clock: imxrt1050: add PIT GPT clock imxrt1050 dtsi gpt1 node Jesse Taube (1): timer: imx-gpt:

[PATCH 2/4] dt-bindings: clock: imxrt1050: add PIT GPT clock

2021-02-07 Thread Jesse Taube
Signed-off-by: Giulio Benetti Cc: Stefano Babic Cc: Giulio Benetti Cc: Jesse Taube --- include/dt-bindings/clock/imxrt1050-clock.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/dt-bindings/clock/imxrt1050-clock.h b/include/dt-bindings/clock/imxrt1050-clock.h in

[PATCH 1/4] timer: imx-gpt: Add timer support for i.MX SoCs family

2021-02-07 Thread Jesse Taube
This timer driver is using GPT Timer (General Purpose Timer) available on almost all i.MX SoCs family. Signed-off-by: Giulio Benetti Cc: Stefano Babic Cc: Giulio Benetti Cc: Jesse Taube --- drivers/timer/Kconfig | 7 ++ drivers/timer/Makefile| 1 + drivers/timer/imx-gpt-ti

Re: [PATCH 1/7] mkeficapsule: Correct printf() strings

2021-02-07 Thread Heinrich Schuchardt
On 2/7/21 10:27 PM, Simon Glass wrote: Use %z when printing size_t values. This avoids errors on 32-bit machines. Signed-off-by: Simon Glass --- tools/mkeficapsule.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.

Re: [PATCH 2/7] efi: Fix compiler warnings

2021-02-07 Thread Heinrich Schuchardt
On 2/7/21 10:27 PM, Simon Glass wrote: This occur when building on Raspberry Pi 400 (32-bit ARM). Fix them. Examples: cmd/efidebug.c: In function ‘do_efi_capsule_update’: cmd/efidebug.c:75:49: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ret = EFI_C

Re: [PATCH 3/7] pci: swap_case: Allow compilation on 32-bit machines

2021-02-07 Thread Heinrich Schuchardt
On 2/7/21 10:27 PM, Simon Glass wrote: At present this driver assumes that ulong is 64-bits long. On 32-bit machines it is not. Use the 64-bit code only on 64-bit machines. The commit title and message leaves it open if this is only to make compilation work or if the code works correctly on 32-

Re: [PATCH 4/7] tpm: Correct warning on 32-bit build

2021-02-07 Thread Heinrich Schuchardt
On 2/7/21 10:27 PM, Simon Glass wrote: Fix the warning: drivers/tpm/tpm2_tis_sandbox.c: In function ‘sandbox_tpm2_xfer’: drivers/tpm/tpm2_tis_sandbox.c:288:48: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘size_t’ {aka ‘unsigned int’} [-Wform

Re: [PATCH 6/7] doc: sandbox: Fix up dependencies

2021-02-07 Thread Heinrich Schuchardt
On 2/7/21 10:27 PM, Simon Glass wrote: These are out of date. Update them and point to the existing build instructions to avoid duplication. Signed-off-by: Simon Glass --- doc/arch/sandbox.rst | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/arch/sandbox.rst

[PATCH 6/7] doc: sandbox: Fix up dependencies

2021-02-07 Thread Simon Glass
These are out of date. Update them and point to the existing build instructions to avoid duplication. Signed-off-by: Simon Glass --- doc/arch/sandbox.rst | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/arch/sandbox.rst b/doc/arch/sandbox.rst index 60ee1e0741a..6

[PATCH 7/7] doc: sandbox: Update instructions on quitting

2021-02-07 Thread Simon Glass
The 'reset' command now resets sandbox but does not quit it. Fix the instructions. Fixes: 329dccc0675 ("sandbox: implement reset") Signed-off-by: Simon Glass --- doc/arch/sandbox.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/arch/sandbox.rst b/doc/arch/sandbox.rst

[PATCH 5/7] test: acpi: Fix warnings on 32-bit build

2021-02-07 Thread Simon Glass
Some format strings use the wrong type. Fix them. Example warnings: In file included from test/dm/acpi.c:22: test/dm/acpi.c: In function ‘dm_test_acpi_cmd_list’: test/dm/acpi.c:362:21: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-W

[PATCH 4/7] tpm: Correct warning on 32-bit build

2021-02-07 Thread Simon Glass
Fix the warning: drivers/tpm/tpm2_tis_sandbox.c: In function ‘sandbox_tpm2_xfer’: drivers/tpm/tpm2_tis_sandbox.c:288:48: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] printf("TPM2: Unmatching length,

[PATCH 3/7] pci: swap_case: Allow compilation on 32-bit machines

2021-02-07 Thread Simon Glass
At present this driver assumes that ulong is 64-bits long. On 32-bit machines it is not. Use the 64-bit code only on 64-bit machines. Signed-off-by: Simon Glass --- drivers/misc/swap_case.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/misc/swap_case

[PATCH 2/7] efi: Fix compiler warnings

2021-02-07 Thread Simon Glass
This occur when building on Raspberry Pi 400 (32-bit ARM). Fix them. Examples: cmd/efidebug.c: In function ‘do_efi_capsule_update’: cmd/efidebug.c:75:49: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ret = EFI_CALL(RT->update_capsule(&capsule, 1, (u64)N

[PATCH 0/7] Fix compiler warnings for 32-bit ARM

2021-02-07 Thread Simon Glass
These were noticed when building sandbox on a Raspberry Pi 400, which uses 32-bit linux. To make this work, I enabled CONFIG_HOST_32BIT in 'make menuconfig'. It would be nice if that were automatic, since we have the logic already in arch/sandbox/config.mk There are still many errors of the form:

[PATCH 1/7] mkeficapsule: Correct printf() strings

2021-02-07 Thread Simon Glass
Use %z when printing size_t values. This avoids errors on 32-bit machines. Signed-off-by: Simon Glass --- tools/mkeficapsule.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c index 162494907a8..ea6151989e9 100644 ---

[PULL] u-boot-sh/master

2021-02-07 Thread Marek Vasut
The following changes since commit 3936fd998668846f77468d8f6a662e906920969c: Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86 (2021-02-06 09:45:58 -0500) are available in the Git repository at: git://git.denx.de/u-boot-sh.git master for you to fetch changes up to 0099dfd5e53703f

  1   2   >