aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/linux/modules/fs.mk
Commit message (Expand)AuthorAgeFilesLines
* kernel: add missing dependency for kmod-fs-nfsFelix Fietkau2014-06-081-1/+1
* kernel: Add kernel module for cramfs support.Hauke Mehrtens2014-05-011-0/+15
* fs: add kernel modules for AFS clientZoltan Herpai2014-04-281-0/+37
* kernel: negate kernel version dependencies to fix config for new kernel versionsHauke Mehrtens2014-02-081-1/+1
* kernel: kmod-fs-jfsHauke Mehrtens2014-02-051-0/+16
* linux: don't break kmod-fs-nfs for Kernels < 3.6.xJo-Philipp Wich2014-02-041-0/+5
* linux: fix kmod-fs-nfs to include nfsv3.ko, it was split out of nfs.ko in Lin...Jo-Philipp Wich2014-02-041-2/+3
* fix 3.12 dependenciesZoltan Herpai2014-01-131-1/+1
* kernel: kmod-fs-xfs: fix dependenciesHauke Mehrtens2013-09-051-1/+1
* kernel: be consistent with formatting styleLuka Perkov2013-07-261-2/+2
* kernel: fix kmod-fs-btrfs dependenciesHauke Mehrtens2013-07-191-1/+1
* linux: add missing dependencies to kmod-fs-msdos and kmod-fs-xfsJo-Philipp Wich2013-07-181-1/+2
* kernel: btrfs supports raid6 in 3.10, thus depends on lib-raid6Jonas Gorski2013-07-181-1/+1
* packages: clean up the package folderJohn Crispin2013-06-211-0/+372
: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
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
@@ -22,6 +22,7 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
+#include <linux/delay.h>
 
 #include <linux/spi/spi.h>
 #include <linux/spi/spi_bitbang.h>
@@ -70,6 +71,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"
  */
 
@@ -77,6 +79,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)
@@ -121,12 +124,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"