Attention is currently required from: Paul Menzel, Werner Zeh.
Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/73310 )
Change subject: device/pciexp_device.c: Do not enable common clock if already active ......................................................................
Patch Set 1:
(1 comment)
File src/device/pciexp_device.c:
https://review.coreboot.org/c/coreboot/+/73310/comment/9aae5065_f4c96763 PS1, Line 205: printk(BIOS_INFO, "Common Clock Configuration already enabled\n");
Hey Subrata, any response to my question from your side?
Yeah, something like below code ?
WDYT?
``` static bool is_ccc_enabled(struct device *root, unsigned int root_cap, struct device *endp, unsigned int endp_cap) { uint16_t root_ccc, endp_ccc;
/* No need to enable common clock if it is already active. */ root_ccc = pci_read_config16(root, root_cap + PCI_EXP_LNKCTL) & PCI_EXP_LNKCTL_CCC; endp_ccc = pci_read_config16(endp, endp_cap + PCI_EXP_LNKCTL) & PCI_EXP_LNKCTL_CCC; if (root_ccc && endp_ccc) { printk(BIOS_INFO, "Common Clock Configuration already enabled\n"); return true; } return false; } ```
``` static void pciexp_enable_common_clock(struct device *root, unsigned int root_cap, struct device *endp, unsigned int endp_cap) { if (is_ccc_enabled(....)) return; .... } ```