mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-06-06 00:30:22 +08:00
at91_mci: Fix for 32k buffer.
This commit is contained in:
parent
c360b1a2dc
commit
9569b39515
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user