diff options
author | Alessandro Rubini <rubini@gnudd.com> | 2013-06-18 17:47:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-18 18:41:04 -0400 |
commit | 6c62a895e572145f8aa24f2040d1bb8eff473313 (patch) | |
tree | 4e6d1186c8491347c6c561c6ff65a5a738cdf3fb /Documentation/fmc/fmc-fakedev.txt | |
parent | 022c674728f45ad22ce2bb5eb628ac9d3dbc3aea (diff) |
FMC: add a software carrier driver
This fake carrier is designed to help FMC users understand how a
carrier driver works, and to experiment the behaviour with EEPROM
reprogramming (with a mezzanine driver commited later). This carrier
can register up to 4 (fake) mezzanines.
We have real carriers (both on PCI-E and VME), but they are bigger
things and are not part of this submission.
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Acked-by: Juan David Gonzalez Cobas <dcobas@cern.ch>
Acked-by: Emilio G. Cota <cota@braap.org>
Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/fmc/fmc-fakedev.txt')
-rw-r--r-- | Documentation/fmc/fmc-fakedev.txt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Documentation/fmc/fmc-fakedev.txt b/Documentation/fmc/fmc-fakedev.txt new file mode 100644 index 000000000000..e85b74a4ae30 --- /dev/null +++ b/Documentation/fmc/fmc-fakedev.txt | |||
@@ -0,0 +1,36 @@ | |||
1 | fmc-fakedev | ||
2 | =========== | ||
3 | |||
4 | This package includes a software-only device, called fmc-fakedev, which | ||
5 | is able to register up to 4 mezzanines (by default it registers one). | ||
6 | Unlike the SPEC driver, which creates an FMC device for each PCI cards | ||
7 | it manages, this module creates a single instance of its set of | ||
8 | mezzanines. | ||
9 | |||
10 | It is meant as the simplest possible example of how a driver should be | ||
11 | written, and it includes a fake EEPROM image (built using the tools | ||
12 | described in *note FMC Identification::),, which by default is | ||
13 | replicated for each fake mezzanine. | ||
14 | |||
15 | You can also use this device to verify the match algorithms, by asking | ||
16 | it to test your own EEPROM image. You can provide the image by means of | ||
17 | the eeprom= module parameter: the new EEPROM image is loaded, as usual, | ||
18 | by means of the firmware loader. This example shows the defaults and a | ||
19 | custom EEPROM image: | ||
20 | |||
21 | spusa.root# insmod fmc-fakedev.ko | ||
22 | [ 99.971247] fake-fmc-carrier: mezzanine 0 | ||
23 | [ 99.975393] Manufacturer: fake-vendor | ||
24 | [ 99.979624] Product name: fake-design-for-testing | ||
25 | spusa.root# rmmod fmc-fakedev | ||
26 | spusa.root# insmod fmc-fakedev.ko eeprom=fdelay-eeprom.bin | ||
27 | [ 121.447464] fake-fmc-carrier: Mezzanine 0: eeprom "fdelay-eeprom.bin" | ||
28 | [ 121.462725] fake-fmc-carrier: mezzanine 0 | ||
29 | [ 121.466858] Manufacturer: CERN | ||
30 | [ 121.470477] Product name: FmcDelay1ns4cha | ||
31 | spusa.root# rmmod fmc-fakedev | ||
32 | |||
33 | After loading the device, you can use the write_ee method do modify its | ||
34 | own internal fake EEPROM: whenever the image is overwritten starting at | ||
35 | offset 0, the module will unregister and register again the FMC device. | ||
36 | This is shown in fmc-write-eeprom.txt | ||