Re: [PATCH] arm: dts: socfpga: l2c-310 full line of zeros error @kernel boot

2020-06-14 Thread Nico Becker
Am 12.06.2020 um 22:27 schrieb Dinh Nguyen: On 6/12/20 6:41 AM, Marek Vasut wrote: On 6/12/20 1:04 PM, Nico Becker wrote: Am 12.06.2020 um 07:51 schrieb Nico Becker: Am 11.06.2020 um 03:51 schrieb Tan, Ley Foon: -Original Message- From: Dinh Nguyen Sent: Thursday, June 11, 2020

Re: [PATCH 6/6] checkpatch.pl: Request if() instead #ifdef

2020-06-14 Thread Simon Glass
Hi Akashi, On Sun, 14 Jun 2020 at 20:59, AKASHI Takahiro wrote: > > On Thu, Jun 04, 2020 at 07:39:35PM -0400, Tom Rini wrote: > > On Fri, May 22, 2020 at 04:32:40PM -0600, Simon Glass wrote: > > > > > There is a lot of use of #ifdefs in U-Boot. In an effort reduce this, > > > suggest using the

[PATCH v1 43/43] acpi: Enable ACPI table generation by default on x86

2020-06-14 Thread Simon Glass
This should ideally be used by all x86 boards in U-Boot. Enable it by default. If some boards don't use it, the cost is small. Signed-off-by: Simon Glass --- arch/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/Kconfig b/arch/Kconfig index a11f872938..650bc0dbca 100644 ---

[PATCH v1 42/43] x86: Rename board_final_cleanup() to board_final_init()

2020-06-14 Thread Simon Glass
This function sounds like something that is called when U-Boot is about to jump to Linux. In fact it is an init function. Rename it to reduce confusion. Signed-off-by: Simon Glass --- arch/x86/cpu/coreboot/coreboot.c | 4 ++-- arch/x86/cpu/cpu.c | 8

[PATCH v1 41/43] x86: acpi: Correct the version of the MADT

2020-06-14 Thread Simon Glass
Currently U-Boot implements version 2 but reports version 4. Correct it. Signed-off-by: Simon Glass --- arch/x86/lib/acpi_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index b6ba547b6a..6e3276c6f6 100644 ---

[PATCH v1 40/43] x86: Drop setup_pcat_compatibility()

2020-06-14 Thread Simon Glass
This function does not exist anymore. Drop it from the header file. Signed-off-by: Simon Glass --- arch/x86/include/asm/u-boot-x86.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h index bd3f44014c..d732661f6d 100644

[PATCH v1 38/43] x86: mp: Allow use of mp_run_on_cpus() without MP

2020-06-14 Thread Simon Glass
At present if MP is not enabled (e.g. booting from coreboot) the 'mtrr' command does not work correctly. It is not easy to make it work for all CPUs, since coreboot has halted them and we would need to start them up again, but it is easy enough to make them work on the boot CPU. Update the code

[PATCH v1 39/43] x86: Update the comment about booting for FSP2

2020-06-14 Thread Simon Glass
The comment here applies only to FSP1, so update it. Signed-off-by: Simon Glass --- arch/x86/cpu/start.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S index 01524635e9..4ad515ce08 100644 --- a/arch/x86/cpu/start.S +++ b/arch/x86/cpu/start.S @@

[PATCH v1 36/43] x86: apl: Adjust FSP-M code to avoid hard-coded address

2020-06-14 Thread Simon Glass
Update this code to calculate the address to use, rather than hard-coding it. Obtain the requested stack size from the FSP. Signed-off-by: Simon Glass --- arch/x86/cpu/apollolake/fsp_m.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/cpu/apollolake/fsp_m.c

[PATCH v1 37/43] x86: Store the coreboot table address in global_data

2020-06-14 Thread Simon Glass
At present this information is used to locate and parse the tables but is not stored. Store it so that we can display it to the user, e.g. with the 'bdinfo' command. Signed-off-by: Simon Glass --- arch/x86/cpu/coreboot/tables.c | 8 +++- arch/x86/cpu/i386/cpu.c| 7 ++-

[PATCH v1 35/43] x86: Add debugging to table writing

2020-06-14 Thread Simon Glass
Writing tables is currently pretty opaque. Add a bit of debugging to the process so we can see what tables are written and where they start/end in memory. Signed-off-by: Simon Glass --- arch/x86/lib/tables.c | 38 -- 1 file changed, 28 insertions(+), 10

[PATCH v1 34/43] x86: apl: Fix save/restore of ITSS priorities

2020-06-14 Thread Simon Glass
The FSP-S changes the ITSS priorities. The code that tries to save it before running FSP-S and restore it afterwards does not work as U-Boot relocates in between the save and restore. This means that the driver data saved before relocation is lost and the new driver just sees zeroes. Fix this by

[PATCH v1 33/43] x86: irq: Support flags for acpi_gpe

2020-06-14 Thread Simon Glass
This binding currently has a flags cell but it is not used. Make use of it to create ACPI tables for interrupts. Signed-off-by: Simon Glass --- arch/x86/cpu/acpi_gpe.c | 26 +++ .../interrupt-controller/x86-irq.h| 14 ++ 2 files

[PATCH v1 32/43] pmc: Move common registers to the header file

2020-06-14 Thread Simon Glass
These registers need to be accesses from ACPI code, so move them to the header file. Signed-off-by: Simon Glass --- drivers/power/acpi_pmc/acpi-pmc-uclass.c | 9 - include/power/acpi_pmc.h | 14 ++ 2 files changed, 14 insertions(+), 9 deletions(-) diff

[PATCH v1 30/43] x86: apl: Support set_hide() in p2sb driver

2020-06-14 Thread Simon Glass
Add support for this new method in the driver and in the fsp-s setup. Signed-off-by: Simon Glass --- arch/x86/cpu/apollolake/fsp_s.c | 26 +++--- arch/x86/cpu/intel_common/p2sb.c | 30 ++ 2 files changed, 41 insertions(+), 15 deletions(-) diff

[PATCH v1 29/43] p2sb: Add a method to hide the bus

2020-06-14 Thread Simon Glass
The P2SB bus needs to be hidden in some cases so that it does not get auto-configured by Linux. Add a method for this. Signed-off-by: Simon Glass --- drivers/misc/p2sb-uclass.c | 10 ++ include/p2sb.h | 25 - 2 files changed, 34 insertions(+), 1

[PATCH v1 31/43] x86: apl: Hide the p2sb on exit from U-Boot

2020-06-14 Thread Simon Glass
This confuses Linux's PCI probing so needs to be hidden when booting Linux. Add a remove() method to handle this. Signed-off-by: Simon Glass --- arch/x86/cpu/intel_common/p2sb.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/x86/cpu/intel_common/p2sb.c

[PATCH v1 27/43] i2c: Add log_ret() on error

2020-06-14 Thread Simon Glass
Add a few of these calls to make it easier to see where an error occurs, if CONFIG_LOG_ERROR_RETURN is enabled. Signed-off-by: Simon Glass --- drivers/i2c/i2c-uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c

[PATCH v1 25/43] x86: gpio: Add support for obtaining ACPI info for a GPIO

2020-06-14 Thread Simon Glass
Implement the method that converts a GPIO into the form used by ACPI, so that GPIOs can be added to ACPI tables. Signed-off-by: Simon Glass --- Changes in v1: - Use acpi_get_path() to get device path drivers/gpio/intel_gpio.c | 34 ++ 1 file changed, 34

[PATCH v1 22/43] x86: Add support for building up an NHLT structure

2020-06-14 Thread Simon Glass
The Intel Non-High-Definition-Audio Link Table (NHLT) table describes the audio codecs and connections in a system. Various devices can contribute information to produce the table. Add functions to allow adding to the structure that is eventually written to the ACPI tables. Also add the

[PATCH v1 21/43] x86: pinctrl: Drop the acpi_name member

2020-06-14 Thread Simon Glass
This is in the device tree now, so drop the unnecessary field here. Signed-off-by: Simon Glass --- arch/x86/include/asm/intel_pinctrl.h | 2 -- drivers/pinctrl/intel/pinctrl_apl.c | 4 2 files changed, 6 deletions(-) diff --git a/arch/x86/include/asm/intel_pinctrl.h

[PATCH v1 23/43] x86: Add error checking for csrt table generation

2020-06-14 Thread Simon Glass
Generation of this table can fail, so update the function to return an error code. Signed-off-by: Simon Glass --- Changes in v1: - Add new patch to add error checking for csrt table generation arch/x86/lib/acpi_table.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-)

[PATCH v1 26/43] i2c: designware_i2c: Add a little more debugging

2020-06-14 Thread Simon Glass
Add debugging for a few more values and also use log to show return values when something goes wrong. This makes it easier to see the root cause. Signed-off-by: Simon Glass --- Changes in v1: - Add new patch to improve designware_i2c debugging drivers/i2c/designware_i2c.c | 10 +- 1

[PATCH v1 28/43] i2c: designware_i2c: Support ACPI table generation

2020-06-14 Thread Simon Glass
Update the PCI driver to generate ACPI information so that Linux has the full information about each I2C bus. Signed-off-by: Simon Glass --- Changes in v1: - Capitalise ACPI_OPS_PTR drivers/i2c/designware_i2c.c | 25 drivers/i2c/designware_i2c.h | 15 +

[PATCH v1 17/43] x86: pinctrl: Add a way to get the pinctrl reg address

2020-06-14 Thread Simon Glass
At present we can query the offset of a pinctrl register within the p2sb. For ACPI we need to get the actual address of the register. Add a function to handle this and rename the old one to more accurately reflect its purpose. Signed-off-by: Simon Glass --- arch/x86/include/asm/intel_pinctrl.h

[PATCH v1 24/43] x86: apl: Use memory-mapped access for VBT

2020-06-14 Thread Simon Glass
Use the new binman memory-mapping function to access the VBT, to simplify the code. Signed-off-by: Simon Glass --- arch/x86/cpu/apollolake/fsp_s.c | 19 +-- arch/x86/lib/fsp2/fsp_silicon_init.c | 1 + 2 files changed, 6 insertions(+), 14 deletions(-) diff --git

[PATCH v1 20/43] x86: pinctrl: Set up itss in the probe() method

2020-06-14 Thread Simon Glass
At present the itss is probed in the ofdata_to_platdata() method. This is incorrect since itss is a child of p2sb which itself needs to probe the pinctrl device. This means that p2sb is effectively not probed when the itss is probed, so we get the wrong register address from p2sb. Fix this by

[PATCH v1 16/43] sound: Add an ACPI driver for Maxim MAX98357ac

2020-06-14 Thread Simon Glass
This chip is used on coral and we need to generate ACPI tables for sound to make it work. Add a driver that does just this (i.e. at present does not actually support playing sound). Signed-off-by: Simon Glass --- Changes in v1: - Use acpi,ddn instead of acpi,desc - Drop the unwanted

[PATCH v1 18/43] x86: pinctrl: Update comment for intel_pinctrl_get_pad()

2020-06-14 Thread Simon Glass
Add information about what is returned on error. Signed-off-by: Simon Glass --- arch/x86/include/asm/intel_pinctrl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/intel_pinctrl.h b/arch/x86/include/asm/intel_pinctrl.h index f39ebde539..982b2514a0 100644 ---

[PATCH v1 15/43] sound: Add an ACPI driver for Dialog Semicondutor da7219

2020-06-14 Thread Simon Glass
This chip is used on coral and we need to generate ACPI tables for sound to make it work. Add a driver that does just this (i.e. at present does not actually support playing sound). Signed-off-by: Simon Glass --- Changes in v1: - Use acpi,ddn instead of acpi,desc - Add a check for invalid node

[PATCH v1 19/43] x86: pinctrl: Add multi-ACPI control

2020-06-14 Thread Simon Glass
Add a Kconfig to control whether pinctrl is represented as a single ACPI device or as multiple devices. In the latter case (the default) we should return the pin number relative to the pinctrl device. Signed-off-by: Simon Glass --- drivers/pinctrl/intel/Kconfig | 4

[PATCH v1 13/43] acpi: Support generation of a device

2020-06-14 Thread Simon Glass
Allow writing an ACPI device to the generated ACPI code. Signed-off-by: Simon Glass --- include/acpi/acpigen.h | 9 + lib/acpi/acpigen.c | 7 +++ test/dm/acpigen.c | 27 +++ 3 files changed, 43 insertions(+) diff --git a/include/acpi/acpigen.h

[PATCH v1 12/43] x86: Add bindings for NHLT

2020-06-14 Thread Simon Glass
Add devicetree bindings for the Intel Non-High-Definition-Audio Link Table (NHLT). Signed-off-by: Simon Glass --- include/dt-bindings/sound/nhlt.h | 23 +++ 1 file changed, 23 insertions(+) create mode 100644 include/dt-bindings/sound/nhlt.h diff --git

[PATCH v1 11/43] acpi: mmc: Generate ACPI info for the PCI SD Card

2020-06-14 Thread Simon Glass
Write required information into the SSDT to describe the SD card card-detect pin. Since the required GPIO properties are not present in the device-tree binding, set them manually for now. Signed-off-by: Simon Glass --- Changes in v1: - Capitalise ACPI_OPS_PTR configs/sandbox_defconfig | 2 +

[PATCH v1 14/43] acpi: Support writing named values

2020-06-14 Thread Simon Glass
Allow writing named integers and strings to the generated ACPI code. Signed-off-by: Simon Glass --- include/acpi/acpigen.h | 72 ++ lib/acpi/acpigen.c | 49 ++ test/dm/acpigen.c | 78 ++

[PATCH v1 08/43] acpi: Export functions to write sized values

2020-06-14 Thread Simon Glass
At present only acpigen_write_integer() is exported for use by other code. But in some cases it is useful to call the specific function depending on the size of the value. Export these functions and add a test. Signed-off-by: Simon Glass --- include/acpi/acpigen.h | 46

[PATCH v1 10/43] acpi: Support generation of a generic register

2020-06-14 Thread Simon Glass
Allow writing out a generic register. Signed-off-by: Simon Glass --- include/acpi/acpi_device.h | 1 + include/acpi/acpigen.h | 28 +++ lib/acpi/acpigen.c | 71 ++ test/dm/acpigen.c | 46 4 files

[PATCH v1 07/43] dm: acpi: Add support for the NHLT table

2020-06-14 Thread Simon Glass
The Intel Non-High-Definition-Audio Link Table (NHLT) table describes the audio codecs and connections in a system. Various devices can contribute information to produce the table. Add core support for this, based on a structure which is built up through calls to the driver. Signed-off-by: Simon

[PATCH v1 02/43] binman: Refactor binman_entry_find() to allow other nodes

2020-06-14 Thread Simon Glass
At present we can only read from a top-level binman node entry. Refactor this function to produce a second local function which supports reading from any node. Signed-off-by: Simon Glass --- lib/binman.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git

[PATCH v1 09/43] acpi: Support generation of a scope

2020-06-14 Thread Simon Glass
Add a function to write a scope to the generated ACPI code. Signed-off-by: Simon Glass --- include/acpi/acpigen.h | 10 ++ lib/acpi/acpigen.c | 7 +++ test/dm/acpi.c | 3 +-- test/dm/acpigen.c | 33 - 4 files changed, 50

[PATCH v1 05/43] dtoc: Support ACPI paths in of-platdata

2020-06-14 Thread Simon Glass
The start of an ACPI path typically has backslashes in it. These are not preserved during the translation from device tree to C code, since dtc (correctly) uses the first backslash as an escape character, and dtoc therefore leaves it out of the C string. Fix this with special-case handling.

[PATCH v1 03/43] binman: Add way to locate an entry in memory

2020-06-14 Thread Simon Glass
Add support for accessing an entry's contents in memory-mapped SPI flash. Signed-off-by: Simon Glass --- include/binman.h | 22 ++ lib/binman.c | 23 +++ 2 files changed, 45 insertions(+) diff --git a/include/binman.h b/include/binman.h index

[PATCH v1 00/43] x86: Programmatic generation of ACPI tables (Part C)

2020-06-14 Thread Simon Glass
This series is split off from the original ACPI series and renumbered to version 1. It includes functions for generating more ACPI constructs as well as I2C, GPIO and sound support. There are also quite a few patches related to getting coral to work correctly with ACPI. Changes in v1: - Add a

[PATCH v1 04/43] acpi: Allow creating the GNVS to fail

2020-06-14 Thread Simon Glass
In some cases an internal error may prevent this from working. Update the function return value and report the error. At present the API for writing tables does not easily support reporting errors, but once it is fully updated to use a context pointer, this will be easier. Signed-off-by: Simon

[PATCH v1 06/43] dm: core: Add a way of overriding the ACPI device path

2020-06-14 Thread Simon Glass
Some devices such as GPIO need to override the normal path that would be generated by driver model. Add a device-tree property for this. Signed-off-by: Simon Glass --- doc/device-tree-bindings/device.txt | 23 +++ drivers/core/acpi.c | 19 +++

[PATCH v1 01/43] binman: Allow setting the ROM offset

2020-06-14 Thread Simon Glass
On x86 the SPI ROM can be memory-mapped, at least most of it. Add a way to tell binman the offset from a ROM address to a RAM address. Signed-off-by: Simon Glass --- Changes in v1: - Add a way to set the binman ROM offset include/binman.h | 8 lib/binman.c | 17 +

Re: [RESEND PATCH v2 02/11] net: dwc_eth_qos: Add option "snps,reset-gpio" phy-rst gpio for stm32

2020-06-14 Thread David Wu
Hi Patrick, Yes, this is the case, it should be add at PHY node, and I also used the original writing "snps,reset*" at MAC node. Anyway, I will try to put the reset gpio in the PHY node. 在 2020/5/13 下午8:55, Patrick DELAUNAY 写道: Hi David From: David Wu Sent: mardi 12 mai 2020 11:56 It

Re: [PATCH 6/6] checkpatch.pl: Request if() instead #ifdef

2020-06-14 Thread AKASHI Takahiro
On Thu, Jun 04, 2020 at 07:39:35PM -0400, Tom Rini wrote: > On Fri, May 22, 2020 at 04:32:40PM -0600, Simon Glass wrote: > > > There is a lot of use of #ifdefs in U-Boot. In an effort reduce this, > > suggest using the compile-time construct. > > > > Signed-off-by: Simon Glass > > Applied to

[PATCH v3 10/10] riscv: Add FPIOA and GPIO support for Kendryte K210

2020-06-14 Thread Sean Anderson
This patch adds the necessary configs and docs for FPIOA and GPIO support on the K210. Signed-off-by: Sean Anderson --- Changes in v3: - Document pins 6 and 7 as not set Changes in v2: - Remove SPI flash related Kconfig settings board/sipeed/maix/Kconfig | 9 ++

[PATCH v3 09/10] riscv: Add pinmux and gpio bindings for Kendryte K210

2020-06-14 Thread Sean Anderson
This patch adds the necessary device tree bindings. Signed-off-by: Sean Anderson --- (no changes since v2) Changes in v2: - Convert to use pinmux property - Don't hog ISP on boot - Re-order GPIOs to match the defaults more closely arch/riscv/dts/k210-maix-bit.dts | 104

[PATCH v3 03/10] pinctrl: Add support for Kendryte K210 FPIOA

2020-06-14 Thread Sean Anderson
The Fully-Programmable Input/Output Array (FPIOA) device controls pin multiplexing on the K210. The FPIOA can remap any supported function to any multifunctional IO pin. It can also perform basic GPIO functions, such as reading the current value of a pin. However, GPIO functionality remains

[PATCH v3 05/10] gpio: dw: Fix warnings about casting int to pointer

2020-06-14 Thread Sean Anderson
Change the type of gpio_dwabp_platdata.base from fdt_addr_t to a void pointer, since we pass it to readl. Signed-off-by: Sean Anderson Reviewed-by: Ley Foon Tan Reviewed-by: Bin Meng --- This patch was previously submitted as part of

[PATCH v3 06/10] gpio: dw: Add a trailing underscore to generated name

2020-06-14 Thread Sean Anderson
Previously, if there was no bank-name property, it was easy to have confusing gpio names like "gpio1@08", instead of "gpio1@0_8". This patch follows the example of the sifive gpio driver. Signed-off-by: Sean Anderson --- This patch was previously submitted as part of

[PATCH v3 08/10] led: gpio: Default to using node name if label is absent

2020-06-14 Thread Sean Anderson
This more closely mirrors Linux's behaviour, and will make it easier to transition to using function+color in the future. Signed-off-by: Sean Anderson --- This patch was previously submitted as part of https://patchwork.ozlabs.org/project/uboot/list/?series=161576 (no changes since v1)

[PATCH v3 07/10] gpio: dw: Return output value when direction is out

2020-06-14 Thread Sean Anderson
dm_gpio_ops.get_value can be called when the gpio is either input or output. The current dw code always returns the input value, which is invalid if the direction is set to out. Signed-off-by: Sean Anderson Reviewed-by: Ley Foon Tan --- This patch was previously submitted as part of

[PATCH v3 02/10] test: pinmux: Add test for pin muxing

2020-06-14 Thread Sean Anderson
This extends the pinctrl-sandbox driver to support pin muxing, and adds a test for that behaviour. The test is done in C and not python (like the existing tests for the pinctrl uclass) because it needs to call pinctrl_select_state. Another option could be to add a command that invokes

[PATCH v3 01/10] pinctrl: Add pinmux property support to pinctrl-generic

2020-06-14 Thread Sean Anderson
The pinmux property allows for smaller and more compact device trees, especially when there are many pins which need to be assigned individually. Instead of specifying an array of strings to be parsed as pins and a function property, the pinmux property contains an array of integers representing

[PATCH v3 04/10] gpio: sifive: Use generic reg read function

2020-06-14 Thread Sean Anderson
Using an fdt-specific function causes problems with a live tree. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- This patch was previously submitted as part of https://patchwork.ozlabs.org/project/uboot/list/?series=161576 (no changes since v1) drivers/gpio/sifive-gpio.c | 2 +- 1

[PATCH v3 00/10] riscv: Add FPIOA and GPIO support for Kendryte K210

2020-06-14 Thread Sean Anderson
This patch series adds support for pinmuxing, gpios, and leds on the Kendyte K210. This patch series was previously part of https://patchwork.ozlabs.org/project/uboot/list/?series=161576 This patch series depends on https://patchwork.ozlabs.org/project/uboot/list/?series=178480 Changes in v3: -

Re: [PATCH v2 03/23] am335x: baltos: Enable DM_SPI

2020-06-14 Thread Yegor Yefremov
On Sat, Jun 13, 2020 at 8:01 PM Jagan Teki wrote: > > On Wed, May 27, 2020 at 6:26 PM Jagan Teki wrote: > > > > Enable DM_SPI for am355x baltos board. > > > > Build is fine, but not tested. > > > > Cc: Yegor Yefremov > > Any comments? Reviewed-by: Yegor Yefremov

Re: [PATCH RESEND v2 1/1] log: don't show function by default

2020-06-14 Thread Simon Glass
Hi Heinrich, On Sun, 14 Jun 2020 at 08:48, 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

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

2020-06-14 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 --- (no changes since v1) cmd/x86/mtrr.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/cmd/x86/mtrr.c b/cmd/x86/mtrr.c

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

2020-06-14 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 v2 24/25] x86: mp: Add more comments to the module

2020-06-14 Thread Simon Glass
Add a description of how this module works and also some missing function comments. Drop struct cpu_map since it is not used. Signed-off-by: Simon Glass --- Changes in v2: - Add a new patch with more comments arch/x86/cpu/mp_init.c| 91 ++-

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

2020-06-14 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 --- (no changes since v1)

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

2020-06-14 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 --- Changes in v2: - Drop the renamed mtrr_set_valid_() instead of mtrr_set_valid() cmd/x86/mtrr.c | 34 --

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

2020-06-14 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 --- Changes in v2: - Keep things building by temporarily renaming the

[PATCH v2 17/25] x86: Don't enable SMP in SPL

2020-06-14 Thread Simon Glass
SMP should be set up in U-Boot where possible, not SPL. Disable it in SPL. For 64-bit U-Boot we should find a way to allow SMP operations in U-Boot, but this is somewhat more complicated. For now that is disabled too. Signed-off-by: Simon Glass --- Changes in v2: - Add a new patch to avoid

[PATCH v2 18/25] x86: coral: Update the memory map

2020-06-14 Thread Simon Glass
This currently excludes the temporary memory used to start up the APs. Add it. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to add AP_DEFAULT_BASE to coral's memory map doc/board/google/chromebook_coral.rst | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v2 06/25] x86: mtrr: Fix 'ensable' typo

2020-06-14 Thread Simon Glass
Fix a typo in the command help. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) cmd/x86/mtrr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/x86/mtrr.c b/cmd/x86/mtrr.c index 084d7315f4..5d25c5802a 100644 --- a/cmd/x86/mtrr.c +++

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

2020-06-14 Thread Simon Glass
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 MTRRs. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in v2: - Rename function to mtrr_write_all() arch/x86/cpu/mtrr.c

[PATCH v2 12/25] x86: Set the SMP flag when MP init is complete

2020-06-14 Thread Simon Glass
Set this flag so we can track when it is safe to use CPUs other than the main one. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) arch/x86/cpu/mp_init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c

[PATCH v2 14/25] x86: mp: Park CPUs before running the OS

2020-06-14 Thread Simon Glass
With the new MP features the CPUs are no-longer parked when the OS is run. Fix this by calling a special function to park them, just before the OS is started. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) arch/x86/cpu/cpu.c| 5 +

[PATCH v2 16/25] x86: mtrr: Use MP calls to list the MTRRs

2020-06-14 Thread Simon Glass
Update the mtrr command to use mp_run_on_cpus() to obtain its information. Since the selected CPU is the boot CPU this does not change the result, but it sets the stage for supporting other CPUs. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in v2: - Rename

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

2020-06-14 Thread Simon Glass
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 can be used by any client code. It can call mp_run_on_cpus() on each CPU that is returned, handling them one at a time. Signed-off-by: Simon

[PATCH v2 13/25] x86: mp: Allow running functions on multiple CPUs

2020-06-14 Thread Simon Glass
Add a way to run a function on a selection of CPUs. This supports either a single CPU, all CPUs, just the main CPU or just the 'APs', in Intel terminology. It works by writing into a mailbox and then waiting for the CPUs to notice it, take action and indicate they are done. When SMP is not yet

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

2020-06-14 Thread Simon Glass
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, such as to change MTRRs and keep them consistent across CPUs. Change the last state of the flight plan to go into a wait loop, accepting

[PATCH v2 08/25] x86: mp_init: Adjust bsp_init() to return more information

2020-06-14 Thread Simon Glass
This function is misnamed since it does not actually init the BSP. Also it is convenient to adjust it to return a little more information. Rename and update the function, to allow it to return the BSP CPU device and number, as well as the total number of CPUs. Signed-off-by: Simon Glass

[PATCH v2 11/25] global_data: Add a generic global_data flag for SMP state

2020-06-14 Thread Simon Glass
Allow keeping track of whether all CPUs have been enabled yet. This allows us to know whether other CPUs need to be considered when updating CPU-specific settings such as MTRRs on x86. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1)

[PATCH v2 09/25] x86: cpu: Remove unnecessary #ifdefs

2020-06-14 Thread Simon Glass
Drop some #ifdefs that are not needed or can be converted to compile-time checks. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) arch/x86/cpu/cpu.c | 58 - arch/x86/cpu/i386/cpu.c | 2 -- 2 files changed, 28

[PATCH v2 03/25] x86: mp_init: Avoid declarations in header files

2020-06-14 Thread Simon Glass
The functions used by the flight plan are declared in the header file but are not used in any other file. Move the flight plan steps down to just above where it is used so that we can make these function static. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since

[PATCH v2 07/25] x86: mp_init: Set up the CPU numbers at the start

2020-06-14 Thread Simon Glass
At present each CPU is given a number when it starts itself up. While this saves a tiny amount of time by doing the device-tree read in parallel, it is confusing that the numbering happens on the fly. Move this code into mp_init() and do it at the start. Signed-off-by: Simon Glass Reviewed-by:

[PATCH v2 02/25] x86: Move MP code into mp_init

2020-06-14 Thread Simon Glass
At present the 'flight plan' for CPUs is passed into mp_init. But it is always the same. Move it into the mp_init file so everything is in one place. Also drop the SMI function since it does nothing. If we implement SMIs, more refactoring will be needed anyway. Signed-off-by: Simon Glass

[PATCH v2 05/25] x86: mp_init: Drop the num_cpus static variable

2020-06-14 Thread Simon Glass
This does not need to be global across all functions in this file. Pass a parameter instead. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) arch/x86/cpu/mp_init.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git

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

2020-06-14 Thread Simon Glass
Update this code to use livetree calls instead of flat-tree. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (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 b/arch/x86/cpu/mp_init.c index

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

2020-06-14 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 v2 04/25] x86: mp_init: Switch parameter names in start_aps()

2020-06-14 Thread Simon Glass
These parameters are named differently from elsewhere in this file. Switch them to avoid confusion. Also add comments to this function. Signed-off-by: Simon Glass --- Changes in v2: - Add comments to explain what start_aps() does arch/x86/cpu/mp_init.c | 25 +++-- 1 file

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

2020-06-14 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(-) diff --git a/tools/patman/test_checkpatch.py

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

2020-06-14 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

[PATCH 5/5] checkpatch: Don't warn about PREFER_IF in headers/DT files

2020-06-14 Thread Simon Glass
This warning should only be displayed for C files. Fix it and update the test. Signed-off-by: Simon Glass --- scripts/checkpatch.pl | 2 +- tools/patman/test_checkpatch.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl

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

2020-06-14 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 =>

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

2020-06-14 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

[PATCH 0/5] patman: Add tests for U-Boot-specific checkpatch checks

2020-06-14 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. This series adds the tests and modifies one check to be

Re: Please pull u-boot-dm/next

2020-06-14 Thread Tom Rini
On Fri, Jun 12, 2020 at 09:17:28PM -0600, Simon Glass wrote: > Hi Tom, > > This is for -next > > But I based it on master to avoid pulling in other people's commits. I hope > that works OK. > > > The following changes since commit be79009f3b9bbdbce283e67a865121e576d790ea: > > Merge tag

Re: Pull request: u-boot-spi/master

2020-06-14 Thread Tom Rini
On Thu, Jun 11, 2020 at 11:23:13PM +0530, Jagan Teki wrote: > Hi Tom, > > This PR is for next release. > > I'm sending the PR for migration early hoping it can avoid conflicts > from your series or in general. > > May be applied on next would help keep migrations changes inline. > > Summary:

Re: [PATCH 0/4] arm: fix clang build errors

2020-06-14 Thread Tom Rini
On Sun, Jun 14, 2020 at 05:51:21PM +0200, Heinrich Schuchardt wrote: > On 5/27/20 8:04 PM, Heinrich Schuchardt wrote: > > With this patch series most ARM boards both 32bit and 64bit can be built > > using Clang 9. > > > > On ARM systems gd is stored in register r9 or x18. When compiling with > >

Re: [PATCH 0/4] arm: fix clang build errors

2020-06-14 Thread Heinrich Schuchardt
On 5/27/20 8:04 PM, Heinrich Schuchardt wrote: With this patch series most ARM boards both 32bit and 64bit can be built using Clang 9. On ARM systems gd is stored in register r9 or x18. When compiling with clang gd is defined as a macro calling function gd_ptr(). So we can not make assignments

Re: [PATCH 1/1] sunxi: Pine64-LTS: SMBIOS properties

2020-06-14 Thread Heinrich Schuchardt
On 6/1/20 6:20 PM, Heinrich Schuchardt wrote: On 6/1/20 4:43 PM, André Przywara wrote: On 01/06/2020 14:56, Heinrich Schuchardt wrote: Provide accurate values of the manufacturer and the product name. PINE Microsystems Inc. is referred to on https://www.pine64.org/contact/. While this patch

[PULL] u-boot-socfpga/master

2020-06-14 Thread Marek Vasut
The following changes since commit be79009f3b9bbdbce283e67a865121e576d790ea: Merge tag 'u-boot-imx-20200609' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx (2020-06-09 09:17:24 -0400) are available in the Git repository at: git://git.denx.de/u-boot-socfpga.git master for you to

[PULL] u-boot-usb/master

2020-06-14 Thread Marek Vasut
The following changes since commit be79009f3b9bbdbce283e67a865121e576d790ea: Merge tag 'u-boot-imx-20200609' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx (2020-06-09 09:17:24 -0400) are available in the Git repository at: git://git.denx.de/u-boot-usb.git master for you to fetch

  1   2   >