1*e265f67bSdyoung /* $NetBSD: adm5120var.h,v 1.3 2011/07/01 18:38:49 dyoung Exp $ */ 2320845ddSdyoung 3320845ddSdyoung /*- 4320845ddSdyoung * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko. 5320845ddSdyoung * All rights reserved. 6320845ddSdyoung * 7320845ddSdyoung * Redistribution and use in source and binary forms, with or 8320845ddSdyoung * without modification, are permitted provided that the following 9320845ddSdyoung * conditions are met: 10320845ddSdyoung * 1. Redistributions of source code must retain the above copyright 11320845ddSdyoung * notice, this list of conditions and the following disclaimer. 12320845ddSdyoung * 2. Redistributions in binary form must reproduce the above 13320845ddSdyoung * copyright notice, this list of conditions and the following 14320845ddSdyoung * disclaimer in the documentation and/or other materials provided 15320845ddSdyoung * with the distribution. 16320845ddSdyoung * 3. The names of the authors may not be used to endorse or promote 17320845ddSdyoung * products derived from this software without specific prior 18320845ddSdyoung * written permission. 19320845ddSdyoung * 20320845ddSdyoung * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY 21320845ddSdyoung * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 22320845ddSdyoung * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 23320845ddSdyoung * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS 24320845ddSdyoung * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 25320845ddSdyoung * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26320845ddSdyoung * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 27320845ddSdyoung * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28320845ddSdyoung * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 29320845ddSdyoung * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 30320845ddSdyoung * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 31320845ddSdyoung * OF SUCH DAMAGE. 32320845ddSdyoung */ 33320845ddSdyoung /*- 34320845ddSdyoung * Copyright (c) 2001 The NetBSD Foundation, Inc. 35320845ddSdyoung * All rights reserved. 36320845ddSdyoung * 37320845ddSdyoung * This code is derived from software contributed to The NetBSD Foundation 38320845ddSdyoung * by Jason R. Thorpe. 39320845ddSdyoung * 40320845ddSdyoung * Redistribution and use in source and binary forms, with or without 41320845ddSdyoung * modification, are permitted provided that the following conditions 42320845ddSdyoung * are met: 43320845ddSdyoung * 1. Redistributions of source code must retain the above copyright 44320845ddSdyoung * notice, this list of conditions and the following disclaimer. 45320845ddSdyoung * 2. Redistributions in binary form must reproduce the above copyright 46320845ddSdyoung * notice, this list of conditions and the following disclaimer in the 47320845ddSdyoung * documentation and/or other materials provided with the distribution. 48320845ddSdyoung * 49320845ddSdyoung * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 50320845ddSdyoung * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 51320845ddSdyoung * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 52320845ddSdyoung * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 53320845ddSdyoung * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 54320845ddSdyoung * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 55320845ddSdyoung * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 56320845ddSdyoung * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 57320845ddSdyoung * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 58320845ddSdyoung * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 59320845ddSdyoung * POSSIBILITY OF SUCH DAMAGE. 60320845ddSdyoung */ 61320845ddSdyoung 62320845ddSdyoung #ifndef _ADM5120VAR_H_ 63320845ddSdyoung #define _ADM5120VAR_H_ 64320845ddSdyoung 65*e265f67bSdyoung #include <sys/bus.h> 66320845ddSdyoung 67320845ddSdyoung #if 0 68320845ddSdyoung #include <sys/socket.h> 69320845ddSdyoung #include <net/if.h> 70320845ddSdyoung #include <net/if_ether.h> 71320845ddSdyoung #endif 72320845ddSdyoung 73320845ddSdyoung #include <prop/proplib.h> 74320845ddSdyoung 75320845ddSdyoung struct adm5120_config { 76320845ddSdyoung struct mips_bus_space obio_space; 77320845ddSdyoung struct mips_bus_space extio_space; 78320845ddSdyoung struct mips_bus_space pciio_space; 79320845ddSdyoung struct mips_bus_space pcimem_space; 80320845ddSdyoung struct mips_bus_dma_tag pci_dmat; 81320845ddSdyoung struct mips_bus_dma_tag obio_dmat; 82320845ddSdyoung char args[128]; 83320845ddSdyoung int argc; 84320845ddSdyoung char *argv[32]; 85320845ddSdyoung prop_dictionary_t properties; 86320845ddSdyoung }; 87320845ddSdyoung 88320845ddSdyoung #ifdef _KERNEL 89320845ddSdyoung extern struct adm5120_config adm5120_configuration; 90320845ddSdyoung 91320845ddSdyoung #define INTR_IRQ 0 92320845ddSdyoung #define INTR_FIQ 1 93320845ddSdyoung 94320845ddSdyoung void *adm5120_intr_establish(int, int, int (*)(void *), void *); 95320845ddSdyoung void adm5120_intr_disestablish(void *); 96320845ddSdyoung #endif /* _KERNEL */ 97320845ddSdyoung 98320845ddSdyoung #endif /* _ADM5120VAR_H_ */ 99