Commit 357f8239 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman

powerpc/47x: Split ppc47x machine in two

This machine matches two compatibles and sets .pci_irq_fixup
on one of them.

Split it into two machines, then the probe function can be dropped.
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
[mpe: Drop references to ppc47x_probe() to fix build]
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/6cb9865d916231c38401ba34ad1a98c249fae135.1676711562.git.christophe.leroy@csgroup.eu
parent 1c96fcde
...@@ -114,7 +114,8 @@ static int __init ppc47x_device_probe(void) ...@@ -114,7 +114,8 @@ static int __init ppc47x_device_probe(void)
return 0; return 0;
} }
machine_device_initcall(ppc47x, ppc47x_device_probe); machine_device_initcall(ppc47x_akebono, ppc47x_device_probe);
machine_device_initcall(ppc47x_currituck, ppc47x_device_probe);
static void __init ppc47x_init_irq(void) static void __init ppc47x_init_irq(void)
{ {
...@@ -249,7 +250,8 @@ static int __init ppc47x_get_board_rev(void) ...@@ -249,7 +250,8 @@ static int __init ppc47x_get_board_rev(void)
pr_info("%s: Unable to find board revision\n", __func__); pr_info("%s: Unable to find board revision\n", __func__);
return 0; return 0;
} }
machine_arch_initcall(ppc47x, ppc47x_get_board_rev); machine_arch_initcall(ppc47x_akebono, ppc47x_get_board_rev);
machine_arch_initcall(ppc47x_currituck, ppc47x_get_board_rev);
/* Use USB controller should have been hardware swizzled but it wasn't :( */ /* Use USB controller should have been hardware swizzled but it wasn't :( */
static void ppc47x_pci_irq_fixup(struct pci_dev *dev) static void ppc47x_pci_irq_fixup(struct pci_dev *dev)
...@@ -268,27 +270,22 @@ static void ppc47x_pci_irq_fixup(struct pci_dev *dev) ...@@ -268,27 +270,22 @@ static void ppc47x_pci_irq_fixup(struct pci_dev *dev)
} }
} }
/* define_machine(ppc47x_akebono) {
* Called very early, MMU is off, device-tree isn't unflattened .name = "PowerPC 47x (akebono)",
*/ .compatible = "ibm,akebono",
static int __init ppc47x_probe(void) .progress = udbg_progress,
{ .init_IRQ = ppc47x_init_irq,
if (of_machine_is_compatible("ibm,akebono")) .setup_arch = ppc47x_setup_arch,
return 1; .restart = ppc4xx_reset_system,
.calibrate_decr = generic_calibrate_decr,
if (of_machine_is_compatible("ibm,currituck")) { };
ppc_md.pci_irq_fixup = ppc47x_pci_irq_fixup;
return 1;
}
return 0;
}
define_machine(ppc47x) { define_machine(ppc47x_currituck) {
.name = "PowerPC 47x", .name = "PowerPC 47x (currituck)",
.probe = ppc47x_probe, .compatible = "ibm,currituck",
.progress = udbg_progress, .progress = udbg_progress,
.init_IRQ = ppc47x_init_irq, .init_IRQ = ppc47x_init_irq,
.pci_irq_fixup = ppc47x_pci_irq_fixup,
.setup_arch = ppc47x_setup_arch, .setup_arch = ppc47x_setup_arch,
.restart = ppc4xx_reset_system, .restart = ppc4xx_reset_system,
.calibrate_decr = generic_calibrate_decr, .calibrate_decr = generic_calibrate_decr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment