From owner-p4-projects@FreeBSD.ORG Thu Apr 27 03:37:53 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7C1A516A402; Thu, 27 Apr 2006 03:37:53 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3F6F416A400 for ; Thu, 27 Apr 2006 03:37:53 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05F5543D45 for ; Thu, 27 Apr 2006 03:37:53 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3R3bqJw069094 for ; Thu, 27 Apr 2006 03:37:52 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3R3bqeo069086 for perforce@freebsd.org; Thu, 27 Apr 2006 03:37:52 GMT (envelope-from marcel@freebsd.org) Date: Thu, 27 Apr 2006 03:37:52 GMT Message-Id: <200604270337.k3R3bqeo069086@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 96185 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Apr 2006 03:37:53 -0000 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); }