From 75e1f8d156e408cbb5a6a5a4146ec16d8a219fdd Mon Sep 17 00:00:00 2001 From: Andy Green Date: Fri, 28 Nov 2008 10:16:40 +0000 Subject: [PATCH] qi-move-udelay-out-of-glamo-mmc-to-utils.patch udelay() is more generally wanted, move it to utils.c Signed-off-by: Andy Green --- qiboot/src/drivers/glamo-mmc.c | 9 --------- qiboot/src/utils.c | 8 ++++++++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/qiboot/src/drivers/glamo-mmc.c b/qiboot/src/drivers/glamo-mmc.c index 4f2f530..a031d0b 100644 --- a/qiboot/src/drivers/glamo-mmc.c +++ b/qiboot/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/qiboot/src/utils.c b/qiboot/src/utils.c index ffc1368..ffca1f5 100644 --- a/qiboot/src/utils.c +++ b/qiboot/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; +}