diff options
author | Simon Glass <sjg@chromium.org> | 2020-11-04 09:57:19 -0700 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2020-11-05 14:58:45 +0800 |
commit | 5019e201ccaee4bd54ba707dfc4eece885857629 (patch) | |
tree | 64a6812ad48def169d89b6694fd7dbaee60aeb76 /include | |
parent | 38e498c3a2b5b52e7935516cba0927e0d90c365c (diff) | |
download | u-boot-5019e201ccaee4bd54ba707dfc4eece885857629.zip u-boot-5019e201ccaee4bd54ba707dfc4eece885857629.tar.gz u-boot-5019e201ccaee4bd54ba707dfc4eece885857629.tar.bz2 |
x86: acpi: Store the ACPI context in global_data
At present we create the ACPI context but then drop it after generation of
tables is complete. This is annoying because we have to then search for
tables later.
To fix this, allocate the context and store it in global_data.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/global_data.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index f392043..87d827d 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -24,6 +24,7 @@ #include <membuff.h> #include <linux/list.h> +struct acpi_ctx; struct driver_rt; typedef struct global_data gd_t; @@ -420,6 +421,12 @@ struct global_data { */ struct udevice *watchdog_dev; #endif +#ifdef CONFIG_GENERATE_ACPI_TABLE + /** + * @acpi_ctx: ACPI context pointer + */ + struct acpi_ctx *acpi_ctx; +#endif }; /** @@ -452,6 +459,12 @@ struct global_data { #define gd_dm_driver_rt() NULL #endif +#ifdef CONFIG_GENERATE_ACPI_TABLE +#define gd_acpi_ctx() gd->acpi_ctx +#else +#define gd_acpi_ctx() NULL +#endif + /** * enum gd_flags - global data flags * |