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 Ram

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 u-boo

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. > > CONFIG_SYS

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 mas

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] 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 wrong

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 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: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: [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 s

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 fro

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 t

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 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 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 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 Actions

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, r

[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 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 t

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 regi

[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 dis

[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 non-co

[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 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 o

[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

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 argument

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 > > Che

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 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 > > --- a/drivers/mmc/

[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 +++ b/

[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 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 ef706fb5

[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 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. Th

[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 @@ -302,

[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 a

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: Oliver

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 wit

[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 chang

[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 difficult

[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 Review

[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 si

[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 n

[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: Alex

[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 neces

[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 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 --- commo

[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 image

[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) u-boot-no

[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 no

[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 Sig

[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 --- arch/arm/mach-socfpg

[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 --gi

[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 co

[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 s

[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 acces

[v6 08/18] mmc: dwmmc: Change designware MMC 'clksel' callback function to return status

2020-12-23 Thread Siew Chin Lim
Change 'clksel' callback function to allow the code to return a status. This patch is a preparation for enabling Arm-Trusted-Firmware (ATF) in Intel SoC FPGA. This patch does not change functionality. When using Arm-Trusted-Firmware (ATF) in Intel SoC FPGA, the MMC clock related register is secur

[v6 09/18] mmc: dwmmc: socfpga: Add ATF support for MMC driver

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang In non-secure mode (EL2), MMC driver calls the SMC/PSCI services provided by ATF to set SDMMC's DRVSEL and SMPLSEL. Signed-off-by: Chee Hong Ang Signed-off-by: Siew Chin Lim --- v5 --- Call secure register access helper function to write the secure register. Return error i

[v6 10/18] net: designware: socfpga: Add ATF support for MAC driver

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang In non-secure mode (EL2), MAC driver calls the SMC/PSCI services provided by ATF to setup the PHY interface. Signed-off-by: Chee Hong Ang Signed-off-by: Siew Chin Lim --- v5 --- Call secure register access helper function to write the secure register. Return error if fail

[v6 11/18] arm: socfpga: soc64: Add ATF support for Reset Manager driver

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang In non-secure mode (EL2), Reset Manager driver calls the SMC/PSCI service provided by ATF to enable/disable the SOCFPGA bridges. Signed-off-by: Chee Hong Ang Signed-off-by: Siew Chin Lim --- arch/arm/mach-socfpga/reset_manager_s10.c | 13 + 1 file changed, 13 i

[v6 12/18] arm: socfpga: soc64: Add ATF support for FPGA reconfig driver

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang In non-secure mode (EL2), FPGA reconfiguration driver calls the SMC/PSCI services provided by ATF to configure the FPGA. Signed-off-by: Chee Hong Ang --- drivers/fpga/intel_sdm_mb.c | 139 1 file changed, 139 insertions(+) diff

[v6 13/18] arm: socfpga: mailbox: Add 'SYSTEM_RESET' PSCI support to mbox_reset_cold()

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang mbox_reset_cold() will invoke ATF's PSCI service when running in non-secure mode (EL2). Signed-off-by: Chee Hong Ang --- arch/arm/mach-socfpga/mailbox_s10.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-socfpga/mailbox_s10.c b/arch/arm/mach-socfpga

[v6 14/18] arm: socfpga: soc64: SSBL shall not setup stack on OCRAM

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang Since SSBL is running in DRAM, it shall setup the stack in DRAM instead of OCRAM which is occupied by SPL and handoff data. Signed-off-by: Chee Hong Ang --- include/configs/socfpga_soc64_common.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/configs/socfp

[v6 15/18] arm: socfpga: soc64: Skip handoff data access in SSBL

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang SPL already setup the Clock Manager with the handoff data from OCRAM. When the Clock Manager's driver get probed again in SSBL, it shall skip the handoff data access in OCRAM. Signed-off-by: Chee Hong Ang --- arch/arm/mach-socfpga/wrap_pll_config_s10.c | 3 ++- 1 file chang

[v6 16/18] arm: socfpga: dts: soc64: Add binman node of FIT image with ATF support

2020-12-23 Thread Siew Chin Lim
Add binman node to device tree to generate the FIT image for u-boot (u-boot.itb) and OS kernel (kernel.itb). u-boot.itb contains arm trusted firmware (ATF), u-boot proper and u-boot device tree for ATF u-boot flow. kernel.itb contains Linux Image and Linux device tree. Signed-off-by: Siew Chin L

[v6 17/18] arm: socfpga: soc64: Enable FIT image generation using binman

2020-12-23 Thread Siew Chin Lim
Enable BINMAN when using Arm-Trusted-Firmware (ATF) to generate FIT images. Signed-off-by: Siew Chin Lim --- v4 --- Adjust BINMAN sequence in code, sorted by alphabetical order. v5 --- Revert all changes in Makefile for BINMAN: (1) Remove target "fit-itb", directly use binman command to generat

[v6 18/18] configs: socfpga: Add defconfig for Agilex and Stratix 10 with ATF support

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang Booting Agilex and Stratix 10 with ATF support. SPL now loads ATF (BL31), U-Boot proper and DTB from FIT image. The new boot flow with ATF support is as follow: SPL -> ATF (BL31) -> U-Boot proper -> OS (Linux) U-Boot proper now starts at 0x20 (CONFIG_SYS_TEXT_BASE). ATF

[PATCH] Revert "arm64: a37xx: pci: Assert PERST# signal when unloading driver"

2020-12-23 Thread Pali Rohár
This reverts commit 828d32621686aec593076d16445d39b9b8d49c05. This change revers code which asserting PERST# signal when unloading driver. Driver's remove callback is still there as it is used for other functionality. Asserting PERST# signal prior booting kernel is causing that A3720 boards (Turr

[PATCH v2 00/21] dm: Preparation for enhanced of-platdata (part B)

2020-12-23 Thread Simon Glass
This series includes some refactoring of the dtoc tool and some changes to a few drivers (particularly on x86) to reduce TPL size. It is available at u-boot-dm/prep-working Changes in v2: - Rename DriverInfo to Driver - Add a test for the new code and a comment for Driver Simon Glass (21): pin

[PATCH v2 01/21] pinctrl: Drop post_bind() method when not needed

2020-12-23 Thread Simon Glass
This is not used with of-platdata, so remove it in that case. Signed-off-by: Simon Glass --- (no changes since v1) drivers/pinctrl/pinctrl-uclass.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index a

[PATCH v2 02/21] sysreset: Use a shorter error with SPL

2020-12-23 Thread Simon Glass
Use a minimal error message to save space. Sort the header files while we are here. Signed-off-by: Simon Glass --- (no changes since v1) drivers/sysreset/sysreset-uclass.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/sysreset/sysreset-uclass.c b/dri

[PATCH v2 03/21] arc: m68k: nds32: nios2: sh: xtensa: Add empty spl.h header

2020-12-23 Thread Simon Glass
At present it is not possible to include spl.h in on these architectures since the asm/spl.h file is not present. We want to be able to use the spl_phase() function, so add empty headers to make things build. Signed-off-by: Simon Glass --- (no changes since v1) arch/arc/include/asm/spl.h|

[PATCH v2 04/21] timer: Use a shorter error in TPL

2020-12-23 Thread Simon Glass
This error should not happen in normal use. Reduce the length of it to save space in the image. Add an empty spl.h file to sh since it appears to lack this. Signed-off-by: Simon Glass --- (no changes since v1) lib/time.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff -

[PATCH v2 05/21] test: Use a simple variable to record removed device

2020-12-23 Thread Simon Glass
At present the entire test state is effective passed into a test driver just to record which device was removed. This is unnecessary and makes it harder to track what is going on. Use a simple boolean instead. Also drop the unused 'removed' member while we are here. Signed-off-by: Simon Glass -

[PATCH v2 09/21] dtoc: Output the device in a separate function

2020-12-23 Thread Simon Glass
Reduce the length of output_node() by moving the device-output functionality into a separate function. Signed-off-by: Simon Glass --- (no changes since v1) tools/dtoc/dtb_platdata.py | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/tools/d

[PATCH v2 08/21] dtoc: Make _output_list a top-level function

2020-12-23 Thread Simon Glass
It is annoying to have this function inside its parent since it makes the parent longer and hard to read. Move it to the top level. Signed-off-by: Simon Glass --- (no changes since v1) tools/dtoc/dtb_platdata.py | 80 +++--- 1 file changed, 40 insertions(+), 40

[PATCH v2 07/21] dtoc: Fix a few pylint warnings in dtb_platdata

2020-12-23 Thread Simon Glass
These have crept in again. Update the file to fix all but these ones: dtb_platdata.py:143:0: R0902: Too many instance attributes (10/7) (too-many-instance-attributes) dtb_platdata.py:713:0: R0913: Too many arguments (6/5) (too-many-arguments) Signed-off-by: Simon Glass --- (no

[PATCH v2 10/21] dtoc: Output the struct values in a separate function

2020-12-23 Thread Simon Glass
Reduce the length of output_node() futher by moving the struct-output functionality into a two separate functions. Signed-off-by: Simon Glass --- (no changes since v1) tools/dtoc/dtb_platdata.py | 50 ++ 1 file changed, 34 insertions(+), 16 deletions(-) dif

[PATCH v2 11/21] dtoc: Convert _drivers to a dict

2020-12-23 Thread Simon Glass
At present this member holds a simple list of driver names. Update it to be a dict of DriverInfo, with the name being the key. This will allow more information to be added about each driver, in future patches. Signed-off-by: Simon Glass --- Changes in v2: - Rename DriverInfo to Driver - Add a te

[PATCH v2 13/21] dtoc: Allow use of the of_match_ptr() macro

2020-12-23 Thread Simon Glass
Update the regex for the of_match member to allow of_match_ptr() so it matches both: .of_match = apl_hostbridge_ids, and .of_match = of_match_ptr(apl_hostbridge_ids), Without this, dtoc emits warnings and cannot find the drivers. Signed-off-by: Simon Glass --- (no c

[PATCH v2 14/21] x86: apl: Use const for driver operations

2020-12-23 Thread Simon Glass
Update these declarations to const to ensure that the data ends up in the rodata section. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/apollolake/pmc.c| 2 +- arch/x86/cpu/intel_common/p2sb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x

[PATCH v2 15/21] x86: Move call64 into its own section

2020-12-23 Thread Simon Glass
When this code is not used (e.g. by TPL) we want it to be excluded from the image. Put it in its own section so that this happens. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/i386/call64.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/cpu/i386/call64.S b/ar

[PATCH v2 12/21] dtoc: Scan drivers for available information

2020-12-23 Thread Simon Glass
At present we simply record the name of a driver parsed from its implementation file. We also need to get the uclass and a few other things so we can instantiate devices at build time. Add support for collecting this information. This requires parsing each driver file. Signed-off-by: Simon Glass

[PATCH v2 17/21] x86: apl: Update hostbridge to remove unwanted TPL code

2020-12-23 Thread Simon Glass
At present several strings from this file appear in the TPL binary. Add preprocessor checks to drop them. This reduces the TPL binary size by about 128 bytes. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/apollolake/hostbridge.c | 14 +- 1 file changed, 9 inser

[PATCH v2 16/21] x86: coral: Move fsp-m settings to a subnode

2020-12-23 Thread Simon Glass
At present these settings are in the node for host-bridge and so are visible in TPL as well as SPL. But they are only used for SPL. Move them to a subnode so that TPL does not included them. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/apollolake/fsp_m.c | 5 - arch

[PATCH v2 19/21] x86: pinctrl: Drop unlikely error messages from TPL

2020-12-23 Thread Simon Glass
These errors are only really for development purposes. Drop them to reduce the size of TPL. The error numbers are still reported. This reduces the TPL binary size on coral by about 160 bytes. Signed-off-by: Simon Glass --- (no changes since v1) drivers/pinctrl/intel/pinctrl.c | 11 ---

[PATCH v2 21/21] x86: Fix header guard in asm/pmu.h

2020-12-23 Thread Simon Glass
This has the wrong name. Fix it. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/include/asm/pmu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/pmu.h b/arch/x86/include/asm/pmu.h index b76bdf64a30..818e80881ec 100644 --- a/arch/x8

[PATCH v2 06/21] test: Move some test drivers into their own file

2020-12-23 Thread Simon Glass
At present several test drivers are part of the test file itself. Some of these are useful for of-platdata tests. Separate them out so we can use them for other things also. A few adjustments are needed so this driver can build for sandbox_spl as well. Signed-off-by: Simon Glass --- (no changes

[PATCH v2 18/21] x86: apl: Reduce size for TPL

2020-12-23 Thread Simon Glass
Update various drivers to use of_match_ptr() and to avoid including debug strings in TPL. Omit the WiFi driver entirely, since it is not used in TPL. This reduces the TPL binary size by about 608 bytes. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/apollolake/lpc.c

[PATCH v2 20/21] x86: tpl: Remove unwanted devicetree string

2020-12-23 Thread Simon Glass
Update this driver to use of_match_ptr(). This reduces the TPL binary size by about 32 bytes. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/tpl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c index 15b0212d19

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

2020-12-23 Thread André Przywara
On 23/12/2020 12:29, Amit Tomar wrote: > 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/m

[PATCH v2 16/18] dm: Use access methods for dev/uclass private data

2020-12-23 Thread Simon Glass
Most drivers use these access methods but a few do not. Update them. In some cases the access is not permitted, so mark those with a FIXME tag for the maintainer to check. Signed-off-by: Simon Glass Acked-by: Andy Shevchenko Acked-by: Pratyush Yadav --- (no changes since v1) arch/arm/cpu/ar

Re: [PATCH v2] riscv: Add support for SPI on Kendryte K210

2020-12-23 Thread Christopher Obbard
Hi Sean, everything looks good! On Tue, 22 Dec 2020 at 23:58, Sean Anderson wrote: > > This enables configs necessary for using SPI. The environment is saved to > the very end of SPI flash. This is unlikely to be overwritten unless the > entire flash is reprogrammed. > > This also supplies a def

[PATCH] cosmetic: fix typo in drivers/usb/Kconfig

2020-12-23 Thread ferlandm
From: Marc Ferland This commit fixes a simple typo: sPL --> SPL. Signed-off-by: Marc Ferland --- drivers/usb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index fedc0134f5..6e291198ab 100644 --- a/drivers/usb/Kconfig +++ b

Re: [PATCH] dm: core: Inline a few ofnode functions in SPL

2020-12-23 Thread Simon Glass
A recent change to unify the flattree/livetree code introduced a small size increase in SPL on some boards. For example SPL code size for px30-core-ctouch2-px30 increased by 40 bytes. To address this we can take advantage of the fact that some of the ofnode functions are only called a few times in

Re: [PATCH] buildman: Remove output binaries before building

2020-12-23 Thread Simon Glass
Buildman reuses build directories from previous builds to avoid the cost of 'make mrproper' for every build. If the previous build produced an SPL image but the current one does not, the SPL image will remain and buildman will think it is a result of building the current board. Remove these files

Re: [PATCH v2 6/6] test: dm: spi: Add testcase for spi_claim_bus()

2020-12-23 Thread Simon Glass
Add testcase for spi_claim_bus(), which checks that sandbox spi bus speed/mode settings are updated correctly when multiple slaves use the bus consecutively. The following configurations are used for the two spi slaves involved: * different max_hz / different modes * different max_hz / same mod

Re: [PATCH] dm: spi: Fix spi_free_slave() freed memory write

2020-12-23 Thread Simon Glass
On Wed, 16 Dec 2020 at 04:12, Niel Fourie wrote: > > Remove setting slave->dev to NULL after the device_remove() call. > > The slave pointer points to dev->parent_priv, which has already > been freed by device_free(), called from device_remove() in the > preceding line. Writing to slave->dev may c

Re: [PATCH v2 3/6] spi: sandbox_spi: Implement speed/mode setup

2020-12-23 Thread Simon Glass
Implement sandbox_spi_set_{speed, mode} routines, to be able to keep track of the current bus speed/mode. This will help determine whether the values passed from dm_spi_claim_bus() are valid. Signed-off-by: Ovidiu Panait --- Changes in v2: - none drivers/spi/sandbox_spi.c | 26

Re: [PATCH v2 5/6] spi: spi-uclass: Fix spi_claim_bus() speed/mode setup logic

2020-12-23 Thread Simon Glass
Currently, when different spi slaves claim the bus consecutively using spi_claim_bus(), spi_set_speed_mode() will only be executed on the first two calls, leaving the bus in a bad state starting with the third call. This patch drops spi_slave->speed member and adds caching of bus speed/mode in dm_

  1   2   >