Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47226 )
Change subject: soc/intel/jasperlake: Log PM event from an internal device ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/47226/1/src/soc/intel/jasperlake/el... File src/soc/intel/jasperlake/elog.c:
https://review.coreboot.org/c/coreboot/+/47226/1/src/soc/intel/jasperlake/el... PS1, Line 16: #ifdef __SIMPLE_DEVICE__ : pci_devfn_t dev; : #else : struct device *dev; : #endif I think we can use `pci_devfn_t` irrespective of __SIMPLE_DEVICE__. Keeps code free of #ifdefs.
https://review.coreboot.org/c/coreboot/+/47226/1/src/soc/intel/jasperlake/el... PS1, Line 21: reg_offset We probably don't need the reg_offset. We should be able to use `pci_dev_is_wake_source()`. Please see CB:47182. I think both the changes can benefit from use of a single structure to capture dev<->elog_wake_source_type and then use `pci_dev_is_wake_source()` to determine if the device is a wake source and log corresponding elog entry.