Re: [PATCH 1/1] test: stabilize test_efi_secboot

2020-05-10 Thread AKASHI Takahiro
Heinrich, On Fri, May 08, 2020 at 08:10:28AM +0900, AKASHI Takahiro wrote: > On Thu, May 07, 2020 at 11:14:17PM +0200, Heinrich Schuchardt wrote: > > On 5/7/20 2:36 AM, AKASHI Takahiro wrote: > > > Heinrich, > > > > > > On Mon, May 04, 2020 at 12:33:26PM +0200, Heinrich Schuchardt wrote: > > >> Wh

[PATCH V2 2/2] imx8mp_evk: simplify board spl code

2020-05-10 Thread Peng Fan
Simplify board SPL code - BSS area will be cleared by crt0_64.S - No need to get ccm device in spl_board_init - Use spl_early_init, not spl_init - timer_init has been invoked in arch_cpu_init Signed-off-by: Peng Fan --- V2: Fix build warning board/freescale/imx8mp_evk/spl.c | 30 ++---

[PATCH V2 1/2] imx: imx8mp_evk: fix boot issue

2020-05-10 Thread Peng Fan
The u-boot-spl.bin pad with ddr firmware conflicts with the CONFIG_MALLOC_F_ADDR area, the ddr firmware will be overwritten by malloc in SPL stage and cause ddr initialization not able to finish. So update the related addresses to fix the issue. Reported-by: Fabio Estevam Signed-off-by: Peng Fan

Re: [PATCH v7 19/22] sifive: dts: fu540: Enable L2 Cache in U-Boot

2020-05-10 Thread Jagan Teki
On Mon, May 11, 2020 at 11:35 AM Pragnesh Patel wrote: > > >-Original Message- > >From: Jagan Teki > >Sent: 10 May 2020 15:02 > >To: Pragnesh Patel > >Cc: U-Boot-Denx ; Atish Patra > >; Palmer Dabbelt ; Bin > >Meng ; Paul Walmsley ; > >Troy Benjegerdes ; Anup Patel > >; Sagar Kadam ; Ric

Re: [PATCH v7 14/22] riscv: Add place-holder for driver compilation

2020-05-10 Thread Jagan Teki
On Mon, May 11, 2020 at 11:28 AM Pragnesh Patel wrote: > > >-Original Message- > >From: Jagan Teki > >Sent: 10 May 2020 14:42 > >To: Pragnesh Patel > >Cc: U-Boot-Denx ; Atish Patra > >; Palmer Dabbelt ; Bin > >Meng ; Paul Walmsley ; > >Troy Benjegerdes ; Anup Patel > >; Sagar Kadam ; Ric

Re: [PATCH v2 2/2] env/sf.c: honour CONFIG_SPL_SAVEENV

2020-05-10 Thread Rasmus Villemoes
On 09/05/2020 22.54, Tom Rini wrote: > On Sat, May 09, 2020 at 08:56:46PM +0200, Rasmus Villemoes wrote: >> On 09/05/2020 00.59, Tom Rini wrote: >>> On Fri, Mar 27, 2020 at 12:02:00AM +0100, Rasmus Villemoes wrote: >>> >>> >>> Applied to u-boot/master, thanks! >>> >> >> Eh, thanks, but you already

[PATCH v2 3/3] spl: fit: nand: fix fit loading in case of bad blocks

2020-05-10 Thread Dario Binacchi
The offset at which the image to be loaded from NAND is located is retrieved from the itb header. The presence of bad blocks in the area of the NAND where the itb image is located could invalidate the offset which must therefore be adjusted taking into account the state of the sectors concerned. c

[PATCH v2 2/3] spl: fit: fail fit loading in case of FDT appending error

2020-05-10 Thread Dario Binacchi
If uboot does not embed its device tree and the FIT loading function returns error in case of failure in the FDT append, the redundant itb image could be loaded. cc: Michael Trimarchi Signed-off-by: Dario Binacchi --- Changes in v2: - Replace CONFIG_IS_ENABLED(OF_EMBED) with IS_ENABLED(CONFIG

[PATCH v2 1/3] spl: fix format of function documentation

2020-05-10 Thread Dario Binacchi
U-Boot adopted the kernel-doc annotation style. cc: Michael Trimarchi Signed-off-by: Dario Binacchi --- Changes in v2: None include/spl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spl.h b/include/spl.h index 6bf9fd8beb..e2fbd6d765 100644 --- a/include/spl.h +

[PATCH v2 0/3] Fix the SPL loading of a FIT image from NAND

2020-05-10 Thread Dario Binacchi
Loading u-boot and its fdt from a NAND memory area with bad blocks led to the creation of these patches. Changes in v2: - Replace CONFIG_IS_ENABLED(OF_EMBED) with IS_ENABLED(CONFIG_OF_EMBED)) Dario Binacchi (3): spl: fix format of function documentation spl: fit: fail fit loading in case o

RE: [PATCH v7 19/22] sifive: dts: fu540: Enable L2 Cache in U-Boot

2020-05-10 Thread Pragnesh Patel
>-Original Message- >From: Jagan Teki >Sent: 10 May 2020 15:02 >To: Pragnesh Patel >Cc: U-Boot-Denx ; Atish Patra >; Palmer Dabbelt ; Bin >Meng ; Paul Walmsley ; >Troy Benjegerdes ; Anup Patel >; Sagar Kadam ; Rick Chen > >Subject: Re: [PATCH v7 19/22] sifive: dts: fu540: Enable L2 Cache

RE: [PATCH v8 19/21] sifive: dts: fu540: Enable L2 Cache in U-Boot

2020-05-10 Thread Pragnesh Patel
>-Original Message- >From: Jagan Teki >Sent: 10 May 2020 20:44 >To: Pragnesh Patel >Cc: U-Boot-Denx ; Atish Patra >; Palmer Dabbelt ; Bin >Meng ; Paul Walmsley ; >Troy Benjegerdes ; Anup Patel >; Sagar Kadam ; Rick Chen > >Subject: Re: [PATCH v8 19/21] sifive: dts: fu540: Enable L2 Cache

RE: [PATCH v8 18/21] configs: fu540: Add config options for U-Boot SPL

2020-05-10 Thread Pragnesh Patel
>-Original Message- >From: Jagan Teki >Sent: 10 May 2020 14:50 >To: Pragnesh Patel >Cc: U-Boot-Denx ; Atish Patra >; Palmer Dabbelt ; Bin >Meng ; Paul Walmsley ; >Troy Benjegerdes ; Anup Patel >; Sagar Kadam ; Rick Chen >; Palmer Dabbelt ; Joe >Hershberger >Subject: Re: [PATCH v8 18/21]

RE: [PATCH v7 14/22] riscv: Add place-holder for driver compilation

2020-05-10 Thread Pragnesh Patel
>-Original Message- >From: Jagan Teki >Sent: 10 May 2020 14:42 >To: Pragnesh Patel >Cc: U-Boot-Denx ; Atish Patra >; Palmer Dabbelt ; Bin >Meng ; Paul Walmsley ; >Troy Benjegerdes ; Anup Patel >; Sagar Kadam ; Rick Chen > >Subject: Re: [PATCH v7 14/22] riscv: Add place-holder for driver c

[PATCH 1/2] imx: imx8mp_evk: fix boot issue

2020-05-10 Thread Peng Fan
The u-boot-spl.bin pad with ddr firmware conflicts with the CONFIG_MALLOC_F_ADDR area, the ddr firmware will be overwritten by malloc in SPL stage and cause ddr initialization not able to finish. So update the related addresses to fix the issue. Reported-by: Fabio Estevam Signed-off-by: Peng Fan

[PATCH 2/2] imx8mp_evk: simplify board spl code

2020-05-10 Thread Peng Fan
Simplify board SPL code - BSS area will be cleared by crt0_64.S - No need to get ccm device in spl_board_init - Use spl_early_init, not spl_init - timer_init has been invoked in arch_cpu_init Signed-off-by: Peng Fan --- board/freescale/imx8mp_evk/spl.c | 28 ++-- 1 fi

RE: [PATCH v7 01/22] misc: add driver for the SiFive otp controller

2020-05-10 Thread Pragnesh Patel
>-Original Message- >From: Jagan Teki >Sent: 10 May 2020 14:34 >To: Pragnesh Patel >Cc: U-Boot-Denx ; Atish Patra >; Palmer Dabbelt ; Bin >Meng ; Paul Walmsley ; >Troy Benjegerdes ; Anup Patel >; Sagar Kadam ; Rick Chen >; Tero Kristo ; Simon Glass >; Adam Ford ; Eugen Hristev >; Peng Fan

Re: wandboard does not boot with current mainline

2020-05-10 Thread Heiko Schocher
Hello Simon, Am 08.05.2020 um 20:33 schrieb Simon Glass: Hi Heiko On Thu, 7 May 2020 at 21:35, Heiko Schocher wrote: Hello Tom, Am 07.05.2020 um 16:38 schrieb Tom Rini: On Thu, May 07, 2020 at 02:53:49PM +0200, Heiko Schocher wrote: Hello Fabio, Am 07.05.2020 um 14:12 schrieb Heiko Schoc

Re: [PATCH v3 21/22] Use __ASSEMBLY__ as the assembly macros

2020-05-10 Thread Masahiro Yamada
On Mon, May 11, 2020 at 2:43 AM Simon Glass wrote: > > Some places use __ASSEMBLER__ instead which does not work since the > Makefile does not define it. Fix them. > > Signed-off-by: Simon Glass I think we decided to not do this in v2, didn't we? http://patchwork.ozlabs.org/project/uboot/patch

Re: [PATCH] omap3logic: Return omap3logic boards to OF_PLATDATA in SPL

2020-05-10 Thread Lokesh Vutla
On 25/04/20 6:29 PM, Adam Ford wrote: > SPL is just simply too tight and we don't really have any > room to shave off any more functionality, so we need OF_PLATDATA > in SPL. > > This patch adds the manual enumeration of serial and MMC while > removing the device tree support in SPL and enablin

Re: [PATCH 1/8] semihosting: Change semihosting file operation functions into global symbols

2020-05-10 Thread Akashi Takahiro
On Thu, Apr 30, 2020 at 11:06:23PM +0530, Sughosh Ganu wrote: > Change the semihosting file operation functions into external symbols > so that they can be called from outside the file. These functions > would be required to be called for implementing firmware update > functionality for the qemu ar

Re: [PATCH 6/8] efi: capsule: Add support for uefi capsule authentication

2020-05-10 Thread Akashi Takahiro
On Sun, May 10, 2020 at 04:56:21PM +0530, Sughosh Ganu wrote: > On Fri, 8 May 2020 at 06:12, Akashi Takahiro > wrote: > > > On Thu, May 07, 2020 at 05:20:35PM +0530, Sughosh Ganu wrote: > > > On Thu, 7 May 2020 at 13:49, Akashi Takahiro > > > > > wrote: > > > > > > > Sughosh, > > > > > > > > On

Re: efi_loader: tighten PE verification code?

2020-05-10 Thread AKASHI Takahiro
Patrick, On Fri, May 08, 2020 at 08:56:37PM +0200, Patrick Wildt wrote: > Hi, > > even though this mail has a diff, it's not supposed to be a patch. I > have started adjusting my fuzzer to the upstreamed EFI Secure Boot code > and I hit a few issues right away. Two of those I have already sent

Re: [PATCH] kbuild: add -Werror=implicit-function-declaration

2020-05-10 Thread Marek Vasut
On 5/11/20 3:59 AM, Masahiro Yamada wrote: > Hi Simon, > > On Mon, May 11, 2020 at 5:37 AM Simon Glass wrote: >> >> Hi Masahiro, >> >> On Sat, 9 May 2020 at 05:00, Masahiro Yamada wrote: >>> >>> On Sat, May 9, 2020 at 3:16 AM Tom Rini wrote: On Thu, May 07, 2020 at 09:16:40PM -0600, S

Re: [PATCH] kbuild: add -Werror=implicit-function-declaration

2020-05-10 Thread Masahiro Yamada
Hi Simon, On Mon, May 11, 2020 at 5:37 AM Simon Glass wrote: > > Hi Masahiro, > > On Sat, 9 May 2020 at 05:00, Masahiro Yamada wrote: > > > > On Sat, May 9, 2020 at 3:16 AM Tom Rini wrote: > > > > > > On Thu, May 07, 2020 at 09:16:40PM -0600, Simon Glass wrote: > > > > Hi Masahiro, > > > > > >

Re: TPM: remove duplicate definitions

2020-05-10 Thread Simon Glass
Hi Patrick, On Wed, 6 May 2020 at 16:58, Patrick Wildt wrote: > > With the recent change to tpm-v2.h, some enums are now defined twice > and tpm2_tis_spi.c fails to build. Unfortunately I fear removing > the defines from tpm_tis.h, like in this diff, will break the TPMv1 > drivers tpm_tis_infine

Re: USB keyboard with XHCI on x86?

2020-05-10 Thread Simon Glass
Hi, On Thu, 7 May 2020 at 21:02, Bin Meng wrote: > > Hi Simon, > > On Fri, May 8, 2020 at 10:38 AM Simon Glass wrote: > > > > Hi Bin, > > > > Does this work for you? It doesn't work for me in interrupt mode, only > > in control-endpoint mode. Is that expected? > > > > Also I notice that some bro

Re: [PATCH v2 2/2] arch: x86: apl: Use devicetree for FSP configuration

2020-05-10 Thread Simon Glass
Hi Bernhard, On Sun, 10 May 2020 at 14:44, Simon Glass wrote: > > On Thu, 7 May 2020 at 02:00, Bernhard Messerklinger > wrote: > > > > A the moment the FSP configuration is a mix of hard coded values and > > devicetree properties. > > This patch makes FSP-M and FSP-S full configurable from devic

Re: [PATCH 13/18] common: Drop asm/ptrace.h from common header

2020-05-10 Thread Simon Glass
Hi Michal, On Tue, 7 Apr 2020 at 00:50, Michal Simek wrote: > > On 07. 04. 20 4:40, Simon Glass wrote: > > Move this uncommon header out of the common header. > > > > Signed-off-by: Simon Glass > > --- > > > > arch/arm/cpu/arm1136/mx35/timer.c | 1 + > > arch/arm/cpu/arm926ejs/mx25/timer.

Re: efi_loader: tighten PE verification code?

2020-05-10 Thread Patrick Wildt
On Sun, May 10, 2020 at 02:36:51PM -0600, Simon Glass wrote: > Hi Patrick, > > On Fri, 8 May 2020 at 12:56, Patrick Wildt wrote: > > > > Hi, > > > > even though this mail has a diff, it's not supposed to be a patch. I > > have started adjusting my fuzzer to the upstreamed EFI Secure Boot code >

Re: [PATCH v2 2/2] arch: x86: apl: Use devicetree for FSP configuration

2020-05-10 Thread Simon Glass
On Thu, 7 May 2020 at 02:00, Bernhard Messerklinger wrote: > > A the moment the FSP configuration is a mix of hard coded values and > devicetree properties. > This patch makes FSP-M and FSP-S full configurable from devicetree by > adding binding properties for all FSP parameters. > Co-developed-by

Re: [PATCH v2 1/2] arch: x86: apl: Only load VBT if CONFIG_HAVE_VBT is enabled

2020-05-10 Thread Simon Glass
On Thu, 7 May 2020 at 02:00, Bernhard Messerklinger wrote: > > Only load VBT if it's present in the u-boot.rom. > > Signed-off-by: Bernhard Messerklinger > > --- > > Changes in v2: None > > arch/x86/cpu/apollolake/fsp_s.c | 46 ++--- > 1 file changed, 25 insertions(+

Re: [PATCH] kbuild: add -Werror=implicit-function-declaration

2020-05-10 Thread Simon Glass
Hi Masahiro, On Sat, 9 May 2020 at 05:00, Masahiro Yamada wrote: > > On Sat, May 9, 2020 at 3:16 AM Tom Rini wrote: > > > > On Thu, May 07, 2020 at 09:16:40PM -0600, Simon Glass wrote: > > > Hi Masahiro, > > > > > > On Thu, 7 May 2020 at 19:54, Masahiro Yamada wrote: > > > > > > > > On Fri, May

Re: [PATCH 07/36] bdinfo: microblaze: Use the generic bd command

2020-05-10 Thread Simon Glass
Hi Daniel, On Wed, 6 May 2020 at 09:56, Daniel Schwierzeck wrote: > > > > Am 05.05.20 um 01:17 schrieb Simon Glass: > > Microblaze prints out ethernet and FDT information. This is useful to > > most archs, so move it into the generic code and move microblaze over to > > use it. > > > > Signed-off

Re: efi_loader: tighten PE verification code?

2020-05-10 Thread Simon Glass
Hi Patrick, On Fri, 8 May 2020 at 12:56, Patrick Wildt wrote: > > Hi, > > even though this mail has a diff, it's not supposed to be a patch. I > have started adjusting my fuzzer to the upstreamed EFI Secure Boot code > and I hit a few issues right away. Two of those I have already sent and > we

Re: [PATCH 1/1] common/board_f: avoid -Wtype-limits warning

2020-05-10 Thread Simon Glass
On Sat, 9 May 2020 at 13:27, Heinrich Schuchardt wrote: > > CONFIG_SYS_SDRAM_BASE maybe zero. Avoid a build warning when compiling with > -Wtype-limits. > > Signed-off-by: Heinrich Schuchardt > --- > common/board_f.c | 2 +- Reviewed-by: Simon Glass

[PATCH v2 34/35] dm: acpi: Enhance acpi_get_name()

2020-05-10 Thread Simon Glass
For many device types it is possible to figure out the name just by looking at its uclass or parent. Add a function to handle this, since it allows us to cover the vast majority of cases automatically. However it is sometimes impossible to figure out an ACPI name for a device just by looking at it

[PATCH v2 29/35] acpi: Support ordering SSDT data by device

2020-05-10 Thread Simon Glass
Add a /chosen property to control the order in which the data appears in the SSDT. This allows matching up U-Boot's output from a dump of the known-good data obtained from within Linux. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: - Generalise the ACPI function recursion wit

[PATCH v2 32/35] x86: Allow devices to write to DSDT

2020-05-10 Thread Simon Glass
Call the new core function to inject ASL programmatically into the DSDT. This is made up of fragments generated by devices that have the inject_dsdt() method. The normal, compiled ASL file is added after this. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None arch/x86/lib/

[PATCH v2 31/35] acpi: Add support for DSDT generation

2020-05-10 Thread Simon Glass
Some devices need to inject extra code into the Differentiated System Descriptor Table (DSDT). Add a method to handle this. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: - Generalise the ACPI function recursion with acpi_recurse_method() arch/sandbox/dts/test.dts | 2 ++ d

[PATCH v2 35/35] acpi: Add an acpi split command

2020-05-10 Thread Simon Glass
Add a command that shows the individual blocks of data generated by each device. This can be helpful for debugging. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None cmd/acpi.c | 15 +-- drivers/core/acpi.c | 16 include/dm/acpi.h |

[PATCH v2 33/35] pci: Avoid a crash in device_is_on_pci_bus()

2020-05-10 Thread Simon Glass
This function cannot currently be called on the root node. Add a check for this as well as a test. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/dm/device.h | 2 +- test/dm/pci.c | 14 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff

[PATCH v2 28/35] acpi: Record the items added to SSDT

2020-05-10 Thread Simon Glass
It is useful to be able to control the order of data written to the SSDT so that we can compare the output against known-good kernel dumps. Add code to record each item that is added along with the device that added it. That allows us to reorder things later if needed. Signed-off-by: Simon Glass

[PATCH v2 30/35] x86: Allow devices to write an SSDT

2020-05-10 Thread Simon Glass
Call the new core function to write the SSDT. This is made up of fragments generated by devices that have the fill_ssdt() method. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: - Use OEM_TABLE_ID instead of ACPI_TABLE_CREATOR - Update ACPI_DSTATUS enum - Drop writing of corebo

[PATCH v2 26/35] acpi: Add support for SSDT generation

2020-05-10 Thread Simon Glass
Some devices need to generate code for the Secondary System Descriptor Table (SSDT). Add a method to handle this. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in v2: None Changes in v1: - Switch parameter order of _acpi_fill_ssdt() and make it static - Fix 'sentinal' and

[PATCH v2 27/35] x86: acpi: Move MADT down a bit

2020-05-10 Thread Simon Glass
Put this table before MCFG so that it matches the order that coreboot uses when passing tables to Linux. This is a cosmetic change since the order of the tables does not otherwise matter. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: - Correct the commit subject arch/x86/li

[PATCH v2 25/35] acpi: Add support for a generic power sequence

2020-05-10 Thread Simon Glass
Add a way for devices to enable and disable themselves using ACPI code that updates GPIOs. This takes several timing parameters and supports enable, reset and stop. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/acpi/acpi_device.h | 41 lib/acpi

[PATCH v2 19/35] acpi: Support writing Device Properties objects via _DSD

2020-05-10 Thread Simon Glass
More complex device properties can be provided to drivers via a device-specific data (_DSD) object. To create this we need to build it up in a separate data structure and then generate the ACPI code, due to its recursive nature. Add an implementation of this. Signed-off-by: Simon Glass --- Cha

[PATCH v2 23/35] acpi: Add support for writing a Power Resource

2020-05-10 Thread Simon Glass
These are used in ACPI to disable power to various pats of the system when in sleep. Add a way to create a power resource, with the caller finishing off the details. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/acpi/acpigen.h | 22 ++ lib/a

[PATCH v2 22/35] acpi: Add support for various misc ACPI opcodes

2020-05-10 Thread Simon Glass
Add more functions to handle some miscellaneous ACPI opcodes. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/acpi/acpigen.h | 114 + lib/acpi/acpigen.c | 83 ++ test/dm/acpigen.c | 75

[PATCH v2 24/35] acpi: Add support for writing a GPIO power sequence

2020-05-10 Thread Simon Glass
Power to some devices is controlled by GPIOs. Add a way to generate ACPI code to enable and disable a GPIO so that this can be handled within an ACPI method. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/acpi/acpigen.h | 12 +++ lib/acpi/acpigen.c | 80

[PATCH v2 20/35] acpi: Support writing a GPIO

2020-05-10 Thread Simon Glass
Allowing writing out a reference to a GPIO within the ACPI output. This can be used by ACPI code to access a GPIO at runtime. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/acpi/acpi_dp.h | 18 ++ lib/acpi/acpi_dp.c | 21 +

[PATCH v2 17/35] acpi: Support writing a name

2020-05-10 Thread Simon Glass
ACPI supports storing names which are made up of multiple path components. Several special cases are supported. Add a function to emit a name. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/acpi/acpigen.h | 25 +++ include/test/ut.h | 17 l

[PATCH v2 18/35] acpi: Support writing a UUID

2020-05-10 Thread Simon Glass
ACPI supports writing a UUID in a special format. Add a function to handle this. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/acpi/acpigen.h | 13 + lib/acpi/acpigen.c | 39 +++ test/dm/acpigen.c | 33 ++

[PATCH v2 21/35] acpi: Support copying properties from device tree to ACPI

2020-05-10 Thread Simon Glass
Some drivers in Linux support both device tree and ACPI. U-Boot itself uses Linux device-tree bindings for its own configuration but does not use ACPI. It is convenient to copy these values over to the device tree for passing to linux. Add some convenience functions to help with this. Signed-off-

[PATCH v2 16/35] acpi: Support writing a string

2020-05-10 Thread Simon Glass
ACPI supports storing a simple nul-terminated string. Add support for this. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/acpi/acpigen.h | 10 ++ lib/acpi/acpigen.c | 6 ++ test/dm/acpigen.c | 32 ++-- 3 files c

[PATCH v2 14/35] acpigen: Support writing a package

2020-05-10 Thread Simon Glass
A package collects together several elements. Add an easy way of writing a package header and updating its length later. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/acpi/acpigen.h | 62 ++ lib/acpi/acpigen.c | 12 ++

[PATCH v2 12/35] acpi: Support generation of SPI descriptor

2020-05-10 Thread Simon Glass
Add a function to write a SPI descriptor to the generated ACPI code. Signed-off-by: Simon Glass --- Changes in v2: - Fix memset of SPI descriptor Changes in v1: None drivers/spi/sandbox_spi.c | 11 include/acpi/acpi_device.h | 36 +++ include/spi.h | 4 +- lib/a

[PATCH v2 15/35] acpi: Support writing an integer

2020-05-10 Thread Simon Glass
ACPI supports storing integers in various ways. Add a function to handle this. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/acpi/acpigen.h | 17 ++ lib/acpi/acpigen.c | 51 ++ test/dm/acpigen.c | 46

[PATCH v2 11/35] acpi: Support generation of I2C descriptor

2020-05-10 Thread Simon Glass
Add a function to write a GPIO descriptor to the generated ACPI code. Signed-off-by: Simon Glass --- Changes in v2: - Fix memset of I2C descriptor Changes in v1: None drivers/i2c/sandbox_i2c.c | 11 drivers/rtc/sandbox_rtc.c | 13 + include/acpi/acpi_device.h | 36 +

[PATCH v2 13/35] acpigen: Support writing a length

2020-05-10 Thread Simon Glass
It is convenient to write a length value for preceding a block of data. Of course the length is not known or is hard to calculate a priori. So add a way to mark the start on a stack, so the length can be updated when known. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None

[PATCH v2 07/35] gpio: Add a method to convert a GPIO to ACPI

2020-05-10 Thread Simon Glass
When generating ACPI tables we need to convert GPIOs in U-Boot to the ACPI structures required by ACPI. This is a SoC-specific conversion and cannot be handled by generic code, so add a new GPIO method to do the conversion. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in

[PATCH v2 08/35] acpi: Support string output

2020-05-10 Thread Simon Glass
Add support for output of strings and streams of bytes. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/acpi/acpigen.h | 19 +++ lib/acpi/acpigen.c | 14 ++ test/dm/acpigen.c | 42 ++ 3

[PATCH v2 09/35] acpi: Support generation of GPIO descriptor

2020-05-10 Thread Simon Glass
Add a function to write a GPIO descriptor to the generated ACPI code. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/acpi/acpi_device.h | 22 ++ lib/acpi/acpi_device.c | 151 + test/dm/acpigen.c | 89 +++

[PATCH v2 10/35] acpi: Support generation of a GPIO/irq for a device

2020-05-10 Thread Simon Glass
Some devices use interrupts but some use GPIOs. Since these are fully specified in the device tree we can automatically produce the correct ACPI descriptor for a device. Add a function to handle this. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/acpi/acpi_dev

[PATCH v2 02/35] acpi: Add a function to get a device path and scope

2020-05-10 Thread Simon Glass
Add a function to build up the ACPI path for a device and another for its scope. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in v2: None Changes in v1: - Split into more patches for review - Add tests - Rebase on top of common.h series arch/sandbox/dts/test.dts | 3

[PATCH v2 06/35] acpi: Support generation of interrupt descriptor

2020-05-10 Thread Simon Glass
Add a function to write an interrupt descriptor to the generated ACPI code. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/acpi/acpi_device.h | 15 + lib/acpi/acpi_device.c | 118 + test/dm/acpigen.c | 31 ++

[PATCH v2 05/35] acpi: Support generation of ACPI code

2020-05-10 Thread Simon Glass
Add a new file to handle generating ACPI code programatically. This is used when information must be dynamically added to the tables, e.g. the SSDT. Initial support is just for writing simple values. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/acpi/acpigen.h

[PATCH v2 04/35] irq: Add a method to convert an interrupt to ACPI

2020-05-10 Thread Simon Glass
When generating ACPI tables we need to convert IRQs in U-Boot to the ACPI structures required by ACPI. This is a SoC-specific conversion and cannot be handled by generic code, so add a new IRQ method to do the conversion. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: - Fix 't

[PATCH v2 03/35] acpi: Add a way to check device status

2020-05-10 Thread Simon Glass
At present U-Boot does not support the different ACPI status values, but it is best to put this logic in a central place. Add a function to get the device status. Signed-off-by: Simon Glass --- Changes in v2: None Changes in v1: None include/acpi/acpi_device.h | 28

[PATCH v2 00/35] dm: Add programmatic generation of ACPI tables (part B)

2020-05-10 Thread Simon Glass
NOTE: I have resent this as v1 to avoid confusion This is split from the original series in an attempt to get things applied in chunks. This part includes: - writing basic ACPI code for integers, strings, names, packages - writing descriptors for GPIO, I2C, interrupts, SPI - writing code to enabl

[PATCH v2 01/35] dm: core: Add an ACPI name for the root node

2020-05-10 Thread Simon Glass
This always has a fixed ACPI name so add it as a driver function. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in v2: None Changes in v1: - Capitalise ACPI_OPS_PTR drivers/core/root.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/core/root.

Re: [PATCH v3 1/6] clk: rk3399: Add enable/disable clks

2020-05-10 Thread Suniel Mahesh
On Sat, May 9, 2020 at 10:26 PM Jagan Teki wrote: > Yes, most of the high speed peripheral clocks > in rk3399 enabled by default. > > But it would be better to handle them via clk > enable/disable API for handling proper reset > conditions like 'usb reset' over command line. > > So, enable USB, G

Re: [PATCH v3 5/6] rockchip: Enable PCIe/M.2 on rk3399 board w/ M.2

2020-05-10 Thread Suniel Mahesh
On Sat, May 9, 2020 at 10:26 PM Jagan Teki wrote: > Enable PCIe/M.2 support on > - NanoPC-T4 > - ROC-RK3399-PC Mezzanine boards. > > Signed-off-by: Jagan Teki > --- > Changes for v3: > - none > > arch/arm/dts/rk3399-u-boot.dtsi | 1 + > configs/nanopc-t4-rk3399_defconfig| 4 ++

Re: [PATCH v3 4/6] pci: Add Rockchip PCIe PHY controller driver

2020-05-10 Thread Suniel Mahesh
On Sat, May 9, 2020 at 10:26 PM Jagan Teki wrote: > Yes, it is possible to have a dedicated UCLASS PHY driver > for this Rockchip PCIe PHY but there are some issues on > Generic PHY framework to support the same. > > The Generic PHY framework is unable to get the PHY if > the PHY parent is of a d

Re: [PATCH v3 3/6] pci: Add Rockchip PCIe controller driver

2020-05-10 Thread Suniel Mahesh
On Sat, May 9, 2020 at 10:26 PM Jagan Teki wrote: > Add Rockchip PCIe controller driver for rk3399 platform. > > Driver support Gen1 by operating as a Root complex. > > Thanks to Patrick for initial work. > > Signed-off-by: Patrick Wildt > Signed-off-by: Jagan Teki > Reviewed-by: Kever Yang >

Re: [PATCH v3 2/6] clk: rk3399: Enable/Disable the PCIEPHY clk

2020-05-10 Thread Suniel Mahesh
On Sat, May 9, 2020 at 10:26 PM Jagan Teki wrote: > Enable/Disable the PCIEPHY clk for rk3399. > > CLK is clear in both enable and disable functionality. > > Signed-off-by: Jagan Teki > --- > Changes for v3: > - none > > drivers/clk/rockchip/clk_rk3399.c | 6 ++ > 1 file changed, 6 insertio

[PATCH v2 38/39] bdinfo: dm: Update fb_base when using driver model

2020-05-10 Thread Simon Glass
Update this value with the address of a video device so that it shows with the 'bd' command. It would be better to obtain the address from the uclass by looking in struct video_uc_platdata for each device. We can move over to that once DM_VIDEO migration is complete. Signed-off-by: Simon Glass R

Re: [PATCH v3 1/6] clk: rk3399: Add enable/disable clks

2020-05-10 Thread Suniel Mahesh
On Sat, May 9, 2020 at 10:26 PM Jagan Teki wrote: > Yes, most of the high speed peripheral clocks > in rk3399 enabled by default. > > But it would be better to handle them via clk > enable/disable API for handling proper reset > conditions like 'usb reset' over command line. > > So, enable USB, G

[PATCH v2 39/39] bdinfo: x86: vesa: Update fb_base to the correct value

2020-05-10 Thread Simon Glass
Set this value in global_data so that it is reported correctly on x86 boards. In fact, U-Boot allocates space for the frame buffer even though it is not used. Then the FSP picks the address itself (e.g. 0xb000). So the value set by U-Boot (high in memory with everything else that is relocated)

[PATCH v2 35/39] bdinfo: m68k: Move m68k-specific info into its own file

2020-05-10 Thread Simon Glass
We don't really want to have m68k-specific code in a generic file. Create a new arch-specific function to hold it, and move it into that. Make the function weak so that any arch can implement it. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Tested-by: Angelo Dureghello --- Changes in v2:

[PATCH v2 37/39] bdinfo: Update the file comments

2020-05-10 Thread Simon Glass
Update the comment at the top of the file to indicate what this file does. Also drop the line at the bottom and an unnecessary header include. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v2: None cmd/bdinfo.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) d

[PATCH v2 36/39] bdinfo: m68k: ppc: Move arch-specific code from bdinfo

2020-05-10 Thread Simon Glass
We don't have an easy way to share these three lines of code with two architectures. We also want to make it clear that this code is actually arch-specific. So just duplicate it in each arch-specific file. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Stefan Roese --- Changes

[PATCH v2 32/39] bdinfo: Export some basic printing functions

2020-05-10 Thread Simon Glass
At present the functions to print a number and a frequency are static. We want to move some of the code in here to an arch-specific file. For consistency that code should use these same functions. So export them with an appropriate name. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Chan

[PATCH v2 33/39] bdinfo: arm: Move ARM-specific info into its own file

2020-05-10 Thread Simon Glass
We don't really want to have ARM-specific code in a generic file. Create a new arch-specific function to hold it, and move it into that. Make the function weak so that any arch can implement it. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v2: - Leave MULTI_DTB_FIT in the ge

[PATCH v2 31/39] bdinfo: net: Inline print_eth_ip_addr()

2020-05-10 Thread Simon Glass
This function only has two lines of code now, so inline it. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v2: None cmd/bdinfo.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index e6237daf93..e30d530411 10064

[PATCH v2 34/39] bdinfo: ppc: Move PPC-specific info into its own file

2020-05-10 Thread Simon Glass
We don't really want to have PPC-specific code in a generic file. Create a new arch-specific function to hold it, and move it into that. Make the function weak so that any arch can implement it. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Stefan Roese --- Changes in v2: None

[PATCH v2 30/39] bdinfo: net: Drop legacy ethernet bdinfo

2020-05-10 Thread Simon Glass
This code pre-dates driver model and the migration date is nearly upon us. Pare the print_eths() function down and enable it for driver model, since it works correctly. The IP address is already printed in print_eth_ip_addr() so we can remove that. Since this results in a one-line print_eths() fu

[PATCH v2 29/39] bdinfo: net: ppc: Drop prints for CONFIG_HAS_ETHn

2020-05-10 Thread Simon Glass
These config options have not been migrated to Kconfig. This should be handled using driver model, iterating over the available Ethernet devices. For now, remove the code. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Stefan Roese --- Changes in v2: None cmd/bdinfo.c | 15 ---

[PATCH v2 28/39] bdinfo: net: ppc: Drop bi_enet1addr and other similar info

2020-05-10 Thread Simon Glass
These values were 'old' in 2013 so it should be safe to remove them. They are never set in U-Boot anyway, so the values will always be zero. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Stefan Roese --- Changes in v2: None common/board_r.c | 16 +---

[PATCH v2 25/39] bdinfo: Drop print_bi_boot_params()

2020-05-10 Thread Simon Glass
This function only has one line of code in it so inline it. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v2: None cmd/bdinfo.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index 5ffd86e508..b65eec332d 100644 --- a/cm

[PATCH v2 26/39] bdinfo: Drop print_bi_flash()

2020-05-10 Thread Simon Glass
This function only has three lines of code in it so inline it. This helps to put all the code in one place for future partitioning. Signed-off-by: Simon Glass --- Changes in v2: - Update commit message with an extra motivation cmd/bdinfo.c | 11 +++ 1 file changed, 3 insertions(+), 8 d

[PATCH v2 27/39] bdinfo: Drop print_cpu_word_size()

2020-05-10 Thread Simon Glass
This function only has one line of code in it so inline it. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v2: None cmd/bdinfo.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index f22dc7a129..d0afef5b5e 100644 --- a/cmd

[PATCH v2 23/39] bdinfo: ppc: Drop arch-specific print_baudrate()

2020-05-10 Thread Simon Glass
This function outputs the same basic info. Since the baud rate is commonly 115200 these is often no difference. Drop the arch-specific code and inline it to avoid a one-line function. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Stefan Roese --- Changes in v2: None cmd/bdinf

[PATCH v2 19/39] bdinfo: Drop unused __maybe_unused

2020-05-10 Thread Simon Glass
Some of these are not needed now. Drop them to avoid cluttering the code. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v2: - Drop __maybe_unused on print_lnum() too cmd/bdinfo.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cmd/bdinfo.c b/cmd/bd

[PATCH v2 20/39] bdinfo: microblaze: sh: nios2: Drop arch-specific flash info

2020-05-10 Thread Simon Glass
The differences these architectures have are minor and not worth the extra code. Use the generic version always. Tidy up the code style by removing unnecessary tabs. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v2: None cmd/bdinfo.c | 17 +++-- 1 file changed,

[PATCH v2 24/39] bdinfo: sh: arc: Drop arch-specific print_bi_mem()

2020-05-10 Thread Simon Glass
It isn't worth having arch-specific code for such minor output differences. In fact it is better if all archs are consistent. Drop the arch-specific code in print_bi_mem() and inline it to avoid a two-line function. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Acked-by: Alexey Brodkin ---

[PATCH v2 21/39] bdinfo: Drop unnecessary inline on functions

2020-05-10 Thread Simon Glass
This serves no purpose since the compiler will inline the functions automatically. Drop use of inline in this file. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v2: - Move __maybe_unused on print_lnum() to the early patch cmd/bdinfo.c | 14 +++--- 1 file changed, 7

[PATCH v2 22/39] bdinfo: Drop print_std_bdinfo()

2020-05-10 Thread Simon Glass
Everything in this function is standard now so it serves no purpose. Move it into the generic do_bdinfo() function. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v2: None cmd/bdinfo.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/cmd/bd

[PATCH v2 18/39] bdinfo: Drop the option to not use the generic 'bd' command

2020-05-10 Thread Simon Glass
Now that all architectures are using the generic do_bdinfo(), drop the option to not use it. When new architectures are added, they will get at least some useful information from the generic implementation. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v2: None cmd/bdinfo.c

  1   2   >