qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: BALATON Zoltan <balaton@eik.bme.hu>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: philmd@linaro.org
Subject: Re: [RESEND PATCH v3 4/4] ppc440_pcix: Rename QOM type define abd move it to common header
Date: Thu, 6 Jul 2023 17:33:50 -0300	[thread overview]
Message-ID: <e0b5c630-8312-bec0-459e-517f06eb65fb@gmail.com> (raw)
In-Reply-To: <1a1c3fe4b120f345d1005ad7ceca4500783691f7.1688641673.git.balaton@eik.bme.hu>



On 7/6/23 08:16, BALATON Zoltan wrote:
> Rename TYPE_PPC440_PCIX_HOST_BRIDGE to better match its string value,
> move it to common header and use it also in sam460ex to replace hard
> coded type name.
> 
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>

>   hw/ppc/ppc440_pcix.c    | 9 ++++-----
>   hw/ppc/sam460ex.c       | 2 +-
>   include/hw/ppc/ppc4xx.h | 1 +
>   3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c
> index 9321ca0abd..672090de94 100644
> --- a/hw/ppc/ppc440_pcix.c
> +++ b/hw/ppc/ppc440_pcix.c
> @@ -45,8 +45,7 @@ struct PLBInMap {
>       MemoryRegion mr;
>   };
>   
> -#define TYPE_PPC440_PCIX_HOST_BRIDGE "ppc440-pcix-host"
> -OBJECT_DECLARE_SIMPLE_TYPE(PPC440PCIXState, PPC440_PCIX_HOST_BRIDGE)
> +OBJECT_DECLARE_SIMPLE_TYPE(PPC440PCIXState, PPC440_PCIX_HOST)
>   
>   #define PPC440_PCIX_NR_POMS 3
>   #define PPC440_PCIX_NR_PIMS 3
> @@ -399,7 +398,7 @@ static const MemoryRegionOps pci_reg_ops = {
>   
>   static void ppc440_pcix_reset(DeviceState *dev)
>   {
> -    struct PPC440PCIXState *s = PPC440_PCIX_HOST_BRIDGE(dev);
> +    struct PPC440PCIXState *s = PPC440_PCIX_HOST(dev);
>       int i;
>   
>       for (i = 0; i < PPC440_PCIX_NR_POMS; i++) {
> @@ -489,7 +488,7 @@ static void ppc440_pcix_realize(DeviceState *dev, Error **errp)
>       PCIHostState *h;
>   
>       h = PCI_HOST_BRIDGE(dev);
> -    s = PPC440_PCIX_HOST_BRIDGE(dev);
> +    s = PPC440_PCIX_HOST(dev);
>   
>       sysbus_init_irq(sbd, &s->irq);
>       memory_region_init(&s->busmem, OBJECT(dev), "pci-mem", UINT64_MAX);
> @@ -529,7 +528,7 @@ static void ppc440_pcix_class_init(ObjectClass *klass, void *data)
>   }
>   
>   static const TypeInfo ppc440_pcix_info = {
> -    .name          = TYPE_PPC440_PCIX_HOST_BRIDGE,
> +    .name          = TYPE_PPC440_PCIX_HOST,
>       .parent        = TYPE_PCI_HOST_BRIDGE,
>       .instance_size = sizeof(PPC440PCIXState),
>       .class_init    = ppc440_pcix_class_init,
> diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
> index 7da38bd58e..1e615b8d35 100644
> --- a/hw/ppc/sam460ex.c
> +++ b/hw/ppc/sam460ex.c
> @@ -438,7 +438,7 @@ static void sam460ex_init(MachineState *machine)
>   
>       /* PCI bus */
>       /* All PCI irqs are connected to the same UIC pin (cf. UBoot source) */
> -    dev = sysbus_create_simple("ppc440-pcix-host", 0xc0ec00000,
> +    dev = sysbus_create_simple(TYPE_PPC440_PCIX_HOST, 0xc0ec00000,
>                                  qdev_get_gpio_in(uic[1], 0));
>       sysbus_mmio_map(SYS_BUS_DEVICE(dev), 1, 0xc08000000);
>       pci_bus = PCI_BUS(qdev_get_child_bus(dev, "pci.0"));
> diff --git a/include/hw/ppc/ppc4xx.h b/include/hw/ppc/ppc4xx.h
> index 766d575e86..ea7740239b 100644
> --- a/include/hw/ppc/ppc4xx.h
> +++ b/include/hw/ppc/ppc4xx.h
> @@ -31,6 +31,7 @@
>   
>   #define TYPE_PPC4xx_HOST_BRIDGE "ppc4xx-host-bridge"
>   #define TYPE_PPC4xx_PCI_HOST "ppc4xx-pci-host"
> +#define TYPE_PPC440_PCIX_HOST "ppc440-pcix-host"
>   #define TYPE_PPC460EX_PCIE_HOST "ppc460ex-pcie-host"
>   
>   /*


  parent reply	other threads:[~2023-07-06 20:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06 11:07 [PATCH v3 0/4] PPC440 devices misc clean up BALATON Zoltan
2023-07-03 16:48 ` [PATCH v3 1/4] ppc440_pcix: Stop using system io region for PCI bus BALATON Zoltan
2023-07-06 11:16   ` [RESEND PATCH " BALATON Zoltan
2023-07-03 21:09 ` [PATCH v3 2/4] ppc4xx_pci: Rename QOM type name define BALATON Zoltan
2023-07-06 11:16   ` [RESEND PATCH " BALATON Zoltan
2023-07-06 20:33   ` Daniel Henrique Barboza
2023-07-06 22:42     ` BALATON Zoltan
2023-07-03 21:16 ` [PATCH v3 3/4] ppc4xx_pci: Add define for ppc4xx-host-bridge type name BALATON Zoltan
2023-07-06 11:16   ` [RESEND PATCH " BALATON Zoltan
2023-07-06 20:33   ` Daniel Henrique Barboza
2023-07-03 21:21 ` [PATCH v3 4/4] ppc440_pcix: Rename QOM type define abd move it to common header BALATON Zoltan
2023-07-06 11:16   ` [RESEND PATCH " BALATON Zoltan
2023-07-06 20:33   ` Daniel Henrique Barboza [this message]
2023-07-06 11:16 ` [RESEND PATCH v3 0/4] PPC440 devices misc clean up BALATON Zoltan
2023-07-07  7:19 ` Daniel Henrique Barboza

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=e0b5c630-8312-bec0-459e-517f06eb65fb@gmail.com \
    --to=danielhb413@gmail.com \
    --cc=balaton@eik.bme.hu \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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).