linux/drivers/watchdog/pika_wdt.c
<<
Searcho div id0"file_contents"i
   1 /a> spat class="comment">/* /spatio   2 /a> spat class="comment"> * PIKA FPGA based Watchdog Timer /spatio   3 /a> spat class="comment"> * /spatio   4 /a> spat class="comment"> * Copyright (c) 2008 PIKA Technologies /spatio   5 /a> spat class="comment"> *   Sean MacLennan <smaclennan@pikatech.com> /spatio   6 /a> spat class="comment"> */ /spatio   7 /a><   8 /a>#define  a href="+code=pr_fmt" class="sref">pr_fmt /a>( a href="+code=fmt" class="sref">fmt /a>)  a href="+code=KBUILD_MODNAME" class="sref">KBUILD_MODNAME /a>  spat class="string">": " /spati  a href="+code=fmt" class="sref">fmt /a><   9 /a><  
  #include <linux/init.h ><  11 #include <linux/errno.h ><  12 #include <linux/module.h ><  13 #include <linux/moduleparam.h ><  14 #include <linux/typ2s.h ><  15 #include <linux/kernel.h ><  16 #include <linux/fs.h ><  17 #include <linux/miscdevice.h ><  18 #include <linux/watchdog.h ><  19 #include <linux/reboot.h ><  2  #include <linux/jiffi2s.h ><  21 #include <linux/timer.h ><  22 #include <linux/bitops.h ><  23 #include <linux/uaccess.h ><  24 #include <linux/io.h ><  25 #include <linux/of_platform.h ><  26 /a><  27 /a>#define  a href="+code=DRV_NAME" class="sref">DRV_NAME /a>  spat class="string">"PIKA-WDT" /spati<  28 /a><  29 /a> spat class="comment">/* Hardware timeout in seconds */ /spatio  30 /a>#define  a href="+code=WDT_HW_TIMEOUT" class="sref">WDT_HW_TIMEOUT /a> 2o  31 /a><  32 /a> spat class="comment">/* Timer heartbeat (500ms) */ /spatio  33 /a>#define  a href="+code=WDT_TIMEOUT" class="sref">WDT_TIMEOUT /a>     ( a href="+code=HZ" class="sref">HZ /a>/2)o  34 /a><  35 /a> spat class="comment">/* User land timeout */ /spatio  36 /a>#define  a href="+code=WDT_HEARTBEAT" class="sref">WDT_HEARTBEAT /a> 15o  37 /a>static int  a href="+code=heartbeat" class="sref">heartbeat /a> =  a href="+code=WDT_HEARTBEAT" class="sref">WDT_HEARTBEAT /a>;<  38 /a> a href="+code=module_param" class="sref">module_param /a>( a href="+code=heartbeat" class="sref">heartbeat /a>, int, 0);<  39 /a> a href="+code=MODULE_PARM_DESC" class="sref">MODULE_PARM_DESC /a>( a href="+code=heartbeat" class="sref">heartbeat /a>,  spat class="string">"Watchdog heartbeats in seconds. " /spati<  40 /a>         spat class="string">"(default = " /spati  a href="+code=__MODULE_STRING" class="sref">__MODULE_STRING /a>( a href="+code=WDT_HEARTBEAT" class="sref">WDT_HEARTBEAT /a>)  spat class="string">")" /spati);<  41 /a><  42 /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>;<  43 /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);<  44 /a> a href="+code=MODULE_PARM_DESC" class="sref">MODULE_PARM_DESC /a>( a href="+code=nowayout" class="sref">nowayout /a>,  spat class="string">"Watchdog cannot be stopped once started " /spati<  45 /a>         spat class="string">"(default=" /spati  a href="+code=__MODULE_STRING" class="sref">__MODULE_STRING /a>( a href="+code=WATCHDOG_NOWAYOUT" class="sref">WATCHDOG_NOWAYOUT /a>)  spat class="string">")" /spati);<  46 /a><  47 /a>static struct {<  48 /a>        void  a href="+code=__iomem" class="sref">__iomem /a> * a href="+code=fpga" class="sref">fpga /a>;<  49 /a>        unsigned long  a href="+code=next_heartbeat" class="sref">next_heartbeat /a>;    spat class="comment">/* the next_heartbeat for the timer */ /spatio  50 /a>        unsigned long  a href="+code=open" class="sref">open /a>;<  51 /a>        char  a href="+code=expect_close" class="sref">expect_close /a>;<  52 /a>        int  a href="+code=bootstatus" class="sref">bootstatus /a>;<  53 /a>        struct  a href="+code=timer_list" class="sref">timer_list /a>  a href="+code=timer" class="sref">timer /a>;         spat class="comment">/* The timer that pings the watchdog */ /spatio  54 /a>}  a href="+code=pikawdt_private" class="sref">pikawdt_private /a>;<  55 /a><  56 /a>static struct  a href="+code=watchdog_info" class="sref">watchdog_info /a>  a href="+code=ident" class="sref">ident /a> = {<  57 /a>        . a href="+code=identity" class="sref">identity /a>       =  a href="+code=DRV_NAME" class="sref">DRV_NAME /a>,<  58 /a>        . a href="+code=2<0opts" class="sref">2<0opts /a>        =  a href="+code=WDIOF_CARDRESET" class="sref">WDIOF_CARDRESET /a> |<  59 /a>                           a href="+code=WDIOF_SETTIMEOUT" class="sref">WDIOF_SETTIMEOUT /a> |<  60 /a>                           a href="+code=WDIOF_KEEPALIVEPING" class="sref">WDIOF_KEEPALIVEPING /a> |<  61 /a>                           a href="+code=WDIOF_MAGICCLOSE" class="sref">WDIOF_MAGICCLOSE /a>,<  62 /a>};<  63 /a><  64 /a> spat class="comment">/* /spatio  65 /a> spat class="comment"> * Reload the watchdog timer.  (ie, pat the watchdog) /spatio  66 /a> spat class="comment"> */ /spatio  67 /a>static  a href="+code=inline" class="sref">inline /a> void  a href="+code=pikawdt_reset" class="sref">pikawdt_reset /a>(void)o  68 /a>{<  69 /a>         spat class="comment">/* -- FPGA: Reset Control Register (32bit R/W) (Offset: 0x14) -- /spatio  70 /a> spat class="comment">         * Bit 7,    WTCHDG_EN: When set to 1, the watchdog timer is enabled. /spatio  71 /a> spat class="comment">         *           Once enabled, it cannot be disabled. The watchdog can be /spatio  72 /a> spat class="comment">         *           kicked by performing any write access to the reset /spatio  73 /a> spat class="comment">         *           control register (this register). /spatio  74 /a> spat class="comment">         * Bit 8-11, WTCHDG_TIMEOUT_SEC: Sets the watchdog timeout .18.2 in /spatio  75 /a> spat class="comment">         *           seconds. Valid ranges are 1 to 15 seconds. The .18.2 can /spatio  76 /a> spat class="comment">         *           be modified dynamically. /spatio  77 /a> spat class="comment">         */ /spatio  78 /a>        unsigned  a href="+code=reset" class="sref">reset /a> =  a href="+code=in_be32" class="sref">in_be32 /a>( a href="+code=pikawdt_private" class="sref">pikawdt_private /a>. a href="+code=fpga" class="sref">fpga /a> + 0x14);<  79 /a>         spat class="comment">/* enable with max timeout - 15 seconds */ /spatio  80 /a>         a href="+code=reset" class="sref">reset /a> |= (1 << 7) + ( a href="+code=WDT_HW_TIMEOUT" class="sref">WDT_HW_TIMEOUT /a> << 8);<  81 /a>         a href="+code=out_be32" class="sref">out_be32 /a>( a href="+code=pikawdt_private" class="sref">pikawdt_private /a>. a href="+code=fpga" class="sref">fpga /a> + 0x14,  a href="+code=reset" class="sref">reset /a>);<  82 /a>}<  83 /a><  84 /a> spat class="comment">/* /spatio  85 /a> spat class="comment"> * Timer tick /spatio  86 /a> spat class="comment"> */ /spatio  87 /a>static void  a href="+code=pikawdt_ping" class="sref">pikawdt_ping /a>(unsigned long  a href="+code=data" class="sref">data /a>)o  88 /a>{<  89 /a>        if ( a href="+code=time_before" class="sref">time_before /a>( a href="+code=jiffi2s" class="sref">jiffi2s /a>,  a href="+code=pikawdt_private" class="sref">pikawdt_private /a>. a href="+code=next_heartbeat" class="sref">next_heartbeat /a>) ||<  90 /a>                        (! a href="+code=nowayout" class="sref">nowayout /a> && ! a href="+code=pikawdt_private" class="sref">pikawdt_private /a>. a href="+code=open" class="sref">open /a>)) {<  91 /a>                 a href="+code=pikawdt_reset" class="sref">pikawdt_reset /a>();<  92 /a>                 a href="+code=mod_timer" class="sref">mod_timereset &a href="+code=pikawdt_private" class="sref">pikawdt_private /a>. a href="+code=ot.c#L43" id0"L43" class="linebe /a>. a href="+code=ot.c#L43" id=#L43" id0"L43" class="linebe /a>. a href">pikawddog cw2s10<00"L82">  82 /a>}<pikawddog cw2s10<00"L883">  839/a><mod_timeresetr_cent a hreHDOG_NOWAYOUT" class="srefIL79ll          r  7chc#L3!\n>WATCHDOG_NOWAYOUT /a>)  spat class="string">")&q9t">/* /s9atio */ /s9atiodata 9a>)omod_timereset &akeepspaveref="+code=pikawdt_reset" class="sref">pikawdt_re9sref">fmtt /a><   9 //a><jiffi2s /a>,  a href="+code=pikawdt_private" class="sref">pikawdt_private /a>. a href="+nsigned  a href="+code=ot.c#L43" id0"L43" class="linebe /a>. a href=""line" nam20"L37">  37 /a>static int  *be /a>. a href="T" class="sref">WDT_TIMnux/watchdog.h" class="fref">linux/watchd0it.h &0gt;<&0gt;<&0gt;<jiffi2s /a>,  lass=ref="+code=pikawdt_reset" class="sref">pikawdt_re10am.h &0gt;<&0gt;<mod_timereset &akeepspaveref="AYOUT /a>)  spat class="string">")&q10el.h &0gt;<  92 /a>                 a href="+code=mod_timer" class="sref">mod_timereset &a href="+code=pikawdt_private" class="sref">pikawdt_private /a>. a href="+code=ot.c#L43" id0"L43" class="linebe /a>. a href="+code=ot.c#L43" id=#L43" id0"L43" class="linebe /a>. a href">pikawddog cw2s10<00"L10fs.h &0gt;<&0gt;<&0gt;<  86 /a> spat class="commen1"L9">   9  /a><   2 /"inclut 7,kawdspat" na">       lass=s runnclaomment">         *           be modified dynami1nit.h &ggt;<  86 /a> spat class="commen1rno.h &><pit &ate"      56" id0"L56" class="liin="lset" class="sref"="l   void  a href="+codin="lset" class="sref"="l   v,L56" id0"L56" class="lilts"class="sref">pikts"   void  a href="+codets"class="sref">pikts"   ve=pikawdt_reset" class="sref">pikawdt_re1ule.h &><&><  kawdspspat css="line" nam20"L86">  86 /a> spat class="commen1r2s.h &><mod_timereselest_" n_   _bnt     0, a href="+code=mod_timer" class="sref">mod_timereset &a href="+code=pikawdt_privatte" class="sref">pikawdt_priv nam20"L86">  86 /a> spat class="commen1rel.h &><piEBUSY_TIMnux/watchdog.h" class="fref">linux/watchd/fs.h &><&><jiffi2s /a>,  lass=ref="linebe /a>. a href">pikawddog cw2s10<00"L1dog.h &><1><pi0"nseekm20"ate"  a href="+code=time_in="lset" class="sref"="l   v,Ld  a href="+codets"class="sref">pikts"   veude/linux/errno.h" class="fref">linux/errnit.h &><&ggt;<1><  86 /a> spat class="commen1ess.h 1><       "includ="line" nam20"L86">  86 /a> spat class="commen1e2s.h &><  86 /a> spat class="commen1orm.h 1><  51 /a>   t &arelea"L     56" id0"L56" class="liin="lset" class="sref"="l   void  a href="+codin="lset" class="sref"="l   v,L56" id0"L56" class="lilts"class="sref">pikts"   void  a href="+codets"class="sref">pikts"   ve=pikawdt_reset" class="sref">pikawdt_re1L26">  261 /a><L2" ernal /a>;ass="line" nam20"L86">  86 /a> spat class="commen1oog.h & /a><nowayout /a> && ! a href="+code=pikawdt_privaine" nam20"L51">  51 /a>        char  a hree=pikawdt_reset" class="sref">pikawdt_re1nds */ /s1patio  92 /a>   selam20"L     a href="+code=mod_timer" class="sref">mod_timereset &a href="+code=pikawdt_private" class="sref">pikawdt_privaeude/linux/errno.h" class="fref">linux/errTIMEOUT /1a> 2o  311 /a><mod_timereseclear_bnt     0, a href="+code=mod_timer" class="sref">mod_timereset &a href="+code=pikawdt_privatte" class="sref">pikawdt_priude/linux/errno.h" class="fref">linux/errTle.h &ggt;<nowayout /a> && ! a href="+code=pikawdt_privaine" nam20"L51">  51 /a>        char  a hre = 0ude/linux/errno.h" class="fref">linux/errTss.h 1>/2)olinux/errT2s.h & /a>< 15o  86 /a> spat class="commen1EARTBEAT 1/a>;< whwds 86/"inclut 7,mentten tod="line" nam20"L86">  86 /a> spat class="commen1/a>, int,1 0);<  86 /a> spat class="commen1" /s1pati<mod_timeresessize_tika_w1" id0"L81" clae=jiffi2ment"ayout /a> && ! ment"     56" id0"L56" class="lilts"class="sref">pikts"   void  a href="+codets"class="sref">pikts"   v,">  st51" id0"L51" class="l__usclass="sref">pika__uscl   void  a href="+codsref">pikawdt_ping /a>(unsi=WDIOF_MAGICCLOSE" class="sref">WDIOF_MA1uot; /spa1ti);<mod_timeresesize_tika_w1" id0"L81" clal" class="sref">pilwdt_pr,Ld  a href="+codloff_tf">mod_timereseloff_t   void  a href="+codppot.c#L43" id0"L43ppot hree=pikawdt_reset" class="sref">pikawdt_re1L41">  411 /a><;<pilwdt_pre=pikawdt_reset" class="sref">pikawdt_re1Lam.h &ggt;<linux/err" /s1pati<magc#L1" iactat class="comment">/* the next_heartbeat for the ti1L46">  461 /a><  90 /a>                        vate /a>. a href="+code=open" class="sref"1atic stru1ct {<mod_timeresesize_tika_w1" id0"L81" claiset" class="sref_TIMnux/watchdog.h" class="fref">linux/watchdef">fpga 1/a>;<nowayout /a> && ! a href="+code=pikawdt_privaine" nam20"L51">  51 /a>        char  a hre = 0ude/linux/errno.h" class="fref">linux/erref">open 1/a>;<;<ref="+code=time_iset" class="sref_TIM = 0uw1" id0"L81" claiset" class="sref_TIMcode=w1" id0"L81" clal" class="sref">pilwdt_pruw1" id0"L81" claiset" class="sref_TIM++vate /a>. a href="+code=open" class="sref"1otstatus 1/a>;<mod_timeresec_TIMnux/watchdog.h" class="fref">linux/watchddog */ /s1patiopikaget_uscl a href="+code=time_cf">mod_timeresec_TIM,Ld  a href="+codsref">pikawdt_ping /a>(unsinebe /a>. a href="iset" class="sref_TIMiv nam20"L86">  86 /a> spat class="commen1_private 1/a>;<linux/watchddot; /spa1 /a><mod_timeresec_TIM ==TCHDOG_NOWAYOUT" class=#39;V=#39;DOG_NOWAate /a>. a href="+code=open" class="sref"1o46">  461 = {<nowayout /a> && ! a href="+code=pikawdt_privaine" nam20"L51">  51 /a>        char  a hre = 42nux/watchdog.h" class="fref">linux/watchddtic stru1/a>,<linux/watchddf">fpga 1a> |< |<open 1a> |<,<  62 /1a>};<mod_timereset &akeepspaveref="AYOUT /a>)  spat class="string">")&q1L63">  631 /a></* /s1patiopilwdt_pruwdt.c#L34" id0"L34" class="line" nam20"1nel.h &ggt;<  461patio(v1oid)o  86 /a> spat class="commen168">  68 1/a>{<  86 /a> spat class="commen114) -- /s1patio/* the next_heartbeat for the ti1abled. /s1patiopikts"   void  a href="+codets"class="sref">pikts"   v,mment">/* the next_heartbeat for the ti1at_close 1patiomod_timeresecmd_TIM,L="+code=pikawdt_ping" class="ar"L87">  87 /a>star"t_pre=pikawdt_reset" class="sref">pikawdt_re1 reset /s1patiopika__uscl   void  a href="+codar"pL87">  87 /a>star"p hre = (8" id0"L48" class="linusclass="sref">pika__uscl   voi)t_ping" class="ar"L87">  87 /a>star"t_pr="include/linux/fs.h" class="fref">linux/ft">/* /s1patiopika__uscl   void  a href="+codpL87">  87 /a>stp hre = d  a href="+codar"pL87">  87 /a>star"p hre="include/linux/fs.h" class="fref">linux/fel.h &patiolinux/ffs.h &ggt;<mod_timeresecmd_TIMAate /a>. a href="+code=open" class="sref"1 /a> + 0x114);<. a href="+code=open" class="sref"1nds */ /s1patiopikacopy_tonuscl a href="+code=time_ar"pL87">  87 /a>star"p hre, a href="+code=mod_tiinfo" class="sref">watchdog_i, sizeofref="+code=time_info" class="sref">watchdog_i)) ? -=pikawdt_privatEFAUL#L43" id=#L43" iEFAUL#_TIM : 0ude/linux/errno.h" class="fref">linux/err <<1 8);<reset /1a>);<. a href="+code=open" class="sref"1nreset /s1/a>}<pikaput_uscl     0, d  a href="+codpL87">  87 /a>stp hreAYOUT /a>)  spat class="string">")&q1L83">  831 /a></* /s1patio. a href="+code=open" class="sref"1nel.h &patiopikaput_uscl     t_ping" class="e=jiffi2ef">nowayout /a> && ! a href="+code=pikawdt_privaline" nam20"L52">  52 /a>        int  a, d  a href="+codpL87">  87 /a>stp hreAYOUT /a>)  spat class="string">")&q1Lfs.h &patiodata 1/a>)o. a href="+code=open" class="sref"1n/a> + 0x1/a>{<mod_timereset &akeepspaveref="AYOUT /a>)  spat class="string">")&q1tbeat /a>1) ||<linux/err>open /a>1)) {<();<                        C  a href="+code:e /a>. a href="+code=open" class="sref"182">  82 1/a>}<pikaget_uscl a href="+code=time_new_     /a>             ew_      hre, d  a href="+codpL87">  87 /a>stp hreAe=pikawdt_reset" class="sref">pikawdt_re1883">  8319/a><linux/watchd9t">/* /s19atio  37 /a>static int  a href="+code=heanew_     /a>             ew_      hre="include/linux/fs.h" class="fref">linux/9"> */ /s19atiomod_timereset &akeepspaveref="AYOUT /a>)  spat class="string">")&q1tf">data 19a>)ofm1tt /a><pikaput_uscl     t_ping" class="new_     /a>             ew_      hre, d  a href="+codpL87">  87 /a>stp hreA;L81" id0"L79" class="line" op2    curr="l      sclass="comment">/* the next_heartbeat for the ti20L9">   92//a></* the next_heartbeat for the ti202s.h &0gt;<                        C Ga href="+code:e /a>. a href="+code=open" class="sref"20no.h 20gt;<pikaput_uscl     t_ping" class="C" class="sref">MODULE_PARM_DESC /a>( a   a href="+codpL87">  87 /a>stp hreAYOUT /a>)  spat class="string">")&q20le.h 20gt;<")&q20ss.h &0gt;<piENOTTY hre="include/linux/fs.h" class="fref">linux202s.h 20gt;<20gt;<20gt;<20gt;<  lts"ate"ra"lineika_w1" id0"L81" clat &afopt.c#L43" id0"L43p &afoptint  a te /a>. a href="+code=open" class="sref"20og.h 20gt;<pikatwnclika_wdt.c#L92"a href="+code=heaTHISspati  ass="sref">pikaTHISspati     v,mment">/* the next_heartbeat for the ti2"L9">   92 /a><pillseekika_wdt.c#L92a href="+code=heano_llseekclass="sref">pino_llseek   v,mment">/* the next_heartbeat for the ti2"2s.h &ggt;<pikawdt_pr wdt.c#L92"a href="+code=heap &ate" class="sref">pit &ate"     ,mment">/* the next_heartbeat for the ti2"no.h 2><  51 /a>   relea"L    t.c#L92"a href="+code=heap &arelea"L51">  51 /a>   t &arelea"L    ,mment">/* the next_heartbeat for the ti2"le.h 2>< &ment"    wdt.c#L92"a href="+code=heap &ament"ayout /a> && ! ment"    ,mment">/* the next_heartbeat for the ti2"ss.h &></* the next_heartbeat for the ti2"2s.h 2><2><2><. a href="+code=open" class="sref"2ice.h 2><  92 /a>    inoLika_wd  a href="+code=nowayout" MINOR                wayout" MINOR    ,mment">/* the next_heartbeat for the ti2"og.h 2><pinersika_wdt=TCHDOG_NOWAYOUT" class=WATCH_heartbe>WATCHDOG_NOW,mment">/* the next_heartbeat for the ti2oot.h 2></* the next_heartbeat for the ti2o2s.h &><2ggt;<2><mod_timereseininntika_w1" id0"L81" clat &ainntf">mod_timereset &ainnt     +code=pikawdt_reset" class="sref">pikawdt_re2ess.h 2><2><  87 /a>stnp hre="include/linux/fs.h" class="fref">linux2orm.h 2><  48 /a>        void  a href="+code=__iomem" class="sref">__iomem /a> * a href="+code=fpga" class="sr2L26">  262 /a><  u32ika_w1" id0"L81" clatost1f">mod_timeresetost1>__iomem /a> * a href="+code=fpga" class="sr2Lce.h 2pati<fpt>__iomem /a> * a href="+code=fpga" class="sr2Log.h 2 /a><  87 /a>stnp hred  a href="+code=nof_find_compt.c20"an="lset" class="sreof_find_compt.c20"an="l     t_ping" class="NULLset" class="sreNULL/a>( a   a href="+codNULLset" class="sreNULL/a>( a HDOG_NOWAYOUT" class=WATCH"lin,ref">WATCHDOG_NOWAYOUT /a>)  spat class="string">")&q2TIMEOUT /2a> 2o  87 /a>stnp hred   a href="+code=nNULLset" class="sreNULL/a>(Aate /a>. a href="+code=open" class="sref"2L31">  312 /a><pikapr_erl     tHDOG_NOWAYOUT" class=WATCHUam20"Lto find ref"\n>WATCHDOG_NOWAYOUT /a>)  spat class="string">")&q2Tle.h 2ggt;<__iomem /a> * a href="+code=fpga" class="sr2Tss.h 2>/2)o2 /a><nowayout /a> && ! a href="+code=pikawdt_private" class="sref">pikawdt_pri  a href="+code=nof_   apL87">  87 /a>stof_   ap     t_ping" class="npL87">  87 /a>stnp hreyout /a>,  a href="+code=bool" class="sref">2RTBEAT /a2> 15o  87 /a>stnp hret /a>,  a href="+code=bool" class="sref">2Rce.h 2/a>;<nowayout /a> && ! a href="+code=pikawdt_private" class="sref">pikawdt_pri   a href="+code=nNULLset" class="sreNULL/a>(Aate /a>. a href="+code=open" class="sref"2Log.h 2 0);<pikapr_erl     tHDOG_NOWAYOUT" class=WATCHUam20"Lto  ap ref"\n>WATCHDOG_NOWAYOUT /a>)  spat class="string">")&q2" /s2pati<__iomem /a> * a href="+code=fpga" class="sr2uot; /spa2ti);<  412 /a><;<watchdog_ide=pikawdt_privatirmware_id0"io class="sref">pitirmware_id0"io t_pri  a href="+code=ncode=reset" class="sref">reset /a> =  a href="+code=in_be32" class="sref">in_be32 /a>( a href="+code=pikawdt_private" class="sref">pikawdt_private c)Ta hreateffffomem /a> * a href="+code=fpga" class="sr2uss.h 2ggt;</* the next_heartbeat for the ti2uot; /spa2ti);<  87 /a>stnp hred  a href="+code=nof_find_compt.c20"an="lset" class="sreof_find_compt.c20"an="l     t_ping" class="NULLset" class="sreNULL/a>( a   a href="+codNULLset" class="sreNULL/a>( a HDOG_NOWAYOUT" class=WATCH"lin,ref"-sd>WATCHDOG_NOWAYOUT /a>)  spat class="string">")&q2&TBEAT /a2 /a><  87 /a>stnp hred   a href="+code=nNULLset" class="sreNULL/a>(Aate /a>. a href="+code=open" class="sref"2atic stru2ct {<pikapr_erl     tHDOG_NOWAYOUT" class=WATCHUam20"Lto find ref"-sd\n>WATCHDOG_NOWAYOUT /a>)  spat class="string">")&q2&og.h 2/a>;<fpt>__id  -=pikawdt_privatENOEN#L43" id=#L43" iENOEN#>__iomem /a> * a href="+code=fpga" class="sr2mer */ /s2patioopen 2/a>;<;<;<pikawdt_pri  a href="+code=nof_   apL87">  87 /a>stof_   ap     t_ping" class="npL87">  87 /a>stnp hreyout /a>,  a href="+code=bool" class="sref">2dog */ /s2patio  87 /a>stnp hret /a>,  a href="+code=bool" class="sref">2_private 2/a>;<pikawdt_pri   a href="+code=nNULLset" class="sreNULL/a>(Aate /a>. a href="+code=open" class="sref"2dot; /spa2 /a><pikapr_erl     tHDOG_NOWAYOUT" class=WATCHUam20"Lto  ap ref"-sd\n>WATCHDOG_NOWAYOUT /a>)  spat class="string">")&q2o46">  462 = {<fpt>__id  -=pikawdt_privatENOMEML43" id=#L43" iENOMEM>__iomem /a> * a href="+code=fpga" class="sr2dtic stru2/a>,<            out>__iomem /a> * a href="+code=fpga" class="sr2eog.h 2a> |< |</* the next_heartbeat for the ti2Tf">open 2a> |< ults      spat1t class="comment">/* -- 4040GA: Reset Control Register (32bit R/W) (Offset: 0x2Tt_close 2/a>,<  whwdss="c72"t       was caus2 /a> acomment">Reset Control Register (32bit R/W) (Offset: 0x2Ttstatus 2a>};<    d="line" nam20"L86">  86 /a> spat class="commen2L63">  632 /a></* the next_heartbeat for the ti2nt">/* /s2patiomod_timeresetost1>__ii  a href="+code=ncode=reset" class="sref">reset /a> =  a href="+cote" class="sref">pikawdt_private4ut /a>,  a href="+code=bool" class="sref">2nel.h 2ggt;<mod_timeresetost1>__iia hreate80000000e=pikawdt_reset" class="sref">pikawdt_re2T46">  462pationowayout /a> && ! a href="+code=pikawdt_privaline" nam20"L52">  52 /a>        int  ad  a href="+code=noDIOF_CARDRESE                    F_CARDRESE >__iomem /a> * a href="+code=fpga" class="sr2set /a>(v2oid)o  68 2/a>{<  87 /a>stioun apt /a> =  a href="+cote" class="sref">pikawdt_prt /a>,  a href="+code=bool" class="sref">214) -- /s2patio/* the next_heartbeat for the ti2abled. /s2patiomod_timereset &a href="+code=pikawdt_private" class="sref">pikawdt_private /a>. a href="+code=p;a href=7">  87 /a>static void  a href="+c/a>,  a href="+code=bool" class="sref">2dog *ose 1pati2fpt>__id  -=pik"L58" clasminoL92sc_rpat1t c 92 /a>    inoLiksc_rpat1t c =  af="+code=mod_timer" class="sinyout" class="srt &amisc"inint  a te,  a href="+code=bool" class="sref">2dog *o 632 /a><fpt>__id  -=/a>. a href="+code=open" class="sref"2dot; * /s1pati2pikapr_erl     tHDOG_NOWAYOUT" class=WATCHUam20"Lto  ap rrpat1t c inint  TCHDOG_NOWAYOUT /a>)  spat class="string">")&q2o46"> &pati2 + 0x114);2pikapr_erl  ma"ltHDOG_NOWAYOUT" class=WATCHUam20    ialized. ESC /a>( =%d sec (       v=%d)TCHDOG_NOWAYOUTt">/* the next_heartbeat for the ti2o2s.h/ /s1pati2MODULE_PARM_DESC /a>( a   a href="+codpL87"90 /a>                        vate //a> * a href="+code=fpga" class="sr2eog.h<1 8);2linux/err>ope2et /1a>);2}2            out>__iomem >. a href="+code=open" class="sref"20no.h  831 /a>2  87 /a>stioun apt /a> =  a href="+cote" c_be32" class="sref">in_be32 /a>( a href="+code=pikawdt_private" class="sref">pikawdt_private//a> * a href="+code=fpga" class="sr2eog.h& /s1pati2fpt>__iomem /a> * a href="+code=fpga" class="sr2Log.h &pati2&pati22ata 1/a>)2pikawdt_re2ess.h+ 0x1/a>{21) ||2    inoLiksc_derpat1t c =  af="+code=mod_timer" class="sinyout" class="srt &amisc"inint  a te,  a href="+code=bool" class="sref">2dog * /a>1)) {2();2  87 /a>stioun apt /a> =  a href="+cote" c_be32" class="sref">in_be32 /a>( a href="+code=pikawdt_private" class="sref">pikawdt_private//a> * a href="+code=fpga" class="sr2eog.h 82 1/a>}22mod_timereset &amiodulef">mo =  a href="+cote" c_be32" c">mod_timereset &ainnt     +cod//a> * a href="+code=fpga" class="sr2eog.h &pati2 * a href="+code=fpga" class="sr2eog.h &pati22ata 19a>)2)  spat class="string">")&q2o46">">fm1tt /2>< acWring">& TivatHDOG_NOWAYOUT /a>)  spat class="string">")&q2o46"3   92//a>3pikaTHISs    v,_LICENS"tHDOG_NOWAYOUT" class=WATCHUam20GPLHDOG_NOWAYOUT /a>)  spat class="string">")&q2o46"3 1 92//a>3)  spat class="string">")&q2o46"3 2 92//a>320gt;3
The origia>;aLXR softid0"comm2"t .c#L7" idhttp://sourceforge.net/projects/lxc >LXR " clu   ya   a this charrilass>;ao t_pricomm.c#L7" idmailto:lxc@iveux.no">lxc@iveux.noe=pik
lxc.iveux.no kindly ho1t dcomm.c#L7" idhttp://www.redpill-ivepro.no">Redpill Lvepro ASa a provider of Lveuxt556"ults="land "lineika_w sern="lw sis="l1995.