qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/1] hw/arm/sbsa-ref: use XHCI to replace EHCI
@ 2023-05-31  9:58 Yuquan Wang
  2023-05-31  9:58 ` [PATCH v1 1/1] " Yuquan Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Yuquan Wang @ 2023-05-31  9:58 UTC (permalink / raw)
  To: rad, peter.maydell
  Cc: quic_llindhol, marcin.juszkiewicz, chenbaozi, qemu-arm,
	qemu-devel, Yuquan Wang

Please review the change.
 - Replace EHCI with XHCI on sbsa-ref board.
v1 patchset has fixed my commit rebase problem in the last version.

Yuquan Wang (1):
  hw/arm/sbsa-ref: use XHCI to replace EHCI

 hw/arm/sbsa-ref.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v1 1/1] hw/arm/sbsa-ref: use XHCI to replace EHCI
  2023-05-31  9:58 [PATCH v1 0/1] hw/arm/sbsa-ref: use XHCI to replace EHCI Yuquan Wang
@ 2023-05-31  9:58 ` Yuquan Wang
  2023-05-31 13:30   ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 3+ messages in thread
From: Yuquan Wang @ 2023-05-31  9:58 UTC (permalink / raw)
  To: rad, peter.maydell
  Cc: quic_llindhol, marcin.juszkiewicz, chenbaozi, qemu-arm,
	qemu-devel, Yuquan Wang

The current sbsa-ref cannot use EHCI controller which is only
able to do 32-bit DMA, since sbsa-ref doesn't have RAM below 4GB.
Hence, this uses XHCI to provide a usb controller with 64-bit
DMA capablity instead of EHCI.

Signed-off-by: Yuquan Wang <wangyuquan1236@phytium.com.cn>
Change-Id: I1376f8bbc0e25dcd9d8a22b6e061cb56b3486394
---
 hw/arm/sbsa-ref.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index de21200ff9..4c9a942a63 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -82,7 +82,7 @@ enum {
     SBSA_SECURE_UART_MM,
     SBSA_SECURE_MEM,
     SBSA_AHCI,
-    SBSA_EHCI,
+    SBSA_XHCI,
 };
 
 struct SBSAMachineState {
@@ -119,7 +119,7 @@ static const MemMapEntry sbsa_ref_memmap[] = {
     [SBSA_SMMU] =               { 0x60050000, 0x00020000 },
     /* Space here reserved for more SMMUs */
     [SBSA_AHCI] =               { 0x60100000, 0x00010000 },
-    [SBSA_EHCI] =               { 0x60110000, 0x00010000 },
+    [SBSA_XHCI] =               { 0x60110000, 0x00010000 },
     /* Space here reserved for other devices */
     [SBSA_PCIE_PIO] =           { 0x7fff0000, 0x00010000 },
     /* 32-bit address PCIE MMIO space */
@@ -139,7 +139,7 @@ static const int sbsa_ref_irqmap[] = {
     [SBSA_SECURE_UART] = 8,
     [SBSA_SECURE_UART_MM] = 9,
     [SBSA_AHCI] = 10,
-    [SBSA_EHCI] = 11,
+    [SBSA_XHCI] = 11,
     [SBSA_SMMU] = 12, /* ... to 15 */
     [SBSA_GWDT_WS0] = 16,
 };
@@ -575,12 +575,12 @@ static void create_ahci(const SBSAMachineState *sms)
     }
 }
 
-static void create_ehci(const SBSAMachineState *sms)
+static void create_xhci(const SBSAMachineState *sms)
 {
-    hwaddr base = sbsa_ref_memmap[SBSA_EHCI].base;
-    int irq = sbsa_ref_irqmap[SBSA_EHCI];
+    hwaddr base = sbsa_ref_memmap[SBSA_XHCI].base;
+    int irq = sbsa_ref_irqmap[SBSA_XHCI];
 
-    sysbus_create_simple("platform-ehci-usb", base,
+    sysbus_create_simple("sysbus-xhci", base,
                          qdev_get_gpio_in(sms->gic, irq));
 }
 
@@ -803,7 +803,7 @@ static void sbsa_ref_init(MachineState *machine)
 
     create_ahci(sms);
 
-    create_ehci(sms);
+    create_xhci(sms);
 
     create_pcie(sms);
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] hw/arm/sbsa-ref: use XHCI to replace EHCI
  2023-05-31  9:58 ` [PATCH v1 1/1] " Yuquan Wang
@ 2023-05-31 13:30   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-05-31 13:30 UTC (permalink / raw)
  To: Yuquan Wang, rad, peter.maydell
  Cc: quic_llindhol, marcin.juszkiewicz, chenbaozi, qemu-arm,
	qemu-devel

Hi Yuquan,

On 31/5/23 11:58, Yuquan Wang wrote:
> The current sbsa-ref cannot use EHCI controller which is only
> able to do 32-bit DMA, since sbsa-ref doesn't have RAM below 4GB.
> Hence, this uses XHCI to provide a usb controller with 64-bit
> DMA capablity instead of EHCI.
> 
> Signed-off-by: Yuquan Wang <wangyuquan1236@phytium.com.cn>
> Change-Id: I1376f8bbc0e25dcd9d8a22b6e061cb56b3486394
> ---
>   hw/arm/sbsa-ref.c | 16 ++++++++--------
>   1 file changed, 8 insertions(+), 8 deletions(-)


> -static void create_ehci(const SBSAMachineState *sms)
> +static void create_xhci(const SBSAMachineState *sms)
>   {
> -    hwaddr base = sbsa_ref_memmap[SBSA_EHCI].base;
> -    int irq = sbsa_ref_irqmap[SBSA_EHCI];
> +    hwaddr base = sbsa_ref_memmap[SBSA_XHCI].base;
> +    int irq = sbsa_ref_irqmap[SBSA_XHCI];
>   
> -    sysbus_create_simple("platform-ehci-usb", base
> +    sysbus_create_simple("sysbus-xhci", base,

Please use the definition: TYPE_XHCI_SYSBUS.

>                            qdev_get_gpio_in(sms->gic, irq));
>   }




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-31 13:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-31  9:58 [PATCH v1 0/1] hw/arm/sbsa-ref: use XHCI to replace EHCI Yuquan Wang
2023-05-31  9:58 ` [PATCH v1 1/1] " Yuquan Wang
2023-05-31 13:30   ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).