opms_jazzio.c revision 1.3
11.3Sthorpej/* $NetBSD: opms_jazzio.c,v 1.3 2002/10/02 04:59:49 thorpej Exp $ */ 21.1Ssoda 31.1Ssoda/* 41.1Ssoda * Copyright (c) 1995, 1996 Carnegie-Mellon University. 51.1Ssoda * All rights reserved. 61.1Ssoda * 71.1Ssoda * Author: Chris G. Demetriou 81.1Ssoda * 91.1Ssoda * Permission to use, copy, modify and distribute this software and 101.1Ssoda * its documentation is hereby granted, provided that both the copyright 111.1Ssoda * notice and this permission notice appear in all copies of the 121.1Ssoda * software, derivative works or modified versions, and any portions 131.1Ssoda * thereof, and that both notices appear in supporting documentation. 141.1Ssoda * 151.1Ssoda * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 161.1Ssoda * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 171.1Ssoda * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 181.1Ssoda * 191.1Ssoda * Carnegie Mellon requests users of this software to return to 201.1Ssoda * 211.1Ssoda * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 221.1Ssoda * School of Computer Science 231.1Ssoda * Carnegie Mellon University 241.1Ssoda * Pittsburgh PA 15213-3890 251.1Ssoda * 261.1Ssoda * any improvements or extensions that they make and grant Carnegie the 271.1Ssoda * rights to redistribute these changes. 281.1Ssoda */ 291.1Ssoda 301.1Ssoda#include <sys/param.h> 311.1Ssoda#include <sys/systm.h> 321.1Ssoda#include <sys/device.h> 331.1Ssoda#include <sys/tty.h> 341.1Ssoda 351.1Ssoda#include <machine/autoconf.h> 361.1Ssoda#include <machine/bus.h> 371.1Ssoda 381.1Ssoda#include <arc/dev/pcconsvar.h> 391.1Ssoda#include <arc/dev/opmsvar.h> 401.1Ssoda#include <arc/jazz/jazziovar.h> 411.1Ssoda#include <arc/jazz/pccons_jazziovar.h> 421.1Ssoda 431.1Ssodaint opms_jazzio_match __P((struct device *, struct cfdata *, void *)); 441.1Ssodavoid opms_jazzio_attach __P((struct device *, struct device *, void *)); 451.1Ssoda 461.3SthorpejCFATTACH_DECL(opms_jazzio, sizeof(struct opms_softc), 471.3Sthorpej opms_jazzio_match, opms_jazzio_attach, NULL, NULL); 481.1Ssoda 491.1Ssodaint 501.1Ssodaopms_jazzio_match(parent, match, aux) 511.1Ssoda struct device *parent; 521.1Ssoda struct cfdata *match; 531.1Ssoda void *aux; 541.1Ssoda{ 551.1Ssoda struct jazzio_attach_args *ja = aux; 561.1Ssoda 571.1Ssoda if (strcmp(ja->ja_name, "pms") != 0) 581.1Ssoda return (0); 591.1Ssoda 601.1Ssoda if (!opms_common_match(ja->ja_bust, &pccons_jazzio_conf)) 611.1Ssoda return (0); 621.1Ssoda 631.1Ssoda return (1); 641.1Ssoda} 651.1Ssoda 661.1Ssodavoid 671.1Ssodaopms_jazzio_attach(parent, self, aux) 681.1Ssoda struct device *parent, *self; 691.1Ssoda void *aux; 701.1Ssoda{ 711.1Ssoda struct opms_softc *sc = (struct opms_softc *)self; 721.1Ssoda struct jazzio_attach_args *ja = aux; 731.1Ssoda 741.1Ssoda printf("\n"); 751.1Ssoda 761.1Ssoda jazzio_intr_establish(ja->ja_intr, opmsintr, self); 771.1Ssoda opms_common_attach(sc, ja->ja_bust, &pccons_jazzio_conf); 781.1Ssoda} 79