Re: [virtio-dev] Re: [RFC PATCH v3 3/3] SPI: Add virtio SPI driver.

Harald Mommer <[email protected]> Mon, 4 Mar 2024 11:52:28 +0100
Newsgroups dev.linux.lists.virtio-dev,org.kernel.vger.linux-kernel,org.kernel.vger.linux-spi
Message-ID <[email protected]>
Hello Haixu,

no, I've not touched spidev.c. Nowhere. I took Vanilla next/stable and 
applied the patches I sent.

Run the driver as a (somewhat different but comparable) module on 6.5 on 
hardware over virtio-MMIO. Probes and goes live.

Tested on next/stable using a specially adapted QEMU version which 
allows the usage of our proprietary virtio SPI device over PCI in qemu. 
Probes and goes live.

There may be other patches in the setup we're using I'm not aware of but 
not this one.

Only in case you're using some locally developed virtio SPI device on 
qemu which uses PCI transport:

SPI has ID 45. Means 0x2d.

https://www.qemu.org/docs/master/specs/pci-ids.html

1af4:1040 to 1af4:10ef

    ID range for modern virtio devices. The PCI device ID is calculated
    from the virtio device ID by adding the 0x1040 offset. ...

lspci on qemu:

/ # lspci
...
00:03.0 Class 00ff: 1af4:106d
...

/ #

You see something like this?

Regards
Harald

On 04.03.24 08:11, Haixu Cui wrote:
>
>
> On 2/13/2024 9:53 PM, Harald Mommer wrote:
>> +static struct spi_board_info board_info = {
>> +    .modalias = "spi-virtio",
>> +};
>
> Hi Harald,
>     Do you add "spi-virtio" in spidev_spi_ids in spidev.c when you 
> doing the tests, to probe spidev driver?
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]