aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/83xx/mpc834x_mds.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2007-02-17 09:10:44 -0600
committerKumar Gala <galak@kernel.crashing.org>2007-02-17 09:10:44 -0600
commit336c3c2ec7e24bdf01c8f0c311ac7081b1f73d72 (patch)
tree516683b63acb2e8c5e7a6541ff2fce3496a33457 /arch/powerpc/platforms/83xx/mpc834x_mds.c
parent6624b35d6250632497c5943faa2ee2a91344d91c (diff)
[POWERPC] 83xx: Cleaning up machine probing and board initcalls
Cleaned up the probing functionality to be more consistent across all 83xx boards and added machine_is() protection around board initcalls to ensure they only do something if we are actually running on that board. Additionally, removed some dead code on mpc832x_mds. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/83xx/mpc834x_mds.c')
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_mds.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c
index d2736da76c4..9fd9adf8ff9 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
@@ -176,6 +176,9 @@ static int __init mpc834x_rtc_hookup(void)
{
struct timespec tv;
+ if (!machine_is(mpc834x_mds))
+ return 0;
+
ppc_md.get_rtc_time = ds1374_get_rtc_time;
ppc_md.set_rtc_time = ds1374_set_rtc_time;
@@ -194,10 +197,9 @@ late_initcall(mpc834x_rtc_hookup);
*/
static int __init mpc834x_mds_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, "MPC834xMDS");
}
define_machine(mpc834x_mds) {