1#
2# Copyright (C) 2006-2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8PCMCIA_MENU:=PCMCIA support
9
10define KernelPackage/pcmcia-core
11  SUBMENU:=$(PCMCIA_MENU)
12  TITLE:=PCMCIA/CardBus support
13  DEPENDS:=@PCMCIA_SUPPORT
14  KCONFIG:= \
15	CONFIG_PCMCIA \
16	CONFIG_CARDBUS \
17	CONFIG_PCCARD \
18	PCMCIA_DEBUG=n
19  FILES:= \
20	$(LINUX_DIR)/drivers/pcmcia/pcmcia_core.ko \
21	$(LINUX_DIR)/drivers/pcmcia/pcmcia.ko
22  AUTOLOAD:=$(call AutoLoad,25,pcmcia_core pcmcia)
23endef
24
25define KernelPackage/pcmcia-core/description
26 Kernel support for PCMCIA/CardBus controllers
27endef
28
29$(eval $(call KernelPackage,pcmcia-core))
30
31define KernelPackage/pcmcia-rsrc
32  SUBMENU:=$(PCMCIA_MENU)
33  TITLE:=PCMCIA resource support
34  DEPENDS:=kmod-pcmcia-core
35  KCONFIG:=CONFIG_PCCARD_NONSTATIC=y
36# For Linux 2.6.35+
37ifneq ($(wildcard $(LINUX_DIR)/drivers/pcmcia/pcmcia_rsrc.ko),)
38  FILES:=$(LINUX_DIR)/drivers/pcmcia/pcmcia_rsrc.ko
39  AUTOLOAD:=$(call AutoLoad,26,pcmcia_rsrc)
40else
41  FILES:=$(LINUX_DIR)/drivers/pcmcia/rsrc_nonstatic.ko
42  AUTOLOAD:=$(call AutoLoad,26,rsrc_nonstatic)
43endif
44endef
45
46define KernelPackage/pcmcia-rsrc/description
47  Kernel support for PCMCIA resource allocation
48endef
49
50$(eval $(call KernelPackage,pcmcia-rsrc))
51
52
53define KernelPackage/pcmcia-yenta
54  SUBMENU:=$(PCMCIA_MENU)
55  TITLE:=yenta socket driver
56  DEPENDS:=kmod-pcmcia-rsrc
57  KCONFIG:=CONFIG_YENTA
58  FILES:=$(LINUX_DIR)/drivers/pcmcia/yenta_socket.ko
59  AUTOLOAD:=$(call AutoLoad,41,pcmcia_rsrc yenta_socket)
60endef
61
62$(eval $(call KernelPackage,pcmcia-yenta))
63
64
65define KernelPackage/pcmcia-serial
66  SUBMENU:=$(PCMCIA_MENU)
67  TITLE:=Serial devices support
68  DEPENDS:=kmod-pcmcia-core
69  KCONFIG:= \
70	CONFIG_PCMCIA_SERIAL_CS \
71	CONFIG_SERIAL_8250_CS
72    FILES:=$(LINUX_DIR)/drivers/tty/serial/8250/serial_cs.ko
73  AUTOLOAD:=$(call AutoLoad,45,serial_cs)
74endef
75
76define KernelPackage/pcmcia-serial/description
77 Kernel support for PCMCIA/CardBus serial devices
78endef
79
80$(eval $(call KernelPackage,pcmcia-serial))
81