diff mbox series

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

Message ID 20200924063819.262830-18-oohall@gmail.com (mailing list archive)
State RFC
Headers show
Series [RFC,01/18] powerpc/pci: Add ppc_md.discover_phbs() | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (ace1986562a0814f179ecd2f1e648215ebc6625a)
snowpatch_ozlabs/build-ppc64le warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/build-ppc64be warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/build-ppc64e warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/build-pmac32 warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/checkpatch warning total: 0 errors, 1 warnings, 0 checks, 16 lines checked
snowpatch_ozlabs/needsstable success Patch has no Fixes tags

Commit Message

Oliver O'Halloran Sept. 24, 2020, 6:38 a.m. UTC
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
compile tested with pmac32_defconfig and g5_defconfig
---
 arch/powerpc/platforms/powermac/setup.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Christophe Leroy Sept. 27, 2020, 7:25 a.m. UTC | #1
Le 24/09/2020 à 08:38, Oliver O'Halloran a écrit :
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>

Tested-by: Christophe Leroy <christophe.leroy@csgroup.eu>

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..0xff400000  : early ioremap
   * 0xf1000000..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..0xff400000  : early ioremap
   * 0xf1000000..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 */
>
diff mbox series

Patch

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 */