1*6b796b19Sdyoung /* $NetBSD: rmixl_usbivar.h,v 1.4 2011/07/08 19:10:14 dyoung Exp $ */ 23e67b512Smatt 33e67b512Smatt /*- 43e67b512Smatt * Copyright (c) 2009 The NetBSD Foundation, Inc. 53e67b512Smatt * All rights reserved. 63e67b512Smatt * 73e67b512Smatt * This code is derived from software contributed to The NetBSD Foundation 83e67b512Smatt * by Cliff Neighbors 93e67b512Smatt * 103e67b512Smatt * Redistribution and use in source and binary forms, with or without 113e67b512Smatt * modification, are permitted provided that the following conditions 123e67b512Smatt * are met: 133e67b512Smatt * 1. Redistributions of source code must retain the above copyright 143e67b512Smatt * notice, this list of conditions and the following disclaimer. 153e67b512Smatt * 2. Redistributions in binary form must reproduce the above copyright 163e67b512Smatt * notice, this list of conditions and the following disclaimer in the 173e67b512Smatt * documentation and/or other materials provided with the distribution. 183e67b512Smatt * 193e67b512Smatt * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 203e67b512Smatt * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 213e67b512Smatt * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 223e67b512Smatt * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 233e67b512Smatt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 243e67b512Smatt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 253e67b512Smatt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 263e67b512Smatt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 273e67b512Smatt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 283e67b512Smatt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 293e67b512Smatt * POSSIBILITY OF SUCH DAMAGE. 303e67b512Smatt */ 313e67b512Smatt 323e67b512Smatt #ifndef _MIPS_RMI_RMIXL_USBIVAR_H_ 333e67b512Smatt #define _MIPS_RMI_RMIXL_USBIVAR_H_ 343e67b512Smatt 353e67b512Smatt #include <sys/bus.h> 363e67b512Smatt 373e67b512Smatt struct rmixl_usbi_attach_args { 383e67b512Smatt bus_space_tag_t usbi_eb_bst; 393e67b512Smatt bus_space_tag_t usbi_el_bst; 403e67b512Smatt bus_addr_t usbi_addr; 413e67b512Smatt bus_size_t usbi_size; 423e67b512Smatt int usbi_intr; 433e67b512Smatt bus_dma_tag_t usbi_dmat; 443e67b512Smatt }; 453e67b512Smatt 46294e5e26Smatt typedef struct rmixl_usbi_dispatch { 47294e5e26Smatt int (*func)(void *); 48294e5e26Smatt void *arg; 49294e5e26Smatt struct evcnt count; 50294e5e26Smatt } rmixl_usbi_dispatch_t; 51294e5e26Smatt 52294e5e26Smatt typedef struct rmixl_usbi_softc { 53294e5e26Smatt device_t sc_dev; 54294e5e26Smatt bus_space_tag_t sc_eb_bst; 55294e5e26Smatt bus_space_tag_t sc_el_bst; 56294e5e26Smatt bus_addr_t sc_addr; 57294e5e26Smatt bus_size_t sc_size; 58294e5e26Smatt bus_dma_tag_t sc_dmat; 59294e5e26Smatt device_t sc_ohci_devs[2]; 60294e5e26Smatt rmixl_usbi_dispatch_t sc_dispatch[RMIXL_UB_INTERRUPT_MAX + 1]; 61294e5e26Smatt } rmixl_usbi_softc_t; 62294e5e26Smatt 63294e5e26Smatt 64294e5e26Smatt #ifdef _KERNEL 65294e5e26Smatt void *rmixl_usbi_intr_establish(void *, u_int, int (*)(void *), void *); 66294e5e26Smatt void rmixl_usbi_intr_disestablish(void *, void *); 67294e5e26Smatt #endif 683e67b512Smatt 693e67b512Smatt #endif /* _MIPS_RMI_RMIXL_USBIVAR_H_ */ 70