Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / include / linux / fmc-sdb.h
blobbec899f0867c75197221b7a5b627dab466309a10
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
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.
8 */
9 #include <linux/sdb.h>
11 /* This is the union of all currently defined types */
12 union sdb_record {
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;
22 struct fmc_device;
24 /* Every sdb table is turned into this structure */
25 struct sdb_array {
26 int len;
27 int level;
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);