powerpc/fsl: use of_iomap() for rstcr mapping

The rstcr register mapping code was written sometime ago before
of_iomap() existed.  We can use it and clean up the code a bit
and get rid of one user of get_immrbase() in the process.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
Kumar Gala 2009-04-22 13:18:02 -05:00
Родитель abd7d4837f
Коммит 81db718d48
1 изменённых файлов: 4 добавлений и 10 удалений

Просмотреть файл

@ -379,16 +379,10 @@ static int __init setup_rstcr(void)
struct device_node *np; struct device_node *np;
np = of_find_node_by_name(NULL, "global-utilities"); np = of_find_node_by_name(NULL, "global-utilities");
if ((np && of_get_property(np, "fsl,has-rstcr", NULL))) { if ((np && of_get_property(np, "fsl,has-rstcr", NULL))) {
const u32 *prop = of_get_property(np, "reg", NULL); rstcr = of_iomap(np, 0) + 0xb0;
if (prop) { if (!rstcr)
/* map reset control register printk (KERN_EMERG "Error: reset control register "
* 0xE00B0 is offset of reset control register "not mapped!\n");
*/
rstcr = ioremap(get_immrbase() + *prop + 0xB0, 0xff);
if (!rstcr)
printk (KERN_EMERG "Error: reset control "
"register not mapped!\n");
}
} else } else
printk (KERN_INFO "rstcr compatible register does not exist!\n"); printk (KERN_INFO "rstcr compatible register does not exist!\n");
if (np) if (np)