Skip to contentSkip to conversation

Patch "spi: img-spfi: fix support for speeds up to 1/4th input clock" has been added to the 4.1-stable tree

PATCH [email protected] 1 participant 1 message Aug 8, 2015

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

spi: img-spfi: fix support for speeds up to 1/4th input clock

to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
spi-img-spfi-fix-support-for-speeds-up-to-1-4th-input-clock.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 6a806a214af42ac951e2d85e64d1bf4463482e16 Mon Sep 17 00:00:00 2001

From: Sifan Naeem <[email protected]>
Date: Thu, 18 Jun 2015 13:50:54 +0100
Subject: spi: img-spfi: fix support for speeds up to 1/4th input clock

From: Sifan Naeem <[email protected]>

commit 6a806a214af42ac951e2d85e64d1bf4463482e16 upstream.

Setting the Same Edge bit indicates to the spfi block to receive and transmit data on the same edge of the spfi clock, which in turn doubles the operating frequency of spfi.

The maximum supported frequency is limited to 1/4th of the spfi input clock, but without this bit set the maximum would be 1/8th of the input clock.

The current driver calculates the divisor with maximum speed at 1/4th of the input clock, this would fail if the requested frequency is higher than 1/8 of the input clock. Any requests for 1/8th of the input clock would still pass.

Fixes 8543d0e72d43 ("spi: img-spfi: Limit bit clock to 1/4th of input clock")
---
 drivers/spi/spi-img-spfi.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/spi/spi-img-spfi.c +2 -0
@@ -40,6 +40,7 @@
 #define SPFI_CONTROL_SOFT_RESET			BIT(11)
 #define SPFI_CONTROL_SEND_DMA			BIT(10)
 #define SPFI_CONTROL_GET_DMA			BIT(9)
+#define SPFI_CONTROL_SE			BIT(8)
 #define SPFI_CONTROL_TMODE_SHIFT		5
 #define SPFI_CONTROL_TMODE_MASK			0x7
 #define SPFI_CONTROL_TMODE_SINGLE		0
@@ -491,6 +492,7 @@ static void img_spfi_config(struct spi_m
 	else if (xfer->tx_nbits == SPI_NBITS_QUAD &&
 		 xfer->rx_nbits == SPI_NBITS_QUAD)
 		val |= SPFI_CONTROL_TMODE_QUAD << SPFI_CONTROL_TMODE_SHIFT;
+	val |= SPFI_CONTROL_SE;
 	spfi_writel(spfi, val, SPFI_CONTROL);
 }
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.1/spi-img-spfi-fix-support-for-speeds-up-to-1-4th-input-clock.patch