All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/35] dm: Add programmatic generation of ACPI tables (part B)
@ 2020-05-10 20:33 Simon Glass
  2020-05-10 20:33 ` [PATCH v2 01/35] dm: core: Add an ACPI name for the root node Simon Glass
                   ` (68 more replies)
  0 siblings, 69 replies; 84+ messages in thread
From: Simon Glass @ 2020-05-10 20:33 UTC (permalink / raw)
  To: u-boot

NOTE: I have resent this as v1 to avoid confusion

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 v2:
- Fix memset of I2C descriptor
- Fix memset of SPI descriptor

Changes in v1:
- Capitalise ACPI_OPS_PTR
- Split into more patches for review
- Add tests
- Rebase on top of common.h series
- Fix 'the an' typo
- Move header definitions into this patch
- Update sandbox driver slightly for testing
- Switch parameter order of _acpi_fill_ssdt() and make it static
- Fix 'sentinal' and 'METHOD_FILL_SDDT' typos
- Correct the commit subject
- Generalise the ACPI function recursion with acpi_recurse_method()
- Generalise the ACPI function recursion with acpi_recurse_method()
- Use OEM_TABLE_ID instead of ACPI_TABLE_CREATOR
- Update ACPI_DSTATUS enum
- Drop writing of coreboot tables
- Generalise the ACPI function recursion with acpi_recurse_method()
- Use acpi,ddn instead of acpi,desc
- Rename to acpi_device_infer_name()
- Update newly created sandbox tests

Simon Glass (35):
  dm: core: Add an ACPI name for the root node
  acpi: Add a function to get a device path and scope
  acpi: Add a way to check device status
  irq: Add a method to convert an interrupt to ACPI
  acpi: Support generation of ACPI code
  acpi: Support generation of interrupt descriptor
  gpio: Add a method to convert a GPIO to ACPI
  acpi: Support string output
  acpi: Support generation of GPIO descriptor
  acpi: Support generation of a GPIO/irq for a device
  acpi: Support generation of I2C descriptor
  acpi: Support generation of SPI descriptor
  acpigen: Support writing a length
  acpigen: Support writing a package
  acpi: Support writing an integer
  acpi: Support writing a string
  acpi: Support writing a name
  acpi: Support writing a UUID
  acpi: Support writing Device Properties objects via _DSD
  acpi: Support writing a GPIO
  acpi: Support copying properties from device tree to ACPI
  acpi: Add support for various misc ACPI opcodes
  acpi: Add support for writing a Power Resource
  acpi: Add support for writing a GPIO power sequence
  acpi: Add support for a generic power sequence
  acpi: Add support for SSDT generation
  x86: acpi: Move MADT down a bit
  acpi: Record the items added to SSDT
  acpi: Support ordering SSDT data by device
  x86: Allow devices to write an SSDT
  acpi: Add support for DSDT generation
  x86: Allow devices to write to DSDT
  pci: Avoid a crash in device_is_on_pci_bus()
  dm: acpi: Enhance acpi_get_name()
  acpi: Add an acpi split command

 arch/sandbox/dts/test.dts           |  14 +-
 arch/x86/lib/acpi_table.c           |  54 +-
 cmd/acpi.c                          |  15 +-
 doc/device-tree-bindings/chosen.txt |   9 +
 doc/device-tree-bindings/device.txt |  13 +
 drivers/core/acpi.c                 | 207 ++++++-
 drivers/core/root.c                 |  13 +
 drivers/gpio/gpio-uclass.c          |  21 +
 drivers/gpio/sandbox.c              |  86 +++
 drivers/i2c/sandbox_i2c.c           |   1 +
 drivers/misc/irq-uclass.c           |  18 +-
 drivers/misc/irq_sandbox.c          |  16 +
 drivers/rtc/sandbox_rtc.c           |  13 +
 drivers/spi/sandbox_spi.c           |   1 +
 include/acpi/acpi_device.h          | 401 +++++++++++++
 include/acpi/acpi_dp.h              | 283 +++++++++
 include/acpi/acpi_table.h           |   6 +
 include/acpi/acpigen.h              | 347 +++++++++++
 include/asm-generic/gpio.h          |  27 +
 include/dm/acpi.h                   |  63 ++
 include/dm/device.h                 |   2 +-
 include/irq.h                       |  43 ++
 include/spi.h                       |   4 +-
 include/test/ut.h                   |  17 +
 lib/acpi/Makefile                   |   3 +
 lib/acpi/acpi_device.c              | 812 ++++++++++++++++++++++++++
 lib/acpi/acpi_dp.c                  | 397 +++++++++++++
 lib/acpi/acpigen.c                  | 477 +++++++++++++++
 test/dm/Makefile                    |   2 +
 test/dm/acpi.c                      | 277 ++++++++-
 test/dm/acpi_dp.c                   | 511 +++++++++++++++++
 test/dm/acpigen.c                   | 861 ++++++++++++++++++++++++++++
 test/dm/gpio.c                      |  62 ++
 test/dm/irq.c                       |  23 +
 test/dm/pci.c                       |  14 +
 35 files changed, 5080 insertions(+), 33 deletions(-)
 create mode 100644 include/acpi/acpi_device.h
 create mode 100644 include/acpi/acpi_dp.h
 create mode 100644 include/acpi/acpigen.h
 create mode 100644 lib/acpi/acpi_device.c
 create mode 100644 lib/acpi/acpi_dp.c
 create mode 100644 lib/acpi/acpigen.c
 create mode 100644 test/dm/acpi_dp.c
 create mode 100644 test/dm/acpigen.c

-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply	[flat|nested] 84+ messages in thread

end of thread, other threads:[~2020-06-10  8:40 UTC | newest]

Thread overview: 84+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-10 20:33 [PATCH v2 00/35] dm: Add programmatic generation of ACPI tables (part B) Simon Glass
2020-05-10 20:33 ` [PATCH v2 01/35] dm: core: Add an ACPI name for the root node Simon Glass
2020-05-17 14:40   ` Bin Meng
2020-05-10 20:33 ` [PATCH v2 02/35] acpi: Add a function to get a device path and scope Simon Glass
2020-05-17 14:54   ` Bin Meng
2020-05-10 20:33 ` [PATCH v2 03/35] acpi: Add a way to check device status Simon Glass
2020-05-10 20:33 ` [PATCH v2 04/35] irq: Add a method to convert an interrupt to ACPI Simon Glass
2020-05-10 20:33 ` [PATCH v2 05/35] acpi: Support generation of ACPI code Simon Glass
2020-05-10 20:33 ` [PATCH v2 06/35] acpi: Support generation of interrupt descriptor Simon Glass
2020-05-10 20:33 ` [PATCH v2 07/35] gpio: Add a method to convert a GPIO to ACPI Simon Glass
2020-05-10 20:33 ` [PATCH v2 08/35] acpi: Support string output Simon Glass
2020-05-10 20:33 ` [PATCH v2 09/35] acpi: Support generation of GPIO descriptor Simon Glass
2020-05-10 20:33 ` [PATCH v2 10/35] acpi: Support generation of a GPIO/irq for a device Simon Glass
2020-05-10 20:33 ` [PATCH v2 11/35] acpi: Support generation of I2C descriptor Simon Glass
2020-05-10 20:33 ` [PATCH v2 12/35] acpi: Support generation of SPI descriptor Simon Glass
2020-05-10 20:33 ` [PATCH v2 13/35] acpigen: Support writing a length Simon Glass
2020-05-10 20:33 ` [PATCH v2 14/35] acpigen: Support writing a package Simon Glass
2020-05-10 20:33 ` [PATCH v2 15/35] acpi: Support writing an integer Simon Glass
2020-05-10 20:33 ` [PATCH v2 16/35] acpi: Support writing a string Simon Glass
2020-05-10 20:33 ` [PATCH v2 17/35] acpi: Support writing a name Simon Glass
2020-05-10 20:33 ` [PATCH v2 18/35] acpi: Support writing a UUID Simon Glass
2020-05-10 20:33 ` [PATCH v2 19/35] acpi: Support writing Device Properties objects via _DSD Simon Glass
2020-05-10 20:33 ` [PATCH v2 20/35] acpi: Support writing a GPIO Simon Glass
2020-05-10 20:33 ` [PATCH v2 21/35] acpi: Support copying properties from device tree to ACPI Simon Glass
2020-05-10 20:33 ` [PATCH v2 22/35] acpi: Add support for various misc ACPI opcodes Simon Glass
2020-05-10 20:33 ` [PATCH v2 23/35] acpi: Add support for writing a Power Resource Simon Glass
2020-05-10 20:33 ` [PATCH v2 24/35] acpi: Add support for writing a GPIO power sequence Simon Glass
2020-05-10 20:33 ` [PATCH v2 25/35] acpi: Add support for a generic " Simon Glass
2020-05-10 20:34 ` [PATCH v2 26/35] acpi: Add support for SSDT generation Simon Glass
2020-05-10 20:34 ` [PATCH v2 27/35] x86: acpi: Move MADT down a bit Simon Glass
2020-05-10 20:34 ` [PATCH v2 28/35] acpi: Record the items added to SSDT Simon Glass
2020-05-10 20:34 ` [PATCH v2 29/35] acpi: Support ordering SSDT data by device Simon Glass
2020-05-10 20:34 ` [PATCH v2 30/35] x86: Allow devices to write an SSDT Simon Glass
2020-05-10 20:34 ` [PATCH v2 31/35] acpi: Add support for DSDT generation Simon Glass
2020-05-10 20:34 ` [PATCH v2 32/35] x86: Allow devices to write to DSDT Simon Glass
2020-05-10 20:34 ` [PATCH v2 33/35] pci: Avoid a crash in device_is_on_pci_bus() Simon Glass
2020-05-10 20:34 ` [PATCH v2 34/35] dm: acpi: Enhance acpi_get_name() Simon Glass
2020-05-10 20:34 ` [PATCH v2 35/35] acpi: Add an acpi split command Simon Glass
2020-05-12  2:13 ` [PATCH v2 00/35] dm: Add programmatic generation of ACPI tables (part B) Bin Meng
2020-05-12 11:55 ` Antwort: " Wolfgang Wallner
2020-05-12 12:32   ` Andy Shevchenko
2020-05-12 23:22     ` Simon Glass
2020-05-13  9:55       ` Andy Shevchenko
2020-05-14 16:02         ` Simon Glass
2020-05-14 16:38           ` Andy Shevchenko
2020-05-13 12:18 ` Antwort: [PATCH v2 03/35] acpi: Add a way to check device status Wolfgang Wallner
2020-05-13 13:01 ` Antwort: [PATCH v2 04/35] irq: Add a method to convert an interrupt to ACPI Wolfgang Wallner
2020-05-14 16:02   ` Simon Glass
2020-05-18  7:47   ` Antwort: " Wolfgang Wallner
2020-05-14  8:32 ` Antwort: [PATCH v2 05/35] acpi: Support generation of ACPI code Wolfgang Wallner
2020-06-09 21:14   ` Simon Glass
2020-06-10  7:33   ` Wolfgang Wallner
2020-06-10  7:39   ` Wolfgang Wallner
2020-05-19  8:14 ` Antwort: [PATCH v2 08/35] acpi: Support string output Wolfgang Wallner
2020-05-19  8:56 ` [PATCH v2 09/35] acpi: Support generation of GPIO descriptor Wolfgang Wallner
2020-05-19  9:32 ` Antwort: [PATCH v2 10/35] acpi: Support generation of a GPIO/irq for a device Wolfgang Wallner
2020-05-19 11:58 ` Antwort: [PATCH v2 11/35] acpi: Support generation of I2C descriptor Wolfgang Wallner
2020-06-09 21:14   ` Simon Glass
2020-05-19 13:14 ` Antwort: [PATCH v2 13/35] acpigen: Support writing a length Wolfgang Wallner
2020-05-27 13:04 ` [PATCH v2 14/35] acpigen: Support writing a package Wolfgang Wallner
2020-05-28  9:45 ` [PATCH v2 15/35] acpi: Support writing an integer Wolfgang Wallner
2020-05-28  9:45 ` Antwort: [PATCH v2 16/35] acpi: Support writing a string Wolfgang Wallner
2020-05-28  9:46 ` [PATCH v2 17/35] acpi: Support writing a name Wolfgang Wallner
2020-05-28  9:57 ` [PATCH v2 18/35] acpi: Support writing a UUID Wolfgang Wallner
2020-05-28 13:36 ` [PATCH v2 19/35] acpi: Support writing Device Properties objects via _DSD Wolfgang Wallner
2020-06-03 11:49 ` Antwort: [PATCH v2 20/35] acpi: Support writing a GPIO Wolfgang Wallner
2020-06-03 12:00 ` [PATCH v2 21/35] acpi: Support copying properties from device tree to ACPI Wolfgang Wallner
2020-06-03 13:04 ` [PATCH v2 22/35] acpi: Add support for various misc ACPI opcodes Wolfgang Wallner
2020-06-04  7:39 ` Antwort: [PATCH v2 23/35] acpi: Add support for writing a Power Resource Wolfgang Wallner
2020-06-04  8:50 ` [PATCH v2 24/35] acpi: Add support for writing a GPIO power sequence Wolfgang Wallner
2020-06-04  9:12 ` [PATCH v2 25/35] acpi: Add support for a generic " Wolfgang Wallner
2020-06-04  9:20 ` [PATCH v2 27/35] x86: acpi: Move MADT down a bit Wolfgang Wallner
2020-06-04 11:52 ` [PATCH v2 29/35] acpi: Support ordering SSDT data by device Wolfgang Wallner
2020-06-04 11:54 ` [PATCH v2 28/35] acpi: Record the items added to SSDT Wolfgang Wallner
2020-06-04 12:20 ` [PATCH v2 30/35] x86: Allow devices to write an SSDT Wolfgang Wallner
2020-06-04 12:22 ` [PATCH v2 33/35] pci: Avoid a crash in device_is_on_pci_bus() Wolfgang Wallner
2020-06-04 12:26 ` [PATCH v2 31/35] acpi: Add support for DSDT generation Wolfgang Wallner
2020-06-04 12:55 ` [PATCH v2 32/35] x86: Allow devices to write to DSDT Wolfgang Wallner
2020-06-04 13:04 ` [PATCH v2 35/35] acpi: Add an acpi split command Wolfgang Wallner
2020-06-04 13:17 ` [PATCH v2 34/35] dm: acpi: Enhance acpi_get_name() Wolfgang Wallner
2020-06-04 13:27 ` [PATCH v2 00/35] dm: Add programmatic generation of ACPI tables (part B) Wolfgang Wallner
2020-06-04 15:59   ` Simon Glass
2020-06-10  8:06 ` [PATCH v2 06/35] acpi: Support generation of interrupt descriptor Wolfgang Wallner
2020-06-10  8:40 ` [PATCH v2 12/35] acpi: Support generation of SPI descriptor Wolfgang Wallner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.