Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2420641imi; Sun, 24 Jul 2022 19:44:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t/l0NAc51lnT2ak7wHRa44gbT9DjsXQjLyzsbWjIqr9n8h1fURd3rP0W5pD0KxKmTekLDG X-Received: by 2002:a17:907:2bde:b0:72b:4da0:6f3c with SMTP id gv30-20020a1709072bde00b0072b4da06f3cmr8297568ejc.623.1658717098120; Sun, 24 Jul 2022 19:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658717098; cv=none; d=google.com; s=arc-20160816; b=Xx2pHoJir1TB34anWVAfm2uQTNyW5lb5BzD3m7wBzEVMMu1bHcqX/OggTe+IE4aDn7 lV6xxUgfnfM94OzhIh4Vs3qUG6jFW7McZMchxQbY2nIX7a8m67Iz7v6JPFuFP8VWnk/J OYOx6Qn6KLqF4EYAgyAHOZ28uyN0ntvhOxvrPQlq+8/C3p1jJ4/vzwbbS/KWSEnW65ag +JJFxM2f9sQifptOusH56GwhGm5OeLCwoU0kqGtI1NRdL/m978qmkk5HCmjYXYXTKoCN njkXKjtq6LG7822Jvhj3b0yuA61mw06LI1+/+C2mykB9Cjv9+nb1JE8XaRWRn23lq3y6 KfxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2bb8XU1Bnk4jusD63lmk3Ol2o00AOfRxKRkmAkiDP4o=; b=RysVgONpfkfS3ZPIwMD+fJ+v5T6nnDlmI5R+VItF1nK6M/x3F8yRQ7svkUxE3aL49F H/JwKpXhhzhzfdWuJ7tBcMdBDp51+7KOPXM1lszUiWecasIZ+it6KUvswCWC6+1GjmZt rRz5ky4VQIQ/Cy8I2dL7Mcldr+yOpAPTyYC64xyVXXpBS+P9gCkWFMKvL4TaAbub+03c Gp+WF6YYukh4oKf5g0o29whXE9eBoS97SbbMgXoSJ6pgqpMRyp60460i1g7TCQCGPM+O gIdin4jOAPsGhw2LAJWOoI2GOiWBdm9qj9eHoZShKQB2ZuNe8EyBUc74/7VwD3ZyEVWc aqBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fZIYHmc8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa30-20020a170907869e00b007269af37e73si11331768ejc.685.2022.07.24.19.44.33; Sun, 24 Jul 2022 19:44:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fZIYHmc8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233162AbiGYCIU (ORCPT + 99 others); Sun, 24 Jul 2022 22:08:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231421AbiGYCIQ (ORCPT ); Sun, 24 Jul 2022 22:08:16 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A48FEE3C for ; Sun, 24 Jul 2022 19:08:14 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id bk6-20020a17090b080600b001f2138a2a7bso10240352pjb.1 for ; Sun, 24 Jul 2022 19:08:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2bb8XU1Bnk4jusD63lmk3Ol2o00AOfRxKRkmAkiDP4o=; b=fZIYHmc8N+T0x4kQRJbfoR40FVeWXHFoj1Ez9pMFcXxzgRhu2PqfTJX13WZ/W+RErc OPcB5PlL1q7UBLiBsWYp3lmlcvt9LTpbaSGcKj1OlF3D9EJ2VUaL0wG5GK4fm3QG6s3F CqsJ4rBlixoSyIwWe1Al7OeyD+ZwvQEXYZw1+eILqV8AEuRLuJ+TYwAvQon6qTm4+0Wu gWL3JwtDy4xRDqckeXp1Os7f93urL1kvSDpHRRwv7nzF1i1sITAxOcmqV6odWEh4z8OZ XhuLNTpmXovVM+mTrmFrG3WgCoM+U4Llhuo/N2j7RE1xvfb7kkfWmTc0wYInGzP5GKZs AqBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2bb8XU1Bnk4jusD63lmk3Ol2o00AOfRxKRkmAkiDP4o=; b=WGg6rllkwofRNuBo6jMTfzkOT2TCZNFtOlxUd4pJ5n+NgxL1osopHIOxHDJAW3mnkX CZr/RtFegGtXkZKXE/F9r7Cfb2cqK11wNqkaNT00kyeogoeFPvXuOClKOBeAjs5azBxL qxpJxJBkii0mqI6blvp3rFDdaBfqe0fWIW0j68a50EbGIC6ja3LYQ+IiiKtbYGsVQppb 8jniYdpyYut34gNWW24oshoTOluT/1UGSUimcZNXsn6G5rNh134PsO7Bi5D37ibmwjPo di8izbCU6rfcuEtLhV3Ew8F/kIncrLo+1fSDHPrPf+5N15Io/g6inG0wy4aqeA72ep6Z yMbg== X-Gm-Message-State: AJIora9pGWo2mD5FQzWmpmVbBwjEqdxfF7zeJmq7+VgQLGIZqYFdN5fa SXabK6CpV3798p+i3YeWHFRkmq4xvZk0jQ== X-Received: by 2002:a17:902:8a86:b0:16c:4292:9f56 with SMTP id p6-20020a1709028a8600b0016c42929f56mr10268982plo.36.1658714893200; Sun, 24 Jul 2022 19:08:13 -0700 (PDT) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id b17-20020a170902d51100b0016c50179b1esm1691376plg.152.2022.07.24.19.08.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jul 2022 19:08:12 -0700 (PDT) From: Stafford Horne To: LKML Cc: Bjorn Helgaas , Arnd Bergmann , Stafford Horne , Jonas Bonn , Stefan Kristiansson , Palmer Dabbelt , Peter Zijlstra , openrisc@lists.librecores.org Subject: [PATCH v3 2/3] openrisc: Add pci bus support Date: Mon, 25 Jul 2022 11:07:36 +0900 Message-Id: <20220725020737.1221739-3-shorne@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220725020737.1221739-1-shorne@gmail.com> References: <20220725020737.1221739-1-shorne@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds required definitions to allow for PCI buses on OpenRISC. This is being tested on the OpenRISC QEMU virt platform which is in development. OpenRISC does not have IO ports so we keep the definition of IO_SPACE_LIMIT and PIO_RESERVED to be 0. Note, since commit 66bcd06099bb ("parport_pc: Also enable driver for PCI systems") all platforms that support PCI also need to support parallel port. We add a generic header to support compiling parallel port drivers, though they generally will not work as they require IO ports. Signed-off-by: Stafford Horne --- arch/openrisc/Kconfig | 5 ++++- arch/openrisc/include/asm/Kbuild | 1 + arch/openrisc/include/asm/io.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig index e814df4c483c..c7f282f60f64 100644 --- a/arch/openrisc/Kconfig +++ b/arch/openrisc/Kconfig @@ -20,8 +20,9 @@ config OPENRISC select GENERIC_IRQ_CHIP select GENERIC_IRQ_PROBE select GENERIC_IRQ_SHOW - select GENERIC_IOMAP + select GENERIC_PCI_IOMAP select GENERIC_CPU_DEVICES + select HAVE_PCI select HAVE_UID16 select GENERIC_ATOMIC64 select GENERIC_CLOCKEVENTS_BROADCAST @@ -32,6 +33,8 @@ config OPENRISC select CPU_NO_EFFICIENT_FFS if !OPENRISC_HAVE_INST_FF1 select ARCH_USE_QUEUED_RWLOCKS select OMPIC if SMP + select PCI_DOMAINS_GENERIC if PCI + select PCI_MSI if PCI select ARCH_WANT_FRAME_POINTERS select GENERIC_IRQ_MULTI_HANDLER select MMU_GATHER_NO_RANGE if MMU diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild index 3386b9c1c073..c8c99b554ca4 100644 --- a/arch/openrisc/include/asm/Kbuild +++ b/arch/openrisc/include/asm/Kbuild @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 generic-y += extable.h generic-y += kvm_para.h +generic-y += parport.h generic-y += spinlock_types.h generic-y += spinlock.h generic-y += qrwlock_types.h diff --git a/arch/openrisc/include/asm/io.h b/arch/openrisc/include/asm/io.h index c298061c70a7..625ac6ad1205 100644 --- a/arch/openrisc/include/asm/io.h +++ b/arch/openrisc/include/asm/io.h @@ -17,7 +17,7 @@ #include /* - * PCI: can we really do 0 here if we have no port IO? + * PCI: We do not use IO ports in OpenRISC */ #define IO_SPACE_LIMIT 0 -- 2.36.1