powerpc: don't use ioremap_prot() nor __ioremap() unless really needed.

In many places, ioremap_prot() and __ioremap() can be replaced with
higher level functions like ioremap(), ioremap_coherent(),
ioremap_cache(), ioremap_wc() ...

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Christophe Leroy
2018-10-09 13:51:41 +00:00
committed by Michael Ellerman
parent 402a5698b4
commit aa91796ec4
6 changed files with 10 additions and 11 deletions

View File

@@ -107,11 +107,11 @@ int __init instantiate_cache_sram(struct platform_device *dev,
goto out_free;
}
cache_sram->base_virt = ioremap_prot(cache_sram->base_phys,
cache_sram->size, _PAGE_COHERENT | PAGE_KERNEL);
cache_sram->base_virt = ioremap_coherent(cache_sram->base_phys,
cache_sram->size);
if (!cache_sram->base_virt) {
dev_err(&dev->dev, "%pOF: ioremap_prot failed\n",
dev->dev.of_node);
dev_err(&dev->dev, "%pOF: ioremap_coherent failed\n",
dev->dev.of_node);
ret = -ENOMEM;
goto out_release;
}