[PATCH 18/18] powerpc/powermac: Move PHB discovery

2020-11-02 Thread Oliver O'Halloran
Signed-off-by: Oliver O'Halloran 
---
compile tested with pmac32_defconfig and g5_defconfig
---
 arch/powerpc/platforms/powermac/setup.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/setup.c 
b/arch/powerpc/platforms/powermac/setup.c
index 2e2cc0c75d87..86aee3f2483f 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -298,9 +298,6 @@ static void __init pmac_setup_arch(void)
of_node_put(ic);
}
 
-   /* Lookup PCI hosts */
-   pmac_pci_init();
-
 #ifdef CONFIG_PPC32
ohare_init();
l2cr_init();
@@ -600,6 +597,7 @@ define_machine(powermac) {
.name   = "PowerMac",
.probe  = pmac_probe,
.setup_arch = pmac_setup_arch,
+   .discover_phbs  = pmac_pci_init,
.show_cpuinfo   = pmac_show_cpuinfo,
.init_IRQ   = pmac_pic_init,
.get_irq= NULL, /* changed later */
-- 
2.26.2



Re: [RFC PATCH 18/18] powerpc/powermac: Move PHB discovery

2020-09-27 Thread Christophe Leroy




Le 24/09/2020 à 08:38, Oliver O'Halloran a écrit :

Signed-off-by: Oliver O'Halloran 


Tested-by: Christophe Leroy 

This series is a really good step forward to the elimination of
early support for ioremap(), thanks.

Tested with pmac32_defconfig on QEMU MAC99.

Before the series we have 9000 kbytes mapped as early ioremap

ioremap() called early from pmac_feature_init+0xc8/0xac8. Use early_ioremap() 
instead
ioremap() called early from probe_one_macio+0x170/0x2a8. Use early_ioremap() 
instead
ioremap() called early from udbg_scc_init+0x1d8/0x494. Use early_ioremap() 
instead
ioremap() called early from find_via_cuda+0xa8/0x3f8. Use early_ioremap() 
instead
ioremap() called early from pmac_pci_init+0x214/0x778. Use early_ioremap() 
instead
ioremap() called early from pmac_pci_init+0x228/0x778. Use early_ioremap() 
instead
ioremap() called early from pci_process_bridge_OF_ranges+0x158/0x2d0. Use 
early_ioremap() instead
ioremap() called early from pmac_setup_arch+0x110/0x298. Use early_ioremap() 
instead
ioremap() called early from pmac_nvram_init+0x144/0x534. Use early_ioremap() 
instead
  * 0xfeb36000..0xff40  : early ioremap
  * 0xf100..0xfeb36000  : vmalloc & ioremap

After the series we have 800 kbytes mapped as early ioremap

ioremap() called early from pmac_feature_init+0xc8/0xac8. Use early_ioremap() 
instead
ioremap() called early from probe_one_macio+0x170/0x2a8. Use early_ioremap() 
instead
ioremap() called early from udbg_scc_init+0x1d8/0x494. Use early_ioremap() 
instead
ioremap() called early from find_via_cuda+0xa8/0x3f8. Use early_ioremap() 
instead
ioremap() called early from pmac_setup_arch+0x10c/0x294. Use early_ioremap() 
instead
ioremap() called early from pmac_nvram_init+0x144/0x534. Use early_ioremap() 
instead
  * 0xff338000..0xff40  : early ioremap
  * 0xf100..0xff338000  : vmalloc & ioremap

Christophe



---
compile tested with pmac32_defconfig and g5_defconfig
---
  arch/powerpc/platforms/powermac/setup.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/setup.c 
b/arch/powerpc/platforms/powermac/setup.c
index f002b0fa69b8..0f8669139a21 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -298,9 +298,6 @@ static void __init pmac_setup_arch(void)
of_node_put(ic);
}
  
-	/* Lookup PCI hosts */

-   pmac_pci_init();
-
  #ifdef CONFIG_PPC32
ohare_init();
l2cr_init();
@@ -600,6 +597,7 @@ define_machine(powermac) {
.name   = "PowerMac",
.probe  = pmac_probe,
.setup_arch = pmac_setup_arch,
+   .discover_phbs  = pmac_pci_init,
.show_cpuinfo   = pmac_show_cpuinfo,
.init_IRQ   = pmac_pic_init,
.get_irq= NULL, /* changed later */



[RFC PATCH 18/18] powerpc/powermac: Move PHB discovery

2020-09-24 Thread Oliver O'Halloran
Signed-off-by: Oliver O'Halloran 
---
compile tested with pmac32_defconfig and g5_defconfig
---
 arch/powerpc/platforms/powermac/setup.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/setup.c 
b/arch/powerpc/platforms/powermac/setup.c
index f002b0fa69b8..0f8669139a21 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -298,9 +298,6 @@ static void __init pmac_setup_arch(void)
of_node_put(ic);
}
 
-   /* Lookup PCI hosts */
-   pmac_pci_init();
-
 #ifdef CONFIG_PPC32
ohare_init();
l2cr_init();
@@ -600,6 +597,7 @@ define_machine(powermac) {
.name   = "PowerMac",
.probe  = pmac_probe,
.setup_arch = pmac_setup_arch,
+   .discover_phbs  = pmac_pci_init,
.show_cpuinfo   = pmac_show_cpuinfo,
.init_IRQ   = pmac_pic_init,
.get_irq= NULL, /* changed later */
-- 
2.26.2