/*-1* SPDX-License-Identifier: BSD-3-Clause2*3* Copyright 2002 by Peter Grehan. All rights reserved.4*5* Redistribution and use in source and binary forms, with or without6* modification, are permitted provided that the following conditions7* are met:8* 1. Redistributions of source code must retain the above copyright9* notice, this list of conditions and the following disclaimer.10* 2. Redistributions in binary form must reproduce the above copyright11* notice, this list of conditions and the following disclaimer in the12* documentation and/or other materials provided with the distribution.13* 3. The name of the author may not be used to endorse or promote products14* derived from this software without specific prior written permission.15*16* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR17* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES18* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.19* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,20* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,21* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED23* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,24* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY25* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF26* SUCH DAMAGE.27*/2829#ifndef _PSIM_IOBUSVAR_H_30#define _PSIM_IOBUSVAR_H_3132/*33* Accessors for iobus devices34*/3536enum iobus_ivars {37IOBUS_IVAR_NODE,38IOBUS_IVAR_NAME,39IOBUS_IVAR_NREGS,40IOBUS_IVAR_REGS,41};4243#define IOBUS_ACCESSOR(var, ivar, type) \44__BUS_ACCESSOR(iobus, var, IOBUS, ivar, type)4546IOBUS_ACCESSOR(node, NODE, phandle_t)47IOBUS_ACCESSOR(name, NAME, char *)48IOBUS_ACCESSOR(nregs, NREGS, u_int)49IOBUS_ACCESSOR(regs, REGS, u_int *)5051#undef IOBUS_ACCESSOR5253/*54* Per-device structure.55*/56struct iobus_devinfo {57phandle_t id_node;58char *id_name;59int id_interrupt;60u_int id_nregs;61u_int id_reg[24];62struct resource_list id_resources;63};6465#endif /* _PSIM_IOBUSVAR_H_ */666768