diff options
author | Tony Lindgren <tony@atomide.com> | 2017-06-12 13:27:30 +0300 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2017-06-12 13:27:30 +0300 |
commit | 67d00470accf5c58abbb23a44c867c5f15437976 (patch) | |
tree | 4141a408b08ec38c6d3cf0295641ce3e8a63182b /arch/arm/mach-omap2/prm_common.c | |
parent | 018b732458ac39c4858d9840c0e32310bc0930dd (diff) | |
parent | 70f05be3213393f20f01e4d59625df7ee49fe32f (diff) | |
download | linux-67d00470accf5c58abbb23a44c867c5f15437976.tar.xz |
Merge branch 'omap-for-v4.13/clkctrl' into omap-for-v4.13/soc-v4
Diffstat (limited to 'arch/arm/mach-omap2/prm_common.c')
-rw-r--r-- | arch/arm/mach-omap2/prm_common.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c index 538980ee20d4..d4213114205f 100644 --- a/arch/arm/mach-omap2/prm_common.c +++ b/arch/arm/mach-omap2/prm_common.c @@ -66,7 +66,7 @@ static struct irq_chip_generic **prcm_irq_chips; static struct omap_prcm_irq_setup *prcm_irq_setup; /* prm_base: base virtual address of the PRM IP block */ -void __iomem *prm_base; +struct omap_domain_base prm_base; u16 prm_features; @@ -324,7 +324,7 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup) for (i = 0; i < irq_setup->nr_regs; i++) { gc = irq_alloc_generic_chip("PRCM", 1, - irq_setup->base_irq + i * 32, prm_base, + irq_setup->base_irq + i * 32, prm_base.va, handle_level_irq); if (!gc) { @@ -361,7 +361,7 @@ err: */ void __init omap2_set_globals_prm(void __iomem *prm) { - prm_base = prm; + prm_base.va = prm; } /** @@ -752,19 +752,22 @@ int __init omap2_prm_base_init(void) struct device_node *np; const struct of_device_id *match; struct omap_prcm_init_data *data; - void __iomem *mem; + struct resource res; + int ret; for_each_matching_node_and_match(np, omap_prcm_dt_match_table, &match) { data = (struct omap_prcm_init_data *)match->data; - mem = of_iomap(np, 0); - if (!mem) - return -ENOMEM; + ret = of_address_to_resource(np, 0, &res); + if (ret) + return ret; - if (data->index == TI_CLKM_PRM) - prm_base = mem + data->offset; + data->mem = ioremap(res.start, resource_size(&res)); - data->mem = mem; + if (data->index == TI_CLKM_PRM) { + prm_base.va = data->mem + data->offset; + prm_base.pa = res.start + data->offset; + } data->np = np; |