diff options
Diffstat (limited to 'arch/arm/mach-omap2/prcm-common.h')
| -rw-r--r-- | arch/arm/mach-omap2/prcm-common.h | 24 | 
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h index 0e841fd9498..a8e4b582c52 100644 --- a/arch/arm/mach-omap2/prcm-common.h +++ b/arch/arm/mach-omap2/prcm-common.h @@ -428,6 +428,28 @@  #define MAX_IOPAD_LATCH_TIME			100  # ifndef __ASSEMBLER__ +#include <linux/delay.h> + +/** + * omap_test_timeout - busy-loop, testing a condition + * @cond: condition to test until it evaluates to true + * @timeout: maximum number of microseconds in the timeout + * @index: loop index (integer) + * + * Loop waiting for @cond to become true or until at least @timeout + * microseconds have passed.  To use, define some integer @index in the + * calling code.  After running, if @index == @timeout, then the loop has + * timed out. + */ +#define omap_test_timeout(cond, timeout, index)			\ +({								\ +	for (index = 0; index < timeout; index++) {		\ +		if (cond)					\ +			break;					\ +		udelay(1);					\ +	}							\ +}) +  /**   * struct omap_prcm_irq - describes a PRCM interrupt bit   * @name: a short name describing the interrupt type, e.g. "wkup" or "io" @@ -458,6 +480,7 @@ struct omap_prcm_irq {   * @ocp_barrier: fn ptr to force buffered PRM writes to complete   * @save_and_clear_irqen: fn ptr to save and clear IRQENABLE regs   * @restore_irqen: fn ptr to save and clear IRQENABLE regs + * @reconfigure_io_chain: fn ptr to reconfigure IO chain   * @saved_mask: IRQENABLE regs are saved here during suspend   * @priority_mask: 1 bit per IRQ, set to 1 if omap_prcm_irq.priority = true   * @base_irq: base dynamic IRQ number, returned from irq_alloc_descs() in init @@ -479,6 +502,7 @@ struct omap_prcm_irq_setup {  	void (*ocp_barrier)(void);  	void (*save_and_clear_irqen)(u32 *saved_mask);  	void (*restore_irqen)(u32 *saved_mask); +	void (*reconfigure_io_chain)(void);  	u32 *saved_mask;  	u32 *priority_mask;  	int base_irq;  | 
