Home | History | Annotate | Line # | Download | only in marvell
gtpcivar.h revision 1.10.8.1
      1  1.10.8.1      yamt /*	$NetBSD: gtpcivar.h,v 1.10.8.1 2012/10/30 17:21:18 yamt Exp $	*/
      2       1.1      matt /*
      3       1.9  kiyohara  * Copyright (c) 2008 KIYOHARA Takashi
      4       1.1      matt  * All rights reserved.
      5       1.1      matt  *
      6       1.1      matt  * Redistribution and use in source and binary forms, with or without
      7       1.1      matt  * modification, are permitted provided that the following conditions
      8       1.1      matt  * are met:
      9       1.1      matt  * 1. Redistributions of source code must retain the above copyright
     10       1.1      matt  *    notice, this list of conditions and the following disclaimer.
     11       1.1      matt  * 2. Redistributions in binary form must reproduce the above copyright
     12       1.1      matt  *    notice, this list of conditions and the following disclaimer in the
     13       1.1      matt  *    documentation and/or other materials provided with the distribution.
     14       1.1      matt  *
     15       1.9  kiyohara  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     16       1.9  kiyohara  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     17       1.9  kiyohara  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
     18       1.9  kiyohara  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
     19       1.9  kiyohara  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
     20       1.9  kiyohara  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
     21       1.9  kiyohara  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     22       1.9  kiyohara  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     23       1.9  kiyohara  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
     24       1.9  kiyohara  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     25       1.1      matt  * POSSIBILITY OF SUCH DAMAGE.
     26       1.1      matt  */
     27       1.1      matt 
     28       1.9  kiyohara #ifndef	_GTPCIVAR_H_
     29       1.9  kiyohara #define	_GTPCIVAR_H_
     30       1.1      matt 
     31       1.9  kiyohara struct gtpci_softc {
     32       1.9  kiyohara 	device_t sc_dev;
     33       1.9  kiyohara 	int sc_model;
     34       1.9  kiyohara 	int sc_rev;
     35       1.9  kiyohara 	int sc_unit;
     36       1.9  kiyohara 
     37       1.9  kiyohara 	bus_space_tag_t sc_iot;
     38       1.9  kiyohara 	bus_space_handle_t sc_ioh;
     39       1.9  kiyohara 	pci_chipset_tag_t sc_pc;
     40       1.2      matt };
     41       1.1      matt 
     42      1.10  kiyohara /* protection flags */
     43      1.10  kiyohara struct gtpci_prot {
     44      1.10  kiyohara 	uint32_t acbl_flags;
     45      1.10  kiyohara 	uint32_t acs_flags;
     46      1.10  kiyohara };
     47      1.10  kiyohara 
     48       1.9  kiyohara #if NPCI > 0
     49       1.9  kiyohara void gtpci_attach_hook(device_t, device_t, struct pcibus_attach_args *);
     50       1.9  kiyohara int gtpci_bus_maxdevs(void *, int);
     51       1.9  kiyohara pcitag_t gtpci_make_tag(void *, int, int, int);
     52       1.9  kiyohara void gtpci_decompose_tag(void *, pcitag_t, int *, int *, int *);
     53       1.9  kiyohara pcireg_t gtpci_conf_read(void *, pcitag_t, int);
     54       1.9  kiyohara void gtpci_conf_write(void *, pcitag_t, int, pcireg_t);
     55  1.10.8.1      yamt int gtpci_conf_hook(void *, int, int, int, pcireg_t);
     56  1.10.8.1      yamt void gtpci_conf_interrupt(void *, int, int, int, int, int *);
     57       1.9  kiyohara int gtpci_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
     58       1.9  kiyohara const char *gtpci_intr_string(void *, pci_intr_handle_t);
     59       1.9  kiyohara const struct evcnt *gtpci_intr_evcnt(void *, pci_intr_handle_t);
     60       1.9  kiyohara void *gtpci_intr_establish(void *, pci_intr_handle_t, int, int (*)(void *),
     61       1.9  kiyohara 			   void *);
     62       1.9  kiyohara void gtpci_intr_disestablish(void *, void *);
     63       1.9  kiyohara #endif
     64       1.2      matt 
     65       1.9  kiyohara #endif	/* _GTPCIVAR_H_ */
     66