diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-07-19 21:56:13 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-07-24 00:13:10 +0900 |
commit | 4e3d84066e09c9ab6cee2102db7a2c51090962a4 (patch) | |
tree | a563f3c3f0f0ef2426ef96157fbb628f41c47851 /drivers/pinctrl | |
parent | 72a64348ef937daaca0553e9d8d75b5774555e57 (diff) | |
download | u-boot-4e3d84066e09c9ab6cee2102db7a2c51090962a4.tar.gz u-boot-4e3d84066e09c9ab6cee2102db7a2c51090962a4.tar.bz2 u-boot-4e3d84066e09c9ab6cee2102db7a2c51090962a4.zip |
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 <yamada.masahiro@socionext.com>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | 16 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c | 1 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c | 1 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c | 4 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c | 4 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c | 4 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c | 4 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c | 4 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c | 4 | ||||
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier.h | 5 |
10 files changed, 17 insertions, 30 deletions
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c index 225a05c56d..3f891f1581 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c @@ -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; -} diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c index e95870f2c1..e42602bc82 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 e9031966d0..d6ae51248a 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 dbb9499313..955858a6aa 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c @@ -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, }; diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c index 8b40801175..5f9407ed21 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c @@ -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, }; diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c index dace726b08..6f349dcd2e 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c @@ -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, diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c index 50b41cc37c..268cdea42a 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c @@ -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, diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c index 9223eebc89..b534274317 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c @@ -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, }; diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c index cee0eb1abd..a85e055dae 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c @@ -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, }; diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier.h b/drivers/pinctrl/uniphier/pinctrl-uniphier.h index 4bb893218a..4de5b03c8d 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier.h +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier.h @@ -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__ */ |