2008-04-15 07:33:43 +00:00
|
|
|
#
|
2008-03-21 16:52:27 +00: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 12:52:32 +00:00
|
|
|
PKG_RELEASE:=4
|
2008-03-21 16:52:27 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
|
|
|
|
define KernelPackage/mmc-over-gpio
|
|
|
|
SUBMENU:=Other modules
|
2009-02-10 16:55:38 +00:00
|
|
|
DEPENDS:=@GPIO_SUPPORT +kmod-mmc-spi +kmod-spi-gpio-old
|
2009-04-12 12:52:32 +00:00
|
|
|
KCONFIG:=CONFIG_GPIOMMC \
|
|
|
|
CONFIG_CONFIGFS_FS=y
|
2008-03-21 16:52:27 +00:00
|
|
|
TITLE:=MMC/SD card over GPIO support
|
2010-07-12 14:06:13 +00:00
|
|
|
FILES:=$(LINUX_DIR)/drivers/mmc/host/gpiommc.ko
|
2009-04-12 12:52:32 +00:00
|
|
|
AUTOLOAD:=$(call AutoLoad,93,gpiommc)
|
2010-04-16 09:56:19 +00:00
|
|
|
MENU:=1
|
2008-03-21 16:52:27 +00:00
|
|
|
endef
|
|
|
|
|
2010-03-28 13:23:03 +00:00
|
|
|
define Package/kmod-mmc-over-gpio/config
|
2010-04-16 09:56:19 +00: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 13:23:03 +00:00
|
|
|
endef
|
|
|
|
|
2008-03-21 16:52:27 +00: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 17:38:16 +00:00
|
|
|
define KernelPackage/mmc-over-gpio/install
|
2008-11-17 23:22:27 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
|
|
$(INSTALL_DATA) ./files/mmc_over_gpio.config $(1)/etc/config/mmc_over_gpio
|
2008-03-21 17:38:16 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) ./files/mmc_over_gpio.init $(1)/etc/init.d/mmc_over_gpio
|
2010-03-28 13:23:03 +00: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 17:38:16 +00:00
|
|
|
endef
|
|
|
|
|
2008-03-21 16:52:27 +00:00
|
|
|
$(eval $(call KernelPackage,mmc-over-gpio))
|