import of upstream 2.4.34.4 from kernel.org
[linux-2.4.git] / arch / ia64 / sn / io / hwgdfs / invent_stub.c
1 /* $Id$
2  *
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
5  * for more details.
6  *
7  * Copyright (C) 1992-1997,2000-2003 Silicon Graphics, Inc. All rights reserved.
8  */
9
10 /*
11  * Hardware Inventory
12  *
13  * See sys/sn/invent.h for an explanation of the hardware inventory contents.
14  *
15  */
16 #include <linux/types.h>
17 #include <asm/sn/sgi.h>
18 #include <asm/sn/invent.h>
19 #include <asm/sn/hcl.h>
20 #include <asm/sn/labelcl.h>
21
22 void
23 inventinit(void)
24 {
25 }
26
27 /*
28  * For initializing/updating an inventory entry.
29  */
30 void
31 replace_in_inventory(
32         inventory_t *pinv, int class, int type,
33         int controller, int unit, int state)
34 {
35 }
36
37 /*
38  * Inventory addition 
39  *
40  * XXX NOTE: Currently must be called after dynamic memory allocator is
41  * initialized.
42  *
43  */
44 void
45 add_to_inventory(int class, int type, int controller, int unit, int state)
46 {
47 }
48
49
50 /*
51  * Inventory retrieval 
52  *
53  * These two routines are intended to prevent the caller from having to know
54  * the internal structure of the inventory table.
55  *
56  * The caller of get_next_inventory is supposed to call start_scan_invent
57  * before the irst call to get_next_inventory, and the caller is required
58  * to call end_scan_invent after the last call to get_next_inventory.
59  */
60 inventory_t *
61 get_next_inventory(invplace_t *place)
62 {
63         return((inventory_t *) NULL);
64 }
65
66 /* ARGSUSED */
67 int
68 get_sizeof_inventory(int abi)
69 {
70         return sizeof(inventory_t);
71 }
72
73 /* Must be called prior to first call to get_next_inventory */
74 void
75 start_scan_inventory(invplace_t *iplace)
76 {
77 }
78
79 /* Must be called after last call to get_next_inventory */
80 void
81 end_scan_inventory(invplace_t *iplace)
82 {
83 }
84
85 /*
86  * Hardware inventory scanner.
87  *
88  * Calls fun() for every entry in inventory list unless fun() returns something
89  * other than 0.
90  */
91 int
92 scaninvent(int (*fun)(inventory_t *, void *), void *arg)
93 {
94         return 0;
95 }
96
97 /*
98  * Find a particular inventory object
99  *
100  * pinv can be a pointer to an inventory entry and the search will begin from
101  * there, or it can be 0 in which case the search starts at the beginning.
102  * A -1 for any of the other arguments is a wildcard (i.e. it always matches).
103  */
104 inventory_t *
105 find_inventory(inventory_t *pinv, int class, int type, int controller,
106                int unit, int state)
107 {
108         return((inventory_t *) NULL);
109 }
110
111
112 /*
113 ** Retrieve inventory data associated with a device.
114 */
115 inventory_t *
116 device_inventory_get_next(      vertex_hdl_t device,
117                                 invplace_t *invplace)
118 {
119                 return((inventory_t *) NULL);
120 }
121
122
123 /*
124 ** Associate canonical inventory information with a device (and
125 ** add it to the general inventory).
126 */
127 void
128 device_inventory_add(   vertex_hdl_t device,
129                         int class, 
130                         int type, 
131                         major_t controller, 
132                         minor_t unit, 
133                         int state)
134 {
135 }
136
137 int
138 device_controller_num_get(vertex_hdl_t device)
139 {
140         return (0);
141 }
142
143 void
144 device_controller_num_set(vertex_hdl_t device, int contr_num)
145 {
146 }