7 comments:
File src/soc/intel/apollolake/cse.c:
same as CNL
File src/soc/intel/cannonlake/me.c:
if (!is_heci_enable())
return;
if (!me_read_config32(PCI_ME_HFSTS1, &hfsts1.raw))
return;
don't need any change here
hfsts1.raw = me_read_config32(PCI_ME_HFSTS1);
same as above. just check if (!is_heci_enable()) return; at line 232 and then don't need to make any change
File src/soc/intel/common/block/cse/cse.c:
add helper function to check HECI is enable/visible before asking for read status
bool is_heci_enable(const struct device *dev)
{
if (!cse_dev || !cse_dev->enabled) {
printk(BIOS_WARNING, "HECI: No CSE device\n");
return false;
}
if (pci_read_config16(PCH_DEV_CSE, PCI_VENDOR_ID) == 0xFFFF) {
printk(BIOS_WARNING, "HECI: CSE device is hidden\n");
return false;
}
return true;
}
let all caller check is_heci_enable() returns true before calling me_read_config32() in that case we can avoid multiple time device presence check which looks very redundant IMHO
uint32_t me_read_config32(int offset)
{
return pci_read_config32(PCH_DEV_CSE, offset);
}
so your caller doesn't required much changes
File src/soc/intel/skylake/me.c:
Patch Set #17, Line 241: if (!me_read_config32(PCI_ME_HFSTS1, &hfs.data))
same as CNL
To view, visit change 35225. To unsubscribe, or for help writing mail filters, visit settings.