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>
This commit is contained in:
Masahiro Yamada
2016-07-19 21:56:13 +09:00
parent 72a64348ef
commit 4e3d84066e
22 changed files with 61 additions and 121 deletions

View 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;