mcb: export bus information via sysfs

Export information about the bus stored in the FPGA's header to userspace via
sysfs, instead of hiding it in pr_debug()s from everyone.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Andreas Werner <andreas.werner@men.de>
Tested-by: Andreas Werner <andreas.werner@men.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Johannes Thumshirn
2016-05-03 09:46:23 +02:00
committed by Greg Kroah-Hartman
parent 18d2881980
commit 803f1ca60d
5 changed files with 103 additions and 11 deletions

View File

@@ -113,16 +113,11 @@ int chameleon_parse_cells(struct mcb_bus *bus, phys_addr_t mapbase,
}
p += hsize;
pr_debug("header->revision = %d\n", header->revision);
pr_debug("header->model = 0x%x ('%c')\n", header->model,
header->model);
pr_debug("header->minor = %d\n", header->minor);
pr_debug("header->bus_type = 0x%x\n", header->bus_type);
pr_debug("header->magic = 0x%x\n", header->magic);
pr_debug("header->filename = \"%.*s\"\n", CHAMELEON_FILENAME_LEN,
header->filename);
bus->revision = header->revision;
bus->model = header->model;
bus->minor = header->minor;
snprintf(bus->name, CHAMELEON_FILENAME_LEN + 1, "%s",
header->filename);
for_each_chameleon_cell(dtype, p) {
switch (dtype) {