pcmcia: remove irq_list parameter from pd6729
[linux-2.6.git] / drivers / pcmcia / ti113x.h
index d5b4ff7..aaa7022 100644 (file)
@@ -30,7 +30,6 @@
 #ifndef _LINUX_TI113X_H
 #define _LINUX_TI113X_H
 
-#include <linux/config.h>
 
 /* Register definitions for TI 113X PCI-to-CardBus bridges */
 
 #define ENE_TEST_C9_TLTENABLE          0x02
 #define ENE_TEST_C9_PFENABLE_F0                0x04
 #define ENE_TEST_C9_PFENABLE_F1                0x08
-#define ENE_TEST_C9_PFENABLE           (ENE_TEST_C9_PFENABLE_F0 | ENE_TEST_C9_PFENABLE_F0)
+#define ENE_TEST_C9_PFENABLE           (ENE_TEST_C9_PFENABLE_F0 | ENE_TEST_C9_PFENABLE_F1)
 #define ENE_TEST_C9_WPDISALBLE_F0      0x40
 #define ENE_TEST_C9_WPDISALBLE_F1      0x80
 #define ENE_TEST_C9_WPDISALBLE         (ENE_TEST_C9_WPDISALBLE_F0 | ENE_TEST_C9_WPDISALBLE_F1)
@@ -340,8 +339,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)
 
        mfunc = mfunc_old = config_readl(socket, TI122X_MFUNC);
        devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
-       printk(KERN_INFO "Yenta TI: socket %s, mfunc 0x%08x, devctl 0x%02x\n",
-              pci_name(socket->dev), mfunc, devctl);
+       dev_printk(KERN_INFO, &socket->dev->dev,
+                  "TI: mfunc 0x%08x, devctl 0x%02x\n", mfunc, devctl);
 
        /* make sure PCI interrupts are enabled before probing */
        ti_init(socket);
@@ -355,8 +354,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)
         * We're here which means PCI interrupts are _not_ delivered. try to
         * find the right setting (all serial or parallel)
         */
-       printk(KERN_INFO "Yenta TI: socket %s probing PCI interrupt failed, trying to fix\n",
-              pci_name(socket->dev));
+       dev_printk(KERN_INFO, &socket->dev->dev,
+                  "TI: probing PCI interrupt failed, trying to fix\n");
 
        /* for serial PCI make sure MFUNC3 is set to IRQSER */
        if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) {
@@ -380,8 +379,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)
 
                                pci_irq_status = yenta_probe_cb_irq(socket);
                                if (pci_irq_status == 1) {
-                                       printk(KERN_INFO "Yenta TI: socket %s all-serial interrupts ok\n",
-                                              pci_name(socket->dev));
+                                       dev_printk(KERN_INFO, &socket->dev->dev,
+                                           "TI: all-serial interrupts ok\n");
                                        mfunc_old = mfunc;
                                        goto out;
                                }
@@ -396,8 +395,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)
                }
 
                /* serial PCI interrupts not working fall back to parallel */
-               printk(KERN_INFO "Yenta TI: socket %s falling back to parallel PCI interrupts\n",
-                      pci_name(socket->dev));
+               dev_printk(KERN_INFO, &socket->dev->dev,
+                          "TI: falling back to parallel PCI interrupts\n");
                devctl &= ~TI113X_DCR_IMODE_MASK;
                devctl |= TI113X_DCR_IMODE_SERIAL; /* serial ISA could be right */
                config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
@@ -428,8 +427,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)
        pci_irq_status = yenta_probe_cb_irq(socket);
        if (pci_irq_status == 1) {
                mfunc_old = mfunc;
-               printk(KERN_INFO "Yenta TI: socket %s parallel PCI interrupts ok\n",
-                      pci_name(socket->dev));
+               dev_printk(KERN_INFO, &socket->dev->dev,
+                          "TI: parallel PCI interrupts ok\n");
        } else {
                /* not working, back to old value */
                mfunc = mfunc_old;
@@ -441,8 +440,9 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)
 out:
        if (pci_irq_status < 1) {
                socket->cb_irq = 0;
-               printk(KERN_INFO "Yenta TI: socket %s no PCI interrupts. Fish. Please report.\n",
-                      pci_name(socket->dev));
+               dev_printk(KERN_INFO, &socket->dev->dev,
+                          "Yenta TI: no PCI interrupts. Fish. "
+                          "Please report.\n");
        }
 }
 
@@ -514,8 +514,9 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)
 
        mfunc = mfunc_old = config_readl(socket, TI122X_MFUNC);
        devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
-       printk(KERN_INFO "Yenta TI: socket %s, mfunc 0x%08x, devctl 0x%02x\n",
-              pci_name(socket->dev), mfunc, devctl);
+       dev_printk(KERN_INFO, &socket->dev->dev,
+                  "TI: mfunc 0x%08x, devctl 0x%02x\n",
+                  mfunc, devctl);
 
        /* if IRQs are configured as tied, align irq of func1 with func0 */
        sysctl = config_readl(socket, TI113X_SYSTEM_CONTROL);
@@ -534,9 +535,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)
         * We're here which means PCI interrupts are _not_ delivered. try to
         * find the right setting
         */
-       printk(KERN_INFO "Yenta TI: socket %s probing PCI interrupt failed, trying to fix\n",
-              pci_name(socket->dev));
-
+       dev_printk(KERN_INFO, &socket->dev->dev,
+                  "TI: probing PCI interrupt failed, trying to fix\n");
 
        /* if all serial: set INTRTIE, probe again */
        if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) {
@@ -545,8 +545,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)
                if (ti12xx_tie_interrupts(socket, &old_irq)) {
                        pci_irq_status = yenta_probe_cb_irq(socket);
                        if (pci_irq_status == 1) {
-                               printk(KERN_INFO "Yenta TI: socket %s all-serial interrupts, tied ok\n",
-                                      pci_name(socket->dev));
+                               dev_printk(KERN_INFO, &socket->dev->dev,
+                                       "TI: all-serial interrupts, tied ok\n");
                                goto out;
                        }
 
@@ -583,8 +583,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)
 
                        pci_irq_status = yenta_probe_cb_irq(socket);
                        if (pci_irq_status == 1) {
-                               printk(KERN_INFO "Yenta TI: socket %s parallel PCI interrupts ok\n",
-                                      pci_name(socket->dev));
+                               dev_printk(KERN_INFO, &socket->dev->dev,
+                                          "TI: parallel PCI interrupts ok\n");
                                goto out;
                        }
 
@@ -594,13 +594,13 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)
                        if (pci_irq_status == -1)
                                goto out;
                }
-               
+
                /* still nothing: set INTRTIE */
                if (ti12xx_tie_interrupts(socket, &old_irq)) {
                        pci_irq_status = yenta_probe_cb_irq(socket);
                        if (pci_irq_status == 1) {
-                               printk(KERN_INFO "Yenta TI: socket %s parallel PCI interrupts, tied ok\n",
-                                      pci_name(socket->dev));
+                               dev_printk(KERN_INFO, &socket->dev->dev,
+                                   "TI: parallel PCI interrupts, tied ok\n");
                                goto out;
                        }
 
@@ -611,8 +611,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)
 out:
        if (pci_irq_status < 1) {
                socket->cb_irq = 0;
-               printk(KERN_INFO "Yenta TI: socket %s no PCI interrupts. Fish. Please report.\n",
-                      pci_name(socket->dev));
+               dev_printk(KERN_INFO, &socket->dev->dev,
+                          "TI: no PCI interrupts. Fish. Please report.\n");
        }
 }
 
@@ -648,6 +648,7 @@ static int ti12xx_2nd_slot_empty(struct yenta_socket *socket)
                 */
                break;
 
+       case PCI_DEVICE_ID_TI_XX12:
        case PCI_DEVICE_ID_TI_X515:
        case PCI_DEVICE_ID_TI_X420:
        case PCI_DEVICE_ID_TI_X620:
@@ -692,7 +693,7 @@ static int ti12xx_2nd_slot_empty(struct yenta_socket *socket)
                goto out;
 
        /* check state */
-       yenta_get_status(&socket->socket, &state);
+       yenta_get_status(&slot2->socket, &state);
        if (state & SS_DETECT) {
                ret = 0;
                goto out;
@@ -815,11 +816,13 @@ static int ti12xx_override(struct yenta_socket *socket)
        /* make sure that memory burst is active */
        val_orig = val = config_readl(socket, TI113X_SYSTEM_CONTROL);
        if (disable_clkrun && PCI_FUNC(socket->dev->devfn) == 0) {
-               printk(KERN_INFO "Yenta: Disabling CLKRUN feature\n");
+               dev_printk(KERN_INFO, &socket->dev->dev,
+                          "Disabling CLKRUN feature\n");
                val |= TI113X_SCR_KEEPCLK;
        }
        if (!(val & TI122X_SCR_MRBURSTUP)) {
-               printk(KERN_INFO "Yenta: Enabling burst memory read transactions\n");
+               dev_printk(KERN_INFO, &socket->dev->dev,
+                          "Enabling burst memory read transactions\n");
                val |= TI122X_SCR_MRBURSTUP;
        }
        if (val_orig != val)
@@ -830,10 +833,12 @@ static int ti12xx_override(struct yenta_socket *socket)
         * CSC interrupts to PCI rather than INTVAL.
         */
        val = config_readb(socket, TI1250_DIAGNOSTIC);
-       printk(KERN_INFO "Yenta: Using %s to route CSC interrupts to PCI\n",
-               (val & TI1250_DIAG_PCI_CSC) ? "CSCINT" : "INTVAL");
-       printk(KERN_INFO "Yenta: Routing CardBus interrupts to %s\n",
-               (val & TI1250_DIAG_PCI_IREQ) ? "PCI" : "ISA");
+       dev_printk(KERN_INFO, &socket->dev->dev,
+                  "Using %s to route CSC interrupts to PCI\n",
+                  (val & TI1250_DIAG_PCI_CSC) ? "CSCINT" : "INTVAL");
+       dev_printk(KERN_INFO, &socket->dev->dev,
+                  "Routing CardBus interrupts to %s\n",
+                  (val & TI1250_DIAG_PCI_IREQ) ? "PCI" : "ISA");
 
        /* do irqrouting, depending on function */
        if (PCI_FUNC(socket->dev->devfn) == 0)
@@ -858,8 +863,9 @@ static int ti1250_override(struct yenta_socket *socket)
                diag |= TI1250_DIAG_PCI_CSC | TI1250_DIAG_PCI_IREQ;
 
        if (diag != old) {
-               printk(KERN_INFO "Yenta: adjusting diagnostic: %02x -> %02x\n",
-                       old, diag);
+               dev_printk(KERN_INFO, &socket->dev->dev,
+                          "adjusting diagnostic: %02x -> %02x\n",
+                          old, diag);
                config_writeb(socket, TI1250_DIAGNOSTIC, diag);
        }
 
@@ -874,7 +880,7 @@ static int ti1250_override(struct yenta_socket *socket)
  */
 
 #ifdef CONFIG_YENTA_ENE_TUNE
-/**
+/*
  * set/clear various test bits:
  * Defaults to clear the bit.
  * - mask (u8) defines what bits to change
@@ -924,7 +930,9 @@ static void ene_tune_bridge(struct pcmcia_socket *sock, struct pci_bus *bus)
                /* default to clear TLTEnable bit, old behaviour */
                test_c9 &= ~ENE_TEST_C9_TLTENABLE;
 
-       printk(KERN_INFO "yenta EnE: chaning testregister 0xC9, %02x -> %02x\n", old_c9, test_c9);
+       dev_printk(KERN_INFO, &socket->dev->dev,
+                  "EnE: chaning testregister 0xC9, %02x -> %02x\n",
+                  old_c9, test_c9);
        config_writeb(socket, ENE_TEST_C9, test_c9);
 }