]> git.itanic.dy.fi Git - linux-stable/commitdiff
powerpc/85xx: p2020: Move all P2020 RDB machine descriptions to p2020.c
authorPali Rohár <pali@kernel.org>
Sat, 8 Apr 2023 14:01:17 +0000 (16:01 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 20 Apr 2023 00:20:52 +0000 (10:20 +1000)
This moves P2020 RDB machine descriptions into new p2020.c source file.
This is preparation for code de-duplication and providing one unified
machine description for all P2020 boards.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230408140122.25293-9-pali@kernel.org
arch/powerpc/platforms/85xx/Makefile
arch/powerpc/platforms/85xx/mpc85xx.h
arch/powerpc/platforms/85xx/mpc85xx_rdb.c
arch/powerpc/platforms/85xx/p2020.c

index 1f54623db9b7f84bb92869abd98972f484f792e8..93451850ed833950188135d999834142aadbf0c0 100644 (file)
@@ -18,7 +18,7 @@ obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o
 obj-$(CONFIG_MPC8536_DS)  += mpc8536_ds.o
 obj-$(CONFIG_MPC85xx_DS)  += mpc85xx_ds.o p2020.o
 obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o
-obj-$(CONFIG_MPC85xx_RDB) += mpc85xx_rdb.o
+obj-$(CONFIG_MPC85xx_RDB) += mpc85xx_rdb.o p2020.o
 obj-$(CONFIG_P1010_RDB)   += p1010rdb.o
 obj-$(CONFIG_P1022_DS)    += p1022_ds.o
 obj-$(CONFIG_P1022_RDK)   += p1022_rdk.o
index ca8b39e6b05a00411eecc1241a2ec02d52c887a3..8f7b37c1de87a6049906b8dd13ca6c6bfb729037 100644 (file)
@@ -17,5 +17,7 @@ static inline void __init mpc85xx_qe_par_io_init(void) {}
 
 void __init mpc85xx_ds_pic_init(void);
 void __init mpc85xx_ds_setup_arch(void);
+void __init mpc85xx_rdb_setup_arch(void);
+void __init mpc85xx_rdb_pic_init(void);
 
 #endif
index cdafecaecf563251f1c71815c4a95dd98137503d..dbedffc57ce8a9fcebf4605f2ba54b81ecc2a28f 100644 (file)
@@ -48,7 +48,7 @@ void __init mpc85xx_rdb_pic_init(void)
 /*
  * Setup the architecture
  */
-static void __init mpc85xx_rdb_setup_arch(void)
+void __init mpc85xx_rdb_setup_arch(void)
 {
        if (ppc_md.progress)
                ppc_md.progress("mpc85xx_rdb_setup_arch()", 0);
@@ -93,8 +93,6 @@ static void __init mpc85xx_rdb_setup_arch(void)
        pr_info("MPC85xx RDB board from Freescale Semiconductor\n");
 }
 
-machine_arch_initcall(p2020_rdb, mpc85xx_common_publish_devices);
-machine_arch_initcall(p2020_rdb_pc, mpc85xx_common_publish_devices);
 machine_arch_initcall(p1020_mbg_pc, mpc85xx_common_publish_devices);
 machine_arch_initcall(p1020_rdb, mpc85xx_common_publish_devices);
 machine_arch_initcall(p1020_rdb_pc, mpc85xx_common_publish_devices);
@@ -104,19 +102,6 @@ machine_arch_initcall(p1021_rdb_pc, mpc85xx_common_publish_devices);
 machine_arch_initcall(p1025_rdb, mpc85xx_common_publish_devices);
 machine_arch_initcall(p1024_rdb, mpc85xx_common_publish_devices);
 
-define_machine(p2020_rdb) {
-       .name                   = "P2020 RDB",
-       .compatible             = "fsl,P2020RDB",
-       .setup_arch             = mpc85xx_rdb_setup_arch,
-       .init_IRQ               = mpc85xx_rdb_pic_init,
-#ifdef CONFIG_PCI
-       .pcibios_fixup_bus      = fsl_pcibios_fixup_bus,
-       .pcibios_fixup_phb      = fsl_pcibios_fixup_phb,
-#endif
-       .get_irq                = mpic_get_irq,
-       .progress               = udbg_progress,
-};
-
 define_machine(p1020_rdb) {
        .name                   = "P1020 RDB",
        .compatible             = "fsl,P1020RDB",
@@ -143,19 +128,6 @@ define_machine(p1021_rdb_pc) {
        .progress               = udbg_progress,
 };
 
-define_machine(p2020_rdb_pc) {
-       .name                   = "P2020RDB-PC",
-       .compatible             = "fsl,P2020RDB-PC",
-       .setup_arch             = mpc85xx_rdb_setup_arch,
-       .init_IRQ               = mpc85xx_rdb_pic_init,
-#ifdef CONFIG_PCI
-       .pcibios_fixup_bus      = fsl_pcibios_fixup_bus,
-       .pcibios_fixup_phb      = fsl_pcibios_fixup_phb,
-#endif
-       .get_irq                = mpic_get_irq,
-       .progress               = udbg_progress,
-};
-
 define_machine(p1025_rdb) {
        .name                   = "P1025 RDB",
        .compatible             = "fsl,P1025RDB",
index 356335122153dd67c318868cb299cc408587a4d7..41bba8c0e3353246005661b1f24fc916ec125b2b 100644 (file)
 machine_arch_initcall(p2020_ds, mpc85xx_common_publish_devices);
 #endif /* CONFIG_MPC85xx_DS */
 
+#ifdef CONFIG_MPC85xx_RDB
+machine_arch_initcall(p2020_rdb, mpc85xx_common_publish_devices);
+machine_arch_initcall(p2020_rdb_pc, mpc85xx_common_publish_devices);
+#endif /* CONFIG_MPC85xx_RDB */
+
 #ifdef CONFIG_MPC85xx_DS
 define_machine(p2020_ds) {
        .name                   = "P2020 DS",
@@ -39,3 +44,31 @@ define_machine(p2020_ds) {
        .progress               = udbg_progress,
 };
 #endif /* CONFIG_MPC85xx_DS */
+
+#ifdef CONFIG_MPC85xx_RDB
+define_machine(p2020_rdb) {
+       .name                   = "P2020 RDB",
+       .compatible             = "fsl,P2020RDB",
+       .setup_arch             = mpc85xx_rdb_setup_arch,
+       .init_IRQ               = mpc85xx_rdb_pic_init,
+#ifdef CONFIG_PCI
+       .pcibios_fixup_bus      = fsl_pcibios_fixup_bus,
+       .pcibios_fixup_phb      = fsl_pcibios_fixup_phb,
+#endif
+       .get_irq                = mpic_get_irq,
+       .progress               = udbg_progress,
+};
+
+define_machine(p2020_rdb_pc) {
+       .name                   = "P2020RDB-PC",
+       .compatible             = "fsl,P2020RDB-PC",
+       .setup_arch             = mpc85xx_rdb_setup_arch,
+       .init_IRQ               = mpc85xx_rdb_pic_init,
+#ifdef CONFIG_PCI
+       .pcibios_fixup_bus      = fsl_pcibios_fixup_bus,
+       .pcibios_fixup_phb      = fsl_pcibios_fixup_phb,
+#endif
+       .get_irq                = mpic_get_irq,
+       .progress               = udbg_progress,
+};
+#endif /* CONFIG_MPC85xx_RDB */