[PATCH 6/8] qi-move-udelay-out-of-glamo-mmc-to-utils.patch
Andy Green
andy at openmoko.com
Tue Oct 21 12:29:07 CEST 2008
udelay() is more generally wanted, move it to utils.c
Signed-off-by: Andy Green <andy at openmoko.com>
---
src/drivers/glamo-mmc.c | 9 ---------
src/utils.c | 8 ++++++++
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/drivers/glamo-mmc.c b/src/drivers/glamo-mmc.c
index 4f2f530..a031d0b 100644
--- a/src/drivers/glamo-mmc.c
+++ b/src/drivers/glamo-mmc.c
@@ -64,15 +64,6 @@ int mmc_read(unsigned long src, u8 *dst, int size);
})
-
-int q;
-
-void udelay(int n)
-{
- while (n--)
- q+=n * q;
-}
-
static void
glamo_reg_write(u16 val, u16 reg)
{
diff --git a/src/utils.c b/src/utils.c
index ffc1368..ffca1f5 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -213,3 +213,11 @@ void *malloc(size_t size)
void free(void *ptr)
{
}
+
+int q;
+
+void udelay(int n)
+{
+ while (n--)
+ q+=n * q;
+}
More information about the openmoko-kernel
mailing list