Attention is currently required from: Simon Buhrow, Nico Huber, Aarya.
Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67354 )
Change subject: spi.c: Add erasefn and opcodes for AT45 and S25F to lookup list ......................................................................
Patch Set 9:
(10 comments)
File sfdp.c:
https://review.coreboot.org/c/flashrom/+/67354/comment/ab4d50e9_2043e8ab PS9, Line 85: erasefunc_t *erasefn = spi_get_erasefn_from_opcode(chip, opcode_list, 1); You can use `spi_get_erasefn_from_opcode(chip, &opcode, 1)`
File spi.c:
https://review.coreboot.org/c/flashrom/+/67354/comment/38a9f8f3_19bf2208 PS9, Line 32: sorted what kind of sort?
https://review.coreboot.org/c/flashrom/+/67354/comment/a5cda682_5af15380 PS9, Line 67: //Opcode lists must be sorted It might be problematic that we only get a positive result if both opcode lists have the same order of entries. Maybe copy the input list, sort the opcodes and then compare it.
https://review.coreboot.org/c/flashrom/+/67354/comment/2446f6a6_f5bc451e PS9, Line 80: * Get the pointer to the erase function which uses passed opcodes and is used : * by the passed flashcip. This done by matching the opcodes from a lookup : * table and the erasefn in the passed flashchip. There is no need to say how this is implemented. These documentation is to understand how to use the functions.
https://review.coreboot.org/c/flashrom/+/67354/comment/5ed56612_2bdac55b PS9, Line 87: */ `@result Pointer to erase function matching 'chip' and 'opcode_list' or NULL on failure`
https://review.coreboot.org/c/flashrom/+/67354/comment/ea0a3c6d_17d9e867 PS9, Line 99: info s/info/err/
https://review.coreboot.org/c/flashrom/+/67354/comment/50eac184_331393eb PS9, Line 107: passd passed
https://review.coreboot.org/c/flashrom/+/67354/comment/2835f6a1_b720a09f PS9, Line 107: the pointer to the array `@result Null terminated array of opcodes used by the passd erase function.`
and please put this under `@param`
https://review.coreboot.org/c/flashrom/+/67354/comment/c1ebe219_4601eb6a PS9, Line 108: This is done by matching the opcodes passed to the opcodes list in each entry : * of the lookup table. The implementation is not relevant here
https://review.coreboot.org/c/flashrom/+/67354/comment/a3a03d29_f529805f PS9, Line 121: info `s/info/err/` because when we are at this point it is an error.