opms_jazzio.c revision 1.1
11.1Ssoda/* $NetBSD: opms_jazzio.c,v 1.1 2001/06/13 15:05:46 soda 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.1Ssodastruct cfattach opms_jazzio_ca = { 471.1Ssoda sizeof(struct opms_softc), 481.1Ssoda opms_jazzio_match, opms_jazzio_attach, 491.1Ssoda}; 501.1Ssoda 511.1Ssodaint 521.1Ssodaopms_jazzio_match(parent, match, aux) 531.1Ssoda struct device *parent; 541.1Ssoda struct cfdata *match; 551.1Ssoda void *aux; 561.1Ssoda{ 571.1Ssoda struct jazzio_attach_args *ja = aux; 581.1Ssoda 591.1Ssoda if (strcmp(ja->ja_name, "pms") != 0) 601.1Ssoda return (0); 611.1Ssoda 621.1Ssoda if (!opms_common_match(ja->ja_bust, &pccons_jazzio_conf)) 631.1Ssoda return (0); 641.1Ssoda 651.1Ssoda return (1); 661.1Ssoda} 671.1Ssoda 681.1Ssodavoid 691.1Ssodaopms_jazzio_attach(parent, self, aux) 701.1Ssoda struct device *parent, *self; 711.1Ssoda void *aux; 721.1Ssoda{ 731.1Ssoda struct opms_softc *sc = (struct opms_softc *)self; 741.1Ssoda struct jazzio_attach_args *ja = aux; 751.1Ssoda 761.1Ssoda printf("\n"); 771.1Ssoda 781.1Ssoda jazzio_intr_establish(ja->ja_intr, opmsintr, self); 791.1Ssoda opms_common_attach(sc, ja->ja_bust, &pccons_jazzio_conf); 801.1Ssoda} 81