From patchwork Wed Oct 14 06:31:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ley Foon Tan X-Patchwork-Id: 7390781 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 91C36BEEA4 for ; Wed, 14 Oct 2015 06:34:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BE33A20697 for ; Wed, 14 Oct 2015 06:34:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C418E20635 for ; Wed, 14 Oct 2015 06:34:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752087AbbJNGcA (ORCPT ); Wed, 14 Oct 2015 02:32:00 -0400 Received: from mail-bl2on0062.outbound.protection.outlook.com ([65.55.169.62]:8839 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751875AbbJNGb4 (ORCPT ); Wed, 14 Oct 2015 02:31:56 -0400 Received: from CO2PR03CA0050.namprd03.prod.outlook.com (10.141.194.177) by BLUPR03MB1492.namprd03.prod.outlook.com (10.163.81.22) with Microsoft SMTP Server (TLS) id 15.1.293.16; Wed, 14 Oct 2015 06:31:53 +0000 Received: from BN1AFFO11FD007.protection.gbl (2a01:111:f400:7c10::174) by CO2PR03CA0050.outlook.office365.com (2a01:111:e400:1414::49) with Microsoft SMTP Server (TLS) id 15.1.286.15 via Frontend Transport; Wed, 14 Oct 2015 06:31:53 +0000 Authentication-Results: spf=softfail (sender IP is 66.35.236.227) smtp.mailfrom=altera.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=altera.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning altera.com discourages use of 66.35.236.227 as permitted sender) Received: from sj-itexedge03.altera.priv.altera.com (66.35.236.227) by BN1AFFO11FD007.mail.protection.outlook.com (10.58.52.67) with Microsoft SMTP Server (TLS) id 15.1.293.9 via Frontend Transport; Wed, 14 Oct 2015 06:31:52 +0000 Received: from sj-mail01.altera.com (137.57.1.6) by webmail.altera.com (66.35.236.227) with Microsoft SMTP Server (TLS) id 14.3.174.1; Tue, 13 Oct 2015 23:31:27 -0700 Received: from leyfoon-vm (pg-lftan-l.altera.com [137.57.103.123]) by sj-mail01.altera.com (8.13.7+Sun/8.13.7) with SMTP id t9E6VhQX016051; Tue, 13 Oct 2015 23:31:44 -0700 (PDT) Received: by leyfoon-vm (sSMTP sendmail emulation); Wed, 14 Oct 2015 14:31:50 +0800 From: Ley Foon Tan To: Bjorn Helgaas , Arnd Bergmann CC: , , , Ley Foon Tan , Subject: [PATCH v2 1/4] asm-generic: add pci required defines and functions Date: Wed, 14 Oct 2015 14:31:41 +0800 Message-ID: <1444804304-5213-2-git-send-email-lftan@altera.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1444804304-5213-1-git-send-email-lftan@altera.com> References: <1444804304-5213-1-git-send-email-lftan@altera.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD007; 1:26KCYFU1sAxThSTRgEqH3+bVqmHicRYqnojux4+JJMJSgNuVvr1WXLb2T4GRRvFNOHSl34A+6dr2jbRFKWNcyiCIKo2ZNxvLXa7K0tVn6Lyn3cUXw8HFXwQnQQiDAi8+nSav7oONLHUMjS7FXCvDHfQyMKMPnLocdluyFH9rE6O/6F1ydvq2iAUta0fiz/kYDBw+a0ci9rgnXRnqiEV/kQsRaXq54u6R5z6NSRjRmewRYTOCV6T+XmIeccJW3IgoUHXg2QiVcO7nzVQeoJwGIG8x5KFkWO8wdX45YLd9Cyn72EQRi/GLb9V5tyXwWgV2gN2mUOdqX8I40gYkiOv+zS8sjXJoYMQpRkKVZd70o90m//82tu/rQLmPL+wwfADh X-Forefront-Antispam-Report: CIP:66.35.236.227; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(189002)(199003)(42186005)(5001770100001)(6806005)(106466001)(48376002)(64706001)(47776003)(33646002)(5008740100001)(11100500001)(5007970100001)(105596002)(50226001)(50466002)(87936001)(97736004)(81156007)(229853001)(2950100001)(19580405001)(50986999)(76176999)(86362001)(189998001)(46102003)(92566002)(5001960100002)(36756003)(5003940100001)(19580395003)(7099028)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB1492; H:sj-itexedge03.altera.priv.altera.com; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1492; 2:aNHCIrKNv5p4AX0SQmFDY6rjgpN4NXTFZZHLWznMthcHp/rnnJSEYGwslS/uSRK2zX6Z/EHqwx95Ckd/QMpDLS6xkSChULeKp0q7X5VdbuemfQfDmpWDPamq8zG7r1BPSN9MgKV0HhUiU8bThX0lyAwCuKW9/DWgRZpTAsmFiBE=; 3:cQZZGkiSrWICRgsso/PbicJy6A3z6Qv3mWySszTM+ZX5YreG9GCQoOx0CEdqIe2AEz+TuBUkW4uNa8wjxLCLTH584QcjaLuM2IKkMGGqDke9qHX1t+7xkYoWlndOToNog/K/QJ1ur3CKAQW0bSOqSJQviUN9W0lkch+tzpLE7RguV9MnCEzooP+teMNEZW0Kmd081PMYGr1ogijkFK84Kkmxceq+6gOCVxwtqWjlCRg=; 25:fpapHvXSJO2CICGjiOu8dnS7LVALygs04lceaaCAMq0Vd1Zf4DKHjgoHfA9u6Jbodm9lNhSygGgg+5NbdO56hW33mFqEiFP7e1JkvGmDT4h34TZkGD9d/SIxrQZ9qj+kakRj8L+CpbXN5ZJZ/Cn9hsjhLTkqIX9L+wtMGPfbEf0YI3RhbqupfgtXcsHIPr0V6mJU9yUdkMSFYC2jiy6DB84/6ZRWjt+46Fk1h1WPb8ye4m8DnNYLuS1batQb+24dsD7QREt59if2Pgtu+tpsNg==; 20:aGq8TCYLeaQXITLPbrcrWzbZ5cHL3jn+IN/BzqwHtNvEFWA/WCc544qu6CXrhuk/eDaeBVgREqrV4kPvAy8/CTi0FnaO9bxEAEfhaX5ke40KpQxTU45+7akhe0o3Dv6Yypc79ysMXRw9VQQvMyXmEzqgXUESp3vQEctwBV1EaW0= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB1492; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(80048183373757); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001); SRVR:BLUPR03MB1492; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1492; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1492; 4:f5jjJoO1RQTgGTT7TZEb+Ad+F1dGcfNa75+KbixB6Rukmy/zkujA4/PMNQux/qwienzN//FCNH57xa+vGMtYlQzgJUBYueYa7dSX3RwU+uUiG+Da1WYqe/d7Zwq23RVCmjtZtt33B1qWFPWy1W2O5QEGEtNYY2nsZapO/p8mNXzAYHkbVIz6jk+97UQKxvTSSXuMUhWr1tRtiy8sjQMu+fLq6RZpY1nruyILUZHe1xONenSZkqkMwhtw1mlVpYuLblliVNCA9e8/bvAl57bSon12qcIsyz/K/rwaxcITv5WtoxN2UpbnjjPMMif6UlP4du+fbofljMUQEWh/oO1ccejGl8zZhuacAZLA12GBMVk= X-Forefront-PRVS: 0729050452 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR03MB1492; 23:9S8z69TJxJYI3VAqxninEf+IOMYitEc4c6p2BqxdP?= =?us-ascii?Q?UpFrkAVbeZXxWiyXYB2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=?us-ascii?Q?wDVNWeujrLJn0BjWgHLR9vCsqKQcw02OputoI22i4XirHkuOo0vVsPjJ4IRu?= =?us-ascii?Q?Jh1FhbnAb+XTviqXpiR2BO1?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1492; 5:Za8/WheQupNmc9+lfFxmlsFsm61EeTQ92k1S/5/vP/8SnnUrLzm5DW9kq9KCyj2JMCkIAiIx6X7yGFrRZ1J290hSUNgdHnoMrJIu+sXkPcbesZM5W3kFRwEl9YOLGg2wjFpIjqClLGbIvrP3cJdvWw==; 24:63o7CvpKHCwrl5rxZK8FRiBzlW+GkYsXz59fvI/Vj3+/Hn9XRa1/SNOhHxKReSq0pRUxFDV0aBjOMEiav/p1IvcW3Nq0vR5Fih0J5sQkqS0=; 20:uatVoJPKH6wq10l2inmC4GPb+kmfGARp7vWnLAYh4E965wk6JIFIC72FKUDDIuwJyzUKuA0ySDiX+xtnBzVLsmvH0vC7xaWjD1BldP1mbXy8icGn22IIVrpzndIfyGrM4XUO2GOUfFcG0lVj67kAm4dTHH16PVurYZUyYTYwFYM= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2015 06:31:52.7426 (UTC) X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fbd72e03-d4a5-4110-adce-614d51f2077a; Ip=[66.35.236.227]; Helo=[sj-itexedge03.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1492 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, T_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 Add the generic #define and functions that required by the PCI framework. Architecture pci.h can overwrite with their implementation if needed. Signed-off-by: Ley Foon Tan --- include/asm-generic/pci.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/include/asm-generic/pci.h b/include/asm-generic/pci.h index f24bc51..2771b32 100644 --- a/include/asm-generic/pci.h +++ b/include/asm-generic/pci.h @@ -21,4 +21,38 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) #define PCI_DMA_BUS_IS_PHYS (1) #endif +#ifdef CONFIG_PCI + +#ifndef PCIBIOS_MIN_IO +#define PCIBIOS_MIN_IO (0UL) +#endif + +#ifndef PCIBIOS_MIN_MEM +#define PCIBIOS_MIN_MEM (0UL) +#endif + +#ifndef pcibios_assign_all_busses +#define pcibios_assign_all_busses() (pci_has_flag(PCI_REASSIGN_ALL_BUS)) +#endif + +#ifndef pci_proc_domain +#define pci_proc_domain pci_proc_domain +static inline int pci_proc_domain(struct pci_bus *bus) +{ +#ifdef CONFIG_PCI_DOMAINS_GENERIC + return pci_domain_nr(bus); +#else + return 1; +#endif +} +#endif + +extern int isa_dma_bridge_buggy; + +#else + +#define isa_dma_bridge_buggy (0) + +#endif /* CONFIG_PCI */ + #endif /* _ASM_GENERIC_PCI_H */