autoconf.h revision 1.1
11.1Smatt/*- 21.1Smatt * Copyright (c) 2001 The NetBSD Foundation, Inc. 31.1Smatt * All rights reserved. 41.1Smatt * 51.1Smatt * This code is derived from software contributed to The NetBSD Foundation 61.1Smatt * by Matt Thomas <matt@3am-software.com> 71.1Smatt * 81.1Smatt * Redistribution and use in source and binary forms, with or without 91.1Smatt * modification, are permitted provided that the following conditions 101.1Smatt * are met: 111.1Smatt * 1. Redistributions of source code must retain the above copyright 121.1Smatt * notice, this list of conditions and the following disclaimer. 131.1Smatt * 2. Redistributions in binary form must reproduce the above copyright 141.1Smatt * notice, this list of conditions and the following disclaimer in the 151.1Smatt * documentation and/or other materials provided with the distribution. 161.1Smatt * 3. All advertising materials mentioning features or use of this software 171.1Smatt * must display the following acknowledgement: 181.1Smatt * This product includes software developed by the NetBSD 191.1Smatt * Foundation, Inc. and its contributors. 201.1Smatt * 4. Neither the name of The NetBSD Foundation nor the names of its 211.1Smatt * contributors may be used to endorse or promote products derived 221.1Smatt * from this software without specific prior written permission. 231.1Smatt * 241.1Smatt * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 251.1Smatt * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 261.1Smatt * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 271.1Smatt * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 281.1Smatt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 291.1Smatt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 301.1Smatt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 311.1Smatt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 321.1Smatt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 331.1Smatt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 341.1Smatt * POSSIBILITY OF SUCH DAMAGE. 351.1Smatt */ 361.1Smatt 371.1Smatt#ifndef _EVBARM_AUTOCONF_H_ 381.1Smatt#define _EVBARM_AUTOCONF_H_ 391.1Smatt 401.1Smatt#include <machine/bus.h> 411.1Smatt 421.1Smattstruct mainbus_attach_args { 431.1Smatt const char *ma_name; 441.1Smatt}; 451.1Smatt 461.1Smatt 471.1Smatt/* 481.1Smatt * There's no DMA to/from OBIO space so there's dma tag 491.1Smatt */ 501.1Smatt#define OBIO_MAXREGIONS 8 511.1Smatt 521.1Smattstruct obio_attach_args { 531.1Smatt const char *oa_name; 541.1Smatt int oa_instance; 551.1Smatt 561.1Smatt bus_space_tag_t oa_memt; 571.1Smatt int oa_nregions; 581.1Smatt bus_addr_t oa_addrs[OBIO_MAXREGIONS]; 591.1Smatt bus_size_t oa_lens[OBIO_MAXREGIONS]; 601.1Smatt 611.1Smatt int oa_irq; 621.1Smatt int oa_itype; 631.1Smatt struct intrsource *oa_isrc; 641.1Smatt}; 651.1Smatt 661.1Smatt#ifdef _KERNEL 671.1Smatt 681.1Smatt#include "locators.h" 691.1Smatt#define obiocf_instance cf_loc[OBIOCF_INSTANCE] 701.1Smatt 711.1Smatt#define obio_intr_establish(oa, func, arg) \ 721.1Smatt intr_establish((oa)->oa_isrc, (oa)->oa_irq, (oa)->oa_itype, func, arg) 731.1Smatt 741.1Smatt#endif /* _KERNEL */ 751.1Smatt 761.1Smatt#endif /* _EVBARM_AUTOCONF_H_ */ 77