linux/drivers/watchdog/mtx-1_wdt.c
<<
ion .18/spa> .18/form .18a ion .1 href="../linux+v3.7.3/drivers/watchdog/mtx-1_wdt.c">ion .18img src="../.static/gfx/right.png" alt=">>">io8/spa> io8spa> class="lxr_search">ion ="+search" method="post" onsubmit="return do_search(this);">ion .18input typ> hidden" nam> navtarget" tion> ">ion .18input typ> text" nam> search" id search">ion .18butt/optyp> submit">Search io8spa> class="lxr_prefs" .18a href="+prefs?return=drivers/watchdog/mtx-1_wdt.c"ion .1 onclick="return ajax_prefs();">ion .1Prefs .18/a>io8/spa> n .1 18/div n .1 18form ac >="ajax+*" method="post" onsubmit="return false;">io8input typ> hidden" nam> ajax_lookup" id ajax_lookup" tion> ">in .1 18/form in .1 18div class="headingbott/m">
8div id file_contents"
 L1">1 118/a>8spa> class="comment">/*8/spa>
 
 L2">1 128/a>8spa> class="comment"> *n .1 1Driver for the MTX-1 Watchdog.8/spa>
 
 L3">1 138/a>8spa> class="comment"> *8/spa>
 
 L4">1 148/a>8spa> class="comment"> *n .1 1(C) Copyright 2005 4G Systems <info@4g-systems.biz>,8/spa>
 
 L5">1 158/a>8spa> class="comment"> *n .1 1111111111111111111111111111111111111111111111111All Rights Reserved.8/spa>
 
 L6">1 168/a>8spa> class="comment"> *n .1 1111111111111111111111111http://www.4g-systems.biz8/spa>
 
 L7">1 178/a>8spa> class="comment"> *8/spa>
 
 L8">1 188/a>8spa> class="comment"> *n .1 1(C) Copyright 2007 OpenWrt.org, Floria> Fainelli <floria>@openwrt.org>8/spa>
 
 L9">1 198/a>8spa> class="comment"> *8/spa>
 
 L10">1 8.10a>8spa> class="comment"> *n .1 1This program is free software; you ca> redistribute it and/or8/spa>
 
 L11">1 118/a>8spa> class="comment"> *n .1 1modify it under the terms of the GNU General Public License8/spa>
 
 L12">1 128/a>8spa> class="comment"> *n .1 1as published by the Free Software Founda	  >; either vers  >8/spa>
 
 L13">1 138/a>8spa> class="comment"> *n .1 12 of the License, or (at your "
	  >) any later vers  >.8/spa>
 
 L14">1 148/a>8spa> class="comment"> *8/spa>
 
 L15">1 158/a>8spa> class="comment"> *n .1 1Neither Michael Stickel nor 4G Systems admit liability nor provide8/spa>
 
 L16">1 168/a>8spa> class="comment"> *n .1 1warranty for any of this software.1This material is provided8/spa>
 
 L17">1 178/a>8spa> class="comment"> *n .1 1"AS-IS" and at no charge.8/spa>
 
 L18">1 188/a>8spa> class="comment"> *8/spa>
 
 L19">1 198/a>8spa> class="comment"> *n .1 1(c) Copyright 2005 1 14G Systems <info@4g-systems.biz>8/spa>
 
 L20">1 2.10a>8spa> class="comment"> *8/spa>
 
 L21">1 218/a>8spa> class="comment"> *n .1 1Release 0.01.8/spa>
 
 L22">1 228/a>8spa> class="comment"> *n .1 1Author: Michael Stickel  michael.stickel@4g-systems.biz8/spa>
 
 L23">1 238/a>8spa> class="comment"> *8/spa>
 
 L24">1 248/a>8spa> class="comment"> *n .1 1Release 0.02.8/spa>
 
 L25">1 258/a>8spa> class="comment"> *n .1 1Author: Floria> Fainelli floria>@openwrt.org8/spa>
 
 L26">1 268/a>8spa> class="comment"> *n .1 111111111use the Linux watchdog/timer APIs8/spa>
 
 L27">1 278/a>8spa> class="comment"> *8/spa>
 
 L25">1 268/a>8spa> class="comment"> *n .1 111112fse X-1 Watcrialconfiguca> to caset for the M"> *8/spa>
 1 198/a>8spa> class="comment"> *n ifdifyialnot fCopgeca> nty 100 secondshdog.8/spa>
 1 8.10a>8spa> class="comment"> *n It shouldlnot be fCopgeca> moftwis en fo>8s1.6 secondshdog.8/spa>
 1 218/a>8spa> class="commentdog.8/spa>
 1 228/a>8spa> class="comment"> *n . dog/tifCopgecs for ers/watc e"dry 5 seconds,y itildog.8/spa>
 
 L233>1 138/a>8spa> class="comment"> *n ifyialia>@a> nty for first dog/. Aftey for first ia>@dog.8/spa>
 1 248/a>8spa> class="comment"> *n ifyMUST be fCopgeca> e"dry 2..95 secondshdog.8/spa>
 1 258/a>8spa> class="comment/dog.8/spa>
 1 26pa>
 1 27#includetems a>
 "../l/.1 ule.h1 27.bizpa>
 
 L25">13268/a381 27#includetems a>
 "../l/.1 uleparam.h1 27.bizpa>
 
 "../l/put s.h1 27.bizpa>
 
 "../l/errno.h1 27.bizpa>
 
 
 "f/put s.h1 27.bizpa>
 "initput s.h1 27.bizpa>
 
 "ioportput s.h1 27.bizpa>
 ".n . put s.h1 27.bizpa>
  cplet yoput s.h L27" claf"> cplet yoput s.h1 27.bizpa>
 "jiffil/put s.h1 27.bizpa>
 
 L45">13468/a381 27#includetems a>
 ""driversput s.h1 27.bizpa>
  class="comment *platin ._/.iscdevt s.h1 27.bizpa>
 "i/errno.h1 27.bizpa>
 "uacces/purno.h1 27.bizpa>
 
 "gpi/errno.h1 27.bizpa>
 1 26pa>
 1 26pa>
 
 L55">13568/a3src=". intrefs"
 	.18code=michsh_results" clafmichsL193 => nty*refs"
 	.18code=HZh_results" clafHZL19327.bizpa>
 1 26pa>
  cplet yoh_results" claf> cplet yoL193 efs"
 	.18code=stoph_results" clafstopL19327.bizpa>
 
 
 
 
 
 
 
 L65">1368L193 *n .1  unsigaliaefs"
 	.18code=gpi/h_results" clafgpi/L19327.bizpa>
 
 
 1 26pa>
 
 1 26pa>
 
 1 26pa>
 
 L75">1378L193 *n .1  >1 118/a>8spa> class="co toggle og/ gpi/comment/dog.8/spa>
 !efs"
 	.18code=wathdog/_/.iscdh_results" clafwathdog/_/.iscdL193.efs"
 	.18code=gsrc=eh_results" clafgsrc=eL19327.bizpa>
 
 1 26pa>
 
  cpletdh_results" claf> cpletd8/a3(&efs"
 	.18code=wathdog/_/.iscdh_results" clafwathdog/_/.iscdL193.efs"
 	.18code=stoph_results" clafstopL193)27.bizpa>
 
 1388L263>1 26pa>
  to h_results" clafwathdog/_> to 8/a3(voii)>1 26pa>
 efs"
 	.18code=wathdog/_/.iscdh_results" clafwathdog/_/.iscdL193.efs"
 	.18code=default_michsh_results" clafdefault_michsL19327.bizpa>
 
 1 26pa>
 
 1398L263>1 26pa>
 
 1 26pa>
 
 127.bizpa>
 
 
 
 
  ttordh_results" clafspin_unlock_irq> ttord8/a3(&efs"
 	.18code=wathdog/_/.iscdh_results" clafwathdog/_/.iscdL193.efs"
 	.18code=lockh_results" claflockL193, efs"
 	.18code=flagsh_results" clafflagsL193)27.bizpa>
 
 1 26pa>
 1 26pa>
 1 26pa>
 
 1 26pa>
 
 1 26pa>
 
 027.bizpa>
 
 
 efs"
 	.18code=wathdog/_/.iscdh_results" clafwathdog/_/.iscdL193.efs"
 	.18code=default_michsh_results" clafdefault_michsL19327.bizpa>
  ttordh_results" clafspin_unlock_irq> ttord8/a3(&efs"
 	.18code=wathdog/_/.iscdh_results" clafwathdog/_/.iscdL193.efs"
 	.18code=lockh_results" claflockL193, efs"
 	.18code=flagsh_results" clafflagsL193)27.bizpa>
 
 
 1 26pa>
 1 258/a>8spa> class="/* Fileickel@ fun 18foscomment/dog.8/spa>
 1 26pa>
 1 26pa>
 
 L125">11268/a>{>1 26pa>
 1 26pa>
 
 
 
 1 26pa>
 1 26pa>
  *n .1 ia3(struct efs"
 	.18code=inodeh_results" clafinodeL193 *efs"
 	.18code=inodeh_results" clafinodeL193, struct efs"
 	.18code=8divh_results" claffdivL193 *efs"
 	.18code=8divh_results" claffdivL193)>1 26pa>
 1 26pa>
 
 
 L125">1138L193 *n .1  nsubmit027.bizpa>
 
 
 
 1 26pa>
 (voiiaefs"
 	.18code=__"se h_results" claf__"se L193 *)efs"
 	.18code=ar/riresults" clafar/L19327.bizpa>
 (intrefs"
 	.18code=__"se h_results" claf__"se L193 *)efs"
 	.18code=ar/ph_results" clafar/pL19327.bizpa>
 
 {>1 26pa>
 
 L145">1148L193 *n .1   *n .1  .efs"
 	.18code=(at yosh_results" claf(at yosL193 =>efs"
 	.18code=WDIOF_CARDRESETh_results" clafWDIOF_CARDRESETL193,7.bizpa>
 e1 258/a>8spa ca>ng">uot;AS for thDTuot;ASment/do,7.bizpa>
 1 26pa>
 1 26pa>
 1 26pa>
 
 1 26pa>
 
 L155">1158L193 *n .1  c .1 efs"
 	.18code=WDIOC_GETBOOTSTATUSh_results" clafWDIOC_GETBOOTSTATUSL193:>1 26pa>
 
 1 26pa>
 1 26pa>
 
 1 26pa>
 
 1 26pa>
 
 
 L165">1168L193 *n .1   *n .1  else7.bizpa>
 
 1 26pa>
  to h_results" clafwathdog/_> to 8/a3()27.bizpa>
 
 
 
 L175">1178L263}7.bizpa>
 
 1 26pa>
 1 26pa>
 
  to h_results" clafwathdog/_> to 8/a3()27.bizpa>
 
 1188L263}7.bizpa>
 {>1 26pa>
 efs"
 	.18code=THIS_MODULEh_results" clafTHIS_MODULEL193,7.bizpa>
 efs"
 	.18code=no_llseekh_results" clafno_llseekL193,7.bizpa>
 efs"
 	.18code=wathdog/_ioctlh_results" clafwathdog/_ioctl ia3,7.bizpa>
 efs"
 	.18code=wathdog/_irsth_results" clafwathdog/_irst ia3,7.bizpa>
 efs"
 	.18code=wathdog/_wri=eh_results" clafwathdog/_wri=e ia3,7.bizpa>
  *n .1 ia3 *n .1  =>efs"
 	.18code=wathdog/_r *n .1h_results" clafwathdog/_> *n .1 ia3,7.bizpa>
 1198L263>1 26pa>
 1 26pa>
 {>1 26pa>
 efs"
 	.18code=WATCHDOG_MINORh_results" clafWATCHDOG_MINOR ia3,7.bizpa>
 uot;AS"driversuot;ASment/do,7.bizpa>
 &efs"
 	.18code=wathdog/_fopsh_results" clafwathdog/_fopsL193,7.bizpa>
 1 26pa>
 
 
 efs"
 	.18code=p/.ih_results" clafp/.i8/a3-h1 2efs"
 	.18code=rosourcdh_results" clafrosourcd8/a3[0].efs"
 	.18code=stcr h_results" clafsrcr 8/a327.bizpa>
 efs"
 	.18code=gpi/_requ tt_ondh_results" clafgpi/_requ tt_ond8/a3(efs"
 	.18code=wathdog/_/.iscdh_results" clafwathdog/_/.iscdL193.efs"
 	.18code=gpi/h_results" clafgpi/L193,7.bizpa>
 8spa ca>ng">uot;ASwath-og/uot;ASment/do)27.bizpa>
 1 26pa>
 8spa ca>ng">uot;ASfailed to requ tt gpi/uot;ASment/do)27.bizpa>
 
 
 1 26pa>
 
  cplet yoh_results" clafinit_> cplet yo8/a3(&efs"
 	.18code=wathdog/_/.iscdh_results" clafwathdog/_/.iscdL193.efs"
 	.18code=stoph_results" clafstopL193)27.bizpa>
 
 
 
 efs"
 	.18code=michsh_results" clafmichsL19327.bizpa>
 1 26pa>
 efs"
 	.18code=w .1_registfCh_results" clafw .1_registfC8/a3(&efs"
 	.18code=wathdog/_w .1h_results" clafwathdog/_w .1L193)27.bizpa>
 1 26pa>
 
 L225">1228L193 *n .1   *n .1  efs"
 	.18code=/.i_er h_results" claf/.i_er 8/a3(&efs"
 	.18code=p/.ih_results" clafp/.i8/a3-h1 2efs"
 	.18code=/.ih_results" claf/.i8/a3, e1 258/a>8spa ca>ng">uot;ASfailed to registfC\nuot;ASment/do)27.bizpa>
 
 
 
 8spa ca>ng">uot;AS for thdrivers 
 
 
 1 26pa>
 1 26pa>
 1 26pa>
 
 L225">1238L193 *n .1  >1 118/a>8spa> class="co FIXME: do we need to lock this . tt ?comment/dog.8/spa>
 1 26pa>
 
  cplet yoh_results" clafwai/_for_> cplet yo8/a3(&efs"
 	.18code=wathdog/_/.iscdh_results" clafwathdog/_/.iscdL193.efs"
 	.18code=stoph_results" clafstopL193)27.bizpa>
 
 
 
 
 L245">1248L263>1 26pa>
 {>1 26pa>
 efs"
 	.18code=wathdog/_prob1h_results" clafwathdog/_prob1 ia3,7.bizpa>
 efs"
 	.18code=__/.iexit_ph_results" claf__/.iexit_p8/a3(efs"
 	.18code=wathdog/_removdh_results" clafwathdog/_removd ia3),7.bizpa>
 uot;ASwath-og/uot;ASment/do,7.bizpa>
 efs"
 	.18code=THIS_MODULEh_results" clafTHIS_MODULEL193,7.bizpa>
 1 26pa>
 
 
 L255">1258L193efs"
 	.18code=MODULE_AUTHORh_results" clafMODULE_AUTHOR8/a3(e1 258/a>8spa ca>ng">uot;AS ichael Smichel, Flori258Fae2"lliuot;ASment/do)27.bizpa>
 8spa ca>ng">uot;ASDa hre in  the  for t"driversuot;ASment/do)27.bizpa>
 8spa ca>ng">uot;ASGPLuot;ASment/do)27.bizpa>
 
 8spa ca>ng">uot;ASplatin .:wath-og/uot;ASment/do)27.bizpa>
 lxC@" cux.noL193.
lxC." cux.no kindly hostfd by .bizpa> http://www.redpill-" cpro.no">Redpill L cpro AS8/a3, provider of L cux cfosult>ng and irsrat yos seriscds sincem1995.