1 Now that we have DT bindings to specify which devices should not
2 be reset and idled during init, make hwmod extract the information
3 (and store them in internal flags) from Device tree.
5 Signed-off-by: Rajendra Nayak <rnayak@ti.com>
8 arch/arm/mach-omap2/omap_hwmod.c | 23 ++++++++++++++++-------
9 1 file changed, 16 insertions(+), 7 deletions(-)
11 --- a/arch/arm/mach-omap2/omap_hwmod.c
12 +++ b/arch/arm/mach-omap2/omap_hwmod.c
13 @@ -2363,11 +2363,11 @@ static struct device_node *of_dev_hwmod_
14 * are part of the device's address space can be ioremapped properly.
17 -static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
18 +static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data,
19 + struct device_node *np)
21 struct omap_hwmod_addr_space *mem;
22 void __iomem *va_start = NULL;
23 - struct device_node *np;
27 @@ -2383,12 +2383,10 @@ static void __init _init_mpu_rt_base(str
30 /* Extract the IO space from device tree blob */
31 - if (!of_have_populated_dt())
35 - np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh);
37 - va_start = of_iomap(np, oh->mpu_rt_idx);
38 + va_start = of_iomap(np, oh->mpu_rt_idx);
40 va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start);
42 @@ -2420,12 +2418,16 @@ static void __init _init_mpu_rt_base(str
43 static int __init _init(struct omap_hwmod *oh, void *data)
46 + struct device_node *np = NULL;
48 if (oh->_state != _HWMOD_STATE_REGISTERED)
51 + if (of_have_populated_dt())
52 + np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh);
55 - _init_mpu_rt_base(oh, NULL);
56 + _init_mpu_rt_base(oh, NULL, np);
58 r = _init_clocks(oh, NULL);
60 @@ -2433,6 +2435,13 @@ static int __init _init(struct omap_hwmo
65 + if (of_find_property(np, "ti,no-reset-on-init", NULL))
66 + oh->flags |= HWMOD_INIT_NO_RESET;
67 + if (of_find_property(np, "ti,no-idle-on-init", NULL))
68 + oh->flags |= HWMOD_INIT_NO_IDLE;
71 oh->_state = _HWMOD_STATE_INITIALIZED;