Example #1
0
 /*----------------------------------------------------------------------------------------*/
VOID
STATIC
PcieClkPmEnableOnDevice (
  IN       PCI_ADDR             Device,
  IN       AMD_CONFIG_PARAMS    *StdHeader
  )
{
  UINT8                   MaxFunc;
  UINT8                   CurrentFunc;
  AGESA_STATUS            AgesaStatus;
  AgesaStatus = AGESA_UNSUPPORTED;
  if (PcieClkPmCheckDeviceCapability (Device, StdHeader)) {
    MaxFunc = GnbLibPciIsMultiFunctionDevice (Device.AddressValue, StdHeader) ? 7 : 0;
    for (CurrentFunc = 0; CurrentFunc <= MaxFunc; CurrentFunc++) {
      Device.Address.Function = CurrentFunc;
      if (GnbLibPciIsDevicePresent (Device.AddressValue, StdHeader)) {
        AgesaStatus = AgesaGnbOemCallout (StdHeader, AGESA_GNB_PCIE_CLK_REQ, &Device);
        if (AgesaStatus == AGESA_SUCCESS) {
          IDS_HDT_CONSOLE (GNB_TRACE, "  Enable Clock Power Managment for Device = %d:%d:%d\n",
          Device.Address.Bus,
          Device.Address.Device,
          Device.Address.Function
          );
          PcieClkPmEnableOnFunction (Device, StdHeader);
        }
      }
    }
  }
}
Example #2
0
 /*----------------------------------------------------------------------------------------*/
STATIC VOID
PcieClkPmEnableOnDevice (
  IN       PCI_ADDR             Device,
  IN       AMD_CONFIG_PARAMS    *StdHeader
  )
{
  UINT8 MaxFunc;
  UINT8 CurrentFunc;
  if (PcieClkPmCheckDeviceCapability (Device, StdHeader)) {
    MaxFunc = GnbLibPciIsMultiFunctionDevice (Device.AddressValue, StdHeader) ? 7 : 0;
    for (CurrentFunc = 0; CurrentFunc <= MaxFunc; CurrentFunc++) {
      Device.Address.Function = CurrentFunc;
      if (GnbLibPciIsDevicePresent (Device.AddressValue, StdHeader)) {
       IDS_HDT_CONSOLE (GNB_TRACE, "  Enable Clock Power Managment for Device = %d:%d:%d\n",
        Device.Address.Bus,
        Device.Address.Device,
        Device.Address.Function
        );
        PcieClkPmEnableOnFunction (Device, StdHeader);
      }
    }
  }
}