Closed docbacardi closed 9 years ago
The SFDP structure itself does not provide any kind of ID. Maybe we can use a common command like "read JEDEC ID" (0x9f). The routine would need an automatic length detection as the ID is usually repeated with a continuous read.
@trosemann generated a nice ID in the commits 3e1e1a22799be3d2a961ff4b65755b083ff8663a and 972e4b0d5e4d38e837a0f7a5e2dcaac6b50ff7f1. The correct length of the ID is detected. Here is an example for a Spansion S25FL116K flash: "SFDP_014015".
Currently flashes detected with SFDP are just named "SFDP". While this is perfectly OK for normal tasks like writing data to the flash, it is a problem for production tests. In the spi_flash test the flasher is used to make sure that the correct flash was equipped. This does not work well if the name is just "SFDP".