projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MIPS: convert CONFIG_SYS_MIPS_TIMER_FREQ to Kconfig
[platform/kernel/u-boot.git]
/
include
/
wait_bit.h
diff --git
a/include/wait_bit.h
b/include/wait_bit.h
index
82e09da
..
f1d70ae
100644
(file)
--- a/
include/wait_bit.h
+++ b/
include/wait_bit.h
@@
-8,9
+8,11
@@
#ifndef __WAIT_BIT_H
#define __WAIT_BIT_H
#ifndef __WAIT_BIT_H
#define __WAIT_BIT_H
-#include <common.h>
#include <console.h>
#include <console.h>
+#include <log.h>
+#include <time.h>
#include <watchdog.h>
#include <watchdog.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <linux/errno.h>
#include <asm/io.h>
@@
-29,7
+31,7
@@
* @param set Selects wait condition (bit set or clear)
* @param timeout_ms Timeout (in milliseconds)
* @param breakable Enables CTRL-C interruption
* @param set Selects wait condition (bit set or clear)
* @param timeout_ms Timeout (in milliseconds)
* @param breakable Enables CTRL-C interruption
- *
@return
0 on success, -ETIMEDOUT or -EINTR on failure
+ *
Return:
0 on success, -ETIMEDOUT or -EINTR on failure
*/
#define BUILD_WAIT_FOR_BIT(sfx, type, read) \
*/
#define BUILD_WAIT_FOR_BIT(sfx, type, read) \
@@
-61,7
+63,7
@@
static inline int wait_for_bit_##sfx(const void *reg, \
} \
\
udelay(1); \
} \
\
udelay(1); \
-
WATCHDOG_RESET();
\
+
schedule();
\
} \
\
debug("%s: Timeout (reg=%p mask=%x wait_set=%i)\n", __func__, \
} \
\
debug("%s: Timeout (reg=%p mask=%x wait_set=%i)\n", __func__, \
@@
-72,10
+74,12
@@
static inline int wait_for_bit_##sfx(const void *reg, \
BUILD_WAIT_FOR_BIT(8, u8, readb)
BUILD_WAIT_FOR_BIT(le16, u16, readw)
BUILD_WAIT_FOR_BIT(8, u8, readb)
BUILD_WAIT_FOR_BIT(le16, u16, readw)
+BUILD_WAIT_FOR_BIT(16, u16, readw)
#ifdef readw_be
BUILD_WAIT_FOR_BIT(be16, u16, readw_be)
#endif
BUILD_WAIT_FOR_BIT(le32, u32, readl)
#ifdef readw_be
BUILD_WAIT_FOR_BIT(be16, u16, readw_be)
#endif
BUILD_WAIT_FOR_BIT(le32, u32, readl)
+BUILD_WAIT_FOR_BIT(32, u32, readl)
#ifdef readl_be
BUILD_WAIT_FOR_BIT(be32, u32, readl_be)
#endif
#ifdef readl_be
BUILD_WAIT_FOR_BIT(be32, u32, readl_be)
#endif