Skip to contentSkip to conversation

Fix up sam460ex fixes

PATCH Applied BALATON Zoltan 3 participants 8 messages Jan 8, 2021 – Jan 12, 2021

lore
Share & tools
lore
#0 lore raw

v2 cover Fix up sam460ex fixes

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: <[email protected]>

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(-)
Signature · 1 line
2.21.3
#3 lore raw

PATCH v2 2/3 Revert "ppc4xx: Move common dependency on serial to common option"

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.

---
 hw/ppc/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
hw/ppc/Kconfig +4 -1
index d2329edbab..d11dc30509 100644
@@ -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
Signature · 1 line
2.21.3
#5 lore raw

PATCH v2 3/3 sam460ex: Use type cast macro instead of simple cast

In reply to BALATON Zoltan

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.

---
 hw/ppc/sam460ex.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
hw/ppc/sam460ex.c +2 -5
index 45721ad6c7..e459b43065 100644
@@ -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);
Signature · 1 line
2.21.3
#1 lore raw

PATCH v2 1/3 Revert "sam460ex: Remove FDT_PPC dependency from KConfig"

In reply to BALATON Zoltan

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.

---
 hw/ppc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
hw/ppc/Kconfig +1 -0
index 7e267d94a1..d2329edbab 100644
@@ -64,6 +64,7 @@ config SAM460EX
     select SMBUS_EEPROM
     select USB_EHCI_SYSBUS
     select USB_OHCI
+    select FDT_PPC
 
 config PREP
     bool
Signature · 1 line
2.21.3
Reviewed-by on v2 1/3
#2 lore raw

Re: [PATCH v2 1/3] Revert "sam460ex: Remove FDT_PPC dependency from KConfig"

Quoted 9 lines · BALATON Zoltan

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.

---
 hw/ppc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

thanks
-- PMM

Reviewed-by on v2 2/3
#4 lore raw

Re: [PATCH v2 2/3] Revert "ppc4xx: Move common dependency on serial to common option"

In reply to BALATON Zoltan
Quoted 10 lines · BALATON Zoltan

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.

---
 hw/ppc/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

thanks
-- PMM

Reviewed-by on v2 3/3
#6 lore raw

Re: [PATCH v2 3/3] sam460ex: Use type cast macro instead of simple cast

In reply to BALATON Zoltan
Quoted 9 lines · BALATON Zoltan

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.

thanks
-- PMM

Applied
#7 lore raw
In reply to BALATON Zoltan
Quoted 7 lines · BALATON Zoltan

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: <[email protected]>

Quoted 9 lines

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.

Signature · 4 lines
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