pucdata.c (256281) | pucdata.c (264761) |
---|---|
1/*- 2 * Copyright (c) 2006 Marcel Moolenaar 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2006 Marcel Moolenaar 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: stable/10/sys/dev/puc/pucdata.c 251715 2013-06-13 22:13:41Z marius $"); | 28__FBSDID("$FreeBSD: stable/10/sys/dev/puc/pucdata.c 264761 2014-04-22 13:02:03Z marius $"); |
29 30/* 31 * PCI "universal" communications card driver configuration data (used to 32 * match/attach the cards). 33 */ 34 35#include <sys/param.h> 36#include <sys/systm.h> --- 16 unchanged lines hidden (view full) --- 53static puc_config_f puc_config_exar_pcie; 54static puc_config_f puc_config_icbook; 55static puc_config_f puc_config_moxa; 56static puc_config_f puc_config_oxford_pci954; 57static puc_config_f puc_config_oxford_pcie; 58static puc_config_f puc_config_quatech; 59static puc_config_f puc_config_syba; 60static puc_config_f puc_config_siig; | 29 30/* 31 * PCI "universal" communications card driver configuration data (used to 32 * match/attach the cards). 33 */ 34 35#include <sys/param.h> 36#include <sys/systm.h> --- 16 unchanged lines hidden (view full) --- 53static puc_config_f puc_config_exar_pcie; 54static puc_config_f puc_config_icbook; 55static puc_config_f puc_config_moxa; 56static puc_config_f puc_config_oxford_pci954; 57static puc_config_f puc_config_oxford_pcie; 58static puc_config_f puc_config_quatech; 59static puc_config_f puc_config_syba; 60static puc_config_f puc_config_siig; |
61static puc_config_f puc_config_sunix; |
|
61static puc_config_f puc_config_timedia; 62static puc_config_f puc_config_titan; 63 64const struct puc_cfg puc_pci_devices[] = { 65 66 { 0x0009, 0x7168, 0xffff, 0, 67 "Sunix SUN1889", 68 DEFAULT_RCLK * 8, --- 912 unchanged lines hidden (view full) --- 981 982 { 0x1592, 0x0781, 0xffff, 0, 983 "Syba Tech Ltd. PCI-4S2P-550-ECP", 984 DEFAULT_RCLK, 985 PUC_PORT_4S1P, 0x10, 0, -1, 986 .config_function = puc_config_syba 987 }, 988 | 62static puc_config_f puc_config_timedia; 63static puc_config_f puc_config_titan; 64 65const struct puc_cfg puc_pci_devices[] = { 66 67 { 0x0009, 0x7168, 0xffff, 0, 68 "Sunix SUN1889", 69 DEFAULT_RCLK * 8, --- 912 unchanged lines hidden (view full) --- 982 983 { 0x1592, 0x0781, 0xffff, 0, 984 "Syba Tech Ltd. PCI-4S2P-550-ECP", 985 DEFAULT_RCLK, 986 PUC_PORT_4S1P, 0x10, 0, -1, 987 .config_function = puc_config_syba 988 }, 989 |
989 { 0x1fd4, 0x1999, 0xffff, 0, 990 "Sunix SER5437A", | 990 { 0x1fd4, 0x1999, 0x1fd4, 0x0002, 991 "Sunix SER5xxxx 2-port serial", |
991 DEFAULT_RCLK * 8, 992 PUC_PORT_2S, 0x10, 0, 8, 993 }, 994 | 992 DEFAULT_RCLK * 8, 993 PUC_PORT_2S, 0x10, 0, 8, 994 }, 995 |
996 { 0x1fd4, 0x1999, 0x1fd4, 0x0004, 997 "Sunix SER5xxxx 4-port serial", 998 DEFAULT_RCLK * 8, 999 PUC_PORT_4S, 0x10, 0, 8, 1000 }, 1001 1002 { 0x1fd4, 0x1999, 0x1fd4, 0x0008, 1003 "Sunix SER5xxxx 8-port serial", 1004 DEFAULT_RCLK * 8, 1005 PUC_PORT_8S, -1, -1, -1, 1006 .config_function = puc_config_sunix 1007 }, 1008 1009 { 0x1fd4, 0x1999, 0x1fd4, 0x0101, 1010 "Sunix MIO5xxxx 1-port serial and 1284 Printer port", 1011 DEFAULT_RCLK * 8, 1012 PUC_PORT_1S1P, -1, -1, -1, 1013 .config_function = puc_config_sunix 1014 }, 1015 1016 { 0x1fd4, 0x1999, 0x1fd4, 0x0102, 1017 "Sunix MIO5xxxx 2-port serial and 1284 Printer port", 1018 DEFAULT_RCLK * 8, 1019 PUC_PORT_2S1P, -1, -1, -1, 1020 .config_function = puc_config_sunix 1021 }, 1022 1023 { 0x1fd4, 0x1999, 0x1fd4, 0x0104, 1024 "Sunix MIO5xxxx 4-port serial and 1284 Printer port", 1025 DEFAULT_RCLK * 8, 1026 PUC_PORT_4S1P, -1, -1, -1, 1027 .config_function = puc_config_sunix 1028 }, 1029 |
|
995 { 0x5372, 0x6873, 0xffff, 0, 996 "Sun 1040 PCI Quad Serial", 997 DEFAULT_RCLK, 998 PUC_PORT_4S, 0x10, 4, 0, 999 }, 1000 1001 { 0x6666, 0x0001, 0xffff, 0, 1002 "Decision Computer Inc, PCCOM 4-port serial", --- 15 unchanged lines hidden (view full) --- 1018 1019 { 0x9710, 0x9815, 0xffff, 0, 1020 "NetMos NM9815 Dual 1284 Printer port", 1021 0, 1022 PUC_PORT_2P, 0x10, 8, 0, 1023 }, 1024 1025 /* | 1030 { 0x5372, 0x6873, 0xffff, 0, 1031 "Sun 1040 PCI Quad Serial", 1032 DEFAULT_RCLK, 1033 PUC_PORT_4S, 0x10, 4, 0, 1034 }, 1035 1036 { 0x6666, 0x0001, 0xffff, 0, 1037 "Decision Computer Inc, PCCOM 4-port serial", --- 15 unchanged lines hidden (view full) --- 1053 1054 { 0x9710, 0x9815, 0xffff, 0, 1055 "NetMos NM9815 Dual 1284 Printer port", 1056 0, 1057 PUC_PORT_2P, 0x10, 8, 0, 1058 }, 1059 1060 /* |
1026 * This is more specific than the generic NM9835 entry that follows, and 1027 * is placed here to _prevent_ puc from claiming this single port card. | 1061 * This is more specific than the generic NM9835 entry, and is placed 1062 * here to _prevent_ puc(4) from claiming this single port card. |
1028 * 1029 * uart(4) will claim this device. 1030 */ 1031 { 0x9710, 0x9835, 0x1000, 1, 1032 "NetMos NM9835 based 1-port serial", 1033 DEFAULT_RCLK, 1034 PUC_PORT_1S, 0x10, 4, 0, 1035 }, --- 572 unchanged lines hidden (view full) --- 1608 return (0); 1609 default: 1610 break; 1611 } 1612 return (ENXIO); 1613} 1614 1615static int | 1063 * 1064 * uart(4) will claim this device. 1065 */ 1066 { 0x9710, 0x9835, 0x1000, 1, 1067 "NetMos NM9835 based 1-port serial", 1068 DEFAULT_RCLK, 1069 PUC_PORT_1S, 0x10, 4, 0, 1070 }, --- 572 unchanged lines hidden (view full) --- 1643 return (0); 1644 default: 1645 break; 1646 } 1647 return (ENXIO); 1648} 1649 1650static int |
1651puc_config_sunix(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, 1652 intptr_t *res) 1653{ 1654 int error; 1655 1656 switch (cmd) { 1657 case PUC_CFG_GET_OFS: 1658 error = puc_config(sc, PUC_CFG_GET_TYPE, port, res); 1659 if (error != 0) 1660 return (error); 1661 *res = (*res == PUC_TYPE_SERIAL) ? (port & 3) * 8 : 0; 1662 return (0); 1663 case PUC_CFG_GET_RID: 1664 error = puc_config(sc, PUC_CFG_GET_TYPE, port, res); 1665 if (error != 0) 1666 return (error); 1667 *res = (*res == PUC_TYPE_SERIAL && port <= 3) ? 0x10 : 0x14; 1668 return (0); 1669 default: 1670 break; 1671 } 1672 return (ENXIO); 1673} 1674 1675static int |
|
1616puc_config_titan(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, 1617 intptr_t *res) 1618{ 1619 switch (cmd) { 1620 case PUC_CFG_GET_OFS: 1621 *res = (port < 3) ? 0 : (port - 2) << 3; 1622 return (0); 1623 case PUC_CFG_GET_RID: 1624 *res = 0x14 + ((port >= 2) ? 0x0c : port << 2); 1625 return (0); 1626 default: 1627 break; 1628 } 1629 return (ENXIO); 1630} | 1676puc_config_titan(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, 1677 intptr_t *res) 1678{ 1679 switch (cmd) { 1680 case PUC_CFG_GET_OFS: 1681 *res = (port < 3) ? 0 : (port - 2) << 3; 1682 return (0); 1683 case PUC_CFG_GET_RID: 1684 *res = 0x14 + ((port >= 2) ? 0x0c : port << 2); 1685 return (0); 1686 default: 1687 break; 1688 } 1689 return (ENXIO); 1690} |