[PATCH 0/2] rtc: add rtc-abx80x, a driver for the Abracon AB x80x i2c rtc

2020-12-21 Thread Ying-Chun Liu
From: "Ying-Chun Liu (PaulLiu)" This is a basic driver for the ultra-low-power Abracon AB x80x series of RTC chips. It supports in particular, the supersets AB0805 and AB1805. It allows reading and writing the time, and enables the supercapacitor or battery charger. Ying-Chun Liu (PaulLiu) (2):

[PATCH 1/2] rtc: add rtc-abx80x, a driver for the Abracon AB x80x i2c rtc

2020-12-21 Thread Ying-Chun Liu
From: "Ying-Chun Liu (PaulLiu)" This is a basic driver for the ultra-low-power Abracon AB x80x series of RTC chips. It supports in particular, the supersets AB0805 and AB1805. It allows reading and writing the time, and enables the supercapacitor or battery charger. Signed-off-by: Ying-Chun Liu

[PATCH 2/2] doc: device-tree-bindings: rtc: Abracon AB x80x i2c rtc

2020-12-21 Thread Ying-Chun Liu
From: "Ying-Chun Liu (PaulLiu)" Document the bindings for abracon,abx80x and related compatibles. Signed-off-by: Ying-Chun Liu (PaulLiu) --- .../rtc/abracon,abx80x.txt| 31 +++ 1 file changed, 31 insertions(+) create mode 100644 doc/device-tree-bindings/rtc

Re: [PATCH 4/6] button: add a simple ADC-based button driver

2020-12-21 Thread Marek Szyprowski
Hi Simon, On 19.12.2020 03:28, Simon Glass wrote: > On Mon, 14 Dec 2020 at 04:25, Marek Szyprowski > wrote: >> Add a simple ADC-based button driver. This driver binds to the 'adc-keys' >> device tree node. >> >> Signed-off-by: Marek Szyprowski >> Change-Id: I6da7101eff3ce53766d899f49f5839d728d5

[PATCH] arm: mvebu: Espressobin: Disable slot when emmc is not present

2020-12-21 Thread Pali Rohár
This change extends previous commit 061c6d1b238a ("arm: mvebu: Espressobin: Detect presence of emmc at runtime") and when emmc is not present then emmc is removed from U-Boot DM and corresponding slot is disabled. Therefore on Espressobin board without soldered emmc, state of emmc hw should be same

RE: [PATCH] riscv: timer: Add support for an early timer

2020-12-21 Thread Pragnesh Patel
Hi Rick, >-Original Message- >From: Rick Chen >Sent: 10 December 2020 08:36 >To: Pragnesh Patel >Cc: Simon Glass ; U-Boot Mailing List b...@lists.denx.de>; Atish Patra ; Bin Meng >; Paul Walmsley ( Sifive) ; >Anup Patel ; Sagar Kadam >; Palmer Dabbelt ; rick >; Alan Kao ; Leo Liang > >Su

Re: [PATCH 01/26] sandbox: serial: Move priv into a header file

2020-12-21 Thread Andy Shevchenko
On Sat, Dec 19, 2020 at 10:39:53AM -0700, Simon Glass wrote: > Move this struct into a header file so that dtoc can include it in its > dt-platdata.c file. Reviewed-by: Andy Shevchenko > Signed-off-by: Simon Glass > --- > > arch/sandbox/include/asm/serial.h | 30 ++

Re: [PATCH 12/26] x86: sysreset: Move priv/plat structs to headers

2020-12-21 Thread Andy Shevchenko
On Sat, Dec 19, 2020 at 10:40:04AM -0700, Simon Glass wrote: > With the new of-platdata, these need to be available to dt_platdata.c > so must be in header files. Move them and add the dtd struct too. Reviewed-by: Andy Shevchenko > Signed-off-by: Simon Glass > --- > > arch/x86/include/asm/sys

Re: [PATCH 17/26] dm: core: Rename sqq to seq_

2020-12-21 Thread Andy Shevchenko
On Sat, Dec 19, 2020 at 10:40:09AM -0700, Simon Glass wrote: > Now that the sequence-numbering migration is complete, rename this member > back to seq_, adding an underscore to indicate it is internal to driver > model. Reviewed-by: Andy Shevchenko > Signed-off-by: Simon Glass > --- > > drive

Re: [PATCH 21/26] dm: core: Use dev_has_ofnode() instead of dev_of_valid()

2020-12-21 Thread Andy Shevchenko
On Sat, Dec 19, 2020 at 10:40:13AM -0700, Simon Glass wrote: > We have two functions which do the same thing. Standardise on > dev_has_ofnode() since there is no such thing as an 'invalid' ofnode in > normal operation: it is either null or missing. > > Also move the functions into one place. Revi

[PATCH v2 00/14] qemu: arm64: Add support for uefi capsule update on qemu arm platform

2020-12-21 Thread Sughosh Ganu
The capsule update feature is supported on a platform configuration booting in a non-secure mode, i.e with -machine virt,secure=off option set. This results in the platform booting u-boot directly without the presence of trusted firmware(tf-a). Steps that need to be followed for using this feature

[PATCH v2 01/14] mkeficapsule: Add support for embedding public key in a dtb

2020-12-21 Thread Sughosh Ganu
Add options for embedding the public key esl(efi signature list) file to the platform's dtb. The esl file is then retrieved and used for authenticating the capsule to be used for updating firmare components on the platform. The esl file can now be embedded in the dtb by invoking the following comm

[PATCH v2 02/14] qemu: arm: Initialise virtio in board_late_init

2020-12-21 Thread Sughosh Ganu
On the qemu arm platform, the virtio devices are initialised in board_init, which gets called before the initr_pci. With this, the virtio block devices on the pci bus are not initialised. Move the initialisation of virtio devices to board_late_init which gets called after the call to initr_pci. Si

[PATCH v2 03/14] crypto: Fix the logic to calculate hash with authattributes set

2020-12-21 Thread Sughosh Ganu
RFC 2315 Section 9.3 describes the message digesting process. The digest calculated depends on whether the authenticated attributes are present. In case of a scenario where the authenticated attributes are present, the message digest that gets signed and is part of the pkcs7 message is computed fro

[PATCH v2 04/14] qemu: arm64: Add support for dynamic mtdparts for the platform

2020-12-21 Thread Sughosh Ganu
Add support for setting the default values for mtd partitions on the platform for the nor flash. This would be used for updating the firmware image using uefi capsule update with the dfu mtd backend driver. Signed-off-by: Sughosh Ganu --- Changes since V1: * Change MTDPARTS_NOR[01] as config opt

[PATCH v2 05/14] qemu: arm64: Set dfu_alt_info variable for the platform

2020-12-21 Thread Sughosh Ganu
The dfu framework uses the dfu_alt_info environment variable to get information that is needed for performing the firmware update. Set the dfu_alt_info for the platform to reflect the two mtd partitions created for the u-boot env and the firmware image. Signed-off-by: Sughosh Ganu --- Changes si

[PATCH v2 06/14] fsp: Move and rename fsp_types.h file

2020-12-21 Thread Sughosh Ganu
The fsp_types.h header file contains macros for building signatures of different widths. These signature macros are architecture agnostic, and can be used in all places which use signatures in a data structure. Move and rename the fsp_types.h under the common include header. Signed-off-by: Sughosh

[PATCH v2 07/14] efi_loader: Add logic to parse EDKII specific fmp payload header

2020-12-21 Thread Sughosh Ganu
When building the capsule using scripts in edk2, a fmp header is added on top of the binary payload. Add logic to detect presence of the header. When present, the pointer to the image needs to be adjusted as per the size of the header to point to the actual binary payload. Signed-off-by: Sughosh G

[PATCH v2 08/14] dfu_mtd: Add provision to unlock mtd device

2020-12-21 Thread Sughosh Ganu
Prior to writing to an mtd device, mtd_erase is called. This call fails in case the sector being erased is locked. Call mtd_unlock to unlock the region which is to be erased and later written to. Lock the region once the write to the region has completed. Signed-off-by: Sughosh Ganu --- Changes

[PATCH v2 09/14] efi_loader: Make the pkcs7 header parsing function an extern

2020-12-21 Thread Sughosh Ganu
The pkcs7 header parsing functionality is pretty generic, and can be used by other features like capsule authentication. Make the function an extern, also changing it's name to efi_parse_pkcs7_header Signed-off-by: Sughosh Ganu --- Changes since V1: None include/efi_loader.h | 4 ++

[PATCH v2 10/14] efi_loader: Re-factor code to build the signature store from efi signature list

2020-12-21 Thread Sughosh Ganu
The efi_sigstore_parse_sigdb function reads the uefi authenticated variable, stored in the signature database format and builds the signature store structure. Factor out the code for building the signature store. This can then be used by the capsule authentication routine to build the signature sto

[PATCH v2 11/14] efi: capsule: Add support for uefi capsule authentication

2020-12-21 Thread Sughosh Ganu
Add support for authenticating uefi capsules. Most of the signature verification functionality is shared with the uefi secure boot feature. The root certificate containing the public key used for the signature verification is stored as part of the device tree blob. The root certificate is stored a

[PATCH v2 12/14] efi_loader: Enable uefi capsule authentication

2020-12-21 Thread Sughosh Ganu
Add support for enabling uefi capsule authentication. This feature is enabled by setting the environment variable "capsule_authentication_enabled". The following configs are needed for enabling uefi capsule update and capsule authentication features on the platform. CONFIG_EFI_HAVE_CAPSULE_SUPPOR

[PATCH v2 14/14] qemu: arm64: Add documentation for capsule update

2020-12-21 Thread Sughosh Ganu
Add documentation highlighting the steps for using the uefi capsule update feature for updating the u-boot firmware image. Signed-off-by: Sughosh Ganu --- Changes since V1: * Change the documentation to reflect the usage of overlays for embedding the public key certs at runtime * Fix the build

[PATCH v2 13/14] efidebug: capsule: Add a command to update capsule on disk

2020-12-21 Thread Sughosh Ganu
Add a efidebug subcommand to initiate a firmware update using the efi firmware management protocol(fmp) set_image routine. The firmware update can be initiated through 'efidebug capsule disk-update' This would locate the efi capsule file on the efi system partition, and call the platform's set_i

Re: [PATCH v2 4/7] IOMUX: Preserve console list if realloc() fails

2020-12-21 Thread Andy Shevchenko
On Fri, Dec 18, 2020 at 07:29:19PM -0700, Simon Glass wrote: > On Wed, 16 Dec 2020 at 16:16, Andy Shevchenko > wrote: > > > > It's realloc() 101 to avoid `foo = realloc(foo, ...);` call > > due to getting a memory leak. > > Hmm I don't think I knew that... When you use the same variable for the

Re: [PATCH v2 5/7] IOMUX: Refactor iomux_doenv() in order to increase readability

2020-12-21 Thread Andy Shevchenko
On Fri, Dec 18, 2020 at 07:29:21PM -0700, Simon Glass wrote: > On Wed, 16 Dec 2020 at 16:16, Andy Shevchenko > wrote: > > > > Refactor iomux_doenv() a bit in order to increase readability. > > There is no change in code generation on x86. ... > Reviewed-by: Simon Glass Thanks! ... > event be

Re: [PATCH v2 02/14] qemu: arm: Initialise virtio in board_late_init

2020-12-21 Thread Heinrich Schuchardt
On 12/21/20 12:43 PM, Sughosh Ganu wrote: On the qemu arm platform, the virtio devices are initialised in board_init, which gets called before the initr_pci. With this, the virtio block devices on the pci bus are not initialised. Move the initialisation of virtio devices to board_late_init which

[PATCH v3 3/9] console: move search_device() from iomux.h to console.h

2020-12-21 Thread Andy Shevchenko
search_device() is defined in console.c. Move its declaration to an appropriate header file. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Glass --- v3: added tag and changed subject prefix include/console.h | 2 ++ include/iomux.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) d

[PATCH v3 2/9] console: Keep ->start() and ->stop() balanced

2020-12-21 Thread Andy Shevchenko
There is no need to call ->start() for already started device. All the same, there is no need to call ->stop() for devices still in use. For now enforce this only for IOMUX case. Cc: Simon Glass Signed-off-by: Andy Shevchenko --- v3: renamed new function and added a documentation for it common

[PATCH v3 1/9] console: Introduce console_start() and console_stop()

2020-12-21 Thread Andy Shevchenko
In the future we would like to stop unused consoles and also add a reference counting to avoid imbalanced calls to ->start() and ->stop() in some cases. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Glass --- v3: added comments to the function declarations common/console.c | 30 +++

[PATCH v3 6/9] IOMUX: Preserve console list if realloc() fails

2020-12-21 Thread Andy Shevchenko
It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc()

[PATCH v3 9/9] IOMUX: Stop dropped consoles

2020-12-21 Thread Andy Shevchenko
When at some point environment shrinks we need to stop dropped devices. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Glass --- v3: added tag common/iomux.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/common/iomux.c b/common/iomux.c index 126d92c

[PATCH v3 5/9] console: Provide a documentation for console_search_dev()

2020-12-21 Thread Andy Shevchenko
Provide a documentation for console_search_dev(). Suggested-by: Simon Glass Signed-off-by: Andy Shevchenko --- v3: new patch include/console.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/console.h b/include/console.h index bb186e7be04d..7e628c0cf836 100644 --- a/incl

[PATCH v3 8/9] IOMUX: Drop indentation level by removing redundant 'else'

2020-12-21 Thread Andy Shevchenko
Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Glass

[PATCH v3 7/9] IOMUX: Refactor iomux_doenv() in order to increase readability

2020-12-21 Thread Andy Shevchenko
Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Glass --- v3: added tag common/iomux.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/common/iomux.c

[PATCH v3 4/9] console: rename search_device() to console_search_dev()

2020-12-21 Thread Andy Shevchenko
Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass Signed-off-by: Andy Shevchenko --- v3: new patch common/console.c | 18 +- common/iomux.c| 4 ++-- common/stdio.c| 4 ++-- include/console.h | 2 +- 4 files changed, 14

Re: [PATCH v2] doc: edison: Update information about xFSTK

2020-12-21 Thread Andy Shevchenko
On Mon, Nov 30, 2020 at 01:12:24PM -0700, Simon Glass wrote: > On Fri, 27 Nov 2020 at 08:59, Andy Shevchenko > wrote: > > > > xFSTK sources got a new home under Edison Firmware Group on GitHub [1]. > > Update Intel Edison documentation accordingly. > > > > While here, fix couple of typos. > > > >

Re: [PATCH v2] doc: edison: Update information about xFSTK

2020-12-21 Thread Bin Meng
Hi Andy, On Mon, Dec 21, 2020 at 8:32 PM Andy Shevchenko wrote: > > On Mon, Nov 30, 2020 at 01:12:24PM -0700, Simon Glass wrote: > > On Fri, 27 Nov 2020 at 08:59, Andy Shevchenko > > wrote: > > > > > > xFSTK sources got a new home under Edison Firmware Group on GitHub [1]. > > > Update Intel Edi

Re: [PATCH v2 02/14] qemu: arm: Initialise virtio in board_late_init

2020-12-21 Thread Heinrich Schuchardt
On 12/21/20 1:19 PM, Heinrich Schuchardt wrote: On 12/21/20 12:43 PM, Sughosh Ganu wrote: On the qemu arm platform, the virtio devices are initialised in board_init, which gets called before the initr_pci. With this, the virtio block devices on the pci bus are not initialised. Move the initialis

Re: [PATCH v2 03/14] crypto: Fix the logic to calculate hash with authattributes set

2020-12-21 Thread Heinrich Schuchardt
On 12/21/20 12:43 PM, Sughosh Ganu wrote: RFC 2315 Section 9.3 describes the message digesting process. The digest calculated depends on whether the authenticated attributes are present. In case of a scenario where the authenticated attributes are present, the message digest that gets signed and

Re: [PATCH v2 14/14] qemu: arm64: Add documentation for capsule update

2020-12-21 Thread Heinrich Schuchardt
On 12/21/20 12:43 PM, Sughosh Ganu wrote: Add documentation highlighting the steps for using the uefi capsule update feature for updating the u-boot firmware image. Signed-off-by: Sughosh Ganu --- Changes since V1: * Change the documentation to reflect the usage of overlays for embedding th

Re: [PATCH v3 04/12] dm: Introduce xxx_get_dma_range()

2020-12-21 Thread Nicolas Saenz Julienne
Hi Simon, thanks for the review. On Fri, 2020-12-18 at 19:28 -0700, Simon Glass wrote: > Hi Nicolas, > > On Tue, 15 Dec 2020 at 10:23, Nicolas Saenz Julienne > wrote: > > > > Add the following functions to get a specific device's DMA ranges: > >  - dev_get_dma_range() > >  - ofnode_get_dma_rang

Re: [PATCH v3 07/12] dm: test: Add test case for dev->dma_offset

2020-12-21 Thread Nicolas Saenz Julienne
On Fri, 2020-12-18 at 19:28 -0700, Simon Glass wrote: > On Tue, 15 Dec 2020 at 10:23, Nicolas Saenz Julienne > wrote: > > > > Add test to validate dev->dma_offset is properly set on devices. > > > > Signed-off-by: Nicolas Saenz Julienne > > --- > >  arch/sandbox/dts/test.dts | 4

Re: [PATCH] doc: Add basic information about running CI tests

2020-12-21 Thread Tom Rini
On Mon, Dec 21, 2020 at 11:17:39AM +0900, AKASHI Takahiro wrote: > On Fri, Dec 18, 2020 at 07:44:42PM -0500, Tom Rini wrote: > > On Fri, Dec 18, 2020 at 06:34:10PM -0500, Sean Anderson wrote: > > > On 12/18/20 5:14 PM, Tom Rini wrote: > > > > Start out by documenting general expectations on when CI

Re: [PATCH v3 09/12] dm: test: Add test case for dev_phys_to_bus()/dev_bus_to_phys()

2020-12-21 Thread Nicolas Saenz Julienne
On Fri, 2020-12-18 at 19:28 -0700, Simon Glass wrote: > On Tue, 15 Dec 2020 at 10:23, Nicolas Saenz Julienne > wrote: > > > > By reusing DT nodes already available in sandbox's test DT introduce a > > test to validate dev_phys_to_bus()/dev_bus_to_phys(). > > > > Signed-off-by: Nicolas Saenz Juli

Re: [PATCH v3 10/12] xhci: translate virtual addresses into the bus's address space

2020-12-21 Thread Nicolas Saenz Julienne
On Fri, 2020-12-18 at 19:28 -0700, Simon Glass wrote: > Hi Nicolas, > > On Tue, 15 Dec 2020 at 10:23, Nicolas Saenz Julienne > wrote: > > > > So far we've been content with passing physical addresses when > > configuring memory addresses into XHCI controllers, but not all > > platforms have buse

Re: [BUG]odroid-c2 does not hotplug usb-devices

2020-12-21 Thread Anand Moon
Hi Martin, On Sun, 20 Dec 2020 at 20:04, Martin Blumenstingl wrote: > > Hi Anand, > > On Sun, Dec 20, 2020 at 2:46 PM Anand Moon wrote: > [...] > > > On Sat, Dec 19, 2020 at 8:53 PM Anand Moon wrote: > > > [...] > > > > I was also looking into this issue so I made some changes in the > > > > ph

Re: imx8mp_evk: boot error "alloc space exhausted"

2020-12-21 Thread Fabio Estevam
Hi Andrey and Peng, On Thu, Dec 17, 2020 at 9:51 AM ZHIZHIKIN Andrey wrote: > > Hello Peng, > > Just a gentle ping here: can you take a look at the failure reported below? > > I've also added Alice Guo since there was some work done om imx8mp_evk board, > and uboot-imx list here. > > Thanks a lot

Re: [PATCH v3 11/12] mmc: Introduce mmc_phys_to_bus()/mmc_bus_to_phys()

2020-12-21 Thread Nicolas Saenz Julienne
On Fri, 2020-12-18 at 19:28 -0700, Simon Glass wrote: > On Tue, 15 Dec 2020 at 10:23, Nicolas Saenz Julienne > wrote: > > > > This will allow us to use DM variants of phys_to_bus()/bus_to_phys() > > when relevant. > > > > Signed-off-by: Nicolas Saenz Julienne > > --- > >  drivers/mmc/sdhci.c |

Re: [linux-sunxi] [PATCH] sunxi: Add arm64 FEL support

2020-12-21 Thread Priit Laes
On Thu, Nov 19, 2020 at 10:54:42AM +, Andre Przywara wrote: > So far we did not support the BootROM based FEL USB debug mode on the > 64-bit builds for Allwinner SoCs: The BootROM is using AArch32, but the > SPL runs in AArch64. > Returning back to AArch32 was not working as expected, since the

Re: [PATCH] fs: squasfs: fix a possible NULL pointer dereference in sqfs_opendir()

2020-12-21 Thread Richard Genoud
Hi Miquel, Le 18/12/2020 à 19:50, Miquel Raynal a écrit : Hi Richard, Richard Genoud wrote on Fri, 18 Dec 2020 15:24:40 +0100: token_count may be != 0 and token_list not yet allocated when the out code is reached Wouldn't it be better to initialize token_count than adding an (obscure) inde

Re: [PATCH 2/3] dts: am654-base-board-uboot: Set USB0 dr_mode to host

2020-12-21 Thread Lokesh Vutla
On 20/11/20 9:18 pm, Aswath Govindraju wrote: > USB3SS0 controller is to be used as a host in U-boot. Fix it by changing > the dr_mode to host. > > Signed-off-by: Aswath Govindraju Won't it break dfu support or is it used in different controller? Thanks and regards, Lokesh > --- > arch/arm

Re: [PATCH] fs: squasfs: fix a possible NULL pointer dereference in sqfs_opendir()

2020-12-21 Thread Miquel Raynal
Hi Richard, Richard Genoud wrote on Mon, 21 Dec 2020 16:06:37 +0100: > Hi Miquel, > > Le 18/12/2020 à 19:50, Miquel Raynal a écrit : > > Hi Richard, > > > > Richard Genoud wrote on Fri, 18 Dec 2020 > > 15:24:40 +0100: > > > >> token_count may be != 0 and token_list not yet allocated when t

Re: [PATCH] fs: squasfs: fix a possible NULL pointer dereference in sqfs_opendir()

2020-12-21 Thread Richard Genoud
Le 21/12/2020 à 16:14, Miquel Raynal a écrit : Hi Richard, Richard Genoud wrote on Mon, 21 Dec 2020 16:06:37 +0100: Hi Miquel, Le 18/12/2020 à 19:50, Miquel Raynal a écrit : Hi Richard, Richard Genoud wrote on Fri, 18 Dec 2020 15:24:40 +0100: token_count may be != 0 and token_list no

Re: [PATCH] fs: squasfs: fix a possible NULL pointer dereference in sqfs_opendir()

2020-12-21 Thread Miquel Raynal
Miquel Raynal wrote on Mon, 21 Dec 2020 16:14:19 +0100: > Hi Richard, > > Richard Genoud wrote on Mon, 21 Dec 2020 > 16:06:37 +0100: > > > Hi Miquel, > > > > Le 18/12/2020 à 19:50, Miquel Raynal a écrit : > > > Hi Richard, > > > > > > Richard Genoud wrote on Fri, 18 Dec 2020 > > > 15:24

Re: [PATCH] fs: squasfs: fix a possible NULL pointer dereference in sqfs_opendir()

2020-12-21 Thread Miquel Raynal
Hi Richard, Richard Genoud wrote on Mon, 21 Dec 2020 16:26:00 +0100: > Le 21/12/2020 à 16:14, Miquel Raynal a écrit : > > Hi Richard, > > > > Richard Genoud wrote on Mon, 21 Dec 2020 > > 16:06:37 +0100: > > > >> Hi Miquel, > >> > >> Le 18/12/2020 à 19:50, Miquel Raynal a écrit : > >>> Hi

Re: [PATCH] fs: squasfs: fix a possible NULL pointer dereference in sqfs_opendir()

2020-12-21 Thread Richard Genoud
Hi Miquel, Le 21/12/2020 à 16:29, Miquel Raynal a écrit : Hi Richard, Richard Genoud wrote on Mon, 21 Dec 2020 16:26:00 +0100: Le 21/12/2020 à 16:14, Miquel Raynal a écrit : Hi Richard, Richard Genoud wrote on Mon, 21 Dec 2020 16:06:37 +0100: Hi Miquel, Le 18/12/2020 à 19:50, Miquel

Re: [PATCH 2/3] dts: am654-base-board-uboot: Set USB0 dr_mode to host

2020-12-21 Thread Aswath Govindraju
On 21/12/20 8:42 pm, Lokesh Vutla wrote: > > > On 20/11/20 9:18 pm, Aswath Govindraju wrote: >> USB3SS0 controller is to be used as a host in U-boot. Fix it by changing >> the dr_mode to host. >> >> Signed-off-by: Aswath Govindraju > > Won't it break dfu support or is it used in different contr

Re: [PATCH] fs: squasfs: fix a possible NULL pointer dereference in sqfs_opendir()

2020-12-21 Thread Miquel Raynal
Hi Richard, Richard Genoud wrote on Mon, 21 Dec 2020 16:40:51 +0100: > Hi Miquel, > > Le 21/12/2020 à 16:29, Miquel Raynal a écrit : > > Hi Richard, > > > > Richard Genoud wrote on Mon, 21 Dec 2020 > > 16:26:00 +0100: > > > >> Le 21/12/2020 à 16:14, Miquel Raynal a écrit : > >>> Hi Richa

Re: [PATCH] fs: squasfs: fix a possible NULL pointer dereference in sqfs_opendir()

2020-12-21 Thread Richard Genoud
Hi Miquel Le 21/12/2020 à 16:49, Miquel Raynal a écrit : Hi Richard, Richard Genoud wrote on Mon, 21 Dec 2020 16:40:51 +0100: Hi Miquel, Le 21/12/2020 à 16:29, Miquel Raynal a écrit : Hi Richard, Richard Genoud wrote on Mon, 21 Dec 2020 16:26:00 +0100: Le 21/12/2020 à 16:14, Miquel

[PATCH] power: pmic: add driver for Monolithic Power mp5416

2020-12-21 Thread Tim Harvey
This adds basic register access and child regulator binding for the Monolithic MP5416 Power Management IC which integrates four DC/DC switching converters and five LDO regulators. Signed-off-by: Tim Harvey --- drivers/power/pmic/Kconfig | 15 +++ drivers/power/pmic/Makefile | 1 + drivers/

Re: [PATCH 4/6] button: add a simple ADC-based button driver

2020-12-21 Thread Simon Glass
Hi Marek, On Mon, 21 Dec 2020 at 02:34, Marek Szyprowski wrote: > > Hi Simon, > > On 19.12.2020 03:28, Simon Glass wrote: > > On Mon, 14 Dec 2020 at 04:25, Marek Szyprowski > > wrote: > >> Add a simple ADC-based button driver. This driver binds to the 'adc-keys' > >> device tree node. I think

Re: [PATCH v2 4/7] IOMUX: Preserve console list if realloc() fails

2020-12-21 Thread Simon Glass
Hi Andy, On Mon, 21 Dec 2020 at 05:00, Andy Shevchenko wrote: > > On Fri, Dec 18, 2020 at 07:29:19PM -0700, Simon Glass wrote: > > On Wed, 16 Dec 2020 at 16:16, Andy Shevchenko > > wrote: > > > > > > It's realloc() 101 to avoid `foo = realloc(foo, ...);` call > > > due to getting a memory leak.

Re: [PATCH v2 5/7] IOMUX: Refactor iomux_doenv() in order to increase readability

2020-12-21 Thread Simon Glass
Hi Andy, On Mon, 21 Dec 2020 at 05:03, Andy Shevchenko wrote: > > On Fri, Dec 18, 2020 at 07:29:21PM -0700, Simon Glass wrote: > > On Wed, 16 Dec 2020 at 16:16, Andy Shevchenko > > wrote: > > > > > > Refactor iomux_doenv() a bit in order to increase readability. > > > There is no change in code

Re: [PATCH v3 11/12] mmc: Introduce mmc_phys_to_bus()/mmc_bus_to_phys()

2020-12-21 Thread Simon Glass
Hi Nicolas, On Mon, 21 Dec 2020 at 07:23, Nicolas Saenz Julienne wrote: > > On Fri, 2020-12-18 at 19:28 -0700, Simon Glass wrote: > > On Tue, 15 Dec 2020 at 10:23, Nicolas Saenz Julienne > > wrote: > > > > > > This will allow us to use DM variants of phys_to_bus()/bus_to_phys() > > > when releva

Re: [PATCH v3 09/12] dm: test: Add test case for dev_phys_to_bus()/dev_bus_to_phys()

2020-12-21 Thread Simon Glass
Hi Nicolas, On Mon, 21 Dec 2020 at 06:47, Nicolas Saenz Julienne wrote: > > On Fri, 2020-12-18 at 19:28 -0700, Simon Glass wrote: > > On Tue, 15 Dec 2020 at 10:23, Nicolas Saenz Julienne > > wrote: > > > > > > By reusing DT nodes already available in sandbox's test DT introduce a > > > test to v

Re: [PATCH v3 4/9] console: rename search_device() to console_search_dev()

2020-12-21 Thread Simon Glass
On Mon, 21 Dec 2020 at 05:30, Andy Shevchenko wrote: > > Rename search_device() to console_search_dev() since it's in console.h. > > Suggested-by: Simon Glass > Signed-off-by: Andy Shevchenko > --- > v3: new patch > common/console.c | 18 +- > common/iomux.c| 4 ++-- > com

Re: [PATCH v3 2/9] console: Keep ->start() and ->stop() balanced

2020-12-21 Thread Simon Glass
On Mon, 21 Dec 2020 at 05:30, Andy Shevchenko wrote: > > There is no need to call ->start() for already started device. All the same, > there is no need to call ->stop() for devices still in use. > > For now enforce this only for IOMUX case. > > Cc: Simon Glass > Signed-off-by: Andy Shevchenko >

Re: [PATCH v3 04/12] dm: Introduce xxx_get_dma_range()

2020-12-21 Thread Simon Glass
Hi Nicolas, On Mon, 21 Dec 2020 at 06:03, Nicolas Saenz Julienne wrote: > > Hi Simon, thanks for the review. > > On Fri, 2020-12-18 at 19:28 -0700, Simon Glass wrote: > > Hi Nicolas, > > > > On Tue, 15 Dec 2020 at 10:23, Nicolas Saenz Julienne > > wrote: > > > > > > Add the following functions t

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

2020-12-21 Thread Siew Chin Lim
This is the 5th 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

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

2020-12-21 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

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

2020-12-21 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

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

2020-12-21 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

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

2020-12-21 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

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

2020-12-21 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

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

2020-12-21 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

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

2020-12-21 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

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

2020-12-21 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

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

2020-12-21 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

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

2020-12-21 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

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

2020-12-21 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

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

2020-12-21 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

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

2020-12-21 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

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

2020-12-21 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

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

2020-12-21 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

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

2020-12-21 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

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

2020-12-21 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

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

2020-12-21 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

Re: [PATCH v2 14/14] qemu: arm64: Add documentation for capsule update

2020-12-21 Thread Sughosh Ganu
On Mon, 21 Dec 2020 at 18:28, Heinrich Schuchardt wrote: > On 12/21/20 12:43 PM, Sughosh Ganu wrote: > > Add documentation highlighting the steps for using the uefi capsule > > update feature for updating the u-boot firmware image. > > > > Signed-off-by: Sughosh Ganu > > --- > > > > Changes sinc

Re: [PATCH v2 4/7] IOMUX: Preserve console list if realloc() fails

2020-12-21 Thread Andy Shevchenko
On Mon, Dec 21, 2020 at 09:47:03AM -0700, Simon Glass wrote: > On Mon, 21 Dec 2020 at 05:00, Andy Shevchenko > wrote: > > On Fri, Dec 18, 2020 at 07:29:19PM -0700, Simon Glass wrote: > > > On Wed, 16 Dec 2020 at 16:16, Andy Shevchenko > > > wrote: > > > > > > > > It's realloc() 101 to avoid `foo

Re: [PATCH v2 02/14] qemu: arm: Initialise virtio in board_late_init

2020-12-21 Thread Sughosh Ganu
On Mon, 21 Dec 2020 at 18:21, Heinrich Schuchardt wrote: > On 12/21/20 1:19 PM, Heinrich Schuchardt wrote: > > On 12/21/20 12:43 PM, Sughosh Ganu wrote: > >> On the qemu arm platform, the virtio devices are initialised in > >> board_init, which gets called before the initr_pci. With this, the > >

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

2020-12-21 Thread Clément Péron
Calling ahab_close cmd for the user to interact for confirmation. This is not friendly usable 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 --- arch/arm/mach-imx/imx8/ahab.c | 3 ++- 1 file changed, 2 in

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

2020-12-21 Thread Clément Péron
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 --- v2: - Fix commit log --- arch/arm/mach-imx/imx8/ahab.c |

Re: [PATCH v2 4/7] IOMUX: Preserve console list if realloc() fails

2020-12-21 Thread Simon Glass
Hi Andy, On Mon, 21 Dec 2020 at 10:16, Andy Shevchenko wrote: > > On Mon, Dec 21, 2020 at 09:47:03AM -0700, Simon Glass wrote: > > On Mon, 21 Dec 2020 at 05:00, Andy Shevchenko > > wrote: > > > On Fri, Dec 18, 2020 at 07:29:19PM -0700, Simon Glass wrote: > > > > On Wed, 16 Dec 2020 at 16:16, And

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

2020-12-21 Thread Alex G.
On 12/18/20 8:29 PM, Simon Glass wrote: On Tue, 15 Dec 2020 at 17:10, Alexandru Gagniuc wrote: 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, readabi

Re: [PATCH v2 14/14] qemu: arm64: Add documentation for capsule update

2020-12-21 Thread Heinrich Schuchardt
On 12/21/20 6:12 PM, Sughosh Ganu wrote: On Mon, 21 Dec 2020 at 18:28, Heinrich Schuchardt wrote: On 12/21/20 12:43 PM, Sughosh Ganu wrote: Add documentation highlighting the steps for using the uefi capsule update feature for updating the u-boot firmware image. Signed-off-by: Sughosh Ganu

[PATCH] drivers: tee: i2c trampoline driver

2020-12-21 Thread Jorge Ramirez-Ortiz
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 Ramirez-Ortiz --- drivers/tee/optee/Makefile | 1 + drivers/tee/optee/i2c.c

Re: imx8mp_evk: boot error "alloc space exhausted"

2020-12-21 Thread Fabio Estevam
On Mon, Dec 21, 2020 at 11:19 AM Fabio Estevam wrote: > I have also tried using the ATF version imx_5.4.70_2.3.0 and the DDR > firmware from the firmware-5.10 package, but still does not boot for > me: > > U-Boot SPL 2021.01-rc3-00200-ge668bec96a5f-dirty (Dec 21 2020 - 11:13:56 > -0300) > Normal

[PATCH] imx8mp_evk: Increase CONFIG_SYS_MALLOC_F_LEN

2020-12-21 Thread Fabio Estevam
When booting imx8mp-evk the following allocation error message is seen: U-Boot 2021.01-rc3-00200-ge668bec96a5f (Dec 21 2020 - 14:36:42 -0300) alloc space exhausted Fix it by increasing CONFIG_SYS_MALLOC_F_LEN to 0x1 like it is done on other i.MX8MM/8MN boards. Reported-by: Andrey Zhizhikin

  1   2   >