Skip to content

Commit

Permalink
ARM: 8416/1: Feroceon: use of_iomap() to map register base
Browse files Browse the repository at this point in the history
The chain of of_address_to_resource() and ioremap() can be replaced
with of_iomap().

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Masahiro Yamada authored and Russell King committed Aug 18, 2015
1 parent a5f4c56 commit da4f295
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions arch/arm/mm/cache-feroceon-l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,18 +368,14 @@ int __init feroceon_of_init(void)
struct device_node *node;
void __iomem *base;
bool l2_wt_override = false;
struct resource res;

#if defined(CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH)
l2_wt_override = true;
#endif

node = of_find_matching_node(NULL, feroceon_ids);
if (node && of_device_is_compatible(node, "marvell,kirkwood-cache")) {
if (of_address_to_resource(node, 0, &res))
return -ENODEV;

base = ioremap(res.start, resource_size(&res));
base = of_iomap(node, 0);
if (!base)
return -ENOMEM;

Expand Down

0 comments on commit da4f295

Please sign in to comment.