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/serial | |
parent | 72a64348ef937daaca0553e9d8d75b5774555e57 (diff) | |
download | u-boot-imx-4e3d84066e09c9ab6cee2102db7a2c51090962a4.zip u-boot-imx-4e3d84066e09c9ab6cee2102db7a2c51090962a4.tar.gz u-boot-imx-4e3d84066e09c9ab6cee2102db7a2c51090962a4.tar.bz2 |
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/serial')
-rw-r--r-- | drivers/serial/serial_uniphier.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/serial/serial_uniphier.c b/drivers/serial/serial_uniphier.c index 525f0a4..ab607b7 100644 --- a/drivers/serial/serial_uniphier.c +++ b/drivers/serial/serial_uniphier.c @@ -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, }; |