1 /* SPDX-License-Identifier: GPL-2.0 */
3 * This file is separate from sdb.h, because I want that one to remain
4 * unchanged (as far as possible) from the official sdb distribution
6 * This file and associated functionality are a playground for me to
7 * understand stuff which will later be implemented in more generic places.
11 /* This is the union of all currently defined types */
13 struct sdb_interconnect ic
;
14 struct sdb_device dev
;
15 struct sdb_bridge bridge
;
16 struct sdb_integration integr
;
17 struct sdb_empty empty
;
18 struct sdb_synthesis synthesis
;
19 struct sdb_repo_url repo_url
;
24 /* Every sdb table is turned into this structure */
28 unsigned long baseaddr
;
29 struct fmc_device
*fmc
; /* the device that hosts it */
30 struct sdb_array
*parent
; /* NULL at root */
31 union sdb_record
*record
; /* copies of the struct */
32 struct sdb_array
**subtree
; /* only valid for bridge items */
35 extern int fmc_scan_sdb_tree(struct fmc_device
*fmc
, unsigned long address
);
36 extern void fmc_show_sdb_tree(const struct fmc_device
*fmc
);
37 extern signed long fmc_find_sdb_device(struct sdb_array
*tree
, uint64_t vendor
,
38 uint32_t device
, unsigned long *sz
);
39 extern int fmc_free_sdb_tree(struct fmc_device
*fmc
);