diff options
-rw-r--r-- | core/pci.c | 13 | ||||
-rw-r--r-- | hw/phb3.c | 36 |
2 files changed, 25 insertions, 24 deletions
@@ -1368,7 +1368,7 @@ void pci_reset(void) { unsigned int i; - printf("PCI: Clearing all devices...\n"); + prlog(PR_NOTICE, "PCI: Clearing all devices...\n"); lock(&pci_lock); @@ -1431,24 +1431,23 @@ void pci_init_slots(void) lock(&pci_lock); - printf("PCI: Resetting PHBs...\n"); + prlog(PR_NOTICE, "PCI: Resetting PHBs...\n"); pci_do_jobs(pci_reset_phb); - printf("PCI: Probing slots...\n"); + prlog(PR_NOTICE, "PCI: Probing slots...\n"); pci_do_jobs(pci_scan_phb); if (platform.pci_probe_complete) platform.pci_probe_complete(); - printf("------------------------------------------------------------\n"); - printf("PCI Summary\n"); - printf("------------------------------------------------------------\n"); + prlog(PR_DEBUG, "PCI Summary:\n"); + for (i = 0; i < ARRAY_SIZE(phbs); i++) { if (!phbs[i]) continue; pci_add_nodes(phbs[i]); } - printf("------------------------------------------------------------\n"); + unlock(&pci_lock); } @@ -581,7 +581,8 @@ static int64_t phb3_ioda_reset(struct phb *phb, bool purge) uint32_t i; if (purge) { - printf("PHB%d: Purging all IODA tables...\n", p->phb.opal_id); + prlog(PR_DEBUG, "PHB%d: Purging all IODA tables...\n", + p->phb.opal_id); phb3_init_ioda_cache(p); } @@ -4208,14 +4209,15 @@ static void phb3_probe_pbcq(struct dt_node *pbcq) gcid = dt_get_chip_id(pbcq); pno = dt_prop_get_u32(pbcq, "ibm,phb-index"); path = dt_get_path(pbcq); - printf("Chip %d Found PBCQ%d at %s\n", gcid, pno, path); + prlog(PR_NOTICE, "Chip %d Found PBCQ%d at %s\n", gcid, pno, path); free(path); pe_xscom = dt_get_address(pbcq, 0, NULL); pci_xscom = dt_get_address(pbcq, 1, NULL); spci_xscom = dt_get_address(pbcq, 2, NULL); - printf("PHB3[%d:%d]: X[PE]=0x%08x X[PCI]=0x%08x X[SPCI]=0x%08x\n", - gcid, pno, pe_xscom, pci_xscom, spci_xscom); + prlog(PR_DEBUG, "PHB3[%d:%d]: X[PE]=0x%08x X[PCI]=0x%08x" + " X[SPCI]=0x%08x\n", + gcid, pno, pe_xscom, pci_xscom, spci_xscom); /* Check if CAPP mode */ if (xscom_read(gcid, spci_xscom + 0x03, &val)) { @@ -4232,7 +4234,7 @@ static void phb3_probe_pbcq(struct dt_node *pbcq) /* Get PE BARs, assume only 0 and 2 are used for now */ xscom_read(gcid, pe_xscom + 0x42, &phb_bar); phb_bar >>= 14; - printf("PHB3[%d:%d] REGS = 0x%016llx [4k]\n", + prlog(PR_DEBUG, "PHB3[%d:%d] REGS = 0x%016llx [4k]\n", gcid, pno, phb_bar); if (phb_bar == 0) { prerror("PHB3[%d:%d]: No PHB BAR set !\n", gcid, pno); @@ -4243,7 +4245,7 @@ static void phb3_probe_pbcq(struct dt_node *pbcq) xscom_read(gcid, spci_xscom + 1, &val);/* HW275117 */ xscom_read(gcid, pci_xscom + 0x0b, &val); val >>= 14; - printf("PHB3[%d:%d] PCIBAR = 0x%016llx\n", gcid, pno, val); + prlog(PR_DEBUG, "PHB3[%d:%d] PCIBAR = 0x%016llx\n", gcid, pno, val); if (phb_bar != val) { prerror("PHB3[%d:%d] PCIBAR invalid, fixing up...\n", gcid, pno); @@ -4257,14 +4259,14 @@ static void phb3_probe_pbcq(struct dt_node *pbcq) mmio0_bmask &= 0xffffffffc0000000ull; mmio0_sz = ((~mmio0_bmask) >> 14) + 1; mmio0_bar >>= 14; - printf("PHB3[%d:%d] MMIO0 = 0x%016llx [0x%016llx]\n", + prlog(PR_DEBUG, "PHB3[%d:%d] MMIO0 = 0x%016llx [0x%016llx]\n", gcid, pno, mmio0_bar, mmio0_sz); xscom_read(gcid, pe_xscom + 0x41, &mmio1_bar); xscom_read(gcid, pe_xscom + 0x44, &mmio1_bmask); mmio1_bmask &= 0xffffffffc0000000ull; mmio1_sz = ((~mmio1_bmask) >> 14) + 1; mmio1_bar >>= 14; - printf("PHB3[%d:%d] MMIO1 = 0x%016llx [0x%016llx]\n", + prlog(PR_DEBUG, "PHB3[%d:%d] MMIO1 = 0x%016llx [0x%016llx]\n", gcid, pno, mmio1_bar, mmio1_sz); /* Check BAR enable @@ -4273,7 +4275,7 @@ static void phb3_probe_pbcq(struct dt_node *pbcq) * that BARs are valid if they value is non-0 */ xscom_read(gcid, pe_xscom + 0x45, &bar_en); - printf("PHB3[%d:%d] BAREN = 0x%016llx\n", + prlog(PR_DEBUG, "PHB3[%d:%d] BAREN = 0x%016llx\n", gcid, pno, bar_en); /* Always enable PHB BAR */ @@ -4314,17 +4316,17 @@ static void phb3_probe_pbcq(struct dt_node *pbcq) bar_en |= 0x1800000000000000ul; xscom_write(gcid, pe_xscom + 0x45, bar_en); - printf("PHB3[%d:%d] NEWBAREN = 0x%016llx\n", - gcid, pno, bar_en); + prlog(PR_DEBUG, "PHB3[%d:%d] NEWBAREN = 0x%016llx\n", + gcid, pno, bar_en); xscom_read(gcid, pe_xscom + 0x1a, &val); - printf("PHB3[%d:%d] IRSNC = 0x%016llx\n", - gcid, pno, val); + prlog(PR_DEBUG, "PHB3[%d:%d] IRSNC = 0x%016llx\n", + gcid, pno, val); xscom_read(gcid, pe_xscom + 0x1b, &val); - printf("PHB3[%d:%d] IRSNM = 0x%016llx\n", - gcid, pno, val); - printf("PHB3[%d:%d] LSI = 0x%016llx\n", - gcid, pno, val); + prlog(PR_DEBUG, "PHB3[%d:%d] IRSNM = 0x%016llx\n", + gcid, pno, val); + prlog(PR_DEBUG, "PHB3[%d:%d] LSI = 0x%016llx\n", + gcid, pno, val); /* Create PHB node */ reg[0] = phb_bar; |