aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include/plat/common.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-12 14:40:13 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-12 14:40:13 -0500
commit9c3936cb694ffd559c80dc3eb75b61f769a39259 (patch)
treecc034c09e359e43b4ff01efabc7ce47602d80acf /arch/arm/plat-omap/include/plat/common.h
parent5de76b18d1a7193c49c1a4ee72261421a17de57c (diff)
parent5ccf197859d6f6bcf56e85657019503b2d95767a (diff)
Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (75 commits) omap3: Fix OMAP35XX_REV macros omap: serial: fix non-empty uart fifo read abort omap3: Zoom2/3: Update hsmmc board config params omap3 : Enable TWL4030 Keypad for Zoom2 and Zoom3 boards omap3: id code detection 3525 vs 3515 omap3: rx51: Use wl1251 in SPI mode 3 omap3: zoom2/3: make MMC slot work again omap1: htcherald: Update defconfig to include mux support omap1: LCD_DMA: Use some define rather than a hexadecimal omap: header: remove unused data-type omap: arch/arm/plat-omap/devices.c - sort alphabetically omap: Correcting GPMC_CONFIG1_DEVICETYPE_NAND OMAP3: serial - allow platforms specify which UARTs to initialize omap3: cm-t35: add mux initialization OMAP4: Sync up omap4430 defconfig OMAP4: Remove the secondary wait loop OMAP4: AuxCoreBoot registers only accessible in secure mode OMAP4: Fix SRAM base and size OMAP4: Fix cpu detection omap3: pandora: board file updates for .33 ...
Diffstat (limited to 'arch/arm/plat-omap/include/plat/common.h')
-rw-r--r--arch/arm/plat-omap/include/plat/common.h35
1 files changed, 22 insertions, 13 deletions
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h
index 064f1730f43..32c22272425 100644
--- a/arch/arm/plat-omap/include/plat/common.h
+++ b/arch/arm/plat-omap/include/plat/common.h
@@ -27,7 +27,7 @@
27#ifndef __ARCH_ARM_MACH_OMAP_COMMON_H 27#ifndef __ARCH_ARM_MACH_OMAP_COMMON_H
28#define __ARCH_ARM_MACH_OMAP_COMMON_H 28#define __ARCH_ARM_MACH_OMAP_COMMON_H
29 29
30#include <linux/i2c.h> 30#include <plat/i2c.h>
31 31
32struct sys_timer; 32struct sys_timer;
33 33
@@ -36,18 +36,6 @@ extern void __iomem *gic_cpu_base_addr;
36 36
37extern void omap_map_common_io(void); 37extern void omap_map_common_io(void);
38extern struct sys_timer omap_timer; 38extern struct sys_timer omap_timer;
39#if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)
40extern int omap_register_i2c_bus(int bus_id, u32 clkrate,
41 struct i2c_board_info const *info,
42 unsigned len);
43#else
44static inline int omap_register_i2c_bus(int bus_id, u32 clkrate,
45 struct i2c_board_info const *info,
46 unsigned len)
47{
48 return 0;
49}
50#endif
51 39
52/* IO bases for various OMAP processors */ 40/* IO bases for various OMAP processors */
53struct omap_globals { 41struct omap_globals {
@@ -58,6 +46,7 @@ struct omap_globals {
58 void __iomem *ctrl; /* System Control Module */ 46 void __iomem *ctrl; /* System Control Module */
59 void __iomem *prm; /* Power and Reset Management */ 47 void __iomem *prm; /* Power and Reset Management */
60 void __iomem *cm; /* Clock Management */ 48 void __iomem *cm; /* Clock Management */
49 void __iomem *cm2;
61}; 50};
62 51
63void omap2_set_globals_242x(void); 52void omap2_set_globals_242x(void);
@@ -71,4 +60,24 @@ void omap2_set_globals_sdrc(struct omap_globals *);
71void omap2_set_globals_control(struct omap_globals *); 60void omap2_set_globals_control(struct omap_globals *);
72void omap2_set_globals_prcm(struct omap_globals *); 61void omap2_set_globals_prcm(struct omap_globals *);
73 62
63/**
64 * omap_test_timeout - busy-loop, testing a condition
65 * @cond: condition to test until it evaluates to true
66 * @timeout: maximum number of microseconds in the timeout
67 * @index: loop index (integer)
68 *
69 * Loop waiting for @cond to become true or until at least @timeout
70 * microseconds have passed. To use, define some integer @index in the
71 * calling code. After running, if @index == @timeout, then the loop has
72 * timed out.
73 */
74#define omap_test_timeout(cond, timeout, index) \
75({ \
76 for (index = 0; index < timeout; index++) { \
77 if (cond) \
78 break; \
79 udelay(1); \
80 } \
81})
82
74#endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ 83#endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */