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