[PATCH v4 1/2] armv8: ls1028a: move FSL_LAYERSCAPE to kconfig

2020-07-26 Thread Michael Walle
CONFIG_FSL_LAYERSCAPE is available in kconfig. There is no need to define it per board; the ls1028a_common.h is really board dependent and only fits to the NXP eval boards. Instead select CONFIG_FSL_LAYERSCAPE when ARCH_LS1028A is selected. Signed-off-by: Michael Walle ---

[PATCH v4 2/2] board: kontron: add sl28 support

2020-07-26 Thread Michael Walle
Add basic support for the Kontron SMARC-sAL28 board. This includes just the bare minimum to be able to bring up the board and boot linux. For now, the Single and Dual PHY variant is supported. Other variants will fall back to the basic variant. In particular, there is no watchdog support for

[PATCH v4 0/2] Basic Kontron SMARC-sAL28 board support

2020-07-26 Thread Michael Walle
Add basic board support for the Kontron SMARC-sAL28 board. Please note, that this board doesn't support TF-a (yet). Therefore, the u-boot SPL is the first code which is run and it has to set up the RAM. changes since v3: - rebase to latest master - use CONFIG_PCI_INIT_R - set fdtfile in

Re: [PATCH 1/4] firmware: add new driver for SCMI firmwares

2020-07-26 Thread Simon Glass
Hi Etienne, On Fri, 17 Jul 2020 at 09:38, Etienne Carriere wrote: > > This change introduces SCMI agent driver in U-Boot in the firmware > U-class. > > SCMI agent driver is designed for platforms that embed a SCMI server in > a firmware hosted for example by a companion co-processor or the

Re: [PATCH v2 3/3] dtoc: remove compatible string aliases support

2020-07-26 Thread Simon Glass
On Wed, 22 Jul 2020 at 21:22, Walter Lozano wrote: > > After latest improvements in dtoc, compatible strings are checked > against driver and driver alias list to get a valid driver name. With > this new feature the list of compatible string aliases seems not > useful any more. > > Signed-off-by:

Re: [PATCH 1/1] mtd: cfi_flash: read device tree correctly

2020-07-26 Thread Simon Glass
Hi Stefan, On Sat, 25 Jul 2020 at 05:47, Stefan Roese wrote: > > Hi Heinrich, > > (added Simon to Cc) > > On 24.07.20 18:34, Heinrich Schuchardt wrote: > > On 24.07.20 11:14, Rick Chen wrote: > >> Hi Heinrich > >> > >>> From: U-Boot [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Heinrich >

Re: [PATCH 1/6] Convert CONFIG_SYS_DEVICE_NULLDEV to Kconfig

2020-07-26 Thread Simon Glass
Hi Ovidiu, On Sat, 18 Jul 2020 at 12:04, Ovidiu Panait wrote: > > Hi Simon, > > On 18.07.2020 06:03, Simon Glass wrote: > > This converts the following to Kconfig: >CONFIG_SYS_DEVICE_NULLDEV > > Signed-off-by: Simon Glass > --- > > common/Kconfig | 16 >

Re: [PATCH v3 2/2] arch: arm: use dt and UCLASS_SYSCON to get gic lpi details

2020-07-26 Thread Simon Glass
On Sun, 19 Jul 2020 at 03:35, Rayagonda Kokatanur wrote: > > Use device tree and UCLASS_SYSCON driver to get > Generic Interrupt Controller (GIC) lpi address and > maximum GIC redistributors count. > > Also update Kconfig to select REGMAP and SYSCON when > GIC_V3_ITS is enabled. > >

Re: [PATCH 02/31] mtd: spi-nor: Tidy up error handling / debug code

2020-07-26 Thread Simon Glass
Hi Vignesh, On Mon, 20 Jul 2020 at 00:26, Vignesh Raghavendra wrote: > > Hi Simon, > > On 19/07/20 9:45 pm, Simon Glass wrote: > > The -ENODEV error value in spi_nor_read_id() is incorrect since there > > clearly is a device - it just cannot be supported. > > Description 's not entirely

Re: [PATCH 1/1] efi_loader: returning form UEFI FIT images

2020-07-26 Thread Simon Glass
On Sat, 18 Jul 2020 at 03:17, Heinrich Schuchardt wrote: > > Do not reset the board when returning from an UEFI FIT image. > > For failed UEFI binary we already print the return status in efi_run_image. > Remove duplicate output. > > Signed-off-by: Heinrich Schuchardt > --- > common/bootm_os.c

Re: [PATCH v2 2/2] arch: arm: use dt and UCLASS_SYSCON to get gic lpi details

2020-07-26 Thread Simon Glass
On Sat, 18 Jul 2020 at 08:45, Rayagonda Kokatanur wrote: > > Use device tree and UCLASS_SYSCON driver to get > Generic Interrupt Controller (GIC) lpi address and > maximum GIC redistributors count. > > Also update Kconfig to select REGMAP and SYSCON when > GIC_V3_ITS is enabled. > >

Re: [PATCH 2/2] arch: x86: apl: Update FSP parameters

2020-07-26 Thread Simon Glass
On Wed, 22 Jul 2020 at 01:29, Bernhard Messerklinger wrote: > > Add missing parameters to support full configuration of the latest FSP > MR6 release. > > Signed-off-by: Bernhard Messerklinger > > --- > > arch/x86/cpu/apollolake/fsp_bindings.c| 23 +++ >

Re: [PATCH 4/4] reset: add reset controller driver for SCMI agents

2020-07-26 Thread Simon Glass
Hi Etienne, On Fri, 17 Jul 2020 at 09:43, Etienne Carriere wrote: > > This change introduces a reset controller driver for SCMI agent devices. > When SCMI agent and SCMI reset domain drivers are enabled, SCMI agent > binds a reset controller device for each SCMI reset domain protocol > devices

Re: [PATCH 1/2] x86: apl: fsp_bindings: Add support for u64 parameters

2020-07-26 Thread Simon Glass
On Wed, 22 Jul 2020 at 01:29, Bernhard Messerklinger wrote: > > Add FSP_UINT64 read support as preparation for FSP-M and FSP-S parameter > update. > > Signed-off-by: Bernhard Messerklinger > > --- > > arch/x86/cpu/apollolake/fsp_bindings.c| 28 +++ >

Re: Reproducibility regression with mx6cuboxi

2020-07-26 Thread Tom Rini
On Sun, Jul 26, 2020 at 02:00:33PM -0300, Fabio Estevam wrote: > On Sun, Jul 26, 2020 at 12:05 PM Tom Rini wrote: > > > We just need to use calloc() in the tool and not mess with alignment. > > Like this? > > --- a/tools/fit_image.c > +++ b/tools/fit_image.c > @@ -446,7 +446,6 @@ static int

Re: [PATCH 6/8] arm: dts: Sync the sun50i-a64.dtsi from Linux 5.8-rc1

2020-07-26 Thread Peter Robinson
On Thu, Jul 23, 2020 at 12:15 AM André Przywara wrote: > > On 22/07/2020 15:18, Peter Robinson wrote: > > Sync the Allwinner A64 sun50i-a64.dtsi from Linux. > > Hi Peter, > > thanks for your series! > > While this looks mostly straight-forward, the problem is that this patch > here affects all

Re: Reproducibility regression with mx6cuboxi

2020-07-26 Thread Tom Rini
On Sun, Jul 26, 2020 at 11:57:43AM -0300, Fabio Estevam wrote: > Hi Vagrant, > > On Wed, Jul 22, 2020 at 6:10 PM Tom Rini wrote: > > > > Do you mean this one? > > > http://u-boot.10912.n7.nabble.com/PATCH-V2-mkimage-fit-Do-not-tail-pad-fitImage-with-external-data-td409920.html > > > > Yes, that

[PATCH v4 2/2] arch: arm: use dt and UCLASS_SYSCON to get gic lpi details

2020-07-26 Thread Rayagonda Kokatanur
Use device tree and UCLASS_SYSCON driver to get Generic Interrupt Controller (GIC) lpi address and maximum GIC redistributors count. Also update Kconfig to select REGMAP and SYSCON when GIC_V3_ITS is enabled. Signed-off-by: Rayagonda Kokatanur Reviewed-by: Simon Glass --- Changes from v3:

[PATCH v4 1/2] arch: arm: use dt and UCLASS_IRQ to get gic details

2020-07-26 Thread Rayagonda Kokatanur
Use device tree and UCLASS_IRQ driver to get following Generic Interrupt Controller (GIC) details, -GIC Distributor interface (GICD) base address and -GIC Redistributors (GICR) base address. Signed-off-by: Rayagonda Kokatanur Reviewed-by: Simon Glass --- Changes from v3: -Address review

[PATCH v4 0/2] use dt and UCLASS_IRQ/SYSCON to get gic details

2020-07-26 Thread Rayagonda Kokatanur
Use device tree and driver class (UCLASS_IRQ and UCLASS_SYSCON) to get gic details like GICD, GICR base address, max number of redistributors and git lpi address. Changes from v3: -Address review comments from Simon, Correct the data type of variables Changes from v2: -Address review

Re: [PATCH v2 6/6] mx6cuboxi: enable OF_PLATDATA

2020-07-26 Thread Simon Glass
On Wed, 22 Jul 2020 at 07:15, Walter Lozano wrote: > > As both MMC and GPIO driver now supports OF_PLATDATA, enable it in > defconfig in order to reduce the SPL footprint. After applying this > setting the SPL reduction is 5 KB, which partially compensates the > increment due to DM. > >

Re: [PATCH 2/2] fdt_support: skip MTD node with "disabled" in fdt_fixup_mtdparts()

2020-07-26 Thread Simon Glass
Hi Masahiro, On Thu, 16 Jul 2020 at 19:36, Masahiro Yamada wrote: > > On Fri, Jul 17, 2020 at 12:44 AM Simon Glass wrote: > > > > On Wed, 15 Jul 2020 at 04:57, Masahiro Yamada > > wrote: > > > > > > Currently, fdt_fixup_mtdparts() only checks the compatible property. > > > It is pointless to

Re: [PATCH 3/4] clk: add clock driver for SCMI agents

2020-07-26 Thread Simon Glass
Hi Etienne, On Fri, 17 Jul 2020 at 09:43, Etienne Carriere wrote: > > This change introduces a clock driver for SCMI agent devices. When > SCMI agent and SCMI clock drivers are enabled, SCMI agent binds a > clock device for each SCMI clock protocol devices enabled in the FDT. > > SCMI clock

Re: [PATCH v2 2/6] mmc: fsl_esdhc_imx: add OF_PLATDATA support

2020-07-26 Thread Simon Glass
On Wed, 22 Jul 2020 at 07:14, Walter Lozano wrote: > > In order to reduce the footprint of SPL by removing dtb and library > overhead add OF_PLATDATA support to fsl_esdhc_imx. This initial overhead, add > approach does not support card detection, which will be enabled after > adding OF_PLATDATA

Re: [PATCH v2 3/6] gpio: mxc_gpio: add OF_PLATDATA support

2020-07-26 Thread Simon Glass
On Wed, 22 Jul 2020 at 07:14, Walter Lozano wrote: > > Continuing with the OF_PLATADATA support for iMX6 to reduce SPL > footprint, add it to mxc_gpio. Thanks to this, it will be possible to > enable card detection on MMC driver. > > Signed-off-by: Walter Lozano > --- > > (no changes since v1) >

Re: [PATCH v2 4/6] mmc: fsl_esdhc_imx: add CD support when OF_PLATDATA is enabled

2020-07-26 Thread Simon Glass
On Wed, 22 Jul 2020 at 07:15, Walter Lozano wrote: > > After enabling OF_PLATDATA support to both MMC and GPIO drivers add the > support for card detection. > > Signed-off-by: Walter Lozano > --- > > (no changes since v1) > > drivers/mmc/fsl_esdhc_imx.c | 27 ++- > 1

Re: [PATCH v2 5/6] drivers: rename more drivers to match compatible string

2020-07-26 Thread Simon Glass
On Wed, 22 Jul 2020 at 07:15, Walter Lozano wrote: > > Continuing with the approach in commit rename > additional drivers to allow the OF_PLATDATA support. > > Signed-off-by: Walter Lozano > --- > > (no changes since v1) > > drivers/pinctrl/nxp/pinctrl-imx6.c | 6 -- >

Re: [PATCH 2/4] dt-bindings: arm: SCMI bindings documentation

2020-07-26 Thread Simon Glass
On Fri, 17 Jul 2020 at 09:43, Etienne Carriere wrote: > > Dump SCMI DT bindings documentation from Linux kernel source > tree v5.8-rc1. > > Signed-off-by: Etienne Carriere > --- > > doc/device-tree-bindings/arm/arm,scmi.txt | 197 ++ > 1 file changed, 197 insertions(+) >

Re: [PATCH 1/1] test/dm: check if devices exist

2020-07-26 Thread Simon Glass
Hi, On Fri, 17 Jul 2020 at 06:41, Philippe REYNES wrote: > > Hi Heinrich > > > Running 'ut dm' on the sandbox without -D or -d results in segmentation > > faults due to NULL pointer dereferences. > > > > Check that device pointers are non-NULL before using them. > > > > Use ut_assertnonnull()

Re: Reproducibility regression with mx6cuboxi

2020-07-26 Thread Fabio Estevam
On Sun, Jul 26, 2020 at 12:05 PM Tom Rini wrote: > We just need to use calloc() in the tool and not mess with alignment. Like this? --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -446,7 +446,6 @@ static int fit_extract_data(struct image_tool_params *params, const char *fname) int

Re: [RFC 3/4] dtoc: add support for generate stuct udevice_id

2020-07-26 Thread Simon Glass
Hi Walter, On Tue, 7 Jul 2020 at 08:08, Walter Lozano wrote: > > Hi Simon > > On 6/7/20 16:21, Simon Glass wrote: > > Hi Walter, > > > > On Fri, 19 Jun 2020 at 15:12, Walter Lozano > > wrote: > >> Based on several reports there is an increasing concern in the impact > >> of adding additional

Re: [PATCH v2 2/3] drivers: avoid using aliases on drivers when OF_PLATDATA is enabled

2020-07-26 Thread Simon Glass
Hi Walter, On Wed, 22 Jul 2020 at 21:22, Walter Lozano wrote: > > After latest improvements on OF_PLATDATA struct names are generated > based on driver name instead of compatible strings. With this in mind, > using aliases in drivers are not longer needed. > > This patch removes code that tried

Re: [PATCH v2 1/3] dtoc: look for compatible string aliases in driver list

2020-07-26 Thread Simon Glass
Hi Walter, On Wed, 22 Jul 2020 at 21:22, Walter Lozano wrote: > > Currently dtoc checks if the first compatible string in a dtb node > matches either a driver o driver alias name, without taking into account or > any other compatible string in the list. In the case that no driver matches > the

Re: [PATCH v2 1/6] mmc: fsl_esdhc_imx: rename driver name to match ll_entry

2020-07-26 Thread Simon Glass
On Wed, 22 Jul 2020 at 07:14, Walter Lozano wrote: > > As discussed in commit rename fsl_esdhc_imx > driver to allow the OF_PLATDATA support. > > Signed-off-by: Walter Lozano > --- > > (no changes since v1) > > drivers/mmc/fsl_esdhc_imx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] sandbox, test: change hog gpio

2020-07-26 Thread Simon Glass
On Fri, 24 Jul 2020 at 07:51, Philippe Reynes wrote: > > Since commit 9ba84329dc45 ("sandbox, test: add test for GPIO_HOG > function"), the gpio_a 0,1,2 and 3 are used by hog in test.dts. > But 2 leds 'sandbox:red' and 'sandbox:green' are using gpio_a 0 > and 1. As hog always request his gpios,

Re: [PATCH v2 1/2] arch: arm: use dt and UCLASS_IRQ to get gic details

2020-07-26 Thread Simon Glass
On Sat, 18 Jul 2020 at 08:45, Rayagonda Kokatanur wrote: > > Use device tree and UCLASS_IRQ driver to get following > Generic Interrupt Controller (GIC) details, > > -GIC Distributor interface (GICD) base address and > -GIC Redistributors (GICR) base address. > > Signed-off-by: Rayagonda

Re: Reproducibility regression with mx6cuboxi

2020-07-26 Thread Fabio Estevam
Hi Vagrant, On Wed, Jul 22, 2020 at 6:10 PM Tom Rini wrote: > > Do you mean this one? > > http://u-boot.10912.n7.nabble.com/PATCH-V2-mkimage-fit-Do-not-tail-pad-fitImage-with-external-data-td409920.html > > Yes, that one. I know Marek's patch caused a regression on other platforms, but could

Re: [PATCH v3 1/2] arch: arm: use dt and UCLASS_IRQ to get gic details

2020-07-26 Thread Simon Glass
On Sun, 19 Jul 2020 at 03:35, Rayagonda Kokatanur wrote: > > Use device tree and UCLASS_IRQ driver to get following > Generic Interrupt Controller (GIC) details, > > -GIC Distributor interface (GICD) base address and > -GIC Redistributors (GICR) base address. > > Signed-off-by: Rayagonda

Re: [PATCH] imx: Add MYiR Tech MYS-6ULX support

2020-07-26 Thread Fabio Estevam
Hi Parthiban, Your patch looks great. Only some minor observations: On Sun, Jul 5, 2020 at 12:48 PM Parthiban Nallathambi wrote: > +#ifdef CONFIG_FEC_MXC > + > +#define ENET_CLK_PAD_CTRL (PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) > +#define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP | PAD_CTL_PUE

Re: Reproducibility regression with mx6cuboxi

2020-07-26 Thread Vagrant Cascadian
On 2020-07-26, Fabio Estevam wrote: > On Sun, Jul 26, 2020 at 2:16 PM Tom Rini wrote: > >> I mean just literally changing the malloc(...) to calloc(1, ...), audit any >> other malloc(...) calls in the file and change nothing else. Thanks! > > Thanks for the clarification, Tom > > Vagrant, > >

Re: [PATCH v3 05/14] env: nowhere: add .load ops

2020-07-26 Thread Tom Rini
On Thu, Jun 25, 2020 at 09:59:49AM +0200, Patrick Delaunay wrote: > Add the ops .load for nowhere ENV backend to load the > default environment. > > This ops is needed for the command 'env load' > > > > Signed-off-by: Patrick Delaunay > Reviewed-by: Tom Rini > --- > > Changes in v3: > -

RE: [PATCH 2/2] configs: migrate CONFIG_SPL_LOAD_FIT_ADDRESS to defconfigs

2020-07-26 Thread Peng Fan
> Subject: Re: [PATCH 2/2] configs: migrate CONFIG_SPL_LOAD_FIT_ADDRESS > to defconfigs > > Hi Peng, > > I assume the purpose of these patches is try to move all the configuration > into > one single file, right? Yes > > However with this patch, uboot will fail on AndesCore, and I'm guessing

Re: [RFC 3/4] dtoc: add support for generate stuct udevice_id

2020-07-26 Thread Walter Lozano
Hi Simon, On 26/7/20 11:53, Simon Glass wrote: Hi Walter, On Tue, 7 Jul 2020 at 08:08, Walter Lozano wrote: Hi Simon On 6/7/20 16:21, Simon Glass wrote: Hi Walter, On Fri, 19 Jun 2020 at 15:12, Walter Lozano wrote: Based on several reports there is an increasing concern in the impact of

[PATCH] log: Allow LOG_DEBUG to always enable log output

2020-07-26 Thread Simon Glass
At present if CONFIG_LOG enabled, putting LOG_DEBUG at the top of a file (before log.h inclusion) causes _log() to be executed for every log() call, regardless of the build- or run-time logging level. However there is no guarantee that the log record will actually be displayed. If the current log

Re: Reproducibility regression with mx6cuboxi

2020-07-26 Thread Fabio Estevam
Hi Vagrant, On Sun, Jul 26, 2020 at 3:17 PM Vagrant Cascadian wrote: > That appears to build reproducibly for me on top of v2020.07. Haven't > tested if the resulting image boots. I can confirm it boots fine on a imx6 humming board. I will submit it as a formal patch. Thanks

[PATCH] fit_image: Fix the introduction of variable bytes

2020-07-26 Thread Fabio Estevam
Vagrant Cascadian reported that mx6cuboxi target no longer builds reproducibility on Debian. One example of builds mismatches: 00096680: 696e 6700 736f 756e 642d 6461 6900 6465 ing.sound-dai.de -00096690: 7465 6374 2d67 7069 6f73 tect-gpios.. +00096690: 7465 6374 2d67 7069 6f73

[PATCH v2 0/1] Fix SPL_EARLY_BSS applying to normal build

2020-07-26 Thread Brian Moyer
SPL_CLEAR_BSS is called regardless of build type if CONFIG_SPL_EARLY_BSS is defined. This seems to break u-boot proper and doesn't seem like the correct behavior. Early bss clearing in u-boot proper happens before relocation and causes lots of problems because .rel.dyn and .bss overlap.

[PATCH v2 1/1] arm: Add SPL build check to SPL early bss clear

2020-07-26 Thread Brian Moyer
SPL_CLEAR_BSS is called regardless of build type if CONFIG_SPL_EARLY_BSS is defined. Add a guard for CONFIG_SPL_BUILD to fix. Signed-off-by: Brian Moyer --- Changes in v2: - Adding a check to the first SPL_CLEAR_BSS resulted in BSS never getting cleared for u-boot proper. Added an or

Re: [PATCH] ARM: Samsung: Add support for iTop-4412 based on Samsung Exynos4412

2020-07-26 Thread Jaehoon Chung
Hi, Split the patches. And add commit-msg, plz. Best Regards, Jaehoon Chung On 7/25/20 9:05 PM, hyyoxhk wrote: > Signed-off-by: hyyoxhk > --- > arch/arm/dts/Makefile | 3 +- > arch/arm/dts/exynos4412-itop-elite.dts | 403 ++ > arch/arm/mach-exynos/Kconfig

RE: [PATCH] xilinx: Fix xlnx,mio_bank property

2020-07-26 Thread Peng Fan
> Subject: [PATCH] xilinx: Fix xlnx,mio_bank property > > s/xlnx,mio_bank/xlnx,mio-bank/g > > DT binding is describing mio-bank not mio_bank that's why fix all DTSes and > also driver itself. > > Signed-off-by: Michal Simek Acked-by: Peng Fan > --- > >

RE: [PATCH] mmc: zynq: Fix default value for xlnx,mio-bank

2020-07-26 Thread Peng Fan
> Subject: [PATCH] mmc: zynq: Fix default value for xlnx,mio-bank > > DT binding is saying that default value is 0 not -1 that's why fix it. > > Signed-off-by: Michal Simek > --- > > Depends on > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.d >

[PATCH] Add an assembly guard around linux/bitops.h

2020-07-26 Thread Simon Glass
This file can be included by any header but it include C code. Guard it to avoid errors when compiling ASL, etc. Signed-off-by: Simon Glass --- include/linux/bitops.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/bitops.h b/include/linux/bitops.h index

Re: Reproducibility regression with mx6cuboxi

2020-07-26 Thread Fabio Estevam
On Sun, Jul 26, 2020 at 2:16 PM Tom Rini wrote: > I mean just literally changing the malloc(...) to calloc(1, ...), audit any > other malloc(...) calls in the file and change nothing else. Thanks! Thanks for the clarification, Tom Vagrant, Does the patch below fix the reproducibility

Please pull u-boot-dm (take 2)

2020-07-26 Thread Simon Glass
Hi Tom, I think I figured out what was wrong with the test. It seems to depend on the number of CPUs used to run them. I got a passing run here: https://travis-ci.org/github/sjg20/u-boot/builds/711807208 The following changes since commit ada61f1ee2a4eaa1b29d699b5ba940483171df8a: Merge

Re: [PATCH] binman: Don't change the descriptor in tests

2020-07-26 Thread Simon Glass
On Sat, 25 Jul 2020 at 15:24, Simon Glass wrote: > > At present testPackX86RomMeNoDesc removes the contents of the > descriptor.bin file and testPackX86RomMeMissingDesc removes the file > completely. > > If a test that relies on this file happens to run after it is removed, it > will not work.

Re: [RFC PATCH v2 0/3] RFC: tiny-dm: Proposal for using driver model in SPL

2020-07-26 Thread Walter Lozano
Hi Simon, On 10/7/20 01:12, Walter Lozano wrote: Hi Simon, On 2/7/20 18:10, Simon Glass wrote: This series provides a proposed enhancement to driver model to reduce overhead in SPL. These patches should not be reviewed other than to comment on the approach. The code is all lumped together

[PATCH v1 23/54] x86: acpi: Support generation of the DBG2 table

2020-07-26 Thread Simon Glass
Add an implementation of the DBG2 (Debug Port Table 2) ACPI table. Adjust one of the header includes to be in the correct order, before adding more. Note that the DBG2 table is generic but the PCI UART is x86-specific at present since it assumes an ns16550 UART. It can be generalised later if

[PATCH v1 30/54] x86: apl: Allow reading hostbridge base addresses

2020-07-26 Thread Simon Glass
Add a few functions to permit reading of various useful base addresses provided by the hostbridge. Signed-off-by: Simon Glass --- Changes in v1: - Add comments arch/x86/cpu/apollolake/hostbridge.c | 27 .../include/asm/arch-apollolake/systemagent.h | 31

[PATCH v1 26/54] acpi: Add more support for generating processor tables

2020-07-26 Thread Simon Glass
This adds tables relating to P-States and C-States. Signed-off-by: Simon Glass --- include/acpi/acpigen.h | 162 +++ lib/acpi/acpigen.c | 167 +++ test/dm/acpigen.c | 294 + 3 files changed, 623

[PATCH v1 31/54] p2sb: Add some definitions used for ACPI

2020-07-26 Thread Simon Glass
Allow this header to be included in ASL files by adding a header guard and a few definitions that are needed. Signed-off-by: Simon Glass --- include/p2sb.h | 8 1 file changed, 8 insertions(+) diff --git a/include/p2sb.h b/include/p2sb.h index 93e1155dca6..a25170e3d11 100644 ---

[PATCH v1 32/54] x86: apl: Generate required ACPI tables

2020-07-26 Thread Simon Glass
Add support for generating various ACPI tables for Apollo Lake. Add a few S3 definitions that are needed. Signed-off-by: Simon Glass --- Changes in v1: - Drop unnecessary callbacks arch/x86/cpu/apollolake/Makefile| 1 + arch/x86/cpu/apollolake/acpi.c | 211

[PATCH v1 33/54] x86: apl: Add support for hostbridge ACPI generation

2020-07-26 Thread Simon Glass
Support generating a DMAR table and add a few helper routines as well. Also set up NHLT so that audio works. Signed-off-by: Simon Glass --- Changes in v1: - Add support for NHLT table - Capitalise ACPI_OPS_PTR - Move the acpi.h header file to this commit - Update commit message

[PATCH v1 22/54] x86: acpi: Support generation of the HPET table

2020-07-26 Thread Simon Glass
Add an implementation of the HPET (High Precision Event Timer) ACPI table. Since this is x86-specific, put it in an x86-specific file Signed-off-by: Simon Glass --- Changes in v1: - Put this code in an x86-specific place and update commit message arch/x86/include/asm/acpi_table.h | 10 ++

[PATCH v1 24/54] acpi: Add support for generating processor tables

2020-07-26 Thread Simon Glass
ACPI has a number of CPU-related tables. Add utility functions to write out the basic packages. Signed-off-by: Simon Glass --- include/acpi/acpigen.h | 39 +++ lib/acpi/acpigen.c | 55 + test/dm/acpigen.c | 106

[PATCH v1 28/54] x86: Support Atom SoCs using SWSMISCI rather than the SWSCI

2020-07-26 Thread Simon Glass
Some Atom SoCs use SWSMISCI for SMI control. Add a Kconfig to select this. It is used on Apollo Lake. Signed-off-by: Simon Glass --- arch/x86/Kconfig| 6 ++ arch/x86/cpu/apollolake/Kconfig | 1 + 2 files changed, 7 insertions(+) diff --git a/arch/x86/Kconfig

[PATCH v1 25/54] x86: acpi: Add PCT and PTC tables

2020-07-26 Thread Simon Glass
These are needed for the CPU tables. Add them into an x86-specific file since we do not support them on sandbox, or include tests. Signed-off-by: Simon Glass --- Changes in v1: - Split PCT and PTC tables into a separate patch arch/x86/include/asm/acpigen.h | 35 +

[PATCH v1 21/54] x86: Add a few common Intel CPU functions

2020-07-26 Thread Simon Glass
Add functions to query CPU information, needed for ACPI. Signed-off-by: Simon Glass --- Changes in v1: - Add more comments and rename cpu_get_bus_clock to cpu_get_bus_clock_khz() arch/x86/cpu/intel_common/cpu.c | 64 +++ arch/x86/include/asm/cpu_common.h | 49

[PATCH v1 12/54] acpi: Add support for conditions and return values

2020-07-26 Thread Simon Glass
Add functions to support generating ACPI code for condition checks and return values. Signed-off-by: Simon Glass --- include/acpi/acpigen.h | 93 ++ lib/acpi/acpigen.c | 68 ++ test/dm/acpigen.c | 93

[PATCH v1 07/54] x86: Add a common global NVS structure

2020-07-26 Thread Simon Glass
Add the definition of this structure common to Intel devices. It includes some optional Chrome OS pieces which are used when vboot is integrated. Drop the APL version as it is basically the same. Signed-off-by: Simon Glass --- Changes in v1: - Use this file in APL

[PATCH v1 03/54] x86: acpi: apl: Add asl files for Apollo Lake

2020-07-26 Thread Simon Glass
Add Apollo Lake ASL files, taken from coreboot. Signed-off-by: Simon Glass --- .../include/asm/arch-apollolake/acpi/dptf.asl | 35 .../asm/arch-apollolake/acpi/globalnvs.asl| 41 .../include/asm/arch-apollolake/acpi/gpio.asl | 191 ++

[PATCH v1 08/54] x86: acpi: Support external GNVS tables

2020-07-26 Thread Simon Glass
At present U-Boot puts a magic number in the ASL for the GNVS table and searches for it later. Add a Kconfig option to use a different approach, where the ASL files declare the table as an external symbol. U-Boot can then put it wherever it likes, without any magic numbers or searching.

[PATCH v1 27/54] x86: acpi: Add common Intel ACPI tables

2020-07-26 Thread Simon Glass
Add various tables that are common to Intel CPUs. These functions can be used by arch-specific CPU code. Signed-off-by: Simon Glass --- arch/x86/cpu/intel_common/Makefile | 2 + arch/x86/cpu/intel_common/acpi.c | 377 + arch/x86/cpu/intel_common/cpu.c| 14

[PATCH v1 20/54] x86: apl: Update iomap for ACPI

2020-07-26 Thread Simon Glass
Add some more definitions to the iomap. These will be used by ACPI-generation code as well as the device tree. Signed-off-by: Simon Glass --- arch/x86/include/asm/arch-apollolake/iomap.h | 16 1 file changed, 16 insertions(+) diff --git

[PATCH v1 16/54] x86: apl: Support writing the IntelGraphicsMem table

2020-07-26 Thread Simon Glass
This table is needed by the Linux graphics driver to handle graphics correctly. Write it to ACPI. Signed-off-by: Simon Glass --- Changes in v1: - Capitalise ACPI_OPS_PTR - Don't build for SPL arch/x86/Kconfig | 8 + arch/x86/cpu/apollolake/Kconfig| 1

[PATCH v1 29/54] x86: acpi: Add support for additional Intel tables

2020-07-26 Thread Simon Glass
Apollo Lake needs to generate a few more table types used on Intel SoCs. Add support for these into the x86 ACPI code. Signed-off-by: Simon Glass --- Changes in v1: - Move this code into an x86-specific file - Update commit message - Use OEM_TABLE_ID instead of ACPI_TABLE_CREATOR

[PATCH v1 17/54] x86: acpi: Add a common routine to write WiFi info

2020-07-26 Thread Simon Glass
Intel WiFi chips can use a common routine to write the information needed by linux. Add an implementation of this. Enable it for coral. Signed-off-by: Simon Glass --- Changes in v1: - Capitalise ACPI_OPS_PTR - Use acpi,ddn instead of acpi,desc arch/x86/Kconfig | 8

[PATCH v1 18/54] x86: Add some definitions for SMM

2020-07-26 Thread Simon Glass
U-Boot does not support SMM (System Management Mode) at present, but needs a few definitions to correctly set up the ACPI table. Add these. Signed-off-by: Simon Glass --- arch/x86/include/asm/smm.h | 27 +++ 1 file changed, 27 insertions(+) create mode 100644

[PATCH v1 19/54] x86: apl: Add power-management definitions

2020-07-26 Thread Simon Glass
Add SCI and power-state definitions required by ACPI tables. Fix the license to match the original source file. Als update the guard on acpi_pmc.h to avoid an error when buiding ASL. Signed-off-by: Simon Glass --- Changes in v1: - Use SHIFT and MASK for defines

[PATCH v1 48/54] x86: coral: Add audio descriptor files

2020-07-26 Thread Simon Glass
Add files describing the various audio configurations supported on coral. These are passed to Linux in the ACPI tables. Signed-off-by: Simon Glass --- Changes in v1: - Add new patch with coral audio descriptor files .../chromebook_coral/dialog-2ch-48khz-24b.dat| Bin 0 -> 100 bytes

[PATCH v1 54/54] x86: coral: Update config and device tree for ACPI

2020-07-26 Thread Simon Glass
Enable new features and provide require device-tree config so that U-Boot produces the correct ACPI tables on Coral. Signed-off-by: Simon Glass --- Changes in v1: - Add NHLT information - Fix i2c PCI addresses - Rename acpi-probed to linux,probed - Rename cpi,hid-desc-reg-offset to

[PATCH v1 51/54] x86: fsp: Show FSP-S or FSP-M address in fsp_get_header()

2020-07-26 Thread Simon Glass
At present this function only supports FSP-M but it is also used to read FSP-S, in which case FSP-M may be zero. Add support for showing whichever address is present in the FSP binary. Also change the debug() statements to log_debug() while here. Signed-off-by: Simon Glass ---

[PATCH v1 52/54] acpi: Use defines for field lengths

2020-07-26 Thread Simon Glass
A few fields have an open-coded length. Use the defines for this purpose instead. Signed-off-by: Simon Glass --- include/acpi/acpi_table.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h index

[PATCH v1 53/54] x86: Add a way to add to the e820 memory table

2020-07-26 Thread Simon Glass
Some boards want to reserve extra regions of memory. Add a 'chosen' property to support this. Signed-off-by: Simon Glass --- arch/x86/lib/fsp/fsp_dram.c | 17 + doc/device-tree-bindings/chosen.txt | 18 ++ 2 files changed, 35 insertions(+) diff --git

Re: [PATCH] sandbox, test: change hog gpio

2020-07-26 Thread Heiko Schocher
Hello Philippe, Am 24.07.2020 um 15:51 schrieb Philippe Reynes: Since commit 9ba84329dc45 ("sandbox, test: add test for GPIO_HOG function"), the gpio_a 0,1,2 and 3 are used by hog in test.dts. But 2 leds 'sandbox:red' and 'sandbox:green' are using gpio_a 0 and 1. As hog always request his

[PATCH v1 35/54] x86: apl: Generate ACPI table for LPC

2020-07-26 Thread Simon Glass
Add an ACPI table for the LPC on Apollo Lake. Signed-off-by: Simon Glass --- Changes in v1: - Capitalise ACPI_OPS_PTR arch/x86/cpu/apollolake/lpc.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/x86/cpu/apollolake/lpc.c b/arch/x86/cpu/apollolake/lpc.c index

[PATCH v1 34/54] x86: apl: Generate CPU tables

2020-07-26 Thread Simon Glass
Add ACPI generation to the APL CPU driver. Signed-off-by: Simon Glass --- Changes in v1: - Capitalise ACPI_OPS_PTR - Handle table generation without callbacks arch/x86/cpu/apollolake/cpu.c | 77 ++ arch/x86/lib/Makefile | 3 +-

[PATCH v1 41/54] x86: Notify the FSP of the 'end firmware' event

2020-07-26 Thread Simon Glass
Send this notification when U-Boot is about to boot into Linux, as requested by the FSP. Currently this causes a crash with the APL FSP, so leave it disabled for now. Signed-off-by: Simon Glass --- arch/x86/cpu/cpu.c| 15 +++ arch/x86/lib/fsp/fsp_common.c | 16

[PATCH v1 42/54] x86: Correct the assembly guard in e820.h

2020-07-26 Thread Simon Glass
This is currently in the wrong place, so including the file in the device tree fails. Fix it. Signed-off-by: Simon Glass --- Changes in v1: - Update commit message with a comma arch/x86/include/asm/e820.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH v1 43/54] x86: Add a header guard to asm/acpi_table.h

2020-07-26 Thread Simon Glass
This file cannot currently be included in ASL files. Add a header guard to permit this. Signed-off-by: Simon Glass --- arch/x86/include/asm/acpi_table.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/include/asm/acpi_table.h b/arch/x86/include/asm/acpi_table.h index

[PATCH v1 37/54] tpm: cr50: Add ACPI support

2020-07-26 Thread Simon Glass
Generate ACPI information for this device so that Linux can use it correctly. Signed-off-by: Simon Glass --- Changes in v1: - Capitalise ACPI_OPS_PTR - Update for acpi_device_write_i2c_dev() return-value change - Use acpi,ddn instead of acpi,desc drivers/tpm/cr50_i2c.c | 55

[PATCH v1 46/54] acpi: tpm: Add a TPM1 table

2020-07-26 Thread Simon Glass
This provides information about a v1 TPM in the system. Generate this table if the TPM is present. Add a required new bloblist type and correct the header order of one header file. Signed-off-by: Simon Glass --- arch/x86/lib/acpi_table.c | 54 ++-

[PATCH v1 40/54] x86: Sort the MTRR table

2020-07-26 Thread Simon Glass
At present the MTRR registers are programmed with the list the U-Boot builds up in the same order. In some cases this list may be out of order. It looks better in Linux to have the registers in order, so sort them, Signed-off-by: Simon Glass --- arch/x86/cpu/mtrr.c | 12 1 file

[PATCH v1 47/54] x86: acpi: Set the log category for x86 table generation

2020-07-26 Thread Simon Glass
This file doesn't currently have a log category. Add one so that items are logged correctly. Signed-off-by: Simon Glass --- arch/x86/lib/acpi_table.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index a3db94b8318..faab9d9de3c

[PATCH v1 49/54] x86: apl: Check low-level init in FSP-S pre-init

2020-07-26 Thread Simon Glass
If U-Boot is not running FSP-S it should not do the pre-init either. Add a condition to handle this. Signed-off-by: Simon Glass --- arch/x86/cpu/apollolake/fsp_s.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/cpu/apollolake/fsp_s.c b/arch/x86/cpu/apollolake/fsp_s.c index

[PATCH v1 36/54] x86: apl: Drop unnecessary code in PMC driver

2020-07-26 Thread Simon Glass
We don't have CONFIG_PCI in TPL but it is present in SPL, etc. So this code is not needed. Drop it, and fix a code-style nit just above. Signed-off-by: Simon Glass --- arch/x86/cpu/apollolake/pmc.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git

[PATCH v1 39/54] x86: cpu: Report address width from cpu_get_info()

2020-07-26 Thread Simon Glass
Add support for this new field in the common code used by most x86 CPU drivers. Signed-off-by: Simon Glass --- arch/x86/cpu/i386/cpu.c | 23 +++ arch/x86/cpu/intel_common/cpu.c | 1 + arch/x86/cpu/x86_64/cpu.c | 5 + arch/x86/include/asm/cpu.h | 9

[PATCH v1 38/54] x86: fsp: Update the FSP API with the end-firmware method

2020-07-26 Thread Simon Glass
This new method is intended to be called when UEFI shuts down the 'boot services', i.e. any lingering code in the boot loader that might be used by the OS. Add a definition for this new method and update the comments a little. Signed-off-by: Simon Glass --- arch/x86/include/asm/fsp/fsp_api.h

[PATCH v1 45/54] acpi: tpm: Add a TPM2 table

2020-07-26 Thread Simon Glass
This provides information about a v2 TPM in the system. Generate this table if the TPM is present. Signed-off-by: Simon Glass --- arch/x86/lib/acpi_table.c | 74 +++ include/acpi/acpi_table.h | 11 ++ include/bloblist.h| 1 + 3 files changed, 86

[PATCH v1 44/54] x86: Correct handling of MADT table CPUs

2020-07-26 Thread Simon Glass
At present if hyperthreading is disabled the CPU numbering is not sequential. Fix this. Signed-off-by: Simon Glass --- arch/x86/lib/acpi_table.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index

[PATCH v1 50/54] x86: fsp: Add more debugging for silicon init

2020-07-26 Thread Simon Glass
If locating the FSP header hangs for whatever reason it is useful to see where it got stuck. Add a debug print. Also show the address of the FSP-S entry point as a sanity check. Signed-off-by: Simon Glass --- arch/x86/lib/fsp2/fsp_silicon_init.c | 4 +++- 1 file changed, 3 insertions(+), 1

  1   2   >