diff options
author | Angel Pons <th3fanbus@gmail.com> | 2020-10-28 13:50:38 +0100 |
---|---|---|
committer | Angel Pons <th3fanbus@gmail.com> | 2021-01-30 23:15:54 +0000 |
commit | 02414f8d570f51a232ba2b499b67b6aa3a3ef11d (patch) | |
tree | af8a3032080de21c8de086b3a0dc600dd36201b4 /src/soc/intel/broadwell/pch/early_pch.c | |
parent | 0a45b40fb2fc2e0a7bf64e1721d0b60748949e4d (diff) |
soc/intel/broadwell/pch: Drop some `config_of` uses
There's no need to die here. Also simplifies merging with Haswell.
Change-Id: I3d4bc79b32279180442dbc82126e297f11f1fb80
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46890
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/soc/intel/broadwell/pch/early_pch.c')
-rw-r--r-- | src/soc/intel/broadwell/pch/early_pch.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/soc/intel/broadwell/pch/early_pch.c b/src/soc/intel/broadwell/pch/early_pch.c index 149dda1ca0..a18a5ecdd9 100644 --- a/src/soc/intel/broadwell/pch/early_pch.c +++ b/src/soc/intel/broadwell/pch/early_pch.c @@ -54,7 +54,10 @@ static void pch_enable_lpc(void) /* Lookup device tree in romstage */ const struct device *const dev = pcidev_on_root(0x1f, 0); - const struct soc_intel_broadwell_pch_config *config = config_of(dev); + if (!dev || !dev->chip_info) + return; + + const struct soc_intel_broadwell_pch_config *config = dev->chip_info; pci_write_config32(PCH_DEV_LPC, LPC_GEN1_DEC, config->gen1_dec); pci_write_config32(PCH_DEV_LPC, LPC_GEN2_DEC, config->gen2_dec); |