PERFORCE change 96222 for review
Marcel Moolenaar
marcel at FreeBSD.org
Thu Apr 27 17:31:54 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=96222
Change 96222 by marcel at 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);
}
More information about the p4-projects
mailing list