Lines Matching refs:hcr_base
282 void __iomem *hcr_base; member
295 void __iomem *hcr_base = host_priv->hcr_base; in fsl_sata_set_irq_coalescing() local
310 iowrite32((count << 24 | ticks), hcr_base + ICC); in fsl_sata_set_irq_coalescing()
319 hcr_base, ioread32(hcr_base + ICC)); in fsl_sata_set_irq_coalescing()
390 void __iomem *hcr_base) in sata_fsl_tag() argument
399 if (unlikely((ioread32(hcr_base + CQ)) & (1 << tag))) { in sata_fsl_tag()
503 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_qc_prep() local
504 unsigned int tag = sata_fsl_tag(ap, qc->hw_tag, hcr_base); in sata_fsl_qc_prep()
544 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_qc_issue() local
545 unsigned int tag = sata_fsl_tag(ap, qc->hw_tag, hcr_base); in sata_fsl_qc_issue()
548 ioread32(CQ + hcr_base), in sata_fsl_qc_issue()
549 ioread32(CA + hcr_base), in sata_fsl_qc_issue()
550 ioread32(CE + hcr_base), ioread32(CC + hcr_base)); in sata_fsl_qc_issue()
552 iowrite32(qc->dev->link->pmp, CQPMP + hcr_base); in sata_fsl_qc_issue()
555 iowrite32(1 << tag, CQ + hcr_base); in sata_fsl_qc_issue()
558 tag, ioread32(CQ + hcr_base), ioread32(CA + hcr_base)); in sata_fsl_qc_issue()
561 ioread32(CE + hcr_base), in sata_fsl_qc_issue()
562 ioread32(DE + hcr_base), in sata_fsl_qc_issue()
563 ioread32(CC + hcr_base), in sata_fsl_qc_issue()
573 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_qc_fill_rtf() local
574 unsigned int tag = sata_fsl_tag(qc->ap, qc->hw_tag, hcr_base); in sata_fsl_qc_fill_rtf()
633 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_freeze() local
637 ioread32(CQ + hcr_base), in sata_fsl_freeze()
638 ioread32(CA + hcr_base), in sata_fsl_freeze()
639 ioread32(CE + hcr_base), ioread32(DE + hcr_base)); in sata_fsl_freeze()
644 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_freeze()
645 iowrite32((temp & ~0x3F), hcr_base + HCONTROL); in sata_fsl_freeze()
648 ioread32(hcr_base + HCONTROL), ioread32(hcr_base + HSTATUS)); in sata_fsl_freeze()
654 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_thaw() local
658 temp = ioread32(hcr_base + HSTATUS); in sata_fsl_thaw()
663 iowrite32((temp & 0x3F), hcr_base + HSTATUS); in sata_fsl_thaw()
666 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_thaw()
667 iowrite32((temp | DEFAULT_PORT_IRQ_ENABLE_MASK), hcr_base + HCONTROL); in sata_fsl_thaw()
670 ioread32(hcr_base + HCONTROL), ioread32(hcr_base + HSTATUS)); in sata_fsl_thaw()
676 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_pmp_attach() local
679 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_pmp_attach()
680 iowrite32((temp | HCONTROL_PMP_ATTACHED), hcr_base + HCONTROL); in sata_fsl_pmp_attach()
686 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_pmp_detach() local
689 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_pmp_detach()
691 iowrite32(temp, hcr_base + HCONTROL); in sata_fsl_pmp_detach()
694 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_pmp_detach()
695 iowrite32((temp | DEFAULT_PORT_IRQ_ENABLE_MASK), hcr_base + HCONTROL); in sata_fsl_pmp_detach()
706 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_port_start() local
736 iowrite32(pp->cmdslot_paddr & 0xffffffff, hcr_base + CHBA); in sata_fsl_port_start()
746 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_port_start()
747 iowrite32((temp | HCONTROL_ONLINE_PHY_RST), hcr_base + HCONTROL); in sata_fsl_port_start()
749 ata_port_dbg(ap, "HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS)); in sata_fsl_port_start()
750 ata_port_dbg(ap, "HControl = 0x%x\n", ioread32(hcr_base + HCONTROL)); in sata_fsl_port_start()
751 ata_port_dbg(ap, "CHBA = 0x%x\n", ioread32(hcr_base + CHBA)); in sata_fsl_port_start()
761 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_port_stop() local
767 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_port_stop()
770 iowrite32(temp, hcr_base + HCONTROL); in sata_fsl_port_stop()
773 ata_wait_register(ap, hcr_base + HSTATUS, ONLINE, ONLINE, 1, 1); in sata_fsl_port_stop()
785 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_dev_classify() local
789 temp = ioread32(hcr_base + SIGNATURE); in sata_fsl_dev_classify()
791 ata_port_dbg(ap, "HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS)); in sata_fsl_dev_classify()
792 ata_port_dbg(ap, "HControl = 0x%x\n", ioread32(hcr_base + HCONTROL)); in sata_fsl_dev_classify()
807 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_hardreset() local
816 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_hardreset()
818 iowrite32(temp, hcr_base + HCONTROL); in sata_fsl_hardreset()
821 temp = ata_wait_register(ap, hcr_base + HSTATUS, ONLINE, ONLINE, in sata_fsl_hardreset()
839 ioread32(hcr_base + HSTATUS), in sata_fsl_hardreset()
840 ioread32(hcr_base + HCONTROL)); in sata_fsl_hardreset()
856 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_hardreset()
859 iowrite32(temp, hcr_base + HCONTROL); in sata_fsl_hardreset()
861 temp = ata_wait_register(ap, hcr_base + HSTATUS, ONLINE, 0, 1, 500); in sata_fsl_hardreset()
870 ioread32(hcr_base + HSTATUS), in sata_fsl_hardreset()
871 ioread32(hcr_base + HCONTROL)); in sata_fsl_hardreset()
879 temp = ata_wait_register(ap, hcr_base + HSTATUS, 0xFF, 0, 1, 500); in sata_fsl_hardreset()
882 ioread32(hcr_base + HSTATUS)); in sata_fsl_hardreset()
891 temp = ata_wait_register(ap, hcr_base + HSTATUS, 0xFF, 0x10, in sata_fsl_hardreset()
921 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_softreset() local
960 ioread32(CQ + hcr_base), in sata_fsl_softreset()
961 ioread32(CA + hcr_base), ioread32(CC + hcr_base)); in sata_fsl_softreset()
963 iowrite32(0xFFFF, CC + hcr_base); in sata_fsl_softreset()
965 iowrite32(pmp, CQPMP + hcr_base); in sata_fsl_softreset()
966 iowrite32(1, CQ + hcr_base); in sata_fsl_softreset()
968 temp = ata_wait_register(ap, CQ + hcr_base, 0x1, 0x1, 1, 5000); in sata_fsl_softreset()
973 ioread32(CQ + hcr_base), in sata_fsl_softreset()
974 ioread32(CA + hcr_base), ioread32(CC + hcr_base)); in sata_fsl_softreset()
979 ioread32(hcr_base + HSTATUS), in sata_fsl_softreset()
980 ioread32(hcr_base + HCONTROL), in sata_fsl_softreset()
1003 iowrite32(pmp, CQPMP + hcr_base); in sata_fsl_softreset()
1004 iowrite32(1, CQ + hcr_base); in sata_fsl_softreset()
1012 iowrite32(0x01, CC + hcr_base); /* We know it will be cmd#0 always */ in sata_fsl_softreset()
1027 ata_port_dbg(ap, "ccreg = 0x%x\n", ioread32(hcr_base + CC)); in sata_fsl_softreset()
1028 ata_port_dbg(ap, "cereg = 0x%x\n", ioread32(hcr_base + CE)); in sata_fsl_softreset()
1056 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_error_intr() local
1064 hstatus = ioread32(hcr_base + HSTATUS); in sata_fsl_error_intr()
1065 cereg = ioread32(hcr_base + CE); in sata_fsl_error_intr()
1081 hstatus, cereg, ioread32(hcr_base + DE), SError); in sata_fsl_error_intr()
1119 ioread32(hcr_base + CE), ioread32(hcr_base + DE)); in sata_fsl_error_intr()
1125 dereg = ioread32(hcr_base + DE); in sata_fsl_error_intr()
1126 iowrite32(dereg, hcr_base + DE); in sata_fsl_error_intr()
1127 iowrite32(cereg, hcr_base + CE); in sata_fsl_error_intr()
1147 dereg = ioread32(hcr_base + DE); in sata_fsl_error_intr()
1148 iowrite32(dereg, hcr_base + DE); in sata_fsl_error_intr()
1149 iowrite32(cereg, hcr_base + CE); in sata_fsl_error_intr()
1182 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_host_intr() local
1189 hstatus = ioread32(hcr_base + HSTATUS); in sata_fsl_host_intr()
1194 done_mask = ioread32(hcr_base + CC); in sata_fsl_host_intr()
1202 hcontrol = ioread32(hcr_base + HCONTROL); in sata_fsl_host_intr()
1204 hcr_base + HCONTROL); in sata_fsl_host_intr()
1208 hcr_base + HCONTROL); in sata_fsl_host_intr()
1236 ioread32(hcr_base + CA), in sata_fsl_host_intr()
1237 ioread32(hcr_base + CE), in sata_fsl_host_intr()
1238 ioread32(hcr_base + CQ), in sata_fsl_host_intr()
1244 iowrite32(done_mask, hcr_base + CC); in sata_fsl_host_intr()
1247 done_mask, ioread32(hcr_base + CA), in sata_fsl_host_intr()
1248 ioread32(hcr_base + CE)); in sata_fsl_host_intr()
1253 i, ioread32(hcr_base + CC), in sata_fsl_host_intr()
1254 ioread32(hcr_base + CA)); in sata_fsl_host_intr()
1260 iowrite32(1, hcr_base + CC); in sata_fsl_host_intr()
1264 ioread32(hcr_base + CC)); in sata_fsl_host_intr()
1272 ioread32(hcr_base + CC)); in sata_fsl_host_intr()
1273 iowrite32(done_mask, hcr_base + CC); in sata_fsl_host_intr()
1282 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_interrupt() local
1288 interrupt_enables = ioread32(hcr_base + HSTATUS); in sata_fsl_interrupt()
1305 iowrite32(interrupt_enables, hcr_base + HSTATUS); in sata_fsl_interrupt()
1320 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_init_controller() local
1330 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_init_controller()
1331 iowrite32(temp & ~HCONTROL_LEGACY, hcr_base + HCONTROL); in sata_fsl_init_controller()
1334 temp = ioread32(hcr_base + HSTATUS); in sata_fsl_init_controller()
1336 iowrite32((temp & 0x3F), hcr_base + HSTATUS); in sata_fsl_init_controller()
1339 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_init_controller()
1340 iowrite32((temp & ~0x3F), hcr_base + HCONTROL); in sata_fsl_init_controller()
1343 dev_dbg(host->dev, "icc = 0x%x\n", ioread32(hcr_base + ICC)); in sata_fsl_init_controller()
1344 iowrite32(0x01000000, hcr_base + ICC); in sata_fsl_init_controller()
1347 iowrite32(0x00000FFFF, hcr_base + CE); in sata_fsl_init_controller()
1348 iowrite32(0x00000FFFF, hcr_base + DE); in sata_fsl_init_controller()
1363 ioread32(hcr_base + HSTATUS), ioread32(hcr_base + HCONTROL)); in sata_fsl_init_controller()
1372 iounmap(host_priv->hcr_base); in sata_fsl_host_stop()
1425 void __iomem *hcr_base = NULL; in sata_fsl_probe() local
1438 hcr_base = of_iomap(ofdev->dev.of_node, 0); in sata_fsl_probe()
1439 if (!hcr_base) in sata_fsl_probe()
1442 ssr_base = hcr_base + 0x100; in sata_fsl_probe()
1443 csr_base = hcr_base + 0x140; in sata_fsl_probe()
1458 host_priv->hcr_base = hcr_base; in sata_fsl_probe()
1522 if (hcr_base) in sata_fsl_probe()
1523 iounmap(hcr_base); in sata_fsl_probe()
1554 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_resume() local
1565 iowrite32(pp->cmdslot_paddr & 0xffffffff, hcr_base + CHBA); in sata_fsl_resume()
1567 iowrite32((ioread32(hcr_base + HCONTROL) in sata_fsl_resume()
1571 hcr_base + HCONTROL); in sata_fsl_resume()