All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Fix up sam460ex fixes
@ 2021-01-08 22:07 BALATON Zoltan
  2021-01-08 22:07 ` [PATCH v2 3/3] sam460ex: Use type cast macro instead of simple cast BALATON Zoltan
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: BALATON Zoltan @ 2021-01-08 22:07 UTC (permalink / raw)
  To: qemu-devel, qemu-ppc; +Cc: Peter Maydell, f4bug, David Gibson

Accidentally the wrong version of this series was committed, this
series fixes that up to the last version that was meant to be merged.
This v2 is rebased on Peter's UIC series and clarifies commit message
of last patch.

Based-on: <20210108171212.16500-1-peter.maydell@linaro.org>

BALATON Zoltan (3):
  Revert "sam460ex: Remove FDT_PPC dependency from KConfig"
  Revert "ppc4xx: Move common dependency on serial to common option"
  sam460ex: Use type cast macro instead of simple cast

 hw/ppc/Kconfig    | 6 +++++-
 hw/ppc/sam460ex.c | 7 ++-----
 2 files changed, 7 insertions(+), 6 deletions(-)

-- 
2.21.3



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

* [PATCH v2 2/3] Revert "ppc4xx: Move common dependency on serial to common option"
  2021-01-08 22:07 [PATCH v2 0/3] Fix up sam460ex fixes BALATON Zoltan
  2021-01-08 22:07 ` [PATCH v2 3/3] sam460ex: Use type cast macro instead of simple cast BALATON Zoltan
  2021-01-08 22:07 ` [PATCH v2 1/3] Revert "sam460ex: Remove FDT_PPC dependency from KConfig" BALATON Zoltan
@ 2021-01-08 22:07 ` BALATON Zoltan
  2021-01-08 22:23   ` Peter Maydell
  2021-01-12  6:22 ` [PATCH v2 0/3] Fix up sam460ex fixes David Gibson
  3 siblings, 1 reply; 8+ messages in thread
From: BALATON Zoltan @ 2021-01-08 22:07 UTC (permalink / raw)
  To: qemu-devel, qemu-ppc; +Cc: Peter Maydell, f4bug, David Gibson

This reverts commit e6d5106786 which was added mistakenly. While this
change works it was suggested during review that keeping dependencies
explicit for each board may be better than listing them in a common
option so keep the previous version and revert this change.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
 hw/ppc/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index d2329edbab..d11dc30509 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -36,6 +36,7 @@ config PPC405
     select M48T59
     select PFLASH_CFI02
     select PPC4XX
+    select SERIAL
 
 config PPC440
     bool
@@ -44,6 +45,7 @@ config PPC440
     imply E1000_PCI
     select PCI_EXPRESS
     select PPC4XX
+    select SERIAL
     select FDT_PPC
 
 config PPC4XX
@@ -51,7 +53,6 @@ config PPC4XX
     select BITBANG_I2C
     select PCI
     select PPC_UIC
-    select SERIAL
 
 config SAM460EX
     bool
@@ -60,6 +61,7 @@ config SAM460EX
     select IDE_SII3112
     select M41T80
     select PPC440
+    select SERIAL
     select SM501
     select SMBUS_EEPROM
     select USB_EHCI_SYSBUS
@@ -121,6 +123,7 @@ config VIRTEX
     bool
     select PPC4XX
     select PFLASH_CFI01
+    select SERIAL
     select XILINX
     select XILINX_ETHLITE
     select FDT_PPC
-- 
2.21.3



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

* [PATCH v2 3/3] sam460ex: Use type cast macro instead of simple cast
  2021-01-08 22:07 [PATCH v2 0/3] Fix up sam460ex fixes BALATON Zoltan
@ 2021-01-08 22:07 ` BALATON Zoltan
  2021-01-08 22:24   ` Peter Maydell
  2021-01-08 22:07 ` [PATCH v2 1/3] Revert "sam460ex: Remove FDT_PPC dependency from KConfig" BALATON Zoltan
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: BALATON Zoltan @ 2021-01-08 22:07 UTC (permalink / raw)
  To: qemu-devel, qemu-ppc; +Cc: Peter Maydell, f4bug, David Gibson

Use the PCI_BUS type cast macro to convert result of qdev_get_child_bus().
Also remove the check for NULL afterwards which should not be needed
because sysbus_create_simple() uses error_abort and we create the PCI
host object here that's expected to have a PCI bus so this shouldn't
fail. Even if it would fail that would be due to a programmer error so
an error message is not necessary.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
 hw/ppc/sam460ex.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
index 45721ad6c7..e459b43065 100644
--- a/hw/ppc/sam460ex.c
+++ b/hw/ppc/sam460ex.c
@@ -419,11 +419,8 @@ static void sam460ex_init(MachineState *machine)
     /* All PCI irqs are connected to the same UIC pin (cf. UBoot source) */
     dev = sysbus_create_simple("ppc440-pcix-host", 0xc0ec00000,
                                qdev_get_gpio_in(uic[1], 0));
-    pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci.0");
-    if (!pci_bus) {
-        error_report("couldn't create PCI controller!");
-        exit(1);
-    }
+    pci_bus = PCI_BUS(qdev_get_child_bus(dev, "pci.0"));
+
     memory_region_init_alias(isa, NULL, "isa_mmio", get_system_io(),
                              0, 0x10000);
     memory_region_add_subregion(get_system_memory(), 0xc08000000, isa);
-- 
2.21.3



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

* [PATCH v2 1/3] Revert "sam460ex: Remove FDT_PPC dependency from KConfig"
  2021-01-08 22:07 [PATCH v2 0/3] Fix up sam460ex fixes BALATON Zoltan
  2021-01-08 22:07 ` [PATCH v2 3/3] sam460ex: Use type cast macro instead of simple cast BALATON Zoltan
@ 2021-01-08 22:07 ` BALATON Zoltan
  2021-01-08 22:23   ` Peter Maydell
  2021-01-08 22:07 ` [PATCH v2 2/3] Revert "ppc4xx: Move common dependency on serial to common option" BALATON Zoltan
  2021-01-12  6:22 ` [PATCH v2 0/3] Fix up sam460ex fixes David Gibson
  3 siblings, 1 reply; 8+ messages in thread
From: BALATON Zoltan @ 2021-01-08 22:07 UTC (permalink / raw)
  To: qemu-devel, qemu-ppc; +Cc: Peter Maydell, f4bug, David Gibson

This reverts commit 038da2adf that was mistakenly added, this
dependency is still needed to get libfdt dependencies even if fdt.o is
not needed by sam460ex.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
 hw/ppc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index 7e267d94a1..d2329edbab 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -64,6 +64,7 @@ config SAM460EX
     select SMBUS_EEPROM
     select USB_EHCI_SYSBUS
     select USB_OHCI
+    select FDT_PPC
 
 config PREP
     bool
-- 
2.21.3



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

* Re: [PATCH v2 1/3] Revert "sam460ex: Remove FDT_PPC dependency from KConfig"
  2021-01-08 22:07 ` [PATCH v2 1/3] Revert "sam460ex: Remove FDT_PPC dependency from KConfig" BALATON Zoltan
@ 2021-01-08 22:23   ` Peter Maydell
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Maydell @ 2021-01-08 22:23 UTC (permalink / raw)
  To: BALATON Zoltan
  Cc: Philippe Mathieu-Daudé, qemu-ppc, QEMU Developers, David Gibson

On Fri, 8 Jan 2021 at 22:17, BALATON Zoltan <balaton@eik.bme.hu> wrote:
>
> This reverts commit 038da2adf that was mistakenly added, this
> dependency is still needed to get libfdt dependencies even if fdt.o is
> not needed by sam460ex.
>
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
>  hw/ppc/Kconfig | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


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

* Re: [PATCH v2 2/3] Revert "ppc4xx: Move common dependency on serial to common option"
  2021-01-08 22:07 ` [PATCH v2 2/3] Revert "ppc4xx: Move common dependency on serial to common option" BALATON Zoltan
@ 2021-01-08 22:23   ` Peter Maydell
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Maydell @ 2021-01-08 22:23 UTC (permalink / raw)
  To: BALATON Zoltan
  Cc: Philippe Mathieu-Daudé, qemu-ppc, QEMU Developers, David Gibson

On Fri, 8 Jan 2021 at 22:17, BALATON Zoltan <balaton@eik.bme.hu> wrote:
>
> This reverts commit e6d5106786 which was added mistakenly. While this
> change works it was suggested during review that keeping dependencies
> explicit for each board may be better than listing them in a common
> option so keep the previous version and revert this change.
>
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
>  hw/ppc/Kconfig | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


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

* Re: [PATCH v2 3/3] sam460ex: Use type cast macro instead of simple cast
  2021-01-08 22:07 ` [PATCH v2 3/3] sam460ex: Use type cast macro instead of simple cast BALATON Zoltan
@ 2021-01-08 22:24   ` Peter Maydell
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Maydell @ 2021-01-08 22:24 UTC (permalink / raw)
  To: BALATON Zoltan
  Cc: Philippe Mathieu-Daudé, qemu-ppc, QEMU Developers, David Gibson

On Fri, 8 Jan 2021 at 22:17, BALATON Zoltan <balaton@eik.bme.hu> wrote:
>
> Use the PCI_BUS type cast macro to convert result of qdev_get_child_bus().
> Also remove the check for NULL afterwards which should not be needed
> because sysbus_create_simple() uses error_abort and we create the PCI
> host object here that's expected to have a PCI bus so this shouldn't
> fail. Even if it would fail that would be due to a programmer error so
> an error message is not necessary.
>
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


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

* Re: [PATCH v2 0/3] Fix up sam460ex fixes
  2021-01-08 22:07 [PATCH v2 0/3] Fix up sam460ex fixes BALATON Zoltan
                   ` (2 preceding siblings ...)
  2021-01-08 22:07 ` [PATCH v2 2/3] Revert "ppc4xx: Move common dependency on serial to common option" BALATON Zoltan
@ 2021-01-12  6:22 ` David Gibson
  3 siblings, 0 replies; 8+ messages in thread
From: David Gibson @ 2021-01-12  6:22 UTC (permalink / raw)
  To: BALATON Zoltan; +Cc: Peter Maydell, qemu-ppc, qemu-devel, f4bug

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

On Fri, Jan 08, 2021 at 11:07:38PM +0100, BALATON Zoltan wrote:
> Accidentally the wrong version of this series was committed, this
> series fixes that up to the last version that was meant to be merged.
> This v2 is rebased on Peter's UIC series and clarifies commit message
> of last patch.
> 
> Based-on: <20210108171212.16500-1-peter.maydell@linaro.org>
> 
> BALATON Zoltan (3):
>   Revert "sam460ex: Remove FDT_PPC dependency from KConfig"
>   Revert "ppc4xx: Move common dependency on serial to common option"
>   sam460ex: Use type cast macro instead of simple cast
> 
>  hw/ppc/Kconfig    | 6 +++++-
>  hw/ppc/sam460ex.c | 7 ++-----
>  2 files changed, 7 insertions(+), 6 deletions(-)
> 

Applied to ppc-for-6.0, thanks.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-01-12  8:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-08 22:07 [PATCH v2 0/3] Fix up sam460ex fixes BALATON Zoltan
2021-01-08 22:07 ` [PATCH v2 3/3] sam460ex: Use type cast macro instead of simple cast BALATON Zoltan
2021-01-08 22:24   ` Peter Maydell
2021-01-08 22:07 ` [PATCH v2 1/3] Revert "sam460ex: Remove FDT_PPC dependency from KConfig" BALATON Zoltan
2021-01-08 22:23   ` Peter Maydell
2021-01-08 22:07 ` [PATCH v2 2/3] Revert "ppc4xx: Move common dependency on serial to common option" BALATON Zoltan
2021-01-08 22:23   ` Peter Maydell
2021-01-12  6:22 ` [PATCH v2 0/3] Fix up sam460ex fixes David Gibson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.