Lines Matching refs:hsdev
281 struct sata_dwc_device *hsdev; member
301 (hsdevp)->hsdev)
332 static int dma_dwc_init(struct sata_dwc_device *hsdev, int irq);
333 static void dma_dwc_exit(struct sata_dwc_device *hsdev);
463 struct sata_dwc_device *hsdev = in dma_dwc_interrupt() local
465 struct ata_host *host = (struct ata_host *)hsdev->host; in dma_dwc_interrupt()
534 static int dma_request_interrupts(struct sata_dwc_device *hsdev, int irq) in dma_request_interrupts() argument
549 retval = request_irq(irq, dma_dwc_interrupt, 0, "SATA DMA", hsdev); in dma_request_interrupts()
557 hsdev->irq_dma = irq; in dma_request_interrupts()
766 static void dma_dwc_exit(struct sata_dwc_device *hsdev) in dma_dwc_exit() argument
774 if (hsdev->irq_dma) { in dma_dwc_exit()
775 free_irq(hsdev->irq_dma, hsdev); in dma_dwc_exit()
776 hsdev->irq_dma = 0; in dma_dwc_exit()
786 static int dma_dwc_init(struct sata_dwc_device *hsdev, int irq) in dma_dwc_init() argument
790 err = dma_request_interrupts(hsdev, irq); in dma_dwc_init()
807 dma_dwc_exit(hsdev); in dma_dwc_init()
861 static void clear_interrupt_bit(struct sata_dwc_device *hsdev, u32 bit) in clear_interrupt_bit() argument
863 out_le32(&hsdev->sata_dwc_regs->intpr, in clear_interrupt_bit()
864 in_le32(&hsdev->sata_dwc_regs->intpr)); in clear_interrupt_bit()
874 struct sata_dwc_device *hsdev, uint intpr) in sata_dwc_error_intr() argument
900 clear_interrupt_bit(hsdev, SATA_DWC_INTPR_ERR); in sata_dwc_error_intr()
930 struct sata_dwc_device *hsdev = HSDEV_FROM_HOST(host); in sata_dwc_isr() local
943 intpr = in_le32(&hsdev->sata_dwc_regs->intpr); in sata_dwc_isr()
953 sata_dwc_error_intr(ap, hsdev, intpr); in sata_dwc_isr()
960 clear_interrupt_bit(hsdev, SATA_DWC_INTPR_NEWFP); in sata_dwc_isr()
962 tag = (u8)(in_le32(&hsdev->sata_dwc_regs->fptagr)); in sata_dwc_isr()
1145 struct sata_dwc_device *hsdev = HSDEV_FROM_HSDEVP(hsdevp); in sata_dwc_clear_dmacr() local
1148 out_le32(&(hsdev->sata_dwc_regs->dmacr), in sata_dwc_clear_dmacr()
1150 in_le32(&(hsdev->sata_dwc_regs->dmacr)))); in sata_dwc_clear_dmacr()
1152 out_le32(&(hsdev->sata_dwc_regs->dmacr), in sata_dwc_clear_dmacr()
1154 in_le32(&(hsdev->sata_dwc_regs->dmacr)))); in sata_dwc_clear_dmacr()
1164 in_le32(&(hsdev->sata_dwc_regs->dmacr))); in sata_dwc_clear_dmacr()
1165 out_le32(&(hsdev->sata_dwc_regs->dmacr), in sata_dwc_clear_dmacr()
1174 struct sata_dwc_device *hsdev = HSDEV_FROM_AP(ap); in sata_dwc_dma_xfer_complete() local
1190 in_le32(&(hsdev->sata_dwc_regs->dmacr))); in sata_dwc_dma_xfer_complete()
1198 in_le32(&(hsdev->sata_dwc_regs->dmacr))); in sata_dwc_dma_xfer_complete()
1237 static void sata_dwc_enable_interrupts(struct sata_dwc_device *hsdev) in sata_dwc_enable_interrupts() argument
1240 out_le32(&hsdev->sata_dwc_regs->intmr, in sata_dwc_enable_interrupts()
1249 out_le32(&hsdev->sata_dwc_regs->errmr, SATA_DWC_SERROR_ERR_BITS); in sata_dwc_enable_interrupts()
1252 __func__, in_le32(&hsdev->sata_dwc_regs->intmr), in sata_dwc_enable_interrupts()
1253 in_le32(&hsdev->sata_dwc_regs->errmr)); in sata_dwc_enable_interrupts()
1287 struct sata_dwc_device *hsdev; in sata_dwc_port_start() local
1292 hsdev = HSDEV_FROM_AP(ap); in sata_dwc_port_start()
1296 hsdev->host = ap->host; in sata_dwc_port_start()
1311 hsdevp->hsdev = hsdev; in sata_dwc_port_start()
1339 out_le32(&hsdev->sata_dwc_regs->dmacr, in sata_dwc_port_start()
1344 out_le32(&hsdev->sata_dwc_regs->dbtsr, in sata_dwc_port_start()
1365 struct sata_dwc_device *hsdev = HSDEV_FROM_AP(ap); in sata_dwc_port_stop() local
1370 if (hsdevp && hsdev) { in sata_dwc_port_stop()
1436 struct sata_dwc_device *hsdev = HSDEV_FROM_QC(qc); in sata_dwc_bmdma_start_by_tag() local
1468 out_le32(&hsdev->sata_dwc_regs->dmacr, in sata_dwc_bmdma_start_by_tag()
1471 out_le32(&hsdev->sata_dwc_regs->dmacr, in sata_dwc_bmdma_start_by_tag()
1504 struct sata_dwc_device *hsdev = HSDEV_FROM_AP(ap); in sata_dwc_qc_prep_by_tag() local
1513 (void *__iomem)(&hsdev->sata_dwc_regs->\ in sata_dwc_qc_prep_by_tag()
1632 struct sata_dwc_device *hsdev; in sata_dwc_probe() local
1643 hsdev = kzalloc(sizeof(*hsdev), GFP_KERNEL); in sata_dwc_probe()
1644 if (hsdev == NULL) { in sata_dwc_probe()
1658 hsdev->reg_base = base; in sata_dwc_probe()
1662 hsdev->sata_dwc_regs = (void *__iomem)(base + SATA_DWC_REG_OFFSET); in sata_dwc_probe()
1672 host->private_data = hsdev; in sata_dwc_probe()
1681 idr = in_le32(&hsdev->sata_dwc_regs->idr); in sata_dwc_probe()
1682 versionr = in_le32(&hsdev->sata_dwc_regs->versionr); in sata_dwc_probe()
1707 dma_dwc_init(hsdev, irq); in sata_dwc_probe()
1710 sata_dwc_enable_interrupts(hsdev); in sata_dwc_probe()
1735 dma_dwc_exit(hsdev); in sata_dwc_probe()
1740 kfree(hsdev); in sata_dwc_probe()
1749 struct sata_dwc_device *hsdev = host->private_data; in sata_dwc_remove() local
1755 dma_dwc_exit(hsdev); in sata_dwc_remove()
1757 iounmap(hsdev->reg_base); in sata_dwc_remove()
1758 kfree(hsdev); in sata_dwc_remove()