Lines Matching +full:multi +full:- +full:port
1 // SPDX-License-Identifier: (GPL-2.0 OR MPL-1.1)
69 /* Table of multi-port card ID's */
74 int multi; /* 1 = multifunction, > 1 = # ports */ member
84 int multi; member
94 * vers_1 5.0, "Brain Boxes", "2-Port RS232 card", "r6"
104 uart->port.uartclk = 14745600; in quirk_setup_brainboxes_0104()
122 return -ENODEV; in quirk_post_ibm()
127 * be handled by setting the quirk entry .multi = 0 | 1 ?
131 struct serial_info *info = link->priv; in quirk_config_nokia()
133 if (info->multi > 1) in quirk_config_nokia()
134 info->multi = 1; in quirk_config_nokia()
139 struct serial_info *info = link->priv; in quirk_wakeup_oxsemi()
141 if (info->c950ctrl) in quirk_wakeup_oxsemi()
142 outb(12, info->c950ctrl + 1); in quirk_wakeup_oxsemi()
153 struct serial_info *info = link->priv; in quirk_wakeup_possio_gcc()
154 unsigned int ctrl = info->c950ctrl; in quirk_wakeup_possio_gcc()
172 * Socket Dual IO: this enables irq's for second port
176 struct serial_info *info = link->priv; in quirk_config_socket()
178 if (info->multi) in quirk_config_socket()
179 link->config_flags |= CONF_ENABLE_ESR; in quirk_config_socket()
186 .multi = -1,
191 .multi = -1,
196 .multi = -1,
201 .multi = 2,
205 .multi = 4,
209 .multi = -1,
214 .multi = 4,
218 .multi = -1,
223 .multi = -1,
228 .multi = 2,
232 .multi = 2,
236 .multi = 2,
240 .multi = 4,
244 .multi = 2,
249 .multi = -1,
260 struct serial_info *info = link->priv; in serial_remove()
263 dev_dbg(&link->dev, "serial_release\n"); in serial_remove()
268 for (i = 0; i < info->ndev; i++) in serial_remove()
269 serial8250_unregister_port(info->line[i]); in serial_remove()
271 if (!info->slave) in serial_remove()
277 struct serial_info *info = link->priv; in serial_suspend()
280 for (i = 0; i < info->ndev; i++) in serial_suspend()
281 serial8250_suspend_port(info->line[i]); in serial_suspend()
288 struct serial_info *info = link->priv; in serial_resume()
291 for (i = 0; i < info->ndev; i++) in serial_resume()
292 serial8250_resume_port(info->line[i]); in serial_resume()
294 if (info->quirk && info->quirk->wakeup) in serial_resume()
295 info->quirk->wakeup(link); in serial_resume()
305 dev_dbg(&link->dev, "serial_attach()\n"); in serial_probe()
310 return -ENOMEM; in serial_probe()
311 info->p_dev = link; in serial_probe()
312 link->priv = info; in serial_probe()
314 link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO; in serial_probe()
316 link->config_flags |= CONF_ENABLE_SPKR; in serial_probe()
331 struct serial_info *info = link->priv; in serial_detach()
333 dev_dbg(&link->dev, "serial_detach\n"); in serial_detach()
353 uart.port.iobase = iobase; in setup_serial()
354 uart.port.irq = irq; in setup_serial()
355 uart.port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ; in setup_serial()
356 uart.port.uartclk = 1843200; in setup_serial()
357 uart.port.dev = &handle->dev; in setup_serial()
359 uart.port.flags |= UPF_BUGGY_UART; in setup_serial()
361 if (info->quirk && info->quirk->setup) in setup_serial()
362 info->quirk->setup(handle, &uart); in setup_serial()
368 return -EINVAL; in setup_serial()
371 info->line[info->ndev] = line; in setup_serial()
372 info->ndev++; in setup_serial()
381 unsigned int port = 0; in pfc_config() local
382 struct serial_info *info = p_dev->priv; in pfc_config()
384 if ((p_dev->resource[1]->end != 0) && in pfc_config()
385 (resource_size(p_dev->resource[1]) == 8)) { in pfc_config()
386 port = p_dev->resource[1]->start; in pfc_config()
387 info->slave = 1; in pfc_config()
388 } else if ((info->manfid == MANFID_OSITECH) && in pfc_config()
389 (resource_size(p_dev->resource[0]) == 0x40)) { in pfc_config()
390 port = p_dev->resource[0]->start + 0x28; in pfc_config()
391 info->slave = 1; in pfc_config()
393 if (info->slave) in pfc_config()
394 return setup_serial(p_dev, info, port, p_dev->irq); in pfc_config()
396 dev_warn(&p_dev->dev, "no usable port range found, giving up\n"); in pfc_config()
397 return -ENODEV; in pfc_config()
405 if (p_dev->resource[0]->start == 0) in simple_config_check()
406 return -ENODEV; in simple_config_check()
409 p_dev->io_lines = 16; in simple_config_check()
411 if (p_dev->resource[0]->end != size_table[(*try >> 1)]) in simple_config_check()
412 return -ENODEV; in simple_config_check()
414 p_dev->resource[0]->end = 8; in simple_config_check()
415 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; in simple_config_check()
416 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; in simple_config_check()
427 if (p_dev->io_lines > 3) in simple_config_check_notpicky()
428 return -ENODEV; in simple_config_check_notpicky()
430 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; in simple_config_check_notpicky()
431 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; in simple_config_check_notpicky()
432 p_dev->resource[0]->end = 8; in simple_config_check_notpicky()
435 p_dev->resource[0]->start = base[j]; in simple_config_check_notpicky()
436 p_dev->io_lines = base[j] ? 16 : 3; in simple_config_check_notpicky()
440 return -ENODEV; in simple_config_check_notpicky()
445 struct serial_info *info = link->priv; in simple_config()
452 link->config_flags |= CONF_AUTO_SET_VPP; in simple_config()
459 * its base address, then try to grab any standard serial port in simple_config()
460 * address, and finally try to get any free port. in simple_config()
464 dev_warn(&link->dev, "no usable port range found, giving up\n"); in simple_config()
469 if (info->multi && (info->manfid == MANFID_3COM)) in simple_config()
470 link->config_index &= ~(0x08); in simple_config()
475 if (info->quirk && info->quirk->config) in simple_config()
476 info->quirk->config(link); in simple_config()
481 return setup_serial(link, info, link->resource[0]->start, link->irq); in simple_config()
486 int *multi = priv_data; in multi_config_check() local
488 if (p_dev->resource[1]->end) in multi_config_check()
489 return -EINVAL; in multi_config_check()
492 * The quad port cards have bad CIS's, so just look for a in multi_config_check()
495 if (p_dev->resource[0]->end <= 8) in multi_config_check()
496 return -EINVAL; in multi_config_check()
498 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; in multi_config_check()
499 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; in multi_config_check()
500 p_dev->resource[0]->end = *multi * 8; in multi_config_check()
503 return -ENODEV; in multi_config_check()
512 if (!p_dev->resource[0]->end || !p_dev->resource[1]->end || in multi_config_check_notpicky()
513 p_dev->resource[0]->start + 8 != p_dev->resource[1]->start) in multi_config_check_notpicky()
514 return -ENODEV; in multi_config_check_notpicky()
516 p_dev->resource[0]->end = p_dev->resource[1]->end = 8; in multi_config_check_notpicky()
517 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; in multi_config_check_notpicky()
518 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; in multi_config_check_notpicky()
521 return -ENODEV; in multi_config_check_notpicky()
523 *base2 = p_dev->resource[0]->start + 8; in multi_config_check_notpicky()
529 struct serial_info *info = link->priv; in multi_config()
532 /* First, look for a generic full-sized window */ in multi_config()
533 if (!pcmcia_loop_config(link, multi_config_check, &info->multi)) in multi_config()
534 base2 = link->resource[0]->start + 8; in multi_config()
537 info->multi = 2; in multi_config()
540 dev_warn(&link->dev, in multi_config()
541 "no usable port range found, giving up\n"); in multi_config()
542 return -ENODEV; in multi_config()
546 if (!link->irq) in multi_config()
547 dev_warn(&link->dev, "no usable IRQ found, continuing...\n"); in multi_config()
552 if (info->quirk && info->quirk->config) in multi_config()
553 info->quirk->config(link); in multi_config()
557 return -ENODEV; in multi_config()
559 /* The Oxford Semiconductor OXCF950 cards are in fact single-port: in multi_config()
563 if (info->manfid == MANFID_OXSEMI || (info->manfid == MANFID_POSSIO && in multi_config()
564 info->prodid == PRODID_POSSIO_GCC)) { in multi_config()
565 if (link->config_index == 1 || in multi_config()
566 link->config_index == 3) { in multi_config()
567 setup_serial(link, info, base2, link->irq); in multi_config()
568 base2 = link->resource[0]->start; in multi_config()
570 setup_serial(link, info, link->resource[0]->start, in multi_config()
571 link->irq); in multi_config()
573 info->c950ctrl = base2; in multi_config()
576 * FIXME: We really should wake up the port prior to in multi_config()
579 if (info->quirk && info->quirk->wakeup) in multi_config()
580 info->quirk->wakeup(link); in multi_config()
585 setup_serial(link, info, link->resource[0]->start, link->irq); in multi_config()
586 for (i = 0; i < info->multi - 1; i++) in multi_config()
588 link->irq); in multi_config()
594 struct serial_info *info = p_dev->priv; in serial_check_for_multi()
596 if (!p_dev->resource[0]->end) in serial_check_for_multi()
597 return -EINVAL; in serial_check_for_multi()
599 if ((!p_dev->resource[1]->end) && (p_dev->resource[0]->end % 8 == 0)) in serial_check_for_multi()
600 info->multi = p_dev->resource[0]->end >> 3; in serial_check_for_multi()
602 if ((p_dev->resource[1]->end) && (p_dev->resource[0]->end == 8) in serial_check_for_multi()
603 && (p_dev->resource[1]->end == 8)) in serial_check_for_multi()
604 info->multi = 2; in serial_check_for_multi()
612 struct serial_info *info = link->priv; in serial_config()
615 dev_dbg(&link->dev, "serial_config\n"); in serial_config()
618 info->multi = (link->socket->functions > 1); in serial_config()
621 info->manfid = link->manf_id; in serial_config()
622 info->prodid = link->card_id; in serial_config()
626 quirks[i].manfid == info->manfid) && in serial_config()
628 quirks[i].prodid == info->prodid)) { in serial_config()
629 info->quirk = &quirks[i]; in serial_config()
634 * Another check for dual-serial cards: look for either serial or in serial_config()
635 * multifunction cards that ask for appropriate IO port ranges. in serial_config()
637 if ((info->multi == 0) && in serial_config()
638 (link->has_func_id) && in serial_config()
639 (link->socket->pcmcia_pfc == 0) && in serial_config()
640 ((link->func_id == CISTPL_FUNCID_MULTI) || in serial_config()
641 (link->func_id == CISTPL_FUNCID_SERIAL))) { in serial_config()
647 * Apply any multi-port quirk. in serial_config()
649 if (info->quirk && info->quirk->multi != -1) in serial_config()
650 info->multi = info->quirk->multi; in serial_config()
652 dev_info(&link->dev, in serial_config()
653 "trying to set up [0x%04x:0x%04x] (pfc: %d, multi: %d, quirk: %p)\n", in serial_config()
654 link->manf_id, link->card_id, in serial_config()
655 link->socket->pcmcia_pfc, info->multi, info->quirk); in serial_config()
656 if (link->socket->pcmcia_pfc) in serial_config()
658 else if (info->multi > 1) in serial_config()
663 if (i || info->ndev == 0) in serial_config()
667 * Apply any post-init quirk. FIXME: This should really happen in serial_config()
668 * before we register the port, since it might already be in use. in serial_config()
670 if (info->quirk && info->quirk->post) in serial_config()
671 if (info->quirk->post(link)) in serial_config()
677 dev_warn(&link->dev, "failed to initialize\n"); in serial_config()
679 return -ENODEV; in serial_config()
707 PCMCIA_PFC_DEVICE_PROD_ID12(1, "ATKK", "LM33-PCM-T", 0xba9eb7e2, 0x077c174e),
708 PCMCIA_PFC_DEVICE_PROD_ID12(1, "D-Link", "DME336T", 0x1a424a1c, 0xb23897ff),
714 PCMCIA_PFC_DEVICE_PROD_ID12(1, "MICRO RESEARCH", "COMBO-L/M-336", 0xb2ced065, 0x3ced0555),
715 PCMCIA_PFC_DEVICE_PROD_ID12(1, "NEC", "PK-UG-J001", 0x18df0ba0, 0x831b1064),
730 …PCMCIA_MFC_DEVICE_PROD_ID123(1, "APEX DATA", "MULTICARD", "ETHERNET-MODEM", 0x11c2da09, 0x7289dc5d…
741 PCMCIA_DEVICE_MANF_CARD(0x0105, 0x100a), /* Xircom CM-56G */
751 PCMCIA_DEVICE_MANF_CARD(0x0124, 0x0100), /* Nokia DTP-2 ver II */
760 PCMCIA_DEVICE_PROD_ID134("ADV", "TECH", "COMpad-32/85", 0x67459937, 0x916d02ba, 0x8fbe92ae),
771 PCMCIA_DEVICE_PROD_ID12("Computerboards, Inc.", "PCM-COM422", 0xd0b78f51, 0x7e2d49ed),
776 PCMCIA_DEVICE_PROD_ID12("Intertex", "IX34-PCMCIA", 0xf8a097e3, 0x97880447),
777 …PCMCIA_DEVICE_PROD_ID12("IOTech Inc ", "PCMCIA Dual RS-232 Serial Port Card", 0x3bd2d898, 0x92abc9…
779 PCMCIA_DEVICE_PROD_ID12("Multi-Tech", "MT1432LT", 0x5f73be51, 0x0b3e2383),
780 PCMCIA_DEVICE_PROD_ID12("Multi-Tech", "MT2834LT", 0x5f73be51, 0x4cd7c09e),
783 PCMCIA_DEVICE_PROD_ID12("Option International", "GSM-Ready 56K/ISDN", 0x9d7cd6f5, 0xb23844aa),
785 …PCMCIA_DEVICE_PROD_ID12("Quatech Inc", "PCMCIA Dual RS-232 Serial Port Card", 0xc4420b35, 0x92abc9…
786 PCMCIA_DEVICE_PROD_ID12("Quatech Inc", "Dual RS-232 Serial Port PC Card", 0xc4420b35, 0x031a380d),
788 PCMCIA_DEVICE_PROD_ID1("Smart Serial Port", 0x2d8ce292),
789 …PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "PCMCIA", "EN2218-LAN/MODEM", 0x281f1c5d, 0x570f348e, "cis/PCML…
790 …PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "PCMCIA", "UE2218-LAN/MODEM", 0x281f1c5d, 0x6fdcacee, "cis/PCML…
804 …ARD(0x0192, 0xa555, "cis/SW_555_SER.cis"), /* Sierra Aircard 555 CDMA 1xrtt Modem -- pre update */
805 …RD(0x013f, 0xa555, "cis/SW_555_SER.cis"), /* Sierra Aircard 555 CDMA 1xrtt Modem -- post update */
807 …PCMCIA_DEVICE_CIS_PROD_ID12("ADVANTECH", "COMpad-32/85B-2", 0x96913a85, 0x27ab5437, "cis/COMpad2.c…
808 …PCMCIA_DEVICE_CIS_PROD_ID12("ADVANTECH", "COMpad-32/85B-4", 0x96913a85, 0xcec8f102, "cis/COMpad4.c…
809 …PCMCIA_DEVICE_CIS_PROD_ID123("ADVANTECH", "COMpad-32/85", "1.0", 0x96913a85, 0x8fbe92ae, 0x0877b62…
810 PCMCIA_DEVICE_CIS_PROD_ID2("RS-COM 2P", 0xad20b156, "cis/RS-COM-2P.cis"),
816 …PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c2000.", "SERIAL CARD: CF232-5", 0x63f2e0bd, 0x…
817 PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: CF232", 0x3beb8cf2, 0x171e7190),
818 PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: CF232-5", 0x3beb8cf2, 0x20da4262),
819 PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: CF428", 0x3beb8cf2, 0xea5dd57d),
820 PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: CF500", 0x3beb8cf2, 0xd77255fa),
821 PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: IC232", 0x3beb8cf2, 0x6a709903),
822 PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: SL232", 0x3beb8cf2, 0x18430676),
823 PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: XL232", 0x3beb8cf2, 0x6f933767),
824 PCMCIA_MFC_DEVICE_PROD_ID12(0, "Elan", "Serial Port: CF332", 0x3beb8cf2, 0x16dc1ba7),
825 PCMCIA_MFC_DEVICE_PROD_ID12(0, "Elan", "Serial Port: SL332", 0x3beb8cf2, 0x19816c41),
826 PCMCIA_MFC_DEVICE_PROD_ID12(0, "Elan", "Serial Port: SL385", 0x3beb8cf2, 0x64112029),
827 PCMCIA_MFC_DEVICE_PROD_ID12(0, "Elan", "Serial Port: SL432", 0x3beb8cf2, 0x1cce7ac4),
828 PCMCIA_MFC_DEVICE_PROD_ID12(0, "Elan", "Serial+Parallel Port: SP230", 0x3beb8cf2, 0xdb9e58bc),
829 PCMCIA_MFC_DEVICE_PROD_ID12(1, "Elan", "Serial Port: CF332", 0x3beb8cf2, 0x16dc1ba7),
830 PCMCIA_MFC_DEVICE_PROD_ID12(1, "Elan", "Serial Port: SL332", 0x3beb8cf2, 0x19816c41),
831 PCMCIA_MFC_DEVICE_PROD_ID12(1, "Elan", "Serial Port: SL385", 0x3beb8cf2, 0x64112029),
832 PCMCIA_MFC_DEVICE_PROD_ID12(1, "Elan", "Serial Port: SL432", 0x3beb8cf2, 0x1cce7ac4),
833 PCMCIA_MFC_DEVICE_PROD_ID12(2, "Elan", "Serial Port: SL432", 0x3beb8cf2, 0x1cce7ac4),
834 PCMCIA_MFC_DEVICE_PROD_ID12(3, "Elan", "Serial Port: SL432", 0x3beb8cf2, 0x1cce7ac4),
854 MODULE_FIRMWARE("cis/RS-COM-2P.cis");