diff options
Diffstat (limited to 'arch/arm/mach-mxs/system.c')
-rw-r--r-- | arch/arm/mach-mxs/system.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c index 80ac1fca8a00..30042e23bfa7 100644 --- a/arch/arm/mach-mxs/system.c +++ b/arch/arm/mach-mxs/system.c | |||
@@ -37,8 +37,6 @@ | |||
37 | #define MXS_MODULE_CLKGATE (1 << 30) | 37 | #define MXS_MODULE_CLKGATE (1 << 30) |
38 | #define MXS_MODULE_SFTRST (1 << 31) | 38 | #define MXS_MODULE_SFTRST (1 << 31) |
39 | 39 | ||
40 | #define CLKCTRL_TIMEOUT 10 /* 10 ms */ | ||
41 | |||
42 | static void __iomem *mxs_clkctrl_reset_addr; | 40 | static void __iomem *mxs_clkctrl_reset_addr; |
43 | 41 | ||
44 | /* | 42 | /* |
@@ -139,17 +137,3 @@ error: | |||
139 | return -ETIMEDOUT; | 137 | return -ETIMEDOUT; |
140 | } | 138 | } |
141 | EXPORT_SYMBOL(mxs_reset_block); | 139 | EXPORT_SYMBOL(mxs_reset_block); |
142 | |||
143 | int mxs_clkctrl_timeout(unsigned int reg_offset, unsigned int mask) | ||
144 | { | ||
145 | unsigned long timeout = jiffies + msecs_to_jiffies(CLKCTRL_TIMEOUT); | ||
146 | while (readl_relaxed(MXS_IO_ADDRESS(MXS_CLKCTRL_BASE_ADDR) | ||
147 | + reg_offset) & mask) { | ||
148 | if (time_after(jiffies, timeout)) { | ||
149 | pr_err("Timeout at CLKCTRL + 0x%x\n", reg_offset); | ||
150 | return -ETIMEDOUT; | ||
151 | } | ||
152 | } | ||
153 | |||
154 | return 0; | ||
155 | } | ||