[package] make mmc-over-gpio pins configurable in menuconfig (#6933)
[openwrt.git] / package / mmc_over_gpio / Makefile
1 #
2 # Copyright (C) 2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/kernel.mk
9
10 PKG_NAME:=mmc-over-gpio
11 PKG_RELEASE:=4
12
13 include $(INCLUDE_DIR)/package.mk
14
15
16 define KernelPackage/mmc-over-gpio
17 SUBMENU:=Other modules
18 DEPENDS:=@GPIO_SUPPORT +kmod-mmc-spi +kmod-spi-gpio-old
19 KCONFIG:=CONFIG_GPIOMMC \
20 CONFIG_CONFIGFS_FS=y
21 TITLE:=MMC/SD card over GPIO support
22 FILES:=$(LINUX_DIR)/drivers/mmc/host/gpiommc.$(LINUX_KMOD_SUFFIX)
23 AUTOLOAD:=$(call AutoLoad,93,gpiommc)
24 endef
25
26 define Package/kmod-mmc-over-gpio/config
27 config KMOD_MMC_OVER_GPIO_DI_PIN
28 int "GPIO DI PIN"
29 depends PACKAGE_kmod-mmc-over-gpio
30 default 1
31
32 config KMOD_MMC_OVER_GPIO_DO_PIN
33 int "GPIO DO PIN"
34 depends PACKAGE_kmod-mmc-over-gpio
35 default 3
36
37 config KMOD_MMC_OVER_GPIO_CLK_PIN
38 int "GPIO CLK PIN"
39 depends PACKAGE_kmod-mmc-over-gpio
40 default 4
41
42 config KMOD_MMC_OVER_GPIO_CS_PIN
43 int "GPIO CS PIN"
44 depends PACKAGE_kmod-mmc-over-gpio
45 default 7
46 endef
47
48 define KernelPackage/mmc-over-gpio/description
49 Support for driving an MMC/SD card over GPIO pins via SPI.
50 endef
51
52 define Build/Prepare
53 mkdir -p $(PKG_BUILD_DIR)
54 endef
55
56 define Build/Compile
57 endef
58
59 define KernelPackage/mmc-over-gpio/install
60 $(INSTALL_DIR) $(1)/etc/config
61 $(INSTALL_DATA) ./files/mmc_over_gpio.config $(1)/etc/config/mmc_over_gpio
62 $(INSTALL_DIR) $(1)/etc/init.d
63 $(INSTALL_BIN) ./files/mmc_over_gpio.init $(1)/etc/init.d/mmc_over_gpio
64
65 $(SED) 's,@GPIO_DI_PIN@,$(CONFIG_KMOD_MMC_OVER_GPIO_DI_PIN),g' \
66 -e 's,@GPIO_DO_PIN@,$(CONFIG_KMOD_MMC_OVER_GPIO_DO_PIN),g' \
67 -e 's,@GPIO_CLK_PIN@,$(CONFIG_KMOD_MMC_OVER_GPIO_CLK_PIN),g' \
68 -e 's,@GPIO_CS_PIN@,$(CONFIG_KMOD_MMC_OVER_GPIO_CS_PIN),g' \
69 $(1)/etc/config/mmc_over_gpio
70 endef
71
72 $(eval $(call KernelPackage,mmc-over-gpio))
This page took 0.040193 seconds and 5 git commands to generate.