From patchwork Thu Nov 25 12:46:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 12693663 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7F822C433F5 for ; Thu, 25 Nov 2021 12:55:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NXGn3NEUbHbF1TCS9C9bEKYwlzNb+81Ugbnt0S9FV0Y=; b=kuTQpS3+ziNUuN 5cLxfWJkC5lDkHqn1tMjk3ScsiqUAPA6gt8tKZAHZr4iLppRtpIUGXt8MMSwRdOBQ1Eh7UikqA08W tfEUfZZLECxSPCiJL8DvqYpFh6k/7KEiJIDrbUa0//llUZON1HLO8cVvzf3jSqTyb5yVkECEDqJ1H 35V2y/RJGuDyRf9Tqjd2RUZaIbhDWwh3NnUPZY7TPVXK777kX+BLdwU/YE38w+/LprSnT/Mq8H01O gq9TXgrLBuYIlqZbAI2mb6ZD3KTbqnNfr5gCuG5FhzYq9Hxm4A4SsY4e8PxLaSqnnBwx0iDuyFe75 BeGOV9phubvmYQRCFXbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqEG9-007WLh-Tm; Thu, 25 Nov 2021 12:53:54 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqE9E-007StZ-QQ for linux-arm-kernel@lists.infradead.org; Thu, 25 Nov 2021 12:46:46 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id EC7A06113A; Thu, 25 Nov 2021 12:46:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637844404; bh=KCtYPffRqVHBtYw7sAB0t28qNlEFwS3xDyAknC6AO+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d95IwIRJOHxQXlTYX3JKRREc2fJIC8ojDIZpx5lM3rcShz1ijwt9y79ybml0xmgmQ q0EgPt15+6aWA0dV/+eESEPlRXwjUSwkCxwfLgI7lwyDjqtCnqzi5aYx4bd77+ipdK Oz//kqL/R5UNQSUTUoLsmDFcdGtpoq56ShnGIC513NW6Rs93Kjq2kap+LpxSCQ2M6n o3Tsa9Rgp6EuAABJpazN8rUv7gQRz2WZjO2wLHJGWonvactjiodkP3dEq6iyw5AeyP L1nZ3OyekGhszZKL/4sJRYFYo5d/5MvtimRkgPyq0PliCvtl+lg3MBjOHcXgM05jtJ 1IWnX8IH1J0Jw== Received: by pali.im (Postfix) id AD86167E; Thu, 25 Nov 2021 13:46:43 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Thomas Petazzoni , Lorenzo Pieralisi , Rob Herring , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , =?utf-8?q?Marek_Beh=C3=BAn?= Cc: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/15] PCI: mvebu: Fix support for PCI_EXP_DEVCTL on emulated bridge Date: Thu, 25 Nov 2021 13:46:03 +0100 Message-Id: <20211125124605.25915-14-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211125124605.25915-1-pali@kernel.org> References: <20211125124605.25915-1-pali@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211125_044644_931342_0CAD393C X-CRM114-Status: UNSURE ( 9.64 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Comment in Armada 370 functional specification is misleading. PCI_EXP_DEVCTL_*RE bits are supported and configures receiving of error interrupts. Signed-off-by: Pali Rohár Fixes: 1f08673eef12 ("PCI: mvebu: Convert to PCI emulated bridge config space") Cc: stable@vger.kernel.org --- drivers/pci/controller/pci-mvebu.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c index 3075ea98c131..c9b736344b56 100644 --- a/drivers/pci/controller/pci-mvebu.c +++ b/drivers/pci/controller/pci-mvebu.c @@ -545,9 +545,7 @@ mvebu_pci_bridge_emul_pcie_conf_read(struct pci_bridge_emul *bridge, break; case PCI_EXP_DEVCTL: - *value = mvebu_readl(port, PCIE_CAP_PCIEXP + PCI_EXP_DEVCTL) & - ~(PCI_EXP_DEVCTL_URRE | PCI_EXP_DEVCTL_FERE | - PCI_EXP_DEVCTL_NFERE | PCI_EXP_DEVCTL_CERE); + *value = mvebu_readl(port, PCIE_CAP_PCIEXP + PCI_EXP_DEVCTL); break; case PCI_EXP_LNKCAP: @@ -658,13 +656,6 @@ mvebu_pci_bridge_emul_pcie_conf_write(struct pci_bridge_emul *bridge, switch (reg) { case PCI_EXP_DEVCTL: - /* - * Armada370 data says these bits must always - * be zero when in root complex mode. - */ - new &= ~(PCI_EXP_DEVCTL_URRE | PCI_EXP_DEVCTL_FERE | - PCI_EXP_DEVCTL_NFERE | PCI_EXP_DEVCTL_CERE); - mvebu_writel(port, new, PCIE_CAP_PCIEXP + PCI_EXP_DEVCTL); break;