From 4e3d84066e09c9ab6cee2102db7a2c51090962a4 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 19 Jul 2016 21:56:13 +0900 Subject: ARM: uniphier: use (devm_)ioremap() instead of map_sysmem() 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 --- drivers/clk/uniphier/clk-uniphier-core.c | 15 +++------------ drivers/clk/uniphier/clk-uniphier-mio.c | 4 ++-- drivers/clk/uniphier/clk-uniphier.h | 4 ++-- 3 files changed, 7 insertions(+), 16 deletions(-) (limited to 'drivers/clk') diff --git a/drivers/clk/uniphier/clk-uniphier-core.c b/drivers/clk/uniphier/clk-uniphier-core.c index 2f5d4d8..a91924e 100644 --- a/drivers/clk/uniphier/clk-uniphier-core.c +++ b/drivers/clk/uniphier/clk-uniphier-core.c @@ -1,11 +1,11 @@ /* - * Copyright (C) 2016 Masahiro Yamada + * Copyright (C) 2016 Socionext Inc. + * Author: Masahiro Yamada * * SPDX-License-Identifier: GPL-2.0+ */ #include -#include #include #include #include @@ -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; -} diff --git a/drivers/clk/uniphier/clk-uniphier-mio.c b/drivers/clk/uniphier/clk-uniphier-mio.c index 2dd3fc0..2eea5eb 100644 --- a/drivers/clk/uniphier/clk-uniphier-mio.c +++ b/drivers/clk/uniphier/clk-uniphier-mio.c @@ -1,5 +1,6 @@ /* - * Copyright (C) 2016 Masahiro Yamada + * Copyright (C) 2016 Socionext Inc. + * Author: Masahiro Yamada * * 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, }; diff --git a/drivers/clk/uniphier/clk-uniphier.h b/drivers/clk/uniphier/clk-uniphier.h index 560b3f8..18aa888 100644 --- a/drivers/clk/uniphier/clk-uniphier.h +++ b/drivers/clk/uniphier/clk-uniphier.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2016 Masahiro Yamada + * Copyright (C) 2016 Socionext Inc. + * Author: Masahiro Yamada * * 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__ */ -- cgit v1.1