From patchwork Tue Oct 27 16:38:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 7498071 Return-Path: X-Original-To: patchwork-linux-arm@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 C207D9F327 for ; Tue, 27 Oct 2015 16:42:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE147207C8 for ; Tue, 27 Oct 2015 16:42:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1D0E22087A for ; Tue, 27 Oct 2015 16:42:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zr7Ig-00085E-EX; Tue, 27 Oct 2015 16:40:42 +0000 Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zr7Ho-0006PW-IB for linux-arm-kernel@lists.infradead.org; Tue, 27 Oct 2015 16:39:51 +0000 Received: by lbbes7 with SMTP id es7so68139183lbb.2 for ; Tue, 27 Oct 2015 09:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf_com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SfKs0H1d/AoT/neS8CLSlfFBS6OdpYq1qo7wSAz73sQ=; b=dFt1VjbzztAA4LRL0VuF4/NtRckh5mvkJSkRxG7VTTHKx3MP4QkCNymb12oa0ozy92 nykmtgWD92TwV9HK5qFXLGyA1IMT3MZqJ+m25cAb4OE7rJwa1/GMcB3vMFTIuBXtYrDL xHTRZ4JEiYARbIq1kNPXE2LRph5C38tZmhGIiXmjjAh7llGCs97OMkI3K+PckHx9GYFJ CS6YN3Kb4RXPzqngZ+YqUIZ16JrdC2wfAkDpeIhDuJzaLSd/vtrxBF8arsE9F1wM7Syt v7Wn5RMqN9t3KBsQjMX64ALQhsfAlqAj2QBx+MSCJ9Tkl8CLA6mKcy2MAfzowQzafK5C YAYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SfKs0H1d/AoT/neS8CLSlfFBS6OdpYq1qo7wSAz73sQ=; b=glqPUBrawrzrsb3PQCeULsTBfsWOo+XhUsIv5ro6S5pZF6CHw95tYFJvsn3iegXGaV V0ehcq/QLF+vlVAMeRSKnmCAjU6bVQSltzF4Hx90waGOxW8rCWs8q/ti6Xo+IVPRAXBP zsS/ty19RYWn6Bobfs+2w6VOFPE52Q/ul5Ee9VSbsSKkH/gPEoIis0s5TxHj6nwq73oW ntTO6oNBZzq6cDfBcCp5YDPEqOsjwi7+vGdzsYJrdpPga3+EGjrCf94PqrbwTMSbCcf0 442kyk1yifqFAgiDYQWBUTSUzUGGaWxNqWbJY2BWHw2YZmk4bIlHUh7A5Rf4jOktYjfQ 0o9Q== X-Gm-Message-State: ALoCoQkdQs9CQOI/e/FA7Tyi7QVGmyU7lVLIxdz8ZU1m5Fes/1G8s+lCAXRg8E5FX419copfOoXE X-Received: by 10.112.151.7 with SMTP id um7mr921529lbb.16.1445963966578; Tue, 27 Oct 2015 09:39:26 -0700 (PDT) Received: from tn-HP-4.semihalf.local ([80.82.22.190]) by smtp.gmail.com with ESMTPSA id kk6sm6988609lbc.48.2015.10.27.09.39.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Oct 2015 09:39:26 -0700 (PDT) From: Tomasz Nowicki To: bhelgaas@google.com, arnd@arndb.de, will.deacon@arm.com, catalin.marinas@arm.com, rjw@rjwysocki.net, hanjun.guo@linaro.org, Lorenzo.Pieralisi@arm.com Subject: [PATCH V1 06/11] pci, acpi, mcfg: Provide default RAW ACPI PCI config space accessors. Date: Tue, 27 Oct 2015 17:38:37 +0100 Message-Id: <1445963922-22711-7-git-send-email-tn@semihalf.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445963922-22711-1-git-send-email-tn@semihalf.com> References: <1445963922-22711-1-git-send-email-tn@semihalf.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151027_093949_077098_B2938E50 X-CRM114-Status: GOOD ( 12.14 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, linux-pci@vger.kernel.org, Liviu.Dudau@arm.com, ddaney@caviumnetworks.com, Narinder.Dhillon@caviumnetworks.com, linux-acpi@vger.kernel.org, robert.richter@caviumnetworks.com, Suravee.Suthikulpanit@amd.com, msalter@redhat.com, wangyijing@huawei.com, Tomasz Nowicki , tglx@linutronix.de, jiang.liu@linux.intel.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Lets keep RAW ACPI PCI config space accessors empty by default, since we are note sure if they are necessary accross all archs. Once we sort this out, we can provide generic version or let architectures to overwrite, like now x86. Signed-off-by: Tomasz Nowicki --- drivers/acpi/mcfg.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/acpi/mcfg.c b/drivers/acpi/mcfg.c index 745b83e..3e1e7be 100644 --- a/drivers/acpi/mcfg.c +++ b/drivers/acpi/mcfg.c @@ -9,9 +9,30 @@ #include #include +#include #define PREFIX "MCFG: " +/* + * raw_pci_read/write - raw ACPI PCI config space accessors. + * + * By defauly (__weak) these accessors are empty and should be overwritten + * by architectures which support operations on ACPI PCI_Config regions, + * see osl.c file. + */ + +int __weak raw_pci_read(unsigned int domain, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *val) +{ + return PCIBIOS_DEVICE_NOT_FOUND; +} + +int __weak raw_pci_write(unsigned int domain, unsigned int bus, + unsigned int devfn, int reg, int len, u32 val) +{ + return PCIBIOS_DEVICE_NOT_FOUND; +} + int __init acpi_parse_mcfg(struct acpi_table_header *header) { struct acpi_table_mcfg *mcfg;