ARM: 8416/1: Feroceon: use of_iomap() to map register base
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>
This commit is contained in:
Родитель
a5f4c561b3
Коммит
da4f295b4a
|
@ -368,7 +368,6 @@ int __init feroceon_of_init(void)
|
||||||
struct device_node *node;
|
struct device_node *node;
|
||||||
void __iomem *base;
|
void __iomem *base;
|
||||||
bool l2_wt_override = false;
|
bool l2_wt_override = false;
|
||||||
struct resource res;
|
|
||||||
|
|
||||||
#if defined(CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH)
|
#if defined(CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH)
|
||||||
l2_wt_override = true;
|
l2_wt_override = true;
|
||||||
|
@ -376,10 +375,7 @@ int __init feroceon_of_init(void)
|
||||||
|
|
||||||
node = of_find_matching_node(NULL, feroceon_ids);
|
node = of_find_matching_node(NULL, feroceon_ids);
|
||||||
if (node && of_device_is_compatible(node, "marvell,kirkwood-cache")) {
|
if (node && of_device_is_compatible(node, "marvell,kirkwood-cache")) {
|
||||||
if (of_address_to_resource(node, 0, &res))
|
base = of_iomap(node, 0);
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
base = ioremap(res.start, resource_size(&res));
|
|
||||||
if (!base)
|
if (!base)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче