Lines Matching +full:host +full:- +full:controller
1 // SPDX-License-Identifier: GPL-2.0-or-later
10 * Copyright (c) 2006-2007, 2011-2012 Freescale Semiconductor, Inc.
35 /* Controller information */
39 SATA_FSL_MAX_PRD_USABLE = SATA_FSL_MAX_PRD - 1,
51 * SATA-FSL host controller supports a max. of (15+1) direct PRDEs, and
83 * (one port per controller)
84 * MPC837x has 2/4 controllers, one port per controller
96 ICC_MAX_INT_COUNT_THRESHOLD = ((1 << 5) - 1),
98 ICC_MAX_INT_TICKS_THRESHOLD = ((1 << 19) - 1),
103 * Host Controller command register set - per port
119 * Host Status Register (HStatus) bitdefs
158 * Host Control Register (HControl) bitdefs
209 /* TRANSCFG (transport-layer) configuration control */
214 /* PHY (link-layer) configuration control */
254 u32 prdt_indirect[(SATA_FSL_MAX_PRD - SATA_FSL_MAX_PRD_DIRECT) * 4];
269 * This is our per-port instance data.
279 * ata_port->host_set private data
291 static void fsl_sata_set_irq_coalescing(struct ata_host *host, in fsl_sata_set_irq_coalescing() argument
294 struct sata_fsl_host_priv *host_priv = host->private_data; in fsl_sata_set_irq_coalescing()
295 void __iomem *hcr_base = host_priv->hcr_base; in fsl_sata_set_irq_coalescing()
309 spin_lock_irqsave(&host->lock, flags); in fsl_sata_set_irq_coalescing()
314 spin_unlock_irqrestore(&host->lock, flags); in fsl_sata_set_irq_coalescing()
316 dev_dbg(host->dev, "interrupt coalescing, count = 0x%x, ticks = %x\n", in fsl_sata_set_irq_coalescing()
318 dev_dbg(host->dev, "ICC register status: (hcr base: 0x%p) = 0x%x\n", in fsl_sata_set_irq_coalescing()
336 dev_err(dev, "fsl-sata: wrong parameter format.\n"); in fsl_sata_intr_coalescing_store()
337 return -EINVAL; in fsl_sata_intr_coalescing_store()
351 struct ata_host *host = dev_get_drvdata(dev); in fsl_sata_rx_watermark_show() local
352 struct sata_fsl_host_priv *host_priv = host->private_data; in fsl_sata_rx_watermark_show()
353 void __iomem *csr_base = host_priv->csr_base; in fsl_sata_rx_watermark_show()
355 spin_lock_irqsave(&host->lock, flags); in fsl_sata_rx_watermark_show()
358 spin_unlock_irqrestore(&host->lock, flags); in fsl_sata_rx_watermark_show()
369 struct ata_host *host = dev_get_drvdata(dev); in fsl_sata_rx_watermark_store() local
370 struct sata_fsl_host_priv *host_priv = host->private_data; in fsl_sata_rx_watermark_store()
371 void __iomem *csr_base = host_priv->csr_base; in fsl_sata_rx_watermark_store()
375 dev_err(dev, "fsl-sata: wrong parameter format.\n"); in fsl_sata_rx_watermark_store()
376 return -EINVAL; in fsl_sata_rx_watermark_store()
379 spin_lock_irqsave(&host->lock, flags); in fsl_sata_rx_watermark_store()
383 spin_unlock_irqrestore(&host->lock, flags); in fsl_sata_rx_watermark_store()
415 cmd_descriptor_address = pp->cmdentry_paddr + in sata_fsl_setup_cmd_hdr_entry()
420 pp->cmdslot[tag].cda = cpu_to_le32(cmd_descriptor_address); in sata_fsl_setup_cmd_hdr_entry()
421 pp->cmdslot[tag].prde_fis_len = in sata_fsl_setup_cmd_hdr_entry()
423 pp->cmdslot[tag].ttl = cpu_to_le32(data_xfer_len & ~0x03); in sata_fsl_setup_cmd_hdr_entry()
424 pp->cmdslot[tag].desc_info = cpu_to_le32(desc_info | (tag & 0x1F)); in sata_fsl_setup_cmd_hdr_entry()
427 le32_to_cpu(pp->cmdslot[tag].cda), in sata_fsl_setup_cmd_hdr_entry()
428 le32_to_cpu(pp->cmdslot[tag].prde_fis_len), in sata_fsl_setup_cmd_hdr_entry()
429 le32_to_cpu(pp->cmdslot[tag].ttl), in sata_fsl_setup_cmd_hdr_entry()
430 le32_to_cpu(pp->cmdslot[tag].desc_info)); in sata_fsl_setup_cmd_hdr_entry()
445 cmd_desc)->prdt; in sata_fsl_fill_sg()
455 for_each_sg(qc->sg, sg, qc->n_elem, si) { in sata_fsl_fill_sg()
461 ata_port_err(qc->ap, "s/g addr unaligned : 0x%llx\n", in sata_fsl_fill_sg()
464 ata_port_err(qc->ap, "s/g len unaligned : 0x%x\n", in sata_fsl_fill_sg()
467 if (num_prde == (SATA_FSL_MAX_PRD_DIRECT - 1) && in sata_fsl_fill_sg()
470 prd->dba = cpu_to_le32(indirect_ext_segment_paddr); in sata_fsl_fill_sg()
477 prd->dba = cpu_to_le32(sg_addr); in sata_fsl_fill_sg()
478 prd->ddc_and_ext = cpu_to_le32(data_snoop | (sg_len & ~0x03)); in sata_fsl_fill_sg()
488 prd_ptr_to_indirect_ext->ddc_and_ext = in sata_fsl_fill_sg()
500 struct ata_port *ap = qc->ap; in sata_fsl_qc_prep()
501 struct sata_fsl_port_priv *pp = ap->private_data; in sata_fsl_qc_prep()
502 struct sata_fsl_host_priv *host_priv = ap->host->private_data; in sata_fsl_qc_prep()
503 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_qc_prep()
504 unsigned int tag = sata_fsl_tag(ap, qc->hw_tag, hcr_base); in sata_fsl_qc_prep()
511 cd = (struct command_desc *)pp->cmdentry + tag; in sata_fsl_qc_prep()
512 cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE; in sata_fsl_qc_prep()
514 ata_tf_to_fis(&qc->tf, qc->dev->link->pmp, 1, (u8 *) &cd->cfis); in sata_fsl_qc_prep()
516 /* setup "ACMD - atapi command" in cmd. desc. if this is ATAPI cmd */ in sata_fsl_qc_prep()
517 if (ata_is_atapi(qc->tf.protocol)) { in sata_fsl_qc_prep()
519 memset(&cd->cdb, 0, sizeof(cd->cdb)); in sata_fsl_qc_prep()
520 memcpy(&cd->cdb, qc->cdb, qc->dev->cdb_len); in sata_fsl_qc_prep()
523 if (qc->flags & ATA_QCFLAG_DMAMAP) in sata_fsl_qc_prep()
526 host_priv->data_snoop); in sata_fsl_qc_prep()
528 if (qc->tf.protocol == ATA_PROT_NCQ) in sata_fsl_qc_prep()
542 struct ata_port *ap = qc->ap; in sata_fsl_qc_issue()
543 struct sata_fsl_host_priv *host_priv = ap->host->private_data; in sata_fsl_qc_issue()
544 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_qc_issue()
545 unsigned int tag = sata_fsl_tag(ap, qc->hw_tag, hcr_base); in sata_fsl_qc_issue()
552 iowrite32(qc->dev->link->pmp, CQPMP + hcr_base); in sata_fsl_qc_issue()
554 /* Simply queue command to the controller/device */ in sata_fsl_qc_issue()
564 ioread32(COMMANDSTAT + host_priv->csr_base)); in sata_fsl_qc_issue()
571 struct sata_fsl_port_priv *pp = qc->ap->private_data; in sata_fsl_qc_fill_rtf()
572 struct sata_fsl_host_priv *host_priv = qc->ap->host->private_data; in sata_fsl_qc_fill_rtf()
573 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_qc_fill_rtf()
574 unsigned int tag = sata_fsl_tag(qc->ap, qc->hw_tag, hcr_base); in sata_fsl_qc_fill_rtf()
577 cd = pp->cmdentry + tag; in sata_fsl_qc_fill_rtf()
579 ata_tf_from_fis(cd->sfis, &qc->result_tf); in sata_fsl_qc_fill_rtf()
586 struct sata_fsl_host_priv *host_priv = link->ap->host->private_data; in sata_fsl_scr_write()
587 void __iomem *ssr_base = host_priv->ssr_base; in sata_fsl_scr_write()
598 return -EINVAL; in sata_fsl_scr_write()
610 struct sata_fsl_host_priv *host_priv = link->ap->host->private_data; in sata_fsl_scr_read()
611 void __iomem *ssr_base = host_priv->ssr_base; in sata_fsl_scr_read()
622 return -EINVAL; in sata_fsl_scr_read()
633 struct sata_fsl_host_priv *host_priv = ap->host->private_data; in sata_fsl_freeze()
634 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_freeze()
642 ioread32(host_priv->csr_base + COMMANDSTAT)); in sata_fsl_freeze()
644 /* disable interrupts on the controller/port */ in sata_fsl_freeze()
654 struct sata_fsl_host_priv *host_priv = ap->host->private_data; in sata_fsl_thaw()
655 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_thaw()
658 /* ack. any pending IRQs for this controller/port */ in sata_fsl_thaw()
666 /* enable interrupts on the controller/port */ in sata_fsl_thaw()
676 struct sata_fsl_host_priv *host_priv = ap->host->private_data; in sata_fsl_pmp_attach()
677 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_pmp_attach()
686 struct sata_fsl_host_priv *host_priv = ap->host->private_data; in sata_fsl_pmp_detach()
687 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_pmp_detach()
694 /* enable interrupts on the controller/port */ in sata_fsl_pmp_detach()
702 struct device *dev = ap->host->dev; in sata_fsl_port_start()
706 struct sata_fsl_host_priv *host_priv = ap->host->private_data; in sata_fsl_port_start()
707 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_port_start()
712 return -ENOMEM; in sata_fsl_port_start()
718 return -ENOMEM; in sata_fsl_port_start()
721 pp->cmdslot = mem; in sata_fsl_port_start()
722 pp->cmdslot_paddr = mem_dma; in sata_fsl_port_start()
727 pp->cmdentry = mem; in sata_fsl_port_start()
728 pp->cmdentry_paddr = mem_dma; in sata_fsl_port_start()
730 ap->private_data = pp; in sata_fsl_port_start()
733 (unsigned long)pp->cmdslot_paddr, in sata_fsl_port_start()
734 (unsigned long)pp->cmdentry_paddr); in sata_fsl_port_start()
736 /* Now, update the CHBA register in host controller cmd register set */ in sata_fsl_port_start()
737 iowrite32(pp->cmdslot_paddr & 0xffffffff, hcr_base + CHBA); in sata_fsl_port_start()
740 * Now, we can bring the controller on-line & also initiate in sata_fsl_port_start()
741 * the COMINIT sequence, we simply return here and the boot-probing in sata_fsl_port_start()
742 * & device discovery process is re-initiated by libATA using a in sata_fsl_port_start()
759 struct device *dev = ap->host->dev; in sata_fsl_port_stop()
760 struct sata_fsl_port_priv *pp = ap->private_data; in sata_fsl_port_stop()
761 struct sata_fsl_host_priv *host_priv = ap->host->private_data; in sata_fsl_port_stop()
762 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_port_stop()
766 * Force host controller to go off-line, aborting current operations in sata_fsl_port_stop()
773 /* Poll for controller to go offline - should happen immediately */ in sata_fsl_port_stop()
776 ap->private_data = NULL; in sata_fsl_port_stop()
778 pp->cmdslot, pp->cmdslot_paddr); in sata_fsl_port_stop()
785 struct sata_fsl_host_priv *host_priv = ap->host->private_data; in sata_fsl_dev_classify()
786 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_dev_classify()
806 struct ata_port *ap = link->ap; in sata_fsl_hardreset()
807 struct sata_fsl_host_priv *host_priv = ap->host->private_data; in sata_fsl_hardreset()
808 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_hardreset()
815 * Force host controller to go off-line, aborting current operations in sata_fsl_hardreset()
821 /* Poll for controller to go offline */ in sata_fsl_hardreset()
826 ata_port_err(ap, "Hardreset failed, not off-lined %d\n", i); in sata_fsl_hardreset()
829 * Try to offline controller atleast twice in sata_fsl_hardreset()
838 ata_port_dbg(ap, "hardreset, controller off-lined\n" in sata_fsl_hardreset()
851 * Now, bring the host controller online again, this can take time in sata_fsl_hardreset()
854 * NOTE : Host online status may be indicated immediately!! in sata_fsl_hardreset()
865 ata_port_err(ap, "Hardreset failed, not on-lined\n"); in sata_fsl_hardreset()
869 ata_port_dbg(ap, "controller off-lined & on-lined\n" in sata_fsl_hardreset()
893 500, jiffies_to_msecs(deadline - start_jiffies)); in sata_fsl_hardreset()
901 jiffies_to_msecs(jiffies - start_jiffies)); in sata_fsl_hardreset()
908 * request libATA to perform follow-up softreset in sata_fsl_hardreset()
910 return -EAGAIN; in sata_fsl_hardreset()
913 return -EIO; in sata_fsl_hardreset()
919 struct ata_port *ap = link->ap; in sata_fsl_softreset()
920 struct sata_fsl_port_priv *pp = ap->private_data; in sata_fsl_softreset()
921 struct sata_fsl_host_priv *host_priv = ap->host->private_data; in sata_fsl_softreset()
922 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_softreset()
942 ata_tf_init(link->device, &tf); in sata_fsl_softreset()
943 cfis = (u8 *) &pp->cmdentry->cfis; in sata_fsl_softreset()
956 * Queue SRST command to the controller/device, ensure that no in sata_fsl_softreset()
957 * other commands are active on the controller/device in sata_fsl_softreset()
977 sata_fsl_scr_read(&ap->link, SCR_ERROR, &Serror); in sata_fsl_softreset()
993 * using ATA signature D2H register FIS to the host controller. in sata_fsl_softreset()
1035 return -EIO; in sata_fsl_softreset()
1045 if (qc->flags & ATA_QCFLAG_FAILED) in sata_fsl_post_internal_cmd()
1046 qc->err_mask |= AC_ERR_OTHER; in sata_fsl_post_internal_cmd()
1048 if (qc->err_mask) { in sata_fsl_post_internal_cmd()
1056 struct sata_fsl_host_priv *host_priv = ap->host->private_data; in sata_fsl_error_intr()
1057 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_error_intr()
1068 /* first, analyze and record host port events */ in sata_fsl_error_intr()
1069 link = &ap->link; in sata_fsl_error_intr()
1070 ehi = &link->eh_info; in sata_fsl_error_intr()
1077 sata_fsl_scr_read(&ap->link, SCR_ERROR, &SError); in sata_fsl_error_intr()
1079 sata_fsl_scr_write(&ap->link, SCR_ERROR, SError); in sata_fsl_error_intr()
1086 ehi->err_mask |= AC_ERR_ATA_BUS; in sata_fsl_error_intr()
1087 ehi->action |= ATA_EH_SOFTRESET; in sata_fsl_error_intr()
1100 /* Setup a soft-reset EH action */ in sata_fsl_error_intr()
1112 * host controller and at the device are considered aborted in sata_fsl_error_intr()
1123 if (ap->nr_pmp_links) { in sata_fsl_error_intr()
1130 dev_num = ffs(dereg) - 1; in sata_fsl_error_intr()
1131 if (dev_num < ap->nr_pmp_links && dereg != 0) { in sata_fsl_error_intr()
1132 link = &ap->pmp_link[dev_num]; in sata_fsl_error_intr()
1133 ehi = &link->eh_info; in sata_fsl_error_intr()
1134 qc = ata_qc_from_tag(ap, link->active_tag); in sata_fsl_error_intr()
1152 qc = ata_qc_from_tag(ap, link->active_tag); in sata_fsl_error_intr()
1163 qc->err_mask |= err_mask; in sata_fsl_error_intr()
1165 ehi->err_mask |= err_mask; in sata_fsl_error_intr()
1167 ehi->action |= action; in sata_fsl_error_intr()
1174 ata_link_abort(qc->dev->link); in sata_fsl_error_intr()
1182 struct sata_fsl_host_priv *host_priv = ap->host->private_data; in sata_fsl_host_intr()
1183 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_host_intr()
1192 sata_fsl_scr_read(&ap->link, SCR_ERROR, &SError); in sata_fsl_host_intr()
1200 if (qc && ata_is_atapi(qc->tf.protocol)) { in sata_fsl_host_intr()
1212 sata_fsl_scr_write(&ap->link, SCR_ERROR, in sata_fsl_host_intr()
1240 ap->qc_active); in sata_fsl_host_intr()
1242 if (done_mask & ap->qc_active) { in sata_fsl_host_intr()
1260 } else if ((ap->qc_active & (1ULL << ATA_TAG_INTERNAL))) { in sata_fsl_host_intr()
1264 ata_port_dbg(ap, "completing non-ncq cmd, CC=0x%x\n", in sata_fsl_host_intr()
1281 struct ata_host *host = dev_instance; in sata_fsl_interrupt() local
1282 struct sata_fsl_host_priv *host_priv = host->private_data; in sata_fsl_interrupt()
1283 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_interrupt()
1288 /* ack. any pending IRQs for this controller/port */ in sata_fsl_interrupt()
1295 spin_lock(&host->lock); in sata_fsl_interrupt()
1297 /* Assuming one port per host controller */ in sata_fsl_interrupt()
1299 ap = host->ports[0]; in sata_fsl_interrupt()
1303 dev_warn(host->dev, "interrupt on disabled port 0\n"); in sata_fsl_interrupt()
1309 spin_unlock(&host->lock); in sata_fsl_interrupt()
1316 * one port per controller
1318 static int sata_fsl_init_controller(struct ata_host *host) in sata_fsl_init_controller() argument
1320 struct sata_fsl_host_priv *host_priv = host->private_data; in sata_fsl_init_controller()
1321 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_init_controller()
1325 * NOTE : We cannot bring the controller online before setting in sata_fsl_init_controller()
1326 * the CHBA, hence main controller initialization is done as in sata_fsl_init_controller()
1330 /* sata controller to operate in enterprise mode */ in sata_fsl_init_controller()
1334 /* ack. any pending IRQs for this controller/port */ in sata_fsl_init_controller()
1339 /* Keep interrupts disabled on the controller */ in sata_fsl_init_controller()
1344 dev_dbg(host->dev, "icc = 0x%x\n", ioread32(hcr_base + ICC)); in sata_fsl_init_controller()
1355 fsl_sata_set_irq_coalescing(host, intr_coalescing_count, in sata_fsl_init_controller()
1359 * host controller will be brought on-line, during xx_port_start() in sata_fsl_init_controller()
1363 dev_dbg(host->dev, "HStatus = 0x%x HControl = 0x%x\n", in sata_fsl_init_controller()
1369 static void sata_fsl_host_stop(struct ata_host *host) in sata_fsl_host_stop() argument
1371 struct sata_fsl_host_priv *host_priv = host->private_data; in sata_fsl_host_stop()
1373 iounmap(host_priv->hcr_base); in sata_fsl_host_stop()
1378 * scsi mid-layer and libata interface structures
1425 int retval = -ENXIO; in sata_fsl_probe()
1431 struct ata_host *host = NULL; in sata_fsl_probe() local
1437 dev_info(&ofdev->dev, "Sata FSL Platform/CSB Driver init\n"); in sata_fsl_probe()
1439 hcr_base = of_iomap(ofdev->dev.of_node, 0); in sata_fsl_probe()
1446 if (!of_device_is_compatible(ofdev->dev.of_node, "fsl,mpc8315-sata")) { in sata_fsl_probe()
1452 dev_dbg(&ofdev->dev, "@reset i/o = 0x%x\n", in sata_fsl_probe()
1459 host_priv->hcr_base = hcr_base; in sata_fsl_probe()
1460 host_priv->ssr_base = ssr_base; in sata_fsl_probe()
1461 host_priv->csr_base = csr_base; in sata_fsl_probe()
1468 host_priv->irq = irq; in sata_fsl_probe()
1470 if (of_device_is_compatible(ofdev->dev.of_node, "fsl,pq-sata-v2")) in sata_fsl_probe()
1471 host_priv->data_snoop = DATA_SNOOP_ENABLE_V2; in sata_fsl_probe()
1473 host_priv->data_snoop = DATA_SNOOP_ENABLE_V1; in sata_fsl_probe()
1475 /* allocate host structure */ in sata_fsl_probe()
1476 host = ata_host_alloc_pinfo(&ofdev->dev, ppi, SATA_FSL_MAX_PORTS); in sata_fsl_probe()
1477 if (!host) { in sata_fsl_probe()
1478 retval = -ENOMEM; in sata_fsl_probe()
1482 /* host->iomap is not used currently */ in sata_fsl_probe()
1483 host->private_data = host_priv; in sata_fsl_probe()
1485 /* initialize host controller */ in sata_fsl_probe()
1486 sata_fsl_init_controller(host); in sata_fsl_probe()
1493 ata_host_activate(host, irq, sata_fsl_interrupt, SATA_FSL_IRQ_FLAG, in sata_fsl_probe()
1496 host_priv->intr_coalescing.show = fsl_sata_intr_coalescing_show; in sata_fsl_probe()
1497 host_priv->intr_coalescing.store = fsl_sata_intr_coalescing_store; in sata_fsl_probe()
1498 sysfs_attr_init(&host_priv->intr_coalescing.attr); in sata_fsl_probe()
1499 host_priv->intr_coalescing.attr.name = "intr_coalescing"; in sata_fsl_probe()
1500 host_priv->intr_coalescing.attr.mode = S_IRUGO | S_IWUSR; in sata_fsl_probe()
1501 retval = device_create_file(host->dev, &host_priv->intr_coalescing); in sata_fsl_probe()
1505 host_priv->rx_watermark.show = fsl_sata_rx_watermark_show; in sata_fsl_probe()
1506 host_priv->rx_watermark.store = fsl_sata_rx_watermark_store; in sata_fsl_probe()
1507 sysfs_attr_init(&host_priv->rx_watermark.attr); in sata_fsl_probe()
1508 host_priv->rx_watermark.attr.name = "rx_watermark"; in sata_fsl_probe()
1509 host_priv->rx_watermark.attr.mode = S_IRUGO | S_IWUSR; in sata_fsl_probe()
1510 retval = device_create_file(host->dev, &host_priv->rx_watermark); in sata_fsl_probe()
1512 device_remove_file(&ofdev->dev, &host_priv->intr_coalescing); in sata_fsl_probe()
1520 if (host) in sata_fsl_probe()
1521 ata_host_detach(host); in sata_fsl_probe()
1532 struct ata_host *host = platform_get_drvdata(ofdev); in sata_fsl_remove() local
1533 struct sata_fsl_host_priv *host_priv = host->private_data; in sata_fsl_remove()
1535 device_remove_file(&ofdev->dev, &host_priv->intr_coalescing); in sata_fsl_remove()
1536 device_remove_file(&ofdev->dev, &host_priv->rx_watermark); in sata_fsl_remove()
1538 ata_host_detach(host); in sata_fsl_remove()
1546 struct ata_host *host = platform_get_drvdata(op); in sata_fsl_suspend() local
1548 ata_host_suspend(host, state); in sata_fsl_suspend()
1554 struct ata_host *host = platform_get_drvdata(op); in sata_fsl_resume() local
1555 struct sata_fsl_host_priv *host_priv = host->private_data; in sata_fsl_resume()
1557 void __iomem *hcr_base = host_priv->hcr_base; in sata_fsl_resume()
1558 struct ata_port *ap = host->ports[0]; in sata_fsl_resume()
1559 struct sata_fsl_port_priv *pp = ap->private_data; in sata_fsl_resume()
1561 ret = sata_fsl_init_controller(host); in sata_fsl_resume()
1563 dev_err(&op->dev, "Error initializing hardware\n"); in sata_fsl_resume()
1567 /* Recovery the CHBA register in host controller cmd register set */ in sata_fsl_resume()
1568 iowrite32(pp->cmdslot_paddr & 0xffffffff, hcr_base + CHBA); in sata_fsl_resume()
1576 ata_host_resume(host); in sata_fsl_resume()
1582 { .compatible = "fsl,pq-sata", },
1583 { .compatible = "fsl,pq-sata-v2", },
1591 .name = "fsl-sata",
1606 MODULE_DESCRIPTION("Freescale 3.0Gbps SATA controller low level driver");