Date: Thu, 27 Apr 2006 17:31:53 GMT From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 96222 for review Message-ID: <200604271731.k3RHVrWc071978@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=96222 Change 96222 by marcel@marcel_nfs on 2006/04/27 17:30:52 Sync with NetBSD: Add Siig PS8000 8S Affected files ... .. //depot/projects/uart/dev/puc/pucdata.c#40 edit Differences ... ==== //depot/projects/uart/dev/puc/pucdata.c#40 (text+ko) ==== @@ -405,6 +405,13 @@ PUC_PORT_2S1P, 0x10, 4, 0, }, + { 0x131f, 0x2081, 0xffff, 0, + "SIIG PS8000 8S PCI 16C650 (20x family)", + DEFAULT_RCLK, + PUC_PORT_8S, 0x10, -1, -1, + .config_function = puc_config_siig + }, + { 0x135c, 0x0010, 0xffff, 0, "Quatech QSC-100", -3, /* max 8x clock rate */ @@ -962,12 +969,30 @@ puc_config_siig(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, intptr_t *res) { - if (cmd == PUC_CFG_GET_RID) { - switch (port) { - case 0: *res = 0x10; return (0); - case 1: *res = 0x14; return (0); - case 2: *res = 0x1c; return (0); + const struct puc_cfg *cfg = sc->sc_cfg; + + switch (cmd) { + case PUC_CFG_GET_OFS: + if (cfg->ports == PUC_PORT_8S) { + *res = (port > 4) ? 8 * (port - 4) : 0; + return (0); + } + break; + case PUC_CFG_GET_RID: + if (cfg->ports == PUC_PORT_8S) { + *res = 0x10 + ((port > 4) ? 0x10 : 4 * port); + return (0); + } + if (cfg->ports = PUC_PORT_2S1P) { + switch (port) { + case 0: *res = 0x10; return (0); + case 1: *res = 0x14; return (0); + case 2: *res = 0x1c; return (0); + } } + break; + default: + break; } return (ENXIO); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604271731.k3RHVrWc071978>