1*320845ddSdyoung /* $NetBSD: adm5120_obiovar.h,v 1.1 2007/03/20 08:52:03 dyoung Exp $ */ 2*320845ddSdyoung 3*320845ddSdyoung /*- 4*320845ddSdyoung * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko. 5*320845ddSdyoung * All rights reserved. 6*320845ddSdyoung * 7*320845ddSdyoung * Redistribution and use in source and binary forms, with or 8*320845ddSdyoung * without modification, are permitted provided that the following 9*320845ddSdyoung * conditions are met: 10*320845ddSdyoung * 1. Redistributions of source code must retain the above copyright 11*320845ddSdyoung * notice, this list of conditions and the following disclaimer. 12*320845ddSdyoung * 2. Redistributions in binary form must reproduce the above 13*320845ddSdyoung * copyright notice, this list of conditions and the following 14*320845ddSdyoung * disclaimer in the documentation and/or other materials provided 15*320845ddSdyoung * with the distribution. 16*320845ddSdyoung * 3. The names of the authors may not be used to endorse or promote 17*320845ddSdyoung * products derived from this software without specific prior 18*320845ddSdyoung * written permission. 19*320845ddSdyoung * 20*320845ddSdyoung * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY 21*320845ddSdyoung * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 22*320845ddSdyoung * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 23*320845ddSdyoung * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS 24*320845ddSdyoung * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 25*320845ddSdyoung * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26*320845ddSdyoung * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 27*320845ddSdyoung * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28*320845ddSdyoung * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 29*320845ddSdyoung * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 30*320845ddSdyoung * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 31*320845ddSdyoung * OF SUCH DAMAGE. 32*320845ddSdyoung */ 33*320845ddSdyoung /* 34*320845ddSdyoung * Copyright 2002 Wasabi Systems, Inc. 35*320845ddSdyoung * All rights reserved. 36*320845ddSdyoung * 37*320845ddSdyoung * Written by Simon Burge for Wasabi Systems, Inc. 38*320845ddSdyoung * 39*320845ddSdyoung * Redistribution and use in source and binary forms, with or without 40*320845ddSdyoung * modification, are permitted provided that the following conditions 41*320845ddSdyoung * are met: 42*320845ddSdyoung * 1. Redistributions of source code must retain the above copyright 43*320845ddSdyoung * notice, this list of conditions and the following disclaimer. 44*320845ddSdyoung * 2. Redistributions in binary form must reproduce the above copyright 45*320845ddSdyoung * notice, this list of conditions and the following disclaimer in the 46*320845ddSdyoung * documentation and/or other materials provided with the distribution. 47*320845ddSdyoung * 3. All advertising materials mentioning features or use of this software 48*320845ddSdyoung * must display the following acknowledgement: 49*320845ddSdyoung * This product includes software developed for the NetBSD Project by 50*320845ddSdyoung * Wasabi Systems, Inc. 51*320845ddSdyoung * 4. The name of Wasabi Systems, Inc. may not be used to endorse 52*320845ddSdyoung * or promote products derived from this software without specific prior 53*320845ddSdyoung * written permission. 54*320845ddSdyoung * 55*320845ddSdyoung * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND 56*320845ddSdyoung * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 57*320845ddSdyoung * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 58*320845ddSdyoung * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 59*320845ddSdyoung * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 60*320845ddSdyoung * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 61*320845ddSdyoung * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 62*320845ddSdyoung * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 63*320845ddSdyoung * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 64*320845ddSdyoung * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 65*320845ddSdyoung * POSSIBILITY OF SUCH DAMAGE. 66*320845ddSdyoung */ 67*320845ddSdyoung 68*320845ddSdyoung #ifndef _ADM5120_OBIOVAR_H_ 69*320845ddSdyoung #define _ADM5120_OBIOVAR_H_ 70*320845ddSdyoung 71*320845ddSdyoung #include <sys/types.h> 72*320845ddSdyoung #include <sys/gpio.h> 73*320845ddSdyoung #include <sys/ioctl.h> 74*320845ddSdyoung #include <dev/gpio/gpiovar.h> 75*320845ddSdyoung 76*320845ddSdyoung struct obio_attach_args { 77*320845ddSdyoung const char *oba_name; /* name of device */ 78*320845ddSdyoung bus_dma_tag_t oba_dt; 79*320845ddSdyoung bus_space_tag_t oba_st; 80*320845ddSdyoung bus_addr_t oba_addr; /* address of device */ 81*320845ddSdyoung int oba_irq; /* interrupt bit # */ 82*320845ddSdyoung void *oba_gpio; 83*320845ddSdyoung int oba_gpio_offset; 84*320845ddSdyoung uint32_t oba_gpio_mask; 85*320845ddSdyoung }; 86*320845ddSdyoung 87*320845ddSdyoung void obio_dma_init(bus_dma_tag_t); 88*320845ddSdyoung void obio_bus_mem_init(bus_space_tag_t, void *); 89*320845ddSdyoung 90*320845ddSdyoung #endif /* _ADM5120_OBIOVAR_H_ */ 91