Re: [PATCH v6 081/102] x86: Add a generic Intel GPIO driver

2019-12-14 Thread Wolfgang Wallner
Hi Simon, Bin, > +static int intel_gpio_direction_output(struct udevice *dev, uint offset, > +int value) > +{ > + struct udevice *pinctrl = dev_get_parent(dev); > + uint config_offset = intel_pinctrl_get_config_reg_addr(pinctrl, offset); > + > +

[PATCH v2] serial: ns16550: Move PCI access from ofdata_to_platdata() to probe()

2020-03-02 Thread Wolfgang Wallner
n that method is not allowed, since it has not yet been probed. To fix this, move that access to the probe() method of @dev instead." Signed-off-by: Wolfgang Wallner Fixes: 82de42fa1468 ("dm: core: Allocate parent data separate from probing parent") --- The discussion leading to this p

Antwort: Re: [RFC PATCH] serial: ns16550: Move PCI access from ofdata_to_platdata() to probe()

2020-02-28 Thread Wolfgang Wallner
Hi Bin, -"Bin Meng" schrieb: - > Hi Wolfgang, > > [snip] > > Unfortunately this patch breaks several ARM board: > > +drivers/built-in.o: In function `ofnode_get_parent': > +drivers/core/ofnode.c:235: undefined reference to `fdt_parent_offset' > +drivers/built-in.o: In function

[PATCH 1/2] x86: cpu_x86: Make cpu_x86_get_count() non-static

2020-02-25 Thread Wolfgang Wallner
The function cpu_x86_get_count() is also useful for other modules. Make it non-static and add a prototype + description. Signed-off-by: Wolfgang Wallner --- arch/x86/cpu/cpu_x86.c | 2 +- arch/x86/include/asm/cpu_x86.h | 12 2 files changed, 13 insertions(+), 1 deletion

[PATCH 2/2] x86: apl: Use cpu_x86_get_count() for cpu_ops.get_count

2020-02-25 Thread Wolfgang Wallner
. Signed-off-by: Wolfgang Wallner --- arch/x86/cpu/apollolake/cpu.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/x86/cpu/apollolake/cpu.c b/arch/x86/cpu/apollolake/cpu.c index 3d05c82a5c..aa7a3dbd63 100644 --- a/arch/x86/cpu/apollolake/cpu.c +++ b/arch/x86/cpu

[PATCH 0/2] x86: apl: Add support for different number of cores

2020-02-25 Thread Wolfgang Wallner
() non-static - drops the Apollo Lake specific get_count implementation and uses cpu_x86_get_count() instead With the changes in this series also Apollo Lake variants with a different number of cores boot correctly. Wolfgang Wallner (2): x86: cpu_x86: Make cpu_x86_get_count() non-static

Antwort: Re: [PATCH v1] x86: acpi: Refactor XSDT handling in acpi_add_table()

2020-03-03 Thread Wolfgang Wallner
Hi Andy, -"U-Boot" schrieb: - > > [snip] > > > > > > P.S. Briefly looking at the last ~30 patches I can say that the idea > > > > > looks good, implementation needs more work. For example, there is > > > > > 'linux,name' property. Shouldn't be referred at all. Linux names and > > > > >

Antwort: Re: [RFC PATCH 3/4] x86: Move itss.c from Apollo Lake to a more generic location

2020-01-30 Thread Wolfgang Wallner
Hello Simon, -"Simon Glass" schrieb: - > On Wed, 22 Jan 2020 at 08:01, Wolfgang Wallner > wrote: > > > > The Interrupt Timer Subsystem (ITSS) is not specific to Apollo Lake, so > > move it to a common location within arch/x86. >

Antwort: [PATCH 013/108] acpi: Add a binding for ACPI settings in the device tree

2020-01-31 Thread Wolfgang Wallner
Hi Simon, > +Devices > +=== > + > +Device bindings are described by their own individual binding files. > + > +U-Boot provides for some optional properties which are documented here. > + > + - acpi,has-power-resource : (boolean) true if this device has a power > resource. > +This causes

Antwort: Re: [RFC PATCH 3/4] x86: Move itss.c from Apollo Lake to a more generic location

2020-02-03 Thread Wolfgang Wallner
Hi Bin, > -"Bin Meng" schrieb: - > applied to u-boot-x86, thanks! I intended to send a V2 of this patch, see discussion at [1]. As you have pulled that patch now, should I send the proposed modifications to kconfig as a separate patch instead of including it in a V2 of this one?

[PATCH v2 3/3] gpio: intel_gpio: Fix register/bit offsets intel_gpio_get_value()

2020-02-03 Thread Wolfgang Wallner
are PAD_CFG0_RX_STATE and PAD_CFG0_TX_STATE. Use them instead of the currently used PAD_CFG0_RX_STATE_BIT and PAD_CFG0_TX_STATE_BIT. Signed-off-by: Wolfgang Wallner Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v2: None drivers/gpio/intel_gpio.c | 4 ++-- 1 file changed

Antwort: Re: [PATCH 013/108] acpi: Add a binding for ACPI settings in the device tree

2020-02-03 Thread Wolfgang Wallner
Hi Simon, > -"Simon Glass" schrieb: - > Hi Wolfgang, > > On Fri, 31 Jan 2020 at 01:18, Wolfgang Wallner > wrote: > > > > Hi Simon, > > > > > +Devices > > > +=== > > > + > > > +Device bindings are

Antwort: Re: [PATCH 1/3] gpio: intel_gpio: Pass pinctrl device to pcr_clrsetbits32()

2020-02-03 Thread Wolfgang Wallner
Hi Bin, -"Bin Meng" schrieb: - > Hi Wolfgang, > > On Fri, Jan 10, 2020 at 3:35 PM Wolfgang Wallner > wrote: > > > > The function pcr_clrsetbits32() expects a device with a P2SB parent > > device. > > > > The currently passed device '

[PATCH v2 0/3] gpio: intel_gpio: Fix Intel gpio driver

2020-02-03 Thread Wolfgang Wallner
to Bin Meng for catching this) - Reworded commit description - Added reviewed-by tags Wolfgang Wallner (3): gpio: intel_gpio: Pass pinctrl device to pcr_clrsetbits32() gpio: intel_gpio: Clear tx state bit when setting output gpio: intel_gpio: Fix register/bit offsets intel_gpio_get_value

[PATCH v2 2/3] gpio: intel_gpio: Clear tx state bit when setting output

2020-02-03 Thread Wolfgang Wallner
Add missing 'PAD_CFG0_TX_STATE' to the clear mask for pcr_clrsetbits32(). Otherwise this bit cannot be cleared again after it has been set once. Signed-off-by: Wolfgang Wallner Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v2: - Added reviewed-by tags drivers/gpio

[PATCH v2 1/3] gpio: intel_gpio: Pass pinctrl device to pcr_clrsetbits32()

2020-02-03 Thread Wolfgang Wallner
of pcr_clrsetbits32(). But the 'pinctrl' device has a P2SB as parent. Pass the 'pinctrl' device instead of the 'dev' device to pcr_clrsetbits32(). Signed-off-by: Wolfgang Wallner --- Changes in v2: - Fixed typo in the commit description - Fixed the same error in both intel_gpio_direction_output

[PATCH 1/2] x86: itss: Add a Kconfig option to enable/disable ITSS driver

2020-02-03 Thread Wolfgang Wallner
Currently the ITSS driver is built unconditionally. Add a Kconfig option to support enabling/disabling the inclusion of the ITSS driver depending on the platform. Signed-off-by: Wolfgang Wallner --- arch/x86/Kconfig | 6 ++ arch/x86/cpu/intel_common/Makefile | 2 +- 2

[PATCH 2/2] x86: apl: Include ITSS driver

2020-02-03 Thread Wolfgang Wallner
Atuomatically select the ITSS driver when building for Apollo Lake. Signed-off-by: Wolfgang Wallner --- arch/x86/cpu/apollolake/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/cpu/apollolake/Kconfig b/arch/x86/cpu/apollolake/Kconfig index fcff176c27..a760e0ac68 100644

Antwort: Re: [PATCH v2 0/3] gpio: intel_gpio: Fix Intel gpio driver

2020-02-03 Thread Wolfgang Wallner
Hi Andy, > -"Andy Shevchenko" schrieb: - > On Mon, Feb 3, 2020 at 12:38 PM Wolfgang Wallner > wrote: > > > > > > This series fixes some issues in the Intel gpio driver. > > I have tested it on an Apollo Lake device, where U-Boot is booted as a

[PATCH] x86: Move P2SB from Apollo Lake to a more generic location

2020-02-04 Thread Wolfgang Wallner
The Primary to Sideband Bridge (P2SB) is not specific to Apollo Lake, so move its driver to a common location within arch/x86. Signed-off-by: Wolfgang Wallner --- This commit follows a similar rational as the recent moving of the ITSS driver from Apollo Lake to the intel_common directory

[RFC PATCH] serial: ns16550: Move PCI access from ofdata_to_platdata() to probe()

2020-02-18 Thread Wolfgang Wallner
yet been probed. To fix this, move that access to the probe() method of @dev instead." Signed-off-by: Wolfgang Wallner Fixes: 82de42fa1468 ("dm: core: Allocate parent data separate from probing parent") --- The discussion leading to this patch is located at https://lists.denx.de/pi

[PATCH] doc: Chromebook Coral: Fix typo for "Top of CAR region"

2020-02-21 Thread Wolfgang Wallner
The value for "Top of CAR region" should be fefc, not fefc000. This matches the Kconfig default values, as SYS_CAR_ADDR and SYS_CAR_SIZE are 0xfef0 and 0xc respectively. Signed-off-by: Wolfgang Wallner --- doc/board/google/chromebook_coral.rst | 2 +- 1 file changed, 1

dm: core: Board failing to boot since commit 82de42fa1468 (parent data/probe)

2020-02-11 Thread Wolfgang Wallner
Hello Simon, Since commit 82de42fa1468 ("dm: core: Allocate parent data separate from probing parent") I have trouble booting my board (a custom Apollo Lake design booted via Coreboot + U-Boot). I think this is because the function ns16550_serial_ofdata_to_platdata() of the UART driver noew

Antwort: Re: dm: core: Board failing to boot since commit 82de42fa1468 (parent data/probe)

2020-02-17 Thread Wolfgang Wallner
Hi Bin, Simon, -"Bin Meng" schrieb: - > Hi Wolfgang, > > On Wed, Feb 12, 2020 at 1:14 AM Simon Glass wrote: > > > > +Bin > > > > Hi Wolfgang, > > > > On Tue, 11 Feb 2020 at 06:59, Wolfgang Wallner > > wrote: > > &g

Antwort: Re: [PATCH 009/108] x86: apl: Move p2sb ofdata reading to the correct method

2020-02-14 Thread Wolfgang Wallner
Hello Bin, Simon, -"Bin Meng" schrieb: - > +Wolfgang Wallner > > On Mon, Jan 27, 2020 at 1:08 PM Simon Glass wrote: > > > > With P2SB the initial BAR (base-address register) is set up by TPL and > > this is used unchanged right through U

[PATCH] x86: p2sb: Drop 'apl' prefix

2020-02-18 Thread Wolfgang Wallner
mon folder. Signed-off-by: Wolfgang Wallner --- This patch follows a similar rational for P2SB as commit 03fe85a27b23 ("x86: itss: Remove apl-prefix") for the ITSS. arch/x86/cpu/intel_common/p2sb.c | 30 +-- arch/x86/dts/chromebook_coral.dts

Apollo Lake GPIO driver with Coreboot/U-Boot

2020-01-15 Thread Wolfgang Wallner
Hello Simon, Bin, all, I have an Apollo Lake based device, where U-Boot is booted as a Coreboot payload. I would like to utilize the Apollo Lake GPIO driver (drivers/gpio/intel_gpio.c), but I struggle with the dependencies. For my use case, I face 2 obstacles: 1) Some required drivers are not

[RFC PATCH 2/4] x86: Move itss.h from Apollo Lake to the generic x86 include directory

2020-01-22 Thread Wolfgang Wallner
The code in this file is not specific to Apollo Lake. According to coreboot sources (where this code comes from), it is common to at least: * Apollo Lake * Cannon Lake * Ice Lake * Skylake Signed-off-by: Wolfgang Wallner --- arch/x86/cpu/apollolake/itss.c| 2

Antwort: Re: Re: Apollo Lake GPIO driver with Coreboot/U-Boot

2020-01-22 Thread Wolfgang Wallner
Hi Simon, > Hi Wolfgang, > > On Sat, 18 Jan 2020 at 00:56, Wolfgang Wallner > wrote: > > > > Hello Simon, > > > > > -"Simon Glass" schrieb: ----- > > > On Thu, 16 Jan 2020 at 02:55, Wolfgang Wallner > > > wrote: > >

[RFC PATCH 3/4] x86: Move itss.c from Apollo Lake to a more generic location

2020-01-22 Thread Wolfgang Wallner
The Interrupt Timer Subsystem (ITSS) is not specific to Apollo Lake, so move it to a common location within arch/x86. Signed-off-by: Wolfgang Wallner --- At the moment, this commit enables building of itss.o unconditionally. which is a bad idea I guess. What is the preferred way to handle

[RFC PATCH 4/4] x86: itss: Remove apl-prefix

2020-01-22 Thread Wolfgang Wallner
The Interrupt Timer Subsystem (ITSS) is not specific to Apollo Lake, so remove the apl-prefix of the implemented functions/structures/... Signed-off-by: Wolfgang Wallner --- arch/x86/cpu/intel_common/itss.c | 56 +++ arch/x86/dts/chromebook_coral.dts | 2 +- 2

[RFC PATCH 0/4] x86: Move ITSS from Apollo Lake to a more generic location

2020-01-22 Thread Wolfgang Wallner
nly allows to use this driver on other platforms, it is also useful for Apollo Lake when U-Boot is chain-loaded via coreboot (in which case the files within arch/x86/cpu/apollolake would not be compiled and the include/asm/arch-symlink points to arch-coreboot instead of arch-apollolake). Wolfgang

[RFC PATCH 1/4] x86: apl: Add the term "Interrupt Timer Subsystem" to ITSS files

2020-01-22 Thread Wolfgang Wallner
ITSS stands for "Interrupt Timer Subsystem", so add that term to the description of the relevant files. Signed-off-by: Wolfgang Wallner --- ITSS stands for "Interrupt Timer Subsystem", at least according to coreboot [1]. [1] https://coreboot.org/status/kconfig-options

Antwort: Re: Apollo Lake GPIO driver with Coreboot/U-Boot

2020-01-17 Thread Wolfgang Wallner
Hello Simon, > -"Simon Glass" schrieb: - > On Thu, 16 Jan 2020 at 02:55, Wolfgang Wallner > wrote: > > > > Hello Simon, Bin, all, > > > > I have an Apollo Lake based device, where U-Boot is booted as a Coreboot > > payload. I

[RFC PATCH] spi: ich: Drop while loop in hardware sequencing erase case

2020-01-14 Thread Wolfgang Wallner
nly keeping the relevant parts of the loop body. Signed-off-by: Wolfgang Wallner --- I tried using an SPI NOR flash on an Apollo Lake based board, but calling 'sf erase' fails to erase the flash memory, it looks like it does nothing. Debugging the issue I find that the function ich_spi_exec_op_hw

[PATCH 2/3] gpio: intel_gpio: Clear tx state bit when setting output

2020-01-09 Thread Wolfgang Wallner
Add missing 'PAD_CFG0_TX_STATE' to the clear mask for pcr_clrsetbits32(). Otherwise this bit cannot be cleared again after it has been set once. Signed-off-by: Wolfgang Wallner --- drivers/gpio/intel_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio

[PATCH 0/3] gpio: intel_gpio: Fix Intel gpio driver

2020-01-09 Thread Wolfgang Wallner
This series fixes some issues in the Intel gpio driver. I have tested it on an Apollo Lake device, where U-Boot is booted as a coreboot payload. Wolfgang Wallner (3): gpio: intel_gpio: Pass pinctrl device to pcr_clrsetbits32() gpio: intel_gpio: Clear tx state bit when setting output gpio

[PATCH 1/3] gpio: intel_gpio: Pass pinctrl device to pcr_clrsetbits32()

2020-01-09 Thread Wolfgang Wallner
' device instead of the 'dev' device to pcr_clrsetbits32(). Signed-off-by: Wolfgang Wallner --- drivers/gpio/intel_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/intel_gpio.c b/drivers/gpio/intel_gpio.c index 4bf1c9ddc4..db63115628 100644 --- a/drivers/gpio

[PATCH 3/3] gpio: intel_gpio: Fix register/bit offsets intel_gpio_get_value()

2020-01-09 Thread Wolfgang Wallner
are PAD_CFG0_RX_STATE and PAD_CFG0_TX_STATE. Use them instead of the currently used PAD_CFG0_RX_STATE_BIT and PAD_CFG0_TX_STATE_BIT. Signed-off-by: Wolfgang Wallner --- drivers/gpio/intel_gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio

Antwort: Re: [PATCH v2 13/39] acpi: Add a binding for ACPI settings in the device tree

2020-03-12 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - [snip] > > > +properties provided by this binding, to describe how to handle > powering the > > > +device up and down using GPIOs > > > + - acpi,compatible : compatible string to report > > > > What does "compatible string" mean in this

Antwort: Re: [PATCH v2 21/39] acpi: Convert part of acpi_table to use acpi_ctx

2020-03-12 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - > Hi Wolfgang, > > On Wed, 11 Mar 2020 at 06:58, Wolfgang Wallner > wrote: > > > > Hi Simon, > > > > -"Simon Glass" schrieb: - > > > > > > The current c

Antwort: [PATCH v2 13/39] acpi: Add a binding for ACPI settings in the device tree

2020-03-10 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - > > Devices need to report various identifiers in the ACPI tables. Rather than > hard-coding these in drivers it is typically better to put them in the > device tree. > > Add a binding file to describe this. > > Signed-off-by: Simon Glass > --- >

Antwort: [PATCH v2 17/39] acpi: Add a central location for table version numbers

2020-03-10 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - > > Each ACPI table has its own version number. Add the version numbers in a > single function so we can keep them consistent and easily see what > versions are supported. > > Start a new acpi_table file in a generic directory to house this function.

Antwort: [PATCH v2 16/39] acpi: Add an __ACPI__ preprocessor symbol

2020-03-10 Thread Wolfgang Wallner
file.lib | 4 ++-- > 3 files changed, 10 insertions(+), 2 deletions(-) Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 15/39] x86: Move acpi_table header to main include/ directory

2020-03-10 Thread Wolfgang Wallner
2 +- > arch/x86/lib/zimage.c | 2 +- > include/acpi_table.h | 394 ++ > lib/efi_loader/efi_acpi.c | 2 +- > 12 files changed, 404 insertions(+), 386 deletions(-) Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 21/39] acpi: Convert part of acpi_table to use acpi_ctx

2020-03-11 Thread Wolfgang Wallner
t; + ctx->current += amount; > + acpi_align(ctx); > +} > diff --git a/test/dm/acpi.c b/test/dm/acpi.c > index b87fbd16b0..0bd7e51ac9 100644 > --- a/test/dm/acpi.c > +++ b/test/dm/acpi.c > @@ -152,3 +152,31 @@ static int dm_test_acpi_write_tables(struct > unit_test_state *uts) > return 0; > } > DM_TEST(dm_test_acpi_write_tables, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); > + > +/* Test basic ACPI functions */ > +static int dm_test_acpi_basic(struct unit_test_state *uts) > +{ > + struct acpi_ctx ctx; > + > + /* Check align works */ > + ctx.current = (void *)5; > + acpi_align(); > + ut_asserteq_ptr((void *)16, ctx.current); > + > + /* Check that align does nothing if already aligned */ > + acpi_align(); > + ut_asserteq_ptr((void *)16, ctx.current); > + acpi_align_large(); > + ut_asserteq_ptr((void *)64, ctx.current); > + acpi_align_large(); > + ut_asserteq_ptr((void *)64, ctx.current); > + > + /* Check incrementing */ > + acpi_inc(, 3); > + ut_asserteq_ptr((void *)67, ctx.current); > + acpi_inc_align(, 3); > + ut_asserteq_ptr((void *)80, ctx.current); > + > + return 0; > +} > +DM_TEST(dm_test_acpi_basic, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); > -- > 2.25.1.481.gfbce0eb801-goog Apart from the nits above: Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 24/39] acpi: Move acpi_add_table() to generic code

2020-03-11 Thread Wolfgang Wallner
gt;entry[i] = map_to_sysmem(table); > + > + /* Fix XSDT length */ > + xsdt->header.length = sizeof(struct acpi_table_header) + > + (sizeof(u64) * (i + 1)); > + > + /* Re-calculate checksum */ > + xsdt->header.checksum = 0; > + xsdt->header.checksum = > + table_compute_checksum((u8 *)xsdt, xsdt->header.length); > + } > + > + return 0; > +} > diff --git a/test/dm/acpi.c b/test/dm/acpi.c > index 0bd7e51ac9..a2a57a29a6 100644 > --- a/test/dm/acpi.c > +++ b/test/dm/acpi.c > @@ -21,10 +21,14 @@ static int testacpi_write_tables(const struct udevice > *dev, >struct acpi_ctx *ctx) > { > struct acpi_dmar *dmar; > + int ret; > > dmar = (struct acpi_dmar *)ctx->current; > acpi_create_dmar(dmar, DMAR_INTR_REMAP); > ctx->current += sizeof(struct acpi_dmar); > + ret = acpi_add_table(ctx, dmar); > + if (ret) > + return log_msg_ret("add", ret); > > return 0; > } > -- > 2.25.1.481.gfbce0eb801-goog Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 25/39] acpi: Put table-setup code in its own function

2020-03-11 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - > > We always write three basic tables to ACPI at the start. Move this into > its own function, along with acpi_fill_header(), so we can write a test > for this code. > > Signed-off-by: Simon Glass > --- > > Changes in v2: None > >

Antwort: [PATCH v2 23/39] acpi: Drop code for missing XSDT from acpi_write_rsdp()

2020-03-11 Thread Wolfgang Wallner
file changed, 2 insertions(+), 13 deletions(-) Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 26/39] acpi: Move the xsdt pointer to acpi_ctx

2020-03-11 Thread Wolfgang Wallner
--- > test/dm/acpi.c| 5 + > 3 files changed, 23 insertions(+), 22 deletions(-) Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 20/39] acpi: Add a method to write tables for a device

2020-03-11 Thread Wolfgang Wallner
0 +++ > test/dm/acpi.c| 43 +++ > 4 files changed, 138 insertions(+) Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 22/39] x86: Allow devices to write ACPI tables

2020-03-11 Thread Wolfgang Wallner
g start_addr) > acpi_inc_align(ctx, spcr->header.length); > acpi_add_table(rsdp, spcr); > > + acpi_write_dev_tables(ctx); > + > addr = map_to_sysmem(ctx->current); > debug("current = %lx\n", addr); > > -- > 2.25.1.481.gfbce0eb801-goog Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 19/39] acpi: Move acpi_fill_header() to generic code

2020-03-11 Thread Wolfgang Wallner
Hi Simon, looking at this patch some more I have another question, see below. -"Simon Glass" schrieb: - > > This function needs to be used by sandbox for tests. Move it into the > generic directory. > > Signed-off-by: Simon Glass > Reviewed-by: Bin Meng > --- [snip] > @@ -81,3

Antwort: [PATCH v2 27/39] acpi: Add an acpi command

2020-03-12 Thread Wolfgang Wallner
t; cmd/Makefile | 1 + > cmd/acpi.c | 179 + > lib/acpi/acpi_table.c | 1 + > test/dm/acpi.c | 73 ++ > 7 files changed, 270 insertions(+) > create mode 100644 cmd/acpi.c Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 14/39] acpi: Add a simple sandbox test

2020-03-10 Thread Wolfgang Wallner
patch > > arch/sandbox/dts/test.dts | 4 ++ > arch/sandbox/include/asm/acpi_table.h | 9 + > include/dm/uclass-id.h| 1 + > test/dm/Makefile | 1 + > test/dm/acpi.c| 55 +++ > 5 files changed, 70 insertions(+) Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 19/39] acpi: Move acpi_fill_header() to generic code

2020-03-10 Thread Wolfgang Wallner
t; --- > > Changes in v2: None > > arch/x86/lib/acpi_table.c | 9 - > include/acpi_table.h | 10 ++ > lib/acpi/acpi_table.c | 10 ++ > test/dm/acpi.c| 28 > 4 files changed, 48 insertions(+), 9 d

Antwort: [PATCH v2 18/39] acpi: Add support for DMAR

2020-03-10 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - > > The DMA Remapping Reporting (DMAR) table contains information about DMA > remapping. > > Add a version simple version of this table with only the minimum fields > filled out. i.e. no entries. > > Reviewed-by: Bin Meng > Signed-off-by: Simon

Antwort: [PATCH v2 10/39] pci: Adjust dm_pci_read_bar32() to return errors correctly

2020-03-09 Thread Wolfgang Wallner
he function to avoid masking in this case. > > Signed-off-by: Simon Glass > Reviewed-by: Bin Meng > --- > > Changes in v2: None > > drivers/pci/pci-uclass.c | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 11/39] x86: apl: Add Global NVS table header

2020-03-09 Thread Wolfgang Wallner
Hi Simon, > -"Simon Glass" schrieb: - > > Add the C version of this header. It includes a few Chrome OS bits which > are disabled for a normal build. > > Signed-off-by: Simon Glass > --- > > Changes in v2: > - Drop the Chrome OS pieces > - Rename the 'coreboot' console to 'U-Boot' >

Antwort: [PATCH v2 08/39] x86: Correct wording of coreboot source code

2020-03-09 Thread Wolfgang Wallner
v2: None > > arch/x86/cpu/coreboot/timestamp.c | 4 ++-- > arch/x86/include/asm/arch-coreboot/timestamp.h | 4 ++-- > arch/x86/include/asm/intel_pinctrl_defs.h | 2 -- > 3 files changed, 4 insertions(+), 6 deletions(-) Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 12/39] dm: core: Add basic ACPI support

2020-03-09 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - > > ACPI (Advanced Configuration and Power Interface) is an Intel standard > for specifying information about a platform. It is a little like device > tree but considerably more complicated and with more backslashes. A > primary difference is that it

Antwort: [PATCH v2 02/39] spi: Add SPI mode enums

2020-03-09 Thread Wolfgang Wallner
ons with DM_SPI > > include/spi.h | 33 + > 1 file changed, 33 insertions(+) Reviewed-by: Wolfgang Wallner

Antwort: Re: [PATCH v3 13/29] dts: Add a binding for hid-over-i2c

2020-04-08 Thread Wolfgang Wallner
Hi Andy, -"Andy Shevchenko" schrieb: - > > Betreff: Re: [PATCH v3 13/29] dts: Add a binding for hid-over-i2c > > On Tue, Apr 07, 2020 at 08:58:13PM -0600, Simon Glass wrote: > > On Tue, 31 Mar 2020 at 13:25, Wolfgang Wallner > > wrote: > >

Antwort: [PATCH v5 27/29] acpi: Put table-setup code in its own function

2020-04-14 Thread Wolfgang Wallner
eq(sizeof(*xsdt), xsdt->header.length); >+ ut_assertok(table_compute_checksum(xsdt, sizeof(*xsdt))); >+ >+ end = PTR_ALIGN((void *)xsdt + sizeof(*xsdt), 64); >+ ut_asserteq_ptr(end, ctx.current); >+ >+ ut_asserteq(map_to_sysmem(rsdt), rsdp->rsdt_address); >+ ut_asserteq(map_to_sysmem(xsdt), rsdp->xsdt_address); >+ >+ return 0; >+} >+DM_TEST(dm_test_acpi_setup_base_tables, >+ DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); >-- >2.26.0.292.g33ef6b2f38-goog > Reviewed-by: Wolfgang Wallner

Antwort: Re: [PATCH v7 1/9] acpi: Add a binding for ACPI settings in the device tree

2020-04-21 Thread Wolfgang Wallner
Hi Bin, -"Bin Meng" schrieb: - >Betreff: Re: [PATCH v7 1/9] acpi: Add a binding for ACPI settings in >the device tree > >Hi Wolfgang, Andy, > >On Mon, Apr 20, 2020 at 4:37 AM Simon Glass wrote: >> >> Devices need to report various identifiers in the ACPI tables. >Rather than >>

Antwort: Re: Re: [PATCH v7 1/9] acpi: Add a binding for ACPI settings in the device tree

2020-04-21 Thread Wolfgang Wallner
Hi, -"Andy Shevchenko" schrieb: ----- >An: "Wolfgang Wallner" >Von: "Andy Shevchenko" >Datum: 21.04.2020 16:41 >Kopie: "Bin Meng" , "Simon Glass" >, "Andy Shevchenko" >, "U-Boot Mailing List" &g

Antwort: Re: Re: [PATCH v3 13/29] dts: Add a binding for hid-over-i2c

2020-04-15 Thread Wolfgang Wallner
Hi Andy, -"Andy Shevchenko" schrieb: - > Betreff: Re: Re: [PATCH v3 13/29] dts: Add a binding for hid-over-i2c > > On Wed, Apr 8, 2020 at 11:40 PM Andy Shevchenko > wrote: > > On Wed, Apr 8, 2020 at 10:39 PM Wolfgang Wallner > > wrote: > > >

Antwort: Re: [PATCH v5 14/29] acpi: Add a binding for ACPI settings in the device tree

2020-04-16 Thread Wolfgang Wallner
Hi Andy, -"Andy Shevchenko" schrieb: - >Betreff: Re: [PATCH v5 14/29] acpi: Add a binding for ACPI settings >in the device tree [snip] >> - acpi,compatible : ACPI devices may report a _HID or _CID of >"PRP0001", in >> which case they are expected to provide a _DSD object with a

Antwort: [PATCH v2 31/39] gpio: Add a method to convert a GPIO to ACPI

2020-03-13 Thread Wolfgang Wallner
e.c | 16 > 4 files changed, 76 insertions(+) Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 30/39] acpi: Add functions to generate ACPI code

2020-03-13 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - > > Sometimes we need to generate ACPI code on the fly based on things only > known at run time. Add a new 'acpigen' library to handle this. This code > comes from coreboot and has been modified to support the acpi_ctx struct. > > Also add

Antwort: Re: [PATCH v3] serial: ns16550: Fix ordering of getting base address

2020-04-06 Thread Wolfgang Wallner
based ns16550 wrapper >> > driver tries to access plat->base before calling probe(), it is >> > still subject to break. >> > >> > Fixes: 720f9e1fdb0c9 ("serial: ns16550: Move PCI access from >ofdata_to_platdata() to probe()") >> > Reported-by

Antwort: Re: [ANN] U-Boot v2020.04-rc4 released

2020-04-01 Thread Wolfgang Wallner
Hi Andy, > On Wed, Apr 1, 2020 at 2:54 PM Andy Shevchenko > wrote: > > > > On Tue, Mar 31, 2020 at 2:31 AM Tom Rini wrote: > > > > > > Hey all, > > > > > > So, I've gotten out of the habit of tagging rcs on cycle. This month I > > > have been taking in changes sparingly and I'm not concerned

Antwort: Re: [PATCH v2 1/2] serial: ns16550: Revert "Move PCI access from ofdata_to_platdata() to probe()"

2020-04-03 Thread Wolfgang Wallner
Hi Andy, Bin, > -"Andy Shevchenko" schrieb: - > On Thu, Apr 2, 2020 at 7:55 AM Bin Meng wrote: > > On Thu, Apr 2, 2020 at 1:55 AM Simon Glass wrote: > > > On Wed, 1 Apr 2020 at 11:39, Andy Shevchenko > > > wrote: > > > > On Wed, Apr 01, 2020 at 10:56:26AM -0600, Simon Glass wrote:

Antwort: [PATCH v3] serial: ns16550: Revert "Move PCI access from ofdata_to_platdata() to probe()"

2020-04-03 Thread Wolfgang Wallner
bcbd35612675c. Note, it doesn't affect SoCFPGA case. Cc: Wolfgang Wallner Signed-off-by: Andy Shevchenko --- v3: drop wrong patch, better explanation in the commit message drivers/serial/ns16550.c | 40 1 file changed, 12 insertions(+), 28 de

Antwort: [PATCH] serial: ns16550: Fix ordering of getting base address

2020-04-03 Thread Wolfgang Wallner
Hi Bin, Thanks for taking care of this! -"Bin Meng" schrieb: - >An: "Simon Glass" , "Tom Rini" >, "Andy Shevchenko" >, "Wolfgang Wallner" >, "Chee Hong Ang" >, "U-Boot Mailing List" > >Von: &quo

Antwort: [PATCH v2] serial: ns16550: Fix ordering of getting base address

2020-04-03 Thread Wolfgang Wallner
Move PCI access from >ofdata_to_platdata() to probe()") >Reported-by: Andy Shevchenko >Signed-off-by: Bin Meng >Tested-by: Andy Shevchenko >Reviewed-by: Wolfgang Wallner >Tested-by: Wolfgang Wallner > >--- > >Changes in v2: >- not to break Fixes, etc

Antwort: [PATCH v3 12/29] dm: core: Add basic ACPI support

2020-03-31 Thread Wolfgang Wallner
++ > include/dm/device.h | 5 +++ > include/log.h | 2 ++ > 6 files changed, 123 insertions(+) > create mode 100644 drivers/core/acpi.c > create mode 100644 include/dm/acpi.h > Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v3 11/29] x86: apl: Add Global NVS table header

2020-03-31 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - >An: u-boot@lists.denx.de >Von: "Simon Glass" >Datum: 31.03.2020 01:14 >Kopie: "Andy Shevchenko" , >"Wolfgang Wallner" , "Leif >Lindholm" , "Simon Glass" , "Bin &g

Antwort: [PATCH v3 20/29] acpi: Add support for DMAR

2020-03-31 Thread Wolfgang Wallner
sary __packed >- Move __packed to after struct > > include/acpi/acpi_table.h | 57 >+++ > lib/acpi/acpi_table.c | 28 +++ > test/dm/acpi.c| 13 + > 3 files changed, 98 insertions(+) Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v3 13/29] dts: Add a binding for hid-over-i2c

2020-03-31 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - >An: u-boot@lists.denx.de >Von: "Simon Glass" >Datum: 31.03.2020 01:14 >Kopie: "Andy Shevchenko" , >"Wolfgang Wallner" , "Leif >Lindholm" , "Simon Glass" >Be

Antwort: [PATCH v3 19/29] acpi: Add a central location for table version numbers

2020-03-31 Thread Wolfgang Wallner
PL_ should alwys be empty anyway. At least that is how I understood the assigment to SPL_ in Makefile.spl. > obj-$(CONFIG_EFI) += efi/ > obj-$(CONFIG_EFI_LOADER) += efi_driver/ > obj-$(CONFIG_EFI_LOADER) += efi_loader/ [snip] Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v3 13/29] dts: Add a binding for hid-over-i2c

2020-04-01 Thread Wolfgang Wallner
Hi Simon, -"U-Boot" schrieb: - [snip] >> + - acpi,ddn : Contains the string to use as the _DDN (DOS (Disk >Operating >> +System) Device Name) >> + - acpi,hid : Contains the string to use as the HID (Hardware ID) >> +identifier _HID >> + - acpi,probed : Tells U-Boot to add

Antwort: [PATCH v3 21/29] test: Add hexdump.h to the unit test header

2020-04-06 Thread Wolfgang Wallner
unit test header > >Changes in v2: None > > include/test/ut.h | 1 + > 1 file changed, 1 insertion(+) > Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v1 01/35] dm: core: Add an ACPI name for the root node

2020-04-30 Thread Wolfgang Wallner
CPI_OPS_PTR > > drivers/core/root.c | 13 + > 1 file changed, 13 insertions(+) Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v1 02/35] acpi: Add a function to get a device path and scope

2020-04-30 Thread Wolfgang Wallner
| 95 >-- > 5 files changed, 212 insertions(+), 13 deletions(-) > create mode 100644 include/acpi/acpi_device.h > create mode 100644 lib/acpi/acpi_device.c Reviewed-by: Wolfgang Wallner

Antwort: Re: [PATCH v7 7/9] acpi: Put table-setup code in its own function

2020-04-27 Thread Wolfgang Wallner
mon Glass > > > > I see Wolfgang gave a RB tag to the v5 patch, so I am going to add > > that tag here since no changes between v5 and v7 > > > > Reviewed-by: Wolfgang Wallner > > > > But I wonder why this new series is tagged as v7. Do I miss v6? > >

Antwort: [PATCH v5 16/29] x86: Move acpi_s3.h to include/acpi/

2020-04-14 Thread Wolfgang Wallner
p1/fsp_common.c | 2 +- > arch/x86/lib/fsp2/fsp_dram.c | 2 +- > drivers/pci/pci_rom.c| 4 +--- > drivers/power/acpi_pmc/acpi-pmc-uclass.c | 2 +- > drivers/sysreset/sysreset_x86.c | 2 +- > include/{ => acpi}/acpi_s3.h | 0

Antwort: Re: Re: Re: [PATCH v3 13/29] dts: Add a binding for hid-over-i2c

2020-04-15 Thread Wolfgang Wallner
Hi Andy, -"Andy Shevchenko" schrieb: - > On Wed, Apr 15, 2020 at 5:00 PM Wolfgang Wallner > wrote: > > -"Andy Shevchenko" schrieb: - > > > Betreff: Re: Re: [PATCH v3 13/29] dts: Add a binding for hid-over-i2c > > > >

Antwort: [PATCH v5 14/29] acpi: Add a binding for ACPI settings in the device tree

2020-04-15 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - >Betreff: [PATCH v5 14/29] acpi: Add a binding for ACPI settings in >the device tree > >Devices need to report various identifiers in the ACPI tables. Rather >than >hard-coding these in drivers it is typically better to put them in >the >device

Antwort: [PATCH v2] test: Use ut_asserteq_mem() where possible

2020-05-12 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - >Betreff: [PATCH v2] test: Use ut_asserteq_mem() where possible > >Quite a few tests still use ut_assertok(memcmp(...)) and variants. >Modify >them to use the macro designed for this purpose. > >Suggested-by: Wolfgang W

Antwort: Re: [PATCH v2 00/35] dm: Add programmatic generation of ACPI tables (part B)

2020-05-12 Thread Wolfgang Wallner
Hi Bin, -"Bin Meng" schrieb: - > Betreff: Re: [PATCH v2 00/35] dm: Add programmatic generation of ACPI tables > (part B) > > Hi Wolfgang, Andy, > > On Mon, May 11, 2020 at 4:34 AM Simon Glass wrote: > > > > NOTE: I have resent this as v1 to avoid confusion > > > > This is split from

Antwort: [PATCH v2 03/35] acpi: Add a way to check device status

2020-05-13 Thread Wolfgang Wallner
gt;device status. > >Signed-off-by: Simon Glass >--- > >Changes in v2: None >Changes in v1: None > > include/acpi/acpi_device.h | 28 > lib/acpi/acpi_device.c | 5 + > test/dm/acpi.c | 12 ++++ > 3 files changed, 45 insertions(+) Reviewed-by: Wolfgang Wallner

Antwort: Re: [PATCH v2 04/35] irq: Add a method to convert an interrupt to ACPI

2020-05-18 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - > Betreff: Re: [PATCH v2 04/35] irq: Add a method to convert an interrupt to > ACPI > > Hi Wolfgang, > > On Wed, 13 May 2020 at 07:01, Wolfgang Wallner > wrote: > > > > Hi Simon, > > > > -&

Antwort: [PATCH v2 08/35] acpi: Support string output

2020-05-19 Thread Wolfgang Wallner
one > > include/acpi/acpigen.h | 19 +++ > lib/acpi/acpigen.c | 14 ++ > test/dm/acpigen.c | 42 ++ > 3 files changed, 75 insertions(+) Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 10/35] acpi: Support generation of a GPIO/irq for a device

2020-05-19 Thread Wolfgang Wallner
"enable-gpios")); > + ut_asserteq(ACPI_DESCRIPTOR_GPIO, ptr[0]); > + > + /* This one has neither */ > + ptr = acpigen_get_current(ctx); > + ut_assertok(uclass_get_device_by_seq(UCLASS_TEST_FDT, 3, )); > + ut_asserteq_str("b-test", dev->name); > + ut_asserteq(-ENOENT, > + acpi_device_write_interrupt_or_gpio(ctx, dev, > + "enable-gpios")); > + > + free_context(); > + > + return 0; > +} > +DM_TEST(dm_test_acpi_interrupt_or_gpio, > + DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); > -- > 2.26.2.645.ge9eca65c58-goog > Reviewed-by: Wolfgang Wallner

Re: [PATCH v2 09/35] acpi: Support generation of GPIO descriptor

2020-05-19 Thread Wolfgang Wallner
hanges in v1: None > > include/acpi/acpi_device.h | 22 ++ > lib/acpi/acpi_device.c | 151 + > test/dm/acpigen.c | 89 ++ > 3 files changed, 262 insertions(+) Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 11/35] acpi: Support generation of I2C descriptor

2020-05-19 Thread Wolfgang Wallner
udevice *dev; > + u8 *ptr; > + > + ut_assertok(alloc_context()); > + > + ptr = acpigen_get_current(ctx); > + > + ut_assertok(uclass_get_device(UCLASS_RTC, 0, )); > + ut_assertok(acpi_device_write_i2c_dev(ctx, dev)); > + ut_asserteq(28, acpigen_get_current(ctx) - ptr); > + ut_asserteq(ACPI_DESCRIPTOR_SERIAL_BUS, ptr[0]); > + ut_asserteq(25, get_unaligned((u16 *)(ptr + 1))); > + ut_asserteq(ACPI_I2C_SERIAL_BUS_REVISION_ID, ptr[3]); > + ut_asserteq(0, ptr[4]); > + ut_asserteq(ACPI_SERIAL_BUS_TYPE_I2C, ptr[5]); > + ut_asserteq(0, get_unaligned((u16 *)(ptr + 7))); > + ut_asserteq(ACPI_I2C_TYPE_SPECIFIC_REVISION_ID, ptr[9]); > + ut_asserteq(6, get_unaligned((u16 *)(ptr + 10))); > + ut_asserteq(10, get_unaligned((u32 *)(ptr + 12))); > + ut_asserteq(0x43, get_unaligned((u16 *)(ptr + 16))); > + ut_asserteq_str("\\_SB.SI2C", (char *)ptr + 18); > + > + free_context(); > + > + return 0; > +} > +DM_TEST(dm_test_acpi_i2c, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); > -- > 2.26.2.645.ge9eca65c58-goog The remarks above are just this: remarks. I would also be fine with merging the code as it is: Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 13/35] acpigen: Support writing a length

2020-05-19 Thread Wolfgang Wallner
_len_f(ctx); > + acpigen_emit_byte(ctx, 0x23); > + acpigen_pop_len(ctx); > + ut_asserteq(1 + 3, get_length(ptr)); > + > + /* Write 200 bytes so we need two length bytes */ > + ptr = ctx->current; > + acpigen_write_len_f(ctx); > + for (i = 0; i < 200; i++) > + acpigen_emit_byte(ctx, 0x23); > + acpigen_pop_len(ctx); > + ut_asserteq(200 + 3, get_length(ptr)); > + > + /* Write 40KB so we need three length bytes */ > + ptr = ctx->current; > + acpigen_write_len_f(ctx); > + for (i = 0; i < 4; i++) > + acpigen_emit_byte(ctx, 0x23); > + acpigen_pop_len(ctx); > + ut_asserteq(4 + 3, get_length(ptr)); > + > + free_context(); > + > + return 0; > +} > +DM_TEST(dm_test_acpi_len, 0); > -- > 2.26.2.645.ge9eca65c58-goog > Reviewed-by: Wolfgang Wallner

Antwort: [PATCH v2 05/35] acpi: Support generation of ACPI code

2020-05-14 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - > Betreff: [PATCH v2 05/35] acpi: Support generation of ACPI code > > Add a new file to handle generating ACPI code programatically. This is > used when information must be dynamically added to the tables, e.g. the > SSDT. > > Initial support is just

Antwort: [PATCH v2 04/35] irq: Add a method to convert an interrupt to ACPI

2020-05-13 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - >Betreff: [PATCH v2 04/35] irq: Add a method to convert an interrupt >to ACPI > >When generating ACPI tables we need to convert IRQs in U-Boot to the >ACPI >structures required by ACPI. This is a SoC-specific conversion and >cannot >be handled by

  1   2   3   >