Lines Matching +full:4 +full:- +full:temp
1 // SPDX-License-Identifier: GPL-2.0
69 hose->io_space = alloc_resource(); in wildfire_init_hose()
70 hose->mem_space = alloc_resource(); in wildfire_init_hose()
73 hose->sparse_mem_base = 0; in wildfire_init_hose()
74 hose->sparse_io_base = 0; in wildfire_init_hose()
75 hose->dense_mem_base = WILDFIRE_MEM(qbbno, hoseno); in wildfire_init_hose()
76 hose->dense_io_base = WILDFIRE_IO(qbbno, hoseno); in wildfire_init_hose()
78 hose->config_space_base = WILDFIRE_CONF(qbbno, hoseno); in wildfire_init_hose()
79 hose->index = (qbbno << 3) + hoseno; in wildfire_init_hose()
81 hose->io_space->start = WILDFIRE_IO(qbbno, hoseno) - WILDFIRE_IO_BIAS; in wildfire_init_hose()
82 hose->io_space->end = hose->io_space->start + WILDFIRE_IO_SPACE - 1; in wildfire_init_hose()
83 hose->io_space->name = pci_io_names[hoseno]; in wildfire_init_hose()
84 hose->io_space->flags = IORESOURCE_IO; in wildfire_init_hose()
86 hose->mem_space->start = WILDFIRE_MEM(qbbno, hoseno)-WILDFIRE_MEM_BIAS; in wildfire_init_hose()
87 hose->mem_space->end = hose->mem_space->start + 0xffffffff; in wildfire_init_hose()
88 hose->mem_space->name = pci_mem_names[hoseno]; in wildfire_init_hose()
89 hose->mem_space->flags = IORESOURCE_MEM; in wildfire_init_hose()
91 if (request_resource(&ioport_resource, hose->io_space) < 0) in wildfire_init_hose()
94 if (request_resource(&iomem_resource, hose->mem_space) < 0) in wildfire_init_hose()
105 * Note: Window 3 is scatter-gather only in wildfire_init_hose()
107 * Window 0 is scatter-gather 8MB at 8MB (for isa) in wildfire_init_hose()
110 * Window 3 is scatter-gather 128MB at 3GB in wildfire_init_hose()
114 hose->sg_isa = iommu_arena_new(hose, 0x00800000, 0x00800000, in wildfire_init_hose()
116 hose->sg_pci = iommu_arena_new(hose, 0xc0000000, 0x08000000, in wildfire_init_hose()
121 pci->pci_window[0].wbase.csr = hose->sg_isa->dma_base | 3; in wildfire_init_hose()
122 pci->pci_window[0].wmask.csr = (hose->sg_isa->size - 1) & 0xfff00000; in wildfire_init_hose()
123 pci->pci_window[0].tbase.csr = virt_to_phys(hose->sg_isa->ptes); in wildfire_init_hose()
125 pci->pci_window[1].wbase.csr = 0x40000000 | 1; in wildfire_init_hose()
126 pci->pci_window[1].wmask.csr = (0x40000000 -1) & 0xfff00000; in wildfire_init_hose()
127 pci->pci_window[1].tbase.csr = 0; in wildfire_init_hose()
129 pci->pci_window[2].wbase.csr = 0x80000000 | 1; in wildfire_init_hose()
130 pci->pci_window[2].wmask.csr = (0x40000000 -1) & 0xfff00000; in wildfire_init_hose()
131 pci->pci_window[2].tbase.csr = 0x40000000; in wildfire_init_hose()
133 pci->pci_window[3].wbase.csr = hose->sg_pci->dma_base | 3; in wildfire_init_hose()
134 pci->pci_window[3].wmask.csr = (hose->sg_pci->size - 1) & 0xfff00000; in wildfire_init_hose()
135 pci->pci_window[3].tbase.csr = virt_to_phys(hose->sg_pci->ptes); in wildfire_init_hose()
182 unsigned long temp; in wildfire_hardware_probe() local
193 temp = fast->qsd_whami.csr; in wildfire_hardware_probe()
195 printk(KERN_ERR "fast QSD_WHAMI at base %p is 0x%lx\n", fast, temp); in wildfire_hardware_probe()
198 hard_qbb = (temp >> 8) & 7; in wildfire_hardware_probe()
199 soft_qbb = (temp >> 4) & 7; in wildfire_hardware_probe()
220 temp = qsa->qsa_qbb_id.csr; in wildfire_hardware_probe()
222 printk(KERN_ERR "QSA_QBB_ID at base %p is 0x%lx\n", qsa, temp); in wildfire_hardware_probe()
225 if (temp & 0x40) /* Is there an HS? */ in wildfire_hardware_probe()
228 if (temp & 0x20) { /* Is there a GP? */ in wildfire_hardware_probe()
230 temp = 0; in wildfire_hardware_probe()
231 for (i = 0; i < 4; i++) { in wildfire_hardware_probe()
232 temp |= gp->gpa_qbb_map[i].csr << (i * 8); in wildfire_hardware_probe()
235 i, gp, temp); in wildfire_hardware_probe()
240 if (temp & 8) { /* Is there a QBB? */ in wildfire_hardware_probe()
241 soft_qbb = temp & 7; in wildfire_hardware_probe()
245 temp >>= 4; in wildfire_hardware_probe()
254 temp = qsd->qsd_whami.csr; in wildfire_hardware_probe()
256 printk(KERN_ERR "QSD_WHAMI at base %p is 0x%lx\n", qsd, temp); in wildfire_hardware_probe()
258 hard_qbb = (temp >> 8) & 7; in wildfire_hardware_probe()
263 temp = qsa->qsa_qbb_pop[0].csr; in wildfire_hardware_probe()
265 printk(KERN_ERR "QSA_QBB_POP_0 at base %p is 0x%lx\n", qsa, temp); in wildfire_hardware_probe()
267 wildfire_cpu_mask |= ((temp >> 0) & 0xf) << (soft_qbb << 2); in wildfire_hardware_probe()
268 wildfire_mem_mask |= ((temp >> 4) & 0xf) << (soft_qbb << 2); in wildfire_hardware_probe()
270 temp = qsa->qsa_qbb_pop[1].csr; in wildfire_hardware_probe()
272 printk(KERN_ERR "QSA_QBB_POP_1 at base %p is 0x%lx\n", qsa, temp); in wildfire_hardware_probe()
275 wildfire_ior_mask |= ((temp >> 4) & 0xf) << (soft_qbb << 2); in wildfire_hardware_probe()
277 temp = qsa->qsa_qbb_id.csr; in wildfire_hardware_probe()
279 printk(KERN_ERR "QSA_QBB_ID at %p is 0x%lx\n", qsa, temp); in wildfire_hardware_probe()
281 if (temp & 0x20) in wildfire_hardware_probe()
290 if ((iop->iop_hose[i].init.csr & 1) == 1 && in wildfire_hardware_probe()
291 ((ne->ne_what_am_i.csr & 0xf00000300UL) == 0x100000300UL) && in wildfire_hardware_probe()
292 ((fe->fe_what_am_i.csr & 0xf00000300UL) == 0x100000200UL)) in wildfire_hardware_probe()
349 int qbbno = hose->index >> 3; in wildfire_pci_tbi()
350 int hoseno = hose->index & 7; in wildfire_pci_tbi()
354 pci->pci_flush_tlb.csr; /* reading does the trick */ in wildfire_pci_tbi()
361 struct pci_controller *hose = pbus->sysdata; in mk_conf_addr()
363 u8 bus = pbus->number; in mk_conf_addr()
369 if (!pbus->parent) /* No parent means peer PCI bus. */ in mk_conf_addr()
374 addr |= hose->config_space_base; in mk_conf_addr()
398 case 4: in wildfire_read_config()
427 case 4: in wildfire_write_config()
455 pci->pci_io_addr_ext.csr); in wildfire_dump_pci_regs()
456 printk(KERN_ERR " PCI_CTRL: 0x%16lx\n", pci->pci_ctrl.csr); in wildfire_dump_pci_regs()
457 printk(KERN_ERR " PCI_ERR_SUM: 0x%16lx\n", pci->pci_err_sum.csr); in wildfire_dump_pci_regs()
458 printk(KERN_ERR " PCI_ERR_ADDR: 0x%16lx\n", pci->pci_err_addr.csr); in wildfire_dump_pci_regs()
459 printk(KERN_ERR " PCI_STALL_CNT: 0x%16lx\n", pci->pci_stall_cnt.csr); in wildfire_dump_pci_regs()
460 printk(KERN_ERR " PCI_PEND_INT: 0x%16lx\n", pci->pci_pend_int.csr); in wildfire_dump_pci_regs()
461 printk(KERN_ERR " PCI_SENT_INT: 0x%16lx\n", pci->pci_sent_int.csr); in wildfire_dump_pci_regs()
465 for (i = 0; i < 4; i++) { in wildfire_dump_pci_regs()
467 pci->pci_window[i].wbase.csr, in wildfire_dump_pci_regs()
468 pci->pci_window[i].wmask.csr, in wildfire_dump_pci_regs()
469 pci->pci_window[i].tbase.csr); in wildfire_dump_pci_regs()
483 printk(KERN_ERR " PCA_WHAT_AM_I: 0x%16lx\n", pca->pca_what_am_i.csr); in wildfire_dump_pca_regs()
484 printk(KERN_ERR " PCA_ERR_SUM: 0x%16lx\n", pca->pca_err_sum.csr); in wildfire_dump_pca_regs()
485 printk(KERN_ERR " PCA_PEND_INT: 0x%16lx\n", pca->pca_pend_int.csr); in wildfire_dump_pca_regs()
486 printk(KERN_ERR " PCA_SENT_INT: 0x%16lx\n", pca->pca_sent_int.csr); in wildfire_dump_pca_regs()
488 pca->pca_stdio_edge_level.csr); in wildfire_dump_pca_regs()
492 for (i = 0; i < 4; i++) { in wildfire_dump_pca_regs()
494 pca->pca_int[i].target.csr, in wildfire_dump_pca_regs()
495 pca->pca_int[i].enable.csr); in wildfire_dump_pca_regs()
509 printk(KERN_ERR " QSA_QBB_ID: 0x%16lx\n", qsa->qsa_qbb_id.csr); in wildfire_dump_qsa_regs()
510 printk(KERN_ERR " QSA_PORT_ENA: 0x%16lx\n", qsa->qsa_port_ena.csr); in wildfire_dump_qsa_regs()
511 printk(KERN_ERR " QSA_REF_INT: 0x%16lx\n", qsa->qsa_ref_int.csr); in wildfire_dump_qsa_regs()
515 i, qsa->qsa_config[i].csr); in wildfire_dump_qsa_regs()
519 i, qsa->qsa_qbb_pop[0].csr); in wildfire_dump_qsa_regs()
531 printk(KERN_ERR " QSD_WHAMI: 0x%16lx\n", qsd->qsd_whami.csr); in wildfire_dump_qsd_regs()
532 printk(KERN_ERR " QSD_REV: 0x%16lx\n", qsd->qsd_rev.csr); in wildfire_dump_qsd_regs()
534 qsd->qsd_port_present.csr); in wildfire_dump_qsd_regs()
536 qsd->qsd_port_active.csr); in wildfire_dump_qsd_regs()
538 qsd->qsd_fault_ena.csr); in wildfire_dump_qsd_regs()
540 qsd->qsd_cpu_int_ena.csr); in wildfire_dump_qsd_regs()
542 qsd->qsd_mem_config.csr); in wildfire_dump_qsd_regs()
544 qsd->qsd_err_sum.csr); in wildfire_dump_qsd_regs()
557 printk(KERN_ERR " IOA_CONFIG: 0x%16lx\n", iop->ioa_config.csr); in wildfire_dump_iop_regs()
558 printk(KERN_ERR " IOD_CONFIG: 0x%16lx\n", iop->iod_config.csr); in wildfire_dump_iop_regs()
560 iop->iop_switch_credits.csr); in wildfire_dump_iop_regs()
562 iop->iop_hose_credits.csr); in wildfire_dump_iop_regs()
564 for (i = 0; i < 4; i++) in wildfire_dump_iop_regs()
566 i, iop->iop_hose[i].init.csr); in wildfire_dump_iop_regs()
567 for (i = 0; i < 4; i++) in wildfire_dump_iop_regs()
569 i, iop->iop_dev_int[i].target.csr); in wildfire_dump_iop_regs()
581 for (i = 0; i < 4; i++) in wildfire_dump_gp_regs()
583 i, gp->gpa_qbb_map[i].csr); in wildfire_dump_gp_regs()
586 gp->gpa_mem_pop_map.csr); in wildfire_dump_gp_regs()
587 printk(KERN_ERR " GPA_SCRATCH: 0x%16lx\n", gp->gpa_scratch.csr); in wildfire_dump_gp_regs()
588 printk(KERN_ERR " GPA_DIAG: 0x%16lx\n", gp->gpa_diag.csr); in wildfire_dump_gp_regs()
589 printk(KERN_ERR " GPA_CONFIG_0: 0x%16lx\n", gp->gpa_config_0.csr); in wildfire_dump_gp_regs()
590 printk(KERN_ERR " GPA_INIT_ID: 0x%16lx\n", gp->gpa_init_id.csr); in wildfire_dump_gp_regs()
591 printk(KERN_ERR " GPA_CONFIG_2: 0x%16lx\n", gp->gpa_config_2.csr); in wildfire_dump_gp_regs()
620 printk("--- "); in wildfire_dump_hardware_config()
628 printk("--- "); in wildfire_dump_hardware_config()