On Wed, 25 Mar 2015 10:46:41 -0000 "Robert Selby" Robert.Selby@snellgroup.com wrote:
Hi, just found FlashRom and looks to be a good base to start from for my needs.
I have a USB->SPI bridge device (MCP2210) and on it's SPI bus is a "S25FL128S" device.
It looks as though there is no direct support for accessing via the MCP2210.
I assume that I would need to write a "programmer" to get this to work ???
I have a MCP2210 access library that seems to work well via "/dev/hidraw".
Any advice/recommendations very welcome.
It may be that someone has already done this ...
I don't know that device at all, but there are various programmer modules in flashrom that can give you hints how to add support for it. "/dev/hidraw" sounds as if it is Linux-specific therefore I suggest you take a look at linux_spi.c and mstarddc_spi.c.
To get an idea of how to hook up the programmer and what else is necessary for a complete patch you can take a look at the patch that added the mstar ddc driver: http://code.coreboot.org/p/flashrom/source/commit/1860/ or the preliminary (and probably broken) programmer driver creation script: http://patchwork.coreboot.org/patch/3836/