Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6936c62571d8dc580725775b628ee73d2ac97b6f
Commit:     6936c62571d8dc580725775b628ee73d2ac97b6f
Parent:     520948796335111cf91970efabca7e5d064db344
Author:     Kumar Gala <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 17 16:19:34 2007 -0600
Committer:  Kumar Gala <[EMAIL PROTECTED]>
CommitDate: Sat Feb 17 16:19:34 2007 -0600

    [POWERPC] 85xx: Cleaning up machine probing
    
    Cleaned up the probing functionality to be more consistent across all 85xx
    boards and actually check to see if we should be running on a given board.
    
    Signed-off-by: Kumar Gala <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/85xx/mpc8568_mds.c |   17 +++--------------
 arch/powerpc/platforms/85xx/mpc85xx_ads.c |    7 +++----
 arch/powerpc/platforms/85xx/mpc85xx_cds.c |    8 +++-----
 3 files changed, 9 insertions(+), 23 deletions(-)

diff --git a/arch/powerpc/platforms/85xx/mpc8568_mds.c 
b/arch/powerpc/platforms/85xx/mpc8568_mds.c
index 324138a..0ba22a4 100644
--- a/arch/powerpc/platforms/85xx/mpc8568_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc8568_mds.c
@@ -74,7 +74,6 @@ static void __init mpc8568_mds_setup_arch(void)
        struct device_node *np;
        static u8 *bcsr_regs = NULL;
 
-
        if (ppc_md.progress)
                ppc_md.progress("mpc8568_mds_setup_arch()", 0);
 
@@ -206,7 +205,6 @@ static void __init mpc8568_mds_pic_init(void)
 
        mpic_init(mpic);
 
-
 #ifdef CONFIG_QUICC_ENGINE
        np = of_find_node_by_type(NULL, "qeic");
        if (!np)
@@ -217,24 +215,15 @@ static void __init mpc8568_mds_pic_init(void)
 #endif                         /* CONFIG_QUICC_ENGINE */
 }
 
-
 static int __init mpc8568_mds_probe(void)
 {
-       char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
-                                         "model", NULL);
-       if (model == NULL)
-               return 0;
-       if (strcmp(model, "MPC8568EMDS"))
-               return 0;
-
-       DBG("MPC8568EMDS found\n");
+        unsigned long root = of_get_flat_dt_root();
 
-       return 1;
+        return of_flat_dt_is_compatible(root, "MPC85xxMDS");
 }
 
-
 define_machine(mpc8568_mds) {
-       .name           = "MPC8568E MDS",
+       .name           = "MPC85xx MDS",
        .probe          = mpc8568_mds_probe,
        .setup_arch     = mpc8568_mds_setup_arch,
        .init_IRQ       = mpc8568_mds_pic_init,
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c 
b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 741bcea..8ed034a 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -272,10 +272,9 @@ static void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
  */
 static int __init mpc85xx_ads_probe(void)
 {
-       /* We always match for now, eventually we should look at the flat
-          dev tree to ensure this is the board we are suppose to run on
-       */
-       return 1;
+        unsigned long root = of_get_flat_dt_root();
+
+        return of_flat_dt_is_compatible(root, "MPC85xxADS");
 }
 
 define_machine(mpc85xx_ads) {
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c 
b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index bf6c604..4232686 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -291,11 +291,9 @@ static void mpc85xx_cds_show_cpuinfo(struct seq_file *m)
  */
 static int __init mpc85xx_cds_probe(void)
 {
-       /* We always match for now, eventually we should look at
-        * the flat dev tree to ensure this is the board we are
-        * supposed to run on
-        */
-       return 1;
+        unsigned long root = of_get_flat_dt_root();
+
+        return of_flat_dt_is_compatible(root, "MPC85xxCDS");
 }
 
 define_machine(mpc85xx_cds) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to