summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/ti113x.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-10-10 12:12:47 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2015-05-30 10:09:04 -0400
commitf2e6cf76751d479874216f989f6bef6da6e80119 (patch)
treea9dbcf36f41db4c065f07381abae177a9d348815 /drivers/pcmcia/ti113x.h
parent3ce3c1c4fefa48f429a4379f729e44a9e6ba657a (diff)
pcmcia: Convert dev_printk to dev_<level>
Reduce object size a little by using dev_<level> calls instead of dev_printk(KERN_<LEVEL>. Other miscellanea: o Coalesce formats o Realign arguments o Use pr_cont instead of naked printk reorder test to use "%s\n" Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/ti113x.h')
-rw-r--r--drivers/pcmcia/ti113x.h78
1 files changed, 36 insertions, 42 deletions
diff --git a/drivers/pcmcia/ti113x.h b/drivers/pcmcia/ti113x.h
index a71789486cdf..5cb670e037a0 100644
--- a/drivers/pcmcia/ti113x.h
+++ b/drivers/pcmcia/ti113x.h
@@ -372,8 +372,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)
372 372
373 mfunc = mfunc_old = config_readl(socket, TI122X_MFUNC); 373 mfunc = mfunc_old = config_readl(socket, TI122X_MFUNC);
374 devctl = config_readb(socket, TI113X_DEVICE_CONTROL); 374 devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
375 dev_printk(KERN_INFO, &socket->dev->dev, 375 dev_info(&socket->dev->dev, "TI: mfunc 0x%08x, devctl 0x%02x\n",
376 "TI: mfunc 0x%08x, devctl 0x%02x\n", mfunc, devctl); 376 mfunc, devctl);
377 377
378 /* make sure PCI interrupts are enabled before probing */ 378 /* make sure PCI interrupts are enabled before probing */
379 ti_init(socket); 379 ti_init(socket);
@@ -387,8 +387,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)
387 * We're here which means PCI interrupts are _not_ delivered. try to 387 * We're here which means PCI interrupts are _not_ delivered. try to
388 * find the right setting (all serial or parallel) 388 * find the right setting (all serial or parallel)
389 */ 389 */
390 dev_printk(KERN_INFO, &socket->dev->dev, 390 dev_info(&socket->dev->dev,
391 "TI: probing PCI interrupt failed, trying to fix\n"); 391 "TI: probing PCI interrupt failed, trying to fix\n");
392 392
393 /* for serial PCI make sure MFUNC3 is set to IRQSER */ 393 /* for serial PCI make sure MFUNC3 is set to IRQSER */
394 if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) { 394 if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) {
@@ -412,8 +412,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)
412 412
413 pci_irq_status = yenta_probe_cb_irq(socket); 413 pci_irq_status = yenta_probe_cb_irq(socket);
414 if (pci_irq_status == 1) { 414 if (pci_irq_status == 1) {
415 dev_printk(KERN_INFO, &socket->dev->dev, 415 dev_info(&socket->dev->dev,
416 "TI: all-serial interrupts ok\n"); 416 "TI: all-serial interrupts ok\n");
417 mfunc_old = mfunc; 417 mfunc_old = mfunc;
418 goto out; 418 goto out;
419 } 419 }
@@ -428,8 +428,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)
428 } 428 }
429 429
430 /* serial PCI interrupts not working fall back to parallel */ 430 /* serial PCI interrupts not working fall back to parallel */
431 dev_printk(KERN_INFO, &socket->dev->dev, 431 dev_info(&socket->dev->dev,
432 "TI: falling back to parallel PCI interrupts\n"); 432 "TI: falling back to parallel PCI interrupts\n");
433 devctl &= ~TI113X_DCR_IMODE_MASK; 433 devctl &= ~TI113X_DCR_IMODE_MASK;
434 devctl |= TI113X_DCR_IMODE_SERIAL; /* serial ISA could be right */ 434 devctl |= TI113X_DCR_IMODE_SERIAL; /* serial ISA could be right */
435 config_writeb(socket, TI113X_DEVICE_CONTROL, devctl); 435 config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
@@ -460,8 +460,7 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)
460 pci_irq_status = yenta_probe_cb_irq(socket); 460 pci_irq_status = yenta_probe_cb_irq(socket);
461 if (pci_irq_status == 1) { 461 if (pci_irq_status == 1) {
462 mfunc_old = mfunc; 462 mfunc_old = mfunc;
463 dev_printk(KERN_INFO, &socket->dev->dev, 463 dev_info(&socket->dev->dev, "TI: parallel PCI interrupts ok\n");
464 "TI: parallel PCI interrupts ok\n");
465 } else { 464 } else {
466 /* not working, back to old value */ 465 /* not working, back to old value */
467 mfunc = mfunc_old; 466 mfunc = mfunc_old;
@@ -473,9 +472,8 @@ static void ti12xx_irqroute_func0(struct yenta_socket *socket)
473out: 472out:
474 if (pci_irq_status < 1) { 473 if (pci_irq_status < 1) {
475 socket->cb_irq = 0; 474 socket->cb_irq = 0;
476 dev_printk(KERN_INFO, &socket->dev->dev, 475 dev_info(&socket->dev->dev,
477 "Yenta TI: no PCI interrupts. Fish. " 476 "Yenta TI: no PCI interrupts. Fish. Please report.\n");
478 "Please report.\n");
479 } 477 }
480} 478}
481 479
@@ -547,9 +545,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)
547 545
548 mfunc = mfunc_old = config_readl(socket, TI122X_MFUNC); 546 mfunc = mfunc_old = config_readl(socket, TI122X_MFUNC);
549 devctl = config_readb(socket, TI113X_DEVICE_CONTROL); 547 devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
550 dev_printk(KERN_INFO, &socket->dev->dev, 548 dev_info(&socket->dev->dev, "TI: mfunc 0x%08x, devctl 0x%02x\n",
551 "TI: mfunc 0x%08x, devctl 0x%02x\n", 549 mfunc, devctl);
552 mfunc, devctl);
553 550
554 /* if IRQs are configured as tied, align irq of func1 with func0 */ 551 /* if IRQs are configured as tied, align irq of func1 with func0 */
555 sysctl = config_readl(socket, TI113X_SYSTEM_CONTROL); 552 sysctl = config_readl(socket, TI113X_SYSTEM_CONTROL);
@@ -568,8 +565,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)
568 * We're here which means PCI interrupts are _not_ delivered. try to 565 * We're here which means PCI interrupts are _not_ delivered. try to
569 * find the right setting 566 * find the right setting
570 */ 567 */
571 dev_printk(KERN_INFO, &socket->dev->dev, 568 dev_info(&socket->dev->dev,
572 "TI: probing PCI interrupt failed, trying to fix\n"); 569 "TI: probing PCI interrupt failed, trying to fix\n");
573 570
574 /* if all serial: set INTRTIE, probe again */ 571 /* if all serial: set INTRTIE, probe again */
575 if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) { 572 if ((devctl & TI113X_DCR_IMODE_MASK) == TI12XX_DCR_IMODE_ALL_SERIAL) {
@@ -578,8 +575,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)
578 if (ti12xx_tie_interrupts(socket, &old_irq)) { 575 if (ti12xx_tie_interrupts(socket, &old_irq)) {
579 pci_irq_status = yenta_probe_cb_irq(socket); 576 pci_irq_status = yenta_probe_cb_irq(socket);
580 if (pci_irq_status == 1) { 577 if (pci_irq_status == 1) {
581 dev_printk(KERN_INFO, &socket->dev->dev, 578 dev_info(&socket->dev->dev,
582 "TI: all-serial interrupts, tied ok\n"); 579 "TI: all-serial interrupts, tied ok\n");
583 goto out; 580 goto out;
584 } 581 }
585 582
@@ -616,8 +613,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)
616 613
617 pci_irq_status = yenta_probe_cb_irq(socket); 614 pci_irq_status = yenta_probe_cb_irq(socket);
618 if (pci_irq_status == 1) { 615 if (pci_irq_status == 1) {
619 dev_printk(KERN_INFO, &socket->dev->dev, 616 dev_info(&socket->dev->dev,
620 "TI: parallel PCI interrupts ok\n"); 617 "TI: parallel PCI interrupts ok\n");
621 goto out; 618 goto out;
622 } 619 }
623 620
@@ -632,8 +629,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)
632 if (ti12xx_tie_interrupts(socket, &old_irq)) { 629 if (ti12xx_tie_interrupts(socket, &old_irq)) {
633 pci_irq_status = yenta_probe_cb_irq(socket); 630 pci_irq_status = yenta_probe_cb_irq(socket);
634 if (pci_irq_status == 1) { 631 if (pci_irq_status == 1) {
635 dev_printk(KERN_INFO, &socket->dev->dev, 632 dev_info(&socket->dev->dev,
636 "TI: parallel PCI interrupts, tied ok\n"); 633 "TI: parallel PCI interrupts, tied ok\n");
637 goto out; 634 goto out;
638 } 635 }
639 636
@@ -644,8 +641,8 @@ static void ti12xx_irqroute_func1(struct yenta_socket *socket)
644out: 641out:
645 if (pci_irq_status < 1) { 642 if (pci_irq_status < 1) {
646 socket->cb_irq = 0; 643 socket->cb_irq = 0;
647 dev_printk(KERN_INFO, &socket->dev->dev, 644 dev_info(&socket->dev->dev,
648 "TI: no PCI interrupts. Fish. Please report.\n"); 645 "TI: no PCI interrupts. Fish. Please report.\n");
649 } 646 }
650} 647}
651 648
@@ -849,13 +846,12 @@ static int ti12xx_override(struct yenta_socket *socket)
849 /* make sure that memory burst is active */ 846 /* make sure that memory burst is active */
850 val_orig = val = config_readl(socket, TI113X_SYSTEM_CONTROL); 847 val_orig = val = config_readl(socket, TI113X_SYSTEM_CONTROL);
851 if (disable_clkrun && PCI_FUNC(socket->dev->devfn) == 0) { 848 if (disable_clkrun && PCI_FUNC(socket->dev->devfn) == 0) {
852 dev_printk(KERN_INFO, &socket->dev->dev, 849 dev_info(&socket->dev->dev, "Disabling CLKRUN feature\n");
853 "Disabling CLKRUN feature\n");
854 val |= TI113X_SCR_KEEPCLK; 850 val |= TI113X_SCR_KEEPCLK;
855 } 851 }
856 if (!(val & TI122X_SCR_MRBURSTUP)) { 852 if (!(val & TI122X_SCR_MRBURSTUP)) {
857 dev_printk(KERN_INFO, &socket->dev->dev, 853 dev_info(&socket->dev->dev,
858 "Enabling burst memory read transactions\n"); 854 "Enabling burst memory read transactions\n");
859 val |= TI122X_SCR_MRBURSTUP; 855 val |= TI122X_SCR_MRBURSTUP;
860 } 856 }
861 if (val_orig != val) 857 if (val_orig != val)
@@ -866,12 +862,10 @@ static int ti12xx_override(struct yenta_socket *socket)
866 * CSC interrupts to PCI rather than INTVAL. 862 * CSC interrupts to PCI rather than INTVAL.
867 */ 863 */
868 val = config_readb(socket, TI1250_DIAGNOSTIC); 864 val = config_readb(socket, TI1250_DIAGNOSTIC);
869 dev_printk(KERN_INFO, &socket->dev->dev, 865 dev_info(&socket->dev->dev, "Using %s to route CSC interrupts to PCI\n",
870 "Using %s to route CSC interrupts to PCI\n", 866 (val & TI1250_DIAG_PCI_CSC) ? "CSCINT" : "INTVAL");
871 (val & TI1250_DIAG_PCI_CSC) ? "CSCINT" : "INTVAL"); 867 dev_info(&socket->dev->dev, "Routing CardBus interrupts to %s\n",
872 dev_printk(KERN_INFO, &socket->dev->dev, 868 (val & TI1250_DIAG_PCI_IREQ) ? "PCI" : "ISA");
873 "Routing CardBus interrupts to %s\n",
874 (val & TI1250_DIAG_PCI_IREQ) ? "PCI" : "ISA");
875 869
876 /* do irqrouting, depending on function */ 870 /* do irqrouting, depending on function */
877 if (PCI_FUNC(socket->dev->devfn) == 0) 871 if (PCI_FUNC(socket->dev->devfn) == 0)
@@ -896,9 +890,9 @@ static int ti1250_override(struct yenta_socket *socket)
896 diag |= TI1250_DIAG_PCI_CSC | TI1250_DIAG_PCI_IREQ; 890 diag |= TI1250_DIAG_PCI_CSC | TI1250_DIAG_PCI_IREQ;
897 891
898 if (diag != old) { 892 if (diag != old) {
899 dev_printk(KERN_INFO, &socket->dev->dev, 893 dev_info(&socket->dev->dev,
900 "adjusting diagnostic: %02x -> %02x\n", 894 "adjusting diagnostic: %02x -> %02x\n",
901 old, diag); 895 old, diag);
902 config_writeb(socket, TI1250_DIAGNOSTIC, diag); 896 config_writeb(socket, TI1250_DIAGNOSTIC, diag);
903 } 897 }
904 898
@@ -963,9 +957,9 @@ static void ene_tune_bridge(struct pcmcia_socket *sock, struct pci_bus *bus)
963 /* default to clear TLTEnable bit, old behaviour */ 957 /* default to clear TLTEnable bit, old behaviour */
964 test_c9 &= ~ENE_TEST_C9_TLTENABLE; 958 test_c9 &= ~ENE_TEST_C9_TLTENABLE;
965 959
966 dev_printk(KERN_INFO, &socket->dev->dev, 960 dev_info(&socket->dev->dev,
967 "EnE: chaning testregister 0xC9, %02x -> %02x\n", 961 "EnE: changing testregister 0xC9, %02x -> %02x\n",
968 old_c9, test_c9); 962 old_c9, test_c9);
969 config_writeb(socket, ENE_TEST_C9, test_c9); 963 config_writeb(socket, ENE_TEST_C9, test_c9);
970} 964}
971 965