diff options
author | Russell King | 2011-01-27 10:50:13 +0100 |
---|---|---|
committer | Russell King | 2011-02-04 14:25:48 +0100 |
commit | c4d877c1b3df58d89f01d7b211f58b944356eea3 (patch) | |
tree | 57ac31cbfd06d24cd2d841e22f3fe4c6b83dd124 | |
parent | ARM: mmci: no need to call flush_dcache_page() with sg_miter API (diff) | |
download | kernel-qcow2-linux-c4d877c1b3df58d89f01d7b211f58b944356eea3.tar.gz kernel-qcow2-linux-c4d877c1b3df58d89f01d7b211f58b944356eea3.tar.xz kernel-qcow2-linux-c4d877c1b3df58d89f01d7b211f58b944356eea3.zip |
ARM: mmci: avoid unnecessary switch to data available PIO interrupts
We don't need to switch to data available interrupts if there's at
least half a FIFO depth worth of data remaining, as we'll still get
the FIFO half full interrupt. Keep this interrupt masked off until
we have less than half the FIFO depth worth of data remaining.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | drivers/mmc/host/mmci.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 2563792c01d0..bde170d8f723 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -224,10 +224,11 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data) irqmask = MCI_RXFIFOHALFFULLMASK; /* - * If we have less than a FIFOSIZE of bytes to transfer, - * trigger a PIO interrupt as soon as any data is available. + * If we have less than the fifo 'half-full' threshold to + * transfer, trigger a PIO interrupt as soon as any data + * is available. */ - if (host->size < variant->fifosize) + if (host->size < variant->fifohalfsize) irqmask |= MCI_RXDATAAVLBLMASK; } else { /* @@ -502,10 +503,10 @@ static irqreturn_t mmci_pio_irq(int irq, void *dev_id) local_irq_restore(flags); /* - * If we're nearing the end of the read, switch to - * "any data available" mode. + * If we have less than the fifo 'half-full' threshold to transfer, + * trigger a PIO interrupt as soon as any data is available. */ - if (status & MCI_RXACTIVE && host->size < variant->fifosize) + if (status & MCI_RXACTIVE && host->size < variant->fifohalfsize) mmci_set_mask1(host, MCI_RXDATAAVLBLMASK); /* |