From 43f447527209ed82d67cc58006f3ccb6f2f9a7f6 Mon Sep 17 00:00:00 2001 From: Aurora Wright Date: Mon, 22 May 2017 03:59:36 +0200 Subject: [PATCH] Move sdmmc init to a more proper place --- source/fatfs/sdmmc/sdmmc.c | 2 ++ source/start.s | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/source/fatfs/sdmmc/sdmmc.c b/source/fatfs/sdmmc/sdmmc.c index e4c58f4..6369ac6 100644 --- a/source/fatfs/sdmmc/sdmmc.c +++ b/source/fatfs/sdmmc/sdmmc.c @@ -291,6 +291,8 @@ static u32 calcSDSize(u8 *csd, int type) static void InitSD() { + *(vu32 *)0x10000020 = 0; //InitFS stuff + *(vu32 *)0x10000020 = 0x200; //InitFS stuff *(vu16 *)0x10006100 &= 0xF7FFu; //SDDATACTL32 *(vu16 *)0x10006100 &= 0xEFFFu; //SDDATACTL32 *(vu16 *)0x10006100 |= 0x402u; //SDDATACTL32 diff --git a/source/start.s b/source/start.s index 39dea1c..8f08112 100644 --- a/source/start.s +++ b/source/start.s @@ -86,11 +86,6 @@ _start: orr r0, r0, #(1<<0) @ - mpu enable mcr p15, 0, r0, c1, c0, 0 @ write control register - @ Fix mounting of SDMC - ldr r0, =0x10000020 - mov r1, #0x340 - str r1, [r0] - @ Clear BSS ldr r0, =__bss_start mov r1, #0