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 /arch/arm/mach-uniphier/arm64/timer.c | |
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 'arch/arm/mach-uniphier/arm64/timer.c')
-rw-r--r-- | arch/arm/mach-uniphier/arm64/timer.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/arm/mach-uniphier/arm64/timer.c b/arch/arm/mach-uniphier/arm64/timer.c index 4beab9d..c10903a 100644 --- a/arch/arm/mach-uniphier/arm64/timer.c +++ b/arch/arm/mach-uniphier/arm64/timer.c @@ -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; } |