at91_mci: Fix for 32k buffer.

This commit is contained in:
Christian Mauderer 2017-11-17 14:23:55 +01:00 committed by Sebastian Huber
parent c360b1a2dc
commit 9569b39515

View File

@ -140,8 +140,15 @@ static sXdmad *pXdmad = &XDMAD_Instance;
* entire data cache, impacting overall system performance.
*/
#define BBCOUNT 2
#ifndef __rtems__
#define BBSIZE (16*1024)
#define MAX_BLOCKS ((BBSIZE*BBCOUNT)/512)
#else /* __rtems__ */
#define BBSIZE (32*1024)
#define MAX_BLOCKS ((BBSIZE)/512)
/* FIXME: It would be better to split the DMA up in that case like in the
* original driver. But that would need some rework. */
#endif /* __rtems__ */
static int mci_debug;
@ -935,7 +942,11 @@ at91_mci_start_cmd(struct at91_mci_softc *sc, struct mmc_command *cmd)
bus_addr_t paddr;
int err;
#ifndef __rtems__
if (remaining > (BBCOUNT*BBSIZE))
#else /* __rtems__ */
if (remaining > (BBSIZE))
#endif /* __rtems__ */
panic("IO read size exceeds MAXDATA\n");
if (data->flags & MMC_DATA_READ) {