diff options
Diffstat (limited to 'drivers/pcmcia/ti113x.h')
-rw-r--r-- | drivers/pcmcia/ti113x.h | 78 |
1 files changed, 43 insertions, 35 deletions
diff --git a/drivers/pcmcia/ti113x.h b/drivers/pcmcia/ti113x.h index 129db7bd06c3..aaa70227bfb0 100644 --- a/drivers/pcmcia/ti113x.h +++ b/drivers/pcmcia/ti113x.h | |||
@@ -339,8 +339,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket) | |||
339 | 339 | ||
340 | mfunc = mfunc_old = config_readl(socket, TI122X_MFUNC); | 340 | mfunc = mfunc_old = config_readl(socket, TI122X_MFUNC); |
341 | devctl = config_readb(socket, TI113X_DEVICE_CONTROL); | 341 | devctl = config_readb(socket, TI113X_DEVICE_CONTROL); |
342 | printk(KERN_INFO "Yenta TI: socket %s, mfunc 0x%08x, devctl 0x%02x\n", | 342 | dev_printk(KERN_INFO, &socket->dev->dev, |
343 | pci_name(socket->dev), mfunc, devctl); | 343 | "TI: mfunc 0x%08x, devctl 0x%02x\n", mfunc, devctl); |
344 | 344 | ||
345 | /* make sure PCI interrupts are enabled before probing */ | 345 | /* make sure PCI interrupts are enabled before probing */ |
346 | ti_init(socket); | 346 | ti_init(socket); |
@@ -354,8 +354,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket) | |||
354 | * We're here which means PCI interrupts are _not_ delivered. try to | 354 | * We're here which means PCI interrupts are _not_ delivered. try to |
355 | * find the right setting (all serial or parallel) | 355 | * find the right setting (all serial or parallel) |
356 | */ | 356 | */ |
357 | printk(KERN_INFO "Yenta TI: socket %s probing PCI interrupt failed, trying to fix\n", | 357 | dev_printk(KERN_INFO, &socket->dev->dev, |
358 | pci_name(socket->dev)); | 358 | "TI: probing PCI interrupt failed, trying to fix\n"); |
359 | 359 | ||
360 | /* for serial PCI make sure MFUNC3 is set to IRQSER */ | 360 | /* for serial PCI make sure MFUNC3 is set to IRQSER */ |
361 | if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) { | 361 | if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) { |
@@ -379,8 +379,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket) | |||
379 | 379 | ||
380 | pci_irq_status = yenta_probe_cb_irq(socket); | 380 | pci_irq_status = yenta_probe_cb_irq(socket); |
381 | if (pci_irq_status == 1) { | 381 | if (pci_irq_status == 1) { |
382 | printk(KERN_INFO "Yenta TI: socket %s all-serial interrupts ok\n", | 382 | dev_printk(KERN_INFO, &socket->dev->dev, |
383 | pci_name(socket->dev)); | 383 | "TI: all-serial interrupts ok\n"); |
384 | mfunc_old = mfunc; | 384 | mfunc_old = mfunc; |
385 | goto out; | 385 | goto out; |
386 | } | 386 | } |
@@ -395,8 +395,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket) | |||
395 | } | 395 | } |
396 | 396 | ||
397 | /* serial PCI interrupts not working fall back to parallel */ | 397 | /* serial PCI interrupts not working fall back to parallel */ |
398 | printk(KERN_INFO "Yenta TI: socket %s falling back to parallel PCI interrupts\n", | 398 | dev_printk(KERN_INFO, &socket->dev->dev, |
399 | pci_name(socket->dev)); | 399 | "TI: falling back to parallel PCI interrupts\n"); |
400 | devctl &= ~TI113X_DCR_IMODE_MASK; | 400 | devctl &= ~TI113X_DCR_IMODE_MASK; |
401 | devctl |= TI113X_DCR_IMODE_SERIAL; /* serial ISA could be right */ | 401 | devctl |= TI113X_DCR_IMODE_SERIAL; /* serial ISA could be right */ |
402 | config_writeb(socket, TI113X_DEVICE_CONTROL, devctl); | 402 | config_writeb(socket, TI113X_DEVICE_CONTROL, devctl); |
@@ -427,8 +427,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket) | |||
427 | pci_irq_status = yenta_probe_cb_irq(socket); | 427 | pci_irq_status = yenta_probe_cb_irq(socket); |
428 | if (pci_irq_status == 1) { | 428 | if (pci_irq_status == 1) { |
429 | mfunc_old = mfunc; | 429 | mfunc_old = mfunc; |
430 | printk(KERN_INFO "Yenta TI: socket %s parallel PCI interrupts ok\n", | 430 | dev_printk(KERN_INFO, &socket->dev->dev, |
431 | pci_name(socket->dev)); | 431 | "TI: parallel PCI interrupts ok\n"); |
432 | } else { | 432 | } else { |
433 | /* not working, back to old value */ | 433 | /* not working, back to old value */ |
434 | mfunc = mfunc_old; | 434 | mfunc = mfunc_old; |
@@ -440,8 +440,9 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket) | |||
440 | out: | 440 | out: |
441 | if (pci_irq_status < 1) { | 441 | if (pci_irq_status < 1) { |
442 | socket->cb_irq = 0; | 442 | socket->cb_irq = 0; |
443 | printk(KERN_INFO "Yenta TI: socket %s no PCI interrupts. Fish. Please report.\n", | 443 | dev_printk(KERN_INFO, &socket->dev->dev, |
444 | pci_name(socket->dev)); | 444 | "Yenta TI: no PCI interrupts. Fish. " |
445 | "Please report.\n"); | ||
445 | } | 446 | } |
446 | } | 447 | } |
447 | 448 | ||
@@ -513,8 +514,9 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket) | |||
513 | 514 | ||
514 | mfunc = mfunc_old = config_readl(socket, TI122X_MFUNC); | 515 | mfunc = mfunc_old = config_readl(socket, TI122X_MFUNC); |
515 | devctl = config_readb(socket, TI113X_DEVICE_CONTROL); | 516 | devctl = config_readb(socket, TI113X_DEVICE_CONTROL); |
516 | printk(KERN_INFO "Yenta TI: socket %s, mfunc 0x%08x, devctl 0x%02x\n", | 517 | dev_printk(KERN_INFO, &socket->dev->dev, |
517 | pci_name(socket->dev), mfunc, devctl); | 518 | "TI: mfunc 0x%08x, devctl 0x%02x\n", |
519 | mfunc, devctl); | ||
518 | 520 | ||
519 | /* if IRQs are configured as tied, align irq of func1 with func0 */ | 521 | /* if IRQs are configured as tied, align irq of func1 with func0 */ |
520 | sysctl = config_readl(socket, TI113X_SYSTEM_CONTROL); | 522 | sysctl = config_readl(socket, TI113X_SYSTEM_CONTROL); |
@@ -533,9 +535,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket) | |||
533 | * We're here which means PCI interrupts are _not_ delivered. try to | 535 | * We're here which means PCI interrupts are _not_ delivered. try to |
534 | * find the right setting | 536 | * find the right setting |
535 | */ | 537 | */ |
536 | printk(KERN_INFO "Yenta TI: socket %s probing PCI interrupt failed, trying to fix\n", | 538 | dev_printk(KERN_INFO, &socket->dev->dev, |
537 | pci_name(socket->dev)); | 539 | "TI: probing PCI interrupt failed, trying to fix\n"); |
538 | |||
539 | 540 | ||
540 | /* if all serial: set INTRTIE, probe again */ | 541 | /* if all serial: set INTRTIE, probe again */ |
541 | if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) { | 542 | if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) { |
@@ -544,8 +545,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket) | |||
544 | if (ti12xx_tie_interrupts(socket, &old_irq)) { | 545 | if (ti12xx_tie_interrupts(socket, &old_irq)) { |
545 | pci_irq_status = yenta_probe_cb_irq(socket); | 546 | pci_irq_status = yenta_probe_cb_irq(socket); |
546 | if (pci_irq_status == 1) { | 547 | if (pci_irq_status == 1) { |
547 | printk(KERN_INFO "Yenta TI: socket %s all-serial interrupts, tied ok\n", | 548 | dev_printk(KERN_INFO, &socket->dev->dev, |
548 | pci_name(socket->dev)); | 549 | "TI: all-serial interrupts, tied ok\n"); |
549 | goto out; | 550 | goto out; |
550 | } | 551 | } |
551 | 552 | ||
@@ -582,8 +583,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket) | |||
582 | 583 | ||
583 | pci_irq_status = yenta_probe_cb_irq(socket); | 584 | pci_irq_status = yenta_probe_cb_irq(socket); |
584 | if (pci_irq_status == 1) { | 585 | if (pci_irq_status == 1) { |
585 | printk(KERN_INFO "Yenta TI: socket %s parallel PCI interrupts ok\n", | 586 | dev_printk(KERN_INFO, &socket->dev->dev, |
586 | pci_name(socket->dev)); | 587 | "TI: parallel PCI interrupts ok\n"); |
587 | goto out; | 588 | goto out; |
588 | } | 589 | } |
589 | 590 | ||
@@ -593,13 +594,13 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket) | |||
593 | if (pci_irq_status == -1) | 594 | if (pci_irq_status == -1) |
594 | goto out; | 595 | goto out; |
595 | } | 596 | } |
596 | 597 | ||
597 | /* still nothing: set INTRTIE */ | 598 | /* still nothing: set INTRTIE */ |
598 | if (ti12xx_tie_interrupts(socket, &old_irq)) { | 599 | if (ti12xx_tie_interrupts(socket, &old_irq)) { |
599 | pci_irq_status = yenta_probe_cb_irq(socket); | 600 | pci_irq_status = yenta_probe_cb_irq(socket); |
600 | if (pci_irq_status == 1) { | 601 | if (pci_irq_status == 1) { |
601 | printk(KERN_INFO "Yenta TI: socket %s parallel PCI interrupts, tied ok\n", | 602 | dev_printk(KERN_INFO, &socket->dev->dev, |
602 | pci_name(socket->dev)); | 603 | "TI: parallel PCI interrupts, tied ok\n"); |
603 | goto out; | 604 | goto out; |
604 | } | 605 | } |
605 | 606 | ||
@@ -610,8 +611,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket) | |||
610 | out: | 611 | out: |
611 | if (pci_irq_status < 1) { | 612 | if (pci_irq_status < 1) { |
612 | socket->cb_irq = 0; | 613 | socket->cb_irq = 0; |
613 | printk(KERN_INFO "Yenta TI: socket %s no PCI interrupts. Fish. Please report.\n", | 614 | dev_printk(KERN_INFO, &socket->dev->dev, |
614 | pci_name(socket->dev)); | 615 | "TI: no PCI interrupts. Fish. Please report.\n"); |
615 | } | 616 | } |
616 | } | 617 | } |
617 | 618 | ||
@@ -815,11 +816,13 @@ static int ti12xx_override(struct yenta_socket *socket) | |||
815 | /* make sure that memory burst is active */ | 816 | /* make sure that memory burst is active */ |
816 | val_orig = val = config_readl(socket, TI113X_SYSTEM_CONTROL); | 817 | val_orig = val = config_readl(socket, TI113X_SYSTEM_CONTROL); |
817 | if (disable_clkrun && PCI_FUNC(socket->dev->devfn) == 0) { | 818 | if (disable_clkrun && PCI_FUNC(socket->dev->devfn) == 0) { |
818 | printk(KERN_INFO "Yenta: Disabling CLKRUN feature\n"); | 819 | dev_printk(KERN_INFO, &socket->dev->dev, |
820 | "Disabling CLKRUN feature\n"); | ||
819 | val |= TI113X_SCR_KEEPCLK; | 821 | val |= TI113X_SCR_KEEPCLK; |
820 | } | 822 | } |
821 | if (!(val & TI122X_SCR_MRBURSTUP)) { | 823 | if (!(val & TI122X_SCR_MRBURSTUP)) { |
822 | printk(KERN_INFO "Yenta: Enabling burst memory read transactions\n"); | 824 | dev_printk(KERN_INFO, &socket->dev->dev, |
825 | "Enabling burst memory read transactions\n"); | ||
823 | val |= TI122X_SCR_MRBURSTUP; | 826 | val |= TI122X_SCR_MRBURSTUP; |
824 | } | 827 | } |
825 | if (val_orig != val) | 828 | if (val_orig != val) |
@@ -830,10 +833,12 @@ static int ti12xx_override(struct yenta_socket *socket) | |||
830 | * CSC interrupts to PCI rather than INTVAL. | 833 | * CSC interrupts to PCI rather than INTVAL. |
831 | */ | 834 | */ |
832 | val = config_readb(socket, TI1250_DIAGNOSTIC); | 835 | val = config_readb(socket, TI1250_DIAGNOSTIC); |
833 | printk(KERN_INFO "Yenta: Using %s to route CSC interrupts to PCI\n", | 836 | dev_printk(KERN_INFO, &socket->dev->dev, |
834 | (val & TI1250_DIAG_PCI_CSC) ? "CSCINT" : "INTVAL"); | 837 | "Using %s to route CSC interrupts to PCI\n", |
835 | printk(KERN_INFO "Yenta: Routing CardBus interrupts to %s\n", | 838 | (val & TI1250_DIAG_PCI_CSC) ? "CSCINT" : "INTVAL"); |
836 | (val & TI1250_DIAG_PCI_IREQ) ? "PCI" : "ISA"); | 839 | dev_printk(KERN_INFO, &socket->dev->dev, |
840 | "Routing CardBus interrupts to %s\n", | ||
841 | (val & TI1250_DIAG_PCI_IREQ) ? "PCI" : "ISA"); | ||
837 | 842 | ||
838 | /* do irqrouting, depending on function */ | 843 | /* do irqrouting, depending on function */ |
839 | if (PCI_FUNC(socket->dev->devfn) == 0) | 844 | if (PCI_FUNC(socket->dev->devfn) == 0) |
@@ -858,8 +863,9 @@ static int ti1250_override(struct yenta_socket *socket) | |||
858 | diag |= TI1250_DIAG_PCI_CSC | TI1250_DIAG_PCI_IREQ; | 863 | diag |= TI1250_DIAG_PCI_CSC | TI1250_DIAG_PCI_IREQ; |
859 | 864 | ||
860 | if (diag != old) { | 865 | if (diag != old) { |
861 | printk(KERN_INFO "Yenta: adjusting diagnostic: %02x -> %02x\n", | 866 | dev_printk(KERN_INFO, &socket->dev->dev, |
862 | old, diag); | 867 | "adjusting diagnostic: %02x -> %02x\n", |
868 | old, diag); | ||
863 | config_writeb(socket, TI1250_DIAGNOSTIC, diag); | 869 | config_writeb(socket, TI1250_DIAGNOSTIC, diag); |
864 | } | 870 | } |
865 | 871 | ||
@@ -924,7 +930,9 @@ static void ene_tune_bridge(struct pcmcia_socket *sock, struct pci_bus *bus) | |||
924 | /* default to clear TLTEnable bit, old behaviour */ | 930 | /* default to clear TLTEnable bit, old behaviour */ |
925 | test_c9 &= ~ENE_TEST_C9_TLTENABLE; | 931 | test_c9 &= ~ENE_TEST_C9_TLTENABLE; |
926 | 932 | ||
927 | printk(KERN_INFO "yenta EnE: chaning testregister 0xC9, %02x -> %02x\n", old_c9, test_c9); | 933 | dev_printk(KERN_INFO, &socket->dev->dev, |
934 | "EnE: chaning testregister 0xC9, %02x -> %02x\n", | ||
935 | old_c9, test_c9); | ||
928 | config_writeb(socket, ENE_TEST_C9, test_c9); | 936 | config_writeb(socket, ENE_TEST_C9, test_c9); |
929 | } | 937 | } |
930 | 938 | ||