From patchwork Tue Jul 19 12:56:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 72302 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp63291qga; Tue, 19 Jul 2016 05:54:54 -0700 (PDT) X-Received: by 10.28.9.67 with SMTP id 64mr4326547wmj.36.1468932894752; Tue, 19 Jul 2016 05:54:54 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id z207si19980181wmc.40.2016.07.19.05.54.54; Tue, 19 Jul 2016 05:54:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EB17DA7524; Tue, 19 Jul 2016 14:54:52 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hfwzMWay-kLy; Tue, 19 Jul 2016 14:54:52 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 63C5EA7514; Tue, 19 Jul 2016 14:54:52 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C2ABBA7514 for ; Tue, 19 Jul 2016 14:54:46 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RUHCTnAJo00M for ; Tue, 19 Jul 2016 14:54:46 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by theia.denx.de (Postfix) with ESMTPS id 11501A750A for ; Tue, 19 Jul 2016 14:54:42 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id u6JCsPXa022748; Tue, 19 Jul 2016 21:54:26 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com u6JCsPXa022748 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1468932866; bh=KSTn62vrbRXUjQbQMye2nttwJ5H1nfSZr5JGrf2tjbM=; h=From:To:Cc:Subject:Date:From; b=PsIJrgqbR+joZD5DltISxLZ/3fcmAVjwU7EO0Q7+nfoqwQKylx+Q46OQPxjDxqibE Qi3LWR8XhlaTaBRQpO5t81gPhDbJbD22OTENiVMRJf6SEHkdTv+FmpEEzSiAslPfcn pi26aKHtN0tkPhrSdtaYzEIgXZ1s5Og3K4u9P8kCQYjYI4APi3n/551hubjLBipwRU PgyUFKNYVRxJxxdPGq0Fp1aPfgQ4fcFPx0ZOgSbDMOYpp2rufzcPkYZUcxvbmfafWm Bd1tjmvymM86m1DG0THcM/tBNfk/zG0uKprw6PySnanLK1/9gQlLTBVCBUa8e7/KBY vJyS+MKe5zzgA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 19 Jul 2016 21:56:13 +0900 Message-Id: <1468932973-1271-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Subject: [U-Boot] [PATCH v2] ARM: uniphier: use (devm_)ioremap() instead of map_sysmem() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This does not have much impact on behavior, but makes code look more more like Linux. The use of devm_ioremap() often helps to delete .remove callbacks entirely. Signed-off-by: Masahiro Yamada --- Changes in v2: - Replace more arch/arm/mach-uniphier/arm64/arm-cci500.c | 6 ++---- arch/arm/mach-uniphier/arm64/smp_kick_cpus.c | 6 ++---- arch/arm/mach-uniphier/arm64/timer.c | 6 ++---- arch/arm/mach-uniphier/dram/cmd_ddrphy.c | 9 ++++----- drivers/clk/uniphier/clk-uniphier-core.c | 12 +----------- drivers/clk/uniphier/clk-uniphier-mio.c | 1 - drivers/clk/uniphier/clk-uniphier.h | 1 - drivers/gpio/gpio-uniphier.c | 13 +------------ drivers/i2c/i2c-uniphier-f.c | 13 +------------ drivers/i2c/i2c-uniphier.c | 13 +------------ drivers/mmc/uniphier-sd.c | 4 +--- drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | 13 +------------ drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c | 1 - drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c | 1 - drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c | 1 - drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c | 1 - drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c | 1 - drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c | 1 - drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c | 1 - drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c | 1 - drivers/pinctrl/uniphier/pinctrl-uniphier.h | 2 -- drivers/serial/serial_uniphier.c | 11 +---------- 22 files changed, 17 insertions(+), 101 deletions(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/arch/arm/mach-uniphier/arm64/arm-cci500.c b/arch/arm/mach-uniphier/arm64/arm-cci500.c index 607f96a..f86d72a 100644 --- a/arch/arm/mach-uniphier/arm64/arm-cci500.c +++ b/arch/arm/mach-uniphier/arm64/arm-cci500.c @@ -6,8 +6,6 @@ * SPDX-License-Identifier: GPL-2.0+ */ -#include -#include #include #include #include @@ -28,13 +26,13 @@ void cci500_init(unsigned int nr_slaves) void __iomem *base; u32 tmp; - base = map_sysmem(slave_base, SZ_4K); + base = ioremap(slave_base, SZ_4K); tmp = readl(base); tmp |= CCI500_SNOOP_CTRL_EN_DVM | CCI500_SNOOP_CTRL_EN_SNOOP; writel(tmp, base); - unmap_sysmem(base); + iounmap(base); slave_base += CCI500_SLAVE_OFFSET; } diff --git a/arch/arm/mach-uniphier/arm64/smp_kick_cpus.c b/arch/arm/mach-uniphier/arm64/smp_kick_cpus.c index 5971ad2..3ed208b 100644 --- a/arch/arm/mach-uniphier/arm64/smp_kick_cpus.c +++ b/arch/arm/mach-uniphier/arm64/smp_kick_cpus.c @@ -4,8 +4,6 @@ * SPDX-License-Identifier: GPL-2.0+ */ -#include -#include #include #include @@ -18,11 +16,11 @@ void uniphier_smp_kick_all_cpus(void) { void __iomem *rom_boot_rsv0; - rom_boot_rsv0 = map_sysmem(UNIPHIER_SMPCTRL_ROM_RSV0, SZ_8); + rom_boot_rsv0 = ioremap(UNIPHIER_SMPCTRL_ROM_RSV0, SZ_8); writeq((u64)uniphier_secondary_startup, rom_boot_rsv0); - unmap_sysmem(rom_boot_rsv0); + iounmap(rom_boot_rsv0); uniphier_smp_setup(); diff --git a/arch/arm/mach-uniphier/arm64/timer.c b/arch/arm/mach-uniphier/arm64/timer.c index 4beab9d..b81e465 100644 --- a/arch/arm/mach-uniphier/arm64/timer.c +++ b/arch/arm/mach-uniphier/arm64/timer.c @@ -4,8 +4,6 @@ * SPDX-License-Identifier: GPL-2.0+ */ -#include -#include #include #include #include @@ -21,7 +19,7 @@ int timer_init(void) void __iomem *base; u32 tmp; - base = map_sysmem(CNT_CONTROL_BASE, SZ_4K); + base = ioremap(CNT_CONTROL_BASE, SZ_4K); /* * Note: @@ -32,7 +30,7 @@ int timer_init(void) tmp |= CNTCR_EN; writel(tmp, base + CNTCR); - unmap_sysmem(base); + iounmap(base); return 0; } diff --git a/arch/arm/mach-uniphier/dram/cmd_ddrphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrphy.c index 7a9f76c..32108c0 100644 --- a/arch/arm/mach-uniphier/dram/cmd_ddrphy.c +++ b/arch/arm/mach-uniphier/dram/cmd_ddrphy.c @@ -5,7 +5,6 @@ */ #include -#include #include #include @@ -51,7 +50,7 @@ static void dump_loop(unsigned long *base, int p, dx; for (p = 0; *base; base++, p++) { - phy = map_sysmem(*base, SZ_4K); + phy = ioremap(*base, SZ_4K); for (dx = 0; dx < NR_DATX8_PER_DDRPHY; dx++) { printf("PHY%dDX%d:", p, dx); @@ -59,7 +58,7 @@ static void dump_loop(unsigned long *base, printf("\n"); } - unmap_sysmem(phy); + iounmap(phy); } } @@ -172,7 +171,7 @@ static void reg_dump(unsigned long *base) printf("\n--- DDR PHY registers ---\n"); for (p = 0; *base; base++, p++) { - phy = map_sysmem(*base, SZ_4K); + phy = ioremap(*base, SZ_4K); printf("== PHY%d (base: %p) ==\n", p, phy); printf(" No: Name : Address : Data\n"); @@ -206,7 +205,7 @@ static void reg_dump(unsigned long *base) REG_DUMP(dx[1].gcr); REG_DUMP(dx[1].gtr); - unmap_sysmem(phy); + iounmap(phy); } } diff --git a/drivers/clk/uniphier/clk-uniphier-core.c b/drivers/clk/uniphier/clk-uniphier-core.c index 2f5d4d8..ede76fd 100644 --- a/drivers/clk/uniphier/clk-uniphier-core.c +++ b/drivers/clk/uniphier/clk-uniphier-core.c @@ -5,7 +5,6 @@ */ #include -#include #include #include #include @@ -137,7 +136,7 @@ int uniphier_clk_probe(struct udevice *dev) if (addr == FDT_ADDR_T_NONE) return -EINVAL; - priv->base = map_sysmem(addr, SZ_4K); + priv->base = devm_ioremap(dev, addr, SZ_4K); if (!priv->base) return -ENOMEM; @@ -145,12 +144,3 @@ int uniphier_clk_probe(struct udevice *dev) return 0; } - -int uniphier_clk_remove(struct udevice *dev) -{ - struct uniphier_clk_priv *priv = dev_get_priv(dev); - - unmap_sysmem(priv->base); - - return 0; -} diff --git a/drivers/clk/uniphier/clk-uniphier-mio.c b/drivers/clk/uniphier/clk-uniphier-mio.c index 2dd3fc0..1d845f9 100644 --- a/drivers/clk/uniphier/clk-uniphier-mio.c +++ b/drivers/clk/uniphier/clk-uniphier-mio.c @@ -179,7 +179,6 @@ U_BOOT_DRIVER(uniphier_mio_clk) = { .id = UCLASS_CLK, .of_match = uniphier_mio_clk_match, .probe = uniphier_clk_probe, - .remove = uniphier_clk_remove, .priv_auto_alloc_size = sizeof(struct uniphier_clk_priv), .ops = &uniphier_clk_ops, }; diff --git a/drivers/clk/uniphier/clk-uniphier.h b/drivers/clk/uniphier/clk-uniphier.h index 560b3f8..77fa9b4 100644 --- a/drivers/clk/uniphier/clk-uniphier.h +++ b/drivers/clk/uniphier/clk-uniphier.h @@ -52,6 +52,5 @@ struct uniphier_clk_priv { extern const struct clk_ops uniphier_clk_ops; int uniphier_clk_probe(struct udevice *dev); -int uniphier_clk_remove(struct udevice *dev); #endif /* __CLK_UNIPHIER_H__ */ diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c index bde51ea..9226a61 100644 --- a/drivers/gpio/gpio-uniphier.c +++ b/drivers/gpio/gpio-uniphier.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include @@ -99,7 +98,7 @@ static int uniphier_gpio_probe(struct udevice *dev) if (addr == FDT_ADDR_T_NONE) return -EINVAL; - priv->base = map_sysmem(addr, SZ_8); + priv->base = devm_ioremap(dev, addr, SZ_8); if (!priv->base) return -ENOMEM; @@ -119,15 +118,6 @@ static int uniphier_gpio_probe(struct udevice *dev) return 0; } -static int uniphier_gpio_remove(struct udevice *dev) -{ - struct uniphier_gpio_priv *priv = dev_get_priv(dev); - - unmap_sysmem(priv->base); - - return 0; -} - /* .data = the number of GPIO banks */ static const struct udevice_id uniphier_gpio_match[] = { { .compatible = "socionext,uniphier-gpio" }, @@ -139,7 +129,6 @@ U_BOOT_DRIVER(uniphier_gpio) = { .id = UCLASS_GPIO, .of_match = uniphier_gpio_match, .probe = uniphier_gpio_probe, - .remove = uniphier_gpio_remove, .priv_auto_alloc_size = sizeof(struct uniphier_gpio_priv), .ops = &uniphier_gpio_ops, }; diff --git a/drivers/i2c/i2c-uniphier-f.c b/drivers/i2c/i2c-uniphier-f.c index aebdcfc..0f9cf03 100644 --- a/drivers/i2c/i2c-uniphier-f.c +++ b/drivers/i2c/i2c-uniphier-f.c @@ -13,7 +13,6 @@ #include #include #include -#include struct uniphier_fi2c_regs { u32 cr; /* control register */ @@ -118,7 +117,7 @@ static int uniphier_fi2c_probe(struct udevice *dev) if (addr == FDT_ADDR_T_NONE) return -EINVAL; - priv->regs = map_sysmem(addr, SZ_128); + priv->regs = devm_ioremap(dev, addr, SZ_128); if (!priv->regs) return -ENOMEM; @@ -134,15 +133,6 @@ static int uniphier_fi2c_probe(struct udevice *dev) return 0; } -static int uniphier_fi2c_remove(struct udevice *dev) -{ - struct uniphier_fi2c_dev *priv = dev_get_priv(dev); - - unmap_sysmem(priv->regs); - - return 0; -} - static int wait_for_irq(struct uniphier_fi2c_dev *dev, u32 flags, bool *stop) { @@ -359,7 +349,6 @@ U_BOOT_DRIVER(uniphier_fi2c) = { .id = UCLASS_I2C, .of_match = uniphier_fi2c_of_match, .probe = uniphier_fi2c_probe, - .remove = uniphier_fi2c_remove, .priv_auto_alloc_size = sizeof(struct uniphier_fi2c_dev), .ops = &uniphier_fi2c_ops, }; diff --git a/drivers/i2c/i2c-uniphier.c b/drivers/i2c/i2c-uniphier.c index f8221da..36ca946 100644 --- a/drivers/i2c/i2c-uniphier.c +++ b/drivers/i2c/i2c-uniphier.c @@ -13,7 +13,6 @@ #include #include #include -#include struct uniphier_i2c_regs { u32 dtrm; /* data transmission */ @@ -53,7 +52,7 @@ static int uniphier_i2c_probe(struct udevice *dev) if (addr == FDT_ADDR_T_NONE) return -EINVAL; - priv->regs = map_sysmem(addr, SZ_64); + priv->regs = devm_ioremap(dev, addr, SZ_64); if (!priv->regs) return -ENOMEM; @@ -65,15 +64,6 @@ static int uniphier_i2c_probe(struct udevice *dev) return 0; } -static int uniphier_i2c_remove(struct udevice *dev) -{ - struct uniphier_i2c_dev *priv = dev_get_priv(dev); - - unmap_sysmem(priv->regs); - - return 0; -} - static int send_and_recv_byte(struct uniphier_i2c_dev *dev, u32 dtrm) { writel(dtrm, &dev->regs->dtrm); @@ -220,7 +210,6 @@ U_BOOT_DRIVER(uniphier_i2c) = { .id = UCLASS_I2C, .of_match = uniphier_i2c_of_match, .probe = uniphier_i2c_probe, - .remove = uniphier_i2c_remove, .priv_auto_alloc_size = sizeof(struct uniphier_i2c_dev), .ops = &uniphier_i2c_ops, }; diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c index 152e987..f1053ea 100644 --- a/drivers/mmc/uniphier-sd.c +++ b/drivers/mmc/uniphier-sd.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -660,7 +659,7 @@ int uniphier_sd_probe(struct udevice *dev) if (base == FDT_ADDR_T_NONE) return -EINVAL; - priv->regbase = map_sysmem(base, SZ_2K); + priv->regbase = devm_ioremap(dev, base, SZ_2K); if (!priv->regbase) return -ENOMEM; @@ -735,7 +734,6 @@ int uniphier_sd_remove(struct udevice *dev) { struct uniphier_sd_priv *priv = dev_get_priv(dev); - unmap_sysmem(priv->regbase); mmc_destroy(priv->mmc); return 0; diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c index 225a05c..895f840 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c @@ -4,8 +4,6 @@ * SPDX-License-Identifier: GPL-2.0+ */ -#include -#include #include #include #include @@ -188,7 +186,7 @@ int uniphier_pinctrl_probe(struct udevice *dev, if (addr == FDT_ADDR_T_NONE) return -EINVAL; - priv->base = map_sysmem(addr, SZ_4K); + priv->base = devm_ioremap(dev, addr, SZ_4K); if (!priv->base) return -ENOMEM; @@ -196,12 +194,3 @@ int uniphier_pinctrl_probe(struct udevice *dev, return 0; } - -int uniphier_pinctrl_remove(struct udevice *dev) -{ - struct uniphier_pinctrl_priv *priv = dev_get_priv(dev); - - unmap_sysmem(priv->base); - - return 0; -} diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c index e95870f..e42602b 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c @@ -101,7 +101,6 @@ U_BOOT_DRIVER(uniphier_ld11_pinctrl) = { .id = UCLASS_PINCTRL, .of_match = of_match_ptr(uniphier_ld11_pinctrl_match), .probe = uniphier_ld11_pinctrl_probe, - .remove = uniphier_pinctrl_remove, .priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv), .ops = &uniphier_pinctrl_ops, }; diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c index e903196..d6ae512 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c @@ -115,7 +115,6 @@ U_BOOT_DRIVER(uniphier_ld20_pinctrl) = { .id = UCLASS_PINCTRL, .of_match = of_match_ptr(uniphier_ld20_pinctrl_match), .probe = uniphier_ld20_pinctrl_probe, - .remove = uniphier_pinctrl_remove, .priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv), .ops = &uniphier_pinctrl_ops, }; diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c index dbb9499..626c61f 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c @@ -135,7 +135,6 @@ U_BOOT_DRIVER(uniphier_ld4_pinctrl) = { .id = UCLASS_PINCTRL, .of_match = of_match_ptr(uniphier_ld4_pinctrl_match), .probe = uniphier_ld4_pinctrl_probe, - .remove = uniphier_pinctrl_remove, .priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv), .ops = &uniphier_pinctrl_ops, }; diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c index 8b40801..82dea3f 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c @@ -135,7 +135,6 @@ U_BOOT_DRIVER(uniphier_ld6b_pinctrl) = { .id = UCLASS_PINCTRL, .of_match = of_match_ptr(uniphier_ld6b_pinctrl_match), .probe = uniphier_ld6b_pinctrl_probe, - .remove = uniphier_pinctrl_remove, .priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv), .ops = &uniphier_pinctrl_ops, }; diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c index dace726..512dee5 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c @@ -143,7 +143,6 @@ U_BOOT_DRIVER(uniphier_pro4_pinctrl) = { .id = UCLASS_PINCTRL, .of_match = of_match_ptr(uniphier_pro4_pinctrl_match), .probe = uniphier_pro4_pinctrl_probe, - .remove = uniphier_pinctrl_remove, .priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv), .ops = &uniphier_pinctrl_ops, .flags = DM_FLAG_PRE_RELOC, diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c index 50b41cc..608230f 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c @@ -134,7 +134,6 @@ U_BOOT_DRIVER(uniphier_pro5_pinctrl) = { .id = UCLASS_PINCTRL, .of_match = of_match_ptr(uniphier_pro5_pinctrl_match), .probe = uniphier_pro5_pinctrl_probe, - .remove = uniphier_pinctrl_remove, .priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv), .ops = &uniphier_pinctrl_ops, .flags = DM_FLAG_PRE_RELOC, diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c index 9223eeb..b64176a 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c @@ -147,7 +147,6 @@ U_BOOT_DRIVER(uniphier_pxs2_pinctrl) = { .id = UCLASS_PINCTRL, .of_match = of_match_ptr(uniphier_pxs2_pinctrl_match), .probe = uniphier_pxs2_pinctrl_probe, - .remove = uniphier_pinctrl_remove, .priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv), .ops = &uniphier_pinctrl_ops, }; diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c index cee0eb1..9274e28 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c @@ -143,7 +143,6 @@ U_BOOT_DRIVER(uniphier_sld8_pinctrl) = { .id = UCLASS_PINCTRL, .of_match = of_match_ptr(uniphier_sld8_pinctrl_match), .probe = uniphier_sld8_pinctrl_probe, - .remove = uniphier_pinctrl_remove, .priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv), .ops = &uniphier_pinctrl_ops, }; diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier.h b/drivers/pinctrl/uniphier/pinctrl-uniphier.h index 4bb8932..d4057c7 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier.h +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier.h @@ -119,6 +119,4 @@ extern const struct pinctrl_ops uniphier_pinctrl_ops; int uniphier_pinctrl_probe(struct udevice *dev, struct uniphier_pinctrl_socdata *socdata); -int uniphier_pinctrl_remove(struct udevice *dev); - #endif /* __PINCTRL_UNIPHIER_H__ */ diff --git a/drivers/serial/serial_uniphier.c b/drivers/serial/serial_uniphier.c index 525f0a4..35c6f12 100644 --- a/drivers/serial/serial_uniphier.c +++ b/drivers/serial/serial_uniphier.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include @@ -98,7 +97,7 @@ static int uniphier_serial_probe(struct udevice *dev) if (base == FDT_ADDR_T_NONE) return -EINVAL; - port = map_sysmem(base, SZ_64); + port = devm_ioremap(dev, base, SZ_64); if (!port) return -ENOMEM; @@ -115,13 +114,6 @@ static int uniphier_serial_probe(struct udevice *dev) return 0; } -static int uniphier_serial_remove(struct udevice *dev) -{ - unmap_sysmem(uniphier_serial_port(dev)); - - return 0; -} - static const struct udevice_id uniphier_uart_of_match[] = { { .compatible = "socionext,uniphier-uart" }, { /* sentinel */ } @@ -139,7 +131,6 @@ U_BOOT_DRIVER(uniphier_serial) = { .id = UCLASS_SERIAL, .of_match = uniphier_uart_of_match, .probe = uniphier_serial_probe, - .remove = uniphier_serial_remove, .priv_auto_alloc_size = sizeof(struct uniphier_serial_private_data), .ops = &uniphier_serial_ops, };