From patchwork Fri Oct 7 16:22:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 9366557 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E708660487 for ; Fri, 7 Oct 2016 16:23:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D88A529771 for ; Fri, 7 Oct 2016 16:23:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD3182975F; Fri, 7 Oct 2016 16:23:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 702422975F for ; Fri, 7 Oct 2016 16:23:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756704AbcJGQWs (ORCPT ); Fri, 7 Oct 2016 12:22:48 -0400 Received: from mail.kernel.org ([198.145.29.136]:45928 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756646AbcJGQWr (ORCPT ); Fri, 7 Oct 2016 12:22:47 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 58A91203AC; Fri, 7 Oct 2016 16:22:45 +0000 (UTC) Received: from localhost (unknown [69.55.156.165]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 501AC2034B; Fri, 7 Oct 2016 16:22:44 +0000 (UTC) Subject: [PATCH 07/10] PCI: altera: Swap order of altera_cra_writel() reg/val arguments To: Ley Foon Tan From: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, rfi@lists.rocketboards.org Date: Fri, 07 Oct 2016 11:22:42 -0500 Message-ID: <20161007162242.22796.78962.stgit@bhelgaas-glaptop2.roam.corp.google.com> In-Reply-To: <20161007162153.22796.13721.stgit@bhelgaas-glaptop2.roam.corp.google.com> References: <20161007162153.22796.13721.stgit@bhelgaas-glaptop2.roam.corp.google.com> User-Agent: StGit/0.16 MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Swap order of altera_cra_writel() arguments to match the "dev, pos, val" order used by pci_write_config_word() and other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-altera.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c index 06e05e9..bcc056b 100644 --- a/drivers/pci/host/pcie-altera.c +++ b/drivers/pci/host/pcie-altera.c @@ -97,8 +97,8 @@ static u32 altera_cra_readl(struct altera_pcie *altera, const u32 reg) return readl_relaxed(altera->cra_base + reg); } -static void altera_cra_writel(struct altera_pcie *altera, const u32 value, - const u32 reg) +static void altera_cra_writel(struct altera_pcie *altera, const u32 reg, + const u32 value) { writel_relaxed(value, altera->cra_base + reg); } @@ -130,9 +130,9 @@ static bool altera_pcie_hide_rc_bar(struct pci_bus *bus, unsigned int devfn, static void tlp_write_tx(struct altera_pcie *altera, struct tlp_rp_regpair_t *tlp_rp_regdata) { - altera_cra_writel(altera, tlp_rp_regdata->reg0, RP_TX_REG0); - altera_cra_writel(altera, tlp_rp_regdata->reg1, RP_TX_REG1); - altera_cra_writel(altera, tlp_rp_regdata->ctrl, RP_TX_CNTRL); + altera_cra_writel(altera, RP_TX_REG0, tlp_rp_regdata->reg0); + altera_cra_writel(altera, RP_TX_REG1, tlp_rp_regdata->reg1); + altera_cra_writel(altera, RP_TX_CNTRL, tlp_rp_regdata->ctrl); } static bool altera_pcie_valid_config(struct altera_pcie *altera, @@ -477,7 +477,7 @@ static void altera_pcie_isr(struct irq_desc *desc) & P2A_INT_STS_ALL) != 0) { for_each_set_bit(bit, &status, INTX_NUM) { /* clear interrupts */ - altera_cra_writel(altera, 1 << bit, P2A_INT_STATUS); + altera_cra_writel(altera, P2A_INT_STATUS, 1 << bit); virq = irq_find_mapping(altera->irq_domain, bit + 1); if (virq) @@ -604,9 +604,9 @@ static int altera_pcie_probe(struct platform_device *pdev) } /* clear all interrupts */ - altera_cra_writel(altera, P2A_INT_STS_ALL, P2A_INT_STATUS); + altera_cra_writel(altera, P2A_INT_STATUS, P2A_INT_STS_ALL); /* enable all interrupts */ - altera_cra_writel(altera, P2A_INT_ENA_ALL, P2A_INT_ENABLE); + altera_cra_writel(altera, P2A_INT_ENABLE, P2A_INT_ENA_ALL); altera_pcie_host_init(altera); bus = pci_scan_root_bus(&pdev->dev, altera->root_bus_nr,