summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2008-04-15 07:33:43 +0000
committerGabor Juhos <juhosg@openwrt.org>2008-04-15 07:33:43 +0000
commit67fd9d7fba4f966a49012f02622f308b8cb2e7d7 (patch)
tree3a0e3ab118a7aa77efe908e4c4ed39774b58bfcb
parentd80f43d15f4e1fb9c8c45fdafc7f0c8838573047 (diff)
downloadmtk-20170518-67fd9d7fba4f966a49012f02622f308b8cb2e7d7.zip
mtk-20170518-67fd9d7fba4f966a49012f02622f308b8cb2e7d7.tar.gz
mtk-20170518-67fd9d7fba4f966a49012f02622f308b8cb2e7d7.tar.bz2
move spi_gpio driver into the kernel, clean-up SPI modules
SVN-Revision: 10844
-rw-r--r--package/kernel/modules/other.mk59
-rw-r--r--package/mmc_over_gpio/Makefile11
-rw-r--r--package/mmc_over_gpio/src/Makefile1
-rw-r--r--package/mmc_over_gpio/src/mmc_over_spigpio.c2
-rw-r--r--target/linux/generic-2.6/config-2.6.234
-rw-r--r--target/linux/generic-2.6/config-2.6.244
-rw-r--r--target/linux/generic-2.6/files/drivers/spi/spi_gpio.c (renamed from package/mmc_over_gpio/src/spi_gpio.c)0
-rw-r--r--target/linux/generic-2.6/files/include/linux/spi/spi_gpio.h (renamed from package/mmc_over_gpio/src/linux/spi/spi_gpio.h)0
-rw-r--r--target/linux/generic-2.6/patches-2.6.23/921-gpio_spi_driver.patch28
-rw-r--r--target/linux/generic-2.6/patches-2.6.24/921-gpio_spi_driver.patch28
10 files changed, 110 insertions, 27 deletions
diff --git a/package/kernel/modules/other.mk b/package/kernel/modules/other.mk
index b1f3c50..3872b3c 100644
--- a/package/kernel/modules/other.mk
+++ b/package/kernel/modules/other.mk
@@ -535,7 +535,7 @@ $(eval $(call KernelPackage,input-gpio-buttons))
define KernelPackage/mmc-spi
SUBMENU:=$(OTHER_MENU)
TITLE:=MMC/SD over SPI Support
- DEPENDS:=@LINUX_2_6
+ DEPENDS:=@LINUX_2_6 +kmod-mmc +kmod-spi +kmod-crc-itu-t +kmod-crc7
KCONFIG:=CONFIG_MMC_SPI
FILES:=$(LINUX_DIR)/drivers/mmc/host/mmc_spi.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,90,mmc_spi)
@@ -564,32 +564,22 @@ $(eval $(call KernelPackage,mmc-atmelmci))
define KernelPackage/spi
SUBMENU:=$(OTHER_MENU)
- TITLE:=Serial Peripheral Interface
- DEPENDS:=@LINUX_2_6 +kmod-crc-itu-t +kmod-crc7
- KCONFIG:=CONFIG_SPI=y \
- CONFIG_MTD_DATAFLASH \
- CONFIG_MTD_M25P80 \
- CONFIG_SPI_AT25 \
- CONFIG_SPI_SPIDEV \
- CONFIG_SPI_TLE62X0
- FILES:= \
- $(LINUX_DIR)/drivers/spi/at25.$(LINUX_KMOD_SUFFIX) \
- $(LINUX_DIR)/drivers/spi/spidev.$(LINUX_KMOD_SUFFIX) \
- $(LINUX_DIR)/drivers/spi/tle62x0.$(LINUX_KMOD_SUFFIX) \
- $(LINUX_DIR)/drivers/mtd/devices/m25p80.$(LINUX_KMOD_SUFFIX) \
- $(LINUX_DIR)/drivers/mtd/devices/mtd_dataflash.$(LINUX_KMOD_SUFFIX)
- AUTOLOAD:=$(call AutoLoad,90,spi)
+ TITLE:=Serial Peripheral Interface support
+ DEPENDS:=@LINUX_2_6
+ KCONFIG:=\
+ CONFIG_SPI=y \
+ CONFIG_SPI_MASTER=y
endef
define KernelPackage/spi/description
- This package contains the Serial Peripheral Interface driver
+ This package contains the Serial Peripheral Interface Master driver
endef
$(eval $(call KernelPackage,spi))
define KernelPackage/spi-bitbang
SUBMENU:=$(OTHER_MENU)
- TITLE:=Serial Peripheral Interface bitbanging
+ TITLE:=Serial Peripheral Interface bitbanging library
DEPENDS:=@LINUX_2_6 +kmod-spi
KCONFIG:=CONFIG_SPI_BITBANG
FILES:=$(LINUX_DIR)/drivers/spi/spi_bitbang.$(LINUX_KMOD_SUFFIX)
@@ -597,7 +587,38 @@ define KernelPackage/spi-bitbang
endef
define KernelPackage/spi-bitbang/description
- This package contains the Serial Peripheral Interface bitbanging library
+ This package contains the SPI bitbanging library
endef
$(eval $(call KernelPackage,spi-bitbang))
+
+define KernelPackage/spi-gpio
+ SUBMENU:=$(OTHER_MENU)
+ TITLE:=GPIO based bitbanging SPI controller
+ DEPENDS:=@LINUX_2_6 +kmod-spi-bitbang
+ KCONFIG:=CONFIG_SPI_GPIO
+ FILES:=$(LINUX_DIR)/drivers/spi/spi_gpio.$(LINUX_KMOD_SUFFIX)
+ AUTOLOAD:=$(call AutoLoad,92,spi_gpio)
+endef
+
+define KernelPackage/spi-gpio/description
+ This package contains the GPIO based bitbanging SPI controller driver
+endef
+
+$(eval $(call KernelPackage,spi-gpio))
+
+define KernelPackage/spi-dev
+ SUBMENU:=$(OTHER_MENU)
+ TITLE:=User mode SPI device driver
+ DEPENDS:=@LINUX_2_6 +kmod-spi
+ KCONFIG:=CONFIG_SPI_SPIDEV
+ FILES:=$(LINUX_DIR)/drivers/spi/spidev.$(LINUX_KMOD_SUFFIX)
+ AUTOLOAD:=$(call AutoLoad,91,spidev)
+endef
+
+define KernelPackage/spi-dev/description
+ This package contains the user mode SPI device driver
+endef
+
+$(eval $(call KernelPackage,spi-dev))
+
diff --git a/package/mmc_over_gpio/Makefile b/package/mmc_over_gpio/Makefile
index 46847a5..42c666c 100644
--- a/package/mmc_over_gpio/Makefile
+++ b/package/mmc_over_gpio/Makefile
@@ -1,4 +1,4 @@
-#
+#
# Copyright (C) 2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
@@ -10,18 +10,17 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mmc-over-gpio
-PKG_RELEASE:=1
+PKG_RELEASE:=2
include $(INCLUDE_DIR)/package.mk
define KernelPackage/mmc-over-gpio
SUBMENU:=Other modules
- DEPENDS:=@LINUX_2_6 +kmod-spi +kmod-spi-bitbang +kmod-mmc +kmod-mmc-spi @!TARGET_x86
+ DEPENDS:=@LINUX_2_6 +kmod-mmc-spi +kmod-spi-gpio @!TARGET_x86
TITLE:=MMC/SD card over GPIO support
- FILES:=$(PKG_BUILD_DIR)/spi_gpio.$(LINUX_KMOD_SUFFIX) \
- $(PKG_BUILD_DIR)/mmc_over_spigpio.$(LINUX_KMOD_SUFFIX)
- AUTOLOAD:=$(call AutoLoad,92,spi_gpio mmc_over_spigpio)
+ FILES:=$(PKG_BUILD_DIR)/mmc_over_spigpio.$(LINUX_KMOD_SUFFIX)
+ AUTOLOAD:=$(call AutoLoad,93,spi_gpio mmc_over_spigpio)
endef
define KernelPackage/mmc-over-gpio/description
diff --git a/package/mmc_over_gpio/src/Makefile b/package/mmc_over_gpio/src/Makefile
index d2258bb..b052c40 100644
--- a/package/mmc_over_gpio/src/Makefile
+++ b/package/mmc_over_gpio/src/Makefile
@@ -1,2 +1 @@
-obj-m += spi_gpio.o
obj-m += mmc_over_spigpio.o
diff --git a/package/mmc_over_gpio/src/mmc_over_spigpio.c b/package/mmc_over_gpio/src/mmc_over_spigpio.c
index 36dbd0f..113b518 100644
--- a/package/mmc_over_gpio/src/mmc_over_spigpio.c
+++ b/package/mmc_over_gpio/src/mmc_over_spigpio.c
@@ -9,7 +9,7 @@
#include <linux/platform_device.h>
#include <linux/list.h>
#include <linux/mutex.h>
-#include "linux/spi/spi_gpio.h" //XXX
+#include <linux/spi/spi_gpio.h>
/* This is the maximum speed in Hz */
diff --git a/target/linux/generic-2.6/config-2.6.23 b/target/linux/generic-2.6/config-2.6.23
index 8d7a6cb..3e755eb 100644
--- a/target/linux/generic-2.6/config-2.6.23
+++ b/target/linux/generic-2.6/config-2.6.23
@@ -726,6 +726,8 @@ CONFIG_MODULE_UNLOAD=y
# CONFIG_MOUSE_PC110PAD is not set
CONFIG_MSDOS_FS=m
CONFIG_MSDOS_PARTITION=y
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
# CONFIG_MTD_NAND is not set
# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
CONFIG_MTD_ROOTFS_ROOT_DEV=y
@@ -1386,6 +1388,8 @@ CONFIG_SOUND=m
# CONFIG_SPARSEMEM_MANUAL is not set
# CONFIG_SPI is not set
# CONFIG_SPI_MASTER is not set
+# CONFIG_SPI_AT25 is not set
+# CONFIG_SPI_TLE62X0 is not set
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_SQUASHFS=y
# CONFIG_SQUASHFS_EMBEDDED is not set
diff --git a/target/linux/generic-2.6/config-2.6.24 b/target/linux/generic-2.6/config-2.6.24
index 6882855..efd5d62 100644
--- a/target/linux/generic-2.6/config-2.6.24
+++ b/target/linux/generic-2.6/config-2.6.24
@@ -746,6 +746,8 @@ CONFIG_MODULE_UNLOAD=y
# CONFIG_MOUSE_PC110PAD is not set
CONFIG_MSDOS_FS=m
CONFIG_MSDOS_PARTITION=y
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
# CONFIG_MTD_INTEL_VR_NOR is not set
# CONFIG_MTD_NAND is not set
# CONFIG_MTD_OOPS is not set
@@ -1424,6 +1426,8 @@ CONFIG_SOUND=m
# CONFIG_SPARSEMEM_MANUAL is not set
# CONFIG_SPI is not set
# CONFIG_SPI_MASTER is not set
+# CONFIG_SPI_AT25 is not set
+# CONFIG_SPI_TLE62X0 is not set
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_SQUASHFS=y
# CONFIG_SQUASHFS_EMBEDDED is not set
diff --git a/package/mmc_over_gpio/src/spi_gpio.c b/target/linux/generic-2.6/files/drivers/spi/spi_gpio.c
index 31048ac..31048ac 100644
--- a/package/mmc_over_gpio/src/spi_gpio.c
+++ b/target/linux/generic-2.6/files/drivers/spi/spi_gpio.c
diff --git a/package/mmc_over_gpio/src/linux/spi/spi_gpio.h b/target/linux/generic-2.6/files/include/linux/spi/spi_gpio.h
index 8e7d4b1..8e7d4b1 100644
--- a/package/mmc_over_gpio/src/linux/spi/spi_gpio.h
+++ b/target/linux/generic-2.6/files/include/linux/spi/spi_gpio.h
diff --git a/target/linux/generic-2.6/patches-2.6.23/921-gpio_spi_driver.patch b/target/linux/generic-2.6/patches-2.6.23/921-gpio_spi_driver.patch
new file mode 100644
index 0000000..aa4e6ee
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.23/921-gpio_spi_driver.patch
@@ -0,0 +1,28 @@
+Index: linux-2.6.23.16/drivers/spi/Kconfig
+===================================================================
+--- linux-2.6.23.16.orig/drivers/spi/Kconfig
++++ linux-2.6.23.16/drivers/spi/Kconfig
+@@ -100,6 +100,11 @@ config SPI_BUTTERFLY
+ inexpensive battery powered microcontroller evaluation board.
+ This same cable can be used to flash new firmware.
+
++config SPI_GPIO
++ tristate "GPIO API based bitbanging SPI controller"
++ depends on SPI_MASTER && GENERIC_GPIO && EXPERIMENTAL
++ select SPI_BITBANG
++
+ config SPI_IMX
+ tristate "Freescale iMX SPI controller"
+ depends on SPI_MASTER && ARCH_IMX && EXPERIMENTAL
+Index: linux-2.6.23.16/drivers/spi/Makefile
+===================================================================
+--- linux-2.6.23.16.orig/drivers/spi/Makefile
++++ linux-2.6.23.16/drivers/spi/Makefile
+@@ -16,6 +16,7 @@ obj-$(CONFIG_SPI_BFIN) += spi_bfin5xx.
+ obj-$(CONFIG_SPI_BITBANG) += spi_bitbang.o
+ obj-$(CONFIG_SPI_AU1550) += au1550_spi.o
+ obj-$(CONFIG_SPI_BUTTERFLY) += spi_butterfly.o
++obj-$(CONFIG_SPI_GPIO) += spi_gpio.o
+ obj-$(CONFIG_SPI_IMX) += spi_imx.o
+ obj-$(CONFIG_SPI_LM70_LLP) += spi_lm70llp.o
+ obj-$(CONFIG_SPI_PXA2XX) += pxa2xx_spi.o
diff --git a/target/linux/generic-2.6/patches-2.6.24/921-gpio_spi_driver.patch b/target/linux/generic-2.6/patches-2.6.24/921-gpio_spi_driver.patch
new file mode 100644
index 0000000..aa4e6ee
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.24/921-gpio_spi_driver.patch
@@ -0,0 +1,28 @@
+Index: linux-2.6.23.16/drivers/spi/Kconfig
+===================================================================
+--- linux-2.6.23.16.orig/drivers/spi/Kconfig
++++ linux-2.6.23.16/drivers/spi/Kconfig
+@@ -100,6 +100,11 @@ config SPI_BUTTERFLY
+ inexpensive battery powered microcontroller evaluation board.
+ This same cable can be used to flash new firmware.
+
++config SPI_GPIO
++ tristate "GPIO API based bitbanging SPI controller"
++ depends on SPI_MASTER && GENERIC_GPIO && EXPERIMENTAL
++ select SPI_BITBANG
++
+ config SPI_IMX
+ tristate "Freescale iMX SPI controller"
+ depends on SPI_MASTER && ARCH_IMX && EXPERIMENTAL
+Index: linux-2.6.23.16/drivers/spi/Makefile
+===================================================================
+--- linux-2.6.23.16.orig/drivers/spi/Makefile
++++ linux-2.6.23.16/drivers/spi/Makefile
+@@ -16,6 +16,7 @@ obj-$(CONFIG_SPI_BFIN) += spi_bfin5xx.
+ obj-$(CONFIG_SPI_BITBANG) += spi_bitbang.o
+ obj-$(CONFIG_SPI_AU1550) += au1550_spi.o
+ obj-$(CONFIG_SPI_BUTTERFLY) += spi_butterfly.o
++obj-$(CONFIG_SPI_GPIO) += spi_gpio.o
+ obj-$(CONFIG_SPI_IMX) += spi_imx.o
+ obj-$(CONFIG_SPI_LM70_LLP) += spi_lm70llp.o
+ obj-$(CONFIG_SPI_PXA2XX) += pxa2xx_spi.o