Date: Thu, 27 Apr 2006 03:37:52 GMT From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 96185 for review Message-ID: <200604270337.k3R3bqeo069086@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=96185 Change 96185 by marcel@marcel_nfs on 2006/04/27 03:37:52 Add 5 more HP Diva console boards. Affected files ... .. //depot/projects/uart/dev/puc/pucdata.c#36 edit Differences ... ==== //depot/projects/uart/dev/puc/pucdata.c#36 (text+ko) ==== @@ -1,22 +1,16 @@ -/* $NetBSD: pucdata.c,v 1.25 2001/12/16 22:23:01 thorpej Exp $ */ - /*- - * Copyright (c) 1998, 1999 Christopher G. Demetriou. All rights reserved. + * Copyright (c) 2006 Marcel Moolenaar + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -65,8 +59,43 @@ PUC_PORT_2S, 0x10, 0, 8, }, + { 0x103c, 0x1048, 0x103c, 0x1049, + "HP Diva Serial [GSP] Multiport UART - Tosca Console", + DEFAULT_RCLK, + PUC_PORT_3S, 0x10, 0, -1, + .config_function = puc_config_diva + }, + + { 0x103c, 0x1048, 0x103c, 0x104a, + "HP Diva Serial [GSP] Multiport UART - Tosca Secondary", + DEFAULT_RCLK, + PUC_PORT_2S, 0x10, 0, -1, + .config_function = puc_config_diva + }, + + { 0x103c, 0x1048, 0x103c, 0x104b, + "HP Diva Serial [GSP] Multiport UART - Maestro SP2", + DEFAULT_RCLK, + PUC_PORT_4S, 0x10, 0, -1, + .config_function = puc_config_diva + }, + + { 0x103c, 0x1048, 0x103c, 0x1223, + "HP Diva Serial [GSP] Multiport UART - Superdome Console", + DEFAULT_RCLK, + PUC_PORT_3S, 0x10, 0, -1, + .config_function = puc_config_diva + }, + + { 0x103c, 0x1048, 0x103c, 0x1226, + "HP Diva Serial [GSP] Multiport UART - Keystone SP2", + DEFAULT_RCLK, + PUC_PORT_3S, 0x10, 0, -1, + .config_function = puc_config_diva + }, + { 0x103c, 0x1048, 0x103c, 0x1282, - "Diva Serial [GSP] Multiport UART", + "HP Diva Serial [GSP] Multiport UART - Everest SP2", DEFAULT_RCLK, PUC_PORT_3S, 0x10, 0, -1, .config_function = puc_config_diva @@ -707,12 +736,15 @@ puc_config_diva(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, intptr_t *res) { + const struct puc_cfg *cfg = sc->sc_cfg; + if (cmd == PUC_CFG_GET_OFS) { - switch (port) { - case 0: *res = 0x00; return (0); - case 1: *res = 0x10; return (0); - case 2: *res = 0x38; return (0); - } + if (cfg->subdevice == 0x1282) /* Everest SP */ + port <<= 1; + else if (cfg->subdevice == 0x104b) /* Maestro SP2 */ + port = (port == 3) ? 4 : port; + *res = port * 8 + ((port > 2) ? 0x18 : 0); + return (0); } return (ENXIO); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604270337.k3R3bqeo069086>