2008-04-15 15:33:43 +08:00
|
|
|
#
|
2008-03-22 00:52:27 +08:00
|
|
|
# Copyright (C) 2008 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
|
|
|
|
PKG_NAME:=mmc-over-gpio
|
2009-04-12 20:52:32 +08:00
|
|
|
PKG_RELEASE:=4
|
2008-03-22 00:52:27 +08:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
|
|
|
|
define KernelPackage/mmc-over-gpio
|
|
|
|
SUBMENU:=Other modules
|
2009-02-11 00:55:38 +08:00
|
|
|
DEPENDS:=@GPIO_SUPPORT +kmod-mmc-spi +kmod-spi-gpio-old
|
2009-04-12 20:52:32 +08:00
|
|
|
KCONFIG:=CONFIG_GPIOMMC \
|
|
|
|
CONFIG_CONFIGFS_FS=y
|
2008-03-22 00:52:27 +08:00
|
|
|
TITLE:=MMC/SD card over GPIO support
|
2010-07-12 22:06:13 +08:00
|
|
|
FILES:=$(LINUX_DIR)/drivers/mmc/host/gpiommc.ko
|
2009-04-12 20:52:32 +08:00
|
|
|
AUTOLOAD:=$(call AutoLoad,93,gpiommc)
|
2010-04-16 17:56:19 +08:00
|
|
|
MENU:=1
|
2008-03-22 00:52:27 +08:00
|
|
|
endef
|
|
|
|
|
2010-03-28 21:23:03 +08:00
|
|
|
define Package/kmod-mmc-over-gpio/config
|
2010-04-16 17:56:19 +08:00
|
|
|
menu "Configuration"
|
|
|
|
depends PACKAGE_kmod-mmc-over-gpio
|
|
|
|
|
|
|
|
config KMOD_MMC_OVER_GPIO_DI_PIN
|
|
|
|
int "GPIO DI (Data-In) pin"
|
|
|
|
default 1
|
|
|
|
|
|
|
|
config KMOD_MMC_OVER_GPIO_DO_PIN
|
|
|
|
int "GPIO DO (Data-Out) pin"
|
|
|
|
default 3
|
|
|
|
|
|
|
|
config KMOD_MMC_OVER_GPIO_CLK_PIN
|
|
|
|
int "GPIO CLK (Clock) pin"
|
|
|
|
default 4
|
|
|
|
|
|
|
|
config KMOD_MMC_OVER_GPIO_CS_PIN
|
|
|
|
int "GPIO CS (Chip-Select) pin"
|
|
|
|
default 7
|
|
|
|
|
|
|
|
endmenu
|
2010-03-28 21:23:03 +08:00
|
|
|
endef
|
|
|
|
|
2008-03-22 00:52:27 +08:00
|
|
|
define KernelPackage/mmc-over-gpio/description
|
|
|
|
Support for driving an MMC/SD card over GPIO pins via SPI.
|
|
|
|
endef
|
|
|
|
|
2010-10-06 01:21:03 +08:00
|
|
|
define KernelPackage/mmc-over-gpio/conffiles
|
|
|
|
/etc/config/mmc_over_gpio
|
|
|
|
endef
|
|
|
|
|
2008-03-22 00:52:27 +08:00
|
|
|
define Build/Prepare
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
endef
|
|
|
|
|
2008-03-22 01:38:16 +08:00
|
|
|
define KernelPackage/mmc-over-gpio/install
|
2008-11-18 07:22:27 +08:00
|
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
|
|
$(INSTALL_DATA) ./files/mmc_over_gpio.config $(1)/etc/config/mmc_over_gpio
|
2008-03-22 01:38:16 +08:00
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) ./files/mmc_over_gpio.init $(1)/etc/init.d/mmc_over_gpio
|
2010-03-28 21:23:03 +08:00
|
|
|
|
|
|
|
$(SED) 's,@GPIO_DI_PIN@,$(CONFIG_KMOD_MMC_OVER_GPIO_DI_PIN),g' \
|
|
|
|
-e 's,@GPIO_DO_PIN@,$(CONFIG_KMOD_MMC_OVER_GPIO_DO_PIN),g' \
|
|
|
|
-e 's,@GPIO_CLK_PIN@,$(CONFIG_KMOD_MMC_OVER_GPIO_CLK_PIN),g' \
|
|
|
|
-e 's,@GPIO_CS_PIN@,$(CONFIG_KMOD_MMC_OVER_GPIO_CS_PIN),g' \
|
|
|
|
$(1)/etc/config/mmc_over_gpio
|
2008-03-22 01:38:16 +08:00
|
|
|
endef
|
|
|
|
|
2008-03-22 00:52:27 +08:00
|
|
|
$(eval $(call KernelPackage,mmc-over-gpio))
|