Lines Matching refs:hcr_base
260 void __iomem *hcr_base; member
268 void __iomem *hcr_base) in sata_fsl_tag() argument
283 if (unlikely((ioread32(hcr_base + CQ)) & (1 << tag))) { in sata_fsl_tag()
396 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_qc_prep() local
397 unsigned int tag = sata_fsl_tag(qc->tag, hcr_base); in sata_fsl_qc_prep()
443 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_qc_issue() local
444 unsigned int tag = sata_fsl_tag(qc->tag, hcr_base); in sata_fsl_qc_issue()
447 ioread32(CQ + hcr_base), in sata_fsl_qc_issue()
448 ioread32(CA + hcr_base), in sata_fsl_qc_issue()
449 ioread32(CE + hcr_base), ioread32(CC + hcr_base)); in sata_fsl_qc_issue()
451 iowrite32(qc->dev->link->pmp, CQPMP + hcr_base); in sata_fsl_qc_issue()
454 iowrite32(1 << tag, CQ + hcr_base); in sata_fsl_qc_issue()
457 tag, ioread32(CQ + hcr_base), ioread32(CA + hcr_base)); in sata_fsl_qc_issue()
460 ioread32(CE + hcr_base), in sata_fsl_qc_issue()
461 ioread32(DE + hcr_base), in sata_fsl_qc_issue()
462 ioread32(CC + hcr_base), in sata_fsl_qc_issue()
472 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_qc_fill_rtf() local
473 unsigned int tag = sata_fsl_tag(qc->tag, hcr_base); in sata_fsl_qc_fill_rtf()
533 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_freeze() local
537 ioread32(CQ + hcr_base), in sata_fsl_freeze()
538 ioread32(CA + hcr_base), in sata_fsl_freeze()
539 ioread32(CE + hcr_base), ioread32(DE + hcr_base)); in sata_fsl_freeze()
544 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_freeze()
545 iowrite32((temp & ~0x3F), hcr_base + HCONTROL); in sata_fsl_freeze()
548 ioread32(hcr_base + HCONTROL), ioread32(hcr_base + HSTATUS)); in sata_fsl_freeze()
554 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_thaw() local
558 temp = ioread32(hcr_base + HSTATUS); in sata_fsl_thaw()
563 iowrite32((temp & 0x3F), hcr_base + HSTATUS); in sata_fsl_thaw()
566 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_thaw()
567 iowrite32((temp | DEFAULT_PORT_IRQ_ENABLE_MASK), hcr_base + HCONTROL); in sata_fsl_thaw()
570 ioread32(hcr_base + HCONTROL), ioread32(hcr_base + HSTATUS)); in sata_fsl_thaw()
576 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_pmp_attach() local
579 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_pmp_attach()
580 iowrite32((temp | HCONTROL_PMP_ATTACHED), hcr_base + HCONTROL); in sata_fsl_pmp_attach()
586 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_pmp_detach() local
589 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_pmp_detach()
591 iowrite32(temp, hcr_base + HCONTROL); in sata_fsl_pmp_detach()
594 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_pmp_detach()
595 iowrite32((temp | DEFAULT_PORT_IRQ_ENABLE_MASK), hcr_base + HCONTROL); in sata_fsl_pmp_detach()
606 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_port_start() local
636 iowrite32(pp->cmdslot_paddr & 0xffffffff, hcr_base + CHBA); in sata_fsl_port_start()
646 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_port_start()
647 iowrite32((temp | HCONTROL_ONLINE_PHY_RST), hcr_base + HCONTROL); in sata_fsl_port_start()
649 VPRINTK("HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS)); in sata_fsl_port_start()
650 VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL)); in sata_fsl_port_start()
651 VPRINTK("CHBA = 0x%x\n", ioread32(hcr_base + CHBA)); in sata_fsl_port_start()
676 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_port_stop() local
682 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_port_stop()
685 iowrite32(temp, hcr_base + HCONTROL); in sata_fsl_port_stop()
688 ata_wait_register(ap, hcr_base + HSTATUS, ONLINE, ONLINE, 1, 1); in sata_fsl_port_stop()
700 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_dev_classify() local
704 temp = ioread32(hcr_base + SIGNATURE); in sata_fsl_dev_classify()
707 VPRINTK("HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS)); in sata_fsl_dev_classify()
708 VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL)); in sata_fsl_dev_classify()
723 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_hardreset() local
734 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_hardreset()
736 iowrite32(temp, hcr_base + HCONTROL); in sata_fsl_hardreset()
739 temp = ata_wait_register(ap, hcr_base + HSTATUS, ONLINE, ONLINE, in sata_fsl_hardreset()
757 VPRINTK("HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS)); in sata_fsl_hardreset()
758 VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL)); in sata_fsl_hardreset()
772 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_hardreset()
775 iowrite32(temp, hcr_base + HCONTROL); in sata_fsl_hardreset()
777 temp = ata_wait_register(ap, hcr_base + HSTATUS, ONLINE, 0, 1, 500); in sata_fsl_hardreset()
786 VPRINTK("HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS)); in sata_fsl_hardreset()
787 VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL)); in sata_fsl_hardreset()
795 temp = ata_wait_register(ap, hcr_base + HSTATUS, 0xFF, 0, 1, 500); in sata_fsl_hardreset()
799 ioread32(hcr_base + HSTATUS)); in sata_fsl_hardreset()
808 temp = ata_wait_register(ap, hcr_base + HSTATUS, 0xFF, 0x10, in sata_fsl_hardreset()
839 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_softreset() local
883 ioread32(CQ + hcr_base), in sata_fsl_softreset()
884 ioread32(CA + hcr_base), ioread32(CC + hcr_base)); in sata_fsl_softreset()
886 iowrite32(0xFFFF, CC + hcr_base); in sata_fsl_softreset()
888 iowrite32(pmp, CQPMP + hcr_base); in sata_fsl_softreset()
889 iowrite32(1, CQ + hcr_base); in sata_fsl_softreset()
891 temp = ata_wait_register(ap, CQ + hcr_base, 0x1, 0x1, 1, 5000); in sata_fsl_softreset()
896 ioread32(CQ + hcr_base), in sata_fsl_softreset()
897 ioread32(CA + hcr_base), ioread32(CC + hcr_base)); in sata_fsl_softreset()
901 DPRINTK("HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS)); in sata_fsl_softreset()
902 DPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL)); in sata_fsl_softreset()
924 iowrite32(pmp, CQPMP + hcr_base); in sata_fsl_softreset()
925 iowrite32(1, CQ + hcr_base); in sata_fsl_softreset()
933 iowrite32(0x01, CC + hcr_base); /* We know it will be cmd#0 always */ in sata_fsl_softreset()
951 VPRINTK("ccreg = 0x%x\n", ioread32(hcr_base + CC)); in sata_fsl_softreset()
952 VPRINTK("cereg = 0x%x\n", ioread32(hcr_base + CE)); in sata_fsl_softreset()
983 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_error_intr() local
991 hstatus = ioread32(hcr_base + HSTATUS); in sata_fsl_error_intr()
992 cereg = ioread32(hcr_base + CE); in sata_fsl_error_intr()
1008 hstatus, cereg, ioread32(hcr_base + DE), SError); in sata_fsl_error_intr()
1046 ioread32(hcr_base + CE), ioread32(hcr_base + DE)); in sata_fsl_error_intr()
1052 dereg = ioread32(hcr_base + DE); in sata_fsl_error_intr()
1053 iowrite32(dereg, hcr_base + DE); in sata_fsl_error_intr()
1054 iowrite32(cereg, hcr_base + CE); in sata_fsl_error_intr()
1074 dereg = ioread32(hcr_base + DE); in sata_fsl_error_intr()
1075 iowrite32(dereg, hcr_base + DE); in sata_fsl_error_intr()
1076 iowrite32(cereg, hcr_base + CE); in sata_fsl_error_intr()
1109 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_host_intr() local
1114 hstatus = ioread32(hcr_base + HSTATUS); in sata_fsl_host_intr()
1130 done_mask = ioread32(hcr_base + CC); in sata_fsl_host_intr()
1135 ioread32(hcr_base + CA), in sata_fsl_host_intr()
1136 ioread32(hcr_base + CE), in sata_fsl_host_intr()
1137 ioread32(hcr_base + CQ), in sata_fsl_host_intr()
1143 iowrite32(done_mask, hcr_base + CC); in sata_fsl_host_intr()
1147 done_mask, ioread32(hcr_base + CA), in sata_fsl_host_intr()
1148 ioread32(hcr_base + CE)); in sata_fsl_host_intr()
1154 i, ioread32(hcr_base + CC), in sata_fsl_host_intr()
1155 ioread32(hcr_base + CA)); in sata_fsl_host_intr()
1161 iowrite32(1, hcr_base + CC); in sata_fsl_host_intr()
1165 ioread32(hcr_base + CC)); in sata_fsl_host_intr()
1173 ioread32(hcr_base + CC)); in sata_fsl_host_intr()
1174 iowrite32(done_mask, hcr_base + CC); in sata_fsl_host_intr()
1183 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_interrupt() local
1189 interrupt_enables = ioread32(hcr_base + HSTATUS); in sata_fsl_interrupt()
1209 iowrite32(interrupt_enables, hcr_base + HSTATUS); in sata_fsl_interrupt()
1224 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_init_controller() local
1234 temp = ioread32(hcr_base + HSTATUS); in sata_fsl_init_controller()
1236 iowrite32((temp & 0x3F), hcr_base + HSTATUS); in sata_fsl_init_controller()
1239 temp = ioread32(hcr_base + HCONTROL); in sata_fsl_init_controller()
1240 iowrite32((temp & ~0x3F), hcr_base + HCONTROL); in sata_fsl_init_controller()
1243 DPRINTK("icc = 0x%x\n", ioread32(hcr_base + ICC)); in sata_fsl_init_controller()
1244 iowrite32(0x01000000, hcr_base + ICC); in sata_fsl_init_controller()
1247 iowrite32(0x00000FFFF, hcr_base + CE); in sata_fsl_init_controller()
1248 iowrite32(0x00000FFFF, hcr_base + DE); in sata_fsl_init_controller()
1255 DPRINTK("HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS)); in sata_fsl_init_controller()
1256 DPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL)); in sata_fsl_init_controller()
1309 void __iomem *hcr_base = NULL; in sata_fsl_probe() local
1323 hcr_base = of_iomap(ofdev->dev.of_node, 0); in sata_fsl_probe()
1324 if (!hcr_base) in sata_fsl_probe()
1327 ssr_base = hcr_base + 0x100; in sata_fsl_probe()
1328 csr_base = hcr_base + 0x140; in sata_fsl_probe()
1344 host_priv->hcr_base = hcr_base; in sata_fsl_probe()
1383 if (hcr_base) in sata_fsl_probe()
1384 iounmap(hcr_base); in sata_fsl_probe()
1401 iounmap(host_priv->hcr_base); in sata_fsl_remove()
1419 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_resume() local
1431 iowrite32(pp->cmdslot_paddr & 0xffffffff, hcr_base + CHBA); in sata_fsl_resume()