summaryrefslogtreecommitdiff
path: root/freebsd/sys/arm/at91/at91_mci.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/arm/at91/at91_mci.c')
-rw-r--r--freebsd/sys/arm/at91/at91_mci.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/freebsd/sys/arm/at91/at91_mci.c b/freebsd/sys/arm/at91/at91_mci.c
index e4988cb9..44772ae5 100644
--- a/freebsd/sys/arm/at91/at91_mci.c
+++ b/freebsd/sys/arm/at91/at91_mci.c
@@ -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) {