diff mbox series

[v1,1/1] default-configs: Enable USB support for RISC-V machines

Message ID c162ffeb1bb1cbcdeb47ea62a829294168a0ebdf.1547078463.git.alistair.francis@wdc.com (mailing list archive)
State New, archived
Headers show
Series [v1,1/1] default-configs: Enable USB support for RISC-V machines | expand

Commit Message

Alistair Francis Jan. 10, 2019, 12:01 a.m. UTC
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 default-configs/riscv32-softmmu.mak | 1 +
 default-configs/riscv64-softmmu.mak | 1 +
 2 files changed, 2 insertions(+)

Comments

Thomas Huth Jan. 10, 2019, 8:33 a.m. UTC | #1
On 2019-01-10 01:01, Alistair Francis wrote:
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
>  default-configs/riscv32-softmmu.mak | 1 +
>  default-configs/riscv64-softmmu.mak | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/default-configs/riscv32-softmmu.mak b/default-configs/riscv32-softmmu.mak
> index dbc9398284..c9c5971409 100644
> --- a/default-configs/riscv32-softmmu.mak
> +++ b/default-configs/riscv32-softmmu.mak
> @@ -1,6 +1,7 @@
>  # Default configuration for riscv-softmmu
>  
>  include pci.mak
> +include usb.mak
>  
>  CONFIG_SERIAL=y
>  CONFIG_VIRTIO_MMIO=y
> diff --git a/default-configs/riscv64-softmmu.mak b/default-configs/riscv64-softmmu.mak
> index dbc9398284..c9c5971409 100644
> --- a/default-configs/riscv64-softmmu.mak
> +++ b/default-configs/riscv64-softmmu.mak
> @@ -1,6 +1,7 @@
>  # Default configuration for riscv-softmmu
>  
>  include pci.mak
> +include usb.mak
>  
>  CONFIG_SERIAL=y
>  CONFIG_VIRTIO_MMIO=y

Makes sense if the PCI HCDs are already working.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Palmer Dabbelt Jan. 10, 2019, 4:53 p.m. UTC | #2
On Wed, 09 Jan 2019 16:01:34 PST (-0800), Alistair Francis wrote:
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
>  default-configs/riscv32-softmmu.mak | 1 +
>  default-configs/riscv64-softmmu.mak | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/default-configs/riscv32-softmmu.mak b/default-configs/riscv32-softmmu.mak
> index dbc9398284..c9c5971409 100644
> --- a/default-configs/riscv32-softmmu.mak
> +++ b/default-configs/riscv32-softmmu.mak
> @@ -1,6 +1,7 @@
>  # Default configuration for riscv-softmmu
>  
>  include pci.mak
> +include usb.mak
>  
>  CONFIG_SERIAL=y
>  CONFIG_VIRTIO_MMIO=y
> diff --git a/default-configs/riscv64-softmmu.mak b/default-configs/riscv64-softmmu.mak
> index dbc9398284..c9c5971409 100644
> --- a/default-configs/riscv64-softmmu.mak
> +++ b/default-configs/riscv64-softmmu.mak
> @@ -1,6 +1,7 @@
>  # Default configuration for riscv-softmmu
>  
>  include pci.mak
> +include usb.mak
>  
>  CONFIG_SERIAL=y
>  CONFIG_VIRTIO_MMIO=y
> -- 
> 2.19.1

Does this work for you?  I tried it out but my kernel hangs in early boot if I 
enable the generic PCI controller.  This is my WIP kernel so the problem is 
probably on my end.

I'm trying to boot with

    -device usb-ehci
    -drive id=my_usb_disk,file=usbdisk.img,if=none,format=raw
    -device usb-storage,drive=my_usb_dis
Alistair Francis Jan. 10, 2019, 10:28 p.m. UTC | #3
On Thu, Jan 10, 2019 at 8:53 AM Palmer Dabbelt <palmer@sifive.com> wrote:
>
> On Wed, 09 Jan 2019 16:01:34 PST (-0800), Alistair Francis wrote:
> > Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> > ---
> >  default-configs/riscv32-softmmu.mak | 1 +
> >  default-configs/riscv64-softmmu.mak | 1 +
> >  2 files changed, 2 insertions(+)
> >
> > diff --git a/default-configs/riscv32-softmmu.mak b/default-configs/riscv32-softmmu.mak
> > index dbc9398284..c9c5971409 100644
> > --- a/default-configs/riscv32-softmmu.mak
> > +++ b/default-configs/riscv32-softmmu.mak
> > @@ -1,6 +1,7 @@
> >  # Default configuration for riscv-softmmu
> >
> >  include pci.mak
> > +include usb.mak
> >
> >  CONFIG_SERIAL=y
> >  CONFIG_VIRTIO_MMIO=y
> > diff --git a/default-configs/riscv64-softmmu.mak b/default-configs/riscv64-softmmu.mak
> > index dbc9398284..c9c5971409 100644
> > --- a/default-configs/riscv64-softmmu.mak
> > +++ b/default-configs/riscv64-softmmu.mak
> > @@ -1,6 +1,7 @@
> >  # Default configuration for riscv-softmmu
> >
> >  include pci.mak
> > +include usb.mak
> >
> >  CONFIG_SERIAL=y
> >  CONFIG_VIRTIO_MMIO=y
> > --
> > 2.19.1
>
> Does this work for you?  I tried it out but my kernel hangs in early boot if I
> enable the generic PCI controller.  This is my WIP kernel so the problem is
> probably on my end.

I had tested it awhile ago when I was working on the PCIe patches and
it worked for Linux.

I didn't runtime test it this time as by default there is no change it
just lets users have more boot options. Even if it doesn't work for
Linux it will be useful for other non-Linux guests.

Alistair

>
> I'm trying to boot with
>
>     -device usb-ehci
>     -drive id=my_usb_disk,file=usbdisk.img,if=none,format=raw
>     -device usb-storage,drive=my_usb_dis
diff mbox series

Patch

diff --git a/default-configs/riscv32-softmmu.mak b/default-configs/riscv32-softmmu.mak
index dbc9398284..c9c5971409 100644
--- a/default-configs/riscv32-softmmu.mak
+++ b/default-configs/riscv32-softmmu.mak
@@ -1,6 +1,7 @@ 
 # Default configuration for riscv-softmmu
 
 include pci.mak
+include usb.mak
 
 CONFIG_SERIAL=y
 CONFIG_VIRTIO_MMIO=y
diff --git a/default-configs/riscv64-softmmu.mak b/default-configs/riscv64-softmmu.mak
index dbc9398284..c9c5971409 100644
--- a/default-configs/riscv64-softmmu.mak
+++ b/default-configs/riscv64-softmmu.mak
@@ -1,6 +1,7 @@ 
 # Default configuration for riscv-softmmu
 
 include pci.mak
+include usb.mak
 
 CONFIG_SERIAL=y
 CONFIG_VIRTIO_MMIO=y