2008-04-15 10:33:43 +03:00
|
|
|
#
|
2008-03-21 18:52:27 +02: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 15:52:32 +03:00
|
|
|
PKG_RELEASE:=4
|
2008-03-21 18:52:27 +02:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
|
|
|
|
define KernelPackage/mmc-over-gpio
|
|
|
|
SUBMENU:=Other modules
|
2009-02-10 18:55:38 +02:00
|
|
|
DEPENDS:=@GPIO_SUPPORT +kmod-mmc-spi +kmod-spi-gpio-old
|
2009-04-12 15:52:32 +03:00
|
|
|
KCONFIG:=CONFIG_GPIOMMC \
|
|
|
|
CONFIG_CONFIGFS_FS=y
|
2008-03-21 18:52:27 +02:00
|
|
|
TITLE:=MMC/SD card over GPIO support
|
2008-07-18 23:53:08 +03:00
|
|
|
FILES:=$(LINUX_DIR)/drivers/mmc/host/gpiommc.$(LINUX_KMOD_SUFFIX)
|
2009-04-12 15:52:32 +03:00
|
|
|
AUTOLOAD:=$(call AutoLoad,93,gpiommc)
|
2008-03-21 18:52:27 +02:00
|
|
|
endef
|
|
|
|
|
2010-03-28 16:23:03 +03:00
|
|
|
define Package/kmod-mmc-over-gpio/config
|
|
|
|
config KMOD_MMC_OVER_GPIO_DI_PIN
|
|
|
|
int "GPIO DI PIN"
|
|
|
|
depends PACKAGE_kmod-mmc-over-gpio
|
|
|
|
default 1
|
|
|
|
|
|
|
|
config KMOD_MMC_OVER_GPIO_DO_PIN
|
|
|
|
int "GPIO DO PIN"
|
|
|
|
depends PACKAGE_kmod-mmc-over-gpio
|
|
|
|
default 3
|
|
|
|
|
|
|
|
config KMOD_MMC_OVER_GPIO_CLK_PIN
|
|
|
|
int "GPIO CLK PIN"
|
|
|
|
depends PACKAGE_kmod-mmc-over-gpio
|
|
|
|
default 4
|
|
|
|
|
|
|
|
config KMOD_MMC_OVER_GPIO_CS_PIN
|
|
|
|
int "GPIO CS PIN"
|
|
|
|
depends PACKAGE_kmod-mmc-over-gpio
|
|
|
|
default 7
|
|
|
|
endef
|
|
|
|
|
2008-03-21 18:52:27 +02:00
|
|
|
define KernelPackage/mmc-over-gpio/description
|
|
|
|
Support for driving an MMC/SD card over GPIO pins via SPI.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Prepare
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
endef
|
|
|
|
|
2008-03-21 19:38:16 +02:00
|
|
|
define KernelPackage/mmc-over-gpio/install
|
2008-11-18 01:22:27 +02:00
|
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
|
|
$(INSTALL_DATA) ./files/mmc_over_gpio.config $(1)/etc/config/mmc_over_gpio
|
2008-03-21 19:38:16 +02:00
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) ./files/mmc_over_gpio.init $(1)/etc/init.d/mmc_over_gpio
|
2010-03-28 16:23:03 +03: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-21 19:38:16 +02:00
|
|
|
endef
|
|
|
|
|
2008-03-21 18:52:27 +02:00
|
|
|
$(eval $(call KernelPackage,mmc-over-gpio))
|