[<prev] [next>] [day] [month] [year] [list]
Message-ID: <85e7c2fc0612040118r36f3ff9cw82a93ac2b7b53ad8@mail.gmail.com>
Date: Mon, 4 Dec 2006 17:18:54 +0800
From: "zhang bob" <zhanglinbao@...il.com>
To: linux-kernel@...r.kernel.org
Subject: About watch dog timer limit of CPU (Xscale ->IXP425) How can I set more long time ?
Hello all ,
My embeded board hardware configuration is like this :
# cat /proc/cpuinfo
Processor : XScale-IXP425/IXC1100 rev 1 (v5b)
BogoMIPS : 266.24
Features : swp half thumb fastmult edsp
Hardware : Intel IXDP425 Development Platform
Revision : 0000
Serial : 0000000000000000
Through reading datasheet of ixp4xx ,I know it has own watchdog functions ,
please see attchment :15 Timer
I find a driver by goole ,
see attachment .
Watchdog timer counter is 32 bit register , its max value is 2<<32 -1
#define TIMER_FREQ 66000000 /* 66 MHZ timer */
#define TIMER_KEY 0x482e
#define TIMER_MARGIN 60 /* (secs) Default is 1 minute */
//I want to modify it ,I find its max value is 65
static int ixp425_margin = TIMER_MARGIN; /* in seconds */
static int ixp425wdt_users;
//static int pre_margin; //IXP425 CPU 's watch dog timer is 32 bit ,
//so I define it to be unsigned int --bob
static unsigned int pre_margin;
pre_margin = TIMER_FREQ * TIMER_MARGIN
*IXP425_OSWT = pre_margin;
if I need one minutes ,
*IXP425_OSWT = 66000000 * 60 = 396000000 ,not overflow
if I need two minutes ,
*IXP425_OSWT = 66000000 * 120 = 792000000 ( which has been > 2<<32-1
, overflow
So I compute the max time I can set :
T_max = 2<<32-1 / 66000000 = 65 seconds 。
--------------------
My question:
if need more seconds ( for example , 5 minutes ) ,what should I do ?
I have a method based on datasheet (ixp4xx) ,but I don't know if it
will successed when system crash
How can I do to break the limit of hardware ?
Thanks ahead !
--
Best Regards
bob
Download attachment "ixp425_wdt.c" of type "application/octet-stream" (6905 bytes)
Powered by blists - more mailing lists