X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=arch%2Fpowerpc%2Fplatforms%2F83xx%2Fmpc834x_mds.c;h=30d509aa9f082f610d59691e5031f25d78e40e89;hp=00aed7c2269ea4e56cc74950cb3ccf92736d04a8;hb=5c402355adf8f920531f02099f4ec0d2bccd4c64;hpb=37ca506adc395a028cd12760eca419dd0dc14b5c diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c index 00aed7c2269e..30d509aa9f08 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -34,6 +35,7 @@ #include #include #include +#include #include "mpc83xx.h" @@ -106,38 +108,27 @@ static void __init mpc834x_mds_init_IRQ(void) ipic_set_default_priority(); } -#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) -extern ulong ds1374_get_rtc_time(void); -extern int ds1374_set_rtc_time(ulong); +static struct of_device_id mpc834x_ids[] = { + { .type = "soc", }, + { .compatible = "soc", }, + {}, +}; -static int __init mpc834x_rtc_hookup(void) +static int __init mpc834x_declare_of_platform_devices(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; - - tv.tv_nsec = 0; - tv.tv_sec = (ppc_md.get_rtc_time) (); - do_settimeofday(&tv); - + of_platform_bus_probe(NULL, mpc834x_ids, NULL); return 0; } - -late_initcall(mpc834x_rtc_hookup); -#endif +machine_device_initcall(mpc834x_mds, mpc834x_declare_of_platform_devices); /* * Called very early, MMU is off, device-tree isn't unflattened */ static int __init mpc834x_mds_probe(void) { - unsigned long root = of_get_flat_dt_root(); + unsigned long root = of_get_flat_dt_root(); - return of_flat_dt_is_compatible(root, "MPC834xMDS"); + return of_flat_dt_is_compatible(root, "MPC834xMDS"); } define_machine(mpc834x_mds) {