Attention is currently required from: Nico Huber, Angel Pons, Sergii Dmytruk.
12 comments:
File flash.h:
INVALID_REG = 0,
STATUS1,
STATUS2,
CONFIG1,
Please add entries in the commits that make use of them. Took me rather […]
Done. Yes, I had CONFIG1 for some Macronix chips, but I'll add it back later if it's needed.
File flash.h:
enum flash_reg {
INVALID_REG = 0,
STATUS1,
STATUS2,
CONFIG1,
};
#define MAX_REGISTERS 4
`MAX_REGISTERS` is only used in `writeprotect.c` AFAICS, so it would belong […]
I've made it the last element, that should be a bit more robust. It's useful if you want to iterate over all registers that flashrom knows about, though I don't have another example of doing that outside writeprotect right now.
File spi25_statusreg.c:
Patch Set #14, Line 51: int result = spi_send_multicommand(flash, cmds);
What do you mean? What could cause problems?
I think you're referring to the fact that it declares a variable in the middle of the function? There's quite a lot of other code like that, it shouldn't cause any new problems.
should be a tab
Done
nit: double blank line
Done
nit: double blank line
Done
Patch Set #14, Line 194: spi_write_register failed.
Would be good to indicate which register failed: […]
Done
Patch Set #14, Line 207: spi_write_register failed.
Ditto
Done
File spi25_statusreg.c:
I have doubts that this is true for any modern chip. "allow running RDSR […]
I'm inclined to agree, this code dates back to 2010 in commit 174f55bdec62, which doesn't mention any specific chip, but says that some chips take >100ms, which implies that the initial delay wasn't doing anything useful even then.
We can probably just switch everything over to repeated polling, WDYT?
Please drop this dangling asterisk or add a line break after the first […]
Done
Why not use a switch/case? It would make it easier to provide proper error […]
The next commit adds nested ifs for handling chips with different ways of writing the same register, and they cant be converted to a switch/case very cleanly.
Patch Set #15, Line 91: not supported by chip\
Or not supported by this function?
Done
To view, visit change 58475. To unsubscribe, or for help writing mail filters, visit settings.