History

ARM: OMAP2+: CM: increase the module disable timeout

Increase the timeout for disabling an IP block to five milliseconds. This is to handle the usb_host_fs idle latency, which takes almost four milliseconds after a host controller reset. This is the second of two patches needed to resolve the following boot warning: omap_hwmod: usb_host_fs: _wait_target_disable failed Thanks to Sergei Shtylyov <sshtylyov@mvista.com> for finding an unrelated hunk in a previous version of this patch.

Paul Walmsley committed 14 years ago

Commit b8f15b71 parent 9a47d322 files · +13 −2Browse files

Unified · Split

2 files
  1. arch/arm/mach-omap2/cm.h +11 −0
  2. arch/arm/mach-omap2/cminst44xx.c +2 −2
arch/arm/mach-omap2/cm.h+11−0
@@ -22,4 +22,15 @@ · 21 unmodified lines
2222 */
2323 #define MAX_MODULE_READY_TIME 2000
2424
25+/*
26+ * MAX_MODULE_DISABLE_TIME: max duration in microseconds to wait for
27+ * the PRCM to request that a module enter the inactive state in the
28+ * case of OMAP2 & 3. In the case of OMAP4 this is the max duration
29+ * in microseconds for the module to reach the inactive state from
30+ * a functional state.
31+ * XXX FSUSB on OMAP4430 takes ~4ms to idle after reset during
32+ * kernel init.
33+ */
34+#define MAX_MODULE_DISABLE_TIME 5000
35+
2536 #endif
arch/arm/mach-omap2/cminst44xx.c+2−2
@@ -313,9 +313,9 @@ int omap4_cminst_wait_module_idle(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_off · 312 unmodified lines
313313
314314 omap_test_timeout((_clkctrl_idlest(part, inst, cdoffs, clkctrl_offs) ==
315315 CLKCTRL_IDLEST_DISABLED),
316− MAX_MODULE_READY_TIME, i);
316+ MAX_MODULE_DISABLE_TIME, i);
317317
318− return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
318+ return (i < MAX_MODULE_DISABLE_TIME) ? 0 : -EBUSY;
319319 }
320320
321321 /**