Merge branch 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc
authorLinus Torvalds <torvalds@woody.osdl.org>
Wed, 22 Nov 2006 02:42:44 +0000 (18:42 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Wed, 22 Nov 2006 02:42:44 +0000 (18:42 -0800)
* 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Fix ucc_geth of_device discovery on mpc832x
  [POWERPC] Revert "[POWERPC] Add powerpc get/set_rtc_time interface to new generic rtc class"
  [POWERPC] Revert "[POWERPC] Enable generic rtc hook for the MPC8349 mITX"

arch/powerpc/kernel/time.c
arch/powerpc/platforms/83xx/mpc832x_mds.c
arch/powerpc/platforms/83xx/mpc834x_itx.c
include/asm-powerpc/time.h

index a1b5e4b1615101d448bd52e437b6b7866756fefc..46a24de36fec4bd93acd1fd09983380cf57e5abc 100644 (file)
@@ -1014,48 +1014,6 @@ void __init time_init(void)
        set_dec(tb_ticks_per_jiffy);
 }
 
-#ifdef CONFIG_RTC_CLASS
-static int set_rtc_class_time(struct rtc_time *tm)
-{
-       int err;
-       struct class_device *class_dev =
-               rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE);
-
-       if (class_dev == NULL)
-               return -ENODEV;
-
-       err = rtc_set_time(class_dev, tm);
-
-       rtc_class_close(class_dev);
-
-       return 0;
-}
-
-static void get_rtc_class_time(struct rtc_time *tm)
-{
-       int err;
-       struct class_device *class_dev =
-               rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE);
-
-       if (class_dev == NULL)
-               return;
-
-       err = rtc_read_time(class_dev, tm);
-
-       rtc_class_close(class_dev);
-
-       return;
-}
-
-int __init rtc_class_hookup(void)
-{
-       ppc_md.get_rtc_time = get_rtc_class_time;
-       ppc_md.set_rtc_time = set_rtc_class_time;
-
-       return 0;
-}
-#endif /* CONFIG_RTC_CLASS */
-
 
 #define FEBRUARY       2
 #define        STARTOFTIME     1970
index 54dea9d42dc96bc8724d4757561a2b01e1b24746..a43ac71ab740ab9f851ea0a0f90b0f8450e9b8fd 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/root_dev.h>
 #include <linux/initrd.h>
 
+#include <asm/of_device.h>
 #include <asm/system.h>
 #include <asm/atomic.h>
 #include <asm/time.h>
@@ -136,6 +137,24 @@ static void __init mpc832x_sys_setup_arch(void)
 #endif
 }
 
+static int __init mpc832x_declare_of_platform_devices(void)
+{
+       struct device_node *np;
+
+       for (np = NULL; (np = of_find_compatible_node(np, "network",
+                                       "ucc_geth")) != NULL;) {
+               int ucc_num;
+               char bus_id[BUS_ID_SIZE];
+
+               ucc_num = *((uint *) get_property(np, "device-id", NULL)) - 1;
+               snprintf(bus_id, BUS_ID_SIZE, "ucc_geth.%u", ucc_num);
+               of_platform_device_create(np, bus_id, NULL);
+       }
+
+       return 0;
+}
+device_initcall(mpc832x_declare_of_platform_devices);
+
 void __init mpc832x_sys_init_IRQ(void)
 {
 
index 5446bab08eca6eba4a8354418f6b3baa5f1ba4e8..e2bcaaf6b329338ef48bfb1335709c5c9adbe6d7 100644 (file)
@@ -108,10 +108,6 @@ static int __init mpc834x_itx_probe(void)
        return 1;
 }
 
-#ifdef CONFIG_RTC_CLASS
-late_initcall(rtc_class_hookup);
-#endif
-
 define_machine(mpc834x_itx) {
        .name                   = "MPC834x ITX",
        .probe                  = mpc834x_itx_probe,
index a78285010d62f852674327f09a73fda3b7a69a8b..4cff977ad5266c5129ed5eca9114e38a55d258cf 100644 (file)
@@ -39,10 +39,6 @@ extern void generic_calibrate_decr(void);
 extern void wakeup_decrementer(void);
 extern void snapshot_timebase(void);
 
-#ifdef CONFIG_RTC_CLASS
-extern int __init rtc_class_hookup(void);
-#endif
-
 /* Some sane defaults: 125 MHz timebase, 1GHz processor */
 extern unsigned long ppc_proc_freq;
 #define DEFAULT_PROC_FREQ      (DEFAULT_TB_FREQ * 8)