2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (C) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved.
8 #ifndef _ASM_IA64_SN_DRIVER_H
9 #define _ASM_IA64_SN_DRIVER_H
11 #include <asm/sn/sgi.h>
12 #include <asm/types.h>
15 ** Interface for device driver handle management.
17 ** These functions are mostly for use by the loadable driver code, and
18 ** for use by I/O bus infrastructure code.
21 typedef struct device_driver_s *device_driver_t;
23 /* == Driver thread priority support == */
30 typedef unsigned long iobush_t;
32 /* interrupt function */
33 typedef void *intr_arg_t;
34 typedef void intr_func_f(intr_arg_t);
35 typedef intr_func_f *intr_func_t;
37 #define INTR_ARG(n) ((intr_arg_t)(__psunsigned_t)(n))
39 /* system interrupt resource handle -- returned from intr_alloc */
40 typedef struct intr_s *intr_t;
41 #define INTR_HANDLE_NONE ((intr_t)0)
44 * restore interrupt level value, returned from intr_block_level
45 * for use with intr_unblock_level.
51 * A basic, platform-independent description of I/O requirements for
52 * a device. This structure is usually formed by lboot based on information
53 * in configuration files. It contains information about PIO, DMA, and
54 * interrupt requirements for a specific instance of a device.
56 * The pio description is currently unused.
58 * The dma description describes bandwidth characteristics and bandwidth
59 * allocation requirements. (TBD)
61 * The Interrupt information describes the priority of interrupt, desired
62 * destination, policy (TBD), whether this is an error interrupt, etc.
63 * For now, interrupts are targeted to specific CPUs.
66 typedef struct device_desc_s {
67 /* pio description (currently none) */
70 /* TBD: allocated badwidth requirements */
72 /* interrupt description */
73 vertex_hdl_t intr_target; /* Hardware locator string */
74 int intr_policy; /* TBD */
75 ilvl_t intr_swlevel; /* software level for blocking intr */
76 char *intr_name; /* name of interrupt, if any */
82 #define D_INTR_ISERR 0x1 /* interrupt is for error handling */
83 #define D_IS_ASSOC 0x2 /* descriptor is associated with a dev */
84 #define D_INTR_NOTHREAD 0x4 /* Interrupt handler isn't threaded. */
86 #define INTR_SWLEVEL_NOTHREAD_DEFAULT 0 /* Default
87 * Interrupt level in case of
88 * non-threaded interrupt
91 #endif /* _ASM_IA64_SN_DRIVER_H */