powerpc/embedded6xx/linkstation: Move PHB discovery
authorOliver O'Halloran <oohall@gmail.com>
Tue, 3 Nov 2020 04:35:19 +0000 (15:35 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 8 Feb 2021 13:02:07 +0000 (00:02 +1100)
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201103043523.916109-14-oohall@gmail.com
arch/powerpc/platforms/embedded6xx/linkstation.c

index f514d5d28cd4fc7041a700bce0e699172932c6c8..eb8342e7f84e9ec07149753d390e3ff5c491d973 100644 (file)
@@ -63,15 +63,18 @@ static int __init linkstation_add_bridge(struct device_node *dev)
 }
 
 static void __init linkstation_setup_arch(void)
+{
+       printk(KERN_INFO "BUFFALO Network Attached Storage Series\n");
+       printk(KERN_INFO "(C) 2002-2005 BUFFALO INC.\n");
+}
+
+static void __init linkstation_setup_pci(void)
 {
        struct device_node *np;
 
        /* Lookup PCI host bridges */
        for_each_compatible_node(np, "pci", "mpc10x-pci")
                linkstation_add_bridge(np);
-
-       printk(KERN_INFO "BUFFALO Network Attached Storage Series\n");
-       printk(KERN_INFO "(C) 2002-2005 BUFFALO INC.\n");
 }
 
 /*
@@ -153,6 +156,7 @@ define_machine(linkstation){
        .name                   = "Buffalo Linkstation",
        .probe                  = linkstation_probe,
        .setup_arch             = linkstation_setup_arch,
+       .discover_phbs          = linkstation_setup_pci,
        .init_IRQ               = linkstation_init_IRQ,
        .show_cpuinfo           = linkstation_show_cpuinfo,
        .get_irq                = mpic_get_irq,