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/memory.c b/source/memory.c index fc44871..3e62695 100644 --- a/source/memory.c +++ b/source/memory.c @@ -40,13 +40,12 @@ void memcpy(void *dest, const void *src, u32 size) destc[i] = srcc[i]; } -void *memset(void *dest, u32 value, u32 size) +void memset(void *dest, u32 filler, u32 size) { u8 *destc = (u8 *)dest; - for(u32 i = 0; i < size; i++) destc[i] = (u8)value; - - return dest; + for(u32 i = 0; i < size; i++) + destc[i] = (u8)filler; } void memset32(void *dest, u32 filler, u32 size) diff --git a/source/memory.h b/source/memory.h index d5515f2..0cb8401 100644 --- a/source/memory.h +++ b/source/memory.h @@ -34,7 +34,7 @@ #include "types.h" void memcpy(void *dest, const void *src, u32 size); -void *memset(void *dest, u32 value, u32 size) __attribute__((used)); +void memset(void *dest, u32 filler, u32 size) __attribute__((used)); void memset32(void *dest, u32 filler, u32 size); int memcmp(const void *buf1, const void *buf2, u32 size); u8 *memsearch(u8 *startPos, const void *pattern, u32 size, u32 patternSize); diff --git a/source/start.s b/source/start.s index 688a13f..e18b5e8 100644 --- a/source/start.s +++ b/source/start.s @@ -94,11 +94,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