aboutsummaryrefslogtreecommitdiff
path: root/later
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-02-21 21:56:01 -0700
committerChristian Cunningham <cc@localhost>2022-02-21 21:56:01 -0700
commit3b883c24da327036a049a0430bd00ebfdffd5c8f (patch)
treea266169da94b95f8c1b156285c2f3504c89cd5f3 /later
parent6c7bdd85bbe8d2b791e0fe52f93f5e75e8beea2d (diff)
Added wait
Diffstat (limited to 'later')
-rw-r--r--later/sd.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/later/sd.c b/later/sd.c
index ec07699..aa8a1fa 100644
--- a/later/sd.c
+++ b/later/sd.c
@@ -1,7 +1,9 @@
+// Adapted from bztsrc
#include <drivers/uart.h>
#include <drivers/sd.h>
#include <symbols.h>
#include <sys/core.h>
+#include <util/time.h>
#define EMMC_ARG2 ((volatile unsigned int*)(MMIO_BASE+0x00300000))
#define EMMC_BLKSIZECNT ((volatile unsigned int*)(MMIO_BASE+0x00300004))
@@ -91,12 +93,6 @@
unsigned long sd_scr[2], sd_ocr, sd_rca, sd_err, sd_hv;
-void wait_msec(unsigned int n)
-{
- for(unsigned long i = 0; i < n*100; i++)
- asm volatile("nop");
-}
-
/**
* Wait for data or command ready
*/