Move sdmmc init to a more proper place

This commit is contained in:
Aurora Wright 2017-05-22 03:59:36 +02:00
parent a7ed32e206
commit 43f4475272
2 changed files with 2 additions and 5 deletions

View File

@ -291,6 +291,8 @@ static u32 calcSDSize(u8 *csd, int type)
static void InitSD() static void InitSD()
{ {
*(vu32 *)0x10000020 = 0; //InitFS stuff
*(vu32 *)0x10000020 = 0x200; //InitFS stuff
*(vu16 *)0x10006100 &= 0xF7FFu; //SDDATACTL32 *(vu16 *)0x10006100 &= 0xF7FFu; //SDDATACTL32
*(vu16 *)0x10006100 &= 0xEFFFu; //SDDATACTL32 *(vu16 *)0x10006100 &= 0xEFFFu; //SDDATACTL32
*(vu16 *)0x10006100 |= 0x402u; //SDDATACTL32 *(vu16 *)0x10006100 |= 0x402u; //SDDATACTL32

View File

@ -86,11 +86,6 @@ _start:
orr r0, r0, #(1<<0) @ - mpu enable orr r0, r0, #(1<<0) @ - mpu enable
mcr p15, 0, r0, c1, c0, 0 @ write control register 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 @ Clear BSS
ldr r0, =__bss_start ldr r0, =__bss_start
mov r1, #0 mov r1, #0