From patchwork Tue Nov 10 04:05:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 321645 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BE4FC61DD8 for ; Tue, 10 Nov 2020 04:07:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E6212068D for ; Tue, 10 Nov 2020 04:07:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728403AbgKJEGZ (ORCPT ); Mon, 9 Nov 2020 23:06:25 -0500 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]:50000 "EHLO smtp2207-205.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387433AbgKJEGX (ORCPT ); Mon, 9 Nov 2020 23:06:23 -0500 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.2995258|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_regular_dialog|0.00377925-0.00159346-0.994627; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047188; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=29; RT=29; SR=0; TI=SMTPD_---.IulFdj5_1604981159; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.IulFdj5_1604981159) by smtp.aliyun-inc.com(10.147.42.135); Tue, 10 Nov 2020 12:06:15 +0800 From: Frank Lee To: vkoul@kernel.org, robh+dt@kernel.org, mripard@kernel.org, wens@csie.org, ulf.hansson@linaro.org, kishon@ti.com, wim@linux-watchdog.org, linux@roeck-us.net, dan.j.williams@intel.com, linus.walleij@linaro.org, wsa+renesas@sang-engineering.com, dianders@chromium.org, marex@denx.de, colin.king@canonical.com, rdunlap@infradead.org, krzk@kernel.org, gregkh@linuxfoundation.org, megous@megous.com, rikard.falkeborn@gmail.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-gpio@vger.kernel.org, tiny.windzz@gmail.com Cc: Yangtao Li , stable@vger.kernel.org Subject: [PATCH 03/19] pinctrl: sunxi: Always call chained_irq_{enter, exit} in sunxi_pinctrl_irq_handler Date: Tue, 10 Nov 2020 12:05:37 +0800 Message-Id: <20201110040553.1381-4-frank@allwinnertech.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201110040553.1381-1-frank@allwinnertech.com> References: <20201110040553.1381-1-frank@allwinnertech.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Yangtao Li It is found on many allwinner soc that there is a low probability that the interrupt status cannot be read in sunxi_pinctrl_irq_handler. This will cause the interrupt status of a gpio bank to always be active on gic, preventing gic from responding to other spi interrupts correctly. So we should call the chained_irq_* each time enter sunxi_pinctrl_irq_handler(). Cc: stable@vger.kernel.org Signed-off-by: Yangtao Li --- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index 9d8b59dafa4b..dc8d39ae045b 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -1141,20 +1141,22 @@ static void sunxi_pinctrl_irq_handler(struct irq_desc *desc) WARN_ON(bank == pctl->desc->irq_banks); + chained_irq_enter(chip, desc); + reg = sunxi_irq_status_reg_from_bank(pctl->desc, bank); val = readl(pctl->membase + reg); if (val) { int irqoffset; - chained_irq_enter(chip, desc); for_each_set_bit(irqoffset, &val, IRQ_PER_BANK) { int pin_irq = irq_find_mapping(pctl->domain, bank * IRQ_PER_BANK + irqoffset); generic_handle_irq(pin_irq); } - chained_irq_exit(chip, desc); } + + chained_irq_exit(chip, desc); } static int sunxi_pinctrl_add_function(struct sunxi_pinctrl *pctl, From patchwork Tue Nov 10 04:05:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 321648 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0112C4742C for ; Tue, 10 Nov 2020 04:06:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 64AA2206D8 for ; Tue, 10 Nov 2020 04:06:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387523AbgKJEG3 (ORCPT ); Mon, 9 Nov 2020 23:06:29 -0500 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]:48526 "EHLO smtp2207-205.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733307AbgKJEGZ (ORCPT ); Mon, 9 Nov 2020 23:06:25 -0500 X-Alimail-AntiSpam: AC=SUSPECT; BC=0.6465102|-1; BR=01201311R861b1; CH=blue; DM=|SUSPECT|false|; DS=CONTINUE|ham_system_inform|0.0102791-0.00112627-0.988595; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047202; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=28; RT=28; SR=0; TI=SMTPD_---.IulFdj5_1604981159; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.IulFdj5_1604981159) by smtp.aliyun-inc.com(10.147.42.135); Tue, 10 Nov 2020 12:06:17 +0800 From: Frank Lee To: vkoul@kernel.org, robh+dt@kernel.org, mripard@kernel.org, wens@csie.org, ulf.hansson@linaro.org, kishon@ti.com, wim@linux-watchdog.org, linux@roeck-us.net, dan.j.williams@intel.com, linus.walleij@linaro.org, wsa+renesas@sang-engineering.com, dianders@chromium.org, marex@denx.de, colin.king@canonical.com, rdunlap@infradead.org, krzk@kernel.org, gregkh@linuxfoundation.org, megous@megous.com, rikard.falkeborn@gmail.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-gpio@vger.kernel.org, tiny.windzz@gmail.com Cc: Yangtao Li Subject: [PATCH 04/19] dt-bindings: dma: allwinner, sun50i-a64-dma: Add A100 compatible Date: Tue, 10 Nov 2020 12:05:38 +0800 Message-Id: <20201110040553.1381-5-frank@allwinnertech.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201110040553.1381-1-frank@allwinnertech.com> References: <20201110040553.1381-1-frank@allwinnertech.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Yangtao Li Add a binding for A100's dma controller. Signed-off-by: Yangtao Li --- .../devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml b/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml index 372679dbd216..b6e1ebfaf366 100644 --- a/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml +++ b/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml @@ -21,6 +21,7 @@ properties: compatible: oneOf: - const: allwinner,sun50i-a64-dma + - const: allwinner,sun50i-a100-dma - const: allwinner,sun50i-h6-dma - items: - const: allwinner,sun8i-r40-dma @@ -56,7 +57,9 @@ required: if: properties: compatible: - const: allwinner,sun50i-h6-dma + enum: + - allwinner,sun50i-a100-dma + - allwinner,sun50i-h6-dma then: properties: From patchwork Tue Nov 10 04:05:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 321646 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E7C0C388F7 for ; Tue, 10 Nov 2020 04:06:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 79DBA2068D for ; Tue, 10 Nov 2020 04:06:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387644AbgKJEGq (ORCPT ); Mon, 9 Nov 2020 23:06:46 -0500 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]:41716 "EHLO smtp2207-205.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733073AbgKJEGc (ORCPT ); Mon, 9 Nov 2020 23:06:32 -0500 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.1456938|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.446168-0.0014012-0.552431; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047201; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=28; RT=28; SR=0; TI=SMTPD_---.IulFdj5_1604981159; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.IulFdj5_1604981159) by smtp.aliyun-inc.com(10.147.42.135); Tue, 10 Nov 2020 12:06:24 +0800 From: Frank Lee To: vkoul@kernel.org, robh+dt@kernel.org, mripard@kernel.org, wens@csie.org, ulf.hansson@linaro.org, kishon@ti.com, wim@linux-watchdog.org, linux@roeck-us.net, dan.j.williams@intel.com, linus.walleij@linaro.org, wsa+renesas@sang-engineering.com, dianders@chromium.org, marex@denx.de, colin.king@canonical.com, rdunlap@infradead.org, krzk@kernel.org, gregkh@linuxfoundation.org, megous@megous.com, rikard.falkeborn@gmail.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-gpio@vger.kernel.org, tiny.windzz@gmail.com Cc: Yangtao Li Subject: [PATCH 07/19] arm64: dts: allwinner: A100: Add PMU mode Date: Tue, 10 Nov 2020 12:05:41 +0800 Message-Id: <20201110040553.1381-8-frank@allwinnertech.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201110040553.1381-1-frank@allwinnertech.com> References: <20201110040553.1381-1-frank@allwinnertech.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Yangtao Li Add the Performance Monitoring Unit (PMU) device tree node to the A100 .dtsi, which tells DT users which interrupts are triggered by PMU overflow events on each core. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi index c34ed8045363..01ff53b5a7a8 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi @@ -25,21 +25,21 @@ cpu0: cpu@0 { enable-method = "psci"; }; - cpu@1 { + cpu1: cpu@1 { compatible = "arm,cortex-a53"; device_type = "cpu"; reg = <0x1>; enable-method = "psci"; }; - cpu@2 { + cpu2: cpu@2 { compatible = "arm,cortex-a53"; device_type = "cpu"; reg = <0x2>; enable-method = "psci"; }; - cpu@3 { + cpu3: cpu@3 { compatible = "arm,cortex-a53"; device_type = "cpu"; reg = <0x3>; @@ -47,6 +47,15 @@ cpu@3 { }; }; + pmu { + compatible = "arm,cortex-a53-pmu"; + interrupts = , + , + , + ; + interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; + }; + psci { compatible = "arm,psci-1.0"; method = "smc"; From patchwork Tue Nov 10 04:05:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 321647 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 818AFC388F7 for ; Tue, 10 Nov 2020 04:06:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D6D221D7F for ; Tue, 10 Nov 2020 04:06:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387613AbgKJEGg (ORCPT ); Mon, 9 Nov 2020 23:06:36 -0500 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]:60098 "EHLO smtp2207-205.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387574AbgKJEGf (ORCPT ); Mon, 9 Nov 2020 23:06:35 -0500 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.07436289|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.019185-0.0136594-0.967156; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047193; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=28; RT=28; SR=0; TI=SMTPD_---.IulFdj5_1604981159; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.IulFdj5_1604981159) by smtp.aliyun-inc.com(10.147.42.135); Tue, 10 Nov 2020 12:06:29 +0800 From: Frank Lee To: vkoul@kernel.org, robh+dt@kernel.org, mripard@kernel.org, wens@csie.org, ulf.hansson@linaro.org, kishon@ti.com, wim@linux-watchdog.org, linux@roeck-us.net, dan.j.williams@intel.com, linus.walleij@linaro.org, wsa+renesas@sang-engineering.com, dianders@chromium.org, marex@denx.de, colin.king@canonical.com, rdunlap@infradead.org, krzk@kernel.org, gregkh@linuxfoundation.org, megous@megous.com, rikard.falkeborn@gmail.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-gpio@vger.kernel.org, tiny.windzz@gmail.com Cc: Yangtao Li Subject: [PATCH 09/19] phy: allwinner: Convert to devm_platform_ioremap_* API Date: Tue, 10 Nov 2020 12:05:43 +0800 Message-Id: <20201110040553.1381-10-frank@allwinnertech.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201110040553.1381-1-frank@allwinnertech.com> References: <20201110040553.1381-1-frank@allwinnertech.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Yangtao Li Use the devm_platform_ioremap_resource_byname() and devm_platform_ioremap_resource helper to simplify the code. Signed-off-by: Yangtao Li --- drivers/phy/allwinner/phy-sun4i-usb.c | 9 +++------ drivers/phy/allwinner/phy-sun50i-usb3.c | 4 +--- drivers/phy/allwinner/phy-sun6i-mipi-dphy.c | 4 +--- drivers/phy/allwinner/phy-sun9i-usb.c | 4 +--- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index 0f1888b55dbd..a6900495baa5 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -686,7 +686,6 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct phy_provider *phy_provider; - struct resource *res; int i, ret; data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); @@ -700,8 +699,7 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev) if (!data->cfg) return -EINVAL; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phy_ctrl"); - data->base = devm_ioremap_resource(dev, res); + data->base = devm_platform_ioremap_resource_byname(pdev, "phy_ctrl"); if (IS_ERR(data->base)) return PTR_ERR(data->base); @@ -796,9 +794,8 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev) if (i || data->cfg->phy0_dual_route) { /* No pmu for musb */ snprintf(name, sizeof(name), "pmu%d", i); - res = platform_get_resource_byname(pdev, - IORESOURCE_MEM, name); - phy->pmu = devm_ioremap_resource(dev, res); + phy->pmu = devm_platform_ioremap_resource_byname(pdev, + name); if (IS_ERR(phy->pmu)) return PTR_ERR(phy->pmu); } diff --git a/drivers/phy/allwinner/phy-sun50i-usb3.c b/drivers/phy/allwinner/phy-sun50i-usb3.c index b1c04f71a31d..84055b720016 100644 --- a/drivers/phy/allwinner/phy-sun50i-usb3.c +++ b/drivers/phy/allwinner/phy-sun50i-usb3.c @@ -134,7 +134,6 @@ static int sun50i_usb3_phy_probe(struct platform_device *pdev) struct sun50i_usb3_phy *phy; struct device *dev = &pdev->dev; struct phy_provider *phy_provider; - struct resource *res; phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); if (!phy) @@ -153,8 +152,7 @@ static int sun50i_usb3_phy_probe(struct platform_device *pdev) return PTR_ERR(phy->reset); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - phy->regs = devm_ioremap_resource(dev, res); + phy->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(phy->regs)) return PTR_ERR(phy->regs); diff --git a/drivers/phy/allwinner/phy-sun6i-mipi-dphy.c b/drivers/phy/allwinner/phy-sun6i-mipi-dphy.c index 1fa761ba6cbb..f0bc87d654d4 100644 --- a/drivers/phy/allwinner/phy-sun6i-mipi-dphy.c +++ b/drivers/phy/allwinner/phy-sun6i-mipi-dphy.c @@ -253,15 +253,13 @@ static int sun6i_dphy_probe(struct platform_device *pdev) { struct phy_provider *phy_provider; struct sun6i_dphy *dphy; - struct resource *res; void __iomem *regs; dphy = devm_kzalloc(&pdev->dev, sizeof(*dphy), GFP_KERNEL); if (!dphy) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(&pdev->dev, res); + regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(regs)) { dev_err(&pdev->dev, "Couldn't map the DPHY encoder registers\n"); return PTR_ERR(regs); diff --git a/drivers/phy/allwinner/phy-sun9i-usb.c b/drivers/phy/allwinner/phy-sun9i-usb.c index fc6784dd7fa0..2f9e60c188b8 100644 --- a/drivers/phy/allwinner/phy-sun9i-usb.c +++ b/drivers/phy/allwinner/phy-sun9i-usb.c @@ -117,7 +117,6 @@ static int sun9i_usb_phy_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct phy_provider *phy_provider; - struct resource *res; phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); if (!phy) @@ -156,8 +155,7 @@ static int sun9i_usb_phy_probe(struct platform_device *pdev) } } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - phy->pmu = devm_ioremap_resource(dev, res); + phy->pmu = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(phy->pmu)) return PTR_ERR(phy->pmu);