[PATCH] powerpc/82xx: Remove pq2_init_pci

Christophe Leroy posted 1 patch 2 years, 4 months ago
arch/powerpc/platforms/82xx/pq2.c | 46 -------------------------------
1 file changed, 46 deletions(-)
[PATCH] powerpc/82xx: Remove pq2_init_pci
Posted by Christophe Leroy 2 years, 4 months ago
Commit 859b21a008eb ("powerpc: drop PowerQUICC II Family ADS platform
support") removed last user of pq2_init_pci.

Remove it.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 arch/powerpc/platforms/82xx/pq2.c | 46 -------------------------------
 1 file changed, 46 deletions(-)

diff --git a/arch/powerpc/platforms/82xx/pq2.c b/arch/powerpc/platforms/82xx/pq2.c
index 3b5cb39a564c..391d72a2e09d 100644
--- a/arch/powerpc/platforms/82xx/pq2.c
+++ b/arch/powerpc/platforms/82xx/pq2.c
@@ -32,49 +32,3 @@ void __noreturn pq2_restart(char *cmd)
 	panic("Restart failed\n");
 }
 NOKPROBE_SYMBOL(pq2_restart)
-
-#ifdef CONFIG_PCI
-static int pq2_pci_exclude_device(struct pci_controller *hose,
-                                  u_char bus, u8 devfn)
-{
-	if (bus == 0 && PCI_SLOT(devfn) == 0)
-		return PCIBIOS_DEVICE_NOT_FOUND;
-	else
-		return PCIBIOS_SUCCESSFUL;
-}
-
-static void __init pq2_pci_add_bridge(struct device_node *np)
-{
-	struct pci_controller *hose;
-	struct resource r;
-
-	if (of_address_to_resource(np, 0, &r) || r.end - r.start < 0x10b)
-		goto err;
-
-	pci_add_flags(PCI_REASSIGN_ALL_BUS);
-
-	hose = pcibios_alloc_controller(np);
-	if (!hose)
-		return;
-
-	hose->dn = np;
-
-	setup_indirect_pci(hose, r.start + 0x100, r.start + 0x104, 0);
-	pci_process_bridge_OF_ranges(hose, np, 1);
-
-	return;
-
-err:
-	printk(KERN_ERR "No valid PCI reg property in device tree\n");
-}
-
-void __init pq2_init_pci(void)
-{
-	struct device_node *np;
-
-	ppc_md.pci_exclude_device = pq2_pci_exclude_device;
-
-	for_each_compatible_node(np, NULL, "fsl,pq2-pci")
-		pq2_pci_add_bridge(np);
-}
-#endif
-- 
2.41.0
Re: [PATCH] powerpc/82xx: Remove pq2_init_pci
Posted by Michael Ellerman 2 years, 3 months ago
On Thu, 17 Aug 2023 10:05:08 +0200, Christophe Leroy wrote:
> Commit 859b21a008eb ("powerpc: drop PowerQUICC II Family ADS platform
> support") removed last user of pq2_init_pci.
> 
> Remove it.
> 
> 

Applied to powerpc/next.

[1/1] powerpc/82xx: Remove pq2_init_pci
      https://git.kernel.org/powerpc/c/188da8af0a06b985c2e0f00ec04bd12dbbf870eb

cheers
Re: [PATCH] powerpc/82xx: Remove pq2_init_pci
Posted by Michael Ellerman 2 years, 4 months ago
Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Commit 859b21a008eb ("powerpc: drop PowerQUICC II Family ADS platform
> support") removed last user of pq2_init_pci.
>
> Remove it.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
>  arch/powerpc/platforms/82xx/pq2.c | 46 -------------------------------
>  1 file changed, 46 deletions(-)

Haha, from my local tree:

$ show --stat dev/mpe
commit d4268218b50422292cb5e1273cc6829fb3b22b5b
Author:     Michael Ellerman <mpe@ellerman.id.au>
AuthorDate: Wed Aug 16 14:06:50 2023 +1000
Commit:     Michael Ellerman <mpe@ellerman.id.au>
CommitDate: Wed Aug 16 14:08:47 2023 +1000

    powerpc/82xx: Drop unused pq2 PCI code

    The last caller of this code was removed when the pq2fads platform was
    dropped in commit 859b21a008eb ("powerpc: drop PowerQUICC II Family ADS
    platform support").

    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

 arch/powerpc/platforms/82xx/pq2.c | 46 ---------------------------------------
 1 file changed, 46 deletions(-)


But I'll take yours because you sent it first.

cheers