From patchwork Tue Jan 19 19:54:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Covington X-Patchwork-Id: 8064811 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 71697BEEED for ; Tue, 19 Jan 2016 19:55:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B0ACA2056D for ; Tue, 19 Jan 2016 19:55:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CCA2120575 for ; Tue, 19 Jan 2016 19:55:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757577AbcASTzE (ORCPT ); Tue, 19 Jan 2016 14:55:04 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:37354 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757568AbcASTyu (ORCPT ); Tue, 19 Jan 2016 14:54:50 -0500 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 8151D60630; Tue, 19 Jan 2016 19:54:49 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 66A656037C; Tue, 19 Jan 2016 19:54:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from illium.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cov@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id CC71460376; Tue, 19 Jan 2016 19:54:47 +0000 (UTC) From: Christopher Covington To: Tomasz Nowicki , "Rafael J. Wysocki" , Len Brown , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, Timur Tabi , Jon Masters , Mark Langsdorf , Sinan Kaya , Christopher Covington Subject: [PATCH] pci, acpi: QDF2xxx 32 bit config space accessors Date: Tue, 19 Jan 2016 14:54:19 -0500 Message-Id: <1453233259-29562-1-git-send-email-cov@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1452691267-32240-21-git-send-email-tn@semihalf.com> References: <1452691267-32240-21-git-send-email-tn@semihalf.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Qualcomm Technologies QDF2xxx SoCs require 32 bit accessors to be used for the PCI configuration space. Register the appropriate quirk. Signed-off-by: Christopher Covington --- This patch depends on Tomasz Nowicki's ACPI support for PCI: http://lists.infradead.org/pipermail/linux-arm-kernel/2016-January/thread.html#399200 drivers/acpi/mcfg.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/acpi/mcfg.c b/drivers/acpi/mcfg.c index ec5fe7b..dee4964 100644 --- a/drivers/acpi/mcfg.c +++ b/drivers/acpi/mcfg.c @@ -78,6 +78,29 @@ static struct pci_ops default_pci_mcfg_ops = { .write = pci_generic_config_write, }; +static const struct dmi_system_id qcom_qdf2xxx[] = { + { + .ident = "Qualcomm Technologies QDF2xxx", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Qualcomm"), + DMI_MATCH(DMI_PRODUCT_NAME, "QDF2"), + }, + }, + { } +}; + +static struct pci_ops qcom_qdf2xxx_pci_mcfg_ops = { + .map_bus = pci_mcfg_dev_base, + .read = pci_generic_config_read32, + .write = pci_generic_config_write32, +}; + +DECLARE_ACPI_MCFG_FIXUP(qcom_qdf2xxx, + NULL, + &qcom_qdf2xxx_pci_mcfg_ops, + PCI_MCFG_DOMAIN_ANY, + PCI_MCFG_BUS_ANY); + struct pci_ops *pci_mcfg_get_ops(struct acpi_pci_root *root) { struct pci_ops *pci_mcfg_ops_quirk;