diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2018-12-05 11:03:36 +0100 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-01-04 12:11:18 +0000 |
commit | f9e47cc4c2ddefaaa91ddae25449803cdd5243b8 (patch) | |
tree | f7023399c4eb45a4f8dbcc47c42ecb7c7c78ab33 /src/include/reg_script.h | |
parent | 4139c15276a62c32c8d976c41782073379d64585 (diff) | |
download | coreboot-f9e47cc4c2ddefaaa91ddae25449803cdd5243b8.tar.xz |
src: Get rid of device_t
Use of device_t is deprecated.
Change-Id: Ie05869901ac33d7089e21110f46c1241f7ee731f
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/30047
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include/reg_script.h')
-rw-r--r-- | src/include/reg_script.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/include/reg_script.h b/src/include/reg_script.h index 116dd9264b..28fc82db0f 100644 --- a/src/include/reg_script.h +++ b/src/include/reg_script.h @@ -30,8 +30,6 @@ * are employed: * - Chaining of tables that allow runtime tables to chain to compile-time * tables. - * - Notion of current device (device_t) being worked on. This allows for - * PCI config, io, and mmio on a particular device's resources. * * Note that when using REG_SCRIPT_COMMAND_NEXT there is an implicit push * and pop of the context. A chained reg_script inherits the previous @@ -87,13 +85,21 @@ struct reg_script { union { uint32_t id; const struct reg_script *next; - device_t dev; +#ifdef __SIMPLE_DEVICE__ + pci_devfn_t dev; +#else + struct device *dev; +#endif unsigned int res_index; }; }; struct reg_script_context { - device_t dev; +#ifdef __SIMPLE_DEVICE__ + pci_devfn_t dev; +#else + struct device *dev; +#endif struct resource *res; const struct reg_script *step; uint8_t display_state; /* Only modified by reg_script_run_step */ @@ -437,6 +443,10 @@ IS_ENABLED(CONFIG_SOC_INTEL_FSP_BAYTRAIL) _REG_SCRIPT_ENCODE_RAW(REG_SCRIPT_COMMAND_END, 0, 0, 0, 0, 0, 0, 0) void reg_script_run(const struct reg_script *script); -void reg_script_run_on_dev(device_t dev, const struct reg_script *step); +#ifdef __SIMPLE_DEVICE__ +void reg_script_run_on_dev(pci_devfn_t dev, const struct reg_script *step); +#else +void reg_script_run_on_dev(struct device *dev, const struct reg_script *step); +#endif #endif /* REG_SCRIPT_H */ |