The patch titled Blackfin SPI Driver: Fix erroneous SPI Clock divisor calculation has been added to the -mm tree. Its filename is blackfin-spi-driver-fix-erroneous-spi-clock-divisor-calculation.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: Blackfin SPI Driver: Fix erroneous SPI Clock divisor calculation From: Michael Hennerich <michael.hennerich@xxxxxxxxxx> Fix erroneous SPI Clock divisor calculation. Make sure SPI_BAUD is always >= 2. Writing a value of 0 or 1 to the SPI_BAUD register disables the serial clock. Signed-off-by: Michael Hennerich <michael.hennerich@xxxxxxxxxx> Signed-off-by: Bryan Wu <cooloney@xxxxxxxxxx> Acked-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx> Cc: David Brownell <david-b@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/blackfin/include/asm/bfin5xx_spi.h | 2 ++ drivers/spi/spi_bfin5xx.c | 3 +++ 2 files changed, 5 insertions(+) diff -puN arch/blackfin/include/asm/bfin5xx_spi.h~blackfin-spi-driver-fix-erroneous-spi-clock-divisor-calculation arch/blackfin/include/asm/bfin5xx_spi.h --- a/arch/blackfin/include/asm/bfin5xx_spi.h~blackfin-spi-driver-fix-erroneous-spi-clock-divisor-calculation +++ a/arch/blackfin/include/asm/bfin5xx_spi.h @@ -11,6 +11,8 @@ #ifndef _SPI_CHANNEL_H_ #define _SPI_CHANNEL_H_ +#define MIN_SPI_BAUD_VAL 2 + #define SPI_READ 0 #define SPI_WRITE 1 diff -puN drivers/spi/spi_bfin5xx.c~blackfin-spi-driver-fix-erroneous-spi-clock-divisor-calculation drivers/spi/spi_bfin5xx.c --- a/drivers/spi/spi_bfin5xx.c~blackfin-spi-driver-fix-erroneous-spi-clock-divisor-calculation +++ a/drivers/spi/spi_bfin5xx.c @@ -158,6 +158,9 @@ static u16 hz_to_spi_baud(u32 speed_hz) if ((sclk % (2 * speed_hz)) > 0) spi_baud++; + if (spi_baud < MIN_SPI_BAUD_VAL) + spi_baud = MIN_SPI_BAUD_VAL; + return spi_baud; } _ Patches currently in -mm which might be from michael.hennerich@xxxxxxxxxx are linux-next.patch input-touchscreen-driver-add-support-ad7877-touchscreen-driver.patch input-ad7879-touchscreen-driver.patch input-ad7879-touchscreen-driver-dont-use-bus_id.patch blackfin-spi-driver-fix-erroneous-spi-clock-divisor-calculation.patch blackfin-spi-driver-add-gpio-controlled-spi-slave-select-support.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html