Commit 665dc9b9 authored by Alessandro Rubini's avatar Alessandro Rubini

kernel, doc: add show_sdb parameter, disabled by default

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 1bce0491
......@@ -212,6 +212,11 @@ The module can receive the following parameters to customize its operation:
If not zero, this parameter requests to @i{printk} the content
of the FMC eeprom, for diagnostic purposes.
@item show_sdb
If not zero, the SDB internal structure of the golden binary
is reported through kernel messages. It is disabled by default.
@end table
Any mezzanine-specific action must be performed by the driver for the
......@@ -271,6 +276,14 @@ please look at @i{spec-trivial.c}.
all cards; otherwise the identifiers and gateware names are
paired one by one, in the order specified.
@item show_sdb=
For modules supporting it, this parameter asks sub-modules to
show the SDB internal structure to kernel messages. It is
disabled by default because those lines tend to hide more
important messages when you look at the system console while
loading the drivers.
@end table
For example, if you are using the trivial driver to load two different
......
......@@ -17,6 +17,9 @@
static int spec_test_irq;
module_param_named(test_irq, spec_test_irq, int, 0444);
static int spec_show_sdb;
module_param_named(show_sdb, spec_show_sdb, int, 0444);
/* The main role of this file is offering the fmc_operations for the spec */
static int spec_validate(struct fmc_device *fmc, struct fmc_driver *drv)
......@@ -284,7 +287,8 @@ static int check_golden(struct fmc_device *fmc)
dev_err(&spec->pdev->dev, "unsexpected device in SDB\n");
return -ENODEV;
}
fmc_show_sdb_tree(fmc);
if (spec_show_sdb)
fmc_show_sdb_tree(fmc);
return 0;
}
......
......@@ -25,6 +25,10 @@ module_param_named(file, wrn_filename, charp, 0444);
static char *wrn_wrc_filename = WRN_WRC_DEFAULT_NAME;
module_param_named(wrc, wrn_wrc_filename, charp, 0444);
static int wrn_show_sdb;
module_param_named(show_sdb, wrn_show_sdb, int, 0444);
static int wrn_load_wrc(struct fmc_device *fmc, char *name,
unsigned long ram, unsigned long ramsize)
{
......@@ -87,7 +91,8 @@ int wrn_fmc_probe(struct fmc_device *fmc)
dev_err(dev, "scan fmc failed %i\n", ret);
goto out;
}
fmc_show_sdb_tree(fmc);
if (wrn_show_sdb)
fmc_show_sdb_tree(fmc);
/*
* The gateware may not be including the WRC code, or the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment