@@ -1051,10 +1051,16 @@ static int bfin_spi_setup(struct spi_dev
/* translate common spi framework into our register */
if (spi->mode & SPI_CPOL)
chip->ctl_reg |= CPOL;
+ else
+ chip->ctl_reg &= ~CPOL;
if (spi->mode & SPI_CPHA)
chip->ctl_reg |= CPHA;
+ else
+ chip->ctl_reg &= ~CPHA;
if (spi->mode & SPI_LSB_FIRST)
chip->ctl_reg |= LSBF;
+ else
+ chip->ctl_reg &= ~LSBF;
/* we dont support running in slave mode (yet?) */
chip->ctl_reg |= MSTR;
@@ -1106,6 +1112,7 @@ static int bfin_spi_setup(struct spi_dev
bfin_spi_u8_cs_chg_writer : bfin_spi_u8_writer;
chip->duplex = chip->cs_change_per_word ?
bfin_spi_u8_cs_chg_duplex : bfin_spi_u8_duplex;
+ chip->ctl_reg &= ~SIZE;
break;
case 16:
@@ -1117,6 +1124,7 @@ static int bfin_spi_setup(struct spi_dev
bfin_spi_u16_cs_chg_writer : bfin_spi_u16_writer;
chip->duplex = chip->cs_change_per_word ?
bfin_spi_u16_cs_chg_duplex : bfin_spi_u16_duplex;
+ chip->ctl_reg |= SIZE;
break;
default: