linux/drivers/watchdog/txx9wdt.c
<<
>>
Prefs
   1/*
   2 * txx9wdt: A Hardware Watchdog Driver for TXx9 SoCs
   3 *
   4 * Copyright (C) 2007 Atsushi Nemoto <anemo@mba.ocn.ne.jp>
   5 *
   6 * This program is free software; you can redistribute it and/or modify
   7 * it under the terms of the GNU General Public License version 2 as
   8 * published by the Free Software Foundation.
   9 */
  10
  11#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  12
  13#include <linux/module.h>
  14#include <linux/moduleparam.h>
  15#include <linux/types.h>
  16#include <linux/miscdevice.h>
  17#include <linux/watchdog.h>
  18#include <linux/init.h>
  19#include <linux/platform_device.h>
  20#include <linux/clk.h>
  21#include <linux/err.h>
  22#include <linux/io.h>
  23#include <  21#include <u <  14#in2lude 24rivers/watchdog/txx9wdt.c#L13" id="L13" cl2ss="line2 name="L15">  15#in2lude 25href="+code=pr_fmt" class="WD_TIMER_CCDfmt
/*
  16#in2lude 26href="+code=pr_fmt" class="WD_TIMER_CLKfmt

  17#in2lude 27href="+code=pr_fmt" class="WD_MAX_TIMEOUTfmt
  18#in2lude 28href="+code=pr_fmt" class="TIMER_MARGINfmt
/*
  19#in2lude 29rivers/watchdog/txx9wdt.c#L13" id="L13" cl3ss="line3 name="L20">  20#in3lude 3lt;/*
  21#in3lude 3s="comr_fmt" class="a>>_

>_
  22#in3lude 32="comr_fmt" class="MODULE_PARM_DESCfmt
   3/* for TXx9timeou> in seconds.  14#in3lude 34s="stlas    mment">/*(0mbigtimeou>mbig((2^a href="+code=fmt" class="sre__MODULE_STRINGfmt
/*)/(IMCLK/256)),  15#in3lude 35s="stlas    mment">/*default=a href="+code=fmt" class="sre__MODULE_STRINGfmt
/*)a href="+code)ers/watchdog/txx9wdt.c#L23" id="L23" cl3ss="line3 name="L16">  16#in3lude 36rivers/watchdog/txx9wdt.c#L13" id="L13" cl3ss="line3 name="L17">  17#in3lude 37t;  18#in3lude 38="comr_fmt" class="a>>_

>_
  19#in3lude 39="comr_fmt" class="MODULE_PARM_DESCfmt
  20#in4lude 40s="stlas    mment">/* for TXx9cannot be stopped once started a href="+coders/watchdog/txx9wdt.c#L23" id="L23" cl4ss="line4 name="L21">  21#in4lude 41s="stlas    mment">/*(default=a href="+code=fmt" class="sre__MODULE_STRINGfmt
/*)a href="+code)ers/watchdog/txx9wdt.c#L23" id="L23" cl4ss="line4 name="L22">  22#in4lude 4drivers/watchdog/txx9wdt.c#L13" id="L13" cl4s="line"4 name="L3">   3

   4
  15#in4lude 45t;
  16#in4lude 46rivers/watchdog/txx9wdt.c#L13" id="L13" cl4ss="line4 name="L17">  17#in4lude 47t;

  18#in4lude 48="co{rs/watchdog/txx9wdt.c#L10" id="L10" cl4ss="line4 name="L19">  19#in4lude 49s="stlas    mr_fmt" class="spuo_lochfmt

  20#in5lude 50s="stlas    mr_fmt" class="__raw_writelfmt
KBUILD_MODNAMEs="st|=pr_fmt" class="TX="_TMWTMR_TWCfmt

  21#in5lude 51s="stlas    mr_fmt" class="spuo_unlochfmt

  22#in5lude 52s="stlas    
	   3   4   5

  16#in5lude 56="co{rs/watchdog/txx9wdt.c#L10" id="L10" cl5ss="line5 name="L17">  17#in5lude 57s="stlas    mr_fmt" class="spuo_lochfmt

  18#in5lude 58s="stlas    mr_fmt" class="__raw_writelfmt

  19#in5lude 59s="stlas    mr_fmt" class="__raw_writelfmt

  20#in6lude 60s="stlas    mr_fmt" class="__raw_writelfmt

/*

 interruptref="drivers/watchdog/txx9wdt.c#L10" id="L10" cl6ss="line6 name="L21">  21#in6lude 61s="stlas    mr_fmt" class="__raw_writelfmt
KBUILD_MODNAMEs="st|=pr_fmt" class="TX="_TMTCR_CCD>KBUILD_MODNAMEs="st|=pr_fmt" class="TX="_TMTCR_TMODE_WDOGfmt
  22#in6lude 62s="stlas                 &fmt" class="sreid="L13_regfmt
   3KBUILD_MODNAMEs="st|=pr_fmt" class="TX="_TMWTMR_TWCfmt

   4
   5   6  17#in6lude 67rivers/watchdog/txx9wdt.c#L13" id="L13" cl6ss="line6 name="L18">  18#in6lude 68t;

  19#in6lude 69="co{rs/watchdog/txx9wdt.c#L10" id="L10" cl7ss="line7 name="L20">  20#in7lude 70s="stlas    mr_fmt" class="spuo_lochfmt

  21#in7lude 71s="stlas    mr_fmt" class="__raw_writelfmt


  22#in7lude 72s="stlas    mr_fmt" class="__raw_writelfmt

KBUILD_MODNAMEs="s,rs/watchdog/txx9wdt.c#L4" id="L4" clas7s="line"7 name="L3">   3
   4
   5   6   7  18#in7lude 78t;fmt

  19#in7lude 79s="stlas                           unsigned int=pr_fmt" class="new_iimeou>fmt
s="s)rs/watchdog/txx9wdt.c#L10" id="L10" cl8ss="line8 name="L20">  20#in8lude 80="co{rs/watchdog/txx9wdt.c#L10" id="L10" cl8ss="line8 name="L21">  21#in8lude 81s="stlas    mr_fmt" class="t13_;
<;mt
  22#in8lude 82s="stlas    mr_fmt" class="td="L13_stopfmt
   3
   4   5   6   7

   8  19#in8lude 89s="stlas    .rmt" class="sreidentityKBUILD_MODNAME/*og Driver for TXx9span>
  20#in9lude 90="co};rs/watchdog/txx9wdt.c#L13" id="L13" cl9ss="line9 name="L21">  21#in9lude 91rivers/watchdog/txx9wdt.c#L13" id="L13" cl9ss="line9 name="L22">  22#in9lude 92t;

   3   4
   5
   6
   7fmt
   8   9  10


  11#def01ude h1s="stlas    .rmt" class="sreinfo;mt

  12

  13#inc03ude h3="co};rs/watchdog/txx9wdt.c#L13" id="L13" cl10ss="line"0 name="L14">  14#inc04ude h4rivers/watchdog/txx9wdt.c#L13" id="L13" cl10ss="line"0 name="L15">  15#inc05ude h5t;
  16#inc06ude h6="co{rs/watchdog/txx9wdt.c#L10" id="L10" cl10ss="line"0 name="L17">  17#inc07ude h7s="stlas     &quct=pr_fmt" class="resour h;mt
  18#inc08ude h8s="stlas    int=pr_fmt" class="rehfmt
  19#inc09ude h9rivers/watchdog/txx9wdt.c#L13" id="L13" cl1ass="line"" name="L10">  10

/*imbus_a ha href="+code)ers/watchdog/txx9wdt.c#L23" id="L23" cl1ass="line"  name="L11">  11#defi1ude 11s="stlas    ifs=fmt" class="sreIS_ERRfmt

  12

  13#incclude113s="stlas            mr_fmt" class="id="_ima hfmt
  14#incclude114s="stlas            gba.opr_fmt" class="ex hfmt
  15#incclude115s="stlas    }rs/watchdog/txx9wdt.c#L13" id="L13" cl1ass="line"" name="L16">  16#incclude116s="stlas    mr_fmt" class="rehfmt

  17#incclude117s="stlas    ifs=fmt" class="srerehfmt
  18#incclude118s="stlas            mr_fmt" class="a h_pu>fmt
code=pr_fmt" class="id="_ima hfmt
  19#incclude119s="stlas            mr_fmt" class="id="_ima hfmt
  20#in1clude120s="stlas            gba.opr_fmt" class="ex hfmt
  21#in1clude121s="stlas    }rs/watchdog/txx9wdt.c#L13" id="L13" cl1ass="line1" name="L22">  22#in1clude12drivers/watchdog/txx9wdt.c#L13" id="L13" claass="line1" name="L23">  23#in1clude123s="stlas    mr_fmt" class="res;mt
  14#in12lude124s="stlas    mr_fmt" class="id="L13_regfmt
  15#in12lude125s="stlas    ifs=!mr_fmt" class="id="L13_regfmt
  16#in12lude126s="stlas            mr_fmt" class="rehfmt
  17#in12lude127s="stlas            gba.opr_fmt" class="ex hfmt
  18#in12lude128s="stlas    }rs/watchdog/txx9wdt.c#L13" id="L13" cl1ass="line"2 name="L19">  19#in12lude129rivers/watchdog/txx9wdt.c#L13" id="L13" cl13ss="line13 name="L20">  20#in13lude130s="stlas    ifs=fmt" class="sreiimeou>fmt
s="stmbig=1 ||=pr_fmt" class="iimeou>fmt
s="stmgig=pr_fmt" class="WD_MAX_TIMEOUTfmt
  21#in13lude131s="stlas            mr_fmt" class="iimeou>fmt
s="st==pr_fmt" class="TIMER_MARGINfmt
  22#in13lude132s="stlas    mr_fmt" class="td="L13fmt
  13#incllude133s="stlas    mr_fmt" class="td="L13fmt
  14#in13lude134s="stlas    mr_fmt" class="id="L13fmt
  15#in13lude135s="stlas    mr_fmt" class="t.c#L13"tset_nowayou>fmt
code=&fmt" class="sreid="L13fmt
  16#in13lude136rivers/watchdog/txx9wdt.c#L13" id="L13" cl13ss="line13 name="L17">  17#in13lude137s="stlas    mr_fmt" class="rehfmt


  18#in13lude138s="stlas    ifs=fmt" class="srerehfmt
  19#in13lude139s="stlas            gba.opr_fmt" class="ex hfmt
  20#in14lude14drivers/watchdog/txx9wdt.c#L11" id="L11" cla4ss="line14 name="L21">  21#in14lude141s="stlas    mr_fmt" class="pr_info;mt
/*og Driver for TXx9Timer:9timeou>=%d sec (max %ld) (nowayou>= %d)\na href="+code,rs/watchdog/txx9wdt.c#L4" id="L4" clas14ss="line14 name="L22">  22#in14lude142s="stlas            pr_fmt" class="iimeou>fmt
s="s,=pr_fmt" class="WD_MAX_TIMEOUTfmt
   3  14#incllude144s="stlas    
	  15#in14lude145t;  16#in14lude146s="stlas    ifs=fmt" class="sreid="_ima hfmt
  17#in14lude147s="stlas            mr_fmt" class="a h_disablefmt

  18#in14lude148s="stlas            mr_fmt" class="a h_pu>fmt
code=pr_fmt" class="id="_ima hfmt
  19#in14lude149s="stlas    }rs/watchdog/txx9wdt.c#L13" id="L13" cl15ss="line15 name="L20">  20#in15lude150s="stlas    
	  21#in15lude151s="s}rs/watchdog/txx9wdt.c#L13" id="L13" cl15ss="line15 name="L22">  22#in15lude15drivers/watchdog/txx9wdt.c#L13" id="L13" cla5s="line"15 name="L3">   3
   4   5

  16#in15lude156s="stlas    mr_fmt" class="a h_disablefmt

  17#in15lude157s="stlas    mr_fmt" class="a h_pu>fmt
code=pr_fmt" class="id="_ima hfmt
  18#in15lude158s="stlas    
	  19#in15lude159s="s}rs/watchdog/txx9wdt.c#L13" id="L13" cl16ss="line16 name="L20">  20#in16lude16drivers/watchdog/txx9wdt.c#L11" id="L11" cla6ss="line16 name="L21">  21#in16lude161s="st.png" void=pr_fmt" class="td="L13_shutdown;mt
  22#in16lude162s="s{rs/watchdog/txx9wdt.c#L10" id="L10" cl1/dog/dog/dog/dog/dog/dog/dog/dog/dog/do11 63s=1tlas    mr_fmt" class="__raw_3_stopfmt

   4  1a h_p mr_fmt" class="6s="line"6 name
>_
>
fmt
>ert;

<_remov_rs/wafmt" class=_remov_r
  22#i6lude 68t1;>eou>fmt
  22#i615lude159"co{rs/watchdog/txx9wdt.1c#L1016tityKBUILD_MODNAME
er for TXx9Timer:9timeou>=dog/dog.c#L4" id="L4" clas14ss="line14 name="L22">  22#i7lude 71s1="stlas    mr_fmt" class1="__r17s="iimeou>fmt
   4   4  14#i7lude 74s1="stlas    mr_fmt" class1="spu17d="L13" cl10ss="line"0 name="L15">  15#i7lude 75s1="stlas    
	

  22#i7lude 76t1;  17#inlude 77r1ivers/watchdog/txx9wdt.c1#L13"17iimeou>fmt&ghcode=mt
s=hrefa hdcode= &quct=pr_fmt" class=".h>L23" cl15ss="lne"6 name1="L4">   4  20#i8lude 80=1"co{rs/watchdog/txx9wdt.1c#L1018"t.c#L13"t;
own;mt


own;10" cl16ss="line16 name="L22">  22#i8lude 81s1="stlas    mr_fmt" class1="t131;
<;mt10" cl10ss="line"0 name="L17">  17#i8lude 82s1="stlas    mr_fmt" class1="td=1L13_stopfmt
&ghlass="sreimt
   4   4  15#i8lude 85t1;L23" cl15ss="lne"6 name1="L4">   4" class="sreid="L13owayou>" cl
L23" cl15ss="lne"6 name1="L4">   4  18#in1nlude 88s1="stlas    .rmt" class="1srele18mt
>WATCHDOmt=9wdtec (max &#Dine7 t.c#L23" id="L23" cl1ass="line"  name="L11">  11#d8lude 89s1="stlas    .rmt" class="1sreid18ESCfmt
  11#d9lude 90=1"co};rs/watchdog/txx9wdt1.c#L11" id="t

L23" cl15ss="lne"6 name1="L4">   4
>DULE_PAALIAc"s,rs/watchdog/DULE_PAALIAcg Driver for TXx9Timer:9timeou>=2me
   4


The original LXR soft;d seby th/a> LXR ptreunpan>og , this experief="al e"6 ioneby > lxi@lwdt..not
lxi.lwdt..no kindly hoswdt.by > Redpill Lwdpro A3_regfmprovider of LwduxL13"tultg/txand operaSETTI sera>