diff --git a/arm9/source/nand/sdmmc.c b/arm9/source/nand/sdmmc.c index 1f3d2e7..3654f98 100644 --- a/arm9/source/nand/sdmmc.c +++ b/arm9/source/nand/sdmmc.c @@ -469,7 +469,7 @@ int SD_Init() // We need to send at least 74 clock pulses. set_target(&handleSD); - wait(0x1980); // ~75-76 clocks + wait(2 * 128 * 74); sdmmc_send_command(&handleSD,0,0); sdmmc_send_command(&handleSD,0x10408,0x1AA); diff --git a/arm9/source/nand/wait.s b/arm9/source/nand/wait.s index 8cb3a58..2647d90 100644 --- a/arm9/source/nand/wait.s +++ b/arm9/source/nand/wait.s @@ -5,7 +5,6 @@ .global wait .type wait, %function wait: - subs r0, r0, #2 - nop - bgt wait + subs r0, r0, #4 + bcs wait bx lr