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 3 XHCI flashing ......................................................................
Patch Set 8:
(6 comments)
Patchset:
PS3:
Hello! […]
1. Ok, 2. Yes, thats fine. But I missed one thing. Can you add `vl805` also to `meson_options.txt` under `option('programmer', ...` 3. I'll also have a closer look for the RDID4. This has something to do with how many ID bytes were queried IIRC.
I've found also an VL805 PCI card in my pile of stuff and will give your patch a try tomorrow.
File flashchips.c:
https://review.coreboot.org/c/flashrom/+/72057/comment/224f6d01_f91557c9 PS8, Line 19126: .probe = PROBE_SPI_RDID4, This should also be an other commit. Can be before this or after.
File flashrom.8.tmpl:
https://review.coreboot.org/c/flashrom/+/72057/comment/aa48f95d_248c16bd PS8, Line 1706: and raw memory access pci configutation space is enough.
File vl805.c:
https://review.coreboot.org/c/flashrom/+/72057/comment/472a7fc5_bb509e79 PS3, Line 38: static struct pci_dev *dev = NULL;
Cannot do that, this part is outside of the global which needs it: […]
This was referred to `static struct pci_dev *dev = NULL`, not `dev_entries`.
The plan is to have the `pci_dev` handle in a data struct, allocated by `vl805_init()` and passed on via the `flashxtx *ctx->mst->spi.data`.
So ``` void vl805_setregval(int reg, uint32_t val) ``` becomes ``` void vl805_setregval(struct pci_dev *dev, int reg, uint32_t val) ```
And `vl805_spi_send_command` gets the pci_dev* like in `pickit2_spi.c:402`
https://review.coreboot.org/c/flashrom/+/72057/comment/384dc12a_9d074372 PS3, Line 72: uint32_t indata = 0; : unsigned int curwritecnt = 0; : unsigned int curreadcnt = 0;
I don't understand what you are trying to say, if you remove the highlighted part, it fails to build […]
The ` = 0` is not needed for each of them. A declaration of those variables is sufficient. They don't need to be initialized.
https://review.coreboot.org/c/flashrom/+/72057/comment/125a2ad4_739206f3 PS3, Line 107: static const struct spi_master spi_master_vl805 = {
I have no clue right now, but I added it in to see if it works later.
Done