From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Wallner Date: Tue, 3 Mar 2020 11:00:43 +0100 Subject: Antwort: Re: [PATCH v1] x86: acpi: Refactor XSDT handling in acpi_add_table() In-Reply-To: References: , <20200227140051.75072-1-andriy.shevchenko@linux.intel.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > > > > other type of enumerations is utterly opaque to the outside world. > > > > > > > > How do we add the required linux,name ACPI property into the ACPI > > > > tables for a device? > > > > > > There must not be Linux device names or anything Linux related (like > > > hardcoded GPIO numbers) in the ACPI table. > > > > Apparently the Intel GPIO driver requires that name. See for example here: > > > > https://elixir.bootlin.com/linux/latest/source/drivers/pinctrl/intel/pinctrl-broxton.c#L999 > > > > static const struct acpi_device_id bxt_pinctrl_acpi_match[] = { > > { "INT3452", (kernel_ulong_t)apl_pinctrl_soc_data }, > > { "INT34D1", (kernel_ulong_t)bxt_pinctrl_soc_data }, > > { } > > }; > > > > So we have to put INT3452 in the ACPI table. > > Wait, this is not a *name*, this is ACPI _HID. ACPI _HID, of course, > should be somewhere in board code. > > I was thinking myself about some U-Boot framework that actually takes > ACPI _HID from the driver. So, when you define in U-Boot device tree a > compatible string (for U-Boot use), in the driver it will have in the > class structure the callback / field / stubstructure to use when ACPI > generate tables is enabled. It will drop duplication of compatible > with ACPI _HID in each DTS. There is a related discussion in another thread, here is the link: https://lists.denx.de/pipermail/u-boot/2020-February/398856.html I have brought that up, but I'm no expert in this area, so any feedback would be welcome. That discussion is not only about inferring _HID, but also about the idea of inferring other ACPI properties from device tree (the example discussed is the HID offset). regards, Wolfgang