Re: [EXT] Re: [PATCH v2 2/2] board: imx8mp: add boot.cmd for distro boot on iMX8MP

2020-12-18 Thread Dennis Gilmore
boot.scr is only in distro boot because prior to standardising in extlinux.conf or grub vie efi, distros provided boot.scr files that were tailored for each board with detailed staps and memory locations to load the kernel, dtb, and initramfs. the scripts were wrapped by mkimage and at this point

Re: [PATCH v3 4/4] console: add console_has_tstc helper function for CONSOLE_MUX

2020-12-18 Thread Simon Glass
On Fri, 18 Dec 2020 at 04:46, Patrick Delaunay wrote: > > From: Patrick Delaunay > > Add the helper function console_has_tstc() and replace the test > #if CONFIG_IS_ENABLED(CONSOLE_MUX) to a simple 'if' test to > respect the U-Boot coding rule. > > No functional change. > > Signed-off-by:

Re: [PATCH v3 3/4] console: remove #ifdef CONFIG_CONSOLE_RECORD

2020-12-18 Thread Simon Glass
On Fri, 18 Dec 2020 at 04:46, Patrick Delaunay wrote: > > From: Patrick Delaunay > > Add helper functions to access to gd->console_out and gd->console_in I don't see those in this patch > with membuff API and replace the #ifdef CONFIG_CONSOLE_RECORD test > by if

Re: [PATCH v3 1/4] console: remove #ifdef CONFIG when it is possible

2020-12-18 Thread Simon Glass
On Fri, 18 Dec 2020 at 04:46, Patrick Delaunay wrote: > > From: Patrick Delaunay > > Remove #ifdef or #ifndef for CONFIG when it is possible to simplify > the console.c code and respect the U-Boot coding rules. > > Signed-off-by: Patrick Delaunay > Signed-off-by: Patrick Delaunay > --- > > (no

Re: [Uboot-stm32] [PATCH 2/2] console: sandbox: remove unnecessary sandbox code

2020-12-18 Thread Simon Glass
Hi Patrick, On Tue, 15 Dec 2020 at 07:35, Patrick DELAUNAY wrote: > > Hi Simon, > > On 12/12/20 4:39 PM, Simon Glass wrote: > > Hi Patrick, > > > > On Wed, 2 Dec 2020 at 07:08, Patrick DELAUNAY > > wrote: > >> Hi Simon, > >> > >>> From: Simon Glass > >>> Sent: lundi 30 novembre 2020 21:12 >

Re: [PATCH 2/4] board: ns3: Remove superfluous reset logic

2020-12-18 Thread Simon Glass
On Tue, 15 Dec 2020 at 08:48, Harald Seiler wrote: > > The current implementation of reset_cpu() in the ns3 board code does not > archieve what it is supposed to (according to the comments), due to > a number of reasons: > > 1. The argument to reset_cpu() is _not_ actually passed from the >

Re: [PATCHv2 1/5] compiler.h: add host_build()

2020-12-18 Thread Simon Glass
On Mon, 14 Dec 2020 at 16:42, Sebastian Reichel wrote: > > Add a host_build() function, so that it's possible to > check for software being build with USE_HOSTCC without > relying on preprocessor conditions. In other words > > #ifdef USE_HOSTCC > host_only_code(); > #endif > > can be

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

2020-12-18 Thread Simon Glass
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... > > Actually it's not clear why realloc() has been used here. > If we shrink the array, the memcpy() overwrites

Re: [v4 16/17] arm: socfpga: soc64: Enable FIT image generation using binman

2020-12-18 Thread Simon Glass
Hi Siew, On Thu, 17 Dec 2020 at 20:29, Siew Chin Lim wrote: > > Add new build target "fit-itb" for FIT image generation. > > In preparation to support Vendor Authorized Boot (VAB) for Intel > SOC64 device in near future. With VAB, u-boot proper, dtb and > arm trusted firmware need to be signed

Re: [PATCH v2 1/7] console: Introduce console_start() and console_stop()

2020-12-18 Thread Simon Glass
Hi Andy, On Wed, 16 Dec 2020 at 16:16, Andy Shevchenko wrote: > > 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 > --- > v2: new patch >

Re: [PATCH v2 6/7 RESEND] cmd: button: store button state in the 'button' env

2020-12-18 Thread Simon Glass
Hi Marek, On Tue, 15 Dec 2020 at 09:55, Marek Szyprowski wrote: > > Save examined button state in 'button' environment variable to enable > checking button state in the scripts. > > Signed-off-by: Marek Szyprowski > --- > Resend reason: get rid of the Change-Id tag, that was still in v2. If

Re: [PATCH v2 2/2] net: Use NDRNG device in srand_mac()

2020-12-18 Thread Simon Glass
Hi Mattias, On Wed, 16 Dec 2020 at 09:28, wrote: > > From: Matthias Brugger > > When calling srand_mac we use a weak seed dependent on the > mac address. If present, use a RNG device instead to incerase entropy. > > Signed-off-by: Matthias Brugger > > --- > > Changes in v2: > - fix

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

2020-12-18 Thread Simon Glass
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 > > --- > > Changes in v2: > - fix dm_rng_read() parameters > - add missing

Re: [PATCH 1/4] nds32: Remove dead reset_cpu() implementation

2020-12-18 Thread Simon Glass
On Tue, 15 Dec 2020 at 08:48, Harald Seiler wrote: > > nds32 is one of the only architectures which still have a reset_cpu() > implementation that makes use of the `addr` parameter. The rest of > U-Boot now ignores it and passes 0 everywhere. It turns out that even > here, reset_cpu() is no

Re: [PATCH v3 12/12] configs: rpi4: Enable DM_DMA across all RPi4 configurations

2020-12-18 Thread Simon Glass
On Tue, 15 Dec 2020 at 10:23, Nicolas Saenz Julienne wrote: > > The DM_DMA option is needed in order to translate physical address into > bus addresses on a per-device basis. > > Signed-off-by: Nicolas Saenz Julienne > --- > configs/rpi_4_32b_defconfig | 1 + > configs/rpi_4_defconfig | 1 +

Re: [PATCH v2 3/7] IOMUX: move search_device() to console.h

2020-12-18 Thread Simon Glass
On Wed, 16 Dec 2020 at 16:16, Andy Shevchenko wrote: > > search_device() is defined in console.c. Move its declaration > to an appropriate header file. > > Signed-off-by: Andy Shevchenko > --- > v2: new patch > include/console.h | 2 ++ > include/iomux.h | 1 - > 2 files changed, 2

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

2020-12-18 Thread Simon Glass
Hi Andy, On Wed, 16 Dec 2020 at 16:16, 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 CONSOLE_MUX case. > > Signed-off-by: Andy Shevchenko >

Re: [PATCH v2 7/7] IOMUX: Stop dropped consoles

2020-12-18 Thread Simon Glass
On Wed, 16 Dec 2020 at 16:16, Andy Shevchenko wrote: > > When at some point environment shrinks we need to stop dropped devices. > > Signed-off-by: Andy Shevchenko > --- > v2: rebased to use console_stop() > common/iomux.c | 19 --- > 1 file changed, 16 insertions(+), 3

Re: [PATCH v2 6/7] IOMUX: Drop indentation level by removing redundant 'else'

2020-12-18 Thread Simon Glass
On Wed, 16 Dec 2020 at 16:16, Andy Shevchenko wrote: > > Obviously the following has unnecessary indentation level in 'else' branch. > > if (foo) { > ... > return; > } else { > ... > } > > Drop indentation level by removing

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

2020-12-18 Thread Simon Glass
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. > > Signed-off-by: Andy Shevchenko > --- > v2: no changes > common/iomux.c | 13 ++--- > 1 file changed, 6

Re: [PATCH v3 05/12] dm: test: Add test case for dev_get_dma_ranges()

2020-12-18 Thread Simon Glass
On Tue, 15 Dec 2020 at 10:23, Nicolas Saenz Julienne wrote: > > Introduce some new nodes in sandbox's test device-tree and dm tests in > order to validate dev_get_dma_range(). > > Signed-off-by: Nicolas Saenz Julienne > --- > arch/sandbox/dts/test.dts | 17 ++ > test/dm/Makefile

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

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

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

2020-12-18 Thread Simon Glass
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, readability is > improved significantly. > >

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

2020-12-18 Thread Simon Glass
Hi Alexandru On Tue, 15 Dec 2020 at 17:10, Alexandru Gagniuc wrote: > > 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

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

2020-12-18 Thread Simon Glass
On Tue, 15 Dec 2020 at 17:10, Alexandru Gagniuc wrote: > > 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

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

2020-12-18 Thread Simon Glass
On Tue, 15 Dec 2020 at 17:10, Alexandru Gagniuc wrote: > > 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

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

2020-12-18 Thread Simon Glass
On Tue, 15 Dec 2020 at 17:09, Alexandru Gagniuc wrote: > > 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

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

2020-12-18 Thread Simon Glass
Hi Alexandru, On Tue, 15 Dec 2020 at 17:09, Alexandru Gagniuc wrote: > > 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

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

2020-12-18 Thread Simon Glass
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 | 7 --- > include/mmc.h | 10 ++ > 2 files changed, 14

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

2020-12-18 Thread Simon Glass
Hi Alexandru, On Tue, 15 Dec 2020 at 17:09, Alexandru Gagniuc wrote: > > 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

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

2020-12-18 Thread Simon Glass
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 buses with transparent mappings. Specifically the > Raspberry Pi 4 might

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

2020-12-18 Thread Simon Glass
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 Julienne > --- > test/dm/Makefile | 1 + > test/dm/phys2bus.c | 36

Re: [PATCH v3 06/12] dm: Introduce DMA constraints into the core device model

2020-12-18 Thread Simon Glass
Hi Nicolas, On Tue, 15 Dec 2020 at 10:23, Nicolas Saenz Julienne wrote: > > Calculating the DMA offset between a bus address space and CPU's every > time we call phys_to_bus() and bus_to_phys() isn't ideal performance > wise, as it implies traversing the device tree from the device's node up >

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

2020-12-18 Thread Simon Glass
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 > configs/sandbox64_defconfig| 1 + >

Re: [PATCH 4/4] reset: Remove addr parameter from reset_cpu()

2020-12-18 Thread Simon Glass
On Tue, 15 Dec 2020 at 08:48, Harald Seiler wrote: > > Historically, the reset_cpu() function had an `addr` parameter which was > meant to pass in an address of the reset vector location, where the CPU > should reset to. This feature is no longer used anywhere in U-Boot as > all reset_cpu()

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

2020-12-18 Thread Simon Glass
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_range() > - of_get_dma_range() > - fdt_get_dma_range() > They are specially useful in oder to be able

Re: [PATCH v3 6/6] video: Call video_sync in video_clear()

2020-12-18 Thread Simon Glass
On Tue, 15 Dec 2020 at 07:19, Michal Simek wrote: > > There is a need to call sync when anybody asking for clearing display. > For example via cls command. > > Signed-off-by: Michal Simek > --- > > Changes in v3: > - new patch in this series > > drivers/video/video-uclass.c | 2 +- > 1 file

Re: [PATCHv2 3/5] image: support board_fit_config_name_match

2020-12-18 Thread Simon Glass
On Mon, 14 Dec 2020 at 16:42, Sebastian Reichel wrote: > > Support reusing board_fit_config_name_match() to automatically > select a sensible default configuration for booting fitImages > using 'bootm'. > > Signed-off-by: Sebastian Reichel > --- > common/image-fit.c | 19 +-- >

Re: [PATCH v2 3/5] video: Introduce video_sync operation

2020-12-18 Thread Simon Glass
Hi Michal, On Mon, 14 Dec 2020 at 23:57, Michal Simek wrote: > > > > On 15. 12. 20 5:00, Simon Glass wrote: > > On Mon, 14 Dec 2020 at 01:38, Michal Simek wrote: > >> > >> Some drivers like LCD connected via SPI requires explicit sync function > >> which copy framebuffer content over SPI to

Re: [PATCH v3 5/6] video: seps525: Add seps525 SPI driver

2020-12-18 Thread Simon Glass
Hi Michal, On Tue, 15 Dec 2020 at 07:19, Michal Simek wrote: > > Add support for the WiseChip Semiconductor Inc. (UG-6028GDEBF02) display > using the SEPS525 (Syncoam) LCD Controller. Syncoam Seps525 PM-Oled is RGB > 160x128 display. This driver has been tested through zynq-spi driver. > >

Re: [PATCHv2 2/5] image: cleanup pre-processor usage

2020-12-18 Thread Simon Glass
Hi Sebastian, On Mon, 14 Dec 2020 at 16:42, Sebastian Reichel wrote: > > Replace most #ifdef checks for USE_HOSTCC and CONFIG_* > with normal if instructions. > > Signed-off-by: Sebastian Reichel > --- > common/image-fit.c | 193 + > include/image.h

Re: [PATCH 5/6] cmd: button: store button state in the 'button' env

2020-12-18 Thread Simon Glass
Hi Marek, On Mon, 14 Dec 2020 at 04:25, Marek Szyprowski wrote: > > Save examined button state in 'button' environment variable to enable > checking button state in the scripts. > > Signed-off-by: Marek Szyprowski > Change-Id: I78b539e1516573fcfea4401f75469291844daae4 > --- > cmd/button.c | 4

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

2020-12-18 Thread Simon Glass
Hi Marek, 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: I6da7101eff3ce53766d899f49f5839d728d52fb3 > --- > drivers/button/Kconfig | 8

Re: [PATCH v6 4/7] clk: Add Microchip PolarFire SoC clock driver

2020-12-18 Thread Simon Glass
Hi Padmarao, On Mon, 14 Dec 2020 at 04:09, Padmarao Begari wrote: > > Add clock driver code for the Microchip PolarFire SoC. This driver > handles reset and clock control of the Microchip PolarFire SoC device. > > Signed-off-by: Padmarao Begari > Reviewed-by: Anup Patel > --- >

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

2020-12-18 Thread Tom Rini
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 is run, how > > anyone can run Azure pipelines, and how GitLab CI pipelines can be run. > > Should travis be documented as well?

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

2020-12-18 Thread Sean Anderson
On 12/18/20 5:14 PM, Tom Rini wrote: Start out by documenting general expectations on when CI is run, how anyone can run Azure pipelines, and how GitLab CI pipelines can be run. Should travis be documented as well? --Sean Signed-off-by: Tom Rini --- doc/develop/ci_testing.rst | 45

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

2020-12-18 Thread Tom Rini
Start out by documenting general expectations on when CI is run, how anyone can run Azure pipelines, and how GitLab CI pipelines can be run. Signed-off-by: Tom Rini --- doc/develop/ci_testing.rst | 45 ++ doc/develop/index.rst | 1 + 2 files changed, 46

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

2020-12-18 Thread Miquel Raynal
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) indentation level? > > Reported-by: Coverity CID 313547 >

AXP803 Driver

2020-12-18 Thread Anton Gorlov
Hi all. Are there any plans to support AXP803 power regulator in u-boot?

Pull request: u-boot-spi/master

2020-12-18 Thread Jagan Teki
Hi Tom, Please pull this PR. Travis-CI: https://travis-ci.com/github/openedev/u-boot-amarula/builds/209599920 thanks, Jagan. The following changes since commit a4391365995a00f196373cddd35d99f74a9e62ff: configs: Resync with savedefconfig (2020-12-16 10:58:24 -0500) are available in the Git

[PULL u-boot] Please pull u-boot-amlogic-20201218

2020-12-18 Thread Neil Armstrong
a4391365995a00f196373cddd35d99f74a9e62ff: configs: Resync with savedefconfig (2020-12-16 10:58:24 -0500) are available in the Git repository at: https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic.git tags/u-boot-amlogic-20201218 for you to fetch changes up

[PATCH] drivers: mmc: support secure erase.

2020-12-18 Thread dennis
According to the JEDEC Standard, eMMC v4.4 cards can supoort secure erase. the first bit in ext_csd[EXT_CSD_SEC_FEATURE_SUPPORT] - EXT_CSD_SEC_ER_EN is used to check if secure erase supoort by the device. Signed-off-by: dennis --- drivers/mmc/Kconfig | 8 drivers/mmc/mmc.c |

[PATCH 5/5] boards: amlogic: update documentation for Beelink GT-King/Pro

2020-12-18 Thread Christian Hewitt
Update the device matrix and add build instructions. Signed-off-by: Christian Hewitt --- doc/board/amlogic/beelink-gtking.rst| 115 +++ doc/board/amlogic/beelink-gtkingpro.rst | 116 doc/board/amlogic/index.rst | 4 +- 3 files

[PATCH 2/5] boards: amlogic: add Beelink S922X board family support

2020-12-18 Thread Christian Hewitt
Copied from Odroid N2. Add myself as maintainer. Signed-off-by: Christian Hewitt --- board/amlogic/beelink-s922x/MAINTAINERS | 9 board/amlogic/beelink-s922x/Makefile| 6 +++ board/amlogic/beelink-s922x/beelink-s922x.c | 54 + 3 files changed, 69

[PATCH 4/5] boards: amlogic: add Beelink GT-King Pro defconfig

2020-12-18 Thread Christian Hewitt
Add a defconfig for the Beelink GT-King Pro Android STB, which is based on the Amlogic W400 reference design. Signed-off-by: Christian Hewitt --- configs/beelink-gtkingpro_defconfig | 71 + 1 file changed, 71 insertions(+) create mode 100644

[PATCH 3/5] boards: amlogic: add Beelink GT-King defconfig

2020-12-18 Thread Christian Hewitt
Add a defconfig for the Beelink GT-King Android STB, which is based on the Amlogic W400 reference design. Signed-off-by: Christian Hewitt --- configs/beelink-gtking_defconfig | 71 1 file changed, 71 insertions(+) create mode 100644

[PATCH 1/5] ARM: dts: import Beelink GT-King/Pro DTs from Linux 5.10

2020-12-18 Thread Christian Hewitt
Import the Beelink GT-King/Pro and supporting meson-g12b-w400.dtsi file from Linux 5.10. Signed-off-by: Christian Hewitt --- arch/arm/dts/Makefile | 2 + arch/arm/dts/meson-g12b-gtking-pro.dts | 125 arch/arm/dts/meson-g12b-gtking.dts | 145 +

[PATCH 0/5] board: amlogic: add Beelink GT-King/Pro support

2020-12-18 Thread Christian Hewitt
This patchset adds support for the Beelink GT-King and GT-King Pro boxes based on the Amlogic S922X (G12B/W400) SoC. Patches are based on the u-boot-amlogic-next branch in the custodians tree. Christian Hewitt (5): ARM: dts: import Beelink GT-King/Pro DTs from Linux 5.10 boards: amlogic: add

Re: [PULL] u-boot-usb/master

2020-12-18 Thread Tom Rini
On Wed, Dec 16, 2020 at 10:30:32PM +0100, Marek Vasut wrote: > The following changes since commit 56f02f0ae85da8bb2dca66c7816dbb1429f92072: > > Merge tag 'u-boot-amlogic-20201215' of > https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic (2020-12-15 09:08:14 > -0500) > > are available in

[PATCH] board: amlogic: add MMC boot device detection for environment load

2020-12-18 Thread Marek Szyprowski
Detect eMMC or SD card boot on Odroid-C4/N2 and Khadas VIM3(l) boards and report proper MMC device for the environment loading code. This allows to automatically load and store environment variables on the FAT partition or RAW offset of the MMC device without the need to use different

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

2020-12-18 Thread Richard Genoud
token_count may be != 0 and token_list not yet allocated when the out code is reached Reported-by: Coverity CID 313547 Fixes: ea1b1651c6a8 ("fs/squashfs: sqfs_opendir: simplify error handling") Signed-off-by: Richard Genoud --- fs/squashfs/sqfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2

[PATCH v3 2/4] console: add function console_devices_set

2020-12-18 Thread Patrick Delaunay
From: Patrick Delaunay Add a new function to access to console_devices only defined if CONFIG_IS_ENABLED(CONSOLE_MUX). This path allows to remove #if CONFIG_IS_ENABLED(CONSOLE_MUX) in console_getc function. Signed-off-by: Patrick Delaunay Reviewed-by: Simon Glass Signed-off-by: Patrick

[PATCH v3 4/4] console: add console_has_tstc helper function for CONSOLE_MUX

2020-12-18 Thread Patrick Delaunay
From: Patrick Delaunay Add the helper function console_has_tstc() and replace the test #if CONFIG_IS_ENABLED(CONSOLE_MUX) to a simple 'if' test to respect the U-Boot coding rule. No functional change. Signed-off-by: Patrick Delaunay Signed-off-by: Patrick Delaunay --- Changes in v3: -

[PATCH v3 3/4] console: remove #ifdef CONFIG_CONSOLE_RECORD

2020-12-18 Thread Patrick Delaunay
From: Patrick Delaunay Add helper functions to access to gd->console_out and gd->console_in with membuff API and replace the #ifdef CONFIG_CONSOLE_RECORD test by if (IS_ENABLED(CONFIG_CONSOLE_RECORD)) to respect the U-Boot coding rule. Signed-off-by: Patrick Delaunay Signed-off-by: Patrick

[PATCH v3 1/4] console: remove #ifdef CONFIG when it is possible

2020-12-18 Thread Patrick Delaunay
From: Patrick Delaunay Remove #ifdef or #ifndef for CONFIG when it is possible to simplify the console.c code and respect the U-Boot coding rules. Signed-off-by: Patrick Delaunay Signed-off-by: Patrick Delaunay --- (no changes since v2) Changes in v2: - update also #ifdef CONFIG_SANDBOX

[PATCH v3 0/4] console: remove #ifdef CONFIG when it is possible

2020-12-18 Thread Patrick Delaunay
Hi, It is the V3 of serie [1] after Simon Glass comments. Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where possible This patchset can applied on master branch after the serie [2] (for the new order of test in function putc() and puts() done in "console: allow to record

Re: [EXT] Re: [PATCH v2 2/2] board: imx8mp: add boot.cmd for distro boot on iMX8MP

2020-12-18 Thread Fabio Estevam
Hi Alice, On Fri, Dec 18, 2020 at 8:10 AM Alice Guo (OSS) wrote: > Can you tell me where I can see more details about boot.scr? I didn't see > that " boot.scr or extlinux.conf scripts should be provided by the distro > itself". I suppose you want to test it using Yocto, so take a look at

[PATCH v2 3/4] console: remove #ifdef CONFIG_CONSOLE_RECORD

2020-12-18 Thread Patrick Delaunay
From: Patrick Delaunay Add helper functions to access to gd->console_out and gd->console_in with membuff API and replace the #ifdef CONFIG_CONSOLE_RECORD test by if (IS_ENABLED(CONFIG_CONSOLE_RECORD)) to respect the U-Boot coding rule. Signed-off-by: Patrick Delaunay Signed-off-by: Patrick

[PATCH v2 4/4] console: add console_tstc_check helper function for CONSOLE_MUX

2020-12-18 Thread Patrick Delaunay
From: Patrick Delaunay Add the helper function console_tstc_check() and replace the test #if CONFIG_IS_ENABLED(CONSOLE_MUX) to a simple if to respect the U-Boot coding rule. No functional change. Signed-off-by: Patrick Delaunay Signed-off-by: Patrick Delaunay --- Changes in v2: - add

[PATCH v2 2/4] console: add function console_devices_set

2020-12-18 Thread Patrick Delaunay
From: Patrick Delaunay Add a new function to access to console_devices only defined if CONFIG_IS_ENABLED(CONSOLE_MUX). This path allows to remove #if CONFIG_IS_ENABLED(CONSOLE_MUX) in console_getc function. Signed-off-by: Patrick Delaunay Reviewed-by: Simon Glass Signed-off-by: Patrick

[PATCH v2 1/4] console: remove #ifdef CONFIG when it is possible

2020-12-18 Thread Patrick Delaunay
From: Patrick Delaunay Remove #ifdef or #ifndef for CONFIG when it is possible to simplify the console.c code and respect the U-Boot coding rules. Signed-off-by: Patrick Delaunay Signed-off-by: Patrick Delaunay --- Changes in v2: - update also #ifdef CONFIG_SANDBOX after Simon Glass remark

[PATCH v2 0/4] console: remove #ifdef CONFIG when it is possible

2020-12-18 Thread Patrick Delaunay
Hi, It is the V2 of serie [1] after Simon Glass comments. Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where possible This patchset can applied on master branch after the serie [2] (for the new order of test in function putc() and puts() done in "console: allow to record

RE: [EXT] Re: [PATCH v1 1/2] imx8mp: configs: add support for distro boot commands

2020-12-18 Thread Alice Guo (OSS)
> -Original Message- > From: Fabio Estevam > Sent: 2020年12月18日 18:59 > To: Alice Guo (OSS) > Cc: Stefano Babic ; Peng Fan ; > dl-uboot-imx ; Ye Li ; U-Boot-Denx > ; Alice Guo > Subject: [EXT] Re: [PATCH v1 1/2] imx8mp: configs: add support for distro boot > commands > > Caution: EXT

RE: [EXT] Re: [PATCH v2 2/2] board: imx8mp: add boot.cmd for distro boot on iMX8MP

2020-12-18 Thread Alice Guo (OSS)
> -Original Message- > From: Fabio Estevam > Sent: 2020年12月18日 19:03 > To: Alice Guo (OSS) > Cc: Stefano Babic ; Peng Fan ; > dl-uboot-imx ; Ye Li ; U-Boot-Denx > ; Alice Guo ; Otavio Salvador > ; andrey.zhizhi...@leica-geosystems.com > Subject: [EXT] Re: [PATCH v2 2/2] board: imx8mp:

Re: [PATCH v3 00/28] dm: Change the way sequence numbers are implemented

2020-12-18 Thread Michael Walle
Am 2020-12-17 05:20, schrieb Simon Glass: At present each device has two sequence numbers, with 'req_seq' being set up at bind time and 'seq' at probe time. The idea is that devices can 'request' a sequence number and then the conflicts are resolved when the device is probed. This makes

Re: [PATCH v2 2/2] board: imx8mp: add boot.cmd for distro boot on iMX8MP

2020-12-18 Thread Fabio Estevam
Hi Alice, On Fri, Dec 18, 2020 at 4:20 AM Alice Guo (OSS) wrote: > +++ b/board/freescale/imx8mp_evk/boot.cmd > @@ -0,0 +1,25 @@ > +setenv bootargs console=${console} root=${mmcroot}; > + > +for boot_target in ${boot_targets}; This is not how distro boot support works. boot.scr or

Re: [PATCH] ARM: dts: meson: switch TFLASH_VDD_EN pin to open drain on Odroid-C4

2020-12-18 Thread Mark Kettenis
> From: Neil Armstrong > Date: Fri, 18 Dec 2020 11:47:02 +0100 > > On 18/12/2020 11:43, Marek Szyprowski wrote: > > For the proper reboot Odroid-C4 board requires to switch TFLASH_VDD_EN > > pin to the high impedance mode, otherwise the board is stuck in the > > middle of loading early stages of

Re: [PATCH v1 1/2] imx8mp: configs: add support for distro boot commands

2020-12-18 Thread Fabio Estevam
Hi Alice, On Thu, Dec 17, 2020 at 7:28 AM Alice Guo (OSS) wrote: > diff --git a/configs/imx8mp_evk_defconfig b/configs/imx8mp_evk_defconfig > index cd5724e811..7831a940a3 100644 > --- a/configs/imx8mp_evk_defconfig > +++ b/configs/imx8mp_evk_defconfig > @@ -51,6 +51,8 @@ CONFIG_CMD_EXT2=y >

Re: [PATCH] ARM: dts: meson: switch TFLASH_VDD_EN pin to open drain on Odroid-C4

2020-12-18 Thread Neil Armstrong
On 18/12/2020 11:43, Marek Szyprowski wrote: > For the proper reboot Odroid-C4 board requires to switch TFLASH_VDD_EN > pin to the high impedance mode, otherwise the board is stuck in the > middle of loading early stages of the bootloader from SD card. > > This can be achieved by using the

[PATCH] ARM: dts: meson: switch TFLASH_VDD_EN pin to open drain on Odroid-C4

2020-12-18 Thread Marek Szyprowski
For the proper reboot Odroid-C4 board requires to switch TFLASH_VDD_EN pin to the high impedance mode, otherwise the board is stuck in the middle of loading early stages of the bootloader from SD card. This can be achieved by using the OPEN_DRAIN flag instead if the ACTIVE_HIGH, what will leave

Re: [PATCH v3 2/2] net: Use NDRNG device in srand_mac()

2020-12-18 Thread Torsten Duwe
On Fri, 18 Dec 2020 10:28:04 +0100 matthias@kernel.org wrote: > From: Matthias Brugger > > When calling srand_mac we use a weak seed dependent on the > mac address. If present, use a RNG device instead to incerase entropy. > > Signed-off-by: Matthias Brugger Reviewed-by: Torsten Duwe

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

2020-12-18 Thread Torsten Duwe
On Fri, 18 Dec 2020 10:28:03 +0100 matthias@kernel.org 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 Reviewed-by: Torsten Duwe

Re: [PATCH 0/5] board: amlogic: add Beelink GT-King/Pro support

2020-12-18 Thread Neil Armstrong
On 18/12/2020 09:45, Christian Hewitt wrote: > This patchset adds support for the Beelink GT-King and GT-King Pro boxes > based on the Amlogic S922X (G12B/W400) SoC. Patches are based on the > u-boot-amlogic-next branch in the custodians tree. > > Christian Hewitt (5): > ARM: dts: import

Re: [PATCH/RFC] board: amlogic: Fix Odroid-C4 SD card reboot issue

2020-12-18 Thread Neil Armstrong
Hi, On 18/12/2020 10:42, Marek Szyprowski wrote: > Hi Neil, > > On 18.12.2020 10:24, Neil Armstrong wrote: >> On 18/12/2020 10:11, Marek Szyprowski wrote: >>> On 18.12.2020 09:36, Neil Armstrong wrote: On 17/12/2020 10:06, Marek Szyprowski wrote: > For the proper reboot Odroid C4 board

Re: [PATCH 5/5] boards: amlogic: update documentation for Beelink GT-King/Pro

2020-12-18 Thread Neil Armstrong
On 18/12/2020 09:45, Christian Hewitt wrote: > Update the device matrix and add build instructions. > > Signed-off-by: Christian Hewitt > --- > doc/board/amlogic/beelink-gtking.rst| 115 +++ > doc/board/amlogic/beelink-gtkingpro.rst | 116 >

Re: [PATCH 4/5] boards: amlogic: add Beelink GT-King Pro defconfig

2020-12-18 Thread Neil Armstrong
On 18/12/2020 09:45, Christian Hewitt wrote: > Add a defconfig for the Beelink GT-King Pro Android STB, which is based > on the Amlogic W400 reference design. > > Signed-off-by: Christian Hewitt > --- > configs/beelink-gtkingpro_defconfig | 71 + > 1 file changed, 71

Re: [PATCH 3/5] boards: amlogic: add Beelink GT-King defconfig

2020-12-18 Thread Neil Armstrong
On 18/12/2020 09:45, Christian Hewitt wrote: > Add a defconfig for the Beelink GT-King Android STB, which is based > on the Amlogic W400 reference design. > > Signed-off-by: Christian Hewitt > --- > configs/beelink-gtking_defconfig | 71 > 1 file changed, 71

Re: [PATCH 2/5] boards: amlogic: add Beelink S922X board family support

2020-12-18 Thread Neil Armstrong
On 18/12/2020 09:45, Christian Hewitt wrote: > Copied from Odroid N2. Add myself as maintainer. > > Signed-off-by: Christian Hewitt > --- > board/amlogic/beelink-s922x/MAINTAINERS | 9 > board/amlogic/beelink-s922x/Makefile| 6 +++ >

Re: [PATCH/RFC] board: amlogic: Fix Odroid-C4 SD card reboot issue

2020-12-18 Thread Marek Szyprowski
Hi Neil, On 18.12.2020 10:24, Neil Armstrong wrote: > On 18/12/2020 10:11, Marek Szyprowski wrote: >> On 18.12.2020 09:36, Neil Armstrong wrote: >>> On 17/12/2020 10:06, Marek Szyprowski wrote: For the proper reboot Odroid C4 board requires to switch TFLASH_VDD_EN pin to the input (high

Re: [PATCH 1/5] ARM: dts: import Beelink GT-King/Pro DTs from Linux 5.10

2020-12-18 Thread Neil Armstrong
On 18/12/2020 09:45, Christian Hewitt wrote: > Import the Beelink GT-King/Pro and supporting meson-g12b-w400.dtsi file > from Linux 5.10. > > Signed-off-by: Christian Hewitt > --- > arch/arm/dts/Makefile | 2 + > arch/arm/dts/meson-g12b-gtking-pro.dts | 125 >

[PATCH v3 2/2] net: Use NDRNG device in srand_mac()

2020-12-18 Thread matthias . bgg
From: Matthias Brugger When calling srand_mac we use a weak seed dependent on the mac address. If present, use a RNG device instead to incerase entropy. Signed-off-by: Matthias Brugger --- Changes in v3: - use IS_ENABLED instead of #if Changes in v2: - fix dm_rng_read() parameters - add

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

2020-12-18 Thread matthias . bgg
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 --- Changes in v3: - use IS_ENABLED instead of #if - use 4 byte for entropy Changes in v2: - fix dm_rng_read() parameters - add missing

[PATCH v3 0/2] Use RNG to get random behaviour

2020-12-18 Thread matthias . bgg
From: Matthias Brugger For now bootp and uuid code use a weak seed for generating random data. U-Boot as support for RNG devices now, so we should change to code to use them if they are present. This will help mitigate issues like seen in CVE-2019-11690. Changes in v3: - use IS_ENABLED instead

Re: [PATCH/RFC] board: amlogic: Fix Odroid-C4 SD card reboot issue

2020-12-18 Thread Neil Armstrong
Hi, On 18/12/2020 10:11, Marek Szyprowski wrote: > Hi Neil, > > On 18.12.2020 09:36, Neil Armstrong wrote: >> On 17/12/2020 10:06, Marek Szyprowski wrote: >>> For the proper reboot Odroid C4 board requires to switch TFLASH_VDD_EN >>> pin to the input (high impedance?) mode, otherwise the board

Re: [PATCH/RFC] board: amlogic: Fix Odroid-C4 SD card reboot issue

2020-12-18 Thread Marek Szyprowski
Hi Neil, On 18.12.2020 09:36, Neil Armstrong wrote: > On 17/12/2020 10:06, Marek Szyprowski wrote: >> For the proper reboot Odroid C4 board requires to switch TFLASH_VDD_EN >> pin to the input (high impedance?) mode, otherwise the board is stuck >> in the middle of loading early stages of the

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

2020-12-18 Thread mbrugger
On Fri, Dec 18, 2020 at 09:37:28AM +0100, Torsten Duwe wrote: > On Wed, 16 Dec 2020 17:28:06 +0100 > matthias@kernel.org wrote: > > > @@ -249,9 +251,22 @@ void gen_rand_uuid(unsigned char *uuid_bin) > > { > > u32 ptr[4]; > > struct uuid *uuid = (struct uuid *)ptr; > > - int i; > >

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

2020-12-18 Thread Torsten Duwe
On Wed, 16 Dec 2020 17:28:06 +0100 matthias@kernel.org wrote: > @@ -249,9 +251,22 @@ void gen_rand_uuid(unsigned char *uuid_bin) > { > u32 ptr[4]; > struct uuid *uuid = (struct uuid *)ptr; > - int i; > - > - srand(get_ticks() + rand()); > + int i, ret; > + struct

Re: [PATCH/RFC] board: amlogic: Fix Odroid-C4 SD card reboot issue

2020-12-18 Thread Neil Armstrong
Hi, On 17/12/2020 10:06, Marek Szyprowski wrote: > For the proper reboot Odroid C4 board requires to switch TFLASH_VDD_EN > pin to the input (high impedance?) mode, otherwise the board is stuck > in the middle of loading early stages of the bootloader from SD card. Did you try taking the

Re: [PATCH v2 0/2] Use RNG to get random behaviour

2020-12-18 Thread Torsten Duwe
On Wed, 16 Dec 2020 17:28:05 +0100 matthias@kernel.org wrote: > From: Matthias Brugger > > > For now bootp and uuid code use a weak seed for generating random > data. U-Boot as support for RNG devices now, so we should change to > code to use them if they are present. This will help

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

2020-12-18 Thread Felix Brack
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. With LINUX kernel commit a1a4891 the probing type

  1   2   >