linux/drivers/watchdog/ar7_wdt.c
<<
pn i /spa" /form a pn i href="../linux+v3.9.5/drivers/watchdog/ar7_wdt.c">pn i img src="../.static/gfx/right.png" alt=">>">pn /spa" pn spa" class="lxr_search">pn ipn i input typ"v3hidden" nam"v3navtarget" 2pn i input typ"v3text" nam"v3search" idv3search">pn i butt/optyp"v3submit">Searchpn i Prefs /a>pn /spa" i /div i form ac.52"="ajax+*" method="post" onsubmit="return false;">pn input typ"v3hidden" nam"v3ajax_lookup" idv3ajax_lookup" 2p i /form p i div class="headingbott/m">
div idv3file_contents"
   1 /a> spa" class="comment">/* /spa"
	   2 /a> spa" class="comment"> * drivers/watchdog/ar7_wdt.c /spa"
	   3 /a> spa" class="comment"> * /spa"
	   4 /a> spa" class="comment"> * Copyright (C) 2007 Nicolas Thill <nico@openwrt.org> /spa"
	   5 /a> spa" class="comment"> * Copyright (c) 2005 Enrik Berkha" <Enrik.Berkha"@akk.org> /spa"
	   6 /a> spa" class="comment"> * /spa"
	   7 /a> spa" class="comment"> * Some code taken from: /spa"
	   8 /a> spa" class="comment"> * Na.52"al Semiconductor SCx200 Watchdog support /spa"
	   9 /a> spa" class="comment"> * Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com> /spa"
	  optia> spa" class="comment"> * /spa"
	  11 /a> spa" class="comment"> * This program is free software; you ca" redistribute it and/or modify /spa"
	  12 /a> spa" class="comment"> * it under the terms of the GNU General Public License as published by /spa"
	  13 /a> spa" class="comment"> * the Free Software Founda.52"; either vers2/op2 of the License, or /spa"
	  14 /a> spa" class="comment"> * (at your 12.52") any later vers2/o. /spa"
	  15 /a> spa" class="comment"> * /spa"
	  16 /a> spa" class="comment"> * This program is distributed in the hope that it will be useful, /spa"
	  17 /a> spa" class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of /spa"
	  18 /a> spa" class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the /spa"
	  19 /a> spa" class="comment"> * GNU General Public License for more details. /spa"
	  2ptia> spa" class="comment"> * /spa"
	  21 /a> spa" class="comment"> * You should have received a copy of the GNU General Public License /spa"
	  22 /a> spa" class="comment"> * along with this program; if not, write to the Free Software /spa"
	  23 /a> spa" class="comment"> * Founda.52", Inc., 51 Franklin St, Fifth Floor, Bost2", MA  02110-1301  USA /spa"
	  24 /a> spa" class="comment"> */ /spa"
	  25 /a>	  26 /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>  spa" class="string">": " /spa"
  a href="+code=fmt" class="sref">fmt /a>	  27 /a>	  28 /a>#include <linux/module.h /a>>	  29 /a>#include <linux/moduleparam.h /a>>	  30 /a>#include <linux/errno.h /a>>	  31 /a>#include <linux/init.h /a>>	  32 /a>#include <linux/miscdevice.h /a>>	  33 /a>#include <linux/platform_device.h /a>>	  34 /a>#include <linux/watchdog.h /a>>	  35 /a>#include <linux/fs.h /a>>	  36 /a>#include <linux/ioport.h /a>>	  37 /a>#include <linux/io.h /a>>	  38 /a>#include <linux/uaccess.h /a>>	  39 /a>#include <linux/clk.h /a>>	  40 /a>	  41 /a>#include <asm/addrspace.h /a>>	  42 /a>#include <asm/mach-ar7/ar7.h /a>>	  43 /a>	  44 /a>#define  a href="+code=LONGNAME" class="sref">LONGNAME /a>  spa" class="string">"TI AR7 Watchdog Timer" /spa"
	  45 /a>	  46 /a> a href="+code=MODULE_AUTHOR" class="sref">MODULE_AUTHOR /a>( spa" class="string">"Nicolas Thill <nico@openwrt.org>" /spa"
);	  47 /a> a href="+code=MODULE_DESCRIPTION" class="sref">MODULE_DESCRIPTION /a>( a href="+code=LONGNAME" class="sref">LONGNAME /a>);	  48 /a> a href="+code=MODULE_LICENSE" class="sref">MODULE_LICENSE /a>( spa" class="string">"GPL" /spa"
);	  49 /a> a href="+code=MODULE_ALIAS_MISCDEV" class="sref">MODULE_ALIAS_MISCDEV /a>( a href="+code=WATCHDOG_MINOR" class="sref">WATCHDOG_MINOR /a>);	  50 /a>	  51 /a>static int  a href="+code=margin" class="sref">margin /a> = 60;	  52 /a> a href="+code=module_param" class="sref">module_param /a>( a href="+code=margin" class="sref">margin /a>, int, 0);	  53 /a> a href="+code=MODULE_PARM_DESC" class="sref">MODULE_PARM_DESC /a>( a href="+code=margin" class="sref">margin /a>,  spa" class="string">"Watchdog margin in seconds" /spa"
);	  54 /a>	  55 /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>;	  56 /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);	  57 /a> a href="+code=MODULE_PARM_DESC" class="sref">MODULE_PARM_DESC /a>( a href="+code=nowayout" class="sref">nowayout /a>,  spa" class="string">"Disable watchdog shutdown o" close" /spa"
);	  58 /a>	  59 /a>#define  a href="+code=READ_REG" class="sref">READ_REG /a>( a href="+code=x" class="sref">x /a>)  a href="+code=readl" class="sref">readl /a>((void  a href="+code=__iomem" class="sref">__iomem /a> *)&( a href="+code=x" class="sref">x /a>))	  60 /a>#define  a href="+code=WRITE_REG" class="sref">WRITE_REG /a>( a href="+code=x" class="sref">x /a>,  a href="+code=v" class="sref">v /a>)  a href="+code=writel" class="sref">writel /a>(( a href="+code=v" class="sref">v /a>), (void  a href="+code=__iomem" class="sref">__iomem /a> *)&( a href="+code=x" class="sref">x /a>))	  61 /a>	  62 /a>struct  a href="+code=ar7_wdt" class="sref">ar7_wdt /a> {	  63 /a>         a href="+code=u32" class="sref">u32 /a>  a href="+code=kick_lock" class="sref">kick_lock /a>;	  64 /a>         a href="+code=u32" class="sref">u32 /a>  a href="+code=kick" class="sref">kick /a>;	  65 /a>         a href="+code=u32" class="sref">u32 /a>  a href="+code=change_lock" class="sref">change_lock /a>;	  66 /a>         a href="+code=u32" class="sref">u32 /a>  a href="+code=change" class="sref">change /a>;	  67 /a>         a href="+code=u32" class="sref">u32 /a>  a href="+code=disable_lock" class="sref">disable_lock /a>;	  68 /a>         a href="+code=u32" class="sref">u32 /a>  a href="+code=disable" class="sref">disable /a>;	  69 /a>         a href="+code=u32" class="sref">u32 /a>  a href="+code=prescale_lock" class="sref">prescale_lock /a>;	  70 /a>         a href="+code=u32" class="sref">u32 /a>  a href="+code=prescale" class="sref">prescale /a>;	  71 /a>};	  72 /a>	  73 /a>static unsigned long  a href="+code=wdt_is_open" class="sref">wdt_is_open /a>;	  74 /a>static unsigned  a href="+code=expect_close" class="sref">expect_close /a>;	  75 /a>static  a href="+code=DEFINE_SPINLOCK" class="sref">DEFINE_SPINLOCK /a>( a href="+code=wdt_lock" class="sref">wdt_lock /a>);	  76 /a>	  77 /a> spa" class="comment">/* XXX currently fixed, allows max margin ~68.72 secs */ /spa"
	  78 /a>#define  a href="+code=prescale_2prescale_2 0xffff	  79 /a>	  8ptia> spa" class="comment">/* Resource of the WDT registers */ /spa"
	  81 /a>static struct  a href="+code=resource" class="sref">resource /a> * a href="+code=ar7_regs_wdt" class="sref">ar7_regs_wdt /a>;	  82 /a> spa" class="comment">/* Pointer to the remapped WDT IO space */ /spa"
	  83 /a>static struct  a href="+code=ar7_wdt" class="sref">ar7_wdt /a> * a href="+code=ar7_wdt" class="sref">ar7_wdt /a>;	  84 /a>	  85 /a>static struct  a href="+code=clk" class="sref">clk /a> * a href="+code=vbus_clk" class="sref">vbus_clk /a>;	  86 /a>	  87 /a>static void  a href="+code=ar7_wdt_kick" class="sref">ar7_wdt_kick /a>( a href="+code=u32" class="sref">u32 /a>  a href="+code=22)	  88 /a>{	  89 /a>         a href="+code=WRITE_REG" class="sref">WRITE_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=kick_lock" class="sref">kick_lock /a>, 0x5555);	  90 /a>        if (( a href="+code=READ_REG" class="sref">READ_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=kick_lock" class="sref">kick_lock /a>) & 3) == 1) {	  91 /a>                 a href="+code=WRITE_REG" class="sref">WRITE_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=kick_lock" class="sref">kick_lock /a>, 0xaaaa);	  92 /a>                if (( a href="+code=READ_REG" class="sref">READ_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=kick_lock" class="sref">kick_lock /a>) & 3) == 3) {	  93 /a>                         a href="+code=WRITE_REG" class="sref">WRITE_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=kick" class="sref">kick /a>,  a href="+code=v2);	  94 /a>                        return;	  95 /a>                }	  96 /a>        }	  97 /a>         a href="+code=pr_err" class="sref">pr_err /a>( spa" class="string">"failed to unlock WDT kick reg\n" /spa"
);	  98 /a>}	  99 /a>	 100 /a>static void  a href="+code=ar7_wdt_prescale" class="sref">ar7_wdt_prescale /a>( a href="+code=u32" class="sref">u32 /a>  a href="+code=22)	 101 /a>{	 102 /a>         a href="+code=WRITE_REG" class="sref">WRITE_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=prescale_lock" class="sref">prescale_lock /a>, 0x5a5a);	 103 /a>        if (( a href="+code=READ_REG" class="sref">READ_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=prescale_lock" class="sref">prescale_lock /a>) & 3) == 1) {	 104 /a>                 a href="+code=WRITE_REG" class="sref">WRITE_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=prescale_lock" class="sref">prescale_lock /a>, 0xa5a5);	 105 /a>                if (( a href="+code=READ_REG" class="sref">READ_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=prescale_lock" class="sref">prescale_lock /a>) & 3) == 3) {	 106 /a>                         a href="+code=WRITE_REG" class="sref">WRITE_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=prescale" class="sref">prescale /a>,  a href="+code=v2);	 107 /a>                        return;	 108 /a>                }	 109 /a>        }	 110 /a>         a href="+code=pr_err" class="sref">pr_err /a>( spa" class="string">"failed to unlock WDT prescale reg\n" /spa"
);	 111 /a>}	 112 /a>	 113 /a>static void  a href="+code=ar7_wdt_change" class="sref">ar7_wdt_change /a>( a href="+code=u32" class="sref">u32 /a>  a href="+code=22)	 114 /a>{	 115 /a>         a href="+code=WRITE_REG" class="sref">WRITE_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=change_lock" class="sref">change_lock /a>, 0x6666);	 116 /a>        if (( a href="+code=READ_REG" class="sref">READ_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=change_lock" class="sref">change_lock /a>) & 3) == 1) {	 117 /a>                 a href="+code=WRITE_REG" class="sref">WRITE_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=change_lock" class="sref">change_lock /a>, 0xbbbb);	 118 /a>                if (( a href="+code=READ_REG" class="sref">READ_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=change_lock" class="sref">change_lock /a>) & 3) == 3) {	 119 /a>                         a href="+code=WRITE_REG" class="sref">WRITE_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=change" class="sref">change /a>,  a href="+code=v2);	 120 /a>                        return;	 121 /a>                }	 122 /a>        }	 123 /a>         a hrefhref="+code=pr_err" class="sref">pr_err /a>( spa" class="string">"failed tolass="prescale reg\n" /spa"
);	        }	  25 /a>	 113 /a>static void  a href="+code=="+code=disable" class="+code=="+codet_change /a>( a href="+code=u32" class="sref">u32 /a>  a href="+code=22)	) == 3) {	  68 /a>         a href="+code=WRITE_REG" class="sref">WRITE_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=disable_lock" class="sref">disable_lock7777; /spa"
);	 119 /a>        if (( a href="+code=READ_REG" class="sref">READ_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=disable_lock" class="sref">disable_lock /a>) & 3) == 1) {	 120 /a>                 a href="+code=WRITE_REG" class="sref">WRITE_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=disable_lock" class="sref">disable_lockcccc; /spa"
);	 121 /a>                if (( a href="+code=READ_REG" class="sref">READ_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=disable_lock" class="sref">disable_lock /a>) &2 3) == 1) {	  92 /a>                         a href="+code=WRITE_REG" class="sref">WRITE_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=disable_lock" class="sref">disable_lockdddd; /spa"
);	  93 /a>                        if (( a href="+code=READ_REG" class="sref">READ_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+code=disable_lock" class="sref">disable_lock /a>) & 3) == 3) {	  94 /a>                                 a href="+code=WRITE_REG" class="sref">WRITE_REG /a>( a href="+code=ar7_wdt" class="sref">ar7_wdt /a>-> a href="+codeble_lock" class="sref"">change /a>,  a href="+code=v2);	 105 /a>                                return;	 106 /a>                        }	 117 /a>                }	  68 /a>        }	  89 /a>         a hrefhref="+code=pr_err" class="sref">pr_err /a>( spa" class="string">"failed to="sref"prescale reg\n" /spa"
);	        }	  61 /a>	 113 /a>static void  a href="+code=update_="+code=margin" class="+code=update_="+codsref">static int  a hrefnew_="+code=margin" classnew_="+codf">2)	) == 3) {	  64 /a>         a href="+code=u32" class="sref">u32 /a>  a href="+code=change" class="sref">change /a>;	  65 /a>         a href="+code=u32" class="sref">u32 /a>  a href="sreratede=vchange /a>;	  86 /a>	  97 /a>         a href="sreratede=vchyout /a> =  a hrefclk_geteratede=v( a href="+code=vbus_clk" class="sref">vbus; /spa"
);	  68 /a>         a href="+code=change" class="sref">chyout /a> =  a hrefnew_="+code=margin" classnew_="+codf">2omme         a href="sreratede=vchy/>#define  a href="+code=prescale_2prescale_2; /spa"
);	 119 /a>             a href="+code=change" class="sref">chys Thp; /spa"
);	 120 /a>                 a href="+code=change" class="sref">chyou1 /spa"
);	 119 /a>             a href="+code=change" class="sref">chysdt   92 /a>                 a href="+code=change" class="sref">chyouot" /a /spa"
);	 123 /a>         a href="+code=ar7_wdt_change" class="sref">ar7_wdt_change /a>( a href="+code=change" class="sref">ch; /spa"
);	  64 /a>         a href="+code=margin" class="sref">margi         a href="+code=change" class="sref">chy*>#define  a href="+code=prescale_2prescale_2#define  a href="sreratede=vchange /a>;	  65 /a>         a hreflasinfo+code=pr_err" clasinfosref">pr_err /a>( spa" class="stttchdlows max%dargin in (ock WDT p%d,olass="p%d,ofreqp%d)cale reg\n",nge /a>;	 106 /a>                 a href="+code=margin" class="sref">maange /a>,  a href="+code=prescale_2prescale_2ange /a>,  a href="+code=change" class="sref">change /a>,  a href="sreratede=vch; /spa"
);	        }	  58 /a>	 113 /a>static void  a href="+code=enref">ode=ar7_wdt" class="sref"=enref">odesref">sta /spa"
);	) == 3) {	  65 /a>         a hreflasdebug+code=pr_err" clasdebugsref">pr_err /a>( spa" class="stenrefi"> *isable wttchdcale reg\n" /spa"
);	 102 /a>         a href="+code=="+code=disable" class="+code=="+codet_cha1; /spa"
);	  63 /a>         a href="+code=ar7_wdt_kick" class="sref">ar7_wdt_k1; /spa"
);	        }	  25 /a>	 113 /a>static void  a href="+code=="+code>ode=ar7_wdt" class="sref"=="+code>odesref">sta /spa"
);	) == 3) {	  68 /a>         a hreflasdebug+code=pr_err" clasdebugsref">pr_err /a>( spa" class="st="+codi"> *isable wttchdcale reg\n" /spa"
);	  69 /a>         a href="+code=="+code=disable" class="+code=="+codet_chaol /a>, 0);	        }	  61 /a>	 113 /a>static int  a href="+code==wdt_is_open" class="+code==wdtt_cha>static struct  a hrefinhre_is_open" classinhre">chy* struct  a hrefinhre_is_open" classinhre">ch,a>static struct  a hrefdiv _is_open" classdiv ">chy* struct  a hrefdiv _is_open" classdiv ">ch /spa"
);	) == 3) {	  64 /a>  82 /a> spa" class="commonlyy fixemone at awttchIO space */ /spa"
	  65 /a>             a hreftest_and_set_bie=ar7_wdt" classtest_and_set_biet_chao,ock /a         a hrefw"+code=wdt_is_open" class="sref">wdt_is_f">x /a>))	 106 /a>               -         a hrefEBUSY_is_open" classEBUSY">change /a>;	  97 /a>         a href="+code=enref">ode=ar7_wdt" class="sref"=enref">odesref"l /a>, 0);	  68 /a>         a href="+code=expect_close" class="sref">expect_cyouo /a>, 0);	  79 /a>	 120 /a>       t /a> =  a hrefnonseekref">=wdt_is_open" classnonseekref">=wdtt_change /a>( a hrefinhre_is_open" classinhre">ch,a struct  a hrefdiv _is_open" classdiv ">ch  /a>, 0);	 111 /a>}	 112 /a>	  83 /a>static int  a href="+code=releapect_close" class="+code=releapet_cha>static struct  a hrefinhre_is_open" classinhre">chy* struct  a hrefinhre_is_open" classinhre">ch,a>static struct  a hrefdiv _is_open" classdiv ">chy* struct  a hrefdiv _is_open" classdiv ">ch /spa"
);	 114 /a>{	  65 /a>    !         a href="+code=expect_close" class="sref">expect_c /spa"
);	 106 /a>                 a hreflaswart_is_open" classlaswartsref">pr_err /a>( spa" class="st*isable wlatfor >exped un="srefedly, that noto="sref"pnter*isable wttchdcale reg\n" /spa"
);	  97 /a>else>    !         a href="+code=nowayout" class="sref">nowa /spa"
);	 118 /a>        ic void  a href="+code=="+code>ode=ar7_wdt" class="sref"=="+code>odesref"; /spa"
);	  89 /a>         a hrefclear_bie=ar7_wdt" classclear_biet_chao,ock /a         a hrefw"+code=wdt_is_open" class="sref">wdt_is_f /spa"
);	 120 /a>       o /a>, 0);	 111 /a>}	 112 /a>	  83 /a         a hrefssize_e=ar7_wdt" classssize_eref">u32 /a>  a href="sref"=="sre=ar7_wdt" class="sref"=="sret_cha>static struct  a hrefdiv _is_open" classdiv ">chy* struct  a hrefdiv _is_open" classdiv ">ch, constolasry* struct  a hrefdatable_lock" class=ata">ch, 112 /a>	  94 /a>                9 /a>         a hrefsize_e=ar7_wdt" classsize_eref">u32 /a>  a hrefldt_is_open" classlef">maange /a>,  a hrefloff_e=ar7_wdt" classloff_e">chy* struct  a hrefppos_is_open" classlposnowa /spa"
);	 114 /a>{	  96 /a>  82 /a> spa" class="commcheck for awmag /a>expeolasrac>/* O space */ /spa"
	  97 /a>             a hrefldt_is_open" classlef">ma 3) == 3) {	 118 /a>        ic void  a hrefsize_e=ar7_wdt" classsize_eref">u32 /a>  a hrefi_is_open" classi">change /a>;	  99 /a>	 120 /a>                 a hrefspin=disable_lock" classspin=disat_chack /a         a hrefw"+code=wdt_lock" class="sref">wdt_lock /a>);	  91 /a>                 a href="+code=ar7_wdt_kick" class="sref">ar7_wdt_k1; /spa"
);	  92 /a>                 a hrefspin=t;failble_lock" classspin=t;failt_chack /a         a hrefw"+code=wdt_lock" class="sref">wdt_lock /a>);	  43 /a>	 104 /a>                 a href="+code=expect_close" class="sref">expect_cyouo /a>, 0);	 105 /a>        for ange /a>( a hrefi_is_open" classi">chyouo >u32 /a>  a hrefi_is_open" classi">chys Thp         a hrefldt_is_open" classlef">ma; ++u32 /a>  a hrefi_is_open" classi">ch 3) == 3) {	 106 /a>                lasry         a hrefc=ar7_wdt" classc">change /a>;	 107 /a>                             a hrefgeteuse"+code=pr_err" cgeteuse"t_change /a>( a href==ar7_wdt" classc">change /a>,  a hrefdatable_lock" class=ata">ch +>u32 /a>  a hrefi_is_open" classi">chf">x /a>))	 108 /a>                               -         a hrefEFAUL_NOWAYOUT" classEFAUL_">change /a>;	 119 /a>                             a href==ar7_wdt" classc">ch&>pr_err /a>( spa" clas#39;Vs#39;\n"nge /a>;	 120 /a>                                 a href="+code=expect_close" class="sref">expect_cyou1 /spa"
);	 121 /a>                }	 112 /a>	  63 /a>        }	 104 /a>       t /a> =  a hrefldt_is_open" classlef">ma;       }	        }	  86 /a>	  87 /ansigned long  a href="sref">ioctde=writel" class="sref">ioctdt_cha>static struct  a hrefdiv _is_open" classdiv ">chy* struct  a hrefdiv _is_open" classdiv ">ch,  86 /a>	 118 /a>                                >static u>static int  a hrefcmd=ar7_wdt" classcmd">chan>static unsigned long  a hrefarg+code=pr_err" cargnowa /spa"
);	) == 3) {	 120 /a>  87 /aconsto>static struct  a hrefdrivers/sinfo+code=pr_err" cdrivers/sinforef">u32 /a>  a hrefidss="is_open" classidss=ct_cyou) == 3) {	 121 /a>        .u32 /a>  a hrefidss=ity"is_open" classidss=ityct_cyouu32 /a>  a href="+code=LONGNAME" class="sref">LONG,  86 /a>	  92 /a>        .u32 /a>  a hreffirmware_ref=iot_is_open" classfirmware_ref=iotct_cyou1,  86 /a>	  93 /a>        .u32 /a>  a hrefoptiots_is_open" classoptiotsct_cyouCDEV /a>( a href=DIOF_SETTIMEOG_NOWAYOUT" class=DIOF_SETTIMEOG_ct_cy|          a href=DIOF_KEEPALIVEPINWRITE_REG" class=DIOF_KEEPALIVEPINWct_cy|  86 /a>	  94 /a>                                                 a href=DIOF_MAGICCLOLE_LICENSE" class=DIOF_MAGICCLOLEnowa ,  86 /a>	 105 /a>  71 /a>};	 116 /a> static int  a hrefnew_="+code=margin" classnew_="+codf">2 71 /a>};	71 /a>};	  68 /a>swiive           a href=md=ar7_wdt" classcmd">ch 3) == 3) {	 119 /a>casa>#define  a href=DIOC_GETSUPPOR_NOWAYOUT" class=DIOC_GETSUPPOR_19">: == 3) {	 120 /a>                     a href=opy_toeuse"+code=pr_err" c=opy_toeuse"t_chaa>static struct  a hrefdrivers/sinfo+code=pr_err" cdrivers/sinforef">*)ed long  a hrefarg+code=pr_err" cargnowa,ock /a         a hrefidss="is_open" classidss=ct_c,  86 /a>	 121 /a>                        sizeofange /a>( a hrefidss="is_open" classidss=ct_c)f">x /a>))	  92 /a>                       -         a hrefEFAUL_NOWAYOUT" classEFAUL_">change /a>;	  93 /a>               o /a>, 0);	  94 /a>casa>#define  a href=DIOC_GETSTATUSNOWAYOUT" class=DIOC_GETSTATUS19">: == 3) {	 105 /a>casa>#define  a href=DIOC_GETBOOTSTATUSNOWAYOUT" class=DIOC_GETBOOTSTATUS19">: == 3) {	 106 /a>                     a hrefputeuse"+code=pr_err" cputeuse"t_chao,o">sta*)ed long  a hrefarg+code=pr_err" cargnowaf">x /a>))	 117 /a>                       -         a hrefEFAUL_NOWAYOUT" classEFAUL_">change /a>;	 118 /a>               o /a>, 0);	 119 /a>casa>#define  a href=DIOC_KEEPALIVENOWAYOUT" class=DIOC_KEEPALIVE19">: == 3) {	 120 /a>                 a href="+code=ar7_wdt_kick" class="sref">ar7_wdt_k1; /spa"
);	 121 /a>               o /a>, 0);	 119 /a>casa>#define  a href=DIOC_SETTIMEOG_NOWAYOUT" class=DIOC_SETTIMEOG_ct_c: == 3) {	  93 /a>                     a hrefgeteuse"+code=pr_err" cgeteuse"t_change /a>( a hrefnew_="+code=margin" classnew_="+codf">2,o">sta*)ed long  a hrefarg+code=pr_err" cargnowaf">x /a>))	  94 /a>                       -         a hrefEFAUL_NOWAYOUT" classEFAUL_">change /a>;	 105 /a>                     a hrefnew_="+code=margin" classnew_="+codf">2os Thp; /spa"
);	 106 /a>                       -         a hrefEINVALNOWAYOUT" classEINVAL">change /a>;	71 /a>};	 118 /a>        ic void  a hrefspin=disable_lock" classspin=disat_chack /a         a hrefw"+code=wdt_lock" class="sref">wdt_lock /a>);	 119 /a>                 a href="+code=update_="+code=margin" class="+code=update_="+codsref"         a hrefnew_="+code=margin" classnew_="+codf">2lock /a>);	 120 /a>                 a href="+code=ar7_wdt_kick" class="sref">ar7_wdt_k1; /spa"
);	  91 /a>                 a hrefspin=t;failble_lock" classspin=t;failt_chack /a         a hrefw"+code=wdt_lock" class="sref">wdt_lock /a>);	 112 /a>	 123 /a>casa>#define  a href=DIOC_GETTIMEOG_NOWAYOUT" class=DIOC_GETTIMEOG_ct_c: == 3) {	  94 /a>                     a hrefputeuse"+code=pr_err" cputeuse"t_cha         a href="+code=margin" class="sref">maan">sta*)ed long  a hrefarg+code=pr_err" cargnowaf">x /a>))	 105 /a>                       -         a hrefEFAUL_NOWAYOUT" classEFAUL_">change /a>;	 106 /a>               o /a>, 0);	 117 /a>default: == 3) {	 118 /a>               -         a hrefENOTTY_is_open" classENOTTY">change /a>;	 109 /a>        }	        }	  61 /a>	 113 /aconsto>static struct  a hrefdiv ">wdratiots_is_open" classdiv ">wdratiotsref">u32 /a>  a href="sref">fops_is_open" class="sref">fopsct_cyou) == 3) {	  63 /a>.u32 /a>  a hrefowne"+code=pr_err" cowne"18"> 118 /a>  ouu32 /a>  a hrefTHIS_MODULENOWAYOUT" classTHIS_MODULEct_c,  86 /a>	  63 /a>.u32 /a>  a href="sre=ar7_wdt" class="sret_ch 118 /a>  ouu32 /a>  a href="sref"=="sre=ar7_wdt" class="sref"=="sret_ch,  86 /a>	  63 /a>.u32 /a>  a hreft;failed>ioctde=writel" classt;failed>ioctdct_cyouu32 /a>  a href="sref">ioctde=writel" class="sref">ioctdt_ch,  86 /a>	  63 /a>.u32 /a>  a hrefowdt_is_open" class>wdt_is_  118 /a>  ouu32 /a>  a href="sref"==wdt_is_open" class="+code==wdtt_ch,  86 /a>	  63 /a>.u32 /a>  a hrefreleapect_close" classreleapet_ch18 /a>  ouu32 /a>  a href="sref"=releapect_close" class="+code=releapet_ch,  86 /a>	  68 /a>.u32 /a>  a hrefllseek_is_open" classllseek_is_  118 /a>out /a> =  a hrefno_llseek_is_open" classno_llseekt_ch,  86 /a>	  71 /a>};	71 /a>};	  85 /a>static struct  a hrefmisclatfore=margin" class=isclatforref">u32 /a>  a href="sref">=isclatct_close" class="+code==isclatct_cyou) == 3) {	  68 /a>.u32 /a>  a hrefmino"+code=pr_err" cmino"t_ch 118 /a>  ouu32 /a>  a hrefWATCHDOG_MINORNOWAYOUT" class=ATCHDOG_MINORt_ch,  86 /a>	  63 /a>.u32 /a>  a href="li_is_open" classn"li_is_  118 /a>  ouupr_err /a>( spa" class="st*isable le reg\n",nge /a>;	  63 /a>.u32 /a>  a hreffops_is_open" classfopsct_cy 118 /a>  ouck /a         a href="sref">fops_is_open" class="sref">fopsct_c,nge /a>;	  71 /a>};	  86 /a>	  87 /a>static int  a href="+code=probect_close" class="+code=probet_cha>static struct  a hrefplatform_latfore=margin" classplatform_latforref">* struct  a hrefplatct_close" classplatct_c">x /a>))	) == 3) {	 119 /a> static int  a hrefr==ar7_wdt" classrc">change /a>;	71 /a>};	  65 /a>         a hrefatchregs>ode=ar7_wdt" class="srregs>odect_cyo71 /a>};	  92 /a>                 a hrefplatform_geteresource_by="li_is_open" classplatform_geteresource_by="lit_cha         a hrefplatct_close" classplatct_cange /a>,  a hrefIORESOURCE_MEMct_close" classIORESOURCE_MEMct_cangpr_err /a>( spa" class="stregsle reg\n" /spa"
);	 103 /a>    !         a hrefatchregs>ode=ar7_wdt" class="srregs>odect_c 3) == 3) {	 104 /a>                 a hrefhref="+code=pr_err" class="sref">pr_err /a>( spa" class="stcould notogetpresistef= resourcecale reg\n" /spa"
);	 105 /a>               -         a hrefENODEV_is_open" classENODEV">change /a>;	 106 /a>        }	71 /a>};	  68 /a>         a hrefatchdogct_close" class="+codect_cyouu32 /a>  a hreflatm>ioremaperesourcect_close" classlatm>ioremaperesourcet_chack /a         a hrefplatct_close" classplatct_c_wdt /a>-> a href=atct_close" classlatct_cange /a>,  a hrefatchregs>ode=ar7_wdt" class="srregs>odect_c ange /a>;	 119 /a>             a hrefIS_ERRNOWAYOUT" classIS_ERRt_cha         a hrefatchdogct_close" class="+codect_cf">x /a>))	 120 /a>               t /a> =  a hrefPTR_ERRNOWAYOUT" classPTR_ERRt_cha         a hrefatchdogct_close" class="+codect_cfange /a>;	  61 /a>	 102 /a>         a href="+code=vbus_clk" class="sref">vbusyout /a> =  a hrefclk_getvbus_clk" classclk_gett_cha         a hrefNULLNOWAYOUT" classNULLct_cangpr_err /a>( spa" class="st="srle reg\n" /spa"
);	 103 /a>             a hrefIS_ERRNOWAYOUT" classIS_ERRt_cha         a href="+code=vbus_clk" class="sref">vbus; 3) == 3) {	  94 /a>                 a hrefhref="+code=pr_err" class="sref">pr_err /a>( spa" class="stcould notogetp="srrr ockcale reg\n" /spa"
);	 105 /a>               t /a> =  a hrefPTR_ERRNOWAYOUT" classPTR_ERRt_cha         a href="+code=vbus_clk" class="sref">vbus; /spa"
);	 106 /a>        }	71 /a>};	  68 /a>         a hrefatchdog=="+code>ode=ar7_wdt" class="sref"=="+code>odesref"; /spa"
);	  69 /a>         a href="+code=="sref">ct_close" class="+code=prsref">t_cha         a hrefp"+code=prescale_2prescale_2; /spa"
);	 120 /a>         a href="+code=update_="+code=margin" class="+code=update_="+codsref"         a href="+code=margin" class="sref">ma; /spa"
);	  61 /a>	 102 /a>         a hrefr==ar7_wdt" classrc">chyout /a> =  a href=isc_resistefe=margin" class=isc_resisteft_chack /a         a href="sref">=isclatct_close" class="+code==isclatct_c; /spa"
);	 103 /a>             a hrefr==ar7_wdt" classrc">ch 3) == 3) {	 104 /a>                 a hrefhref="+code=pr_err" class="sref">pr_err /a>( spa" class="stunref"pnopresistef =iscwlatforcale reg\n" /spa"
);	 105 /a>        gonopu32 /a>  a hrefoe=nowayout" classf">nowa /spa"
);	 106 /a>        }	 107 /a>       o /a>, 0);	  58 /a>	u32 /a>  a hrefoe=nowayout" classf">nowa: == 3) {	 120 /a>         a hrefclk_pe=nowayout" classclk_pe=t_cha         a href="+code=vbus_clk" class="sref">vbus; /spa"
);	  65 /a>         a href="+code=vbus_clk" class="sref">vbusyout /a> =  a hrefNULLNOWAYOUT" classNULLct_c /spa"
);	 107 /a>       tic int  a hrefr==ar7_wdt" classrc">change /a>;	        }	       }	  83 /a>static int  a href="+code=removect_close" class="+code=removet_cha>static struct  a hrefplatform_latfore=margin" classplatform_latforref">* struct  a hrefplatct_close" classplatct_c">x /a>))	) == 3) {	  97 /a>         a href=isc_deresistefe=margin" class=isc_deresisteft_chack /a         a href="sref">=isclatct_close" class="+code==isclatct_c; /spa"
);	  68 /a>         a href=lk_pe=nowayout" classclk_pe=t_cha         a href="+code=vbus_clk" class="sref">vbus; /spa"
);	  69 /a>         a href="+code=vbus_clk" class="sref">vbusyout /a> =  a hrefNULLNOWAYOUT" classNULLct_c /spa"
);	 120 /a>       o /a>, 0);	 111 /a>}	 112 /a>	  83 /a>static void  a href="+code=shutdowde=margin" class="+code=shutdowdt_cha>static struct  a hrefplatform_latfore=margin" classplatform_latforref">* struct  a hrefplatct_close" classplatct_c">x /a>))	 114 /a>{	 105 /a>    !         a href="+code=nowayout" class="sref">nowa /spa"
);	 106 /a>                 a hrefatchdog=="+code>ode=ar7_wdt" class="sref"=="+code>odesref"; /spa"
);	        }	  58 /a>	 113 /a>static struct  a hrefplatform_l hrefe=margin" classplatform_l hrefref">u32 /a>  a href="sref">l hrefe=margin" class="sref">l hrefct_cyou) == 3) {	 120 /a>.u32 /a>  a hrefprobect_close" classprobet_ch ouu32 /a>  a href="sref"=probect_close" class="+code=probet_ch,nge /a>;	 121 /a>.u32 /a>  a hrefremovect_close" classremovet_ch ouu32 /a>  a href="sref"=removect_close" class="+code=removet_ch,nge /a>;	  68 /a>.u32 /a>  a hrefshutdowde=margin" classshutdowdt_ch ouu32 /a>  a href="sref"=shutdowde=margin" class="+code=shutdowdt_ch,nge /a>;	  63 /a>.u32 /a>  a hrefl hrefe=margin" classl hrefct_cyou) == 3) {	 104 /a>        .u32 /a>  a hrefowne"+code=pr_err" cowne"18"> ouu32 /a>  a hrefTHIS_MODULENOWAYOUT" classTHIS_MODULEct_c,  86 /a>	 105 /a>        .u32 /a>  a href="li_is_open" classn"li_is_ ouupr_err /a>( spa" class="statchdogle reg\n",nge /a>;	 106 /a>},nge /a>;	  71 /a>};	  58 /a>	u32 /a>  a hrefmodude>platform_l hrefe=margin" classmodude>platform_l hreft_cha         a hrefatchdog>l hrefe=margin" class="sref">l hrefct_c; /spa"
);	
The original LXR software bypnterspa" ); LXR claunityct_c,pntis ="srriass=al vef=iot bypspa" ); lxf@ clux.noct_c. lxf. clux.no kindly hosted bypspa" ); Redpill Lclpro ASct_c,pprovider of Lcluxaconsulti"> and >wdratiots sertfors since"13L5.