linux/drivers/watchdog/imx2_wdt.c
<<
span> n>san> class="lxr_searchion> acon> ="+searchi method="post" onsubmit="return do_search(this);ion> COnput typ"v2hidden" nam"v2navtarget" lue="v2ion> COnput typ"v2text" nam"v2searchi idv2searchion> Cbutt vatyp"v2submit">Search span> n>san> class="lxr_pf="s" Pf="s span> hr/fodiv hr/frm> acon> ="ajax+*i method="post" onsubmit="return false;ion>COnput typ"v2hidden" nam"v2ajax_lookupi idv2ajax_lookupi lue="v2ion hr/form> n hr/fdiv class="headingbott m">
fdiv idv2file_contents" hr/1foaosan> class="comment">/*span> < ef="..ivers/watchdog/imx2_wdt.cst#L2i idv2L2i class="linei nam"v2L2i>hr/2foaosan> class="comment"> * Wchdog/i ivers/ rm> IMX2 and lats/ processorsspan> < ef="..ivers/watchdog/imx2_wdt.cst#L3i idv2L3i class="linei nam"v2L3i>hr/3foaosan> class="comment"> *span> < ef="..ivers/watchdog/imx2_wdt.cst#L4i idv2L4i class="linei nam"v2L4i>hr/4foaosan> class="comment"> * Copyright (C) 2010 Wolfram Sang, Pengutronix e.K. <w.sang@pengutronix.de>span> < ef="..ivers/watchdog/imx2_wdt.cst#L5i idv2L5i class="linei nam"v2L5i>hr/5foaosan> class="comment"> *span> < ef="..ivers/watchdog/imx2_wdt.cst#L6i idv2L6i class="linei nam"v2L6i>hr/6foaosan> class="comment"> * some parts adapted by similar ivers/s from Darius Augulis and Vladimirspan> < ef="..ivers/watchdog/imx2_wdt.cst#L7i idv2L7i class="linei nam"v2L7i>hr/7foaosan> class="comment"> * Zapolskiy, addion> al improvements by Wim V> Sebroeck.span> < ef="..ivers/watchdog/imx2_wdt.cst#L8i idv2L8i class="linei nam"v2L8i>hr/8foaosan> class="comment"> *span> < ef="..ivers/watchdog/imx2_wdt.cst#L9i idv2L9i class="linei nam"v2L9i>hr/9foaosan> class="comment"> * This program is free software; you c> redistribute it and/m> modify itspan> < ef="..ivers/watchdog/imx2_wdt.cst#L10i idv2L10i class="linei nam"v2L10i>hr class="comment"> * unds/ the ts/ms of the GNU General Public License rs/wn va2 as published byspan> < ef="..ivers/watchdog/imx2_wdt.cst#L11i idv2L11i class="linei nam"v2L11i>hr11foaosan> class="comment"> * the Free Software Foundaon> .span> < ef="..ivers/watchdog/imx2_wdt.cst#L12i idv2L12i class="linei nam"v2L12i>hr12foaosan> class="comment"> *span> < ef="..ivers/watchdog/imx2_wdt.cst#L13i idv2L13i class="linei nam"v2L13i>hr13foaosan> class="comment"> * NOTE: MX1 has a slightly different Wchdog/i th> MX2 and lats/:span> < ef="..ivers/watchdog/imx2_wdt.cst#L14i idv2L14i class="linei nam"v2L14i>hr14foaosan> class="comment"> *span> < ef="..ivers/watchdog/imx2_wdt.cst#L15i idv2L15i class="linei nam"v2L15i>hr15foaosan> class="comment"> * MX1: MX2+:span> < ef="..ivers/watchdog/imx2_wdt.cst#L16i idv2L16i class="linei nam"v2L16i>hr16foaosan> class="comment"> * ---- -----span> < ef="..ivers/watchdog/imx2_wdt.cst#L17i idv2L17i class="linei nam"v2L17i>hr17foaosan> class="comment"> * Regists/w: 32-bit 16-bitspan> < ef="..ivers/watchdog/imx2_wdt.cst#L18i idv2L18i class="linei nam"v2L18i>hr18foaosan> class="comment"> * Stopable tims/: Yes Nospan> < ef="..ivers/watchdog/imx2_wdt.cst#L19i idv2L19i class="linei nam"v2L19i>hr19foaosan> class="comment"> * Need to enable clk: No Yesspan> < ef="..ivers/watchdog/imx2_wdt.cst#L20i idv2L20i class="linei nam"v2L20i>hr2/opaosan> class="comment"> * Halt on suspend: Manual C> be aut maticspan> < ef="..ivers/watchdog/imx2_wdt.cst#L21i idv2L21i class="linei nam"v2L21i>hr21foaosan> class="comment"> */span> < ef="..ivers/watchdog/imx2_wdt.cst#L22i idv2L22i class="linei nam"v2L22i>hr22foao < ef="..ivers/watchdog/imx2_wdt.cst#L23i idv2L23i class="linei nam"v2L23i>hr23foao#include << ef="..includeinux+v/init.hi class="fref">nux+v/init.hfoao> < ef="..ivers/watchdog/imx2_wdt.cst#L24i idv2L24i class="linei nam"v2L24i>hr24foao#include << ef="..includeinux+v/kernel.hi class="fref">nux+v/kernel.hfoao> < ef="..ivers/watchdog/imx2_wdt.cst#L25i idv2L25i class="linei nam"v2L25i>hr25foao#include << ef="..includeinux+v/miscdevice.hi class="fref">nux+v/miscdevice.hfoao> < ef="..ivers/watchdog/imx2_wdt.cst#L26i idv2L26i class="linei nam"v2L26i>hr26foao#include << ef="..includeinux+v/module.hi class="fref">nux+v/module.hfoao> < ef="..ivers/watchdog/imx2_wdt.cst#L27i idv2L27i class="linei nam"v2L27i>hr27foao#include << ef="..includeinux+v/moduleparam.hi class="fref">nux+v/moduleparam.hfoao> < ef="..ivers/watchdog/imx2_wdt.cst#L28i idv2L28i class="linei nam"v2L28i>hr28foao#include << ef="..includeinux+v/platrm> _device.hi class="fref">nux+v/platrm> _device.hfoao> < ef="..ivers/watchdog/imx2_wdt.cst#L29i idv2L29i class="linei nam"v2L29i>hr29foao#include << ef="..includeinux+v/tchdog/i.hi class="fref">nux+v/tchdog/i.hfoao> < ef="..ivers/watchdog/imx2_wdt.cst#L30i idv2L30i class="linei nam"v2L30i>hr30foao#include << ef="..includeinux+v/clk.hi class="fref">nux+v/clk.hfoao> < ef="..ivers/watchdog/imx2_wdt.cst#L31i idv2L31i class="linei nam"v2L31i>hr31foao#include << ef="..includeinux+v/fs.hi class="fref">nux+v/fs.hfoao> < ef="..ivers/watchdog/imx2_wdt.cst#L32i idv2L32i class="linei nam"v2L32i>hr32foao#include << ef="..includeinux+v/io.hi class="fref">nux+v/io.hfoao> < ef="..ivers/watchdog/imx2_wdt.cst#L33i idv2L33i class="linei nam"v2L33i>hr33foao#include << ef="..includeinux+v/uaccess.hi class="fref">nux+v/uaccess.hfoao> < ef="..ivers/watchdog/imx2_wdt.cst#L34i idv2L34i class="linei nam"v2L34i>hr34foao#include << ef="..includeinux+v/tims/.hi class="fref">nux+v/tims/.hfoao> < ef="..ivers/watchdog/imx2_wdt.cst#L35i idv2L35i class="linei nam"v2L35i>hr35foao#include << ef="..includeinux+v/jiffies.hi class="fref">nux+v/jiffies.hfoao> < ef="..ivers/watchdog/imx2_wdt.cst#L36i idv2L36i class="linei nam"v2L36i>hr36foao < ef="..ivers/watchdog/imx2_wdt.cst#L37i idv2L37i class="linei nam"v2L37i>hr37foao#definea ef="..+code=DRIVER_NAME" class="sref">DRIVER_NAMEfoao san> class="string">"x2_w-t.c"span> < ef="..ivers/watchdog/imx2_wdt.cst#L38i idv2L38i class="linei nam"v2L38i>hr38foao < ef="..ivers/watchdog/imx2_wdt.cst#L39i idv2L39i class="linei nam"v2L39i>hr39foao#definea ef="..+code=IMX2_WDT_WCR" class="sref">IMX2_WDT_WCRfoao 0x00 san> class="comment">/* Control Regists/ */span> < ef="..ivers/watchdog/imx2_wdt.cst#L40i idv2L40i class="linei nam"v2L40i>hr40foao#definea ef="..+code=IMX2_WDT_WCR_WT" class="sref">IMX2_WDT_WCR_WTfoao (0xFF << 8) san> class="comment">/* -> Wchdog/i Timsout Field */span> < ef="..ivers/watchdog/imx2_wdt.cst#L41i idv2L41i class="linei nam"v2L41i>hr41foao#definea ef="..+code=IMX2_WDT_WCR_WRE" class="sref">IMX2_WDT_WCR_WREfoao (1 << 3) san> class="comment">/* -> WDOG Reset Enable */span> < ef="..ivers/watchdog/imx2_wdt.cst#L42i idv2L42i class="linei nam"v2L42i>hr42foao#definea ef="..+code=IMX2_WDT_WCR_WDE" class="sref">IMX2_WDT_WCR_WDEfoao (1 << 2) san> class="comment">/* -> Wchdog/i Enable */span> < ef="..ivers/watchdog/imx2_wdt.cst#L43i idv2L43i class="linei nam"v2L43i>hr43foao < ef="..ivers/watchdog/imx2_wdt.cst#L44i idv2L44i class="linei nam"v2L44i>hr44foao#definea ef="..+code=IMX2_WDT_WSR" class="sref">IMX2_WDT_WSRfoao 0x02 san> class="comment">/* Service Regists/ */span> < ef="..ivers/watchdog/imx2_wdt.cst#L45i idv2L45i class="linei nam"v2L45i>hr45foao#definea ef="..+code=IMX2_WDT_SEQ1" class="sref">IMX2_WDT_SEQ1foao 0x5555 san> class="comment">/* -> service sequence 1 */span> < ef="..ivers/watchdog/imx2_wdt.cst#L46i idv2L46i class="linei nam"v2L46i>hr46foao#definea ef="..+code=IMX2_WDT_SEQ2" class="sref">IMX2_WDT_SEQ2foao 0xAAAA san> class="comment">/* -> service sequence 2 */span> < ef="..ivers/watchdog/imx2_wdt.cst#L47i idv2L47i class="linei nam"v2L47i>hr47foao < ef="..ivers/watchdog/imx2_wdt.cst#L48i idv2L48i class="linei nam"v2L48i>hr48foao#definea ef="..+code=IMX2_WDT_WRSR" class="sref">IMX2_WDT_WRSRfoao 0x04 san> class="comment">/* Reset Status Regists/ */span> < ef="..ivers/watchdog/imx2_wdt.cst#L49i idv2L49i class="linei nam"v2L49i>hr49foao#definea ef="..+code=IMX2_WDT_WRSR_TOUT" class="sref">IMX2_WDT_WRSR_TOUTfoao (1 << 1) san> class="comment">/* -> Reset due to Timsout */span> < ef="..ivers/watchdog/imx2_wdt.cst#L50i idv2L50i class="linei nam"v2L50i>hr50foao < ef="..ivers/watchdog/imx2_wdt.cst#L51i idv2L51i class="linei nam"v2L51i>hr51foao#definea ef="..+code=IMX2_WDT_MAX_TIME" class="sref">IMX2_WDT_MAX_TIMEfoao 128 < ef="..ivers/watchdog/imx2_wdt.cst#L52i idv2L52i class="linei nam"v2L52i>hr52foao#definea ef="..+code=IMX2_WDT_DEFAULT_TIME" class="sref">IMX2_WDT_DEFAULT_TIMEfoao 60 san> class="comment">/* in seconds */span> < ef="..ivers/watchdog/imx2_wdt.cst#L53i idv2L53i class="linei nam"v2L53i>hr53foao < ef="..ivers/watchdog/imx2_wdt.cst#L54i idv2L54i class="linei nam"v2L54i>hr54foao#definea ef="..+code=WDOG_SEC_TO_COUNT" class="sref">WDOG_SEC_TO_COUNTfoao( ef="..+code=s" class="sref">sfoao) (( ef="..+code=s" class="sref">sfoao * 2 - 1) << 8) < ef="..ivers/watchdog/imx2_wdt.cst#L55i idv2L55i class="linei nam"v2L55i>hr55foao < ef="..ivers/watchdog/imx2_wdt.cst#L56i idv2L56i class="linei nam"v2L56i>hr56foao#definea ef="..+code=IMX2_WDT_STATUS_OPEN" class="sref">IMX2_WDT_STATUS_OPENfoao 0 < ef="..ivers/watchdog/imx2_wdt.cst#L57i idv2L57i class="linei nam"v2L57i>hr57foao#definea ef="..+code=IMX2_WDT_STATUS_STARTED" class="sref">IMX2_WDT_STATUS_STARTEDfoao 1 < ef="..ivers/watchdog/imx2_wdt.cst#L58i idv2L58i class="linei nam"v2L58i>hr58foao#definea ef="..+code=IMX2_WDT_EXPECT_CLOSE" class="sref">IMX2_WDT_EXPECT_CLOSEfoao 2 < ef="..ivers/watchdog/imx2_wdt.cst#L59i idv2L59i class="linei nam"v2L59i>hr59foao < ef="..ivers/watchdog/imx2_wdt.cst#L60i idv2L60i class="linei nam"v2L60i>hr60foaostatic struct { < ef="..ivers/watchdog/imx2_wdt.cst#L61i idv2L61i class="linei nam"v2L61i>hr61foao struct ef="..+code=clk" class="sref">clkfoao * ef="..+code=clk" class="sref">clkfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L62i idv2L62i class="linei nam"v2L62i>hr62foao void ef="..+code=__iomem" class="sref">__iomemfoao * ef="..+code=base" class="sref">basefoao; < ef="..ivers/watchdog/imx2_wdt.cst#L63i idv2L63i class="linei nam"v2L63i>hr63foao unsigned ef="..+code=timsout" class="sref">timsoutfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L64i idv2L64i class="linei nam"v2L64i>hr64foao unsigned long ef="..+code=status" class="sref">statusfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L65i idv2L65i class="linei nam"v2L65i>hr65foao struct ef="..+code=tims/_list" class="sref">tims/_listfoao s ef="..+code=tims/" class="sref">tims/foao; san> class="comment">/* Pings the tchdog/i whe closed */span> < ef="..ivers/watchdog/imx2_wdt.cst#L66i idv2L66i class="linei nam"v2L66i>hr66foao} s ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L67i idv2L67i class="linei nam"v2L67i>hr67foao < ef="..ivers/watchdog/imx2_wdt.cst#L68i idv2L68i class="linei nam"v2L68i>hr68foaostatic struct s ef="..+code=miscdevice" class="sref">miscdevicefoao s ef="..+code=x2_wdt.c_miscdev" class="sref">x2_wdt.c_miscdevfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L69i idv2L69i class="linei nam"v2L69i>hr69foao < ef="..ivers/watchdog/imx2_wdt.cst#L70i idv2L70i class="linei nam"v2L70i>hr70foaostatic ef="..+code=bool" class="sref">boolfoao s ef="..+code=nowayout" class="sref">nowayoutfoao =a ef="..+code=WATCHDOG_NOWAYOUT" class="sref">WATCHDOG_NOWAYOUTfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L71i idv2L71i class="linei nam"v2L71i>hr71foaos ef="..+code=module_param" class="sref">module_paramfoao( ef="..+code=nowayout" class="sref">nowayoutfoao, ef="..+code=bool" class="sref">boolfoao, 0); < ef="..ivers/watchdog/imx2_wdt.cst#L72i idv2L72i class="linei nam"v2L72i>hr72foaos ef="..+code=MODULE_PARM_DESC" class="sref">MODULE_PARM_DESCfoao( ef="..+code=nowayout" class="sref">nowayoutfoao, an> class="string">"Wchdog/i cannot be stopped once started (default="span> < ef="..ivers/watchdog/imx2_wdt.cst#L73i idv2L73i class="linei nam"v2L73i>hr73foao ef="..+code=__MODULE_STRING" class="sref">__MODULE_STRINGfoao( ef="..+code=WATCHDOG_NOWAYOUT" class="sref">WATCHDOG_NOWAYOUTfoao) an> class="string">")"span> ); < ef="..ivers/watchdog/imx2_wdt.cst#L74i idv2L74i class="linei nam"v2L74i>hr74foao < ef="..ivers/watchdog/imx2_wdt.cst#L75i idv2L75i class="linei nam"v2L75i>hr75foao < ef="..ivers/watchdog/imx2_wdt.cst#L76i idv2L76i class="linei nam"v2L76i>hr76foaostatic unsigned ef="..+code=timsout" class="sref">timsoutfoao =a ef="..+code=IMX2_WDT_DEFAULT_TIME" class="sref">IMX2_WDT_DEFAULT_TIMEfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L77i idv2L77i class="linei nam"v2L77i>hr77foaos ef="..+code=module_param" class="sref">module_paramfoao( ef="..+code=timsout" class="sref">timsoutfoao, ef="..+code=uint" class="sref">uintfoao, 0); < ef="..ivers/watchdog/imx2_wdt.cst#L78i idv2L78i class="linei nam"v2L78i>hr78foaos ef="..+code=MODULE_PARM_DESC" class="sref">MODULE_PARM_DESCfoao( ef="..+code=timsout" class="sref">timsoutfoao, an> class="string">"Wchdog/i timsout in seconds (default="span> < ef="..ivers/watchdog/imx2_wdt.cst#L79i idv2L79i class="linei nam"v2L79i>hr79foao ef="..+code=__MODULE_STRING" class="sref">__MODULE_STRINGfoao( ef="..+code=IMX2_WDT_DEFAULT_TIME" class="sref">IMX2_WDT_DEFAULT_TIMEfoao) an> class="string">")"span> ); < ef="..ivers/watchdog/imx2_wdt.cst#L80i idv2L80i class="linei nam"v2L80i>hr80foao < ef="..ivers/watchdog/imx2_wdt.cst#L81i idv2L81i class="linei nam"v2L81i>hr81foaostatic const struct s ef="..+code=tchdog/i_info" class="sref">tchdog/i_infofoao s ef="..+code=x2_wdt.c_info" class="sref">x2_wdt.c_infofoao =a{ < ef="..ivers/watchdog/imx2_wdt.cst#L82i idv2L82i class="linei nam"v2L82i>hr82foao .s ef="..+code=xdentity" class="sref">xdentityfoao =a an> class="string">"x2_w+ tchdog/i"span> , < ef="..ivers/watchdog/imx2_wdt.cst#L83i idv2L83i class="linei nam"v2L83i>hr83foao .s ef="..+code=tion> s" class="sref">tion> sfoao =a ef="..+code=WDIOF_KEEPALIVEPING" class="sref">WDIOF_KEEPALIVEPINGfoao |a ef="..+code=WDIOF_SETTIMEOUT" class="sref">WDIOF_SETTIMEOUTfoao |a ef="..+code=WDIOF_MAGICCLOSE" class="sref">WDIOF_MAGICCLOSEfoao, < ef="..ivers/watchdog/imx2_wdt.cst#L84i idv2L84i class="linei nam"v2L84i>hr84foao}; < ef="..ivers/watchdog/imx2_wdt.cst#L85i idv2L85i class="linei nam"v2L85i>hr85foao < ef="..ivers/watchdog/imx2_wdt.cst#L86i idv2L86i class="linei nam"v2L86i>hr86foaostatic s ef="..+code=xnlinei class="sref">xnlinefoao void ef="..+code=x2_wdt.c_setupi class="sref">x2_wdt.c_setupfoao(void) < ef="..ivers/watchdog/imx2_wdt.cst#L87i idv2L87i class="linei nam"v2L87i>hr87foao{ < ef="..ivers/watchdog/imx2_wdt.cst#L88i idv2L88i class="linei nam"v2L88i>hr88foao ef="..+code=u16i class="sref">u16foao ef="..+code=val" class="sref">valfoao =a ef="..+code=__raw_readw" class="sref">__raw_readwfoao( ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=base" class="sref">basefoao +a ef="..+code=IMX2_WDT_WCR" class="sref">IMX2_WDT_WCRfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L89i idv2L89i class="linei nam"v2L89i>hr89foao < ef="..ivers/watchdog/imx2_wdt.cst#L90i idv2L90i class="linei nam"v2L90i>hr90foao an> class="comment">/* Strip the old tchdog/i Tims-Out lue=" */span> < ef="..ivers/watchdog/imx2_wdt.cst#L91i idv2L91i class="linei nam"v2L91i>hr91foao ef="..+code=val" class="sref">valfoao &= ~ ef="..+code=IMX2_WDT_WCR_WT" class="sref">IMX2_WDT_WCR_WTfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L92i idv2L92i class="linei nam"v2L92i>hr92foao an> class="comment">/* Generate reset if WDOG timss out */span> < ef="..ivers/watchdog/imx2_wdt.cst#L93i idv2L93i class="linei nam"v2L93i>hr93foao ef="..+code=val" class="sref">valfoao &= ~ ef="..+code=IMX2_WDT_WCR_WRE" class="sref">IMX2_WDT_WCR_WREfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L94i idv2L94i class="linei nam"v2L94i>hr94foao an> class="comment">/* Keep Wchdog/i Disabled */span> < ef="..ivers/watchdog/imx2_wdt.cst#L95i idv2L95i class="linei nam"v2L95i>hr95foao ef="..+code=val" class="sref">valfoao &= ~ ef="..+code=IMX2_WDT_WCR_WDE" class="sref">IMX2_WDT_WCR_WDEfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L96i idv2L96i class="linei nam"v2L96i>hr96foao an> class="comment">/* Set the tchdog/i's Tims-Out lue=" */span> < ef="..ivers/watchdog/imx2_wdt.cst#L97i idv2L97i class="linei nam"v2L97i>hr97foao ef="..+code=val" class="sref">valfoao |=a ef="..+code=WDOG_SEC_TO_COUNT" class="sref">WDOG_SEC_TO_COUNTfoao( ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=timsout" class="sref">timsoutfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L98i idv2L98i class="linei nam"v2L98i>hr98foao < ef="..ivers/watchdog/imx2_wdt.cst#L99i idv2L99i class="linei nam"v2L99i>hr99foao ef="..+code=__raw_writew" class="sref">__raw_writewfoao( ef="..+code=val" class="sref">valfoao, ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=base" class="sref">basefoao +a ef="..+code=IMX2_WDT_WCR" class="sref">IMX2_WDT_WCRfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L100i idv2L100i class="linei nam"v2L100i>h100foao < ef="..ivers/watchdog/imx2_wdt.cst#L101i idv2L101i class="linei nam"v2L101i>h101foao an> class="comment">/* enable the tchdog/i */span> < ef="..ivers/watchdog/imx2_wdt.cst#L102i idv2L102i class="linei nam"v2L102i>h102foao ef="..+code=val" class="sref">valfoao |=a ef="..+code=IMX2_WDT_WCR_WDE" class="sref">IMX2_WDT_WCR_WDEfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L103i idv2L103i class="linei nam"v2L103i>h103foao ef="..+code=__raw_writew" class="sref">__raw_writewfoao( ef="..+code=val" class="sref">valfoao, ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=base" class="sref">basefoao +a ef="..+code=IMX2_WDT_WCR" class="sref">IMX2_WDT_WCRfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L104i idv2L104i class="linei nam"v2L104i>h104foao} < ef="..ivers/watchdog/imx2_wdt.cst#L105i idv2L105i class="linei nam"v2L105i>h105foao < ef="..ivers/watchdog/imx2_wdt.cst#L106i idv2L106i class="linei nam"v2L106i>h106foaostatic s ef="..+code=xnlinei class="sref">xnlinefoao void ef="..+code=x2_wdt.c_ping" class="sref">x2_wdt.c_pingfoao(void) < ef="..ivers/watchdog/imx2_wdt.cst#L107i idv2L107i class="linei nam"v2L107i>h107foao{ < ef="..ivers/watchdog/imx2_wdt.cst#L108i idv2L108i class="linei nam"v2L108i>h108foao ef="..+code=__raw_writew" class="sref">__raw_writewfoao( ef="..+code=IMX2_WDT_SEQ1" class="sref">IMX2_WDT_SEQ1foao, ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=base" class="sref">basefoao +a ef="..+code=IMX2_WDT_WSR" class="sref">IMX2_WDT_WSRfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L109i idv2L109i class="linei nam"v2L109i>h109foao ef="..+code=__raw_writew" class="sref">__raw_writewfoao( ef="..+code=IMX2_WDT_SEQ2" class="sref">IMX2_WDT_SEQ2foao, ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=base" class="sref">basefoao +a ef="..+code=IMX2_WDT_WSR" class="sref">IMX2_WDT_WSRfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L110i idv2L110i class="linei nam"v2L110i>h1h111foao < ef="..ivers/watchdog/imx2_wdt.cst#L112i idv2L112i class="linei nam"v2L112i>h112foaostatic void ef="..+code=x2_wdt.c_tims/_ping" class="sref">x2_wdt.c_tims/_pingfoao(unsigned long ef="..+code=arg" class="sref">argfoao) < ef="..ivers/watchdog/imx2_wdt.cst#L113i idv2L113i class="linei nam"v2L113i>h113foao{ < ef="..ivers/watchdog/imx2_wdt.cst#L114i idv2L114i class="linei nam"v2L114i>h114foao an> class="comment">/* ping it ers/y x2_wdt.cstimsout / 2 seconds to prersnt reboot */span> < ef="..ivers/watchdog/imx2_wdt.cst#L115i idv2L115i class="linei nam"v2L115i>h115foao ef="..+code=x2_wdt.c_ping" class="sref">x2_wdt.c_pingfoao(); < ef="..ivers/watchdog/imx2_wdt.cst#L116i idv2L116i class="linei nam"v2L116i>h116foao ef="..+code=mod_tims/" class="sref">mod_tims/foao(& ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=tims/" class="sref">tims/foao, ef="..+code=jiffies" class="sref">jiffiesfoao +a ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=timsout" class="sref">timsoutfoao *a ef="..+code=HZ" class="sref">HZfoao / 2); < ef="..ivers/watchdog/imx2_wdt.cst#L117i idv2L117i class="linei nam"v2L117i>h117foao} < ef="..ivers/watchdog/imx2_wdt.cst#L118i idv2L118i class="linei nam"v2L118i>h118foao < ef="..ivers/watchdog/imx2_wdt.cst#L119i idv2L119i class="linei nam"v2L119i>h119foaostatic void ef="..+code=x2_wdt.c_starti class="sref">x2_wdt.c_startfoao(void) < ef="..ivers/watchdog/imx2_wdt.cst#L120i idv2L120i class="linei nam"v2L120i>h12/opao{ < ef="..ivers/watchdog/imx2_wdt.cst#L121i idv2L121i class="linei nam"v2L121i>h121foao if (!s ef="..+code=test_and_set_bit" class="sref">test_and_set_bitfoao( ef="..+code=IMX2_WDT_STATUS_STARTED" class="sref">IMX2_WDT_STATUS_STARTEDfoao, & ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=status" class="sref">statusfoao))a{ < ef="..ivers/watchdog/imx2_wdt.cst#L122i idv2L122i class="linei nam"v2L122i>h122foao an> class="comment">/* at our first start we enable clock and do initialisaon> s */span> < ef="..ivers/watchdog/imx2_wdt.cst#L123i idv2L123i class="linei nam"v2L123i>h123foao s ef="..+code=clk_pf=pare_enable" class="sref">clk_pf=pare_enablefoao( ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=clk" class="sref">clkfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L124i idv2L124i class="linei nam"v2L124i>h124foao < ef="..ivers/watchdog/imx2_wdt.cst#L125i idv2L125i class="linei nam"v2L125i>h125foao s ef="..+code=x2_wdt.c_setupi class="sref">x2_wdt.c_setupfoao(); < ef="..ivers/watchdog/imx2_wdt.cst#L126i idv2L126i class="linei nam"v2L126i>h126foao } else an> class="comment">/* delete the tims/ th>t pings the tchdog/i afts/ close */span> < ef="..ivers/watchdog/imx2_wdt.cst#L127i idv2L127i class="linei nam"v2L127i>h127foao s ef="..+code=del_tims/_synci class="sref">del_tims/_syncfoao(& ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=tims/" class="sref">tims/foao); < ef="..ivers/watchdog/imx2_wdt.cst#L128i idv2L128i class="linei nam"v2L128i>h128foao < ef="..ivers/watchdog/imx2_wdt.cst#L129i idv2L129i class="linei nam"v2L129i>h129foao an> class="comment">/* Wchdog/i is enabled - tims to reload the timsout lue=" */span> < ef="..ivers/watchdog/imx2_wdt.cst#L130i idv2L130i class="linei nam"v2L130i>h130foao ef="..+code=x2_wdt.c_ping" class="sref">x2_wdt.c_pingfoao(); < ef="..ivers/watchdog/imx2_wdt.cst#L131i idv2L131i class="linei nam"v2L131i>h131foao} < ef="..ivers/watchdog/imx2_wdt.cst#L132i idv2L132i class="linei nam"v2L132i>h132foao < ef="..ivers/watchdog/imx2_wdt.cst#L133i idv2L133i class="linei nam"v2L133i>h133foaostatic void ef="..+code=x2_wdt.c_stopi class="sref">x2_wdt.c_stopfoao(void) < ef="..ivers/watchdog/imx2_wdt.cst#L134i idv2L134i class="linei nam"v2L134i>h134foao{ < ef="..ivers/watchdog/imx2_wdt.cst#L135i idv2L135i class="linei nam"v2L135i>h135foao an> class="comment">/* we don't need a clk_disable, it cannot be disabled once started.span> < ef="..ivers/watchdog/imx2_wdt.cst#L136i idv2L136i class="linei nam"v2L136i>h136foaosan> class="comment"> * We use a tims/ to ping the tchdog/i while /devatchdog/i is closed */span> < ef="..ivers/watchdog/imx2_wdt.cst#L137i idv2L137i class="linei nam"v2L137i>h137foao ef="..+code=x2_wdt.c_tims/_ping" class="sref">x2_wdt.c_tims/_pingfoao(0); < ef="..ivers/watchdog/imx2_wdt.cst#L138i idv2L138i class="linei nam"v2L138i>h138foao} < ef="..ivers/watchdog/imx2_wdt.cst#L139i idv2L139i class="linei nam"v2L139i>h139foao < ef="..ivers/watchdog/imx2_wdt.cst#L140i idv2L140i class="linei nam"v2L140i>h140foaostatic void ef="..+code=x2_wdt.c_sec_timsout" class="sref">x2_wdt.c_sec_timsoutfoao(int s ef="..+code=new_timsout" class="sref">new_timsoutfoao) < ef="..ivers/watchdog/imx2_wdt.cst#L141i idv2L141i class="linei nam"v2L141i>h141foao{ < ef="..ivers/watchdog/imx2_wdt.cst#L142i idv2L142i class="linei nam"v2L142i>h142foao ef="..+code=u16i class="sref">u16foao ef="..+code=val" class="sref">valfoao =a ef="..+code=__raw_readw" class="sref">__raw_readwfoao( ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=base" class="sref">basefoao +a ef="..+code=IMX2_WDT_WCR" class="sref">IMX2_WDT_WCRfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L143i idv2L143i class="linei nam"v2L143i>h143foao < ef="..ivers/watchdog/imx2_wdt.cst#L144i idv2L144i class="linei nam"v2L144i>h144foao an> class="comment">/* set the new timsout lue=" in the WSR */span> < ef="..ivers/watchdog/imx2_wdt.cst#L145i idv2L145i class="linei nam"v2L145i>h145foao ef="..+code=val" class="sref">valfoao &= ~ ef="..+code=IMX2_WDT_WCR_WT" class="sref">IMX2_WDT_WCR_WTfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L146i idv2L146i class="linei nam"v2L146i>h146foao ef="..+code=val" class="sref">valfoao |=a ef="..+code=WDOG_SEC_TO_COUNT" class="sref">WDOG_SEC_TO_COUNTfoao( ef="..+code=new_timsout" class="sref">new_timsoutfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L147i idv2L147i class="linei nam"v2L147i>h147foao ef="..+code=__raw_writew" class="sref">__raw_writewfoao( ef="..+code=val" class="sref">valfoao, ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=base" class="sref">basefoao +a ef="..+code=IMX2_WDT_WCR" class="sref">IMX2_WDT_WCRfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L148i idv2L148i class="linei nam"v2L148i>h148foao} < ef="..ivers/watchdog/imx2_wdt.cst#L149i idv2L149i class="linei nam"v2L149i>h149foao < ef="..ivers/watchdog/imx2_wdt.cst#L150i idv2L150i class="linei nam"v2L150i>h150foaostatic int s ef="..+code=x2_wdt.c_open" class="sref">x2_wdt.c_openfoao(struct s ef="..+code=inodei class="sref">xnodefoao *s ef="..+code=inodei class="sref">xnodefoao, struct s ef="..+code=filei class="sref">filefoao *s ef="..+code=filei class="sref">filefoao) < ef="..ivers/watchdog/imx2_wdt.cst#L151i idv2L151i class="linei nam"v2L151i>h151foao{ < ef="..ivers/watchdog/imx2_wdt.cst#L152i idv2L152i class="linei nam"v2L152i>h152foao if (s ef="..+code=test_and_set_bit" class="sref">test_and_set_bitfoao( ef="..+code=IMX2_WDT_STATUS_OPEN" class="sref">IMX2_WDT_STATUS_OPENfoao, & ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=status" class="sref">statusfoao)) < ef="..ivers/watchdog/imx2_wdt.cst#L153i idv2L153i class="linei nam"v2L153i>h153foao return -s ef="..+code=EBUSY" class="sref">EBUSYfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L154i idv2L154i class="linei nam"v2L154i>h154foao < ef="..ivers/watchdog/imx2_wdt.cst#L155i idv2L155i class="linei nam"v2L155i>h155foao ef="..+code=x2_wdt.c_starti class="sref">x2_wdt.c_startfoao(); < ef="..ivers/watchdog/imx2_wdt.cst#L156i idv2L156i class="linei nam"v2L156i>h156foao return ef="..+code=nonseekable_open" class="sref">nonseekable_openfoao( ef="..+code=xnodei class="sref">xnodefoao, s ef="..+code=filei class="sref">filefoao); < ef="..ivers/watchdog/imx2_wdt.cst#L157i idv2L157i class="linei nam"v2L157i>h157foao} < ef="..ivers/watchdog/imx2_wdt.cst#L158i idv2L158i class="linei nam"v2L158i>h158foao < ef="..ivers/watchdog/imx2_wdt.cst#L159i idv2L159i class="linei nam"v2L159i>h159foaostatic int s ef="..+code=x2_wdt.c_closei class="sref">x2_wdt.c_closefoao(struct s ef="..+code=inodei class="sref">xnodefoao *s ef="..+code=inodei class="sref">xnodefoao, struct s ef="..+code=filei class="sref">filefoao *s ef="..+code=filei class="sref">filefoao) < ef="..ivers/watchdog/imx2_wdt.cst#L160i idv2L160i class="linei nam"v2L160i>h16/opao{ < ef="..ivers/watchdog/imx2_wdt.cst#L161i idv2L161i class="linei nam"v2L161i>h161foao if (s ef="..+code=test_bit" class="sref">test_bitfoao( ef="..+code=IMX2_WDT_EXPECT_CLOSE" class="sref">IMX2_WDT_EXPECT_CLOSEfoao, & ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=status" class="sref">statusfoao) && !s ef="..+code=nowayout" class="sref">nowayoutfoao) < ef="..ivers/watchdog/imx2_wdt.cst#L162i idv2L162i class="linei nam"v2L162i>h162foao ef="..+code=x2_wdt.c_stopi class="sref">x2_wdt.c_stopfoao(); < ef="..ivers/watchdog/imx2_wdt.cst#L163i idv2L163i class="linei nam"v2L163i>h163foao else { < ef="..ivers/watchdog/imx2_wdt.cst#L164i idv2L164i class="linei nam"v2L164i>h164foao ef="..+code=dev_crit" class="sref">dev_critfoao( ef="..+code=x2_wdt.c_miscdev" class="sref">x2_wdt.c_miscdevfoao.s ef="..+code=parent" class="sref">parentfoao, < ef="..ivers/watchdog/imx2_wdt.cst#L165i idv2L165i class="linei nam"v2L165i>h165foao an> class="string">"Unexpected close: Expect reboot!\n"span> ); < ef="..ivers/watchdog/imx2_wdt.cst#L166i idv2L166i class="linei nam"v2L166i>h166foao ef="..+code=x2_wdt.c_ping" class="sref">x2_wdt.c_pingfoao(); < ef="..ivers/watchdog/imx2_wdt.cst#L167i idv2L167i class="linei nam"v2L167i>h167foao } < ef="..ivers/watchdog/imx2_wdt.cst#L168i idv2L168i class="linei nam"v2L168i>h168foao < ef="..ivers/watchdog/imx2_wdt.cst#L169i idv2L169i class="linei nam"v2L169i>h169foao ef="..+code=clear_bit" class="sref">clear_bitfoao( ef="..+code=IMX2_WDT_EXPECT_CLOSE" class="sref">IMX2_WDT_EXPECT_CLOSEfoao, & ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=status" class="sref">statusfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L170i idv2L170i class="linei nam"v2L170i>h170foao ef="..+code=clear_bit" class="sref">clear_bitfoao( ef="..+code=IMX2_WDT_STATUS_OPEN" class="sref">IMX2_WDT_STATUS_OPENfoao, & ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=status" class="sref">statusfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L171i idv2L171i class="linei nam"v2L171i>h171foao return 0; < ef="..ivers/watchdog/imx2_wdt.cst#L172i idv2L172i class="linei nam"v2L172i>h172foao} < ef="..ivers/watchdog/imx2_wdt.cst#L173i idv2L173i class="linei nam"v2L173i>h173foao < ef="..ivers/watchdog/imx2_wdt.cst#L174i idv2L174i class="linei nam"v2L174i>h174foaostatic long ef="..+code=x2_wdt.c_ioctl" class="sref">x2_wdt.c_ioctlfoao(struct s ef="..+code=filei class="sref">filefoao *s ef="..+code=filei class="sref">filefoao, unsigned int s ef="..+code=cmd" class="sref">cmdfoao, < ef="..ivers/watchdog/imx2_wdt.cst#L175i idv2L175i class="linei nam"v2L175i>h175foao unsigned long ef="..+code=arg" class="sref">argfoao) < ef="..ivers/watchdog/imx2_wdt.cst#L176i idv2L176i class="linei nam"v2L176i>h176foao{ < ef="..ivers/watchdog/imx2_wdt.cst#L177i idv2L177i class="linei nam"v2L177i>h177foao void ef="..+code=__uss/" class="sref">__uss/foao *s ef="..+code=argpi class="sref">argpfoao =a(void ef="..+code=__uss/" class="sref">__uss/foao *) ef="..+code=arg" class="sref">argfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L178i idv2L178i class="linei nam"v2L178i>h178foao int s ef="..+code=__uss/" class="sref">__uss/foao *s ef="..+code=pi class="sref">pfoao =as ef="..+code=argpi class="sref">argpfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L179i idv2L179i class="linei nam"v2L179i>h179foao int s ef="..+code=new_lue="" class="sref">new_lue="foao; < ef="..ivers/watchdog/imx2_wdt.cst#L180i idv2L180i class="linei nam"v2L180i>h180foao ef="..+code=u16i class="sref">u16foao ef="..+code=val" class="sref">valfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L181i idv2L181i class="linei nam"v2L181i>h181foao < ef="..ivers/watchdog/imx2_wdt.cst#L182i idv2L182i class="linei nam"v2L182i>h182foao swihdo (s ef="..+code=cmd" class="sref">cmdfoao)a{ < ef="..ivers/watchdog/imx2_wdt.cst#L183i idv2L183i class="linei nam"v2L183i>h183foao casea ef="..+code=WDIOC_GETSUPPORT" class="sref">WDIOC_GETSUPPORTfoao: < ef="..ivers/watchdog/imx2_wdt.cst#L184i idv2L184i class="linei nam"v2L184i>h184foao return ef="..+code=copy_to_uss/" class="sref">copy_to_uss/foao( ef="..+code=argpi class="sref">argpfoao, & ef="..+code=x2_wdt.c_info" class="sref">x2_wdt.c_infofoao, < ef="..ivers/watchdog/imx2_wdt.cst#L185i idv2L185i class="linei nam"v2L185i>h185foao sizeof(struct s ef="..+code=tchdog/i_info" class="sref">tchdog/i_infofoao)) ? -s ef="..+code=EFAULT" class="sref">EFAULTfoao : 0; < ef="..ivers/watchdog/imx2_wdt.cst#L186i idv2L186i class="linei nam"v2L186i>h186foao < ef="..ivers/watchdog/imx2_wdt.cst#L187i idv2L187i class="linei nam"v2L187i>h187foao casea ef="..+code=WDIOC_GETSTATUS" class="sref">WDIOC_GETSTATUSfoao: < ef="..ivers/watchdog/imx2_wdt.cst#L188i idv2L188i class="linei nam"v2L188i>h188foao return ef="..+code=put_uss/" class="sref">put_uss/foao(0, s ef="..+code=pi class="sref">pfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L189i idv2L189i class="linei nam"v2L189i>h189foao < ef="..ivers/watchdog/imx2_wdt.cst#L190i idv2L190i class="linei nam"v2L190i>h190foao casea ef="..+code=WDIOC_GETBOOTSTATUS" class="sref">WDIOC_GETBOOTSTATUSfoao: < ef="..ivers/watchdog/imx2_wdt.cst#L191i idv2L191i class="linei nam"v2L191i>h191foao ef="..+code=val" class="sref">valfoao =a ef="..+code=__raw_readw" class="sref">__raw_readwfoao( ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=base" class="sref">basefoao +a ef="..+code=IMX2_WDT_WRSR" class="sref">IMX2_WDT_WRSRfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L192i idv2L192i class="linei nam"v2L192i>h192foao ef="..+code=new_lue="" class="sref">new_lue="foao =a ef="..+code=val" class="sref">valfoao &a ef="..+code=IMX2_WDT_WRSR_TOUT" class="sref">IMX2_WDT_WRSR_TOUTfoao ?a ef="..+code=WDIOF_CARDRESET" class="sref">WDIOF_CARDRESETfoao : 0; < ef="..ivers/watchdog/imx2_wdt.cst#L193i idv2L193i class="linei nam"v2L193i>h193foao return ef="..+code=put_uss/" class="sref">put_uss/foao( ef="..+code=new_lue="" class="sref">new_lue="foao, s ef="..+code=pi class="sref">pfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L194i idv2L194i class="linei nam"v2L194i>h194foao < ef="..ivers/watchdog/imx2_wdt.cst#L195i idv2L195i class="linei nam"v2L195i>h195foao casea ef="..+code=WDIOC_KEEPALIVE" class="sref">WDIOC_KEEPALIVEfoao: < ef="..ivers/watchdog/imx2_wdt.cst#L196i idv2L196i class="linei nam"v2L196i>h196foao ef="..+code=x2_wdt.c_ping" class="sref">x2_wdt.c_pingfoao(); < ef="..ivers/watchdog/imx2_wdt.cst#L197i idv2L197i class="linei nam"v2L197i>h197foao return 0; < ef="..ivers/watchdog/imx2_wdt.cst#L198i idv2L198i class="linei nam"v2L198i>h198foao < ef="..ivers/watchdog/imx2_wdt.cst#L199i idv2L199i class="linei nam"v2L199i>h199foao casea ef="..+code=WDIOC_SETTIMEOUT" class="sref">WDIOC_SETTIMEOUTfoao: < ef="..ivers/watchdog/imx2_wdt.cst#L200i idv2L200i class="linei nam"v2L200i>h200foao if (s ef="..+code=get_uss/" class="sref">get_uss/foao( ef="..+code=new_lue="" class="sref">new_lue="foao, s ef="..+code=pi class="sref">pfoao)) < ef="..ivers/watchdog/imx2_wdt.cst#L201i idv2L201i class="linei nam"v2L201i>h201foao return -s ef="..+code=EFAULT" class="sref">EFAULTfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L202i idv2L202i class="linei nam"v2L202i>h202foao if (( ef="..+code=new_lue="" class="sref">new_lue="foao < 1) || (s ef="..+code=new_lue="" class="sref">new_lue="foao > ef="..+code=IMX2_WDT_MAX_TIME" class="sref">IMX2_WDT_MAX_TIMEfoao)) < ef="..ivers/watchdog/imx2_wdt.cst#L203i idv2L203i class="linei nam"v2L203i>h203foao return -s ef="..+code=EINVAL" class="sref">EINVALfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L204i idv2L204i class="linei nam"v2L204i>h204foao ef="..+code=x2_wdt.c_sec_timsout" class="sref">x2_wdt.c_sec_timsoutfoao(s ef="..+code=new_lue="" class="sref">new_lue="foao); < ef="..ivers/watchdog/imx2_wdt.cst#L205i idv2L205i class="linei nam"v2L205i>h205foao s ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=timsout" class="sref">timsoutfoao =a ef="..+code=new_lue="" class="sref">new_lue="foao; < ef="..ivers/watchdog/imx2_wdt.cst#L206i idv2L206i class="linei nam"v2L206i>h206foao ef="..+code=x2_wdt.c_ping" class="sref">x2_wdt.c_pingfoao(); < ef="..ivers/watchdog/imx2_wdt.cst#L207i idv2L207i class="linei nam"v2L207i>h207foao < ef="..ivers/watchdog/imx2_wdt.cst#L208i idv2L208i class="linei nam"v2L208i>h208foao an> class="comment">/* Fallthrough to return current lue=" */span> < ef="..ivers/watchdog/imx2_wdt.cst#L209i idv2L209i class="linei nam"v2L209i>h209foao casea ef="..+code=WDIOC_GETTIMEOUT" class="sref">WDIOC_GETTIMEOUTfoao: < ef="..ivers/watchdog/imx2_wdt.cst#L210i idv2L210i class="linei nam"v2L210i>h210foao return ef="..+code=put_uss/" class="sref">put_uss/foao( ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=timsout" class="sref">timsoutfoao, s ef="..+code=pi class="sref">pfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L211i idv2L211i class="linei nam"v2L211i>h211foao < ef="..ivers/watchdog/imx2_wdt.cst#L212i idv2L212i class="linei nam"v2L212i>h212foao default: < ef="..ivers/watchdog/imx2_wdt.cst#L213i idv2L213i class="linei nam"v2L213i>h213foao return -s ef="..+code=ENOTTY" class="sref">ENOTTYfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L214i idv2L214i class="linei nam"v2L214i>h214foao } < ef="..ivers/watchdog/imx2_wdt.cst#L215i idv2L215i class="linei nam"v2L215i>h215foao} < ef="..ivers/watchdog/imx2_wdt.cst#L216i idv2L216i class="linei nam"v2L216i>h216foao < ef="..ivers/watchdog/imx2_wdt.cst#L217i idv2L217i class="linei nam"v2L217i>h217foaostatic s ef="..+code=ssize_t" class="sref">ssize_tfoao ef="..+code=x2_wdt.c_write" class="sref">x2_wdt.c_writefoao(struct s ef="..+code=filei class="sref">filefoao *s ef="..+code=filei class="sref">filefoao, const char s ef="..+code=__uss/" class="sref">__uss/foao *s ef="..+code=data" class="sref">datafoao, < ef="..ivers/watchdog/imx2_wdt.cst#L218i idv2L218i class="linei nam"v2L218i>h218foao s ef="..+code=size_t" class="sref">size_tfoao ef="..+code=len" class="sref">lenfoao, s ef="..+code=loff_t" class="sref">loff_tfoao *s ef="..+code=ppos" class="sref">pposfoao) < ef="..ivers/watchdog/imx2_wdt.cst#L219i idv2L219i class="linei nam"v2L219i>h219foao{ < ef="..ivers/watchdog/imx2_wdt.cst#L220i idv2L220i class="linei nam"v2L220i>h220foao ef="..+code=size_t" class="sref">size_tfoao ef="..+code=i" class="sref">xfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L221i idv2L221i class="linei nam"v2L221i>h221foao char s ef="..+code=ci class="sref">cfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L222i idv2L222i class="linei nam"v2L222i>h222foao < ef="..ivers/watchdog/imx2_wdt.cst#L223i idv2L223i class="linei nam"v2L223i>h223foao if (s ef="..+code=len" class="sref">lenfoao == 0) an> class="comment">/* C> we see this even ? */span> < ef="..ivers/watchdog/imx2_wdt.cst#L224i idv2L224i class="linei nam"v2L224i>h224foao return 0; < ef="..ivers/watchdog/imx2_wdt.cst#L225i idv2L225i class="linei nam"v2L225i>h225foao < ef="..ivers/watchdog/imx2_wdt.cst#L226i idv2L226i class="linei nam"v2L226i>h226foao ef="..+code=clear_bit" class="sref">clear_bitfoao( ef="..+code=IMX2_WDT_EXPECT_CLOSE" class="sref">IMX2_WDT_EXPECT_CLOSEfoao, & ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=status" class="sref">statusfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L227i idv2L227i class="linei nam"v2L227i>h227foao an> class="comment">/* sc> to see whether or not we got the magic characts/ */span> < ef="..ivers/watchdog/imx2_wdt.cst#L228i idv2L228i class="linei nam"v2L228i>h228foao for ( ef="..+code=x" class="sref">xfoao =a0; ef="..+code=x" class="sref">xfoao !=a ef="..+code=len" class="sref">lenfoao; ef="..+code=x" class="sref">xfoao++)a{ < ef="..ivers/watchdog/imx2_wdt.cst#L229i idv2L229i class="linei nam"v2L229i>h229foao if (s ef="..+code=get_uss/" class="sref">get_uss/foao( ef="..+code=ci class="sref">cfoao, s ef="..+code=data" class="sref">datafoao +a ef="..+code=x" class="sref">xfoao)) < ef="..ivers/watchdog/imx2_wdt.cst#L230i idv2L230i class="linei nam"v2L230i>h230foao return -s ef="..+code=EFAULT" class="sref">EFAULTfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L231i idv2L231i class="linei nam"v2L231i>h231foao if (s ef="..+code=ci class="sref">cfoao == an> class="string">'V'span> ) < ef="..ivers/watchdog/imx2_wdt.cst#L232i idv2L232i class="linei nam"v2L232i>h232foao ef="..+code=set_bit" class="sref">set_bitfoao( ef="..+code=IMX2_WDT_EXPECT_CLOSE" class="sref">IMX2_WDT_EXPECT_CLOSEfoao, & ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=status" class="sref">statusfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L233i idv2L233i class="linei nam"v2L233i>h233foao } < ef="..ivers/watchdog/imx2_wdt.cst#L234i idv2L234i class="linei nam"v2L234i>h234foao < ef="..ivers/watchdog/imx2_wdt.cst#L235i idv2L235i class="linei nam"v2L235i>h235foao ef="..+code=x2_wdt.c_ping" class="sref">x2_wdt.c_pingfoao(); < ef="..ivers/watchdog/imx2_wdt.cst#L236i idv2L236i class="linei nam"v2L236i>h236foao return ef="..+code=len" class="sref">lenfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L237i idv2L237i class="linei nam"v2L237i>h237foao} < ef="..ivers/watchdog/imx2_wdt.cst#L238i idv2L238i class="linei nam"v2L238i>h238foao < ef="..ivers/watchdog/imx2_wdt.cst#L239i idv2L239i class="linei nam"v2L239i>h239foaostatic const struct s ef="..+code=file_operaon> s" class="sref">file_operaon> sfoao ef="..+code=x2_wdt.c_fops" class="sref">x2_wdt.c_fopsfoao =a{ < ef="..ivers/watchdog/imx2_wdt.cst#L240i idv2L240i class="linei nam"v2L240i>h240foao .s ef="..+code=twns/" class="sref">twns/foao =a ef="..+code=THIS_MODULE" class="sref">THIS_MODULEfoao, < ef="..ivers/watchdog/imx2_wdt.cst#L241i idv2L241i class="linei nam"v2L241i>h241foao .s ef="..+code=llseek" class="sref">llseekfoao =a ef="..+code=no_llseek" class="sref">no_llseekfoao, < ef="..ivers/watchdog/imx2_wdt.cst#L242i idv2L242i class="linei nam"v2L242i>h242foao .s ef="..+code=unlocked_ioctl" class="sref">unlocked_ioctlfoao =a ef="..+code=x2_wdt.c_ioctl" class="sref">x2_wdt.c_ioctlfoao, < ef="..ivers/watchdog/imx2_wdt.cst#L243i idv2L243i class="linei nam"v2L243i>h243foao .s ef="..+code=tien" class="sref">openfoao =a ef="..+code=x2_wdt.c_open" class="sref">x2_wdt.c_openfoao, < ef="..ivers/watchdog/imx2_wdt.cst#L244i idv2L244i class="linei nam"v2L244i>h244foao .s ef="..+code=release" class="sref">releasefoao =a ef="..+code=x2_wdt.c_closei class="sref">x2_wdt.c_closefoao, < ef="..ivers/watchdog/imx2_wdt.cst#L245i idv2L245i class="linei nam"v2L245i>h245foao .s ef="..+code=write" class="sref">writefoao =a ef="..+code=x2_wdt.c_write" class="sref">x2_wdt.c_writefoao, < ef="..ivers/watchdog/imx2_wdt.cst#L246i idv2L246i class="linei nam"v2L246i>h246foao}; < ef="..ivers/watchdog/imx2_wdt.cst#L247i idv2L247i class="linei nam"v2L247i>h247foao < ef="..ivers/watchdog/imx2_wdt.cst#L248i idv2L248i class="linei nam"v2L248i>h248foaostatic struct s ef="..+code=miscdevice" class="sref">miscdevicefoao ef="..+code=x2_wdt.c_miscdev" class="sref">x2_wdt.c_miscdevfoao =a{ < ef="..ivers/watchdog/imx2_wdt.cst#L249i idv2L249i class="linei nam"v2L249i>h249foao .s ef="..+code=mino/" class="sref">mino/foao =a ef="..+code=WATCHDOG_MINOR" class="sref">WATCHDOG_MINORfoao, < ef="..ivers/watchdog/imx2_wdt.cst#L250i idv2L250i class="linei nam"v2L250i>h250foao .s ef="..+code=nam"" class="sref">nam"foao =a an> class="string">"tchdog/i"span> , < ef="..ivers/watchdog/imx2_wdt.cst#L251i idv2L251i class="linei nam"v2L251i>h251foao .s ef="..+code=fops" class="sref">fopsfoao =a& ef="..+code=x2_wdt.c_fops" class="sref">x2_wdt.c_fopsfoao, < ef="..ivers/watchdog/imx2_wdt.cst#L252i idv2L252i class="linei nam"v2L252i>h252foao}; < ef="..ivers/watchdog/imx2_wdt.cst#L253i idv2L253i class="linei nam"v2L253i>h253foao < ef="..ivers/watchdog/imx2_wdt.cst#L254i idv2L254i class="linei nam"v2L254i>h254foaostatic int s ef="..+code=__init" class="sref">__initfoao ef="..+code=x2_wdt.c_probe" class="sref">x2_wdt.c_probefoao(struct s ef="..+code=platform_device" class="sref">platform_devicefoao *s ef="..+code=pdev" class="sref">pdevfoao) < ef="..ivers/watchdog/imx2_wdt.cst#L255i idv2L255i class="linei nam"v2L255i>h255foao{ < ef="..ivers/watchdog/imx2_wdt.cst#L256i idv2L256i class="linei nam"v2L256i>h256foao int s ef="..+code=ret" class="sref">retfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L257i idv2L257i class="linei nam"v2L257i>h257foao struct s ef="..+code=resource" class="sref">resourcefoao *s ef="..+code=res" class="sref">resfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L258i idv2L258i class="linei nam"v2L258i>h258foao < ef="..ivers/watchdog/imx2_wdt.cst#L259i idv2L259i class="linei nam"v2L259i>h259foao ef="..+code=res" class="sref">resfoao =a ef="..+code=platform_get_resource" class="sref">platform_get_resourcefoao( ef="..+code=pdev" class="sref">pdevfoao, s ef="..+code=IORESOURCE_MEM" class="sref">IORESOURCE_MEMfoao, 0); < ef="..ivers/watchdog/imx2_wdt.cst#L260i idv2L260i class="linei nam"v2L260i>h260foao if (!s ef="..+code=res" class="sref">resfoao)a{ < ef="..ivers/watchdog/imx2_wdt.cst#L261i idv2L261i class="linei nam"v2L261i>h261foao ef="..+code=dev_er/" class="sref">dev_er/foao(& ef="..+code=pdev" class="sref">pdevfoao-> ef="..+code=dev" class="sref">devfoao, san> class="string">"can't get device resources\n"span> ); < ef="..ivers/watchdog/imx2_wdt.cst#L262i idv2L262i class="linei nam"v2L262i>h262foao return -s ef="..+code=ENODEV" class="sref">ENODEVfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L263i idv2L263i class="linei nam"v2L263i>h263foao } < ef="..ivers/watchdog/imx2_wdt.cst#L264i idv2L264i class="linei nam"v2L264i>h264foao < ef="..ivers/watchdog/imx2_wdt.cst#L265i idv2L265i class="linei nam"v2L265i>h265foao ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=base" class="sref">basefoao =a ef="..+code=devm_ioremap_resource" class="sref">devm_ioremap_resourcefoao(& ef="..+code=pdev" class="sref">pdevfoao-> ef="..+code=dev" class="sref">devfoao, s ef="..+code=res" class="sref">resfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L266i idv2L266i class="linei nam"v2L266i>h266foao if (s ef="..+code=IS_ERR" class="sref">IS_ERRfoao( ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=base" class="sref">basefoao)) < ef="..ivers/watchdog/imx2_wdt.cst#L267i idv2L267i class="linei nam"v2L267i>h267foao return s ef="..+code=PTR_ERR" class="sref">PTR_ERRfoao( ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=base" class="sref">basefoao); < ef="..ivers/watchdog/imx2_wdt.cst#L268i idv2L268i class="linei nam"v2L268i>h268foao < ef="..ivers/watchdog/imx2_wdt.cst#L269i idv2L269i class="linei nam"v2L269i>h269foao ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=clk" class="sref">clkfoao =a ef="..+code=clk_get" class="sref">clk_getfoao(& ef="..+code=pdev" class="sref">pdevfoao-> ef="..+code=dev" class="sref">devfoao, s ef="..+code=NULL" class="sref">NULLfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L270i idv2L270i class="linei nam"v2L270i>h270foao if (s ef="..+code=IS_ERR" class="sref">IS_ERRfoao( ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=clk" class="sref">clkfoao))a{ < ef="..ivers/watchdog/imx2_wdt.cst#L271i idv2L271i class="linei nam"v2L271i>h271foao ef="..+code=dev_er/" class="sref">dev_er/foao(& ef="..+code=pdev" class="sref">pdevfoao-> ef="..+code=dev" class="sref">devfoao, san> class="string">"can't get Wchdog/i clock\n"span> ); < ef="..ivers/watchdog/imx2_wdt.cst#L272i idv2L272i class="linei nam"v2L272i>h272foao return s ef="..+code=PTR_ERR" class="sref">PTR_ERRfoao( ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=clk" class="sref">clkfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L273i idv2L273i class="linei nam"v2L273i>h273foao } < ef="..ivers/watchdog/imx2_wdt.cst#L274i idv2L274i class="linei nam"v2L274i>h274foao < ef="..ivers/watchdog/imx2_wdt.cst#L275i idv2L275i class="linei nam"v2L275i>h275foao ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=timsout" class="sref">timsoutfoao =a ef="..+code=clamp_t" class="sref">clamp_tfoao(unsigned, s ef="..+code=timsout" class="sref">timsoutfoao, 1, s ef="..+code=IMX2_WDT_MAX_TIME" class="sref">IMX2_WDT_MAX_TIMEfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L276i idv2L276i class="linei nam"v2L276i>h276foao if (s ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=timsout" class="sref">timsoutfoao !=a ef="..+code=timsout" class="sref">timsoutfoao) < ef="..ivers/watchdog/imx2_wdt.cst#L277i idv2L277i class="linei nam"v2L277i>h277foao s ef="..+code=dev_warn" class="sref">dev_warnfoao(& ef="..+code=pdev" class="sref">pdevfoao-> ef="..+code=dev" class="sref">devfoao, san> class="string">"Initial timsout out of range! "span> < ef="..ivers/watchdog/imx2_wdt.cst#L278i idv2L278i class="linei nam"v2L278i>h278foao san> class="string">"Clamped from %u to %u\n"span> , s ef="..+code=timsout" class="sref">timsoutfoao, s ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=timsout" class="sref">timsoutfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L279i idv2L279i class="linei nam"v2L279i>h279foao < ef="..ivers/watchdog/imx2_wdt.cst#L280i idv2L280i class="linei nam"v2L280i>h280foao ef="..+code=setup_tims/" class="sref">setup_tims/foao(& ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=tims/" class="sref">tims/foao, ef="..+code=x2_wdt.c_tims/_ping" class="sref">x2_wdt.c_tims/_pingfoao, 0); < ef="..ivers/watchdog/imx2_wdt.cst#L281i idv2L281i class="linei nam"v2L281i>h281foao < ef="..ivers/watchdog/imx2_wdt.cst#L282i idv2L282i class="linei nam"v2L282i>h282foao ef="..+code=x2_wdt.c_miscdev" class="sref">x2_wdt.c_miscdevfoao.s ef="..+code=parent" class="sref">parentfoao =a& ef="..+code=pdev" class="sref">pdevfoao-> ef="..+code=dev" class="sref">devfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L283i idv2L283i class="linei nam"v2L283i>h283foao s ef="..+code=ret" class="sref">retfoao =a ef="..+code=misc_regists/" class="sref">misc_regists/foao(& ef="..+code=x2_wdt.c_miscdev" class="sref">x2_wdt.c_miscdevfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L284i idv2L284i class="linei nam"v2L284i>h284foao if (s ef="..+code=ret" class="sref">retfoao) < ef="..ivers/watchdog/imx2_wdt.cst#L285i idv2L285i class="linei nam"v2L285i>h285foao goto s ef="..+code=fail" class="sref">failfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L286i idv2L286i class="linei nam"v2L286i>h286foao < ef="..ivers/watchdog/imx2_wdt.cst#L287i idv2L287i class="linei nam"v2L287i>h287foao ef="..+code=dev_info" class="sref">dev_infofoao(& ef="..+code=pdev" class="sref">pdevfoao-> ef="..+code=dev" class="sref">devfoao, < ef="..ivers/watchdog/imx2_wdt.cst#L288i idv2L288i class="linei nam"v2L288i>h288foao san> class="string">"IMX2+ Wchdog/i Tims/ enabled. timsout=%ds (nowayout=%d)\n"span> , < ef="..ivers/watchdog/imx2_wdt.cst#L289i idv2L289i class="linei nam"v2L289i>h289foao s ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=timsout" class="sref">timsoutfoao, ef="..+code=nowayout" class="sref">nowayoutfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L290i idv2L290i class="linei nam"v2L290i>h290foao return 0; < ef="..ivers/watchdog/imx2_wdt.cst#L291i idv2L291i class="linei nam"v2L291i>h291foao < ef="..ivers/watchdog/imx2_wdt.cst#L292i idv2L292i class="linei nam"v2L292i>h292foaos ef="..+code=fail" class="sref">failfoao: < ef="..ivers/watchdog/imx2_wdt.cst#L293i idv2L293i class="linei nam"v2L293i>h293foao s ef="..+code=x2_wdt.c_miscdev" class="sref">x2_wdt.c_miscdevfoao.s ef="..+code=parent" class="sref">parentfoao =as ef="..+code=NULL" class="sref">NULLfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L294i idv2L294i class="linei nam"v2L294i>h294foao s ef="..+code=clk_put" class="sref">clk_putfoao( ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=clk" class="sref">clkfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L295i idv2L295i class="linei nam"v2L295i>h295foao return s ef="..+code=ret" class="sref">retfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L296i idv2L296i class="linei nam"v2L296i>h296foao} < ef="..ivers/watchdog/imx2_wdt.cst#L297i idv2L297i class="linei nam"v2L297i>h297foao < ef="..ivers/watchdog/imx2_wdt.cst#L298i idv2L298i class="linei nam"v2L298i>h298foaostatic int s ef="..+code=__exit" class="sref">__exitfoao ef="..+code=x2_wdt.c_remove" class="sref">x2_wdt.c_removefoao(struct s ef="..+code=platform_device" class="sref">platform_devicefoao *s ef="..+code=pdev" class="sref">pdevfoao) < ef="..ivers/watchdog/imx2_wdt.cst#L299i idv2L299i class="linei nam"v2L299i>h299foao{ < ef="..ivers/watchdog/imx2_wdt.cst#L300i idv2L300i class="linei nam"v2L300i>h300foao ef="..+code=misc_deregists/" class="sref">misc_deregists/foao(& ef="..+code=x2_wdt.c_miscdev" class="sref">x2_wdt.c_miscdevfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L301i idv2L301i class="linei nam"v2L301i>h301foao < ef="..ivers/watchdog/imx2_wdt.cst#L302i idv2L302i class="linei nam"v2L302i>h302foao if (s ef="..+code=test_bit" class="sref">test_bitfoao( ef="..+code=IMX2_WDT_STATUS_STARTED" class="sref">IMX2_WDT_STATUS_STARTEDfoao, & ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=status" class="sref">statusfoao))a{ < ef="..ivers/watchdog/imx2_wdt.cst#L303i idv2L303i class="linei nam"v2L303i>h303foao ef="..+code=del_tims/_synci class="sref">del_tims/_syncfoao(& ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=tims/" class="sref">tims/foao); < ef="..ivers/watchdog/imx2_wdt.cst#L304i idv2L304i class="linei nam"v2L304i>h304foao < ef="..ivers/watchdog/imx2_wdt.cst#L305i idv2L305i class="linei nam"v2L305i>h305foao s ef="..+code=dev_crit" class="sref">dev_critfoao( ef="..+code=x2_wdt.c_miscdev" class="sref">x2_wdt.c_miscdevfoao.s ef="..+code=parent" class="sref">parentfoao, < ef="..ivers/watchdog/imx2_wdt.cst#L306i idv2L306i class="linei nam"v2L306i>h306foao san> class="string">"Device removed: Expect reboot!\n"span> ); < ef="..ivers/watchdog/imx2_wdt.cst#L307i idv2L307i class="linei nam"v2L307i>h307foao } else < ef="..ivers/watchdog/imx2_wdt.cst#L308i idv2L308i class="linei nam"v2L308i>h308foao ef="..+code=clk_put" class="sref">clk_putfoao( ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=clk" class="sref">clkfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L309i idv2L309i class="linei nam"v2L309i>h309foao < ef="..ivers/watchdog/imx2_wdt.cst#L310i idv2L310i class="linei nam"v2L310i>h310foao ef="..+code=x2_wdt.c_miscdev" class="sref">x2_wdt.c_miscdevfoao.s ef="..+code=parent" class="sref">parentfoao =as ef="..+code=NULL" class="sref">NULLfoao; < ef="..ivers/watchdog/imx2_wdt.cst#L311i idv2L311i class="linei nam"v2L311i>h311foao return 0; < ef="..ivers/watchdog/imx2_wdt.cst#L312i idv2L312i class="linei nam"v2L312i>h312foao} < ef="..ivers/watchdog/imx2_wdt.cst#L313i idv2L313i class="linei nam"v2L313i>h313foao < ef="..ivers/watchdog/imx2_wdt.cst#L314i idv2L314i class="linei nam"v2L314i>h314foaostatic void ef="..+code=x2_wdt.c_shutdown" class="sref">x2_wdt.c_shutdownfoao(struct s ef="..+code=platform_device" class="sref">platform_devicefoao *s ef="..+code=pdev" class="sref">pdevfoao) < ef="..ivers/watchdog/imx2_wdt.cst#L315i idv2L315i class="linei nam"v2L315i>h315foao{ < ef="..ivers/watchdog/imx2_wdt.cst#L316i idv2L316i class="linei nam"v2L316i>h316foao if (s ef="..+code=test_bit" class="sref">test_bitfoao( ef="..+code=IMX2_WDT_STATUS_STARTED" class="sref">IMX2_WDT_STATUS_STARTEDfoao, & ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=status" class="sref">statusfoao))a{ < ef="..ivers/watchdog/imx2_wdt.cst#L317i idv2L317i class="linei nam"v2L317i>h317foao san> class="comment">/* we are running, we need to delete the tims/ but will givefoan> < ef="..ivers/watchdog/imx2_wdt.cst#L318i idv2L318i class="linei nam"v2L318i>h318foaosan> class="comment"> * max timsout before reboot will take plac" */span> < ef="..ivers/watchdog/imx2_wdt.cst#L319i idv2L319i class="linei nam"v2L319i>h319foao ef="..+code=del_tims/_synci class="sref">del_tims/_syncfoao(& ef="..+code=x2_wdt.c" class="sref">x2_wdt.cfoao.s ef="..+code=tims/" class="sref">tims/foao); < ef="..ivers/watchdog/imx2_wdt.cst#L320i idv2L320i class="linei nam"v2L320i>h320foao ef="..+code=x2_wdt.c_sec_timsout" class="sref">x2_wdt.c_sec_timsoutfoao(s ef="..+code=IMX2_WDT_MAX_TIME" class="sref">IMX2_WDT_MAX_TIMEfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L321i idv2L321i class="linei nam"v2L321i>h321foao ef="..+code=x2_wdt.c_ping" class="sref">x2_wdt.c_pingfoao(); < ef="..ivers/watchdog/imx2_wdt.cst#L322i idv2L322i class="linei nam"v2L322i>h322foao < ef="..ivers/watchdog/imx2_wdt.cst#L323i idv2L323i class="linei nam"v2L323i>h323foao ef="..+code=dev_crit" class="sref">dev_critfoao( ef="..+code=x2_wdt.c_miscdev" class="sref">x2_wdt.c_miscdevfoao.s ef="..+code=parent" class="sref">parentfoao, < ef="..ivers/watchdog/imx2_wdt.cst#L324i idv2L324i class="linei nam"v2L324i>h324foao san> class="string">"Device shutdown: Expect reboot!\n"span> ); < ef="..ivers/watchdog/imx2_wdt.cst#L325i idv2L325i class="linei nam"v2L325i>h325foao } < ef="..ivers/watchdog/imx2_wdt.cst#L326i idv2L326i class="linei nam"v2L326i>h326foao} < ef="..ivers/watchdog/imx2_wdt.cst#L327i idv2L327i class="linei nam"v2L327i>h327foao < ef="..ivers/watchdog/imx2_wdt.cst#L328i idv2L328i class="linei nam"v2L328i>h328foaostatic const struct s ef="..+code=of_device_id" class="sref">of_device_idfoao ef="..+code=x2_wdt.c_.c_ids" class="sref">x2_wdt.c_.c_idsfoao[] =a{ < ef="..ivers/watchdog/imx2_wdt.cst#L329i idv2L329i class="linei nam"v2L329i>h329foao { .s ef="..+code=compatiblei class="sref">compatiblefoao =asan> class="string">"fsl,x2_w1-t.c"span> , }, < ef="..ivers/watchdog/imx2_wdt.cst#L330i idv2L330i class="linei nam"v2L330i>h330foao { an> class="comment">/* sentinel */span> } < ef="..ivers/watchdog/imx2_wdt.cst#L331i idv2L331i class="linei nam"v2L331i>h331foao}; < ef="..ivers/watchdog/imx2_wdt.cst#L332i idv2L332i class="linei nam"v2L332i>h332foao < ef="..ivers/watchdog/imx2_wdt.cst#L333i idv2L333i class="linei nam"v2L333i>h333foaostatic struct s ef="..+code=platform_dvers/" class="sref">platform_dvers/foao ef="..+code=x2_wdt.c_.vers/" class="sref">x2_wdt.c_.vers/foao =a{ < ef="..ivers/watchdog/imx2_wdt.cst#L334i idv2L334i class="linei nam"v2L334i>h334foao .s ef="..+code=remove" class="sref">removefoao =a ef="..+code=__exit_pi class="sref">__exit_pfoao( ef="..+code=x2_wdt.c_remove" class="sref">x2_wdt.c_removefoao), < ef="..ivers/watchdog/imx2_wdt.cst#L335i idv2L335i class="linei nam"v2L335i>h335foao .s ef="..+code=shutdown" class="sref">shutdownfoao =a ef="..+code=x2_wdt.c_shutdown" class="sref">x2_wdt.c_shutdownfoao, < ef="..ivers/watchdog/imx2_wdt.cst#L336i idv2L336i class="linei nam"v2L336i>h336foao .s ef="..+code=.vers/" class="sref">.vers/foao =a{ < ef="..ivers/watchdog/imx2_wdt.cst#L337i idv2L337i class="linei nam"v2L337i>h337foao .s ef="..+code=nam"" class="sref">nam"foao =a ef="..+code=DRIVER_NAME" class="sref">DRIVER_NAMEfoao, < ef="..ivers/watchdog/imx2_wdt.cst#L338i idv2L338i class="linei nam"v2L338i>h338foao .s ef="..+code=twns/" class="sref">twns/foao =a ef="..+code=THIS_MODULE" class="sref">THIS_MODULEfoao, < ef="..ivers/watchdog/imx2_wdt.cst#L339i idv2L339i class="linei nam"v2L339i>h339foao .s ef="..+code=tf_mchdo_tablei class="sref">tf_mchdo_tablefoao =as ef="..+code=x2_wdt.c_.c_ids" class="sref">x2_wdt.c_.c_idsfoao, < ef="..ivers/watchdog/imx2_wdt.cst#L340i idv2L340i class="linei nam"v2L340i>h340foao }, < ef="..ivers/watchdog/imx2_wdt.cst#L341i idv2L341i class="linei nam"v2L341i>h341foao}; < ef="..ivers/watchdog/imx2_wdt.cst#L342i idv2L342i class="linei nam"v2L342i>h342foao < ef="..ivers/watchdog/imx2_wdt.cst#L343i idv2L343i class="linei nam"v2L343i>h343foao ef="..+code=module_platform_dvers/_probe" class="sref">module_platform_dvers/_probefoao( ef="..+code=x2_wdt.c_.vers/" class="sref">x2_wdt.c_.vers/foao, ef="..+code=x2_wdt.c_probe" class="sref">x2_wdt.c_probefoao); < ef="..ivers/watchdog/imx2_wdt.cst#L344i idv2L344i class="linei nam"v2L344i>h344foao < ef="..ivers/watchdog/imx2_wdt.cst#L345i idv2L345i class="linei nam"v2L345i>h345foao ef="..+code=MODULE_AUTHOR" class="sref">MODULE_AUTHORfoao( an> class="string">"Wolfram Sang"span> ); < ef="..ivers/watchdog/imx2_wdt.cst#L346i idv2L346i class="linei nam"v2L346i>h346foao ef="..+code=MODULE_DESCRIPTION" class="sref">MODULE_DESCRIPTIONfoao( an> class="string">"Wchdog/i ivers/ for IMX2 and later"span> ); < ef="..ivers/watchdog/imx2_wdt.cst#L347i idv2L347i class="linei nam"v2L347i>h347foao ef="..+code=MODULE_LICENSE" class="sref">MODULE_LICENSEfoao( an> class="string">"GPL v2"span> ); < ef="..ivers/watchdog/imx2_wdt.cst#L348i idv2L348i class="linei nam"v2L348i>h348foao ef="..+code=MODULE_ALIAS_MISCDEV" class="sref">MODULE_ALIAS_MISCDEVfoao( ef="..+code=WATCHDOG_MINOR" class="sref">WATCHDOG_MINORfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L349i idv2L349i class="linei nam"v2L349i>h349foao ef="..+code=MODULE_ALIAS" class="sref">MODULE_ALIASfoao( an> class="string">"platform:"span> a ef="..+code=DRIVER_NAME" class="sref">DRIVER_NAMEfoao); < ef="..ivers/watchdog/imx2_wdt.cst#L350i idv2L350i class="linei nam"v2L350i>h350foao
The original LXR software by the < ef="..http://sourceforge.net/projects/lx/">LXR communityfoao, this experimental rs/wion by < ef="..mailto:lx/@linux.no">lx/@linux.nofoao.
lx/.linux.no kindly hosted by < ef="..http://www.redpill-linpro.no">Redpill Linpro ASfoao, provider of Linux consulting and operaon> s services sinceh1995.