[v6 07/18] arm: socfpga: Add secure register access helper functions for SoC 64bits

2020-12-23 Thread Siew Chin Lim
These secure register access functions allow U-Boot proper running at EL2 (non-secure) to access System Manager's secure registers by calling the ATF's PSCI runtime services (EL3/secure). Signed-off-by: Siew Chin Lim --- v5 --- Return error code instead of hang the system if fail to access the

[v6 06/18] arm: socfpga: soc64: Define SMC function identifiers for PSCI SiP services

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang This header file defines the Secure Monitor Call (SMC) message protocol for ATF (BL31) PSCI runtime services. It includes all the PSCI SiP function identifiers for the secure runtime services provided by ATF. The secure runtime services include System Manager's registers

[v6 05/18] arm: socfpga: soc64: Add SMC helper function for Intel SOCFPGA (64bits)

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang invoke_smc() allow U-Boot proper running in non-secure mode (EL2) to invoke SMC call to ATF's PSCI runtime services such as System Manager's registers access, 2nd phase bitstream FPGA reconfiguration, Remote System Update (RSU) and etc. smc_send_mailbox() is a send mailbox

[v6 04/18] arm: socfpga: Disable "spin-table" method for booting Linux

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang Standard PSCI function "CPU_ON" provided by ATF is now used by Linux kernel to bring up the secondary CPUs to enable SMP booting in Linux on SoC 64bits platform. Signed-off-by: Chee Hong Ang --- arch/arm/mach-socfpga/Kconfig | 2 -- 1 file changed, 2 deletions(-) diff

[v6 03/18] arm: socfpga: soc64: Override 'lowlevel_init' to support ATF

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang Override 'lowlevel_init' to make sure secondary CPUs trapped in ATF instead of SPL. After ATF is initialized, it will signal the secondary CPUs to jump from SPL to ATF waiting to be 'activated' by Linux OS via PSCI call. Signed-off-by: Chee Hong Ang ---

[v6 02/18] arm: socfpga: soc64: Load FIT image with ATF support

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang Instead of loading u-boot proper image (u-boot.img), SPL now loads FIT image (u-boot.itb) which includes u-boot proper, ATF and u-boot proper's DTB. For OS, u-boot now loads FIT images (kernel.itb) which includes Linux Image and Linux's DTB. Signed-off-by: Chee Hong Ang

[v6 01/18] arm: socfpga: Add function for checking description from FIT image

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang Add board_fit_config_name_match() for matching board name with device tree files in FIT image. This will ensure correct DTB file is loaded for different board type. Currently, we are not supporting multiple device tree files in FIT image therefore this function basically do

[v6 00/18] Enable ARM Trusted Firmware for U-Boot

2020-12-23 Thread Siew Chin Lim
This is the 6th version of patchset to enable ARM Trusted Firmware for U-Boot for Intel Stratix10 and Agilex platform. New U-boot flow with ARM Trusted Firmware (ATF) support: SPL (EL3) -> ATF-BL31 (EL3) -> U-Boot Proper (EL2) -> Linux (EL1) SPL loads the u-boot.itb which consist of: 1)

[PATCH v3 8/8] spl: fit: Load devicetree when a Linux payload is found

2020-12-23 Thread Alexandru Gagniuc
When a FIT config specifies a devicetree, we should load it, no questions asked. In the case of the "simple" FIT loading path, a difficulty arises in selecting the load address of the FDT. The default FDT location is right after the "kernel" or "firmware" image. However, if that is an OP-TEE

[PATCH v3 7/8] spl: fit: Replace #ifdef blocks with more readable constructs

2020-12-23 Thread Alexandru Gagniuc
Use the IS_ENABLED() macro to control code flow, instead of the caveman approach of sprinkling #ifdefs. Code size is not affected, as the linker garbage-collects unused functions. However, readability is improved significantly. Signed-off-by: Alexandru Gagniuc Reviewed-by: Simon Glass ---

[PATCH v3 6/8] image: Do not #if guard board_fit_config_name_match() prototype

2020-12-23 Thread Alexandru Gagniuc
There's no point in guarding function prototypes with #ifdefs. If a function is not defined, the linker will notice. Having the prototype does not affect code size. What the #if guard takes away is the ability to use IS_ENABLED: if (CONFIG_IS ENABLED(FIT_IMAGE_POST_PROCESS))

[PATCH v3 5/8] spl: fit: Only look up FIT configuration node once

2020-12-23 Thread Alexandru Gagniuc
The configuration node a sub node under "/configurations", which describes the components to load from "/images". We only need to locate this node once. However, for each component, spl_fit_get_image_name() would parse the FIT image, looking for the correct node. Such work duplication is not

[PATCH v3 3/8] spl: fit: Pass FIT context via a structure pointer

2020-12-23 Thread Alexandru Gagniuc
Several loose arguments describe the FIT image. They are thus related, and it makes sense to pass them together, in a structure. Examples include the FIT blob pointer, offset to FDT nodes, and the offset to external data. Use a spl_fit_info structure to group these parameters. Signed-off-by:

[PATCH v3 4/8] spl: fit: Remove useless loop in spl_fit_get_image_name()

2020-12-23 Thread Alexandru Gagniuc
When a desired configuration is not found, conf_node will have a negative value. Thus the for loop will start at the root "/" node of the image, print the "/description" property, and stop. It appears the intent of the loop was to print the names of the subnodes under "/configurations". We would

[PATCH v3 2/8] spl: fit: Factor out FIT parsing and use a context struct

2020-12-23 Thread Alexandru Gagniuc
The logical steps in spl_load_simple_fit() are difficult to follow. I think the long comments, ifdefs, and ungodly number of variables seriously affect the readability. In particular, it violates section 6 of the coding style, paragraphs (3), and (4). The purpose of this patch is to improve the

[PATCH v3 1/8] spl: fit: Drop 'length' argument to board_spl_fit_post_load()

2020-12-23 Thread Alexandru Gagniuc
The size is derived from the FIT image itself. Any alignment requirements are machine-specific and known by the board code. Thus the total length can be derived from the FIT image and knowledge of the platform. The 'length' argument is redundant. Remove it. Signed-off-by: Alexandru Gagniuc

[PATCH v3 0/8] spl: fit: Play nicely with OP-TEE and Linux

2020-12-23 Thread Alexandru Gagniuc
This patch series is part of a larger effort to get linux to boot really fast alongside a secure OS. One piece of the puzzle is getting Linux and OP-TEE to boot straight from SPL. This is where the FIT image comes in. The "simple" fit code was mostly ready for this, although it was quite

[PATCH] cmd: ubi: don't allow to rename a volume to a name that already exist

2020-12-23 Thread Philippe Reynes
This commits add a check on the command ubi rename. This check avoids to rename a volume to with a name that is already used on another ubi volume. If two volumes has the same name, then the ubi device can't be mounted anymore. Signed-off-by: Philippe Reynes --- cmd/ubi.c | 5 + 1 file

RE: [PATCH] imx8mp_evk: Increase CONFIG_SYS_MALLOC_F_LEN

2020-12-23 Thread Peng Fan
> Subject: Re: [PATCH] imx8mp_evk: Increase CONFIG_SYS_MALLOC_F_LEN > > Hi Peng, > > On Wed, Dec 23, 2020 at 4:29 AM Peng Fan wrote: > > > I am thinking to remove the CLK CCF support for i.MX8M, and use simple > > CLK DM. Do you agree? > > As a minimal fix for 2021.01, I suggest that we go

Re: [PATCH v2] imx: ahab: allow to bypass confirmation for ahab_close cmd

2020-12-23 Thread Oliver Graute
On 21/12/20, Clément Péron wrote: > Calling ahab_close cmd force the user to interact for confirmation. > > This is not user-friendly when using this cmd during factory process. > > Allow the user to pass '-y' option to bypass this confirmation. > > Signed-off-by: Clément Péron Acked-by:

[PATCH v3 0/6] Add MBR partition table creation and verify command

2020-12-23 Thread Marek Szyprowski
Hi All, This patchset adds 'mbr' command to let one to create or verify MBR (Master Boot Record) partition layout based on the provided text description. This can be used in scripts to help system flashing tools/scripts to ensure proper partition layout. It has been inspired by the 'gpt' command

[PATCH v3 4/6] disk: dos: make some functions static

2020-12-23 Thread Marek Szyprowski
Make functions not used outside this file static. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/disk/part_dos.c b/disk/part_dos.c index 3b79b9b1b8..2c4ad0b6ba 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c @@

[PATCH v3 6/6] cmd: Add MBR partition layout control utility

2020-12-23 Thread Marek Szyprowski
Add a 'mbr' command to let users create or verify MBR partition layout based on the provided text description. The partition layout is alternatively read from the 'mbr_parts' environment variable. This can be used in scripts to help system image flashing tools to ensure proper partition layout.

[PATCH v3 5/6] disk: dos: add code for creating MBR partition layout

2020-12-23 Thread Marek Szyprowski
Add a code for creating and writing MBR partition layout. The code generates similar layout of EBRs (Exteneded Block Records) and logical volumes as Linux's fdisk utility. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 167 disk/part_dos.h

[PATCH v3 2/6] disk: dos: add some defines for the hardcoded numbers

2020-12-23 Thread Marek Szyprowski
Add some handy defines for some hardcoded magic numbers related to extended partition handling. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 6 +++--- disk/part_dos.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/disk/part_dos.c b/disk/part_dos.c index

[PATCH v3 1/6] disk: dos: rename write_mbr_partition to write_mbr_sector

2020-12-23 Thread Marek Szyprowski
write_mbr_partition() function name is a bit misleading, so rename it to write_mbr_sector(). This is a preparation for adding code for writing a complete MBR partition layout. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 2 +- drivers/fastboot/fb_mmc.c | 2 +- include/part.h

[PATCH v3 3/6] disk: dos: use generic macro for unaligned le32 access

2020-12-23 Thread Marek Szyprowski
Use a generic helper for reading LE32 integers. Signed-off-by: Marek Szyprowski --- disk/part_dos.c | 28 +--- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/disk/part_dos.c b/disk/part_dos.c index 20d35dc9cd..3b79b9b1b8 100644 --- a/disk/part_dos.c +++

Re: [PATCH v2 5/6] mmc: actions: add MMC driver for Actions OWL S700

2020-12-23 Thread Amit Tomar
Hi, Thanks again for the detailed review + > > 3 files changed, 407 insertions(+) > > create mode 100644 drivers/mmc/owl_mmc.c > > > > diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig > > index 14d7913..61f9c67 100644 > > ---

Re: [PATCH] imx8mp_evk: Increase CONFIG_SYS_MALLOC_F_LEN

2020-12-23 Thread Fabio Estevam
Hi Peng, On Wed, Dec 23, 2020 at 4:29 AM Peng Fan wrote: > I am thinking to remove the CLK CCF support for i.MX8M, and use simple CLK > DM. Do you agree? As a minimal fix for 2021.01, I suggest that we go with my patch. After 2021.01 is released we can consider using simple CLK DM. Thanks

Re: [PATCH v2] efi_loader: Extra checks while opening an OPTEE session

2020-12-23 Thread Ilias Apalodimas
Apologies for the noise. This version should be fine! You can pick it up if you like it. Cheers /Ilias On Wed, 23 Dec 2020 at 13:27, Ilias Apalodimas wrote: > > Heinrich I found a slightly better way to do it and free teh session > on errors, so we dont have to check it. > I'll send a v3 > >

Re: [PATCH v2] efi_loader: Extra checks while opening an OPTEE session

2020-12-23 Thread Ilias Apalodimas
Heinrich I found a slightly better way to do it and free teh session on errors, so we dont have to check it. I'll send a v3 Cheers /Ilias On Wed, 23 Dec 2020 at 13:25, Ilias Apalodimas wrote: > > When opening an OP-TEE session we need to check the internal return > value of OP-TEE call

[PATCH v2] efi_loader: Extra checks while opening an OPTEE session

2020-12-23 Thread Ilias Apalodimas
When opening an OP-TEE session we need to check the internal return value of OP-TEE call arguments as well the return code of the function itself. The code was also ignoring to close the OP-TEE session in case the shared memory registration failed. Fixes: f042e47e8fb43 ("efi_loader: Implement EFI

[PATCH 3/3] arm: mvebu: Espressobin: Set default value for $ethNaddr env variable

2020-12-23 Thread Pali Rohár
On Espressobin board are MAC addresses stored in U-Boot env area. Therefore they are not present in default_environment[] array constructed at compile time. This change puts permanent MAC addresses into default_environment[] array at board runtime. Espressobin board has enabled DEFAULT_ENV_IS_RW

[PATCH 2/3] arm: mvebu: Espressobin: Set default value for $fdtfile env variable

2020-12-23 Thread Pali Rohár
On Espressobin board value for $fdtfile cannot be determined at compile time and is calculated at board runtime code. This change uses a new option DEFAULT_ENV_IS_RW to allow modifying default_environment[] array at runtime and set into it correct value. This change also ensure that 'env default

[PATCH 1/3] env: Allow to set default_environment[] from board code via compile option DEFAULT_ENV_IS_RW

2020-12-23 Thread Pali Rohár
This change allows board code to modify default_environment[] array when compile option DEFAULT_ENV_IS_RW is specified in board config file. Some board default variables depend on runtime configuration which is not known at compile time. Therefore allow to set default_environment[] array as

[PATCH 0/3] arm: mvebu: Espressobin: Set default env values at runtime

2020-12-23 Thread Pali Rohár
This patch series set default env values of $fdtfile and $ethNaddr for Espressobin board at runtime. It fixes two main issues on Espressobin board that 'env default -a' completely erases permanent board MAC addresses and also erase $fdtfile variable which is needed for booting Linux kernel via

Re: [PATCH] efi_loader: Extra checks while opening an OPTEE session

2020-12-23 Thread Heinrich Schuchardt
Am 23. Dezember 2020 11:43:19 MEZ schrieb Ilias Apalodimas : >When opening an OP-TEE session we need to check the internal return >value of OP-TEE call arguments as well the return code of the >function itself. >The code was also ignoring to close the OP-TEE session in case the >shared memory

Re: [PATCH v1] toradex: hand over maintainership

2020-12-23 Thread Oleksandr Suvorov
On Tue, Dec 22, 2020 at 5:57 PM Igor Opaniuk wrote: > > From: Igor Opaniuk > > Hand over maintainership of Toradex SoMs (that I was responsible of) to > Oleksandr because of my resignation from Toradex, as such I will > have no immediate involvement with these modules and as a result not > able

[PATCH] efi_loader: Extra checks while opening an OPTEE session

2020-12-23 Thread Ilias Apalodimas
When opening an OP-TEE session we need to check the internal return value of OP-TEE call arguments as well the return code of the function itself. The code was also ignoring to close the OP-TEE session in case the shared memory registration failed. Fixes: f042e47e8fb43 ("efi_loader: Implement EFI

Re: [PATCH v2 1/2] lib: uuid: use RNG device if present

2020-12-23 Thread Torsten Duwe
On Sun, 20 Dec 2020 11:17:50 -0700 Simon Glass wrote: > Hi Torsten, > > On Sun, 20 Dec 2020 at 10:00, Torsten Duwe wrote: > > > > On Fri, 18 Dec 2020 19:29:12 -0700 > > Simon Glass wrote: > > > > > > - int i; > > > > - > > > > - srand(get_ticks() + rand()); > > > > + int i,

Re: [PATCH v2 5/6] mmc: actions: add MMC driver for Actions OWL S700

2020-12-23 Thread André Przywara
On 23/12/2020 04:25, Jaehoon Chung wrote: > On 12/23/20 11:22 AM, Amit Tomer wrote: >> On Wed, Dec 23, 2020 at 5:57 AM André Przywara >> wrote: >>> >>> On 19/12/2020 14:51, Amit Singh Tomar wrote: From: Amit Singh Tomar This commit adds support for MMC controllers found on

Re: [PATCH v2 1/2] lib: uuid: use RNG device if present

2020-12-23 Thread Matthias Brugger
Hi Simon, On 19/12/2020 03:29, Simon Glass wrote: > Hi Mattias, > > On Wed, 16 Dec 2020 at 09:28, wrote: >> >> From: Matthias Brugger >> >> When calculating a random UUID we use a weak seed. >> Use a RNG device if present to increase entropy. >> >> Signed-off-by: Matthias Brugger >> >> --- >>

Re: [PATCH 0/2] Add SIMATIC IOT2050 board support

2020-12-23 Thread Jan Kiszka
On 23.12.20 09:18, Lokesh Vutla wrote: > > > On 18/12/20 11:43 am, Jan Kiszka wrote: >> On 18.12.20 07:04, Jan Kiszka wrote: >>> On 18.12.20 05:46, Lokesh Vutla wrote: Hi Jan, Sorry for the delayed response. On 04/12/20 1:29 pm, Jan Kiszka wrote: > This is the baseline

RE: [PATCH v2 5/6] mmc: actions: add MMC driver for Actions OWL S700

2020-12-23 Thread Peng Fan
Thanks for Cc. > Subject: Re: [PATCH v2 5/6] mmc: actions: add MMC driver for Actions OWL > S700 > > Hi Amit, > > On 12/23/20 2:59 PM, Amit Tomar wrote: > > Hi Jaehoon > > > > I had already mentioned about making more readable than now. > > > >> > >> if (rate <= 100) { > >> rdelay =

Re: [PATCH v1] toradex: hand over maintainership

2020-12-23 Thread Oleksandr Suvorov
On Tue, Dec 22, 2020 at 5:57 PM Igor Opaniuk wrote: > > From: Igor Opaniuk > > Hand over maintainership of Toradex SoMs (that I was responsible of) to > Oleksandr because of my resignation from Toradex, as such I will > have no immediate involvement with these modules and as a result not > able

Re: [PATCH v6 00/28] Add DM support for omap PWM backlight

2020-12-23 Thread Dario Binacchi
Hi Lokesh, > Il 23/12/2020 08:57 Lokesh Vutla ha scritto: > > > On 23/12/20 12:00 am, Dario Binacchi wrote: > > Hi Lokesh, > > > >> Il 22/12/2020 14:52 Lokesh Vutla ha scritto: > >> > >> > >> Hi Dario, > >> > >> On 22/11/20 9:41 pm, Dario Binacchi wrote: > >>> > >>> The series was born

Re: [RESEND PATCH 1/2] usb: xhci-mtk: support option to disable ports

2020-12-23 Thread Marek Vasut
On 12/23/20 2:52 AM, Chunfeng Yun wrote: Add support to disable specific ports, it's useful for some scenarios: 1. usb3 PHY is shared whith PCIe or SATA, the corresponding usb3 port can be disabled; 2. some usb2 or usb3 ports are not used on special platforms, they should be disabled to

Re: [PATCH] arm:pdu001: Use pseudo partition UUID for LINUX kernel boot paramter root

2020-12-23 Thread Lokesh Vutla
On 18/12/20 1:33 pm, Felix Brack wrote: > As more and more LINUX drivers are modified to use asynchronous probing > instead of synchronous probing, relying on device names being equal in > U-Boot and LINUX is not possible anymore. This is also true for block > device names like mmc0, mmc1 ect.

Re: [PATCH 0/2] Add SIMATIC IOT2050 board support

2020-12-23 Thread Lokesh Vutla
On 18/12/20 11:43 am, Jan Kiszka wrote: > On 18.12.20 07:04, Jan Kiszka wrote: >> On 18.12.20 05:46, Lokesh Vutla wrote: >>> Hi Jan, >>> Sorry for the delayed response. >>> >>> On 04/12/20 1:29 pm, Jan Kiszka wrote: This is the baseline support for the SIMATIC IOT2050 devices.

Re: [PATCH] arm: dts: k3-j721e: ddr: Update to 0.5.0 version of DDR config tool

2020-12-23 Thread Lokesh Vutla
On 04/12/20 5:13 am, prane...@ti.com wrote: > From: Praneeth Bajjuri > > Update the ddr settings to use the DDR reg config tool rev 0.5.0. > This enables 4266MTs DDR configuration. > > Signed-off-by: Praneeth Bajjuri > Signed-off-by: Kevin Scholz Applied to u-boot-ti/for-next Thanks and

Re: [PATCH] spi: omap3_spi: Fix speed and mode selection

2020-12-23 Thread Lokesh Vutla
On 29/11/20 12:53 pm, Vignesh Raghavendra wrote: > McSPI IP provides per CS specific speed and mode selection. Therefore it > is possible to apply these settings only after CS is known. But > set_speed and set_mode can be called without bus being claimed, this > would lead driver to set up

Re: [PATCH] spi: ti_qspi: Fix "spi-max-frequency" error path in ti_qspi_ofdata_to_platdata

2020-12-23 Thread Lokesh Vutla
On 28/11/20 1:41 pm, Ovidiu Panait wrote: > struct ti_qspi_priv->max_hz is declared as unsigned int, so the following > error path check will always be false, even when "spi-max-frequency" > property is invalid/missing: > priv->max_hz = fdtdec_get_int(blob, node, "spi-max-frequency", -1); >

Re: [PATCH] gpio: tca642x: fix input subcommand for gpio banks > 0

2020-12-23 Thread Lokesh Vutla
On 25/11/20 11:12 pm, Tomas Novotny wrote: > The value of input pin for bank > 0 is always 0 for input subcommand. > The reason is that gpio_bank variable is computed only for invert and > output subcommands (it depends on number of arguments). The default > value of zero causes to shift the

Re: [PATCH] configs: am65x_evm: Define the maximum file size for DFU

2020-12-23 Thread Lokesh Vutla
On 24/11/20 3:59 pm, Aswath Govindraju wrote: > In include/dfu.h, if CONFIG_SYS_DFU_MAX_FILE_SIZE is not defined then it is > defined as CONFIG_SYS_DFU_DATA_BUF_SIZE. This is 128 KiB for a53 core and > 20 KiB for r5 core. If a larger file is transferred using dfu then it > fails. > >

Re: [PATCH 0/3] usb: am654: Add support for host mode to the USB port on overlay board

2020-12-23 Thread Lokesh Vutla
On 20/11/20 9:18 pm, Aswath Govindraju wrote: > The following series of patches > - adds support for host mode to USB3SS0 controller > - adds aliases for USB subsystems > - adds a workaround to use USB0 in USB 2.0 only mode Fixed the dts patches subject to arm: dts: and applied to

Re: [PATCH] drivers: tee: i2c trampoline driver

2020-12-23 Thread Jens Wiklander
Hi Jorge, On Mon, Dec 21, 2020 at 07:15:40PM +0100, Jorge Ramirez-Ortiz wrote: > This commit gives the secure world access to the I2C bus so it can > communicate with I2C slaves (tipically those would be secure elements > like the NXP SE050). > > Tested on imx8mmevk. > > Signed-off-by: Jorge

<    1   2