summaryrefslogtreecommitdiff
path: root/target/linux/omap/patches-3.12/202-ARM-OMAP2-hwmod-Extract-no-idle-and-no-reset-info-from-DT.patch
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2013-11-15 12:23:17 +0000
committerImre Kaloz <kaloz@openwrt.org>2013-11-15 12:23:17 +0000
commite4eef7e6207078a4987b0e02d2ad4068083cf921 (patch)
treeae97c3d14f8a010428d78dfc27dde471ad897232 /target/linux/omap/patches-3.12/202-ARM-OMAP2-hwmod-Extract-no-idle-and-no-reset-info-from-DT.patch
parent1f3478901593dd3bb4f32b2cdcb4c4cfecdbea5a (diff)
downloadmtk-20170518-e4eef7e6207078a4987b0e02d2ad4068083cf921.zip
mtk-20170518-e4eef7e6207078a4987b0e02d2ad4068083cf921.tar.gz
mtk-20170518-e4eef7e6207078a4987b0e02d2ad4068083cf921.tar.bz2
replace the TI patch with a smaller patchset
Signed-off-by: Imre Kaloz <kaloz@openwrt.org> SVN-Revision: 38816
Diffstat (limited to 'target/linux/omap/patches-3.12/202-ARM-OMAP2-hwmod-Extract-no-idle-and-no-reset-info-from-DT.patch')
-rw-r--r--target/linux/omap/patches-3.12/202-ARM-OMAP2-hwmod-Extract-no-idle-and-no-reset-info-from-DT.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/target/linux/omap/patches-3.12/202-ARM-OMAP2-hwmod-Extract-no-idle-and-no-reset-info-from-DT.patch b/target/linux/omap/patches-3.12/202-ARM-OMAP2-hwmod-Extract-no-idle-and-no-reset-info-from-DT.patch
new file mode 100644
index 0000000..129f895
--- /dev/null
+++ b/target/linux/omap/patches-3.12/202-ARM-OMAP2-hwmod-Extract-no-idle-and-no-reset-info-from-DT.patch
@@ -0,0 +1,75 @@
+Now that we have DT bindings to specify which devices should not
+be reset and idled during init, make hwmod extract the information
+(and store them in internal flags) from Device tree.
+
+Signed-off-by: Rajendra Nayak <rnayak@ti.com>
+
+---
+arch/arm/mach-omap2/omap_hwmod.c | 23 ++++++++++++++++-------
+ 1 file changed, 16 insertions(+), 7 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
+index d9ee0ff..b55923a 100644
+--- a/arch/arm/mach-omap2/omap_hwmod.c
++++ b/arch/arm/mach-omap2/omap_hwmod.c
+@@ -2363,11 +2363,11 @@ static struct device_node *of_dev_hwmod_lookup(struct device_node *np,
+ * are part of the device's address space can be ioremapped properly.
+ * No return value.
+ */
+-static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
++static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data,
++ struct device_node *np)
+ {
+ struct omap_hwmod_addr_space *mem;
+ void __iomem *va_start = NULL;
+- struct device_node *np;
+
+ if (!oh)
+ return;
+@@ -2383,12 +2383,10 @@ static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
+ oh->name);
+
+ /* Extract the IO space from device tree blob */
+- if (!of_have_populated_dt())
++ if (!np)
+ return;
+
+- np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh);
+- if (np)
+- va_start = of_iomap(np, oh->mpu_rt_idx);
++ va_start = of_iomap(np, oh->mpu_rt_idx);
+ } else {
+ va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start);
+ }
+@@ -2420,12 +2418,16 @@ static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
+ static int __init _init(struct omap_hwmod *oh, void *data)
+ {
+ int r;
++ struct device_node *np = NULL;
+
+ if (oh->_state != _HWMOD_STATE_REGISTERED)
+ return 0;
+
++ if (of_have_populated_dt())
++ np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh);
++
+ if (oh->class->sysc)
+- _init_mpu_rt_base(oh, NULL);
++ _init_mpu_rt_base(oh, NULL, np);
+
+ r = _init_clocks(oh, NULL);
+ if (r < 0) {
+@@ -2433,6 +2435,13 @@ static int __init _init(struct omap_hwmod *oh, void *data)
+ return -EINVAL;
+ }
+
++ if (np) {
++ if (of_find_property(np, "ti,no-reset-on-init", NULL))
++ oh->flags |= HWMOD_INIT_NO_RESET;
++ if (of_find_property(np, "ti,no-idle-on-init", NULL))
++ oh->flags |= HWMOD_INIT_NO_IDLE;
++ }
++
+ oh->_state = _HWMOD_STATE_INITIALIZED;
+
+ return 0;