[BACK]Return to clockvar.h CVS log [TXT][DIR] Up to [local] / sys / arch / mips64 / dev

Annotation of sys/arch/mips64/dev/clockvar.h, Revision 1.1.1.1

1.1       nbrk        1: /*     $OpenBSD: clockvar.h,v 1.3 2005/01/31 21:25:20 grange Exp $     */
                      2:
                      3: /*
                      4:  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
                      5:  * All rights reserved.
                      6:  *
                      7:  * Author: Chris G. Demetriou
                      8:  * Adopted for r4400: Per Fogelstrom
                      9:  *
                     10:  * Permission to use, copy, modify and distribute this software and
                     11:  * its documentation is hereby granted, provided that both the copyright
                     12:  * notice and this permission notice appear in all copies of the
                     13:  * software, derivative works or modified versions, and any portions
                     14:  * thereof, and that both notices appear in supporting documentation.
                     15:  *
                     16:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
                     17:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
                     18:  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
                     19:  *
                     20:  * Carnegie Mellon requests users of this software to return to
                     21:  *
                     22:  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
                     23:  *  School of Computer Science
                     24:  *  Carnegie Mellon University
                     25:  *  Pittsburgh PA 15213-3890
                     26:  *
                     27:  * any improvements or extensions that they make and grant Carnegie the
                     28:  * rights to redistribute these changes.
                     29:  */
                     30:
                     31: /*
                     32:  * Definitions for "cpu-independent" clock handling for the mips arc arch.
                     33:  */
                     34:
                     35: /*
                     36:  * clocktime structure:
                     37:  *
                     38:  * structure passed to TOY clocks when setting them.  broken out this
                     39:  * way, so that the time_t -> field conversion can be shared.
                     40:  */
                     41: struct tod_time {
                     42:        int     year;                   /* year 1900.... */
                     43:        int     mon;                    /* month (1 - 12) */
                     44:        int     day;                    /* day (1 - 31) */
                     45:        int     hour;                   /* hour (0 - 23) */
                     46:        int     min;                    /* minute (0 - 59) */
                     47:        int     sec;                    /* second (0 - 59) */
                     48:        int     dow;                    /* day of week (0 - 6; 0 = Sunday) */
                     49: };
                     50:
                     51: /*
                     52:  * clockdesc structure:
                     53:  *
                     54:  * provides clock-specific functions to do necessary operations.
                     55:  */
                     56: struct clock_softc;
                     57:
                     58: struct clock_desc {
                     59:        void    (*clk_attach)(struct device *, struct device *, void *);
                     60:        void    (*clk_init)(struct clock_softc *);
                     61:        void    (*clk_get)(struct clock_softc *, time_t, struct tod_time *);
                     62:        void    (*clk_set)(struct clock_softc *, struct tod_time *);
                     63:        int     clk_hz;
                     64:        int     clk_stathz;
                     65:        int     clk_profhz;
                     66: };
                     67:
                     68: struct clock_softc {
                     69:        struct  device sc_dev;
                     70:        struct  clock_desc sc_clock;
                     71:        int     sc_initted;
                     72:        bus_space_tag_t sc_clk_t;
                     73:        bus_space_handle_t sc_clk_h;
                     74:        void    *ih;
                     75: };
                     76:
                     77: void md_clk_attach(struct device *, struct device *, void *);

CVSweb