Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146687
b: refs/heads/master
c: 8e0b842
h: refs/heads/master
i:
  146685: 387aa65
  146683: 07c7307
  146679: b74d01b
  146671: eb0674a
  146655: d502694
  146623: de07098
  146559: 2e61035
  146431: 943ba7b
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Apr 28, 2009
1 parent 1b24ea2 commit d910d3f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b644c7a218702668d7b610994e7dcbc3d4705d3
refs/heads/master: 8e0b842948156e3463879caed12b4ce51bed772e
34 changes: 20 additions & 14 deletions trunk/arch/sh/kernel/time_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,21 +237,8 @@ unsigned long long sched_clock(void)
}
#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.
Expand All @@ -270,3 +257,22 @@ void __init time_init(void)

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;
}

13 changes: 2 additions & 11 deletions trunk/drivers/clocksource/sh_cmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/

#include <linux/init.h>
#include <linux/bootmem.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
Expand Down Expand Up @@ -645,23 +644,15 @@ static int __devinit sh_cmt_probe(struct platform_device *pdev)
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;
Expand Down

0 comments on commit d910d3f

Please sign in to comment.