[flashrom] Support for programming device on SPI via USB bridge?

Robert Selby Robert.Selby at snellgroup.com
Thu Mar 26 09:29:29 CET 2015


Many thanks :-)

-----Original Message-----
From: Stefan Tauner [mailto:stefan.tauner at alumni.tuwien.ac.at] 
Sent: 25 March 2015 22:14
To: Robert Selby
Cc: flashrom at flashrom.org
Subject: Re: [flashrom] Support for programming device on SPI via USB bridge?

On Wed, 25 Mar 2015 10:46:41 -0000
"Robert Selby" <Robert.Selby at 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/

--
Kind regards/Mit freundlichen Grüßen, Stefan Tauner

This email and any attachments are confidential, may be legally privileged and are intended for the use of the addressee only. If you are not the intended recipient, please note that any use, disclosure, printing or copying of this email is strictly prohibited and may be unlawful. If received in error, please delete this email and any attachments and confirm this to the sender.

Snell Limited, registered number 1160119
Registered in England, registered office at 31 Turnpike Road, Newbury, Berkshire, RG14 2NX, U.K.


More information about the flashrom mailing list