[Skiboot] [PATCH 4/7] core/pci: Fix initial PCIe slot power state

Andrew Donnellan andrew.donnellan at au1.ibm.com
Thu Aug 11 15:16:43 AEST 2016


On 11/08/16 14:55, Gavin Shan wrote:
> +	if (slot->slot_cap & PCICAP_EXP_SLOTCAP_PWCTRL) {
>  		slot->power_ctl = 1;
> +
> +		/* The power is on by default */
> +		slot->power_state = 1;

Can we use PCI_SLOT_POWER_ON rather than 1?

> +		if (pd && ecap) {
> +			pci_cfg_read16(phb, pd->bdfn,
> +				       ecap + PCICAP_EXP_SLOTCTL, &slot_ctl);
> +			if (slot_ctl & PCICAP_EXP_SLOTCTL_PWRCTLR)
> +				slot->power_state = 0;

PCI_SLOT_POWER_OFF?


-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited



More information about the Skiboot mailing list