diff options
Diffstat (limited to 'drivers/spi/spi_bfin5xx.c')
-rw-r--r-- | drivers/spi/spi_bfin5xx.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index 317731a9cd6d..122292557bf3 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c | |||
@@ -189,6 +189,7 @@ static void cs_deactive(struct driver_data *drv_data, struct chip_data *chip) | |||
189 | { | 189 | { |
190 | u16 flag = read_FLAG(drv_data); | 190 | u16 flag = read_FLAG(drv_data); |
191 | 191 | ||
192 | flag &= ~chip->flag; | ||
192 | flag |= (chip->flag << 8); | 193 | flag |= (chip->flag << 8); |
193 | 194 | ||
194 | write_FLAG(drv_data, flag); | 195 | write_FLAG(drv_data, flag); |
@@ -1036,7 +1037,6 @@ static int setup(struct spi_device *spi) | |||
1036 | struct bfin5xx_spi_chip *chip_info = NULL; | 1037 | struct bfin5xx_spi_chip *chip_info = NULL; |
1037 | struct chip_data *chip; | 1038 | struct chip_data *chip; |
1038 | struct driver_data *drv_data = spi_master_get_devdata(spi->master); | 1039 | struct driver_data *drv_data = spi_master_get_devdata(spi->master); |
1039 | u8 spi_flg; | ||
1040 | 1040 | ||
1041 | /* Abort device setup if requested features are not supported */ | 1041 | /* Abort device setup if requested features are not supported */ |
1042 | if (spi->mode & ~(SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST)) { | 1042 | if (spi->mode & ~(SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST)) { |
@@ -1119,8 +1119,7 @@ static int setup(struct spi_device *spi) | |||
1119 | * SPI_BAUD, not the real baudrate | 1119 | * SPI_BAUD, not the real baudrate |
1120 | */ | 1120 | */ |
1121 | chip->baud = hz_to_spi_baud(spi->max_speed_hz); | 1121 | chip->baud = hz_to_spi_baud(spi->max_speed_hz); |
1122 | spi_flg = ~(1 << (spi->chip_select)); | 1122 | chip->flag = 1 << (spi->chip_select); |
1123 | chip->flag = ((u16) spi_flg << 8) | (1 << (spi->chip_select)); | ||
1124 | chip->chip_select_num = spi->chip_select; | 1123 | chip->chip_select_num = spi->chip_select; |
1125 | 1124 | ||
1126 | switch (chip->bits_per_word) { | 1125 | switch (chip->bits_per_word) { |