RE: [PATCH] arm: socfpga: Only do 'is OS booted from FIT' checking when VAB is enabled

2021-03-22 Thread Tan, Ley Foon
> -Original Message- > From: Lim, Elly Siew Chin > Sent: Monday, March 22, 2021 6:05 PM > To: u-boot@lists.denx.de > Cc: Marek Vasut ; Tan, Ley Foon > ; See, Chin Liang ; > Simon Goldschmidt ; Chee, Tien Fong > ; Westergreen, Dalon > ; Simon Glass ; Gan, > Yau Wai ; Lim, Elly Siew Chin

Re: [PATCH v2 1/9] dm: core: Document the common error codes

2021-03-22 Thread Simon Glass
HI Sean, On Tue, 23 Mar 2021 at 17:45, Sean Anderson wrote: > > On 3/23/21 12:14 AM, Simon Glass wrote: > > Driver model uses quite strong conventions on error codes, but these are > > currently not clearly documented. Add a description of the commonly used > > errors. > > > > Signed-off-by: Simo

Re: [RFC PATCH] arch: riscv: cpu: Add callback to init each core

2021-03-22 Thread Bin Meng
Hi Green, On Tue, Mar 23, 2021 at 12:12 PM Green Wan wrote: > > Hi Bin, > > I can move it to the place right after stacks for harts are set up and right > before picking up the lottery hart. (like below) How about the function name? > Do we come up with a better function name? mach_cpu_core_ini

Re: [PATCH v2 1/9] dm: core: Document the common error codes

2021-03-22 Thread Sean Anderson
On 3/23/21 12:14 AM, Simon Glass wrote: Driver model uses quite strong conventions on error codes, but these are currently not clearly documented. Add a description of the commonly used errors. Signed-off-by: Simon Glass --- Changes in v2: - Add a patch to document the common error codes do

Re: [PATCH RFT 0/4] pci: add common Designware PCIe functions and support Amlogic Meson PCIe controller

2021-03-22 Thread Green Wan
Hi Neil, pcie_dw_common.* is a good starting point. I'd like to spend time on this. Please add me into the loop. Thanks. - Green

Re: [PATCH v2 8/9] simple-pm-bus: Use -ENOSYS for checking missing system call

2021-03-22 Thread Sean Anderson
On 3/23/21 12:14 AM, Simon Glass wrote: We don't need to check -ENOTSUPP since this is not used for this purpose in U-Boot. Update the code accordingly. Signed-off-by: Simon Glass --- (no changes since v1) drivers/core/simple-pm-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(

Re: [PATCH v2 6/9] clk: Update drivers to use -EINVAL

2021-03-22 Thread Sean Anderson
On 3/23/21 12:14 AM, Simon Glass wrote: At present some drivers use -ENOSUPP to indicate that an unknown or unsupported clock is used. Most use -EINVAL, indicating an invalid value, so convert everything to that. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to update clk drive

[PATCH v2 9/9] pinctrl: Return -ENOSYS when system call is not available

2021-03-22 Thread Simon Glass
Update the code to use -ENOSYS, which is the correct error code for an unimplemented system call in U-Boot. Also we should not check for a missing operations array as this is not permitted. For now this can be covered by an assert(). Signed-off-by: Simon Glass --- (no changes since v1) driver

[PATCH v2 8/9] simple-pm-bus: Use -ENOSYS for checking missing system call

2021-03-22 Thread Simon Glass
We don't need to check -ENOTSUPP since this is not used for this purpose in U-Boot. Update the code accordingly. Signed-off-by: Simon Glass --- (no changes since v1) drivers/core/simple-pm-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/core/simple-pm-bus.

[PATCH v2 7/9] clk: Return -ENOSYS when system call is not available

2021-03-22 Thread Simon Glass
Update clk_composite_set_parent() to use -ENOSYS, which is the correct error code for U-Boot. Also rearrange the code so that the error condition is clearly indicated and the function runs to the end in the normal case, since this is the common style in U-Boot. Signed-off-by: Simon Glass Reviewed

[PATCH v2 6/9] clk: Update drivers to use -EINVAL

2021-03-22 Thread Simon Glass
At present some drivers use -ENOSUPP to indicate that an unknown or unsupported clock is used. Most use -EINVAL, indicating an invalid value, so convert everything to that. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to update clk drivers to use -EINVAL drivers/clk/aspeed/clk

[PATCH v2 5/9] tlv_eeprom: Return -ENOSYS when system call is not available

2021-03-22 Thread Simon Glass
When CMD_TLV_EEPROM is not enabled, use -ENOSYS, which is the correct error code for U-Boot. Signed-off-by: Simon Glass --- (no changes since v1) include/tlv_eeprom.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/tlv_eeprom.h b/include/tlv_eeprom.h index 1de

[PATCH v2 4/9] spi: Return -ENOSYS when system call is not available

2021-03-22 Thread Simon Glass
Update spi_controller_dma_map_mem_op_data() to use -ENOSYS, which is the correct error code for U-Boot. Signed-off-by: Simon Glass --- (no changes since v1) include/spi-mem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spi-mem.h b/include/spi-mem.h index 8be3e2b

[PATCH v2 3/9] usb: Return -ENOSYS when system call is not available

2021-03-22 Thread Simon Glass
Update usb_gadget_release() to use -ENOSYS, which is the correct error code for U-Boot. Signed-off-by: Simon Glass --- (no changes since v1) drivers/usb/gadget/udc/udc-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/udc-uclass.c b/drivers/us

[PATCH v2 2/9] dm: core: Use -ENOSPC in acpi_get_path()

2021-03-22 Thread Simon Glass
Update this function to use -ENOSPC which is more commly used when a buffer runs out of space. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch for acpi_get_path() drivers/core/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/core/acpi.c b/drivers

[PATCH v2 1/9] dm: core: Document the common error codes

2021-03-22 Thread Simon Glass
Driver model uses quite strong conventions on error codes, but these are currently not clearly documented. Add a description of the commonly used errors. Signed-off-by: Simon Glass --- Changes in v2: - Add a patch to document the common error codes doc/driver-model/design.rst | 111 +++

[PATCH v2 0/9] Use -ENOSYS consistently

2021-03-22 Thread Simon Glass
A few places use -ENOTSUPP when they should use -ENOSYS. In two cases both are used. This little series tidies this up and documents the conventions. Changes in v2: - Add a patch to document the common error codes - Add new patch for acpi_get_path() - Add new patch to update clk drivers to use -EI

Re: [RFC PATCH] arch: riscv: cpu: Add callback to init each core

2021-03-22 Thread Green Wan
Hi Bin, I can move it to the place right after stacks for harts are set up and right before picking up the lottery hart. (like below) How about the function name? Do we come up with a better function name? mach_cpu_core_init() is similar to mach_cpu_init() in include/init.h. It could cause confusi

Re: [PATCH 4/6] clk: Return -ENOSYS when system call is not available

2021-03-22 Thread Simon Glass
Hi Seam, On Sun, 21 Mar 2021 at 17:37, Sean Anderson wrote: > > > On 3/20/21 11:18 PM, Simon Glass wrote: > > Update clk_composite_set_parent() to use -ENOSYS, which is the correct > > error code for U-Boot. Also rearrange the code so that the error condition > > is clearly indicated and the func

RE: [PATCH] Revert "mmc: sdhci: set to INT_DATA_END when there are data"

2021-03-22 Thread Andy.Wu
Hi Jaehoon > Did you test on latest u-boot? v2018.01 was too old version. > Yes, we tested on v2020.04, although there is no such issue, but I think it just depends on call sequence timing. > And if my understanding is right, INT_DATA_END needs to set when there is a > data. If there is no da

[PATCH v7 2/2] gpio: Drop dm_gpio_set_dir()

2021-03-22 Thread Simon Glass
This function is not used. Drop it. Signed-off-by: Simon Glass Reviewed-by: Patrick Delaunay --- (no changes since v5) Changes in v5: - Drop patches previously applied drivers/gpio/gpio-uclass.c | 11 --- include/asm-generic/gpio.h | 11 --- 2 files changed, 22 deletions(-)

[PATCH v7 1/2] gpio: i2c-gpio: Drop use of dm_gpio_set_dir()

2021-03-22 Thread Simon Glass
This is the only driver that uses this function. Update it to use the alternative which is dm_gpio_clrset_flags(). Signed-off-by: Simon Glass Tested-by: Harm Berntsen --- Changes in v7: - Update commit message to mention dm_gpio_clrset_flags() Changes in v6: - Use dm_gpio_clrset_flags() so tha

[PATCH v7 0/2] gpio: Update and simplify the uclass API

2021-03-22 Thread Simon Glass
At present the GPIO uclass mirrors what was in U-Boot before driver model. It works well in most cases but is becoming cumbersome with things like pull-up/down and drive strength. In those cases it is easier for the driver to deal with all the flags at one, rather than piece by piece. In fact the

Re: [BUG] sandbox error handling broken on origin/next

2021-03-22 Thread Heinrich Schuchardt
Am 23. März 2021 01:57:00 MEZ schrieb Simon Glass : >Hi Heinrich, > >On Tue, 23 Mar 2021 at 08:45, Heinrich Schuchardt >wrote: >> >> On 3/22/21 7:16 PM, Simon Glass wrote: >> > Hi Heinrich, >> > >> > On Tue, 23 Mar 2021 at 07:12, Heinrich Schuchardt > wrote: >> >> >> >> Hello Simon, >> >> >> >> us

Re: [BUG] sandbox error handling broken on origin/next

2021-03-22 Thread Simon Glass
Hi Heinrich, On Tue, 23 Mar 2021 at 08:45, Heinrich Schuchardt wrote: > > On 3/22/21 7:16 PM, Simon Glass wrote: > > Hi Heinrich, > > > > On Tue, 23 Mar 2021 at 07:12, Heinrich Schuchardt > > wrote: > >> > >> Hello Simon, > >> > >> using sandbox_defconfig on origin/master: > >> > >> Hit any key

Re: [PATCH v2] spl: Add callback for preprocessing loaded FIT header before parsing

2021-03-22 Thread Simon Glass
Hi Alex, On Tue, 23 Mar 2021 at 04:12, Alex G. wrote: > > On 3/22/21 9:27 AM, Philippe REYNES wrote: > > Hi all, > > > > > > Le 11/03/2021 à 00:10, Alex G a écrit : > [snip] > > > > I reach the same issue, my customers are also worried with the actual > > signature check scheme on u-boot. > > The

Re: [PATCH v5 22/41] test: Move dm_test_init() into test-main.c

2021-03-22 Thread Simon Glass
Hi Sean, On Tue, 23 Mar 2021 at 02:26, Sean Anderson wrote: > > On 3/7/21 7:34 PM, Simon Glass wrote: > > Move this function into test-main so that all the init is in one place. > > Rename it so that its purpose is clearer. > > > > Signed-off-by: Simon Glass > > --- > > > > (no changes since v1)

Re: [PATCH] sandbox: Support signal handling only when requested

2021-03-22 Thread Simon Glass
Hi Heinrich, On Mon, 22 Mar 2021 at 23:02, Heinrich Schuchardt wrote: > > On 22.03.21 06:21, Simon Glass wrote: > > At present if sandbox crashes it prints a message and tries to exit. But > > with the recently introduced signal handler, it often seems to get stuck > > in a loop until the stack o

Re: [PATCH 02/16] drivers: reset: Handle gracefully NULL pointers

2021-03-22 Thread Simon Glass
Hi Kishon, On Mon, 22 Mar 2021 at 18:11, Kishon Vijay Abraham I wrote: > > Hi Simon, > > On 12/03/21 10:15 am, Simon Glass wrote: > > Hi Kishon, > > > > On Tue, 9 Mar 2021 at 05:27, Kishon Vijay Abraham I wrote: > >> > >> From: Jean-Jacques Hiblot > >> > >> Prepare the way for a managed reset A

Re: [PATCH] Support building on macOS/arm64

2021-03-22 Thread Tom Rini
On Sat, Mar 20, 2021 at 08:43:05PM +, Jessica Clarke wrote: > On Arm-based Macs, -no_pie is ignored and gives a linker warning. > Moreover, the build falls over with: > > ld: Absolute addressing not allowed in arm64 code but used in > '_image_type_ptr_aisimage' referencing '_image_type_ais

Re: [BUG] sandbox error handling broken on origin/next

2021-03-22 Thread Heinrich Schuchardt
On 3/22/21 7:16 PM, Simon Glass wrote: Hi Heinrich, On Tue, 23 Mar 2021 at 07:12, Heinrich Schuchardt wrote: Hello Simon, using sandbox_defconfig on origin/master: Hit any key to stop autoboot: 0 => exception sigsegv Segmentation violation pc = 0x55d3566d04f9, pc_reloc = 0x554f9 $ Here

Re: Help needed with uboot for CHIP

2021-03-22 Thread Gunjan Gupta
Ok... What about supporting SLC. I dont have a Chip pro, but are you sure that the current logic works for that too? Thanks & Regards Gunjan Gupta On Mon, Mar 22, 2021, 11:58 PM Maxime Ripard wrote: > Hi, > > On Sun, Mar 21, 2021 at 08:04:08PM +0530, Gunjan Gupta wrote: > > I figured out the w

Re: Help needed with uboot for CHIP

2021-03-22 Thread Maxime Ripard
Hi, On Sun, Mar 21, 2021 at 08:04:08PM +0530, Gunjan Gupta wrote: > I figured out the why SPL was not loading U-Boot from NAND. > > Apparently the logic to use PIO instead of DMA that was introduced in > 6ddbb1e936c78cdef1e7395039fa7020c5c75326 >

Re: [BUG] sandbox error handling broken on origin/next

2021-03-22 Thread Simon Glass
Hi Heinrich, On Tue, 23 Mar 2021 at 07:12, Heinrich Schuchardt wrote: > > Hello Simon, > > using sandbox_defconfig on origin/master: > > Hit any key to stop autoboot: 0 > => exception sigsegv > > Segmentation violation > pc = 0x55d3566d04f9, pc_reloc = 0x554f9 > > $ > > Here the SIGSEGV is corre

Please pull u-boot-dm/next (take 3)

2021-03-22 Thread Simon Glass
Hi Tom, This is for the -next branch. https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/6871 The following changes since commit 874dcedee92a828b03c8d3146dccfaa8b709618b: Merge branch '2021-03-20-mediatek-updates' into next (2021-03-20 19:27:22 -0400) are available in the Git re

Re: [PATCH v9] Add support for stack-protector

2021-03-22 Thread Heinrich Schuchardt
On 09.02.21 04:36, Joel Peshkin wrote: > Add support for stack protector for UBOOT, SPL, and TPL > as well as new pytest for stackprotector > > Signed-off-by: Joel Peshkin > --- > Cc: Simon Glass > Cc: Heinrich Schuchardt > > Changes for v9: >- Fix pytest script post-test reboot > Changes fo

Re: [PATCH] dm: test: Always include command.h for print_ut

2021-03-22 Thread Heinrich Schuchardt
On 22.03.21 14:15, Sean Anderson wrote: > We need this header for U_BOOT_CMD, which is always present even without > EFI. > > Fixes: 82c468a049 dm: test: Update Makefile conditions > > Signed-off-by: Sean Anderson Fixes: 091401131085 ("[PATCH] dm: test: Always include command.h for print_ut") >

Re: [PATCH] azure: Use --board flag with sandbox_spl

2021-03-22 Thread Simon Glass
On Mon, 22 Mar 2021 at 09:36, Tom Rini wrote: > > On Mon, Mar 22, 2021 at 08:22:53AM +1300, Simon Glass wrote: > > > At present there is only one board which uses sandbox SPL. But with > > sandbox_noinst being added, this is no longer true. Add a --board flag > > so that we just build one board on

Re: [PATCH v2 2/2] test: unit test for longjmp

2021-03-22 Thread Heinrich Schuchardt
On 22.03.21 14:30, Sean Anderson wrote: > > On 3/22/21 9:23 AM, Sean Anderson wrote: >> >> On 3/22/21 7:02 AM, Heinrich Schuchardt wrote: >>> Provide a unit test for the longjmp() library function >>> >>> Signed-off-by: Heinrich Schuchardt >>> --- >>> v2: >>>     no change >>> --- >>>   test/lib/M

[PATCH v2 1/2] mx23_olinuxino: enable device tree

2021-03-22 Thread Trevor Woerner
Add the dts file for the Olimex Olinuxino from the linux kernel, and enable its use in this machine's defconfig. Signed-off-by: Trevor Woerner --- Changes in v2: - none --- arch/arm/dts/Makefile| 3 + arch/arm/dts/imx23-olinuxino.dts | 131 +++ configs/

[PATCH v2 2/2] mx23_olinuxino: convert MMC to driver model

2021-03-22 Thread Trevor Woerner
Convert the Olimex Olinuxino board's support for MMC to driver model following Fabio Estevam's excellent example from: commit: 23013aa9619881290dbeb6217f1fab863869050e: mx23evk: Convert to driver model Signed-off-by: Trevor Woerner --- Changes in v2: - Create an imx23-olinuxino-

Re: [PATCH v2] spl: Add callback for preprocessing loaded FIT header before parsing

2021-03-22 Thread Alex G.
On 3/22/21 9:27 AM, Philippe REYNES wrote: Hi all, Le 11/03/2021 à 00:10, Alex G a écrit : [snip] I reach the same issue, my customers are also worried with the actual signature check scheme on u-boot. The fit data/node are parsed before being checked : data should be used only after being

[PATCH 3/3] ARM: bitmain: Enable saving variables to SD card

2021-03-22 Thread Michal Simek
Board has NAND and SD interfaces which can be used for saving variables too. Signed-off-by: Michal Simek --- Based on "xilinx: zynq: Add support for saving env based on bootmode" --- configs/bitmain_antminer_s9_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/bitmain_antmi

[PATCH 2/3] ARM: bitmain: Enable legacy u-boot format

2021-03-22 Thread Michal Simek
Still legacy formats are used that's why enable them by default. Signed-off-by: Michal Simek --- configs/bitmain_antminer_s9_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/bitmain_antminer_s9_defconfig b/configs/bitmain_antminer_s9_defconfig index f9904483919a..ea21a5e1e

[PATCH 1/3] ARM: bitmain: Enable nand and smcc drivers

2021-03-22 Thread Michal Simek
Enable nand and smcc via DT. Signed-off-by: Michal Simek --- arch/arm/dts/bitmain-antminer-s9.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/dts/bitmain-antminer-s9.dts b/arch/arm/dts/bitmain-antminer-s9.dts index 7362ad4e8f99..0694350555f5 100644 --- a/arch/arm/dts/b

[PATCH 0/3] ARM: bitmain: Extend bitmain S9 board

2021-03-22 Thread Michal Simek
Hi, a lot of these boards are very cheap to buy now. Get this board up to date based on latest features available for zynq. Thanks, Michal Michal Simek (3): ARM: bitmain: Enable nand and smcc drivers ARM: bitmain: Enable legacy u-boot format ARM: bitmain: Enable saving variables to SD car

Re: [PATCH v2] spl: Add callback for preprocessing loaded FIT header before parsing

2021-03-22 Thread Philippe REYNES
Hi all, Le 11/03/2021 à 00:10, Alex G a écrit : On 3/10/21 2:49 PM, Farhan Ali wrote: On Wed, Mar 10, 2021 at 11:38 AM Alex G. This patch describes "how" you're trying to achieve it, but "what" you     want to achieve. I'll get later into why I think the "how" is     fundamentally flawed. The

[PATCH] lib: Move selection of SPL hash algorithms from common/

2021-03-22 Thread Alexandru Gagniuc
When God said, "May there be FIT signature verification in SPL", Chuck Norris said "SPL image too big". And then there was this patch. Enabling SPL_FIT_SIGNATURE increased the code size (armv7 platform) by about 16KiB, just enough to go over the SPL image limit. Of that: * .text.sha256_process

Re: [PATCH v2 2/2] test: unit test for longjmp

2021-03-22 Thread Sean Anderson
On 3/22/21 9:23 AM, Sean Anderson wrote: On 3/22/21 7:02 AM, Heinrich Schuchardt wrote: Provide a unit test for the longjmp() library function Signed-off-by: Heinrich Schuchardt --- v2: no change --- test/lib/Makefile | 1 + test/lib/longjmp.c | 44 +

Re: [PATCH v5 22/41] test: Move dm_test_init() into test-main.c

2021-03-22 Thread Sean Anderson
On 3/7/21 7:34 PM, Simon Glass wrote: Move this function into test-main so that all the init is in one place. Rename it so that its purpose is clearer. Signed-off-by: Simon Glass --- (no changes since v1) include/test/ut.h | 9 - test/dm/test-dm.c | 22 -- tes

Re: [PATCH v2 2/2] test: unit test for longjmp

2021-03-22 Thread Sean Anderson
On 3/22/21 7:02 AM, Heinrich Schuchardt wrote: Provide a unit test for the longjmp() library function Signed-off-by: Heinrich Schuchardt --- v2: no change --- test/lib/Makefile | 1 + test/lib/longjmp.c | 44 2 files changed, 45 inser

[PATCH 3/3] configs: stm32mp1: Fix misleading SPL size limitations

2021-03-22 Thread Alexandru Gagniuc
A now removed comment promises to "limit SYSRAM usage to first 128 KB". This would imply that only SYSRAM from 0x2ffc - 0x2ffe would be used. This is not what happens at all. First, SPL_MAX_SIZE is referenced from SPL_TEXT_BASE, which on all existing configs is set to 0x2ffc2500, not SYSRA

[PATCH 1/3] configs: stm32mp1: stm32mp1: Increase SPL malloc() size

2021-03-22 Thread Alexandru Gagniuc
Since commit 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d buffer for loading images"), FIT images must be malloc()'d before being loaded. The old size of 1 MiB is suitable for FIT images with u-boot and an FDT, but something containing a linux kernel is almost sure to fail. It's safe to extend mal

[PATCH 2/3] configs: stm32mp1: Remove misleading CONFIG_SPL_BSS_START_ADDR

2021-03-22 Thread Alexandru Gagniuc
CONFIG_SPL_BSS_START_ADDR is only used on a few mach- linker scripts. stm32mp1 uses the generic script under arch/arm/cpu/u-boot-spl.lds, which does not make use of this definition. The SPL BSS starts in SRAM, right after .text, .rodata, .data, and .u_boot_list. A very short version of the STM32MP

[PATCH] dm: test: Always include command.h for print_ut

2021-03-22 Thread Sean Anderson
We need this header for U_BOOT_CMD, which is always present even without EFI. Fixes: 82c468a049 dm: test: Update Makefile conditions Signed-off-by: Sean Anderson --- test/print_ut.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/print_ut.c b/test/print_ut.c index a456

[PATCH] ARM: pcm058: Match mainline Linux NAND ECC layout/behaviour

2021-03-22 Thread Niel Fourie
Enabled "fsl,legacy-bch-geometry" in U-Boot device tree overlay to match the legacy BCH geometry layout, which mainline Linux applies when "fsl,use-minimum-ecc" is not specified in the device tree. Reinstated SYS_NAND_ONFI_DETECTION, which when disabled, masked the mismatch on SOMs with Winbond NA

Re: [PATCH] Fix data abort in startup for at91 machines based on ARM926EJS

2021-03-22 Thread Eugen.Hristev
Hello Martin, Okay, I get it. Thanks for testing this. I applied your patch as it was original, and I updated a bit the commit short message to match requirements. also, Reviewed-by: Eugen Hristev Applied to u-boot-atmel/next On 3/20/21 1:07 PM, Martin Townsend wrote: > Hi Eugen, > > It d

Re: [PATCH v2 1/2] riscv: simplify longjmp

2021-03-22 Thread Sean Anderson
On 3/22/21 7:02 AM, Heinrich Schuchardt wrote: The value returned by setjmp must be nonzero. If zero is passed as parameter it must be replaced by 1. This patch reduces the code size a bit. Signed-off-by: Heinrich Schuchardt Sean Anderson You are missing something here. --- v2: fi

Re: [PATCH 2/2] mmc: fsl_esdhc_imx: add extra delay for IO voltage switch if necessary

2021-03-22 Thread Sean Anderson
On 3/22/21 8:04 AM, Fabio Estevam wrote: Hi Haibo, On Mon, Mar 22, 2021 at 8:09 AM wrote: --- a/arch/arm/dts/imx8mm-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-evk-u-boot.dtsi @@ -102,6 +102,7 @@ u-boot,dm-spl; sd-uhs-sdr104; sd-uhs-ddr50; + fsl,signal-voltage

Re: [PATCH 2/2] mmc: fsl_esdhc_imx: add extra delay for IO voltage switch if necessary

2021-03-22 Thread Fabio Estevam
Hi Haibo, On Mon, Mar 22, 2021 at 8:09 AM wrote: > --- a/arch/arm/dts/imx8mm-evk-u-boot.dtsi > +++ b/arch/arm/dts/imx8mm-evk-u-boot.dtsi > @@ -102,6 +102,7 @@ > u-boot,dm-spl; > sd-uhs-sdr104; > sd-uhs-ddr50; > + fsl,signal-voltage-switch-extra-delay-ms = <8>; How

Re: [PATCH 1/2] mx23_olinuxino: enable device tree

2021-03-22 Thread Fabio Estevam
Hi Sean, On Mon, Mar 22, 2021 at 1:38 AM Sean Anderson wrote: > > + regulators { > > Does this need to be on a separate bus? Can't you just add the regulator > at the top-level with no register? Trevor has only imported the file from the Linux tree. Yes, your suggestion makes sense, but it

[PATCH 2/2] mmc: fsl_esdhc_imx: add extra delay for IO voltage switch if necessary

2021-03-22 Thread haibo . chen
From: Haibo Chen Some board like imx8mm-evkb, IO voltage switch from 3.3v to 1.8v need around 18ms, common code only delay 10ms, so need to delay extra 8ms. Otherwise voltage switch will timeout when wait for data0 line. This IO voltage switch time depends on board design, depend on the PMIC and

[PATCH 1/2] mmc: fsl_esdhc_imx: remove redundant cmd11 related code.

2021-03-22 Thread haibo . chen
From: Haibo Chen Common code already handle the voltage switch sequence based on spec, so remove the redundant voltage switch code. Signed-off-by: Haibo Chen --- drivers/mmc/fsl_esdhc_imx.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fs

[PATCH v2 0/2] riscv: simplify longjmp

2021-03-22 Thread Heinrich Schuchardt
The implementation of longjmp() is simplified. A unit test for longjmp() is provided. For testing use CONFIG_UNIT_TEST=y CONFIG_CMD_SETEXPR=n and execute ut lib v2: correct title of patch 1 Heinrich Schuchardt (2): riscv: simplify longjmp test: unit test for longjmp

[PATCH v2 2/2] test: unit test for longjmp

2021-03-22 Thread Heinrich Schuchardt
Provide a unit test for the longjmp() library function Signed-off-by: Heinrich Schuchardt --- v2: no change --- test/lib/Makefile | 1 + test/lib/longjmp.c | 44 2 files changed, 45 insertions(+) create mode 100644 test/lib/longjmp.c diff

[PATCH v2 1/2] riscv: simplify longjmp

2021-03-22 Thread Heinrich Schuchardt
The value returned by setjmp must be nonzero. If zero is passed as parameter it must be replaced by 1. This patch reduces the code size a bit. Signed-off-by: Heinrich Schuchardt Sean Anderson --- v2: fix typo in title --- arch/riscv/lib/setjmp.S | 8 ++-- 1 file changed, 2 insertio

Re: [PATCH v6 1/2] gpio: i2c-gpio: Drop use of dm_gpio_set_dir()

2021-03-22 Thread Harm Berntsen
Nice work, pactch works on my board! Note that your commit message still mentions dm_gpio_set_dir_flags instead of dm_gpio_clrset_flags Tested-by: Harm Berntsen -Original Message- From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Patrick Delaunay , Harm Berntsen , Simon Glass ,

[PATCH] arm: socfpga: Only do 'is OS booted from FIT' checking when VAB is enabled

2021-03-22 Thread Siew Chin Lim
Check CONFIG_SOCFPGA_SECURE_VAB_AUTH before perform 'is OS booted from FIT' checking in board_prep_linux function. And, fix typo of CONFIG_SOCFPGA_SECURE_VAB_AUTH_ALLOW_NON_FIT_IMAGE. CONFIG_FIT will be enabled in both ATF and VAB boot flow, thus, board_prep_linux function will always be called by

Re: [RFC PATCH] arch: riscv: cpu: Add callback to init each core

2021-03-22 Thread Bin Meng
On Mon, Mar 22, 2021 at 5:23 PM Green Wan wrote: > > I am looking for a proper place to add some M-mode code in SPL to > configure features of each core as early as possible. Try to start > the discussion by sending this RFC. > > I tried mach_cpu_init() as the start. And not sure whether I used >

Re: [PATCH 1/2] riscv: simply longjmp

2021-03-22 Thread Heinrich Schuchardt
On 22.03.21 05:56, Sean Anderson wrote: > On 3/21/21 6:19 AM, Heinrich Schuchardt wrote: >> The value returned by setjmp must be nonzero. If zero is passed as >> parameter it must be replaced by 1. >> >> This patch reduces the code size a bit. >> >> Signed-off-by: Heinrich Schuchardt >> --- >>   a

Re: [PATCH] sandbox: Support signal handling only when requested

2021-03-22 Thread Heinrich Schuchardt
On 22.03.21 06:21, Simon Glass wrote: > At present if sandbox crashes it prints a message and tries to exit. But > with the recently introduced signal handler, it often seems to get stuck > in a loop until the stack overflows: > > Segmentation violation > > Segmentation violation > > Segmentation v

Re: [PATCH RFT 1/4] pci: add common Designware PCIe functions

2021-03-22 Thread Bin Meng
+Green Wan for SiFive FU740 PCIe which is another variant of DW PCIe On Mon, Mar 22, 2021 at 5:18 PM Neil Armstrong wrote: > > With the introduction of pcie_dw_rockchip, and need to support the DW PCIe in > the > Amlogic AXG & G12 SoCs, most of the DW PCIe helpers would be duplicated. > > This i

Re: [PATCH RFT 0/4] pci: add common Designware PCIe functions and support Amlogic Meson PCIe controller

2021-03-22 Thread Neil Armstrong
On 22/03/2021 10:27, Shawn Lin wrote: > Hi Neil, > > On 2021/3/22 17:18, Neil Armstrong wrote: >> With the introduction of pcie_dw_rockchip, and need to support the DW PCIe >> in the >> Amlogic AXG & G12 SoCs, most of the DW PCIe helpers would be duplicated. >> >> This introduce a "common" DW PCI

[RFC PATCH] arch: riscv: cpu: Add callback to init each core

2021-03-22 Thread Green Wan
I am looking for a proper place to add some M-mode code in SPL to configure features of each core as early as possible. Try to start the discussion by sending this RFC. I tried mach_cpu_init() as the start. And not sure whether I used it correctly, it seems executed only by the core wins lottery i

[PATCH RFT 4/4] pci: add Amlogic Meson Designware PCIe controller

2021-03-22 Thread Neil Armstrong
Add support for the DW PCIe controller found in the Amlogic Meson AXG and G12 (G12A, G12B, SM1) SoCs. This uses the common DW PCIe helpers introducted previously. Signed-off-by: Neil Armstrong --- drivers/pci/Kconfig | 8 + drivers/pci/Makefile| 1 + drivers/pci/pcie_dw_meson

[PATCH RFT 3/4] pci: pcie_dw_rockchip: migrate to common Designware PCIe functions

2021-03-22 Thread Neil Armstrong
Migrate the dw_rockchip driver to use the common DW PCIe helpers. Signed-off-by: Neil Armstrong --- drivers/pci/Kconfig| 2 +- drivers/pci/pcie_dw_rockchip.c | 472 ++--- 2 files changed, 30 insertions(+), 444 deletions(-) diff --git a/drivers/pci/Kconf

[PATCH RFT 2/4] pci: pcie_dw_ti: migrate to common Designware PCIe functions

2021-03-22 Thread Neil Armstrong
Migrate the dw_ti driver to use the common DW PCIe helpers. Signed-off-by: Neil Armstrong --- drivers/pci/Kconfig | 1 + drivers/pci/pcie_dw_ti.c | 444 --- 2 files changed, 38 insertions(+), 407 deletions(-) diff --git a/drivers/pci/Kconfig b/drivers/

[PATCH RFT 1/4] pci: add common Designware PCIe functions

2021-03-22 Thread Neil Armstrong
With the introduction of pcie_dw_rockchip, and need to support the DW PCIe in the Amlogic AXG & G12 SoCs, most of the DW PCIe helpers would be duplicated. This introduce a "common" DW PCIe helpers file with common code merged from the dw_ti and dw_rockchip drivers and adapted to fit with the upco

[PATCH RFT 0/4] pci: add common Designware PCIe functions and support Amlogic Meson PCIe controller

2021-03-22 Thread Neil Armstrong
With the introduction of pcie_dw_rockchip, and need to support the DW PCIe in the Amlogic AXG & G12 SoCs, most of the DW PCIe helpers would be duplicated. This introduce a "common" DW PCIe helpers file with common code merged from the dw_ti and dw_rockchip drivers and adapted to fit with the upco