aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Ritz <daniel.ritz@gmx.ch>2005-09-20 17:12:17 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2005-09-26 07:11:27 -0400
commit6c1a10dba92cbacb58563f5eacf93807125b488a (patch)
treebeba514dd10c205ad123997423ed97b88b92d87f
parent81000808b636b75a0ff5ef86c28f24fc6f5151eb (diff)
[PATCH] yenta: add support for more TI bridges
Support some more TI cardbus bridges. most of them are multifunction devices which adds 1394 controllers, smartcard readers etc. this could also help with the various problems with the XX21 controllers seen on the linux-pcmcia list. Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r--drivers/pcmcia/ti113x.h29
-rw-r--r--drivers/pcmcia/yenta_socket.c8
-rw-r--r--include/linux/pci_ids.h7
3 files changed, 44 insertions, 0 deletions
diff --git a/drivers/pcmcia/ti113x.h b/drivers/pcmcia/ti113x.h
index d319f2e7d053..da0b404561c9 100644
--- a/drivers/pcmcia/ti113x.h
+++ b/drivers/pcmcia/ti113x.h
@@ -59,6 +59,7 @@
59 59
60#define TI122X_SCR_SER_STEP 0xc0000000 60#define TI122X_SCR_SER_STEP 0xc0000000
61#define TI122X_SCR_INTRTIE 0x20000000 61#define TI122X_SCR_INTRTIE 0x20000000
62#define TIXX21_SCR_TIEALL 0x10000000
62#define TI122X_SCR_CBRSVD 0x00400000 63#define TI122X_SCR_CBRSVD 0x00400000
63#define TI122X_SCR_MRBURSTDN 0x00008000 64#define TI122X_SCR_MRBURSTDN 0x00008000
64#define TI122X_SCR_MRBURSTUP 0x00004000 65#define TI122X_SCR_MRBURSTUP 0x00004000
@@ -624,6 +625,7 @@ static int ti12xx_2nd_slot_empty(struct yenta_socket *socket)
624 int devfn; 625 int devfn;
625 unsigned int state; 626 unsigned int state;
626 int ret = 1; 627 int ret = 1;
628 u32 sysctl;
627 629
628 /* catch the two-slot controllers */ 630 /* catch the two-slot controllers */
629 switch (socket->dev->device) { 631 switch (socket->dev->device) {
@@ -646,6 +648,24 @@ static int ti12xx_2nd_slot_empty(struct yenta_socket *socket)
646 */ 648 */
647 break; 649 break;
648 650
651 case PCI_DEVICE_ID_TI_X515:
652 case PCI_DEVICE_ID_TI_X420:
653 case PCI_DEVICE_ID_TI_X620:
654 case PCI_DEVICE_ID_TI_XX21_XX11:
655 case PCI_DEVICE_ID_TI_7410:
656 case PCI_DEVICE_ID_TI_7610:
657 /*
658 * those are either single or dual slot CB with additional functions
659 * like 1394, smartcard reader, etc. check the TIEALL flag for them
660 * the TIEALL flag binds the IRQ of all functions toghether.
661 * we catch the single slot variants later.
662 */
663 sysctl = config_readl(socket, TI113X_SYSTEM_CONTROL);
664 if (sysctl & TIXX21_SCR_TIEALL)
665 return 0;
666
667 break;
668
649 /* single-slot controllers have the 2nd slot empty always :) */ 669 /* single-slot controllers have the 2nd slot empty always :) */
650 default: 670 default:
651 return 1; 671 return 1;
@@ -658,6 +678,15 @@ static int ti12xx_2nd_slot_empty(struct yenta_socket *socket)
658 if (!func) 678 if (!func)
659 return 1; 679 return 1;
660 680
681 /*
682 * check that the device id of both slots match. this is needed for the
683 * XX21 and the XX11 controller that share the same device id for single
684 * and dual slot controllers. return '2nd slot empty'. we already checked
685 * if the interrupt is tied to another function.
686 */
687 if (socket->dev->device != func->device)
688 goto out;
689
661 slot2 = pci_get_drvdata(func); 690 slot2 = pci_get_drvdata(func);
662 if (!slot2) 691 if (!slot2)
663 goto out; 692 goto out;
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index 80806c9b43ad..c3e22fca105a 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -1249,6 +1249,14 @@ static struct pci_device_id yenta_table [] = {
1249 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1250, TI1250), 1249 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1250, TI1250),
1250 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1410, TI1250), 1250 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1410, TI1250),
1251 1251
1252 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX21_XX11, TI12XX),
1253 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X515, TI12XX),
1254 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X420, TI12XX),
1255 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X620, TI12XX),
1256 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_7410, TI12XX),
1257 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_7510, TI12XX),
1258 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_7610, TI12XX),
1259
1252 CB_ID(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_1211, ENE), 1260 CB_ID(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_1211, ENE),
1253 CB_ID(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_1225, ENE), 1261 CB_ID(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_1225, ENE),
1254 CB_ID(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_1410, ENE), 1262 CB_ID(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_1410, ENE),
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 92efb2c767f9..68f11ac1a314 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -769,6 +769,8 @@
769#define PCI_DEVICE_ID_TI_TVP4010 0x3d04 769#define PCI_DEVICE_ID_TI_TVP4010 0x3d04
770#define PCI_DEVICE_ID_TI_TVP4020 0x3d07 770#define PCI_DEVICE_ID_TI_TVP4020 0x3d07
771#define PCI_DEVICE_ID_TI_4450 0x8011 771#define PCI_DEVICE_ID_TI_4450 0x8011
772#define PCI_DEVICE_ID_TI_XX21_XX11 0x8031
773#define PCI_DEVICE_ID_TI_X515 0x8036
772#define PCI_DEVICE_ID_TI_1130 0xac12 774#define PCI_DEVICE_ID_TI_1130 0xac12
773#define PCI_DEVICE_ID_TI_1031 0xac13 775#define PCI_DEVICE_ID_TI_1031 0xac13
774#define PCI_DEVICE_ID_TI_1131 0xac15 776#define PCI_DEVICE_ID_TI_1131 0xac15
@@ -785,12 +787,17 @@
785#define PCI_DEVICE_ID_TI_4451 0xac42 787#define PCI_DEVICE_ID_TI_4451 0xac42
786#define PCI_DEVICE_ID_TI_4510 0xac44 788#define PCI_DEVICE_ID_TI_4510 0xac44
787#define PCI_DEVICE_ID_TI_4520 0xac46 789#define PCI_DEVICE_ID_TI_4520 0xac46
790#define PCI_DEVICE_ID_TI_7510 0xac47
791#define PCI_DEVICE_ID_TI_7610 0xac48
792#define PCI_DEVICE_ID_TI_7410 0xac49
788#define PCI_DEVICE_ID_TI_1410 0xac50 793#define PCI_DEVICE_ID_TI_1410 0xac50
789#define PCI_DEVICE_ID_TI_1420 0xac51 794#define PCI_DEVICE_ID_TI_1420 0xac51
790#define PCI_DEVICE_ID_TI_1451A 0xac52 795#define PCI_DEVICE_ID_TI_1451A 0xac52
791#define PCI_DEVICE_ID_TI_1620 0xac54 796#define PCI_DEVICE_ID_TI_1620 0xac54
792#define PCI_DEVICE_ID_TI_1520 0xac55 797#define PCI_DEVICE_ID_TI_1520 0xac55
793#define PCI_DEVICE_ID_TI_1510 0xac56 798#define PCI_DEVICE_ID_TI_1510 0xac56
799#define PCI_DEVICE_ID_TI_X620 0xac8d
800#define PCI_DEVICE_ID_TI_X420 0xac8e
794 801
795#define PCI_VENDOR_ID_SONY 0x104d 802#define PCI_VENDOR_ID_SONY 0x104d
796#define PCI_DEVICE_ID_SONY_CXD3222 0x8039 803#define PCI_DEVICE_ID_SONY_CXD3222 0x8039