diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2015-03-26 09:42:59 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2015-03-26 09:42:59 +0000 |
commit | b22936646d66f2a36a70ddeb9c66a44f07b8c4ac (patch) | |
tree | 485bf7cec86903e0ab0d5cbf0daa13e36e3ab5f1 /target/linux/generic/patches-3.19/861-04_spi_gpio_implement_spi_delay.patch | |
parent | 90cd852f2508f82c8e02c5ee6b97ba7bf1823c55 (diff) | |
download | upstream-b22936646d66f2a36a70ddeb9c66a44f07b8c4ac.tar.gz upstream-b22936646d66f2a36a70ddeb9c66a44f07b8c4ac.tar.bz2 upstream-b22936646d66f2a36a70ddeb9c66a44f07b8c4ac.zip |
drop 3.19 support
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45002 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.19/861-04_spi_gpio_implement_spi_delay.patch')
-rw-r--r-- | target/linux/generic/patches-3.19/861-04_spi_gpio_implement_spi_delay.patch | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/target/linux/generic/patches-3.19/861-04_spi_gpio_implement_spi_delay.patch b/target/linux/generic/patches-3.19/861-04_spi_gpio_implement_spi_delay.patch deleted file mode 100644 index e7b32a50bc..0000000000 --- a/target/linux/generic/patches-3.19/861-04_spi_gpio_implement_spi_delay.patch +++ /dev/null @@ -1,58 +0,0 @@ -Implement the SPI-GPIO delay function for busses that need speed limitation. - ---mb - - - ---- a/drivers/spi/spi-gpio.c -+++ b/drivers/spi/spi-gpio.c -@@ -21,6 +21,7 @@ - #include <linux/module.h> - #include <linux/platform_device.h> - #include <linux/gpio.h> -+#include <linux/delay.h> - #include <linux/of.h> - #include <linux/of_device.h> - #include <linux/of_gpio.h> -@@ -73,6 +74,7 @@ struct spi_gpio { - * #define SPI_MOSI_GPIO 120 - * #define SPI_SCK_GPIO 121 - * #define SPI_N_CHIPSEL 4 -+ * #undef NEED_SPIDELAY - * #include "spi-gpio.c" - */ - -@@ -80,6 +82,7 @@ struct spi_gpio { - #define DRIVER_NAME "spi_gpio" - - #define GENERIC_BITBANG /* vs tight inlines */ -+#define NEED_SPIDELAY 1 - - /* all functions referencing these symbols must define pdata */ - #define SPI_MISO_GPIO ((pdata)->miso) -@@ -130,12 +133,20 @@ static inline int getmiso(const struct s - #undef pdata - - /* -- * NOTE: this clocks "as fast as we can". It "should" be a function of the -- * requested device clock. Software overhead means we usually have trouble -- * reaching even one Mbit/sec (except when we can inline bitops), so for now -- * we'll just assume we never need additional per-bit slowdowns. -+ * NOTE: to clock "as fast as we can", set spi_device.max_speed_hz -+ * and spi_transfer.speed_hz to 0. -+ * Otherwise this is a function of the requested device clock. -+ * Software overhead means we usually have trouble -+ * reaching even one Mbit/sec (except when we can inline bitops). So on small -+ * embedded devices with fast SPI slaves you usually don't need a delay. - */ --#define spidelay(nsecs) do {} while (0) -+static inline void spidelay(unsigned nsecs) -+{ -+#ifdef NEED_SPIDELAY -+ if (unlikely(nsecs)) -+ ndelay(nsecs); -+#endif /* NEED_SPIDELAY */ -+} - - #include "spi-bitbang-txrx.h" - |