diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-02-17 15:10:44 (GMT) |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-02-17 15:10:44 (GMT) |
commit | 336c3c2ec7e24bdf01c8f0c311ac7081b1f73d72 (patch) | |
tree | 516683b63acb2e8c5e7a6541ff2fce3496a33457 /arch/powerpc/platforms/83xx/mpc834x_mds.c | |
parent | 6624b35d6250632497c5943faa2ee2a91344d91c (diff) | |
download | linux-fsl-qoriq-336c3c2ec7e24bdf01c8f0c311ac7081b1f73d72.tar.xz |
[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.c | 10 |
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 d2736da..9fd9adf 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) { |