Lines Matching +full:host +full:- +full:to +full:- +full:chip
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * sata_sx4.c - Promise SATA
6 * Please ALWAYS copy linux-ide@vger.kernel.org
9 * Copyright 2003-2004 Red Hat, Inc.
12 * as Documentation/driver-api/libata.rst
19 -------------------
21 The SX4 (PDC20621) chip features a single Host DMA (HDMA) copy
23 Data is copied to/from DIMM memory by the HDMA engine, before
24 handing off to one (or more) of the ATA engines. The ATA
27 The SX4 behaves like a PATA chip, with no SATA controls or
28 knowledge whatsoever, leading to the presumption that
29 PATA<->SATA bridges exist on SX4 boards, external to the
30 PDC20621 chip itself.
32 The chip is quite capable, supporting an XOR engine and linked
33 hardware commands (permits a string to transactions to be
34 submitted and waited-on as a single unit), and an optional
38 written to multiplex the single HDMA engine to copy disk
42 submit HDMA packet to hardware
43 hardware copies data from system memory to DIMM
46 submit ATA packet to hardware
52 submit ATA packet to hardware
56 submit HDMA packet to hardware
57 hardware copies data from DIMM to system memory
60 This is a very slow, lock-step way of doing things that can
92 PDC_HDMA_PKT_SUBMIT = 0x100, /* Host DMA packet pointer addr */
94 PDC_HDMA_CTLSTAT = 0x12C, /* Host DMA control / status */
120 PDC_CHIP0_OFS = 0xC0000, /* offset of chip #0 */
132 PDC_HDMA_Q_MASK = (PDC_MAX_HDMA - 1),
141 PDC_I2C_WRITE = 0, /* master -> slave */
142 PDC_I2C_READ = (1 << 6), /* master <- slave */
146 PDC_I2C_NO_ACK = (1 << 20), /* slave no-ack addr */
211 static unsigned int pdc20621_dimm_init(struct ata_host *host);
212 static int pdc20621_detect_dimm(struct ata_host *host);
213 static unsigned int pdc20621_i2c_read(struct ata_host *host,
215 static int pdc20621_prog_dimm0(struct ata_host *host);
216 static unsigned int pdc20621_prog_dimm_global(struct ata_host *host);
217 static void pdc20621_get_from_dimm(struct ata_host *host,
219 static void pdc20621_put_to_dimm(struct ata_host *host,
285 struct device *dev = ap->host->dev; in pdc_port_start()
290 return -ENOMEM; in pdc_port_start()
292 pp->pkt = dmam_alloc_coherent(dev, 128, &pp->pkt_dma, GFP_KERNEL); in pdc_port_start()
293 if (!pp->pkt) in pdc_port_start()
294 return -ENOMEM; in pdc_port_start()
296 ap->private_data = pp; in pdc_port_start()
323 /* output Host DMA packet S/G table */ in pdc20621_host_sg()
348 if ((tf->protocol == ATA_PROT_DMA) && (!(tf->flags & ATA_TFLAG_WRITE))) in pdc20621_ata_pkt()
350 else if (tf->protocol == ATA_PROT_NODATA) in pdc20621_ata_pkt()
358 /* dimm dma S/G, and next-pkt */ in pdc20621_ata_pkt()
360 if (tf->protocol == ATA_PROT_NODATA) in pdc20621_ata_pkt()
378 buf[i++] = tf->ctl; in pdc20621_ata_pkt()
400 * Set up Host DMA packet in pdc20621_host_pkt()
402 if ((tf->protocol == ATA_PROT_DMA) && (!(tf->flags & ATA_TFLAG_WRITE))) in pdc20621_host_pkt()
417 struct ata_port *ap = qc->ap; in pdc20621_dma_prep()
418 struct pdc_port_priv *pp = ap->private_data; in pdc20621_dma_prep()
419 void __iomem *mmio = ap->host->iomap[PDC_MMIO_BAR]; in pdc20621_dma_prep()
420 void __iomem *dimm_mmio = ap->host->iomap[PDC_DIMM_BAR]; in pdc20621_dma_prep()
421 unsigned int portno = ap->port_no; in pdc20621_dma_prep()
423 __le32 *buf = (__le32 *) &pp->dimm_buf[PDC_DIMM_HEADER_SZ]; in pdc20621_dma_prep()
425 WARN_ON(!(qc->flags & ATA_QCFLAG_DMAMAP)); in pdc20621_dma_prep()
427 /* hard-code chip #0 */ in pdc20621_dma_prep()
434 for_each_sg(qc->sg, sg, qc->n_elem, si) { in pdc20621_dma_prep()
439 buf[idx - 1] |= cpu_to_le32(ATA_PRD_EOT); in pdc20621_dma_prep()
443 * Build ATA, host DMA packets in pdc20621_dma_prep()
445 pdc20621_host_sg(&pp->dimm_buf[0], portno, total_len); in pdc20621_dma_prep()
446 pdc20621_host_pkt(&qc->tf, &pp->dimm_buf[0], portno); in pdc20621_dma_prep()
448 pdc20621_ata_sg(&pp->dimm_buf[0], portno, total_len); in pdc20621_dma_prep()
449 i = pdc20621_ata_pkt(&qc->tf, qc->dev->devno, &pp->dimm_buf[0], portno); in pdc20621_dma_prep()
451 if (qc->tf.flags & ATA_TFLAG_LBA48) in pdc20621_dma_prep()
452 i = pdc_prep_lba48(&qc->tf, &pp->dimm_buf[0], i); in pdc20621_dma_prep()
454 i = pdc_prep_lba28(&qc->tf, &pp->dimm_buf[0], i); in pdc20621_dma_prep()
456 pdc_pkt_footer(&qc->tf, &pp->dimm_buf[0], i); in pdc20621_dma_prep()
458 /* copy three S/G tables and two packets to DIMM MMIO window */ in pdc20621_dma_prep()
460 &pp->dimm_buf, PDC_DIMM_HEADER_SZ); in pdc20621_dma_prep()
463 &pp->dimm_buf[PDC_DIMM_HEADER_SZ], sgt_len); in pdc20621_dma_prep()
465 /* force host FIFO dump */ in pdc20621_dma_prep()
476 struct ata_port *ap = qc->ap; in pdc20621_nodata_prep()
477 struct pdc_port_priv *pp = ap->private_data; in pdc20621_nodata_prep()
478 void __iomem *mmio = ap->host->iomap[PDC_MMIO_BAR]; in pdc20621_nodata_prep()
479 void __iomem *dimm_mmio = ap->host->iomap[PDC_DIMM_BAR]; in pdc20621_nodata_prep()
480 unsigned int portno = ap->port_no; in pdc20621_nodata_prep()
483 /* hard-code chip #0 */ in pdc20621_nodata_prep()
486 i = pdc20621_ata_pkt(&qc->tf, qc->dev->devno, &pp->dimm_buf[0], portno); in pdc20621_nodata_prep()
488 if (qc->tf.flags & ATA_TFLAG_LBA48) in pdc20621_nodata_prep()
489 i = pdc_prep_lba48(&qc->tf, &pp->dimm_buf[0], i); in pdc20621_nodata_prep()
491 i = pdc_prep_lba28(&qc->tf, &pp->dimm_buf[0], i); in pdc20621_nodata_prep()
493 pdc_pkt_footer(&qc->tf, &pp->dimm_buf[0], i); in pdc20621_nodata_prep()
495 /* copy three S/G tables and two packets to DIMM MMIO window */ in pdc20621_nodata_prep()
497 &pp->dimm_buf, PDC_DIMM_HEADER_SZ); in pdc20621_nodata_prep()
499 /* force host FIFO dump */ in pdc20621_nodata_prep()
509 switch (qc->tf.protocol) { in pdc20621_qc_prep()
527 struct ata_port *ap = qc->ap; in __pdc20621_push_hdma()
528 struct ata_host *host = ap->host; in __pdc20621_push_hdma() local
529 void __iomem *mmio = host->iomap[PDC_MMIO_BAR]; in __pdc20621_push_hdma()
531 /* hard-code chip #0 */ in __pdc20621_push_hdma()
545 struct ata_port *ap = qc->ap; in pdc20621_push_hdma()
546 struct pdc_host_priv *pp = ap->host->private_data; in pdc20621_push_hdma()
547 unsigned int idx = pp->hdma_prod & PDC_HDMA_Q_MASK; in pdc20621_push_hdma()
549 if (!pp->doing_hdma) { in pdc20621_push_hdma()
551 pp->doing_hdma = 1; in pdc20621_push_hdma()
555 pp->hdma[idx].qc = qc; in pdc20621_push_hdma()
556 pp->hdma[idx].seq = seq; in pdc20621_push_hdma()
557 pp->hdma[idx].pkt_ofs = pkt_ofs; in pdc20621_push_hdma()
558 pp->hdma_prod++; in pdc20621_push_hdma()
563 struct ata_port *ap = qc->ap; in pdc20621_pop_hdma()
564 struct pdc_host_priv *pp = ap->host->private_data; in pdc20621_pop_hdma()
565 unsigned int idx = pp->hdma_cons & PDC_HDMA_Q_MASK; in pdc20621_pop_hdma()
568 if (pp->hdma_prod == pp->hdma_cons) { in pdc20621_pop_hdma()
569 pp->doing_hdma = 0; in pdc20621_pop_hdma()
573 __pdc20621_push_hdma(pp->hdma[idx].qc, pp->hdma[idx].seq, in pdc20621_pop_hdma()
574 pp->hdma[idx].pkt_ofs); in pdc20621_pop_hdma()
575 pp->hdma_cons++; in pdc20621_pop_hdma()
580 struct ata_port *ap = qc->ap; in pdc20621_dump_hdma()
581 unsigned int port_no = ap->port_no; in pdc20621_dump_hdma()
582 void __iomem *dimm_mmio = ap->host->iomap[PDC_DIMM_BAR]; in pdc20621_dump_hdma()
594 struct ata_port *ap = qc->ap; in pdc20621_packet_start()
595 struct ata_host *host = ap->host; in pdc20621_packet_start() local
596 unsigned int port_no = ap->port_no; in pdc20621_packet_start()
597 void __iomem *mmio = host->iomap[PDC_MMIO_BAR]; in pdc20621_packet_start()
598 unsigned int rw = (qc->tf.flags & ATA_TFLAG_WRITE); in pdc20621_packet_start()
602 /* hard-code chip #0 */ in pdc20621_packet_start()
609 /* if writing, we (1) DMA to DIMM, then (2) do ATA command */ in pdc20621_packet_start()
610 if (rw && qc->tf.protocol == ATA_PROT_DMA) { in pdc20621_packet_start()
624 ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); in pdc20621_packet_start()
625 readl(ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); in pdc20621_packet_start()
635 switch (qc->tf.protocol) { in pdc20621_qc_issue()
637 if (qc->tf.flags & ATA_TFLAG_POLLING) in pdc20621_qc_issue()
660 unsigned int port_no = ap->port_no; in pdc20621_host_intr()
666 if ((qc->tf.protocol == ATA_PROT_DMA) && /* read */ in pdc20621_host_intr()
667 (!(qc->tf.flags & ATA_TFLAG_WRITE))) { in pdc20621_host_intr()
669 /* step two - DMA from DIMM to host */ in pdc20621_host_intr()
674 qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); in pdc20621_host_intr()
679 /* step one - exec ATA command */ in pdc20621_host_intr()
692 } else if (qc->tf.protocol == ATA_PROT_DMA) { /* write */ in pdc20621_host_intr()
694 /* step one - DMA from host to DIMM */ in pdc20621_host_intr()
704 ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); in pdc20621_host_intr()
705 readl(ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); in pdc20621_host_intr()
708 /* step two - execute ATA command */ in pdc20621_host_intr()
713 qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); in pdc20621_host_intr()
720 } else if (qc->tf.protocol == ATA_PROT_NODATA) { in pdc20621_host_intr()
724 qc->err_mask |= ac_err_mask(status); in pdc20621_host_intr()
729 ap->stats.idle_irq++; in pdc20621_host_intr()
737 ioread8(ap->ioaddr.status_addr); in pdc20621_irq_clear()
742 struct ata_host *host = dev_instance; in pdc20621_interrupt() local
749 if (!host || !host->iomap[PDC_MMIO_BAR]) in pdc20621_interrupt()
752 mmio_base = host->iomap[PDC_MMIO_BAR]; in pdc20621_interrupt()
765 spin_lock(&host->lock); in pdc20621_interrupt()
768 port_no = i - 1; in pdc20621_interrupt()
770 port_no -= 4; in pdc20621_interrupt()
771 if (port_no >= host->n_ports) in pdc20621_interrupt()
774 ap = host->ports[port_no]; in pdc20621_interrupt()
781 qc = ata_qc_from_tag(ap, ap->link.active_tag); in pdc20621_interrupt()
782 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) in pdc20621_interrupt()
788 spin_unlock(&host->lock); in pdc20621_interrupt()
795 void __iomem *mmio = ap->ioaddr.cmd_addr; in pdc_freeze()
809 void __iomem *mmio = ap->ioaddr.cmd_addr; in pdc_thaw()
815 ioread8(ap->ioaddr.status_addr); in pdc_thaw()
826 void __iomem *mmio = ap->ioaddr.cmd_addr + PDC_CTLSTAT; in pdc_reset_port()
832 for (i = 11; i > 0; i--) { in pdc_reset_port()
851 pdc_reset_port(link->ap); in pdc_softreset()
865 struct ata_port *ap = qc->ap; in pdc_post_internal_cmd()
868 if (qc->flags & ATA_QCFLAG_EH) in pdc_post_internal_cmd()
874 u8 *scsicmd = qc->scsicmd->cmnd; in pdc_check_atapi_dma()
889 /* -45150 (FFFF4FA2) to -1 (FFFFFFFF) shall use PIO mode */ in pdc_check_atapi_dma()
904 WARN_ON(tf->protocol == ATA_PROT_DMA || in pdc_tf_load_mmio()
905 tf->protocol == ATAPI_PROT_DMA); in pdc_tf_load_mmio()
912 WARN_ON(tf->protocol == ATA_PROT_DMA || in pdc_exec_command_mmio()
913 tf->protocol == ATAPI_PROT_DMA); in pdc_exec_command_mmio()
920 port->cmd_addr = base; in pdc_sata_setup_port()
921 port->data_addr = base; in pdc_sata_setup_port()
922 port->feature_addr = in pdc_sata_setup_port()
923 port->error_addr = base + 0x4; in pdc_sata_setup_port()
924 port->nsect_addr = base + 0x8; in pdc_sata_setup_port()
925 port->lbal_addr = base + 0xc; in pdc_sata_setup_port()
926 port->lbam_addr = base + 0x10; in pdc_sata_setup_port()
927 port->lbah_addr = base + 0x14; in pdc_sata_setup_port()
928 port->device_addr = base + 0x18; in pdc_sata_setup_port()
929 port->command_addr = in pdc_sata_setup_port()
930 port->status_addr = base + 0x1c; in pdc_sata_setup_port()
931 port->altstatus_addr = in pdc_sata_setup_port()
932 port->ctl_addr = base + 0x38; in pdc_sata_setup_port()
936 static void pdc20621_get_from_dimm(struct ata_host *host, void *psource, in pdc20621_get_from_dimm() argument
943 void __iomem *mmio = host->iomap[PDC_MMIO_BAR]; in pdc20621_get_from_dimm()
944 void __iomem *dimm_mmio = host->iomap[PDC_DIMM_BAR]; in pdc20621_get_from_dimm()
946 /* hard-code chip #0 */ in pdc20621_get_from_dimm()
958 offset -= (idx * window_size); in pdc20621_get_from_dimm()
960 dist = min(size, window_size - offset); in pdc20621_get_from_dimm()
964 size -= dist; in pdc20621_get_from_dimm()
972 size -= window_size; in pdc20621_get_from_dimm()
986 static void pdc20621_put_to_dimm(struct ata_host *host, void *psource, in pdc20621_put_to_dimm() argument
993 void __iomem *mmio = host->iomap[PDC_MMIO_BAR]; in pdc20621_put_to_dimm()
994 void __iomem *dimm_mmio = host->iomap[PDC_DIMM_BAR]; in pdc20621_put_to_dimm()
996 /* hard-code chip #0 */ in pdc20621_put_to_dimm()
1005 offset -= (idx * window_size); in pdc20621_put_to_dimm()
1007 dist = min(size, window_size - offset); in pdc20621_put_to_dimm()
1013 size -= dist; in pdc20621_put_to_dimm()
1021 size -= window_size; in pdc20621_put_to_dimm()
1035 static unsigned int pdc20621_i2c_read(struct ata_host *host, u32 device, in pdc20621_i2c_read() argument
1038 void __iomem *mmio = host->iomap[PDC_MMIO_BAR]; in pdc20621_i2c_read()
1043 /* hard-code chip #0 */ in pdc20621_i2c_read()
1053 /* Write Control to perform read operation, mask int */ in pdc20621_i2c_read()
1071 static int pdc20621_detect_dimm(struct ata_host *host) in pdc20621_detect_dimm() argument
1074 if (pdc20621_i2c_read(host, PDC_DIMM0_SPD_DEV_ADDRESS, in pdc20621_detect_dimm()
1081 if (pdc20621_i2c_read(host, PDC_DIMM0_SPD_DEV_ADDRESS, 9, &data)) { in pdc20621_detect_dimm()
1091 static int pdc20621_prog_dimm0(struct ata_host *host) in pdc20621_prog_dimm0() argument
1097 void __iomem *mmio = host->iomap[PDC_MMIO_BAR]; in pdc20621_prog_dimm0()
1116 /* hard-code chip #0 */ in pdc20621_prog_dimm0()
1120 pdc20621_i2c_read(host, PDC_DIMM0_SPD_DEV_ADDRESS, in pdc20621_prog_dimm0()
1124 data |= (spd0[4] - 8) | ((spd0[21] != 0) << 3) | ((spd0[3]-11) << 4); in pdc20621_prog_dimm0()
1126 ((((spd0[27] + 9) / 10) - 1) << 8) ; in pdc20621_prog_dimm0()
1128 ? spd0[29] : spd0[28]) + 9) / 10) - 1) << 10; in pdc20621_prog_dimm0()
1129 data |= ((spd0[30] - spd0[29] + 9) / 10 - 2) << 12; in pdc20621_prog_dimm0()
1147 data |= (((size / 16) - 1) << 16); in pdc20621_prog_dimm0()
1156 static unsigned int pdc20621_prog_dimm_global(struct ata_host *host) in pdc20621_prog_dimm_global() argument
1160 void __iomem *mmio = host->iomap[PDC_MMIO_BAR]; in pdc20621_prog_dimm_global()
1162 /* hard-code chip #0 */ in pdc20621_prog_dimm_global()
1166 Set To Default : DIMM Module Global Control Register (0x022259F1) in pdc20621_prog_dimm_global()
1168 DIMM Data/Control Output Driving Selection (bit12 - bit15) in pdc20621_prog_dimm_global()
1177 if (!pdc20621_i2c_read(host, PDC_DIMM0_SPD_DEV_ADDRESS, in pdc20621_prog_dimm_global()
1179 dev_err(host->dev, in pdc20621_prog_dimm_global()
1188 dev_err(host->dev, "Local DIMM ECC Enabled\n"); in pdc20621_prog_dimm_global()
1209 static unsigned int pdc20621_dimm_init(struct ata_host *host) in pdc20621_dimm_init() argument
1218 void __iomem *mmio = host->iomap[PDC_MMIO_BAR]; in pdc20621_dimm_init()
1220 /* hard-code chip #0 */ in pdc20621_dimm_init()
1228 dev_dbg(host->dev, "Time Period Register (0x40): 0x%x\n", time_period); in pdc20621_dimm_init()
1243 dev_dbg(host->dev, "Time Counter Register (0x44): 0x%x\n", tcount); in pdc20621_dimm_init()
1246 If SX4 is on PCI-X bus, after 3 seconds, the timer counter in pdc20621_dimm_init()
1247 register should be >= (0xffffffff - 3x10^8). in pdc20621_dimm_init()
1250 ticks = (time_period - tcount); in pdc20621_dimm_init()
1251 dev_dbg(host->dev, "Num counters 0x%x (%d)\n", ticks, ticks); in pdc20621_dimm_init()
1254 dev_dbg(host->dev, "10 * Internal clk = 0x%x (%d)\n", in pdc20621_dimm_init()
1258 dev_dbg(host->dev, "10 * Internal clk * 33 = 0x%x (%d)\n", in pdc20621_dimm_init()
1262 fparam = (1400000 / clock) - 2; in pdc20621_dimm_init()
1263 dev_dbg(host->dev, "PLL F Param: 0x%x (%d)\n", fparam, fparam); in pdc20621_dimm_init()
1271 dev_dbg(host->dev, "pci_status: 0x%x\n", pci_status); in pdc20621_dimm_init()
1279 if (!(speed = pdc20621_detect_dimm(host))) { in pdc20621_dimm_init()
1280 dev_err(host->dev, "Detect Local DIMM Fail\n"); in pdc20621_dimm_init()
1283 dev_dbg(host->dev, "Local DIMM Speed = %d\n", speed); in pdc20621_dimm_init()
1286 size = pdc20621_prog_dimm0(host); in pdc20621_dimm_init()
1287 dev_dbg(host->dev, "Local DIMM Size = %dMB\n", size); in pdc20621_dimm_init()
1290 if (pdc20621_prog_dimm_global(host)) { in pdc20621_dimm_init()
1291 dev_err(host->dev, in pdc20621_dimm_init()
1305 pdc20621_put_to_dimm(host, test_parttern2, 0x10040, 40); in pdc20621_dimm_init()
1306 pdc20621_put_to_dimm(host, test_parttern2, 0x40, 40); in pdc20621_dimm_init()
1308 pdc20621_put_to_dimm(host, test_parttern1, 0x10040, 40); in pdc20621_dimm_init()
1309 pdc20621_get_from_dimm(host, test_parttern2, 0x40, 40); in pdc20621_dimm_init()
1310 dev_info(host->dev, "DIMM test pattern 1: %x, %x, %s\n", test_parttern2[0], in pdc20621_dimm_init()
1312 pdc20621_get_from_dimm(host, test_parttern2, 0x10040, in pdc20621_dimm_init()
1314 dev_info(host->dev, "DIMM test pattern 2: %x, %x, %s\n", in pdc20621_dimm_init()
1318 pdc20621_put_to_dimm(host, test_parttern1, 0x40, 40); in pdc20621_dimm_init()
1319 pdc20621_get_from_dimm(host, test_parttern2, 0x40, 40); in pdc20621_dimm_init()
1320 dev_info(host->dev, "DIMM test pattern 3: %x, %x, %s\n", in pdc20621_dimm_init()
1327 if (!pdc20621_i2c_read(host, PDC_DIMM0_SPD_DEV_ADDRESS, in pdc20621_dimm_init()
1329 dev_err(host->dev, in pdc20621_dimm_init()
1336 dev_dbg(host->dev, "Start ECC initialization\n"); in pdc20621_dimm_init()
1343 pdc20621_put_to_dimm(host, buf, addr, in pdc20621_dimm_init()
1348 dev_dbg(host->dev, "Finish ECC initialization\n"); in pdc20621_dimm_init()
1354 static void pdc_20621_init(struct ata_host *host) in pdc_20621_init() argument
1357 void __iomem *mmio = host->iomap[PDC_MMIO_BAR]; in pdc_20621_init()
1359 /* hard-code chip #0 */ in pdc_20621_init()
1370 * Reset Host DMA in pdc_20621_init()
1389 { &pdc_port_info[ent->driver_data], NULL }; in pdc_sata_init_one()
1390 struct ata_host *host; in pdc_sata_init_one() local
1394 ata_print_version_once(&pdev->dev, DRV_VERSION); in pdc_sata_init_one()
1396 /* allocate host */ in pdc_sata_init_one()
1397 host = ata_host_alloc_pinfo(&pdev->dev, ppi, 4); in pdc_sata_init_one()
1398 hpriv = devm_kzalloc(&pdev->dev, sizeof(*hpriv), GFP_KERNEL); in pdc_sata_init_one()
1399 if (!host || !hpriv) in pdc_sata_init_one()
1400 return -ENOMEM; in pdc_sata_init_one()
1402 host->private_data = hpriv; in pdc_sata_init_one()
1404 /* acquire resources and fill host */ in pdc_sata_init_one()
1411 if (rc == -EBUSY) in pdc_sata_init_one()
1415 host->iomap = pcim_iomap_table(pdev); in pdc_sata_init_one()
1418 struct ata_port *ap = host->ports[i]; in pdc_sata_init_one()
1419 void __iomem *base = host->iomap[PDC_MMIO_BAR] + PDC_CHIP0_OFS; in pdc_sata_init_one()
1422 pdc_sata_setup_port(&ap->ioaddr, base + offset); in pdc_sata_init_one()
1424 ata_port_pbar_desc(ap, PDC_MMIO_BAR, -1, "mmio"); in pdc_sata_init_one()
1425 ata_port_pbar_desc(ap, PDC_DIMM_BAR, -1, "dimm"); in pdc_sata_init_one()
1430 rc = dma_set_mask_and_coherent(&pdev->dev, ATA_DMA_MASK); in pdc_sata_init_one()
1434 if (pdc20621_dimm_init(host)) in pdc_sata_init_one()
1435 return -ENOMEM; in pdc_sata_init_one()
1436 pdc_20621_init(host); in pdc_sata_init_one()
1439 return ata_host_activate(host, pdev->irq, pdc20621_interrupt, in pdc_sata_init_one()
1446 MODULE_DESCRIPTION("Promise SATA low-level driver");