mirror of
https://github.com/fail0verflow/mini.git
synced 2024-11-24 20:26:55 +01:00
Make sdhc.c use dma_addr also
This commit is contained in:
parent
c5e8bf0b9b
commit
766e793372
6
sdhc.c
6
sdhc.c
@ -602,12 +602,12 @@ static s32 __sd_cmd(sdhci_t *sdhci, u32 cmd, u32 type, u32 arg, u32 blk_cnt, voi
|
||||
else
|
||||
dc_invalidaterange(buffer, blk_cnt * BLOCK_SIZE);
|
||||
|
||||
__sd_write32(sdhci->reg_base + SDHC_SDMA_ADDR, (u32)buffer);
|
||||
__sd_write32(sdhci->reg_base + SDHC_SDMA_ADDR, dma_addr(buffer));
|
||||
__sd_write16(sdhci->reg_base + SDHC_NORMAL_INTERRUPT_STATUS, 0);
|
||||
__sd_write16(sdhci->reg_base + SDHC_ERROR_INTERRUPT_STATUS, 0);
|
||||
__sd_write16(sdhci->reg_base + SDHC_NORMAL_INTERRUPT_ENABLE, INTERRUPT_ALL);
|
||||
__sd_write16(sdhci->reg_base + SDHC_ERROR_INTERRUPT_ENABLE, EINTERRUPT_ALL);
|
||||
__sd_write32(sdhci->reg_base + SDHC_SDMA_ADDR, (u32 )buffer);
|
||||
__sd_write32(sdhci->reg_base + SDHC_SDMA_ADDR, dma_addr(buffer));
|
||||
}
|
||||
|
||||
__sd_dumpregs(sdhci);
|
||||
@ -718,7 +718,7 @@ static s32 __sd_cmd(sdhci_t *sdhci, u32 cmd, u32 type, u32 arg, u32 blk_cnt, voi
|
||||
}
|
||||
|
||||
__sd_write16(sdhci->reg_base + SDHC_NORMAL_INTERRUPT_STATUS, INTERRUPT_DMA);
|
||||
__sd_write32(sdhci->reg_base + SDHC_SDMA_ADDR, (u32 )ptr);
|
||||
__sd_write32(sdhci->reg_base + SDHC_SDMA_ADDR, dma_addr(ptr));
|
||||
|
||||
sdhc_debug(sdhci->reg_base, "next DMA transfer started.");
|
||||
__sd_dumpregs(sdhci);
|
||||
|
Loading…
Reference in New Issue
Block a user