summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/prm_common.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2017-06-18 20:46:30 -0700
committerOlof Johansson <olof@lixom.net>2017-06-18 20:46:30 -0700
commit2b1ee3061f09bd90a5c659b9cb45fcbf49c5fd4c (patch)
tree37fc6c42bc227468e0c60869fd60e59685726135 /arch/arm/mach-omap2/prm_common.c
parent6198c74939c085fbd31fab3ba6f1eb2ce2820b39 (diff)
parent1df5eaa6bced2d8a9de305d4a5f587adf57ddf35 (diff)
downloadlinux-2b1ee3061f09bd90a5c659b9cb45fcbf49c5fd4c.tar.bz2
Merge tag 'omap-for-v4.13/soc-v4-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
SoC changes for omap variants for v4.13 merge window: - PM clean-up in preparation of adding am335x/am437x PM support - Fixes for issues found by Coccinelle - Legacy code removal now that everything boots in device tree only mode - Interconnect changes in preparation of moving clkctrl clocks to be managed by clkctrl clock driver - Interconnect changes to add omap4 crypto acceclerator support * tag 'omap-for-v4.13/soc-v4-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (27 commits) ARM: OMAP4: hwmod_data: add SHAM crypto accelerator ARM: OMAP4: hwmod data: add des ARM: OMAP4: hwmod data: add aes2 ARM: OMAP4: hwmod data: add aes1 ARM: OMAP2+: Remove unused legacy code for n8x0 ARM: OMAP2+: Remove unused legacy code for watchdog ARM: OMAP2+: Remove unused legacy code for interconnects ARM: OMAP2+: Remove unused legacy code for PRM ARM: OMAP2+: Remove unused legacy code for io.c ARM: OMAP2+: Remove unused legacy code for McBSP ARM: OMAP2+: SmartReflex: Delete an error message for a failed memory allocation in two functions ARM: OMAP2+: Use kcalloc() in sr_set_nvalues() ARM: OMAP2+: Improve a size determination in sr_dev_init() ARM: OMAP2+: Delete an error message for a failed memory allocation in two functions ARM: OMAP2+: Remove unused legacy code for device init ARM: OMAP2+: Remove unused legacy code for PMU ARM: OMAP2+: Remove unused legacy code for opp ARM: OMAP2+: hwmod: populate clkctrl clocks for hwmods if available ARM: OMAP4: cminst: add support for clkdm_xlate_address ARM: omap2+: clockdomain: add clkdm_xlate_address ... Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-omap2/prm_common.c')
-rw-r--r--arch/arm/mach-omap2/prm_common.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c
index dc11841ca334..09180a59b1c9 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;
@@ -267,10 +267,9 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup)
{
int nr_regs;
u32 mask[OMAP_PRCM_MAX_NR_PENDING_REG];
- int offset, i;
+ int offset, i, irq;
struct irq_chip_generic *gc;
struct irq_chip_type *ct;
- unsigned int irq;
if (!irq_setup)
return -EINVAL;
@@ -325,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) {
@@ -344,10 +343,8 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup)
prcm_irq_chips[i] = gc;
}
- if (of_have_populated_dt()) {
- int irq = omap_prcm_event_to_irq("io");
- omap_pcs_legacy_init(irq, irq_setup->reconfigure_io_chain);
- }
+ irq = omap_prcm_event_to_irq("io");
+ omap_pcs_legacy_init(irq, irq_setup->reconfigure_io_chain);
return 0;
@@ -364,7 +361,7 @@ err:
*/
void __init omap2_set_globals_prm(void __iomem *prm)
{
- prm_base = prm;
+ prm_base.va = prm;
}
/**
@@ -755,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;