mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
0ab7b12c49
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJYUt1vAAoJEFmIoMA60/r8abgP/3R+5Lsk5/kfAHk5/2Mtqbvg mZ0eDUpY9GbUeMjSq84Nr2H8u7d+1AJCCu8KtDJYZCmjZpnSp2SuE2PS5JoGC7zC fintD24jlIF4/J5+HeVXXmbfr3xATxvpTuiSLEi8sLBRJ3KRIswhMSwoPwOyeTQw v/EclWKPGYcI5Zp0oigY9/Jd3q3lQ17KXppi/0dDoLh7PNOFvEHItXWzmf++u/NP iYT9R1xmzEsy0/HRd6hiwPT2xA8YsAXxgobhHooUgh1FWmZ02Tg1WjgDemOW4lVh kNIUcsLczh7wZCceogrrJ+pwb9+NyyIyKuHPv6OG3ieyz1IZdznaj1fAE5HJYiPo eVS7cP1S6DyV3Y5qFj5F2dSRS7T4GXdXG5mNhmeCpUHs0vfzSCG36jLmhTy8UIxs 1rCf5oFa+uU9q0okfH8VtcGOXqWjGgyxTSGGfF71HUMLnPbsci2fxC2cO6svzIX7 wDY0uxOzpyMIYMuQR6iz7VqvAwEaZ+7pfMIrWWdDcQ9/5tCNJ49cLuKaThPL4bVu juiGBQtnTLg8tjrhjDL9tQiJpuVIweVXyyQ1fvZoVXkMLlhVCF2ttirvwFUit2PB 84OlevQZ+9QdE/qalrWbv4qzhesuiwu0avkzjGoqg6tWTF0epu2AHI2vqy6UBYEG tcfJPEcz1019PKZNSvWy =ut0k -----END PGP SIGNATURE----- Merge tag 'pci-v4.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: "PCI changes: - add support for PCI on ARM64 boxes with ACPI. We already had this for theoretical spec-compliant hardware; now we're adding quirks for the actual hardware (Cavium, HiSilicon, Qualcomm, X-Gene) - add runtime PM support for hotplug ports - enable runtime suspend for Intel UHCI that uses platform-specific wakeup signaling - add yet another host bridge registration interface. We hope this is extensible enough to subsume the others - expose device revision in sysfs for DRM - to avoid device conflicts, make sure any VF BAR updates are done before enabling the VF - avoid unnecessary link retrains for ASPM - allow INTx masking on Mellanox devices that support it - allow access to non-standard VPD for Chelsio devices - update Broadcom iProc support for PAXB v2, PAXC v2, inbound DMA, etc - update Rockchip support for max-link-speed - add NVIDIA Tegra210 support - add Layerscape LS1046a support - update R-Car compatibility strings - add Qualcomm MSM8996 support - remove some uninformative bootup messages" * tag 'pci-v4.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (115 commits) PCI: Enable access to non-standard VPD for Chelsio devices (cxgb3) PCI: Expand "VPD access disabled" quirk message PCI: pciehp: Remove loading message PCI: hotplug: Remove hotplug core message PCI: Remove service driver load/unload messages PCI/AER: Log AER IRQ when claiming Root Port PCI/AER: Log errors with PCI device, not PCIe service device PCI/AER: Remove unused version macros PCI/PME: Log PME IRQ when claiming Root Port PCI/PME: Drop unused support for PMEs from Root Complex Event Collectors PCI: Move config space size macros to pci_regs.h x86/platform/intel-mid: Constify mid_pci_platform_pm PCI/ASPM: Don't retrain link if ASPM not possible PCI: iproc: Skip check for legacy IRQ on PAXC buses PCI: pciehp: Leave power indicator on when enabling already-enabled slot PCI: pciehp: Prioritize data-link event over presence detect PCI: rcar: Add gen3 fallback compatibility string for pcie-rcar PCI: rcar: Use gen2 fallback compatibility last PCI: rcar-gen2: Use gen2 fallback compatibility last PCI: rockchip: Move the deassert of pm/aclk/pclk after phy_init() ..
89 lines
1.9 KiB
C
89 lines
1.9 KiB
C
/*
|
|
* Intel MID platform PM support
|
|
*
|
|
* Copyright (C) 2016, Intel Corporation
|
|
*
|
|
* Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms and conditions of the GNU General Public License,
|
|
* version 2, as published by the Free Software Foundation.
|
|
*/
|
|
|
|
#include <linux/init.h>
|
|
#include <linux/pci.h>
|
|
|
|
#include <asm/cpu_device_id.h>
|
|
#include <asm/intel-family.h>
|
|
#include <asm/intel-mid.h>
|
|
|
|
#include "pci.h"
|
|
|
|
static bool mid_pci_power_manageable(struct pci_dev *dev)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
static int mid_pci_set_power_state(struct pci_dev *pdev, pci_power_t state)
|
|
{
|
|
return intel_mid_pci_set_power_state(pdev, state);
|
|
}
|
|
|
|
static pci_power_t mid_pci_get_power_state(struct pci_dev *pdev)
|
|
{
|
|
return intel_mid_pci_get_power_state(pdev);
|
|
}
|
|
|
|
static pci_power_t mid_pci_choose_state(struct pci_dev *pdev)
|
|
{
|
|
return PCI_D3hot;
|
|
}
|
|
|
|
static int mid_pci_sleep_wake(struct pci_dev *dev, bool enable)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static int mid_pci_run_wake(struct pci_dev *dev, bool enable)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static bool mid_pci_need_resume(struct pci_dev *dev)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
static const struct pci_platform_pm_ops mid_pci_platform_pm = {
|
|
.is_manageable = mid_pci_power_manageable,
|
|
.set_state = mid_pci_set_power_state,
|
|
.get_state = mid_pci_get_power_state,
|
|
.choose_state = mid_pci_choose_state,
|
|
.sleep_wake = mid_pci_sleep_wake,
|
|
.run_wake = mid_pci_run_wake,
|
|
.need_resume = mid_pci_need_resume,
|
|
};
|
|
|
|
#define ICPU(model) { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, }
|
|
|
|
/*
|
|
* This table should be in sync with the one in
|
|
* arch/x86/platform/intel-mid/pwr.c.
|
|
*/
|
|
static const struct x86_cpu_id lpss_cpu_ids[] = {
|
|
ICPU(INTEL_FAM6_ATOM_PENWELL),
|
|
ICPU(INTEL_FAM6_ATOM_MERRIFIELD),
|
|
{}
|
|
};
|
|
|
|
static int __init mid_pci_init(void)
|
|
{
|
|
const struct x86_cpu_id *id;
|
|
|
|
id = x86_match_cpu(lpss_cpu_ids);
|
|
if (id)
|
|
pci_set_platform_pm(&mid_pci_platform_pm);
|
|
return 0;
|
|
}
|
|
arch_initcall(mid_pci_init);
|