On Sat, Jul 11, 2009 at 10:55 PM, Carl-Daniel Hailfingerc-d.hailfinger.devel.2006@gmx.net wrote:
Convert SPI block erase to use the multicommand infrastructure.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Tested it on my EPIA-m700 and it worked nice. Also double checked that one of the changed functions actually ran.
I do have one comment on the patch which is a really small comment but I still would like to see fied, see below:
Index: flashrom-spi_multicommand_blockerase/spi.c
--- flashrom-spi_multicommand_blockerase/spi.c (Revision 648) +++ flashrom-spi_multicommand_blockerase/spi.c (Arbeitskopie) @@ -536,17 +536,30 @@
int spi_block_erase_52(struct flashchip *flash, unsigned int addr, unsigned int blocklen) {
- unsigned char cmd[JEDEC_BE_52_OUTSIZE] = {JEDEC_BE_52, };
int result;
- struct spi_command spicommands[] = {
- {
- .writecnt = JEDEC_WREN_OUTSIZE,
- .writearr = (const unsigned char[]){ JEDEC_WREN },
- .readcnt = 0,
- .readarr = NULL,
- }, {
- .writecnt = JEDEC_BE_52_OUTSIZE,
- .writearr = (const unsigned char[]){ JEDEC_BE_52, (addr & 0x00ff0000) >> 16, (addr & 0x0000ff00) >> 8, (addr & 0x000000ff) },
From what I can see in the rest of the file the address shifts seems
to be on this done like this "(addr >> 16) && 0xff" instead of "(addr & 0x00ff0000) >> 16".
But you still get my Acked-by: Jakob Bornecrantz wallbraker@gmail.com Tested-by: Jakob Bornecrantz wallbraker@gmail.com
Cheers Jakob.