mpc85xx: replace probe with compatible
authorRosen Penev <rosenp@gmail.com>
Fri, 6 Sep 2024 22:08:18 +0000 (15:08 -0700)
committerRobert Marko <robimarko@gmail.com>
Sat, 7 Sep 2024 20:24:07 +0000 (22:24 +0200)
Upstream commit does this for simple cases, which all of these are.

Commit: 1c96fcdef8c7492ecf34ed70102a1ae5253ef9d1

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16345
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/br200-wp.c
target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/firebox_t10.c
target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/hiveap-330.c
target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/msm460.c
target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/panda.c
target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/red15w_rev1.c
target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/tl_wdr4900_v1.c
target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3710i.c
target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3715i.c
target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3825i.c

index 23fd11a5c692556401871e8791e24b0f31a3d115..86a925df23d09b64ba5c6975cc0655fea95fb844 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
-#include <linux/of_platform.h>
 
 #include <asm/time.h>
 #include <asm/machdep.h>
@@ -57,19 +56,9 @@ static void __init br200_wp_setup_arch(void)
 
 machine_arch_initcall(br200_wp, mpc85xx_common_publish_devices);
 
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init br200_wp_probe(void)
-{
-       if (of_machine_is_compatible("aerohive,br200-wp"))
-               return 1;
-       return 0;
-}
-
 define_machine(br200_wp) {
        .name                   = "P1020 RDB",
-       .probe                  = br200_wp_probe,
+       .compatible             = "aerohive,br200-wp",
        .setup_arch             = br200_wp_setup_arch,
        .init_IRQ               = br200_wp_pic_init,
 #ifdef CONFIG_PCI
index 422bde690322926c40f79218d94f4b669bfa3503..27a3ef2e86d1fefb1c452d1db64da24ea583385a 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
-#include <linux/of_platform.h>
 
 #include <asm/time.h>
 #include <asm/machdep.h>
@@ -62,19 +61,9 @@ static void __init firebox_t10_setup_arch(void)
 
 machine_arch_initcall(firebox_t10, mpc85xx_common_publish_devices);
 
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init firebox_t10_probe(void)
-{
-       if (of_machine_is_compatible("watchguard,firebox-t10"))
-               return 1;
-       return 0;
-}
-
 define_machine(firebox_t10) {
        .name                   = "P1010 RDB",
-       .probe                  = firebox_t10_probe,
+       .compatible             = "watchguard,firebox-t10",
        .setup_arch             = firebox_t10_setup_arch,
        .init_IRQ               = firebox_t10_pic_init,
 #ifdef CONFIG_PCI
index f325b32ce6bed3f313ad9bed4e8a6a86c1c1bd1f..b5ee3e646b5b2c01c1b4ad8e34cd1dffc5aef481 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
-#include <linux/of_platform.h>
 
 #include <asm/time.h>
 #include <asm/machdep.h>
@@ -64,19 +63,9 @@ static void __init hiveap_330_setup_arch(void)
 
 machine_arch_initcall(hiveap_330, mpc85xx_common_publish_devices);
 
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init hiveap_330_probe(void)
-{
-       if (of_machine_is_compatible("aerohive,hiveap-330"))
-               return 1;
-       return 0;
-}
-
 define_machine(hiveap_330) {
        .name                   = "P1020 RDB",
-       .probe                  = hiveap_330_probe,
+       .compatible             = "aerohive,hiveap-330",
        .setup_arch             = hiveap_330_setup_arch,
        .init_IRQ               = hiveap_330_pic_init,
 #ifdef CONFIG_PCI
index a4f547d3132653817674b3fd8b91e9c7405ff9c7..f7324406e9cfd07ab46cfaa2db4625c4c739b214 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
-#include <linux/of_platform.h>
 
 #include <asm/time.h>
 #include <asm/machdep.h>
@@ -66,19 +65,9 @@ static void __init msm_setup_arch(void)
 
 machine_arch_initcall(msm, mpc85xx_common_publish_devices);
 
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init msm_probe(void)
-{
-       if (of_machine_is_compatible("hpe,msm460"))
-               return 1;
-       return 0;
-}
-
 define_machine(msm) {
        .name                   = "P1020 RDB",
-       .probe                  = msm_probe,
+       .compatible             = "hpe,msm460",
        .setup_arch             = msm_setup_arch,
        .init_IRQ               = msm_pic_init,
 #ifdef CONFIG_PCI
index 7eec2cf15c7362b4cf5cacfca6a8b51b791bfdf3..5b8b3e8217e2b1d187b8d5ab820a6ee9a3df4434 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
-#include <linux/of_platform.h>
 
 #include <asm/time.h>
 #include <asm/machdep.h>
@@ -66,19 +65,9 @@ static void __init panda_setup_arch(void)
 
 machine_arch_initcall(panda, mpc85xx_common_publish_devices);
 
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init panda_probe(void)
-{
-       if (of_machine_is_compatible("ocedo,panda"))
-               return 1;
-       return 0;
-}
-
 define_machine(panda) {
        .name                   = "P1020 RDB",
-       .probe                  = panda_probe,
+       .compatible             = "ocedo,panda",
        .setup_arch             = panda_setup_arch,
        .init_IRQ               = panda_pic_init,
 #ifdef CONFIG_PCI
index 1b2be853a5587dc6f7444f83b62c66aad8de4e8e..6e6e3aa7243c13e2db7c8a60846d7fe9c013c7e7 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
-#include <linux/of_platform.h>
 
 #include <asm/time.h>
 #include <asm/machdep.h>
@@ -62,19 +61,9 @@ static void __init red_15w_rev1_setup_arch(void)
 
 machine_arch_initcall(red_15w_rev1, mpc85xx_common_publish_devices);
 
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init red_15w_rev1_probe(void)
-{
-       if (of_machine_is_compatible("sophos,red-15w-rev1"))
-               return 1;
-       return 0;
-}
-
 define_machine(red_15w_rev1) {
        .name                   = "P1010 RDB",
-       .probe                  = red_15w_rev1_probe,
+       .compatible             = "sophos,red-15w-rev1",
        .setup_arch             = red_15w_rev1_setup_arch,
        .init_IRQ               = red_15w_rev1_pic_init,
 #ifdef CONFIG_PCI
index b430a12ee430cf9d4cbad59b6587acbdcc5901af..c259b09414d2d333929aa904e960e1aeb3dfae96 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
-#include <linux/of_platform.h>
 
 #include <asm/time.h>
 #include <asm/machdep.h>
@@ -59,19 +58,9 @@ static void __init tl_wdr4900_v1_setup_arch(void)
 
 machine_arch_initcall(tl_wdr4900_v1, mpc85xx_common_publish_devices);
 
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init tl_wdr4900_v1_probe(void)
-{
-       if (of_machine_is_compatible("tplink,tl-wdr4900-v1"))
-               return 1;
-       return 0;
-}
-
 define_machine(tl_wdr4900_v1) {
        .name                   = "Freescale P1014",
-       .probe                  = tl_wdr4900_v1_probe,
+       .compatible             = "tplink,tl-wdr4900-v1",
        .setup_arch             = tl_wdr4900_v1_setup_arch,
        .init_IRQ               = tl_wdr4900_v1_pic_init,
 #ifdef CONFIG_PCI
index f23902de397f31f8f64a32f3297813177981274a..0be016547334690a6062cad20795cdc241c348aa 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
-#include <linux/of_platform.h>
 
 #include <asm/time.h>
 #include <asm/machdep.h>
@@ -66,19 +65,9 @@ static void __init ws_ap3710i_setup_arch(void)
 
 machine_arch_initcall(ws_ap3710i, mpc85xx_common_publish_devices);
 
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init ws_ap3710i_probe(void)
-{
-       if (of_machine_is_compatible("enterasys,ws-ap3710i"))
-               return 1;
-       return 0;
-}
-
 define_machine(ws_ap3710i) {
        .name                   = "P1020 RDB",
-       .probe                  = ws_ap3710i_probe,
+       .compatible             = "enterasys,ws-ap3710i",
        .setup_arch             = ws_ap3710i_setup_arch,
        .init_IRQ               = ws_ap3710i_pic_init,
 #ifdef CONFIG_PCI
index aa2a366b3db4b2789f97599f6d0687c677fea2b9..367bb7a794828075e3708e54e4188efafbce4cf4 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
-#include <linux/of_platform.h>
 
 #include <asm/time.h>
 #include <asm/machdep.h>
@@ -62,19 +61,9 @@ static void __init wsap3715i_setup_arch(void)
 
 machine_arch_initcall(wsap3715i, mpc85xx_common_publish_devices);
 
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init wsap3715i_probe(void)
-{
-       if (of_machine_is_compatible("enterasys,ws-ap3715i"))
-               return 1;
-       return 0;
-}
-
 define_machine(wsap3715i) {
        .name                   = "P1010 RDB",
-       .probe                  = wsap3715i_probe,
+       .compatible             = "enterasys,ws-ap3715i",
        .setup_arch             = wsap3715i_setup_arch,
        .init_IRQ               = wsap3715i_pic_init,
 #ifdef CONFIG_PCI
index 5a0919c200d66f1862d07a47adc1764fbab5cb88..2c285e0e857138b2ad96227623e13f1d79b06a90 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
-#include <linux/of_platform.h>
 
 #include <asm/time.h>
 #include <asm/machdep.h>
@@ -66,19 +65,9 @@ static void __init ws_ap3825i_setup_arch(void)
 
 machine_arch_initcall(ws_ap3825i, mpc85xx_common_publish_devices);
 
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init ws_ap3825i_probe(void)
-{
-       if (of_machine_is_compatible("extreme-networks,ws-ap3825i"))
-               return 1;
-       return 0;
-}
-
 define_machine(ws_ap3825i) {
        .name                   = "P1020 RDB",
-       .probe                  = ws_ap3825i_probe,
+       .compatible             = "extreme-networks,ws-ap3825i",
        .setup_arch             = ws_ap3825i_setup_arch,
        .init_IRQ               = ws_ap3825i_pic_init,
 #ifdef CONFIG_PCI