diff options
author | imp <imp@FreeBSD.org> | 2009-01-22 22:29:21 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2009-01-22 22:29:21 +0000 |
commit | 73288922b250e293bb1b3b8ce6207aada06f3c75 (patch) | |
tree | a0d31b4ef50db43e52bea73aa57146daccecc786 /sys/arm | |
parent | f8e69e3986e2b5e3a4dedf32ee042ae954450936 (diff) | |
download | FreeBSD-src-73288922b250e293bb1b3b8ce6207aada06f3c75.zip FreeBSD-src-73288922b250e293bb1b3b8ce6207aada06f3c75.tar.gz |
Don't over-commit the DMA. Use the passed in size of the transfer
rather than a fixed 512... This fixes the mount root problem on at91.
Prior to the SD card reorg, all data transfers were 512 bytes, so we
didn't notice.
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/at91/at91_mci.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/arm/at91/at91_mci.c b/sys/arm/at91/at91_mci.c index 2c554ce..a762091 100644 --- a/sys/arm/at91/at91_mci.c +++ b/sys/arm/at91/at91_mci.c @@ -313,7 +313,6 @@ at91_mci_start_cmd(struct at91_mci_softc *sc, struct mmc_command *cmd) int i; struct mmc_data *data; struct mmc_request *req; - size_t block_size = 1 << 9; // Fixed, per mmc/sd spec for 2GB cards void *vaddr; bus_addr_t paddr; @@ -355,7 +354,7 @@ at91_mci_start_cmd(struct at91_mci_softc *sc, struct mmc_command *cmd) // Set block size and turn on PDC mode for dma xfer and disable // PDC until we're ready. mr = RD4(sc, MCI_MR) & ~MCI_MR_BLKLEN; - WR4(sc, MCI_MR, mr | (block_size << 16) | MCI_MR_PDCMODE); + WR4(sc, MCI_MR, mr | (data->len << 16) | MCI_MR_PDCMODE); WR4(sc, PDC_PTCR, PDC_PTCR_RXTDIS | PDC_PTCR_TXTDIS); if (cmdr & MCI_CMDR_TRCMD_START) { if (cmdr & MCI_CMDR_TRDIR) |