From patchwork Fri Mar 22 02:38:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 10864827 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 64A531669 for ; Fri, 22 Mar 2019 02:38:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 505FA2A5AE for ; Fri, 22 Mar 2019 02:38:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44F6F2A5D4; Fri, 22 Mar 2019 02:38:55 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable 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 1E0D62A5C9 for ; Fri, 22 Mar 2019 02:38:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727371AbfCVCiw (ORCPT ); Thu, 21 Mar 2019 22:38:52 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:42495 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726460AbfCVCiw (ORCPT ); Thu, 21 Mar 2019 22:38:52 -0400 Received: by mail-wr1-f65.google.com with SMTP id g3so661601wrx.9; Thu, 21 Mar 2019 19:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Oyufogf+KDRw5kf68/JGm5ce3/ZrEBM4vcxMGmMiU5Q=; b=l3wbQXEQf38Uxj8B2+OYcfwT+r6UOlJvIyUlqr1K5FPbpInuiLpcHHkY1THXDWfPJ4 J5KuUYs89dPhXeF+OiDJCqOZhG9ZFsSRXrxejVD9wwU3206+7o7Ft3Bzfkbq2CFBItT7 hBXRYjkHu8ovWMDZLcTIr1fjwnnXusOAsoW1DIAxlXtyX1ifDOsJU1YEr6+RVR466+yH ovwf7ls/P/oQ9aSDNmZrUTYfksBrtMdntqwxouH941oAwZNem+AM3RX/EZNvdS2i00tM YsamduA1MK4odBShKqoE6jtTvHhjKMntvaW+v1ECrRKK0VaPow4HXJBIvOx27uy49JTl ua7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Oyufogf+KDRw5kf68/JGm5ce3/ZrEBM4vcxMGmMiU5Q=; b=XLr5dhr63RzN4mdLGln10ff42BmhpsFkAoKBdb/rvpRPybVCMwaQ1pewMD8YOyzIkO bXFC7shU3rI2Edk/VQutxqhCmq7eH6B+qISfX9V9dk3U8mULTLu81M2sq7y4BCbBX2z8 ciI+jH4UucRjx7A/fvtL3tUpDqVIn2F5MLLBfWndNoxcruxNpHZPbFl2nPv0ksg3Mp4E dNWBqXAszTVOp1Wh9HWvwEE/zsqJovrjrtsCzrx2JU98QjB6s5UnA5nrjZOREcTvPgQh fvjZKqlCrKy5aQyQpsaPRhG62/8KluAEeYloa023Gt+VQit0npjREj7ZbzUWm6SamHEV aVJQ== X-Gm-Message-State: APjAAAVGwxrUNQkOQE3VxZ89b8b30e+NCtvScTd0aIIatgXCFVkdpF1o zmU8duozykvcWVDD0d0RmRG8GYyU X-Google-Smtp-Source: APXvYqxHfLFUrz4uoApdUfCVgEgRwT9oP5IQbVM6stj3Nn94Akra9MZhMMK+mRDhSQN9JH5Jtk97Mg== X-Received: by 2002:a5d:5188:: with SMTP id k8mr4564550wrv.183.1553222329703; Thu, 21 Mar 2019 19:38:49 -0700 (PDT) Received: from kurokawa.lan (ip-86-49-110-70.net.upcbroadband.cz. [86.49.110.70]) by smtp.gmail.com with ESMTPSA id w18sm10432692wru.24.2019.03.21.19.38.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 19:38:48 -0700 (PDT) From: marek.vasut@gmail.com To: linux-pci@vger.kernel.org Cc: Marek Vasut , Geert Uytterhoeven , Phil Edworthy , Simon Horman , Wolfram Sang , linux-renesas-soc@vger.kernel.org Subject: [PATCH V2 1/6] PCI: rcar: Clean up remaining macros defining bits Date: Fri, 22 Mar 2019 03:38:39 +0100 Message-Id: <20190322023844.18574-1-marek.vasut@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 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 From: Marek Vasut Replace macros using constants with BIT()s instead, no functional change. Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Phil Edworthy Cc: Simon Horman Cc: Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org To: linux-pci@vger.kernel.org Reviewed-by: Wolfram Sang --- V2: Bundle this patch with other cleanups before resending --- drivers/pci/controller/pcie-rcar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c index c8febb009454..5b8736f0cd6b 100644 --- a/drivers/pci/controller/pcie-rcar.c +++ b/drivers/pci/controller/pcie-rcar.c @@ -46,14 +46,14 @@ /* Transfer control */ #define PCIETCTLR 0x02000 -#define CFINIT 1 +#define CFINIT BIT(0) #define PCIETSTR 0x02004 -#define DATA_LINK_ACTIVE 1 +#define DATA_LINK_ACTIVE BIT(0) #define PCIEERRFR 0x02020 #define UNSUPPORTED_REQUEST BIT(4) #define PCIEMSIFR 0x02044 #define PCIEMSIALR 0x02048 -#define MSIFE 1 +#define MSIFE BIT(0) #define PCIEMSIAUR 0x0204c #define PCIEMSIIER 0x02050 From patchwork Fri Mar 22 02:38:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 10864829 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8032717E0 for ; Fri, 22 Mar 2019 02:38:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 696C12A5C9 for ; Fri, 22 Mar 2019 02:38:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 558512A5D5; Fri, 22 Mar 2019 02:38:55 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable 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 1155B2A5D3 for ; Fri, 22 Mar 2019 02:38:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726460AbfCVCix (ORCPT ); Thu, 21 Mar 2019 22:38:53 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:37200 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726695AbfCVCix (ORCPT ); Thu, 21 Mar 2019 22:38:53 -0400 Received: by mail-wr1-f67.google.com with SMTP id w10so687856wrm.4; Thu, 21 Mar 2019 19:38:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8rxuw1WuD4xW/29oYPvpa4K4LxHE/AFWLTJgSSwQb6E=; b=NIwMRkQalycE1EsWydgzo+Ly106QEXmDuq4A5NBV6cC+5atD/advTNgavtPgf9bOVF DcByeUk5U2bTuAr+6IJE387/IGqeGFY1xWRPqAWadgI5JiXIpx7zkJmvffY6T6Hav3pz cnVcZKhymkUl1xgtG69jmlHIEotE9i4lSJAifwEonzUt7aiPN654d8VPVMp4lntnqHOq zU8YvGgqlXpeMbszNPhnA9JVMCzuT0qtSgFHA3kqiAZBWPiK/kagT4GTbi1ZlOPLyu0Y /F82EfIGCUxwGehD652B1hLMWmMJIO0Zcf7x/DIfhEsrkqNYbbl30iRi381c+8gueyiT MOVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8rxuw1WuD4xW/29oYPvpa4K4LxHE/AFWLTJgSSwQb6E=; b=t0yJtAWeqsNLazM7bZbu8GkSI/oGeW613A7Q0d8ALR7ZXN0eK6d+gtIkNdW2hCyE36 oQe/JnxWw2Tmt8YfU9QyyUHSsJ4RcnuuVJXmti/avdUfdtz2dM4DZOxgcYZwx7dGwrju ENLYQOjHme1lKtg4Oo/kd/M7PU+LVyPbehUOoUHhWemxvU9A2+YFry4V7Nkt6BUoQfNJ xo5PbJKBwJ+CI5YbQ9uq5BTh4DtRy5DNnRsH/4M2AS6xop3IzfFZH7IfrEGulvhLViZK jZtxpt8uJ4WDki7QS9Rn+ZdKzYLrJ2QMfJUTtz8vRfU3S0/Bk4Pl1Wo5Xs0jyZWdt2ze eQAA== X-Gm-Message-State: APjAAAV2amlh8z920YC/dmeg4gcP7pom/U3nHws4Tlez6wAWIQx+4Gbz 1zaeYU258/uGLsmnFoRYnCteO/R8 X-Google-Smtp-Source: APXvYqwK5J/QMHbiELmmSAHu4+uCpb08W/HexcaTTIXOgxrCaCvtF+fXFNWxpAceU5dpQYiii+p+hw== X-Received: by 2002:adf:9c8f:: with SMTP id d15mr4468988wre.309.1553222331203; Thu, 21 Mar 2019 19:38:51 -0700 (PDT) Received: from kurokawa.lan (ip-86-49-110-70.net.upcbroadband.cz. [86.49.110.70]) by smtp.gmail.com with ESMTPSA id w18sm10432692wru.24.2019.03.21.19.38.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 19:38:50 -0700 (PDT) From: marek.vasut@gmail.com To: linux-pci@vger.kernel.org Cc: Marek Vasut , Geert Uytterhoeven , Phil Edworthy , Simon Horman , Wolfram Sang , linux-renesas-soc@vger.kernel.org Subject: [PATCH V2 2/6] PCI: rcar: Replace unsigned long with u32 in register accessors Date: Fri, 22 Mar 2019 03:38:40 +0100 Message-Id: <20190322023844.18574-2-marek.vasut@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190322023844.18574-1-marek.vasut@gmail.com> References: <20190322023844.18574-1-marek.vasut@gmail.com> MIME-Version: 1.0 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 From: Marek Vasut Replace unsigned long with u32 in register accessor functions, since they access 32bit registers. Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Phil Edworthy Cc: Simon Horman Cc: Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org To: linux-pci@vger.kernel.org Reviewed-by: Wolfram Sang --- V2: Bundle this patch with other cleanups before resending --- drivers/pci/controller/pcie-rcar.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c index 5b8736f0cd6b..1408c8aa758b 100644 --- a/drivers/pci/controller/pcie-rcar.c +++ b/drivers/pci/controller/pcie-rcar.c @@ -152,14 +152,12 @@ struct rcar_pcie { struct rcar_msi msi; }; -static void rcar_pci_write_reg(struct rcar_pcie *pcie, unsigned long val, - unsigned long reg) +static void rcar_pci_write_reg(struct rcar_pcie *pcie, u32 val, u32 reg) { writel(val, pcie->base + reg); } -static unsigned long rcar_pci_read_reg(struct rcar_pcie *pcie, - unsigned long reg) +static u32 rcar_pci_read_reg(struct rcar_pcie *pcie, u32 reg) { return readl(pcie->base + reg); } From patchwork Fri Mar 22 02:38:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 10864833 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 270B31669 for ; Fri, 22 Mar 2019 02:38:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12D152A5C9 for ; Fri, 22 Mar 2019 02:38:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 117312A5D2; Fri, 22 Mar 2019 02:38:56 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable 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 ABBE82A5D9 for ; Fri, 22 Mar 2019 02:38:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727386AbfCVCiz (ORCPT ); Thu, 21 Mar 2019 22:38:55 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:35662 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726695AbfCVCiz (ORCPT ); Thu, 21 Mar 2019 22:38:55 -0400 Received: by mail-wr1-f67.google.com with SMTP id w1so697618wrp.2; Thu, 21 Mar 2019 19:38:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/C2GUyzjoOE8MS8c7hA4ndqPfrFVkibkq7593zNFkt0=; b=hor5+wYbMKsE7L7RMxr65ry/JCPCYce3tQRhhb5WeXG4o2JGjHcfLz6+kUzZDxdDi9 jQdGqzQr6436cMDYav3EnGQEYPC/4QH1lPGOv+XMYkmlSR2XejP/lHNRYKiz+YX++LFK J0/h2ghpxEyNZSafYno7Tfz2kFFbg7GngW5hGSO52gN1PhQB4sOZzuoM/4TMv0EFYJ0M mYDYOJjM8pvZwGRzkQ0c2FEWhuzSyz8pDJbjaSDN3WzioOwciCvONlk4Pee+/y6tEtuc DB2dxjX2ILTttJyWDZHhHpGuGnuqkD9ZWPRO/RRThl/r2krGUm349ovYZKeUPbrmR5T8 6o4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/C2GUyzjoOE8MS8c7hA4ndqPfrFVkibkq7593zNFkt0=; b=DMvNqrYsBS+F8lUZdmK7jt6ZrHfbhciReasvJs9Fm8UzuvcT7eTQTfhrAcc+XitYFx +y+SBCU6WBEva0ecMnnjYboxyXMddML0Wwf4LvmpOIeDQjNZpLAqyPJhtZl1wXxLm/iM 8/yDynMIQ+QbC1rYlT2lbCGZsX9b65gbdx7Hx3m1hafyHix776O1M5rt3CMohWHmNQ10 DCXColNQWMlEg5Re8og0s7I+ZVPyYperZDKUndNA2ruwQf3xFhhyJjwcyyXAX17VDa4A S0MgFTbxlY3BL2gyFEuunWqB7EscPnwG9IIsu/EEx5tDml7E5qhasEQtRZqNo68dr3uU SQdw== X-Gm-Message-State: APjAAAUJ4I+SlILDl2PYZMe5BzZeh34XmMvlYZzHPjo+Q5ghiIGIJVbI HI/6ugr7SfcewWyS+vf0fxoXDL7p X-Google-Smtp-Source: APXvYqy28wYvlIqKujm8R9bm4z9xKHxdKTVqtbi9Yusc5ofBofJ3DAA6uO5xipCKDq9sTUB4+jL0jA== X-Received: by 2002:adf:fc0b:: with SMTP id i11mr4706574wrr.145.1553222332770; Thu, 21 Mar 2019 19:38:52 -0700 (PDT) Received: from kurokawa.lan (ip-86-49-110-70.net.upcbroadband.cz. [86.49.110.70]) by smtp.gmail.com with ESMTPSA id w18sm10432692wru.24.2019.03.21.19.38.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 19:38:51 -0700 (PDT) From: marek.vasut@gmail.com To: linux-pci@vger.kernel.org Cc: Marek Vasut , Geert Uytterhoeven , Phil Edworthy , Simon Horman , Wolfram Sang , linux-renesas-soc@vger.kernel.org Subject: [PATCH V2 3/6] PCI: rcar: Replace various variable types with unsigned ones for register values Date: Fri, 22 Mar 2019 03:38:41 +0100 Message-Id: <20190322023844.18574-3-marek.vasut@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190322023844.18574-1-marek.vasut@gmail.com> References: <20190322023844.18574-1-marek.vasut@gmail.com> MIME-Version: 1.0 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 From: Marek Vasut Replace various variable types with u32 or unsigned int type for variables holding register values, since the registers are 32bit. Note that rcar_pcie_msi_irq() still uses various variable types because both find_first_bit() and __fls() require various variable types as an argument. Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Phil Edworthy Cc: Simon Horman Cc: Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org To: linux-pci@vger.kernel.org --- V2: - s@unsigned long@various variable types@ in the commit message - Replace int with unsigned int for the $shift variable - Replace int with unsigned int / u32 in rcar_pcie_config_access() --- drivers/pci/controller/pcie-rcar.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c index 1408c8aa758b..66599e0c4bb4 100644 --- a/drivers/pci/controller/pcie-rcar.c +++ b/drivers/pci/controller/pcie-rcar.c @@ -169,7 +169,7 @@ enum { static void rcar_rmw32(struct rcar_pcie *pcie, int where, u32 mask, u32 data) { - int shift = 8 * (where & 3); + unsigned int shift = 8 * (where & 3); u32 val = rcar_pci_read_reg(pcie, where & ~3); val &= ~(mask << shift); @@ -179,7 +179,7 @@ static void rcar_rmw32(struct rcar_pcie *pcie, int where, u32 mask, u32 data) static u32 rcar_read_conf(struct rcar_pcie *pcie, int where) { - int shift = 8 * (where & 3); + unsigned int shift = 8 * (where & 3); u32 val = rcar_pci_read_reg(pcie, where & ~3); return val >> shift; @@ -190,7 +190,8 @@ static int rcar_pcie_config_access(struct rcar_pcie *pcie, unsigned char access_type, struct pci_bus *bus, unsigned int devfn, int where, u32 *data) { - int dev, func, reg, index; + unsigned int dev, func, index; + u32 reg; dev = PCI_SLOT(devfn); func = PCI_FUNC(devfn); @@ -294,8 +295,8 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) { struct rcar_pcie *pcie = bus->sysdata; - int shift, ret; - u32 data; + int ret; + u32 shift, data; ret = rcar_pcie_config_access(pcie, RCAR_PCI_ACCESS_READ, bus, devfn, where, &data); @@ -508,7 +509,7 @@ static void phy_write_reg(struct rcar_pcie *pcie, unsigned int rate, unsigned int addr, unsigned int lane, unsigned int data) { - unsigned long phyaddr; + u32 phyaddr; phyaddr = WRITE_CMD | ((rate & 1) << RATE_POS) | @@ -1116,7 +1117,7 @@ static int rcar_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct rcar_pcie *pcie; - unsigned int data; + u32 data; int err; int (*phy_init_fn)(struct rcar_pcie *); struct pci_host_bridge *bridge; From patchwork Fri Mar 22 02:38:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 10864837 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F0E9817E0 for ; Fri, 22 Mar 2019 02:38:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD2B42A569 for ; Fri, 22 Mar 2019 02:38:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1D862A5C9; Fri, 22 Mar 2019 02:38:57 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable 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 71D122A569 for ; Fri, 22 Mar 2019 02:38:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727390AbfCVCi5 (ORCPT ); Thu, 21 Mar 2019 22:38:57 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:34598 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726695AbfCVCi4 (ORCPT ); Thu, 21 Mar 2019 22:38:56 -0400 Received: by mail-wr1-f65.google.com with SMTP id p10so701781wrq.1; Thu, 21 Mar 2019 19:38:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Yl2AJ0VIhJwymMfATd9RMvkhKTRbOBqw4HZrQffV7rw=; b=dXOeu20KovqkGpTC1mhGRPopUs5j3sAr7Z5X/dzYMT+8hnD+yCiqG8c5HHmdXiPhs2 EmLVzXdOryfBTO1sEgzFapS++y1u7gik5MCHwu0TO0L282xcA3MBVTGNDUJ0wCMZpCaU zJF0wxC3/t180NikJc++uS5+VeLlkGZkhCdWbc2H2ys0jP+HUT+9nkMJeuDyNfQOtJi+ 26LFh785aHTN+heI+g9raSRG2OKb4zEdIuWGgXkbPbSWap5VmcDTFxW5JjXWeqf1zNl4 j57hZH3TEeEMaCGTjmCcY18+GTYcBbEDe0Z43k2Q+XQXTszlT3/o85CK/CLQPAHURxzJ UPVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Yl2AJ0VIhJwymMfATd9RMvkhKTRbOBqw4HZrQffV7rw=; b=ZHhv2wJpyGRq4FGPuq4k6nYIBtqpUNpKZY3WF3XPaDqkPWunRxdLfDJfhaYW4cjqHd HULmyXOj1E9yipmgffG9WBEMEmEnBtoXuEW+VffynKweOWN7q0Y5E1fooWzui4AlLb7I m7WdGW4+BcXJt6gV52hoyIXd/zDwFEV9f0gkM34YisMAw3ybc3bWskYm3K7S6k/h4IPE E2TtJqGJcJeQxKIveX/Sjm2JuMIZDqSzd269qavdKINgCbwHWqnbPIME9Z9rGm6PwF+A rkdTOrfqMjRhN/VfLLrurmnYo83T2gceCMR06XSWy07hbFnLSiQIMgE3+MW6PpxR5lbV 4M2Q== X-Gm-Message-State: APjAAAVhLvqch11HlguaxzhqUyvlt5XY5yRoq4yz21TpG3YNWOSGgNKz 4suCnb2hjU3Ge/kD+wuZIuO4Q7o4 X-Google-Smtp-Source: APXvYqzCgE8yKxWOWngH8Lf+XPUzBYSxuCWD8abx/cG5SBizQu8KA5ZBA5KCWzzxFXlMikfIyXl+bA== X-Received: by 2002:a5d:6b4c:: with SMTP id x12mr4634860wrw.14.1553222334610; Thu, 21 Mar 2019 19:38:54 -0700 (PDT) Received: from kurokawa.lan (ip-86-49-110-70.net.upcbroadband.cz. [86.49.110.70]) by smtp.gmail.com with ESMTPSA id w18sm10432692wru.24.2019.03.21.19.38.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 19:38:53 -0700 (PDT) From: marek.vasut@gmail.com To: linux-pci@vger.kernel.org Cc: Marek Vasut , Geert Uytterhoeven , Phil Edworthy , Simon Horman , Wolfram Sang , linux-renesas-soc@vger.kernel.org Subject: [PATCH V2 4/6] PCI: rcar: Replace (8 * n) with (n << 3) Date: Fri, 22 Mar 2019 03:38:42 +0100 Message-Id: <20190322023844.18574-4-marek.vasut@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190322023844.18574-1-marek.vasut@gmail.com> References: <20190322023844.18574-1-marek.vasut@gmail.com> MIME-Version: 1.0 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 From: Marek Vasut Replace (8 * n) with (n << 3) to make bit shift operations consistent. No functional change. Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Phil Edworthy Cc: Simon Horman Cc: Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org To: linux-pci@vger.kernel.org Reviewed-by: Wolfram Sang --- V2: Bundle this patch with other cleanups before resending --- drivers/pci/controller/pcie-rcar.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c index 66599e0c4bb4..0ab05803bb70 100644 --- a/drivers/pci/controller/pcie-rcar.c +++ b/drivers/pci/controller/pcie-rcar.c @@ -169,7 +169,7 @@ enum { static void rcar_rmw32(struct rcar_pcie *pcie, int where, u32 mask, u32 data) { - unsigned int shift = 8 * (where & 3); + unsigned int shift = (where & 3) << 3; u32 val = rcar_pci_read_reg(pcie, where & ~3); val &= ~(mask << shift); @@ -179,7 +179,7 @@ static void rcar_rmw32(struct rcar_pcie *pcie, int where, u32 mask, u32 data) static u32 rcar_read_conf(struct rcar_pcie *pcie, int where) { - unsigned int shift = 8 * (where & 3); + unsigned int shift = (where & 3) << 3; u32 val = rcar_pci_read_reg(pcie, where & ~3); return val >> shift; @@ -280,9 +280,9 @@ static int rcar_pcie_read_conf(struct pci_bus *bus, unsigned int devfn, } if (size == 1) - *val = (*val >> (8 * (where & 3))) & 0xff; + *val = (*val >> ((where & 3) << 3)) & 0xff; else if (size == 2) - *val = (*val >> (8 * (where & 2))) & 0xffff; + *val = (*val >> ((where & 2) << 3)) & 0xffff; dev_dbg(&bus->dev, "pcie-config-read: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08lx\n", bus->number, devfn, where, size, (unsigned long)*val); @@ -307,11 +307,11 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn, bus->number, devfn, where, size, (unsigned long)val); if (size == 1) { - shift = 8 * (where & 3); + shift = (where & 3) << 3; data &= ~(0xff << shift); data |= ((val & 0xff) << shift); } else if (size == 2) { - shift = 8 * (where & 2); + shift = (where & 2) << 3; data &= ~(0xffff << shift); data |= ((val & 0xffff) << shift); } else From patchwork Fri Mar 22 02:38:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 10864841 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 90B8217E0 for ; Fri, 22 Mar 2019 02:39:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78A2928BA5 for ; Fri, 22 Mar 2019 02:39:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CBF22A569; Fri, 22 Mar 2019 02:39:00 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable 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 1D8EF2A5D3 for ; Fri, 22 Mar 2019 02:39:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727406AbfCVCi7 (ORCPT ); Thu, 21 Mar 2019 22:38:59 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:39966 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726695AbfCVCi7 (ORCPT ); Thu, 21 Mar 2019 22:38:59 -0400 Received: by mail-wm1-f65.google.com with SMTP id u10so653028wmj.5; Thu, 21 Mar 2019 19:38:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tHCxIvDdxQb6gPnDJ6lurSWU6yyk4e/x/rzMANE5Lbg=; b=QHrLdy3jMhUT/GMqizEDXFSSOcb9a39cvClwyMuBtH6AtF37b6F0qr26vEpM+CCu48 mKNWtu0L/xUKyIfKV6vmEGKtBqbrrKJm8xUouUEF6RfoPuEW6eIwkJremqA6ElDW+vxS iPUKP+NzT3bXBvhfrZFEHQUHTxY03yMM84ewt0oTSfBQ5++DJ2Ft4o7Jbdd+6kRSBTFR 71LdwnrWj3j/uRv56UqjJmNSP1h0koSCfGIIecz6kHYUMXIHlaVd0Qiq3GAa3MixI+WS VwQCjHDvPEBTWWK+ufI4URCM6d5uBk98oxckm8tsH88pNZjJpXd01iDHtbRXygGUlHh/ LfKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tHCxIvDdxQb6gPnDJ6lurSWU6yyk4e/x/rzMANE5Lbg=; b=CMzAX5/9OELHWiS+BDXgm+9Yqq6Wj8IVI3uaRZwboQRlwknaG2UHjsHcxqiqm6I17c PTXw2sRuSyFzVoWjhu1SbHnIgpiMKxVqCbrqJGQ8RaaWaCc54fJG8d0K0R4x8wBXca/F tlk419vgH2asIa539FubtHQLpeDEbafidGrgHfRQ7LQBKFhBWDiPgfdcUKJ4DZYlYTB9 0PF+WHlxODLYvvBK62lsvGRJ2BpXNgnE0UomE1NBt1Ux6dPX6BE20DAPxFC3fUDugM1h sP30Q1FUaQB+lDnHhx7fc/ByT5T7sH8ACj2lc+ingJNBewXJQbJEiJLJFuaRSqVZtOwO TX7Q== X-Gm-Message-State: APjAAAWTXn9AGRhIlqE+gpUJVvZLpycdFAfNhjunoiN99EW7CXw/1qQB Btr6Rb0r5LDQNLHhW/OqVRpOKcIS X-Google-Smtp-Source: APXvYqwiogo+iIF5GqF8YHptj/vbiRoRfvjlwsEMawxk4I2yItn+WliiQnP+pmTrGMUxKO6Lo7eVAg== X-Received: by 2002:a1c:988d:: with SMTP id a135mr34109wme.24.1553222336242; Thu, 21 Mar 2019 19:38:56 -0700 (PDT) Received: from kurokawa.lan (ip-86-49-110-70.net.upcbroadband.cz. [86.49.110.70]) by smtp.gmail.com with ESMTPSA id w18sm10432692wru.24.2019.03.21.19.38.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 19:38:55 -0700 (PDT) From: marek.vasut@gmail.com To: linux-pci@vger.kernel.org Cc: Marek Vasut , Geert Uytterhoeven , Phil Edworthy , Simon Horman , Wolfram Sang , linux-renesas-soc@vger.kernel.org Subject: [PATCH V2 5/6] PCI: rcar: Clean up debug messages Date: Fri, 22 Mar 2019 03:38:43 +0100 Message-Id: <20190322023844.18574-5-marek.vasut@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190322023844.18574-1-marek.vasut@gmail.com> References: <20190322023844.18574-1-marek.vasut@gmail.com> MIME-Version: 1.0 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 From: Marek Vasut Drop useless casts from debug messages, they are no longer needed due to the data type cleanup. Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Phil Edworthy Cc: Simon Horman Cc: Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org To: linux-pci@vger.kernel.org Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang --- V2: - Bundle this patch with other cleanups before resending - Add R-B from Geert --- drivers/pci/controller/pcie-rcar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c index 0ab05803bb70..989b7b73ed61 100644 --- a/drivers/pci/controller/pcie-rcar.c +++ b/drivers/pci/controller/pcie-rcar.c @@ -284,8 +284,8 @@ static int rcar_pcie_read_conf(struct pci_bus *bus, unsigned int devfn, else if (size == 2) *val = (*val >> ((where & 2) << 3)) & 0xffff; - dev_dbg(&bus->dev, "pcie-config-read: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08lx\n", - bus->number, devfn, where, size, (unsigned long)*val); + dev_dbg(&bus->dev, "pcie-config-read: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08x\n", + bus->number, devfn, where, size, *val); return ret; } @@ -303,8 +303,8 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn, if (ret != PCIBIOS_SUCCESSFUL) return ret; - dev_dbg(&bus->dev, "pcie-config-write: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08lx\n", - bus->number, devfn, where, size, (unsigned long)val); + dev_dbg(&bus->dev, "pcie-config-write: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08x\n", + bus->number, devfn, where, size, val); if (size == 1) { shift = (where & 3) << 3; From patchwork Fri Mar 22 02:38:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 10864845 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D41DE17E0 for ; Fri, 22 Mar 2019 02:39:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C01002A569 for ; Fri, 22 Mar 2019 02:39:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4D0C2A5C9; Fri, 22 Mar 2019 02:39: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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable 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 6A0B02A569 for ; Fri, 22 Mar 2019 02:39:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727415AbfCVCjA (ORCPT ); Thu, 21 Mar 2019 22:39:00 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:38620 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727404AbfCVCjA (ORCPT ); Thu, 21 Mar 2019 22:39:00 -0400 Received: by mail-wm1-f67.google.com with SMTP id a188so661609wmf.3; Thu, 21 Mar 2019 19:38:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6OuZ5lf2dx/eKeJVs4puZI0qRZx8tWmj1dHNl/FZeMg=; b=kK4SQ0h1nR6U2k3uqdBLmYOlfVsRmeF9kQ1h9n0vrDSUTfz4XNi0/OB3NkSpHiidTT YqXsZVdQaqwmDKvUL9Gf8MrJyRs+mhNtyUWOwG6LX8nMMqsO0lLGSPQObnZBwhZ6Oioq zA0KSUlDejLgX5vQGOfUA30HXJ4lfmv4qMnQZil/iGjOUYu7/0T3C5bZy7Xgf7L9G+Rl 3c/JowBlDxLcAiekzCzl+fXzPOqVRns09y+1sAbSNJa4zWXDOAv4hKGXc63l/C8tQRfV cX0osuThL4TmQxaHUhhaMyPuQwQp3GoE9CEBHrdDOIJajivA92GB3x/QrPRuvCNjIrHj yg+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6OuZ5lf2dx/eKeJVs4puZI0qRZx8tWmj1dHNl/FZeMg=; b=ZYUnZPahdCUhymURReglI9FZTK6URSLEB3DVdhK8VJDIN55qRAOBuKoD2evBSKaFxe +tUZBFrwOIrSuyxqypQJf6PtRbjse6TFC6BCk49aEMty+4az0UpL/km79IV04Yt+jeGd V/dwMakX4BIxHf+QKa3fpofoiCjAW4jSn7V9lLA7PLVfcJ2WATN3XsmoCKsvj7OwikWy AkXl/7+zzf+wSB1xvQ0kLusNkwEKxGhYqrWCbrLX7XnYcKcbuRRFBKNzJOfYlkYF8NlC zbFoPNjbrOM53QnbQ6IInUDG96YEM0jHReqiAS3FpLsioSJPqpCB0MHwroVW3HXqcmNw ZTPQ== X-Gm-Message-State: APjAAAUkHTLEjK0BVZzywJJfVNmPA5iIBsZwAU8/MA62HGR3OO5WQx4w KIBqAtnQlUCUR6ackU7BcvoNB9sL X-Google-Smtp-Source: APXvYqwMMKC3QoN5klpbxAqsXYtEpSQ+Ynp/WmyOuVz18IgEMAwFJLREgCwwDZpgw0mti/P0xWVNeQ== X-Received: by 2002:a1c:7dcc:: with SMTP id y195mr1294604wmc.13.1553222337851; Thu, 21 Mar 2019 19:38:57 -0700 (PDT) Received: from kurokawa.lan (ip-86-49-110-70.net.upcbroadband.cz. [86.49.110.70]) by smtp.gmail.com with ESMTPSA id w18sm10432692wru.24.2019.03.21.19.38.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 19:38:56 -0700 (PDT) From: marek.vasut@gmail.com To: linux-pci@vger.kernel.org Cc: Marek Vasut , Geert Uytterhoeven , Phil Edworthy , Simon Horman , Wolfram Sang , linux-renesas-soc@vger.kernel.org Subject: [PATCH V2 6/6] PCI: rcar: Allow 64bit MSI addresses Date: Fri, 22 Mar 2019 03:38:44 +0100 Message-Id: <20190322023844.18574-6-marek.vasut@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190322023844.18574-1-marek.vasut@gmail.com> References: <20190322023844.18574-1-marek.vasut@gmail.com> MIME-Version: 1.0 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 From: Marek Vasut The MSI address can be 64bit. Switch the data type used to hold the result of virt_to_phys() to phys_addr_t to reflect its properties correctly and program the top 32bits of PA into PCIEMSIAUR. Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Phil Edworthy Cc: Simon Horman Cc: Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org To: linux-pci@vger.kernel.org Reviewed-by: Geert Uytterhoeven --- V2: - s/it's/its/ in commit message - Add R-B from Geert --- drivers/pci/controller/pcie-rcar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c index 989b7b73ed61..75ac83f21035 100644 --- a/drivers/pci/controller/pcie-rcar.c +++ b/drivers/pci/controller/pcie-rcar.c @@ -889,7 +889,7 @@ static int rcar_pcie_enable_msi(struct rcar_pcie *pcie) { struct device *dev = pcie->dev; struct rcar_msi *msi = &pcie->msi; - unsigned long base; + phys_addr_t base; int err, i; mutex_init(&msi->lock); @@ -931,7 +931,7 @@ static int rcar_pcie_enable_msi(struct rcar_pcie *pcie) base = virt_to_phys((void *)msi->pages); rcar_pci_write_reg(pcie, base | MSIFE, PCIEMSIALR); - rcar_pci_write_reg(pcie, 0, PCIEMSIAUR); + rcar_pci_write_reg(pcie, base >> 32, PCIEMSIAUR); /* enable all MSI interrupts */ rcar_pci_write_reg(pcie, 0xffffffff, PCIEMSIIER);