Title: [6775] branches/2009R1/drivers/spi/spi_bfin5xx.c: Fix bug[#5203],fix wrong setting about cs enable and flag
Revision
6775
Author
bhsong
Date
2009-06-17 23:17:42 -0500 (Wed, 17 Jun 2009)

Log Message

Fix bug[#5203],fix wrong setting about cs enable and flag

Modified Paths

Diff

Modified: branches/2009R1/drivers/spi/spi_bfin5xx.c (6774 => 6775)


--- branches/2009R1/drivers/spi/spi_bfin5xx.c	2009-06-18 02:11:54 UTC (rev 6774)
+++ branches/2009R1/drivers/spi/spi_bfin5xx.c	2009-06-18 04:17:42 UTC (rev 6775)
@@ -202,9 +202,13 @@
 	if (likely(chip->chip_select_num)) {
 		u16 flag = read_FLAG(drv_data);
 
-		flag &= ~chip->flag;
+		/* Only WITH CS enabled, we can set the level of CS */
+		flag |= chip->flag;
 		flag |= (chip->flag << 8);
+		write_FLAG(drv_data, flag);
 
+		/* Disable CS after deactive it */
+		flag &= ~chip->flag;
 		write_FLAG(drv_data, flag);
 	} else {
 		gpio_set_value(chip->cs_gpio, 1);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to