1*1c7f7befSderaadt /* $OpenBSD: mongoosevar.h,v 1.2 2007/05/10 17:59:24 deraadt Exp $ */ 2a8c1b917Smiod 3a8c1b917Smiod /* 4a8c1b917Smiod * Copyright (c) 1998-2003 Michael Shalayeff 5a8c1b917Smiod * All rights reserved. 6a8c1b917Smiod * 7a8c1b917Smiod * Redistribution and use in source and binary forms, with or without 8a8c1b917Smiod * modification, are permitted provided that the following conditions 9a8c1b917Smiod * are met: 10a8c1b917Smiod * 1. Redistributions of source code must retain the above copyright 11a8c1b917Smiod * notice, this list of conditions and the following disclaimer. 12a8c1b917Smiod * 2. Redistributions in binary form must reproduce the above copyright 13a8c1b917Smiod * notice, this list of conditions and the following disclaimer in the 14a8c1b917Smiod * documentation and/or other materials provided with the distribution. 15a8c1b917Smiod * 16a8c1b917Smiod * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17a8c1b917Smiod * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18a8c1b917Smiod * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19a8c1b917Smiod * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT, 20a8c1b917Smiod * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21a8c1b917Smiod * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22a8c1b917Smiod * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23a8c1b917Smiod * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 24a8c1b917Smiod * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 25a8c1b917Smiod * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 26a8c1b917Smiod * THE POSSIBILITY OF SUCH DAMAGE. 27a8c1b917Smiod */ 28a8c1b917Smiod 29a8c1b917Smiod struct hppa_isa_iv { 30a8c1b917Smiod const char *iv_name; 31a8c1b917Smiod int (*iv_handler)(void *arg); 32a8c1b917Smiod void *iv_arg; 33a8c1b917Smiod int iv_pri; 34a8c1b917Smiod 35a8c1b917Smiod /* don't do sharing, we won't have many slots anyway 36a8c1b917Smiod struct hppa_isa_iv *iv_next; 37a8c1b917Smiod */ 38a8c1b917Smiod }; 39a8c1b917Smiod 40a8c1b917Smiod struct mongoose_softc { 41a8c1b917Smiod struct device sc_dev; 42a8c1b917Smiod void *sc_ih; 43a8c1b917Smiod 44a8c1b917Smiod bus_space_tag_t sc_bt; 45a8c1b917Smiod volatile struct mongoose_regs *sc_regs; 46a8c1b917Smiod volatile struct mongoose_ctrl *sc_ctrl; 47a8c1b917Smiod bus_addr_t sc_iomap; 48a8c1b917Smiod 49a8c1b917Smiod /* interrupts section */ 50a8c1b917Smiod struct hppa_eisa_chipset sc_ec; 51a8c1b917Smiod struct hppa_isa_chipset sc_ic; 52a8c1b917Smiod struct hppa_isa_iv sc_iv[MONGOOSE_NINTS]; 53a8c1b917Smiod 54a8c1b917Smiod /* isa/eisa bus guts */ 55a8c1b917Smiod struct hppa_bus_space_tag sc_eiot; 56a8c1b917Smiod struct hppa_bus_space_tag sc_ememt; 57a8c1b917Smiod struct hppa_bus_dma_tag sc_edmat; 58a8c1b917Smiod struct hppa_bus_space_tag sc_iiot; 59a8c1b917Smiod struct hppa_bus_space_tag sc_imemt; 60a8c1b917Smiod struct hppa_bus_dma_tag sc_idmat; 61a8c1b917Smiod }; 62a8c1b917Smiod 63a8c1b917Smiod union mongoose_attach_args { 64a8c1b917Smiod char *mongoose_name; 65a8c1b917Smiod struct eisabus_attach_args mongoose_eisa; 66a8c1b917Smiod struct isabus_attach_args mongoose_isa; 67a8c1b917Smiod }; 68a8c1b917Smiod 69a8c1b917Smiod int mgattach_common(struct mongoose_softc *); 70a8c1b917Smiod int mgprint(void *, const char *); 71a8c1b917Smiod int mg_intr(void *); 72