Home | History | Annotate | Line # | Download | only in gemini
      1 /*	$NetBSD: gemini_obiovar.h,v 1.4 2025/12/19 13:03:51 nia Exp $	*/
      2 
      3 /* adapted from:
      4  *	NetBSD: omap2_obiovar.h,v 1.1 2008/08/27 11:03:10 matt Exp
      5  */
      6 
      7 /*
      8  * Copyright (c) 2007 Microsoft
      9  * All rights reserved.
     10  *
     11  * Redistribution and use in source and binary forms, with or without
     12  * modification, are permitted provided that the following conditions
     13  * are met:
     14  * 1. Redistributions of source code must retain the above copyright
     15  *    notice, this list of conditions and the following disclaimer.
     16  * 2. Redistributions in binary form must reproduce the above copyright
     17  *    notice, this list of conditions and the following disclaimer in the
     18  *    documentation and/or other materials provided with the distribution.
     19  *
     20  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
     21  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     22  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     23  * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTERS BE LIABLE FOR ANY DIRECT,
     24  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
     25  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
     26  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     27  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     29  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     30  * SUCH DAMAGE.
     31  */
     32 #ifndef _ARM_GEMINI_OBIOVAR_H_
     33 #define _ARM_GEMINI_OBIOVAR_H_
     34 
     35 #include <dev/pci/pcivar.h>
     36 #include <arm/pci_machdep.h>
     37 
     38 struct obio_attach_args {
     39 	bus_space_tag_t	obio_iot;
     40 	bus_addr_t	obio_addr;
     41 	bus_size_t	obio_size;
     42 	int		obio_intr;
     43 	bus_dma_tag_t	obio_dmat;
     44 	unsigned int	obio_mult;
     45 	unsigned int	obio_intrbase;
     46 };
     47 
     48 typedef struct obio_softc {
     49 	device_t		sc_dev;
     50 	bus_dma_tag_t		sc_dmat;
     51 	struct arm32_dma_range	sc_dmarange;
     52 	bus_space_tag_t		sc_iot;
     53 	bus_space_handle_t	sc_ioh;
     54 	bus_addr_t		sc_base;
     55 	bus_size_t		sc_size;
     56 
     57 	/* Bus space, DMA, and PCI tags for the PCI bus. */
     58 	bus_space_handle_t	sc_pcicfg_ioh;
     59 	struct arm32_bus_dma_tag sc_pci_dmat;
     60 	struct arm32_pci_chipset sc_pci_chipset;
     61 } obio_softc_t;
     62 
     63 extern void gemini_pci_init(pci_chipset_tag_t, void *);
     64 
     65 #endif /* _ARM_OMAP_GEMINI_OBIOVAR_H_ */
     66