1*28d09237Sjsg /* $OpenBSD: autoconf.h,v 1.13 2024/05/22 05:51:49 jsg Exp $ */ 252c13d20Sdrahn 352c13d20Sdrahn /* 452c13d20Sdrahn * Copyright (c) 1997 Per Fogelstrom 552c13d20Sdrahn * 652c13d20Sdrahn * Redistribution and use in source and binary forms, with or without 752c13d20Sdrahn * modification, are permitted provided that the following conditions 852c13d20Sdrahn * are met: 952c13d20Sdrahn * 1. Redistributions of source code must retain the above copyright 1052c13d20Sdrahn * notice, this list of conditions and the following disclaimer. 1152c13d20Sdrahn * 2. Redistributions in binary form must reproduce the above copyright 1252c13d20Sdrahn * notice, this list of conditions and the following disclaimer in the 1352c13d20Sdrahn * documentation and/or other materials provided with the distribution. 1452c13d20Sdrahn * 1552c13d20Sdrahn * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 1652c13d20Sdrahn * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 1752c13d20Sdrahn * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1852c13d20Sdrahn * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 1952c13d20Sdrahn * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2052c13d20Sdrahn * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2152c13d20Sdrahn * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2252c13d20Sdrahn * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2352c13d20Sdrahn * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2452c13d20Sdrahn * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2552c13d20Sdrahn * SUCH DAMAGE. 2652c13d20Sdrahn * 2752c13d20Sdrahn */ 2852c13d20Sdrahn /* 2952c13d20Sdrahn * Machine-dependent structures of autoconfiguration 3052c13d20Sdrahn */ 3152c13d20Sdrahn 3252c13d20Sdrahn #ifndef _MACHINE_AUTOCONF_H_ 3352c13d20Sdrahn #define _MACHINE_AUTOCONF_H_ 3452c13d20Sdrahn 3552c13d20Sdrahn #include <machine/bus.h> 3652c13d20Sdrahn 3752c13d20Sdrahn struct confargs { 389328f6d5Stobiasu char *ca_name; 3952c13d20Sdrahn bus_space_tag_t ca_iot; 40c9b17401Smickey bus_dma_tag_t ca_dmat; 4152c13d20Sdrahn u_int32_t ca_node; 4252c13d20Sdrahn int ca_nreg; 4352c13d20Sdrahn u_int32_t *ca_reg; 4452c13d20Sdrahn int ca_nintr; 4552c13d20Sdrahn int32_t *ca_intr; 4652c13d20Sdrahn u_int ca_baseaddr; 4752c13d20Sdrahn 4852c13d20Sdrahn }; 4952c13d20Sdrahn 50c4071fd1Smillert int badaddr(void *, u_int32_t); 5152c13d20Sdrahn 52260dccbcSkettenis typedef int (time_read_t)(time_t *sec); 53260dccbcSkettenis typedef int (time_write_t)(time_t sec); 54260dccbcSkettenis 55260dccbcSkettenis extern time_read_t *time_read; 56260dccbcSkettenis extern time_write_t *time_write; 57260dccbcSkettenis 5852c13d20Sdrahn typedef int mac_intr_handle_t; 594f9e30d0Smillert typedef void *(intr_establish_t)(void *, mac_intr_handle_t, 60c03b1b92Smk int, int, int (*func)(void *), void *, const char *); 61c4071fd1Smillert typedef void (intr_disestablish_t)(void *, void *); 628d4cccd1Sdrahn struct cpu_info; 638d4cccd1Sdrahn typedef void (intr_send_ipi_t)(struct cpu_info *, int); 6452c13d20Sdrahn 6552c13d20Sdrahn intr_establish_t mac_intr_establish; 6652c13d20Sdrahn intr_disestablish_t mac_intr_disestablish; 6752c13d20Sdrahn extern intr_establish_t *intr_establish_func; 6852c13d20Sdrahn extern intr_disestablish_t *intr_disestablish_func; 698d4cccd1Sdrahn extern intr_send_ipi_t *intr_send_ipi_func; 708d4cccd1Sdrahn 7152c13d20Sdrahn 7252c13d20Sdrahn #endif /* _MACHINE_AUTOCONF_H_ */ 73