3 * This file is subject to the terms and conditions of the GNU General Public
4 * License. See the file "COPYING" in the main directory of this archive
7 * Copyright (C) 1992 - 1997, 2000-2002 Silicon Graphics, Inc. All rights reserved.
9 #ifndef _ASM_IA64_SN_DRIVER_H
10 #define _ASM_IA64_SN_DRIVER_H
12 #include <linux/devfs_fs_kernel.h>
13 #include <asm/types.h>
16 ** Interface for device driver handle management.
18 ** These functions are mostly for use by the loadable driver code, and
19 ** for use by I/O bus infrastructure code.
22 typedef struct device_driver_s *device_driver_t;
24 /* == Driver thread priority support == */
35 typedef __psunsigned_t iobush_t;
37 /* interrupt function */
38 typedef void *intr_arg_t;
39 typedef void intr_func_f(intr_arg_t);
40 typedef intr_func_f *intr_func_t;
42 #define INTR_ARG(n) ((intr_arg_t)(__psunsigned_t)(n))
44 /* system interrupt resource handle -- returned from intr_alloc */
45 typedef struct intr_s *intr_t;
46 #define INTR_HANDLE_NONE ((intr_t)0)
49 * restore interrupt level value, returned from intr_block_level
50 * for use with intr_unblock_level.
56 * A basic, platform-independent description of I/O requirements for
57 * a device. This structure is usually formed by lboot based on information
58 * in configuration files. It contains information about PIO, DMA, and
59 * interrupt requirements for a specific instance of a device.
61 * The pio description is currently unused.
63 * The dma description describes bandwidth characteristics and bandwidth
64 * allocation requirements. (TBD)
66 * The Interrupt information describes the priority of interrupt, desired
67 * destination, policy (TBD), whether this is an error interrupt, etc.
68 * For now, interrupts are targeted to specific CPUs.
71 typedef struct device_desc_s {
72 /* pio description (currently none) */
75 /* TBD: allocated badwidth requirements */
77 /* interrupt description */
78 devfs_handle_t intr_target; /* Hardware locator string */
79 int intr_policy; /* TBD */
80 ilvl_t intr_swlevel; /* software level for blocking intr */
81 char *intr_name; /* name of interrupt, if any */
87 #define D_INTR_ISERR 0x1 /* interrupt is for error handling */
88 #define D_IS_ASSOC 0x2 /* descriptor is associated with a dev */
89 #define D_INTR_NOTHREAD 0x4 /* Interrupt handler isn't threaded. */
91 #define INTR_SWLEVEL_NOTHREAD_DEFAULT 0 /* Default
92 * Interrupt level in case of
93 * non-threaded interrupt
96 #endif /* _ASM_IA64_SN_DRIVER_H */