}
#endif
-void __init time_init(void)
+static void __init sh_late_time_init(void)
{
- if (board_time_init)
- board_time_init();
-
- clk_init();
-
- rtc_sh_get_time(&xtime);
- set_normalized_timespec(&wall_to_monotonic,
- -xtime.tv_sec, -xtime.tv_nsec);
-
-#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
- local_timer_setup(smp_processor_id());
-#endif
-
/*
* Make sure all compiled-in early timers register themselves.
* Run probe() for one "earlytimer" device.
printk(KERN_INFO "Using %s for system timer\n", sys_timer->name);
}
+
+void __init time_init(void)
+{
+ if (board_time_init)
+ board_time_init();
+
+ clk_init();
+
+ rtc_sh_get_time(&xtime);
+ set_normalized_timespec(&wall_to_monotonic,
+ -xtime.tv_sec, -xtime.tv_nsec);
+
+#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
+ local_timer_setup(smp_processor_id());
+#endif
+
+ late_time_init = sh_late_time_init;
+}
+
*/
#include <linux/init.h>
-#include <linux/bootmem.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
return 0;
}
- if (is_early_platform_device(pdev))
- p = alloc_bootmem(sizeof(*p));
- else
- p = kmalloc(sizeof(*p), GFP_KERNEL);
-
+ p = kmalloc(sizeof(*p), GFP_KERNEL);
if (p == NULL) {
dev_err(&pdev->dev, "failed to allocate driver data\n");
return -ENOMEM;
ret = sh_cmt_setup(p, pdev);
if (ret) {
- if (is_early_platform_device(pdev))
- free_bootmem(__pa(p), sizeof(*p));
- else
- kfree(p);
-
+ kfree(p);
platform_set_drvdata(pdev, NULL);
}
return ret;