the SPI_CMD register is 16-bits wide
authorFlorian Fainelli <florian@openwrt.org>
Mon, 26 Apr 2010 09:22:23 +0000 (09:22 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Mon, 26 Apr 2010 09:22:23 +0000 (09:22 +0000)
SVN-Revision: 21162

target/linux/brcm63xx/patches-2.6.32/240-spi.patch
target/linux/brcm63xx/patches-2.6.33/240-spi.patch

index d4b95b0446afd1a7a474b3f555bacadb2d49b40d..ba7a947fa610ad146f4f7bcfb641836f6dd69c03 100644 (file)
@@ -649,10 +649,10 @@ Index: linux-2.6.32.10/drivers/spi/bcm63xx_spi.c
 +      bcm_spi_writeb(msg_ctl, bs->regs, SPI_MSG_CTL);
 +
 +      /* Issue the transfer */
-+      cmd = bcm_spi_readb(bs->regs, SPI_CMD);
++      cmd = bcm_spi_readw(bs->regs, SPI_CMD);
 +      cmd |= SPI_CMD_START_IMMEDIATE;
 +      cmd |= (0 << SPI_CMD_PREPEND_BYTE_CNT_SHIFT);
-+      bcm_spi_writeb(cmd, bs->regs, SPI_CMD);
++      bcm_spi_writew(cmd, bs->regs, SPI_CMD);
 +
 +      wait_for_completion(&bs->done);
 +
@@ -697,10 +697,10 @@ Index: linux-2.6.32.10/drivers/spi/bcm63xx_spi.c
 +                      bcm63xx_spi_fill_tx_fifo(bs);
 +
 +                      /* Start the transfer */
-+                      cmd = bcm_spi_readb(bs->regs, SPI_CMD);
++                      cmd = bcm_spi_readw(bs->regs, SPI_CMD);
 +                      cmd |= SPI_CMD_START_IMMEDIATE;
 +                      cmd |= (0 << SPI_CMD_PREPEND_BYTE_CNT_SHIFT);
-+                      bcm_spi_writeb(cmd, bs->regs, SPI_CMD);
++                      bcm_spi_writew(cmd, bs->regs, SPI_CMD);
 +              } else
 +                      complete(&bs->done);
 +      }
index bcae32350bb9acf6838372a6503b87e99dbdc11a..86fcc7d76d8988e39a18fbe700ecda23907748fd 100644 (file)
 +      bcm_spi_writeb(msg_ctl, bs->regs, SPI_MSG_CTL);
 +
 +      /* Issue the transfer */
-+      cmd = bcm_spi_readb(bs->regs, SPI_CMD);
++      cmd = bcm_spi_readw(bs->regs, SPI_CMD);
 +      cmd |= SPI_CMD_START_IMMEDIATE;
 +      cmd |= (0 << SPI_CMD_PREPEND_BYTE_CNT_SHIFT);
-+      bcm_spi_writeb(cmd, bs->regs, SPI_CMD);
++      bcm_spi_writew(cmd, bs->regs, SPI_CMD);
 +
 +      wait_for_completion(&bs->done);
 +
 +                      bcm63xx_spi_fill_tx_fifo(bs);
 +
 +                      /* Start the transfer */
-+                      cmd = bcm_spi_readb(bs->regs, SPI_CMD);
++                      cmd = bcm_spi_readw(bs->regs, SPI_CMD);
 +                      cmd |= SPI_CMD_START_IMMEDIATE;
 +                      cmd |= (0 << SPI_CMD_PREPEND_BYTE_CNT_SHIFT);
-+                      bcm_spi_writeb(cmd, bs->regs, SPI_CMD);
++                      bcm_spi_writew(cmd, bs->regs, SPI_CMD);
 +              } else
 +                      complete(&bs->done);
 +      }