Attention is currently required from: ChrisEric1 CECL, Nicholas Chin.
Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/72057 )
Change subject: Add support for VIA VL805 USB XHCI flashing ......................................................................
Patch Set 10:
(4 comments)
File vl805.c:
https://review.coreboot.org/c/flashrom/+/72057/comment/1d31a212_6432a968 PS3, Line 38: static struct pci_dev *dev = NULL;
Still lost on what you are trying to say, did you mean flashctx instead of flashxtx? […]
The point I'm trying to make is that the `struct pci_dev *dev` should NOT be a global variable. It should be contained in a data structure, allocated in `vl85_init()` , used as second parameter in `register_spi_master()` and passed along to `vl805_spi_send_command` via `flash->mst->data`.
You may want to look into other programmer calling `register_spi_master()` with the second parameter being not `NULL`.
File vl805.c:
https://review.coreboot.org/c/flashrom/+/72057/comment/aff042aa_469774a5 PS10, Line 103: static const struct spi_master spi_master_vl805 = { Add `.shutdown = vl805_shutdown,`
https://review.coreboot.org/c/flashrom/+/72057/comment/57a6bee0_e9802e09 PS10, Line 120: static int vl805_shutdown(void *data) This has to move above `struct spi_master`
https://review.coreboot.org/c/flashrom/+/72057/comment/191ab0ba_73ed70bd PS10, Line 157: register_shutdown(vl805_shutdown, NULL); The `register_shutdown()` can be removed. It is handled as part of the `struct spi_master`