Re: [PATCH v4 1/2] log: don't show function by default

2020-07-05 Thread Simon Glass
On Wed, 17 Jun 2020 at 13:52, Heinrich Schuchardt wrote: > > The name of the function emitting a log message may be of interest for a > developer but is distracting for normal users. See the example below: > > try_load_entry() Booting: Debian > > Make the default format for log messages

Re: [PATCH v4 2/2] log: use BIT() instead of 1 <

2020-07-05 Thread Simon Glass
Use the BIT() macro when creating a bitmask for the logging fields. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- v4: no change v3: new patch --- common/log_console.c | 14 +++--- common/log_syslog.c | 14 +++--- 2 files changed, 14

Re: [PATCH 2/5] patman: Add a test for the 'possible new uclass' check

2020-07-05 Thread Simon Glass
It is quite likely that the number of U-Boot-specific tests in checkpatch.pl will increase over time. We should have tests for these to avoid undefined behaviour and bugs being introduced, which might cause people to ignore the warnings. Add a simple new class that can generate a patch with a

Re: [PATCH] dm: core: Correct comment on uclass_id_foreach_dev()

2020-07-05 Thread Simon Glass
On Sun, Jun 14, 2020 at 4:49 PM Simon Glass wrote: > > This parameter should be a struct uclass, not struct udevice. Correct it. > > Signed-off-by: Simon Glass > --- > > include/dm/uclass.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Applied to u-boot-dm/next, thanks!

Re: [PATCH 1/5] patman: Rename test.py to test_checkpatch.py

2020-07-05 Thread Simon Glass
These tests check checkpatch.pl operation and can server as our tests for the U-Boot-specific updates to that script. Rename the file and update comments to indicate this. Signed-off-by: Simon Glass --- tools/patman/main.py | 4 ++-- tools/patman/{test.py =>

Re: [PATCH v4 11/14] dm: doc: update of-plat with new phandle support

2020-07-05 Thread Simon Glass
On Wed, 24 Jun 2020 at 22:11, Walter Lozano wrote: > > Update documentation to reflect the new phandle support when OF_PLATDATA > is used. Now phandles are implemented as pointers to U_BOOT_DEVICE, > which makes it possible to get a pointer to the actual device. > > Signed-off-by: Walter Lozano

Re: [PATCH 1/1] sandbox: spi: sandbox_sf_state_name() is required

2020-07-05 Thread Simon Glass
On Sun, 7 Jun 2020 at 01:28, Heinrich Schuchardt wrote: > > Compiling drivers/mtd/spi/sandbox.c fails when compiled with > CONFIG_LOG=n: > > In file included from include/common.h:20, > from drivers/mtd/spi/sandbox.c:13: > drivers/mtd/spi/sandbox.c:295:15: error: format ā€˜%sā€™

Re: [PATCH 3/5] patman: Decode output from the '--show-types' option

2020-07-05 Thread Simon Glass
Collect the 'checkpatch type' from each error, warning and check. Provide this to patman and update the uclass test to use it. Signed-off-by: Simon Glass --- tools/patman/checkpatch.py | 24 +++- tools/patman/test_checkpatch.py | 4 ++-- 2 files changed, 17

Re: [PATCH v4 05/14] dtoc: add option to disable warnings

2020-07-05 Thread Simon Glass
On Wed, 24 Jun 2020 at 22:11, Walter Lozano wrote: > > As dtoc now performs checks for valid driver names, when running dtoc > tests several warnings arise as these tests don't use valid driver > names. > > This patch adds an option to disable those warning, which is only > intended for running

[PATCH v3 00/25] x86: Enhance MTRR functionality to support multiple CPUs

2020-07-05 Thread Simon Glass
At present MTRRs are mirrored to the secondary CPUs only once, as those CPUs are started up. But U-Boot may add more MTRRs later, e.g. if it decides that a video console must be set up. This series enhances the x86 multi-processor support to allow MTRRs to be updated at any time. It also updates

[PATCH v3 01/25] x86: mp_init: Switch to livetree

2020-07-05 Thread Simon Glass
Update this code to use livetree calls instead of flat-tree. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/cpu/mp_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/cpu/mp_init.c

[RFC PATCH 16/16] patman: Support listing comments from patchwork

2020-07-05 Thread Simon Glass
While reviewing feedback it is helpful to see the review comments on the command line to check that each has been addressed. Add an option to support that. Update the workflow documentation to describe the new features. Signed-off-by: Simon Glass --- tools/patman/README | 36 +-

[RFC PATCH 15/16] patman: Support updating a branch with review tags

2020-07-05 Thread Simon Glass
It is tedious to add review tags into the local branch and errors can sometimes be made. Add an option to create a new branch with the review tags obtained from patchwork. Signed-off-by: Simon Glass --- tools/patman/README | 17 +++-- tools/patman/control.py | 9 ---

Re: [PATCH] power: regulator: stm32: vrefbuf: fix a possible overshoot when re-enabling

2020-07-05 Thread Jaehoon Chung
On 7/2/20 4:28 PM, Patrice CHOTARD wrote: > Hi Patrick > > On 6/12/20 10:40 AM, Patrick Delaunay wrote: >> From: Fabrice Gasnier >> >> There maybe an overshoot: >> - when disabling, then re-enabling vrefbuf too quickly >> - or upon platform reset as external capacitor maybe slow >> discharging

Re: Pull request for UEFI sub-system for efi-2020-10-rc1

2020-07-05 Thread Tom Rini
On Sat, Jul 04, 2020 at 11:50:01AM +0200, Heinrich Schuchardt wrote: > The following changes since commit bcfe764ee925d0820e82c69ccf75b71d142644c7: > > Merge tag 'efi-2020-07-rc6-2' of > https://gitlab.denx.de/u-boot/custodians/u-boot-efi (2020-06-30 17:15:39 > -0400) > > are available in the

Re: [PATCH v2] i2c: eeprom: Use reg property instead of offset and size

2020-07-05 Thread Heiko Schocher
Hi Michal, Am 17.06.2020 um 05:12 schrieb Simon Glass: Hi Michal, On Tue, 16 Jun 2020 at 07:53, Michal Simek wrote: On 16. 06. 20 15:43, Simon Glass wrote: On Mon, 15 Jun 2020 at 07:41, Michal Simek wrote: Remove adhoc dt binding for fixed-partition definition for i2c eeprom.

Re: [PATCH 04/10] tegra: Convert from ACCESS_ONCE to READ/WRITE_ONCE

2020-07-05 Thread Tom Rini
On Thu, May 14, 2020 at 08:30:03AM -0400, Tom Rini wrote: > In order to update our to a newer version that no > longer provides ACCESS_ONCE() but only READ_ONCE()/WRITE_ONCE() we need > to convert arch/arm/mach-tegra/ivc.c to the other macros. > > Cc: Tom Warren > Signed-off-by: Tom Rini

Re: [PATCH 03/10] Don't start ad-hoc games with -Wno-maybe-initialized

2020-07-05 Thread Tom Rini
On Thu, May 14, 2020 at 08:30:02AM -0400, Tom Rini wrote: > Borrowing from Linux commit 78a5255ffb6a ("Stop the ad-hoc games with > -Wno-maybe-initialized") > move to have maybe-initialized warnings be handled with building with > W=2 instead of playing more guessing games with newer compilers.

Re: [PATCH 01/10] kconfiglib: Update to the 14.1.0 release

2020-07-05 Thread Tom Rini
On Thu, May 14, 2020 at 08:30:00AM -0400, Tom Rini wrote: > A large number of changes have happened upstream since our last sync > in commit 65e05ddc1ae2 ("kconfiglib: Update to the 12.14.0 release"). > > The big motivation for this sync is support for user defined macros > within Kconfig. > >

Re: [PATCH 02/10] kconfig: Add scripts/Kconfig.include from v4.19

2020-07-05 Thread Tom Rini
On Thu, May 14, 2020 at 08:30:01AM -0400, Tom Rini wrote: > As part of re-syncing our Kconfig logic up to v4.19, we had missed > adding this new file that includes helper macros. To quote the upstream > commit e1cfdc0e72fc ("kconfig: add basic helper macros to > scripts/Kconfig.include"): > >

[PATCH] doc: multi-dtb-fit: Remove double underscores

2020-07-05 Thread Fabio Estevam
Remove the incorrect usage of double underscores for the CONFIG_OF_LIST and CONFIG_SPL_OF_LIST symbols. Signed-off-by: Fabio Estevam --- doc/README.multi-dtb-fit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/README.multi-dtb-fit b/doc/README.multi-dtb-fit index

Re: [PATCH v4 1/6] patman: Drop unnecessary import in gitutil

2020-07-05 Thread Simon Glass
The checkpatch module is not used, so drop it. Signed-off-by: Simon Glass Reported-by: Stefan Bosch --- (no changes since v3) Changes in v3: - Split out the gitutil change into a separate patch tools/patman/gitutil.py | 1 - 1 file changed, 1 deletion(-) Applied to u-boot-dm/next, thanks!

Re: [PATCH v4 3/6] patman: Use a dict in gitutil to avoid importing series

2020-07-05 Thread Simon Glass
Only a few members of this class are used and only in a test. To avoid importing the module, convert the test to use a dict. Signed-off-by: Simon Glass Reported-by: Stefan Bosch --- (no changes since v1) tools/patman/gitutil.py | 9 - 1 file changed, 4 insertions(+), 5 deletions(-)

Re: [PATCH 1/1] sandbox: spi: sandbox_sf_state_name() is required

2020-07-05 Thread Simon Glass
On Sun, 7 Jun 2020 at 01:28, Heinrich Schuchardt wrote: > > Compiling drivers/mtd/spi/sandbox.c fails when compiled with > CONFIG_LOG=n: > > In file included from include/common.h:20, > from drivers/mtd/spi/sandbox.c:13: > drivers/mtd/spi/sandbox.c:295:15: error: format ā€˜%sā€™

Re: [PATCH v4 5/6] patman: Avoid importing gitutil in settings

2020-07-05 Thread Simon Glass
Pass this module in so that settings does not need to import it. Signed-off-by: Simon Glass Reported-by: Stefan Bosch --- (no changes since v3) Changes in v3: - Add more patches based on testing on a dusty Ubuntu 14.04 Changes in v2: - Update gitutil as well tools/patman/main.py | 2 +-

Re: [PATCH v4 6/6] patman: Drop import of test_util in test_util

2020-07-05 Thread Simon Glass
This module doesn't need to import itself. It causes problems on very old Python 3 (e.g. 3.4.0). Drop it. Signed-off-by: Simon Glass --- Changes in v4: - Add a new patch to drop import of test_util in test_util - Add a cover letter tools/patman/test_util.py | 1 - 1 file changed, 1

Re: [PATCH v4 2/6] patman: Avoid circular dependency between command and tools

2020-07-05 Thread Simon Glass
This seems to cause problems in some cases. Split the dependency by copying the code to command. Reported-by: Stefan Bosch Signed-off-by: Simon Glass --- (no changes since v1) tools/patman/command.py | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) Applied to u-boot-dm/next,

Re: [PATCH v4 4/6] patman: Pass in maintainer dirs to avoid and import

2020-07-05 Thread Simon Glass
Adjust the get_maintainer module to accept a list of directories to search for the script. This avoids needing to import gitutil. Signed-off-by: Simon Glass Reported-by: Stefan Bosch --- (no changes since v1) tools/patman/get_maintainer.py | 14 +++--- tools/patman/series.py

Re: [PATCH 1/1] log: uclass_get_name() depends on CONFIG_SPL_DM

2020-07-05 Thread Simon Glass
Hi Heinrich, On Mon, 8 Jun 2020 at 10:04, Heinrich Schuchardt wrote: > > If CONFIG_SPL_DM=n and CONFIG_SPL_LOG=y a build error occurs: > > ld.bfd: common/built-in.o: in function `log_get_cat_name': > common/log.c:48: undefined reference to `uclass_get_name' > make[1]: ***

[PATCH v2 5/6] arm: dts: mt8512: add usb related nodes

2020-07-05 Thread Chunfeng Yun
Add usb, usb phy nodes Signed-off-by: Chunfeng Yun --- v2: no changes --- arch/arm/dts/mt8512-bm1-emmc.dts | 10 ++ arch/arm/dts/mt8512.dtsi | 41 +++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git

[PATCH v2 3/6] usb: add USB_SPEED_SUPER_PLUS

2020-07-05 Thread Chunfeng Yun
Add enum USB_SPEED_SUPER_PLUS for USB3.1 Signed-off-by: Chunfeng Yun --- v2: no changes --- include/linux/usb/ch9.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 989a5fc..7d225ee 100644 --- a/include/linux/usb/ch9.h +++

[PATCH v2 0/6] Add support MediaTek USB3 DRD driver

2020-07-05 Thread Chunfeng Yun
These patches introduce the MediaTek USB3 Dual-Role Controller driver. The driver can be configured as Dual-Role Device, Peripheral only and Host only(xHCI) modes, and it's ported from Linux Kernel 5.7-rc1 v2 changes: 1. simplify QMU operations Chunfeng Yun (6): dt-binding: usb: add

[PATCH v2 6/6] configs: mt8512: enable fastboot

2020-07-05 Thread Chunfeng Yun
Enable fastboot to support download image from usb, also enable usb related drivers, such as usb phy etc. Signed-off-by: Chunfeng Yun --- v2: no changes --- configs/mt8512_bm1_emmc_defconfig | 19 +++ 1 file changed, 19 insertions(+) diff --git

[RFC PATCH 01/16] patman: Use test_util to show test results

2020-07-05 Thread Simon Glass
This handles skipped tests correctly, so use it instead of the existing code. Signed-off-by: Simon Glass --- tools/patman/main.py | 8 ++-- tools/patman/test_util.py | 6 +++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/tools/patman/main.py b/tools/patman/main.py

[RFC PATCH 03/16] patman: Add a test that uses gitpython

2020-07-05 Thread Simon Glass
It is convenient to use gitpython to create a real git repo for testing patman's operation. Add a test for this. So far it just checks that patman produces the right number of patches for a branch. Signed-off-by: Simon Glass --- tools/patman/func_test.py | 151

[RFC PATCH 02/16] patman: Move main code out to a control module

2020-07-05 Thread Simon Glass
To make testing easier, move the code out from main into a separate 'control' module and split it into four parts: setup, preparing patches, checking patches and emailing patches. Add comments and fix a few code-style issues while we are here. Signed-off-by: Simon Glass ---

[PATCH v3 25/25] x86: mtrr: Enhance 'mtrr' command to list MTRRs on any CPU

2020-07-05 Thread Simon Glass
Update this command so it can list the MTRRs on a selected CPU. If '-c all' is used, then all CPUs are listed. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) cmd/x86/mtrr.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff

[PATCH v3 23/25] x86: mtrr: Update 'mtrr' to allow setting MTRRs on any CPU

2020-07-05 Thread Simon Glass
Add a -c option to mtrr to allow any CPU to be updated with this command. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner Reviewed-by: Bin Meng --- Changes in v3: - Mention that the CPU number is in hex cmd/x86/mtrr.c | 18 -- 1 file changed, 16 insertions(+), 2

[PATCH v3 20/25] x86: mtrr: Add support for writing to MTRRs on any CPU

2020-07-05 Thread Simon Glass
To enable support for the 'mtrr' command, add a way to perform MTRR operations on selected CPUs. This works by setting up a little 'operation' structure and sending it around the CPUs for action. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner --- (no changes

[PATCH v3 24/25] x86: mp: Add more comments to the module

2020-07-05 Thread Simon Glass
Add a description of how this module works and also some missing function comments. Reviewed-by: Wolfgang Wallner Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v3: - Remove stray asterisk from comments - Drop mention of cpu_map which was handled in a previous patch Changes

[RFC PATCH 04/16] patman: Allow creating patches for another branch

2020-07-05 Thread Simon Glass
Add a -b option to allow patches to be created from a branch other than the current one. Signed-off-by: Simon Glass --- tools/patman/control.py | 13 - tools/patman/func_test.py | 13 +++-- tools/patman/gitutil.py | 19 ++- tools/patman/main.py

[RFC PATCH 06/16] patman: Convert to ArgumentParser

2020-07-05 Thread Simon Glass
Convert from OptionParser to ArgumentParser to match binman. With this we can easily add sub-commands. Signed-off-by: Simon Glass --- tools/patman/control.py | 22 - tools/patman/main.py | 97 tools/patman/settings.py | 10 +++-- 3 files

[RFC PATCH 00/16] RFC: patman: Collect review tags and comments from Patchwork

2020-07-05 Thread Simon Glass
Patman is a useful tool for creating, checking sending out patches. It automates the creation of patches, simplifies checking them and handles cover letters and change logs. However once patches are sent and reviewers add Reviewed-by tags, etc., these must be manually added into the commits using

Re: [PATCH v4 08/14] core: extend struct driver_info to point to device

2020-07-05 Thread Simon Glass
On Wed, 24 Jun 2020 at 22:11, Walter Lozano wrote: > > Currently when creating an U_BOOT_DEVICE entry a struct driver_info > is declared, which contains the data needed to instantiate the device. > However, the actual device is created at runtime and there is no proper > way to get the device

Re: [PATCH 1/1] cmd: fdt: remove CMD_FDT_MAX_DUMP

2020-07-05 Thread Simon Glass
On Fri, 19 Jun 2020 at 11:46, Heinrich Schuchardt wrote: > > When printing the device tree we want to get an output that can be used as > input for the device tree compiler. This requires that we do not write > bogus lines like > > pcie@1000 { > interrupt-map = * 0x4000127c

Re: [PATCH v4 02/14] dtoc: add missing code comments

2020-07-05 Thread Simon Glass
Hi Walter, On Fri, 26 Jun 2020 at 07:18, Walter Lozano wrote: > > Hi Simon, > > On 25/6/20 22:42, Simon Glass wrote: > > On Wed, 24 Jun 2020 at 22:10, Walter Lozano > > wrote: > >> Add missing information about internal class members in order to make > >> the code easier to follow. > >> > >>

Re: [PATCH v4 2/3] test/dm: fdtdec: Corect a typo in dm_test_fdtdec_set_carveout()

2020-07-05 Thread Simon Glass
From: Bin Meng It should be "writable". Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- (no changes since v1) test/dm/fdtdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied to u-boot-dm/next, thanks!

Re: [PATCH v4 1/3] test/dm: fdtdec: Add the missing gd declaration

2020-07-05 Thread Simon Glass
From: Bin Meng Add DECLARE_GLOBAL_DATA_PTR since it is referenced in the test codes. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v4: - drop the first 2 patches that are already applied - rebase against u-boot/next branch test/dm/fdtdec.c | 2 ++ 1 file changed, 2

Re: [PATCH v4 3/3] test/dm: fdtdec: Add tests for fdtdec_add_reserved_memory()

2020-07-05 Thread Simon Glass
From: Bin Meng This adds a test case to test the functionality of the fdtdec API fdtdec_add_reserved_memory(). Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- (no changes since v3) Changes in v3: - correct typo in the comments, and some minor rewording test/dm/fdtdec.c | 69

Re: [PATCH 4/5] patman: Add tests for the rest of the checkpatch checks

2020-07-05 Thread Simon Glass
Finish off the tests for our small collection of checkpatch checks. Signed-off-by: Simon Glass --- tools/patman/test_checkpatch.py | 47 ++--- 1 file changed, 43 insertions(+), 4 deletions(-) Applied to u-boot-dm/next, thanks!

Re: [PATCH 1/1] sandbox: handling out of memory

2020-07-05 Thread Simon Glass
On 6/7/20 4:02 PM, Heinrich Schuchardt wrote: > Am June 7, 2020 1:45:53 PM UTC schrieb Simon Glass : >> Hi Heinrich, >> >> On Thu, 4 Jun 2020 at 11:28, Heinrich Schuchardt >> wrote: >>> >>> assert() only works in debug mode. So checking a successful memory >>> allocation should not use assert().

Re: [PATCH 1/1] sandbox: make RAM size configurable

2020-07-05 Thread Simon Glass
On Sun, 7 Jun 2020 at 10:47, Heinrich Schuchardt wrote: > > Up to now the RAM size of the sandbox is hard coded as 128 MiB. This does > not allow testing the correct handling of addresses outside the 32bit > range. 128 MiB is also rather small when tracing functions where the trace > is written

[PATCH 14/15] net: sun8i-emac: Lower MDIO frequency

2020-07-05 Thread Andre Przywara
When sending a command via the MDIO bus, the Designware MAC expects some bits in the CMD register to describe the clock divider value between the main clock and the MDIO clock. So far we were omitting these bits, resulting in setting "00", which means "/ 16", so ending up with an MDIO frequency of

[PATCH 10/15] net: sun8i_emac: Fix overlong lines

2020-07-05 Thread Andre Przywara
When iterating over all RX/TX buffers, we were using a rather long "idx" control variable, which lead to a nasty overlong line. Replace "idx" with "i" to avoid this. Signed-off-by: Andre Przywara --- drivers/net/sun8i_emac.c | 22 ++ 1 file changed, 10 insertions(+), 12

[PATCH 11/15] net: sun8i_emac: Fix MAC soft reset

2020-07-05 Thread Andre Przywara
The EMAC soft reset routine was subtly broken, using an open coded timeout routine without any actual delay. Remove the unneeded initial reset bit read, and call wait_for_bit_le32() to handle the timeout correctly. Signed-off-by: Andre Przywara --- drivers/net/sun8i_emac.c | 21

[PATCH 12/15] net: sun8i_emac: Simplify and fix error handling for RX

2020-07-05 Thread Andre Przywara
The error handling in recv() is somewhat broken, for instance good_packet isn't really used, and it's hardly readable. Also we try to check for short or too big packets, but those are actually filtered out by the hardware. Simplify the whole routine and improve the error handling: - Bail out

[PATCH 15/15] sunxi: Pine-H64: Explicitly enable PHY regulator

2020-07-05 Thread Andre Przywara
According to the devicetree and the schematic, the 3.3V power rail for the PHY is enabled by GPIO PC16. It's wired as active-high, with a pull-up resistor, so actually works already when the GPIO is in High-Z state. However we should not take any chances and explicitly set the GPIO pin to high,

[PATCH 13/15] net: sun8i-emac: Make internal PHY handling more robust

2020-07-05 Thread Andre Przywara
The current implementation of sun8i_get_ephy_nodes() makes quite some assumptions, in general relying on DT path names is a bad idea. I think the idea of the code was to determine if we are using the internal PHY, for which there are simpler and more robust methods: Rewrite (and rename) the

Re: [PATCH 1/1] sandbox: handling out of memory

2020-07-05 Thread Simon Glass
On 6/7/20 4:02 PM, Heinrich Schuchardt wrote: > Am June 7, 2020 1:45:53 PM UTC schrieb Simon Glass : >> Hi Heinrich, >> >> On Thu, 4 Jun 2020 at 11:28, Heinrich Schuchardt >> wrote: >>> >>> assert() only works in debug mode. So checking a successful memory >>> allocation should not use assert().

[PATCH] Revert "ARM: uniphier: add weird workaround code for LD20"

2020-07-05 Thread Masahiro Yamada
This reverts commit 45f41c134baf5ff1bbf59d33027f6c79884fa4d9. This weird workaround was the best I came up with at that time to boot U-Boot from TF-A. I noticed U-Boot successfully boots on LD20 (i.e. CA72 CPU) by using the latest TF-A. Specifically, since the following TF-A commit, U-Boot runs

[PATCH 00/15] net: sun8i-emac fixes and cleanups

2020-07-05 Thread Andre Przywara
Hi, while looking at several U-Boot network drivers in the past year, I typically compared them to the sun8i-emac driver, as a kind of personal reference. While doing so, I figured that there are quite some things broken in here, and other things are not so nice. This series attempts the fix

[PATCH 02/15] net: sun8i_emac: Don't hand out TX descriptor too early

2020-07-05 Thread Andre Przywara
When initialising the TX DMA descriptors, we mostly chain them up, but of course don't know about any data or its length yet. That means they are still invalid, and the OWN bit should NOT be set yet. In fact when we later tell the MAC about the beginning of the chain, and enable TX DMA in the

[PATCH 04/15] net: sun8i_emac: Remove pointless wrapper functions

2020-07-05 Thread Andre Przywara
Apparently due to copying from some older or converted driver, the sun8i_emac driver contains pointless wrapper functions to bridge between a legacy driver and the driver model. Since sun8i_emac is (and always was) driver model only, there is no reason to have those confusing wrappers. Just

[PATCH 03/15] net: sun8i_emac: Simplify mdio_read/mdio_write functions

2020-07-05 Thread Andre Przywara
When preparing the register value for the MDIO command register, we start with a zeroed register, so there is no need to mask off certain bits before setting them. Simplify the sequence, and rename the variable to a more matching mii_cmd on the way. Also the open-coded time-out routine can be

[PATCH 05/15] net: sun8i_emac: Name magic bits and simplify read-modify-write calls

2020-07-05 Thread Andre Przywara
The EMAC driver contains a lot of magic bits, although the manuals and the Linux driver have all names for them. Define those names and use them when programming the registers. Also this replaces a lot of readl/mask/writel operations with the much easier-to-read setbits_le32() macro.

[PATCH 09/15] net: sun8i_emac: Wrap and simplify cache maintenance operations

2020-07-05 Thread Andre Przywara
To meet the current alignment requirements for our cache maintenance functions, we were explicitly aligning the *arguments* to those calls. This is not only ugly to read, but also wrong, as we need to make sure we are not accidentally stepping on other data. Provide wrapper functions for the

[PATCH 08/15] net: sun8i_emac: Drop unneeded cache invalidation before sending

2020-07-05 Thread Andre Przywara
There is no reason to invalidate a TX descriptor before we are setting it up, as we will only write to a field. Remove the not needed invalidate_dcache_range() call. Signed-off-by: Andre Przywara --- drivers/net/sun8i_emac.c | 3 --- 1 file changed, 3 deletions(-) diff --git

[PATCH 06/15] net: sun8i_emac: Improve cache maintenance on RX descriptor init

2020-07-05 Thread Andre Przywara
Before we initialise the RX descriptors, there is no need to *clean* them from the cache, as we touch them for the first time. However we should cover the case that those buffers contain dirty cache lines, which could be evicted and written back to DRAM any time later, in the worst case *after*

[PATCH 07/15] net: sun8i_emac: Reduce cache maintenance on TX descriptor init

2020-07-05 Thread Andre Przywara
When we initialise the TX descriptors, there is no need yet to clean them all to memory, as they don't contain any data yet. Later we will touch and clean each descriptor anyway. However we tell the MAC about the beginning of the chain, so we have to clean at least the first descriptor, to make it

[PATCH 01/15] net: sun8i-emac: Bail out on PHY error

2020-07-05 Thread Andre Przywara
When phy_startup() returns with an error, because there is no link or the user interrupted the process, we shall stop the _start() routine and return with an error, instead of proceeding anyway. This fixes pointless operations when there is no Ethernet cable connected, for instance.

[PATCH 1/2] spi: Remove unnecessary #ifdefs in header file

2020-07-05 Thread Simon Glass
These prevent use of compile-time checks such as: if (CONFIG_IS_ENABLED(DM_SPI)) since, for example, if CONFIG_SPL_DM_SPI is not enabled then the definitions are not included by spi.h and the C code will not build. The #ifdefs are unnecessary since there are no conflicts with the pre-DM

[PATCH 2/2] x86: apl: Re-enable loading of SPL

2020-07-05 Thread Simon Glass
At present the SPL loader is not included in the TPL image so SPL cannot be loaded. Fix it by including this file for both SPL and TPL. Signed-off-by: Simon Glass Fixes: c87f9ce2273 ("x86: Don't build some unused objects in TPL") --- arch/x86/cpu/apollolake/Makefile | 2 +- 1 file changed, 1

[RFC PATCH 14/16] patman: Support checking for review tags in patchwork

2020-07-05 Thread Simon Glass
Before sending out a new version of a series for review, it is important to add any review tags (e.g. Reviewed-by, Acked-by) collected by patchwork. Otherwise people waste time reviewing the same patch repeatedly, become frustrated and stop reviewing your patches. To help with this, add a new

[RFC PATCH 13/16] patchstream: Support parsing of review snippets

2020-07-05 Thread Simon Glass
Add support for parsing the contents of a patchwork 'patch' web page containing comments received from reviewers. This allows patman to show these comments in a simple 'snippets' format. A snippet is some quoted code plus some unquoted comments below it. Each review is from a unique person/email

[RFC PATCH 12/16] patman: Add a -D option to enable debugging

2020-07-05 Thread Simon Glass
Most users don't want to see traceback errors. Add an option to enable them for debugging. Disable them by default. Signed-off-by: Simon Glass --- tools/patman/main.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/patman/main.py b/tools/patman/main.py index

[RFC PATCH 05/16] patman: Allow skipping patches at the end

2020-07-05 Thread Simon Glass
The -s option allows skipping patches at the top of the branch. Sometimes there are commits at the bottom that need to be skipped. At present it is necessary to count the number of commits and then use -c to tell patman how many to process. Add a -e option to easily skip a number of commits at

[RFC PATCH 07/16] patman: Allow different commands

2020-07-05 Thread Simon Glass
At present patman only does one thing so does not have any comments. We want to add a few more command, so create a sub-parser for the default command ('send'). Signed-off-by: Simon Glass --- tools/patman/main.py | 77 +++- 1 file changed, 41

[RFC PATCH 08/16] patman: Add a 'test' subcommand

2020-07-05 Thread Simon Glass
At present we use --test to indicate that tests should be run. It is better to use a subcommand for list, like binman. Change it and adjust the existing code to fit under a 'send' subcommand, the default. Give this subcommand the same default arguments as the others. Signed-off-by: Simon Glass

[RFC PATCH 10/16] patman: Support collecting response tags in Patchstream

2020-07-05 Thread Simon Glass
Collect response tags such as 'Reviewed-by' while parsing the stream. This allows us to see what tags are present. Add a new 'Fixes' tag also, since this is now quite common. Signed-off-by: Simon Glass --- tools/patman/commit.py | 14 ++ tools/patman/patchstream.py | 21

[RFC PATCH 09/16] patman: Allow disabling 'bright' mode with Print output

2020-07-05 Thread Simon Glass
At present all text is marked bright, which makes it stand out on the terminal. Add a way to disable that, as is done with the Color class. Signed-off-by: Simon Glass --- tools/patman/terminal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/patman/terminal.py

[RFC PATCH 11/16] patman: Allow linking a series with patchwork

2020-07-05 Thread Simon Glass
Add a new Series-link tag to tell patman how to find the series in patchwork. Signed-off-by: Simon Glass --- tools/patman/README | 8 tools/patman/func_test.py | 1 + tools/patman/series.py| 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v2 19/25] x86: mtrr: Update MTRRs on all CPUs

2020-07-05 Thread Simon Glass
Hi Bin, On Sun, 28 Jun 2020 at 02:07, Bin Meng wrote: > > Hi Simon, > > On Mon, Jun 15, 2020 at 1:00 AM Simon Glass wrote: > > > > When the boot CPU MTRRs are updated, perform the same update on all other > > CPUs so they are kept in sync. > > > > This avoids kernel warnings about mismatched

Re: [PATCH v2 15/25] x86: mp: Add iterators for CPUs

2020-07-05 Thread Simon Glass
Hi Bin, On Sun, 28 Jun 2020 at 01:35, Bin Meng wrote: > > Hi Simon, > > On Mon, Jun 15, 2020 at 1:00 AM Simon Glass wrote: > > > > It is convenient to iterate through the CPUs performing work on each one > > and processing the result. Add a few iterator functions which handle this. > > These

Re: [PATCH v2 10/25] x86: mp: Support APs waiting for instructions

2020-07-05 Thread Simon Glass
Hi Bin, On Sun, 28 Jun 2020 at 00:25, Bin Meng wrote: > > Hi Simon, > > On Mon, Jun 15, 2020 at 1:00 AM Simon Glass wrote: > > > > At present the APs (non-boot CPUs) are inited once and then parked ready > > for the OS to use them. However in some cases we want to send new requests > > through,

Re: [PATCH v3 07/15] dt-bindings: memory: ns3: update GIC LPI address

2020-07-05 Thread Simon Glass
Hi Rayagonda, On Sun, 5 Jul 2020 at 12:21, Rayagonda Kokatanur < rayagonda.kokata...@broadcom.com> wrote: > > Hi Simon, > > On Sun, Jul 5, 2020 at 12:20 AM Rayagonda Kokatanur > wrote: > > > > Hi Simon, > > > > On Sat, Jul 4, 2020 at 1:20 PM Rayagonda Kokatanur > > wrote: > > > > > > Hi Simon,

Re: [PATCH v6 2/3] sandbox, test: add test for GPIO_HOG function

2020-07-05 Thread Tom Rini
On Fri, May 22, 2020 at 11:08:58AM +0200, Heiko Schocher wrote: > currently gpio hog function is not tested with "ut dm gpio" > so add some basic tests for gpio hog functionality. > > For this enable GPIO_HOG in sandbox_defconfig, add > in DTS some gpio hog entries, and add testcase in > "ut dm

Re: [PATCH v6 1/3] gpio-uclass.c: save the GPIOD flags also in the gpio descriptor

2020-07-05 Thread Tom Rini
On Fri, May 22, 2020 at 11:08:56AM +0200, Heiko Schocher wrote: > save the GPIOD_ flags also in the gpio descriptor. > > Signed-off-by: Heiko Schocher > Reviewed-by: Patrick Delaunay > Fixes: 788ea834124b ("gpio: add function _dm_gpio_set_dir_flags") > Reviewed-by: Simon Glass > Tested-by:

[PATCH] imx: Add MYiR Tech MYS-6ULX support

2020-07-05 Thread Parthiban Nallathambi
MYS-6ULX is single board computer (SBC) comes with eMMC or NAND based on imx6ULL SoC from NXP and provision for expansion board. This commit adds support only for SBC with NAND. CPU: Freescale i.MX6ULL rev1.1 528 MHz (running at 396 MHz) CPU: Commercial temperature grade (0C to 95C) at 45C

Re: [PATCH 1/1] arm-freescale-mx6sx: Fix imx6sx UART5 wrong iomux register configuration

2020-07-05 Thread Antonio Tessarolo
Hi Fabio, I agree about adding both definitions: this is what I've done now, but the TX label should be changed like you 've pointed out. Thanks Antonio Signed-off-by: Antonio Tessarolo --- arch/arm/include/asm/arch-mx6/mx6sx_pins.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [PATCH 05/10] x86: Convert from ACCESS_ONCE to READ/WRITE_ONCE

2020-07-05 Thread Tom Rini
On Thu, May 14, 2020 at 08:30:04AM -0400, Tom Rini wrote: > In order to update our to a newer version that no > longer provides ACCESS_ONCE() but only READ_ONCE()/WRITE_ONCE() we need > to convert arch/x86/include/asm/atomic.h to the other macros. > > Cc: Simon Glass > Cc: Bin Meng >

Re: [PATCH 08/10] compiler_types.h: Re-introduce CONFIG_OPTIMIZE_INLINING for U-Boot

2020-07-05 Thread Tom Rini
On Thu, May 14, 2020 at 08:30:07AM -0400, Tom Rini wrote: > In the Linux kernel, support for forcing inline functions to be made > inline, rather than allowing the compiler to make its own choice has > been removed. With respect to performance, modern GCC (and Clang) do a > good job at deciding

Re: [PATCH 09/10] compilers: Introduce options for forcing inlining on SPL/TPL

2020-07-05 Thread Tom Rini
On Thu, May 14, 2020 at 08:30:08AM -0400, Tom Rini wrote: > There are cases where when we allow the compiler to decide about making > inline decisions rather than forcing them it can save us space. > > For now, we keep the default values for inlining that we have had > historically. > > Cc:

Re: [PATCH 06/10] socfpga: Mark socfpga_fpga_add() as static inline in the non-FPGA case

2020-07-05 Thread Tom Rini
On Thu, May 14, 2020 at 08:30:05AM -0400, Tom Rini wrote: > Unless we mark the function as 'static inline' it may end up being > non-inlined by the compiled and result in duplicate functions. > > Cc: Marek Vasut > Cc: Simon Goldschmidt > Cc: Ley Foon Tan > Signed-off-by: Tom Rini > Acked-by:

Re: [PATCH 10/10] socfpga: Enable optimized inlining on stratix10

2020-07-05 Thread Tom Rini
On Thu, May 14, 2020 at 08:30:09AM -0400, Tom Rini wrote: > Enable the new CONFIG_OPTIMIZE_INLINING and CONFIG_SPL_OPTIMIZE_INLINING > options for this platform. With gcc-9.2 from kernel.org this saves us > 1784 bytes in U-Boot and 80 bytes in SPL. > > Cc: Marek Vasut > Cc: Chin-Liang See >

Re: [PATCH 07/10] compiler*.h: sync include/linux/compiler*.h with Linux 5.7-rc5

2020-07-05 Thread Tom Rini
On Thu, May 14, 2020 at 08:30:06AM -0400, Tom Rini wrote: > Copy these from Linux v5.7-rc5 tag. > > This brings in some handy new attributes and is otherwise important to > keep in sync. > > We drop the reference to smp_read_barrier_depends() as it is not > relevant on the architectures we

Re: [PATCH] Remove CROSS_COMPILE default from arch/*/config.mk

2020-07-05 Thread Tom Rini
On Tue, May 19, 2020 at 10:32:33AM -0400, Tom Rini wrote: > In order to support the compiler providing information used within > Kconfig itself we cannot have the compiler be determined by > arch/*/config.mk as we will not be able to evaluate that yet. Given > that most documentation tells

Re: [PATCH] kconfig: show compiler version text in the top comment

2020-07-05 Thread Tom Rini
On Mon, May 18, 2020 at 02:48:00PM -0400, Tom Rini wrote: > This is a side-port of commit 21c54b774744 ("kconfig: show compiler > version text in the top comment") from Linux: > > "The kernel configuration phase is now tightly coupled with the compiler > in use. It will be nice to show the

Re: [PATCH] checkpatch.pl: Fully re-sync with v5.7

2020-07-05 Thread Tom Rini
On Tue, Jun 16, 2020 at 10:29:46AM -0400, Tom Rini wrote: > While commit 048a648298b1 ("checkpatch.pl: Update to v5.7") largely > re-syncs us with checkpatch.pl from v5.7 there are a number of things > missing still. Re-copy the script and again take care to keep our > allowed debug prints and

[PATCH v3 21/25] x86: mtrr: Update the command to use the new mtrr calls

2020-07-05 Thread Simon Glass
Use the multi-CPU calls to set the MTRR values. This still supports only the boot CPU for now. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner Reviewed-by: Bin Meng --- (no changes since v2) Changes in v2: - Drop the renamed mtrr_set_valid_() instead of mtrr_set_valid()

[PATCH v3 22/25] x86: mtrr: Restructure so command execution is in one place

2020-07-05 Thread Simon Glass
At present do_mtrr() does the 'list' subcommand at the top and the rest below. Update it to do them all in the same place so we can (in a later patch) add parsing of the CPU number for all subcommands. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner Reviewed-by: Bin Meng --- (no

  1   2   >