[BACK]Return to autoconf.h CVS log [TXT][DIR] Up to [local] / sys / arch / macppc / include

Annotation of sys/arch/macppc/include/autoconf.h, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: autoconf.h,v 1.7 2006/02/12 16:50:12 miod Exp $ */
        !             2:
        !             3: /*
        !             4:  * Copyright (c) 1997 Per Fogelstrom
        !             5:  *
        !             6:  * Redistribution and use in source and binary forms, with or without
        !             7:  * modification, are permitted provided that the following conditions
        !             8:  * are met:
        !             9:  * 1. Redistributions of source code must retain the above copyright
        !            10:  *    notice, this list of conditions and the following disclaimer.
        !            11:  * 2. Redistributions in binary form must reproduce the above copyright
        !            12:  *    notice, this list of conditions and the following disclaimer in the
        !            13:  *    documentation and/or other materials provided with the distribution.
        !            14:  *
        !            15:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
        !            16:  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
        !            17:  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
        !            18:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
        !            19:  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        !            20:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
        !            21:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
        !            22:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
        !            23:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
        !            24:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
        !            25:  * SUCH DAMAGE.
        !            26:  *
        !            27:  */
        !            28: /*
        !            29:  * Machine-dependent structures of autoconfiguration
        !            30:  */
        !            31:
        !            32: #ifndef _MACHINE_AUTOCONF_H_
        !            33: #define _MACHINE_AUTOCONF_H_
        !            34:
        !            35: #include <machine/bus.h>
        !            36:
        !            37: /*
        !            38:  *   System types.
        !            39:  */
        !            40: #define OFWMACH         0       /* Openfirmware drivers */
        !            41: #define        POWER4e         1       /* V.I Power.4e board */
        !            42: #define        PWRSTK          2       /* Motorola Powerstack series */
        !            43: #define        APPL            3       /* Apple PowerMac machines (OFW?) */
        !            44:
        !            45: extern int system_type;
        !            46:
        !            47: /**/
        !            48: struct confargs;
        !            49:
        !            50: typedef int (*intr_handler_t)(void *);
        !            51:
        !            52: typedef struct bushook {
        !            53:        struct  device *bh_dv;
        !            54:        int     bh_type;
        !            55:        void    (*bh_intr_establish)(struct confargs *, intr_handler_t, void *);
        !            56:        void    (*bh_intr_disestablish)(struct confargs *);
        !            57:        int     (*bh_matchname)(struct confargs *, char *);
        !            58: } bushook_t;
        !            59:
        !            60: #define        BUS_MAIN        1               /* mainbus */
        !            61: #define        BUS_ISABR       2               /* ISA Bridge Bus */
        !            62: #define        BUS_PCIBR       3               /* PCI bridge */
        !            63: #define        BUS_VMEBR       4               /* VME bridge */
        !            64:
        !            65: #define        BUS_INTR_ESTABLISH(ca, handler, val)                            \
        !            66:            (*(ca)->ca_bus->bh_intr_establish)((ca), (handler), (val))
        !            67: #define        BUS_INTR_DISESTABLISH(ca)                                       \
        !            68:            (*(ca)->ca_bus->bh_intr_establish)(ca)
        !            69: #define        BUS_CVTADDR(ca)                                                 \
        !            70:            (*(ca)->ca_bus->bh_cvtaddr)(ca)
        !            71: #define        BUS_MATCHNAME(ca, name)                                         \
        !            72:            (*(ca)->ca_bus->bh_matchname)((ca), (name))
        !            73:
        !            74: struct confargs {
        !            75:        char    *ca_name;               /* Device name. */
        !            76:        bushook_t *ca_bus;              /* bus device resides on. */
        !            77:        /* macobio hooks ?? */
        !            78:        bus_space_tag_t ca_iot;
        !            79:        bus_space_tag_t ca_memt; /* XXX */
        !            80:        bus_dma_tag_t ca_dmat;
        !            81:        u_int32_t ca_node;
        !            82:        int ca_nreg;
        !            83:        u_int32_t *ca_reg;
        !            84:        int ca_nintr;
        !            85:        int32_t *ca_intr;
        !            86:        u_int ca_baseaddr;
        !            87:
        !            88: };
        !            89:
        !            90: void   set_clockintr(void (*)(struct clockframe *));
        !            91: void   set_iointr(void (*)(void *, int));
        !            92: int    badaddr(void *, u_int32_t);
        !            93: void calc_delayconst(void);
        !            94:
        !            95: typedef int (time_read_t)(time_t *sec);
        !            96: typedef int (time_write_t)(time_t sec);
        !            97:
        !            98: extern time_read_t *time_read;
        !            99: extern time_write_t *time_write;
        !           100:
        !           101: typedef int mac_intr_handle_t;
        !           102: typedef void     *(intr_establish_t)(void *, mac_intr_handle_t,
        !           103:     int, int, int (*func)(void *), void *, char *);
        !           104: typedef void     (intr_disestablish_t)(void *, void *);
        !           105:
        !           106: intr_establish_t mac_intr_establish;
        !           107: intr_disestablish_t mac_intr_disestablish;
        !           108: extern intr_establish_t *intr_establish_func;
        !           109: extern intr_disestablish_t *intr_disestablish_func;
        !           110:
        !           111: #endif /* _MACHINE_AUTOCONF_H_ */

CVSweb