fmc-fakedev.txt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536
  1. fmc-fakedev
  2. ===========
  3. This package includes a software-only device, called fmc-fakedev, which
  4. is able to register up to 4 mezzanines (by default it registers one).
  5. Unlike the SPEC driver, which creates an FMC device for each PCI cards
  6. it manages, this module creates a single instance of its set of
  7. mezzanines.
  8. It is meant as the simplest possible example of how a driver should be
  9. written, and it includes a fake EEPROM image (built using the tools
  10. described in *note FMC Identification::),, which by default is
  11. replicated for each fake mezzanine.
  12. You can also use this device to verify the match algorithms, by asking
  13. it to test your own EEPROM image. You can provide the image by means of
  14. the eeprom= module parameter: the new EEPROM image is loaded, as usual,
  15. by means of the firmware loader. This example shows the defaults and a
  16. custom EEPROM image:
  17. spusa.root# insmod fmc-fakedev.ko
  18. [ 99.971247] fake-fmc-carrier: mezzanine 0
  19. [ 99.975393] Manufacturer: fake-vendor
  20. [ 99.979624] Product name: fake-design-for-testing
  21. spusa.root# rmmod fmc-fakedev
  22. spusa.root# insmod fmc-fakedev.ko eeprom=fdelay-eeprom.bin
  23. [ 121.447464] fake-fmc-carrier: Mezzanine 0: eeprom "fdelay-eeprom.bin"
  24. [ 121.462725] fake-fmc-carrier: mezzanine 0
  25. [ 121.466858] Manufacturer: CERN
  26. [ 121.470477] Product name: FmcDelay1ns4cha
  27. spusa.root# rmmod fmc-fakedev
  28. After loading the device, you can use the write_ee method do modify its
  29. own internal fake EEPROM: whenever the image is overwritten starting at
  30. offset 0, the module will unregister and register again the FMC device.
  31. This is shown in fmc-write-eeprom.txt