[RFC PATCH 27/28] cli: lil: Add a function to quote values

2021-06-30 Thread Sean Anderson
This allows us to convert lil_values into a form which can be re-parsed. We were already doing this for lists, so we just have to expose the inner loop. Signed-off-by: Sean Anderson --- common/cli_lil.c | 89 1 file changed, 52 insertions(+), 37

[RFC PATCH 26/28] cli: lil: Allocate len even when str is NULL in alloc_value_len

2021-06-30 Thread Sean Anderson
This allows us to reserve some space ahead of time, avoiding another alloc/copy/free. Signed-off-by: Sean Anderson --- common/cli_lil.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/common/cli_lil.c b/common/cli_lil.c index 153c34791b..42659920b5 100644 ---

[RFC PATCH 28/28] cli: lil: Load procs from the environment

2021-06-30 Thread Sean Anderson
When we start up the LIL interpreter, go through every variable and see if it looks like a new procedure. If it does, try and parse it. For the return trip, every time that we create a new procedure, create a new global variable containing that procedure. The end result of this is that procedures

[RFC PATCH 25/28] cli: lil: Always quote items in lil_list_to_value

2021-06-30 Thread Sean Anderson
This function took an argument do_quote which determined whether or not to quote an item. All callers set it to true, so remove it and always quote. Signed-off-by: Sean Anderson --- common/cli_lil.c | 34 ++ include/cli_lil.h | 2 +- 2 files changed, 15 inserti

[RFC PATCH 24/28] cli: lil: Make proc always take 3 arguments

2021-06-30 Thread Sean Anderson
This rewrites proc to always take 3 arguments. It also adds proper error handling. TCL does not allow for anonymous functions to be created with proc. Allowing for a variable number of arguments makes the code much more complex when adding error handling. Since fnc_proc was the last user of lil_un

[RFC PATCH 23/28] cli: lil: Handle OOM for hm_put

2021-06-30 Thread Sean Anderson
hm_put allocates memory, and this can fail. Instead of failing silently, return an error code. This also fixes up callers to handle this error. Signed-off-by: Sean Anderson --- common/cli_lil.c | 47 --- 1 file changed, 32 insertions(+), 15 deletions(

[RFC PATCH 21/28] cli: lil: Add a distinct parsing step

2021-06-30 Thread Sean Anderson
This adds a parser to LIL (as separate from the interpreter). This is necessary to detect syntax errors before evaluating anything. Before this, running a script like echo some message; echo syntax error} would result in "some message" being printed before the error was discovered. This i

[RFC PATCH 22/28] env: Add a priv pointer to hwalk_r

2021-06-30 Thread Sean Anderson
This allows callers of hwalk_r to pass data to their callback. This mirrors e.g. env_attr_walk. Signed-off-by: Sean Anderson --- cmd/nvedit.c | 8 env/callback.c | 4 ++-- env/flags.c | 4 ++-- include/search.h | 2 +- lib/hashtable.c | 5 +++-- 5 files changed, 12 insertio

[RFC PATCH 19/28] cli: lil: Add "symbol" structure

2021-06-30 Thread Sean Anderson
We need a generic structure to hold symbols parsed by the parser. We would also like to re-use existing code as much as possible without rewriting everything. To do this, we hijack the allocators for lil_list and lil_value and have them allocate enough space for a lil_symbol. While we're at it, we

[RFC PATCH 20/28] cli: lil: Add config to enable debug output

2021-06-30 Thread Sean Anderson
This provides an easy way to enable assertions and debug messages. It will also be used to enable tracing features in future patches. Signed-off-by: Sean Anderson --- cmd/Kconfig | 6 ++ common/Makefile | 3 +++ 2 files changed, 9 insertions(+) diff --git a/cmd/Kconfig b/cmd/Kconfig in

[RFC PATCH 18/28] cli: lil: Remove duplicate function bodies

2021-06-30 Thread Sean Anderson
lil_append_val is just lil_append_string with the string and length taken from a struct lil_value. Use lil_append_stringh_len to implement both. Do the same for lil_clone_value. Signed-off-by: Sean Anderson --- common/cli_lil.c | 51 ++-- 1 file chang

[RFC PATCH 17/28] test: Add tests for LIL

2021-06-30 Thread Sean Anderson
This tests several aspects of the parser. These tests are primarily adapted from the *.lil code examples included with upstream LIL. These tests should probably get their own category, especially if I add additional styles of tests. Signed-off-by: Sean Anderson --- Yes, I know checkpatch complain

[RFC PATCH 11/28] cli: lil: Add several helper functions for errors

2021-06-30 Thread Sean Anderson
This adds several helper functions for common error types. This helps keep down code duplication, and also ensures that each of these errors uses the same message. Signed-off-by: Sean Anderson --- common/cli_lil.c | 38 +- 1 file changed, 33 insertions(+), 5

[RFC PATCH 12/28] cli: lil: Check for ctrl-c

2021-06-30 Thread Sean Anderson
Check for ctrl-c in lil_parse. This works out to around every time a function or command is called. We also check at the beginning of lil_eval_expr so that constructs like while {1} {} get interrupted. Since there are no non-trivial commands in that example, lil_parse never gets to its ct

[RFC PATCH 16/28] cli: lil: Convert LIL_ENABLE_RECLIMIT to KConfig

2021-06-30 Thread Sean Anderson
This adds a configuration option to set the recursion limit. I've set it to a (conservative) 1000 by default. In addition, there is an option to turn it off for a very minor space savings and performance increase. Signed-off-by: Sean Anderson --- Do we need this? Perhaps it should default to 0.

[RFC PATCH 15/28] cli: lil: Convert LIL_ENABLE_POOLS to Kconfig

2021-06-30 Thread Sean Anderson
This adds a Kconfig option to enable memory pools for some commonly-created and destroyed LIL structures. There is still some significant code duplication, so perhaps these functions can be refactored further to all use common pool functions. Signed-off-by: Sean Anderson --- cmd/Kconfig |

[RFC PATCH 14/28] cli: lil: Document structures

2021-06-30 Thread Sean Anderson
This documents the major structures of LIL. Signed-off-by: Sean Anderson --- common/cli_lil.c | 100 ++ include/cli_lil.h | 57 ++ 2 files changed, 157 insertions(+) diff --git a/common/cli_lil.c b/common/cli_lil.c index 66e

[RFC PATCH 13/28] cli: lil: Wire up LIL to the rest of U-Boot

2021-06-30 Thread Sean Anderson
This sets the shell to LIL when CONFIG_LIL is enabled. Repeated commands are not supporteed. Neither are partial commands a la Hush's secondary prompt. Setting and getting environmental variables is done through callbacks to assist with testing. Signed-off-by: Sean Anderson --- cmd/Kconfig

[RFC PATCH 09/28] cli: lil: Use error codes

2021-06-30 Thread Sean Anderson
This adds numeric error codes to be used for errors. This makes it easier for code to differentiate between different classes of errors. Some error codes are not used yet, and will be added in future commits. The position argument has been removed for a few reasons: - It doesn't make sense for som

[RFC PATCH 10/28] cli: lil: Add printf-style format helper for errors

2021-06-30 Thread Sean Anderson
This adds a helper for dynamically-created error messages. Signed-off-by: Sean Anderson --- common/cli_lil.c | 43 --- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/common/cli_lil.c b/common/cli_lil.c index 1bdf0e5265..f29c8065d8 100644

[RFC PATCH 08/28] cli: lil: Handle commands with dots

2021-06-30 Thread Sean Anderson
Some commands (such as md, mw, etc) use dot suffixes as options to the command. Therefore, we must ignore anything after a dot when finding commands. Signed-off-by: Sean Anderson --- common/cli_lil.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/common/cli_lil

[RFC PATCH 07/28] cli: lil: Simplify callbacks

2021-06-30 Thread Sean Anderson
We only need the getvar and setvar callbacks for now (to integrate with the environment). So remove all the other callbacks. Instead of allowing callbacks to be set at any time, just set them once in lil_new. Lastly, get rid of the typedefs and use a struct to pass in the callbacks instead. Signed

[RFC PATCH 02/28] cli: Add LIL shell

2021-06-30 Thread Sean Anderson
This is the LIL programming language [1] as originally written by Kostas Michalopoulos . LIL is a stripped-down TCL variant. Many syntax features are very similar to shell: => echo Hello from $stdout Hello from serial,vidconsole LIL supports functions, scoped variables, and comman

[RFC PATCH 05/28] cli: lil: Rename some functions to be more like TCL

2021-06-30 Thread Sean Anderson
Several functions have different names than they do in TCL. To make things easier for those familiar with TCL, rename them to their TCL equivalents. At the moment, this is only done for functions not used by LIL_FULL. Some functions need more substantive work to conform them to TCL. For example, in

[RFC PATCH 06/28] cli: lil: Convert some defines to enums

2021-06-30 Thread Sean Anderson
This converts some defines to enums. This allows them to be documented more easily, and helps the compiler give better errors for switch statements. Signed-off-by: Sean Anderson --- common/cli_lil.c | 44 +++- include/cli_lil.h | 12 +++- 2 files

[RFC PATCH 04/28] cli: lil: Remove most functions by default

2021-06-30 Thread Sean Anderson
This helps reduce the size impact of LIL to approximately that of hush. The builtin functions have been chosen to roughly match the functionality present in hush. In addition, arithmetic is removed from expr to reduce size further. Signed-off-by: Sean Anderson --- cmd/Kconfig | 10 ++

[RFC PATCH 01/28] Add Zlib License

2021-06-30 Thread Sean Anderson
This adds the Zlib License which is compatible with GPLv2 as long as its terms are met. Files originally licensed as Zlib should use the "GPL-2.0+ AND Zlib" SPDX identifier. Signed-off-by: Sean Anderson --- Licenses/README | 1 + Licenses/zlib.txt | 14 ++ 2 files changed, 15 ins

[RFC PATCH 03/28] cli: lil: Replace strclone with strdup

2021-06-30 Thread Sean Anderson
Apparently strdup is not portable, so LIL used its own. Use strdup. Signed-off-by: Sean Anderson --- common/cli_lil.c | 27 --- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/common/cli_lil.c b/common/cli_lil.c index c8c6986fe1..294d79e86e 100644 --- a/co

[RFC PATCH 00/28] cli: Add a new shell

2021-06-30 Thread Sean Anderson
Well, this has been sitting on my hard drive for too long without feedback ("Release early, release often"), so here's the first RFC. This is not ready to merge (see the "Future work" section below), but the shell is functional and at least partially tested. The goal is to have 0 bytes gained over

[PATCH v11 1/2] board: riscv: add openpiton-riscv64 SoC support

2021-06-30 Thread Tianrui Wei
This patch adds openpiton-riscv64 SOC support. In particular, this board supports a standard bootflow through zsbl->u-boot SPL-> opensbi->u-boot proper->Linux. There are separate defconfigs for building u-boot SPL and u-boot proper Signed-off-by: Tianrui Wei Signed-off-by: Jonathan Balkind Revie

[PATCH v11 2/2] mmc: openpiton: add piton_mmc driver

2021-06-30 Thread Tianrui Wei
This commit adds support to piton_mmc driver for OpenPiton-riscv64 This driver has many things set as preconfigured because the hardware automatically configures most of the settings during startup. Signed-off-by: Tianrui Wei Signed-off-by: Jonathan Balkind Reviewed-by: Jaehoon Chung --- drive

[PATCH v11 0/2] Add OpenPiton-riscv64 Board Support

2021-06-30 Thread Tianrui Wei
This patch set is to add OpenPiton board support. Patches are split into several parts: - [PATCH 1/2] add OpenPiton support to mmc driver - [PATCH 2/2] add support for OpenPiton board Description - for mmc driver, it's settings are automatically configured at hardware level. We only need to ex

[PATCH 4/4] NSA310S : Add DM SATA configs

2021-06-30 Thread Tony Dinh
Enable DM SATA, removed IDE driver, and add SATA MV driver. Signed-off-by: Tony Dinh --- include/configs/nsa310s.h | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/configs/nsa310s.h b/include/configs/nsa310s.h index e38c65a485..94f293de90 100644 --- a/include

[PATCH 3/4] NSA310S : Use Ethernet PHY name from device tree

2021-06-30 Thread Tony Dinh
In DM Ethernet, the old "egiga0" name is no longer valid, so replace it with Ethernet PHY name from device tree. Signed-off-by: Tony Dinh --- board/zyxel/nsa310s/nsa310s.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/board/zyxel/nsa310s/nsa310s.c b/board/z

[PATCH 2/4] NSA310S : Add DM USB, DM Ethernet, and DM SATA configs

2021-06-30 Thread Tony Dinh
Convert to Driver Model. - Add DM USB, DM Ethernet, and DM SATA configs to nsa310s_defconfig - Add CONFIG_DEFAULT_DEVICE_TREE to nsa310s_defconfig - Move CONFIG_ENV_SECT_SIZE from board file to nsa310s_defconfig - Add CONFIG_IDENT_STRING, and CONFIG_NET_RANDOM_ETHADDR to nsa310s_defconfig Signed-

[PATCH 1/4] NSA310S : Add device tree DTS for Zyxel NSA310S board

2021-06-30 Thread Tony Dinh
Add device tree kirkwood-nsa310s.dts for Zyxel NSA310S board to convert to Driver Model. Signed-off-by: Tony Dinh --- arch/arm/dts/Makefile | 1 + arch/arm/dts/kirkwood-nsa310s.dts | 318 ++ 2 files changed, 319 insertions(+) create mode 100644 arch/ar

[PATCH 0/4] Zyxel NSA310S NAS : convert to Driver Model.

2021-06-30 Thread Tony Dinh
- Add device tree kirkwood-nsa310s.dts - Add DM_USB, DM_ETH, DM_SATA and associated configs to nsa310s_defconfig - Move some miscellaneous configs from board file to nsa310s_defconfig - Replace old device name "egiga0" with Ethernet PHY name from device tree kirkwood.dtsi - Removed IDE, and add S

Suggestion: When flash is uninitialized, *silently* fall back to default environment

2021-06-30 Thread Zack Weinberg
Consider a boot ROM that looks for u-boot in several places (SPI flash, eMMC flash, etc) and loads the first one it finds, and then u-boot repeats the same search to find its own configuration. If there is _nothing_ on the SPI flash and u-boot and all its configuration is on the eMMC, this will wo

Re: [PATCH v2 1/2] efi_loader: fix set_capsule_result()

2021-06-30 Thread AKASHI Takahiro
On Thu, Jul 01, 2021 at 03:20:48AM +0200, Heinrich Schuchardt wrote: > Am 1. Juli 2021 02:49:09 MESZ schrieb AKASHI Takahiro > : > >NAK. For example, > >On Wed, Jun 30, 2021 at 05:31:15PM +0200, Heinrich Schuchardt wrote: > >> The log category must be LOG_CATEGORY LOGC_EFI. This one above and

Re: [PATCH v2 1/2] efi_loader: fix set_capsule_result()

2021-06-30 Thread Heinrich Schuchardt
Am 1. Juli 2021 02:49:09 MESZ schrieb AKASHI Takahiro : >NAK. > >On Wed, Jun 30, 2021 at 05:31:15PM +0200, Heinrich Schuchardt wrote: >> The log category must be LOG_CATEGORY LOGC_EFI. >> >> efi_set_variable() should be called with EFI_CALL(). Use >> efi_set_variable_int() instead. >> >> A log t

Re: [PATCH v2 1/2] efi_loader: fix set_capsule_result()

2021-06-30 Thread AKASHI Takahiro
NAK. On Wed, Jun 30, 2021 at 05:31:15PM +0200, Heinrich Schuchardt wrote: > The log category must be LOG_CATEGORY LOGC_EFI. > > efi_set_variable() should be called with EFI_CALL(). Use > efi_set_variable_int() instead. > > A log text "Updating ..." if SetVariable() fails does not make sense for

[PATCH 4/5] board: gateworks: venice: add ftd_file env vars on boot

2021-06-30 Thread Tim Harvey
The ftd_file* vars can be used by bootscripts to look for appropriate dtb's Signed-off-by: Tim Harvey --- board/gateworks/venice/imx8mm_venice.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/board/gateworks/venice/imx8mm_venice.c b/board/gateworks/veni

[PATCH 5/5] board: gateworks: venice: remove forced enable of GSC thermal protection

2021-06-30 Thread Tim Harvey
The Gateworks System Controller thermal protection feature will disable the board primary power supply if the on-board temperature sensor reaches 86C. In many cases this could occur before the temperature critical components such as CPU, DRAM, eMMC, and power supplies have reached their max tempera

[PATCH 2/5] board: gateworks: venice: gsc: fix voltage offset

2021-06-30 Thread Tim Harvey
The voltage offset property is in microvolts so must be scaled accordingly. Signed-off-by: Tim Harvey --- board/gateworks/venice/gsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/gateworks/venice/gsc.c b/board/gateworks/venice/gsc.c index 23ad58094c..9a6712ec88 1006

[PATCH 3/5] board: gateworks: venice: display DTB used

2021-06-30 Thread Tim Harvey
Display the DTB file used for U-Boot. Signed-off-by: Tim Harvey --- board/gateworks/venice/imx8mm_venice.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/board/gateworks/venice/imx8mm_venice.c b/board/gateworks/venice/imx8mm_venice.c index 1d51b6ea9b..cb00f532bf 100644

[PATCH 1/5] board: gateworks: venice: gsc: fix typo

2021-06-30 Thread Tim Harvey
Fix typo in error message. Signed-off-by: Tim Harvey --- board/gateworks/venice/gsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/gateworks/venice/gsc.c b/board/gateworks/venice/gsc.c index d2490e6063..23ad58094c 100644 --- a/board/gateworks/venice/gsc.c +++ b/board

[PATCH 9/9] configs: imx8mm_venice_defconfig: add support for gbe switch

2021-06-30 Thread Tim Harvey
The imx8mm-venice-gw7901 board has an I2C connected KSZ9897S GbE switch with an IMX8MM FEC MAC master connected via RGMII_ID. Signed-off-by: Tim Harvey --- configs/imx8mm_venice_defconfig | 4 1 file changed, 4 insertions(+) diff --git a/configs/imx8mm_venice_defconfig b/configs/imx8mm_ven

[PATCH 8/9] arm: dts: imx8mm-venice-gw7901.dts: fix dsa switch configuration

2021-06-30 Thread Tim Harvey
Fix the dsa switch config: - remove the unnecessary phy-mode from the switch itself - added the necessary fixed-link node to the non-cpu ports required for U-Boot DSA Signed-off-by: Tim Harvey --- arch/arm/dts/imx8mm-venice-gw7901.dts | 37 ++- 1 file changed, 36 insert

[PATCH 7/9] net: add support for KSZ9477/KSZ9897/KSZ9567 GbE switch

2021-06-30 Thread Tim Harvey
The Microchip KSZ9477/KSZ9897/KSZ9567 7-Port Gigabit Ethernet Switches support SGMII/RGMII/MII/RMII with register access via SPI, I2C, or MDIO. This driver currently supports I2C register access but SPI or MDIO register access can be easily added at a later time. Tagging is not implemented and in

[PATCH 6/9] net: dsa: enable master promisc mode if available and needed

2021-06-30 Thread Tim Harvey
If ports have their own unique MAC addrs and master has a set_promisc function, call it so that packets will be received for ports. Signed-off-by: Tim Harvey --- net/dsa-uclass.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/net/dsa-uclass.c b/net/dsa-uclass.c index

[PATCH 5/9] net: fec: add set_promisc function

2021-06-30 Thread Tim Harvey
Enabling promiscuous mode is necessary if FEC is the master of a DSA switch driver where each port has their own MAC address. Signed-off-by: Tim Harvey --- drivers/net/fec_mxc.c | 13 + drivers/net/fec_mxc.h | 1 + 2 files changed, 14 insertions(+) diff --git a/drivers/net/fec_mxc.

[PATCH 4/9] net: add set_promisc function to enable/disable Promiscuous mode

2021-06-30 Thread Tim Harvey
Enabling promiscuous mode can be useful for DSA switches where each port has its own MAC address. Signed-off-by: Tim Harvey --- include/net.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/net.h b/include/net.h index b95d6a6f60..cec8c98618 100644 --- a/include/net.h +++ b/include/

[PATCH 3/9] net: fec: set phy_of_node properly for fixed-link phy

2021-06-30 Thread Tim Harvey
If the FEC is connected to a fixed-link (upstream switch port for example) the phy_of_node should be set to the fixed-link node so that speed and other properties can be found properly. In addition fix a typo in the debug string. Signed-off-by: Tim Harvey --- drivers/net/fec_mxc.c | 6 +- 1

[PATCH 2/9] net: fec: use device sequence vs index when fetching fec

2021-06-30 Thread Tim Harvey
When using uclass_get_device* to get the FEC device we need to use device sequence instead of index into UCLASS_ETH. In systems where for example a I2C based DSA switch exists it will probe before the FEC master and its ports will be registered first and have the first indexes yet the FEC's sequenc

[PATCH 1/9] board: gateworks: venice: add imx8mm-gw7901 support

2021-06-30 Thread Tim Harvey
The Gateworks GW7901 is an ARM based single board computer (SBC) featuring: - i.MX8M Mini SoC - LPDDR4 DRAM - eMMC FLASH - SPI FRAM - Gateworks System Controller (GSC) - Atmel ATECC Crypto Authentication - USB 2.0 - Microchip GbE Switch - Multiple multi-protocol RS232/RS485/RS422 Serial po

[PATCH 0/9] Add support for imx8mm-venice-gw7901 and DSA switch

2021-06-30 Thread Tim Harvey
The GW7901 is an IMX8M Mini based board with a KSZ9897 switch hanging off the IMX8M FEC. In order to support a fixed-link connection to a U-Boot DSA switch some changes need to be made to the FEC driver. Additionally, in order to support per-port unique MAC addrs for DSA we must introduce a mecha

Re: [PATCH 1/2] spl: mmc: Factor out eMMC boot partition selection code

2021-06-30 Thread Jaehoon Chung
Hi Marek, On 7/1/21 8:08 AM, Marek Vasut wrote: > Factor out eMMC boot partition selection code into > default_spl_mmc_emmc_boot_partition() function and implement > weak spl_mmc_emmc_boot_partition(), so that architecture or > board code can override the eMMC boot partition selection. > > Signed

[PATCH 2/2] ARM: imx: Pick correct eMMC boot partition from ROM log

2021-06-30 Thread Marek Vasut
In case the iMX8M boot from eMMC boot partition and the primary image is corrupted, the BootROM is capable of starting a secondary image in the other eMMC boot partition as a fallback. However, the BootROM leaves the eMMC BOOT_PARTITION_ENABLE setting as it was, i.e. pointing to the boot partition

[PATCH 1/2] spl: mmc: Factor out eMMC boot partition selection code

2021-06-30 Thread Marek Vasut
Factor out eMMC boot partition selection code into default_spl_mmc_emmc_boot_partition() function and implement weak spl_mmc_emmc_boot_partition(), so that architecture or board code can override the eMMC boot partition selection. Signed-off-by: Marek Vasut Cc: Faiz Abbas Cc: Harald Seiler Cc:

Re: [PATCH] board: ti: j721e: README: Add documentation for eMMC boot

2021-06-30 Thread Tom Rini
On Wed, Jun 30, 2021 at 11:34:29AM +0530, Aswath Govindraju wrote: > Add instructions for flashing eMMC with bootloader images from SD. > > Signed-off-by: Aswath Govindraju > --- > board/ti/j721e/README | 59 +++ > 1 file changed, 59 insertions(+) This r

[PATCH v3 3/3] test/py: rewrite sqfsls command test suite

2021-06-30 Thread Joao Marcos Costa
Add more details to test cases by comparing each expected line with the command's output. Add new test cases: - sqfsls at an empty directory - sqfsls at a sub-directory Signed-off-by: Joao Marcos Costa --- .../test_fs/test_squashfs/test_sqfs_ls.py | 140 +++--- 1 file changed, 12

[PATCH v3 2/3] test/py: rewrite sqfsload command test suite

2021-06-30 Thread Joao Marcos Costa
The previous strategy to know if a file was correctly loaded was to check for how many bytes were read and compare it against the file's original size. Since this is not a good solution, replace it by comparing the checksum of the loaded bytes against the original file's checksum. Add more test cas

[PATCH v3 1/3] test/py: rewrite common tools for SquashFS tests

2021-06-30 Thread Joao Marcos Costa
Remove the previous OOP approach, which was confusing and incomplete. Add more test cases by making SquashFS images with various options, concerning file fragmentation and its compression. Add comments to properly document the code. Signed-off-by: Joao Marcos Costa --- .../test_fs/test_squashfs/

[PATCH v3 0/3] test/py: Rewrite SquashFS commands test suite

2021-06-30 Thread Joao Marcos Costa
Hello, This patch series fixes the following issues: - poor strategy to check if files were properly loaded - wrong quoting style for strings - tests failing at the second run because of a wrong clean-up strategy Finally, it improves: - code overall documentation level, with more comments and bet

Re: Pull request: u-boot-spi/next for next

2021-06-30 Thread Tom Rini
On Wed, Jun 30, 2021 at 05:35:03PM +0530, Jagan Teki wrote: > Hi Tom, > > Please pull this PR for next. > > Summary: > - Cypress s25hl-t/s25hs-t support (Takahiro Kuwano) > > CI: > https://source.denx.de/u-boot/custodians/u-boot-spi/-/pipelines/7979 > > thanks, > Jagan. > > The following cha

Re: [PATCH v10 2/2] mmc: openpiton: add piton_mmc driver

2021-06-30 Thread Jaehoon Chung
On 6/30/21 8:10 PM, Tianrui Wei wrote: > This commit adds support to piton_mmc driver for OpenPiton-riscv64 > This driver has many things set as preconfigured because the hardware > automatically configures most of the settings during startup. > > Signed-off-by: Tianrui Wei > Signed-off-by: Jonat

Building U-Boot for Compulab's imx8mm-cl-iot-gate board

2021-06-30 Thread Fabio Estevam
Hi Paul, I am trying to build U-Boot 2021.07-rc5 for the imx8mm-cl-iot-gate_defconfig target and I am following the imx8mm-evk readme: doc/board/freescale/imx8mm_evk.rst for the build instructions and this is the output: make[1]: Nothing to be done for 'SPL'. BINMAN all Image 'main-section' is

Re: [PATCH v2 2/2] efi_loader: clear OsIndications

2021-06-30 Thread Ilias Apalodimas
Hi Heinrich, > if (IS_ENABLED(CONFIG_EFI_CAPSULE_ON_DISK) && [...] > !IS_ENABLED(CONFIG_EFI_CAPSULE_ON_DISK_EARLY)) > ret = efi_launch_capsules(); > + if (ret != EFI_SUCCESS) > + goto out; > + I think OsIndications should be cleared reagrdless of t

Setting serverip from DHCP server

2021-06-30 Thread Gregory Anders
Hi all, I am running U-Boot on an embedded device that is connected via Ethernet to my workstation. The workstation is running dhcpd and U-Boot is able to successfully obtain an IP address via DHCP from the server. However, the `serverip` environment variable is not being set which prevents U

[RFC PATCH v1] phy: rockchip: add basic rk3328 support to phy-rockchip-inno-usb2.c

2021-06-30 Thread Johan Jonker
The rk3328 uses a usb phy simulair to rk3399 with only 1 instead of 2 usb ports. Reuse existing U-boot driver and add basic rk3328 support to phy-rockchip-inno-usb2.c Signed-off-by: Johan Jonker --- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 29 +++ 1 file changed, 2

[RFC PATCH v1 3/6] arm: dts: rockchip: move mmc aliases to board files

2021-06-30 Thread Johan Jonker
In the Linux DT the recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in environments where UUIDs are not practical. The newly added mmc aliases should be board specific, so move them from the general dtsi to the individual boards. Sort a

[RFC PATCH v1 5/6] rockchip: rk3318: add a95x-z2-rk3318_defconfig file

2021-06-30 Thread Johan Jonker
This commit adds the default configuration file and relevant description for A95X Z2 board Signed-off-by: Johan Jonker --- board/rockchip/evb_rk3328/MAINTAINERS | 6 ++ configs/a95x-z2-rk3318_defconfig | 102 ++ doc/board/rockchip/rockchip.rst | 2 +

[RFC PATCH v1 6/6] arm: dts: rockchip: add rk3318 A95X Z2 board

2021-06-30 Thread Johan Jonker
The rk3318 A95X Z2 boards are sold as TV box. No further documentation is given, but from the dts files extracted it seems that the rk3318 processor is simulair to the rk3328. This dts file contains only the basic nodes that have support in the mainline kernel. Included extra dtsi file for U-boot s

[RFC PATCH v1 4/6] arm: dts: rockchip: move spi0 u-boot, dm-pre-reloc and alias to rk3328 board files

2021-06-30 Thread Johan Jonker
The spi0 node has a common u-boot,dm-pre-reloc property and an alias in rk3328-u-boot.dtsi, so all boards contain this as well in u-boot-tpl.dtb. Clean it up a bit and move it to only boards that use it. Signed-off-by: Johan Jonker --- arch/arm/dts/rk3328-rock64-u-boot.dtsi | 6 ++ arch/arm/

[RFC PATCH v1 2/6] arm: dts: rockchip: remove usb_host0_xhci node from rk3328-u-boot.dtsi

2021-06-30 Thread Johan Jonker
The rk3328.dtsi file was updated with a usbdrd3 node. Remove the usb_host0_xhci node from rk3328-u-boot.dtsi, because it's deprecated now the driver is removed. Add usbdrd3 as place holder in existing dtsi files. Signed-off-by: Johan Jonker --- arch/arm/dts/rk3328-evb-u-boot.dtsi | 2 +-

[RFC PATCH v1 1/6] arm: dts: rockchip: update rk3328.dtsi

2021-06-30 Thread Johan Jonker
In the Linux DT the file rk3328.dtsi has recently had some updates. Update this for U-boot as well. The rk3328 usb3 port has now support in the Linux DT. Rename node names ending on 'gpio' to 'pin' or 'pins'. Signed-off-by: Johan Jonker --- arch/arm/dts/rk3328-evb.dts| 2 +- ar

[RFC PATCH v1 0/6] add rk3318 A95X Z2 board

2021-06-30 Thread Johan Jonker
With a new board from a recent Linux DT the U-boot rk3328.dtsi is in need for an update. Please advise what to do with usb3 regulators, aliases and other stuff that has to change. Also some of the U-boot board files could use some dtbs_check for bogus properties and restyling... ;) rk3328 USB2 a

[PATCH v2] cmd:Elaborate 'blkcache' cmd HELP statement

2021-06-30 Thread opensource . kab
From: Adarsh Babu Kalepalli HELP description is provided for ‘configure’ sub-command of ‘blkcache’. Signed-off-by: Adarsh Babu Kalepalli --- (no changes since v1) cmd/blkcache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/blkcache.c b/cmd/blkcache.c index 25f252

Re: [PATCH 0/3] cmd: setexpr: add fmt format string operation

2021-06-30 Thread Marek Behún
On Wed, 30 Jun 2021 12:17:47 -0400 Sean Anderson wrote: > On 6/29/21 11:13 AM, Wolfgang Denk wrote: > > Dear Sean, > > > > In message <19b6eeea-2aad-972b-aeeb-8959aab17...@gmail.com> you > > wrote: > >> > >> The issue with this is twofold. First, there is no portable way to > >> construct a va

Re: [PATCH V2] spi: Update speed/mode on change

2021-06-30 Thread Tom Rini
On Thu, Jun 10, 2021 at 02:00:00PM +0200, Marek Vasut wrote: > The spi_get_bus_and_cs() may be called on the same bus and chipselect > with different frequency or mode. This is valid usecase, but the code > fails to notify the controller of such a configuration change. Call > spi_set_speed_mode()

Re: [PATCH v2] efi_loader: Improve the parameter check for QueryVariableInfo()

2021-06-30 Thread Heinrich Schuchardt
On 6/30/21 5:49 PM, Masami Hiramatsu wrote: Improve efi_query_variable_info() to check the parameter settings and return correct error code according to the UEFI Specification 2.9, and the Self Certification Test (SCT) II Case Specification, June 2017, chapter 4.1.4 QueryVariableInfo(). Signed-o

Re: [PATCH 0/3] cmd: setexpr: add fmt format string operation

2021-06-30 Thread Sean Anderson
On 6/29/21 11:13 AM, Wolfgang Denk wrote: Dear Sean, In message <19b6eeea-2aad-972b-aeeb-8959aab17...@gmail.com> you wrote: The issue with this is twofold. First, there is no portable way to construct a va_list from C code. So the likely way to do this would be to set an arbitrary limit, and t

Re: [PATCH 1/2] DM_USB: allow building without OF_CONTROL

2021-06-30 Thread Simon Glass
Hi Tom, On Wed, 30 Jun 2021 at 09:49, Tom Rini wrote: > > On Wed, Jun 30, 2021 at 05:31:44PM +0300, Ivaylo Dimitrov wrote: > > Hi, > > > > On 30.06.21 г. 16:33 ч., Tom Rini wrote: > > > On Wed, Jun 30, 2021 at 10:30:20AM +0300, Ivaylo Dimitrov wrote: > > > > Hi, > > > > > > > > On 26.06.21 г. 17:

[PATCH v6 4/5] mtd: spi-nor-ids: Add XTX XT25F128B

2021-06-30 Thread Jon Lin
From: Chris Morgan Adds support for XT25F128B used on Odroid Go Advance. Unfortunately this chip uses a continuation code which I cannot seem to parse, so there are possibly going to be collisions with chips that use the same manufacturer/ID. Signed-off-by: Chris Morgan Signed-off-by: Jon Lin

[PATCH v6 5/5] rockchip: px30: add support for SFC for Odroid Go Advance

2021-06-30 Thread Jon Lin
From: Chris Morgan The Odroid Go Advance uses a Rockchip Serial Flash Controller with an XT25F128B SPI NOR flash chip. This adds support for both. Note that while both the controller and chip support quad mode, only two lines are connected to the chip. Changing the pinctrl to bus2 and setting tx

[PATCH v6 3/5] rockchip: px30: add the serial flash controller

2021-06-30 Thread Jon Lin
From: Chris Morgan Add the serial flash controller to the devicetree for the PX30. Signed-off-by: Chris Morgan Signed-off-by: Jon Lin --- (no changes since v5) Changes in v5: - px30 use "rockchip, sfc" as compatible id arch/arm/dts/px30.dtsi | 38 ++ 1 f

[PATCH v6 2/5] rockchip: px30: Add support for using SFC

2021-06-30 Thread Jon Lin
From: Chris Morgan This patch adds support for setting the correct pin configuration for the Rockchip Serial Flash Controller found on the PX30. Signed-off-by: Chris Morgan Signed-off-by: Jon Lin --- (no changes since v1) arch/arm/mach-rockchip/px30/px30.c | 64 +

[PATCH v6 1/5] spi: rockchip_sfc: add support for Rockchip SFC

2021-06-30 Thread Jon Lin
From: Chris Morgan This patch adds support for the Rockchip serial flash controller found on the PX30 SoC. It should work for versions 3-5 of the SFC IP, however I am only able to test it on v3. This is adapted from the WIP SPI-MEM driver for the SFC on mainline Linux. Note that the main differe

[PATCH v6 0/5] rockchip_sfc: add support for Rockchip SFC

2021-06-30 Thread Jon Lin
Changes in v6: - Fix dma transfer logic - Fix the error of the way to wait for dma transfer finished status Changes in v5: - Support dma transfer - Add CONFIG_IS_ENABLED(CLK) limitation - Support spinand devices - Support SFC ver4 ver5 - Using "rockchip, sfc" as compatible id - Get clock from t

[PATCH 5/6] riscv: dts: add dts for unmatched rev1

2021-06-30 Thread Zong Li
The difference between unmatched rev3 and rev1 is DDR timing, the rev3 uses 1866 MT/s for 16GiB, and rev1 uses 2133 MT/s for 8GiB. Signed-off-by: Zong Li --- arch/riscv/dts/Makefile |2 +- .../fu740-hifive-unmatched-a00-ddr-rev1.dtsi | 1489 + .../dts/h

[PATCH 6/6] board: sifive: support spl multi-dtb on unmatched board

2021-06-30 Thread Zong Li
There are two revisions of unmatched board with different DDR timing, we'd like to support multi-dtb mechanism in SPL, then it selects the right DTB at runtime according to PCB revision in I2C EEPROM. Signed-off-by: Zong Li --- board/sifive/unmatched/spl.c | 28 ++--

[PATCH 4/6] board: sifive: Add an interface to get PCB revision

2021-06-30 Thread Zong Li
There are different DDR parameter settings for different board revisions. Add a new interface to get the PCB revision to determine which DT should be selected at runtime. Signed-off-by: Zong Li --- arch/riscv/include/asm/arch-fu740/eeprom.h| 15 + .../unmatched/hifive-platform-i2c-ee

[PATCH 3/6] riscv: sifive: fu740: Support i2c in spl

2021-06-30 Thread Zong Li
Enable SPL_I2C_SUPPORT for fu740, and add 'u-boot,dm-spl' property in i2c node. Signed-off-by: Zong Li --- arch/riscv/cpu/fu740/Kconfig | 1 + arch/riscv/dts/fu740-c000-u-boot.dtsi | 4 2 files changed, 5 insertions(+) diff --git a/arch/riscv/cpu/fu740/Kconfig b/arch/riscv/cpu/fu7

[PATCH 1/6] board: sifive: unmatched: add initial support for a platform ID EEPROM

2021-06-30 Thread Zong Li
Add initial support for the PCB description EEPROM for SiFive HiFive Unmatched boards. This implementation is refactored based on Paul Walmsley's porting and adopt the suggestions from David Abdurachmanov. Signed-off-by: Paul Walmsley Signed-off-by: David Abdurachmanov Signed-off-by: Zong Li -

[PATCH 2/6] riscv: sifive: fu740: kconfig: Enable support for Opencores I2C controller

2021-06-30 Thread Zong Li
Enable the Opencores I2C controller on FU740 Signed-off-by: Zong Li --- arch/riscv/cpu/fu740/Kconfig | 2 ++ board/sifive/unmatched/Kconfig | 1 + 2 files changed, 3 insertions(+) diff --git a/arch/riscv/cpu/fu740/Kconfig b/arch/riscv/cpu/fu740/Kconfig index 3a5f6e47f5..1dc052ba31 100644 ---

[PATCH 0/6] Support multi-dtb in SPL on Unmatched board

2021-06-30 Thread Zong Li
This patch set contains the support I2C platform EEPROM and multi-dtb mechanism on Unmatched board. There are two revisions of Unmatched with different DDR timing respectively, so we'd like to support multi-dtb in SPL, then it can select the right DTB at runtime according to PCB revision in I2C EEP

Re: [PATCH] armv8: fsl : fix bootcmd and mcinitcmd default value

2021-06-30 Thread Bedel, Alban
On Wed, 2021-06-30 at 12:44 +, Wasim Khan (OSS) wrote: > > > > -Original Message- > > From: Bedel, Alban > > Sent: Wednesday, June 30, 2021 6:03 PM > > To: Priyanka Jain ; Varun Sethi < > > v.se...@nxp.com>; > > Wasim Khan ; Wasim Khan (OSS) > > > > Cc: u-boot@lists.denx.de > > Sub

Re: [PATCH] armv8: fsl : fix bootcmd and mcinitcmd default value

2021-06-30 Thread Bedel, Alban
On Wed, 2021-06-30 at 11:12 +, Priyanka Jain wrote: > > > > -Original Message- > > From: Wasim Khan > > Sent: Friday, June 25, 2021 2:40 PM > > To: Bedel, Alban ; Priyanka Jain > > ; Varun Sethi ; Wasim Khan > > (OSS) > > > > Cc: u-boot@lists.denx.de > > Subject: RE: [PATCH] armv8:

[PATCH v2] efi_loader: Improve the parameter check for QueryVariableInfo()

2021-06-30 Thread Masami Hiramatsu
Improve efi_query_variable_info() to check the parameter settings and return correct error code according to the UEFI Specification 2.9, and the Self Certification Test (SCT) II Case Specification, June 2017, chapter 4.1.4 QueryVariableInfo(). Signed-off-by: Masami Hiramatsu Reported-by: Kazuhiko

Re: [PATCH 1/2] DM_USB: allow building without OF_CONTROL

2021-06-30 Thread Tom Rini
On Wed, Jun 30, 2021 at 05:31:44PM +0300, Ivaylo Dimitrov wrote: > Hi, > > On 30.06.21 г. 16:33 ч., Tom Rini wrote: > > On Wed, Jun 30, 2021 at 10:30:20AM +0300, Ivaylo Dimitrov wrote: > > > Hi, > > > > > > On 26.06.21 г. 17:58 ч., Tom Rini wrote: > > > > On Sat, Jun 26, 2021 at 12:59:21PM +0200,

  1   2   >