lkml.org 
[lkml]   [2009]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 010/011] sh: add early platform support for earlytimer
From: Magnus Damm <damm@igel.co.jp>

This patch adds early platform "earlytimer" class support.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
---

arch/sh/kernel/time_32.c | 11 +++++++++++
1 file changed, 11 insertions(+)

--- 0017/arch/sh/kernel/time_32.c
+++ work/arch/sh/kernel/time_32.c 2009-01-23 16:41:21.000000000 +0900
@@ -218,6 +218,8 @@ unsigned long long sched_clock(void)

void __init time_init(void)
{
+ int n;
+
if (board_time_init)
board_time_init();

@@ -236,6 +238,15 @@ void __init time_init(void)
* initialized for us.
*/
sys_timer = get_sys_timer();
+
+ /* Make sure all compiled-in early timers register themselves.
+ * Run probe() for one "earlytimer" device.
+ */
+ early_platform_driver_register_all("earlytimer");
+ n = early_platform_driver_probe("earlytimer", 1, 0);
+ if (n)
+ return;
+
if (sys_timer)
pr_info("Using %s for system timer\n", sys_timer->name);
else

\
 
 \ /
  Last update: 2009-01-23 12:05    [W:0.053 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site