diff options
author | Simon Glass <sjg@chromium.org> | 2020-07-07 13:12:03 -0600 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2020-07-17 14:32:24 +0800 |
commit | b5183172f031603c5d861c34389f88a3c493cfd7 (patch) | |
tree | bfb50e7104eaf813cb457d757d5658346f52f4e0 /include/dm/acpi.h | |
parent | 740630ba73768667a2f87326f2a237d373a5093d (diff) | |
download | u-boot-b5183172f031603c5d861c34389f88a3c493cfd7.tar.gz u-boot-b5183172f031603c5d861c34389f88a3c493cfd7.tar.xz u-boot-b5183172f031603c5d861c34389f88a3c493cfd7.zip |
acpi: Add support for SSDT generation
Some devices need to generate code for the Secondary System Descriptor
Table (SSDT). Add a method to handle this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include/dm/acpi.h')
-rw-r--r-- | include/dm/acpi.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/dm/acpi.h b/include/dm/acpi.h index dfda88e493..e956e49680 100644 --- a/include/dm/acpi.h +++ b/include/dm/acpi.h @@ -74,6 +74,19 @@ struct acpi_ops { * @return 0 if OK, -ve on error */ int (*write_tables)(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 + * whatever ACPI code is needed by this device. It will end up in the + * SSDT table. + * + * @dev: Device to write + * @ctx: ACPI context to use + * @return 0 if OK, -ve on error + */ + int (*fill_ssdt)(const struct udevice *dev, struct acpi_ctx *ctx); }; #define device_get_acpi_ops(dev) ((dev)->driver->acpi_ops) @@ -118,6 +131,16 @@ int acpi_copy_name(char *out_name, const char *name); */ int acpi_write_dev_tables(struct acpi_ctx *ctx); +/** + * acpi_fill_ssdt() - Generate ACPI tables for SSDT + * + * This is called to create the SSDT code for all devices. + * + * @ctx: ACPI context to use + * @return 0 if OK, -ve on error + */ +int acpi_fill_ssdt(struct acpi_ctx *ctx); + #endif /* __ACPI__ */ #endif |