Lines Matching refs:cf_port
131 struct octeon_cf_port *cf_port = ap->private_data; in octeon_cf_set_piomode() local
170 octeon_cf_set_boot_reg_cfg(cf_port->cs0, div); in octeon_cf_set_piomode()
171 if (cf_port->is_true_ide) in octeon_cf_set_piomode()
173 octeon_cf_set_boot_reg_cfg(cf_port->cs1, div); in octeon_cf_set_piomode()
178 reg_tim.u64 = cvmx_read_csr(CVMX_MIO_BOOT_REG_TIMX(cf_port->cs0)); in octeon_cf_set_piomode()
207 cvmx_write_csr(CVMX_MIO_BOOT_REG_TIMX(cf_port->cs0), reg_tim.u64); in octeon_cf_set_piomode()
208 if (cf_port->is_true_ide) in octeon_cf_set_piomode()
210 cvmx_write_csr(CVMX_MIO_BOOT_REG_TIMX(cf_port->cs1), in octeon_cf_set_piomode()
216 struct octeon_cf_port *cf_port = ap->private_data; in octeon_cf_set_dmamode() local
252 c = (cf_port->dma_base & 8) >> 3; in octeon_cf_set_dmamode()
282 cvmx_write_csr(cf_port->dma_base + DMA_TIM, dma_tim.u64); in octeon_cf_set_dmamode()
543 struct octeon_cf_port *cf_port; in octeon_cf_dma_setup() local
545 cf_port = ap->private_data; in octeon_cf_dma_setup()
549 cf_port->dma_finished = 0; in octeon_cf_dma_setup()
561 struct octeon_cf_port *cf_port = qc->ap->private_data; in octeon_cf_dma_start() local
577 cvmx_write_csr(cf_port->dma_base + DMA_INT, mio_boot_dma_int.u64); in octeon_cf_dma_start()
580 cvmx_write_csr(cf_port->dma_base + DMA_INT_EN, mio_boot_dma_int.u64); in octeon_cf_dma_start()
612 cvmx_write_csr(cf_port->dma_base + DMA_CFG, mio_boot_dma_cfg.u64); in octeon_cf_dma_start()
625 struct octeon_cf_port *cf_port = ap->private_data; in octeon_cf_dma_finished() local
637 dma_cfg.u64 = cvmx_read_csr(cf_port->dma_base + DMA_CFG); in octeon_cf_dma_finished()
647 cvmx_write_csr(cf_port->dma_base + DMA_CFG, dma_cfg.u64); in octeon_cf_dma_finished()
651 cvmx_write_csr(cf_port->dma_base + DMA_INT_EN, dma_int.u64); in octeon_cf_dma_finished()
655 cvmx_write_csr(cf_port->dma_base + DMA_INT, dma_int.u64); in octeon_cf_dma_finished()
674 struct octeon_cf_port *cf_port; in octeon_cf_interrupt() local
690 cf_port = ap->private_data; in octeon_cf_interrupt()
692 dma_int.u64 = cvmx_read_csr(cf_port->dma_base + DMA_INT); in octeon_cf_interrupt()
693 dma_cfg.u64 = cvmx_read_csr(cf_port->dma_base + DMA_CFG); in octeon_cf_interrupt()
707 cf_port->dma_finished = 1; in octeon_cf_interrupt()
710 if (!cf_port->dma_finished) in octeon_cf_interrupt()
723 cvmx_write_csr(cf_port->dma_base + DMA_INT, in octeon_cf_interrupt()
725 hrtimer_start_range_ns(&cf_port->delayed_finish, in octeon_cf_interrupt()
741 struct octeon_cf_port *cf_port = container_of(hrt, in octeon_cf_delayed_finish() local
744 struct ata_port *ap = cf_port->ap; in octeon_cf_delayed_finish()
758 if (ap->hsm_task_state != HSM_ST_LAST || !cf_port->dma_finished) in octeon_cf_delayed_finish()
850 struct octeon_cf_port *cf_port; in octeon_cf_probe() local
858 cf_port = devm_kzalloc(&pdev->dev, sizeof(*cf_port), GFP_KERNEL); in octeon_cf_probe()
859 if (!cf_port) in octeon_cf_probe()
862 cf_port->is_true_ide = of_property_read_bool(node, "cavium,true-ide"); in octeon_cf_probe()
877 cf_port->cs0 = be32_to_cpup(cs_num); in octeon_cf_probe()
879 if (cf_port->is_true_ide) { in octeon_cf_probe()
894 cf_port->dma_base = (u64)devm_ioremap_nocache(&pdev->dev, res_dma->start, in octeon_cf_probe()
896 if (!cf_port->dma_base) { in octeon_cf_probe()
921 cf_port->cs1 = be32_to_cpup(cs_num); in octeon_cf_probe()
939 ap->private_data = cf_port; in octeon_cf_probe()
940 pdev->dev.platform_data = cf_port; in octeon_cf_probe()
941 cf_port->ap = ap; in octeon_cf_probe()
954 } else if (cf_port->is_true_ide) { in octeon_cf_probe()
974 hrtimer_init(&cf_port->delayed_finish, CLOCK_MONOTONIC, in octeon_cf_probe()
976 cf_port->delayed_finish.function = octeon_cf_delayed_finish; in octeon_cf_probe()
993 cf_port->c0 = ap->ioaddr.ctl_addr; in octeon_cf_probe()
1003 cf_port->is_true_ide ? ", True IDE" : ""); in octeon_cf_probe()
1014 struct octeon_cf_port *cf_port = dev_get_platdata(dev); in octeon_cf_shutdown() local
1016 if (cf_port->dma_base) { in octeon_cf_shutdown()
1020 cvmx_write_csr(cf_port->dma_base + DMA_CFG, dma_cfg.u64); in octeon_cf_shutdown()
1024 cvmx_write_csr(cf_port->dma_base + DMA_INT_EN, dma_int.u64); in octeon_cf_shutdown()
1028 cvmx_write_csr(cf_port->dma_base + DMA_INT, dma_int.u64); in octeon_cf_shutdown()
1030 __raw_writeb(0, cf_port->c0); in octeon_cf_shutdown()
1032 __raw_writeb(ATA_SRST, cf_port->c0); in octeon_cf_shutdown()
1034 __raw_writeb(0, cf_port->c0); in octeon_cf_shutdown()