qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: Guenter Roeck <linux@roeck-us.net>, qemu-devel@nongnu.org
Cc: "Steven Lee" <steven_lee@aspeedtech.com>,
	"Troy Lee" <leetroy@gmail.com>,
	"Jamin Lin" <jamin_lin@aspeedtech.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Andrew Jeffery" <andrew@codeconstruct.com.au>,
	"Joel Stanley" <joel@jms.id.au>,
	"BALATON Zoltan" <balaton@eik.bme.hu>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	qemu-arm@nongnu.org
Subject: Re: [RFC PATCH 8/8] aspeed: Add uhci support for ast2400 and ast2500
Date: Mon, 9 Sep 2024 09:49:57 +0200	[thread overview]
Message-ID: <63efbcd1-329d-44e3-857d-212fd9eb90ce@kaod.org> (raw)
In-Reply-To: <20240906122542.3808997-9-linux@roeck-us.net>

On 9/6/24 14:25, Guenter Roeck wrote:
> Enable UHCI support for ast2400 and ast2500 SoCs. With this patch,
> the UHCI port is successfully instantiated on the ast2500-evb machine.
> 
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>


Reviewed-by: Cédric Le Goater <clg@redhat.com>

Thanks,

C.


> ---
>   hw/arm/aspeed_ast2400.c | 14 ++++++++++++++
>   1 file changed, 14 insertions(+)
> 
> diff --git a/hw/arm/aspeed_ast2400.c b/hw/arm/aspeed_ast2400.c
> index d125886207..93bfe3e3dd 100644
> --- a/hw/arm/aspeed_ast2400.c
> +++ b/hw/arm/aspeed_ast2400.c
> @@ -31,6 +31,7 @@ static const hwaddr aspeed_soc_ast2400_memmap[] = {
>       [ASPEED_DEV_FMC]    = 0x1E620000,
>       [ASPEED_DEV_SPI1]   = 0x1E630000,
>       [ASPEED_DEV_EHCI1]  = 0x1E6A1000,
> +    [ASPEED_DEV_UHCI]   = 0x1E6B0000,
>       [ASPEED_DEV_VIC]    = 0x1E6C0000,
>       [ASPEED_DEV_SDMC]   = 0x1E6E0000,
>       [ASPEED_DEV_SCU]    = 0x1E6E2000,
> @@ -68,6 +69,7 @@ static const hwaddr aspeed_soc_ast2500_memmap[] = {
>       [ASPEED_DEV_SPI2]   = 0x1E631000,
>       [ASPEED_DEV_EHCI1]  = 0x1E6A1000,
>       [ASPEED_DEV_EHCI2]  = 0x1E6A3000,
> +    [ASPEED_DEV_UHCI]   = 0x1E6B0000,
>       [ASPEED_DEV_VIC]    = 0x1E6C0000,
>       [ASPEED_DEV_SDMC]   = 0x1E6E0000,
>       [ASPEED_DEV_SCU]    = 0x1E6E2000,
> @@ -107,6 +109,7 @@ static const int aspeed_soc_ast2400_irqmap[] = {
>       [ASPEED_DEV_FMC]    = 19,
>       [ASPEED_DEV_EHCI1]  = 5,
>       [ASPEED_DEV_EHCI2]  = 13,
> +    [ASPEED_DEV_UHCI]   = 14,
>       [ASPEED_DEV_SDMC]   = 0,
>       [ASPEED_DEV_SCU]    = 21,
>       [ASPEED_DEV_ADC]    = 31,
> @@ -199,6 +202,8 @@ static void aspeed_ast2400_soc_init(Object *obj)
>                                   TYPE_PLATFORM_EHCI);
>       }
>   
> +    object_initialize_child(obj, "uhci", &s->uhci, TYPE_ASPEED_UHCI);
> +
>       snprintf(typename, sizeof(typename), "aspeed.sdmc-%s", socname);
>       object_initialize_child(obj, "sdmc", &s->sdmc, typename);
>       object_property_add_alias(obj, "ram-size", OBJECT(&s->sdmc),
> @@ -393,6 +398,15 @@ static void aspeed_ast2400_soc_realize(DeviceState *dev, Error **errp)
>                              aspeed_soc_get_irq(s, ASPEED_DEV_EHCI1 + i));
>       }
>   
> +    /* UHCI */
> +    if (!sysbus_realize(SYS_BUS_DEVICE(&s->uhci), errp)) {
> +        return;
> +    }
> +    aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->uhci), 0,
> +                    sc->memmap[ASPEED_DEV_UHCI]);
> +    sysbus_connect_irq(SYS_BUS_DEVICE(&s->uhci), 0,
> +                       aspeed_soc_get_irq(s, ASPEED_DEV_UHCI));
> +
>       /* SDMC - SDRAM Memory Controller */
>       if (!sysbus_realize(SYS_BUS_DEVICE(&s->sdmc), errp)) {
>           return;



      reply	other threads:[~2024-09-09  7:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06 12:25 [RFC PATCH 0/8] usb/uhci: Add UHCI sysbus support, and enable for AST machines Guenter Roeck
2024-09-06 12:25 ` [RFC PATCH 1/8] usb/uhci: checkpatch cleanup Guenter Roeck
2024-09-09  7:48   ` Cédric Le Goater
2024-09-06 12:25 ` [RFC PATCH 2/8] usb/uhci: Introduce and use register defines Guenter Roeck
2024-09-09  7:48   ` Cédric Le Goater
2024-09-06 12:25 ` [RFC PATCH 3/8] usb/uhci: Move PCI-related code into a separate file Guenter Roeck
2024-11-12  6:32   ` Thomas Huth
2024-11-12 14:50     ` Guenter Roeck
2024-11-12 15:10       ` Cédric Le Goater
2024-09-06 12:25 ` [RFC PATCH 4/8] usb/uhci: enlarge uhci memory space Guenter Roeck
2024-09-06 12:25 ` [RFC PATCH 5/8] usb/uhci: Add support for usb-uhci-sysbus Guenter Roeck
2024-09-06 12:25 ` [RFC PATCH 6/8] usb/uhci: Add aspeed specific read and write functions Guenter Roeck
2024-09-06 12:25 ` [RFC PATCH 7/8] aspeed: Add uhci support for ast2600 Guenter Roeck
2024-09-09  7:49   ` Cédric Le Goater
2024-09-06 12:25 ` [RFC PATCH 8/8] aspeed: Add uhci support for ast2400 and ast2500 Guenter Roeck
2024-09-09  7:49   ` Cédric Le Goater [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63efbcd1-329d-44e3-857d-212fd9eb90ce@kaod.org \
    --to=clg@kaod.org \
    --cc=andrew@codeconstruct.com.au \
    --cc=balaton@eik.bme.hu \
    --cc=hpoussin@reactos.org \
    --cc=jamin_lin@aspeedtech.com \
    --cc=joel@jms.id.au \
    --cc=leetroy@gmail.com \
    --cc=linux@roeck-us.net \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=steven_lee@aspeedtech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).