diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2019-12-10 13:15:42 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2019-12-22 13:47:39 +0000 |
commit | 7db16ddc8879a5b5acb7681135c7d9439dd1bd99 (patch) | |
tree | 63dc4a817763731d34f5dbfe660322ca77bc8fa4 /src/device/pnp_device.c | |
parent | 0142d441c63a9bb1a7955ea0ba764a2ddbc38d48 (diff) |
superio/common/conf_mode: Add op to write SSDT
Add functions to write ACPI SSDT code for entering and leaving
the config mode.
To be used by ACPI generators.
Tested on Linux 5.2 using the Aspeed SSDT generator.
Change-Id: I14b55b885f1c384536bafafed39ad399639868e4
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37639
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/device/pnp_device.c')
-rw-r--r-- | src/device/pnp_device.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/device/pnp_device.c b/src/device/pnp_device.c index c58b375277..81aa8890b2 100644 --- a/src/device/pnp_device.c +++ b/src/device/pnp_device.c @@ -31,6 +31,19 @@ void pnp_exit_conf_mode(struct device *dev) dev->ops->ops_pnp_mode->exit_conf_mode(dev); } +#if CONFIG(HAVE_ACPI_TABLES) +void pnp_ssdt_enter_conf_mode(struct device *dev, const char *idx, const char *data) +{ + if (dev->ops->ops_pnp_mode && dev->ops->ops_pnp_mode->ssdt_enter_conf_mode) + dev->ops->ops_pnp_mode->ssdt_enter_conf_mode(dev, idx, data); +} +void pnp_ssdt_exit_conf_mode(struct device *dev, const char *idx, const char *data) +{ + if (dev->ops->ops_pnp_mode && dev->ops->ops_pnp_mode->ssdt_exit_conf_mode) + dev->ops->ops_pnp_mode->ssdt_exit_conf_mode(dev, idx, data); +} +#endif + /* PNP fundamental operations */ void pnp_write_config(struct device *dev, u8 reg, u8 value) |