[PATCH] Add support for Davicom DM96xx based USB 10/100 ethernet devices

2020-09-12 Thread hyyoxhk
Ported from Linux driver - drivers/net/usb9601.c Signed-off-by: hyyoxhk --- drivers/usb/eth/Kconfig | 8 drivers/usb/eth/Makefile | 1 + 2 files changed, 9 insertions(+) diff --git a/drivers/usb/eth/Kconfig b/drivers/usb/eth/Kconfig index 2f6bfa8e71..8a47ca0ec4 100644 ---

[PATCH] lib: fdt: Fix fdtdec_setup_mem..() conversion to livetree API

2020-09-12 Thread Marek Vasut
Repair incorrectly negated condition in the original patch which broke DT memory node parsing on everything which has more than one DT memory node, e.g. R-Car3. In case multiple valid memory nodes are present in the DT, the original patch would complete parsing cycle for the first memory node,

Re: [PATCH 1/1] cmd/button: return button status

2020-09-12 Thread Tom Rini
On Wed, Sep 02, 2020 at 10:08:26PM +0200, Heinrich Schuchardt wrote: > To make the button command useful in a shell script it should return the > status of the button: > > * 0 (true) - pressed, on > * 1 (false) - not pressed, off > > The button command takes only one argument. Correct maxargs.

Re: [PATCH v4 0/3] binman: Further updates for FIT support

2020-09-12 Thread Samuel Holland
On 9/7/20 3:44 AM, Michal Simek wrote: > Hi Simon, > > On 06. 09. 20 18:39, Simon Glass wrote: >> This series adds support for help messages when binary blobs are missing, >> as well as selecting the default FIT configuration. >> >> It includes the v3 patches from the earlier series that were not

[PATCH 0/3] log: Fix segfault in sandbox when LOG_LEVEL_DEFAULT >= LOGL_DEBUG

2020-09-12 Thread Sean Anderson
Since the syslog feature has been introduced, sandbox no longer boots when LOG_LEVEL_DEFAULT prints cdebug messages. This is because it tries to call net_init before initf_dm. Sean Anderson (3): dev: Disambiguate errors in uclass_find net: Expose some errors generated in net_init log:

[PATCH 2/3] net: Expose some errors generated in net_init

2020-09-12 Thread Sean Anderson
net_init does not always succeed, and there is no existing mechanism to discover errors. This patch allows callers of net_init (such as net_init) to handle errors. The root issue is that eth_get_dev can fail, but net_init_loop doesn't expose that. The ideal way to fix eth_get_dev would be to

[PATCH 3/3] log: syslog: Handle errors in net_init

2020-09-12 Thread Sean Anderson
Since the previous patch, net_init now exposes some errors, so check for them. Signed-off-by: Sean Anderson --- common/log_syslog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/log_syslog.c b/common/log_syslog.c index 149ff5af31..aaa0fcfa48 100644 ---

[PATCH v4 7/9] sunxi: binman: Update FIT component descriptions

2020-09-12 Thread Samuel Holland
Since commit d879616e9e64 ("spl: fit: simplify logic for FDT loading for non-OS boots"), the SPL looks at the "os" properties of FIT images to determine where to append the FDT. The "os" property of the "firmware" image also determines how to execute the next stage of the boot process, as in

[PATCH v4 3/9] spl: fit: Minimally parse OS properties with FIT_IMAGE_TINY

2020-09-12 Thread Samuel Holland
Some boards, specifically 64-bit Allwinner boards (sun50i), are extremely limited on SPL size. One strategy that was used to make space was to remove the FIT "os" property parsing code, because it uses a rather large lookup table. However, this forces the legacy FIT parsing code path, which

[PATCH v4 8/9] binman: Add support for SCP firmware

2020-09-12 Thread Samuel Holland
Add an entry type for a firmware blob for a Sytem Control Processor, given by an entry arg. This firmware is a raw binary blob. Signed-off-by: Samuel Holland --- Makefile | 2 +- tools/binman/etype/scp.py | 19 +++ tools/binman/ftest.py | 7

[PATCH v4 2/9] binman: Only write FDT once per node

2020-09-12 Thread Samuel Holland
Due to an extra level of indentation, the "data" property containing the FDT was being written repeatedly after every other property in the node. Move the block up one level, so the property is added exactly once. Reviewed-by: Simon Glass Signed-off-by: Samuel Holland ---

[PATCH v4 6/9] sunxi: binman: Use a macro for the BL31 load address

2020-09-12 Thread Samuel Holland
This consolidates the SoC-specific part at the top of the file to avoid cluttering it up with preprocessor conditions. Reviewed-by: Simon Glass Signed-off-by: Samuel Holland --- arch/arm/dts/sunxi-u-boot.dtsi | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

Re: [PATCH 4/4] log: Disable the syslog driver by default

2020-09-12 Thread Heinrich Schuchardt
Am 12. September 2020 20:28:50 MESZ schrieb Simon Glass : >This driver interferes with other sandbox tests since it causes log >output >to be interspersed with "No ethernet found." messages. Disable this >driver >by default. > >Enable it for the syslog tests so that they still pass. >

[PATCH v4 9/9] sunxi: binman: Add support for including SCP firmware

2020-09-12 Thread Samuel Holland
Allwinner sun50i SoCs contain an OpenRISC 1000 CPU that functions as a System Control Processor, or SCP. ARM Trusted Firmware (ATF) communicates with the SCP over SCPI to implement the PSCI system suspend, shutdown and reset functionality. Currently, SCP firmware is optional; the system will boot

[PATCH v4 1/9] Makefile: Only define u-boot.itb rule when applicable

2020-09-12 Thread Samuel Holland
If neither CONFIG_SPL_FIT_SOURCE nor CONFIG_USE_SPL_FIT_GENERATOR is enabled, U_BOOT_ITS will be undefined, and attempting to make u-boot.itb will pass invalid arguments to mkimage, causing it to print its help message. Remove the rule in that case, so it is more obvious that u-boot.itb is not

[PATCH v4 5/9] sunxi: binman: Provide a default BL31 filename

2020-09-12 Thread Samuel Holland
Prior to commit 7f7f8aca8257 ("sunxi: Convert 64-bit boards to use binman"), if the BL31 environment variable was not defined, the firmware would be loaded from a file "bl31.bin" in the current directory. Restore that behavior by providing that as the default filename in case no entry arg is

[PATCH v4 0/9] sunxi: binman fixes and SCP firmware support

2020-09-12 Thread Samuel Holland
This is a rework of my previous patch series adding SCP firmware support for system suspend, on top of the binman rewrite of mksunxi_fit_atf.sh. This patch series is based on u-boot-dm/next. - The first two patches apply to binman FIT support generally. - The third patch is unchanged from

[PATCH v4 4/9] sunxi: binman: Fix spacing between nodes

2020-09-12 Thread Samuel Holland
Nodes should have a blank line separating them from sibling nodes and properties. Add the necessary lines. Reviewed-by: Simon Glass Signed-off-by: Samuel Holland --- arch/arm/dts/sunxi-u-boot.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/dts/sunxi-u-boot.dtsi

[PATCH 1/3] dev: Disambiguate errors in uclass_find

2020-09-12 Thread Sean Anderson
There are two cases where uclass_find can return an error. The second is when the uclass has not yet been init'd. The first is when the driver model has not been init'd (or has been only partially init'd) and there is no root uclass driver. If LOG_SYSLOG is enabled and LOG_DEFAULT_LEVEL is set to

Re: Intermittent failure with test_efi_selftest_text_input

2020-09-12 Thread Heinrich Schuchardt
Am 12. September 2020 18:40:17 MESZ schrieb Simon Glass : >Hi Heinrich, > >I am seeing a failure in gitlab every now and then. Here is an example >of a build that failed and then succeeded on retry: > >https://gitlab.denx.de/u-boot/custodians/u-boot-dm/-/jobs/149201 > >Here's the failing trace: >

Re: [PATCH 4/4] log: Disable the syslog driver by default

2020-09-12 Thread Heinrich Schuchardt
Am 12. September 2020 22:24:24 MESZ schrieb Simon Glass : >Hi Heinrich, > >On Sat, 12 Sep 2020 at 14:16, Heinrich Schuchardt >wrote: >> >> Am 12. September 2020 20:28:50 MESZ schrieb Simon Glass >: >> >This driver interferes with other sandbox tests since it causes log >> >output >> >to be

RE: [PATCH] lib: fdt: Fix fdtdec_setup_mem..() conversion to livetree API

2020-09-12 Thread Biju Das
Hi Marek, Thanks for the patch. > -Original Message- > From: U-Boot On Behalf Of Marek Vasut > Sent: 12 September 2020 11:43 > To: u-boot@lists.denx.de > Cc: Marek Vasut ; Michal Simek > ; Simon Glass ; Tom Rini > > Subject: [PATCH] lib: fdt: Fix fdtdec_setup_mem..() conversion to

[PATCH] Add support for Davicom DM96xx based USB 10/100 ethernet devices

2020-09-12 Thread hyyoxhk
Ported from Linux driver - drivers/net/usb9601.c Signed-off-by: hyyoxhk --- drivers/usb/eth/Kconfig | 8 + drivers/usb/eth/Makefile | 1 + drivers/usb/eth/dm9601.c | 521 +++ 3 files changed, 530 insertions(+) create mode 100644 drivers/usb/eth/dm9601.c

Intermittent failure with test_efi_selftest_text_input

2020-09-12 Thread Simon Glass
Hi Heinrich, I am seeing a failure in gitlab every now and then. Here is an example of a build that failed and then succeeded on retry: https://gitlab.denx.de/u-boot/custodians/u-boot-dm/-/jobs/149201 Here's the failing trace: https://pastebin.com/bdu6jmVy Do you have any ideas? Regards,

[PATCH v2 1/2] log: Allow LOG_DEBUG to always enable log output

2020-09-12 Thread Simon Glass
At present if CONFIG_LOG enabled, putting LOG_DEBUG at the top of a file (before log.h inclusion) causes _log() to be executed for every log() call, regardless of the build- or run-time logging level. However there is no guarantee that the log record will actually be displayed. If the current log

[PATCH v2 2/2] lib: Allow hexdump to be used in SPL

2020-09-12 Thread Simon Glass
It is sometimes useful to output hex dumps in SPL. Add a config option to allow this. Signed-off-by: Simon Glass Reviewed-by: Stefan Roese --- Changes in v2: - Leave the Makefile alone as the logic is in the C file lib/Kconfig | 8 1 file changed, 8 insertions(+) diff --git

[PATCH 0/4] log: Fix the syslog spam when running tests

2020-09-12 Thread Simon Glass
At present running some sandbox tests produces unwanted ethernet errors from the syslog driver, e.g.: $ ./u-boot -c "ut bloblist" Running 5 bloblist tests Test: bloblist_test_bad_blob Test: bloblist_test_blob Test: bloblist_test_blob_ensure Failed to allocate e0 bytes size=100, need size=130 No

Re: Intermittent failure with test_efi_selftest_text_input

2020-09-12 Thread Simon Glass
Hi Heinrich, On Sat, 12 Sep 2020 at 14:11, Heinrich Schuchardt wrote: > > Am 12. September 2020 18:40:17 MESZ schrieb Simon Glass : >> >> Hi Heinrich, >> >> I am seeing a failure in gitlab every now and then. Here is an example >> of a build that failed and then succeeded on retry: >> >>

Re: [PATCH 3/4] log: Add a way to enable/disable a log device

2020-09-12 Thread Heinrich Schuchardt
Am 12. September 2020 20:28:49 MESZ schrieb Simon Glass : >At present all log devices are enabled by default. Add a function to >allow >devices to be disabled or enabled at runtime. Should this capability be added to the log command? Regards Heinrich > >Signed-off-by: Simon Glass >--- > >

Re: [PATCH 4/4] log: Disable the syslog driver by default

2020-09-12 Thread Simon Glass
Hi Heinrich, On Sat, 12 Sep 2020 at 14:16, Heinrich Schuchardt wrote: > > Am 12. September 2020 20:28:50 MESZ schrieb Simon Glass : > >This driver interferes with other sandbox tests since it causes log > >output > >to be interspersed with "No ethernet found." messages. Disable this > >driver >

Re: [PATCH] RFC: tegra: xhci: Allocate from non-cached memory

2020-09-12 Thread Marek Vasut
On 9/11/20 9:43 PM, twar...@nvidia.com wrote: > From: Tom Warren > > This fixes the XHCI driver on T210 boards (TX1, Nano). I was seeing > that Set_Address wasn't completing, returning with a Context Parameter > error. Examining the slot context, etc. showed that the correct info was > there in

[PATCH 4/4] log: Disable the syslog driver by default

2020-09-12 Thread Simon Glass
This driver interferes with other sandbox tests since it causes log output to be interspersed with "No ethernet found." messages. Disable this driver by default. Enable it for the syslog tests so that they still pass. Signed-off-by: Simon Glass --- common/log_syslog.c | 1 -

[PATCH 1/4] log: Add a flag to enable log drivers

2020-09-12 Thread Simon Glass
At present there is no way to disable a log driver. But the syslog driver causes (attempted) network traffic in sandbox every time a log message is printed, which is often. Add a flag to enable a log driver. Adjust struct log_device to use a short for next_filter_num so that no more memory is

[PATCH 3/4] log: Add a way to enable/disable a log device

2020-09-12 Thread Simon Glass
At present all log devices are enabled by default. Add a function to allow devices to be disabled or enabled at runtime. Signed-off-by: Simon Glass --- common/log.c | 38 ++ include/log.h | 17 + test/log/log_test.c

[PATCH 2/4] log: Drop #ifdef in log_test

2020-09-12 Thread Simon Glass
This is not needed as the Makefile only builds the file if CONFIG_LOG_TEST is enabled. Drop it. Signed-off-by: Simon Glass --- test/log/log_test.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/log/log_test.c b/test/log/log_test.c index 4245372d65f..fdee5e6757f 100644 ---

[PATCH 4/4] dm: Print device name in dev_xxx() like Linux

2020-09-12 Thread Sean Anderson
This adorns messages generated by dev_xxx() with the device and driver names. It also redirects dev_xxx() to log() when it is available. The names of these functions very roughly take inspiration from Linux, but there is no deeper correlation. Signed-off-by: Sean Anderson ---

[PATCH 2/4] net: mdio: Supply appropriate devices for dev_dgb calls

2020-09-12 Thread Sean Anderson
The name of the device we are working on is `ethdev` and not just `dev`. Signed-off-by: Sean Anderson --- net/mdio-uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mdio-uclass.c b/net/mdio-uclass.c index 66ee2e1976..b5e8e46512 100644 --- a/net/mdio-uclass.c

[PATCH 3/4] dm: Use symbolic constants for log levels in dev_xxx()

2020-09-12 Thread Sean Anderson
This substitutes literal log levels with their symbolic constants. Signed-off-by: Sean Anderson --- include/dm/device_compat.h | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/include/dm/device_compat.h b/include/dm/device_compat.h index

[PATCH 0/4] dm: Print device name in dev_xxx() like Linux

2020-09-12 Thread Sean Anderson
This series adds some additional information to dev_dbg. With this series, and the following options applied in addition to sandbox_defconfig CONFIG_LOGLEVEL=8 CONFIG_LOG=n CONFIG_CMD_LOG=n CONFIG_CMD_TPM=n the output of U-Boot is U-Boot 2020.10-rc4-6-g19b641-dirty (Sep 12 2020 -

[PATCH 1/4] remoteproc: Remove unused function rproc_elf_sanity_check

2020-09-12 Thread Sean Anderson
This function is never used anywhere, and it also tries to log with a nonexistant device. Signed-off-by: Sean Anderson --- drivers/remoteproc/rproc-elf-loader.c | 16 include/remoteproc.h | 13 - 2 files changed, 29 deletions(-) diff --git

Re: [PATCH 0/4] dm: Print device name in dev_xxx() like Linux

2020-09-12 Thread Sean Anderson
On 9/12/20 8:28 PM, Sean Anderson wrote: > This series adds some additional information to dev_dbg. With this series, and > the following options applied in addition to sandbox_defconfig > > CONFIG_LOGLEVEL=8 > CONFIG_LOG=n > CONFIG_CMD_LOG=n > CONFIG_CMD_TPM=n > > the output of U-Boot is > >

[PATCH] ARM: mx6: ddr: Add support for iMX6UL/ULL/SL/SDL

2020-09-12 Thread Marek Vasut
This patch adds support for iMX6UL/ULL/SL/SDL MMDC into the DDR calibration code. The difference between MX6DQ and MX6UL/ULL/SL is that the later SoCs have 2 SDQS registers, just like MX6SX, while the MX6DQ/MX6SDL has 8. Fixes: 4f4c128c65 ("ARM: mx6: ddr: Add support for iMX6SX") Signed-off-by:

Re: [PATCH 3/4] log: Add a way to enable/disable a log device

2020-09-12 Thread Simon Glass
Hi Heinrich, On Sat, 12 Sep 2020 at 14:25, Heinrich Schuchardt wrote: > > Am 12. September 2020 20:28:49 MESZ schrieb Simon Glass : > >At present all log devices are enabled by default. Add a function to > >allow > >devices to be disabled or enabled at runtime. > > Should this capability be

Re: [PATCH 4/4] log: Disable the syslog driver by default

2020-09-12 Thread Simon Glass
Hi Heinrich, On Sat, 12 Sep 2020 at 14:34, Heinrich Schuchardt wrote: > > Am 12. September 2020 22:24:24 MESZ schrieb Simon Glass : > >Hi Heinrich, > > > >On Sat, 12 Sep 2020 at 14:16, Heinrich Schuchardt > >wrote: > >> > >> Am 12. September 2020 20:28:50 MESZ schrieb Simon Glass > >: > >>