From patchwork Tue Feb 16 13:53:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 8325991 Return-Path: X-Original-To: patchwork-linux-arm@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 B2012C02AA for ; Tue, 16 Feb 2016 13:56:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5643F20295 for ; Tue, 16 Feb 2016 13:56:31 +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 62A1320279 for ; Tue, 16 Feb 2016 13:56:30 +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 1aVg5M-0002KT-JE; Tue, 16 Feb 2016 13:54:36 +0000 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aVg54-0002AW-RM for linux-arm-kernel@lists.infradead.org; Tue, 16 Feb 2016 13:54:21 +0000 Received: by mail-wm0-x234.google.com with SMTP id g62so153821038wme.0 for ; Tue, 16 Feb 2016 05:53:58 -0800 (PST) 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=+f0DWq5ufmp0V5PobwQ7coWrMmGKbcSqsHYMm3wCe0E=; b=aTVFjLlnlUJKvG+rXBA1Glo0fJjU/xWOij7XgRVJbl/FpLVGO0p2h5+xsgXcRn44j0 PtN+j3FaBviz3Ds1vDMbu0ATUPaKTx0XiqCTIbbsAdsp5vdO2x1vbYLqL8UJsL8eBrIp SuEjkKzH1z5OG39IZ1/wYp8F3PDGE92c2ubsLM3uT5pblE9+67ROzzoxVK1JSQfD3MhB mk3Efp0zwlRwpI5uUQNgZxWvIJqQYkzfUdTrVlzb3+8Aah3cMDT6gz44cIeRDVnWsLHG NGBaojqNhkLWxTtTqh5542hL3Ua+KtLy2V4UuOKPECl7MRYMpcW8P2GdNBRRqEMOSEhJ 570A== 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=+f0DWq5ufmp0V5PobwQ7coWrMmGKbcSqsHYMm3wCe0E=; b=GDAqlO7l754oUJ3UHdMZkq46ZZW8pSRemopu+4ieWxmRqACSUaPi+QJ7iuYGi/a5im j6jLJpYhc+MqOSjcCbubF+ArFhOaOSqMXCmZMPKdG/vk7mdG3Ba9Ds9M+VQcdvaBC55U o0h57TFlLCyEJm2A0qdbfTgzGzyAnUOKbMVQVMXKHeSgS6X0m3JatzFclBfwj/WEwZnS t3rdOAucz/TH0kRSmU8wRj15FT3+DBUZ47WeOU1JiSs7NR+T1gEDh4MqnZLR3oxmhpJz rq/uGmpgqRAKMc+QKGiwxxnEuWRCD3WXc0Dc0ovpYEoPtfqm4PNhiKaiqN+f3OSXSz1N EDAQ== X-Gm-Message-State: AG10YORGTX+WZYP0JZWgn7Utpnx/skfbpnukPhf1GWM1uX29ECtb5GGy0shkcI/e21YSmA== X-Received: by 10.28.179.130 with SMTP id c124mr19766326wmf.76.1455630836096; Tue, 16 Feb 2016 05:53:56 -0800 (PST) Received: from tn-HP-4.semihalf.local ([80.82.22.190]) by smtp.gmail.com with ESMTPSA id q129sm20833462wmd.14.2016.02.16.05.53.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Feb 2016 05:53:55 -0800 (PST) From: Tomasz Nowicki To: helgaas@kernel.org, arnd@arndb.de, will.deacon@arm.com, catalin.marinas@arm.com, rafael@kernel.org, hanjun.guo@linaro.org, Lorenzo.Pieralisi@arm.com, okaya@codeaurora.org, jiang.liu@linux.intel.com, jchandra@broadcom.com, Stefano.Stabellini@eu.citrix.com Subject: [PATCH V5 02/15] acpi, pci, mcfg: Provide default RAW ACPI PCI config space accessors. Date: Tue, 16 Feb 2016 14:53:32 +0100 Message-Id: <1455630825-27253-3-git-send-email-tn@semihalf.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455630825-27253-1-git-send-email-tn@semihalf.com> References: <1455630825-27253-1-git-send-email-tn@semihalf.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160216_055419_329883_25915D8D X-CRM114-Status: UNSURE ( 9.83 ) X-CRM114-Notice: Please train this message. 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: jcm@redhat.com, linaro-acpi@lists.linaro.org, linux-pci@vger.kernel.org, Liviu.Dudau@arm.com, ddaney@caviumnetworks.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, robert.richter@caviumnetworks.com, Suravee.Suthikulpanit@amd.com, msalter@redhat.com, wangyijing@huawei.com, Tomasz Nowicki , mw@semihalf.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. Suggested-by: Lorenzo Pieralisi Signed-off-by: Tomasz Nowicki Tested-by: Suravee Suthikulpanit Tested-by: Jeremy Linton Tested-by: Duc Dang Tested-by: Dongdong Liu Tested-by: Hanjun Guo Tested-by: Graeme Gregory Tested-by: Sinan Kaya Reviewed-by: Lorenzo Pieralisi --- drivers/acpi/pci_mcfg.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c index ea84365..0467b00 100644 --- a/drivers/acpi/pci_mcfg.c +++ b/drivers/acpi/pci_mcfg.c @@ -21,6 +21,26 @@ static DEFINE_MUTEX(pci_mmcfg_lock); LIST_HEAD(pci_mmcfg_list); +/* + * 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; +} + static void list_add_sorted(struct pci_mmcfg_region *new) { struct pci_mmcfg_region *cfg;