aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2012-07-04 11:18:42 +0000
committerPeter Maydell <peter.maydell@linaro.org>2012-07-25 13:32:54 +0100
commitd19d2dddb30950b4cb41984b4d0d03c5223cf6cc (patch)
treecff5680d2e9d591d2921478e0ec26d59359907ce
parenta43c7756d675f1fa81478294efc65611d05540d4 (diff)
downloadqemu-arm-d19d2dddb30950b4cb41984b4d0d03c5223cf6cc.tar.gz
hw/omap_spi.c: Fix indentation following previous patch
Fix indentation (whitespace-only change split out from previous patch to make it easier to review). Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/omap_spi.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/hw/omap_spi.c b/hw/omap_spi.c
index a0129b2b57..bdfc659961 100644
--- a/hw/omap_spi.c
+++ b/hw/omap_spi.c
@@ -180,50 +180,50 @@ static void omap_mcspi_transfer_run(OMAPSPIBusState *s, int chnum)
if (!(s->control & 1) || /* SINGLE */
(ch->config & (1 << 20))) { /* FORCE */
- wl = 1 + (0x1f & (ch->config >> 7)); /* WL */
- if (!IS_OMAP3_SPI(s) || s->fifo_ch != chnum ||
- !((ch->config >> 27) & 3)) { /* FFER | FFEW */
+ wl = 1 + (0x1f & (ch->config >> 7)); /* WL */
+ if (!IS_OMAP3_SPI(s) || s->fifo_ch != chnum ||
+ !((ch->config >> 27) & 3)) { /* FFER | FFEW */
+ ch->rx = spi_txrx(s->bus, chnum, ch->tx, wl);
+ } else {
+ switch ((ch->config >> 27) & 3) {
+ case 1: /* !FFER, FFEW */
+ if (trm != 1)
+ ch->tx = omap_mcspi_fifo_get(&s->tx_fifo, wl);
ch->rx = spi_txrx(s->bus, chnum, ch->tx, wl);
- } else {
- switch ((ch->config >> 27) & 3) {
- case 1: /* !FFER, FFEW */
+ s->fifo_wcnt--;
+ break;
+ case 2: /* FFER, !FFEW */
+ ch->rx = spi_txrx(s->bus, chnum, ch->tx, wl);
+ if (trm != 2)
+ omap_mcspi_fifo_put(&s->rx_fifo, wl, ch->rx);
+ s->fifo_wcnt--;
+ break;
+ case 3: /* FFER, FFEW */
+ while (s->rx_fifo.len < s->rx_fifo.size &&
+ s->tx_fifo.len && s->fifo_wcnt) {
if (trm != 1)
ch->tx = omap_mcspi_fifo_get(&s->tx_fifo, wl);
ch->rx = spi_txrx(s->bus, chnum, ch->tx, wl);
- s->fifo_wcnt--;
- break;
- case 2: /* FFER, !FFEW */
- ch->rx = spi_txrx(s->bus, chnum, ch->tx, wl);
if (trm != 2)
omap_mcspi_fifo_put(&s->rx_fifo, wl, ch->rx);
s->fifo_wcnt--;
- break;
- case 3: /* FFER, FFEW */
- while (s->rx_fifo.len < s->rx_fifo.size &&
- s->tx_fifo.len && s->fifo_wcnt) {
- if (trm != 1)
- ch->tx = omap_mcspi_fifo_get(&s->tx_fifo, wl);
- ch->rx = spi_txrx(s->bus, chnum, ch->tx, wl);
- if (trm != 2)
- omap_mcspi_fifo_put(&s->rx_fifo, wl, ch->rx);
- s->fifo_wcnt--;
- }
- break;
- default:
- break;
}
- if ((ch->config & (1 << 28)) && /* FFER */
- s->rx_fifo.len >= s->rx_fifo.size)
- ch->status |= 1 << 6; /* RXFFF */
- ch->status &= ~(1 << 5); /* RXFFE */
- ch->status &= ~(1 << 4); /* TXFFF */
- if ((ch->config & (1 << 27)) && /* FFEW */
- !s->tx_fifo.len)
- ch->status |= 1 << 3; /* TXFFE */
- if (!s->fifo_wcnt &&
- ((s->xferlevel >> 16) & 0xffff)) /* WCNT */
- s->irqst |= 1 << 17; /* EOW */
+ break;
+ default:
+ break;
}
+ if ((ch->config & (1 << 28)) && /* FFER */
+ s->rx_fifo.len >= s->rx_fifo.size)
+ ch->status |= 1 << 6; /* RXFFF */
+ ch->status &= ~(1 << 5); /* RXFFE */
+ ch->status &= ~(1 << 4); /* TXFFF */
+ if ((ch->config & (1 << 27)) && /* FFEW */
+ !s->tx_fifo.len)
+ ch->status |= 1 << 3; /* TXFFE */
+ if (!s->fifo_wcnt &&
+ ((s->xferlevel >> 16) & 0xffff)) /* WCNT */
+ s->irqst |= 1 << 17; /* EOW */
+ }
}
ch->tx = 0;