Attention is currently required from: ChrisEric1 CECL, Nicholas Chin.
1 comment:
File vl805.c:
Patch Set #3, Line 38: static struct pci_dev *dev = NULL;
Here is my broken progress: https://gist.githubusercontent. […]
Yes, you have to define an custom data struct which is passed along. Have a look at this patch https://review.coreboot.org/c/flashrom/+/73037/3/asm106x.c
In line 30 is a data structure defined. This get initialized in the init function from line 138ff, transfered to the allocated data structure and then registered in line 154 together with the spi_master.
The `...spi_send_command` function has access to this data. There you've done it almost right.
The data gets then passed on to all internal functions of the programmer. `asm106x_wait_ready()` in case of the link above and the `vl805_setregval()` etc functions in your case.
So they will be extended to take a `struct pci_dev*` as argument instead of using the global. It will become `static void vl805_setregval(const struct pci_dev *dev, int reg, uint32_t val)`
I hope this helps you 😊
To view, visit change 72057. To unsubscribe, or for help writing mail filters, visit settings.