Message ID | 20200707191212.2542638-1-sjg@chromium.org |
---|---|
Headers | show |
Series | dm: Add programmatic generation of ACPI tables (part B) | expand |
On Wed, Jul 8, 2020 at 3:12 AM Simon Glass <sjg at chromium.org> wrote: > > This is split from the original series in an attempt to get things applied > in chunks. > > This part includes: > - writing basic ACPI code for integers, strings, names, packages > - writing descriptors for GPIO, I2C, interrupts, SPI > - writing code to enable/disable ACPI peripherals via GPIOs > - writing SSDT and DSDT tables > - additional ways to determine ACPI device names > > Much of this code is taken from coreboot and I have tried to avoid > changing the original code for no reason. Changes include: > - splitting the acpi_dp functions into their own file > - adding tests > - adding (lots of) comments > - using a context pointer instead of global variables > - tidying up some code where couldn't resist (e.g. acpigen_emit_namestring()) > > Changes in v4: > - Add a comment about sandbox to dm_test_irq_get_acpi() > - Setup ctx->base as well as ctx->current in acpi_setup_base_tables() > - Add a comment about little-endian in acpigen_emit_dword() > - Add a #define for the context size in alloc_context() > - Rename the length-writing functions to indicate they are for large resources > - Use memset() to zero struct acpi_gpio in gpio_get_acpi() > - Move common code about the if...else in sb_gpio_get_acpi() > - Don't set zero fields in sb_gpio_get_acpi(), and add a comment about it > - Update acpi_device_write_interrupt_irq() to return IRQ pin number > - Use NULL instead of NUL and drop the 'NUL character' comment > - Drop comment about the type always being ACPI_GPIO_TYPE_IO > - Rename the length-writing functions to indicate they are for large resources > - Update functions to return a GPIO pin number > - Update functions to return GPIO/IRQ pin number > - Move SPI macros to next patch > - Rename the length-writing functions to indicate they are for large > - Update functions to return GPIO/IRQ pin number > - Move SPI macros to next patch > - Rename the length-writing functions to indicate they are for large resources > - Add a note about the hard-coded 3-byte length used > - Fix 'gas' typo > - Use 'null' instead of 'nul' > - Use 'writing' instead of emitting in test comment > - Use 'writing' instead of emitting in test comment > - Change 'nul' to 'null' in commit message and acpigen_write_string() > - Move emit->write comment changes to previous patches > - s/nul/null/ in the comment > - Drop embedded // comments in file comment > - Correct return value comment in acpi_dp_add_child() > - Rename acpi_dp_write_() to acpi_dp_write_internal() and make static > - Use a #define for the test context size > - Add a header file for test to allow sharing the context init function > - Rename and get_length() into a shared test file > - Add missing arg to comment for acpi_dp_write() > - Correct reference to device tree in the commit message > - Squash in comment change to an earlier patch > - Rename acpigen_write_method_() > - Use acpi_test_get_length() instead of get_length() > - Use acpi_test_get_length() instead of get_length() > - Update functions to return GPIO/IRQ pin number > - Use a separate variables for reading and writing DW0 > - Correct bug in acpigen_set_gpio_val() by putting tx_state_val in LOCAL0 > - Fix up the comment for acpigen_set_enable_tx_gpio() > - Explain access to DW0 register a bit better and provide a sample > - Expand the comments for acpigen_get_dw0_in_local5() > - Fix 'diabl' typo > - Use new shared acpi_test_alloc_context_size() in test > - Update functions to return GPIO/IRQ pin number > - Use a separate variables for reading and writing DW0 > - Explain in sort_acpi_item_type() why ctx->current is not updated > - Explain why 'fill' is used for one method and 'inject' for another > - Mention that acpi_device_infer_name() only supports x86 > - Add a comment about only supporting USB3.0 > series applied to u-boot-x86, thanks!