summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/83xx/mpc832x_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/mpc832x_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/mpc832x_mds.c')
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_mds.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
index 3ecb55f8a6e2..c6bfe72893d4 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -57,11 +57,6 @@ unsigned long isa_mem_base = 0;
static u8 *bcsr_regs = NULL;
-u8 *get_bcsr(void)
-{
- return bcsr_regs;
-}
-
/* ************************************************************************
*
* Setup the architecture
@@ -140,6 +135,9 @@ static int __init mpc832x_declare_of_platform_devices(void)
{
struct device_node *np;
+ if (!machine_is(mpc832x_mds))
+ return 0;
+
for (np = NULL; (np = of_find_compatible_node(np, "network",
"ucc_geth")) != NULL;) {
int ucc_num;
@@ -189,6 +187,9 @@ static int __init mpc832x_rtc_hookup(void)
{
struct timespec tv;
+ if (!machine_is(mpc832x_mds))
+ return 0;
+
ppc_md.get_rtc_time = ds1374_get_rtc_time;
ppc_md.set_rtc_time = ds1374_set_rtc_time;
@@ -207,17 +208,9 @@ late_initcall(mpc832x_rtc_hookup);
*/
static int __init mpc832x_sys_probe(void)
{
- char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
- "model", NULL);
-
- if (model == NULL)
- return 0;
- if (strcmp(model, "MPC8323EMDS"))
- return 0;
-
- DBG("%s found\n", model);
+ unsigned long root = of_get_flat_dt_root();
- return 1;
+ return of_flat_dt_is_compatible(root, "MPC832xMDS");
}
define_machine(mpc832x_mds) {