Lines Matching +full:0 +full:x8500

55 	if ((hdr_type & 0x7f) != PCI_HEADER_TYPE_BRIDGE)  in quirk_fsl_pcie_early()
68 u32 val = 0; in fsl_pcie_check_link()
72 __indirect_read_config(hose, hose->first_busno, 0, in fsl_pcie_check_link()
75 early_read_config_dword(hose, 0, 0, PCIE_LTSSM, &val); in fsl_pcie_check_link()
87 return 0; in fsl_pcie_check_link()
138 dev->bus_dma_limit = 0; in fsl_pci_dma_set_mask()
150 u32 flags = 0x80044000; /* enable & mem R/W */ in setup_one_atmu()
153 pr_debug("PCI MEM resource start 0x%016llx, size 0x%016llx.\n", in setup_one_atmu()
157 flags |= 0x10000000; /* enable relaxed ordering */ in setup_one_atmu()
159 for (i = 0; size > 0; i++) { in setup_one_atmu()
197 u64 mem, sz, paddr_hi = 0; in setup_pci_atmu()
198 u64 offset = 0, paddr_lo = ULLONG_MAX; in setup_pci_atmu()
199 u32 pcicsrbar = 0, pcicsrbar_sz; in setup_pci_atmu()
217 * BSC9132 Rev1.0 has an issue where all the PEX inbound in setup_pci_atmu()
218 * windows have implemented the default target value as 0xf in setup_pci_atmu()
220 * of 0xf is reserved for local memory space. 9132 Rev1.0 in setup_pci_atmu()
221 * now has local mempry space mapped to target 0x0 instead of in setup_pci_atmu()
222 * 0xf. Hence adding a workaround to remove the target 0xf in setup_pci_atmu()
228 if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) { in setup_pci_atmu()
231 start_idx = 0; in setup_pci_atmu()
238 out_be32(&pci->pow[i].powar, 0); in setup_pci_atmu()
242 out_be32(&pci->piw[i].piwar, 0); in setup_pci_atmu()
246 for(i = 0, j = 1; i < 3; i++) { in setup_pci_atmu()
257 if (n < 0 || j >= 5) { in setup_pci_atmu()
269 pr_debug("PCI IO resource start 0x%016llx, size 0x%016llx, " in setup_pci_atmu()
270 "phy base 0x%016llx.\n", in setup_pci_atmu()
275 out_be32(&pci->pow[j].potear, 0); in setup_pci_atmu()
278 out_be32(&pci->pow[j].powar, 0x80088000 in setup_pci_atmu()
293 if (paddr_lo == 0) { in setup_pci_atmu()
299 early_write_config_dword(hose, 0, 0, PCI_BASE_ADDRESS_0, 0xffffffff); in setup_pci_atmu()
300 early_read_config_dword(hose, 0, 0, PCI_BASE_ADDRESS_0, &pcicsrbar_sz); in setup_pci_atmu()
303 if (paddr_hi < (0x100000000ull - pcicsrbar_sz) || in setup_pci_atmu()
304 (paddr_lo > 0x100000000ull)) in setup_pci_atmu()
305 pcicsrbar = 0x100000000ull - pcicsrbar_sz; in setup_pci_atmu()
308 early_write_config_dword(hose, 0, 0, PCI_BASE_ADDRESS_0, pcicsrbar); in setup_pci_atmu()
312 pr_info("%pOF: PCICSRBAR @ 0x%x\n", hose->dn, pcicsrbar); in setup_pci_atmu()
348 if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) { in setup_pci_atmu()
361 out_be32(&pci->piw[win_idx].pitar, 0x00000000); in setup_pci_atmu()
362 out_be32(&pci->piw[win_idx].piwbar, 0x00000000); in setup_pci_atmu()
367 hose->dma_window_base_cur = 0x00000000; in setup_pci_atmu()
387 out_be32(&pci->piw[win_idx].pitar, 0x00000000); in setup_pci_atmu()
404 u64 paddr = 0; in setup_pci_atmu()
434 hose->dma_window_base_cur = 0x00000000; in setup_pci_atmu()
447 if (paddr_hi < 0xffffffffull) in setup_pci_atmu()
453 pr_info("%pOF: DMA window size is 0x%llx\n", hose->dn, in setup_pci_atmu()
463 early_read_config_word(hose, 0, 0, PCI_COMMAND, &cmd); in setup_pci_cmd()
466 early_write_config_word(hose, 0, 0, PCI_COMMAND, cmd); in setup_pci_cmd()
468 cap_x = early_find_capability(hose, 0, 0, PCI_CAP_ID_PCIX); in setup_pci_cmd()
473 early_write_config_word(hose, 0, 0, pci_x_cmd, cmd); in setup_pci_cmd()
475 early_write_config_byte(hose, 0, 0, PCI_LATENCY_TIMER, 0x80); in setup_pci_cmd()
482 int i, is_pcie = 0, no_link; in fsl_pcibios_fixup_bus()
488 * has bus->resource[0..4] set, so things are a bit more in fsl_pcibios_fixup_bus()
493 is_pcie = early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP); in fsl_pcibios_fixup_bus()
497 for (i = 0; i < PCI_BRIDGE_RESOURCE_NUM; ++i) { in fsl_pcibios_fixup_bus()
503 if (i == 0) in fsl_pcibios_fixup_bus()
509 res->start = par ? par->start : 0; in fsl_pcibios_fixup_bus()
510 res->end = par ? par->end : 0; in fsl_pcibios_fixup_bus()
511 res->flags = par ? par->flags : 0; in fsl_pcibios_fixup_bus()
539 if (of_address_to_resource(dev, 0, &rsrc)) { in fsl_add_bridge()
548 " bus 0\n", dev); in fsl_add_bridge()
557 hose->first_busno = bus_range ? bus_range[0] : 0x0; in fsl_add_bridge()
558 hose->last_busno = bus_range ? bus_range[1] : 0xff; in fsl_add_bridge()
560 pr_debug("PCI memory map start 0x%016llx, size 0x%016llx\n", in fsl_add_bridge()
567 setup_indirect_pci(hose, rsrc.start, rsrc.start + 0x4, in fsl_add_bridge()
573 if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) { in fsl_add_bridge()
577 early_read_config_byte(hose, 0, 0, PCI_HEADER_TYPE, &hdr_type); in fsl_add_bridge()
578 if ((hdr_type & 0x7f) != PCI_HEADER_TYPE_BRIDGE) in fsl_add_bridge()
583 early_read_config_byte(hose, 0, 0, PCI_CLASS_PROG, &progif); in fsl_add_bridge()
592 if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) { in fsl_add_bridge()
599 early_read_config_dword(hose, 0, 0, PCIE_FSL_CSR_CLASSCODE, &class_code); in fsl_add_bridge()
600 class_code &= 0xff; in fsl_add_bridge()
602 early_write_config_dword(hose, 0, 0, PCIE_FSL_CSR_CLASSCODE, class_code); in fsl_add_bridge()
612 #define PCI_BUS_FUNCTION 0x44 in fsl_add_bridge()
613 #define PCI_BUS_FUNCTION_MDS 0x400 /* Master disable streaming */ in fsl_add_bridge()
618 !early_find_capability(hose, 0, 0, PCI_CAP_ID_PCIX)) { in fsl_add_bridge()
619 early_read_config_word(hose, 0, 0, in fsl_add_bridge()
622 early_write_config_word(hose, 0, 0, in fsl_add_bridge()
627 printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx. " in fsl_add_bridge()
632 pr_debug(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", in fsl_add_bridge()
645 return 0; in fsl_add_bridge()
677 * With the convention of u-boot, the PCIE outbound window 0 serves
680 #define PEX_OUTWIN0_BAR 0xCA4
681 #define PEX_OUTWIN0_TAL 0xCA8
682 #define PEX_OUTWIN0_TAH 0xCAC
683 #define PEX_RC_INWIN_BASE 0xE60
684 #define PEX_RCIWARn_EN 0x1
693 * Workaround for the HW bug: for Type 0 configure transactions the in mpc83xx_pcie_exclude_device()
695 * assumes that the device number bits are 0. in mpc83xx_pcie_exclude_device()
699 if (devfn & 0xf8) in mpc83xx_pcie_exclude_device()
723 offset &= 0xfff; in mpc83xx_pcie_remap_cfg()
725 /* Type 0 */ in mpc83xx_pcie_remap_cfg()
746 val &= 0xffffff00; in mpc83xx_pcie_write_config()
779 pcie->cfg_type1 = ioremap(cfg_bar, 0x1000); in mpc83xx_pcie_setup()
788 out_le32(pcie->cfg_type0 + PEX_OUTWIN0_TAH, 0); in mpc83xx_pcie_setup()
789 out_le32(pcie->cfg_type0 + PEX_OUTWIN0_TAL, 0); in mpc83xx_pcie_setup()
794 return 0; in mpc83xx_pcie_setup()
823 if (of_address_to_resource(dev, 0, &rsrc_reg)) { in mpc83xx_add_bridge()
828 memset(&rsrc_cfg, 0, sizeof(rsrc_cfg)); in mpc83xx_add_bridge()
836 * one at 0x8500 has config space registers at 0x8300 in mpc83xx_add_bridge()
837 * one at 0x8600 has config space registers at 0x8380 in mpc83xx_add_bridge()
839 if ((rsrc_reg.start & 0xfffff) == 0x8500) in mpc83xx_add_bridge()
840 rsrc_cfg.start = (rsrc_reg.start & 0xfff00000) + 0x8300; in mpc83xx_add_bridge()
841 else if ((rsrc_reg.start & 0xfffff) == 0x8600) in mpc83xx_add_bridge()
842 rsrc_cfg.start = (rsrc_reg.start & 0xfff00000) + 0x8380; in mpc83xx_add_bridge()
845 * Controller at offset 0x8500 is primary in mpc83xx_add_bridge()
847 if ((rsrc_reg.start & 0xfffff) == 0x8500) in mpc83xx_add_bridge()
850 primary = 0; in mpc83xx_add_bridge()
856 " bus 0\n", dev); in mpc83xx_add_bridge()
864 hose->first_busno = bus_range ? bus_range[0] : 0; in mpc83xx_add_bridge()
865 hose->last_busno = bus_range ? bus_range[1] : 0xff; in mpc83xx_add_bridge()
873 rsrc_cfg.start + 4, 0); in mpc83xx_add_bridge()
876 printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx. " in mpc83xx_add_bridge()
881 pr_debug(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", in mpc83xx_add_bridge()
888 return 0; in mpc83xx_add_bridge()
905 for (i = 0; i < 4; i++) { in fsl_pci_immrbar_base()
924 PCI_DEVFN(0, 0), PCI_BASE_ADDRESS_0, &base); in fsl_pci_immrbar_base()
927 * For PEXCSRBAR, bit 3-0 indicate prefetchable and in fsl_pci_immrbar_base()
937 return 0; in fsl_pci_immrbar_base()
955 regs->gpr[rd] = 0xffffffff; in mcheck_handle_load()
959 regs->gpr[rd] = 0xffffffff; in mcheck_handle_load()
964 regs->gpr[rd] = 0xff; in mcheck_handle_load()
968 regs->gpr[rd] = 0xff; in mcheck_handle_load()
974 regs->gpr[rd] = 0xffff; in mcheck_handle_load()
978 regs->gpr[rd] = 0xffff; in mcheck_handle_load()
983 regs->gpr[rd] = ~0UL; in mcheck_handle_load()
987 regs->gpr[rd] = ~0UL; in mcheck_handle_load()
992 return 0; in mcheck_handle_load()
997 regs->gpr[rd] = 0xffffffff; in mcheck_handle_load()
1001 regs->gpr[rd] = 0xffffffff; in mcheck_handle_load()
1006 regs->gpr[rd] = 0xff; in mcheck_handle_load()
1010 regs->gpr[rd] = 0xff; in mcheck_handle_load()
1015 regs->gpr[rd] = 0xffff; in mcheck_handle_load()
1019 regs->gpr[rd] = 0xffff; in mcheck_handle_load()
1024 regs->gpr[rd] = ~0UL; in mcheck_handle_load()
1028 regs->gpr[rd] = ~0UL; in mcheck_handle_load()
1033 return 0; in mcheck_handle_load()
1049 for (i = 0; i < 3; i++) { in is_in_pci_mem_space()
1056 return 0; in is_in_pci_mem_space()
1063 phys_addr_t addr = 0; in fsl_pci_mcheck_exception()
1067 return 0; in fsl_pci_mcheck_exception()
1088 return 0; in fsl_pci_mcheck_exception()
1103 { .compatible = "fsl,qoriq-pcie-v3.0", },
1181 pme_irq = irq_of_parse_and_map(hose->dn, 0); in fsl_pci_pme_probe()
1192 if (res < 0) { in fsl_pci_pme_probe()
1205 out_be32(&pci->pex_pme_mes_ier, 0); in fsl_pci_pme_probe()
1214 return 0; in fsl_pci_pme_probe()
1227 for (i = 0; i < 150; i++) { in send_pme_turnoff_message()
1250 return 0; in fsl_pci_syscore_suspend()
1263 for (i = 0; i < 150; i++) { in fsl_pci_syscore_do_resume()
1329 return 0; in fsl_pci_probe()