mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 14:28:55 +07:00
2e70efd9af
This completes the show_sdb_tree functionality, with the new informative fields. The output for a verbose module is now like this (long lines are unavoidable): SDB: 00000651:e6a542c9 WB4-Crossbar-GSI SDB: 0000ce42:00000601 WB-DMA.Control (00001000-0000103f) SDB: 0000ce42:779c5443 WB-OneWire-Master (00001100-000011ff) SDB: 0000ce42:00000603 WB-SPEC-CSR (00001200-0000121f) SDB: 0000ce42:00000013 WB-VIC-Int.Control (00001300-000013ff) SDB: 0000ce42:d5735ab4 WB-DMA.EIC (00001400-0000140f) SDB: 00000651:eef0b198 WB4-Bridge-GSI (bridge: 00002000) SDB: 00000651:e6a542c9 WB4-Crossbar-GSI SDB: 0000ce42:123c5443 WB-I2C-Master (00003000-000030ff) SDB: 0000ce42:e503947e WB-SPI.Control (00003100-0000311f) SDB: 0000ce42:123c5443 WB-I2C-Master (00003200-000032ff) SDB: 0000ce42:00000608 WB-FMC-ADC-Core (00003300-0000337f) SDB: 0000ce42:779c5443 WB-OneWire-Master (00003400-000034ff) SDB: 0000ce42:26ec6086 WB-FMC-ADC.EIC (00003500-0000350f) SDB: 0000ce42:00000604 WB-Timetag-Core (00003600-0000367f) SDB: Synthesis repository: git://ohwr.org/fmc-projects/fmc-adc-100m14b4cha.git SDB: Bitstream 'spec_top_fmc_adcmc-projects/fmc-adc-100m14b4cha.git' \ synthesized 20140116 by mcattin (ISE version 133), commit f0a539dffe6d Signed-off-by: Tomasz Wlostowski <tomasz.wlostowski@cern.ch> Acked-by: Alessandro Rubini <rubini@gnudd.com> Acked-by: Juan David Gonzalez Cobas <dcobas@cern.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
39 lines
1.3 KiB
C
39 lines
1.3 KiB
C
/*
|
|
* This file is separate from sdb.h, because I want that one to remain
|
|
* unchanged (as far as possible) from the official sdb distribution
|
|
*
|
|
* This file and associated functionality are a playground for me to
|
|
* understand stuff which will later be implemented in more generic places.
|
|
*/
|
|
#include <linux/sdb.h>
|
|
|
|
/* This is the union of all currently defined types */
|
|
union sdb_record {
|
|
struct sdb_interconnect ic;
|
|
struct sdb_device dev;
|
|
struct sdb_bridge bridge;
|
|
struct sdb_integration integr;
|
|
struct sdb_empty empty;
|
|
struct sdb_synthesis synthesis;
|
|
struct sdb_repo_url repo_url;
|
|
};
|
|
|
|
struct fmc_device;
|
|
|
|
/* Every sdb table is turned into this structure */
|
|
struct sdb_array {
|
|
int len;
|
|
int level;
|
|
unsigned long baseaddr;
|
|
struct fmc_device *fmc; /* the device that hosts it */
|
|
struct sdb_array *parent; /* NULL at root */
|
|
union sdb_record *record; /* copies of the struct */
|
|
struct sdb_array **subtree; /* only valid for bridge items */
|
|
};
|
|
|
|
extern int fmc_scan_sdb_tree(struct fmc_device *fmc, unsigned long address);
|
|
extern void fmc_show_sdb_tree(const struct fmc_device *fmc);
|
|
extern signed long fmc_find_sdb_device(struct sdb_array *tree, uint64_t vendor,
|
|
uint32_t device, unsigned long *sz);
|
|
extern int fmc_free_sdb_tree(struct fmc_device *fmc);
|