Changeset 56a7540 in rtems


Ignore:
Timestamp:
Jan 23, 2018, 9:12:36 AM (21 months ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
master
Children:
ddc95ab0
Parents:
68a0012
git-author:
Daniel Hellstrom <daniel@…> (01/23/18 09:12:36)
git-committer:
Daniel Hellstrom <daniel@…> (09/20/18 10:48:32)
Message:

leon: substitute printf with printk in driver init

Location:
bsps/sparc/shared
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • bsps/sparc/shared/iommu/griommu.c

    r68a0012 r56a7540  
    1616#include <ambapp.h>
    1717#include <rtems.h>
     18#include <rtems/bspIo.h>
    1819#include <bsp.h>
    1920#include <bsp/griommu.h>
     
    372373        status = griommu_init(priv);
    373374        if (status) {
    374                 printf("Failed to initialize griommu driver %d\n", status);
     375                printk("Failed to initialize griommu driver %d\n", status);
    375376                return -1;
    376377        }
  • bsps/sparc/shared/l2c/l2c.c

    r68a0012 r56a7540  
    476476        status = l2cache_init(priv);
    477477        if (status) {
    478                 printf("Failed to initialize l2cache driver %d\n", status);
     478                printk("Failed to initialize l2cache driver %d\n", status);
    479479                return -1;
    480480        }
  • bsps/sparc/shared/pci/gr_701.c

    r68a0012 r56a7540  
    350350        bar1 = devinfo->resources[1].address;
    351351        bar1_size = devinfo->resources[1].size;
    352         printf("\n\n--- GR-701[%d] ---\n", dev->minor_drv);
    353         printf(" PCI BUS: 0x%x, SLOT: 0x%x, FUNCTION: 0x%x\n",
     352        printk("\n\n--- GR-701[%d] ---\n", dev->minor_drv);
     353        printk(" PCI BUS: 0x%x, SLOT: 0x%x, FUNCTION: 0x%x\n",
    354354                PCI_DEV_EXPAND(priv->pcidev));
    355         printf(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n\n\n",
     355        printk(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n\n\n",
    356356                devinfo->id.vendor, devinfo->id.device);
    357         printf(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
    358         printf(" PCI BAR[1]: 0x%lx - 0x%lx\n", bar1, bar1 + bar1_size - 1);
    359         printf(" IRQ: %d\n\n\n", devinfo->irq);
     357        printk(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
     358        printk(" PCI BAR[1]: 0x%lx - 0x%lx\n", bar1, bar1 + bar1_size - 1);
     359        printk(" IRQ: %d\n\n\n", devinfo->irq);
    360360
    361361        /* all neccessary space assigned to GR-701 target? */
     
    380380                free(priv);
    381381                dev->priv = NULL;
    382                 printf(" Failed to initialize GR-701 HW\n");
     382                printk(" Failed to initialize GR-701 HW\n");
    383383                return DRVMGR_FAIL;
    384384        }
  • bsps/sparc/shared/pci/gr_cpci_gr740.c

    r68a0012 r56a7540  
    486486        priv->devinfo = devinfo = (struct pci_dev_info *)dev->businfo;
    487487        priv->pcidev = devinfo->pcidev;
    488         printf("\n\n--- GR-CPCI-GR740[%d] ---\n", dev->minor_drv);
    489         printf(" PCI BUS: 0x%x, SLOT: 0x%x, FUNCTION: 0x%x\n",
     488        printk("\n\n--- GR-CPCI-GR740[%d] ---\n", dev->minor_drv);
     489        printk(" PCI BUS: 0x%x, SLOT: 0x%x, FUNCTION: 0x%x\n",
    490490                PCI_DEV_EXPAND(priv->pcidev));
    491         printf(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
     491        printk(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
    492492                devinfo->id.vendor, devinfo->id.device);
    493493        for (i = 0; i < 3; i++) {
    494                 printf(" PCI BAR[%d]: 0x%08lx - 0x%08lx\n",
     494                printk(" PCI BAR[%d]: 0x%08lx - 0x%08lx\n",
    495495                        i, devinfo->resources[i].address,
    496496                        devinfo->resources[i].address +
     
    500500                        return DRVMGR_ENORES;
    501501        }
    502         printf(" IRQ: %d\n\n\n", devinfo->irq);
     502        printk(" IRQ: %d\n\n\n", devinfo->irq);
    503503
    504504        /* Initialize spin-lock for this PCI perihperal device. This is to
     
    546546        if ((status = gr_cpci_gr740_hw_init1(priv)) != 0) {
    547547                genirq_destroy(priv->genirq);
    548                 printf(" Failed to initialize GR-CPCI-GR740 HW: %d\n", status);
     548                printk(" Failed to initialize GR-CPCI-GR740 HW: %d\n", status);
    549549                return DRVMGR_FAIL;
    550550        }
  • bsps/sparc/shared/pci/gr_leon4_n2x.c

    r68a0012 r56a7540  
    509509        priv->devinfo = devinfo = (struct pci_dev_info *)dev->businfo;
    510510        priv->pcidev = devinfo->pcidev;
    511         printf("\n\n--- GR-CPCI-LEON4-N2X[%d] ---\n", dev->minor_drv);
    512         printf(" PCI BUS: 0x%x, SLOT: 0x%x, FUNCTION: 0x%x\n",
     511        printk("\n\n--- GR-CPCI-LEON4-N2X[%d] ---\n", dev->minor_drv);
     512        printk(" PCI BUS: 0x%x, SLOT: 0x%x, FUNCTION: 0x%x\n",
    513513                PCI_DEV_EXPAND(priv->pcidev));
    514         printf(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
     514        printk(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
    515515                devinfo->id.vendor, devinfo->id.device);
    516516        for (i = 0; i < 3; i++) {
    517                 printf(" PCI BAR[%d]: 0x%08lx - 0x%08lx\n",
     517                printk(" PCI BAR[%d]: 0x%08lx - 0x%08lx\n",
    518518                        i, devinfo->resources[i].address,
    519519                        devinfo->resources[i].address +
     
    523523                        return DRVMGR_ENORES;
    524524        }
    525         printf(" IRQ: %d\n\n\n", devinfo->irq);
     525        printk(" IRQ: %d\n\n\n", devinfo->irq);
    526526
    527527        /* Initialize spin-lock for this PCI perihperal device. This is to
     
    569569        if ((status = gr_cpci_leon4_n2x_hw_init1(priv)) != 0) {
    570570                genirq_destroy(priv->genirq);
    571                 printf(" Failed to initialize GR-CPCI-LEON4-N2X HW: %d\n", status);
     571                printk(" Failed to initialize GR-CPCI-LEON4-N2X HW: %d\n", status);
    572572                return DRVMGR_FAIL;
    573573        }
  • bsps/sparc/shared/pci/gr_rasta_adcdac.c

    r68a0012 r56a7540  
    415415        bar1 = devinfo->resources[1].address;
    416416        bar1_size = devinfo->resources[1].size;
    417         printf("\n\n--- GR-RASTA-ADCDAC[%d] ---\n", dev->minor_drv);
    418         printf(" PCI BUS: 0x%x, SLOT: 0x%x, FUNCTION: 0x%x\n",
     417        printk("\n\n--- GR-RASTA-ADCDAC[%d] ---\n", dev->minor_drv);
     418        printk(" PCI BUS: 0x%x, SLOT: 0x%x, FUNCTION: 0x%x\n",
    419419                PCI_DEV_EXPAND(priv->pcidev));
    420         printf(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
     420        printk(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
    421421                devinfo->id.vendor, devinfo->id.device);
    422         printf(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
    423         printf(" PCI BAR[1]: 0x%lx - 0x%lx\n", bar1, bar1 + bar1_size - 1);
    424         printf(" IRQ: %d\n\n\n", devinfo->irq);
     422        printk(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
     423        printk(" PCI BAR[1]: 0x%lx - 0x%lx\n", bar1, bar1 + bar1_size - 1);
     424        printk(" IRQ: %d\n\n\n", devinfo->irq);
    425425
    426426        /* all neccessary space assigned to GR-RASTA-ADCDAC target? */
     
    458458                free(priv);
    459459                dev->priv = NULL;
    460                 printf(" Failed to initialize GR-RASTA-ADCDAC HW: %d\n", status);
     460                printk(" Failed to initialize GR-RASTA-ADCDAC HW: %d\n", status);
    461461                return DRVMGR_FAIL;
    462462        }
  • bsps/sparc/shared/pci/gr_rasta_io.c

    r68a0012 r56a7540  
    594594        bar1 = devinfo->resources[1].address;
    595595        bar1_size = devinfo->resources[1].size;
    596         printf("\n\n--- GR-RASTA-IO[%d] ---\n", dev->minor_drv);
    597         printf(" PCI BUS: 0x%x, SLOT: 0x%x, FUNCTION: 0x%x\n",
     596        printk("\n\n--- GR-RASTA-IO[%d] ---\n", dev->minor_drv);
     597        printk(" PCI BUS: 0x%x, SLOT: 0x%x, FUNCTION: 0x%x\n",
    598598                PCI_DEV_EXPAND(priv->pcidev));
    599         printf(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
     599        printk(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
    600600                devinfo->id.vendor, devinfo->id.device);
    601         printf(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
    602         printf(" PCI BAR[1]: 0x%lx - 0x%lx\n", bar1, bar1 + bar1_size - 1);
    603         printf(" IRQ: %d\n\n\n", devinfo->irq);
     601        printk(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
     602        printk(" PCI BAR[1]: 0x%lx - 0x%lx\n", bar1, bar1 + bar1_size - 1);
     603        printk(" IRQ: %d\n\n\n", devinfo->irq);
    604604
    605605        /* all neccessary space assigned to GR-RASTA-IO target? */
     
    655655                free(priv);
    656656                dev->priv = NULL;
    657                 printf(" Failed to initialize GR-RASTA-IO HW: %d\n", status);
     657                printk(" Failed to initialize GR-RASTA-IO HW: %d\n", status);
    658658                return DRVMGR_FAIL;
    659659        }
  • bsps/sparc/shared/pci/gr_rasta_spw_router.c

    r68a0012 r56a7540  
    378378        ctrl = priv->grpci2->ctrl;
    379379        ctrl = (ctrl & 0xFFFFFF0F) | (1 << 4);
    380         printf("data: 0x%x\n", ctrl);
    381380        priv->grpci2->ctrl = ctrl;
    382381
     
    428427        bar0 = devinfo->resources[0].address;
    429428        bar0_size = devinfo->resources[0].size;
    430         printf("\n\n--- GR-RASTA-SPW-ROUTER[%d] ---\n", dev->minor_drv);
    431         printf(" PCI BUS: 0x%x, SLOT: 0x%x, FUNCTION: 0x%x\n",
     429        printk("\n\n--- GR-RASTA-SPW-ROUTER[%d] ---\n", dev->minor_drv);
     430        printk(" PCI BUS: 0x%x, SLOT: 0x%x, FUNCTION: 0x%x\n",
    432431                PCI_DEV_EXPAND(priv->pcidev));
    433         printf(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
     432        printk(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
    434433                devinfo->id.vendor, devinfo->id.device);
    435         printf(" PCI BAR[0]: 0x%08lx - 0x%08lx\n", bar0, bar0 + bar0_size - 1);
    436         printf(" IRQ: %d\n\n\n", devinfo->irq);
     434        printk(" PCI BAR[0]: 0x%08lx - 0x%08lx\n", bar0, bar0 + bar0_size - 1);
     435        printk(" IRQ: %d\n\n\n", devinfo->irq);
    437436
    438437        /* all neccessary space assigned to GR-RASTA-SPW-ROUTER target? */
     
    465464        if ((status = gr_rasta_spw_router_hw_init(priv)) != 0) {
    466465                genirq_destroy(priv->genirq);
    467                 printf(" Failed to initialize GR-RASTA-SPW-ROUTER HW: %d\n", status);
     466                printk(" Failed to initialize GR-RASTA-SPW-ROUTER HW: %d\n", status);
    468467                return DRVMGR_FAIL;
    469468        }
  • bsps/sparc/shared/pci/gr_rasta_tmtc.c

    r68a0012 r56a7540  
    606606        bar1 = devinfo->resources[1].address;
    607607        bar1_size = devinfo->resources[1].size;
    608         printf("\n\n--- GR-RASTA-TMTC[%d] ---\n", dev->minor_drv);
    609         printf(" PCI BUS: 0x%x, SLOT: 0x%x, FUNCTION: 0x%x\n",
     608        printk("\n\n--- GR-RASTA-TMTC[%d] ---\n", dev->minor_drv);
     609        printk(" PCI BUS: 0x%x, SLOT: 0x%x, FUNCTION: 0x%x\n",
    610610                PCI_DEV_EXPAND(priv->pcidev));
    611         printf(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
     611        printk(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
    612612                devinfo->id.vendor, devinfo->id.device);
    613         printf(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
    614         printf(" PCI BAR[1]: 0x%lx - 0x%lx\n", bar1, bar1 + bar1_size - 1);
    615         printf(" IRQ: %d\n\n\n", devinfo->irq);
     613        printk(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
     614        printk(" PCI BAR[1]: 0x%lx - 0x%lx\n", bar1, bar1 + bar1_size - 1);
     615        printk(" IRQ: %d\n\n\n", devinfo->irq);
    616616
    617617        /* all neccessary space assigned to GR-RASTA-IO target? */
     
    658658        if ( status != 0 ) {
    659659                genirq_destroy(priv->genirq);
    660                 printf(" Failed to initialize GR-RASTA-TMTC HW: %d\n", status);
     660                printk(" Failed to initialize GR-RASTA-TMTC HW: %d\n", status);
    661661                return DRVMGR_FAIL;
    662662        }
  • bsps/sparc/shared/pci/gr_tmtc_1553.c

    r68a0012 r56a7540  
    332332        bar0 = devinfo->resources[0].address;
    333333        bar0_size = devinfo->resources[0].size;
    334         printf("\n\n--- GR-TMTC-1553[%d] ---\n", dev->minor_drv);
    335         printf(" PCI BUS: 0x%x, SLOT: 0x%x, FUNCTION: 0x%x\n",
     334        printk("\n\n--- GR-TMTC-1553[%d] ---\n", dev->minor_drv);
     335        printk(" PCI BUS: 0x%x, SLOT: 0x%x, FUNCTION: 0x%x\n",
    336336                PCI_DEV_EXPAND(priv->pcidev));
    337         printf(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
     337        printk(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
    338338                devinfo->id.vendor, devinfo->id.device);
    339         printf(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
    340         printf(" IRQ: %d\n\n\n", devinfo->irq);
     339        printk(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
     340        printk(" IRQ: %d\n\n\n", devinfo->irq);
    341341
    342342        /* all neccessary space assigned to GR-TMTC-1553 target? */
     
    362362                free(priv);
    363363                dev->priv = NULL;
    364                 printf(" Failed to initialize GR-TMTC-1553 HW: %d\n", status);
     364                printk(" Failed to initialize GR-TMTC-1553 HW: %d\n", status);
    365365                return DRVMGR_FAIL;
    366366        }
  • bsps/sparc/shared/pci/grpci.c

    r68a0012 r56a7540  
    628628        status = grpci_init(priv);
    629629        if (status) {
    630                 printf("Failed to initialize grpci driver %d\n", status);
     630                printk("Failed to initialize grpci driver %d\n", status);
    631631                return DRVMGR_FAIL;
    632632        }
  • bsps/sparc/shared/pci/grpci2.c

    r68a0012 r56a7540  
    906906        status = grpci2_init(priv);
    907907        if (status) {
    908                 printf("Failed to initialize grpci2 driver %d\n", status);
     908                printk("Failed to initialize grpci2 driver %d\n", status);
    909909                return -1;
    910910        }
  • bsps/sparc/shared/pci/pcif.c

    r68a0012 r56a7540  
    510510
    511511        if ( pcif_minor != 0 ) {
    512                 printf("Driver only supports one PCI core\n");
     512                printk("Driver only supports one PCI core\n");
    513513                return DRVMGR_FAIL;
    514514        }
     
    524524        pcifpriv = priv;
    525525        if ( pcif_init(priv) ) {
    526                 printf("Failed to initialize PCIF driver\n");
     526                printk("Failed to initialize PCIF driver\n");
    527527                free(priv);
    528528                dev->priv = NULL;
  • bsps/sparc/shared/spi/spictrl.c

    r68a0012 r56a7540  
    720720        ret = spictrl_read_write(priv, bytes, NULL, nbytes);
    721721        if ( ret < 0 ) {
    722                 printf("SPICTRL: Error Reading\n");
     722                printk("SPICTRL: Error Reading\n");
    723723        }
    724724#ifdef DEBUG
Note: See TracChangeset for help on using the changeset viewer.