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/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>
30 * For initializing/updating an inventory entry.
34 inventory_t *pinv, int class, int type,
35 int controller, int unit, int state)
42 * XXX NOTE: Currently must be called after dynamic memory allocator is
47 add_to_inventory(int class, int type, int controller, int unit, int state)
55 * These two routines are intended to prevent the caller from having to know
56 * the internal structure of the inventory table.
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.
63 get_next_inventory(invplace_t *place)
65 return((inventory_t *) NULL);
70 get_sizeof_inventory(int abi)
72 return sizeof(inventory_t);
75 /* Must be called prior to first call to get_next_inventory */
77 start_scan_inventory(invplace_t *iplace)
81 /* Must be called after last call to get_next_inventory */
83 end_scan_inventory(invplace_t *iplace)
88 * Hardware inventory scanner.
90 * Calls fun() for every entry in inventory list unless fun() returns something
94 scaninvent(int (*fun)(inventory_t *, void *), void *arg)
100 * Find a particular inventory object
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).
107 find_inventory(inventory_t *pinv, int class, int type, int controller,
110 return((inventory_t *) NULL);
115 ** Retrieve inventory data associated with a device.
118 device_inventory_get_next( vertex_hdl_t device,
119 invplace_t *invplace)
121 return((inventory_t *) NULL);
126 ** Associate canonical inventory information with a device (and
127 ** add it to the general inventory).
130 device_inventory_add( vertex_hdl_t device,
140 device_controller_num_get(vertex_hdl_t device)
146 device_controller_num_set(vertex_hdl_t device, int contr_num)