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: 7498271 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@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 876CEBEEA4 for ; Tue, 27 Oct 2015 16:45:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D41DB208D1 for ; Tue, 27 Oct 2015 16:45:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EE7482087A for ; Tue, 27 Oct 2015 16:45:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754270AbbJ0Qox (ORCPT ); Tue, 27 Oct 2015 12:44:53 -0400 Received: from mail-lb0-f182.google.com ([209.85.217.182]:34294 "EHLO mail-lb0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965127AbbJ0Qj2 (ORCPT ); Tue, 27 Oct 2015 12:39:28 -0400 Received: by lbbwb3 with SMTP id wb3so68104520lbb.1 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=WJr+nr7SLc1rbD0yq22JBe/WcbF/oZSYVlI8RtNUEpez5JOG0dwWNMsqs//rAp/zXE QukbUVQOGLv8lPuDLxS7W+rGWDoPQ1k1/zb5KntvIEYUjnYqnw7FjdGVo04sKQQgZ4Fa d0LNOoaRQSeXi0Hxfk45n5jcMa43uIr6fJs+qyA00I5/SJETuGhfMHeOc/1TwAh6PxYX KoFB4yOsX7cZAsaKd9WTxUaUX3wboM/89dBnJ836nyVZvrliGG8MSth++T863SOhiNrt hTs7OvGtN5agdDQ940O59c1tLD7h5g5TK6g134Ydgar0XBR+HJ8ntmpwpdtQAB9SgTeX pQwg== X-Gm-Message-State: ALoCoQlD6onTj9sTynJNgsTasER8p6asPFI+nT1ufWqYOnQp3DpCZ9hdA9diQT28zSetIEsOJC7l 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 Cc: jiang.liu@linux.intel.com, robert.richter@caviumnetworks.com, Narinder.Dhillon@caviumnetworks.com, ddaney@caviumnetworks.com, Liviu.Dudau@arm.com, tglx@linutronix.de, wangyijing@huawei.com, Suravee.Suthikulpanit@amd.com, msalter@redhat.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, Tomasz Nowicki 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> 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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;