linux/drivers/watchdog/mpc8xxx_wdt.c
<<
alue2alue2al//spav4.al/spav class="lxr_search">aluealue2alue2alue2typ Searchalue2al//spav4.ue2< al/input typ aue2< . /div id < <1//a>/spav class="comment">/*//spav4.< <2//a>/spav class="comment"> * mpc8xxx_wdt.c - MPC8xx/MPC83xx/MPC86xx watchdog userspace interface//spav4.< <3//a>/spav class="comment"> *//spav4.< <4//a>/spav class="comment"> * Authors: Dave Updegraff <dave@cray.org>//spav4.< <5//a>/spav class="comment"> * Kumar Gala <galak@kernel.crashing.org>//spav4.< <6//a>/spav class="comment"> * Attribut v: from 83xx_wst: Floriav Schirmer <jolt@tuxbox.org>//spav4.< <7//a>/spav class="comment"> * ..and from sc520_wdt//spav4.< <8//a>/spav class="comment"> * Copyright (c) 2008 MontaVista Software, Inc.//spav4.< <9//a>/spav class="comment"> * Anton>Vorontsov <avorontsov@ru.mvista.com>//spav4.< " a>/spav class="comment"> *//spav4.< 11//a>/spav class="comment"> * Note: it appears that you cav only ac ually ENABLE or DISABLE the thing//spav4.< 12//a>/spav class="comment"> * once after POR. Once enabled, you cavnot disable, and vice versa.//spav4.< 13//a>/spav class="comment"> *//spav4.< 14//a>/spav class="comment"> * This program is free software; you cav redistribute it and/or modify it//spav4.< 15//a>/spav class="comment"> * under the terms of the GNU General2< 16//a>/spav class="comment"> * Free Software Foundat v; either version>2 of the License, or (at your//spav4.< 17//a>/spav class="comment"> * > v) any later version.//spav4.< 18//a>/spav class="comment"> *///spav4.< 19//a>.< 2 a>#definepr_fmt a>(/a href="+code=fmt" class="sref">fmt a>)KBUILD_MODNAME a> /spav class="string">": "//spav4fmt a>.< 21 a>.< 22//a>#include <linux/fs.h//a>>.< 23//a>#include <linux/init.h//a>>.< 24//a>#include <linux/kernel.h//a>>.< 25//a>#include <linux/timer.h//a>>.< 26//a>#include <linux/miscdevice.h//a>>.< 27//a>#include <linux/of_platform.h//a>>.< 28//a>#include <linux/module.h//a>>.< 29//a>#include <linux/watchdog.h//a>>.< 30//a>#include <linux/io.h//a>>.< 31//a>#include <linux/uaccess.h//a>>.< 32//a>#include <sysdev/fsl_soc.h//a>>.< 33 a>.< 34//a>structmpc8xxx_wdt a> {.< 35//a> /a href="+code=__be32" class="sref">__be32 a> /a href="+code=res0" class="sref">res0 a>;.< 36//a> /a href="+code=__be32" class="sref">__be32 a> /a href="+code=swcrr" class="sref">swcrr a>; /spav class="comment">/* System watchdog control register *///spav4.< 37 a>#defineSWCRR_SWTC a> 0xFFFF0000 /spav class="comment">/* Software Watchdog Time Count. *///spav4.< 38 a>#defineSWCRR_SWEN a> 0x00000004 /spav class="comment">/* Watchdog Enable bit. *///spav4.< 39 a>#defineSWCRR_SWRI a> 0x00000002 /spav class="comment">/* Software Watchdog Reset/Interrupt Select bit.*///spav4.< 4 a>#defineSWCRR_SWPR a> 0x00000001 /spav class="comment">/* Software Watchdog Counter Prescale bit. *///spav4.< 41//a> /a href="+code=__be32" class="sref">__be32 a> /a href="+code=swcnr" class="sref">swcnr a>; /spav class="comment">/* System watchdog count register *///spav4.< 42//a> /a href="+code=u8" class="sref">u8 a> /a href="+code=res1" class="sref">res1//a>[2];.< 43//a> /a href="+code=__be16" class="sref">__be16//a> /a href="+code=swsrr" class="sref">swsrr a>; /spav class="comment">/* System watchdog service register *///spav4.< 44//a> /a href="+code=u8" class="sref">u8 a> /a href="+code=res2" class="sref">res2//a>[0xF0];.< 45//a>};.< 46 a>.< 47//a>structmpc8xxx_wdt_typ a> {.< 48//a> intprescaler a>;.< 49//a> /a href="+code=bool" class="sref">bool a> /a href="+code=hw_enabled" class="sref">hw_enabled a>;.< 50//a>};.< 51 a>.< 52//a>static structmpc8xxx_wdt a> /a href="+code=__iomem" class="sref">__iomem a> */a href="+code=wd_bas " class="sref">wd_bas a>;.< 53//a>static intmpc8xxx_wdt_init_late a>(void);.< 54 a>.< 55//a>static /a href="+code=u16" class="sref">u16//a> /a href="+code=timeout" class="sref">timeout//a> = 0xffff;.< 56//a>/a href="+code=module_param" class="sref">module_param a>(/a href="+code=timeout" class="sref">timeout//a>, /a href="+code=ushort" class="sref">ushort//a>, 0);.< 57//a>/a href="+code=MODULE_PARM_DESC" class="sref">MODULE_PARM_DESC a>(/a href="+code=timeout" class="sref">timeout//a>,.< 58//a> /spav class="string">"Watchdog timeout in ticks. (0<timeout<65536, default=65535)"//spav4);.< 59//a>.< 60//a>static /a href="+code=bool" class="sref">bool a> /a href="+code=reset" class="sref">reset//a> = 1;.< 61//a>/a href="+code=module_param" class="sref">module_param a>(/a href="+code=reset" class="sref">reset//a>, /a href="+code=bool" class="sref">bool a>, 0);.< 62//a>/a href="+code=MODULE_PARM_DESC" class="sref">MODULE_PARM_DESC a>(/a href="+code=reset" class="sref">reset//a>,.< 63//a> /spav class="string">"Watchdog Interrupt/Reset Mode. 0 = interrupt, 1 = reset"//spav4);.< 64 a>.< 65//a>static /a href="+code=bool" class="sref">bool a> /a href="+code=nowayout" class="sref">nowayout//a> = /a href="+code=WATCHDOG_NOWAYOUT" class="sref">WATCHDOG_NOWAYOUT a>;.< 66//a>/a href="+code=module_param" class="sref">module_param a>(/a href="+code=nowayout" class="sref">nowayout//a>, /a href="+code=bool" class="sref">bool a>, 0);.< 67//a>/a href="+code=MODULE_PARM_DESC" class="sref">MODULE_PARM_DESC a>(/a href="+code=nowayout" class="sref">nowayout//a>, /spav class="string">"Watchdog cavnot be stopped once started "//spav4.< 68//a> /spav class="string">"(default="//spav4__MODULE_STRING a>(/a href="+code=WATCHDOG_NOWAYOUT" class="sref">WATCHDOG_NOWAYOUT a>) /spav class="string">")"//spav4);.< 69//a>.< 7 a>/spav class="comment">/*//spav4.< 71//a>/spav class="comment"> * We always prescale, but if someone really doesn't want< 72//a>/spav class="comment"> * to 0//spav4.< 73//a>/spav class="comment"> *///spav4.< 74//a>static intprescale//a> = 1;.< 75//a>static unsigned inttimeout_sec a>;.< 76 a>.< 77//a>static unsigned longwdt_is_open a>;.< 78//a>static /a href="+code=DEFINE_SPINLOCK" class="sref">DEFINE_SPINLOCK a>(/a href="+code=wdt_spinlock" class="sref">wdt_spinlock a>);.< 79//a>.< 80//a>static voidmpc8xxx_wdt_keepalive a>(void).< 81//a>{.< 82//a> /spav class="comment">/* Ping the WDT *///spav4.< 83//a> /a href="+code=spin_lock" class="sref">spin_lock a>(&/a href="+code=wdt_spinlock" class="sref">wdt_spinlock a>);.< 84//a> /a href="+code=out_be16" class="sref">out_be16 a>(&/a href="+code=wd_bas " class="sref">wd_bas a>->/a href="+code=swsrr" class="sref">swsrr a>, 0x556c);.< 85//a> /a href="+code=out_be16" class="sref">out_be16 a>(&/a href="+code=wd_bas " class="sref">wd_bas a>->/a href="+code=swsrr" class="sref">swsrr a>, 0xaa39);.< 86//a> /a href="+code=spin_unlock" class="sref">spin_unlock a>(&/a href="+code=wdt_spinlock" class="sref">wdt_spinlock a>);.< 87//a>}.< 88//a>.< 89//a>static voidmpc8xxx_wdt_timer_ping a>(unsigned longarg a>);.< 90//a>static /a href="+code=DEFINE_TIMER" class="sref">DEFINE_TIMER a>(/a href="+code=wdt_timer" class="sref">wdt_timer//a>, /a href="+code=mpc8xxx_wdt_timer_ping" class="sref">mpc8xxx_wdt_timer_ping a>, 0, 0);.< 91 a>.< 92//a>static voidmpc8xxx_wdt_timer_ping a>(unsigned longarg a>).< 93//a>{.< 94//a> /a href="+code=mpc8xxx_wdt_keepalive" class="sref">mpc8xxx_wdt_keepalive a>();.< 95//a> /spav class="comment">/* We're pinging it twice faster thav needed, just< 96//a> /a href="+code=mod_timer" class="sref">mod_timer a>(&/a href="+code=wdt_timer" class="sref">wdt_timer//a>, /a href="+code=jiffies" class="sref">jiffies//a> + /a href="+code=HZ" class="sref">HZ a> *timeout_sec a> / 2);.< 97//a>}.< 98//a>.< 99//a>static voidmpc8xxx_wdt_pr_warn a>(constmsg a>).<100//a>{.<101//a> /a href="+code=pr_crit" class="sref">pr_crit a>(/spav class="string">"%s, expect the %s soon!\n"//spav4, /a href="+code=msg" class="sref">msg a>,.<102//a> /a href="+code=reset" class="sref">reset//a> ? /spav class="string">"reset"//spav4 : /spav class="string">"machine v"//spav4);.<103//a>}.<104 a>.<105//a>static /a href="+code=ssize_t" class="sref">ssize_t a> /a href="+code=mpc8xxx_wdt_write" class="sref">mpc8xxx_wdt_write a>(structfile a> */a href="+code=file" class="sref">file a>, const__user a> */a href="+code=buf" class="sref">buf a>,.<106//a> /a href="+code=size_t" class="sref">size_t a> /a href="+code=count" class="sref">count//a>, /a href="+code=loff_t" class="sref">loff_t a> */a href="+code=ppos" class="sref">ppos a>).<107//a>{.<108//a> if (/a href="+code=count" class="sref">count//a>).<109//a> /a href="+code=mpc8xxx_wdt_keepalive" class="sref">mpc8xxx_wdt_keepalive a>();.<1" a> return /a href="+code=count" class="sref">count//a>;.<111//a>}.<112//a>.<113//a>static intmpc8xxx_wdt_open a>(structinode a> */a href="+code=inode" class="sref">inode a>, structfile a> */a href="+code=file" class="sref">file a>).<114//a>{.<115//a> /a href="+code=u32" class="sref">u32 a> /a href="+code=tmp" class="sref">tmp//a> = /a href="+code=SWCRR_SWEN" class="sref">SWCRR_SWEN a>;.<116//a> if (/a href="+code=test_and_set_bit" class="sref">test_and_set_bit a>(0, &/a href="+code=wdt_is_open" class="sref">wdt_is_open a>)).<117//a> return -/a href="+code=EBUSY" class="sref">EBUSY a>;.<118//a>.<119//a> /spav class="comment">/* Once we start the watchdog we can't stop it *///spav4.<120//a> if (/a href="+code=nowayout" class="sref">nowayout//a>).<121//a> /a href="+code=__module_get" class="sref">__module_get a>(/a href="+code=THIS_MODULE" class="sref">THIS_MODULE a>);.<122//a>.<123//a> /spav class="comment">/* Good, fire up the show *///spav4.<124//a> if (/a href="+code=prescale" class="sref">prescale//a>).<125//a> /a href="+code=tmp" class="sref">tmp//a> |= /a href="+code=SWCRR_SWPR" class="sref">SWCRR_SWPR a>;.<126//a> if (/a href="+code=reset" class="sref">reset//a>).<127//a> /a href="+code=tmp" class="sref">tmp//a> |= /a href="+code=SWCRR_SWRI" class="sref">SWCRR_SWRI a>;.<128//a>.<129//a> /a href="+code=tmp" class="sref">tmp//a> |= /a href="+code=timeout" class="sref">timeout//a> << 16;.<130//a>.<131//a> /a href="+code=out_be32" class="sref">out_be32 a>(&/a href="+code=wd_bas " class="sref">wd_bas a>->/a href="+code=swcrr" class="sref">swcrr a>, /a href="+code=tmp" class="sref">tmp//a>);.<132//a>.<133//a> /a href="+code=del_timer_sync" class="sref">del_timer_sync a>(&/a href="+code=wdt_timer" class="sref">wdt_timer//a>);.<134 a>.<135//a> return /a href="+code=nonseekable_open" class="sref">nonseekable_open a>(/a href="+code=inode" class="sref">inode a>, /a href="+code=file" class="sref">file a>);.<136//a>}.<137 a>.<138//a>static intmpc8xxx_wdt_releas a>(structinode a> */a href="+code=inode" class="sref">inode a>, structfile a> */a href="+code=file" class="sref">file a>).<139 a>{.<140//a> if (!/a href="+code=nowayout" class="sref">nowayout//a>).<141//a> /a href="+code=mpc8xxx_wdt_timer_ping" class="sref">mpc8xxx_wdt_timer_ping a>(0);.<142//a> else.<143//a> /a href="+code=mpc8xxx_wdt_pr_warn" class="sref">mpc8xxx_wdt_pr_warn a>(/spav class="string">"watchdog closed"//spav4);.<144//a> /a href="+code=clear_bit" class="sref">clear_bit a>(0, &/a href="+code=wdt_is_open" class="sref">wdt_is_open a>);.<145//a> return 0;.<146//a>}.<147 a>.<148//a>static longmpc8xxx_wdt_ioctl a>(structfile a> */a href="+code=file" class="sref">file a>, unsigned intcmd a>,.<149//a> unsigned longarg a>).<150//a>{.<151//a> void__user a> */a href="+code=argp" class="sref">argp//a> = (void__user a> *)/a href="+code=arg" class="sref">arg a>;.<152//a> int__user a> */a href="+code=p" class="sref">p//a> = /a href="+code=argp" class="sref">argp//a>;.<153//a> static constwatchdog_info a> /a href="+code=ident" class="sref">ident//a> = {.<154//a> ./a href="+code=o> vs" class="sref">o> vs//a> = /a href="+code=WDIOF_KEEPALIVEPING" class="sref">WDIOF_KEEPALIVEPING a>,.<155//a> ./a href="+code=firmware_vers v" class="sref">firmware_vers v//a> = 1,.<156//a> ./a href="+code=identity" class="sref">identity//a> = /spav class="string">"MPC8xxx"//spav4,.<157//a> };.<158//a>.<159//a> switch (/a href="+code=cmd" class="sref">cmd a>) {.<160//a> cas /a href="+code=WDIOC_GETSUPPORT" class="sref">WDIOC_GETSUPPORT//a>:.<161//a> return /a href="+code=copy_to_user" class="sref">copy_to_user a>(/a href="+code=argp" class="sref">argp//a>, &/a href="+code=ident" class="sref">ident//a>, sizeof(/a href="+code=ident" class="sref">ident//a>)) ? -/a href="+code=EFAULT" class="sref">EFAULT//a> : 0;.<162//a> cas /a href="+code=WDIOC_GETSTATUS" class="sref">WDIOC_GETSTATUS//a>:.<163//a> cas /a href="+code=WDIOC_GETBOOTSTATUS" class="sref">WDIOC_GETBOOTSTATUS//a>:.<164//a> return /a href="+code=put_user" class="sref">put_user a>(0, /a href="+code=p" class="sref">p//a>);.<165//a> cas /a href="+code=WDIOC_KEEPALIVE" class="sref">WDIOC_KEEPALIVE//a>:.<166//a> /a href="+code=mpc8xxx_wdt_keepalive" class="sref">mpc8xxx_wdt_keepalive a>();.<167//a> return 0;.<168//a> cas /a href="+code=WDIOC_GETTIMEOUT" class="sref">WDIOC_GETTIMEOUT//a>:.<169//a> return /a href="+code=put_user" class="sref">put_user a>(/a href="+code=timeout_sec" class="sref">timeout_sec a>, /a href="+code=p" class="sref">p//a>);.<170//a> default:.<171//a> return -/a href="+code=ENOTTY" class="sref">ENOTTY//a>;.<172//a> }.<173//a>}.<174 a>.<175//a>static constfile_opera vs a> /a href="+code=mpc8xxx_wdt_fops" class="sref">mpc8xxx_wdt_fops//a> = {.<176//a> ./a href="+code=owner" class="sref">owner//a> = /a href="+code=THIS_MODULE" class="sref">THIS_MODULE a>,.<177//a> ./a href="+code=llseek" class="sref">llseek//a> = /a href="+code=no_llseek" class="sref">no_llseek a>,.<178//a> ./a href="+code=write" class="sref">write a> = /a href="+code=mpc8xxx_wdt_write" class="sref">mpc8xxx_wdt_write a>,.<179//a> ./a href="+code=unlocked_ioctl" class="sref">unlocked_ioctl//a> = /a href="+code=mpc8xxx_wdt_ioctl" class="sref">mpc8xxx_wdt_ioctl a>,.<180//a> ./a href="+code=open" class="sref">open a> = /a href="+code=mpc8xxx_wdt_open" class="sref">mpc8xxx_wdt_open a>,.<181//a> ./a href="+code=releas " class="sref">releas a> = /a href="+code=mpc8xxx_wdt_releas " class="sref">mpc8xxx_wdt_releas a>,.<182//a>};.<183 a>.<184//a>static structmiscdevice a> /a href="+code=mpc8xxx_wdt_miscdev" class="sref">mpc8xxx_wdt_miscdev//a> = {.<185//a> ./a href="+code=minor" class="sref">minor//a> = /a href="+code=WATCHDOG_MINOR" class="sref">WATCHDOG_MINOR a>,.<186//a> ./a href="+code=nam " class="sref">nam OG_MINO= /spav class="string">&qode=nam " id < 66//a>/a 2pf="drC MODU"lass="sref">WATCC2d2di >1_49" class,68xx=llseek" class=""sref">WATCC2d2di ss="line" nam < 66//a>/a 2pf=" class="string">&qode=nam " id 1_49" class,68xx=llseek1="lin18">wdt_spinlock a>);.a4 a>.<18hreftatic struct /a href="+code=u8" class="sr1_timer_pi1ng" class="sref">mpc8xxx1_wdt_1imer_p37"><137 a>.<148//a>sss="line_chdog/mpc8xxx_wdt.c#Lss="line_chdog/152" id static structs mpc8xxx_w1dt.c#L91" id miscdevice a> /a href="+code=mp a>(unsi1gned long.<1" a> pc8xxx_wd1t.c#L93" id < 4 a>.static voidhreftatic struct<1" a> p8xxx_wdt_eepalive" class="sref">m1pc8xx1_wdt_keepalivempc8xxx_wd id static voinr" class="sref">n2"><152//a> intstatic structs href="+code=out_be3a>static structs a>,.mpc8xxx_wdif_s="s184"id <1" a> pef="+codewice faster thav needed,1 just1to be sure. */4 a>.static voiline"tchdog/mpc8xxx_wdtid <1" a> pOG_MINO= ode=timeout_sec" class="1sref"19 id ,.< 66//a>/a 2pf=req"><152//a> int<" clget_sys_freq>< 66//a>/a 2pf= clget_sys_freqL166"><166//a> /a href="+code=mpc8xpc8xxx_wd1t.c#L97" id ,. /a href="+code=bool" class="sref">bool1mpc8xxx_w1dt.c#L98" id *///spav4.,. int<18hreftatic structstatic structs ><166//a> /a href="+code=mpc82xx_wdt.c#2100" id <100/ a>{.msg a>,. /a href="+code=bool" class="sref">bool2class="st2ing">"machine20 <132//a>.bool2cef="inclu103" id <103//a>}.<100/ a>{.<15||dt.c#L115" id < 66//a>/a 2pf=req"><152= -1 2!="includeer a> */a href="+code=b2f" cl2ss="sref">buf a>,. /a href="+code=bool" class="sref">bool2clinux/mis a> */a href="+code=ppo2" cla20 <146//a>}.,.<131//a> /a52//a> intofeiomarclass="line" nam n2"><1sref">wdt_timer//a>, /a href="+code=mpc8xxx_wdt2a> 2if (/a href="+code=count2 clas2="sref">count/ a>{.<131//a> /a 2xx_wdt_ke2palive" class="sref">mpc2xxx_w2t_keepalive a a>,. /a href="+code=bool" class="sref">bool2 re2urn /a href="+code=count2 clas21mer_ping a>, 0, 0);. 52//a> int<131//a> /a href="+code=out_be32" class="sref">out_be32 a>()/a hre5"><115//a> /a href="+code=u32" class="sref">u32 a> /a href="+code=tmp" class="sref">tmp//2xxx_wdt.c2L112" id count/ a>{. 5a hrea hre5"><115//a> line"tchdog/mpc8xxx_wdtid < 49//a> 9" id <159//a2sref">fil2 a> */a href="+code=fil2" cla21ETBOOTSTATUS//a>:.<148//a>ssrc#L153" id #defi\a> ? /spav class="string">"reset"//spav4 : /spav2xx_wdt.c#2114" id <114//a>:.<148//a>srwatchdog/mpc8xxx_wd110" 52/rivers/watchdog/mNOSY_wdt.c#L163" id mNOSY_>u32 a> /a href="+code=tmp" class="sref">tmp//2x="includef="+code=SWCRR_SWEN" cla2s="sr21s="sref">buf a>,. rr_unmar>u32 a> /a href="+code=tmp" class="sref">tmp//2xlinux/mis+code=wdt_is_open" class2"sref2>wdt_is_open /a> }.EBUSY a>;.<118//a>.<123//a> 2* Once we2start the watchdog we ca2'2 stop it *///spav4.<124//a> 2 if (/2 href="+code=nowayout" c2ass="2ref">nowayout//a>).jiffies//a=>;.<129//a_timer//a>, /a hrline"tchdog/mpc8xxx_wdtid < 66//a>/a 2pf=req"><1 a> /a href="+code=tmp" class="sref">tmp//2(/a href=2+code=THIS_MODULE" class2"sref22imer_ping a>(0);. else.jiffies//a=>.<129//a/dt.c#L115" id < 66//a>/a 2pf=req"><1 a> /a href="+code=tmp" class="sref">tmp//2(ref">fil2ass="comment">/* Good, f2re up22 <103//a>}.p#ifdefdt.c#L115" id <176//a> /a href="+3"><103//a>}.<179//a>og/mpc8xxx_wdt.c#L53" id "reset"//spav4 : /spav2a> 2if (/a href="+code=reset2 clas2="sref">reset/ a>;.<124//a> 2 ret2f="+code=SWCRR_SWRI" cla2s="sr22tarted "//spav4.goto///spav4. rr_unmar>u32 a> /a href="+code=tmp" class="sref">tmp//2xxx_wdt.c2L128" id /a href="+code=tmp" class="sref">tmp//2 href="+c2de=timeout" class="sref"2timeo2t//a> << 16;.<130//a>. s="lialized. mf=": 129"><1= d ( d seconds)ef="+code=pr_cri<< 16;.msg a>,.<102//a> /a href="+code=resetclass="li="+code=pr_crit" class="sref">s="line" nam < 56//a>/a href="+code=module_ef="+code=jiffies" class="sref">jiffies//ss="string">"reset"//spav4 : /spav2xxx_wdt.c2L132" id <182//a>};.< 69//a>. * to 0//spav4. 2136" id * to 0//spav4. * to 0//spav4.<123//a> 2sref">fil2 a> */a href="+code=fil2" cla23"sref">count/ a>{ <124//a> 2xx_wdt.c#2139" id ,.<141//a> /a href="+code=mpc8xxx2 if (!/2 href="+code=nowayout" c2ass="2ref">nowayout/href="drivers/watchdog/mpc8xxx_wdt.c#L167" id mpc8x2x_wdt24"sref">bool a>, 0); rr_unmar" class="sref"> rr_unmar>u32 href="drivers/watchdog/mpc8xxx_wdt.c#L170"242" id <24 <132//a>.iounmarclass="line" nam <131//a> /a ivers/watchdog/mpc8xxx_wdt.c#L167" id "watch2og cl2sed"//spav4);.<131//a> /a52//a> intu32 a> /a href="+code=tmp" class="sref">tmp//2;/a href=2+code=wdt_is_open" class2"sref2>wdt_is_open a>);..<1" a>2d 2145//2> return 0;.<146//a>}.<137 a>.<148//a>sss="line_chdog/mpc8xxx_wdt.c#Lss="line_chdog/152" id static structs 2 a>, unsi2ned intfile a>).,.<143//a> /a href/mmo.cde=mpc8xxx_wdt_pr_warn" class="sref">mpc8xxx_wdt_pr_warn 2xx_wdt.c#2150" id <130//a>.<133//a> /a href="+code=del_timer_sync" class="sref">del_timer_sync a>2ref">__us2r a> *)/a href="+code=a2g" cl25t register *///spav4.<184//a>static structdel_timer_sync a>2r2" id = /a href="+code=arg2" cla25 <132//a>.iounmarclass="line" nam <131//a> /a ivers/watchdog/mpc8xxx_wdt.c#L167" id <103//a>}.);.2irmwa25 return 0;.&q2ot;MP25 <146//a>}.<134 a>.<18hreftatic structmiscdevice a> /a href="+code=m2xxx_wdt.c2L158" id <158lass="sref">miscdevice a> /a href="+code=m2 s2itch (/a href="+code=cmd2 clas26_keepalive a a>,.,.WD2OC_GETSUPPORT//a>:.,.<148//a>s class="line"tchdog/mpc8xxx_wdt.c#L47" id <159//a2a>)) ? -/2 href="+code=EFAULT" cla2s="sr26s="sref">msg a>,.:.,.W262//a> else.(0, /a href="+cod2=p" c2ass="sref">p// id <159//a2ae=firmwa2DIOC_KEEPALIVE" class="s2ef">W2IOC_KEEPALIVE//a>:.,. 2palive" class="sref">mpc2xxx_w2t_keepalive a>();.,.<148//a>s class="line"tchdog/mpc8xxx_wdt.c#L47" id <159//a2a157" id 2ne" nam <167//a>2 26tarted "//spav4./a>:.,.WD2OC_GETTIMEOUT//a>:.:.,.< 49//a> a=>.timeo2t_sec a>, /a href="+cod2=p" c27_keepalive a a>,. defa}i<< 16;.ENOTTY/ id <159//a2#L172" id2 else.,.ident//a> = {.<148//a>s class="line"tchdog/mpc8xxx_wdt.c#L47" id <159//a2xxx_wdt.c2L174" id <114//a>:.:.,.:.THIS_MODULE }i<< 16;.no_llseek {}i<< 16;.mpc2xxx_wd/a 2pf=" class="string">&qode=nam " id mpc2xxx_wdt.c#L115" id <176//a> /a hre_DEVICE_TAB17class="line" nam ofa href="+code=module_m <18hreftatic structmp28mer_ping a>, 0, 0);.<183 a>.<1c 0);.mpc8xxx_wdt.c#Lm <1c 0);. id =mi id <159//a2x_wdt.c#L282" id a>,.<179//aproba> ./a href="+code=reprobalinei<< 16;. a>,.:.<179//a/mmo.c#L166" id mp28xxx_2dt_miscdev//a> = {.<159//a2xde=mpc8x2=WATCHDOG_MINOR" class="2ref">28OC_KEEPALIVE//a>:.,.&qo2e=nam28_keepalive a>();.,.<176//a> ./a href="+code=owner" class="sref">owner//a> 2f">WATCC222di ss="line" nam <266"><28tarted "//spav4. a>,.<179//a8hreftatic structowner//a> 2fxx_wdt.c2>1_49" class,68xx=llseek2="lin289THIS_MODULE }i<< 16;.&qode=nam " id mpc8xxx2_wdt_29mer_ping a>, 0, 0);.< 69//a>.(unsi2gned long * to 0//spav4. * to 0//spav4.m2pc8xx29 * to 0//spav4. * to 0//spav4.<123//a> 2pOG_MINO=2ode=timeout_sec" class="2sref"29 id <37"><137 a>.<159//a2mpc8xxx_w2dt.c#L98" id count/ a>.<1" a>3ppc8xxx_w3tt.c#L19" id << 16;.<100/ a>{.<131//a> /a 3!\n"3/spav4, /a href="+code=m3g" cl3ss="sref">msg a>,.<131//amNODEV10" id <1" a>3p3n"3/ned long<182//a>};.<184//a>static structdel_timer_sync a>3xxx_wdt.c3L104" id <100/ a>{v4);.<159//a3!="includ3er a> */a href="+code=b3f" cl3ss="sref">buf a>,.,.out_iv_eclm <143//a> canM_DEregid ();.,.,.<185//a> ./a href="av4);.del_timer_sync a>3x8inux/mi3 .c#L97" id );..<1" a>3a> 3if (/a href="+code=count3 clas3="sref">count/ return 0;.mpc3xxx_w3t_keepalive aa>);.<176//a> /a href="+3"><103//a>}.og/mpc8xxx_wdt.c#L53" id del_timer_sync a>3sref">fil3 a> */a href="+code=fil3" cla31ETBOO#endif a> /a href="+code=tmp" class="sref">tmp//3xx_wdt.c#3114" id /a href="+code=tmp" class="sref">tmp//3x="includ3f="+code=SWCRR_SWEN" cla3s="sr31s="sr37"><137 a>.WD2OC_GETTIMEO4">tmwass="liGETTIMEOUT"">WD2d="line" nam 179//Aunmar>u32 a> /a href="+3ode=t3p" cla n305<100/ a>{v4);.EBUSY a>;.<3 href3"drive#L167" id WD2og/mpc8xxx_wdt.c#L53" id /a 23f=req"><1 a> /a href="+3ode=t32f="drivers/wxx_wdt.c#L151" id <137 a>..tmwass="liGETTIMEOUT"">WD2d="line" f22imer_p3ng a>(0);.<100/ a>{v4);.<1 a> /a href="+3ode=t32drivers/watchdog/mpc3cef="inreleas " class=aunv4);.<103//a>}.<3 href3"drive#L167" id <103//a>}.<3 href3"drivers/watchdog/mpc3xxx_wdexcode=SWCRR_SWEN" axxx_wdexcoe" n313srefline" nam .&quo3;rese32rivers/watchdog/mpc82tity//a> 2 /spav class="st3dog/mpc8x3x_wd110" buf a>,.,.<143//a> /a href/3sref"> rr3unmar>u32 a> /a href="+3ode=t3p" cla=nam " id buf a>,.,. *3" ide2=a href=/ hre3f=/ hre6xx class="line" m <143//a> /a href/3l2ne" n2m3 /a href="+3ode=t33drivers/watchdog/mpc2 KEEPALIVE//a>:.,.<143//a> /a href/3="sref"2t3meo2t//a> << 16;.<3 href3"drive=nam " id mpcLICENSis="sref">buf a>,.,.<143//a> /a href/3=//a>/a 23ode=pr_cri<< 16;.<3 href33wdt.c#L167" id ();.,.<143//a> /a href/3=22imer_p3iffies//ss="string">&quo3;rese3"
The original LXRlsrc#L15c byav4.< http://source idge.net/projects/lx h>LXRlla2puners v/,av4is experipef=al 3//acodebya mailto:lx @"stux.no">lx @"stux.no v/.
lx ."stux.no kindly ho.http://www.redpill-"stpro.no">Redpill Lstpro AS v/,aprovidideof Lstuxchdogult=2"llass4 a>.