From patchwork Mon Feb 29 12:56:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 8453341 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D8AB09F38C for ; Mon, 29 Feb 2016 12:56:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 08FA72027D for ; Mon, 29 Feb 2016 12:56:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AA7ED202B8 for ; Mon, 29 Feb 2016 12:56:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751390AbcB2M4P (ORCPT ); Mon, 29 Feb 2016 07:56:15 -0500 Received: from mga04.intel.com ([192.55.52.120]:60693 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750752AbcB2M4N (ORCPT ); Mon, 29 Feb 2016 07:56:13 -0500 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP; 29 Feb 2016 04:56:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,520,1449561600"; d="scan'208";a="755188752" Received: from black.fi.intel.com ([10.237.72.93]) by orsmga003.jf.intel.com with ESMTP; 29 Feb 2016 04:56:10 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id 2ABBD1AB; Mon, 29 Feb 2016 14:56:07 +0200 (EET) From: Mika Westerberg To: Bjorn Helgaas Cc: "Rafael J. Wysocki" , Qipeng Zha , Qi Zheng , Mika Westerberg , linux-pci@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 5/6] PCI: Enable runtime PM for Intel Sunrisepoint PCIe root ports Date: Mon, 29 Feb 2016 14:56:05 +0200 Message-Id: <1456750566-116248-6-git-send-email-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456750566-116248-1-git-send-email-mika.westerberg@linux.intel.com> References: <1456750566-116248-1-git-send-email-mika.westerberg@linux.intel.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Intel Sunrisepoint (Skylake PCH) PCIe root ports are capable of being suspended runtime so allow runtime PM for these ports. Signed-off-by: Mika Westerberg --- drivers/pci/pcie/portdrv_pci.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index eb0f425f51cc..864c1bdd0e91 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c @@ -81,6 +81,7 @@ static int pcie_portdrv_restore_config(struct pci_dev *dev) enum pcie_port_type { PCIE_PORT_DEFAULT, + PCIE_PORT_SPT, }; struct pcie_port_config { @@ -92,6 +93,10 @@ static const struct pcie_port_config pcie_port_configs[] = { [PCIE_PORT_DEFAULT] = { .suspend_allowed = true, }, + [PCIE_PORT_SPT] = { + .suspend_allowed = true, + .runtime_suspend_allowed = true, + }, }; #ifdef CONFIG_PM @@ -431,6 +436,9 @@ static void pcie_portdrv_err_resume(struct pci_dev *dev) * LINUX Device Driver Model */ static const struct pci_device_id port_pci_ids[] = { + /* Intel Sunrisepoint */ + { PCI_VDEVICE(INTEL, 0x9d14), .driver_data = PCIE_PORT_SPT }, + { PCI_VDEVICE(INTEL, 0x9d15), .driver_data = PCIE_PORT_SPT }, /* handle any PCI-Express port */ { PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_PCI << 8) | 0x00), ~0), .driver_data = PCIE_PORT_DEFAULT },