diff options
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 633b216a8b26..7aaf5f1eea7a 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/mutex.h> | 45 | #include <linux/mutex.h> |
46 | #include <linux/bootmem.h> | 46 | #include <linux/bootmem.h> |
47 | 47 | ||
48 | #include <plat/common.h> | ||
48 | #include <plat/cpu.h> | 49 | #include <plat/cpu.h> |
49 | #include <plat/clockdomain.h> | 50 | #include <plat/clockdomain.h> |
50 | #include <plat/powerdomain.h> | 51 | #include <plat/powerdomain.h> |
@@ -736,7 +737,7 @@ static int _wait_target_ready(struct omap_hwmod *oh) | |||
736 | static int _reset(struct omap_hwmod *oh) | 737 | static int _reset(struct omap_hwmod *oh) |
737 | { | 738 | { |
738 | u32 r, v; | 739 | u32 r, v; |
739 | int c; | 740 | int c = 0; |
740 | 741 | ||
741 | if (!oh->sysconfig || | 742 | if (!oh->sysconfig || |
742 | !(oh->sysconfig->sysc_flags & SYSC_HAS_SOFTRESET) || | 743 | !(oh->sysconfig->sysc_flags & SYSC_HAS_SOFTRESET) || |
@@ -758,13 +759,9 @@ static int _reset(struct omap_hwmod *oh) | |||
758 | return r; | 759 | return r; |
759 | _write_sysconfig(v, oh); | 760 | _write_sysconfig(v, oh); |
760 | 761 | ||
761 | c = 0; | 762 | omap_test_timeout((omap_hwmod_readl(oh, oh->sysconfig->syss_offs) & |
762 | while (c < MAX_MODULE_RESET_WAIT && | 763 | SYSS_RESETDONE_MASK), |
763 | !(omap_hwmod_readl(oh, oh->sysconfig->syss_offs) & | 764 | MAX_MODULE_RESET_WAIT, c); |
764 | SYSS_RESETDONE_MASK)) { | ||
765 | udelay(1); | ||
766 | c++; | ||
767 | } | ||
768 | 765 | ||
769 | if (c == MAX_MODULE_RESET_WAIT) | 766 | if (c == MAX_MODULE_RESET_WAIT) |
770 | WARN(1, "omap_hwmod: %s: failed to reset in %d usec\n", | 767 | WARN(1, "omap_hwmod: %s: failed to reset in %d usec\n", |