The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/dec/mcclock_pad32.c

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: mcclock_pad32.c,v 1.10 2001/11/13 12:49:45 lukem Exp $ */
    2 
    3 /*
    4  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
    5  * All rights reserved.
    6  *
    7  * Author: Chris G. Demetriou
    8  *
    9  * Permission to use, copy, modify and distribute this software and
   10  * its documentation is hereby granted, provided that both the copyright
   11  * notice and this permission notice appear in all copies of the
   12  * software, derivative works or modified versions, and any portions
   13  * thereof, and that both notices appear in supporting documentation.
   14  *
   15  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   16  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
   17  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   18  *
   19  * Carnegie Mellon requests users of this software to return to
   20  *
   21  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   22  *  School of Computer Science
   23  *  Carnegie Mellon University
   24  *  Pittsburgh PA 15213-3890
   25  *
   26  * any improvements or extensions that they make and grant Carnegie the
   27  * rights to redistribute these changes.
   28  */
   29 
   30 #include <sys/cdefs.h>
   31 __KERNEL_RCSID(0, "$NetBSD: mcclock_pad32.c,v 1.10 2001/11/13 12:49:45 lukem Exp $");
   32 
   33 
   34 /*
   35  * mc1461818 (or compatible) clock chip driver,  for machines where each
   36  * byte-wide mcclock chip register is  mapped 
   37  * into the low-order byte of a little-endian 32-bit word.
   38  * 
   39  *  DECstation 2100/3100
   40  *  DECstation 5100
   41  *  DECstation 5000/200 baseboard
   42  *  IOCTL asic machines (Alpha  3000 series, Decstation 5000 series)
   43  *
   44  * bus-specific frontends should just declare an attach and match
   45  * entry, and set up a initializea switch to call the functions below. 
   46  */
   47 
   48 #include <sys/param.h>
   49 #include <sys/kernel.h>
   50 #include <sys/systm.h>
   51 #include <sys/device.h>
   52 
   53 #include <machine/autoconf.h>
   54 #include <dev/dec/clockvar.h>
   55 #include <dev/dec/mcclockvar.h>
   56 #include <dev/ic/mc146818reg.h>
   57 
   58 #include <dev/dec/mcclock_pad32.h>
   59 
   60 
   61 void    mcclock_pad32_write __P((struct mcclock_softc *, u_int, u_int));
   62 u_int   mcclock_pad32_read __P((struct mcclock_softc *, u_int));
   63 
   64 const struct mcclock_busfns mcclock_pad32_busfns = {
   65         mcclock_pad32_write, mcclock_pad32_read,
   66 };
   67 
   68 void
   69 mcclock_pad32_write(dev, reg, datum)
   70         struct mcclock_softc *dev;
   71         u_int reg, datum;
   72 {
   73         struct mcclock_pad32_softc *sc = (struct mcclock_pad32_softc *)dev;
   74 
   75         sc->sc_dp[reg].datum = datum;
   76 }
   77 
   78 u_int
   79 mcclock_pad32_read(dev, reg)
   80         struct mcclock_softc *dev;
   81         u_int reg;
   82 {
   83         struct mcclock_pad32_softc *sc = (struct mcclock_pad32_softc *)dev;
   84 
   85         return (sc->sc_dp[reg].datum);
   86 }

Cache object: 4d305dba60105d4db7509b61926f1362


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.