Re: [PATCH] linker_list: Fix ll_entry_get alignment

2023-10-01 Thread Sean Anderson
On 10/1/23 21:16, Simon Glass wrote: Hi Sean, On Sat, 30 Sept 2023 at 09:23, Sean Anderson wrote: On 9/30/23 10:36, Sean Anderson wrote: When ll_entry_get is used on a list entry ll_entry_declare'd in the same file, the lack of alignment on the access will override the ll_entry_de

Re: [PATCH v3 0/4] malloc: Reduce size by initializing data at runtime

2023-10-01 Thread Sean Anderson
On 10/1/23 21:16, Simon Glass wrote: Hi Sean, On Thu, 28 Sept 2023 at 08:45, Sean Anderson wrote: In my efforts to get SPL to fit into flash after some changes I made, I noticed that av_ is one of the largest variables in SPL. As it turns out, we can generate it at runtime, and the code is

Re: [PATCH] test: Fix SPL tests not being run

2023-10-02 Thread Sean Anderson
On 10/1/23 15:36, Simon Glass wrote: > Hi Sean, > > On Fri, 29 Sept 2023 at 10:12, Sean Anderson wrote: >> >> On 9/29/23 12:06, Sean Anderson wrote: >> > SPL doesn't have OF_LIVE enabled, so we can only run tests with a flat >> > tree. Don'

Re: [PATCH] test: Fix SPL tests not being run

2023-10-05 Thread Sean Anderson
On 10/2/23 14:56, Simon Glass wrote: > Hi Sean, > > On Mon, 2 Oct 2023 at 08:38, Sean Anderson wrote: >> >> On 10/1/23 15:36, Simon Glass wrote: >> > Hi Sean, >> > >> > On Fri, 29 Sept 2023 at 10:12, Sean Anderson >> > wrote: >&

Re: [PATCH 07/25] tegra: Change #ifdef for nop

2023-10-07 Thread Sean Anderson
On 10/7/23 19:10, Simon Glass wrote: Hi Tom. On Sun, 24 Sept 2023 at 18:43, Tom Rini wrote: On Sun, Sep 24, 2023 at 02:39:25PM -0600, Simon Glass wrote: This code is normally compiled for Tegra, but sandbox can also compile it. We should not use UNIT_TEST as a synonym for SANDBOX, since it

[PATCH] spl: mmc: Fix subsequent calls to spl_mmc_load with CONFIG_BLK

2023-10-07 Thread Sean Anderson
MMC devices do not have uclass platdata containing blk_descs, only their child block devices do. Fortunately, we have a function just for this purpose. This fixes subsequent calls to spl_mmc_load. Fixes: bf28d9a6599 ("spl: mmc: Use correct MMC device when loading image") Signed-of

[PATCH] net: Add option for tracing packets

2023-10-07 Thread Sean Anderson
Add an option to trace all packets send/received. This can be helpful when debugging protocol issues, as the packets can then be imported into wireshark [1] and analyzed further. [1] https://www.wireshark.org/docs/wsug_html_chunked/ChIOImportSection.html Signed-off-by: Sean Anderson

[PATCH] malloc: Enable assertions if UNIT_TEST is enabled

2023-10-07 Thread Sean Anderson
dlmalloc has some sanity checks it performs on free() which can help detect memory corruption. However, they are only enabled if DEBUG is defined before including common.h. Define DEBUG earlier if UNIT_TEST is enabled so that assertions are enabled in sandbox. Signed-off-by: Sean Anderson

Re: [PATCH 07/25] tegra: Change #ifdef for nop

2023-10-09 Thread Sean Anderson
On 10/9/23 11:32, Simon Glass wrote: Hi Sean, On Sat, 7 Oct 2023 at 17:21, Sean Anderson wrote: On 10/7/23 19:10, Simon Glass wrote: Hi Tom. On Sun, 24 Sept 2023 at 18:43, Tom Rini wrote: On Sun, Sep 24, 2023 at 02:39:25PM -0600, Simon Glass wrote: This code is normally compiled for

Re: [PATCH 07/25] tegra: Change #ifdef for nop

2023-10-10 Thread Sean Anderson
On 10/10/23 10:42, Simon Glass wrote: Hi Sean, On Mon, 9 Oct 2023 at 17:40, Sean Anderson wrote: On 10/9/23 11:32, Simon Glass wrote: Hi Sean, On Sat, 7 Oct 2023 at 17:21, Sean Anderson wrote: On 10/7/23 19:10, Simon Glass wrote: Hi Tom. On Sun, 24 Sept 2023 at 18:43, Tom Rini wrote

Re: [PATCH 1/1] fs: fix smh_fs_read_at()

2023-05-18 Thread Sean Anderson
On 5/17/23 06:23, Heinrich Schuchardt wrote: > The return value of smh_flen() is written to size and not to ret. But ret > is checked. We can avoid calling smh_flen() by setting maxsize to LONG_MAX > if it is not set yet. > > Check input parameters. > > Fixes: f676b45151c3 ("fs: Add semihosting f

Re: [PATCH v1] dt-bindings: riscv: deprecate riscv,isa

2023-05-18 Thread Sean Anderson
On 5/18/23 10:06, Conor Dooley wrote: > On Thu, May 18, 2023 at 07:13:15PM +0530, Anup Patel wrote: >> On Thu, May 18, 2023 at 4:02 PM Andrew Jones wrote: >> > On Thu, May 18, 2023 at 09:58:30AM +0100, Conor Dooley wrote: > >> > > - riscv,isa: >> > > -description: >> > > - Identifies th

Re: [PATCH v1 1/2] cmd: bind: Fix driver binding on a device

2021-04-09 Thread Sean Anderson
On 4/9/21 8:05 AM, Patrice CHOTARD wrote: On 4/9/21 1:01 PM, Andy Shevchenko wrote: On Fri, Apr 9, 2021 at 1:32 PM Patrice CHOTARD wrote: On 4/9/21 11:48 AM, Andy Shevchenko wrote: On Fri, Apr 9, 2021 at 12:28 PM Patrice CHOTARD wrote: On 4/9/21 11:16 AM, Andy Shevchenko wrote: On Fri, A

Re: [RFC PATCH v4 1/2] arch: riscv: cpu: Add callback to init each core

2021-04-09 Thread Sean Anderson
On 4/9/21 4:16 AM, Rick Chen wrote: Hi Sean ,Bin From: Bin Meng [mailto:bmeng...@gmail.com] Sent: Tuesday, April 06, 2021 5:16 PM To: Sean Anderson Cc: Green Wan; Rick Jian-Zhi Chen(陳建志); Paul Walmsley; Pragnesh Patel; Bin Meng; Simon Glass; Atish Patra; Leo Yu-Chi Liang(梁育齊); Brad Kim; U

Re: [RFC PATCH v4 1/2] arch: riscv: cpu: Add callback to init each core

2021-04-11 Thread Sean Anderson
ing to the configuration of L2 registers. [1] https://static.dev.sifive.com/FU540-C000-v1.0.pdf Thanks, On Fri, Apr 9, 2021 at 9:18 PM Sean Anderson wrote: On 4/9/21 4:16 AM, Rick Chen wrote: Hi Sean ,Bin From: Bin Meng [mailto:bmeng...@gmail.com] Sent: Tuesday, April 06, 2021 5:16 PM To: Sean Anderson

[PATCH 00/11] clk: k210: Rewrite K210 clock without CCF

2021-04-11 Thread Sean Anderson
5 29856 12624 325605 4f7e5 u-boot This series depends on https://patchwork.ozlabs.org/project/uboot/list/?series=238211 Sean Anderson (11): clk: Allow force setting clock defaults before relocation clk: k210: Rewrite to remove CCF clk: k210: Move pll into the rest of the driv

[PATCH 01/11] clk: Allow force setting clock defaults before relocation

2021-04-11 Thread Sean Anderson
st because of the concerns in the original commit thread about the overhead of repeatedly parsing the device tree. Signed-off-by: Sean Anderson --- drivers/clk/clk-uclass.c | 9 +++-- include/clk.h| 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/drive

[PATCH 04/11] clk: k210: Implement soc_clk_dump

2021-04-11 Thread Sean Anderson
Since we are no longer using CCF we cannot use the default soc_clk_dump. Instead, implement our own. Signed-off-by: Sean Anderson --- drivers/clk/kendryte/clk.c | 68 -- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/drivers/clk/kendryte

[PATCH 05/11] clk: k210: Re-add support for setting rate

2021-04-11 Thread Sean Anderson
n we are using the AISRAM). Signed-off-by: Sean Anderson --- drivers/clk/kendryte/clk.c | 88 +++--- 1 file changed, 83 insertions(+), 5 deletions(-) diff --git a/drivers/clk/kendryte/clk.c b/drivers/clk/kendryte/clk.c index 203d5f741c..cdea3d6f2b 100644 --- a/

[PATCH 03/11] clk: k210: Move pll into the rest of the driver

2021-04-11 Thread Sean Anderson
Now that there no separate PLL driver, we can no longer make the PLL functions static. By moving the PLL driver in with the rest of the clock code, we can make these functions static again. We still keep the pll header for unit testing, but it is pretty reduced. Signed-off-by: Sean Anderson

[PATCH 02/11] clk: k210: Rewrite to remove CCF

2021-04-11 Thread Sean Anderson
wever, there is a small bugfix regarding ACLK. According to the technical reference manual, its mux comes *after* its divider (which is present only for PLL0). This would have required yet another intermediate clock to fix with CCF, but with the new driver it is just 2 lines of code :) Signed-off-by

[PATCH 07/11] clk: k210: Remove bypass driver

2021-04-11 Thread Sean Anderson
This driver no longer serves a purpose now that we have moved away from CCF. Drop it. Signed-off-by: Sean Anderson --- drivers/clk/kendryte/Makefile | 2 +- drivers/clk/kendryte/bypass.c | 273 -- include/kendryte/bypass.h | 31 3 files changed, 1

[PATCH 06/11] clk: k210: Don't set PLL rates if we are already at the correct rate

2021-04-11 Thread Sean Anderson
This speeds up boot by preventing multiple reconfigurations of the PLLs. Signed-off-by: Sean Anderson --- drivers/clk/kendryte/clk.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/clk/kendryte/clk.c b/drivers/clk/kendryte/clk.c index cdea3d6f2b

[PATCH 08/11] clk: k210: Move k210 clock out of its own subdirectory

2021-04-11 Thread Sean Anderson
Now that we have only one clock driver, we don't need to have our own subdirectory. Move the driver back with the rest of the clock drivers. The MAINTAINERS for kendryte pinctrl is also fixed since it has always been wrong. Signed-off-by: Sean Anderson --- MAINTA

[PATCH 10/11] k210: Don't imply CCF

2021-04-11 Thread Sean Anderson
Now that the k210 clock driver does not depend on CCF, we should no longer imply it (and probably should not have in the first place). We can also reduce the pre-relocation malloc arena back to something sensible. Signed-off-by: Sean Anderson --- board/sipeed/maix/Kconfig | 2

[PATCH 11/11] test: Add K210 PLL tests to sandbox defconfigs

2021-04-11 Thread Sean Anderson
This adds the unit test for the K210 PLL to the sandbox defconfigs. Signed-off-by: Sean Anderson --- configs/sandbox64_defconfig| 2 ++ configs/sandbox_defconfig | 2 ++ configs/sandbox_flattree_defconfig | 2 ++ 3 files changed, 6 insertions(+) diff --git a/configs

[PATCH 09/11] k210: dts: Set PLL1 to the same rate as PLL0

2021-04-11 Thread Sean Anderson
Linux has had some stability issues when using AISRAM with a different frequency from SRAM. Mirror their change here now that we relocate into AISRAM. Signed-off-by: Sean Anderson --- arch/riscv/dts/k210.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/dts/k210.dtsi b/arch

[PATCH] checkpatch: Ignore ENOSYS warnings

2021-04-11 Thread Sean Anderson
There are no system calls in U-Boot, but ENOSYS is still allowed (and preferred since 42a2668743 ("dm: core: Document the common error codes")). Silence this warning. Signed-off-by: Sean Anderson Seriies-to: sjg --- .checkpatch.conf | 3 +++ 1 file changed, 3 insertions(+) di

Re: [PATCH] cmd: fs: Use part_get_info_by_dev_and_name_or_num to parse partitions

2021-04-12 Thread Sean Anderson
On 4/12/21 5:44 PM, Tom Rini wrote: > On Tue, Mar 09, 2021 at 03:56:24PM -0500, Sean Anderson wrote: > >> This allows using dev#partlabel syntax. >> >> Signed-off-by: Sean Anderson >> --- >> >> fs/fs.c | 4 ++-- >> 1 file changed, 2 insertio

[PATCH v2 1/3] cmd: fs: Use part_get_info_by_dev_and_name_or_num to parse partitions

2021-04-12 Thread Sean Anderson
This allows using dev#partlabel syntax. Signed-off-by: Sean Anderson --- Changes in v2: - Add stub for when CONFIG_PARTITIONS=n fs/fs.c| 4 ++-- include/part.h | 12 +++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/fs/fs.c b/fs/fs.c index 900928c394

[PATCH v2 2/3] part: Fix bogus return from part_get_info_by_dev_and_name

2021-04-12 Thread Sean Anderson
blk_get_device_by_str returns the device number on success. So we must check if the return was negative to determine an error. Signed-off-by: Sean Anderson --- Changes in v2: - New disk/part.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disk/part.c b/disk/part.c index

[PATCH v2 3/3] test: Add test for partitions

2021-04-12 Thread Sean Anderson
This is technically a library function, but we use MMCs for testing, so it is easier to do it with DM. At the moment, the only block devices in sandbox are MMCs (AFAIK) so we just test with those. Signed-off-by: Sean Anderson --- Changes in v2: - New test/dm/Makefile | 1 + test/dm/part.c

Re: [PATCH] checkpatch: Ignore ENOSYS warnings

2021-04-12 Thread Sean Anderson
On 4/12/21 2:04 PM, Simon Glass wrote: Hi Sean, On Mon, 12 Apr 2021 at 16:22, Sean Anderson wrote: There are no system calls in U-Boot, but ENOSYS is still allowed (and preferred since 42a2668743 ("dm: core: Document the common error codes")). Silence this warning. Signed-of

Re: [RFC PATCH v4 1/2] arch: riscv: cpu: Add callback to init each core

2021-04-12 Thread Sean Anderson
On 4/12/21 10:39 PM, Rick Chen wrote: Hi Green, From: Green Wan [mailto:green@sifive.com] Sent: Monday, April 12, 2021 10:33 AM To: Sean Anderson Cc: Rick Chen; Rick Jian-Zhi Chen(陳建志); Bin Meng; U-Boot Mailing List; Paul Walmsley; Pragnesh Patel; Simon Glass; Atish Patra; Leo Yu-Chi

Re: [RFC PATCH v4 1/2] arch: riscv: cpu: Add callback to init each core

2021-04-12 Thread Sean Anderson
On 4/13/21 12:12 AM, Rick Chen wrote: Hi Sean On 4/12/21 10:39 PM, Rick Chen wrote: Hi Green, From: Green Wan [mailto:green@sifive.com] Sent: Monday, April 12, 2021 10:33 AM To: Sean Anderson Cc: Rick Chen; Rick Jian-Zhi Chen(陳建志); Bin Meng; U-Boot Mailing List; Paul Walmsley; Pragnesh

Re: [PATCH v3] cmd: net: Add the "arp" command

2021-04-13 Thread Sean Anderson
On 4/13/21 11:14 AM, lg...@hotmail.com wrote: From: Joe Xue The command is to query and show mac address of a specific ipAddress. Signed-off-by: Joe Xue --- cmd/Kconfig | 6 ++ cmd/net.c | 37 + doc/usage/arp.rst | 31

Re: [PATCH v3] cmd: net: Add the "arp" command

2021-04-13 Thread Sean Anderson
---

[PATCH v2] checkpatch: Ignore ENOSYS warnings

2021-04-14 Thread Sean Anderson
There are no system calls in U-Boot, but ENOSYS is still allowed (and preferred since 42a2668743 ("dm: core: Document the common error codes")). Silence this warning. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - Removed accidentally-included tag .check

Re: [PATCH v2 3/3] test: Add test for partitions

2021-04-15 Thread Sean Anderson
On 4/14/21 3:37 PM, Simon Glass wrote: > Hi Sean, > > On Mon, 12 Apr 2021 at 23:53, Sean Anderson wrote: >> >> This is technically a library function, but we use MMCs for testing, so >> it is easier to do it with DM. At the moment, the only block devices in >&g

Re: [PATCH 1/2] net: fec: Don't use disabled phys

2021-04-15 Thread Sean Anderson
On 4/8/21 5:10 PM, Sean Anderson wrote: If a phy is disabled, don't use it. This matches Linux's behavior. Signed-off-by: Sean Anderson --- drivers/net/fec_mxc.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/fec_mxc.c b/d

[PATCH v2 1/2] net: fec: Don't use disabled phys

2021-04-15 Thread Sean Anderson
If a phy is disabled, don't use it. This matches Linux's behavior. Signed-off-by: Sean Anderson Reviewed-by: Ramon Fried --- Changes in v2: - Fix debug statement missing a parameter. - Assign phy_of_node only after we determine if the node is available. drivers/net/fec_

[PATCH v2 2/2] net: fec: Only unregister MII bus if we registered it

2021-04-15 Thread Sean Anderson
h phy interfaces") Signed-off-by: Sean Anderson Reviewed-by: Ramon Fried --- (no changes since v1) drivers/net/fec_mxc.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 59f5a14e54..4fd5c01b4a 100644 --- a/d

Re: Do make sense an u-boot installer?

2021-04-15 Thread Sean Anderson
On 4/13/21 1:09 PM, Alberto Planas wrote: > Hi, > > lately I am working on a small script that try to unify and help the > installation of u-boot (and the different assets) into SD cards. > > As I am not knowledge about u-boot, I am starting small and with an use case > that makes sense for my

Re: [RFC PATCH v4 1/2] arch: riscv: cpu: Add callback to init each core

2021-04-16 Thread Sean Anderson
On 4/13/21 9:05 PM, Rick Chen wrote: Hi Sean, On 4/13/21 12:12 AM, Rick Chen wrote: Hi Sean On 4/12/21 10:39 PM, Rick Chen wrote: Hi Green, From: Green Wan [mailto:green@sifive.com] Sent: Monday, April 12, 2021 10:33 AM To: Sean Anderson Cc: Rick Chen; Rick Jian-Zhi Chen(陳建志); Bin

[PATCH] fastboot: Fix overflow when calculating chunk size

2021-04-16 Thread Sean Anderson
If a chunk was larger than 4GiB, then chunk_data_sz would overflow and blkcnt would not be calculated correctly. Upgrade it to a u64 and cast its multiplicands as well. Also fix bytes_written while we're at it. Signed-off-by: Sean Anderson --- lib/image-sparse.c | 12 ++-- 1

Re: [PATCH v2 00/10] spi: dw: Add support for DUAL/QUAD/OCTAL modes

2021-04-19 Thread Sean Anderson
On 4/19/21 3:06 AM, Jagan Teki wrote: On Sat, Apr 3, 2021 at 4:37 AM Sean Anderson wrote: On 4/2/21 7:05 PM, Sean Anderson wrote: This series adds support for enhanced SPI modes. It was tested on a K210 (DWC SSI with QSPI flash). If anyone has a designware device with QSPI flash attached

Re: [PATCH] fastboot: Fix overflow when calculating chunk size

2021-04-19 Thread Sean Anderson
On 4/19/21 12:31 AM, Heiko Schocher wrote: > Hello Sean, > > On 16.04.21 23:58, Sean Anderson wrote: >> If a chunk was larger than 4GiB, then chunk_data_sz would overflow and >> blkcnt would not be calculated correctly. Upgrade it to a u64 and cast >> its mult

Re: Possible USB Mass Storage bug on Xilinx's Zynq

2021-04-19 Thread Sean Anderson
On 4/19/21 9:05 AM, Bruno L. Albrecht wrote: Hello people, it's my first post here, so forgive me if I do something wrong. I'll try to be short and clear. I'm developing on an Avnet PicoZed (based on a Xilinx Zynq SoC) and my objective is to expose the eMMC as a Mass Storage Device over an USB C

Re: [PATCH v3 5/5] test: Add gpio-sysinfo test

2021-04-20 Thread Sean Anderson
On 4/20/21 7:29 AM, Tom Rini wrote: > On Wed, Mar 31, 2021 at 01:50:40PM -0400, Sean Anderson wrote: > >> This adds a test for the gpio-sysinfo driver. >> >> Signed-off-by: Sean Anderson >> Reviewed-by: Simon Glass > > This test no longer passes. Can you p

[PATCH v4 2/5] sysinfo: Use global sysinfo IDs for existing sysinfo drivers

2021-04-20 Thread Sean Anderson
Since 07c9e683a4 ("smbios: Allow a few values to come from sysinfo") there are common global sysinfo IDs. This patch moved existing IDs above SYSINFO_ID_USER. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- (no changes since v3) Changes in v3: - Rework patch to use sjg

[PATCH v4 0/5] sysinfo: Add gpio sysinfo driver

2021-04-20 Thread Sean Anderson
ce in sysinfo_gpio_get_int - Modify sysinfo test to check for detect() ordering. - Refactor driver to take advantage of the uclass detect ordering guarantee. - Reorder includes - Set BOARD_HWVERSION to SYSINFO_ID_REVISION, as they represent the same content. - Use enums instead of defines for sysinfo ids Sean And

[PATCH v4 1/5] dm: gpio: Fix gpio_get_list_count failing with livetree

2021-04-20 Thread Sean Anderson
ve DT") Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- (no changes since v3) Changes in v3: - Fix assuming any nonzero return of dev_count_phandle_with_args was an error. Changes in v2: - Change Fixes tag to the most recent commit touching these lines drivers/gpio/gpio-uclass.c | 6

[PATCH v4 3/5] sysinfo: Require that sysinfo_detect be called before other methods

2021-04-20 Thread Sean Anderson
This has the uclass enforce calling detect() before other methods. This allows drivers to cache information in detect() and perform (cheaper) retrieval in the other accessors. This also modifies the only instance where this sequencing was not followed. Signed-off-by: Sean Anderson Reviewed-by

[PATCH v4 5/5] test: Add gpio-sysinfo test

2021-04-20 Thread Sean Anderson
This adds a test for the gpio-sysinfo driver. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v4: - Enable sysinfo_gpio test for sandbox Changes in v3: - Use SYSINFO_ID_BOARD_MODEL instead of SYSINFO_ID_REVISION Changes in v2: - Reorder includes arch/sandbox/dts

[PATCH v4 4/5] sysinfo: Add gpio-sysinfo driver

2021-04-20 Thread Sean Anderson
This uses the newly-added dm_gpio_get_values_as_int_base3 function to implement a sysinfo device. The revision map is stored in the device tree. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- (no changes since v3) Changes in v3: - Fix assuming nonzero return from

[PATCH] test: Alphabetize dm Makefile

2021-04-20 Thread Sean Anderson
Recently, tests have been added primarily to the end of the dm Makefile. This results in merge conflicts when two people add new tests at the same time. To reduce these conflicts, alphabetize the makefile. Signed-off-by: Sean Anderson --- test/dm/Makefile | 64

Re: [PATCH v2 3/3] test: Add test for partitions

2021-04-22 Thread Sean Anderson
On 4/21/21 3:14 AM, Simon Glass wrote: > Hi Sean, > > On Fri, 16 Apr 2021 at 02:36, Sean Anderson wrote: >> >> >> >> On 4/14/21 3:37 PM, Simon Glass wrote: >> > Hi Sean, >> > >> > On Mon, 12 Apr 2021 at 23:53, Sean Anderson w

Re: [PATCH V2 01/24] phy: nop-phy: Add standard usb-nop-xceiv compat string

2021-04-23 Thread Sean Anderson
le series (on i.MX6ULLEVK with mx6ul_14x14_evk_defconfig): Tested-by: Sean Anderson

Re: [PATCH v2, 1/2] driver: watchdog: reset watchdog in designware_wdt_stop() function

2021-04-27 Thread Sean Anderson
On 4/27/21 10:23 AM, Stefan Roese wrote: > On 27.04.21 10:41, meng...@windriver.com wrote: >> From: MengLi >> >> In uboot command line environment, watchdog is not able to be >> stopped with below commands: >> SOCFPGA_STRATIX10 # wdt dev watchdog@ffd00200 >> SOCFPGA_STRATIX10 # wdt stop >> Ref

Re: [PATCH v3,1/2] driver: watchdog: reset watchdog in designware_wdt_stop() function

2021-04-30 Thread Sean Anderson
n linux kernel, it is also need to reset > watchdog after disable it so that the disable action takes effect. > > Signed-off-by: Meng Li > Reviewed-by: Stefan Roese > Reviewed-by: Sean Anderson I did not review your previous version. Please do not add a "Reviewed-by

[PATCH 0/4] malloc: Enable profiling dlmalloc with valgrind

2021-05-02 Thread Sean Anderson
This series adds support for running valgrind against U-Boot's internal malloc. This allows for much more useful reports to be generated. Sean Anderson (4): Add valgrind headers to U-Boot malloc: Annotate allocator for valgrind doc: sandbox: Document how to run sandbox with val

[PATCH 3/4] doc: sandbox: Document how to run sandbox with valgrind

2021-05-02 Thread Sean Anderson
This documents how to get more detailed results from valgrind made possible by the last two commits. Signed-off-by: Sean Anderson --- doc/arch/sandbox.rst | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/arch/sandbox.rst b/doc/arch/sandbox.rst index

[PATCH 2/4] malloc: Annotate allocator for valgrind

2021-05-02 Thread Sean Anderson
dlmalloc. For this reason, we provide a suppression file which ignores errors ocurring in dlmalloc.c Signed-off-by: Sean Anderson --- common/dlmalloc.c | 29 - common/malloc_simple.c | 10 ++ include/malloc.h | 4 scripts/u-boot.supp| 30

[PATCH 4/4] malloc: Fix sbrk clearing memory after freeing it instead of before

2021-05-02 Thread Sean Anderson
This fixes memory being cleared after releasing it. Instead, clear memory before releasing it. In addition, suppress valgrind warnings about writing to free'd memory. Signed-off-by: Sean Anderson --- common/dlmalloc.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff

Re: [PATCH 3/4] doc: sandbox: Document how to run sandbox with valgrind

2021-05-04 Thread Sean Anderson
On 5/4/21 11:26 AM, Simon Glass wrote: Hi Sean, On Sun, 2 May 2021 at 20:55, Sean Anderson wrote: This documents how to get more detailed results from valgrind made possible by the last two commits. Signed-off-by: Sean Anderson --- doc/arch/sandbox.rst | 14 ++ 1 file

Re: [PATCH 4/4] malloc: Fix sbrk clearing memory after freeing it instead of before

2021-05-04 Thread Sean Anderson
On 5/4/21 11:26 AM, Simon Glass wrote: Hi Sean, On Sun, 2 May 2021 at 20:55, Sean Anderson wrote: This fixes memory being cleared after releasing it. Instead, clear memory before releasing it. In addition, suppress valgrind warnings about writing to free'd memory. Signed-off-by:

Re: [PATCH 00/49] image: Reduce #ifdefs and ad-hoc defines in image code

2021-05-04 Thread Sean Anderson
Hi Tom, On 5/4/21 5:40 PM, Tom Rini wrote: On Mon, May 03, 2021 at 05:10:47PM -0600, Simon Glass wrote: Much of the image-handling code predates the introduction of Kconfig and has quite a few #ifdefs in it. It also uses its own IMAGE_... defines to help reduce the #ifdefs, which is unnecessar

[PATCH v2 0/3] malloc: Enable profiling dlmalloc with valgrind

2021-05-05 Thread Sean Anderson
aring logic - Drop incorrect sbrk patch Sean Anderson (3): Add valgrind headers to U-Boot malloc: Annotate allocator for valgrind doc: sandbox: Document how to run sandbox with valgrind Kconfig | 14 + Licenses/README |1 + Licenses/bzip2-1.0.6.txt|

[PATCH v2 3/3] doc: sandbox: Document how to run sandbox with valgrind

2021-05-05 Thread Sean Anderson
This documents how to get more detailed results from valgrind made possible by the last two commits. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- (no changes since v1) doc/arch/sandbox.rst | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/doc

[PATCH v2 2/3] malloc: Annotate allocator for valgrind

2021-05-05 Thread Sean Anderson
dlmalloc. For this reason, we provide a suppression file which ignores errors ocurring in dlmalloc.c Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - Fix one branch of rEALLOc missing a VALGRING_*_BLOCK call - Add some additional suppressions for cALLOc and rEALLOc

Re: [PATCH v2 01/50] lib: Add memdup()

2021-05-06 Thread Sean Anderson
On 5/6/21 1:41 PM, Simon Glass wrote: > Hi Pratyush, > > On Thu, 6 May 2021 at 10:07, Pratyush Yadav wrote: >> >> On 06/05/21 08:23AM, Simon Glass wrote: >>> Add a function to duplicate a memory region, a little like strdup(). >>> >>> Signed-off-by: Simon Glass >>> --- >>> >>> Changes in v2:

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

2021-05-06 Thread Sean Anderson
Hi Leo, Are you maintaining RISC-V now? Should I be CC-ing you on my series? Can you update MAINTAINERS with this information? Thanks. --Sean On 5/6/21 9:06 PM, Leo Liang wrote: Hi Tom, CI result: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/7400 The following changes s

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

2021-05-06 Thread Sean Anderson
On 5/6/21 9:41 PM, Leo Liang wrote: On Fri, May 07, 2021 at 09:09:43AM +0800, Tom Rini wrote: On Fri, May 07, 2021 at 09:06:33AM +0800, Leo Liang wrote: Hi Tom, CI result: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/7400 The following changes since commit 8ddaf94358975

Re: [PATCH V4 2/2] riscv: board: Support OpenPiton SoC

2021-05-06 Thread Sean Anderson
On 5/5/21 11:42 PM, Tianrui Wei wrote: From: Tianrui Wei Date: Thu, 6 May 2021 11:30:20 +0800 Subject: [PATCH V4 2/2] riscv: board: Support OpenPiton SoC This patch add board support for OpenPiton. Please add some information to the commit message describing the board. Signed-off-by: Tianr

Re: [PATCH V4 1/2] mmc: add OpenPiton mmc support

2021-05-06 Thread Sean Anderson
On 5/5/21 11:40 PM, Tianrui Wei wrote: From: Tianrui Wei Date: Thu, 6 May 2021 11:30:20 +0800 Subject: [PATCH V4 1/2] mmc: add OpenPiton mmc support This patch adds mmc support for OpenPiton. Specifically, some dts bindings were not used because our mmc controller doens't have those configurati

Re: [PATCH V4 1/2] mmc: add OpenPiton mmc support

2021-05-06 Thread Sean Anderson
showed one warning about me not putting my name on the MAINTAINERS file on this patch. Huh. I would have expected checkpatch to catch the variable initialization thing, but I guess it didn't. Many thanks, Tianrui On 5/7/2021 10:43 AM, Sean Anderson wrote: On 5/5/21 11:40 PM, Tianrui W

Re: [PATCH V4 1/2] mmc: add OpenPiton mmc support

2021-05-06 Thread Sean Anderson
On 5/6/21 10:57 PM, Tianrui Wei wrote: Hi Sean, Thanks for reviewing the patches, I'll fix the initialization thing and the tegra_mmc credit :P Please also add a changelog to your next revision. It helps reviewers know what you have fixed. --Sean On 5/7/2021 10:55 AM, Sean And

Re: [PATCH V4 2/2] riscv: board: Support OpenPiton SoC

2021-05-06 Thread Sean Anderson
ndering if there are some specific flags to enable some of the checks? I'm running ./utils/checkpatch.pl this.patch right now. On 5/7/2021 10:32 AM, Sean Anderson wrote: On 5/5/21 11:42 PM, Tianrui Wei wrote: From: Tianrui Wei Date: Thu, 6 May 2021 11:30:20 +0800 Subject: [PATCH V4 2/

Re: [PATCH V4 2/2] riscv: board: Support OpenPiton SoC

2021-05-06 Thread Sean Anderson
On 5/6/21 11:28 PM, Tianrui Wei wrote: On 5/7/2021 11:15 AM, Sean Anderson wrote: On 5/6/21 11:06 PM, Tianrui Wei wrote: Hi Sean, Many thanks again for reviewing our code! We really appreciate it. Will fix the things you're suggesting ;p Though I have a few questions in line i

Re: [PATCH V4 2/2] riscv: board: Support OpenPiton SoC

2021-05-07 Thread Sean Anderson
On 5/6/21 11:48 PM, Tianrui Wei wrote: On 5/7/2021 11:41 AM, Sean Anderson wrote: On 5/6/21 11:28 PM, Tianrui Wei wrote: On 5/7/2021 11:15 AM, Sean Anderson wrote: On 5/6/21 11:06 PM, Tianrui Wei wrote: Hi Sean, Many thanks again for reviewing our code! We really appreciate it. Will fix

Re: [PATCH V4 2/2] riscv: board: Support OpenPiton SoC

2021-05-07 Thread Sean Anderson
On 5/7/21 9:11 AM, Bin Meng wrote: On Fri, May 7, 2021 at 9:03 PM Sean Anderson wrote: On 5/6/21 11:48 PM, Tianrui Wei wrote: On 5/7/2021 11:41 AM, Sean Anderson wrote: On 5/6/21 11:28 PM, Tianrui Wei wrote: On 5/7/2021 11:15 AM, Sean Anderson wrote: On 5/6/21 11:06 PM, Tianrui Wei

Re: [PATCH V4 2/2] riscv: board: Support OpenPiton SoC

2021-05-08 Thread Sean Anderson
On 5/8/21 12:57 AM, Tianrui Wei wrote: Hi Sean, On 5/7/2021 9:03 PM, Sean Anderson wrote: On 5/6/21 11:48 PM, Tianrui Wei wrote: On 5/7/2021 11:41 AM, Sean Anderson wrote: On 5/6/21 11:28 PM, Tianrui Wei wrote: On 5/7/2021 11:15 AM, Sean Anderson wrote: On 5/6/21 11:06 PM, Tianrui Wei

[PATCH] riscv: Fix arch_fixup_fdt always failing without /chosen

2021-05-08 Thread Sean Anderson
ether") Signed-off-by: Sean Anderson --- I have not actually tested this (nor observed the original failure). But this seemed buggy from inspection. arch/riscv/lib/fdt_fixup.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/riscv/lib/fdt_fixup.c b/arch

Re: [PATCH] riscv: Fix arch_fixup_fdt always failing without /chosen

2021-05-08 Thread Sean Anderson
On 5/8/21 12:22 PM, Bin Meng wrote: On Sun, May 9, 2021 at 12:13 AM Sean Anderson wrote: If /chosen was missing, chosen_offset would never get updated with the new /chosen node. This would cause fdt_setprop_u32 to fail. This patch fixes this by setting chosen_offset. In addition, log any

Re: [PATCH V4 1/2] mmc: add OpenPiton mmc support

2021-05-08 Thread Sean Anderson
On 5/8/21 1:27 PM, Tianrui Wei wrote: On 5/7/2021 10:59 AM, Sean Anderson wrote: On 5/6/21 10:57 PM, Tianrui Wei wrote: Hi Sean, Thanks for reviewing the patches, I'll fix the initialization thing and the tegra_mmc credit :P Please also add a changelog to your next revision. It

Re: [PATCH 16/17] clk: Detect failure to set defaults

2021-05-08 Thread Sean Anderson
/20210409021313.433558-2-sean...@gmail.com/ Reviewed-by: Sean Anderson

Re: [PATCH v4.1 10/9] spl: Convert NVMe to spl_load

2023-07-27 Thread Sean Anderson
On 7/27/23 11:06, Heinrich Schuchardt wrote: > On 24.07.23 20:09, Sean Anderson wrote: >> This converts the blk load method (used exclusively by NVMe) to use >> spl_load. As a consequence, it also adds support for LOAD_FIT_FULL and >> IMX images. >> >> Signed-of

Re: [PATCH v4 1/9] spl: Add generic spl_load function

2023-07-27 Thread Sean Anderson
On 7/27/23 02:17, Heinrich Schuchardt wrote: > On 7/24/23 19:12, Sean Anderson wrote: >> Implementers of SPL_LOAD_IMAGE_METHOD have to correctly determine what >> type of image is being loaded and then call the appropriate image load >> function correctly. This is tricky, be

Re: [PATCH 1/2] configs: enable SEMIHOSTING on qemu_arm64_defconfig

2023-07-31 Thread Sean Anderson
index 94bd966784..2080f5ee9a 100644 --- a/configs/qemu_arm64_defconfig +++ b/configs/qemu_arm64_defconfig @@ -71,4 +71,5 @@ CONFIG_TPM2_MMIO=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_PCI=y +CONFIG_SEMIHOSTING=y CONFIG_TPM=y Reviewed-by: Sean Anderson

Re: [PATCH 2/2] test: unit test for semihosting

2023-07-31 Thread Sean Anderson
+f'save hostfs - $loadaddr {semihosting_data} 11 11') + +response = u_boot_console.run_command( +f'load hostfs - $loadaddr {semihosting_data} 4 13') +assert '4 bytes read' in response + +response = u_boot_console.run_command( +'crc32 $loadaddr $filesize') +assert '==> e29063ea' in response Reviewed-by: Sean Anderson

[PATCH] arm: Use builtins for ffs/fls

2023-07-31 Thread Sean Anderson
. To work around this, fls/ffs are implemented in assembly for ARMv5 and ARMv6 when compiling U-Boot in Thumb mode. Overall, this saves around 75 bytes per call. Signed-off-by: Sean Anderson --- I only tested this on ARMv8. If someone has an ARMv5 or ARMv6 board, please test this. arch/arm/include

Re: [PATCH] arm: Use builtins for ffs/fls

2023-07-31 Thread Sean Anderson
On 7/31/23 17:36, Tom Rini wrote: On Mon, Jul 31, 2023 at 05:27:33PM -0400, Sean Anderson wrote: Since ARMv5, the clz instruction allows for efficient implementation of ffs/fls with builtins. Until ARMv7 (with Thumb-2), this instruction is only available in ARM mode. LTO makes it difficult

Re: [PATCH] arm: Use builtins for ffs/fls

2023-07-31 Thread Sean Anderson
On 7/31/23 17:27, Sean Anderson wrote: Since ARMv5, the clz instruction allows for efficient implementation of ffs/fls with builtins. Until ARMv7 (with Thumb-2), this instruction is only available in ARM mode. LTO makes it difficult to force specific functions to be in ARM mode, as it is

[PATCH 2/3] malloc: Don't statically initialize av_ if using malloc_init

2023-07-31 Thread Sean Anderson
ename/reword the Kconfig to better describe what this option does. Signed-off-by: Sean Anderson --- Kconfig | 18 +++--- common/dlmalloc.c | 9 +++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Kconfig b/Kconfig index 70efb41cc6..4b32286b69 100644

[PATCH 3/3] malloc: Enable SYS_MALLOC_RUNTIME_INIT by default in SPL

2023-07-31 Thread Sean Anderson
On boards with size restrictions, 1-2k can be a significant fraction of the binary size. Add a new SPL version of SYS_MALLOC_RUNTIME_INIT and enable it by default. Signed-off-by: Sean Anderson --- Kconfig | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Kconfig b/Kconfig index

[PATCH 1/3] malloc: Don't use ifdefs for SYS_MALLOC_DEFAULT_TO_INIT

2023-07-31 Thread Sean Anderson
With CONFIG_IS_ENABLED we can eliminate some ifdefs. Signed-off-by: Sean Anderson --- common/dlmalloc.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/common/dlmalloc.c b/common/dlmalloc.c index 0f9b7262d5..30c78ae976 100644 --- a/common/dlmalloc.c +++ b/common

[PATCH 0/3] malloc: Reduce size by initializing data at runtime

2023-07-31 Thread Sean Anderson
. Sean Anderson (3): malloc: Don't use ifdefs for SYS_MALLOC_DEFAULT_TO_INIT malloc: Don't statically initialize av_ if using malloc_init malloc: Enable SYS_MALLOC_RUNTIME_INIT by default in SPL Kconfig | 27 +-- common/dlmalloc.c | 16 -

[PATCH v5 00/11] spl: Use common function for loading/parsing images

2023-07-31 Thread Sean Anderson
s on bl_mask. - Convert semihosting as well - Consolidate spi_load_image_os into spl_spi_load_image Sean Anderson (11): spl: Make SHOW_ERRORS depend on LIBCOMMON spl: Add generic spl_load function spl: Convert ext to use spl_load spl: Convert fat to spl_load spl: Convert mmc to spl_load spl:

[PATCH v5 01/11] spl: Make SHOW_ERRORS depend on LIBCOMMON

2023-07-31 Thread Sean Anderson
The purpose of SHOW_ERRORS is to print extra information. Make it depend on LIBCOMMON to avoid having to check for two configs. Signed-off-by: Sean Anderson --- Changes in v5: - New common/spl/Kconfig | 1 + common/spl/spl.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v5 02/11] spl: Add generic spl_load function

2023-07-31 Thread Sean Anderson
nt, and warn if we don't end up with something DMA-aligned. Signed-off-by: Sean Anderson Reviewed-by: Stefan Roese --- Changes in v5: - Load the header in spl_load as well - Don't bother trying to DMA-align the buffer, since we can't really fix it. Changes in v4: - Fix for

<    1   2   3   4   5   6   7   8   9   10   >