summaryrefslogtreecommitdiff
path: root/include/dm/acpi.h
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2024-10-23 15:19:51 +0200
committerTom Rini <trini@konsulko.com>2024-10-27 17:24:13 -0600
commit763bad3e1cf202147fbddb74c9876d7426ddb26b (patch)
tree3bfd2d097a5add57aa7359f4d2a1e5677c9481bb /include/dm/acpi.h
parentf36e29e8da2f1b4a776b157e5f6c8368546da803 (diff)
acpi: Add fill_madt to acpi_ops
Add a new method to acpi_ops to let drivers fill out ACPI MADT. The code is unused for now until drivers implement the new ops. TEST: Booted on QEMU sbsa using driver model generated MADT. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm/acpi.h')
-rw-r--r--include/dm/acpi.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/dm/acpi.h b/include/dm/acpi.h
index 3adfe217678..d6bc0c099ad 100644
--- a/include/dm/acpi.h
+++ b/include/dm/acpi.h
@@ -147,6 +147,22 @@ struct acpi_ops {
int (*write_tables)(const struct udevice *dev, struct acpi_ctx *ctx);
/**
+ * fill_madt() - Generate MADT sub-tables for a device
+ *
+ * This is called to create the MADT table. The method should write out
+ * whatever sub-table is needed by this device. It will end up in the
+ * MADT table.
+ *
+ * Note that this is called 'fill' because the entire contents of the
+ * MADT is build by calling this method on all devices.
+ *
+ * @dev: Device to write
+ * @ctx: ACPI context to use
+ * @return 0 if OK, -ve on error
+ */
+ int (*fill_madt)(const struct udevice *dev, struct acpi_ctx *ctx);
+
+ /**
* fill_ssdt() - Generate SSDT code for a device
*
* This is called to create the SSDT code. The method should write out
@@ -232,6 +248,16 @@ int acpi_copy_name(char *out_name, const char *name);
int acpi_write_dev_tables(struct acpi_ctx *ctx);
/**
+ * acpi_fill_madt_subtbl() - Generate ACPI tables for MADT
+ *
+ * This is called to create the MADT sub-tables for all devices.
+ *
+ * @ctx: ACPI context to use
+ * Return: 0 if OK, -ve on error
+ */
+int acpi_fill_madt_subtbl(struct acpi_ctx *ctx);
+
+/**
* acpi_fill_ssdt() - Generate ACPI tables for SSDT
*
* This is called to create the SSDT code for all devices.