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-2003 Silicon Graphics, Inc. All rights reserved.
13 * See sys/sn/invent.h for an explanation of the hardware inventory contents.
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>
28 * For initializing/updating an inventory entry.
32 inventory_t *pinv, int class, int type,
33 int controller, int unit, int state)
40 * XXX NOTE: Currently must be called after dynamic memory allocator is
45 add_to_inventory(int class, int type, int controller, int unit, int state)
53 * These two routines are intended to prevent the caller from having to know
54 * the internal structure of the inventory table.
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.
61 get_next_inventory(invplace_t *place)
63 return((inventory_t *) NULL);
68 get_sizeof_inventory(int abi)
70 return sizeof(inventory_t);
73 /* Must be called prior to first call to get_next_inventory */
75 start_scan_inventory(invplace_t *iplace)
79 /* Must be called after last call to get_next_inventory */
81 end_scan_inventory(invplace_t *iplace)
86 * Hardware inventory scanner.
88 * Calls fun() for every entry in inventory list unless fun() returns something
92 scaninvent(int (*fun)(inventory_t *, void *), void *arg)
98 * Find a particular inventory object
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).
105 find_inventory(inventory_t *pinv, int class, int type, int controller,
108 return((inventory_t *) NULL);
113 ** Retrieve inventory data associated with a device.
116 device_inventory_get_next( vertex_hdl_t device,
117 invplace_t *invplace)
119 return((inventory_t *) NULL);
124 ** Associate canonical inventory information with a device (and
125 ** add it to the general inventory).
128 device_inventory_add( vertex_hdl_t device,
138 device_controller_num_get(vertex_hdl_t device)
144 device_controller_num_set(vertex_hdl_t device, int contr_num)