Sync sdmmc changes between stage1 and 2

This commit is contained in:
TuxSH 2018-05-19 02:50:50 +02:00
parent 2bc2fe1452
commit 2a98e2e3b8
4 changed files with 13 additions and 22 deletions

View file

@ -28,7 +28,7 @@
#define CONSOLE_FG_COL 0xa0
/* Try using the small font */
//#define CONFIG_VIDEO_FONT_SMALL
#define CONFIG_VIDEO_FONT_SMALL
/*
* Graphic Data Format (GDF) bits for VIDEO_DATA_FORMAT

View file

@ -1278,7 +1278,7 @@ static int sdmmc_handle_cpu_transfer(struct mmc *mmc, uint16_t blocks, bool is_w
// Handle unaligned buffers
uint32_t w;
uint8_t *data = (uint8_t *)buffer;
w = data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24);
memcpy(&w, data, 4);
mmc->regs->buffer = w;
} else {
mmc->regs->buffer = *buffer;
@ -1288,10 +1288,7 @@ static int sdmmc_handle_cpu_transfer(struct mmc *mmc, uint16_t blocks, bool is_w
// Handle unaligned buffers
uint32_t w = mmc->regs->buffer;
uint8_t *data = (uint8_t *)buffer;
data[0] = w & 0xFF;
data[1] = (w >> 8) & 0xFF;
data[2] = (w >> 16) & 0xFF;
data[3] = (w >> 24) & 0xFF;
memcpy(&w, data, 4);
} else {
*buffer = mmc->regs->buffer;
}