projects
/
carl9170fw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1901714
)
carl9170 firmware: optimize get_async
author
Christian Lamparter
<chunkeey@googlemail.com>
Thu, 24 Nov 2011 00:32:38 +0000
(
01:32
+0100)
committer
Christian Lamparter
<chunkeey@googlemail.com>
Thu, 24 Nov 2011 00:32:38 +0000
(
01:32
+0100)
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
carlfw/include/io.h
patch
|
blob
|
history
diff --git
a/carlfw/include/io.h
b/carlfw/include/io.h
index 1186af61aa1a372814155b4d988b5a392a33e1b1..4ccdc6e4c8f78df780c282979cf9f1ed8e66912b 100644
(file)
--- a/
carlfw/include/io.h
+++ b/
carlfw/include/io.h
@@
-81,13
+81,11
@@
static inline __inline uint32_t readl_async(const volatile void *addr)
uint32_t i = 0, read, tmp;
read = readl(addr);
- while (i++ < 10) {
+ do {
+ tmp = read;
tmp = readl(addr);
- if (tmp == read)
- break;
- else
- read = tmp;
- }
+ i++;
+ } while (tmp != read && i <= 10);
return read;
}