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

Annotation of sys/arch/hppa64/include/pci_machdep.h, Revision 1.1.1.1

1.1       nbrk        1: /*     $OpenBSD: pci_machdep.h,v 1.1 2005/04/01 10:40:48 mickey Exp $  */
                      2:
                      3: /*
                      4:  * Copyright (c) 2005 Michael Shalayeff
                      5:  * All rights reserved.
                      6:  *
                      7:  * Permission to use, copy, modify, and distribute this software for any
                      8:  * purpose with or without fee is hereby granted, provided that the above
                      9:  * copyright notice and this permission notice appear in all copies.
                     10:  *
                     11:  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
                     12:  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
                     13:  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
                     14:  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
                     15:  * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
                     16:  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
                     17:  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
                     18:  */
                     19:
                     20: #ifndef        _MACHINE_PCI_MACHDEP_H_
                     21: #define        _MACHINE_PCI_MACHDEP_H_
                     22:
                     23: /*
                     24:  * Types provided to machine-independent PCI code
                     25:  */
                     26: typedef struct hppa64_pci_chipset_tag *pci_chipset_tag_t;
                     27: typedef u_int pcitag_t;
                     28: typedef u_long pci_intr_handle_t;
                     29:
                     30: struct pci_attach_args;
                     31:
                     32: struct hppa64_pci_chipset_tag {
                     33:        void            *_cookie;
                     34:        void            (*pc_attach_hook)(struct device *,
                     35:                            struct device *, struct pcibus_attach_args *);
                     36:        int             (*pc_bus_maxdevs)(void *, int);
                     37:        pcitag_t        (*pc_make_tag)(void *, int, int, int);
                     38:        void            (*pc_decompose_tag)(void *, pcitag_t, int *,
                     39:                            int *, int *);
                     40:        pcireg_t        (*pc_conf_read)(void *, pcitag_t, int);
                     41:        void            (*pc_conf_write)(void *, pcitag_t, int, pcireg_t);
                     42:
                     43:        int             (*pc_intr_map)(struct pci_attach_args *,
                     44:                            pci_intr_handle_t *);
                     45:        const char      *(*pc_intr_string)(void *, pci_intr_handle_t);
                     46:        void            *(*pc_intr_establish)(void *, pci_intr_handle_t,
                     47:                            int, int (*)(void *), void *, char *);
                     48:        void            (*pc_intr_disestablish)(void *, void *);
                     49:
                     50:        void            *(*pc_alloc_parent)(struct device *,
                     51:                            struct pci_attach_args *, int);
                     52: };
                     53:
                     54: /*
                     55:  * Functions provided to machine-independent PCI code.
                     56:  */
                     57: #define        pci_attach_hook(p, s, pba)                                      \
                     58:     (*(pba)->pba_pc->pc_attach_hook)((p), (s), (pba))
                     59: #define        pci_bus_maxdevs(c, b)                                           \
                     60:     (*(c)->pc_bus_maxdevs)((c)->_cookie, (b))
                     61: #define        pci_make_tag(c, b, d, f)                                        \
                     62:     (*(c)->pc_make_tag)((c)->_cookie, (b), (d), (f))
                     63: #define        pci_decompose_tag(c, t, bp, dp, fp)                             \
                     64:     (*(c)->pc_decompose_tag)((c)->_cookie, (t), (bp), (dp), (fp))
                     65: #define        pci_conf_read(c, t, r)                                          \
                     66:     (*(c)->pc_conf_read)((c)->_cookie, (t), (r))
                     67: #define        pci_conf_write(c, t, r, v)                                      \
                     68:     (*(c)->pc_conf_write)((c)->_cookie, (t), (r), (v))
                     69: #define        pci_intr_map(p, ihp)                                            \
                     70:     (*(p)->pa_pc->pc_intr_map)((p), (ihp))
                     71: #define        pci_intr_line(ih)       (ih)
                     72: #define        pci_intr_string(c, ih)                                          \
                     73:     (*(c)->pc_intr_string)((c)->_cookie, (ih))
                     74: #define        pci_intr_establish(c, ih, l, h, a, nm)                          \
                     75:     (*(c)->pc_intr_establish)((c)->_cookie, (ih), (l), (h), (a), (nm))
                     76: #define        pci_intr_disestablish(c, iv)                                    \
                     77:     (*(c)->pc_intr_disestablish)((c)->_cookie, (iv))
                     78:
                     79: #define        pciide_machdep_compat_intr_establish(a, b, c, d, e)     (NULL)
                     80: #define        pciide_machdep_compat_intr_disestablish(a, b)   ((void)(a), (void)(b))
                     81:
                     82: #endif /* _MACHINE_PCI_MACHDEP_H_ */

CVSweb