Merge tag 'dt-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / mach-omap2 / omap_hwmod.c
index 39771c12d8b610a074ef5bb3705db24d56d07980..d25a95fe99216c582f97b0a0aee860c3573eaf68 100644 (file)
 #include <linux/spinlock.h>
 #include <linux/slab.h>
 #include <linux/bootmem.h>
+#include <linux/cpu.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 
@@ -1664,7 +1665,7 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name)
                return -ENOSYS;
 
        ret = _lookup_hardreset(oh, name, &ohri);
-       if (IS_ERR_VALUE(ret))
+       if (ret < 0)
                return ret;
 
        if (oh->clkdm) {
@@ -2155,7 +2156,7 @@ static int _enable(struct omap_hwmod *oh)
        if (soc_ops.enable_module)
                soc_ops.enable_module(oh);
        if (oh->flags & HWMOD_BLOCK_WFI)
-               disable_hlt();
+               cpu_idle_poll_ctrl(true);
 
        if (soc_ops.update_context_lost)
                soc_ops.update_context_lost(oh);
@@ -2219,7 +2220,7 @@ static int _idle(struct omap_hwmod *oh)
        _del_initiator_dep(oh, mpu_oh);
 
        if (oh->flags & HWMOD_BLOCK_WFI)
-               enable_hlt();
+               cpu_idle_poll_ctrl(false);
        if (soc_ops.disable_module)
                soc_ops.disable_module(oh);
 
@@ -2329,7 +2330,7 @@ static int _shutdown(struct omap_hwmod *oh)
                _del_initiator_dep(oh, mpu_oh);
                /* XXX what about the other system initiators here? dma, dsp */
                if (oh->flags & HWMOD_BLOCK_WFI)
-                       enable_hlt();
+                       cpu_idle_poll_ctrl(false);
                if (soc_ops.disable_module)
                        soc_ops.disable_module(oh);
                _disable_clocks(oh);
@@ -2452,7 +2453,7 @@ static int __init _init(struct omap_hwmod *oh, void *data)
                _init_mpu_rt_base(oh, NULL);
 
        r = _init_clocks(oh, NULL);
-       if (IS_ERR_VALUE(r)) {
+       if (r < 0) {
                WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh->name);
                return -EINVAL;
        }