ARM: uniphier: use (devm_)ioremap() instead of map_sysmem()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 19 Jul 2016 12:56:13 +0000 (21:56 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 23 Jul 2016 15:13:10 +0000 (00:13 +0900)
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 <yamada.masahiro@socionext.com>
22 files changed:
arch/arm/mach-uniphier/arm64/arm-cci500.c
arch/arm/mach-uniphier/arm64/smp_kick_cpus.c
arch/arm/mach-uniphier/arm64/timer.c
arch/arm/mach-uniphier/dram/cmd_ddrphy.c
drivers/clk/uniphier/clk-uniphier-core.c
drivers/clk/uniphier/clk-uniphier-mio.c
drivers/clk/uniphier/clk-uniphier.h
drivers/gpio/gpio-uniphier.c
drivers/i2c/i2c-uniphier-f.c
drivers/i2c/i2c-uniphier.c
drivers/mmc/uniphier-sd.c
drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c
drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c
drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c
drivers/pinctrl/uniphier/pinctrl-uniphier.h
drivers/serial/serial_uniphier.c

index 607f96a..f18595d 100644 (file)
@@ -1,13 +1,12 @@
 /*
  * Initialization of ARM Corelink CCI-500 Cache Coherency Interconnect
  *
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
-#include <common.h>
-#include <mapmem.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
@@ -28,13 +27,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;
        }
index 5971ad2..4f08963 100644 (file)
@@ -1,11 +1,10 @@
 /*
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
-#include <common.h>
-#include <mapmem.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
 
@@ -18,11 +17,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();
 
index 4beab9d..c10903a 100644 (file)
@@ -1,11 +1,10 @@
 /*
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
-#include <common.h>
-#include <mapmem.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
@@ -21,7 +20,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 +31,7 @@ int timer_init(void)
        tmp |= CNTCR_EN;
        writel(tmp, base + CNTCR);
 
-       unmap_sysmem(base);
+       iounmap(base);
 
        return 0;
 }
index 7a9f76c..0a5a73d 100644 (file)
@@ -1,11 +1,12 @@
 /*
- * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2014      Panasonic Corporation
+ * Copyright (C) 2015-2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
-#include <mapmem.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
 
@@ -51,7 +52,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 +60,7 @@ static void dump_loop(unsigned long *base,
                        printf("\n");
                }
 
-               unmap_sysmem(phy);
+               iounmap(phy);
        }
 }
 
@@ -172,7 +173,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 +207,7 @@ static void reg_dump(unsigned long *base)
                REG_DUMP(dx[1].gcr);
                REG_DUMP(dx[1].gtr);
 
-               unmap_sysmem(phy);
+               iounmap(phy);
        }
 }
 
index 2f5d4d8..a91924e 100644 (file)
@@ -1,11 +1,11 @@
 /*
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
-#include <mapmem.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
@@ -137,7 +137,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 +145,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;
-}
index 2dd3fc0..2eea5eb 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -179,7 +180,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,
 };
index 560b3f8..18aa888 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -52,6 +53,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__ */
index bde51ea..afb27a3 100644 (file)
@@ -1,12 +1,12 @@
 /*
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <dm/device.h>
-#include <mapmem.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
@@ -99,7 +99,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 +119,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 +130,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,
 };
index aebdcfc..a56e058 100644 (file)
@@ -1,5 +1,7 @@
 /*
- * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2014      Panasonic Corporation
+ * Copyright (C) 2015-2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -13,7 +15,6 @@
 #include <dm/root.h>
 #include <i2c.h>
 #include <fdtdec.h>
-#include <mapmem.h>
 
 struct uniphier_fi2c_regs {
        u32 cr;                         /* control register */
@@ -118,7 +119,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 +135,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 +351,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,
 };
index f8221da..39a3ebd 100644 (file)
@@ -1,5 +1,7 @@
 /*
- * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2014      Panasonic Corporation
+ * Copyright (C) 2015-2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -13,7 +15,6 @@
 #include <dm/root.h>
 #include <i2c.h>
 #include <fdtdec.h>
-#include <mapmem.h>
 
 struct uniphier_i2c_regs {
        u32 dtrm;                       /* data transmission */
@@ -53,7 +54,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 +66,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 +212,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,
 };
index 152e987..02df809 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -7,7 +8,6 @@
 #include <common.h>
 #include <clk.h>
 #include <fdtdec.h>
-#include <mapmem.h>
 #include <mmc.h>
 #include <dm/device.h>
 #include <linux/compat.h>
@@ -660,7 +660,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 +735,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;
index 225a05c..3f891f1 100644 (file)
@@ -1,11 +1,10 @@
 /*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2015-2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
-#include <common.h>
-#include <mapmem.h>
 #include <linux/io.h>
 #include <linux/err.h>
 #include <linux/sizes.h>
@@ -188,7 +187,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 +195,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;
-}
index e95870f..e42602b 100644 (file)
@@ -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,
 };
index e903196..d6ae512 100644 (file)
@@ -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,
 };
index dbb9499..955858a 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2015-2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -135,7 +136,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,
 };
index 8b40801..5f9407e 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2015-2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -135,7 +136,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,
 };
index dace726..6f349dc 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2015-2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -143,7 +144,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,
index 50b41cc..268cdea 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2015-2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -134,7 +135,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,
index 9223eeb..b534274 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2015-2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -147,7 +148,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,
 };
index cee0eb1..a85e055 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2015-2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -143,7 +144,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,
 };
index 4bb8932..4de5b03 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2015-2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -119,6 +120,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__ */
index 525f0a4..ab607b7 100644 (file)
@@ -1,5 +1,7 @@
 /*
- * Copyright (C) 2012-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2012-2015 Panasonic Corporation
+ * Copyright (C) 2015-2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -9,7 +11,6 @@
 #include <linux/sizes.h>
 #include <asm/errno.h>
 #include <dm/device.h>
-#include <mapmem.h>
 #include <serial.h>
 #include <fdtdec.h>
 
@@ -98,7 +99,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 +116,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 +133,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,
 };