aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pcmcia/Kconfig25
-rw-r--r--drivers/pcmcia/ti113x.h4
-rw-r--r--drivers/pcmcia/yenta_socket.c39
3 files changed, 66 insertions, 2 deletions
diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
index 309eb557f9a3..ea00b1f3cb44 100644
--- a/drivers/pcmcia/Kconfig
+++ b/drivers/pcmcia/Kconfig
@@ -116,6 +116,31 @@ config YENTA
116 116
117 If unsure, say Y. 117 If unsure, say Y.
118 118
119config YENTA_O2
120 default y
121 bool "Special initialization for O2Micro bridges" if EMBEDDED
122 depends on YENTA
123
124config YENTA_RICOH
125 default y
126 bool "Special initialization for Ricoh bridges" if EMBEDDED
127 depends on YENTA
128
129config YENTA_TI
130 default y
131 bool "Special initialization for TI and EnE bridges" if EMBEDDED
132 depends on YENTA
133
134config YENTA_ENE_TUNE
135 default y
136 bool "Auto-tune EnE bridges for CB cards" if EMBEDDED
137 depends on YENTA_TI && CARDBUS
138
139config YENTA_TOSHIBA
140 default y
141 bool "Special initialization for Toshiba ToPIC bridges" if EMBEDDED
142 depends on YENTA
143
119config PD6729 144config PD6729
120 tristate "Cirrus PD6729 compatible bridge support" 145 tristate "Cirrus PD6729 compatible bridge support"
121 depends on PCMCIA && PCI 146 depends on PCMCIA && PCI
diff --git a/drivers/pcmcia/ti113x.h b/drivers/pcmcia/ti113x.h
index 539b5cd1a598..d5b4ff74462e 100644
--- a/drivers/pcmcia/ti113x.h
+++ b/drivers/pcmcia/ti113x.h
@@ -873,7 +873,7 @@ static int ti1250_override(struct yenta_socket *socket)
873 * Some fixup code to make everybody happy (TM). 873 * Some fixup code to make everybody happy (TM).
874 */ 874 */
875 875
876#ifdef CONFIG_CARDBUS 876#ifdef CONFIG_YENTA_ENE_TUNE
877/** 877/**
878 * set/clear various test bits: 878 * set/clear various test bits:
879 * Defaults to clear the bit. 879 * Defaults to clear the bit.
@@ -937,7 +937,7 @@ static int ene_override(struct yenta_socket *socket)
937} 937}
938#else 938#else
939# define ene_override ti1250_override 939# define ene_override ti1250_override
940#endif 940#endif /* !CONFIG_YENTA_ENE_TUNE */
941 941
942#endif /* _LINUX_TI113X_H */ 942#endif /* _LINUX_TI113X_H */
943 943
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index fa0625c438dc..826e7e133269 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -49,7 +49,13 @@ MODULE_PARM_DESC(pwr_irqs_off, "Force IRQs off during power-on of slot. Use only
49#define to_cycles(ns) ((ns)/120) 49#define to_cycles(ns) ((ns)/120)
50#define to_ns(cycles) ((cycles)*120) 50#define to_ns(cycles) ((cycles)*120)
51 51
52/**
53 * yenta PCI irq probing.
54 * currently only used in the TI/EnE initialization code
55 */
56#ifdef CONFIG_YENTA_TI
52static int yenta_probe_cb_irq(struct yenta_socket *socket); 57static int yenta_probe_cb_irq(struct yenta_socket *socket);
58#endif
53 59
54 60
55static unsigned int override_bios; 61static unsigned int override_bios;
@@ -745,10 +751,18 @@ static struct pccard_operations yenta_socket_operations = {
745}; 751};
746 752
747 753
754#ifdef CONFIG_YENTA_TI
748#include "ti113x.h" 755#include "ti113x.h"
756#endif
757#ifdef CONFIG_YENTA_RICOH
749#include "ricoh.h" 758#include "ricoh.h"
759#endif
760#ifdef CONFIG_YENTA_TOSHIBA
750#include "topic.h" 761#include "topic.h"
762#endif
763#ifdef CONFIG_YENTA_O2
751#include "o2micro.h" 764#include "o2micro.h"
765#endif
752 766
753enum { 767enum {
754 CARDBUS_TYPE_DEFAULT = -1, 768 CARDBUS_TYPE_DEFAULT = -1,
@@ -768,6 +782,7 @@ enum {
768 * initialization sequences etc details. List them here.. 782 * initialization sequences etc details. List them here..
769 */ 783 */
770static struct cardbus_type cardbus_type[] = { 784static struct cardbus_type cardbus_type[] = {
785#ifdef CONFIG_YENTA_TI
771 [CARDBUS_TYPE_TI] = { 786 [CARDBUS_TYPE_TI] = {
772 .override = ti_override, 787 .override = ti_override,
773 .save_state = ti_save_state, 788 .save_state = ti_save_state,
@@ -792,27 +807,36 @@ static struct cardbus_type cardbus_type[] = {
792 .restore_state = ti_restore_state, 807 .restore_state = ti_restore_state,
793 .sock_init = ti_init, 808 .sock_init = ti_init,
794 }, 809 },
810#endif
811#ifdef CONFIG_YENTA_RICOH
795 [CARDBUS_TYPE_RICOH] = { 812 [CARDBUS_TYPE_RICOH] = {
796 .override = ricoh_override, 813 .override = ricoh_override,
797 .save_state = ricoh_save_state, 814 .save_state = ricoh_save_state,
798 .restore_state = ricoh_restore_state, 815 .restore_state = ricoh_restore_state,
799 }, 816 },
817#endif
818#ifdef CONFIG_YENTA_TOSHIBA
800 [CARDBUS_TYPE_TOPIC95] = { 819 [CARDBUS_TYPE_TOPIC95] = {
801 .override = topic95_override, 820 .override = topic95_override,
802 }, 821 },
803 [CARDBUS_TYPE_TOPIC97] = { 822 [CARDBUS_TYPE_TOPIC97] = {
804 .override = topic97_override, 823 .override = topic97_override,
805 }, 824 },
825#endif
826#ifdef CONFIG_YENTA_O2
806 [CARDBUS_TYPE_O2MICRO] = { 827 [CARDBUS_TYPE_O2MICRO] = {
807 .override = o2micro_override, 828 .override = o2micro_override,
808 .restore_state = o2micro_restore_state, 829 .restore_state = o2micro_restore_state,
809 }, 830 },
831#endif
832#ifdef CONFIG_YENTA_TI
810 [CARDBUS_TYPE_ENE] = { 833 [CARDBUS_TYPE_ENE] = {
811 .override = ene_override, 834 .override = ene_override,
812 .save_state = ti_save_state, 835 .save_state = ti_save_state,
813 .restore_state = ti_restore_state, 836 .restore_state = ti_restore_state,
814 .sock_init = ti_init, 837 .sock_init = ti_init,
815 }, 838 },
839#endif
816}; 840};
817 841
818 842
@@ -858,6 +882,12 @@ static unsigned int yenta_probe_irq(struct yenta_socket *socket, u32 isa_irq_mas
858} 882}
859 883
860 884
885/**
886 * yenta PCI irq probing.
887 * currently only used in the TI/EnE initialization code
888 */
889#ifdef CONFIG_YENTA_TI
890
861/* interrupt handler, only used during probing */ 891/* interrupt handler, only used during probing */
862static irqreturn_t yenta_probe_handler(int irq, void *dev_id, struct pt_regs *regs) 892static irqreturn_t yenta_probe_handler(int irq, void *dev_id, struct pt_regs *regs)
863{ 893{
@@ -910,6 +940,7 @@ static int yenta_probe_cb_irq(struct yenta_socket *socket)
910 return (int) socket->probe_status; 940 return (int) socket->probe_status;
911} 941}
912 942
943#endif /* CONFIG_YENTA_TI */
913 944
914 945
915/* 946/*
@@ -1173,6 +1204,7 @@ static struct pci_device_id yenta_table [] = {
1173 * advanced overrides instead. (I can't get the 1204 * advanced overrides instead. (I can't get the
1174 * data sheets for these devices. --rmk) 1205 * data sheets for these devices. --rmk)
1175 */ 1206 */
1207#ifdef CONFIG_YENTA_TI
1176 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1210, TI), 1208 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1210, TI),
1177 1209
1178 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1130, TI113X), 1210 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1130, TI113X),
@@ -1215,18 +1247,25 @@ static struct pci_device_id yenta_table [] = {
1215 CB_ID(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_1225, ENE), 1247 CB_ID(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_1225, ENE),
1216 CB_ID(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_1410, ENE), 1248 CB_ID(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_1410, ENE),
1217 CB_ID(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_1420, ENE), 1249 CB_ID(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_1420, ENE),
1250#endif /* CONFIG_YENTA_TI */
1218 1251
1252#ifdef CONFIG_YENTA_RICOH
1219 CB_ID(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_RL5C465, RICOH), 1253 CB_ID(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_RL5C465, RICOH),
1220 CB_ID(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_RL5C466, RICOH), 1254 CB_ID(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_RL5C466, RICOH),
1221 CB_ID(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_RL5C475, RICOH), 1255 CB_ID(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_RL5C475, RICOH),
1222 CB_ID(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_RL5C476, RICOH), 1256 CB_ID(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_RL5C476, RICOH),
1223 CB_ID(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_RL5C478, RICOH), 1257 CB_ID(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_RL5C478, RICOH),
1258#endif
1224 1259
1260#ifdef CONFIG_YENTA_TOSHIBA
1225 CB_ID(PCI_VENDOR_ID_TOSHIBA, PCI_DEVICE_ID_TOSHIBA_TOPIC95, TOPIC95), 1261 CB_ID(PCI_VENDOR_ID_TOSHIBA, PCI_DEVICE_ID_TOSHIBA_TOPIC95, TOPIC95),
1226 CB_ID(PCI_VENDOR_ID_TOSHIBA, PCI_DEVICE_ID_TOSHIBA_TOPIC97, TOPIC97), 1262 CB_ID(PCI_VENDOR_ID_TOSHIBA, PCI_DEVICE_ID_TOSHIBA_TOPIC97, TOPIC97),
1227 CB_ID(PCI_VENDOR_ID_TOSHIBA, PCI_DEVICE_ID_TOSHIBA_TOPIC100, TOPIC97), 1263 CB_ID(PCI_VENDOR_ID_TOSHIBA, PCI_DEVICE_ID_TOSHIBA_TOPIC100, TOPIC97),
1264#endif
1228 1265
1266#ifdef CONFIG_YENTA_O2
1229 CB_ID(PCI_VENDOR_ID_O2, PCI_ANY_ID, O2MICRO), 1267 CB_ID(PCI_VENDOR_ID_O2, PCI_ANY_ID, O2MICRO),
1268#endif
1230 1269
1231 /* match any cardbus bridge */ 1270 /* match any cardbus bridge */
1232 CB_ID(PCI_ANY_ID, PCI_ANY_ID, DEFAULT), 1271 CB_ID(PCI_ANY_ID, PCI_ANY_ID, DEFAULT),