Lines Matching +full:smi +full:- +full:based
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * pata_pcmcia.c - PCMCIA PATA controller driver.
4 * Copyright 2005-2006 Red Hat Inc, all rights reserved.
8 * Heavily based upon ide-cs.c
33 * pcmcia_set_mode - PCMCIA specific mode setup
45 struct ata_device *master = &link->device[0]; in pcmcia_set_mode()
46 struct ata_device *slave = &link->device[1]; in pcmcia_set_mode()
51 if (memcmp(master->id + ATA_ID_FW_REV, slave->id + ATA_ID_FW_REV, in pcmcia_set_mode()
54 the same vendor - check serial */ in pcmcia_set_mode()
55 if (memcmp(master->id + ATA_ID_SERNO, slave->id + ATA_ID_SERNO, in pcmcia_set_mode()
56 ATA_ID_SERNO_LEN) == 0 && master->id[ATA_ID_SERNO] >> 8) { in pcmcia_set_mode()
65 * pcmcia_set_mode_8bit - PCMCIA specific mode setup
79 * ata_data_xfer_8bit - Transfer data by 8bit PIO
94 struct ata_port *ap = qc->dev->link->ap; in ata_data_xfer_8bit()
97 ioread8_rep(ap->ioaddr.data_addr, buf, buflen); in ata_data_xfer_8bit()
99 iowrite8_rep(ap->ioaddr.data_addr, buf, buflen); in ata_data_xfer_8bit()
105 * pcmcia_8bit_drain_fifo - Stock FIFO drain logic for SFF controllers
120 if (qc == NULL || qc->dma_dir == DMA_TO_DEVICE) in pcmcia_8bit_drain_fifo()
123 ap = qc->ap; in pcmcia_8bit_drain_fifo()
126 for (count = 0; (ap->ops->sff_check_status(ap) & ATA_DRQ) in pcmcia_8bit_drain_fifo()
128 ioread8(ap->ioaddr.data_addr); in pcmcia_8bit_drain_fifo()
159 if ((pdev->resource[0]->flags & IO_DATA_PATH_WIDTH) in pcmcia_check_one_config()
161 pdev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; in pcmcia_check_one_config()
162 pdev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; in pcmcia_check_one_config()
164 pdev->resource[1]->flags &= ~IO_DATA_PATH_WIDTH; in pcmcia_check_one_config()
165 pdev->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; in pcmcia_check_one_config()
167 if (pdev->resource[1]->end) { in pcmcia_check_one_config()
168 pdev->resource[0]->end = 8; in pcmcia_check_one_config()
169 pdev->resource[1]->end = (*is_kme) ? 2 : 1; in pcmcia_check_one_config()
171 if (pdev->resource[0]->end < 16) in pcmcia_check_one_config()
172 return -ENODEV; in pcmcia_check_one_config()
179 * pcmcia_init_one - attach a PCMCIA interface
190 int is_kme = 0, ret = -ENOMEM, p; in pcmcia_init_one()
197 pdev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO | in pcmcia_init_one()
202 is_kme = ((pdev->manf_id == MANFID_KME) && in pcmcia_init_one()
203 ((pdev->card_id == PRODID_KME_KXLC005_A) || in pcmcia_init_one()
204 (pdev->card_id == PRODID_KME_KXLC005_B))); in pcmcia_init_one()
207 pdev->config_flags &= ~CONF_AUTO_CHECK_VCC; in pcmcia_init_one()
211 io_base = pdev->resource[0]->start; in pcmcia_init_one()
212 if (pdev->resource[1]->end) in pcmcia_init_one()
213 ctl_base = pdev->resource[1]->start; in pcmcia_init_one()
215 ctl_base = pdev->resource[0]->start + 0x0e; in pcmcia_init_one()
217 if (!pdev->irq) in pcmcia_init_one()
225 ret = -ENOMEM; in pcmcia_init_one()
226 io_addr = devm_ioport_map(&pdev->dev, io_base, 8); in pcmcia_init_one()
227 ctl_addr = devm_ioport_map(&pdev->dev, ctl_base, 1); in pcmcia_init_one()
238 if (resource_size(pdev->resource[0]) >= 0x20) in pcmcia_init_one()
241 if (pdev->manf_id == 0x0097 && pdev->card_id == 0x1620) in pcmcia_init_one()
247 ret = -ENOMEM; in pcmcia_init_one()
248 host = ata_host_alloc(&pdev->dev, n_ports); in pcmcia_init_one()
253 ap = host->ports[p]; in pcmcia_init_one()
255 ap->ops = ops; in pcmcia_init_one()
256 ap->pio_mask = ATA_PIO0; /* ISA so PIO 0 cycles */ in pcmcia_init_one()
257 ap->flags |= ATA_FLAG_SLAVE_POSS; in pcmcia_init_one()
258 ap->ioaddr.cmd_addr = io_addr + 0x10 * p; in pcmcia_init_one()
259 ap->ioaddr.altstatus_addr = ctl_addr + 0x10 * p; in pcmcia_init_one()
260 ap->ioaddr.ctl_addr = ctl_addr + 0x10 * p; in pcmcia_init_one()
261 ata_sff_std_ports(&ap->ioaddr); in pcmcia_init_one()
267 ret = ata_host_activate(host, pdev->irq, ata_sff_interrupt, in pcmcia_init_one()
272 pdev->priv = host; in pcmcia_init_one()
281 * pcmcia_remove_one - unplug an pcmcia interface
290 struct ata_host *host = pdev->priv; in pcmcia_remove_one()
302 PCMCIA_DEVICE_MANF_CARD(0x000a, 0x0000), /* I-O Data CFA */
317 PCMCIA_DEVICE_PROD_ID123("Caravelle", "PSC-IDE ", "PSC000", 0x8c36137c, 0xd0693ab8, 0x2768a9f0),
318 PCMCIA_DEVICE_PROD_ID123("CDROM", "IDE", "MCD-601p", 0x1b9179ca, 0xede88951, 0x0d902f74),
320 PCMCIA_DEVICE_PROD_ID12("ARGOSY", "CD-ROM", 0x78f308dc, 0x66536591),
322 PCMCIA_DEVICE_PROD_ID12("CNF ", "CD-ROM", 0x46d7db81, 0x66536591),
323 PCMCIA_DEVICE_PROD_ID12("CNF CD-M", "CD-ROM", 0x7d93b852, 0x66536591),
324 …PCMCIA_DEVICE_PROD_ID12("Creative Technology Ltd.", "PCMCIA CD-ROM Interface Card", 0xff8c8a45, 0x…
325 …PCMCIA_DEVICE_PROD_ID12("Digital Equipment Corporation.", "Digital Mobile Media CD-ROM", 0x17692a6…
327 PCMCIA_DEVICE_PROD_ID12("EXP ", "CD-ROM", 0x0a5c52fd, 0x66536591),
329 PCMCIA_DEVICE_PROD_ID12("FREECOM", "PCCARD-IDE", 0x5714cbf7, 0x48e0ab8e),
342 PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF300", 0x7ed2ad87, 0x7e9e78ee),
343 PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF500", 0x7ed2ad87, 0x7a13045c),
344 PCMCIA_DEVICE_PROD_ID2("NinjaATA-", 0xebe0bd79),
345 PCMCIA_DEVICE_PROD_ID12("PCMCIA", "CD-ROM", 0x281f1c5d, 0x66536591),
347 …PCMCIA_DEVICE_PROD_ID12("SHUTTLE TECHNOLOGY LTD.", "PCCARD-IDE/ATAPI Adapter", 0x4a3f0ba0, 0x32256…
350 PCMCIA_DEVICE_PROD_ID12("SMI VENDOR", "SMI PRODUCT", 0x30896c92, 0x703cc5f6),
380 MODULE_DESCRIPTION("low-level driver for PCMCIA ATA");