Skip to content

Commit

Permalink
ARM: OMAP2+: CM: increase the module disable timeout
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: Tero Kristo <t-kristo@ti.com>
  • Loading branch information
Paul Walmsley committed Jun 22, 2012
1 parent 9a47d32 commit b8f15b7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions arch/arm/mach-omap2/cm.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,15 @@
*/
#define MAX_MODULE_READY_TIME 2000

/*
* MAX_MODULE_DISABLE_TIME: max duration in microseconds to wait for
* the PRCM to request that a module enter the inactive state in the
* case of OMAP2 & 3. In the case of OMAP4 this is the max duration
* in microseconds for the module to reach the inactive state from
* a functional state.
* XXX FSUSB on OMAP4430 takes ~4ms to idle after reset during
* kernel init.
*/
#define MAX_MODULE_DISABLE_TIME 5000

#endif
4 changes: 2 additions & 2 deletions arch/arm/mach-omap2/cminst44xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@ int omap4_cminst_wait_module_idle(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_off

omap_test_timeout((_clkctrl_idlest(part, inst, cdoffs, clkctrl_offs) ==
CLKCTRL_IDLEST_DISABLED),
MAX_MODULE_READY_TIME, i);
MAX_MODULE_DISABLE_TIME, i);

return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
return (i < MAX_MODULE_DISABLE_TIME) ? 0 : -EBUSY;
}

/**
Expand Down

0 comments on commit b8f15b7

Please sign in to comment.