diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-07-12 16:20:14 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-07-18 15:22:09 +0000 |
commit | 4323d262473a1ea09eb3f843c4e856eb5851146f (patch) | |
tree | 46bf2e95fdddc2d1e8cae5227fd4063f66855b9d /src/device/device_const.c | |
parent | 73d560a71ae55d39a1ca189cb02663454835b03c (diff) | |
download | coreboot-4323d262473a1ea09eb3f843c4e856eb5851146f.tar.xz |
devicetree: Add accessors for chip_info
Apply uniform style of error messages for missing device
nodes and chip_info.
Change-Id: I70def4599509b8193e44ea3f02c4906f865b4469
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34298
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/device/device_const.c')
-rw-r--r-- | src/device/device_const.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/device/device_const.c b/src/device/device_const.c index f2f0177f57..c472aeaa79 100644 --- a/src/device/device_const.c +++ b/src/device/device_const.c @@ -240,12 +240,22 @@ DEVTREE_CONST struct device *pcidev_path_on_root_debug(pci_devfn_t devfn, const if (dev) return dev; - printk(BIOS_ERR, "BUG: %s requests hidden 00:%02x.%u\n", func, devfn >> 3, devfn & 7); + devtree_bug(func, devfn); /* FIXME: This can return wrong device. */ return dev_find_slot(0, devfn); } +void devtree_bug(const char *func, pci_devfn_t devfn) +{ + printk(BIOS_ERR, "BUG: %s requests hidden 00:%02x.%u\n", func, devfn >> 3, devfn & 7); +} + +void __noreturn devtree_die(void) +{ + die("DEVTREE: dev or chip_info is NULL\n"); +} + /** * Given an SMBus bus and a device number, find the device structure. * |