Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Christophe Leroy <christophe.leroy@csgroup.eu>
[mpe: Drop references to ppc47x_probe() to fix build]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/6cb9865d916231c38401ba34ad1a98c249fae135.1676711562.git.christophe.leroy@csgroup.eu

authored by

Christophe Leroy and committed by
Michael Ellerman
357f8239 1c96fcde

+18 -21
+18 -21
arch/powerpc/platforms/44x/ppc476.c
··· 114 114 115 115 return 0; 116 116 } 117 - machine_device_initcall(ppc47x, ppc47x_device_probe); 117 + machine_device_initcall(ppc47x_akebono, ppc47x_device_probe); 118 + machine_device_initcall(ppc47x_currituck, ppc47x_device_probe); 118 119 119 120 static void __init ppc47x_init_irq(void) 120 121 { ··· 250 249 pr_info("%s: Unable to find board revision\n", __func__); 251 250 return 0; 252 251 } 253 - machine_arch_initcall(ppc47x, ppc47x_get_board_rev); 252 + machine_arch_initcall(ppc47x_akebono, ppc47x_get_board_rev); 253 + machine_arch_initcall(ppc47x_currituck, ppc47x_get_board_rev); 254 254 255 255 /* Use USB controller should have been hardware swizzled but it wasn't :( */ 256 256 static void ppc47x_pci_irq_fixup(struct pci_dev *dev) ··· 270 268 } 271 269 } 272 270 273 - /* 274 - * Called very early, MMU is off, device-tree isn't unflattened 275 - */ 276 - static int __init ppc47x_probe(void) 277 - { 278 - if (of_machine_is_compatible("ibm,akebono")) 279 - return 1; 280 - 281 - if (of_machine_is_compatible("ibm,currituck")) { 282 - ppc_md.pci_irq_fixup = ppc47x_pci_irq_fixup; 283 - return 1; 284 - } 285 - 286 - return 0; 287 - } 288 - 289 - define_machine(ppc47x) { 290 - .name = "PowerPC 47x", 291 - .probe = ppc47x_probe, 271 + define_machine(ppc47x_akebono) { 272 + .name = "PowerPC 47x (akebono)", 273 + .compatible = "ibm,akebono", 292 274 .progress = udbg_progress, 293 275 .init_IRQ = ppc47x_init_irq, 276 + .setup_arch = ppc47x_setup_arch, 277 + .restart = ppc4xx_reset_system, 278 + .calibrate_decr = generic_calibrate_decr, 279 + }; 280 + 281 + define_machine(ppc47x_currituck) { 282 + .name = "PowerPC 47x (currituck)", 283 + .compatible = "ibm,currituck", 284 + .progress = udbg_progress, 285 + .init_IRQ = ppc47x_init_irq, 286 + .pci_irq_fixup = ppc47x_pci_irq_fixup, 294 287 .setup_arch = ppc47x_setup_arch, 295 288 .restart = ppc4xx_reset_system, 296 289 .calibrate_decr = generic_calibrate_decr,