/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 1999 Doug Rabson4* All rights reserved.5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions8* are met:9* 1. Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11* 2. Redistributions in binary form must reproduce the above copyright12* notice, this list of conditions and the following disclaimer in the13* documentation and/or other materials provided with the distribution.14*15* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND16* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE17* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE18* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE19* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL20* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS21* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)22* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT23* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY24* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF25* SUCH DAMAGE.26*/2728/*29* Parts of the ISA bus implementation common to all architectures.30*31* Drivers must not depend on information in this file as it can change32* without notice.33*/3435/*36* PNP configurations are kept in a tailq.37*/38TAILQ_HEAD(isa_config_list, isa_config_entry);39struct isa_config_entry {40TAILQ_ENTRY(isa_config_entry) ice_link;41int ice_priority;42struct isa_config ice_config;43};4445/*46* The structure used to attach devices to the isa bus.47*/48struct isa_device {49struct resource_list id_resources;50uint32_t id_vendorid; /* pnp vendor id */51uint32_t id_serial; /* pnp serial */52uint32_t id_logicalid; /* pnp logical device id */53uint32_t id_compatid; /* pnp compat device id */54struct isa_config_list id_configs; /* pnp config alternatives */55isa_config_cb *id_config_cb; /* callback function */56void *id_config_arg; /* callback argument */57int id_config_attr; /* pnp config attributes */58int id_pnpbios_handle; /* pnp handle, if any */59int id_pnp_csn; /* pnp Card Number */60int id_pnp_ldn; /* pnp Logical device on card */61int id_order;62};6364#define DEVTOISA(dev) ((struct isa_device *) device_get_ivars(dev))6566/*67* These functions are architecture dependent.68*/69extern void isa_init(device_t dev);70extern struct resource *isa_alloc_resource(device_t bus, device_t child,71int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count,72u_int flags);73extern int isa_release_resource(device_t bus, device_t child,74struct resource *r);7576extern driver_t isa_driver;777879